Lines Matching +full:charge +full:- +full:current +full:- +full:limit +full:- +full:mapping

2 dnl Copyright 2018-2023,2024 Thomas E. Dickey                                *
3 dnl Copyright 1998-2017,2018 Free Software Foundation, Inc. *
5 dnl Permission is hereby granted, free of charge, to any person obtaining a *
30 dnl Author: Thomas E. Dickey 1995-on
33 dnl Macros used in NCURSES auto-configuration script.
40 dnl https://invisible-island.net/autoconf/
41 dnl https://invisible-island.net/autoconf/my-autoconf.html
43 dnl ---------------------------------------------------------------------------
44 dnl ---------------------------------------------------------------------------
46 dnl -------------------
69 dnl ---------------------------------------------------------------------------
71 dnl ---------------
72 dnl Provide configure-script defaults for different ncurses ABIs.
120 # also: remove the wgetch-events feature in ABI 7
124 dnl ---------------------------------------------------------------------------
126 dnl ------------------
136 [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
140 dnl ---------------------------------------------------------------------------
142 dnl --------------------
150 dnl ---------------------------------------------------------------------------
152 dnl -------------------
153 dnl Construct the list of include-options for the C programs in the Ada95
157 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
159 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
162 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
166 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
169 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
174 dnl ---------------------------------------------------------------------------
176 dnl ---------------
182 dnl ---------------------------------------------------------------------------
184 dnl -------------
185 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
204 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
206 (-D*)
207 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
210 && test -z "${cf_tst_cflags}" \
227 (-D*)
228 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
244 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[[^"]]*"'\''//'`
247 && test -z "${cf_tst_cflags}" \
253 if test -n "$cf_new_cflags" ; then
258 if test -n "$cf_new_cppflags" ; then
263 if test -n "$cf_new_extra_cppflags" ; then
271 dnl ---------------------------------------------------------------------------
273 dnl ---------------
274 dnl Copy non-preprocessor flags to $CXXFLAGS, preprocessor flags to $CPPFLAGS
288 dnl ---------------------------------------------------------------------------
290 dnl -------------
291 dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it is
292 dnl redundant. We don't normally need to add -I/usr/local/include for gcc,
294 dnl worse, gcc 3.x may give error messages if -I/usr/local/include is added to
295 dnl the include-path).
298 if test -n "$1" ; then
303 if test -d "$cf_add_incdir"
306 if test -n "$CFLAGS$CPPFLAGS" ; then
309 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
320 CF_APPEND_TEXT(CPPFLAGS,-I$cf_add_incdir)
331 CF_VERBOSE(adding $cf_add_incdir to include-path)
332 ifelse([$2],,CPPFLAGS,[$2])="$ifelse([$2],,CPPFLAGS,[$2]) -I$cf_add_incdir"
334 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
347 dnl ---------------------------------------------------------------------------
349 dnl ----------
352 dnl $1 = library to add, without the "-l"
354 AC_DEFUN([CF_ADD_LIB],[CF_ADD_LIBS(-l$1,ifelse($2,,LIBS,[$2]))])dnl
355 dnl ---------------------------------------------------------------------------
357 dnl -------------
358 dnl Adds to the library-path
360 dnl Some machines have trouble with multiple -L options.
367 if test -n "$1" ; then
372 elif test -d "$cf_add_libdir"
375 if test -n "$LDFLAGS$LIBS" ; then
378 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
384 CF_VERBOSE(adding $cf_add_libdir to library-path)
385 ifelse([$2],,LDFLAGS,[$2])="-L$cf_add_libdir $ifelse([$2],,LDFLAGS,[$2])"
391 dnl ---------------------------------------------------------------------------
393 dnl -----------
398 dnl $1 = libraries to add, with the "-l", etc.
413 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
417 dnl ---------------------------------------------------------------------------
419 dnl ------------------
420 dnl Append to a search-list for a nonstandard header/lib-file
429 test -d "$4" && \
430 ifelse([$5],NONE,,[{ test -z "$5" || test "x$5" = xNONE || test "x$4" != "x$5"; } &&]) {
431 test -n "$verbose" && echo " ... testing for $3-directories under $4"
432 test -d "$4/$3" && $1="[$]$1 $4/$3"
433 test -d "$4/$3/$2" && $1="[$]$1 $4/$3/$2"
434 test -d "$4/$3/$2/$3" && $1="[$]$1 $4/$3/$2/$3"
435 test -d "$4/$2/$3" && $1="[$]$1 $4/$2/$3"
436 test -d "$4/$2/$3/$2" && $1="[$]$1 $4/$2/$3/$2"
439 dnl ---------------------------------------------------------------------------
441 dnl ----------------
450 (x-[[DU]]*)
458 dnl ---------------------------------------------------------------------------
460 dnl --------------
465 test -n "[$]$1" && $1="[$]$1 "
468 dnl ---------------------------------------------------------------------------
470 dnl --------------
471 dnl Allow user to disable a normally-on option.
474 dnl ---------------------------------------------------------------------------
476 dnl -------------
477 dnl Allow user to enable a normally-off option.
480 dnl ---------------------------------------------------------------------------
482 dnl -------------
488 dnl $2 = help-string
503 dnl ---------------------------------------------------------------------------
505 dnl -----------
508 dnl In particular, handle some obsolete cases where the "-" might be omitted,
516 (*-msvc*)
518 cat >mk_static_lib.sh <<-EOF
523 exec \[$]MSVC_BIN -out:"\[$]out" \[$]@
530 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
535 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
542 rm -f "conftest.$ac_cv_objext"
543 rm -f conftest.a
552 if test -f conftest.a ; then
557 CF_VERBOSE(cannot compile test-program)
561 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
566 if test -n "$ARFLAGS" ; then
567 if test -n "$cf_cv_ar_flags" ; then
576 dnl ---------------------------------------------------------------------------
578 dnl -----------------
600 dnl ---------------------------------------------------------------------------
602 dnl ------------
607 dnl Treat the configuration-variable specially here, since we're directly
647 dnl ---------------------------------------------------------------------------
649 dnl ------------
653 dnl If the current compiler is C rather than C++, we get the bool definition
680 rm -f cf_test.out
707 if ((bool)(-x) >= 0)
715 ${cf_cv_main_return:-return}(0);
719 if test -z "$cf_cv_type_of_bool"; then
732 rm -f cf_test.out
743 dnl ---------------------------------------------------------------------------
745 dnl -----------
746 dnl If we're cross-compiling, allow the user to override the tools and their
766 AC_ARG_WITH(build-cc,
767 [ --with-build-cc=XXX the build C compiler ($BUILD_CC)],
774 AC_ARG_WITH(build-cpp,
775 [ --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)],
777 [BUILD_CPP='${BUILD_CC} -E'])
781 AC_ARG_WITH(build-cflags,
782 [ --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)],
786 AC_MSG_CHECKING(for native build C preprocessor-flags)
787 AC_ARG_WITH(build-cppflags,
788 [ --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)],
792 AC_MSG_CHECKING(for native build linker-flags)
793 AC_ARG_WITH(build-ldflags,
794 [ --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)],
798 AC_MSG_CHECKING(for native build linker-libraries)
799 AC_ARG_WITH(build-libs,
800 [ --with-build-libs=XXX the build libraries (${BUILD_LIBS})],
810 AC_MSG_CHECKING(if the build-compiler "$BUILD_CC" works)
817 …ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "confte…
822 ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
836 AC_MSG_ERROR([Cross-build requires two compilers.
837 Use --with-build-cc to specify the native compiler.])
860 dnl ---------------------------------------------------------------------------
862 dnl ---------------
867 [ --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics],
898 dnl ---------------------------------------------------------------------------
900 dnl ---------------
901 dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
918 (*-[[IUD]]*)
935 (*[[\ \ ]]-*)
939 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
940 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
945 (x-[[IUDfgOW]]*)
962 dnl ---------------------------------------------------------------------------
964 dnl ---------------
966 dnl can be overridden by the user's command-line options. There's two items to
981 # non-vendor systems don't have a conflict
982 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
992 AC_MSG_CHECKING(for default include-directory)
993 test -n "$verbose" && echo 1>&AC_FD_MSG
1005 if test -f "$cf_dir/curses.h" ; then
1006 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1008 test -n "$verbose" && echo $ECHO_N " found " 1>&AC_FD_MSG
1012 test -n "$verbose" && echo " tested $cf_dir" 1>&AC_FD_MSG
1017 dnl ---------------------------------------------------------------------------
1019 dnl ----------
1020 dnl Check if the terminal-capability database functions are available. If not,
1021 dnl ncurses has a much-reduced version.
1023 AC_CACHE_CHECK(for terminal-capability database functions,cf_cv_cgetent,[
1042 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
1062 dnl ---------------------------------------------------------------------------
1064 dnl --------------
1071 dnl which is useful in cross-compiles.
1077 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1081 system_name="`(uname -s -r) 2>/dev/null`"
1082 if test -z "$system_name" ; then
1086 test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.…
1089 test -z "$system_name" && system_name="$cf_cv_system_name"
1090 test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name)
1097 dnl ---------------------------------------------------------------------------
1099 dnl ----------------
1120 # It's possible (for near-UNIX clones) that the data doesn't exist
1123 dnl ---------------------------------------------------------------------------
1125 dnl --------------
1148 # It's possible (for near-UNIX clones) that the data doesn't exist
1151 dnl ---------------------------------------------------------------------------
1153 dnl --------------------
1154 dnl Check for existence of external data in the current set of libraries. If
1176 dnl ---------------------------------------------------------------------------
1178 dnl --------------------
1179 dnl Check whether the compiler understands -fvisibility=hidden
1182 dnl $2 = compiler-flags variable name
1185 AC_CACHE_CHECK(if $1 -fvisibility=hidden option works,$3,[
1187 $2="[$]$2 -fvisibility=hidden"
1198 dnl ---------------------------------------------------------------------------
1200 dnl ---------------
1237 size_t numenv, limit, j;
1243 limit = numenv + 10;
1244 mynames = (char **) calloc(limit + 1, sizeof(char *));
1245 myvalues = (char **) calloc(limit + 1, sizeof(char *));
1246 mypointer = (char **) calloc(limit + 1, sizeof(char *));
1259 for (j = numenv; j < limit; ++j) {
1282 for (j = 0; j < limit; ++j) {
1287 ${cf_cv_main_return:-return}(1);
1290 ${cf_cv_main_return:-return}(1);
1293 ${cf_cv_main_return:-return}(1);
1301 ${cf_cv_main_return:-return}(1);
1307 ${cf_cv_main_return:-return}(0);
1320 dnl ---------------------------------------------------------------------------
1322 dnl ---------------------
1327 (3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*|[[1-9]][[0-9]].[[0-9]]*|20[[0-9]][[0-9]])
1336 dnl ---------------------------------------------------------------------------
1338 dnl -------------------
1339 dnl Check if GPM is already linked with curses. If so - and if the linkage
1340 dnl is not "weak" - warn about this because it can create problems linking
1356 ${cf_cv_main_return:-return}(0);
1365 LIBS="-static -lgpm -dynamic $LIBS"
1368 …cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} …
1369 test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
1370 test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
1373 rm -rf ./conftest*
1379 AC_MSG_WARN(GPM library is already linked with curses - read the FAQ)
1382 dnl ---------------------------------------------------------------------------
1384 dnl ---------------
1386 dnl used in cross-compiling to MinGW.
1396 LIBS="$LIBS -lssp"
1413 dnl ---------------------------------------------------------------------------
1415 dnl ------------------------
1418 dnl Save the version in a cache variable - this is not entirely a good thing,
1425 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
1430 if test -n "$cf_cv_libtool_version"
1432 …cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[[()]],...,g' -e 's,[[ ]]…
1434 (*...GNU-libtool...*)
1447 dnl ---------------------------------------------------------------------------
1449 dnl ----------------
1477 dnl ---------------------------------------------------------------------------
1479 dnl -------------------------
1481 dnl should support line-drawing. Even with Unicode. There is a problem.
1489 dnl is (because of poor device resolution) often rendered as double-width
1490 dnl characters. So... for these generally-useful characters, what should
1493 dnl The obvious choice would have been to make this locale-dependent, and use
1495 dnl obvious. Instead, we have a slew of "ambiguous-width" characters.
1497 dnl http://www.unicode.org/reports/tr11/tr11-29.html
1498 dnl http://www.cl.cam.ac.uk/~mgk25/ucs/scw-proposal.html
1500 dnl The EastAsianWidth-6.2.0.txt file from the Unicode organization lists
1501 dnl more than 22,000 characters, with 1281 of those as ambiguous-width. For
1502 dnl instance, it lists half (44/96) of the Latin-1 characters as
1503 dnl ambiguous-width. Also, all of the box-characters at 0x2500 are ambiguous.
1507 dnl 1 (the Latin-1 characters), while others are returned as 2 (line-drawing
1513 AC_CACHE_CHECK(if wcwidth agrees graphics are single-width, cf_cv_wcwidth_graphics,[
1515 - VT100 symbols
1534 - Teletype 5410v1 symbols
1542 - these defaults were invented for ncurses
1545 0x2264 less-than-or-equal-to
1546 0x2265 greater-than-or-equal-to
1548 0x2260 not-equal
1549 0x00a3 pound-sterling symbol
1550 - thick-line-drawing
1562 - double-line-drawing
1594 setlocale(LC_ALL, "en_US.UTF-8") ||
1596 setlocale(LC_ALL, "en_US.utf-8")) {
1599 if (*buffer == '-') {
1621 dnl ---------------------------------------------------------------------------
1623 dnl -----------------
1656 (c[[1-9]][[0-9]]|*/c[[1-9]][[0-9]])
1658 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1664 …ERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[[^)]]*) //' -e 's/^.*(Debian[[^…
1665 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1669 -Qunused-arguments \
1670 -Wno-error=implicit-function-declaration
1689 dnl ---------------------------------------------------------------------------
1691 dnl -----------------
1692 dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most
1693 dnl character-strings.
1695 dnl It is ambiguous because the specification accommodated the pre-ANSI
1697 dnl compiler other than by costly add-ons. Because of this, the specification
1722 AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[
1741 CF_APPEND_TEXT(CPPFLAGS,-DXTSTRINGDEFINES)
1744 CF_APPEND_TEXT(CPPFLAGS,-D_CONST_X_STRING)
1750 dnl ---------------------------------------------------------------------------
1752 dnl ---------------
1753 dnl Check if the C++ compiler accepts the override keyword. This is a C++-11
1757 if test -n "$CXX"; then
1786 dnl ---------------------------------------------------------------------------
1788 dnl -----------------
1794 if test -n "$CXX"; then
1821 dnl ---------------------------------------------------------------------------
1823 dnl ------------------
1828 if test -n "$CXX"; then
1877 dnl ---------------------------------------------------------------------------
1879 dnl ---------------
1888 CXX_ARFLAGS='-ar -o'
1892 CXXLDFLAGS="-u main"
1897 CXX_ARFLAGS='-xar -o'
1905 dnl ---------------------------------------------------------------------------
1907 dnl -------------------------
1912 AC_MSG_CHECKING(if iostream uses std-namespace)
1925 dnl ---------------------------------------------------------------------------
1927 dnl -----------
1947 CFLAGS="$CFLAGS --param max-inline-insns-single=$2"
1949 [${cf_cv_main_return:-return} foo()],
1955 CF_ADD_CFLAGS([--param max-inline-insns-single=$2])
1961 dnl ---------------------------------------------------------------------------
1963 dnl ----------
1965 AC_DEFUN([CF_DIRNAME],[$1=`echo "$2" | sed -e 's%/[[^/]]*$%%'`])dnl
1966 dnl ---------------------------------------------------------------------------
1968 dnl ---------------
1983 test ! -d "$cf_dir" && mkdir "$cf_dir"
1987 dnl ---------------------------------------------------------------------------
1989 dnl ---------------
1990 dnl You can always use "make -n" to see the actual options, but it is hard to
1991 dnl pick out/analyze warning messages when the compile-line is long.
1994 dnl ECHO_LT - symbol to control if libtool is verbose
1995 dnl ECHO_LD - symbol to prefix "cc -o" lines
1996 dnl RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
1997 dnl SHOW_CC - symbol to put before explicit "cc -c" lines
1998 dnl ECHO_CC - symbol to put before any "cc" line
2003 [ --disable-echo do not display "compiling" commands],
2005 ECHO_LT='--silent'
2024 dnl ---------------------------------------------------------------------------
2026 dnl ------------------------
2029 CF_ARG_DISABLE(gnat-projects,
2030 [ --disable-gnat-projects test: disable GNAT projects even if usable],
2035 dnl ---------------------------------------------------------------------------
2037 dnl ----------------
2038 dnl Combine no-leak checks with the libraries or tools that are used for the
2046 AC_MSG_CHECKING(if you want to perform memory-leak testing)
2048 [ --disable-leaks test: free permanent memory, analyze leaks],
2056 AC_DEFINE(NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.])
2057 AC_DEFINE(YY_NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.])
2060 dnl ---------------------------------------------------------------------------
2062 dnl --------------------------
2063 dnl Check if we should use the libtool 1.5 feature "-version-number" instead of
2064 dnl the older "-version-info" feature. The newer feature allows us to use
2069 AC_MSG_CHECKING(if libtool -version-number should be used)
2070 CF_ARG_DISABLE(libtool-version,
2071 [ --disable-libtool-version enable to use libtool's incompatible naming scheme],
2077 LIBTOOL_VERSION="-version-number"
2079 LIBTOOL_VERSION="-version-info"
2089 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
2101 dnl ---------------------------------------------------------------------------
2103 dnl ---------------------
2104 dnl The rpath-hack makes it simpler to build programs, particularly with the
2110 AC_MSG_CHECKING(if rpath-hack should be disabled)
2111 CF_ARG_DISABLE(rpath-hack,
2112 [ --disable-rpath-hack don't add rpath options for additional libraries],
2115 dnl TODO - drop cf_disable_rpath_hack
2123 dnl ---------------------------------------------------------------------------
2125 dnl -----------------------
2126 dnl Some linkers cannot reference a data-only object. Cygwin used to be one.
2131 AC_MSG_CHECKING(if you want broken-linker support code)
2133 [ --enable-broken_linker compile with broken-linker support code],
2140 AC_DEFINE(BROKEN_LINKER,1,[Define to 1 to work around linkers which cannot link data-only modules])
2145 dnl ---------------------------------------------------------------------------
2147 dnl ------------------
2148 dnl This is the "--enable-pc-files" option, which is available if there is a
2149 dnl pkg-config configuration on the local machine.
2161 AC_ARG_ENABLE(pc-files,
2162 [ --enable-pc-files generate and install .pc files for pkg-config],
2184 dnl ---------------------------------------------------------------------------
2186 dnl ---------------
2193 [ --enable-rpath use rpath option when generating shared libraries],
2198 dnl ---------------------------------------------------------------------------
2200 dnl ----------------------
2210 dnl strlcat/strlcpy are (as of 2012) non-standard, and are available on some
2212 dnl standard - but evolved through phases, and older implementations are likely
2217 AC_ARG_ENABLE(string-hacks,
2218 [ --enable-string-hacks work around bogus compiler/loader warnings],
2225 AC_MSG_WARN(enabling string-hacks to work around bogus compiler/loader warnings)
2238 dnl ---------------------------------------------------------------------------
2240 dnl ------------------
2241 dnl Configure-option to enable gcc warnings
2246 dnl yes: always do this, e.g., to use in generated library-headers
2256 [ --enable-warnings test: turn on gcc compiler warnings],
2268 dnl ---------------------------------------------------------------------------
2270 dnl --------
2276 dnl ---------------------------------------------------------------------------
2278 dnl ---------------
2288 # But ncurses_dll.h is generated - fix here.
2289 test -d include || mkdir include
2290 test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' "${srcdi…
2296 CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
2297 test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
2298 test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
2302 test -n "$cf_math" && AC_DEFINE_UNQUOTED(ETIP_NEEDS_${cf_math})
2303 test -n "$cf_excp" && AC_DEFINE_UNQUOTED(ETIP_NEEDS_${cf_excp})
2309 AC_MSG_RESULT([${cf_result:-(none)}])
2312 dnl ---------------------------------------------------------------------------
2314 dnl ---------------
2319 dnl Parameters (4-on are optional):
2322 dnl $3 = the library name without the "-l" option or ".so" suffix.
2329 dnl $cf_cv_find_linkage_$3 - yes/no according to whether linkage is found
2330 dnl $cf_cv_header_path_$3 - include-directory if needed
2331 dnl $cf_cv_library_path_$3 - library-directory if needed
2332 dnl $cf_cv_library_file_$3 - library-file if needed, e.g., -l$3
2350 LIBS="-l$3 $7 $cf_save_LIBS"
2356 cf_cv_library_file_$3="-l$3"
2370 if test -d "$cf_cv_header_path_$3" ; then
2373 CF_APPEND_TEXT(CPPFLAGS,-I$cf_cv_header_path_$3)
2393 LIBS="-l$3 $7 $cf_save_LIBS"
2405 if test -d "$cf_cv_library_path_$3" ; then
2408 LIBS="-l$3 $7 $cf_save_LIBS"
2409 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_$3"
2413 cf_cv_library_file_$3="-l$3"
2443 dnl ---------------------------------------------------------------------------
2445 dnl ------------------
2446 dnl Find an include-directory with the given leaf-name. This is useful for
2460 dnl ---------------------------------------------------------------------------
2462 dnl ------------------
2463 dnl Find a library-directory with the given leaf-name. This is useful for
2477 dnl ---------------------------------------------------------------------------
2479 dnl -----------------
2484 (*-g*)
2485 CF_ADD_ADAFLAGS(-g)
2489 (*-O*)
2490 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[[ ]].*//'`
2496 dnl ---------------------------------------------------------------------------
2498 dnl ---------------
2500 dnl "-Werror" flags can interfere with configure-checks. Those go into
2508 (*-Werror=*)
2513 (x-Werror=format*)
2516 (x-Werror=*)
2536 dnl ---------------------------------------------------------------------------
2538 dnl --------------
2572 ${cf_cv_main_return:-return} (rc);
2581 dnl ---------------------------------------------------------------------------
2583 dnl --------------
2590 dnl ---------------------------------------------------------------------------
2592 dnl -------------
2625 dnl ---------------------------------------------------------------------------
2627 dnl ---------------
2652 dnl ---------------------------------------------------------------------------
2654 dnl -----------------
2671 if test -f $cf_ttys
2674 …AC_DEFINE(_PATH_TTYS,$cf_ttys,[define to pathname of file containing mapping from tty name to term…
2690 ${cf_cv_main_return:-return} (fp == 0);
2709 dnl ---------------------------------------------------------------------------
2711 dnl ---------------
2728 ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
2742 dnl ---------------------------------------------------------------------------
2744 dnl -----------------
2746 dnl AIX 4.x, provide a non-working version.
2768 ${cf_cv_main_return:-return}(code != 0);
2777 dnl ---------------------------------------------------------------------------
2779 dnl ---------------
2806 dnl ---------------------------------------------------------------------------
2808 dnl ------------
2839 ret = -1;
2858 ret = -1;
2861 ${cf_cv_main_return:-return}(ret < 0);
2868 dnl ---------------------------------------------------------------------------
2870 dnl ---------------
2897 dnl ---------------------------------------------------------------------------
2899 dnl ---------------
2952 dnl ---------------------------------------------------------------------------
2954 dnl -----------------
2956 dnl compiler warnings. Though useful, not all are supported -- and contrary
2982 #line __oline__ "${as_me:-configure}"
3031 test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
3035 AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc])
3041 AC_DEFINE(GCC_PRINTF,1,[Define to 1 if the compiler supports gcc-like printf attribute.])
3043 AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc])
3049 AC_DEFINE(GCC_SCANF,1,[Define to 1 if the compiler supports gcc-like scanf attribute.])
3051 AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc])
3054 AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc])
3060 ${FGREP-fgrep} define conftest.i >>confdefs.h
3062 rm -rf ./conftest*
3065 dnl ---------------------------------------------------------------------------
3067 dnl --------------
3075 …GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //' -e 's/…
3076 test -z "$GCC_VERSION" && GCC_VERSION=unknown
3082 dnl ---------------------------------------------------------------------------
3084 dnl ---------------
3088 dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x)
3089 dnl -Winline (usually not worthwhile)
3090 dnl -Wredundant-decls (system headers make this too noisy)
3091 dnl -Wtraditional (combines too many unrelated messages, only a few useful)
3092 dnl -Wwrite-strings (too noisy, but should review occasionally). This
3093 dnl is enabled for ncurses using "--enable-const".
3094 dnl -pedantic
3098 dnl application might want to use, e.g., "no-unused" for
3099 dnl -Wno-unused
3101 dnl If $with_ext_const is "yes", add a check for -Wwrite-strings
3108 #line __oline__ "${as_me:-configure}"
3109 int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
3113 # The "-wdXXX" options suppress warnings:
3115 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential…
3116 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
3126 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
3138 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
3140 test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
3141 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
3150 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
3151 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
3154 Wbad-function-cast \
3155 Wcast-align \
3156 Wcast-qual \
3157 Wdeclaration-after-statement \
3160 Wmissing-declarations \
3161 Wmissing-prototypes \
3162 Wnested-externs \
3163 Wpointer-arith \
3165 Wstrict-prototypes \
3166 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST $1
3168 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
3170 test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
3179 (Wpointer-arith)
3187 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
3192 rm -rf ./conftest*
3196 dnl ---------------------------------------------------------------------------
3198 dnl ----------------
3222 dnl ---------------------------------------------------------------------------
3224 dnl -----------------
3226 AC_CACHE_CHECK(if GNATPREP supports -T option,cf_cv_gnatprep_opt_t,[
3228 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
3230 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
3233 dnl ---------------------------------------------------------------------------
3235 dnl ----------------
3242 (3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*|[[1-9]][[0-9]].[[0-9]]*|20[[0-9]][[0-9]])
3263 dnl ---------------------------------------------------------------------------
3265 dnl ----------------
3279 (3.[[0-9]]*)
3286 rm -rf ./conftest* ./*~conftest*
3290 rm -rf ./conftest* ./*~conftest*
3320 -Plibrary.gpr \
3321 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
3322 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
3323 -XSOURCE_DIR="`pwd`" \
3324 -XSONAME=libConfTest.so.1 \
3325 -XLIB_KIND=static 1>&AC_FD_CC 2>&1 ) ; then
3330 if test -f conftest.lib/confpackage.ali
3334 rm -rf ./conftest* ./*~conftest*
3381 dnl ---------------------------------------------------------------------------
3383 dnl --------------
3393 pragma Warnings (Off); -- the next pragma exists since 3.11p
3428 dnl ---------------------------------------------------------------------------
3430 dnl ----------------
3441 rm -rf ./conftest* ./*~conftest*
3453 rm -rf ./conftest* ./*~conftest*
3455 dnl ---------------------------------------------------------------------------
3457 dnl ---------------
3468 rm -rf ./conftest* ./*~conftest*
3484 rm -rf ./conftest* ./*~conftest*
3486 dnl ---------------------------------------------------------------------------
3488 dnl ---------------
3495 cf_cv_gnat_version=`ifelse($2,,${cf_ada_make:-gnatmake},$2) --version 2>&1 | \
3496 grep '[[0-9]].[[0-9]][[0-9]]*' |\
3497 sed -e '2,$d' -e 's/[[^0-9 \.]]//g' -e 's/^[[ ]]*//' -e 's/ .*//'`
3499 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
3502 dnl ---------------------------------------------------------------------------
3504 dnl -------------
3538 CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE)
3555 CF_ADD_CFLAGS(-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source)
3582 CF_ADD_CFLAGS(-D_GNU_SOURCE)
3596 CF_APPEND_TEXT(CPPFLAGS,-D_GNU_SOURCE)
3606 CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE)
3613 dnl ---------------------------------------------------------------------------
3615 dnl --------------
3617 dnl problem :-). If we have the compiler but no library, we'll be able to
3657 dnl ---------------------------------------------------------------------------
3659 dnl --------------
3665 AC_MSG_CHECKING(version of ${CXX:-g++})
3666 …GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //'
3667 if test -z "$GXX_VERSION"
3675 dnl ---------------------------------------------------------------------------
3677 dnl ---------------
3681 dnl -Wbad-function-cast
3682 dnl -Wmissing-declarations
3683 dnl -Wnested-externs
3686 dnl -Winline
3690 dnl application might want to use, e.g., "no-unused" for
3691 dnl -Wno-unused
3693 dnl If $with_ext_const is "yes", add a check for -Wwrite-strings
3708 int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
3713 # The "-wdXXX" options suppress warnings:
3715 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential…
3716 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential…
3717 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
3727 EXTRA_CXXFLAGS="-Wall"
3740 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
3742 test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
3743 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
3752 EXTRA_CXXFLAGS="-W -Wall"
3754 test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
3756 ([[1-2]].*)
3764 fabi-version=0 \
3766 Wignored-qualifiers \
3767 Wlogical-op \
3768 Woverloaded-virtual \
3769 Wsign-promo \
3771 Wold-style-cast \
3772 Wcast-align \
3773 Wcast-qual \
3774 Wpointer-arith \
3778 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
3780 test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
3781 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
3783 test -n "$verbose" && AC_MSG_RESULT(... no -$cf_opt)
3789 rm -rf ./conftest*
3793 dnl ---------------------------------------------------------------------------
3795 dnl ------------
3798 dnl $1 = optional parameter, to specify install-prefix for the database.
3806 if test -d "$1" ; then
3838 dnl ---------------------------------------------------------------------------
3840 dnl -----------------
3847 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
3850 if test -n "$cf_db_libs"; then
3863 result->open(result,
3873 result->open(result,
3896 ${cf_cv_main_return:-return}(result != 0)
3898 if test -n "$cf_db_libs" ; then
3910 dnl ---------------------------------------------------------------------------
3912 dnl --------------------
3948 dnl ---------------------------------------------------------------------------
3950 dnl --------------
3951 dnl Construct a search-list of directories for a nonstandard header-file
3960 # collect the current set of include-directories from compiler flags
3962 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3966 (-I*)
3967 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3980 test -d "$includedir" && {
3981 test -d "$includedir" && $1="[$]$1 $includedir"
3982 test -d "$includedir/$2" && $1="[$]$1 $includedir/$2"
3987 test -d "$oldincludedir" && {
3988 test -d "$oldincludedir" && $1="[$]$1 $oldincludedir"
3989 test -d "$oldincludedir/$2" && $1="[$]$1 $oldincludedir/$2"
3994 dnl ---------------------------------------------------------------------------
3996 dnl ---------------
3997 dnl Insert text into the help-message, for readability, from AC_ARG_WITH.
4002 dnl ---------------------------------------------------------------------------
4004 dnl ---------------
4005 dnl Construct the list of include-options according to whether we're building
4006 dnl in the source directory or using '--srcdir=DIR' option.
4010 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
4012 CPPFLAGS="-I../include $CPPFLAGS"
4014 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
4016 CPPFLAGS="-I. $CPPFLAGS"
4019 dnl ---------------------------------------------------------------------------
4021 dnl ---------------
4022 dnl prompt for/fill-in useful install-program options
4030 dnl ---------------------------------------------------------------------------
4032 dnl ----------------
4033 dnl Almost all "install" programs default to the current user's ownership.
4034 dnl Almost - MINIX is an exception.
4050 …STALL_OPT_O="`id root|sed -e 's/uid=[[0-9]]*(/ -o /' -e 's/gid=[[0-9]]*(/ -g /' -e 's/ [[^=[:space…
4057 dnl ---------------------------------------------------------------------------
4059 dnl ----------------
4060 dnl Some install-programs accept a "-p" option to preserve file modification
4066 AC_CACHE_CHECK(if install accepts -p option, cf_cv_install_p,[
4067 rm -rf ./conftest*
4071 if $INSTALL -p conftest.in conftest.out 2>/dev/null
4073 if test -f conftest.out/conftest.in
4075 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
4076 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
4077 if test -s conftest.err
4089 rm -rf ./conftest*
4092 dnl ---------------------------------------------------------------------------
4094 dnl ----------------
4096 dnl ability to suppress that for unit-testing.
4101 [ --disable-stripping do not strip (debug info) installed executables],
4108 INSTALL_OPT_S="-s"
4114 dnl ---------------------------------------------------------------------------
4116 dnl -------------------------
4117 dnl Provide an option for overriding the strip program used in install "-s"
4119 dnl coreutils install provides a --strip-program option
4125 if test -n "$INSTALL_OPT_S"
4127 AC_MSG_CHECKING(if you want to specify strip-program)
4128 AC_ARG_WITH(strip-program,
4129 [ --with-strip-program=XX specify program to use when stripping in install],
4135 AC_MSG_CHECKING(if strip-program is supported with this installer)
4136 cf_install_program=`echo "$INSTALL" | sed -e 's%[[ ]]*[[ ]]-.%%'`
4138 if test -f "$cf_install_program"
4140 check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
4141 if test -n "$check_install_version"
4162 cat >install.tmp <<-CF_EOF
4173 INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
4180 dnl ---------------------------------------------------------------------------
4182 dnl -----------------
4203 ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc"
4210 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
4218 dnl ---------------------------------------------------------------------------
4220 dnl ----------
4233 dnl ---------------------------------------------------------------------------
4235 dnl ------------
4252 CF_APPEND_TEXT(CPPFLAGS,-D_LARGE_FILES)
4256 CF_APPEND_TEXT(CPPFLAGS,-D_LARGEFILE_SOURCE)
4260 CF_APPEND_TEXT(CPPFLAGS,-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits)
4265 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
4277 int z = x - y;
4287 dnl ---------------------------------------------------------------------------
4289 dnl -----------------
4298 (OS/2*|os2*|aix[[4]]*|solaris2.1[[0-9]]|darwin*)
4303 LDFLAGS_STATIC=-static
4304 LDFLAGS_SHARED=-dynamic
4309 (aix[[4-7]]*) # from ld manpage
4310 LDFLAGS_STATIC=-bstatic
4311 LDFLAGS_SHARED=-bdynamic
4315 LDFLAGS_STATIC=-Wl,-a,archive_shared
4316 LDFLAGS_SHARED=-Wl,-a,shared_archive
4319 LDFLAGS_STATIC=-Bstatic
4320 LDFLAGS_SHARED=-Bdynamic
4323 # alternative "-oldstyle_liblookup" (not in cc manpage)
4324 LDFLAGS_STATIC=-noso
4325 LDFLAGS_SHARED=-so_archive
4328 LDFLAGS_STATIC=-Bstatic
4329 LDFLAGS_SHARED=-Bdynamic
4334 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
4338 rm -f libconftest.a
4348 rm -f conftest.*
4352 LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
4360 # some linkers simply ignore the -dynamic
4371 rm -f libconftest.*
4389 dnl ---------------------------------------------------------------------------
4391 dnl ---------------
4405 LD_RPATH_OPT="-Wl,-rpath,"
4407 LD_RPATH_OPT="-rpath "
4410 (linux*|gnu*|k*bsd*-gnu|freebsd*)
4411 LD_RPATH_OPT="-Wl,-rpath,"
4413 (openbsd[[2-9]].*|mirbsd*)
4414 LD_RPATH_OPT="-Wl,-rpath,"
4417 LD_RPATH_OPT="-rpath "
4420 LD_RPATH_OPT="-Wl,-rpath,"
4423 LD_RPATH_OPT="-rpath "
4426 LD_RPATH_OPT="-R"
4434 (x-R*)
4446 dnl ---------------------------------------------------------------------------
4448 dnl ----------------
4449 dnl Try to obtain the linker's search-path, for use in scripts.
4458 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[[("=]][[("=]]…
4460 # The -NX options tell newer versions of Linux ldconfig to not attempt to
4462 test -z "$cf_pathlist" && \
4463 cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[[ ]]/d' -e 's/:$//' | sort -u`
4465 test -z "$cf_pathlist" &&
4466 cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[[ ]]/d' -e 's/:$//p' | sort -u`
4469 test -z "$cf_pathlist" &&
4470 cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*[$],\1,p' | sort -u`
4472 if test -z "$cf_pathlist"
4475 if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
4483 if test -z "$cf_pathlist"
4486 if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
4488 case x`(isainfo -b)` in
4493 test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
4503 if test -z "$cf_pathlist"
4505 # HP-UX
4506 if test x"`uname -s`" = xHP-UX
4522 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
4527 if test -d "$cf_path"; then
4528 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
4534 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
4537 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
4540 dnl ---------------------------------------------------------------------------
4542 dnl ---------------
4543 dnl Construct a search-list of directories for a nonstandard library-file
4552 if test -n "${LDFLAGS}${LIBS}" ; then
4556 (-L*)
4557 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4569 dnl ---------------------------------------------------------------------------
4571 dnl ------------------
4573 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4575 …_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e '…
4579 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4581 dnl ---------------------------------------------------------------------------
4583 dnl -------------
4584 dnl Compute the library-prefix for the given host system
4596 (*-msvc*)
4605 dnl ---------------------------------------------------------------------------
4607 dnl ------------
4609 dnl Makefiles, and the recursion rule for the top-level Makefile. If the
4610 dnl subdirectory is a library-source directory, modify the Libs_To_Make list in
4616 dnl lib<name>.so ->
4617 dnl lib<name>.so.<major> ->
4635 if test -n "$TINFO_SUFFIX" ; then
4654 if test ! -d "$srcdir/$cf_dir" ; then
4656 elif test -f "$srcdir/$cf_dir/modules" ; then
4661 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
4689 rm -f resulting.map
4702 test -z "$cf_libname" && cf_libname="$cf_dir"
4704 if test -n "${LIB_SUFFIX}"
4722 if test -n "$cf_version_name"
4734 if test -n "${USE_LIB_SUFFIX}"
4746 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
4750 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
4751 cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
4754 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
4758 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
4765 if test -n "$cf_add_lib"
4780 while test -n "$cf_r_parts"
4782 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
4783 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[[^ ]]* //'`
4788 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
4791 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
4797 if test -n "$cf_add_lib"; then
4805 cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
4809 if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
4817 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
4824 cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
4829 test -n "$cf_item" && cf_list="$cf_list $cf_item"
4835 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
4836 -e "s%@SHARED_LIB@%$SHARED_LIB%" \
4840 $AWK -f "$srcdir/mk-0th.awk" \
4890 if test -n "${USE_ARG_SUFFIX}" ; then
4891 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
4892 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
4904 if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
4906 elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
4913 if test -n "$USE_LIB_SUFFIX" ; then
4939 $AWK -f "$srcdir/mk-1st.awk" \
4946 make_phony="${cf_cv_make_PHONY:-no}" \
4957 ReLink=${cf_cv_do_relink:-no} \
4958 ReRanlib=${cf_cv_do_reranlib:-yes} \
4975 $AWK -f "$srcdir/mk-2nd.awk" \
4998 cat >> Makefile <<-CF_EOF
5011 if test ! -d "$srcdir/$cf_dir" ; then
5015 if test -f "$cf_dir/Makefile" ; then
5026 if test -f "$srcdir/$cf_dir/modules" ; then
5029 cat >> Makefile <<-CF_EOF
5037 if test -f "$srcdir/$cf_dir/headers" ; then
5054 elif test -f "$srcdir/$cf_dir/headers" ; then
5068 cat >> Makefile <<-CF_EOF
5093 cat >> Makefile <<-CF_EOF
5111 rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
5112 rm -f headers.sh headers.sed mk_shared_lib.sh
5113 rm -f edit_man.* man_alias.* *.tmp
5114 rm -rf \${DIRS_TO_MAKE}
5123 rm -f headers.sed headers.sh
5125 dnl ( generating this script makes the makefiles a little tidier :-)
5130 # subdirectory of the build tree. It generates a sed-script in the parent
5141 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
5142 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
5151 for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
5168 for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
5186 rm -f \$TMPSRC
5187 sed -f \$TMPSED \$SRC > \$TMPSRC
5197 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
5200 rm -f \$TMPSRC \$TMPSED
5207 if test ! -d "$srcdir/$cf_dir" ; then
5211 if test -f "$srcdir/$cf_dir/headers" ; then
5212 $AWK -f "$srcdir/mk-hdr.awk" \
5218 if test -f "$srcdir/$cf_dir/modules" ; then
5221 cat >> $cf_dir/Makefile <<-CF_EOF
5229 makedepend -- ${CPPFLAGS} -- ${C_SRC}
5231 # DO NOT DELETE THIS LINE -- make depend depends on it.
5238 dnl ---------------------------------------------------------------------------
5240 dnl -------------
5260 ${cf_cv_main_return:-return}(0);
5267 …$3_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgr…
5268 test -z "$cf_cv_$3_soname" && cf_cv_$3_soname=unknown
5271 rm -rf ./conftest*
5276 dnl ---------------------------------------------------------------------------
5278 dnl -------------
5279 dnl Compute the library file-suffix from the given model name
5293 (*-msvc*)
5304 (*-msvc*)
5315 (aix[[5-7]]*)
5319 (*-msvc*)
5351 (*-msvc*)
5361 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
5367 dnl ---------------------------------------------------------------------------
5369 dnl -----------
5370 dnl Compute the string to append to -library from the given model name
5383 test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
5385 dnl ---------------------------------------------------------------------------
5387 dnl ----------------
5388 dnl Some systems have a non-ANSI linker that doesn't pull in modules that have
5394 AC_MSG_CHECKING([if data-only library module links])
5396 rm -f conftest.a
5405 rm -f conftest.$ac_ext data.o
5412 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
5428 rm -f conftest.$ac_ext func.o
5436 ${cf_cv_main_return:-return} (!testfunc());
5447 AC_DEFINE(BROKEN_LINKER,1,[if data-only library module does not link])
5453 dnl ---------------------------------------------------------------------------
5455 dnl -------------
5457 dnl A few non-Unix systems implement symlink, but not link.
5458 dnl A few non-systems implement neither (or have nonfunctional versions).
5460 dnl This allows for a 2-second difference in modification times to allow for
5496 long diff = (dst_sb.st_mtime - src_sb.st_mtime);
5497 if (diff < 0) diff = -diff;
5506 ${cf_cv_main_return:-return} (fail);
5514 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5520 dnl ---------------------------------------------------------------------------
5522 dnl ------------
5524 dnl options to lower-levels. It is very useful for "make -n" -- if we have it.
5526 dnl ${MAKEFLAGS} variable incompatible because it adds the assignments :-)
5532 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
5539 …cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | …
5542 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
5551 (.-)
5558 rm -f cf_makeflags.tmp
5563 dnl ---------------------------------------------------------------------------
5565 dnl -------------
5566 dnl Check if the make-program handles a ".PHONY" target, e.g,. a target which
5574 dnl a few others (i.e., GNU make and the non-POSIX "BSD" make):
5590 AC_CACHE_CHECK(for \".PHONY\" make-support, cf_cv_make_PHONY,[
5591 rm -rf conftest*
5611 ${MAKE:-make} always DATA=$cf_data
5612 ${MAKE:-make} once DATA=$cf_data
5613 ${MAKE:-make} -t always once
5614 if test -f always ; then
5616 elif test ! -f always.out ; then
5618 elif test ! -f once.out ; then
5620 elif ! cmp -s always.out once.out ; then
5629 rm -f ./*.out
5637 rm -rf conftest*
5646 dnl ---------------------------------------------------------------------------
5648 dnl ------------
5657 AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS:-ctags}, yes, no)
5660 AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS:-etags}, yes, no)
5683 dnl ---------------------------------------------------------------------------
5685 dnl -----------------
5689 dnl compress - man checks for, can display compressed files
5690 dnl bzip2 - man checks for, can display bzip2'd files
5691 dnl gzip - man checks for, can display gzip'd files
5692 dnl xz - man checks for, can display xz'd files
5694 dnl BSDI - files in the cat-directories are suffixed ".0"
5695 dnl formatted - installer should format (put files in cat-directory)
5696 dnl catonly - installer should only format, e.g., for a turnkey system.
5704 AC_MSG_CHECKING(format of man-pages)
5706 AC_ARG_WITH(manpage-format,
5707 [ --with-manpage-format specify manpage-format: gzip/compress/bzip2/xz,
5713 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
5714 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
5720 if test -z "$MANPATH" ; then
5724 # look for the 'date' man-page (it is most likely to be installed!)
5730 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
5732 test -z "$cf_dir" && cf_dir=/usr/man
5735 cf_test=`echo "$cf_name" | sed -e 's/*//'`
5759 if test -n "$MANPAGE_FORMAT" ; then
5772 if test -n "$MANPAGE_FORMAT" ; then
5777 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
5794 if test -n "$cf_unknown" ; then
5795 AC_MSG_WARN(Unexpected manpage-format $cf_unknown)
5822 cf_manpage_coptions=-n
5842 dnl ---------------------------------------------------------------------------
5844 dnl ------------------
5852 AC_ARG_WITH(manpage-renames,
5853 [ --with-manpage-renames specify manpage-renaming],
5862 if test -f /etc/debian_version ; then
5874 elif test ! -f "$MANPAGE_RENAMES" ; then
5881 dnl ---------------------------------------------------------------------------
5883 dnl -------------------
5885 dnl man-directory. This accommodates the older, less-capable implementations
5891 AC_ARG_WITH(manpage-aliases,
5892 [ --with-manpage-aliases specify manpage-aliases using .so],
5911 AC_ARG_WITH(manpage-symlinks,
5912 [ --with-manpage-symlinks specify manpage-aliases using symlinks],
5927 dnl ---------------------------------------------------------------------------
5929 dnl --------------
5936 AC_ARG_WITH(manpage-tbl,
5937 [ --with-manpage-tbl specify manpage processing with tbl],
5943 dnl ---------------------------------------------------------------------------
5945 dnl -------------
5955 ${cf_cv_main_return:-return}(0);
5968 dnl ---------------------------------------------------------------------------
5970 dnl ------------
5971 dnl Try to determine if the man-pages on the system are compressed, and if
5973 dnl will install man-pages.
5988 test ! -d man && mkdir man
5995 # this script is generated by the configure-script CF_MAN_PAGES macro.
6015 trap "rm -f \$TMP; exit 1" 1 2 3 15
6016 trap "rm -f \$TMP" 0
6045 # process the list of source-files
6049 (*.[[0-9]]*)
6050 section=\`expr "\$i" : '.*\\.\\([[0-9]]\\)[[xm]]*'\`;
6052 if test ! -d "\$cf_subdir\${section}" ; then
6053 mkdir -p "\$cf_subdir\$section"
6058 if test ! -f "$cf_man_alias" ; then
6059 cat >>$cf_man_alias <<-CF_EOF2
6071 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6073 cat >>$cf_edit_man <<-CF_EOF
6086 test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
6087 if test ! -f "\$cf_full_alias" ; then
6096 cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
6098 …aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$cf_full_alias" |sed -f "$cf_man_alias" | sort
6114 if test -z "\$cf_target" ; then
6124 sed -f "$cf_man_alias" \\
6129 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
6146 sed -e "/\\#[ ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
6153 sed -e "/\\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
6160 nroff -man \$TMP >\$TMP.out
6165 if test -n "$cf_manpage_compress" ; then
6168 if ( "$cf_manpage_compress" -f \$TMP )
6182 cf_target="\`echo \$cf_target|sed -e 's/\\.[[1-9]]\\+[[a-z]]*/.0/'\`"
6189 suffix=\`basename "\$cf_target" | sed -e 's%^[[^.]]*%%'\`
6191 if test -n "$EXTRA_SUFFIX" ; then
6201 test -d "\$cf_subdir\${section}" &&
6202 test -n "\$aliases" && (
6204 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([[^/]][[^/]]*/[[^/]][[^/]]*$\\)%\\1%'\`
6205 …test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_stri…
6215 if test -f "\$cf_alias\${suffix}" ; then
6216 if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
6224 (*-f)
6231 rm -f "\$cf_alias\${suffix}"
6240 if test -n "$cf_manpage_compress" ; then
6242 if test -n "$cf_manpage_so_strip" ; then
6243 "$cf_manpage_compress" $cf_manpage_coptions -f \$TMP
6250 rm -f "\$cf_alias\${suffix}"
6257 test -f "\$cf_target" && (
6259 rm -f "\$cf_target"
6261 test -d "\$cf_subdir\${section}" &&
6262 test -n "\$aliases" && (
6272 rm -f "\$cf_alias\${suffix}"
6295 dnl ---------------------------------------------------------------------------
6297 dnl -------------------
6298 dnl Convert a default-libname to the actual one used via CF_WITH_LIB_BASENAME.
6301 dnl $2 = default-libname
6306 dnl ---------------------------------------------------------------------------
6308 dnl -----------
6310 dnl Rhapsody 5.5, does not have -lm. We cannot use the simpler
6314 AC_CACHE_CHECK(if -lm needed for math functions,
6329 LIBS="$LIBS -lm"
6330 AC_CACHE_CHECK(if -lm is available for math functions,
6344 ifelse($1,,[CF_ADD_LIB(m)],[$1=-lm])
6355 dnl ---------------------------------------------------------------------------
6357 dnl ----------------------
6358 dnl Check if the file-system supports mixed-case filenames. If we're able to
6362 AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
6365 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
6373 rm -f conftest CONFTEST
6375 if test -f CONFTEST ; then
6380 rm -f conftest CONFTEST
6383 … yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.])
6385 dnl ---------------------------------------------------------------------------
6387 dnl ----------
6395 rm -rf ./conftest*
6424 ${cf_cv_main_return:-return}(result);
6437 dnl ---------------------------------------------------------------------------
6439 dnl ----------
6443 echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
6445 dnl ---------------------------------------------------------------------------
6447 dnl ----------------
6462 dnl ---------------------------------------------------------------------------
6464 dnl ---------------------------
6482 dnl ---------------------------------------------------------------------------
6484 dnl ------------------
6488 dnl $2 = help-text
6498 : "${with_cflags:=-g}"
6507 AC_MSG_RESULT(${with_$1:-no})
6510 (.*-g*)
6512 (.*-g*)
6515 CF_ADD_CFLAGS([-g])
6521 dnl ---------------------------------------------------------------------------
6523 dnl ----------------
6528 if test -n "$1" ; then
6529 case `echo "$1" | sed -e 's/^[[0-9]]*$/0/g'` in
6540 dnl ---------------------------------------------------------------------------
6542 dnl -------------
6543 dnl Compute the object-directory name from the given model name
6560 dnl ---------------------------------------------------------------------------
6562 dnl -------------------------
6569 # Construct a sed-script to perform renaming within man-pages
6570 test -n "$verbose" && echo "creating edit_man.sed"
6571 test ! -d man && mkdir man
6572 FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
6575 dnl ---------------------------------------------------------------------------
6577 dnl ----------
6591 dnl ---------------------------------------------------------------------------
6593 dnl ------------
6607 test -z "[$]$1" && $1="$2"
6612 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
6615 if test -z "$cf_path_prog" ; then
6622 elif test -z "$cf_path_args" ; then
6630 if test -n "$cf_path_prog" ; then
6633 …test -n "$cf_path_args" && AC_DEFINE_UNQUOTED($1_ARGS,"$cf_path_args",Define to provide args for $…
6636 dnl ---------------------------------------------------------------------------
6638 dnl --------------
6655 (.[[a-zA-Z]]:[[\\/]]*) # OS/2 EMX
6661 $1=`echo "[$]$1" | sed -e s%NONE%$cf_path_syntax%`
6666 $1=`echo "[$]$1" | sed -e s%NONE%$cf_path_syntax%`
6673 dnl ---------------------------------------------------------------------------
6675 dnl -------------
6676 dnl Check for the package-config program, unless disabled by command-line.
6678 dnl Sets $PKG_CONFIG to the pathname of the pkg-config program.
6681 AC_MSG_CHECKING(if you want to use pkg-config)
6682 AC_ARG_WITH(pkg-config,
6683 [[ --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD]],
6694 [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)],
6695 [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)])
6702 test -z "$PKG_CONFIG" && PKG_CONFIG=none
6706 AC_MSG_WARN(pkg-config is not installed)
6711 dnl ---------------------------------------------------------------------------
6713 dnl -----------------
6716 dnl POSIX.1-1990 _POSIX_SOURCE
6717 dnl POSIX.1-1990 and _POSIX_SOURCE and
6718 dnl POSIX.2-1992 C-Language _POSIX_C_SOURCE=2
6720 dnl POSIX.1b-1993 _POSIX_C_SOURCE=199309L
6721 dnl POSIX.1c-1996 _POSIX_C_SOURCE=199506L
6749 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6752 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6764 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE")
6790 dnl ---------------------------------------------------------------------------
6792 dnl ----------------
6793 dnl POSIX documents test-macros which an application may set before any system
6799 dnl overrides the corresponding test-macros. Doing that introduces portability
6806 AC_CACHE_CHECK(if the POSIX test-macros are already defined,cf_cv_posix_visible,[
6808 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
6809 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
6810 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
6811 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
6817 dnl ---------------------------------------------------------------------------
6819 dnl ------------
6835 CPPFLAGS="$CPPFLAGS ifelse([$2],,-D$1,[-D$1=$2])"
6840 #if $1-$2 < 0
6841 #error $1-$2 is negative
6845 # perhaps we can override it - try...
6846 CPPFLAGS="$CPPFLAGS -D$1=$2"
6850 dnl ---------------------------------------------------------------------------
6852 dnl ------------
6854 dnl Makefiles, and the recursion rule for the top-level Makefile.
6866 if test ! -d "$srcdir/$cf_dir" ; then
6868 elif test -f "$srcdir/$cf_dir/programs" ; then
6869 $AWK -f $1 "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
6874 dnl ---------------------------------------------------------------------------
6876 dnl ----------
6881 dnl ---------------------------------------------------------------------------
6883 dnl -----------
6888 test -z "$AWK" && AC_MSG_ERROR(No awk program found)
6890 dnl ---------------------------------------------------------------------------
6892 dnl ----------
6907 dnl ---------------------------------------------------------------------------
6909 dnl --------------
6921 AC_MSG_CHECKING([whether [$]$1 understands -c and -o together])
6927 ${cf_cv_main_return:-return}(0);
6931 # existing .o file with -o, though they will create one.
6932 ac_try='[$]$1 $2 -c conftest.$ac_ext -o conftest2.$ac_objext >&AC_FD_CC'
6934 test -f conftest2.$ac_objext && AC_TRY_EVAL(ac_try);
6940 rm -rf ./conftest*
6948 dnl ---------------------------------------------------------------------------
6950 dnl ------------
6983 rm -rf ./conftest* ./*~conftest*
6998 …prconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&AC_FD_CC | ${AWK:-awk} '/^\*/{pr…
6999 test -n "$cf_gprconfig_value" && break
7003 …prconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&AC_FD_CC | ${AWK:-awk} '/^\*/{pr…
7005 if test -n "$cf_gprconfig_value"
7016 rm -rf ./conftest* ./*~conftest*
7053 dnl ---------------------------------------------------------------------------
7055 dnl ---------------
7056 dnl Force $INSTALL to be an absolute-path. Otherwise, edit_man.sh and the
7066 test -z "$cf_dir" && cf_dir=.
7067 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
7071 dnl ---------------------------------------------------------------------------
7073 dnl ----------------
7082 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
7091 dnl ---------------------------------------------------------------------------
7093 dnl ------------
7099 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
7105 dnl ---------------------------------------------------------------------------
7107 dnl ------------
7108 dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include "-f"
7112 AC_MSG_CHECKING(if $LN_S -f options work)
7114 rm -f conf$$.src conf$$dst
7117 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
7122 rm -f conf$$.dst conf$$src
7125 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
7127 dnl ---------------------------------------------------------------------------
7129 dnl --------
7130 dnl Attempt to determine if we've got one of the flavors of regular-expression
7139 # -lsystre -ltre -lintl -liconv
7177 AC_CACHE_CHECK(for regular-expression headers,cf_cv_regex_hdrs,[
7223 dnl ---------------------------------------------------------------------------
7225 dnl ----------------
7232 cf_tmp_cflag=`echo "x$1" | sed -e 's/^.//' -e 's/=.*//'`
7235-e 's/^.//' -e 's/[[ ]][[ ]]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[[^ ]][[^ ]]*\\)\?%%" -e 's/^[[ ]…
7241 dnl ---------------------------------------------------------------------------
7243 dnl ----------------
7244 dnl Remove all -U and -D options that refer to the given symbol from a list
7246 dnl compilers process -U and -D options from left-to-right, so a -U option
7247 dnl cannot be used to cancel the effect of a preceding -D option.
7255 sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \
7256 -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
7258 dnl ---------------------------------------------------------------------------
7260 dnl -------------
7269 $1=`echo "$2" | sed -e 's/-l$3[[ ]]//g' -e 's/-l$3[$]//'`
7271 dnl ---------------------------------------------------------------------------
7273 dnl ---------------------
7275 dnl $1 = name of current macro
7282 dnl ---------------------------------------------------------------------------
7284 dnl -------------
7290 if test -n "$LD_RPATH_OPT" ; then
7301 …[cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.…
7302 …rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[[ ]]/%/%' -e '…
7304 # If we passed the link-test, but get a "not found" on a given library,
7309 if test -n "$cf_rpath_oops"
7318 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
7320 CF_VERBOSE(...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src)
7321 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7340 dnl ---------------------------------------------------------------------------
7342 dnl ---------------
7344 dnl EXTRA_LDFLAGS for each -L option found.
7349 dnl but LIBS often has misplaced -L options.
7358 (-L*)
7362 if test -n "$cf_rpath_list"
7366 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7377 if test "$LD_RPATH_OPT" = "-R " ; then
7378 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7380 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7384 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7387 CF_VERBOSE(...Filter $cf_rpath_src ->$cf_rpath_tmp)
7400 dnl ---------------------------------------------------------------------------
7402 dnl ------------------
7406 dnl $1 = name of current macro
7416 x-[[IUD]]*)
7425 dnl ---------------------------------------------------------------------------
7427 dnl --------------
7428 dnl --------------
7434 dnl the build-tree, i.e., by making use of the libraries that are compiled in
7435 dnl $rel_builddir/lib We avoid compiling-in a $rel_builddir/lib path for the
7459 INSTALL_LIB="-m 644"
7473 AC_ARG_WITH(shlib-version,
7474 [[ --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names]],
7475 [test -z "$withval" && withval=auto
7494 # Some less-capable ports of gcc support only -fpic
7513 for CC_SHARED_OPTS in -fPIC -fpic ''
7525 (aix4.[3-9]*|aix[[5-7]]*)
7527 CC_SHARED_OPTS='-Wl,-brtl'
7528 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -
7530 CC_SHARED_OPTS='-brtl'
7531 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
7532 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]…
7536 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
7546 cat >mk_shared_lib.sh <<-CF_EOF
7549 IMPORT_LIB=\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
7551 cat <<-EOF
7556 …exec \[$]* ${LDFLAGS} -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{S…
7568 cat >mk_shared_lib.sh <<-CF_EOF
7571 IMPORT_LIB=\`echo "\[$]1" | sed -e 's/msys-/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
7573 cat <<-EOF
7578 …exec \[$]* ${LDFLAGS} -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{S…
7583 cf_try_cflags="no-cpp-precomp"
7584 CC_SHARED_OPTS="-dynamic"
7585 …AGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VE…
7588 AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_search_paths_first, [
7590 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7594 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7599 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o…
7601 (hpux[[7-8]]*)
7602 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
7606 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $[@]'
7607 INSTALL_LIB="-m 555"
7610 # (tested with gcc 2.7.2 -- I don't have c89)
7612 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7615 LD_SHARED_OPTS='-Wl,+b,${libdir}'
7617 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $[@]'
7618 # HP-UX shared libraries must be executable, and should be
7620 INSTALL_LIB="-m 555"
7630 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_sona…
7638 CC_SHARED_OPTS='-KPIC'
7639 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $[@]` -o $[@]'
7641 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $[@]` -o $[@]'
7645 (linux*|gnu*|k*bsd*-gnu)
7646 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7654 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o…
7662 LOCAL_LDFLAGS="-link -dll"
7664 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
7669 cat >mk_shared_lib.sh <<-CF_EOF
7672 IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.lib/'\`
7676 cat <<-EOF
7681 args=\$(echo \[$]* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
7682 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
7686 cat >mk_prog.sh <<-CF_EOF
7695 while test \[$]# -gt 0; do
7697 -link)
7698 # ignore -link argument
7700 -M[[TD]] | -M[[TD]]d)
7701 # ignore runtime-library option
7703 -dll)
7706 -W* | -w*)
7709 -D*)
7712 -I*)
7715 -l*)
7716 libs+=("\`echo \"\[$]1\" | sed \"s/^-l//\"\`")
7718 -L*)
7719 ldopts+=("\`echo \"\[$]1\" | sed \"s/^-L/-LIBPATH:/\"\`")
7724 -Wl,*)
7725 for linkarg in \`echo '\[$]1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
7732 -o)
7734 ldopts+=("-out:\[$]1")
7743 if [[ "\$isdll" -ne 0 ]]; then
7752 cat <<-EOF
7768 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
7770 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
7775 cat >mk_shared_lib.sh <<-CF_EOF
7778 IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
7780 cat <<-EOF
7785 …exec \[$]* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-
7789 (openbsd[[2-9]].*|mirbsd*)
7790 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7797 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7799 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-
7803 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $[@]'
7807 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $[@]'
7809 (nto-qnx*|openbsd*|freebsd[[12]].*)
7810 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7811 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $[@]'
7815 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7822 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o…
7825 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7831 if test -f /usr/libexec/ld.elf_so; then
7838 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]'
7840 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $[@]'
7847 …MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*"
7850 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7853 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]'
7854 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7860 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
7863 CC_SHARED_OPTS='-belf -KPIC'
7865 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $[@] .${REL_VERSION}`.${ABI_VERSION} -o [$]@'
7877 CC_SHARED_OPTS='-KPIC'
7879 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $[@]'
7886 LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}"
7890 EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS"
7895 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7902 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $[@]'
7904 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $[@]'
7910 CC_SHARED_OPTS='-KPIC'
7912 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o [$]@'
7920 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7924 (*'-o $[@]')
7928 AC_MSG_WARN(ignored --with-shlib-version)
7934 if test -n "$cf_try_cflags"
7937 #line __oline__ "${as_me:-configure}"
7942 return (argv[[argc-1]] == 0) ;
7948 CFLAGS="$cf_save_CFLAGS -$cf_opt"
7949 AC_MSG_CHECKING(if CFLAGS option -$cf_opt works)
7961 # RPATH_LIST is a colon-separated list of directories
7962 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7963 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7986 dnl ---------------------------------------------------------------------------
7988 dnl ----------------
7990 dnl substitution into MK_SHARED_LIB string for the "-soname" (or similar)
8004 dnl ---------------------------------------------------------------------------
8006 dnl -----------
8012 dnl winsize declaration is left alone - we may revisit this if Apple choose to
8054 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
8059 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8063 dnl ---------------------------------------------------------------------------
8065 dnl ---------------
8099 dnl ---------------------------------------------------------------------------
8101 dnl -------------
8102 dnl Check for definitions & structures needed for window size-changing
8104 dnl https://stackoverflow.com/questions/18878141/difference-between-structures-ttysize-and-winsize/…
8108 AC_CACHE_CHECK(declaration of size-change, cf_cv_sizechange,[
8116 if test -n "$cf_opts"
8118 CF_APPEND_TEXT(CPPFLAGS,-D$cf_opts)
8131 * termios.h -- it is only in termio.h and ptem.h
8164 echo "size-change succeeded ($cf_opts)" >&AC_FD_CC
8165 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
8179 dnl ---------------------------------------------------------------------------
8181 dnl --------------
8182 dnl For each parameter, test if the source-directory exists, and if it contains
8187 dnl SUB_MAKEFILES which are used in the makefile-generation scheme.
8193 # dependencies and linker-arguments for test-programs
8200 TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
8201 TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
8208 if test -f "$srcdir/$cf_dir/modules" ; then
8210 if test -z "$cf_cv_src_modules"; then
8220 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
8231 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
8232 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
8240 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
8241 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
8261 # always make this, to install the ncurses-config script
8274 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada…
8288 if test -n "$ADA_SUBDIRS"; then
8296 dnl ---------------------------------------------------------------------------
8298 dnl -----------------
8299 dnl Check for -lstdc++, which is GNU's standard C++ library.
8300 dnl If $CXXLIBS is set, add that to the libraries used for test-linking.
8301 dnl If -lstdc++ was not already added to $LIBS or $CXXLIBS, and is needed,
8305 if test -n "$GXX" ; then
8322 if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
8348 dnl ---------------------------------------------------------------------------
8350 dnl --------------
8351 dnl Remove "-g" option from the compiler options
8353 [$1=`echo "${$1}" | CF__SED_TRIMBLANKS(-e 's%-g %%' -e 's%-g$%%')`])dnl
8354 dnl ---------------------------------------------------------------------------
8356 dnl -------------------
8381 dnl ---------------------------------------------------------------------------
8383 dnl -----------------
8398 (*-D_POSIX_SOURCE*)
8418 dnl ---------------------------------------------------------------------------
8420 dnl --------------
8421 dnl Construct a search-list for a nonstandard header/lib-file
8442 dnl ---------------------------------------------------------------------------
8444 dnl -----------
8461 dnl ---------------------------------------------------------------------------
8463 dnl ------------------------
8464 dnl Get the version-number for use in shared-library naming, etc.
8468 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[[ ]]*=' "$srcdir/dist.mk" | sed -e 's/^[[^0-9]]*//'…
8469 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[[ ]]*=' "$srcdir/dist.mk" | sed -e 's/^[[^0-9]]*//'…
8470 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[[ ]]*=' "$srcdir/dist.mk" | sed -e 's/^[[^0-9]]*//'…
8489 dnl ---------------------------------------------------------------------------
8491 dnl ------------------
8512 dnl ---------------------------------------------------------------------------
8514 dnl ---------------
8521 dnl ---------------------------------------------------------------------------
8523 dnl -----------------
8524 dnl This is a simple wrapper to use for pkg-config, for libraries which may be
8529 dnl $3 = logic to use if pkg-config does not have the package
8533 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$1"; then
8535 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$1" 2>/dev/null`"
8536 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$1" 2>/dev/null`"
8548 dnl ---------------------------------------------------------------------------
8550 dnl -------------------
8558 CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE)
8569 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8573 dnl ---------------------------------------------------------------------------
8575 dnl ----------------
8578 dnl long, but on newer 64-bit machines, probably want an int. If we're using
8612 ${cf_cv_main_return:-return}(0);
8618 rm -f cf_test.out
8625 dnl ---------------------------------------------------------------------------
8627 dnl -----------------
8641 dnl ---------------------------------------------------------------------------
8643 dnl --------------------
8656 dnl ---------------------------------------------------------------------------
8658 dnl --------
8663 $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8665 dnl ---------------------------------------------------------------------------
8667 dnl -----------
8683 [cf_cv_utf8_lib=add-on],
8689 if test "$cf_cv_utf8_lib" = "add-on" ; then
8696 dnl ---------------------------------------------------------------------------
8698 dnl ----------
8701 dnl Finally, try to accommodate pre-ISO C 1999 headers.
8781 dnl ---------------------------------------------------------------------------
8783 dnl ----------
8786 [test -n "$verbose" && echo " $1" 1>&AC_FD_MSG
8789 dnl ---------------------------------------------------------------------------
8791 dnl ---------------
8794 dnl (automake is a textbook-example of why the latter is a bad idea, but there
8798 dnl libtool-version release-version patch-version
8800 dnl release-version
8802 dnl libtool-version (see ?) consists of 3 integers separated by '.'
8803 dnl release-version consists of a major version and minor version
8804 dnl separated by '.', optionally followed by a patch-version
8805 dnl separated by '-'. The minor version need not be an
8807 dnl patch-version is an integer in the form yyyymmdd, so ifdef's and
8811 dnl simply extracts the first field using 'cut -f1'.
8818 if test -f "$srcdir/VERSION" ; then
8822 cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
8823 cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
8824 cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
8829 VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
8830 test -z "$VERSION_MAJOR" && AC_MSG_ERROR(missing major-version)
8832 VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[[^.]]*\.//' -e 's/-.*//'`
8833 test -z "$VERSION_MINOR" && AC_MSG_ERROR(missing minor-version)
8838 VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[[^-]]*-//'`
8841 AC_MSG_ERROR(missing patch-date $VERSION_PATCH)
8843 (.[[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]])
8846 AC_MSG_ERROR(illegal patch-date $VERSION_PATCH)
8870 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",[Define to the package-name])
8877 dnl ---------------------------------------------------------------------------
8879 dnl -------------
8880 dnl Check if type wide-character type $1 is declared, and if so, which header
8927 dnl ---------------------------------------------------------------------------
8929 dnl ---------------
8930 dnl Check for compiler-support for weak symbols.
8953 dnl ---------------------------------------------------------------------------
8955 dnl -------------------
8961 AC_ARG_WITH(abi-altered,
8962 [ --with-abi-altered=XXX override visible ABI version, for packaging],[
8971 dnl ---------------------------------------------------------------------------
8973 dnl -------------------
8981 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
8982 AC_ARG_WITH(abi-version,
8983 [ --with-abi-version=XXX override derived ABI version],[
9003 dnl ---------------------------------------------------------------------------
9005 dnl --------------------
9006 dnl Command-line option to specify the Ada95 compiler.
9009 AC_ARG_WITH(ada-compiler,
9010 [[ --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)]],
9016 dnl ---------------------------------------------------------------------------
9018 dnl -------------------
9019 dnl Command-line option to specify where Ada includes will install.
9022 CF_WITH_PATH(ada-include,
9023 [ --with-ada-include=DIR find Ada95 includes in DIR],
9030 dnl ---------------------------------------------------------------------------
9032 dnl -------------------
9034 dnl -------------------
9035 dnl Command-line option to specify how to name the resulting Ada library.
9039 AC_ARG_WITH(ada-libname,
9040 [[ --with-ada-libname[=XXX] use XXX as Ada95 library name]],
9051 dnl ---------------------------------------------------------------------------
9053 dnl -------------------
9054 dnl Command-line option to specify where Ada objects will install.
9057 CF_WITH_PATH(ada-objects,
9058 [ --with-ada-objects=DIR find Ada95 objects in DIR],
9065 dnl ---------------------------------------------------------------------------
9067 dnl ---------------------
9068 dnl Command-line option to specify if an Ada95 shared library should be built,
9073 AC_ARG_WITH(ada-sharedlib,
9074 [ --with-ada-sharedlib build Ada95 shared library; requires GNAT project support],
9109 dnl ---------------------------------------------------------------------------
9111 dnl ----------------
9112 dnl Configure-option for dbmalloc. The optional parameter is used to override
9116 [ --with-dbmalloc test: use Conor Cahill's dbmalloc library],
9124 dnl ---------------------------------------------------------------------------
9126 dnl ---------------
9127 dnl Configure-option for dmalloc. The optional parameter is used to override
9131 [ --with-dmalloc test: use Gray Watson's dmalloc library],
9139 dnl ---------------------------------------------------------------------------
9141 dnl -------------------
9148 AC_MSG_CHECKING(if exported-symbols file should be used)
9149 AC_ARG_WITH(export-syms,
9150 [[ --with-export-syms[=SYM-FILE] limit symbols exported by libtool to those listed in SYM-FILE]],
9161 EXPORT_SYMS="-export-symbols $with_export_syms"
9165 dnl ---------------------------------------------------------------------------
9167 dnl -----------
9175 [ --with-gpm use Alessandro Rubini's GPM library],
9203 dnl ---------------------------------------------------------------------------
9205 dnl ---------------
9216 dnl ACLOCAL=`aclocal --print-ac-dir`
9217 dnl if test -z "$ACLOCAL" ; then
9220 dnl elif test ! -f $ACLOCAL/libtool.m4 ; then
9229 dnl rm -f $ORIG
9232 dnl # sed the LIBTOOL= assignment to omit the current directory?
9233 dnl sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL:-libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL
9236 dnl autoconf-257 $*
9245 LIB_CREATE='${AR} -cr'
9260 [ --with-libtool generate libraries with libtool],
9276 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
9283 if test -z "$LIBTOOL" ; then
9287 …TE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSIO…
9290 LIB_CLEAN='${LIBTOOL} --mode=clean'
9291 LIB_COMPILE='${LIBTOOL} --mode=compile'
9292 LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
9293 LIB_INSTALL='${LIBTOOL} --mode=install'
9294 LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
9299 # special hack to add -no-undefined (which libtool should do for itself)
9302 (cygwin*|msys*|mingw32*|os2*|uwin*|aix[[4-7]])
9303 LT_UNDEF=-no-undefined
9308 # special hack to add --tag option for C++ compiler
9310 (1.[[5-9]]*|[[2-9]].[[0-9.a-z]]*)
9311 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
9312 LIBTOOL="$LIBTOOL --tag=CC"
9323 test -z "$LIBTOOL" && ECHO_LT=
9341 dnl ---------------------------------------------------------------------------
9343 dnl --------------------
9346 dnl ./configure --with-libtool-opts=-static
9347 dnl to get the same behavior as automake-flavored
9348 dnl ./configure --enable-static
9351 AC_ARG_WITH(libtool-opts,
9352 [[ --with-libtool-opts[=XXX] give libtool additional options XXX]],
9367 dnl ---------------------------------------------------------------------------
9369 dnl --------------------
9379 AC_ARG_WITH($2-libname,
9380 [[ --with-$2-libname[=XXX] override ifelse($3,,$2,$3) basename of library]],
9396 dnl ---------------------------------------------------------------------------
9398 dnl ------------------
9399 dnl Allow the library-prefix to be overridden. OS/2 EMX originally had no
9405 AC_MSG_CHECKING(if you want to have a library-prefix)
9406 AC_ARG_WITH(lib-prefix,
9407 [ --with-lib-prefix override library-prefix],
9422 dnl ---------------------------------------------------------------------------
9424 dnl ------------
9429 dnl $2 = help-text
9431 dnl $4 = default value, shown in the help-message, must be a constant
9432 dnl $5 = default value, if it is an expression & cannot be in the help-message
9436 ifelse([$4],,[withval="${$3}"],[withval="${$3:-ifelse([$5],,[$4],[$5])}"]))dnl
9437 if ifelse([$5],,true,[test -n "$5"]) ; then
9443 dnl ---------------------------------------------------------------------------
9445 dnl ----------------
9446 dnl Process an option specifying a list of colon-separated paths.
9449 dnl $2 = help-text
9451 dnl $4 = default value, shown in the help-message, must be a constant
9452 dnl $5 = default value, if it is an expression & cannot be in the help-message
9458 ifelse($4,,[withval=${$3}],[withval=${$3:-ifelse($5,,$4,$5)}]))dnl
9460 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9465 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9475 cf_dst_path="`echo "$cf_dst_path" |sed -e s/\'// -e s/\'\$//`"
9478 cf_dst_path=`echo "$cf_dst_path" | sed -e 's/\\\\/\\\\\\\\/g'`
9495 dnl ---------------------------------------------------------------------------
9497 dnl -----------------
9499 dnl "--with-xxx" option.
9504 dnl $3 = help-text
9507 AC_ARG_WITH($2-path,
9508 [ --with-$2-path=XXX specify path of $2 ifelse($3,,,$3)],
9515 if test -z "[$]$1"
9521 dnl ---------------------------------------------------------------------------
9523 dnl -------------
9524 dnl Add PCRE2 (Perl-compatible regular expressions v2) to the build if it is
9533 AC_MSG_CHECKING(if you want to use PCRE2 for regular-expressions)
9535 [ --with-pcre2 use PCRE2 for regular-expressions])
9536 test -z "$with_pcre2" && with_pcre2=no
9541 for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
9551 (*pcre2-posix*|*pcreposix*)
9554 AC_CHECK_LIB(pcre2-posix,regcomp,[
9555 CF_ADD_LIB(pcre2-posix)],
9567 dnl ---------------------------------------------------------------------------
9569 dnl -------------------------
9570 dnl Allow the choice of the pkg-config library directory to be overridden.
9572 dnl pkg-config uses a search-list built from these colon-separated lists of
9576 dnl c) builtin-list (added if $PKG_CONFIG_LIBDIR is not set)
9578 dnl pkgconf (used with some systems such as FreeBSD in place of pkg-config)
9579 dnl optionally ignores $PKG_CONFIG_LIBDIR. Very old versions of pkg-config,
9585 AC_MSG_CHECKING(for pkg-config library directory)
9593 if test -n "$PKG_CONFIG_PATH"; then
9594 cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[[ ]]*,,' -e 's,[[ ]]*$,,'`
9595 elif test -n "$PKG_CONFIG_LIBDIR"; then
9596 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[[ ]]*,,' -e 's,[[ ]]*$,,'`
9602 AC_ARG_WITH(pkg-config-libdir,
9603 [[ --with-pkg-config-libdir[=XXX] use given directory for installing pc-files]],
9605 [test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir])
9627 AC_MSG_CHECKING(for search-list)
9630 # works for pkg-config since version 0.24 (2009)
9633 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
9634 pkg-config \
9637 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
9638 test -n "$cf_search_path" && break
9641 # works for pkg-config since import in 2005 of original 2001 HP code.
9642 test -z "$cf_search_path" && \
9644 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
9645 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
9660 if test -n "$cf_search_path"
9666 if test -d "$cf_config"
9675 # limit this to the first directory found
9679 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
9688 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
9698 test -z "$cf_backup" && cf_backup=$cf_config
9702 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
9709 dnl ---------------------------------------------------------------------------
9711 dnl ---------------
9717 [ --with-pthread use POSIX thread library],
9751 dnl ---------------------------------------------------------------------------
9753 dnl -------------------
9754 dnl Allow library's release-version to be overridden. Generally this happens when a
9755 dnl packager has incremented the release-version past that used in the original package,
9762 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
9763 AC_ARG_WITH(rel-version,
9764 [ --with-rel-version=XXX override derived release version],
9770 $1_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
9771 $1_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[[^.]]*//' -e 's/^\.//' -e 's/\..*//'`
9772 test -n "$1_MINOR" || $1_MINOR=0
9773 CF_NUMBER_SYNTAX([$]$1_MAJOR,Release major-version)
9774 CF_NUMBER_SYNTAX([$]$1_MINOR,Release minor-version)
9777 dnl ---------------------------------------------------------------------------
9779 dnl ----------------
9782 # not everyone has "test -c"
9783 if test -c /dev/sysmouse 2>/dev/null ; then
9786 [ --with-sysmouse use sysmouse (FreeBSD console)],
9807 dnl ---------------------------------------------------------------------------
9809 dnl ---------------
9810 dnl For testing, override the derived host system-type which is used to decide
9815 dnl This is different from the --host option: it is used only for testing parts
9816 dnl of the configure script which would not be reachable with --host since that
9820 AC_ARG_WITH(system-type,
9821 [ --with-system-type=XXX test: override derived host system-type],
9827 dnl ---------------------------------------------------------------------------
9829 dnl ------------
9848 dnl ---------------------------------------------------------------------------
9850 dnl ----------------
9853 [ --with-valgrind test: use valgrind],
9856 dnl ---------------------------------------------------------------------------
9858 dnl ----------------------
9868 AC_MSG_CHECKING(if versioned-symbols file should be used)
9869 AC_ARG_WITH(versioned-syms,
9870 [[ --with-versioned-syms[=MAP-FILE] version ELF shared library symbols per MAP-FILE]],
9881 test -f "$with_versioned_syms" || AC_MSG_ERROR(expected a filename: $with_versioned_syms)
9884 test -f "$with_versioned_syms" || AC_MSG_ERROR(expected a filename: $with_versioned_syms)
9898 (*-Wl,*)
9899 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
9900 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\[$]{VERSIONED_SYMS} -Wl,%"`
9903 (*-dy\ *)
9904 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
9905 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\[$]{VERSIONED_SYMS} -dy%"`
9909 AC_MSG_WARN(this system does not support versioned-symbols)
9924 rm -f conftest.*
9981 if make -f conftest.mk 2>&AC_FD_CC >/dev/null
9984 …cf_missing="`nm -P conftest.so 2>&AC_FD_CC |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[[ ]][[DT…
9985 test -n "$cf_missing" && WILDCARD_SYMS=yes
9988 rm -f conftest.*
9995 dnl ---------------------------------------------------------------------------
9997 dnl ---------------
9998 dnl Handle configure option "--with-x11-rgb", setting these shell
10002 dnl $no_x11_rgb is a "#" (comment) if "--without-x11-rgb" is given.
10019 dnl 32-bit:
10025 dnl /opt/X11/share/X11/rgb.txt (non-ports)
10026 dnl 64-bit:
10035 AC_ARG_WITH(x11-rgb,
10036 …[ --with-x11-rgb=FILE obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.tx…
10060 if test -f "$cf_path" ; then
10081 dnl ---------------------------------------------------------------------------
10083 dnl ---------------
10086 dnl without losing the common non-POSIX features.
10101 dnl https://docs.oracle.com/cd/E19253-01/816-5175/standards-5/index.html
10102 dnl https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
10114 (aix[[4-7]]*)
10115 cf_xopen_source="-D_ALL_SOURCE"
10117 (darwin[[0-8]].*)
10118 cf_xopen_source="-D_APPLE_C_SOURCE"
10121 cf_xopen_source="-D_DARWIN_C_SOURCE"
10130 …cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE…
10133 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10136 cf_xopen_source="-D_HPUX_SOURCE"
10139 cf_xopen_source="-D_SGI_SOURCE"
10142 …abin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw…
10146 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10154 …cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, bre…
10156 (openbsd[[6-9]]*)
10157 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10158 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10161 cf_xopen_source="-D_BSD_SOURCE"
10164 (openbsd[[4-5]]*)
10166 cf_xopen_source="-D_BSD_SOURCE"
10173 cf_xopen_source="-D_OSF_SOURCE"
10175 (nto-qnx*)
10176 cf_xopen_source="-D_QNX_SOURCE"
10182 cf_xopen_source="-D__EXTENSIONS__"
10193 # Some of these niche implementations use copy/paste, double-check...
10203 if test -n "$cf_xopen_source" ; then
10207 dnl In anything but the default case, we may have system-specific setting
10210 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10222 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10223 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10237 dnl ---------------------------------------------------------------------------
10239 dnl ------------------
10242 define([CF__SED_TRIMBLANKS],[sed ifelse($1,,,[$1] )-e 's%[[ ]]% %g' -e 's% [[ ]]*% %g' -e 's%^ %%'
10243 dnl ---------------------------------------------------------------------------
10245 dnl ---------------------
10246 dnl body of test when test-compiling for _XOPEN_SOURCE check
10253 dnl ---------------------------------------------------------------------------
10255 dnl ---------------------
10256 dnl headers to include when test-compiling for _XOPEN_SOURCE check