X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=6d2f989e62361593efc320ba1cf8b3ea255e2f45;hp=530d06cb20738877cf0f97fbc787362da497e54f;hb=8f6d94b8d6211a2323caef53fa4c96c475ec9a62;hpb=32345daa97e69f66b554f02faef53cfd02739bdc diff --git a/aclocal.m4 b/aclocal.m4 index 530d06cb..6d2f989e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. * +dnl Copyright (c) 1998-2018,2019 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.841 2018/07/14 23:48:44 tom Exp $ +dnl $Id: aclocal.m4,v 1.862 2019/03/30 21:53:01 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -727,7 +727,7 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 8 updated: 2017/09/23 08:50:24 +dnl CF_CC_ENV_FLAGS version: 9 updated: 2018/07/29 18:03:26 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler @@ -744,11 +744,28 @@ AC_DEFUN([CF_CC_ENV_FLAGS], # This should have been defined by AC_PROG_CC : ${CC:=cc} +AC_MSG_CHECKING(\$CFLAGS variable) +case "x$CFLAGS" in +(*-[[IUD]]*) + AC_MSG_RESULT(broken) + AC_MSG_WARN(your environment uses the CFLAGS variable to hold CPPFLAGS options) + cf_flags="$CFLAGS" + CFLAGS= + for cf_arg in $cf_flags + do + CF_ADD_CFLAGS($cf_arg) + done + ;; +(*) + AC_MSG_RESULT(ok) + ;; +esac + AC_MSG_CHECKING(\$CC variable) case "$CC" in (*[[\ \ ]]-*) AC_MSG_RESULT(broken) - AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) + AC_MSG_WARN(your environment uses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'` cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'` @@ -1887,6 +1904,49 @@ AC_DEFUN([CF_FIXUP_ADAFLAGS],[ AC_MSG_RESULT($ADAFLAGS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_FOPEN_BIN_R version: 1 updated: 2019/03/30 17:52:21 +dnl -------------- +dnl Check if fopen works when the "b" (binary) flag is added to the mode +dnl parameter. POSIX ignores the "b", which c89 specified. Some very old +dnl systems do not accept it. +AC_DEFUN([CF_FOPEN_BIN_R],[ +AC_CACHE_CHECK(if fopen accepts explicit binary mode,cf_cv_fopen_bin_r,[ + AC_TRY_RUN([ +#include +int main(void) { + FILE *fp = fopen("conftest.tmp", "wb"); + int rc = 0; + if (fp != 0) { + int p, q; + for (p = 0; p < 256; ++p) { + fputc(p, fp); + } + fclose(fp); + fp = fopen("conftest.tmp", "rb"); + if (fp != 0) { + for (p = 0; p < 256; ++p) { + q = fgetc(fp); + if (q != p) { + rc = 1; + break; + } + } + } else { + rc = 1; + } + } else { + rc = 1; + } + ${cf_cv_main_return:-return} (rc); +} +], + [cf_cv_fopen_bin_r=yes], + [cf_cv_fopen_bin_r=no], + [cf_cv_fopen_bin_r=unknown]) +]) +test "x$cf_cv_fopen_bin_r" != xno && AC_DEFINE(USE_FOPEN_BIN_R) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_FORGET_TOOL version: 1 updated: 2013/04/06 18:03:09 dnl -------------- dnl Forget that we saw the given tool. @@ -2703,7 +2763,7 @@ case $cf_gnat_version in esac ]) dnl --------------------------------------------------------------------------- -dnl CF_GNU_SOURCE version: 9 updated: 2018/06/20 20:23:13 +dnl CF_GNU_SOURCE version: 10 updated: 2018/12/10 20:09:41 dnl ------------- dnl Check if we must define _GNU_SOURCE to get a reasonable value for dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect @@ -2722,6 +2782,8 @@ AC_CACHE_CHECK(if this is the GNU C library,cf_cv_gnu_library,[ AC_TRY_COMPILE([#include ],[ #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0 return 0; + #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0 + return 0; #else # error not GNU C library #endif], @@ -2732,13 +2794,16 @@ AC_TRY_COMPILE([#include ],[ if test x$cf_cv_gnu_library = xyes; then # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE - # was changed to help a little... + # was changed to help a little. newlib incorporated the change about 4 + # years later. AC_CACHE_CHECK(if _DEFAULT_SOURCE can be used as a basis,cf_cv_gnu_library_219,[ cf_save="$CPPFLAGS" CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE) AC_TRY_COMPILE([#include ],[ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2) return 0; + #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3) + return 0; #else # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old #endif], @@ -3214,12 +3279,13 @@ CPPFLAGS="-I. $CPPFLAGS" AC_SUBST(CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INSTALL_OPTS version: 1 updated: 2014/07/21 18:19:51 +dnl CF_INSTALL_OPTS version: 2 updated: 2018/08/18 12:19:21 dnl --------------- dnl prompt for/fill-in useful install-program options AC_DEFUN([CF_INSTALL_OPTS], [ CF_INSTALL_OPT_S +CF_INSTALL_OPT_P CF_INSTALL_OPT_O ])dnl dnl --------------------------------------------------------------------------- @@ -3250,7 +3316,42 @@ fi AC_SUBST(INSTALL_OPT_O) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INSTALL_OPT_S version: 1 updated: 2014/07/21 18:19:51 +dnl CF_INSTALL_OPT_P version: 1 updated: 2018/08/18 12:19:21 +dnl ---------------- +dnl Some install-programs accept a "-p" option to preserve file modification +dnl timestamps. That can be useful as an install option, as well as a way to +dnl avoid the need for ranlib after copying a static archive. +AC_DEFUN([CF_INSTALL_OPT_P], +[ +: ${INSTALL:=install} +AC_CACHE_CHECK(if install accepts -p option, cf_cv_install_p,[ + rm -rf conftest* + date >conftest.in + mkdir conftest.out + sleep 3 + if $INSTALL -p conftest.in conftest.out 2>/dev/null + then + if test -f conftest.out/conftest.in + then + test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \ + test conftest.out/conftest.in -nt conftest.in 2>conftest.err + if test -s conftest.err + then + cf_cv_install_p=no + else + cf_cv_install_p=yes + fi + else + cf_cv_install_p=no + fi + else + cf_cv_install_p=no + fi + rm -rf conftest* +]) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_INSTALL_OPT_S version: 2 updated: 2018/08/18 12:19:21 dnl ---------------- dnl By default, we should strip executables which are installed, but leave the dnl ability to suppress that for unit-testing. @@ -3258,7 +3359,7 @@ AC_DEFUN([CF_INSTALL_OPT_S], [ AC_MSG_CHECKING(if you want to install stripped executables) CF_ARG_DISABLE(stripping, - [ --disable-stripping do not strip installed executables], + [ --disable-stripping do not strip (debug info) installed executables], [with_stripping=no], [with_stripping=yes]) AC_MSG_RESULT($with_stripping) @@ -3476,7 +3577,7 @@ AC_SUBST(LDFLAGS_STATIC) AC_SUBST(LDFLAGS_SHARED) ]) dnl --------------------------------------------------------------------------- -dnl CF_LD_RPATH_OPT version: 7 updated: 2016/02/20 18:01:19 +dnl CF_LD_RPATH_OPT version: 8 updated: 2018/08/18 16:36:35 dnl --------------- dnl For the given system and compiler, find the compiler flags to pass to the dnl loader to use the "rpath" feature. @@ -3485,49 +3586,52 @@ AC_DEFUN([CF_LD_RPATH_OPT], AC_REQUIRE([CF_CHECK_CACHE]) LD_RPATH_OPT= -AC_MSG_CHECKING(for an rpath option) -case $cf_cv_system_name in -(irix*) - if test "$GCC" = yes; then +if test "x$cf_cv_enable_rpath" != xno +then + AC_MSG_CHECKING(for an rpath option) + case $cf_cv_system_name in + (irix*) + if test "$GCC" = yes; then + LD_RPATH_OPT="-Wl,-rpath," + else + LD_RPATH_OPT="-rpath " + fi + ;; + (linux*|gnu*|k*bsd*-gnu|freebsd*) LD_RPATH_OPT="-Wl,-rpath," - else + ;; + (openbsd[[2-9]].*|mirbsd*) + LD_RPATH_OPT="-Wl,-rpath," + ;; + (dragonfly*) LD_RPATH_OPT="-rpath " - fi - ;; -(linux*|gnu*|k*bsd*-gnu|freebsd*) - LD_RPATH_OPT="-Wl,-rpath," - ;; -(openbsd[[2-9]].*|mirbsd*) - LD_RPATH_OPT="-Wl,-rpath," - ;; -(dragonfly*) - LD_RPATH_OPT="-rpath " - ;; -(netbsd*) - LD_RPATH_OPT="-Wl,-rpath," - ;; -(osf*|mls+*) - LD_RPATH_OPT="-rpath " - ;; -(solaris2*) - LD_RPATH_OPT="-R" - ;; -(*) - ;; -esac -AC_MSG_RESULT($LD_RPATH_OPT) + ;; + (netbsd*) + LD_RPATH_OPT="-Wl,-rpath," + ;; + (osf*|mls+*) + LD_RPATH_OPT="-rpath " + ;; + (solaris2*) + LD_RPATH_OPT="-R" + ;; + (*) + ;; + esac + AC_MSG_RESULT($LD_RPATH_OPT) -case "x$LD_RPATH_OPT" in -(x-R*) - AC_MSG_CHECKING(if we need a space after rpath option) - cf_save_LIBS="$LIBS" - CF_ADD_LIBS(${LD_RPATH_OPT}$libdir) - AC_TRY_LINK(, , cf_rpath_space=no, cf_rpath_space=yes) - LIBS="$cf_save_LIBS" - AC_MSG_RESULT($cf_rpath_space) - test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT " - ;; -esac + case "x$LD_RPATH_OPT" in + (x-R*) + AC_MSG_CHECKING(if we need a space after rpath option) + cf_save_LIBS="$LIBS" + CF_ADD_LIBS(${LD_RPATH_OPT}$libdir) + AC_TRY_LINK(, , cf_rpath_space=no, cf_rpath_space=yes) + LIBS="$cf_save_LIBS" + AC_MSG_RESULT($cf_rpath_space) + test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT " + ;; + esac +fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_LIBRARY_PATH version: 10 updated: 2015/04/15 19:08:48 @@ -3592,7 +3696,7 @@ ifelse($1,,,[$1=$LIB_PREFIX]) AC_SUBST(LIB_PREFIX) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LIB_RULES version: 87 updated: 2017/07/26 17:08:35 +dnl CF_LIB_RULES version: 88 updated: 2018/08/18 12:19:21 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 @@ -3928,6 +4032,7 @@ CF_EOF ShlibVer=$cf_cv_shlib_version \ ShlibVerInfix=$cf_cv_shlib_version_infix \ ReLink=${cf_cv_do_relink:-no} \ + ReRanlib=${cf_cv_do_reranlib:-yes} \ DoLinks=$cf_cv_do_symlinks \ rmSoLocs=$cf_cv_rm_so_locs \ ldconfig="$LDCONFIG" \ @@ -5370,7 +5475,7 @@ fi AC_SUBST(PKG_CONFIG) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_POSIX_C_SOURCE version: 10 updated: 2018/06/20 20:23:13 +dnl CF_POSIX_C_SOURCE version: 11 updated: 2018/12/31 20:46:17 dnl ----------------- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. dnl @@ -5385,7 +5490,10 @@ dnl dnl Parameters: dnl $1 is the nominal value for _POSIX_C_SOURCE AC_DEFUN([CF_POSIX_C_SOURCE], -[ +[AC_REQUIRE([CF_POSIX_VISIBLE])dnl + +if test "$cf_cv_posix_visible" = no; then + cf_POSIX_C_SOURCE=ifelse([$1],,199506L,[$1]) cf_save_CFLAGS="$CFLAGS" @@ -5442,6 +5550,35 @@ if test "$cf_cv_posix_c_source" != no ; then CF_ADD_CFLAGS($cf_cv_posix_c_source) fi +fi # cf_cv_posix_visible + +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_POSIX_VISIBLE version: 1 updated: 2018/12/31 20:46:17 +dnl ---------------- +dnl POSIX documents test-macros which an application may set before any system +dnl headers are included to make features available. +dnl +dnl Some BSD platforms (originally FreeBSD, but copied by a few others) +dnl diverged from POSIX in 2002 by setting symbols which make all of the most +dnl recent features visible in the system header files unless the application +dnl overrides the corresponding test-macros. Doing that introduces portability +dnl problems. +dnl +dnl This macro makes a special check for the symbols used for this, to avoid a +dnl conflicting definition. +AC_DEFUN([CF_POSIX_VISIBLE], +[ +AC_CACHE_CHECK(if the POSIX test-macros are already defined,cf_cv_posix_visible,[ +AC_TRY_COMPILE([#include ],[ +#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \ + && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \ + && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \ + && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0) +#error conflicting symbols found +#endif +],[cf_cv_posix_visible=no],[cf_cv_posix_visible=yes]) +]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_PREDEFINE version: 2 updated: 2010/05/26 16:44:57 @@ -5586,7 +5723,7 @@ AC_DEFUN([CF_PROG_EGREP], test -z "$EGREP" && AC_MSG_ERROR(No egrep program found) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_GNAT version: 6 updated: 2018/01/16 16:45:49 +dnl CF_PROG_GNAT version: 8 updated: 2018/11/10 19:47:04 dnl ------------ dnl Check for gnatmake, ensure that it is complete. AC_DEFUN([CF_PROG_GNAT],[ @@ -5608,7 +5745,20 @@ else for cf_gprconfig in Ada C do AC_MSG_CHECKING(for gprconfig name for $cf_gprconfig) - cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&AC_FD_CC | ${AWK:-awk} '/^\*/{print [$]3;}' | head -n 1` + if test $cf_gprconfig = C + then + for cf_gprconfig_param in \ + $cf_gprconfig,,,,GNATGCC \ + $cf_gprconfig,,,,GCC \ + $cf_gprconfig + do + cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&AC_FD_CC | ${AWK:-awk} '/^\*/{print [$]3;}' | head -n 1` + test -n "$cf_gprconfig_value" && break + done + else + cf_gprconfig_param=$cf_gprconfig + cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&AC_FD_CC | ${AWK:-awk} '/^\*/{print [$]3;}' | head -n 1` + fi if test -n "$cf_gprconfig_value" then eval cf_ada_config_[$]cf_gprconfig=[$]cf_gprconfig_value @@ -5953,7 +6103,7 @@ CF_VERBOSE(...checked $1 [$]$1) AC_SUBST(EXTRA_LDFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 92 updated: 2017/12/30 17:26:05 +dnl CF_SHARED_OPTS version: 93 updated: 2018/08/18 16:36:35 dnl -------------- dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared @@ -5981,6 +6131,7 @@ 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= @@ -6168,7 +6319,7 @@ CF_EOF cf_cv_rm_so_locs=yes ;; (linux*|gnu*|k*bsd*-gnu) - if test "$DFT_LWR_MODEL" = "shared" ; then + if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" fi @@ -6206,7 +6357,7 @@ CF_EOF chmod +x mk_shared_lib.sh ;; (openbsd[[2-9]].*|mirbsd*) - if test "$DFT_LWR_MODEL" = "shared" ; then + if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" fi @@ -6262,7 +6413,7 @@ CF_EOF ;; esac MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]' - if test "$DFT_LWR_MODEL" = "shared" ; then + if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" fi @@ -7115,10 +7266,11 @@ if test "$cf_cv_utf8_lib" = "add-on" ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_VA_COPY version: 3 updated: 2012/10/06 11:17:15 +dnl CF_VA_COPY version: 6 updated: 2018/12/04 18:14:25 dnl ---------- -dnl check for va_copy, part of stdarg.h +dnl check for va_copy, part of stdarg.h starting with ISO C 1999. dnl Also, workaround for glibc's __va_copy, by checking for both. +dnl Finally, try to accommodate pre-ISO C 1999 headers. AC_DEFUN([CF_VA_COPY],[ AC_CACHE_CHECK(for va_copy, cf_cv_have_va_copy,[ AC_TRY_LINK([ @@ -7130,7 +7282,10 @@ AC_TRY_LINK([ cf_cv_have_va_copy=yes, cf_cv_have_va_copy=no)]) -test "$cf_cv_have_va_copy" = yes && AC_DEFINE(HAVE_VA_COPY,1,[Define to 1 if we have va_copy]) +if test "$cf_cv_have_va_copy" = yes; +then + AC_DEFINE(HAVE_VA_COPY,1,[Define to 1 if we have va_copy]) +else # !cf_cv_have_va_copy AC_CACHE_CHECK(for __va_copy, cf_cv_have___va_copy,[ AC_TRY_LINK([ @@ -7142,7 +7297,58 @@ AC_TRY_LINK([ cf_cv_have___va_copy=yes, cf_cv_have___va_copy=no)]) -test "$cf_cv_have___va_copy" = yes && AC_DEFINE(HAVE___VA_COPY,1,[Define to 1 if we have __va_copy]) +if test "$cf_cv_have___va_copy" = yes +then + AC_DEFINE(HAVE___VA_COPY,1,[Define to 1 if we have __va_copy]) +else # !cf_cv_have___va_copy + +AC_CACHE_CHECK(for __builtin_va_copy, cf_cv_have___builtin_va_copy,[ +AC_TRY_LINK([ +#include +],[ + static va_list dst; + static va_list src; + __builtin_va_copy(dst, src)], + cf_cv_have___builtin_va_copy=yes, + cf_cv_have___builtin_va_copy=no)]) + +test "$cf_cv_have___builtin_va_copy" = yes && + AC_DEFINE(HAVE___BUILTIN_VA_COPY,1,[Define to 1 if we have __builtin_va_copy]) + +fi # cf_cv_have___va_copy + +fi # cf_cv_have_va_copy + +case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in +(*yes*) + ;; + +(*) + AC_CACHE_CHECK(if we can simply copy va_list, cf_cv_pointer_va_list,[ +AC_TRY_LINK([ +#include +],[ + va_list dst; + va_list src; + dst = src], + cf_cv_pointer_va_list=yes, + cf_cv_pointer_va_list=no)]) + + if test "$cf_cv_pointer_va_list" = no + then + AC_CACHE_CHECK(if we can copy va_list indirectly, cf_cv_array_va_list,[ +AC_TRY_LINK([ +#include +],[ + va_list dst; + va_list src; + *dst = *src], + cf_cv_array_va_list=yes, + cf_cv_array_va_list=no)]) + test "$cf_cv_array_va_list" = yes && AC_DEFINE(ARRAY_VA_LIST,1,[Define to 1 if we can copy va_list indirectly]) + fi + ;; +esac ]) dnl --------------------------------------------------------------------------- dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12 @@ -7389,11 +7595,12 @@ AC_SUBST(ADA_OBJECTS) AC_MSG_RESULT($ADA_OBJECTS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_SHAREDLIB version: 4 updated: 2014/05/31 21:08:37 +dnl CF_WITH_ADA_SHAREDLIB version: 5 updated: 2018/07/21 19:10:35 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_REQUIRE([CF_GNAT_PROJECTS]) AC_MSG_CHECKING(if an Ada95 shared-library should be built) AC_ARG_WITH(ada-sharedlib, [ --with-ada-sharedlib=soname build shared-library (requires GNAT projects)], @@ -7401,6 +7608,15 @@ AC_ARG_WITH(ada-sharedlib, [with_ada_sharedlib=no]) AC_MSG_RESULT($with_ada_sharedlib) +if test "x$with_ada_sharedlib" != xno +then + if test "x$cf_gnat_projects" != xyes + then + AC_MSG_WARN(disabling shared-library since GNAT projects are not supported) + with_ada_sharedlib=no + fi +fi + ADA_SHAREDLIB='lib$(LIB_NAME).so.1' MAKE_ADA_SHAREDLIB="#" @@ -8022,7 +8238,7 @@ CF_NO_LEAKS_OPTION(valgrind, [USE_VALGRIND]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_VERSIONED_SYMS version: 7 updated: 2015/10/24 20:50:26 +dnl CF_WITH_VERSIONED_SYMS version: 8 updated: 2018/10/20 20:24:34 dnl ---------------------- dnl Use this when building shared library with ELF, to markup symbols with the dnl version identifier from the given input file. Generally that identifier is @@ -8036,11 +8252,21 @@ AC_ARG_WITH(versioned-syms, [ --with-versioned-syms=X markup versioned symbols using ld], [with_versioned_syms=$withval], [with_versioned_syms=no]) -if test "x$with_versioned_syms" = xyes -then +case "x$with_versioned_syms" in +(xyes) with_versioned_syms='${top_srcdir}/package/ifelse($1,,${PACKAGE},[$1]).map' AC_SUBST(PACKAGE) -fi + ;; +(xno) + ;; +(x/*) + test -f "$with_versioned_syms" || AC_MSG_ERROR(expected a filename: $with_versioned_syms) + ;; +(*) + test -f "$with_versioned_syms" || AC_MSG_ERROR(expected a filename: $with_versioned_syms) + with_versioned_syms=`pwd`/"$with_versioned_syms" + ;; +esac AC_MSG_RESULT($with_versioned_syms) RESULTING_SYMS= @@ -8235,7 +8461,7 @@ fi AC_SUBST(no_x11_rgb) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 53 updated: 2018/06/16 18:58:58 +dnl CF_XOPEN_SOURCE version: 55 updated: 2018/12/31 20:46:17 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, @@ -8246,6 +8472,9 @@ 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]) +AC_REQUIRE([CF_POSIX_VISIBLE]) + +if test "$cf_cv_posix_visible" = no; then cf_XOPEN_SOURCE=ifelse([$1],,500,[$1]) cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2]) @@ -8265,7 +8494,7 @@ case $host_os in cf_xopen_source="-D_DARWIN_C_SOURCE" cf_XOPEN_SOURCE= ;; -(freebsd*|dragonfly*) +(freebsd*|dragonfly*|midnightbsd*) # 5.x headers associate # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L @@ -8360,4 +8589,5 @@ make an error CF_TRY_XOPEN_SOURCE fi fi +fi # cf_cv_posix_visible ])