]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 [openbsd*]: More improvements to the OpenBSD port.
authorBrad <brad@comstyle.com>
Sun, 2 Sep 2001 23:31:08 +0000 (23:31 +0000)
committerGary V. Vaughan <gary@gnu.org>
Sun, 2 Sep 2001 23:31:08 +0000 (23:31 +0000)
ChangeLog
libtool.m4

index 6e82f17b4e7dc3d4e04284b375aa5c17f0d1dfae..e229e2201f24777e2509658fe94a3d06a72713c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2001-09-03  Brad  <brad@comstyle.com>
 
+       * libtool.m4 [openbsd*]: More improvements to the OpenBSD port.
+
        * libtool.m4 (deplibs_check_method) [aix*]: Removed redundant
        setting of this variable.
 
index 3d48e6e3673d8f4cd7ca936f1f8f28df0370dfbb..e7898265d6834b168f3c6cdd2204853ff2bd4052 100644 (file)
@@ -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'