dnl Process this file with autoconf to produce a configure script. AC_INIT dnl AC_CONFIG_HEADER(config.h) AC_PREFIX_DEFAULT(/usr/local) AC_CANONICAL_TARGET([]) AC_DEFINE_UNQUOTED(T_CPU, "$target_cpu") AC_DEFINE_UNQUOTED(T_VENDOR, "$target_vendor") AC_DEFINE_UNQUOTED(T_OS, "$target_os") GNUTLS_MAJOR_VERSION=0 GNUTLS_MINOR_VERSION=2 GNUTLS_MICRO_VERSION=0 GNUTLS_VERSION=$GNUTLS_MAJOR_VERSION.$GNUTLS_MINOR_VERSION.$GNUTLS_MICRO_VERSION AC_DEFINE_UNQUOTED(GNUTLS_VERSION, "$GNUTLS_VERSION") AM_INIT_AUTOMAKE(gnutls, $GNUTLS_VERSION) AM_CONFIG_HEADER(config.h) GNUTLS_MOST_RECENT_INTERFACE=$GNUTLS_MINOR_VERSION GNUTLS_CURRENT_INTERFACE_IMPLEMENTATION_NUMBER=$GNUTLS_MICRO_VERSION GNUTLS_OLDEST_INTERFACE=0 AM_PATH_LIBGCRYPT(1.1.4,, AC_MSG_ERROR([[ *** *** libgcrypt was not found. You may want to get it from *** ftp://ftp.gnupg.org/pub/gcrypt/alpha/libgcrypt/ *** ]])) dnl Can't disable - gnutls depends on gcrypt AC_DEFINE(USE_GCRYPT) AC_SUBST(GNUTLS_MAJOR_VERSION) AC_SUBST(GNUTLS_MINOR_VERSION) AC_SUBST(GNUTLS_MICRO_VERSION) AC_SUBST(GNUTLS_VERSION) AC_SUBST(GNUTLS_MOST_RECENT_INTERFACE) AC_SUBST(GNUTLS_CURRENT_INTERFACE_IMPLEMENTATION_NUMBER) AC_SUBST(GNUTLS_OLDEST_INTERFACE) LT_CURRENT=$GNUTLS_MOST_RECENT_INTERFACE LT_REVISION=$GNUTLS_CURRENT_INTERFACE_IMPLEMENTATION_NUMBER LT_AGE=`expr $GNUTLS_MOST_RECENT_INTERFACE - $GNUTLS_OLDEST_INTERFACE` AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) opt_dmalloc_mode=no AC_MSG_CHECKING([whether in dmalloc mode]) AC_ARG_ENABLE(dmalloc-mode, [ --enable-dmalloc-mode enable dmalloc mode], opt_dmalloc_mode=$enableval) AC_MSG_RESULT($opt_dmalloc_mode) opt_maintainer_mode=no AC_MSG_CHECKING([whether in maintanance mode]) AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable maintainer mode], opt_maintainer_mode=$enableval) AC_MSG_RESULT($opt_maintainer_mode) opt_profiler_mode=no AC_MSG_CHECKING([whether in profile mode]) AC_ARG_ENABLE(profile-mode, [ --enable-profile-mode enable profiler], opt_profiler_mode=$enableval) AC_MSG_RESULT($opt_profiler_mode) AC_PROG_CC AC_PROG_YACC AC_TYPE_SIZE_T AC_C_CONST AC_C_INLINE dnl Checks for programs. AC_PROG_INSTALL dnl AC_PROG_MAKE_SET AC_ARG_WITH( mcrypt, [ --with-mcrypt enable libmcrypt support], [AM_PATH_LIBMCRYPT( 2.4.0,, AC_MSG_ERROR([[*** libmcrypt was not found]]) AC_MSG_ERROR([[*** You need libmcrypt 2.4.x to compile this program. http://mcrypt.hellug.gr]]) ) ] ) LIBS="${LIBS} ${LIBMCRYPT_LIBS}" AC_ARG_WITH( mhash, [ --with-mhash enable libmhash support], [AC_CHECK_LIB(mhash, mhash_init, AC_DEFINE(USE_MHASH) LIBS="${LIBS} -lmhash")]) if test $ac_cv_c_compiler_gnu != no; then CFLAGS="" if test $opt_profiler_mode = yes; then CFLAGS="${CFLAGS} -O0 -fprofile-arcs -finstrument-functions -ftest-coverage" AC_CHECK_LIB(fnccheck, main, LIBS="$LIBS -lfnccheck", AC_MSG_ERROR("You must install libfnccheck in order to enable profiling. http://www710.univ-lyon1.fr/~yperret/fnccheck/profiler.html") ) fi if test $opt_maintainer_mode = yes; then CFLAGS="${CFLAGS} -O0 -ggdb3 -Wall -Wpointer-arith" else CFLAGS="${CFLAGS} -O2" fi if test $opt_dmalloc_mode = yes; then AC_CHECK_LIB( dmalloc, main) AC_DEFINE(USE_DMALLOC) fi fi AC_HEADER_STDC AC_CHECK_HEADERS(unistd.h pwd.h locale.h strings.h stdarg.h) AC_CHECK_HEADERS(sys/stat.h sys/types.h sys/socket.h) AC_CHECK_HEADERS(utime.h zlib.h errno.h signal.h) AC_CHECK_FUNCS(bzero memsetl signal,,) AC_CHECK_FUNCS(lstat stat umask utime memmove bcopy getpwuid,,) AC_CHECK_LIB(gdbm, gdbm_open,, AC_MSG_WARN("GDBM was not found. You will not be able to use Server side session resuming.")) AC_CHECK_LIB(z, compress,,AC_MSG_WARN("ZLIB was not found. You will not be able to use ZLIB compression.")) dnl Checks for libraries. AC_C_BIGENDIAN AC_CHECK_SIZEOF(unsigned long long, 8) AC_CHECK_SIZEOF(unsigned long int, 4) AC_CHECK_SIZEOF(unsigned int, 4) AC_CHECK_SIZEOF(unsigned short int, 2) AC_CHECK_SIZEOF(unsigned char, 1) AM_PROG_LIBTOOL LIBGNUTLS_LIBS="$LIBS -L${libdir} -lgnutls $LIBGCRYPT_LIBS" LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS -I${includedir}" AC_SUBST(LIBGNUTLS_LIBS) AC_SUBST(LIBGNUTLS_CFLAGS) AC_CONFIG_COMMANDS([default],[[ cat lib/gnutls_ui.h >> lib/gnutls.h echo "" >> lib/gnutls.h cat lib/gnutls_errors_int.h >> lib/gnutls.h echo "" >> lib/gnutls.h cat lib/x509_asn1.h >> lib/gnutls.h echo "" >> lib/gnutls.h chmod -w lib/gnutls.h chmod +x lib/libgnutls-config ]],[[]]) AC_CONFIG_FILES([Makefile src/Makefile lib/Makefile lib/libgnutls-config \ lib/gnutls.h doc/Makefile src/x509/Makefile src/srp/Makefile doc/tex/Makefile]) AC_OUTPUT