|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-05-21 11:17 UTC] mmarek at suse dot cz
Description:
------------
--enable-dba=shared --with-db4=... causes the main php binary be linked against libdb-4.x. It's because the test in ext/dba/config.m4 fails to reset $LIBS and $LDFLAGS. I'll attach a patch.
Reproduce code:
---------------
compile with the above options
Expected result:
----------------
the cli binary / apache module not linked against libdb-4.x
Actual result:
--------------
ldd -u -r /usr/bin/php5
Unused direct dependencies:
/usr/lib64/libdb-4.4.so
/lib64/libnsl.so.1
/lib64/libz.so.1
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 07:00:01 2025 UTC |
Where can I attach a file? :) Hopefully the lines won't wrap: breaking out of the for loop right after the link test leaves $LIBS and $LDFLAGS with their temporary values --- ext/dba/config.m4.orig +++ ext/dba/config.m4 @@ -172,6 +172,7 @@ dnl parameters(version, library list, fu AC_DEFUN([PHP_DBA_DB_CHECK],[ for LIB in $2; do if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then + unset PHP_DBA_DB_CHECK_found_it PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/$PHP_LIBDIR, -l$LIB,[ AC_TRY_LINK([ #include "$THIS_INCLUDE" @@ -185,10 +186,14 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[ #endif ],[ THIS_LIBS=$LIB - break + PHP_DBA_DB_CHECK_found_it=1 ]) ]) ]) + if test -n "$PHP_DBA_DB_CHECK_found_it"; then + unset PHP_DBA_DB_CHECK_found_it + break + fi fi done if test -z "$THIS_LIBS"; then