X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=46062b4e03458da693538e5ddfcb9d1e858549b2;hp=d7b8ffc9c23067742264faebf94df450f8bcd949;hb=0948e2c7ac34642a1f8a3a85000933bcbb258cff;hpb=5ae2721913c0d2adde0d65063e37a723bf8a0987 diff --git a/aclocal.m4 b/aclocal.m4 index d7b8ffc9..46062b4e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2011,2012 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.640 2012/11/03 19:39:23 tom Exp $ +dnl $Id: aclocal.m4,v 1.706 2014/08/02 22:38:39 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: 3 updated: 2012/10/03 18:39:53 +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,6 +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], ,[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( @@ -87,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. @@ -101,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 @@ -119,7 +120,7 @@ AC_DEFUN([CF_ADD_ADAFLAGS],[ AC_SUBST(ADAFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42 +dnl CF_ADD_CFLAGS version: 11 updated: 2014/07/22 05:32:57 dnl ------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl The second parameter if given makes this macro verbose. @@ -144,7 +145,7 @@ no) -D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes @@ -181,7 +182,7 @@ yes) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; @@ -308,15 +309,33 @@ if test -n "$1" ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_LIBS version: 1 updated: 2010/06/02 05:03:05 +dnl CF_ADD_LIBS version: 2 updated: 2014/07/13 14:33:27 dnl ----------- -dnl Add one or more libraries, used to enforce consistency. +dnl Add one or more libraries, used to enforce consistency. Libraries are +dnl prepended to an existing list, since their dependencies are assumed to +dnl already exist in the list. dnl 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 +AC_DEFUN([CF_ADD_LIBS],[ +cf_add_libs="$1" +# Filter out duplicates - this happens with badly-designed ".pc" files... +for cf_add_1lib in [$]ifelse($2,,LIBS,[$2]) +do + for cf_add_2lib in $cf_add_libs + do + if test "x$cf_add_1lib" = "x$cf_add_2lib" + then + cf_add_1lib= + break + fi + done + test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib" +done +ifelse($2,,LIBS,[$2])="$cf_add_libs" +])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 @@ -326,9 +345,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" @@ -491,7 +510,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. @@ -525,7 +544,7 @@ AC_CACHE_VAL(cf_cv_type_of_bool,[ #endif -main() +int main() { FILE *fp = fopen("cf_test.out", "w"); if (fp != 0) { @@ -677,7 +696,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 @@ -695,7 +714,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 @@ -911,6 +930,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 @@ -932,7 +972,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 @@ -943,7 +983,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 @@ -1000,7 +1040,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 @@ -1022,7 +1062,7 @@ public: int begin_x = 0) { } - + NCursesPanel(); ~NCursesPanel(); }; @@ -1202,6 +1242,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 @@ -1306,7 +1357,7 @@ AC_ARG_ENABLE(rpath, AC_MSG_RESULT($cf_cv_enable_rpath) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ENABLE_STRING_HACKS version: 2 updated: 2012/10/06 17:56:13 +dnl CF_ENABLE_STRING_HACKS version: 3 updated: 2013/01/26 16:26:12 dnl ---------------------- dnl On a few platforms, the compiler and/or loader nags with untruthful dnl comments stating that "most" uses of strcat/strcpy/sprintf are incorrect, @@ -1325,7 +1376,7 @@ AC_DEFUN([CF_ENABLE_STRING_HACKS], [ AC_MSG_CHECKING(if you want to work around bogus compiler/loader warnings) AC_ARG_ENABLE(string-hacks, - [ --enable-string-hacks work around bogus compiler/loader warnings], + [ --enable-string-hacks work around bogus compiler/loader warnings], [with_string_hacks=$enableval], [with_string_hacks=no]) AC_MSG_RESULT($with_string_hacks) @@ -1511,6 +1562,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 @@ -1530,6 +1615,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. @@ -1565,6 +1659,37 @@ else fi ]) dnl --------------------------------------------------------------------------- +dnl CF_FUNC_MEMMOVE version: 8 updated: 2012/10/04 20:12:20 +dnl --------------- +dnl Check for memmove, or a bcopy that can handle overlapping copy. If neither +dnl is found, add our own version of memmove to the list of objects. +AC_DEFUN([CF_FUNC_MEMMOVE], +[ +AC_CHECK_FUNC(memmove,,[ +AC_CHECK_FUNC(bcopy,[ + AC_CACHE_CHECK(if bcopy does overlapping moves,cf_cv_good_bcopy,[ + AC_TRY_RUN([ +int main() { + static char data[] = "abcdefghijklmnopqrstuwwxyz"; + char temp[40]; + bcopy(data, temp, sizeof(data)); + bcopy(temp+10, temp, 15); + bcopy(temp+5, temp+15, 10); + ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz")); +} + ], + [cf_cv_good_bcopy=yes], + [cf_cv_good_bcopy=no], + [cf_cv_good_bcopy=unknown]) + ]) + ],[cf_cv_good_bcopy=no]) + if test "$cf_cv_good_bcopy" = yes ; then + AC_DEFINE(USE_OK_BCOPY,1,[Define to 1 to use bcopy when memmove is unavailable]) + else + AC_DEFINE(USE_MY_MEMMOVE,1,[Define to 1 to use replacement function when memmove is unavailable]) + fi +])])dnl +dnl --------------------------------------------------------------------------- dnl CF_FUNC_NANOSLEEP version: 4 updated: 2012/10/06 17:56:13 dnl ----------------- dnl Check for existence of workable nanosleep() function. Some systems, e.g., @@ -1880,7 +2005,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: @@ -1952,10 +2077,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 \ @@ -1963,7 +2092,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 @@ -1997,7 +2126,7 @@ rm -rf conftest* AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GETOPT_HEADER version: 5 updated: 2012/10/06 16:39:58 +dnl CF_GETOPT_HEADER version: 6 updated: 2014/07/22 14:45:54 dnl ---------------- dnl Check for getopt's variables which are commonly defined in stdlib.h, dnl unistd.h or (nonstandard) in getopt.h @@ -2016,10 +2145,24 @@ AC_TRY_COMPILE([ done ]) if test $cf_cv_getopt_header != none ; then - AC_DEFINE(HAVE_GETOPT_HEADER,1,[Define to 1 if we need to include getopt.h]) + AC_DEFINE(HAVE_GETOPT_HEADER,1,[Define to 1 if getopt variables are declared in header]) +fi +if test $cf_cv_getopt_header = getopt.h ; then + AC_DEFINE(NEED_GETOPT_H,1,[Define to 1 if we must include getopt.h]) fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_GNATPREP_OPT_T version: 1 updated: 2014/08/02 18:37:25 +dnl ----------------- +AC_DEFUN([CF_GNATPREP_OPT_T],[ +AC_CACHE_CHECK(if GNATPREP supports -T option,cf_cv_gnatprep_opt_t,[ +cf_cv_gnatprep_opt_t=no +gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes +]) +test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS" +AC_SUBST(GNATPREP_OPTS) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_GNAT_GENERICS version: 2 updated: 2011/03/23 20:24:41 dnl ---------------- AC_DEFUN([CF_GNAT_GENERICS], @@ -2050,53 +2193,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 @@ -2113,14 +2229,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 @@ -3035,7 +3172,7 @@ ifelse($1,,,[$1=$LIB_PREFIX]) AC_SUBST(LIB_PREFIX) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LIB_RULES version: 67 updated: 2012/10/06 13:36:35 +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 @@ -3056,7 +3193,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 ;; @@ -3090,76 +3227,68 @@ do for cf_item in $cf_LIST_MODELS do CF_LIB_SUFFIX($cf_item,cf_suffix,cf_depsuf) + cf_libname=$cf_dir + test "$cf_dir" = c++ && cf_libname=ncurses++ if test $cf_item = shared ; then - if test "$cf_cv_do_symlinks" = yes ; then - case "$cf_cv_shlib_version" in #(vi - rel) #(vi - case "$cf_cv_system_name" in #(vi - darwin*) - case .${LIB_SUFFIX} in - .tw*) - cf_suffix=`echo $cf_suffix | sed 's/^tw//'` - cf_suffix=tw'.${REL_VERSION}'"$cf_suffix" - ;; - .t*) - cf_suffix=`echo $cf_suffix | sed 's/^t//'` - cf_suffix=t'.${REL_VERSION}'"$cf_suffix" - ;; - .w*) - cf_suffix=`echo $cf_suffix | sed 's/^w//'` - cf_suffix=w'.${REL_VERSION}'"$cf_suffix" + if test -n "${LIB_SUFFIX}" + then + cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'` + else + cf_shared_suffix="$cf_suffix" + fi + if test "$cf_cv_do_symlinks" = yes ; then + cf_version_name= + + case "$cf_cv_shlib_version" in #(vi + rel) #(vi + cf_version_name=REL_VERSION ;; - *) - cf_suffix='.${REL_VERSION}'"$cf_suffix" + abi) + cf_version_name=ABI_VERSION ;; esac - ;; #(vi - *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;; - esac + + if test -n "$cf_version_name" + then + case "$cf_cv_system_name" in #(vi + darwin*) + # "w", etc? + cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix" + ;; #(vi + *) + cf_suffix="$cf_suffix"'.${'$cf_version_name'}' + ;; + esac + fi + if test -n "${LIB_SUFFIX}" + then + cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'` + else + cf_shared_suffix="$cf_suffix" + fi + fi + # cygwin needs import library, and has unique naming convention + # use autodetected ${cf_prefix} for import lib and static lib, but + # use 'cyg' prefix for shared lib. + case $cf_cv_shlib_version in #(vi + cygdll) #(vi + cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` + Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}" + continue ;; - abi) - case "$cf_cv_system_name" in #(vi - darwin*) - case .${LIB_SUFFIX} in - .tw*) - cf_suffix=`echo $cf_suffix | sed 's/^tw//'` - cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix" - ;; - .t*) - cf_suffix=`echo $cf_suffix | sed 's/^t//'` - cf_suffix=t'.${ABI_VERSION}'"$cf_suffix" - ;; - .w*) - cf_suffix=`echo $cf_suffix | sed 's/^w//'` - cf_suffix=w'.${ABI_VERSION}'"$cf_suffix" - ;; - *) - cf_suffix='.${ABI_VERSION}'"$cf_suffix" - ;; - esac - ;; #(vi - *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;; - esac + 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}" + continue ;; esac fi - # cygwin needs import library, and has unique naming convention - # use autodetected ${cf_prefix} for import lib and static lib, but - # use 'cyg' prefix for shared lib. - case $cf_cv_shlib_version in #(vi - cygdll) #(vi - cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` - Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_dir}${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_dir}${cf_cygsuf}" - continue - ;; - esac - fi - Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_dir}${cf_suffix}" + Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}" done if test $cf_dir = ncurses ; then @@ -3195,6 +3324,33 @@ do cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'` fi + if test $cf_dir = c++; then + if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then + cf_list= + for cf_item in $Libs_To_Make + do + case $cf_item in + *.a) + ;; + *) + cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"` + ;; + esac + for cf_test in $cf_list + do + if test "$cf_test" = "$cf_item" + then + cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'` + cf_item= + break + fi + done + test -n "$cf_item" && cf_list="$cf_list $cf_item" + done + Libs_To_Make="$cf_list" + fi + fi + sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \ -e "s%@SHARED_LIB@%$SHARED_LIB%" \ $cf_dir/Makefile >$cf_dir/Makefile.out @@ -3209,8 +3365,23 @@ do cf_subdirs= for cf_item in $cf_LIST_MODELS do + echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})" CF_UPPER(cf_ITEM,$cf_item) + + CXX_MODEL=$cf_ITEM + if test "$CXX_MODEL" = SHARED; then + case $cf_cv_shlib_version in #(vi + cygdll|msysdll|mingw) #(vi + test "x$with_shared_cxx" = xno && CF_VERBOSE(overriding CXX_MODEL to SHARED) + with_shared_cxx=yes + ;; + *) + test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL + ;; + esac + fi + CF_LIB_SUFFIX($cf_item,cf_suffix,cf_depsuf) CF_OBJ_SUBDIR($cf_item,cf_subdir) @@ -3228,6 +3399,8 @@ do cf_libname=$TICS_LIB_SUFFIX ;; esac + elif test $cf_dir = c++ ; then + cf_libname=ncurses++$LIB_SUFFIX else cf_libname=${cf_libname}$LIB_SUFFIX fi @@ -3279,6 +3452,7 @@ do name=${cf_libname}${cf_dir_suffix} \ traces=$LIB_TRACING \ MODEL=$cf_ITEM \ + CXX_MODEL=$CXX_MODEL \ model=$cf_subdir \ prefix=$cf_prefix \ suffix=$cf_suffix \ @@ -3375,12 +3549,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= @@ -4061,7 +4238,7 @@ AC_ARG_WITH(manpage-tbl, AC_MSG_RESULT($MANPAGE_TBL) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MAN_PAGES version: 41 updated: 2012/08/11 19:35:44 +dnl CF_MAN_PAGES version: 43 updated: 2013/02/09 12:53:45 dnl ------------ dnl Try to determine if the man-pages on the system are compressed, and if dnl so, what format is used. Use this information to construct a script that @@ -4179,11 +4356,12 @@ case \$i in #(vi if test ! -f $cf_man_alias ; then cat >>$cf_man_alias <<-CF_EOF2 s,@DATADIR@,\$datadir,g - s,@TERMINFO@,\$TERMINFO,g - s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g - s,@NCURSES_MINOR@,\$NCURSES_MINOR,g - s,@NCURSES_PATCH@,\$NCURSES_PATCH,g - s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g + s,@TERMINFO@,\${TERMINFO:="no default value"},g + s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g + s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g + s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g + s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g + s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g CF_EOF ifelse($1,,,[ for cf_name in $1 @@ -4426,7 +4604,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. @@ -4435,7 +4613,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 ;; *) @@ -4580,7 +4758,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], @@ -4592,7 +4770,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' ;; @@ -4833,7 +5011,7 @@ AC_PROG_AWK test -z "$AWK" && AC_MSG_ERROR(No awk program found) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_CC version: 3 updated: 2012/10/06 15:31:55 +dnl CF_PROG_CC version: 4 updated: 2014/07/12 18:57:58 dnl ---------- dnl standard check for CC, plus followup sanity checks dnl $1 = optional parameter to pass to AC_PROG_CC to specify compiler name @@ -4843,7 +5021,7 @@ CF_GCC_VERSION CF_ACVERSION_CHECK(2.52, [AC_PROG_CC_STDC], [CF_ANSI_CC_REQD]) -CF_CC_ENV_FLAGS +CF_CC_ENV_FLAGS ])dnl dnl --------------------------------------------------------------------------- dnl CF_PROG_CC_C_O version: 3 updated: 2010/08/14 18:25:37 @@ -5112,7 +5290,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], [ @@ -5129,8 +5307,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 @@ -5163,6 +5341,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 @@ -5227,18 +5407,19 @@ CF_VERBOSE(...checked $1 [$]$1) AC_SUBST(EXTRA_LDFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 70 updated: 2012/02/25 15:20:07 +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. @@ -5253,12 +5434,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= @@ -5283,6 +5471,7 @@ AC_DEFUN([CF_SHARED_OPTS], AC_MSG_RESULT($cf_cv_shlib_version) cf_cv_rm_so_locs=no + cf_try_cflags= # Some less-capable ports of gcc support only -fpic CC_SHARED_OPTS= @@ -5317,9 +5506,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 @@ -5330,12 +5522,34 @@ 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 ;; darwin*) #(vi - EXTRA_CFLAGS="-no-cpp-precomp" + cf_try_cflags="no-cpp-precomp" CC_SHARED_OPTS="-dynamic" MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]' test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi @@ -5349,6 +5563,14 @@ CF_EOF LDFLAGS="$LDFLAGS -Wl,-search_paths_first" fi ;; + hpux[[7-8]]*) #(vi + # HP-UX 8.07 ld lacks "+b" option used for libdir search-list + if test "$GCC" != yes; then + CC_SHARED_OPTS='+Z' + fi + MK_SHARED_LIB='${LD} -b -o $[@]' + INSTALL_LIB="-m 555" + ;; hpux*) #(vi # (tested with gcc 2.7.2 -- I don't have c89) if test "$GCC" = yes; then @@ -5399,10 +5621,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 @@ -5413,7 +5641,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 ;; @@ -5460,7 +5688,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 @@ -5554,10 +5782,39 @@ CF_EOF ;; esac + if test -n "$cf_try_cflags" + then +cat > conftest.$ac_ext < +int main(int argc, char *argv[[]]) +{ + printf("hello\n"); + return (argv[[argc-1]] == 0) ; +} +EOF + cf_save_CFLAGS="$CFLAGS" + for cf_opt in $cf_try_cflags + do + CFLAGS="$cf_save_CFLAGS -$cf_opt" + AC_MSG_CHECKING(if CFLAGS option -$cf_opt works) + if AC_TRY_EVAL(ac_compile); then + AC_MSG_RESULT(yes) + cf_save_CFLAGS="$CFLAGS" + else + AC_MSG_RESULT(no) + fi + done + CFLAGS="$cf_save_CFLAGS" + fi + + # RPATH_LIST is a colon-separated list of directories 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) @@ -5565,11 +5822,15 @@ CF_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 @@ -5756,7 +6017,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 @@ -5845,7 +6106,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++" @@ -6066,12 +6329,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 --------------------------------------------------------------------------- @@ -6407,14 +6670,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) @@ -6498,7 +6761,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. @@ -6568,7 +6831,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) @@ -6584,22 +6854,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 @@ -6878,6 +7138,26 @@ test "$cf_with_sysmouse" = yes && AC_DEFINE(USE_SYSMOUSE,1,[Define to 1 if we ca fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_WITH_SYSTYPE version: 1 updated: 2013/01/26 16:26:12 +dnl --------------- +dnl For testing, override the derived host system-type which is used to decide +dnl things such as the linker commands used to build shared libraries. This is +dnl normally chosen automatically based on the type of system which you are +dnl building on. We use it for testing the configure script. +dnl +dnl This is different from the --host option: it is used only for testing parts +dnl of the configure script which would not be reachable with --host since that +dnl relies on the build environment being real, rather than mocked up. +AC_DEFUN([CF_WITH_SYSTYPE],[ +CF_CHECK_CACHE([AC_CANONICAL_SYSTEM]) +AC_ARG_WITH(system-type, + [ --with-system-type=XXX test: override derived host system-type], +[AC_MSG_WARN(overriding system type to $withval) + cf_cv_system_name=$withval + host_os=$withval +]) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21 dnl ---------------- AC_DEFUN([CF_WITH_VALGRIND],[ @@ -6886,7 +7166,7 @@ CF_NO_LEAKS_OPTION(valgrind, [USE_VALGRIND]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49 +dnl CF_XOPEN_SOURCE version: 47 updated: 2014/07/23 17:11:49 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, @@ -6896,6 +7176,7 @@ dnl Parameters: dnl $1 is the nominal value for _XOPEN_SOURCE dnl $2 is the nominal value for _POSIX_C_SOURCE AC_DEFUN([CF_XOPEN_SOURCE],[ +AC_REQUIRE([AC_CANONICAL_HOST]) cf_XOPEN_SOURCE=ifelse([$1],,500,[$1]) cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2]) @@ -6905,7 +7186,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 @@ -6936,6 +7217,9 @@ irix[[56]].*) #(vi linux*|gnu*|mint*|k*bsd*-gnu) #(vi CF_GNU_SOURCE ;; +minix*) #(vi + cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this... + ;; mirbsd*) #(vi # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types cf_XOPEN_SOURCE= @@ -6963,6 +7247,7 @@ sco*) #(vi ;; solaris2.*) #(vi cf_xopen_source="-D__EXTENSIONS__" + cf_cv_xopen_source=broken ;; *) CF_TRY_XOPEN_SOURCE @@ -6971,7 +7256,7 @@ solaris2.*) #(vi esac if test -n "$cf_xopen_source" ; then - CF_ADD_CFLAGS($cf_xopen_source) + CF_ADD_CFLAGS($cf_xopen_source,true) fi dnl In anything but the default case, we may have system-specific setting