diff --git a/builder/link.sh.in b/builder/link.sh.in index 59f3c6f61..964617fc9 100644 --- a/builder/link.sh.in +++ b/builder/link.sh.in @@ -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' diff --git a/configure.ac b/configure.ac index d68190a09..9d95c2c61 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/customize/link.sh.in b/customize/link.sh.in index 79dc84763..15b6e660b 100644 --- a/customize/link.sh.in +++ b/customize/link.sh.in @@ -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' diff --git a/mllib/link.sh.in b/mllib/link.sh.in index 79dc84763..15b6e660b 100644 --- a/mllib/link.sh.in +++ b/mllib/link.sh.in @@ -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' diff --git a/sysprep/link.sh.in b/sysprep/link.sh.in index 8584faf21..7d8ccec71 100644 --- a/sysprep/link.sh.in +++ b/sysprep/link.sh.in @@ -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' diff --git a/v2v/link.sh.in b/v2v/link.sh.in index 79dc84763..15b6e660b 100644 --- a/v2v/link.sh.in +++ b/v2v/link.sh.in @@ -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'