pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Mon Mar  6 16:14:08 UTC 2017

Modified Files:
        pkgsrc/devel/libtool: Makefile Makefile.common distinfo
        pkgsrc/devel/libtool-base: Makefile PLIST
        pkgsrc/devel/libtool-fortran: Makefile
        pkgsrc/devel/libtool/patches: manual-libtool.m4 manual-ltdl.m4
            manual.README
        pkgsrc/mk/configure: libtool-override.mk
Added Files:
        pkgsrc/devel/libtool/patches: manual-funclib.sh manual-ltmain.in
            patch-Makefile.in patch-build-aux_depcomp patch-build-aux_ltmain.sh
            patch-configure patch-libltdl_configure
Removed Files:
        pkgsrc/devel/libtool/patches: manual-ltmain.m4sh patch-aa patch-ab
            patch-ac patch-ad patch-libltdl_config_depcomp

Log Message:
Update libtool packages to 2.4.6.

Changes since 2.4.2 are too numerous to mention, with over 4,700 lines
in the ChangeLog file.  However, this release does at least fix a large
number of build failures on SmartOS, and doesn't appear to cause any
obvious regressions in bulk builds performed by Joerg and myself.

Some pkgsrc cleanups while here, including merging the MirBSD patches
correctly.  It couldn't be made much clearer how to properly integrate
patches here to ensure they are not lost.  Next time you might not be so
fortunate!


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 pkgsrc/devel/libtool/Makefile
cvs rdiff -u -r1.82 -r1.83 pkgsrc/devel/libtool/Makefile.common
cvs rdiff -u -r1.102 -r1.103 pkgsrc/devel/libtool/distinfo
cvs rdiff -u -r1.117 -r1.118 pkgsrc/devel/libtool-base/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/devel/libtool-base/PLIST
cvs rdiff -u -r1.14 -r1.15 pkgsrc/devel/libtool-fortran/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/libtool/patches/manual-funclib.sh \
    pkgsrc/devel/libtool/patches/manual-ltmain.in \
    pkgsrc/devel/libtool/patches/patch-Makefile.in \
    pkgsrc/devel/libtool/patches/patch-build-aux_depcomp \
    pkgsrc/devel/libtool/patches/patch-build-aux_ltmain.sh \
    pkgsrc/devel/libtool/patches/patch-configure \
    pkgsrc/devel/libtool/patches/patch-libltdl_configure
cvs rdiff -u -r1.45 -r1.46 pkgsrc/devel/libtool/patches/manual-libtool.m4
cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/libtool/patches/manual-ltdl.m4
cvs rdiff -u -r1.2 -r0 pkgsrc/devel/libtool/patches/manual-ltmain.m4sh
cvs rdiff -u -r1.13 -r1.14 pkgsrc/devel/libtool/patches/manual.README
cvs rdiff -u -r1.37 -r0 pkgsrc/devel/libtool/patches/patch-aa
cvs rdiff -u -r1.85 -r0 pkgsrc/devel/libtool/patches/patch-ab
cvs rdiff -u -r1.35 -r0 pkgsrc/devel/libtool/patches/patch-ac
cvs rdiff -u -r1.46 -r0 pkgsrc/devel/libtool/patches/patch-ad
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/devel/libtool/patches/patch-libltdl_config_depcomp
cvs rdiff -u -r1.12 -r1.13 pkgsrc/mk/configure/libtool-override.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/libtool/Makefile
diff -u pkgsrc/devel/libtool/Makefile:1.49 pkgsrc/devel/libtool/Makefile:1.50
--- pkgsrc/devel/libtool/Makefile:1.49  Sat Jul  9 06:38:09 2016
+++ pkgsrc/devel/libtool/Makefile       Mon Mar  6 16:14:07 2017
@@ -1,10 +1,8 @@
-# $NetBSD: Makefile,v 1.49 2016/07/09 06:38:09 wiz Exp $
+# $NetBSD: Makefile,v 1.50 2017/03/06 16:14:07 jperkin Exp $
 
 META_PACKAGE=  # empty
 
 .include "Makefile.common"
-PKGREVISION=   3
-
 
 DEPENDS+=      ${DISTNAME:S/-/-base-/}{,nb[0-9]*}:../../devel/libtool-base
 DEPENDS+=      ${DISTNAME:S/-/-fortran-/}{,nb[0-9]*}:../../devel/libtool-fortran

Index: pkgsrc/devel/libtool/Makefile.common
diff -u pkgsrc/devel/libtool/Makefile.common:1.82 pkgsrc/devel/libtool/Makefile.common:1.83
--- pkgsrc/devel/libtool/Makefile.common:1.82   Thu Oct  9 14:06:10 2014
+++ pkgsrc/devel/libtool/Makefile.common        Mon Mar  6 16:14:07 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.82 2014/10/09 14:06:10 wiz Exp $
+# $NetBSD: Makefile.common,v 1.83 2017/03/06 16:14:07 jperkin Exp $
 # used by devel/libltdl/Makefile
 # used by devel/libtool-base/Makefile
 # used by devel/libtool-fortran/Makefile
@@ -21,13 +21,18 @@
 # these patch files properly; otherwise your changes WILL be lost on the
 # next libtool update.
 #
-# DO NOT MAKE CHANGES TO patch-ab OR patch-ad WITHOUT FOLLOWING THESE
-# INSTRUCTIONS.  There are no exceptions to this rule.
+# DO NOT MAKE CHANGES TO THESE FILES:
+#
+#   patches/patch-build-aux_ltmain.sh
+#   patches/patch-configure
+#   patches/patch-libltdl_configure
+#
+# WITHOUT FOLLOWING THESE INSTRUCTIONS.  There are no exceptions to this rule.
 #
 ###########################################################################
 ###########################################################################
 
-DISTNAME=      libtool-2.4.2
+DISTNAME=      libtool-2.4.6
 DISTFILES=     ${DISTNAME}${EXTRACT_SUFX}
 CATEGORIES=    devel pkgtools
 MASTER_SITES=  ${MASTER_SITE_GNU:=libtool/}
@@ -38,6 +43,7 @@ LICENSE=      gnu-gpl-v2
 
 CONFLICTS=     glibtool-[0-9]*
 
+USE_TOOLS+=    gm4
 GNU_CONFIGURE= yes
 
 DISTINFO_FILE= ${.CURDIR}/../../devel/libtool/distinfo

Index: pkgsrc/devel/libtool/distinfo
diff -u pkgsrc/devel/libtool/distinfo:1.102 pkgsrc/devel/libtool/distinfo:1.103
--- pkgsrc/devel/libtool/distinfo:1.102 Thu Mar 10 12:43:48 2016
+++ pkgsrc/devel/libtool/distinfo       Mon Mar  6 16:14:07 2017
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.102 2016/03/10 12:43:48 tnn Exp $
+$NetBSD: distinfo,v 1.103 2017/03/06 16:14:07 jperkin Exp $
 
-SHA1 (libtool-2.4.2.tar.gz) = 22b71a8b5ce3ad86e1094e7285981cae10e6ff88
-RMD160 (libtool-2.4.2.tar.gz) = b7153f3f1e1c50d8c04787cafccd4e19af62ec7d
-SHA512 (libtool-2.4.2.tar.gz) = 0e54af7bbec376f943f2b8e4f13631fe5627b099a37a5f0252e12bade76473b0a36a673529d594778064cd8632abdc43d8a20883d66d6b27738861afbb7e211d
-Size (libtool-2.4.2.tar.gz) = 2632347 bytes
-SHA1 (patch-aa) = 8fa167bebf27b7bc3008edd61408a0aede6bdf69
-SHA1 (patch-ab) = 621320ff0a2bf5c03f40b8bd1a1467471b22a3b6
-SHA1 (patch-ac) = fa8b0388f8f0469803c5869a23c3a1247eef70a1
-SHA1 (patch-ad) = 4cfe392ea272a4770407dc13104dbf17d640fdb8
-SHA1 (patch-libltdl_config_depcomp) = f8a5247e8c667b896bb426613f1b43d614760097
+SHA1 (libtool-2.4.6.tar.gz) = 25b6931265230a06f0fc2146df64c04e5ae6ec33
+RMD160 (libtool-2.4.6.tar.gz) = 6f4b4c3e89426652da3acffa707f71bb4ccee26a
+SHA512 (libtool-2.4.6.tar.gz) = 3233d81cb2739a54b840a0a82064eebbfaa4fb442fb993a35d6bd41d8395c51f038c90ae048b9252f172d0a5bbfb4b36e2b13d4477001f9ff7d4124237819a18
+Size (libtool-2.4.6.tar.gz) = 1806697 bytes
+SHA1 (patch-Makefile.in) = 0adb634335acd5fb280c99b5d43ae568018ca0af
+SHA1 (patch-build-aux_depcomp) = ae6f93ad4fac1df648cfcb62601c72f9ebb30233
+SHA1 (patch-build-aux_ltmain.sh) = eebdc102cacb1970240abeb4a7310d09d505be02
+SHA1 (patch-configure) = 818157dd9bf985657a0089a7d887304b71559837
+SHA1 (patch-libltdl_configure) = 87535836200547ceb8463a98e86561c2adf1f0ed

Index: pkgsrc/devel/libtool-base/Makefile
diff -u pkgsrc/devel/libtool-base/Makefile:1.117 pkgsrc/devel/libtool-base/Makefile:1.118
--- pkgsrc/devel/libtool-base/Makefile:1.117    Sat Jul  9 06:38:10 2016
+++ pkgsrc/devel/libtool-base/Makefile  Mon Mar  6 16:14:07 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.117 2016/07/09 06:38:10 wiz Exp $
+# $NetBSD: Makefile,v 1.118 2017/03/06 16:14:07 jperkin Exp $
 
 ###########################################################################
 ###########################################################################
@@ -17,8 +17,13 @@
 # these patch files properly; otherwise your changes WILL be lost on the
 # next libtool update.
 #
-# DO NOT MAKE CHANGES TO patch-ab OR patch-ad WITHOUT FOLLOWING THESE
-# INSTRUCTIONS.  There are no exceptions to this rule.
+# DO NOT MAKE CHANGES TO THESE FILES:
+#
+#   patches/patch-build-aux_ltmain.sh
+#   patches/patch-configure
+#   patches/patch-libltdl_configure
+#
+# WITHOUT FOLLOWING THESE INSTRUCTIONS.  There are no exceptions to this rule.
 #
 ###########################################################################
 ###########################################################################
@@ -26,7 +31,6 @@
 .include "../../devel/libtool/Makefile.common"
 
 PKGNAME=       ${DISTNAME:S/-/-base-/}
-PKGREVISION=   13
 
 COMMENT=       Generic shared library support script (the script itself)
 

Index: pkgsrc/devel/libtool-base/PLIST
diff -u pkgsrc/devel/libtool-base/PLIST:1.13 pkgsrc/devel/libtool-base/PLIST:1.14
--- pkgsrc/devel/libtool-base/PLIST:1.13        Fri Apr 12 13:44:08 2013
+++ pkgsrc/devel/libtool-base/PLIST     Mon Mar  6 16:14:07 2017
@@ -1,55 +1,55 @@
-@comment $NetBSD: PLIST,v 1.13 2013/04/12 13:44:08 joerg Exp $
+@comment $NetBSD: PLIST,v 1.14 2017/03/06 16:14:07 jperkin Exp $
 bin/libtool
 bin/libtoolize
 bin/shlibtool
 man/man1/libtool.1
 man/man1/libtoolize.1
-share/aclocal/argz.m4
 share/aclocal/libtool.m4
+share/aclocal/ltargz.m4
 share/aclocal/ltdl.m4
 share/aclocal/ltoptions.m4
 share/aclocal/ltsugar.m4
 share/aclocal/ltversion.m4
 share/aclocal/lt~obsolete.m4
-share/libtool/config/compile
-share/libtool/config/config.guess
-share/libtool/config/config.sub
-share/libtool/config/depcomp
-share/libtool/config/install-sh
-share/libtool/config/ltmain.sh
-share/libtool/config/missing
-share/libtool/libltdl/COPYING.LIB
-share/libtool/libltdl/Makefile.am
-share/libtool/libltdl/Makefile.in
-share/libtool/libltdl/Makefile.inc
-share/libtool/libltdl/README
-share/libtool/libltdl/aclocal.m4
-share/libtool/libltdl/argz.c
-share/libtool/libltdl/argz_.h
-share/libtool/libltdl/config-h.in
-share/libtool/libltdl/configure
-share/libtool/libltdl/configure.ac
-share/libtool/libltdl/libltdl/lt__alloc.h
-share/libtool/libltdl/libltdl/lt__dirent.h
-share/libtool/libltdl/libltdl/lt__glibc.h
-share/libtool/libltdl/libltdl/lt__private.h
-share/libtool/libltdl/libltdl/lt__strl.h
-share/libtool/libltdl/libltdl/lt_dlloader.h
-share/libtool/libltdl/libltdl/lt_error.h
-share/libtool/libltdl/libltdl/lt_system.h
-share/libtool/libltdl/libltdl/slist.h
-share/libtool/libltdl/loaders/dld_link.c
-share/libtool/libltdl/loaders/dlopen.c
-share/libtool/libltdl/loaders/dyld.c
-share/libtool/libltdl/loaders/load_add_on.c
-share/libtool/libltdl/loaders/loadlibrary.c
-share/libtool/libltdl/loaders/preopen.c
-share/libtool/libltdl/loaders/shl_load.c
-share/libtool/libltdl/lt__alloc.c
-share/libtool/libltdl/lt__dirent.c
-share/libtool/libltdl/lt__strl.c
-share/libtool/libltdl/lt_dlloader.c
-share/libtool/libltdl/lt_error.c
-share/libtool/libltdl/ltdl.c
-share/libtool/libltdl/ltdl.h
-share/libtool/libltdl/slist.c
+share/libtool/COPYING.LIB
+share/libtool/Makefile.am
+share/libtool/Makefile.in
+share/libtool/README
+share/libtool/aclocal.m4
+share/libtool/build-aux/compile
+share/libtool/build-aux/config.guess
+share/libtool/build-aux/config.sub
+share/libtool/build-aux/depcomp
+share/libtool/build-aux/install-sh
+share/libtool/build-aux/ltmain.sh
+share/libtool/build-aux/missing
+share/libtool/config-h.in
+share/libtool/configure
+share/libtool/configure.ac
+share/libtool/libltdl/lt__alloc.h
+share/libtool/libltdl/lt__argz_.h
+share/libtool/libltdl/lt__dirent.h
+share/libtool/libltdl/lt__glibc.h
+share/libtool/libltdl/lt__private.h
+share/libtool/libltdl/lt__strl.h
+share/libtool/libltdl/lt_dlloader.h
+share/libtool/libltdl/lt_error.h
+share/libtool/libltdl/lt_system.h
+share/libtool/libltdl/slist.h
+share/libtool/loaders/dld_link.c
+share/libtool/loaders/dlopen.c
+share/libtool/loaders/dyld.c
+share/libtool/loaders/load_add_on.c
+share/libtool/loaders/loadlibrary.c
+share/libtool/loaders/preopen.c
+share/libtool/loaders/shl_load.c
+share/libtool/lt__alloc.c
+share/libtool/lt__argz.c
+share/libtool/lt__dirent.c
+share/libtool/lt__strl.c
+share/libtool/lt_dlloader.c
+share/libtool/lt_error.c
+share/libtool/ltdl.c
+share/libtool/ltdl.h
+share/libtool/ltdl.mk
+share/libtool/slist.c

Index: pkgsrc/devel/libtool-fortran/Makefile
diff -u pkgsrc/devel/libtool-fortran/Makefile:1.14 pkgsrc/devel/libtool-fortran/Makefile:1.15
--- pkgsrc/devel/libtool-fortran/Makefile:1.14  Wed Jan 18 09:34:54 2017
+++ pkgsrc/devel/libtool-fortran/Makefile       Mon Mar  6 16:14:07 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2017/01/18 09:34:54 wiz Exp $
+# $NetBSD: Makefile,v 1.15 2017/03/06 16:14:07 jperkin Exp $
 
 ###########################################################################
 ###########################################################################
@@ -17,8 +17,13 @@
 # these patch files properly; otherwise your changes WILL be lost on the
 # next libtool update.
 #
-# DO NOT MAKE CHANGES TO patch-ab OR patch-ad WITHOUT FOLLOWING THESE
-# INSTRUCTIONS.  There are no exceptions to this rule.
+# DO NOT MAKE CHANGES TO THESE FILES:
+#
+#   patches/patch-build-aux_ltmain.sh
+#   patches/patch-configure
+#   patches/patch-libltdl_configure
+#
+# WITHOUT FOLLOWING THESE INSTRUCTIONS.  There are no exceptions to this rule.
 #
 ###########################################################################
 ###########################################################################
@@ -28,7 +33,6 @@
 FILESDIR=      ${.CURDIR}/../libtool-base/files
 
 PKGNAME=       ${DISTNAME:S/-/-fortran-/}
-PKGREVISION=   9
 
 COMMENT=       Generic shared library support script (the script itself, incl. Fortran)
 

Index: pkgsrc/devel/libtool/patches/manual-libtool.m4
diff -u pkgsrc/devel/libtool/patches/manual-libtool.m4:1.45 pkgsrc/devel/libtool/patches/manual-libtool.m4:1.46
--- pkgsrc/devel/libtool/patches/manual-libtool.m4:1.45 Thu Mar 10 12:43:48 2016
+++ pkgsrc/devel/libtool/patches/manual-libtool.m4      Mon Mar  6 16:14:07 2017
@@ -1,29 +1,45 @@
-$NetBSD: manual-libtool.m4,v 1.45 2016/03/10 12:43:48 tnn Exp $
+$NetBSD: manual-libtool.m4,v 1.46 2017/03/06 16:14:07 jperkin Exp $
 
---- libltdl/m4/libtool.m4.orig 2011-10-17 10:17:05.000000000 +0000
-+++ libltdl/m4/libtool.m4
-@@ -123,7 +123,10 @@ m4_defun([_LT_CC_BASENAME],
-     *) break;;
-   esac
- done
--cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-+# Return the actual command name, not our pkgsrc wrapper name because several
-+# decisions are made only based on compiler names
-+if test -n "$cc_temp" && new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null`; then :; else new_cc_temp="$cc_temp"; fi
-+cc_basename=`$ECHO "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
- ])
- 
- 
-@@ -1098,7 +1101,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
-   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+Support mirbsd/midnightbsd.
+Handle pkgsrc wrappers.
+Fixup output on various OS.
+
+--- m4/libtool.m4.orig 2015-01-20 16:15:19.000000000 +0000
++++ m4/libtool.m4
+@@ -117,7 +117,10 @@ func_cc_basename ()
+         *) break;;
+       esac
+     done
+-    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
++    # Return the actual command name, not our pkgsrc wrapper name because several
++    # decisions are made only based on compiler names
++    if test -n "$cc_temp" && new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null`; then :; else new_cc_temp="$cc_temp"; fi
++    func_cc_basename_result=`$ECHO "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+ }
+ ])# _LT_PREPARE_CC_BASENAME
+ 
+@@ -141,7 +144,10 @@ cc_basename=$func_cc_basename_result
+ # It is okay to use these file commands and assume they have been set
+ # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
+ m4_defun([_LT_FILEUTILS_DEFAULTS],
+-[: ${CP="cp -f"}
++[unset CP
++unset MV
++unset RM
++: ${CP="cp -f"}
+ : ${MV="mv -f"}
+ : ${RM="rm -f"}
+ ])# _LT_FILEUTILS_DEFAULTS
+@@ -1120,7 +1126,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
+   _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
    case $cc_basename in
-      ifort*) _lt_dar_can_shared=yes ;;
+      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
 -     *) _lt_dar_can_shared=$GCC ;;
 +     *) _lt_dar_can_shared=yes ;;
    esac
-   if test "$_lt_dar_can_shared" = "yes"; then
+   if test yes = "$_lt_dar_can_shared"; then
      output_verbose_link_cmd=func_echo_all
-@@ -1482,7 +1485,7 @@ fi
+@@ -1558,7 +1564,7 @@ fi
  
  case $host_os in
    darwin*)
@@ -32,16 +48,16 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
    *)
      lock_old_archive_extraction=no ;;
  esac
-@@ -1638,7 +1641,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d
+@@ -1714,7 +1720,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d
      lt_cv_sys_max_cmd_len=8192;
      ;;
  
--  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-+  netbsd* | freebsd* | openbsd* | mirbsd* | darwin* | dragonfly*)
+-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
++  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd* | mirbsd*)
      # 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`
-@@ -2468,7 +2471,7 @@ dgux*)
+@@ -2655,7 +2661,7 @@ dgux*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  
@@ -50,24 +66,7 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
    # DragonFly does not have aout.  When/if they implement a new
    # versioning mechanism, adjust this.
    if test -x /usr/bin/objformat; then
-@@ -2482,7 +2485,7 @@ freebsd* | dragonfly*)
-   version_type=freebsd-$objformat
-   case $version_type in
-     freebsd-elf*)
--      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-       need_version=no
-       need_lib_prefix=no
-       ;;
-@@ -2505,13 +2508,24 @@ freebsd* | dragonfly*)
-     shlibpath_overrides_runpath=no
-     hardcode_into_libs=yes
-     ;;
--  *) # from 4.6 on, and DragonFly
-+  *) # from 4.6 on
-     shlibpath_overrides_runpath=yes
-     hardcode_into_libs=yes
-     ;;
+@@ -2700,6 +2706,17 @@ freebsd* | dragonfly*)
    esac
    ;;
  
@@ -82,15 +81,15 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
 +  hardcode_into_libs=yes
 +  ;;
 +
- gnu*)
+ haiku*)
    version_type=linux # correct to gnu/linux during the next big refactor
    need_lib_prefix=no
-@@ -2599,12 +2613,7 @@ interix[[3-9]]*)
+@@ -2777,12 +2794,7 @@ interix[[3-9]]*)
  irix5* | irix6* | nonstopux*)
    case $host_os in
      nonstopux*) version_type=nonstopux ;;
 -    *)
--      if test "$lt_cv_prog_gnu_ld" = yes; then
+-      if test yes = "$lt_cv_prog_gnu_ld"; then
 -              version_type=linux # correct to gnu/linux during the next big refactor
 -      else
 -              version_type=irix
@@ -99,7 +98,7 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
    esac
    need_lib_prefix=no
    need_version=no
-@@ -2684,19 +2693,36 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+@@ -2887,19 +2899,36 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu 
    dynamic_linker='GNU/Linux ld.so'
    ;;
  
@@ -132,12 +131,12 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
    need_lib_prefix=no
    need_version=no
 -  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
--    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
 -    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 -    dynamic_linker='NetBSD (a.out) ld.so'
 -  else
--    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
--    soname_spec='${libname}${release}${shared_ext}$major'
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+-    soname_spec='$libname$release$shared_ext$major'
 -    dynamic_linker='NetBSD ld.elf_so'
 -  fi
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -146,25 +145,25 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
    shlibpath_var=LD_LIBRARY_PATH
    shlibpath_overrides_runpath=yes
    hardcode_into_libs=yes
-@@ -2722,7 +2748,7 @@ newsos6)
+@@ -2925,7 +2954,7 @@ newsos6)
    ;;
  
- openbsd*)
+ openbsd* | bitrig*)
 -  version_type=sunos
 +  version_type=linux
-   sys_lib_dlsearch_path_spec="/usr/lib"
+   sys_lib_dlsearch_path_spec=/usr/lib
    need_lib_prefix=no
-   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-@@ -2730,7 +2756,7 @@ openbsd*)
-     openbsd3.3 | openbsd3.3.*)        need_version=yes ;;
-     *)                                need_version=no  ;;
-   esac
--  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+@@ -2933,7 +2962,7 @@ openbsd* | bitrig*)
+   else
+     need_version=yes
+   fi
+-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
++  library_names_spec='$libname$release$shared_ext$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
    shlibpath_var=LD_LIBRARY_PATH
-   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-@@ -3289,12 +3315,19 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+   shlibpath_overrides_runpath=yes
+@@ -3546,12 +3575,19 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu 
    lt_cv_deplibs_check_method=pass_all
    ;;
  
@@ -189,7 +188,7 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
    ;;
  
  newos6*)
-@@ -3304,7 +3337,7 @@ newos6*)
+@@ -3561,7 +3597,7 @@ newos6*)
    ;;
  
  *nto* | *qnx*)
@@ -197,8 +196,8 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
 +  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|S\.a)$'
    ;;
  
- openbsd*)
-@@ -3651,7 +3684,7 @@ osf*)
+ openbsd* | bitrig*)
+@@ -3931,7 +3967,7 @@ osf*)
    symcode='[[BCDEGQRST]]'
    ;;
  solaris*)
@@ -207,8 +206,8 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
    ;;
  sco3.2v5*)
    symcode='[[DT]]'
-@@ -3913,9 +3946,15 @@ m4_if([$1], [CXX], [
-       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+@@ -4236,9 +4272,15 @@ m4_if([$1], [CXX], [
+       esac
        ;;
      darwin* | rhapsody*)
 -      # PIC is the default on this platform
@@ -224,7 +223,7 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
        ;;
      *djgpp*)
        # DJGPP does not support shared libraries at all
-@@ -3994,6 +4033,9 @@ m4_if([$1], [CXX], [
+@@ -4317,6 +4359,9 @@ m4_if([$1], [CXX], [
            ;;
        esac
        ;;
@@ -234,7 +233,7 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
        freebsd* | dragonfly*)
        # FreeBSD uses GNU C++
        ;;
-@@ -4232,9 +4274,16 @@ m4_if([$1], [CXX], [
+@@ -4561,9 +4606,16 @@ m4_if([$1], [CXX], [
        ;;
  
      darwin* | rhapsody*)
@@ -252,7 +251,7 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
        ;;
  
      haiku*)
-@@ -4262,6 +4311,13 @@ m4_if([$1], [CXX], [
+@@ -4591,6 +4643,13 @@ m4_if([$1], [CXX], [
        # Instead, we relocate shared libraries at runtime.
        ;;
  
@@ -266,7 +265,7 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
      msdosdjgpp*)
        # Just because we use GCC doesn't mean we suddenly get shared libraries
        # on systems that don't support them.
-@@ -4415,6 +4471,15 @@ m4_if([$1], [CXX], [
+@@ -4769,6 +4828,15 @@ m4_if([$1], [CXX], [
        esac
        ;;
  
@@ -282,17 +281,17 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
      newsos6)
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-@@ -4490,6 +4555,9 @@ m4_if([$1], [CXX], [
+@@ -4844,6 +4912,9 @@ m4_if([$1], [CXX], [
  ])
  case $host_os in
-   # For platforms which do not support PIC, -DPIC is meaningless:
+   # For platforms that do not support PIC, -DPIC is meaningless:
 +  mint*)
 +    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 +    ;;
    *djgpp*)
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
      ;;
-@@ -4861,16 +4929,29 @@ _LT_EOF
+@@ -5252,16 +5323,29 @@ _LT_EOF
        fi
        ;;
  
@@ -302,17 +301,17 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
 -      wlarc=
 +    mirbsd*)
 +      if test -f /usr/libexec/ld.so; then
-+      _LT_TAGVAR(hardcode_direct, $1)=yes
-+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-+      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-+      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++        _LT_TAGVAR(hardcode_direct, $1)=yes
++        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
++        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
++        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
        else
--      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
--      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-+      _LT_TAGVAR(ld_shlibs, $1)=no
+-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+-      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++        _LT_TAGVAR(ld_shlibs, $1)=no
        fi
        ;;
  
@@ -328,8 +327,8 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
      solaris*)
        if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
        _LT_TAGVAR(ld_shlibs, $1)=no
-@@ -5342,15 +5423,28 @@ _LT_EOF
-       _LT_TAGVAR(link_all_deplibs, $1)=yes
+@@ -5794,15 +5878,28 @@ _LT_EOF
+       esac
        ;;
  
 -    netbsd*)
@@ -362,7 +361,7 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
        ;;
  
      newsos6)
-@@ -5362,6 +5456,11 @@ _LT_EOF
+@@ -5814,6 +5911,11 @@ _LT_EOF
        ;;
  
      *nto* | *qnx*)
@@ -373,19 +372,19 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
 +      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
        ;;
  
-     openbsd*)
-@@ -5819,9 +5918,7 @@ m4_defun([_LT_LANG_CXX_CONFIG],
+     openbsd* | bitrig*)
+@@ -6287,9 +6389,7 @@ m4_defun([_LT_LANG_CXX_CONFIG],
  [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  m4_require([_LT_DECL_EGREP])dnl
  m4_require([_LT_PATH_MANIFEST_TOOL])dnl
--if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
--    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
--    (test "X$CXX" != "Xg++"))) ; then
+-if test -n "$CXX" && ( test no != "$CXX" &&
+-    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+-    (test g++ != "$CXX"))); then
 +if test -n "$CXX" && test "X$CXX" != "Xno" ; then
    AC_PROG_CXXCPP
  else
    _lt_caught_CXX_error=yes
-@@ -6538,6 +6635,22 @@ if test "$_lt_caught_CXX_error" != yes; 
+@@ -7079,6 +7179,22 @@ if test yes != "$_lt_caught_CXX_error"; 
          _LT_TAGVAR(ld_shlibs, $1)=no
        ;;
  
@@ -408,7 +407,7 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
        mvs*)
          case $cc_basename in
            cxx*)
-@@ -6552,15 +6665,13 @@ if test "$_lt_caught_CXX_error" != yes; 
+@@ -7093,15 +7209,13 @@ if test yes != "$_lt_caught_CXX_error"; 
        ;;
  
        netbsd*)
@@ -431,58 +430,20 @@ $NetBSD: manual-libtool.m4,v 1.45 2016/0
        ;;
  
        *nto* | *qnx*)
-@@ -6739,27 +6850,14 @@ if test "$_lt_caught_CXX_error" != yes; 
+@@ -7275,7 +7389,7 @@ if test yes != "$_lt_caught_CXX_error"; 
            # GNU C++ compiler with Solaris linker
-           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+           if test yes,no = "$GXX,$with_gnu_ld"; then
+             _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
 -            if $CC --version | $GREP -v '^2\.7' > /dev/null; then
--              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
--              _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
--                $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
--
--              # Commands to make compiler produce verbose output that lists
--              # what "hidden" libraries, object files and flags are used when
--              # linking a shared library.
--              output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
--            else
--              # g++ 2.7 appears to require `-G' NOT `-shared' on this
--              # platform.
--              _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
--              _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
--                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
--
--              # Commands to make compiler produce verbose output that lists
--              # what "hidden" libraries, object files and flags are used when
--              # linking a shared library.
--              output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
--            fi
-+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-+            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-+              $CC -shared $pic_flag ${wl}-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-+
-+            # Commands to make compiler produce verbose output that lists
-+            # what "hidden" libraries, object files and flags are used when
-+            # linking a shared library.
-+            output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
- 
-             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-             case $host_os in
-@@ -6995,13 +7093,11 @@ if AC_TRY_EVAL(ac_compile); then
-     case ${prev}${p} in
- 
-     -L* | -R* | -l*)
--       # Some compilers place space between "-{L,R}" and the path.
--       # Remove the space.
--       if test $p = "-L" ||
--          test $p = "-R"; then
--       prev=$p
--       continue
--       fi
-+       # Some compilers place space between "-{L,R,l}" and the path or
-+       # library.  Remove the space.
-+       case $p in
-+       -L|-R|-l) prev=$p; continue ;;
-+       esac
- 
-        # Expand the sysroot to ease extracting the directories later.
-        if test -z "$prev"; then
++            if true; then
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+                   $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+@@ -7535,6 +7649,7 @@ if AC_TRY_EVAL(ac_compile); then
+        # Some compilers place space between "-{L,R}" and the path.
+        # Remove the space.
+        if test x-L = "$p" ||
++          test x-l = "$p" ||
+           test x-R = "$p"; then
+        prev=$p
+        continue

Index: pkgsrc/devel/libtool/patches/manual-ltdl.m4
diff -u pkgsrc/devel/libtool/patches/manual-ltdl.m4:1.5 pkgsrc/devel/libtool/patches/manual-ltdl.m4:1.6
--- pkgsrc/devel/libtool/patches/manual-ltdl.m4:1.5     Fri Apr 12 13:44:08 2013
+++ pkgsrc/devel/libtool/patches/manual-ltdl.m4 Mon Mar  6 16:14:07 2017
@@ -1,8 +1,10 @@
-$NetBSD: manual-ltdl.m4,v 1.5 2013/04/12 13:44:08 joerg Exp $
+$NetBSD: manual-ltdl.m4,v 1.6 2017/03/06 16:14:07 jperkin Exp $
 
---- libltdl/m4/ltdl.m4.orig    2011-10-17 10:17:05.000000000 +0000
-+++ libltdl/m4/ltdl.m4
-@@ -493,6 +493,9 @@ AC_CACHE_CHECK([whether deplibs are load
+Support mirbsd.
+
+--- m4/ltdl.m4.orig    2015-01-16 18:52:04.000000000 +0000
++++ m4/ltdl.m4
+@@ -496,6 +496,9 @@ AC_CACHE_CHECK([whether deplibs are load
      # at 6.2 and later dlopen does load deplibs.
      lt_cv_sys_dlopen_deplibs=yes
      ;;

Index: pkgsrc/devel/libtool/patches/manual.README
diff -u pkgsrc/devel/libtool/patches/manual.README:1.13 pkgsrc/devel/libtool/patches/manual.README:1.14
--- pkgsrc/devel/libtool/patches/manual.README:1.13     Sun Jun 15 14:41:36 2014
+++ pkgsrc/devel/libtool/patches/manual.README  Mon Mar  6 16:14:07 2017
@@ -1,4 +1,4 @@
-$NetBSD: manual.README,v 1.13 2014/06/15 14:41:36 joerg Exp $
+$NetBSD: manual.README,v 1.14 2017/03/06 16:14:07 jperkin Exp $
 
 The "manual-*" patch files are used to maintain the pkgsrc version of
 libtool.  These files contain patches for the .m4 files in libtool which are
@@ -20,11 +20,13 @@ cat /usr/pkgsrc/devel/libtool/patches/ma
 
 [edit *.m4 files and put patches back to manual-*]
 
+cp -f build-aux/ltmain.sh build-aux/ltmain.sh.orig
 cp -f configure configure.orig
 cp -f libltdl/configure libltdl/configure.orig
-./bootstrap
-pkgdiff configure >/usr/pkgsrc/devel/libtool/patches/patch-ab
-pkgdiff libltdl/configure >/usr/pkgsrc/devel/libtool/patches/patch-ad
+./bootstrap --skip-git --force
+pkgdiff build-aux/ltmain.sh >/usr/pkgsrc/devel/libtool/patches/patch-build-aux_ltmain.sh
+pkgdiff configure >/usr/pkgsrc/devel/libtool/patches/patch-configure
+pkgdiff libltdl/configure >/usr/pkgsrc/devel/libtool/patches/patch-libltdl_configure
 cd /usr/pkgsrc/devel/libtool
 make makepatchsum
 

Index: pkgsrc/mk/configure/libtool-override.mk
diff -u pkgsrc/mk/configure/libtool-override.mk:1.12 pkgsrc/mk/configure/libtool-override.mk:1.13
--- pkgsrc/mk/configure/libtool-override.mk:1.12        Tue Feb 23 15:19:23 2016
+++ pkgsrc/mk/configure/libtool-override.mk     Mon Mar  6 16:14:08 2017
@@ -1,4 +1,4 @@
-# $NetBSD: libtool-override.mk,v 1.12 2016/02/23 15:19:23 joerg Exp $
+# $NetBSD: libtool-override.mk,v 1.13 2017/03/06 16:14:08 jperkin Exp $
 
 ######################################################################
 ### {libtool,shlibtool,depcomp}-override (PRIVATE)
@@ -18,7 +18,11 @@ OVERRIDE_DIRDEPTH.depcomp?=  ${OVERRIDE_D
 
 _OVERRIDE_PATH.libtool=                ${LIBTOOL}
 _OVERRIDE_PATH.shlibtool=      ${SHLIBTOOL}
+.if exists(${LOCALBASE}/share/libtool/config/depcomp)
 _OVERRIDE_PATH.depcomp=                ${LOCALBASE}/share/libtool/config/depcomp
+.else
+_OVERRIDE_PATH.depcomp=                ${LOCALBASE}/share/libtool/build-aux/depcomp
+.endif
 
 .for _script_ in libtool shlibtool depcomp
 _SCRIPT.${_script_}-override=                                          \

Added files:

Index: pkgsrc/devel/libtool/patches/manual-funclib.sh
diff -u /dev/null pkgsrc/devel/libtool/patches/manual-funclib.sh:1.1
--- /dev/null   Mon Mar  6 16:14:08 2017
+++ pkgsrc/devel/libtool/patches/manual-funclib.sh      Mon Mar  6 16:14:07 2017
@@ -0,0 +1,16 @@
+$NetBSD: manual-funclib.sh,v 1.1 2017/03/06 16:14:07 jperkin Exp $
+
+Avoid pkgsrc variables which are not suitable here.
+
+--- build-aux/funclib.sh.orig  2015-01-20 19:18:37.000000000 +0000
++++ build-aux/funclib.sh
+@@ -244,6 +244,9 @@ test -z "$GREP" && {
+ # uses them if a suitable command of that name is not already available
+ # in the command search PATH.
+ 
++unset CP
++unset MV
++unset RM
+ : ${CP="cp -f"}
+ : ${ECHO="printf %s\n"}
+ : ${EGREP="$GREP -E"}
Index: pkgsrc/devel/libtool/patches/manual-ltmain.in
diff -u /dev/null pkgsrc/devel/libtool/patches/manual-ltmain.in:1.1
--- /dev/null   Mon Mar  6 16:14:08 2017
+++ pkgsrc/devel/libtool/patches/manual-ltmain.in       Mon Mar  6 16:14:07 2017
@@ -0,0 +1,96 @@
+$NetBSD: manual-ltmain.in,v 1.1 2017/03/06 16:14:07 jperkin Exp $
+
+Handle versuffix2 for mirbsd/midnightbsd.
+Avoid empty relink_command.
+
+--- build-aux/ltmain.in.orig   2015-02-06 12:57:56.000000000 +0000
++++ build-aux/ltmain.in
+@@ -6430,7 +6430,11 @@ func_mode_link ()
+           # Finalize command for both is simple: just hardcode it.
+           if test yes = "$hardcode_direct" &&
+              test no = "$hardcode_direct_absolute"; then
+-            add=$libdir/$linklib
++            if test -f "$inst_prefix_dir$libdir/$linklib"; then
++              add="$inst_prefix_dir$libdir/$linklib"
++            else
++              add="$libdir/$linklib"
++            fi
+           elif test yes = "$hardcode_minus_L"; then
+             add_dir=-L$libdir
+             add=-l$name
+@@ -6953,6 +6957,7 @@ func_mode_link ()
+       # Calculate the version variables.
+       major=
+       versuffix=
++      versuffix2=
+       verstring=
+       case $version_type in
+       none) ;;
+@@ -7023,6 +7028,7 @@ func_mode_link ()
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix=$major.$age.$revision
++        versuffix2=$major.$age
+         ;;
+ 
+       osf)
+@@ -7088,8 +7094,10 @@ func_mode_link ()
+         esac
+         if test no = "$need_version"; then
+           versuffix=
++          versuffix2=
+         else
+           versuffix=.0.0
++          versuffix2=.0.0
+         fi
+       fi
+ 
+@@ -7097,6 +7105,7 @@ func_mode_link ()
+       if test yes,no = "$avoid_version,$need_version"; then
+         major=
+         versuffix=
++        versuffix2=
+         verstring=
+       fi
+ 
+@@ -7210,7 +7219,7 @@ func_mode_link ()
+         *-*-netbsd*)
+           # Don't link with libc until the a.out ld.so is fixed.
+           ;;
+-        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
++        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-mirbsd*)
+           # Do not include libc due to us having libc/libc_r.
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+@@ -7233,12 +7242,14 @@ func_mode_link ()
+       libname_save=$libname
+       release_save=$release
+       versuffix_save=$versuffix
++      versuffix2_save=$versuffix2
+       major_save=$major
+       # I'm not sure if I'm treating the release correctly.  I think
+       # release should show up in the -l (ie -lgmp5) so we don't want to
+       # add it in twice.  Is that correct?
+       release=
+       versuffix=
++      versuffix2=
+       major=
+       newdeplibs=
+       droppeddeps=no
+@@ -7515,6 +7526,7 @@ EOF
+         ;;
+       esac
+       versuffix=$versuffix_save
++      versuffix2=$versuffix2_save
+       major=$major_save
+       release=$release_save
+       libname=$libname_save
+@@ -9000,7 +9012,7 @@ dlpreopen='$dlprefiles'
+ 
+ # Directory that this library needs to be installed in:
+ libdir='$install_libdir'"
+-        if test no,yes = "$installed,$need_relink"; then
++        if test no,yes = "$installed,$need_relink" && test -n "$relink_command"; then
+           $ECHO >> $output "\
+ relink_command=\"$relink_command\""
+         fi
Index: pkgsrc/devel/libtool/patches/patch-Makefile.in
diff -u /dev/null pkgsrc/devel/libtool/patches/patch-Makefile.in:1.1
--- /dev/null   Mon Mar  6 16:14:08 2017
+++ pkgsrc/devel/libtool/patches/patch-Makefile.in      Mon Mar  6 16:14:07 2017
@@ -0,0 +1,35 @@
+$NetBSD: patch-Makefile.in,v 1.1 2017/03/06 16:14:07 jperkin Exp $
+
+Avoid generating info pages.
+
+--- Makefile.in.orig   2015-02-15 16:14:14.000000000 +0000
++++ Makefile.in
+@@ -790,9 +790,7 @@ doc_libtool_TEXINFOS = $(doc_dir)/PLATFO
+                         $(notes_texi)
+ 
+ dist_man1_MANS = $(libtool_1) $(libtoolize_1)
+-update_mans = \
+-  PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \
+-  $(HELP2MAN) --output='$@'
++update_mans = true
+ 
+ ltdldir = $(srcdir)/libltdl
+ pkgauxdir = $(pkgdatadir)/build-aux
+@@ -1901,7 +1899,7 @@ all-am: Makefile $(INFO_DEPS) $(LTLIBRAR
+               $(HEADERS) config.h all-local
+ installdirs: installdirs-recursive
+ installdirs-am:
+-      for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(ltdlincludedir)"; do \
++      for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(ltdlincludedir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+ install: $(BUILT_SOURCES)
+@@ -1973,7 +1971,7 @@ info: info-recursive
+ info-am: $(INFO_DEPS)
+ 
+ install-data-am: install-data-local install-includeHEADERS \
+-      install-info-am install-ltdlincludeHEADERS install-man
++      install-ltdlincludeHEADERS install-man
+ 
+ install-dvi: install-dvi-recursive
+ 
Index: pkgsrc/devel/libtool/patches/patch-build-aux_depcomp
diff -u /dev/null pkgsrc/devel/libtool/patches/patch-build-aux_depcomp:1.1
--- /dev/null   Mon Mar  6 16:14:08 2017
+++ pkgsrc/devel/libtool/patches/patch-build-aux_depcomp        Mon Mar  6 16:14:07 2017
@@ -0,0 +1,17 @@
+$NetBSD: patch-build-aux_depcomp,v 1.1 2017/03/06 16:14:07 jperkin Exp $
+
+Sometimes, the same source file is compiled for both PIC and non-PIC use.
+Avoid using the same temporary file in this case as it will result in
+very hard to debug race conditions for parallel builds otherwise.
+
+--- build-aux/depcomp.orig     2016-12-31 10:44:32.000000000 +0000
++++ build-aux/depcomp
+@@ -124,7 +124,7 @@ fi
+ # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+ depfile=${depfile-`echo "$object" |
+   sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
++tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}.$$
+ 
+ rm -f "$tmpdepfile"
+ 
Index: pkgsrc/devel/libtool/patches/patch-build-aux_ltmain.sh
diff -u /dev/null pkgsrc/devel/libtool/patches/patch-build-aux_ltmain.sh:1.1
--- /dev/null   Mon Mar  6 16:14:08 2017
+++ pkgsrc/devel/libtool/patches/patch-build-aux_ltmain.sh      Mon Mar  6 16:14:07 2017
@@ -0,0 +1,115 @@
+$NetBSD: patch-build-aux_ltmain.sh,v 1.1 2017/03/06 16:14:07 jperkin Exp $
+
+Automatically generated using manual-* patches and bootstrap.
+DO NOT MODIFY THIS PATCH MANUALLY!  YOUR CHANGES WILL BE LOST!
+
+--- build-aux/ltmain.sh.orig   2017-02-02 14:47:39.000000000 +0000
++++ build-aux/ltmain.sh
+@@ -309,6 +309,9 @@ test -z "$GREP" && {
+ # uses them if a suitable command of that name is not already available
+ # in the command search PATH.
+ 
++unset CP
++unset MV
++unset RM
+ : ${CP="cp -f"}
+ : ${ECHO="printf %s\n"}
+ : ${EGREP="$GREP -E"}
+@@ -2073,7 +2076,7 @@ include the following information:
+        autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+ 
+ Report bugs to <bug-libtool%gnu.org@localhost>.
+-GNU libtool home page: <http://www.gnu.org/software/libtool/>.
++GNU libtool home page: <http://www.gnu.org/s/libtool/>.
+ General help using GNU software: <http://www.gnu.org/gethelp/>."
+     exit 0
+ }
+@@ -8342,7 +8345,11 @@ func_mode_link ()
+           # Finalize command for both is simple: just hardcode it.
+           if test yes = "$hardcode_direct" &&
+              test no = "$hardcode_direct_absolute"; then
+-            add=$libdir/$linklib
++            if test -f "$inst_prefix_dir$libdir/$linklib"; then
++              add="$inst_prefix_dir$libdir/$linklib"
++            else
++              add="$libdir/$linklib"
++            fi
+           elif test yes = "$hardcode_minus_L"; then
+             add_dir=-L$libdir
+             add=-l$name
+@@ -8865,6 +8872,7 @@ func_mode_link ()
+       # Calculate the version variables.
+       major=
+       versuffix=
++      versuffix2=
+       verstring=
+       case $version_type in
+       none) ;;
+@@ -8935,6 +8943,7 @@ func_mode_link ()
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix=$major.$age.$revision
++        versuffix2=$major.$age
+         ;;
+ 
+       osf)
+@@ -9000,8 +9009,10 @@ func_mode_link ()
+         esac
+         if test no = "$need_version"; then
+           versuffix=
++          versuffix2=
+         else
+           versuffix=.0.0
++          versuffix2=.0.0
+         fi
+       fi
+ 
+@@ -9009,6 +9020,7 @@ func_mode_link ()
+       if test yes,no = "$avoid_version,$need_version"; then
+         major=
+         versuffix=
++        versuffix2=
+         verstring=
+       fi
+ 
+@@ -9122,7 +9134,7 @@ func_mode_link ()
+         *-*-netbsd*)
+           # Don't link with libc until the a.out ld.so is fixed.
+           ;;
+-        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
++        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-mirbsd*)
+           # Do not include libc due to us having libc/libc_r.
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+@@ -9145,12 +9157,14 @@ func_mode_link ()
+       libname_save=$libname
+       release_save=$release
+       versuffix_save=$versuffix
++      versuffix2_save=$versuffix2
+       major_save=$major
+       # I'm not sure if I'm treating the release correctly.  I think
+       # release should show up in the -l (ie -lgmp5) so we don't want to
+       # add it in twice.  Is that correct?
+       release=
+       versuffix=
++      versuffix2=
+       major=
+       newdeplibs=
+       droppeddeps=no
+@@ -9427,6 +9441,7 @@ EOF
+         ;;
+       esac
+       versuffix=$versuffix_save
++      versuffix2=$versuffix2_save
+       major=$major_save
+       release=$release_save
+       libname=$libname_save
+@@ -10912,7 +10927,7 @@ dlpreopen='$dlprefiles'
+ 
+ # Directory that this library needs to be installed in:
+ libdir='$install_libdir'"
+-        if test no,yes = "$installed,$need_relink"; then
++        if test no,yes = "$installed,$need_relink" && test -n "$relink_command"; then
+           $ECHO >> $output "\
+ relink_command=\"$relink_command\""
+         fi
Index: pkgsrc/devel/libtool/patches/patch-configure
diff -u /dev/null pkgsrc/devel/libtool/patches/patch-configure:1.1
--- /dev/null   Mon Mar  6 16:14:08 2017
+++ pkgsrc/devel/libtool/patches/patch-configure        Mon Mar  6 16:14:07 2017
@@ -0,0 +1,1409 @@
+$NetBSD: patch-configure,v 1.1 2017/03/06 16:14:07 jperkin Exp $
+
+Automatically generated using manual-* patches and bootstrap.
+DO NOT MODIFY THIS PATCH MANUALLY!  YOUR CHANGES WILL BE LOST!
+
+--- configure.orig     2017-02-02 10:07:28.000000000 +0000
++++ configure
+@@ -5903,7 +5903,7 @@ else
+     lt_cv_sys_max_cmd_len=8192;
+     ;;
+ 
+-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
++  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd* | mirbsd*)
+     # 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`
+@@ -6001,6 +6001,9 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
+ 
+ 
+ 
++unset CP
++unset MV
++unset RM
+ : ${CP="cp -f"}
+ : ${MV="mv -f"}
+ : ${RM="rm -f"}
+@@ -6369,12 +6372,19 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu 
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
++midnightbsd*)
++  # might to use match_pattern like MirBSD, but there is no well-defined
++  # naming scheme for libraries yet, as the current one is deprecated, and
++  # the new one in a state of flux especially between mports and MirPorts
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++mirbsd*)
++  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
++  ;;
++
+ netbsd*)
+-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+-  else
+-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+-  fi
++  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+   ;;
+ 
+ newos6*)
+@@ -6384,7 +6394,7 @@ newos6*)
+   ;;
+ 
+ *nto* | *qnx*)
+-  lt_cv_deplibs_check_method=pass_all
++  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|S\.a)$'
+   ;;
+ 
+ openbsd* | bitrig*)
+@@ -7015,7 +7025,7 @@ fi
+ 
+ case $host_os in
+   darwin*)
+-    lock_old_archive_extraction=yes ;;
++    lock_old_archive_extraction=no ;; # work around bug #14579
+   *)
+     lock_old_archive_extraction=no ;;
+ esac
+@@ -7104,7 +7114,7 @@ osf*)
+   symcode='[BCDEGQRST]'
+   ;;
+ solaris*)
+-  symcode='[BDRT]'
++  symcode='[BCDRT]'
+   ;;
+ sco3.2v5*)
+   symcode='[DT]'
+@@ -7500,7 +7510,10 @@ func_cc_basename ()
+         *) break;;
+       esac
+     done
+-    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
++    # Return the actual command name, not our pkgsrc wrapper name because several
++    # decisions are made only based on compiler names
++    if test -n "$cc_temp" && new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null`; then :; else new_cc_temp="$cc_temp"; fi
++    func_cc_basename_result=`$ECHO "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+ }
+ 
+ # Check whether --enable-libtool-lock was given.
+@@ -9611,9 +9624,16 @@ lt_prog_compiler_static=
+       ;;
+ 
+     darwin* | rhapsody*)
+-      # PIC is the default on this platform
++      # PIC is the default on this platform, and static linking of
++      # binaries generally doesn't work
+       # Common symbols not allowed in MH_DYLIB files
+       lt_prog_compiler_pic='-fno-common'
++      lt_prog_compiler_static=''
++      ;;
++
++    *mint*)
++      # FreeMiNT does not support shared libraries at all
++      lt_prog_compiler_pic=
+       ;;
+ 
+     haiku*)
+@@ -9641,6 +9661,13 @@ lt_prog_compiler_static=
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+ 
++    mint*)
++      # Just because we use GCC doesn't mean we suddenly get shared libraries
++      # on systems that don't support them.
++      lt_prog_compiler_can_build_shared=no
++      enable_shared=no
++      ;;
++
+     msdosdjgpp*)
+       # Just because we use GCC doesn't mean we suddenly get shared libraries
+       # on systems that don't support them.
+@@ -9818,6 +9845,15 @@ lt_prog_compiler_static=
+       esac
+       ;;
+ 
++    mirbsd*)
++      case $cc_basename in
++      # pkgsrc f77 is f2c, which uses gcc underneath.
++      f77*)
++      lt_prog_compiler_wl='-Wl,'
++      ;;
++      esac
++      ;;
++
+     newsos6)
+       lt_prog_compiler_pic='-KPIC'
+       lt_prog_compiler_static='-Bstatic'
+@@ -9893,6 +9929,9 @@ lt_prog_compiler_static=
+ 
+ case $host_os in
+   # For platforms that do not support PIC, -DPIC is meaningless:
++  mint*)
++    lt_prog_compiler_pic=
++    ;;
+   *djgpp*)
+     lt_prog_compiler_pic=
+     ;;
+@@ -10471,16 +10510,29 @@ _LT_EOF
+       fi
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+-      wlarc=
++    mirbsd*)
++      if test -f /usr/libexec/ld.so; then
++        hardcode_direct=yes
++        hardcode_shlibpath_var=no
++        hardcode_direct_absolute=yes
++        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++        archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++        export_dynamic_flag_spec='${wl}-E'
+       else
+-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+-      archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++        ld_shlibs=no
+       fi
+       ;;
+ 
++    netbsd*)
++      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
++      output_verbose_link_cmd=func_echo_all
++      ;;
++
+     solaris*)
+       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+       ld_shlibs=no
+@@ -10940,7 +10992,7 @@ fi
+   allow_undefined_flag=$_lt_dar_allow_undefined
+   case $cc_basename in
+      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+-     *) _lt_dar_can_shared=$GCC ;;
++     *) _lt_dar_can_shared=yes ;;
+   esac
+   if test yes = "$_lt_dar_can_shared"; then
+     output_verbose_link_cmd=func_echo_all
+@@ -11162,15 +11214,28 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       esac
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
++    mirbsd*)
++     if test -f /usr/libexec/ld.so; then
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
++      hardcode_direct_absolute=yes
++      archive_cmds='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++      archive_expsym_cmds='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++      export_dynamic_flag_spec='${wl}-E'
++      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+       else
+-      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
++      ld_shlibs=no
+       fi
+-      hardcode_libdir_flag_spec='-R$libdir'
++      ;;
++
++    netbsd*)
++      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+       hardcode_direct=yes
+       hardcode_shlibpath_var=no
++      output_verbose_link_cmd=func_echo_all
+       ;;
+ 
+     newsos6)
+@@ -11182,6 +11247,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       ;;
+ 
+     *nto* | *qnx*)
++      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec='-R$libdir'
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
+       ;;
+ 
+     openbsd* | bitrig*)
+@@ -12026,7 +12096,7 @@ dgux*)
+   shlibpath_var=LD_LIBRARY_PATH
+   ;;
+ 
+-freebsd* | dragonfly*)
++freebsd*)
+   # DragonFly does not have aout.  When/if they implement a new
+   # versioning mechanism, adjust this.
+   if test -x /usr/bin/objformat; then
+@@ -12071,6 +12141,17 @@ freebsd* | dragonfly*)
+   esac
+   ;;
+ 
++dragonfly*)
++  version_type=linux
++  need_version=no
++  need_lib_prefix=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=no
++  hardcode_into_libs=yes
++  ;;
++
+ haiku*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   need_lib_prefix=no
+@@ -12148,12 +12229,7 @@ interix[3-9]*)
+ irix5* | irix6* | nonstopux*)
+   case $host_os in
+     nonstopux*) version_type=nonstopux ;;
+-    *)
+-      if test yes = "$lt_cv_prog_gnu_ld"; then
+-              version_type=linux # correct to gnu/linux during the next big refactor
+-      else
+-              version_type=irix
+-      fi ;;
++    *) version_type=irix ;;
+   esac
+   need_lib_prefix=no
+   need_version=no
+@@ -12277,19 +12353,36 @@ fi
+   dynamic_linker='GNU/Linux ld.so'
+   ;;
+ 
++midnightbsd*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}${versuffix2} ${libname}${release}${shared_ext} $libname${shared_ext}'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  hardcode_into_libs=yes
++  ;;
++
++mirbsd*)
++  version_type=linux
++  sys_lib_search_path_spec="/usr/lib"
++  sys_lib_dlsearch_path_spec="/usr/lib"
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}${versuffix2} ${libname}${shared_ext}${versuffix2}'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  ;;
++
+ netbsd*)
+-  version_type=sunos
++  version_type=linux
+   need_lib_prefix=no
+   need_version=no
+-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+-    dynamic_linker='NetBSD (a.out) ld.so'
+-  else
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+-    soname_spec='$libname$release$shared_ext$major'
+-    dynamic_linker='NetBSD ld.elf_so'
+-  fi
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  dynamic_linker='NetBSD ld.elf_so'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+   hardcode_into_libs=yes
+@@ -12315,7 +12408,7 @@ newsos6)
+   ;;
+ 
+ openbsd* | bitrig*)
+-  version_type=sunos
++  version_type=linux
+   sys_lib_dlsearch_path_spec=/usr/lib
+   need_lib_prefix=no
+   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+@@ -12323,7 +12416,7 @@ openbsd* | bitrig*)
+   else
+     need_version=yes
+   fi
+-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
++  library_names_spec='$libname$release$shared_ext$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+@@ -13900,6 +13993,9 @@ else
+     # at 6.2 and later dlopen does load deplibs.
+     lt_cv_sys_dlopen_deplibs=yes
+     ;;
++  mirbsd*)
++    lt_cv_sys_dlopen_deplibs=yes
++    ;;
+   netbsd*)
+     lt_cv_sys_dlopen_deplibs=yes
+     ;;
+@@ -14589,9 +14685,7 @@ func_stripname_cnf ()
+   esac
+ } # func_stripname_cnf
+ 
+-      if test -n "$CXX" && ( test no != "$CXX" &&
+-    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+-    (test g++ != "$CXX"))); then
++      if test -n "$CXX" && test "X$CXX" != "Xno" ; then
+   ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -15376,7 +15470,7 @@ fi
+   allow_undefined_flag_CXX=$_lt_dar_allow_undefined
+   case $cc_basename in
+      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+-     *) _lt_dar_can_shared=$GCC ;;
++     *) _lt_dar_can_shared=yes ;;
+   esac
+   if test yes = "$_lt_dar_can_shared"; then
+     output_verbose_link_cmd=func_echo_all
+@@ -15770,6 +15864,22 @@ fi
+         ld_shlibs_CXX=no
+       ;;
+ 
++      mirbsd*)
++      if test -f /usr/libexec/ld.so; then
++        hardcode_direct_CXX=yes
++        hardcode_shlibpath_var_CXX=no
++        hardcode_direct_absolute_CXX=yes
++        archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++        archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++        hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
++        export_dynamic_flag_spec_CXX='${wl}-E'
++        whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++        output_verbose_link_cmd='echo'
++      else
++        ld_shlibs_CXX=no
++      fi
++      ;;
++
+       mvs*)
+         case $cc_basename in
+           cxx*)
+@@ -15784,15 +15894,13 @@ fi
+       ;;
+ 
+       netbsd*)
+-        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-        archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+-        wlarc=
+-        hardcode_libdir_flag_spec_CXX='-R$libdir'
+-        hardcode_direct_CXX=yes
+-        hardcode_shlibpath_var_CXX=no
+-      fi
+-      # Workaround some broken pre-1.5 toolchains
+-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
++      ld_shlibs_CXX=yes
++      archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
++      hardcode_direct_CXX=yes
++      hardcode_shlibpath_var_CXX=no
++      output_verbose_link_cmd=func_echo_all
+       ;;
+ 
+       *nto* | *qnx*)
+@@ -15966,7 +16074,7 @@ fi
+           # GNU C++ compiler with Solaris linker
+           if test yes,no = "$GXX,$with_gnu_ld"; then
+             no_undefined_flag_CXX=' $wl-z ${wl}defs'
+-            if $CC --version | $GREP -v '^2\.7' > /dev/null; then
++            if true; then
+               archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+               archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+                   $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+@@ -16131,6 +16239,7 @@ if { { eval echo "\"\$as_me\":${as_linen
+        # Some compilers place space between "-{L,R}" and the path.
+        # Remove the space.
+        if test x-L = "$p" ||
++          test x-l = "$p" ||
+           test x-R = "$p"; then
+        prev=$p
+        continue
+@@ -16311,9 +16420,15 @@ lt_prog_compiler_static_CXX=
+       esac
+       ;;
+     darwin* | rhapsody*)
+-      # PIC is the default on this platform
++      # PIC is the default on this platform, and static linking of
++      # binaries generally doesn't work
+       # Common symbols not allowed in MH_DYLIB files
+       lt_prog_compiler_pic_CXX='-fno-common'
++      lt_prog_compiler_static_CXX=''
++      ;;
++    *mint*)
++      # FreeMiNT does not support shared libraries at all
++      lt_prog_compiler_pic_CXX=
+       ;;
+     *djgpp*)
+       # DJGPP does not support shared libraries at all
+@@ -16391,6 +16506,9 @@ lt_prog_compiler_static_CXX=
+           ;;
+       esac
+       ;;
++      mint*)
++      # FreeMiNT uses GNU C++
++      ;;
+       freebsd* | dragonfly*)
+       # FreeBSD uses GNU C++
+       ;;
+@@ -16588,6 +16706,9 @@ lt_prog_compiler_static_CXX=
+ 
+ case $host_os in
+   # For platforms that do not support PIC, -DPIC is meaningless:
++  mint*)
++    lt_prog_compiler_pic_CXX=
++    ;;
+   *djgpp*)
+     lt_prog_compiler_pic_CXX=
+     ;;
+@@ -17315,7 +17436,7 @@ dgux*)
+   shlibpath_var=LD_LIBRARY_PATH
+   ;;
+ 
+-freebsd* | dragonfly*)
++freebsd*)
+   # DragonFly does not have aout.  When/if they implement a new
+   # versioning mechanism, adjust this.
+   if test -x /usr/bin/objformat; then
+@@ -17360,6 +17481,17 @@ freebsd* | dragonfly*)
+   esac
+   ;;
+ 
++dragonfly*)
++  version_type=linux
++  need_version=no
++  need_lib_prefix=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=no
++  hardcode_into_libs=yes
++  ;;
++
+ haiku*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   need_lib_prefix=no
+@@ -17437,12 +17569,7 @@ interix[3-9]*)
+ irix5* | irix6* | nonstopux*)
+   case $host_os in
+     nonstopux*) version_type=nonstopux ;;
+-    *)
+-      if test yes = "$lt_cv_prog_gnu_ld"; then
+-              version_type=linux # correct to gnu/linux during the next big refactor
+-      else
+-              version_type=irix
+-      fi ;;
++    *) version_type=irix ;;
+   esac
+   need_lib_prefix=no
+   need_version=no
+@@ -17566,19 +17693,36 @@ fi
+   dynamic_linker='GNU/Linux ld.so'
+   ;;
+ 
++midnightbsd*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}${versuffix2} ${libname}${release}${shared_ext} $libname${shared_ext}'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  hardcode_into_libs=yes
++  ;;
++
++mirbsd*)
++  version_type=linux
++  sys_lib_search_path_spec="/usr/lib"
++  sys_lib_dlsearch_path_spec="/usr/lib"
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}${versuffix2} ${libname}${shared_ext}${versuffix2}'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  ;;
++
+ netbsd*)
+-  version_type=sunos
++  version_type=linux
+   need_lib_prefix=no
+   need_version=no
+-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+-    dynamic_linker='NetBSD (a.out) ld.so'
+-  else
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+-    soname_spec='$libname$release$shared_ext$major'
+-    dynamic_linker='NetBSD ld.elf_so'
+-  fi
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  dynamic_linker='NetBSD ld.elf_so'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+   hardcode_into_libs=yes
+@@ -17604,7 +17748,7 @@ newsos6)
+   ;;
+ 
+ openbsd* | bitrig*)
+-  version_type=sunos
++  version_type=linux
+   sys_lib_dlsearch_path_spec=/usr/lib
+   need_lib_prefix=no
+   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+@@ -17612,7 +17756,7 @@ openbsd* | bitrig*)
+   else
+     need_version=yes
+   fi
+-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
++  library_names_spec='$libname$release$shared_ext$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+@@ -18303,9 +18447,16 @@ lt_prog_compiler_static_F77=
+       ;;
+ 
+     darwin* | rhapsody*)
+-      # PIC is the default on this platform
++      # PIC is the default on this platform, and static linking of
++      # binaries generally doesn't work
+       # Common symbols not allowed in MH_DYLIB files
+       lt_prog_compiler_pic_F77='-fno-common'
++      lt_prog_compiler_static_F77=''
++      ;;
++
++    *mint*)
++      # FreeMiNT does not support shared libraries at all
++      lt_prog_compiler_pic_F77=
+       ;;
+ 
+     haiku*)
+@@ -18333,6 +18484,13 @@ lt_prog_compiler_static_F77=
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+ 
++    mint*)
++      # Just because we use GCC doesn't mean we suddenly get shared libraries
++      # on systems that don't support them.
++      lt_prog_compiler_can_build_shared_F77=no
++      enable_shared=no
++      ;;
++
+     msdosdjgpp*)
+       # Just because we use GCC doesn't mean we suddenly get shared libraries
+       # on systems that don't support them.
+@@ -18510,6 +18668,15 @@ lt_prog_compiler_static_F77=
+       esac
+       ;;
+ 
++    mirbsd*)
++      case $cc_basename in
++      # pkgsrc f77 is f2c, which uses gcc underneath.
++      f77*)
++      lt_prog_compiler_wl_F77='-Wl,'
++      ;;
++      esac
++      ;;
++
+     newsos6)
+       lt_prog_compiler_pic_F77='-KPIC'
+       lt_prog_compiler_static_F77='-Bstatic'
+@@ -18585,6 +18752,9 @@ lt_prog_compiler_static_F77=
+ 
+ case $host_os in
+   # For platforms that do not support PIC, -DPIC is meaningless:
++  mint*)
++    lt_prog_compiler_pic_F77=
++    ;;
+   *djgpp*)
+     lt_prog_compiler_pic_F77=
+     ;;
+@@ -19148,16 +19318,29 @@ _LT_EOF
+       fi
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+-      wlarc=
++    mirbsd*)
++      if test -f /usr/libexec/ld.so; then
++        hardcode_direct_F77=yes
++        hardcode_shlibpath_var_F77=no
++        hardcode_direct_absolute_F77=yes
++        archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++        archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++        hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
++        export_dynamic_flag_spec_F77='${wl}-E'
+       else
+-      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+-      archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++        ld_shlibs_F77=no
+       fi
+       ;;
+ 
++    netbsd*)
++      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
++      hardcode_direct_F77=yes
++      hardcode_shlibpath_var_F77=no
++      output_verbose_link_cmd=func_echo_all
++      ;;
++
+     solaris*)
+       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+       ld_shlibs_F77=no
+@@ -19605,7 +19788,7 @@ fi
+   allow_undefined_flag_F77=$_lt_dar_allow_undefined
+   case $cc_basename in
+      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+-     *) _lt_dar_can_shared=$GCC ;;
++     *) _lt_dar_can_shared=yes ;;
+   esac
+   if test yes = "$_lt_dar_can_shared"; then
+     output_verbose_link_cmd=func_echo_all
+@@ -19789,15 +19972,28 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       esac
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
++    mirbsd*)
++     if test -f /usr/libexec/ld.so; then
++      hardcode_direct_F77=yes
++      hardcode_shlibpath_var_F77=no
++      hardcode_direct_absolute_F77=yes
++      archive_cmds_F77='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++      archive_expsym_cmds_F77='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
++      export_dynamic_flag_spec_F77='${wl}-E'
++      whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+       else
+-      archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
++      ld_shlibs_F77=no
+       fi
+-      hardcode_libdir_flag_spec_F77='-R$libdir'
++      ;;
++
++    netbsd*)
++      archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+       hardcode_direct_F77=yes
+       hardcode_shlibpath_var_F77=no
++      output_verbose_link_cmd=func_echo_all
+       ;;
+ 
+     newsos6)
+@@ -19809,6 +20005,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       ;;
+ 
+     *nto* | *qnx*)
++      archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_F77='-R$libdir'
++      hardcode_direct_F77=yes
++      hardcode_shlibpath_var_F77=no
+       ;;
+ 
+     openbsd* | bitrig*)
+@@ -20481,7 +20682,7 @@ dgux*)
+   shlibpath_var=LD_LIBRARY_PATH
+   ;;
+ 
+-freebsd* | dragonfly*)
++freebsd*)
+   # DragonFly does not have aout.  When/if they implement a new
+   # versioning mechanism, adjust this.
+   if test -x /usr/bin/objformat; then
+@@ -20526,6 +20727,17 @@ freebsd* | dragonfly*)
+   esac
+   ;;
+ 
++dragonfly*)
++  version_type=linux
++  need_version=no
++  need_lib_prefix=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=no
++  hardcode_into_libs=yes
++  ;;
++
+ haiku*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   need_lib_prefix=no
+@@ -20603,12 +20815,7 @@ interix[3-9]*)
+ irix5* | irix6* | nonstopux*)
+   case $host_os in
+     nonstopux*) version_type=nonstopux ;;
+-    *)
+-      if test yes = "$lt_cv_prog_gnu_ld"; then
+-              version_type=linux # correct to gnu/linux during the next big refactor
+-      else
+-              version_type=irix
+-      fi ;;
++    *) version_type=irix ;;
+   esac
+   need_lib_prefix=no
+   need_version=no
+@@ -20726,19 +20933,36 @@ fi
+   dynamic_linker='GNU/Linux ld.so'
+   ;;
+ 
++midnightbsd*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}${versuffix2} ${libname}${release}${shared_ext} $libname${shared_ext}'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  hardcode_into_libs=yes
++  ;;
++
++mirbsd*)
++  version_type=linux
++  sys_lib_search_path_spec="/usr/lib"
++  sys_lib_dlsearch_path_spec="/usr/lib"
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}${versuffix2} ${libname}${shared_ext}${versuffix2}'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  ;;
++
+ netbsd*)
+-  version_type=sunos
++  version_type=linux
+   need_lib_prefix=no
+   need_version=no
+-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+-    dynamic_linker='NetBSD (a.out) ld.so'
+-  else
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+-    soname_spec='$libname$release$shared_ext$major'
+-    dynamic_linker='NetBSD ld.elf_so'
+-  fi
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  dynamic_linker='NetBSD ld.elf_so'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+   hardcode_into_libs=yes
+@@ -20764,7 +20988,7 @@ newsos6)
+   ;;
+ 
+ openbsd* | bitrig*)
+-  version_type=sunos
++  version_type=linux
+   sys_lib_dlsearch_path_spec=/usr/lib
+   need_lib_prefix=no
+   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+@@ -20772,7 +20996,7 @@ openbsd* | bitrig*)
+   else
+     need_version=yes
+   fi
+-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
++  library_names_spec='$libname$release$shared_ext$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+@@ -21450,6 +21674,7 @@ if { { eval echo "\"\$as_me\":${as_linen
+        # Some compilers place space between "-{L,R}" and the path.
+        # Remove the space.
+        if test x-L = "$p" ||
++          test x-l = "$p" ||
+           test x-R = "$p"; then
+        prev=$p
+        continue
+@@ -21604,9 +21829,16 @@ lt_prog_compiler_static_FC=
+       ;;
+ 
+     darwin* | rhapsody*)
+-      # PIC is the default on this platform
++      # PIC is the default on this platform, and static linking of
++      # binaries generally doesn't work
+       # Common symbols not allowed in MH_DYLIB files
+       lt_prog_compiler_pic_FC='-fno-common'
++      lt_prog_compiler_static_FC=''
++      ;;
++
++    *mint*)
++      # FreeMiNT does not support shared libraries at all
++      lt_prog_compiler_pic_FC=
+       ;;
+ 
+     haiku*)
+@@ -21634,6 +21866,13 @@ lt_prog_compiler_static_FC=
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+ 
++    mint*)
++      # Just because we use GCC doesn't mean we suddenly get shared libraries
++      # on systems that don't support them.
++      lt_prog_compiler_can_build_shared_FC=no
++      enable_shared=no
++      ;;
++
+     msdosdjgpp*)
+       # Just because we use GCC doesn't mean we suddenly get shared libraries
+       # on systems that don't support them.
+@@ -21811,6 +22050,15 @@ lt_prog_compiler_static_FC=
+       esac
+       ;;
+ 
++    mirbsd*)
++      case $cc_basename in
++      # pkgsrc f77 is f2c, which uses gcc underneath.
++      f77*)
++      lt_prog_compiler_wl_FC='-Wl,'
++      ;;
++      esac
++      ;;
++
+     newsos6)
+       lt_prog_compiler_pic_FC='-KPIC'
+       lt_prog_compiler_static_FC='-Bstatic'
+@@ -21886,6 +22134,9 @@ lt_prog_compiler_static_FC=
+ 
+ case $host_os in
+   # For platforms that do not support PIC, -DPIC is meaningless:
++  mint*)
++    lt_prog_compiler_pic_FC=
++    ;;
+   *djgpp*)
+     lt_prog_compiler_pic_FC=
+     ;;
+@@ -22449,16 +22700,29 @@ _LT_EOF
+       fi
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+-      wlarc=
++    mirbsd*)
++      if test -f /usr/libexec/ld.so; then
++        hardcode_direct_FC=yes
++        hardcode_shlibpath_var_FC=no
++        hardcode_direct_absolute_FC=yes
++        archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++        archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++        hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
++        export_dynamic_flag_spec_FC='${wl}-E'
+       else
+-      archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+-      archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++        ld_shlibs_FC=no
+       fi
+       ;;
+ 
++    netbsd*)
++      archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
++      hardcode_direct_FC=yes
++      hardcode_shlibpath_var_FC=no
++      output_verbose_link_cmd=func_echo_all
++      ;;
++
+     solaris*)
+       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+       ld_shlibs_FC=no
+@@ -22906,7 +23170,7 @@ fi
+   allow_undefined_flag_FC=$_lt_dar_allow_undefined
+   case $cc_basename in
+      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+-     *) _lt_dar_can_shared=$GCC ;;
++     *) _lt_dar_can_shared=yes ;;
+   esac
+   if test yes = "$_lt_dar_can_shared"; then
+     output_verbose_link_cmd=func_echo_all
+@@ -23090,15 +23354,28 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       esac
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
++    mirbsd*)
++     if test -f /usr/libexec/ld.so; then
++      hardcode_direct_FC=yes
++      hardcode_shlibpath_var_FC=no
++      hardcode_direct_absolute_FC=yes
++      archive_cmds_FC='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++      archive_expsym_cmds_FC='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
++      export_dynamic_flag_spec_FC='${wl}-E'
++      whole_archive_flag_spec_FC="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+       else
+-      archive_cmds_FC='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
++      ld_shlibs_FC=no
+       fi
+-      hardcode_libdir_flag_spec_FC='-R$libdir'
++      ;;
++
++    netbsd*)
++      archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
+       hardcode_direct_FC=yes
+       hardcode_shlibpath_var_FC=no
++      output_verbose_link_cmd=func_echo_all
+       ;;
+ 
+     newsos6)
+@@ -23110,6 +23387,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       ;;
+ 
+     *nto* | *qnx*)
++      archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_FC='-R$libdir'
++      hardcode_direct_FC=yes
++      hardcode_shlibpath_var_FC=no
+       ;;
+ 
+     openbsd* | bitrig*)
+@@ -23782,7 +24064,7 @@ dgux*)
+   shlibpath_var=LD_LIBRARY_PATH
+   ;;
+ 
+-freebsd* | dragonfly*)
++freebsd*)
+   # DragonFly does not have aout.  When/if they implement a new
+   # versioning mechanism, adjust this.
+   if test -x /usr/bin/objformat; then
+@@ -23827,6 +24109,17 @@ freebsd* | dragonfly*)
+   esac
+   ;;
+ 
++dragonfly*)
++  version_type=linux
++  need_version=no
++  need_lib_prefix=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=no
++  hardcode_into_libs=yes
++  ;;
++
+ haiku*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   need_lib_prefix=no
+@@ -23904,12 +24197,7 @@ interix[3-9]*)
+ irix5* | irix6* | nonstopux*)
+   case $host_os in
+     nonstopux*) version_type=nonstopux ;;
+-    *)
+-      if test yes = "$lt_cv_prog_gnu_ld"; then
+-              version_type=linux # correct to gnu/linux during the next big refactor
+-      else
+-              version_type=irix
+-      fi ;;
++    *) version_type=irix ;;
+   esac
+   need_lib_prefix=no
+   need_version=no
+@@ -24027,19 +24315,36 @@ fi
+   dynamic_linker='GNU/Linux ld.so'
+   ;;
+ 
++midnightbsd*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}${versuffix2} ${libname}${release}${shared_ext} $libname${shared_ext}'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  hardcode_into_libs=yes
++  ;;
++
++mirbsd*)
++  version_type=linux
++  sys_lib_search_path_spec="/usr/lib"
++  sys_lib_dlsearch_path_spec="/usr/lib"
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}${versuffix2} ${libname}${shared_ext}${versuffix2}'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  ;;
++
+ netbsd*)
+-  version_type=sunos
++  version_type=linux
+   need_lib_prefix=no
+   need_version=no
+-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+-    dynamic_linker='NetBSD (a.out) ld.so'
+-  else
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+-    soname_spec='$libname$release$shared_ext$major'
+-    dynamic_linker='NetBSD ld.elf_so'
+-  fi
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  dynamic_linker='NetBSD ld.elf_so'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+   hardcode_into_libs=yes
+@@ -24065,7 +24370,7 @@ newsos6)
+   ;;
+ 
+ openbsd* | bitrig*)
+-  version_type=sunos
++  version_type=linux
+   sys_lib_dlsearch_path_spec=/usr/lib
+   need_lib_prefix=no
+   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+@@ -24073,7 +24378,7 @@ openbsd* | bitrig*)
+   else
+     need_version=yes
+   fi
+-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
++  library_names_spec='$libname$release$shared_ext$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+@@ -24624,9 +24929,16 @@ lt_prog_compiler_static_GO=
+       ;;
+ 
+     darwin* | rhapsody*)
+-      # PIC is the default on this platform
++      # PIC is the default on this platform, and static linking of
++      # binaries generally doesn't work
+       # Common symbols not allowed in MH_DYLIB files
+       lt_prog_compiler_pic_GO='-fno-common'
++      lt_prog_compiler_static_GO=''
++      ;;
++
++    *mint*)
++      # FreeMiNT does not support shared libraries at all
++      lt_prog_compiler_pic_GO=
+       ;;
+ 
+     haiku*)
+@@ -24654,6 +24966,13 @@ lt_prog_compiler_static_GO=
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+ 
++    mint*)
++      # Just because we use GCC doesn't mean we suddenly get shared libraries
++      # on systems that don't support them.
++      lt_prog_compiler_can_build_shared_GO=no
++      enable_shared=no
++      ;;
++
+     msdosdjgpp*)
+       # Just because we use GCC doesn't mean we suddenly get shared libraries
+       # on systems that don't support them.
+@@ -24831,6 +25150,15 @@ lt_prog_compiler_static_GO=
+       esac
+       ;;
+ 
++    mirbsd*)
++      case $cc_basename in
++      # pkgsrc f77 is f2c, which uses gcc underneath.
++      f77*)
++      lt_prog_compiler_wl_GO='-Wl,'
++      ;;
++      esac
++      ;;
++
+     newsos6)
+       lt_prog_compiler_pic_GO='-KPIC'
+       lt_prog_compiler_static_GO='-Bstatic'
+@@ -24906,6 +25234,9 @@ lt_prog_compiler_static_GO=
+ 
+ case $host_os in
+   # For platforms that do not support PIC, -DPIC is meaningless:
++  mint*)
++    lt_prog_compiler_pic_GO=
++    ;;
+   *djgpp*)
+     lt_prog_compiler_pic_GO=
+     ;;
+@@ -25469,16 +25800,29 @@ _LT_EOF
+       fi
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds_GO='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+-      wlarc=
++    mirbsd*)
++      if test -f /usr/libexec/ld.so; then
++        hardcode_direct_GO=yes
++        hardcode_shlibpath_var_GO=no
++        hardcode_direct_absolute_GO=yes
++        archive_cmds_GO='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++        archive_expsym_cmds_GO='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++        hardcode_libdir_flag_spec_GO='${wl}-rpath,$libdir'
++        export_dynamic_flag_spec_GO='${wl}-E'
+       else
+-      archive_cmds_GO='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+-      archive_expsym_cmds_GO='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++        ld_shlibs_GO=no
+       fi
+       ;;
+ 
++    netbsd*)
++      archive_cmds_GO='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_GO='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_GO='${wl}-rpath,$libdir'
++      hardcode_direct_GO=yes
++      hardcode_shlibpath_var_GO=no
++      output_verbose_link_cmd=func_echo_all
++      ;;
++
+     solaris*)
+       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+       ld_shlibs_GO=no
+@@ -25938,7 +26282,7 @@ fi
+   allow_undefined_flag_GO=$_lt_dar_allow_undefined
+   case $cc_basename in
+      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+-     *) _lt_dar_can_shared=$GCC ;;
++     *) _lt_dar_can_shared=yes ;;
+   esac
+   if test yes = "$_lt_dar_can_shared"; then
+     output_verbose_link_cmd=func_echo_all
+@@ -26121,15 +26465,28 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       esac
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds_GO='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
++    mirbsd*)
++     if test -f /usr/libexec/ld.so; then
++      hardcode_direct_GO=yes
++      hardcode_shlibpath_var_GO=no
++      hardcode_direct_absolute_GO=yes
++      archive_cmds_GO='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++      archive_expsym_cmds_GO='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_GO='${wl}-rpath,$libdir'
++      export_dynamic_flag_spec_GO='${wl}-E'
++      whole_archive_flag_spec_GO="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+       else
+-      archive_cmds_GO='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
++      ld_shlibs_GO=no
+       fi
+-      hardcode_libdir_flag_spec_GO='-R$libdir'
++      ;;
++
++    netbsd*)
++      archive_cmds_GO='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_GO='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_GO='${wl}-rpath,$libdir'
+       hardcode_direct_GO=yes
+       hardcode_shlibpath_var_GO=no
++      output_verbose_link_cmd=func_echo_all
+       ;;
+ 
+     newsos6)
+@@ -26141,6 +26498,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       ;;
+ 
+     *nto* | *qnx*)
++      archive_cmds_GO='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_GO='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_GO='-R$libdir'
++      hardcode_direct_GO=yes
++      hardcode_shlibpath_var_GO=no
+       ;;
+ 
+     openbsd* | bitrig*)
+@@ -26851,9 +27213,16 @@ lt_prog_compiler_static_GCJ=
+       ;;
+ 
+     darwin* | rhapsody*)
+-      # PIC is the default on this platform
++      # PIC is the default on this platform, and static linking of
++      # binaries generally doesn't work
+       # Common symbols not allowed in MH_DYLIB files
+       lt_prog_compiler_pic_GCJ='-fno-common'
++      lt_prog_compiler_static_GCJ=''
++      ;;
++
++    *mint*)
++      # FreeMiNT does not support shared libraries at all
++      lt_prog_compiler_pic_GCJ=
+       ;;
+ 
+     haiku*)
+@@ -26881,6 +27250,13 @@ lt_prog_compiler_static_GCJ=
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+ 
++    mint*)
++      # Just because we use GCC doesn't mean we suddenly get shared libraries
++      # on systems that don't support them.
++      lt_prog_compiler_can_build_shared_GCJ=no
++      enable_shared=no
++      ;;
++
+     msdosdjgpp*)
+       # Just because we use GCC doesn't mean we suddenly get shared libraries
+       # on systems that don't support them.
+@@ -27058,6 +27434,15 @@ lt_prog_compiler_static_GCJ=
+       esac
+       ;;
+ 
++    mirbsd*)
++      case $cc_basename in
++      # pkgsrc f77 is f2c, which uses gcc underneath.
++      f77*)
++      lt_prog_compiler_wl_GCJ='-Wl,'
++      ;;
++      esac
++      ;;
++
+     newsos6)
+       lt_prog_compiler_pic_GCJ='-KPIC'
+       lt_prog_compiler_static_GCJ='-Bstatic'
+@@ -27133,6 +27518,9 @@ lt_prog_compiler_static_GCJ=
+ 
+ case $host_os in
+   # For platforms that do not support PIC, -DPIC is meaningless:
++  mint*)
++    lt_prog_compiler_pic_GCJ=
++    ;;
+   *djgpp*)
+     lt_prog_compiler_pic_GCJ=
+     ;;
+@@ -27696,16 +28084,29 @@ _LT_EOF
+       fi
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+-      wlarc=
++    mirbsd*)
++      if test -f /usr/libexec/ld.so; then
++        hardcode_direct_GCJ=yes
++        hardcode_shlibpath_var_GCJ=no
++        hardcode_direct_absolute_GCJ=yes
++        archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++        archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++        hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
++        export_dynamic_flag_spec_GCJ='${wl}-E'
+       else
+-      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+-      archive_expsym_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++        ld_shlibs_GCJ=no
+       fi
+       ;;
+ 
++    netbsd*)
++      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
++      hardcode_direct_GCJ=yes
++      hardcode_shlibpath_var_GCJ=no
++      output_verbose_link_cmd=func_echo_all
++      ;;
++
+     solaris*)
+       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+       ld_shlibs_GCJ=no
+@@ -28165,7 +28566,7 @@ fi
+   allow_undefined_flag_GCJ=$_lt_dar_allow_undefined
+   case $cc_basename in
+      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+-     *) _lt_dar_can_shared=$GCC ;;
++     *) _lt_dar_can_shared=yes ;;
+   esac
+   if test yes = "$_lt_dar_can_shared"; then
+     output_verbose_link_cmd=func_echo_all
+@@ -28348,15 +28749,28 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       esac
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
++    mirbsd*)
++     if test -f /usr/libexec/ld.so; then
++      hardcode_direct_GCJ=yes
++      hardcode_shlibpath_var_GCJ=no
++      hardcode_direct_absolute_GCJ=yes
++      archive_cmds_GCJ='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++      archive_expsym_cmds_GCJ='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
++      export_dynamic_flag_spec_GCJ='${wl}-E'
++      whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+       else
+-      archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
++      ld_shlibs_GCJ=no
+       fi
+-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
++      ;;
++
++    netbsd*)
++      archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+       hardcode_direct_GCJ=yes
+       hardcode_shlibpath_var_GCJ=no
++      output_verbose_link_cmd=func_echo_all
+       ;;
+ 
+     newsos6)
+@@ -28368,6 +28782,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       ;;
+ 
+     *nto* | *qnx*)
++      archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec_GCJ='-R$libdir'
++      hardcode_direct_GCJ=yes
++      hardcode_shlibpath_var_GCJ=no
+       ;;
+ 
+     openbsd* | bitrig*)
+@@ -31933,7 +32352,10 @@ func_cc_basename ()
+         *) break;;
+       esac
+     done
+-    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
++    # Return the actual command name, not our pkgsrc wrapper name because several
++    # decisions are made only based on compiler names
++    if test -n "$cc_temp" && new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null`; then :; else new_cc_temp="$cc_temp"; fi
++    func_cc_basename_result=`$ECHO "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+ }
+ 
+ 
Index: pkgsrc/devel/libtool/patches/patch-libltdl_configure
diff -u /dev/null pkgsrc/devel/libtool/patches/patch-libltdl_configure:1.1
--- /dev/null   Mon Mar  6 16:14:08 2017
+++ pkgsrc/devel/libtool/patches/patch-libltdl_configure        Mon Mar  6 16:14:07 2017
@@ -0,0 +1,367 @@
+$NetBSD: patch-libltdl_configure,v 1.1 2017/03/06 16:14:07 jperkin Exp $
+
+Automatically generated using manual-* patches and bootstrap.
+DO NOT MODIFY THIS PATCH MANUALLY!  YOUR CHANGES WILL BE LOST!
+
+--- libltdl/configure.orig     2017-02-02 10:07:29.000000000 +0000
++++ libltdl/configure
+@@ -4788,7 +4788,7 @@ else
+     lt_cv_sys_max_cmd_len=8192;
+     ;;
+ 
+-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
++  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd* | mirbsd*)
+     # 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`
+@@ -4886,6 +4886,9 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
+ 
+ 
+ 
++unset CP
++unset MV
++unset RM
+ : ${CP="cp -f"}
+ : ${MV="mv -f"}
+ : ${RM="rm -f"}
+@@ -5254,12 +5257,19 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu 
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
++midnightbsd*)
++  # might to use match_pattern like MirBSD, but there is no well-defined
++  # naming scheme for libraries yet, as the current one is deprecated, and
++  # the new one in a state of flux especially between mports and MirPorts
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
++mirbsd*)
++  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
++  ;;
++
+ netbsd*)
+-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+-  else
+-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+-  fi
++  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+   ;;
+ 
+ newos6*)
+@@ -5269,7 +5279,7 @@ newos6*)
+   ;;
+ 
+ *nto* | *qnx*)
+-  lt_cv_deplibs_check_method=pass_all
++  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|S\.a)$'
+   ;;
+ 
+ openbsd* | bitrig*)
+@@ -5901,7 +5911,7 @@ fi
+ 
+ case $host_os in
+   darwin*)
+-    lock_old_archive_extraction=yes ;;
++    lock_old_archive_extraction=no ;; # work around bug #14579
+   *)
+     lock_old_archive_extraction=no ;;
+ esac
+@@ -5990,7 +6000,7 @@ osf*)
+   symcode='[BCDEGQRST]'
+   ;;
+ solaris*)
+-  symcode='[BDRT]'
++  symcode='[BCDRT]'
+   ;;
+ sco3.2v5*)
+   symcode='[DT]'
+@@ -6386,7 +6396,10 @@ func_cc_basename ()
+         *) break;;
+       esac
+     done
+-    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
++    # Return the actual command name, not our pkgsrc wrapper name because several
++    # decisions are made only based on compiler names
++    if test -n "$cc_temp" && new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null`; then :; else new_cc_temp="$cc_temp"; fi
++    func_cc_basename_result=`$ECHO "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+ }
+ 
+ # Check whether --enable-libtool-lock was given.
+@@ -8635,9 +8648,16 @@ lt_prog_compiler_static=
+       ;;
+ 
+     darwin* | rhapsody*)
+-      # PIC is the default on this platform
++      # PIC is the default on this platform, and static linking of
++      # binaries generally doesn't work
+       # Common symbols not allowed in MH_DYLIB files
+       lt_prog_compiler_pic='-fno-common'
++      lt_prog_compiler_static=''
++      ;;
++
++    *mint*)
++      # FreeMiNT does not support shared libraries at all
++      lt_prog_compiler_pic=
+       ;;
+ 
+     haiku*)
+@@ -8665,6 +8685,13 @@ lt_prog_compiler_static=
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+ 
++    mint*)
++      # Just because we use GCC doesn't mean we suddenly get shared libraries
++      # on systems that don't support them.
++      lt_prog_compiler_can_build_shared=no
++      enable_shared=no
++      ;;
++
+     msdosdjgpp*)
+       # Just because we use GCC doesn't mean we suddenly get shared libraries
+       # on systems that don't support them.
+@@ -8842,6 +8869,15 @@ lt_prog_compiler_static=
+       esac
+       ;;
+ 
++    mirbsd*)
++      case $cc_basename in
++      # pkgsrc f77 is f2c, which uses gcc underneath.
++      f77*)
++      lt_prog_compiler_wl='-Wl,'
++      ;;
++      esac
++      ;;
++
+     newsos6)
+       lt_prog_compiler_pic='-KPIC'
+       lt_prog_compiler_static='-Bstatic'
+@@ -8917,6 +8953,9 @@ lt_prog_compiler_static=
+ 
+ case $host_os in
+   # For platforms that do not support PIC, -DPIC is meaningless:
++  mint*)
++    lt_prog_compiler_pic=
++    ;;
+   *djgpp*)
+     lt_prog_compiler_pic=
+     ;;
+@@ -9495,16 +9534,29 @@ _LT_EOF
+       fi
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+-      wlarc=
++    mirbsd*)
++      if test -f /usr/libexec/ld.so; then
++        hardcode_direct=yes
++        hardcode_shlibpath_var=no
++        hardcode_direct_absolute=yes
++        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++        archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++        export_dynamic_flag_spec='${wl}-E'
+       else
+-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+-      archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
++        ld_shlibs=no
+       fi
+       ;;
+ 
++    netbsd*)
++      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
++      output_verbose_link_cmd=func_echo_all
++      ;;
++
+     solaris*)
+       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+       ld_shlibs=no
+@@ -9964,7 +10016,7 @@ fi
+   allow_undefined_flag=$_lt_dar_allow_undefined
+   case $cc_basename in
+      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+-     *) _lt_dar_can_shared=$GCC ;;
++     *) _lt_dar_can_shared=yes ;;
+   esac
+   if test yes = "$_lt_dar_can_shared"; then
+     output_verbose_link_cmd=func_echo_all
+@@ -10186,15 +10238,28 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       esac
+       ;;
+ 
+-    netbsd*)
+-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
++    mirbsd*)
++     if test -f /usr/libexec/ld.so; then
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
++      hardcode_direct_absolute=yes
++      archive_cmds='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++      archive_expsym_cmds='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++      export_dynamic_flag_spec='${wl}-E'
++      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+       else
+-      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
++      ld_shlibs=no
+       fi
+-      hardcode_libdir_flag_spec='-R$libdir'
++      ;;
++
++    netbsd*)
++      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+       hardcode_direct=yes
+       hardcode_shlibpath_var=no
++      output_verbose_link_cmd=func_echo_all
+       ;;
+ 
+     newsos6)
+@@ -10206,6 +10271,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+       ;;
+ 
+     *nto* | *qnx*)
++      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      hardcode_libdir_flag_spec='-R$libdir'
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
+       ;;
+ 
+     openbsd* | bitrig*)
+@@ -11050,7 +11120,7 @@ dgux*)
+   shlibpath_var=LD_LIBRARY_PATH
+   ;;
+ 
+-freebsd* | dragonfly*)
++freebsd*)
+   # DragonFly does not have aout.  When/if they implement a new
+   # versioning mechanism, adjust this.
+   if test -x /usr/bin/objformat; then
+@@ -11095,6 +11165,17 @@ freebsd* | dragonfly*)
+   esac
+   ;;
+ 
++dragonfly*)
++  version_type=linux
++  need_version=no
++  need_lib_prefix=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=no
++  hardcode_into_libs=yes
++  ;;
++
+ haiku*)
+   version_type=linux # correct to gnu/linux during the next big refactor
+   need_lib_prefix=no
+@@ -11172,12 +11253,7 @@ interix[3-9]*)
+ irix5* | irix6* | nonstopux*)
+   case $host_os in
+     nonstopux*) version_type=nonstopux ;;
+-    *)
+-      if test yes = "$lt_cv_prog_gnu_ld"; then
+-              version_type=linux # correct to gnu/linux during the next big refactor
+-      else
+-              version_type=irix
+-      fi ;;
++    *) version_type=irix ;;
+   esac
+   need_lib_prefix=no
+   need_version=no
+@@ -11301,19 +11377,36 @@ fi
+   dynamic_linker='GNU/Linux ld.so'
+   ;;
+ 
++midnightbsd*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}${versuffix2} ${libname}${release}${shared_ext} $libname${shared_ext}'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  hardcode_into_libs=yes
++  ;;
++
++mirbsd*)
++  version_type=linux
++  sys_lib_search_path_spec="/usr/lib"
++  sys_lib_dlsearch_path_spec="/usr/lib"
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}${versuffix2} ${libname}${shared_ext}${versuffix2}'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=yes
++  ;;
++
+ netbsd*)
+-  version_type=sunos
++  version_type=linux
+   need_lib_prefix=no
+   need_version=no
+-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+-    dynamic_linker='NetBSD (a.out) ld.so'
+-  else
+-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+-    soname_spec='$libname$release$shared_ext$major'
+-    dynamic_linker='NetBSD ld.elf_so'
+-  fi
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  dynamic_linker='NetBSD ld.elf_so'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+   hardcode_into_libs=yes
+@@ -11339,7 +11432,7 @@ newsos6)
+   ;;
+ 
+ openbsd* | bitrig*)
+-  version_type=sunos
++  version_type=linux
+   sys_lib_dlsearch_path_spec=/usr/lib
+   need_lib_prefix=no
+   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+@@ -11347,7 +11440,7 @@ openbsd* | bitrig*)
+   else
+     need_version=yes
+   fi
+-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
++  library_names_spec='$libname$release$shared_ext$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+@@ -12923,6 +13016,9 @@ else
+     # at 6.2 and later dlopen does load deplibs.
+     lt_cv_sys_dlopen_deplibs=yes
+     ;;
++  mirbsd*)
++    lt_cv_sys_dlopen_deplibs=yes
++    ;;
+   netbsd*)
+     lt_cv_sys_dlopen_deplibs=yes
+     ;;
+@@ -15440,7 +15536,10 @@ func_cc_basename ()
+         *) break;;
+       esac
+     done
+-    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
++    # Return the actual command name, not our pkgsrc wrapper name because several
++    # decisions are made only based on compiler names
++    if test -n "$cc_temp" && new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null`; then :; else new_cc_temp="$cc_temp"; fi
++    func_cc_basename_result=`$ECHO "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+ }
+ 
+ 



Home | Main Index | Thread Index | Old Index