From: Sascha Schumann Date: Tue, 29 Feb 2000 13:02:29 +0000 (+0000) Subject: AD_ADD_LIBRARY_DEFER allows people to add libraries in a deferred way X-Git-Tag: PHP-4.0-RC1~348 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5977f650317d903f12c4abdb4fcec013787182c;p=php AD_ADD_LIBRARY_DEFER allows people to add libraries in a deferred way (needed for imap and recode) --- diff --git a/acinclude.m4 b/acinclude.m4 index 701a2db4aa..97ec99c09a 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 5fae5b2409..edae80e588 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