123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- dnl
- dnl Process this file with autoconf to produce a configure script.
- dnl
- dnl $Id: configure.in,v 1.33 2008/02/08 15:10:17 adeniz Exp $
- dnl
- dnl autoconf input for the MicroNeil SNFServer distribution.
- dnl
- dnl Author: Alban Deniz
- dnl
- dnl Copyright (C) 2008 by MicroNeil Corporation. All rights reserved.
- dnl See www.armresearch.com for the copyright terms.
- dnl
- dnl
- AC_PREREQ(2.52)
-
- AC_INIT(snf-server, 3.0.5)
- AC_CONFIG_SRCDIR(SNFMulti/snfCFGmgr.cpp)
- AC_CONFIG_AUX_DIR(config)
- AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
-
- AM_CONFIG_HEADER(config.h)
-
- AC_LANG(C++)
-
- AC_PROG_LIBTOOL
- AC_PROG_CXX
- AC_PROG_CC
- AC_PROG_INSTALL
- AC_PROG_MAKE_SET
-
- dnl
- dnl Check for programs.
- dnl
- AC_CHECK_PROG(haveCURL, curl, true, false)
- if [[ $haveCURL == "false" ]]
- then
- AC_MSG_ERROR([The CURL program was not found]);
- fi
-
- dnl
- dnl Load the user-specified OS.
- dnl
- AC_ARG_ENABLE(os-type,
- [AS_HELP_STRING([--enable-os-type=TYPE],
- [where TYPE is OpenBSD, FreeBSD, RedHat, Suse, or Ubuntu])],
- [SNF_OSTYPE="${enableval}" ])
- case "$SNF_OSTYPE" in
- OpenBSD|OpenBSD|FreeBSD|RedHat|Suse|Ubuntu)
- :
- ;;
- *)
- AC_MSG_ERROR([Invalid OS type: "$SNF_OSTYPE".
- You must specify a valid OS type with --enable-os-type=TYPE, where TYPE is one of:
- OpenBSD
- FreeBSD
- Suse
- RedHat
- Ubuntu])
- ;;
- esac
- AM_CONDITIONAL([OpenBSD], [test x$SNF_OSTYPE = xOpenBSD])
- AM_CONDITIONAL([FreeBSD], [test x$SNF_OSTYPE = xFreeBSD])
- AM_CONDITIONAL([Suse], [test x$SNF_OSTYPE = xSuse])
- AM_CONDITIONAL([RedHat], [test x$SNF_OSTYPE = xRedHat])
- AM_CONDITIONAL([Ubuntu], [test x$SNF_OSTYPE = xUbuntu])
-
- dnl
- dnl Load whether this is for a package.
- dnl
- AC_ARG_ENABLE(for-package,
- [AS_HELP_STRING([--enable-for-package],
- [enable if building for a package])],
- [FOR_PACKAGE="${enableval}" ])
- AM_CONDITIONAL([ForPackage], [test x$FOR_PACKAGE = xyes])
-
- dnl
- dnl Check libraries.
- dnl
-
- dnl
- dnl pthread library.
- dnl
- AC_CHECK_LIB(pthread, pthread_create,,
- AC_MSG_ERROR([libpthread is required to build AC_PACKAGE_NAME]))
-
- dnl
- dnl Additional compile-time and link-time flags.
- dnl
- SNF_CXXFLAGS='-O3 -pthread'
- SNF_LIBS=''
-
- AC_SUBST(SNF_CXXFLAGS)
- AC_SUBST(SNF_LIBS)
-
- dnl
- dnl Output the makefiles.
- dnl
-
- AC_OUTPUT([Makefile
- CodeDweller/Makefile
- SNFMulti/Makefile
- SNFServer/Makefile
- SNFClient/Makefile
- SNF2Check/Makefile
- Scripts/Makefile
- config_files/Makefile
- Docs/Makefile])
-
- echo "
- Type "make" to build the system using the default (optimized) parameters.
-
- Type "make SNF_CXXFLAGS='-g -pthread'" to build the system for debugging.
-
- OS type: $SNF_OSTYPE
-
- The software will be installed in $prefix.
-
- Done
- "
|