1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

(crypt): Test with AC_SEARCH_LIBS, for the benefit of

HP-UX.  Define HAVE_CRYPT rather than HAVE_LIBCRYPT.  Reported by
Andreas Voegele.
This commit is contained in:
Kevin Ryde 2004-02-20 23:16:57 +00:00
parent 2c1433817c
commit 63271ac5a2

View file

@ -594,7 +594,23 @@ AC_CHECK_FUNCS([ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir mkn
AC_CHECK_HEADERS(crypt.h sys/resource.h sys/file.h) AC_CHECK_HEADERS(crypt.h sys/resource.h sys/file.h)
AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname) AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname)
AC_CHECK_LIB(crypt, crypt)
# crypt() may or may not be available, for instance in some countries there
# are restrictions on cryptography.
#
# crypt() might be in libc (eg. OpenBSD), or it might be in a separate
# -lcrypt library (eg. Debian GNU/Linux).
#
# On HP-UX 11, crypt() is in libc and there's a dummy libcrypt.a. We must
# be careful to avoid -lcrypt in this case, since libtool will see there's
# only a static libcrypt and decide to build only a static libguile.
#
# AC_SEARCH_LIBS lets us add -lcrypt to LIBS only if crypt() is not in the
# libraries already in that list.
#
AC_SEARCH_LIBS(crypt, crypt,
[AC_DEFINE(HAVE_CRYPT,1,
[Define to 1 if you have the `crypt' function.])])
dnl GMP tests dnl GMP tests
AC_CHECK_LIB([gmp], [__gmpz_init], , AC_CHECK_LIB([gmp], [__gmpz_init], ,