From: Andreas Voegele <voegelas@gmx.net>
Subject: [PATCH] configure check for crypt()
Date: Sun, 15 Feb 2004 20:48:50 +0100 [thread overview]
Message-ID: <87eksw6s4d.fsf@ID-28718.user.uni-berlin.de> (raw)
Guile's configure script checks for the crypt library with
AC_CHECK_LIB(crypt, crypt). On HP-UX 11, crypt() is included in the C
library. libcrypt.a is an empty dummy library provided for
compatibility with old software. The check for crypt() succeeds since
the test program is linked against the empty crypt library as well as
the C library. As a consequence -lcrypt is added to the list of
required libraries. The problem is that libtool does not create a
shared libguile since there is only a static crypt library.
I think that configure should first check whether the C library
provides crypt() before it checks for the crypt library.
Here's a patch that replaces AC_CHECK_LIB with AC_SEARCH_LIBS and
HAVE_LIBCRYPT with HAVE_CRYPT. I've tested this patch under HP-UX and
GNU/Linux.
Index: configure.in
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/configure.in,v
retrieving revision 1.230
diff -u -u -r1.230 configure.in
--- configure.in 25 Jan 2004 13:02:21 -0000 1.230
+++ configure.in 15 Feb 2004 19:40:03 -0000
@@ -588,7 +588,7 @@
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_LIB(crypt, crypt)
+AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [Define if you have the crypt function.]))
dnl GMP tests
AC_CHECK_LIB([gmp], [__gmpz_init], ,
Index: libguile/posix.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/posix.c,v
retrieving revision 1.120
diff -u -u -r1.120 posix.c
--- libguile/posix.c 15 Sep 2003 12:36:57 -0000 1.120
+++ libguile/posix.c 15 Feb 2004 19:40:04 -0000
@@ -110,7 +110,7 @@
#include <locale.h>
#endif
-#if HAVE_LIBCRYPT && HAVE_CRYPT_H
+#if HAVE_CRYPT && HAVE_CRYPT_H
# include <crypt.h>
#endif
@@ -1400,7 +1400,7 @@
#undef FUNC_NAME
#endif /* HAVE_SYNC */
-#if HAVE_LIBCRYPT && HAVE_CRYPT_H
+#if HAVE_CRYPT && HAVE_CRYPT_H
SCM_DEFINE (scm_crypt, "crypt", 2, 0, 0,
(SCM key, SCM salt),
"Encrypt @var{key} using @var{salt} as the salt value to the\n"
@@ -1416,7 +1416,7 @@
return scm_makfrom0str (p);
}
#undef FUNC_NAME
-#endif /* HAVE_LIBCRYPT && HAVE_CRYPT_H */
+#endif /* HAVE_CRYPT && HAVE_CRYPT_H */
#if HAVE_CHROOT
SCM_DEFINE (scm_chroot, "chroot", 1, 0, 0,
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next reply other threads:[~2004-02-15 19:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-15 19:48 Andreas Voegele [this message]
2004-02-19 10:27 ` [PATCH] configure check for crypt() Andreas Voegele
2004-02-20 23:17 ` Kevin Ryde
2004-02-21 0:52 ` Rob Browning
2004-02-21 7:30 ` Andreas Voegele
2004-02-21 21:00 ` Kevin Ryde
2004-02-21 21:41 ` Kevin Ryde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eksw6s4d.fsf@ID-28718.user.uni-berlin.de \
--to=voegelas@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).