]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/aclocal.m4
ncurses 5.9 - patch 20140607
[ncurses.git] / Ada95 / aclocal.m4
index a289df675a5750ccd8bac58b671e51c01e1bc08e..461ec3ead3af64261c602c44258f47c78a0ebad3 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 2010-2012,2013 Free Software Foundation, Inc.              *
+dnl Copyright (c) 2010-2013,2014 Free Software Foundation, Inc.              *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
 dnl copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey
 dnl
-dnl $Id: aclocal.m4,v 1.67 2013/06/15 21:13:50 tom Exp $
+dnl $Id: aclocal.m4,v 1.86 2014/06/01 15:36:34 tom Exp $
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -65,7 +65,7 @@ define([CF_ACVERSION_COMPARE],
 [ifelse([$8], , ,[$8])],
 [ifelse([$9], , ,[$9])])])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_ADA_INCLUDE_DIRS version: 6 updated: 2010/02/26 19:52:07
+dnl CF_ADA_INCLUDE_DIRS version: 8 updated: 2013/10/14 04:24:07
 dnl -------------------
 dnl Construct the list of include-options for the C programs in the Ada95
 dnl binding.
@@ -79,7 +79,7 @@ if test "$GCC" != yes; then
        ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
 elif test "$includedir" != "/usr/include"; then
        if test "$includedir" = '${prefix}/include' ; then
-               if test $prefix != /usr ; then
+               if test x$prefix != x/usr ; then
                        ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
                fi
        else
@@ -294,7 +294,7 @@ dnl $1 = libraries to add, with the "-l", etc.
 dnl $2 = variable to update (default $LIBS)
 AC_DEFUN([CF_ADD_LIBS],[ifelse($2,,LIBS,[$2])="$1 [$]ifelse($2,,LIBS,[$2])"])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_ADD_SUBDIR_PATH version: 3 updated: 2010/07/03 20:58:12
+dnl CF_ADD_SUBDIR_PATH version: 4 updated: 2013/10/08 17:47:05
 dnl ------------------
 dnl Append to a search-list for a nonstandard header/lib-file
 dnl    $1 = the variable to return as result
@@ -304,9 +304,9 @@ dnl $4 = the directory under which we will test for subdirectories
 dnl $5 = a directory that we do not want $4 to match
 AC_DEFUN([CF_ADD_SUBDIR_PATH],
 [
-test "$4" != "$5" && \
+test "x$4" != "x$5" && \
 test -d "$4" && \
-ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) {
+ifelse([$5],NONE,,[(test -z "$5" || test x$5 = xNONE || test "x$4" != "x$5") &&]) {
        test -n "$verbose" && echo "    ... testing for $3-directories under $4"
        test -d $4/$3 &&          $1="[$]$1 $4/$3"
        test -d $4/$3/$2 &&       $1="[$]$1 $4/$3/$2"
@@ -516,7 +516,7 @@ case "$CC" in #(vi
 esac
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CFG_DEFAULTS version: 9 updated: 2013/04/13 18:58:32
+dnl CF_CFG_DEFAULTS version: 10 updated: 2013/09/07 13:54:05
 dnl ---------------
 dnl Determine the default configuration into which we'll install ncurses.  This
 dnl can be overridden by the user's command-line options.  There's two items to
@@ -534,7 +534,7 @@ AC_MSG_CHECKING(for prefix)
 if test "x$prefix" = "xNONE" ; then
        case "$cf_cv_system_name" in
                # non-vendor systems don't have a conflict
-       openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu|mingw*)
+       openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
                prefix=/usr
                ;;
        *)      prefix=$ac_default_prefix
@@ -605,7 +605,7 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39
+dnl CF_CLANG_COMPILER version: 2 updated: 2013/11/19 19:23:35
 dnl -----------------
 dnl Check if the given compiler is really clang.  clang's C driver defines
 dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does
@@ -616,7 +616,7 @@ dnl ensure that it is not mistaken for gcc/g++.  It is normally invoked from
 dnl the wrappers for gcc and g++ warnings.
 dnl
 dnl $1 = GCC (default) or GXX
-dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
+dnl $2 = CLANG_COMPILER (default)
 dnl $3 = CFLAGS (default) or CXXFLAGS
 AC_DEFUN([CF_CLANG_COMPILER],[
 ifelse([$2],,CLANG_COMPILER,[$2])=no
@@ -709,6 +709,17 @@ AC_SUBST(SHOW_CC)
 AC_SUBST(ECHO_CC)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_DISABLE_GNAT_PROJECTS version: 1 updated: 2014/06/01 11:34:00
+dnl ------------------------
+AC_DEFUN([CF_DISABLE_GNAT_PROJECTS],[
+AC_MSG_CHECKING(if we want to use GNAT projects)
+CF_ARG_DISABLE(gnat-projects,
+       [  --disable-gnat-projects test: disable GNAT projects even if usable],
+       [enable_gnat_projects=no],
+       [enable_gnat_projects=yes])
+AC_MSG_RESULT($enable_gnat_projects)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_ENABLE_PC_FILES version: 9 updated: 2012/08/04 13:59:54
 dnl ------------------
 dnl This is the "--enable-pc-files" option, which is available if there is a
@@ -1056,7 +1067,7 @@ if test "$GCC" = yes ; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GCC_WARNINGS version: 29 updated: 2012/06/16 14:55:39
+dnl CF_GCC_WARNINGS version: 31 updated: 2013/11/19 19:23:35
 dnl ---------------
 dnl Check if the compiler supports useful warning options.  There's a few that
 dnl we don't use, simply because they're too noisy:
@@ -1128,10 +1139,14 @@ then
        EXTRA_CFLAGS=
        cf_warn_CONST=""
        test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
+       cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
+       test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
        for cf_opt in W Wall \
                Wbad-function-cast \
                Wcast-align \
                Wcast-qual \
+               Wdeclaration-after-statement \
+               Wextra \
                Winline \
                Wmissing-declarations \
                Wmissing-prototypes \
@@ -1139,7 +1154,7 @@ then
                Wpointer-arith \
                Wshadow \
                Wstrict-prototypes \
-               Wundef $cf_warn_CONST $1
+               Wundef $cf_gcc_warnings $cf_warn_CONST $1
        do
                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
                if AC_TRY_EVAL(ac_compile); then
@@ -1203,53 +1218,26 @@ AC_SUBST(cf_compile_generics)
 AC_SUBST(cf_generic_objects)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18
-dnl --------------------
-dnl Check if the gnat pragma "Unreferenced" works.
-AC_DEFUN([CF_GNAT_PRAGMA_UNREF],[
-AC_CACHE_CHECK(if GNAT pragma Unreferenced works,cf_cv_pragma_unreferenced,[
-CF_GNAT_TRY_LINK([procedure conftest;],
-[with Text_IO;
-with GNAT.OS_Lib;
-procedure conftest is
-   test : Integer;
-   pragma Unreferenced (test);
-begin
-   test := 1;
-   Text_IO.Put ("Hello World");
-   Text_IO.New_Line;
-   GNAT.OS_Lib.OS_Exit (0);
-end conftest;],
-       [cf_cv_pragma_unreferenced=yes],
-       [cf_cv_pragma_unreferenced=no])])
-
-# if the pragma is supported, use it (needed in the Trace code).
-if test $cf_cv_pragma_unreferenced = yes ; then
-       PRAGMA_UNREF=TRUE
-else
-       PRAGMA_UNREF=FALSE
-fi
-AC_SUBST(PRAGMA_UNREF)
-])dnl
-dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_PROJECTS version: 2 updated: 2011/03/23 20:24:41
+dnl CF_GNAT_PROJECTS version: 7 updated: 2014/06/01 10:46:34
 dnl ----------------
 dnl GNAT projects are configured with ".gpr" project files.
 dnl GNAT libraries are a further development, using the project feature.
 AC_DEFUN([CF_GNAT_PROJECTS],
 [
 AC_REQUIRE([CF_GNAT_VERSION])
+AC_REQUIRE([CF_DISABLE_GNAT_PROJECTS])
 
 cf_gnat_libraries=no
 cf_gnat_projects=no
 
+if test "$enable_gnat_projects" != no ; then
 AC_MSG_CHECKING(if GNAT supports project files)
 case $cf_gnat_version in #(vi
 3.[[0-9]]*) #(vi
        ;;
 *)
        case $cf_cv_system_name in #(vi
-       cygwin*) #(vi
+       cygwin*|msys*) #(vi
                ;;
        *)
                mkdir conftest.src conftest.bin conftest.lib
@@ -1266,14 +1254,6 @@ project Library is
   for Library_Dir use External("BUILD_DIR");
   Source_Dir := External ("SOURCE_DIR");
   for Source_Dirs use (Source_Dir);
-  package Compiler is
-     for Default_Switches ("Ada") use
-       ("-g",
-        "-O2",
-        "-gnatafno",
-        "-gnatVa",   -- All validity checks
-        "-gnatwa");  -- Activate all optional errors
-  end Compiler;
 end Library;
 CF_EOF
                cat >>confpackage.ads <<CF_EOF
@@ -1311,6 +1291,7 @@ CF_EOF
        ;;
 esac
 AC_MSG_RESULT($cf_gnat_projects)
+fi # enable_gnat_projects
 
 if test $cf_gnat_projects = yes
 then
@@ -1549,7 +1530,7 @@ AC_DEFUN([CF_HELP_MESSAGE],
 [AC_DIVERT_HELP([$1])dnl
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_INCLUDE_DIRS version: 7 updated: 2012/11/10 19:15:05
+dnl CF_INCLUDE_DIRS version: 8 updated: 2013/10/12 16:45:09
 dnl ---------------
 dnl Construct the list of include-options according to whether we're building
 dnl in the source directory or using '--srcdir=DIR' option.  If we're building
@@ -1561,7 +1542,7 @@ if test "$GCC" != yes; then
        CPPFLAGS="-I\${includedir} $CPPFLAGS"
 elif test "$includedir" != "/usr/include"; then
        if test "$includedir" = '${prefix}/include' ; then
-               if test $prefix != /usr ; then
+               if test x$prefix != x/usr ; then
                        CPPFLAGS="-I\${includedir} $CPPFLAGS"
                fi
        else
@@ -1575,7 +1556,7 @@ CPPFLAGS="-I. -I../include $CPPFLAGS"
 AC_SUBST(CPPFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05
+dnl CF_INTEL_COMPILER version: 6 updated: 2014/03/17 13:13:07
 dnl -----------------
 dnl Check if the given compiler is really the Intel compiler for Linux.  It
 dnl tries to imitate gcc, but does not return an error when it finds a mismatch
@@ -1604,7 +1585,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then
 make an error
 #endif
 ],[ifelse([$2],,INTEL_COMPILER,[$2])=yes
-cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+cf_save_CFLAGS="$cf_save_CFLAGS -we147"
 ],[])
                ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
                AC_MSG_RESULT($ifelse([$2],,INTEL_COMPILER,[$2]))
@@ -1752,7 +1733,7 @@ ifelse($1,,,[$1=$LIB_PREFIX])
        AC_SUBST(LIB_PREFIX)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LIB_SUFFIX version: 19 updated: 2013/06/15 11:58:48
+dnl CF_LIB_SUFFIX version: 22 updated: 2013/09/07 13:54:05
 dnl -------------
 dnl Compute the library file-suffix from the given model name
 dnl $1 = model name
@@ -1761,30 +1742,26 @@ dnl $3 = dependency variable to set (actual filename)
 dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
 AC_DEFUN([CF_LIB_SUFFIX],
 [
-       case $1 in #(vi
-       libtool) #(vi
+       case X$1 in #(vi
+       Xlibtool) #(vi
                $2='.la'
                $3=[$]$2
                ;;
-       normal) #(vi
-               $2='.a'
-               $3=[$]$2
-               ;;
-       debug) #(vi
+       Xdebug) #(vi
                $2='_g.a'
                $3=[$]$2
                ;;
-       profile) #(vi
+       Xprofile) #(vi
                $2='_p.a'
                $3=[$]$2
                ;;
-       shared) #(vi
+       Xshared) #(vi
                case $cf_cv_system_name in
                aix[[5-7]]*) #(vi
                        $2='.a'
                        $3=[$]$2
                        ;;
-               cygwin*|mingw*) #(vi
+               cygwin*|msys*|mingw*) #(vi
                        $2='.dll'
                        $3='.dll.a'
                        ;;
@@ -1804,10 +1781,16 @@ AC_DEFUN([CF_LIB_SUFFIX],
                                ;;
                        esac
                        ;;
-               *)      $2='.so'
+               *) #(vi
+                       $2='.so'
                        $3=[$]$2
                        ;;
                esac
+               ;;
+       *)
+               $2='.a'
+               $3=[$]$2
+               ;;
        esac
        test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
        test -n "$LIB_SUFFIX" && $3="${LIB_SUFFIX}[$]{$3}"
@@ -1894,7 +1877,7 @@ fi
 
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46
+dnl CF_MAKEFLAGS version: 15 updated: 2014/05/10 16:43:23
 dnl ------------
 dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make'
 dnl options to lower-levels.  It's very useful for "make -n" -- if we have it.
@@ -1913,7 +1896,7 @@ all :
 CF_EOF
                cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[[   ]]*$,,'`
                case "$cf_result" in
-               .*k)
+               .*k|.*kw)
                        cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
                        case "$cf_result" in
                        .*CC=*) cf_cv_makeflags=
@@ -1971,7 +1954,7 @@ AC_SUBST(MAKE_UPPER_TAGS)
 AC_SUBST(MAKE_LOWER_TAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_MIXEDCASE_FILENAMES version: 4 updated: 2012/10/02 20:55:03
+dnl CF_MIXEDCASE_FILENAMES version: 6 updated: 2013/10/08 17:47:05
 dnl ----------------------
 dnl Check if the file-system supports mixed-case filenames.  If we're able to
 dnl create a lowercase name and see it as uppercase, it doesn't support that.
@@ -1980,7 +1963,7 @@ AC_DEFUN([CF_MIXEDCASE_FILENAMES],
 AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
 if test "$cross_compiling" = yes ; then
        case $target_alias in #(vi
-       *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
+       *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
                cf_cv_mixedcase=no
                ;;
        *)
@@ -2460,7 +2443,7 @@ EOF
 test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_OBJ_SUBDIR version: 4 updated: 2002/02/23 20:38:31
+dnl CF_OBJ_SUBDIR version: 6 updated: 2013/09/07 14:06:10
 dnl -------------
 dnl Compute the object-directory name from the given model name
 AC_DEFUN([CF_OBJ_SUBDIR],
@@ -2472,7 +2455,7 @@ AC_DEFUN([CF_OBJ_SUBDIR],
        profile) $2='obj_p' ;;
        shared)
                case $cf_cv_system_name in #(vi
-               cygwin) #(vi
+               cygwin|msys) #(vi
                        $2='objects' ;;
                *)
                        $2='obj_s' ;;
@@ -2834,18 +2817,19 @@ define([CF_REMOVE_LIB],
 $1=`echo "$2" | sed -e 's/-l$3[[       ]]//g' -e 's/-l$3[$]//'`
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_SHARED_OPTS version: 73 updated: 2013/06/15 12:17:19
+dnl CF_SHARED_OPTS version: 84 updated: 2013/11/03 06:26:10
 dnl --------------
 dnl --------------
 dnl Attempt to determine the appropriate CC/LD options for creating a shared
 dnl library.
 dnl
-dnl Note: ${LOCAL_LDFLAGS} is used to link executables that will run within the
-dnl build-tree, i.e., by making use of the libraries that are compiled in ../lib
-dnl We avoid compiling-in a ../lib path for the shared library since that can
-dnl lead to unexpected results at runtime.
-dnl ${LOCAL_LDFLAGS2} has the same intention but assumes that the shared libraries
-dnl are compiled in ../../lib
+dnl Notes:
+dnl a) ${LOCAL_LDFLAGS} is used to link executables that will run within
+dnl the build-tree, i.e., by making use of the libraries that are compiled in
+dnl $rel_builddir/lib We avoid compiling-in a $rel_builddir/lib path for the
+dnl shared library since that can lead to unexpected results at runtime.
+dnl b) ${LOCAL_LDFLAGS2} has the same intention but assumes that the shared
+dnl libraries are compiled in ../../lib
 dnl
 dnl The variable 'cf_cv_do_symlinks' is used to control whether we configure
 dnl to install symbolic links to the rel/abi versions of shared libraries.
@@ -2861,10 +2845,18 @@ dnl Some loaders leave 'so_locations' lying around.  It's nice to clean up.
 AC_DEFUN([CF_SHARED_OPTS],
 [
        AC_REQUIRE([CF_LD_RPATH_OPT])
+       RM_SHARED_OPTS=
        LOCAL_LDFLAGS=
        LOCAL_LDFLAGS2=
        LD_SHARED_OPTS=
        INSTALL_LIB="-m 644"
+       : ${rel_builddir:=.}
+
+       shlibdir=$libdir
+       AC_SUBST(shlibdir)
+
+       MAKE_DLLS="#"
+       AC_SUBST(MAKE_DLLS)
 
        cf_cv_do_symlinks=no
        cf_ld_rpath_opt=
@@ -2924,9 +2916,12 @@ AC_DEFUN([CF_SHARED_OPTS],
                ;;
        cygwin*) #(vi
                CC_SHARED_OPTS=
-               MK_SHARED_LIB='sh ../mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+               MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+               RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
                cf_cv_shlib_version=cygdll
                cf_cv_shlib_version_infix=cygdll
+               shlibdir=$bindir
+               MAKE_DLLS=
                cat >mk_shared_lib.sh <<-CF_EOF
                #!/bin/sh
                SHARED_LIB=\[$]1
@@ -2937,7 +2932,29 @@ AC_DEFUN([CF_SHARED_OPTS],
                ** SHARED_LIB \[$]SHARED_LIB
                ** IMPORT_LIB \[$]IMPORT_LIB
 EOF
-               exec \[$]* -shared -Wl,--out-implib=../lib/\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\[$]{SHARED_LIB}
+               exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+CF_EOF
+               chmod +x mk_shared_lib.sh
+               ;;
+       msys*) #(vi
+               CC_SHARED_OPTS=
+               MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+               RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+               cf_cv_shlib_version=msysdll
+               cf_cv_shlib_version_infix=msysdll
+               shlibdir=$bindir
+               MAKE_DLLS=
+               cat >mk_shared_lib.sh <<-CF_EOF
+               #!/bin/sh
+               SHARED_LIB=\[$]1
+               IMPORT_LIB=\`echo "\[$]1" | sed -e 's/msys-/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
+               shift
+               cat <<-EOF
+               Linking shared library
+               ** SHARED_LIB \[$]SHARED_LIB
+               ** IMPORT_LIB \[$]IMPORT_LIB
+EOF
+               exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
 CF_EOF
                chmod +x mk_shared_lib.sh
                ;;
@@ -3014,10 +3031,16 @@ CF_EOF
        mingw*) #(vi
                cf_cv_shlib_version=mingw
                cf_cv_shlib_version_infix=mingw
+               shlibdir=$bindir
+               MAKE_DLLS=
+               if test "$DFT_LWR_MODEL" = "shared" ; then
+                       LOCAL_LDFLAGS="-Wl,--enable-auto-import"
+                       LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+                       EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
+               fi
                CC_SHARED_OPTS=
-               MK_SHARED_LIB='sh ../mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
-               #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
-               #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
+               MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+               RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
                cat >mk_shared_lib.sh <<-CF_EOF
                #!/bin/sh
                SHARED_LIB=\[$]1
@@ -3028,7 +3051,7 @@ CF_EOF
                ** SHARED_LIB \[$]SHARED_LIB
                ** IMPORT_LIB \[$]IMPORT_LIB
 EOF
-               exec \[$]* -shared -Wl,--out-implib=../lib/\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\[$]{SHARED_LIB}
+               exec \[$]* -shared -Wl,--enable-auto-import,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
 CF_EOF
                chmod +x mk_shared_lib.sh
                ;;
@@ -3075,7 +3098,7 @@ CF_EOF
                        CF_SHARED_SONAME
                        MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]'
                else
-                       MK_SHARED_LIB='${LD} -shared -Bshareable -o $[@]'
+                       MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $[@]'
                fi
                ;;
        osf*|mls+*) #(vi
@@ -3200,6 +3223,8 @@ EOF
        test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
        test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
 
+       test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
+
        CF_VERBOSE(CC_SHARED_OPTS: $CC_SHARED_OPTS)
        CF_VERBOSE(MK_SHARED_LIB:  $MK_SHARED_LIB)
 
@@ -3207,11 +3232,15 @@ EOF
        AC_SUBST(LD_RPATH_OPT)
        AC_SUBST(LD_SHARED_OPTS)
        AC_SUBST(MK_SHARED_LIB)
+       AC_SUBST(RM_SHARED_OPTS)
+
        AC_SUBST(LINK_PROGS)
        AC_SUBST(LINK_TESTS)
+
        AC_SUBST(EXTRA_LDFLAGS)
        AC_SUBST(LOCAL_LDFLAGS)
        AC_SUBST(LOCAL_LDFLAGS2)
+
        AC_SUBST(INSTALL_LIB)
        AC_SUBST(RPATH_LIST)
 ])dnl
@@ -3304,12 +3333,12 @@ ncursesw/term.h)
 esac
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_TOP_BUILDDIR version: 1 updated: 2006/10/15 16:33:23
+dnl CF_TOP_BUILDDIR version: 2 updated: 2013/07/27 17:38:32
 dnl ---------------
 dnl Define a top_builddir symbol, for applications that need an absolute path.
 AC_DEFUN([CF_TOP_BUILDDIR],
 [
-top_builddir=`pwd`
+top_builddir=ifelse($1,,`pwd`,$1)
 AC_SUBST(top_builddir)
 ])dnl
 dnl ---------------------------------------------------------------------------
@@ -3462,14 +3491,14 @@ AC_SUBST(ADA_OBJECTS)
 AC_MSG_RESULT($ADA_OBJECTS)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_ADA_SHAREDLIB version: 2 updated: 2010/06/26 17:35:58
+dnl CF_WITH_ADA_SHAREDLIB version: 4 updated: 2014/05/31 21:08:37
 dnl ---------------------
 dnl Command-line option to specify if an Ada95 shared-library should be built,
 dnl and optionally what its soname should be.
 AC_DEFUN([CF_WITH_ADA_SHAREDLIB],[
 AC_MSG_CHECKING(if an Ada95 shared-library should be built)
 AC_ARG_WITH(ada-sharedlib,
-       [  --with-ada-sharedlib=XX build Ada95 shared-library],
+       [  --with-ada-sharedlib=soname build shared-library (requires GNAT projects)],
        [with_ada_sharedlib=$withval],
        [with_ada_sharedlib=no])
 AC_MSG_RESULT($with_ada_sharedlib)
@@ -3666,7 +3695,7 @@ AC_ARG_WITH(system-type,
 ])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 43 updated: 2013/02/10 10:41:05
+dnl CF_XOPEN_SOURCE version: 46 updated: 2014/02/09 19:30:15
 dnl ---------------
 dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
 dnl or adapt to the vendor's definitions to get equivalent functionality,
@@ -3686,7 +3715,7 @@ case $host_os in #(vi
 aix[[4-7]]*) #(vi
        cf_xopen_source="-D_ALL_SOURCE"
        ;;
-cygwin) #(vi
+cygwin|msys) #(vi
        cf_XOPEN_SOURCE=600
        ;;
 darwin[[0-8]].*) #(vi
@@ -3744,6 +3773,7 @@ sco*) #(vi
        ;;
 solaris2.*) #(vi
        cf_xopen_source="-D__EXTENSIONS__"
+       cf_cv_xopen_source=broken
        ;;
 *)
        CF_TRY_XOPEN_SOURCE