# $Id: configure.in,v 1.31 2002-08-16 13:34:25 eku Exp $ AC_INIT(src) AC_CONFIG_AUX_DIR(src/make.new/config) AC_CACHE_VAL(ac_cv_prog_make_set, [AC_PROG_MAKE_SET]) AC_PREFIX_DEFAULT(/usr/local/firebird) AC_CONFIG_HEADER(src/include/gen/autoconfig.h:src/make.new/config/config.h.in) # possibly needed if we use install-sh program #AC_CONFIG_AUX_DIR(`pwd`) AC_CANONICAL_SYSTEM AC_PROG_AWK AC_PROG_CC AC_PROG_CXX AC_PROG_LEX AC_PROG_LN_S AC_PROG_RANLIB AC_PROG_YACC # Some controllable options FIREBIRD_ARCH_TYPE=classic AC_ARG_ENABLE(superserver, [ --enable-superserver build SuperServer architecture [default=no]], [case "$enableval" in yes) FIREBIRD_ARCH_TYPE=super;; no) FIREBIRD_ARCH_TYPE=classic;; *) AC_MSG_ERROR(bad value '${enableval}' for --enable-superserver);; esac]) AC_SUBST(FIREBIRD_ARCH_TYPE) PROD_BUILD_FLG=Y AC_ARG_ENABLE(debug, [ --enable-debug build debug version [default=no]], [case "$enableval" in yes) PROD_BUILD_FLG=;; no) PROD_BUILD_FLG=Y;; *) AC_MSG_ERROR(bad value '${enableval}' for --enable-debug);; esac]) AC_SUBST(PROD_BUILD_FLG) # Check for system header files AC_CHECK_HEADERS(assert.h) AC_CHECK_HEADERS(ctype.h) AC_CHECK_HEADERS(errno.h) AC_CHECK_HEADERS(fcntl.h) AC_CHECK_HEADERS(grp.h) AC_CHECK_HEADERS(pwd.h) AC_CHECK_HEADERS(libio.h) AC_CHECK_HEADERS(locale.h) AC_CHECK_HEADERS(math.h) AC_CHECK_HEADERS(pthread.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(sys/stat.h) AC_CHECK_HEADERS(sys/uio.h) AC_CHECK_HEADERS(sys/wait.h) AC_CHECK_HEADERS(time.h) AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(sys/timeb.h) AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(setjmp.h) AC_CHECK_HEADERS(stdarg.h) AC_CHECK_HEADERS(stdlib.h) AC_CHECK_HEADERS(string.h) AC_CHECK_HEADERS(signal.h) AC_CHECK_HEADERS(readline/readline.h) AC_CHECK_HEADERS(pwd.h) AC_CHECK_HEADERS(unistd.h) AC_CHECK_HEADERS(varargs.h) AC_MSG_CHECKING(Checking for socklen_t type) AC_TRY_COMPILE([#include #include #include ], [socklen_t a;], [AC_MSG_RESULT(yes)], [AC_DEFINE(socklen_t, int) AC_MSG_RESULT(no)]) AC_MSG_CHECKING(Checking if gettimeofday accepts second (timezone) argument) AC_TRY_COMPILE([#include ], [struct timeval tp; gettimeofday(&tp, (struct timezone *)0);], [AC_DEFINE(GETTIMEOFDAY_RETURNS_TIMEZONE) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) AC_CHECK_LIB(dl, main) AC_CHECK_LIB(c,main) AC_CHECK_LIB(m, main) if `test "$FIREBIRD_ARCH_TYPE" = "super"` then AC_CHECK_LIB(pthread, main) fi AC_CHECK_LIB(crypt, main) AC_CHECK_LIB(curses, main) #AC_CHECK_LIB(termcap, main) AC_CHECK_LIB(readline, main,,,$LIBS) AC_CHECK_LIB(stdc++, main,,, $LIBS) AC_CHECK_FUNCS(strlcpy strlcat) AC_CHECK_FUNCS(gettimeofday time times) AC_CHECK_FUNCS(dirname) AC_C_BIGENDIAN AC_C_CONST AC_TYPE_SIGNAL case "$target_cpu" in powerpc) AC_DEFINE(PowerPC) ;; esac case "$target" in *-*-darwin*) MAKEFILE_PREFIX=darwin ; PLATFORM=DARWIN ; AC_DEFINE(DARWIN);; *-*-freebsd*) MAKEFILE_PREFIX=freebsd ; PLATFORM=FREEBSD ; AC_DEFINE(FREEBSD);; *-*-linux*) MAKEFILE_PREFIX=linux ; PLATFORM=LINUX ; AC_DEFINE(LINUX) ;; *-*-netbsd*) MAKEFILE_PREFIX=netbsd ; PLATFORM=NETBSD ; AC_DEFINE(NETBSD) ;; *-*-hpux*) MAKEFILE_PREFIX=hpux ; PLATFORM=hpux ; AC_DEFINE(hpux) ;; i386-pc-solaris*) MAKEFILE_PREFIX=solx86 ; PLATFORM=solx86 ; AC_DEFINE(solx86) ;; i*-sni-sysv4) MAKEFILE_PREFIX=sinixz ; PLATFORM="SINIX-Z" ; AC_DEFINE(SINIXZ) esac AC_SUBST(PLATFORM) CPU_TYPE=$host_cpu AC_SUBST(CPU_TYPE) AC_DEFINE(UNIX_64_BIT_IO) # The following file defines the version number strings . ./src/misc/writeBuildNum.sh FIREBIRD_PACKAGE_VERSION="0a.Dev1" FIREBIRD_LIBGDS_SO=libfbembed.so.${FIREBIRD_VERSION} FIREBIRD_LIBGDS_SO_LNK=libfbembed.so FIREBIRD_LIBGDS_SO_X_LNK=libfbembed.so.${MajorVer} AC_SUBST(FIREBIRD_LIBGDS_SO) AC_SUBST(FIREBIRD_LIBGDS_SO_LNK) AC_SUBST(FIREBIRD_LIBGDS_SO_X_LNK) AC_SUBST(FIREBIRD_VERSION) AC_SUBST(FIREBIRD_PACKAGE_VERSION) BUILD_ROOT_DIR=`pwd` SRC_ROOT=$BUILD_ROOT_DIR/src GEN_ROOT=$BUILD_ROOT_DIR/gen NEW_FIREBIRD_DIR=$GEN_ROOT/firebird AC_SUBST(BUILD_ROOT_DIR) AC_SUBST(NEW_FIREBIRD_DIR) #AC_DEFINE_UNQUOTED(FB_BUILD_TYPE, "$BuildType") #AC_DEFINE_UNQUOTED(FB_MAJOR_VER, "$MajorVer") #AC_DEFINE_UNQUOTED(FB_MINOR_VER, "$MinorVer") #AC_DEFINE_UNQUOTED(FB_REV_NO, "$RevNo") #AC_DEFINE_UNQUOTED(FB_BUILD_SUFFIX, "$BuildSuffix") #AC_DEFINE_UNQUOTED(PRODUCT_VER_STRING, "$PRODUCT_VER_STRING") #AC_DEFINE_UNQUOTED(FILE_VER_NUMBER, $FILE_VER_NUMBER) #AC_DEFINE_UNQUOTED(FILE_VER_STRING, "$FILE_VER_STRING") #AC_DEFINE_UNQUOTED(LICENSE_VER_STRING, "$FILE_VER_STRING") # These AC_OUTPUT_COMMANDS should be replaced by AC_CONFIG_COMMANDS_PRE # by that version of autoconf is fresh off the shelf, and for now although # these cause an error it's acceptable. # AC_OUTPUT_COMMANDS([mkdir -p gen/csv]) AC_OUTPUT_COMMANDS([mkdir -p gen/dudley]) AC_OUTPUT_COMMANDS([mkdir -p gen/isql]) AC_OUTPUT_COMMANDS([mkdir -p gen/lock]) AC_OUTPUT_COMMANDS([mkdir -p gen/gpre]) AC_OUTPUT_COMMANDS([mkdir -p gen/pipe]) AC_OUTPUT_COMMANDS([mkdir -p gen/remote]) AC_OUTPUT_COMMANDS([mkdir -p gen/wal]) AC_OUTPUT_COMMANDS([mkdir -p gen/alice]) AC_OUTPUT_COMMANDS([mkdir -p gen/refDatabases]) AC_OUTPUT_COMMANDS([mkdir -p gen/v5_examples]) AC_OUTPUT_COMMANDS([mkdir -p gen/gpre]) AC_OUTPUT_COMMANDS([mkdir -p gen/journal]) AC_OUTPUT_COMMANDS([mkdir -p gen/msgs]) AC_OUTPUT_COMMANDS([mkdir -p gen/burp]) AC_OUTPUT_COMMANDS([mkdir -p gen/dsql]) AC_OUTPUT_COMMANDS([mkdir -p gen/extlib]) AC_OUTPUT_COMMANDS([mkdir -p gen/intl]) AC_OUTPUT_COMMANDS([mkdir -p gen/jrd]) AC_OUTPUT_COMMANDS([mkdir -p gen/qli]) AC_OUTPUT_COMMANDS([mkdir -p gen/utilities]) AC_OUTPUT_COMMANDS([mkdir -p gen/fbutil]) AC_OUTPUT_COMMANDS([mkdir -p gen/install]) AC_OUTPUT_COMMANDS([mkdir -p gen/install/scripts]) AC_OUTPUT_COMMANDS([mkdir -p gen/common]) AC_OUTPUT_COMMANDS([mkdir -p gen/common/memory]) AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/include]) AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/intl]) AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/UDF]) AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/bin]) AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/examples/v5]) AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/lib]) AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/misc]) AC_OUTPUT_COMMANDS([mkdir -p gen/firebird/help]) AC_OUTPUT_COMMANDS([chmod a+x gen/install/install.sh]) AC_OUTPUT_COMMANDS([chmod a+x gen/install/scripts/*.sh]) AC_OUTPUT_COMMANDS([src/misc/writeBuildNum.sh rebuildHeader]) AC_OUTPUT_COMMANDS([mkdir -p gen/jrd/os]) AC_OUTPUT_COMMANDS([mkdir -p gen/jrd/os/darwin]) AC_OUTPUT_COMMANDS([mkdir -p gen/jrd/os/posix]) AC_OUTPUT_COMMANDS([mkdir -p gen/jrd/os/win32]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbcommon]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbcommon/memory]) #AC_OUTPUT_COMMANDS([mkdir -p gen/libdsqlserver]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/jrd]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/dsql]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/lock]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/remote]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/pipe]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/gpre]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/alice]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/burp]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/utilities]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/fbutil]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/wal]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/common/memory]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbserver/jrd/os/posix]) AC_OUTPUT_COMMANDS([mkdir -p gen/fbserver/remote]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/jrd]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/dsql]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/remote]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/utilities]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/fbutil]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbclient/common/memory]) AC_OUTPUT_COMMANDS([mkdir -p gen/client.gbak/burp]) AC_OUTPUT_COMMANDS([mkdir -p gen/client.gfix/alice]) AC_OUTPUT_COMMANDS([mkdir -p gen/client.gpre/gpre]) AC_OUTPUT_COMMANDS([mkdir -p gen/client.isql/isql]) AC_OUTPUT_COMMANDS([mkdir -p gen/client.util/utilities]) AC_OUTPUT_COMMANDS([mkdir -p gen/intl/intl]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbcommon/common/memory]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbcommon/fbutil]) AC_OUTPUT_COMMANDS([mkdir -p gen/boot.gpre/jrd]) AC_OUTPUT_COMMANDS([mkdir -p gen/boot.gpre/gpre]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/jrd]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/dsql]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/lock]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/remote]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/pipe]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/gpre]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/alice]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/utilities]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/fbutil]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/jrd/os/posix]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/burp]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gpre/wal]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.gbak/burp]) AC_OUTPUT_COMMANDS([mkdir -p gen/static.isql/isql]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/jrd]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/dsql]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/lock]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/remote]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/pipe]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/gpre]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/alice]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/utilities]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/fbutil]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/jrd/os/posix]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/burp]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbstatic/wal]) AC_OUTPUT_COMMANDS([mkdir -p gen/embed.lockmgr/lock]) AC_OUTPUT_COMMANDS([mkdir -p gen/embed.util/utilities]) AC_OUTPUT_COMMANDS([mkdir -p gen/embed.gbak/burp]) AC_OUTPUT_COMMANDS([mkdir -p gen/embed.gfix/alice]) AC_OUTPUT_COMMANDS([mkdir -p gen/embed.isql/isql]) AC_OUTPUT_COMMANDS([mkdir -p gen/embed.gdef/dudley]) AC_OUTPUT_COMMANDS([mkdir -p gen/embed.qli/qli]) AC_OUTPUT_COMMANDS([mkdir -p gen/embed.gpre/gpre]) AC_OUTPUT_COMMANDS([mkdir -p gen/inet_server/remote]) AC_OUTPUT_COMMANDS([mkdir -p gen/msgs/msgs]) AC_OUTPUT_COMMANDS([mkdir -p gen/extlib/extlib/fbudf]) AC_OUTPUT_COMMANDS([mkdir -p gen/v5_examples/v5_examples]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/jrd]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/dsql]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/lock]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/remote]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/pipe]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/gpre]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/alice]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/utilities]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/fbutil]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/jrd/os/posix]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/burp]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/wal]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/common/memory]) AC_OUTPUT_COMMANDS([mkdir -p gen/libfbembed/fbutil]) MAKE_SRC_DIR=builds/posix AC_OUTPUT( \ gen/make.rules:${MAKE_SRC_DIR}/make.rules \ gen/make.defaults:${MAKE_SRC_DIR}/make.defaults \ gen/make.platform:${MAKE_SRC_DIR}/prefix.${MAKEFILE_PREFIX} \ gen/make.shared.variables:${MAKE_SRC_DIR}/make.shared.variables \ src/Makefile:${MAKE_SRC_DIR}/Makefile.in.firebird \ gen/Makefile.libfbcommon:${MAKE_SRC_DIR}/Makefile.in.libfbcommon \ gen/Makefile.boot.gpre:${MAKE_SRC_DIR}/Makefile.in.boot.gpre \ gen/Makefile.libfbstatic:${MAKE_SRC_DIR}/Makefile.in.libfbstatic \ gen/Makefile.static.gpre:${MAKE_SRC_DIR}/Makefile.in.static.gpre \ gen/Makefile.static.gbak:${MAKE_SRC_DIR}/Makefile.in.static.gbak \ gen/Makefile.static.isql:${MAKE_SRC_DIR}/Makefile.in.static.isql \ gen/Makefile.refDatabases:${MAKE_SRC_DIR}/Makefile.in.refDatabases \ gen/Makefile.libfbserver:${MAKE_SRC_DIR}/Makefile.in.libfbserver \ gen/Makefile.fbserver:${MAKE_SRC_DIR}/Makefile.in.fbserver \ gen/Makefile.libfbclient:${MAKE_SRC_DIR}/Makefile.in.libfbclient \ gen/Makefile.client.gbak:${MAKE_SRC_DIR}/Makefile.in.client.gbak \ gen/Makefile.client.gfix:${MAKE_SRC_DIR}/Makefile.in.client.gfix \ gen/Makefile.client.isql:${MAKE_SRC_DIR}/Makefile.in.client.isql \ gen/Makefile.client.gpre:${MAKE_SRC_DIR}/Makefile.in.client.gpre \ gen/Makefile.client.util:${MAKE_SRC_DIR}/Makefile.in.client.util \ gen/Makefile.intl:${MAKE_SRC_DIR}/Makefile.in.intl \ gen/Makefile.msgs:${MAKE_SRC_DIR}/Makefile.in.msgs \ gen/Makefile.extlib:${MAKE_SRC_DIR}/Makefile.in.extlib \ gen/Makefile.v5_examples:${MAKE_SRC_DIR}/Makefile.in.v5_examples \ gen/Makefile.libfbembed:${MAKE_SRC_DIR}/Makefile.in.libfbembed \ gen/Makefile.inet_server:${MAKE_SRC_DIR}/Makefile.in.inet_server \ gen/Makefile.embed.lockmgr:${MAKE_SRC_DIR}/Makefile.in.embed.lockmgr \ gen/Makefile.embed.util:${MAKE_SRC_DIR}/Makefile.in.embed.util \ gen/Makefile.embed.gfix:${MAKE_SRC_DIR}/Makefile.in.embed.gfix \ gen/Makefile.embed.gbak:${MAKE_SRC_DIR}/Makefile.in.embed.gbak \ gen/Makefile.embed.isql:${MAKE_SRC_DIR}/Makefile.in.embed.isql \ gen/Makefile.embed.gdef:${MAKE_SRC_DIR}/Makefile.in.embed.gdef \ gen/Makefile.embed.qli:${MAKE_SRC_DIR}/Makefile.in.embed.qli \ gen/Makefile.embed.gpre:${MAKE_SRC_DIR}/Makefile.in.embed.gpre \ src/v5_examples/Makefile:${MAKE_SRC_DIR}/Makefile.in.example5 \ src/install/Makefile:${MAKE_SRC_DIR}/Makefile.in.install \ Makefile:Makefile.in \ gen/install/scripts/preinstall.sh:src/install/${FIREBIRD_ARCH_TYPE}/preinstall.sh.in \ gen/install/scripts/install.sh:src/install/${FIREBIRD_ARCH_TYPE}/install.sh.in \ gen/install/scripts/postinstall.sh:src/install/${FIREBIRD_ARCH_TYPE}/postinstall.sh.in \ gen/install/scripts/preuninstall.sh:src/install/${FIREBIRD_ARCH_TYPE}/preuninstall.sh.in \ gen/install/scripts/postuninstall.sh:src/install/${FIREBIRD_ARCH_TYPE}/postuninstall.sh.in \ gen/install/install.sh:src/install/${FIREBIRD_ARCH_TYPE}/tarInstall.sh.in \ src/install/misc/firebird.xinetd \ ) # Print out the build configuration (the most interesting thing) echo echo echo The Firebird2 package has been configured with the following options: echo case $FIREBIRD_ARCH_TYPE in super) echo "Architecture : SuperServer";; classic) echo "Architecture : ClassicServer";; esac case $PROD_BUILD_FLG in Y) echo " Debug : disabled";; *) echo " Debug : enabled";; esac echo # EOF