X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=35423c64802d90682b3719cd31039bda9a6c0f61;hp=4155ec05cc90a0eedc6fa11561de7bb34f76f8ad;hb=6b96eb711cbf58da43002ff14b66d8a52c19a731;hpb=4204d0154d2ee2d272807a0023d38ed9035ea555;ds=sidebyside diff --git a/aclocal.m4 b/aclocal.m4 index 4155ec05..35423c64 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. * +dnl Copyright (c) 1998-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 1995-on dnl -dnl $Id: aclocal.m4,v 1.661 2013/03/24 21:10:41 tom Exp $ +dnl $Id: aclocal.m4,v 1.700 2014/06/21 21:50:00 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -62,7 +62,7 @@ AC_DEFUN([AM_LANGINFO_CODESET], fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56 +dnl CF_ACVERSION_CHECK version: 5 updated: 2014/06/04 19:11:49 dnl ------------------ dnl Conditionally generate script according to whether we're using a given autoconf. dnl @@ -71,7 +71,7 @@ dnl $2 = code to use if AC_ACVERSION is at least as high as $1. dnl $3 = code to use if AC_ACVERSION is older than $1. define([CF_ACVERSION_CHECK], [ -ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl +ifdef([AC_ACVERSION], ,[ifdef([AC_AUTOCONF_VERSION],[m4_copy([AC_AUTOCONF_VERSION],[AC_ACVERSION])],[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])])dnl ifdef([m4_version_compare], [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], [CF_ACVERSION_COMPARE( @@ -88,7 +88,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. @@ -102,7 +102,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 @@ -317,7 +317,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 @@ -327,9 +327,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" @@ -492,7 +492,7 @@ else AC_MSG_RESULT(no) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_BOOL_SIZE version: 12 updated: 2006/12/16 12:33:30 +dnl CF_BOOL_SIZE version: 13 updated: 2013/04/13 18:03:21 dnl ------------ dnl Test for the size of 'bool' in the configured C++ compiler (e.g., a type). dnl Don't bother looking for bool.h, since it's been deprecated. @@ -526,7 +526,7 @@ AC_CACHE_VAL(cf_cv_type_of_bool,[ #endif -main() +int main() { FILE *fp = fopen("cf_test.out", "w"); if (fp != 0) { @@ -678,7 +678,7 @@ case "$CC" in #(vi esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CFG_DEFAULTS version: 8 updated: 2011/06/04 20:09:13 +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 @@ -696,7 +696,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) + openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*) prefix=/usr ;; *) prefix=$ac_default_prefix @@ -912,6 +912,27 @@ if test "$cf_cv_check_gpm_wgetch" != yes ; then fi ])])dnl dnl --------------------------------------------------------------------------- +dnl CF_CHECK_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09 +dnl ------------------------ +dnl Show the version of libtool +dnl +dnl Save the version in a cache variable - this is not entirely a good thing, +dnl but the version string from libtool is very ugly, and for bug reports it +dnl might be useful to have the original string. +AC_DEFUN([CF_CHECK_LIBTOOL_VERSION],[ +if test -n "$LIBTOOL" && test "$LIBTOOL" != none +then + AC_MSG_CHECKING(version of $LIBTOOL) + CF_LIBTOOL_VERSION + AC_MSG_RESULT($cf_cv_libtool_version) + if test -z "$cf_cv_libtool_version" ; then + AC_MSG_ERROR(This is not GNU libtool) + fi +else + AC_MSG_ERROR(GNU libtool has not been found) +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_CHECK_WCHAR_H version: 1 updated: 2011/10/29 15:01:05 dnl ---------------- dnl Check if wchar.h can be used, i.e., without defining _XOPEN_SOURCE_EXTENDED @@ -933,7 +954,7 @@ 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 @@ -944,7 +965,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 @@ -1001,7 +1022,7 @@ fi test "$cf_cv_cpp_param_init" = yes && AC_DEFINE(CPP_HAS_PARAM_INIT,1,[Define to 1 if C++ has parameter initialization]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CPP_STATIC_CAST version: 2 updated: 2012/10/06 17:56:13 +dnl CF_CPP_STATIC_CAST version: 3 updated: 2013/04/13 18:03:21 dnl ------------------ dnl Check if the C++ compiler accepts static_cast in generics. This appears to dnl not be supported in g++ before 3.0 @@ -1023,7 +1044,7 @@ public: int begin_x = 0) { } - + NCursesPanel(); ~NCursesPanel(); }; @@ -1203,6 +1224,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_DISABLE_LEAKS version: 7 updated: 2012/10/02 20:55:03 dnl ---------------- dnl Combine no-leak checks with the libraries or tools that are used for the @@ -1512,6 +1544,40 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5]) fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_FIND_SUB_INCDIR version: 1 updated: 2014/04/12 16:47:01 +dnl ------------------ +dnl Find an include-directory with the given leaf-name. This is useful for +dnl example with FreeBSD ports, which use this convention to distinguish +dnl different versions of the same port. +AC_DEFUN([CF_FIND_SUB_INCDIR],[ + CF_SUBDIR_PATH(cf_search,$1,include) + for cf_item in $cf_search + do + case $cf_item in #(vi + */$1) + CF_ADD_INCDIR($cf_item) + ;; + esac + done +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_FIND_SUB_LIBDIR version: 1 updated: 2014/04/12 16:47:01 +dnl ------------------ +dnl Find a library-directory with the given leaf-name. This is useful for +dnl example with FreeBSD ports, which use this convention to distinguish +dnl different versions of the same port. +AC_DEFUN([CF_FIND_SUB_LIBDIR],[ + CF_SUBDIR_PATH(cf_search,$1,lib) + for cf_item in $cf_search + do + case $cf_item in #(vi + */$1) + CF_ADD_LIBDIR($cf_item) + ;; + esac + done +])dnl +dnl --------------------------------------------------------------------------- dnl CF_FIXUP_ADAFLAGS version: 1 updated: 2012/03/31 18:48:10 dnl ----------------- dnl make ADAFLAGS consistent with CFLAGS @@ -1531,6 +1597,15 @@ AC_DEFUN([CF_FIXUP_ADAFLAGS],[ AC_MSG_RESULT($ADAFLAGS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_FORGET_TOOL version: 1 updated: 2013/04/06 18:03:09 +dnl -------------- +dnl Forget that we saw the given tool. +AC_DEFUN([CF_FORGET_TOOL],[ +unset ac_cv_prog_ac_ct_$1 +unset ac_ct_$1 +unset $1 +])dnl +dnl --------------------------------------------------------------------------- dnl CF_FUNC_DLSYM version: 3 updated: 2012/10/06 11:17:15 dnl ------------- dnl Test for dlsym() and related functions, as well as libdl. @@ -1912,7 +1987,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: @@ -1984,10 +2059,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 \ @@ -1995,7 +2074,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 @@ -2082,53 +2161,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 @@ -2145,14 +2197,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 <&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'` +else + cf_cv_libtool_version= +fi +test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version +])dnl +dnl --------------------------------------------------------------------------- dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10 dnl ------------- dnl Compute the library-prefix for the given host system @@ -3068,7 +3136,7 @@ ifelse($1,,,[$1=$LIB_PREFIX]) AC_SUBST(LIB_PREFIX) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LIB_RULES version: 72 updated: 2013/03/24 17:10:41 +dnl CF_LIB_RULES version: 74 updated: 2013/09/07 13:54:05 dnl ------------ dnl Append definitions and rules for the given models to the subdirectory dnl Makefiles, and the recursion rule for the top-level Makefile. If the @@ -3089,7 +3157,7 @@ cf_prefix=$LIB_PREFIX AC_REQUIRE([CF_SUBST_NCURSES_VERSION]) case $cf_cv_shlib_version in #(vi -cygdll|mingw) +cygdll|msysdll|mingw) TINFO_NAME=$TINFO_ARG_SUFFIX TINFO_SUFFIX=.dll ;; @@ -3172,6 +3240,11 @@ do Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}" continue ;; + msysdll) #(vi + cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` + Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}" + continue + ;; mingw) cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}" @@ -3263,7 +3336,7 @@ do CXX_MODEL=$cf_ITEM if test "$CXX_MODEL" = SHARED; then case $cf_cv_shlib_version in #(vi - cygdll|mingw) #(vi + cygdll|msysdll|mingw) #(vi test "x$with_shared_cxx" = xno && CF_VERBOSE(overriding CXX_MODEL to SHARED) with_shared_cxx=yes ;; @@ -3440,12 +3513,14 @@ CF_EOF fi done +if test "x$cf_with_db_install" = xyes; then cat >> Makefile <> Makefile </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= @@ -4492,7 +4568,7 @@ ifelse($1,,[ fi ]) 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. @@ -4501,7 +4577,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 ;; *) @@ -4646,7 +4722,7 @@ else fi ])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], @@ -4658,7 +4734,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' ;; @@ -5178,7 +5254,7 @@ define([CF_REMOVE_LIB], $1=`echo "$2" | sed -e 's/-l$3[[ ]]//g' -e 's/-l$3[$]//'` ])dnl dnl --------------------------------------------------------------------------- -dnl CF_RPATH_HACK version: 9 updated: 2011/02/13 13:31:33 +dnl CF_RPATH_HACK version: 11 updated: 2013/09/01 13:02:00 dnl ------------- AC_DEFUN([CF_RPATH_HACK], [ @@ -5195,8 +5271,8 @@ if test -n "$LD_RPATH_OPT" ; then AC_TRY_LINK([#include ], [printf("Hello");], - [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u` - cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort -u`]) + [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq` + cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort | uniq`]) # If we passed the link-test, but get a "not found" on a given library, # this could be due to inept reconfiguration of gcc to make it only @@ -5229,6 +5305,8 @@ AC_TRY_LINK([#include ], CF_RPATH_HACK_2(LIBS) CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS) +else + AC_MSG_RESULT(no) fi AC_SUBST(EXTRA_LDFLAGS) ])dnl @@ -5293,18 +5371,19 @@ CF_VERBOSE(...checked $1 [$]$1) AC_SUBST(EXTRA_LDFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 72 updated: 2013/01/26 16:26:12 +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. @@ -5319,12 +5398,19 @@ dnl dnl Some loaders leave 'so_locations' lying around. It's nice to clean up. AC_DEFUN([CF_SHARED_OPTS], [ - AC_REQUIRE([CF_SUBST_NCURSES_VERSION]) 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= @@ -5384,9 +5470,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 @@ -5397,7 +5486,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 ;; @@ -5474,10 +5585,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 @@ -5488,7 +5605,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 ;; @@ -5535,7 +5652,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 @@ -5660,6 +5777,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) @@ -5667,11 +5786,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 @@ -5858,7 +5981,7 @@ if test "$cf_cv_sizechange" != no ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SRC_MODULES version: 26 updated: 2012/01/07 15:08:24 +dnl CF_SRC_MODULES version: 27 updated: 2013/08/03 18:18:08 dnl -------------- dnl For each parameter, test if the source-directory exists, and if it contains dnl a 'modules' file. If so, add to the list $cf_cv_src_modules which we'll @@ -5947,7 +6070,9 @@ done if test "x$cf_with_tests" != "xno" ; then SRC_SUBDIRS="$SRC_SUBDIRS test" fi -test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc" +if test "x$cf_with_db_install" = xyes; then + test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc" +fi if test "$cf_with_cxx_binding" != no; then PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}" SRC_SUBDIRS="$SRC_SUBDIRS c++" @@ -6168,12 +6293,12 @@ AC_MSG_RESULT($cf_cv_sys_time_select) test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT,1,[Define to 1 if we can include with ]) ])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 --------------------------------------------------------------------------- @@ -6509,14 +6634,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) @@ -6600,7 +6725,7 @@ if test "$with_gpm" != no ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIBTOOL version: 28 updated: 2011/07/02 15:40:32 +dnl CF_WITH_LIBTOOL version: 30 updated: 2013/09/07 13:54:05 dnl --------------- dnl Provide a configure option to incorporate libtool. Define several useful dnl symbols for the makefile rules. @@ -6670,7 +6795,14 @@ ifdef([AC_PROG_LIBTOOL],[ CF_PATH_SYNTAX(with_libtool) LIBTOOL=$with_libtool else - AC_PATH_PROG(LIBTOOL,libtool) + AC_CHECK_TOOLS(LIBTOOL,[libtool glibtool],none) + CF_LIBTOOL_VERSION + if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool + then + CF_FORGET_TOOL(LIBTOOL) + AC_CHECK_TOOLS(LIBTOOL,[glibtool],none) + CF_LIBTOOL_VERSION + fi fi if test -z "$LIBTOOL" ; then AC_MSG_ERROR(Cannot find libtool) @@ -6686,22 +6818,12 @@ ifdef([AC_PROG_LIBTOOL],[ LIB_UNINSTALL='${LIBTOOL} --mode=uninstall' LIB_PREP=: - # Show the version of libtool - AC_MSG_CHECKING(version of libtool) - - # Save the version in a cache variable - this is not entirely a good - # thing, but the version string from libtool is very ugly, and for - # bug reports it might be useful to have the original string. "(" - cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'` - AC_MSG_RESULT($cf_cv_libtool_version) - if test -z "$cf_cv_libtool_version" ; then - AC_MSG_ERROR(This is not GNU libtool) - fi + CF_CHECK_LIBTOOL_VERSION # special hack to add -no-undefined (which libtool should do for itself) LT_UNDEF= case "$cf_cv_system_name" in #(vi - cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi + cygwin*|msys*|mingw32*|uwin*|aix[[4-7]]) #(vi LT_UNDEF=-no-undefined ;; esac @@ -7008,7 +7130,7 @@ CF_NO_LEAKS_OPTION(valgrind, [USE_VALGRIND]) ])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, @@ -7028,7 +7150,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 @@ -7086,6 +7208,7 @@ sco*) #(vi ;; solaris2.*) #(vi cf_xopen_source="-D__EXTENSIONS__" + cf_cv_xopen_source=broken ;; *) CF_TRY_XOPEN_SOURCE