diff --git a/acinclude.m4 b/acinclude.m4 index 701a2db4aa5..97ec99c09a8 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -247,6 +247,16 @@ AC_DEFUN(AC_ADD_LIBRARY,[ ]) ]) +dnl +dnl AC_ADD_LIBRARY_DEFER(library[, append]) +dnl +dnl add a library to the link line (defferred) +AC_DEFUN(AC_ADD_LIBRARY_DEFER,[ + AC_PHP_ONCE(LIBRARY, $1, [ + ifelse($#, 1, DLIBS="-l$1 $DLIBS", DLIBS="$DLIBS -l$1") + ]) +]) + dnl dnl AC_ADD_LIBRARY_WITH_PATH(library, path) dnl @@ -359,7 +369,7 @@ AC_DEFUN(PHP_EXTENSION,[ EXT_LIBS="$EXT_LIBS $1/$_extlib" EXT_STATIC="$EXT_STATIC $1" else - AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z,A-Z), 1, Whether to build $1 as dynamic module) + AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z-,A-Z_), 1, Whether to build $1 as dynamic module) EXT_SHARED="$EXT_SHARED $1" fi PHP_FAST_OUTPUT(ext/$1/Makefile) diff --git a/configure.in b/configure.in index 5fae5b2409f..edae80e5887 100644 --- a/configure.in +++ b/configure.in @@ -674,7 +674,7 @@ dnl test -n "$GCC" && CFLAGS="$CFLAGS -fpic" dnl add -fPIC option on Solaris if we are building dynamic extensions dnl PHP_SOLARIS_PIC_WEIRDNESS -EXTRA_LIBS="$EXTRA_LIBS $LIBS" +EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS" LIBS="" LDFLAGS="" if test "$PHP_THREAD_SAFETY" = "yes"; then