diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-12-01 10:50:40 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-12-01 10:50:40 +0000 |
commit | dc8b402208abaf0bc493876f1f7bbc7629790b06 (patch) | |
tree | 85a1c83734c78083a044215c5ba1131b80458f26 /configure.in | |
parent | 4f1108a440d9554a52b129818b27ce845580f860 (diff) | |
download | gnutls-dc8b402208abaf0bc493876f1f7bbc7629790b06.tar.gz |
updated detection of library settings
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 142 |
1 files changed, 105 insertions, 37 deletions
diff --git a/configure.in b/configure.in index 91d378f031..814c8fb689 100644 --- a/configure.in +++ b/configure.in @@ -25,15 +25,6 @@ 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) @@ -72,21 +63,37 @@ AC_ARG_ENABLE(profile-mode, opt_profiler_mode=$enableval) AC_MSG_RESULT($opt_profiler_mode) +AC_MSG_RESULT([*** +*** Checking for required for compilation programs... +]) + AC_PROG_CC AC_PROG_YACC -AC_TYPE_SIZE_T AC_PROG_LN_S -AC_C_CONST -AC_C_INLINE dnl Checks for programs. AC_PROG_INSTALL dnl AC_PROG_MAKE_SET +AC_MSG_RESULT([*** +*** Checking for external libraries... +]) + +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) + +dnl MCRYPT AC_ARG_WITH( mcrypt, [ --with-mcrypt enable libmcrypt support], [AM_PATH_LIBMCRYPT( 2.4.0,, @@ -102,9 +109,38 @@ AC_ARG_WITH( mhash, [ --with-mhash enable libmhash support], [AC_CHECK_LIB(mhash, mhash_init, AC_DEFINE(USE_MHASH) LIBS="${LIBS} -lmhash")]) +AC_MSG_CHECKING([whether to check for external libraries]) + +dnl if used --with-ext-libraries then we will not check +dnl for any library (libz, libgdbm) + +AC_ARG_WITH( ext-libraries, [ --without-ext-libraries disable external libraries support], + ac_ext_libraries=$withval +) + +if test x$ac_ext_libraries != xno; then + AC_MSG_RESULT(yes) + 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.")) +else + AC_MSG_RESULT() + + +fi + + +AC_MSG_RESULT([*** +*** Detecting compiler options... +]) + + +AC_C_CONST +AC_C_INLINE + if test $ac_cv_c_compiler_gnu != no; then CFLAGS="" + if test x$opt_profiler_mode = xyes; then CFLAGS="${CFLAGS} -O0 -fprofile-arcs -finstrument-functions -ftest-coverage" AC_CHECK_LIB(fnccheck, main, @@ -124,19 +160,37 @@ if test $ac_cv_c_compiler_gnu != no; then AC_CHECK_LIB( dmalloc, main) AC_DEFINE(USE_DMALLOC) fi + + AC_MSG_CHECKING([whether we have GNU assembler]) + + GAS=`as --version|grep GNU` + if test "$GAS"; then + CFLAGS="${CFLAGS} -pipe" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi fi +AC_MSG_RESULT([*** +*** Detecting library capabilities... +]) + 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 errno.h) -AC_CHECK_FUNCS(bzero memset lstat stat umask utime memmove bcopy getpwuid,,) +AC_CHECK_HEADERS(utime.h errno.h sys/time.h time.h) +AC_CHECK_FUNCS(bzero memset utime memmove bcopy,,) + dnl Defines USE_VA_COPY AC_MSG_CHECKING([whether we have va_copy or __va_copy]) AC_TRY_RUN( changequote(<<, >>)dnl -<<#include <stdarg.h> +<< +#ifdef HAVE_STDARG_H +# include <stdarg.h> +#endif int main() { va_list a,b; va_copy(a, b); @@ -154,7 +208,9 @@ dnl ************ NO VA_COPY dnl Defines USE_VA_COPY AC_TRY_RUN( changequote(<<, >>)dnl - <<#include <stdarg.h> + <<#ifdef HAVE_STDARG_H + # include <stdarg.h> + #endif int main() { va_list a,b; __va_copy(a, b); @@ -177,35 +233,47 @@ AC_MSG_RESULT(none) ) -AC_MSG_CHECKING([whether to check for external libraries]) -dnl if used --with-ext-libraries then we will not check -dnl for any library (libz, libgdbm) +AC_MSG_RESULT([*** +*** Detecting system's parameters... +]) -AC_ARG_WITH( ext-libraries, [ --without-ext-libraries disable external libraries support], - ac_ext_libraries=$withval -) - -if test x$ac_ext_libraries != xno; then - AC_MSG_RESULT(yes) - 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.")) -else - AC_MSG_RESULT() - - -fi - - - -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) +AC_CHECK_TYPE(size_t,, +AC_DEFINE(NO_SIZE_T) +,[ +#ifdef HAVE_TIME_H +# include <time.h> +#endif +#ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +#endif +]) + + +AC_CHECK_TYPE(time_t,, +AC_DEFINE(NO_TIME_T), +[ +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif +] +) + + +AC_C_BIGENDIAN + +AC_MSG_RESULT([*** +*** Detecting options for shared libraries... +]) AM_PROG_LIBTOOL LIBGNUTLS_LIBS="$LIBS -L${libdir} -lgnutls $LIBGCRYPT_LIBS" |