# This file is part of GNUnet.
# (C) 2001, 2002, 2003 Christian Grothoff (and other contributing authors)
#
# GNUnet is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2, or (at your
# option) any later version.
#
# GNUnet is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNUnet; see the file COPYING. If not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
#
# Process this file with autoconf to produce a configure script.
#
# Todo:
# - add version check for libgcrypt
# - add options --without-XXX to prevent XXX from being
# build even if it is detected
#
#
AC_PREREQ(2.57)
AC_INIT([GNUnet], [0.5.5-cvs],address@hidden)
AM_INIT_AUTOMAKE([GNUnet], [0.5.5-cvs])
AM_CONFIG_HEADER([src/include/config.h])
AH_TOP([#define _GNU_SOURCE 1])
# Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
# AC_LIBTOOL_WIN32_DLL
AC_CANONICAL_HOST
# dynamic libraries/plugins
AC_LIBTOOL_DLOPEN
AC_LIBLTDL_INSTALLABLE
AC_SUBST(LTDLINCL)
AC_SUBST(LIBLTDL)
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_LIB_LTDL
AC_CONFIG_SUBDIRS(libltdl)
if test $enable_shared = "no"
then
AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])
fi
CFLAGS="-Wall $CFLAGS"
# use '-fno-strict-aliasing', but only if the compiler can take it
if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1;
then
CFLAGS="-fno-strict-aliasing $CFLAGS"
fi
# Check system type
case "$host_os" in
*darwin* | *rhapsody* | *macosx*)
AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system])
CFLAGS="-no-cpp-precomp $CFLAGS"
LDFLAGS="-flat_namespace -undefined suppress $LDFLAGS"
;;
linux*)
AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
AC_CHECK_LIB(pthread, pthread_create)
;;
freebsd*)
AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
CFLAGS="-D_THREAD_SAFE $CFLAGS"
;;
openbsd*)
AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
CFLAGS="$CFLAGS"
LIBS="$LIBS"
;;
netbsd*)
AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
;;
*solaris*)
AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work])
AC_CHECK_LIB(resolv, res_init)
AC_CHECK_LIB(rt, nanosleep)
CFLAGS="-pthreads $CFLAGS"
;;
*arm-linux*)
AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS"
;;
*cygwin*)
AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
AC_CHECK_LIB(intl, gettext)
;;
*)
AC_MSG_RESULT(Unrecognised OS $host_os)
AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
;;
esac
# Check for PTHREADS (-lpthread, -pthread, etc.).
# From a posting by Miod Vallat
.
# Still broken, which is why solaris is special-cased
# above. See also:
# http://gcc.gnu.org/ml/gcc/2000-05/msg01141.html
# Isn't this wonderful!?
AC_CACHE_CHECK(
[if compiler recognizes -pthread],
myapp_cv_gcc_pthread,
ac_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -pthread"
AC_LANG_SAVE
AC_LANG_C
AC_TRY_LINK([#include ],
[void *p = pthread_create;],
myapp_cv_gcc_pthread=yes,
myapp_cv_gcc_pthread=no)
AC_LANG_RESTORE
CFLAGS=$ac_save_CFLAGS
)
if test $myapp_cv_gcc_pthread = yes
then
myapp_threads=""
CFLAGS="$CFLAGS -pthread"
else
# AC_CHECK_HEADERS(pthread.h) unreliable
AC_CHECK_LIB(pthread,pthread_create,myapp_threads=-lpthread,
[AC_CHECK_LIB(c_r,pthread_create,myapp_threads=-lc_r)])
fi
AM_CONDITIONAL(CYGWIN, test "$build_os" = "cygwin")
AM_CONDITIONAL(SOLARIS, test "$build_os" = "solaris")
# We have three choices for the crypto stuff.
# 1) We use OpenSSL if it is present and the user specified
# --with-crypto.
# 2) We use libgcrypt if it is present and the user specified
# --with-gcrypt.
# 3) If 1) and 2) are wrong, we use our NEW, build-in crypto
# code (which was adapted from libgcrypt).
# NOTE: 3) is new in 0.5.5 and currently does NOT link! (RSA missing).
# gcrypt
# TODO: check libgcrypt version (Mantis bug 387)
gcrypt=0
AC_MSG_CHECKING(for libgcrypt)
AC_ARG_WITH(gcrypt,
[ --with-gcrypt=PFX Base of libgcrypt installation],
[AC_MSG_RESULT("$with_crypto")
case $with_gcrypt in
no) gcrypt=0
;;
yes) AC_CHECK_LIB(gcrypt, gcry_sexp_new,
[AC_CHECK_HEADERS(gcrypt.h, gcrypt=1)])
;;
*) LDFLAGS="$LDFLAGS -L$with_gcrypt/lib"
CPPFLAGS="$CPPFLAGS -I$with_gcrypt/include"
AC_CHECK_LIB(gcrypt, gcry_sexp_new,
[AC_CHECK_HEADERS(gcrypt.h, gcrypt=1)])
;;
esac
],
[AC_MSG_RESULT([--with-gcrypt not specified, not using libgcrypt])])
AM_CONDITIONAL(USE_GCRYPT, test x$gcrypt = x1)
AC_DEFINE_UNQUOTED(USE_GCRYPT, $gcrypt, [gcrypt available])
# openssl
openssl=0
AC_MSG_CHECKING(for openssl)
AC_ARG_WITH(crypto,
[ --with-crypto=PFX Base of OpenSSL installation],
[AC_MSG_RESULT("$with_crypto")
case $with_crypto in
no) openssl=0
;;
yes) AC_CHECK_LIB([crypto], [RSA_generate_key],
[AC_CHECK_HEADERS([openssl/rsa.h openssl/blowfish.h],
[AM_GNUNET_SSL_VERSION
openssl=1])])
;;
*) LDFLAGS="$LDFLAGS -L$with_crypto/lib"
CPPFLAGS="$CPPFLAGS -I$with_crypto/include"
AC_CHECK_LIB([crypto], [RSA_generate_key],
[AC_CHECK_HEADERS([openssl/rsa.h openssl/blowfish.h], openssl=1)])
;;
esac],
[AC_MSG_RESULT([--with-crypto not specified, not using openssl])])
AM_CONDITIONAL(USE_OPENSSL, test x$openssl = x1)
AC_DEFINE_UNQUOTED(USE_OPENSSL, $openssl, [openssl available])
# test for libextractor
extractor=0
AC_MSG_CHECKING(for libextractor)
AC_ARG_WITH(extractor,
[ --with-extractor=PFX Base of libextractor Directory],
[AC_MSG_RESULT("$with_extractor")
if test "$with_extractor" != "no"
then
LDFLAGS="-L$with_extractor/lib $LDFLAGS"
CPPFLAGS="-I$with_extractor/include $CPPFLAGS"
AC_CHECK_HEADERS(extractor.h,
AC_CHECK_LIB([extractor], [EXTRACTOR_loadDefaultLibraries],
EXT_LIB_PATH="-L$with_extractor/lib $EXT_LIB_PATH"
extractor=1))
fi
],
[AC_MSG_RESULT([--with-extractor not specified])
AC_CHECK_HEADERS(extractor.h,
AC_CHECK_LIB([extractor], [EXTRACTOR_loadDefaultLibraries],
extractor=1))])
AM_CONDITIONAL(USE_LIBEXTRACTOR, test x$extractor = x1)
AC_DEFINE_UNQUOTED(USE_LIBEXTRACTOR, $extractor, [libextractor available])
# test for gdbm
gdb=false
AC_MSG_CHECKING(for gdbm)
AC_ARG_WITH(gdbm,
[ --with-gdbm=PFX Base of gdbm installation],
[AC_MSG_RESULT("$with_gdbm")
if test "$with_gdbm" != "no"
then
LDFLAGS="-L$with_gdbm/lib $LDFLAGS"
CPPFLAGS="-I$with_gdbm/include $CPPFLAGS"
AC_CHECK_HEADERS(gdbm.h,
AC_CHECK_LIB(gdbm, gdbm_open,
EXT_LIB_PATH="-L$with_gdbm/lib $EXT_LIB_PATH"
gdb=true))
fi
],
[AC_MSG_RESULT([--with-gdbm not specified])
AC_CHECK_LIB(gdbm, gdbm_open,
[AC_CHECK_HEADERS(gdbm.h, gdb=true)])])
AM_CONDITIONAL(HAVE_GDBM, test x$gdb = xtrue)
# test for tdb
tdb=false
AC_MSG_CHECKING(for tdb)
AC_ARG_WITH(tdb,
[ --with-tdb=PFX Base of tdb installation],
[AC_MSG_RESULT("$with_tdb")
if test "$with_tdb" != "no"
then
LDFLAGS="-L$with_tdb/lib $LDFLAGS"
CPPFLAGS="-I$with_tdb/include $CPPFLAGS"
AC_CHECK_HEADERS(tdb.h,
AC_CHECK_LIB(tdb, tdb_open,
EXT_LIB_PATH="-L$with_tdb/lib $EXT_LIB_PATH"
tdb=true))
fi
],
[AC_MSG_RESULT([--with-tdb not specified])
AC_CHECK_LIB(tdb, tdb_open,
[AC_CHECK_HEADERS(tdb.h, tdb=true)])])
AM_CONDITIONAL(HAVE_TDB, test x$tdb = xtrue)
# test for bdb
bdb=false
AC_MSG_CHECKING(for bdb)
AC_ARG_WITH(bdb,
[ --with-bdb=PFX Base of bdb installation],
[AC_MSG_RESULT("$with_bdb")
if test "$with_bdb" != "no"
then
LDFLAGS="-L$with_bdb/lib $LDFLAGS"
CPPFLAGS="-I$with_bdb/include $CPPFLAGS"
AC_CHECK_HEADERS(db.h,
AC_CHECK_LIB(db, db_create,
EXT_LIB_PATH="-L$with_bdb/lib $EXT_LIB_PATH"
bdb=true))
fi
],
[AC_MSG_RESULT([--with-bdb not specified])
AC_CHECK_LIB(db, db_create,
[AC_CHECK_HEADERS(db.h, bdb=true)])])
AM_CONDITIONAL(HAVE_BDB, test x$bdb = xtrue)
# test for mysql
mysql=false
mysqlfail=false
AC_MSG_CHECKING(for mysql)
AC_ARG_WITH(mysql,
[ --with-mysql=PFX Base of mysql installation],
[AC_MSG_RESULT("$with_mysql")
if test "$with_mysql" != "no"
then
LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql $LDFLAGS"
CPPFLAGS="-I$with_mysql/include $CPPFLAGS"
AC_CHECK_HEADERS(mysql/mysql.h,
AC_CHECK_LIB(mysqlclient, mysql_init,
EXT_LIB_PATH="-L$with_mysql/lib -L$with_mysql/lib/mysql"
mysql=true))
fi
],
[AC_MSG_RESULT([--with-mysql not specified])
AC_CHECK_LIB(mysqlclient, mysql_init,
[AC_CHECK_HEADERS(mysql/mysql.h,mysql=true)])])
# additional version check for mysql
if test "$mysql" = "true"
then
AC_MSG_CHECKING(mysql version)
AC_RUN_IFELSE([AC_LANG_PROGRAM(
[[#include ]],
[[if (MYSQL_VERSION_ID < 32356)
return(-1);
else
return(0);
]])
],mysql=true,mysql=false)
if test "$mysql" = "false"
then
mysqlfail=true
AC_MSG_RESULT([fail, >= 3.23.56 required])
else
AC_MSG_RESULT(ok)
fi
fi
AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue)
# always build directory
AM_CONDITIONAL(HAVE_DIRECTORY, test xtrue = xtrue)
# some other checks for standard libs
AC_CHECK_LIB(nsl, gethostbyname)
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(m, log)
AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported]))
# do gpg/libgcrypt/mpi checks only if we
# are in fact linking against our own crypto
# code and not against openssl/libgcrypt
# set am_conditionals to "false" otherwise
AM_CONDITIONAL(USE_RNDLINUX, test "n" = "y")
AM_CONDITIONAL(USE_RNDUNIX, test "n" = "y")
AM_CONDITIONAL(USE_RNDEGD, test "n" = "y")
AM_CONDITIONAL(USE_RNDW32, test "n" = "y")
if test $openssl == 0
then
if test $gcrypt == 0
then
# GNUPG checks
GNUPG_CHECK_ENDIAN
GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
# MPI checks
MPI_OPT_FLAGS=""
AC_SUBST(MPI_OPT_FLAGS)
# random number generators
AC_MSG_CHECKING([which random module to use])
AC_ARG_ENABLE(static-rnd,
[ --enable-static-rnd=[egd|unix|linux|default|auto] ],
[use_static_rnd=$enableval], [use_static_rnd=default] )
if test "$use_static_rnd" = no; then
use_static_rnd=default
fi
case "$use_static_rnd" in
egd | linux | unix | default )
AC_MSG_RESULT($use_static_rnd)
;;
auto )
AC_MSG_RESULT(automagically selected at runtime)
;;
* )
AC_MSG_RESULT(invalid argument)
AC_MSG_ERROR(there is no random module rnd$use_static_rnd)
;;
esac
AC_ARG_WITH(egd-socket,
[ --with-egd-socket=NAME Use NAME for the EGD socket)],
egd_socket_name="$withval", egd_socket_name="" )
AC_DEFINE_UNQUOTED(EGD_SOCKET_NAME, "$egd_socket_name",
[Define if you don't want the default EGD socket name.
For details see cipher/rndegd.c])
# See whether the user wants to disable checking for /dev/random
AC_MSG_CHECKING([whether use of /dev/random is requested])
AC_ARG_ENABLE(dev-random,
[ --disable-dev-random disable the use of dev random],
try_dev_random=$enableval, try_dev_random=yes)
AC_MSG_RESULT($try_dev_random)
case "${target}" in
*-*-mingw32*)
# special stuff for Windoze NT
ac_cv_have_dev_random=no
;;
i?86-emx-os2 | i?86-*-os2*emx )
# OS/2 with the EMX environment
ac_cv_have_dev_random=no
;;
i?86-*-msdosdjgpp*)
# DOS with the DJGPP environment
ac_cv_have_dev_random=no
;;
*-openbsd* | *-netbsd* | *-freebsd* )
NAME_OF_DEV_RANDOM="/dev/srandom"
NAME_OF_DEV_URANDOM="/dev/urandom"
# DYNLINK_MOD_CFLAGS="-shared -rdynamic $CFLAGS_PIC -Wl,-Bshareable -Wl,-x"
;;
*-solaris* | *-irix* | *-dec-osf* )
NAME_OF_DEV_RANDOM="/dev/random"
NAME_OF_DEV_URANDOM="/dev/random"
# DYNLINK_MOD_CFLAGS="-shared $CFLAGS_PIC"
;;
*)
NAME_OF_DEV_RANDOM="/dev/random"
NAME_OF_DEV_URANDOM="/dev/urandom"
# -shared is a gcc-ism. Find pic flags from GNUPG_CHECK_PIC.
# if test -n "$GCC" ; then
# DYNLINK_MOD_CFLAGS="-shared $CFLAGS_PIC"
# else
# DYNLINK_MOD_CFLAGS="$CFLAGS_PIC"
# fi
;;
esac
AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, "$NAME_OF_DEV_RANDOM",
[defined to the name of the strong random device])
AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM",
[defined to the name of the weaker random device])
AC_SUBST(MPI_OPT_FLAGS)
# check whether we have a random device
if test "$try_dev_random" = yes ; then
AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
[if test -r "$NAME_OF_DEV_RANDOM" && test -r "$NAME_OF_DEV_URANDOM" ; then
ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
if test "$ac_cv_have_dev_random" = yes; then
AC_DEFINE(HAVE_DEV_RANDOM,1,
[defined if the system supports a random device] )
fi
else
AC_MSG_CHECKING(for random device)
ac_cv_have_dev_random=no
AC_MSG_RESULT(has been disabled)
fi
#
# and whether this device supports ioctl
# (Note, that we should do a real test here)
#
#if test "$ac_cv_have_dev_random" = yes ; then
# AC_CHECK_HEADERS(linux/random.h)
# AC_CACHE_CHECK(for random device ioctl, ac_cv_have_dev_random_ioctl,
# [ if test "$ac_cv_header_linux_random_h" = yes ; then
# ac_cv_have_dev_random_ioctl=yes;
# else
# ac_cv_have_dev_random_ioctl=no;
# fi
# ])
# if test "$ac_cv_have_dev_random_ioctl" = yes; then
# AC_DEFINE(HAVE_DEV_RANDOM_IOCTL,1,
# [defined if the random device supports some IOCTLs])
# fi
#fi
# Figure out the random modules that are available for this
# configuration.
print_egd_notice=no
random_modules=""
if test "$use_static_rnd" = default; then
# Figure out the default random module.
if test "$ac_cv_have_dev_random" = yes; then
random_modules="rndlinux"
else
case "${target}" in
*-*-mingw32*|*-*-cygwin*)
random_modules="rndw32"
;;
i?86-emx-os2|i?86-*-os2*emx)
random_modules="rndos2"
;;
m68k-atari-mint)
random_modules="rndatari"
;;
i?86-*-msdosdjgpp*)
:
;;
*)
random_modules="rndlinux rndegd rndunix"
AC_DEFINE(USE_ALL_RANDOM_MODULES, 1,
[Allow to select random modules at runtime.])
;;
esac
fi
else
if test "$use_static_rnd" = auto; then
random_modules="rndlinux rndegd rndunix"
AC_DEFINE(USE_ALL_RANDOM_MODULES, 1)
else
random_modules="rnd$use_static_rnd";
fi
fi
if test -z "$random_modules"; then
AC_MSG_ERROR(no random module available)
fi
# Filter out the modules contained in `disallowed_modules'.
random_modules_tmp=$random_modules
random_modules=""
for rndmod in $random_modules_tmp; do
LIST_MEMBER($rndmod, $disallowed_modules)
if test "$found" = "0"; then
random_modules="$random_modules $rndmod"
fi
done
# Define conditionals and config.h symbols depending on the enabled
# random modules.
LIST_MEMBER(rndlinux, $random_modules)
AM_CONDITIONAL(USE_RNDLINUX, test "$found" = "1")
AC_DEFINE_UNQUOTED(USE_RNDLINUX, $found, [Defined if the /dev/random based RNG should be used.])
LIST_MEMBER(rndunix, $random_modules)
AM_CONDITIONAL(USE_RNDUNIX, test "$found" = "1")
AC_DEFINE_UNQUOTED(USE_RNDUNIX, $found, [Defined if the default Unix RNG should be used.])
if test "$found" = "1"; then
print_egd_notice=yes
fi
LIST_MEMBER(rndegd, $random_modules)
AM_CONDITIONAL(USE_RNDEGD, test "$found" = "1")
AC_DEFINE_UNQUOTED(USE_RNDEGD, $found, [Defined if the EGD based RNG should be used.])
if test "$found" = "1"; then
EGDLIBS=$NETLIBS
AC_SUBST(EGDLIBS)
fi
LIST_MEMBER(rndw32, $random_modules)
AM_CONDITIONAL(USE_RNDW32, test "$found" = "1")
AC_DEFINE_UNQUOTED(USE_RNDW32, $found, [Defined if the Windows specific RNG should be used.])
# end of libgcrypt specific checks
fi
fi
# check for gtk
AC_MSG_CHECKING(for gtk)
AC_ARG_WITH(gtk,
[ --without-gtk Compile GTK Interface or not],
[without_gtk=true
AC_MSG_RESULT(no)],
[AC_MSG_RESULT(yes)
without_gtk=false
AM_GNUNET_PATH_GLIB(1.2.0,,
AC_MSG_ERROR(Could not find glib),
gthread)
AM_GNUNET_PATH_GTK(1.2.0,,AC_MSG_ERROR(Could not find gtk),)]
)
AM_CONDITIONAL(HAVE_GTK, test x$without_gtk != xtrue)
# memory debugger: electric fence?
AC_MSG_CHECKING(whether to link against efence)
AC_ARG_WITH(efence,
[ --with-efence=PFX Debug using efence (default is no)],
[AC_MSG_RESULT("$with_efence")
if test "$with_efence" != "no"
then
LDFLAGS="$with_efence/libefence.a $LDFLAGS"
fi
],
[AC_MSG_RESULT(no)]
)
# memory debugger: dmalloc? (defunct with GNUnet, do not use)
AC_MSG_CHECKING(wether to link against dmalloc)
AC_ARG_WITH(dmalloc,
[ --with-dmalloc=PFX Debug using dmalloc (default is no)],
[AC_MSG_RESULT("$with_dmalloc")
LDFLAGS="$with_dmalloc/libdmallocth.a $LDFLAGS"],
[AC_MSG_RESULT(no)]
)
# right, like we would make use of that already...
AC_MSG_CHECKING(wether to link against gettext)
AC_ARG_WITH(gettext,
[ --with-gettext=PFX Use gettext (default is no)],
[AC_MSG_RESULT("$with_gettext")
if test "$with_gettext" != "no"
then
AC_CHECK_HEADER(libintl.h)
AC_CHECK_LIB([gettextlib], [libintl_gettext],,
AC_MSG_RESULT(Could not find gettextlib))
fi
],
[AC_MSG_RESULT(no)
AC_CHECK_HEADER(libintl.h)
AC_CHECK_LIB([gettextlib], [libintl_gettext],,,)]
)
# Checks for standard header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
# Checks for standard typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_FORK
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([dup2 fdatasync ftruncate gethostbyname gettimeofday memset mkdir mkfifo select socket strcasecmp strchr strdup strerror strstr gethrtime clock_gettime getrusage rand])
AC_SUBST(CPPFLAGS)
AC_SUBST(LIBS)
AC_SUBST(LDFLAGS)
AC_SUBST(EXT_LIB_PATH)
AC_SUBST(EXT_LIBS)
# check for IPv6
ipv6=0
AC_MSG_CHECKING([whether to enable ipv6])
AC_ARG_ENABLE(ipv6,
[AC_HELP_STRING([--enable-ipv6],[Enable ipv6 support])
AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support])],
[case "$enableval" in
no) AC_MSG_RESULT(no)
ipv6=0
;;
*) AC_MSG_RESULT(yes)
ipv6=1
;;
esac],
[ AC_MSG_RESULT(no)
ipv6=0])
AM_CONDITIONAL(HAVE_IPV6, test x$ipv6 != x0)
AC_DEFINE_UNQUOTED(USE_IPV6, $ipv6, [IPV6 available])
AC_CONFIG_FILES([Makefile
doc/Makefile
doc/man/Makefile
src/Makefile
src/include/Makefile
src/applications/Makefile
src/applications/afs/Makefile
src/applications/afs/esed2/Makefile
src/applications/afs/module/Makefile
src/applications/afs/gtkui/Makefile
src/applications/afs/tools/Makefile
src/applications/chat/Makefile
src/applications/stats/Makefile
src/applications/tbench/Makefile
src/applications/tracekit/Makefile
src/server/Makefile
src/test/Makefile
src/transports/Makefile
src/util/Makefile
src/util/gcry/Makefile
src/util/gcry/mpi/Makefile
])
AC_OUTPUT
# warn user if mysql found but not used due to version
if test "$mysqlfail" = "true"
then
AC_MSG_NOTICE([MySQL found, but too old. MySQL support will not be compiled.])
fi