diff -ur libtool.old/ltdl.m4 libtool/ltdl.m4 --- libtool.old/ltdl.m4 2003-03-20 21:24:21.000000000 +0100 +++ libtool/ltdl.m4 2003-05-25 16:57:16.000000000 +0200 @@ -142,9 +142,6 @@ # If you are looking for one http://www.opendarwin.org/projects/dlcompat libltdl_cv_sys_dlopen_deplibs=yes ;; - gnu*) - libltdl_cv_sys_dlopen_deplibs=yes - ;; hpux10*|hpux11*) libltdl_cv_sys_dlopen_deplibs=yes ;; @@ -158,7 +155,7 @@ # at 6.2 and later dlopen does load deplibs. libltdl_cv_sys_dlopen_deplibs=yes ;; - linux*) + linux* | gnu* | freebsd*-gnu*) libltdl_cv_sys_dlopen_deplibs=yes ;; netbsd*) diff -ur libtool.old/ltmain.in libtool/ltmain.in --- libtool.old/ltmain.in 2003-04-09 19:54:06.000000000 +0200 +++ libtool/ltmain.in 2003-05-25 16:59:20.000000000 +0200 @@ -1258,6 +1258,9 @@ -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in + *-*-freebsd*-gnu*) + # prevent being parsed by the freebsd regexp below + ;; *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue @@ -1277,6 +1280,9 @@ esac elif test "X$arg" = "X-lc_r"; then case $host in + *-*-freebsd*-gnu*) + # prevent being parsed by the freebsd regexp below + ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc_r directly, use -pthread flag. continue @@ -3102,6 +3108,12 @@ if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in + *-*-freebsd*-gnu*) + # prevent being parsed by the freebsd regexp below + if test $build_libtool_need_lc = "yes"; then + deplibs="$deplibs -lc" + fi + ;; *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;;