aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-14 02:17:53 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-14 02:17:53 +0000
commit88f87d9997cafef4734f84da3c1e6b31f234d726 (patch)
tree52bb0fe881989faa3e6dbf9765791e50467dd719
parent6ef6be0f125caea65a9354a62b1efdf8dfb20846 (diff)
downloadpaludis-88f87d9997cafef4734f84da3c1e6b31f234d726.tar.gz
paludis-88f87d9997cafef4734f84da3c1e6b31f234d726.tar.xz
Better GNU ldconfig detection
-rw-r--r--configure.ac27
1 files changed, 22 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index a1fff08..f70e8a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1004,13 +1004,30 @@ fi
dnl }}}
dnl {{{ is ldconfig gnu ldconfig
-AC_MSG_CHECKING([if we have GNU ldconfig])
-ldconfig --version &>/dev/null && paludis_is_gnu_ldconfig=yes
+AC_MSG_CHECKING([if ldconfig is GNU])
+paludis_is_gnu_ldconfig=
+AC_ARG_ENABLE([gnu-ldconfig],
+ AS_HELP_STRING([--enable-gnu-ldconfig], [Use GNU ldconfig syntax (default: autodetect)]),
+ [
+ AC_MSG_RESULT([$enable_val])
+ paludis_is_gnu_ldconfig=$enable_val
+ ],
+ [
+ AC_MSG_RESULT([auto-detect])
+ AC_MSG_CHECKING([whether ldconfig is GNU])
+ if ! type ldconfig &>/dev/null ; then
+ AC_MSG_RESULT([don't know])
+ AC_MSG_ERROR([ldconfig not found. Use --enable-gnu-ldconfig or --disable-gnu-ldconfig])
+ fi
+ if ldconfig --version &>/dev/null ; then
+ paludis_is_gnu_ldconfig=yes
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ])
if test x$paludis_is_gnu_ldconfig = "xyes"; then
AC_DEFINE([HAVE_GNU_LDCONFIG], 1, [Define to 1 if you have GNU 'ldconfig'.])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
fi
AC_SUBST([HAVE_GNU_LDCONFIG])
AM_CONDITIONAL([HAVE_GNU_LDCONFIG], test x$paludis_is_gnu_ldconfig = "xyes")