c4fce42004-02-26Martin Nilsson # $Id: configure.in,v 1.14 2004/02/26 21:26:32 nilsson 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()
f3c15f2004-02-06Henrik Grubbström (Grubba) 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 
c4fce42004-02-26Martin Nilsson AC_SUBST(IDEA_OBJ)
f3c15f2004-02-06Henrik Grubbström (Grubba) if test "x$ac_cv_lib_nettle_nettle_md5_init" = "xyes" -o \ "x$ac_cv_lib_nettle_md5_init" = "xyes"; then
c20d152004-02-06Niels Möller  PIKE_FEATURE_OK(Nettle)
fe0ca62004-02-26Henrik Grubbström (Grubba)  # md4 is available in later versions of nettle AC_CHECK_FUNCS(nettle_md4_init) AC_MSG_CHECKING([for idea.c]) # Have the patent-encumbered idea files been purged? if test -f "$srcdir/idea.c" ; then AC_MSG_RESULT([found]) AC_DEFINE([WITH_IDEA], 1, [idea.c available])
c4fce42004-02-26Martin Nilsson  IDEA_OBJ=idea.o
fe0ca62004-02-26Henrik Grubbström (Grubba)  else
c4fce42004-02-26Martin Nilsson  AC_MSG_RESULT([no]) IDEA_OBJ=""
fe0ca62004-02-26Henrik Grubbström (Grubba)  fi
f3c15f2004-02-06Henrik Grubbström (Grubba) else
fe0ca62004-02-26Henrik Grubbström (Grubba)  if test "$ac_cv_lib_gmp_mpz_init:$ac_cv_lib_gmp___mpz_init:$ac_cv_lib_gmp___gmpz_init" = "no:no:no"; then PIKE_ENABLE_BUNDLE(gmp, [ ac_cv_lib_gmp_mpz_init ac_cv_lib_gmp___mpz_init ac_cv_lib_gmp___gmpz_init ]) fi PIKE_ENABLE_BUNDLE(nettle, [ ac_cv_lib_nettle_nettle_md5_init ac_cv_lib_nettle_md5_init
c4fce42004-02-26Martin Nilsson  ], [Cannot compile --with--nettle without the Nettle library. 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 may re-ru configure with the option --without-nettle instead. ])
c20d152004-02-06Niels Möller  PIKE_FEATURE_NODEP(Nettle) fi
01e1152003-03-12Niels Möller AC_OUTPUT(Makefile,echo FOO >stamp-h )