--- m4/libtool.m4.orig 2016-09-14 02:05:19.724971000 +0200 +++ m4/libtool.m4 2016-09-14 02:05:23.775090000 +0200 @@ -1369,7 +1369,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*kbsdsunix*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the @@ -1385,6 +1385,9 @@ x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; + x86_64-*kbsdsunix*-gnu) + LD="${LD-ld} -m elf_i386_bsdsux" + ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) @@ -1414,6 +1417,9 @@ x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; + x86_64-*kbsdsunix*-gnu) + LD="${LD-ld} -m elf_x86_64_bsdsux" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; @@ -1714,7 +1720,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | bsdsunix* | freebsd* | netbsd* | openbsd*) # 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` @@ -2655,6 +2661,27 @@ shlibpath_var=LD_LIBRARY_PATH ;; +bsdsunix*) + objformat=elf + 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. @@ -3488,13 +3515,13 @@ lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +bsdsunix* | freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_deplibs_check_method='file_magic (BSDSUniX|FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; @@ -4317,8 +4344,8 @@ ;; esac ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ + bsdsunix* | freebsd* | dragonfly*) + # BSDSUniX and FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in @@ -5649,8 +5676,8 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + # FreeBSD 3 and greater as well as BSDSUniX use gcc -shared to do shared libraries. + freebsd* | bsdsunix* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes @@ -6760,8 +6787,12 @@ _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + bsdsunix-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + bsdsunix* | freebsd* | dragonfly*) + # FreeBSD 3 and later as well as BSDSUniX use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;;