AD_ADD_LIBRARY_DEFER allows people to add libraries in a deferred way

(needed for imap and recode)
This commit is contained in:
Sascha Schumann 2000-02-29 13:02:29 +00:00
parent 4c7af667a7
commit c5977f6503
2 changed files with 12 additions and 2 deletions

View File

@ -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)

View File

@ -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