From: Brad Date: Sun, 2 Sep 2001 23:31:08 +0000 (+0000) Subject: * libtool.m4 [openbsd*]: More improvements to the OpenBSD port. X-Git-Tag: release-1-4-1~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef47bb829712d6145ec8ae677b795a26be40e0df;p=thirdparty%2Flibtool.git * libtool.m4 [openbsd*]: More improvements to the OpenBSD port. --- diff --git a/ChangeLog b/ChangeLog index 6e82f17b4..e229e2201 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2001-09-03 Brad + * libtool.m4 [openbsd*]: More improvements to the OpenBSD port. + * libtool.m4 (deplibs_check_method) [aix*]: Removed redundant setting of this variable. diff --git a/libtool.m4 b/libtool.m4 index 3d48e6e36..e7898265d 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -774,8 +774,15 @@ old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; + *) + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + ;; + esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" fi # Allow CC to be a program name with arguments. @@ -1638,19 +1645,22 @@ else openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no - case "$host_os" in + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case "$host_os" in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' - ;; + ;; *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - export_dynamic_flag_spec='${wl}-E' - fi - ;; - esac + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi ;; os2*) @@ -2140,13 +2150,16 @@ openbsd*) version_type=sunos need_lib_prefix=no need_version=no - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /usr/lib/libc.so.*` - if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - [deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'] - shlibpath_overrides_runpath=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case "$host_os" in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac else - deplibs_check_method='file_magic OpenBSD.* shared library' shlibpath_overrides_runpath=yes fi library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' @@ -3333,6 +3346,16 @@ newos6*) lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; +openbsd*) + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' + else + lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + fi + ;; + osf3* | osf4* | osf5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'