b564d92004-10-05Martin Stjernholm # $Id: configure.in,v 1.17 2004/10/05 10:34:39 mast Exp $
01e1152003-03-12Niels Möller AC_INIT(nettle.cmod)
bfd43f2003-03-13Niels Möller AC_CONFIG_HEADER(nettle_config.h)
01e1152003-03-12Niels Möller  AC_SET_MAKE AC_MODULE_INIT()
3b73682004-02-27Henrik Grubbström (Grubba) if test "$with_nettle" = "no"; then PIKE_FEATURE_WITHOUT(nettle) else AC_CHECK_LIB(gmp, mpz_init) AC_CHECK_LIB(gmp, __mpz_init) AC_CHECK_LIB(gmp, __gmpz_init) AC_CHECK_LIB(nettle, nettle_md5_init) AC_CHECK_LIB(nettle, md5_init)
01e1152003-03-12Niels Möller 
3b73682004-02-27Henrik Grubbström (Grubba)  AC_SUBST(IDEA_OBJ)
c4fce42004-02-26Martin Nilsson 
3b73682004-02-27Henrik Grubbström (Grubba)  if test "x$ac_cv_lib_nettle_nettle_md5_init" = "xyes" -o \ "x$ac_cv_lib_nettle_md5_init" = "xyes"; then PIKE_FEATURE_OK(Nettle)
fe0ca62004-02-26Henrik Grubbström (Grubba) 
3b73682004-02-27Henrik Grubbström (Grubba)  # md4 is available in later versions of nettle AC_CHECK_FUNCS(nettle_md4_init)
fe0ca62004-02-26Henrik Grubbström (Grubba) 
3b73682004-02-27Henrik Grubbström (Grubba)  AC_MSG_CHECKING([for idea.c]) # Have the patent-encumbered idea files been purged? if test -f "$srcdir/idea.c" ; then
fe0ca62004-02-26Henrik Grubbström (Grubba)  AC_MSG_RESULT([found]) AC_DEFINE([WITH_IDEA], 1, [idea.c available])
c4fce42004-02-26Martin Nilsson  IDEA_OBJ=idea.o
3b73682004-02-27Henrik Grubbström (Grubba)  else
c4fce42004-02-26Martin Nilsson  AC_MSG_RESULT([no]) IDEA_OBJ=""
3b73682004-02-27Henrik Grubbström (Grubba)  fi else if test "$ac_cv_lib_gmp_mpz_init:$ac_cv_lib_gmp___mpz_init:$ac_cv_lib_gmp___gmpz_init" = "no:no:no"; then # No gmp found; enable it if possible.
fe0ca62004-02-26Henrik Grubbström (Grubba)  PIKE_ENABLE_BUNDLE(gmp, [
3b73682004-02-27Henrik Grubbström (Grubba)  ac_cv_lib_gmp_mpz_init ac_cv_lib_gmp___mpz_init ac_cv_lib_gmp___gmpz_init
fe0ca62004-02-26Henrik Grubbström (Grubba)  ])
3b73682004-02-27Henrik Grubbström (Grubba)  fi PIKE_ENABLE_BUNDLE(nettle, [
fe0ca62004-02-26Henrik Grubbström (Grubba)  ac_cv_lib_nettle_nettle_md5_init ac_cv_lib_nettle_md5_init
bbaf0c2004-04-21Johan Sundström  ], [Cannot compile --with-nettle without the Nettle library.
b564d92004-10-05Martin Stjernholm It is highly recommended that you install a working Nettle library on your system as that will add features to Pike required by many applications. These features include ciphers, hash algorithms and random generators. If you know that you do not need cryptographic functions, you can re-run configure with the option --without-nettle instead. Nettle is available at http://www.lysator.liu.se/~nisse/nettle/.
3b73682004-02-27Henrik Grubbström (Grubba)  ]) PIKE_FEATURE_NODEP(Nettle) fi
c20d152004-02-06Niels Möller fi
01e1152003-03-12Niels Möller AC_OUTPUT(Makefile,echo FOO >stamp-h )