summaryrefslogtreecommitdiffstats
path: root/config.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config.m4')
-rw-r--r--config.m419
1 files changed, 17 insertions, 2 deletions
diff --git a/config.m4 b/config.m4
index ecaa8ed..4cd9b38 100644
--- a/config.m4
+++ b/config.m4
@@ -6,10 +6,25 @@ PHP_ARG_ENABLE([xpass],
[Enable xpass support])],
[no])
+PHP_ARG_WITH([xpass-dlopen],
+ [whether to enable dlopen of libxcrypt],
+ [AS_HELP_STRING([[--with-xpass-dlopen[=libcrypt.so.2]]],
+ [Enable dlopen of libxcrypt])],
+ [no], [no])
+
if test "$PHP_XPASS" != "no"; then
PKG_CHECK_MODULES([LIBXCRYPT], [libxcrypt >= 4.4])
- PHP_EVAL_INCLINE([$LIBXCRYPT_CFLAGS])
- PHP_EVAL_LIBLINE([$LIBXCRYPT_LIBS], [XPASS_SHARED_LIBADD])
+
+ if test "$PHP_XPASS_DLOPEN" = "no"; then
+ PHP_EVAL_INCLINE([$LIBXCRYPT_CFLAGS])
+ PHP_EVAL_LIBLINE([$LIBXCRYPT_LIBS], [XPASS_SHARED_LIBADD])
+ elif test "$PHP_XPASS_DLOPEN" = "yes"; then
+ AC_DEFINE([USE_LIBCRYPT_DLOPEN], ["libcrypt.so.2"], [ libcrypt path for dlopen ])
+ PHP_SUBST([USE_LIBCRYPT_DLOPEN])
+ else
+ AC_DEFINE_UNQUOTED([USE_LIBCRYPT_DLOPEN], ["$PHP_XPASS_DLOPEN"], [ libcrypt path for dlopen ])
+ PHP_SUBST([USE_LIBCRYPT_DLOPEN])
+ fi
old_CFLAGS=$CFLAGS; CFLAGS="$CFLAGS $LIBXCRYPT_CFLAGS"
old_LIBS=$LIBS; LIBS="$LIBS $LIBXCRYPT_LIBS"