--- libtool.m4.orig 2013-11-04 15:33:40 UTC +++ libtool.m4 @@ -1513,7 +1513,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + netbsd* | bsdsunix* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -2279,6 +2279,29 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; +bsdsunix*) + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + objformat=elf + fi + version_type=bsdsunix-$objformat + case $version_type in + bsdsunix-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + bsdsunix-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -3031,6 +3054,23 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; +bsdsunix*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + i*86 ) + lt_cv_deplibs_check_method='file_magic (BSDSUniX|FreeBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_test_file=`echo /usr/lib32/libc.so.*` + ;; + *) + lt_cv_deplibs_check_method='file_magic (BSDSUniX|FreeBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in @@ -3691,7 +3731,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - freebsd* | dragonfly*) + bsdsunix* | freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4827,7 +4867,7 @@ _LT_EOF ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + bsdsunix* | freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes @@ -5772,11 +5812,11 @@ if test "$_lt_caught_CXX_error" != yes; _LT_TAGVAR(ld_shlibs, $1)=no ;; - freebsd-elf*) + bsdsunix-elf*|freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | dragonfly*) + bsdsunix* | freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes