Lines Matching +full:g +full:- +full:scaler

3 dnl ---------------------------------------------------------------------------
4 dnl Copyright 1999-2020,2021 -- Thomas E. Dickey
31 dnl https://invisible-island.net/autoconf/
32 dnl ---------------------------------------------------------------------------
33 dnl ---------------------------------------------------------------------------
35 dnl --------------
69 for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
88 if test -n "$LINGUAS"; then
94 INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
97 dnl ---------------------------------------------------------------------------
99 dnl --------
110 dnl range of locations searched. Retain the same cache-variable naming to
111 dnl allow reuse with the other gettext macros -Thomas E Dickey
117 AC_ARG_WITH([libiconv-prefix],
118 [ --with-libiconv-prefix=DIR
161 if test -n "$cf_cv_library_file_iconv" ; then
162 LIBICONV="-liconv"
169 dnl ---------------------------------------------------------------------------
171 dnl -------------------
192 dnl ---------------------------------------------------------------------------
194 dnl --------------
223 dnl ---------------------------------------------------------------------------
225 dnl ----------------------
244 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
245 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
259 test -z "$ac_dir" && ac_dir=.
260 if test -f "$ac_dir/$ac_word$ac_exeext" ; then
270 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
275 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
282 dnl ---------------------------------------------------------------------------
284 dnl -----------
293 dnl range of locations searched. Retain the same cache-variable naming to
294 dnl allow reuse with the other gettext macros -Thomas E Dickey
309 dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
311 dnl depending on --{enable,disable}-{shared,static} and on the presence of
312 dnl AM-DISABLE-SHARED). Otherwise, a static library
314 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
319 dnl ENABLED is used to control the default for the related --enable-nls, since
320 dnl not all application developers want this feature by default, e.g., lynx.
325 dnl Catalog format: GNU --> install in $(datadir)
328 dnl Catalog format: GNU --> install in $(datadir)
343 [ --disable-nls do not use Native Language Support],
346 [ --enable-nls use Native Language Support],
363 AC_ARG_WITH(included-gettext,
364 [ --with-included-gettext use the GNU gettext library included here],
376 dnl Save these (possibly-set) variables for reference. If the user
387 ["$ac_dir/$ac_word" --statistics /dev/null >/dev/null 2>&1], :)
393 ["$ac_dir/$ac_word" --omit-header /dev/null >/dev/null 2>&1], :)
398 CF_ADD_CFLAGS(-DIGNORE_MSGFMT_HACK)
429 if test -n "$cf_cv_library_file_intl" ; then
444 elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
446 sed -e /ENABLE_NLS/d confdefs.h >confdefs.tmp
469 if test -f "$srcdir/intl/libintl.h" ; then
474 …INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $…
475 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
484 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
493 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
516 ac_dots="`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`"
518 # In autoconf-2.13 it is called $ac_given_srcdir.
519 # In autoconf-2.50 it is called $srcdir.
520 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
528 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
529 rm -f "$ac_dir/POTFILES"
530 … test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
531 …sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac…
532 … test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
533 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
547 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
550 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
557 if test -z "$INTLBISON"; then
563 …ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
566 (1.2[6-9]*|1.[3-9][0-9]*|[2-9].*)
614 dnl ---------------------------------------------------------------------------
616 dnl ------------------
626 [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
630 dnl ---------------------------------------------------------------------------
632 dnl --------------------
640 dnl ---------------------------------------------------------------------------
642 dnl -------------
643 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
662 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
664 (-D*)
665 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
668 && test -z "${cf_tst_cflags}" \
685 (-D*)
686 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
702 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[[^"]]*"'\''//'`
705 && test -z "${cf_tst_cflags}" \
711 if test -n "$cf_new_cflags" ; then
716 if test -n "$cf_new_cppflags" ; then
721 if test -n "$cf_new_extra_cppflags" ; then
729 dnl ---------------------------------------------------------------------------
731 dnl -------------
732 dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's
733 dnl redundant. We don't normally need to add -I/usr/local/include for gcc,
735 dnl worse, gcc 3.x may give error messages if -I/usr/local/include is added to
736 dnl the include-path).
739 if test -n "$1" ; then
744 if test -d "$cf_add_incdir"
747 if test -n "$CFLAGS$CPPFLAGS" ; then
750 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
761 CF_APPEND_TEXT(CPPFLAGS,-I$cf_add_incdir)
772 CF_VERBOSE(adding $cf_add_incdir to include-path)
773 ifelse([$2],,CPPFLAGS,[$2])="$ifelse([$2],,CPPFLAGS,[$2]) -I$cf_add_incdir"
775 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
788 dnl ---------------------------------------------------------------------------
790 dnl ----------
793 dnl $1 = library to add, without the "-l"
795 AC_DEFUN([CF_ADD_LIB],[CF_ADD_LIBS(-l$1,ifelse($2,,LIBS,[$2]))])dnl
796 dnl ---------------------------------------------------------------------------
798 dnl -------------
799 dnl Adds to the library-path
801 dnl Some machines have trouble with multiple -L options.
808 if test -n "$1" ; then
813 elif test -d "$cf_add_libdir"
816 if test -n "$LDFLAGS$LIBS" ; then
819 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
825 CF_VERBOSE(adding $cf_add_libdir to library-path)
826 ifelse([$2],,LDFLAGS,[$2])="-L$cf_add_libdir $ifelse([$2],,LDFLAGS,[$2])"
832 dnl ---------------------------------------------------------------------------
834 dnl -----------
839 dnl $1 = libraries to add, with the "-l", etc.
854 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
858 dnl ---------------------------------------------------------------------------
860 dnl ----------------
861 dnl Add a given library after another, e.g., following the one it satisfies a
868 LIBS=`echo "$LIBS" | sed -e "s/[[ ]][[ ]]*/ /g" -e "s%$1 %$1 $2 %" -e 's% % %g'`
871 dnl ---------------------------------------------------------------------------
873 dnl --------------------
874 dnl Add an optional search-path to the compile/link variables.
877 dnl $1 = shell variable containing the result of --with-XXX=[DIR]
890 dnl ---------------------------------------------------------------------------
892 dnl -----------------
894 dnl They can be either the common root of include- and lib-directories, or the
895 dnl lib-directory (to allow for things like lib64 directories).
898 dnl $1 is the list of colon-separated directory names to search.
904 if test -d "$cf_searchpath/include" ; then
906 elif test -d "$cf_searchpath/../include" ; then
911 if test -d "$cf_searchpath/lib" ; then
913 elif test -d "$cf_searchpath" ; then
920 dnl ---------------------------------------------------------------------------
922 dnl ------------------
923 dnl Append to a search-list for a nonstandard header/lib-file
926 dnl $3 = the subdirectory, e.g., bin, include or lib
932 test -d "$4" && \
933 ifelse([$5],NONE,,[{ test -z "$5" || test "x$5" = xNONE || test "x$4" != "x$5"; } &&]) {
934 test -n "$verbose" && echo " ... testing for $3-directories under $4"
935 test -d "$4/$3" && $1="[$]$1 $4/$3"
936 test -d "$4/$3/$2" && $1="[$]$1 $4/$3/$2"
937 test -d "$4/$3/$2/$3" && $1="[$]$1 $4/$3/$2/$3"
938 test -d "$4/$2/$3" && $1="[$]$1 $4/$2/$3"
939 test -d "$4/$2/$3/$2" && $1="[$]$1 $4/$2/$3/$2"
942 dnl ---------------------------------------------------------------------------
944 dnl --------------
949 test -n "[$]$1" && $1="[$]$1 "
952 dnl ---------------------------------------------------------------------------
954 dnl --------------
955 dnl Allow user to disable a normally-on option.
958 dnl ---------------------------------------------------------------------------
960 dnl -------------
961 dnl Allow user to enable a normally-off option.
964 dnl ---------------------------------------------------------------------------
966 dnl -----------------
972 dnl $3 = help-string
986 dnl ---------------------------------------------------------------------------
988 dnl -------------
994 dnl $2 = help-string
1009 dnl ---------------------------------------------------------------------------
1011 dnl -----------
1014 dnl In particular, handle some obsolete cases where the "-" might be omitted,
1022 (*-msvc*)
1024 cat >mk_static_lib.sh <<-EOF
1029 exec \[$]MSVC_BIN -out:"\[$]out" \[$]@
1036 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
1041 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
1048 rm -f "conftest.$ac_cv_objext"
1049 rm -f conftest.a
1058 if test -f conftest.a ; then
1063 CF_VERBOSE(cannot compile test-program)
1067 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
1072 if test -n "$ARFLAGS" ; then
1073 if test -n "$cf_cv_ar_flags" ; then
1082 dnl ---------------------------------------------------------------------------
1084 dnl ---------------
1085 dnl Top-level macro for configuring an application with a bundled copy of
1089 dnl $2 if nonempty sets the option to --enable-nls rather than to --disable-nls
1092 dnl GT_YES - "#" comment unless building intl library, otherwise empty
1093 dnl GT_NO - "#" comment if building intl library, otherwise empty
1094 dnl INTLDIR_MAKE - to make ./intl directory
1095 dnl MSG_DIR_MAKE - to make ./po directory
1096 dnl SUB_MAKEFILE - list of makefiles in ./intl, ./po directories
1114 test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d "$srcdir/po" && cd "$srcdir/po" && echo *.po|sed -e …
1120 if test -z "$PACKAGE" ; then
1124 if test -z "$VERSION" ; then
1125 if test -f "$srcdir/VERSION" ; then
1126 VERSION=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1137 [ --with-textdomain=PKG NLS text-domain (default is package name)],
1159 if test -z "$INTLDIR_MAKE"; then
1165 if test -f "$cf_makefile" ; then
1166 …SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf…
1178 if test -z "$INTLDIR_MAKE" ; then
1179 CF_APPEND_TEXT(CPPFLAGS,-I../intl)
1207 if test -n "$nls_cv_header_intl" ; then
1208 AC_DEFINE(HAVE_LIBINTL_H,1,[Define to 1 if we have header-file for libintl])
1212 dnl ---------------------------------------------------------------------------
1214 dnl ---------------
1215 dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
1232 (*-[[IUD]]*)
1249 (*[[\ \ ]]-*)
1253 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
1254 …cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog)…
1259 (x-[[IUDfgOW]]*)
1276 dnl ---------------------------------------------------------------------------
1278 dnl --------------
1284 dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM
1285 dnl which is useful in cross-compiles.
1291 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1295 system_name="`(uname -s -r) 2>/dev/null`"
1296 if test -z "$system_name" ; then
1300 test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.…
1303 test -z "$system_name" && system_name="$cf_cv_system_name"
1304 test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name)
1311 dnl ---------------------------------------------------------------------------
1313 dnl ---------------
1315 dnl a build-configuration such as imake. These have the pitfall that they
1316 dnl often contain compiler-specific options which we cannot use, mixed with
1326 [CF_VERBOSE(test-compile failed. Undoing change to \$CFLAGS)
1333 dnl ---------------------------------------------------------------------------
1335 dnl ------------------------
1338 dnl Save the version in a cache variable - this is not entirely a good thing,
1342 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
1347 if test -z "$cf_cv_libtool_version" ; then
1354 dnl ---------------------------------------------------------------------------
1356 dnl -----------------
1362 dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from
1363 dnl the wrappers for gcc and g++ warnings.
1389 (c[[1-9]][[0-9]]|*/c[[1-9]][[0-9]])
1391 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1397 …ERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[[^)]]*) //' -e 's/^.*(Debian[[^…
1398 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1402 -Qunused-arguments \
1403 -Wno-error=implicit-function-declaration
1422 dnl ---------------------------------------------------------------------------
1424 dnl -----------------
1425 dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most
1426 dnl character-strings.
1428 dnl It is ambiguous because the specification accommodated the pre-ANSI
1430 dnl compiler other than by costly add-ons. Because of this, the specification
1455 AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[
1473 CF_APPEND_TEXT(CPPFLAGS,-DXTSTRINGDEFINES)
1476 CF_APPEND_TEXT(CPPFLAGS,-D_CONST_X_STRING)
1482 dnl ---------------------------------------------------------------------------
1484 dnl ----------------
1490 AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>],
1497 AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>],
1502 AC_DEFINE(TYPE_CHTYPE_IS_SCALAR,1,[Define to 1 if chtype is a scaler/integer])
1506 dnl ---------------------------------------------------------------------------
1508 dnl ----------------
1509 dnl Tie together the configure-script macros for curses. It may be ncurses,
1518 dnl ---------------------------------------------------------------------------
1520 dnl ------------------
1530 test -d /usr/include/curses_colr && \
1531 cf_cv_curses_incdir="-I/usr/include/curses_colr"
1537 test -d /usr/5lib && \
1538 test -d /usr/5include && \
1539 cf_cv_curses_incdir="-I/usr/5include"
1552 dnl ---------------------------------------------------------------------------
1554 dnl --------------
1555 dnl Check for ncurses memory-leak/debug feature. Starting with ncurses 6.2,
1557 dnl when switching to/from a debug-library.
1565 dnl ---------------------------------------------------------------------------
1567 dnl ---------------
1568 dnl Curses-functions are a little complicated, since a lot of them are macros.
1589 ${cf_cv_main_return:-return}(foo != 0);
1597 # use the computed/retrieved cache-value:
1605 dnl ---------------------------------------------------------------------------
1607 dnl ----------------
1608 dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
1626 AC_MSG_ERROR(No curses header-files found)
1632 dnl ---------------------------------------------------------------------------
1634 dnl --------------
1641 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
1650 AC_CHECK_LIB(mytinfo,tgoto,[CF_ADD_LIBS(-lmytinfo)])
1660 CF_ADD_LIBS(-lcur_colr)
1665 CF_ADD_LIBS(-lHcurses)
1666 CF_APPEND_TEXT(CPPFLAGS,-D__HP_CURSES -D_HP_CURSES)
1674 if test -d /lib64
1689 if test -d /usr/5lib ; then
1691 CF_ADD_LIBS(-lcurses -ltermcap)
1701 if test ".${cf_cv_ncurses_version:-no}" != .no
1709 # because it may be needed to link the test-case for initscr.
1724 …test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_sa…
1729 LIBS="-l$cf_curs_lib $cf_save_LIBS"
1732 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
1742 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
1746 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
1747 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
1762 dnl ---------------------------------------------------------------------------
1764 dnl ----------------
1766 dnl the low-level interface). This may not be true in old/broken implementations,
1767 dnl as well as in misconfigured systems (e.g., gcc configured for Solaris 2.4
1780 case "${cf_cv_ncurses_header:-curses.h}" in
1782 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
1790 #include <${cf_cv_ncurses_header:-curses.h}>
1805 #include <${cf_cv_ncurses_header:-curses.h}>
1832 dnl ---------------------------------------------------------------------------
1834 dnl ------------------
1850 case "${cf_cv_ncurses_header:-curses.h}" in
1852 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
1860 #include <${cf_cv_ncurses_header:-curses.h}>
1887 dnl ---------------------------------------------------------------------------
1889 dnl ------------------
1901 #include <${cf_cv_ncurses_header:-curses.h}>],
1907 …QUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map,[Define to name of (n)curses wide-character array])
1909 dnl ---------------------------------------------------------------------------
1911 dnl ----------------------
1927 #include <${cf_cv_ncurses_header:-curses.h}>],
1936 #include <${cf_cv_ncurses_header:-curses.h}>],
1942 …o && AC_DEFINE(CURSES_WACS_SYMBOLS,1,[Define to 1 if (n)curses supports wide-character WACS_ symbo…
1944 dnl ---------------------------------------------------------------------------
1946 dnl --------------------
1949 dnl defining an application-specific function that gives this functionality.
1957 AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>],
1958 [WINDOW *p = stdscr->_parent; (void)p],
1968 dnl ---------------------------------------------------------------------------
1970 dnl ----------
1972 AC_DEFUN([CF_DIRNAME],[$1=`echo "$2" | sed -e 's%/[[^/]]*$%%'`])dnl
1973 dnl ---------------------------------------------------------------------------
1975 dnl ---------------
1976 dnl You can always use "make -n" to see the actual options, but it's hard to
1977 dnl pick out/analyze warning messages when the compile-line is long.
1980 dnl ECHO_LT - symbol to control if libtool is verbose
1981 dnl ECHO_LD - symbol to prefix "cc -o" lines
1982 dnl RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
1983 dnl SHOW_CC - symbol to put before explicit "cc -c" lines
1984 dnl ECHO_CC - symbol to put before any "cc" line
1989 [ --disable-echo do not display "compiling" commands],
1991 ECHO_LT='--silent'
2010 dnl ---------------------------------------------------------------------------
2012 dnl --------------------------
2013 dnl Check if we should use the libtool 1.5 feature "-version-number" instead of
2014 dnl the older "-version-info" feature. The newer feature allows us to use
2019 AC_MSG_CHECKING(if libtool -version-number should be used)
2020 CF_ARG_DISABLE(libtool-version,
2021 [ --disable-libtool-version enable to use libtool's incompatible naming scheme],
2027 LIBTOOL_VERSION="-version-number"
2029 LIBTOOL_VERSION="-version-info"
2039 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
2051 dnl ---------------------------------------------------------------------------
2053 dnl ---------------------
2054 dnl The rpath-hack makes it simpler to build programs, particularly with the
2060 AC_MSG_CHECKING(if rpath-hack should be disabled)
2061 CF_ARG_DISABLE(rpath-hack,
2062 [ --disable-rpath-hack don't add rpath options for additional libraries],
2065 dnl TODO - drop cf_disable_rpath_hack
2073 dnl ---------------------------------------------------------------------------
2075 dnl ---------------
2082 [ --enable-rpath use rpath option when generating shared libraries],
2087 dnl ---------------------------------------------------------------------------
2089 dnl ------------------
2090 dnl Configure-option to enable gcc warnings
2095 dnl yes: always do this, e.g., to use in generated library-headers
2105 [ --enable-warnings test: turn on gcc compiler warnings],
2117 dnl ---------------------------------------------------------------------------
2119 dnl ---------------
2120 dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We
2121 dnl prefer a standard location, and use -L options only if we do not find the
2127 dnl $5 = corresponding function-name
2128 dnl $6 = flag, nonnull if failure should not cause an error-exit
2130 dnl Sets the variable "$cf_libdir" as a side-effect, so we can see if we had
2131 dnl to use a -L option.
2139 AC_MSG_CHECKING(for $5 in -l$1)
2140 LIBS="-l$1 $LIBS"
2149 AC_MSG_CHECKING(for -l$1 in $cf_libdir)
2150 LIBS="-L$cf_libdir -l$1 $cf_save_LIBS"
2167 dnl ---------------------------------------------------------------------------
2169 dnl ---------------
2174 dnl Parameters (4-on are optional):
2177 dnl $3 = the library name without the "-l" option or ".so" suffix.
2184 dnl $cf_cv_find_linkage_$3 - yes/no according to whether linkage is found
2185 dnl $cf_cv_header_path_$3 - include-directory if needed
2186 dnl $cf_cv_library_path_$3 - library-directory if needed
2187 dnl $cf_cv_library_file_$3 - library-file if needed, e.g., -l$3
2205 LIBS="-l$3 $7 $cf_save_LIBS"
2211 cf_cv_library_file_$3="-l$3"
2225 if test -d "$cf_cv_header_path_$3" ; then
2228 CF_APPEND_TEXT(CPPFLAGS,-I$cf_cv_header_path_$3)
2248 LIBS="-l$3 $7 $cf_save_LIBS"
2260 if test -d "$cf_cv_library_path_$3" ; then
2263 LIBS="-l$3 $7 $cf_save_LIBS"
2264 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_$3"
2268 cf_cv_library_file_$3="-l$3"
2298 dnl ---------------------------------------------------------------------------
2300 dnl ---------------
2302 dnl "-Werror" flags can interfere with configure-checks. Those go into
2310 (*-Werror=*)
2316 (x-Werror=*)
2332 dnl ---------------------------------------------------------------------------
2334 dnl --------------
2341 dnl ---------------------------------------------------------------------------
2343 dnl ------------
2344 dnl Test for the presence of <sys/wait.h>, 'union wait', arg-type of 'wait()'
2359 AC_MSG_CHECKING(if union wait can be used as wait-arg)
2369 AC_MSG_CHECKING(if union wait can be used as waitpid-arg)
2381 dnl ---------------------------------------------------------------------------
2383 dnl -----------------
2385 dnl compiler warnings. Though useful, not all are supported -- and contrary
2410 #line __oline__ "${as_me:-configure}"
2458 test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
2462 AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc])
2468 AC_DEFINE(GCC_PRINTF,1,[Define to 1 if the compiler supports gcc-like printf attribute.])
2470 AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc])
2476 AC_DEFINE(GCC_SCANF,1,[Define to 1 if the compiler supports gcc-like scanf attribute.])
2478 AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc])
2481 AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc])
2487 ${FGREP-fgrep} define conftest.i >>confdefs.h
2489 rm -rf ./conftest*
2492 dnl ---------------------------------------------------------------------------
2494 dnl --------------
2502 …RSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[[^)]]*) //' -e 's/^.*(Debian[[^)…
2503 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2509 dnl ---------------------------------------------------------------------------
2511 dnl ---------------
2515 dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x)
2516 dnl -Winline (usually not worthwhile)
2517 dnl -Wredundant-decls (system headers make this too noisy)
2518 dnl -Wtraditional (combines too many unrelated messages, only a few useful)
2519 dnl -Wwrite-strings (too noisy, but should review occasionally). This
2520 dnl is enabled for ncurses using "--enable-const".
2521 dnl -pedantic
2525 dnl application might want to use, e.g., "no-unused" for
2526 dnl -Wno-unused
2528 dnl If $with_ext_const is "yes", add a check for -Wwrite-strings
2535 #line __oline__ "${as_me:-configure}"
2536 int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
2540 # The "-wdXXX" options suppress warnings:
2542 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential…
2543 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
2553 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
2565 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2567 test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
2568 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2577 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2578 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
2581 Wbad-function-cast \
2582 Wcast-align \
2583 Wcast-qual \
2584 Wdeclaration-after-statement \
2587 Wmissing-declarations \
2588 Wmissing-prototypes \
2589 Wnested-externs \
2590 Wpointer-arith \
2592 Wstrict-prototypes \
2593 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST $1
2595 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2597 test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
2606 (Wpointer-arith)
2614 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2619 rm -rf ./conftest*
2623 dnl ---------------------------------------------------------------------------
2625 dnl -------------
2659 CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE)
2676 CF_ADD_CFLAGS(-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source)
2703 CF_ADD_CFLAGS(-D_GNU_SOURCE)
2717 CF_APPEND_TEXT(CPPFLAGS,-D_GNU_SOURCE)
2727 CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE)
2734 dnl ---------------------------------------------------------------------------
2736 dnl -------------
2737 dnl Setup variables needed to construct headers-sh
2743 EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
2745 dnl ---------------------------------------------------------------------------
2747 dnl --------------
2748 dnl Construct a search-list of directories for a nonstandard header-file
2757 # collect the current set of include-directories from compiler flags
2759 if test -n "${CFLAGS}${CPPFLAGS}" ; then
2763 (-I*)
2764 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
2777 test -d "$includedir" && {
2778 test -d "$includedir" && $1="[$]$1 $includedir"
2779 test -d "$includedir/$2" && $1="[$]$1 $includedir/$2"
2784 test -d "$oldincludedir" && {
2785 test -d "$oldincludedir" && $1="[$]$1 $oldincludedir"
2786 test -d "$oldincludedir/$2" && $1="[$]$1 $oldincludedir/$2"
2791 dnl ---------------------------------------------------------------------------
2793 dnl -----------------
2796 dnl between prototypes, e.g., as exercised by CF_MISSING_CHECK.
2799 dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from
2800 dnl the wrappers for gcc and g++ warnings.
2814 ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc"
2821 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2829 dnl ---------------------------------------------------------------------------
2831 dnl ------------
2842 # case comes up with C++, e.g., on AIX the compiler compiles the
2848 CF_APPEND_TEXT(CPPFLAGS,-D_LARGE_FILES)
2852 CF_APPEND_TEXT(CPPFLAGS,-D_LARGEFILE_SOURCE)
2856 CF_APPEND_TEXT(CPPFLAGS,-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits)
2861 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
2869 int z = x - y;
2879 dnl ---------------------------------------------------------------------------
2881 dnl ---------------
2895 LD_RPATH_OPT="-Wl,-rpath,"
2897 LD_RPATH_OPT="-rpath "
2900 (linux*|gnu*|k*bsd*-gnu|freebsd*)
2901 LD_RPATH_OPT="-Wl,-rpath,"
2903 (openbsd[[2-9]].*|mirbsd*)
2904 LD_RPATH_OPT="-Wl,-rpath,"
2907 LD_RPATH_OPT="-rpath "
2910 LD_RPATH_OPT="-Wl,-rpath,"
2913 LD_RPATH_OPT="-rpath "
2916 LD_RPATH_OPT="-R"
2924 (x-R*)
2936 dnl ---------------------------------------------------------------------------
2938 dnl ----------------
2939 dnl Try to obtain the linker's search-path, for use in scripts.
2948 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[[("=]][[("=]]*,,g' -
2950 # The -NX options tell newer versions of Linux ldconfig to not attempt to
2952 test -z "$cf_pathlist" && \
2953 cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[[ ]]/d' -e 's/:$//' | sort -u`
2955 test -z "$cf_pathlist" &&
2956 cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[[ ]]/d' -e 's/:$//p' | sort -u`
2959 test -z "$cf_pathlist" &&
2960 cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*[$],\1,p' | sort -u`
2962 if test -z "$cf_pathlist"
2965 if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
2973 if test -z "$cf_pathlist"
2976 if test -d /opt/SUNWspro/lib
2979 elif test -d /usr/ccs/lib
2988 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
2993 if test -d "$cf_path"; then
2994 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
3000 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
3003 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
3006 dnl ---------------------------------------------------------------------------
3008 dnl ---------------
3009 dnl Construct a search-list of directories for a nonstandard library-file
3018 if test -n "${LDFLAGS}${LIBS}" ; then
3022 (-L*)
3023 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
3035 dnl ---------------------------------------------------------------------------
3037 dnl ------------------
3039 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
3041 …_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e '…
3045 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
3047 dnl ---------------------------------------------------------------------------
3049 dnl -------------
3050 dnl Compute the library-prefix for the given host system
3062 (*-msvc*)
3071 dnl ---------------------------------------------------------------------------
3073 dnl -------------
3074 dnl Compute the library file-suffix from the given model name
3088 (*-msvc*)
3099 (*-msvc*)
3110 (aix[[5-7]]*)
3114 (*-msvc*)
3146 (*-msvc*)
3156 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
3162 dnl ---------------------------------------------------------------------------
3164 dnl ------------
3166 dnl options to lower-levels. It's very useful for "make -n" -- if we have it.
3168 dnl ${MAKEFLAGS} variable incompatible because it adds the assignments :-)
3174 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3181 …cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | …
3184 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3193 (.-)
3200 rm -f cf_makeflags.tmp
3205 dnl ---------------------------------------------------------------------------
3207 dnl ------------
3216 AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS:-ctags}, yes, no)
3219 AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS:-etags}, yes, no)
3242 dnl ---------------------------------------------------------------------------
3244 dnl -----------
3246 dnl Rhapsody 5.5, does not have -lm. We cannot use the simpler
3250 AC_CACHE_CHECK(if -lm needed for math functions,
3257 [double x = rand(); printf("result = %g\\n", ]ifelse([$2],,sin(x),$2)[)],
3264 ],[$1=-lm])
3267 dnl ---------------------------------------------------------------------------
3269 dnl ------------
3303 dnl ---------------------------------------------------------------------------
3305 dnl ---------------------
3307 dnl may depend on being able to override that variable at build-time. Move it
3316 dnl ---------------------------------------------------------------------------
3318 dnl ----------------------
3319 dnl Check if the file-system supports mixed-case filenames. If we're able to
3323 AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
3326 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3334 rm -f conftest CONFTEST
3336 if test -f CONFTEST ; then
3341 rm -f conftest CONFTEST
3344 … yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.])
3346 dnl ---------------------------------------------------------------------------
3348 dnl ----------
3352 echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
3354 dnl ---------------------------------------------------------------------------
3356 dnl -------------------
3359 dnl $2 is the header-file to include
3387 dnl ---------------------------------------------------------------------------
3389 dnl -----------------
3390 dnl Tie together the configure-script macros for ncurses, preferring these in
3392 dnl a) ".pc" files for pkg-config, using $NCURSES_CONFIG_PKG
3393 dnl b) the "-config" script from ncurses, using $NCURSES_CONFIG
3403 AC_MSG_CHECKING(pkg-config for $cf_ncuconfig_root)
3404 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
3414 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
3415 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
3417 # while -W for passing linker flags is prevalent, it is not "standard".
3419 # incompatible _and_ non-standard -W option which gives an error. Work
3422 (x*c[[89]]9@@*-W*)
3426 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
3428 [AC_TRY_RUN([#include <${cf_cv_ncurses_header:-curses.h}>
3441 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[[^ ]]*//g'`
3443 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[[^ ]]*//g'`
3452 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
3454 [AC_TRY_RUN([#include <${cf_cv_ncurses_header:-curses.h}>
3483 …cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_nc…
3486 …FIG, ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig…
3487 …IG, ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig…
3491 CF_ADD_CFLAGS(`$NCURSES_CONFIG --cflags`)
3492 CF_ADD_LIBS(`$NCURSES_CONFIG --libs`)
3494 # even with config script, some packages use no-override for curses.h
3505 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
3517 dnl ---------------------------------------------------------------------------
3519 dnl -------------------
3526 dnl the curses.h file would be in an ncurses subdirectory (e.g.,
3528 dnl vendor's curses. Only very old versions (pre-1.9.2d, the first autoconf'd
3533 dnl is already in the include-path, don't even bother with this, since we cannot
3538 dnl wide-character version of ncurses is installed.
3545 test -n "$cf_cv_curses_dir" && \
3550 AC_CACHE_CHECK(for $cf_ncuhdr_root header in include-path, cf_cv_ncurses_h,[
3568 dnl ---------------------------------------------------------------------------
3570 dnl -----------------
3571 dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
3581 AC_CACHE_CHECK(for $cf_ncuhdr_root include-path, cf_cv_ncurses_h2,[
3582 test -n "$verbose" && echo
3584 test -n "$verbose" && echo "search path $cf_search"
3596 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&AC_FD_MSG
3599 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&AC_FD_MSG
3634 dnl ---------------------------------------------------------------------------
3636 dnl ---------------
3646 dnl wide-character version of ncurses is installed.
3659 [cf_ncurses_LIBS="-lgpm"])])
3666 AC_CHECK_LIB(mytinfo,tgoto,[cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"])
3673 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
3675 CF_ADD_LIBS(-l$cf_nculib_root)
3678 [#include <${cf_cv_ncurses_header:-curses.h}>],
3683 if test -n "$cf_ncurses_LIBS" ; then
3687 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
3692 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
3702 dnl ---------------------------------------------------------------------------
3704 dnl -------------------
3714 CF_ADD_LIBS(-lpthread)
3717 dnl ---------------------------------------------------------------------------
3719 dnl ------------------
3729 rm -f "$cf_tempfile"
3731 #include <${cf_cv_ncurses_header:-curses.h}>
3749 ${cf_cv_main_return:-return}(0);
3756 #include <${cf_cv_ncurses_header:-curses.h}>
3769 if test -f conftest.out ; then
3770 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[[^"]]*"%%' -e 's%".*%%' conftest.out`
3771 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3772 rm -f conftest.out
3775 rm -f "$cf_tempfile"
3779 dnl ---------------------------------------------------------------------------
3781 dnl ---------------------
3801 dnl ---------------------------------------------------------------------------
3803 dnl ------------------
3812 : "${with_cflags:=-g}"
3816 AC_MSG_RESULT(${with_$1:-no})
3819 (.*-g*)
3821 (.*-g*)
3824 CF_ADD_CFLAGS([-g])
3830 dnl ---------------------------------------------------------------------------
3832 dnl ----------------
3837 if test -n "$1" ; then
3839 ([[0-9]]*)
3849 dnl ---------------------------------------------------------------------------
3851 dnl ---------------
3857 dnl MSG_DIR_MAKE - to make ./po directory
3858 dnl SUB_MAKEFILE - makefile in ./po directory (see CF_BUNDLED_INTL)
3866 if test -d "$srcdir/po" ; then
3867 AC_MSG_CHECKING(if we should use included message-library)
3868 AC_ARG_ENABLE(included-msgs,
3869 [ --disable-included-msgs use included messages, for i18n support],
3886 dnl ---------------------------------------------------------------------------
3888 dnl ----------
3902 dnl ---------------------------------------------------------------------------
3904 dnl --------------
3921 (.[[a-zA-Z]]:[[\\/]]*) # OS/2 EMX
3927 $1=`echo "[$]$1" | sed -e s%NONE%$cf_path_syntax%`
3932 $1=`echo "[$]$1" | sed -e s%NONE%$cf_path_syntax%`
3939 dnl ---------------------------------------------------------------------------
3941 dnl ---------------
3947 [AC_CHECK_TOOLS(XCURSES_CONFIG, xcurses-config, none)],
3948 [AC_PATH_PROGS(XCURSES_CONFIG, xcurses-config, none)])
3952 CF_ADD_CFLAGS(`$XCURSES_CONFIG --cflags`)
3953 CF_ADD_LIBS(`$XCURSES_CONFIG --libs`)
3962 [CF_ADD_LIBS(-lX11)],,
3965 CF_ADD_LIBS(-lXCurses)
3984 dnl ---------------------------------------------------------------------------
3986 dnl -------------
3987 dnl Check for the package-config program, unless disabled by command-line.
3990 AC_MSG_CHECKING(if you want to use pkg-config)
3991 AC_ARG_WITH(pkg-config,
3992 [ --with-pkg-config{=path} enable/disable use of pkg-config],
4003 [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)],
4004 [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)])
4011 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4015 AC_MSG_WARN(pkg-config is not installed)
4020 dnl ---------------------------------------------------------------------------
4022 dnl -----------------
4025 dnl POSIX.1-1990 _POSIX_SOURCE
4026 dnl POSIX.1-1990 and _POSIX_SOURCE and
4027 dnl POSIX.2-1992 C-Language _POSIX_C_SOURCE=2
4029 dnl POSIX.1b-1993 _POSIX_C_SOURCE=199309L
4030 dnl POSIX.1c-1996 _POSIX_C_SOURCE=199506L
4058 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4061 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4073 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE")
4099 dnl ---------------------------------------------------------------------------
4101 dnl ----------------
4102 dnl POSIX documents test-macros which an application may set before any system
4108 dnl overrides the corresponding test-macros. Doing that introduces portability
4115 AC_CACHE_CHECK(if the POSIX test-macros are already defined,cf_cv_posix_visible,[
4117 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
4118 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
4119 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
4120 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
4126 dnl ---------------------------------------------------------------------------
4128 dnl ----------
4133 dnl ---------------------------------------------------------------------------
4135 dnl ----------
4150 dnl ---------------------------------------------------------------------------
4152 dnl -----------
4153 dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
4159 CFLAGS="$CFLAGS -Zmt"
4160 CF_APPEND_TEXT(CPPFLAGS,-D__ST_MT_ERRNO__)
4161 CXXFLAGS="$CXXFLAGS -Zmt"
4162 # autoconf's macro sets -Zexe and suffix both, which conflict:w
4163 LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
4173 test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT",[Define to the program extension (no…
4175 dnl ---------------------------------------------------------------------------
4177 dnl -------------
4195 dnl ---------------------------------------------------------------------------
4197 dnl ------------
4203 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
4208 dnl ---------------------------------------------------------------------------
4210 dnl ------------
4211 dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include "-f"
4215 AC_MSG_CHECKING(if $LN_S -f options work)
4217 rm -f conf$$.src conf$$dst
4220 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
4225 rm -f conf$$.dst conf$$src
4228 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
4230 dnl ---------------------------------------------------------------------------
4232 dnl ----------------
4233 dnl Remove all -U and -D options that refer to the given symbol from a list
4235 dnl compilers process -U and -D options from left-to-right, so a -U option
4236 dnl cannot be used to cancel the effect of a preceding -D option.
4244 sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \
4245 -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
4247 dnl ---------------------------------------------------------------------------
4249 dnl ---------------------
4258 dnl ---------------------------------------------------------------------------
4260 dnl -------------
4266 if test -n "$LD_RPATH_OPT" ; then
4277 …[cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.…
4278 …rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[[ ]]/%/%' -e '…
4280 # If we passed the link-test, but get a "not found" on a given library,
4283 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
4285 if test -n "$cf_rpath_oops"
4294 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
4296 CF_VERBOSE(...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src)
4297 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
4316 dnl ---------------------------------------------------------------------------
4318 dnl ---------------
4320 dnl EXTRA_LDFLAGS for each -L option found.
4325 dnl but LIBS often has misplaced -L options.
4334 (-L*)
4338 if test -n "$cf_rpath_list"
4342 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
4353 if test "$LD_RPATH_OPT" = "-R " ; then
4354 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
4356 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
4360 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
4363 CF_VERBOSE(...Filter $cf_rpath_src ->$cf_rpath_tmp)
4376 dnl ---------------------------------------------------------------------------
4378 dnl ------------------
4392 x-[[IUD]]*)
4401 dnl ---------------------------------------------------------------------------
4403 dnl --------------
4404 dnl --------------
4410 dnl the build-tree, i.e., by making use of the libraries that are compiled in
4411 dnl $rel_builddir/lib We avoid compiling-in a $rel_builddir/lib path for the
4435 INSTALL_LIB="-m 644"
4449 AC_ARG_WITH(shlib-version,
4450 [ --with-shlib-version=X Specify rel or abi version for shared libs],
4451 [test -z "$withval" && withval=auto
4470 # Some less-capable ports of gcc support only -fpic
4479 (*linux*) # e.g., PGI compiler
4489 for CC_SHARED_OPTS in -fPIC -fpic ''
4501 (aix4.[3-9]*|aix[[5-7]]*)
4503 CC_SHARED_OPTS='-Wl,-brtl'
4504 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -
4506 CC_SHARED_OPTS='-brtl'
4507 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
4508 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]…
4512 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
4522 cat >mk_shared_lib.sh <<-CF_EOF
4525 IMPORT_LIB=\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
4527 cat <<-EOF
4532 …exec \[$]* ${LDFLAGS} -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{S…
4544 cat >mk_shared_lib.sh <<-CF_EOF
4547 IMPORT_LIB=\`echo "\[$]1" | sed -e 's/msys-/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
4549 cat <<-EOF
4554 …exec \[$]* ${LDFLAGS} -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{S…
4559 cf_try_cflags="no-cpp-precomp"
4560 CC_SHARED_OPTS="-dynamic"
4561 …AGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VE…
4564 AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_search_paths_first, [
4566 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4570 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4573 (hpux[[7-8]]*)
4574 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
4578 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $[@]'
4579 INSTALL_LIB="-m 555"
4582 # (tested with gcc 2.7.2 -- I don't have c89)
4584 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
4587 LD_SHARED_OPTS='-Wl,+b,${libdir}'
4589 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $[@]'
4590 # HP-UX shared libraries must be executable, and should be
4592 INSTALL_LIB="-m 555"
4602 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_sona…
4610 CC_SHARED_OPTS='-KPIC'
4611 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $[@]` -o $[@]'
4613 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $[@]` -o $[@]'
4617 (linux*|gnu*|k*bsd*-gnu)
4618 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
4626 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o…
4634 LOCAL_LDFLAGS="-link -dll"
4636 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
4641 cat >mk_shared_lib.sh <<-CF_EOF
4644 IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.lib/'\`
4648 cat <<-EOF
4653 args=\$(echo \[$]* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
4654 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
4658 cat >mk_prog.sh <<-CF_EOF
4667 while test \[$]# -gt 0; do
4669 -link)
4670 # ignore -link argument
4672 -M[[TD]] | -M[[TD]]d)
4673 # ignore runtime-library option
4675 -dll)
4678 -W* | -w*)
4681 -D*)
4684 -I*)
4687 -l*)
4688 libs+=("\`echo \"\[$]1\" | sed \"s/^-l//\"\`")
4690 -L*)
4691 ldopts+=("\`echo \"\[$]1\" | sed \"s/^-L/-LIBPATH:/\"\`")
4696 -Wl,*)
4697 for linkarg in \`echo '\[$]1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
4704 -o)
4706 ldopts+=("-out:\[$]1")
4715 if [[ "\$isdll" -ne 0 ]]; then
4724 cat <<-EOF
4740 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
4742 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
4747 cat >mk_shared_lib.sh <<-CF_EOF
4750 IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
4752 cat <<-EOF
4757 …exec \[$]* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-
4761 (openbsd[[2-9]].*|mirbsd*)
4762 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
4769 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
4771 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-
4775 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $[@]'
4779 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $[@]'
4781 (nto-qnx*|openbsd*|freebsd[[12]].*)
4782 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
4783 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $[@]'
4787 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
4794 …MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o…
4797 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
4803 if test -f /usr/libexec/ld.elf_so; then
4810 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]'
4812 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $[@]'
4819 …MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*"
4822 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
4825 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]'
4826 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
4832 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
4835 CC_SHARED_OPTS='-belf -KPIC'
4837 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $[@] .${REL_VERSION}`.${ABI_VERSION} -o [$]@'
4849 CC_SHARED_OPTS='-KPIC'
4851 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $[@]'
4858 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
4862 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
4867 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
4874 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $[@]'
4876 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]'
4882 CC_SHARED_OPTS='-KPIC'
4884 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o [$]@'
4892 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
4896 (*'-o $[@]')
4900 AC_MSG_WARN(ignored --with-shlib-version)
4906 if test -n "$cf_try_cflags"
4909 #line __oline__ "${as_me:-configure}"
4914 return (argv[[argc-1]] == 0) ;
4920 CFLAGS="$cf_save_CFLAGS -$cf_opt"
4921 AC_MSG_CHECKING(if CFLAGS option -$cf_opt works)
4933 # RPATH_LIST is a colon-separated list of directories
4934 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
4935 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
4958 dnl ---------------------------------------------------------------------------
4960 dnl ----------------
4962 dnl substitution into MK_SHARED_LIB string for the "-soname" (or similar)
4976 dnl ---------------------------------------------------------------------------
4978 dnl -------------
4979 dnl Check for definitions & structures needed for window size-changing
4981 dnl https://stackoverflow.com/questions/18878141/difference-between-structures-ttysize-and-winsize/…
4985 AC_CACHE_CHECK(declaration of size-change, cf_cv_sizechange,[
4993 if test -n "$cf_opts"
4995 CF_APPEND_TEXT(CPPFLAGS,-D$cf_opts)
5008 * termios.h -- it's only in termio.h and ptem.h
5041 echo "size-change succeeded ($cf_opts)" >&AC_FD_CC
5042 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
5056 dnl ---------------------------------------------------------------------------
5058 dnl -----------------
5073 (*-D_POSIX_SOURCE*)
5093 dnl ---------------------------------------------------------------------------
5095 dnl --------------
5096 dnl Construct a search-list for a nonstandard header/lib-file
5099 dnl $3 = the subdirectory, e.g., bin, include or lib
5117 dnl ---------------------------------------------------------------------------
5119 dnl --------------
5121 dnl to terminfo database. Usually it is in the same include-path as curses.h,
5127 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[[^.]]*\.h$%term.h%'`
5137 #include <${cf_cv_ncurses_header:-curses.h}>
5164 dnl ---------------------------------------------------------------------------
5166 dnl --------------
5168 dnl dependencies returned by "new" pkg-config files.
5173 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
5174 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
5180 dnl ---------------------------------------------------------------------------
5182 dnl -----------------
5183 dnl This is a simple wrapper to use for pkg-config, for libraries which may be
5188 dnl $3 = logic to use if pkg-config does not have the package
5192 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$1"; then
5194 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$1" 2>/dev/null`"
5195 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$1" 2>/dev/null`"
5207 dnl ---------------------------------------------------------------------------
5209 dnl -------------------
5224 CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE)
5242 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5246 dnl ---------------------------------------------------------------------------
5248 dnl -------------
5249 dnl Check to see if the BSD-style union wait is declared. Some platforms may
5302 dnl ---------------------------------------------------------------------------
5304 dnl --------
5309 $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5311 dnl ---------------------------------------------------------------------------
5313 dnl -----------
5324 [cf_cv_utf8_lib=add-on],
5330 if test "$cf_cv_utf8_lib" = "add-on" ; then
5337 dnl ---------------------------------------------------------------------------
5339 dnl ----------
5342 [test -n "$verbose" && echo " $1" 1>&AC_FD_MSG
5345 dnl ---------------------------------------------------------------------------
5347 dnl ---------------
5350 dnl (automake is a textbook-example of why the latter is a bad idea, but there
5354 dnl libtool-version release-version patch-version
5356 dnl release-version
5358 dnl libtool-version (see ?) consists of 3 integers separated by '.'
5359 dnl release-version consists of a major version and minor version
5360 dnl separated by '.', optionally followed by a patch-version
5361 dnl separated by '-'. The minor version need not be an
5363 dnl patch-version is an integer in the form yyyymmdd, so ifdef's and
5367 dnl simply extracts the first field using 'cut -f1'.
5374 if test -f "$srcdir/VERSION" ; then
5378 cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
5379 cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
5380 cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
5385 VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
5386 test -z "$VERSION_MAJOR" && AC_MSG_ERROR(missing major-version)
5388 VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[[^.]]*\.//' -e 's/-.*//'`
5389 test -z "$VERSION_MINOR" && AC_MSG_ERROR(missing minor-version)
5394 VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[[^-]]*-//'`
5397 AC_MSG_ERROR(missing patch-date $VERSION_PATCH)
5399 (.[[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]])
5402 AC_MSG_ERROR(illegal patch-date $VERSION_PATCH)
5426 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",[Define to the package-name])
5433 dnl ---------------------------------------------------------------------------
5435 dnl ---------------
5464 dnl ---------------------------------------------------------------------------
5466 dnl ---------------
5467 dnl Check for curses implementations that can handle wide-characters
5473 #include <${cf_cv_ncurses_header:-curses.h}>],[
5490 #include <${cf_cv_ncurses_header:-curses.h}>],
5496 #include <${cf_cv_ncurses_header:-curses.h}>],
5511 dnl ---------------------------------------------------------------------------
5513 dnl -------------------
5521 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
5522 AC_ARG_WITH(abi-version,
5523 [ --with-abi-version=XXX override derived ABI version],[
5542 dnl ---------------------------------------------------------------------------
5544 dnl ------------------
5549 AC_MSG_CHECKING(for specific curses-directory)
5550 AC_ARG_WITH(curses-dir,
5551 [ --with-curses-dir=DIR directory in which (n)curses is installed],
5556 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
5559 if test -d "$cf_cv_curses_dir"
5566 dnl ---------------------------------------------------------------------------
5568 dnl ----------------
5569 dnl Configure-option for dbmalloc. The optional parameter is used to override
5570 dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
5573 [ --with-dbmalloc test: use Conor Cahill's dbmalloc library],
5581 dnl ---------------------------------------------------------------------------
5583 dnl ---------------
5584 dnl Configure-option for dmalloc. The optional parameter is used to override
5585 dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
5588 [ --with-dmalloc test: use Gray Watson's dmalloc library],
5596 dnl ---------------------------------------------------------------------------
5598 dnl -------------------
5605 AC_MSG_CHECKING(if exported-symbols file should be used)
5606 AC_ARG_WITH(export-syms,
5607 [ --with-export-syms=XXX limit exported symbols using libtool],
5618 EXPORT_SYMS="-export-symbols $with_export_syms"
5622 dnl ---------------------------------------------------------------------------
5624 dnl ----------------------
5625 dnl Configure-script option to give a default value for the poorly-chosen name
5629 AC_MSG_CHECKING(for install-prefix)
5630 AC_ARG_WITH(install-prefix,
5631 [ --with-install-prefix=XXX sets DESTDIR, useful for packaging],
5633 [cf_opt_with_install_prefix=${DESTDIR:-no}])
5641 dnl ---------------------------------------------------------------------------
5643 dnl ---------------
5654 dnl ACLOCAL=`aclocal --print-ac-dir`
5655 dnl if test -z "$ACLOCAL" ; then
5658 dnl elif test ! -f $ACLOCAL/libtool.m4 ; then
5667 dnl rm -f $ORIG
5671 dnl sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL:-libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL
5674 dnl autoconf-257 $*
5683 LIB_CREATE='${AR} -cr'
5698 [ --with-libtool generate libraries with libtool],
5714 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5721 if test -z "$LIBTOOL" ; then
5725 …TE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSIO…
5728 LIB_CLEAN='${LIBTOOL} --mode=clean'
5729 LIB_COMPILE='${LIBTOOL} --mode=compile'
5730 LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5731 LIB_INSTALL='${LIBTOOL} --mode=install'
5732 LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5737 # special hack to add -no-undefined (which libtool should do for itself)
5740 (cygwin*|msys*|mingw32*|os2*|uwin*|aix[[4-7]])
5741 LT_UNDEF=-no-undefined
5746 # special hack to add --tag option for C++ compiler
5748 (1.[[5-9]]*|[[2-9]].[[0-9.a-z]]*)
5749 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5750 LIBTOOL="$LIBTOOL --tag=CC"
5761 test -z "$LIBTOOL" && ECHO_LT=
5779 dnl ---------------------------------------------------------------------------
5781 dnl --------------------
5784 dnl ./configure --with-libtool-opts=-static
5785 dnl to get the same behavior as automake-flavored
5786 dnl ./configure --enable-static
5789 AC_ARG_WITH(libtool-opts,
5790 [ --with-libtool-opts=XXX specify additional libtool options],
5805 dnl ---------------------------------------------------------------------------
5807 dnl ----------------
5811 dnl http://invisible-island.net/scripts/man2html.html
5817 dnl The shell script can be removed later, e.g., using "make distclean".
5831 if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
5848 [ --with-man2html=XXX use XXX rather than groff],
5877 # \${2} = suffix of file to convert, e.g., "1"
5878 # \${3} = macros to use, e.g., "man"
5899 $SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
5906 cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
5907 test -n "$cf_check_groff" && cf_check_groff=yes
5908 test -n "$cf_check_groff" || cf_check_groff=no
5910 test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
5924 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
5926 cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[[^0-9]]*://' -e 's/:.*//'`"
5927 cf_man2html_top=`expr "$cf_man2html_1st" - 2`
5928 cf_man2html_bot="`wc -l conftest.out |sed -e 's/[[^0-9]]//g'`"
5929 cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
5930 cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
5952 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
5953 …cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[[^0-9]]*://' -e …
5954 test -z "$cf_man2html_page" && cf_man2html_page=99999
5955 test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
5957 rm -rf conftest*
5962 MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
5965 …$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 …
5968 …$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top…
5980 dnl ---------------------------------------------------------------------------
5982 dnl -------------------
5983 dnl Use this macro for programs which use any variant of "curses", e.g.,
5985 dnl library (such as slang) should use a "--with-screen=XXX" option.
5988 dnl of the macros inside this one - before this macro.
5996 [ --with-screen=XXX use specified curses-libraries],
6000 [ --with-ncursesw use wide ncurses-libraries],
6004 [ --with-ncurses use ncurses-libraries],
6008 [ --with-pdcurses compile/link with pdcurses X11 library],
6011 AC_ARG_WITH(curses-colr,
6012 [ --with-curses-colr compile/link with HPUX 10.x color-curses],
6015 AC_ARG_WITH(curses-5lib,
6016 [ --with-curses-5lib compile/link with SunOS 5lib curses],
6036 AC_MSG_ERROR(unexpected screen-value: $cf_cv_screen)
6043 dnl ---------------------------------------------------------------------------
6045 dnl ----------------
6053 AC_MSG_CHECKING(if you want to perform memory-leak testing)
6054 AC_ARG_WITH(no-leaks,
6055 [ --with-no-leaks test: free permanent memory, analyze leaks],
6056 [AC_DEFINE(NO_LEAKS,1,[Define to 1 to enable leak-checking])
6060 (*) AC_DEFINE(DOALLOC,10000,[Define to size of malloc-array]) ;;
6064 dnl TODO - drop with_no_leaks
6068 dnl ---------------------------------------------------------------------------
6070 dnl --------------
6073 [ --with-purify test: use Purify],
6078 dnl ---------------------------------------------------------------------------
6080 dnl -------------------
6081 dnl Allow library's release-version to be overridden. Generally this happens when a
6082 dnl packager has incremented the release-version past that used in the original package,
6089 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
6090 AC_ARG_WITH(rel-version,
6091 [ --with-rel-version=XXX override derived release version],
6097 $1_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
6098 $1_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[[^.]]*//' -e 's/^\.//' -e 's/\..*//'`
6099 CF_NUMBER_SYNTAX([$]$1_MAJOR,Release major-version)
6100 CF_NUMBER_SYNTAX([$]$1_MINOR,Release minor-version)
6103 dnl ---------------------------------------------------------------------------
6105 dnl -----------------------
6107 dnl the "--with-screen=pdcurses" selection. Doing that allows the configure
6114 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
6120 dnl ---------------------------------------------------------------------------
6122 dnl -------------------------
6123 dnl Provide shared libraries using either autoconf macros (--with-shared) or
6124 dnl using the external libtool script (--with-libtool).
6144 # use to comment-out makefile lines
6170 [ --with-shared generate shared-libraries],
6204 dnl ---------------------------------------------------------------------------
6206 dnl ----------------
6209 [ --with-valgrind test: use valgrind],
6212 dnl ---------------------------------------------------------------------------
6214 dnl ----------------------
6224 AC_MSG_CHECKING(if versioned-symbols file should be used)
6225 AC_ARG_WITH(versioned-syms,
6226 [ --with-versioned-syms=X markup versioned symbols using ld],
6237 test -f "$with_versioned_syms" || AC_MSG_ERROR(expected a filename: $with_versioned_syms)
6240 test -f "$with_versioned_syms" || AC_MSG_ERROR(expected a filename: $with_versioned_syms)
6254 (*-Wl,*)
6255 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6256 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\[$]{VERSIONED_SYMS} -Wl,%"`
6259 (*-dy\ *)
6260 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6261 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\[$]{VERSIONED_SYMS} -dy%"`
6265 AC_MSG_WARN(this system does not support versioned-symbols)
6269 # Linux ld can selectively override scope, e.g., of symbols beginning with
6280 rm -f conftest.*
6337 if make -f conftest.mk 2>&AC_FD_CC >/dev/null
6340 …cf_missing="`nm -P conftest.so 2>&AC_FD_CC |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[[ ]][[DT…
6341 test -n "$cf_missing" && WILDCARD_SYMS=yes
6344 rm -f conftest.*
6351 dnl ---------------------------------------------------------------------------
6353 dnl ---------------
6366 #include <${cf_cv_ncurses_header:-curses.h}>],[
6393 #include <${cf_cv_ncurses_header:-curses.h}>],[
6415 CF_APPEND_TEXT(CPPFLAGS,-D$cf_cv_need_xopen_extension)
6420 dnl ---------------------------------------------------------------------------
6422 dnl ---------------
6425 dnl without losing the common non-POSIX features.
6441 (aix[[4-7]]*)
6442 cf_xopen_source="-D_ALL_SOURCE"
6447 (darwin[[0-8]].*)
6448 cf_xopen_source="-D_APPLE_C_SOURCE"
6451 cf_xopen_source="-D_DARWIN_C_SOURCE"
6460 …cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE…
6463 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6466 cf_xopen_source="-D_HPUX_SOURCE"
6469 cf_xopen_source="-D_SGI_SOURCE"
6472 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
6476 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
6484 …cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, bre…
6486 (openbsd[[4-9]]*)
6487 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
6488 cf_xopen_source="-D_BSD_SOURCE"
6495 cf_xopen_source="-D_OSF_SOURCE"
6497 (nto-qnx*)
6498 cf_xopen_source="-D_QNX_SOURCE"
6504 cf_xopen_source="-D__EXTENSIONS__"
6517 if test -n "$cf_xopen_source" ; then
6521 dnl In anything but the default case, we may have system-specific setting
6524 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
6536 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
6551 dnl ---------------------------------------------------------------------------
6553 dnl -----------
6559 cf_x_athena=${cf_x_athena:-Xaw}
6564 [ --with-Xaw3d link with Xaw 3d library])
6575 [ --with-Xaw3dxft link with Xaw 3d xft library])
6586 [ --with-neXtaw link with neXT Athena library])
6594 AC_MSG_CHECKING(if you want to link with Athena-Plus library)
6597 [ --with-XawPlus link with Athena-Plus library])
6613 ${cf_x_athena}-devel \
6615 lib${cf_x_athena}-devel
6636 (*-lXmu*)
6641 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^[ ][ ]*//' -e 's/ .*//'`
6646 CF_ADD_LIB_AFTER($cf_first_lib,-lXmu)
6657 if test -z "$cf_x_athena_lib" ; then
6664 dnl ---------------------------------------------------------------------------
6666 dnl --------------------
6668 dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw.
6681 if test -z "$cf_x_athena_inc" ; then
6685 CF_APPEND_TEXT(CPPFLAGS,-I$cf_path/include)
6705 if test -z "$cf_x_athena_inc" ; then
6708 CF_APPEND_TEXT(CPPFLAGS,-I$cf_x_athena_inc)
6711 dnl ---------------------------------------------------------------------------
6713 dnl ----------------
6715 dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw.
6733 "-l$cf_lib -lXmu" \
6734 "-l$cf_lib -lXpm -lXmu" \
6735 "-l${cf_lib}_s -lXmu_s"
6737 test -n "$cf_x_athena_lib" && break
6741 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
6759 test -n "$cf_x_athena_lib" && break
6763 if test -z "$cf_x_athena_lib" ; then
6765 [Unable to successfully link Athena library (-l$cf_x_athena_root) with test program])
6772 dnl ---------------------------------------------------------------------------
6774 dnl --------
6780 dnl ---------------------------------------------------------------------------
6782 dnl ------------
6792 # Check for that pitfall, and recover using pkg-config
6795 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
6810 (*-lX11*)
6826 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
6827 CF_TRY_PKG_CONFIG(x11,,[CF_ADD_LIB_AFTER(-lXt,-lX11)])
6842 (*-lICE*)
6844 (*-lICE*)
6850 [CF_ADD_LIB_AFTER(-lXt,$X_PRE_LIBS)])
6871 LIBS="-lXt $LIBS"])])
6876 [Unable to successfully link X Toolkit library (-lXt) with
6881 dnl ---------------------------------------------------------------------------
6883 dnl -------------------
6960 - \$(SHELL) -c "if test -z "\$(DESTDIR)" ; then /sbin/ldconfig; fi"
6974 -rm -f \$(DESTDIR)\$(libdir)/$cf_libroot
6975 -rm -f \$(DESTDIR)\$(libdir)/$cf_liblink
6980 -rm -f \$(DESTDIR)\$(libdir)/$cf_libname
6989 -rm -f $cf_libroot
6990 -rm -f $cf_liblink
6995 -rm -f $cf_libname
6998 -rm -f $3
7002 dnl ---------------------------------------------------------------------------
7004 dnl ---------------
7012 #include <${cf_cv_ncurses_header:-curses.h}>
7022 dnl ---------------------------------------------------------------------------
7024 dnl ---------------------
7045 dnl ---------------------------------------------------------------------------
7047 dnl ---------------------
7051 dnl LIB_PREFIX - "lib"
7052 dnl LIB_ROOTNAME - "foo"
7053 dnl LIB_SUFFIX - ".so"
7054 dnl REL_VERSION - "5.0"
7055 dnl ABI_VERSION - "4.2.4"
7068 dnl ---------------------------------------------------------------------------
7070 dnl --------------
7071 dnl Test-code needed for iconv compile-checks
7077 dnl ---------------------------------------------------------------------------
7079 dnl --------------
7080 dnl Header-files needed for iconv compile-checks
7085 dnl ---------------------------------------------------------------------------
7087 dnl --------------------
7101 dnl ---------------------------------------------------------------------------
7103 dnl -------------
7104 dnl Test-code needed for libintl compile-checks
7109 ifelse([$1], need-ngettext, [ + (int) ngettext ("", "", 0)], [])
7114 dnl ---------------------------------------------------------------------------
7116 dnl -------------
7117 dnl Header-files needed for libintl compile-checks
7122 dnl ---------------------------------------------------------------------------
7124 dnl ----------