--- configure.in.orig Tue Oct 5 13:21:05 2004 +++ configure.in Tue Oct 5 18:46:46 2004 @@ -287,6 +287,17 @@ dnl Check if we use GNU ld LD=ld AC_PROG_LD_GNU +ld_ver=`$LD -v 2>/dev/null | head -1` +if echo "$ld_ver" | egrep '(GNU|with BFD)' > /dev/null; then + AC_MSG_CHECKING(GNU ld release date) + changequote(,)dnl + ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` + changequote([,])dnl + AC_MSG_RESULT(${ld_date}) + if test "$ld_date" -lt 20030612; then + no_default_allow_shlib_undefined=yes + fi +fi dnl needed before AC_TRY_COMPILE AC_ISC_POSIX @@ -1130,7 +1141,11 @@ case "$host_os" in *linux*) AC_DEFINE(LINUX,1,[Whether the host os is linux]) BLDSHARED="true" - LDSHFLAGS="-shared -Wl,-Bsymbolic" + if test "${no_default_allow_shlib_undefined}" = "yes"; then + LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined" + else + LDSHFLAGS="-shared -Wl,-Bsymbolic" + fi DYNEXP="-Wl,--export-dynamic" PICFLAGS="-fPIC" SONAMEFLAG="-Wl,-soname="