mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
lib: Check if crypt() comes from a separate library
Mac OS X includes crypt() in libc.
This commit is contained in:
committed by
Richard W.M. Jones
parent
cc4baac815
commit
b969be72cd
@@ -19,4 +19,4 @@
|
||||
# Hack automake to link binary properly. There is no other way to add
|
||||
# the -cclib parameter to the end of the command line.
|
||||
|
||||
exec "$@" -linkpkg -cclib '-pthread -lpthread -lutils @LIBTINFO_LIBS@ -lcrypt @LIBLZMA_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
exec "$@" -linkpkg -cclib '-pthread -lpthread -lutils @LIBTINFO_LIBS@ @LIBCRYPT_LIBS@ @LIBLZMA_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
|
||||
@@ -590,6 +590,15 @@ AC_ARG_WITH([extra-packages],
|
||||
[EXTRA_PACKAGES=])
|
||||
AC_SUBST([EXTRA_PACKAGES])
|
||||
|
||||
dnl Check if crypt() is provided by a separate library.
|
||||
old_LIBS="$LIBS"
|
||||
AC_SEARCH_LIBS([crypt],[crypt])
|
||||
LIBS="$old_LIBS"
|
||||
if test "$ac_cv_search_crypt" = "-lcrypt" ; then
|
||||
LIBCRYPT_LIBS="-lcrypt"
|
||||
fi
|
||||
AC_SUBST([LIBCRYPT_LIBS])
|
||||
|
||||
dnl Check for libdl/dlopen (optional - only used to test if the library
|
||||
dnl can be used with libdl).
|
||||
AC_CHECK_LIB([dl],[dlopen],[have_libdl=yes],[have_libdl=no])
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
# Hack automake to link binary properly. There is no other way to add
|
||||
# the -cclib parameter to the end of the command line.
|
||||
|
||||
exec "$@" -linkpkg -cclib '-lutils @LIBTINFO_LIBS@ -lcrypt @LIBVIRT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
exec "$@" -linkpkg -cclib '-lutils @LIBTINFO_LIBS@ @LIBCRYPT_LIBS@ @LIBVIRT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
# Hack automake to link binary properly. There is no other way to add
|
||||
# the -cclib parameter to the end of the command line.
|
||||
|
||||
exec "$@" -linkpkg -cclib '-lutils @LIBTINFO_LIBS@ -lcrypt @LIBVIRT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
exec "$@" -linkpkg -cclib '-lutils @LIBTINFO_LIBS@ @LIBCRYPT_LIBS@ @LIBVIRT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
# Hack automake to link binary properly. There is no other way to add
|
||||
# the -cclib parameter to the end of the command line.
|
||||
|
||||
exec "$@" -linkpkg -cclib '-lutils @LIBTINFO_LIBS@ -lcrypt @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
exec "$@" -linkpkg -cclib '-lutils @LIBTINFO_LIBS@ @LIBCRYPT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
# Hack automake to link binary properly. There is no other way to add
|
||||
# the -cclib parameter to the end of the command line.
|
||||
|
||||
exec "$@" -linkpkg -cclib '-lutils @LIBTINFO_LIBS@ -lcrypt @LIBVIRT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
exec "$@" -linkpkg -cclib '-lutils @LIBTINFO_LIBS@ @LIBCRYPT_LIBS@ @LIBVIRT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
|
||||
|
||||
Reference in New Issue
Block a user