]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Support creating shared libraries on MidnightBSD.
authorBruno Haible <bruno@clisp.org>
Sun, 21 Feb 2021 01:30:09 +0000 (02:30 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 11 Sep 2022 12:52:56 +0000 (14:52 +0200)
Patch from <https://savannah.gnu.org/patch/?10007>.

* m4/libtool.m4: Treat MidnightBSD like FreeBSD.
* build-aux/ltmain.sh: Likewise.

build-aux/ltmain.sh
m4/libtool.m4

index 000f40a4b74241f2af66ce07fd1e11c48c615acb..fce8dae30656df4978a669dd4519f127384cf787 100644 (file)
@@ -7019,7 +7019,7 @@ func_mode_link ()
            # These systems don't actually have a C library (as such)
            test X-lc = "X$arg" && continue
            ;;
-         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
            # Do not include libc due to us having libc/libc_r.
            test X-lc = "X$arg" && continue
            ;;
@@ -7039,7 +7039,7 @@ func_mode_link ()
          esac
        elif test X-lc_r = "X$arg"; then
         case $host in
-        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
           # Do not include libc_r directly, use -pthread flag.
           continue
           ;;
@@ -8805,13 +8805,13 @@ func_mode_link ()
          #
          case $version_type in
          # correct linux to gnu/linux during the next big refactor
-         darwin|freebsd-elf|linux|osf|windows|none)
+         darwin|freebsd-elf|midnightbsd-elf|linux|osf|windows|none)
            func_arith $number_major + $number_minor
            current=$func_arith_result
            age=$number_minor
            revision=$number_revision
            ;;
-         freebsd-aout|qnx|sunos)
+         freebsd-aout|midnightbsd-aout|qnx|sunos)
            current=$number_major
            revision=$number_minor
            age=0
@@ -8891,12 +8891,12 @@ func_mode_link ()
           esac
          ;;
 
-       freebsd-aout)
+       freebsd-aout | midnightbsd-aout)
          major=.$current
          versuffix=.$current.$revision
          ;;
 
-       freebsd-elf)
+       freebsd-elf | midnightbsd-elf | midnightbsd)
          func_arith $current - $age
          major=.$func_arith_result
          versuffix=$major.$age.$revision
@@ -9122,7 +9122,7 @@ func_mode_link ()
          *-*-netbsd*)
            # Don't link with libc until the a.out ld.so is fixed.
            ;;
-         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
            # Do not include libc due to us having libc/libc_r.
            ;;
          *-*-sco3.2v5* | *-*-sco5v6*)
index 160fe9f3ed1c77ec04d7fe3410c21a5acda12733..7beeb59a0965b8edddfac661efb3792099d2af80 100644 (file)
@@ -1714,7 +1714,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | 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,7 +2655,7 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
   if test -x /usr/bin/objformat; then
@@ -3488,7 +3488,7 @@ darwin* | rhapsody*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
@@ -4317,7 +4317,7 @@ m4_if([$1], [CXX], [
            ;;
        esac
        ;;
-      freebsd* | dragonfly*)
+      freebsd* | dragonfly* | midnightbsd*)
        # FreeBSD uses GNU C++
        ;;
       hpux9* | hpux10* | hpux11*)
@@ -5650,7 +5650,7 @@ _LT_EOF
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
+    freebsd* | dragonfly* | midnightbsd*)
       _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,7 +6760,7 @@ if test yes != "$_lt_caught_CXX_error"; then
         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
         ;;
 
-      freebsd* | dragonfly*)
+      freebsd* | dragonfly* | midnightbsd*)
         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
         # conventions
         _LT_TAGVAR(ld_shlibs, $1)=yes