Lines Matching +full:gcc +full:- +full:g

3 dnl ---------------------------------------------------------------------------
4 dnl Copyright 2004-2022,2023 Thomas E. Dickey
29 dnl ---------------------------------------------------------------------------
30 dnl ---------------------------------------------------------------------------
32 dnl ------------------
42 [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
46 dnl ---------------------------------------------------------------------------
48 dnl --------------------
56 dnl ---------------------------------------------------------------------------
58 dnl -------------
59 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
78 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
80 (-D*)
81 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
84 && test -z "${cf_tst_cflags}" \
101 (-D*)
102 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
118 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[[^"]]*"'\''//'`
121 && test -z "${cf_tst_cflags}" \
127 if test -n "$cf_new_cflags" ; then
132 if test -n "$cf_new_cppflags" ; then
137 if test -n "$cf_new_extra_cppflags" ; then
145 dnl ---------------------------------------------------------------------------
147 dnl ----------------
156 (x-[[DU]]*)
164 dnl ---------------------------------------------------------------------------
166 dnl --------------
171 test -n "[$]$1" && $1="[$]$1 "
174 dnl ---------------------------------------------------------------------------
176 dnl --------------
177 dnl Allow user to disable a normally-on option.
180 dnl ---------------------------------------------------------------------------
182 dnl -------------
183 dnl Allow user to enable a normally-off option.
186 dnl ---------------------------------------------------------------------------
188 dnl -------------
194 dnl $2 = help-string
209 dnl ---------------------------------------------------------------------------
211 dnl ---------------
216 [ --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics],
247 dnl ---------------------------------------------------------------------------
249 dnl ---------------
250 dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
267 (*-[[IUD]]*)
284 (*[[\ \ ]]-*)
288 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
289 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
294 (x-[[IUDfgOW]]*)
311 dnl ---------------------------------------------------------------------------
313 dnl --------------
319 dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM
320 dnl which is useful in cross-compiles.
326 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
330 system_name="`(uname -s -r) 2>/dev/null`"
331 if test -z "$system_name" ; then
335 test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.…
338 test -z "$system_name" && system_name="$cf_cv_system_name"
339 test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name)
346 dnl ---------------------------------------------------------------------------
348 dnl -----------------
350 dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does
351 dnl not ignore some gcc options.
354 dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from
355 dnl the wrappers for gcc and g++ warnings.
357 dnl $1 = GCC (default) or GXX
363 if test "$ifelse([$1],,[$1],GCC)" = yes ; then
381 (c[[1-9]][[0-9]]|*/c[[1-9]][[0-9]])
383 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
389 …ERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[[^)]]*) //' -e 's/^.*(Debian[[^…
390 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
394 -Qunused-arguments \
395 -Wno-error=implicit-function-declaration
414 dnl ---------------------------------------------------------------------------
416 dnl -----------------
417 dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most
418 dnl character-strings.
420 dnl It is ambiguous because the specification accommodated the pre-ANSI
422 dnl compiler other than by costly add-ons. Because of this, the specification
447 AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[
466 CF_APPEND_TEXT(CPPFLAGS,-DXTSTRINGDEFINES)
469 CF_APPEND_TEXT(CPPFLAGS,-D_CONST_X_STRING)
475 dnl ---------------------------------------------------------------------------
477 dnl ---------------
478 dnl You can always use "make -n" to see the actual options, but it is hard to
479 dnl pick out/analyze warning messages when the compile-line is long.
482 dnl ECHO_LT - symbol to control if libtool is verbose
483 dnl ECHO_LD - symbol to prefix "cc -o" lines
484 dnl RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
485 dnl SHOW_CC - symbol to put before explicit "cc -c" lines
486 dnl ECHO_CC - symbol to put before any "cc" line
491 [ --disable-echo do not display "compiling" commands],
493 ECHO_LT='--silent'
512 dnl ---------------------------------------------------------------------------
514 dnl ----------------
515 dnl Combine no-leak checks with the libraries or tools that are used for the
523 AC_MSG_CHECKING(if you want to perform memory-leak testing)
525 [ --disable-leaks test: free permanent memory, analyze leaks],
533 AC_DEFINE(NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.])
534 AC_DEFINE(YY_NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.])
537 dnl ---------------------------------------------------------------------------
539 dnl ------------------
540 dnl Configure-option to enable gcc warnings
545 dnl yes: always do this, e.g., to use in generated library-headers
548 if test "$GCC" = yes || test "$GXX" = yes
553 AC_MSG_CHECKING(if you want to turn on gcc warnings)
555 [ --enable-warnings test: turn on gcc compiler warnings],
567 dnl ---------------------------------------------------------------------------
569 dnl ---------------
570 dnl Warning flags do not belong in CFLAGS, CPPFLAGS, etc. Any of gcc's
571 dnl "-Werror" flags can interfere with configure-checks. Those go into
576 if test "$GCC" = yes || test "$GXX" = yes
579 (*-Werror=*)
584 (x-Werror=format*)
587 (x-Werror=*)
607 dnl ---------------------------------------------------------------------------
609 dnl -----------------
610 dnl Test for availability of useful gcc __attribute__ directives to quiet
611 dnl compiler warnings. Though useful, not all are supported -- and contrary
617 if test "$GCC" = yes || test "$GXX" = yes
633 if test "$GCC" = yes
637 #line __oline__ "${as_me:-configure}"
686 test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
690 AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc])
696 AC_DEFINE(GCC_PRINTF,1,[Define to 1 if the compiler supports gcc-like printf attribute.])
698 AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc])
704 AC_DEFINE(GCC_SCANF,1,[Define to 1 if the compiler supports gcc-like scanf attribute.])
706 AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc])
709 AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc])
715 ${FGREP-fgrep} define conftest.i >>confdefs.h
717 rm -rf ./conftest*
720 dnl ---------------------------------------------------------------------------
722 dnl --------------
723 dnl Find version of gcc, and (because icc/clang pretend to be gcc without being
728 if test "$GCC" = yes ; then
730 …GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //' -e 's/…
731 test -z "$GCC_VERSION" && GCC_VERSION=unknown
734 CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
735 CF_CLANG_COMPILER(GCC,CLANG_COMPILER,CFLAGS)
737 dnl ---------------------------------------------------------------------------
739 dnl ---------------
743 dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x)
744 dnl -Winline (usually not worthwhile)
745 dnl -Wredundant-decls (system headers make this too noisy)
746 dnl -Wtraditional (combines too many unrelated messages, only a few useful)
747 dnl -Wwrite-strings (too noisy, but should review occasionally). This
748 dnl is enabled for ncurses using "--enable-const".
749 dnl -pedantic
752 dnl $1 is an optional list of gcc warning flags that a particular
753 dnl application might want to use, e.g., "no-unused" for
754 dnl -Wno-unused
756 dnl If $with_ext_const is "yes", add a check for -Wwrite-strings
763 #line __oline__ "${as_me:-configure}"
764 int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
768 # The "-wdXXX" options suppress warnings:
770 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential…
771 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
781 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
793 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
795 test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
796 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
800 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
805 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
806 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
809 Wbad-function-cast \
810 Wcast-align \
811 Wcast-qual \
812 Wdeclaration-after-statement \
815 Wmissing-declarations \
816 Wmissing-prototypes \
817 Wnested-externs \
818 Wpointer-arith \
820 Wstrict-prototypes \
821 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST $1
823 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
825 test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
830 CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
834 (Wpointer-arith)
837 CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
842 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
847 rm -rf ./conftest*
851 dnl ---------------------------------------------------------------------------
853 dnl ----------------
877 dnl ---------------------------------------------------------------------------
879 dnl -------------
913 CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE)
930 CF_ADD_CFLAGS(-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source)
957 CF_ADD_CFLAGS(-D_GNU_SOURCE)
971 CF_APPEND_TEXT(CPPFLAGS,-D_GNU_SOURCE)
981 CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE)
988 dnl ---------------------------------------------------------------------------
990 dnl --------------
991 dnl Call this to generate a script "install-man" which uses the detected
992 dnl manpage-format to compress the resulting manpage. Providing this as a
996 dnl symbols in the manpage, e.g.,
1014 cf_install_man=install-man
1032 Usage: install-man [[-l]] [[source]] target
1045 (x-l)
1049 (x-*)
1059 test -n "$OPTS" && usage
1065 origin_name=`echo "$source" |sed -e 's%^.*/%%' -e 's%\..*%%'`
1067 leading_cap=`echo "$actual_name" | sed -e 's%^\(.\).*$%\1%' | tr a-z A-Z``echo "$actual_name" | sed…
1068 capitalized=`echo "$actual_name" | tr a-z A-Z`
1070 cf_tmpdir=`mktemp -d`
1071 trap 'rm -rf "$cf_tmpdir"; exit 1' 1 2 3 15
1072 trap 'rm -rf "$cf_tmpdir"; exit 0' 0
1074 if test -n "$source" ; then
1076 test -n "@cf_manpage_so_strip" && suffix=".@cf_manpage_so_strip@"
1078 source_dir=`echo "$source" | sed -e "s%/[[^/]]*$%%"`
1079 target_dir=`echo "$target" | sed -e "s%/[[^/]]*$%%"`
1083 if test ! -d "$target_dir" ; then
1085 elif test ! -f "$targetfile" ; then
1088 failed "unexpected directory for source-link: $source_dir"
1090 test -f "$targetlink" && failed "already exists $targetlink"
1091 ( cd "$target_dir" && @LN_S@ "`echo "$targetfile" | sed -e 's%^.*/%%'`" "$sourcelink" )
1092 test -f "$targetlink" || failed "cannot create $targetlink"
1099 -e "/^.ds N/s%N.*%N $leading_cap%" \
1100 -e "/^.ds n/s%n.*%n $actual_name%" \
1101 -e "/^\.TH/s%[[ ]][[ ]]*[[^ ]][[^ ]]*% $capitalized%" \
1102 -e "/^\.SH[[ ]][[ ]]*NAME/,/[[ ]]\\\\-[[ ]]/s%^\\\\\\*[[Nn]]%$actual_name%" \
1104 diff -c "$source" "$interim"
1108 if test -n "@cf_manpage_compress@" ; then
1112 if test -d "$target" ; then
1115 test -n "@cf_manpage_compress@" && target="${target}.@cf_manpage_so_strip@"
1122 test -n "@cf_manpage_compress@" && target="${target}.@cf_manpage_so_strip@"
1123 if test -f "$target" ; then
1124 rm -f "$target"
1133 dnl ---------------------------------------------------------------------------
1135 dnl -----------------
1137 dnl tries to imitate gcc, but does not return an error when it finds a mismatch
1138 dnl between prototypes, e.g., as exercised by CF_MISSING_CHECK.
1141 dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from
1142 dnl the wrappers for gcc and g++ warnings.
1144 dnl $1 = GCC (default) or GXX
1151 if test "$ifelse([$1],,[$1],GCC)" = yes ; then
1156 ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc"
1163 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1171 dnl ---------------------------------------------------------------------------
1173 dnl ------------
1179 test -z "$cf_make_docs" && cf_make_docs=0
1182 test -f "$cf_output" || cf_output=Makefile
1192 ${NROFF_NOTE} [\$](SHELL) -c "tbl [\$]*.$2 | nroff -man | col -bx" >[\$]@
1198 ${GROFF_NOTE} [\$](SHELL) -c "tbl [\$]*.$2 | groff -man" >[\$]@
1201 ${GROFF_NOTE} GROFF_NO_SGR=stupid [\$](SHELL) -c "tbl [\$]*.$2 | nroff -rHY=0 -Tascii -man | col -b…
1214 ${NROFF_NOTE}docs docs-$cf_name :: $cf_name.txt
1215 ${MAN2HTML_NOTE}docs docs-$cf_name :: $cf_name.html
1216 ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.pdf
1217 ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.ps
1218 ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.txt
1221 docs-clean ::
1222 ${NROFF_NOTE} rm -f $cf_name.txt
1223 ${MAN2HTML_NOTE} rm -f $cf_name.html
1224 ${GROFF_NOTE} rm -f $cf_name.pdf
1225 ${GROFF_NOTE} rm -f $cf_name.ps
1226 ${GROFF_NOTE} rm -f $cf_name.txt
1236 dnl ---------------------------------------------------------------------------
1238 dnl ------------
1247 AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS:-ctags}, yes, no)
1250 AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS:-etags}, yes, no)
1273 dnl ---------------------------------------------------------------------------
1275 dnl -----------------
1279 dnl compress - man checks for, can display compressed files
1280 dnl bzip2 - man checks for, can display bzip2'd files
1281 dnl gzip - man checks for, can display gzip'd files
1282 dnl xz - man checks for, can display xz'd files
1284 dnl BSDI - files in the cat-directories are suffixed ".0"
1285 dnl formatted - installer should format (put files in cat-directory)
1286 dnl catonly - installer should only format, e.g., for a turnkey system.
1288 dnl There are other configurations which this macro does not test, e.g., HPUX's
1294 AC_MSG_CHECKING(format of man-pages)
1296 AC_ARG_WITH(manpage-format,
1297 [ --with-manpage-format specify manpage-format: gzip/compress/bzip2/xz,
1299 e.g., gzip,formatted],
1303 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
1304 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
1310 if test -z "$MANPATH" ; then
1314 # look for the 'date' man-page (it is most likely to be installed!)
1320 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1322 test -z "$cf_dir" && cf_dir=/usr/man
1325 cf_test=`echo "$cf_name" | sed -e 's/*//'`
1349 if test -n "$MANPAGE_FORMAT" ; then
1362 if test -n "$MANPAGE_FORMAT" ; then
1367 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
1384 if test -n "$cf_unknown" ; then
1385 AC_MSG_WARN(Unexpected manpage-format $cf_unknown)
1429 dnl ---------------------------------------------------------------------------
1431 dnl ----------------------
1432 dnl Check if the file-system supports mixed-case filenames. If we're able to
1436 AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
1439 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
1447 rm -f conftest CONFTEST
1449 if test -f CONFTEST ; then
1454 rm -f conftest CONFTEST
1457 … yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.])
1459 dnl ---------------------------------------------------------------------------
1461 dnl ----------
1469 rm -rf ./conftest*
1498 ${cf_cv_main_return:-return}(result);
1511 dnl ---------------------------------------------------------------------------
1513 dnl ----------
1517 echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
1519 dnl ---------------------------------------------------------------------------
1521 dnl ------------------
1525 dnl $2 = help-text
1535 : "${with_cflags:=-g}"
1544 AC_MSG_RESULT(${with_$1:-no})
1547 (.*-g*)
1549 (.*-g*)
1552 CF_ADD_CFLAGS([-g])
1558 dnl ---------------------------------------------------------------------------
1560 dnl ----------
1574 dnl ---------------------------------------------------------------------------
1576 dnl --------------
1593 (.[[a-zA-Z]]:[[\\/]]*) # OS/2 EMX
1599 $1=`echo "[$]$1" | sed -e s%NONE%$cf_path_syntax%`
1604 $1=`echo "[$]$1" | sed -e s%NONE%$cf_path_syntax%`
1611 dnl ---------------------------------------------------------------------------
1613 dnl -----------------
1616 dnl POSIX.1-1990 _POSIX_SOURCE
1617 dnl POSIX.1-1990 and _POSIX_SOURCE and
1618 dnl POSIX.2-1992 C-Language _POSIX_C_SOURCE=2
1620 dnl POSIX.1b-1993 _POSIX_C_SOURCE=199309L
1621 dnl POSIX.1c-1996 _POSIX_C_SOURCE=199506L
1649 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1652 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1664 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE")
1690 dnl ---------------------------------------------------------------------------
1692 dnl ----------------
1693 dnl POSIX documents test-macros which an application may set before any system
1699 dnl overrides the corresponding test-macros. Doing that introduces portability
1706 AC_CACHE_CHECK(if the POSIX test-macros are already defined,cf_cv_posix_visible,[
1708 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
1709 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
1710 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
1711 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
1717 dnl ---------------------------------------------------------------------------
1719 dnl -----------
1724 test -z "$AWK" && AC_MSG_ERROR(No awk program found)
1726 dnl ---------------------------------------------------------------------------
1728 dnl ----------
1743 dnl ---------------------------------------------------------------------------
1745 dnl -------------
1763 dnl ---------------------------------------------------------------------------
1765 dnl ------------
1771 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
1777 dnl ---------------------------------------------------------------------------
1779 dnl ----------------
1786 cf_tmp_cflag=`echo "x$1" | sed -e 's/^.//' -e 's/=.*//'`
1789-e 's/^.//' -e 's/[[ ]][[ ]]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[[^ ]][[^ ]]*\\)\?%%" -e 's/^[[ ]…
1795 dnl ---------------------------------------------------------------------------
1797 dnl ----------------
1798 dnl Remove all -U and -D options that refer to the given symbol from a list
1800 dnl compilers process -U and -D options from left-to-right, so a -U option
1801 dnl cannot be used to cancel the effect of a preceding -D option.
1809 sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \
1810 -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
1812 dnl ---------------------------------------------------------------------------
1814 dnl -------------------
1822 CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE)
1833 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
1837 dnl ---------------------------------------------------------------------------
1839 dnl --------
1844 $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1846 dnl ---------------------------------------------------------------------------
1848 dnl ----------
1851 [test -n "$verbose" && echo " $1" 1>&AC_FD_MSG
1854 dnl ---------------------------------------------------------------------------
1856 dnl ------------
1863 AC_DEFUN([CF_CONST_X_STRING],[echo "skipping X-const check";])dnl
1867 dnl ---------------------------------------------------------------------------
1869 dnl ----------------
1870 dnl Configure-option for dbmalloc. The optional parameter is used to override
1871 dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
1874 [ --with-dbmalloc test: use Conor Cahill's dbmalloc library],
1882 dnl ---------------------------------------------------------------------------
1884 dnl ---------------
1885 dnl Configure-option for dmalloc. The optional parameter is used to override
1886 dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
1889 [ --with-dmalloc test: use Gray Watson's dmalloc library],
1897 dnl ---------------------------------------------------------------------------
1899 dnl ----------------
1903 dnl http://invisible-island.net/scripts/man2html.html
1909 dnl The shell script can be removed later, e.g., using "make distclean".
1923 if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
1940 [[ --with-man2html[=XXX] use XXX rather than groff]],
1969 # \${2} = suffix of file to convert, e.g., "1"
1970 # \${3} = macros to use, e.g., "man"
1991 $SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
1998 cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
1999 test -n "$cf_check_groff" && cf_check_groff=yes
2000 test -n "$cf_check_groff" || cf_check_groff=no
2002 test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
2016 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
2018 cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[[^0-9]]*://' -e 's/:.*//'`"
2019 cf_man2html_top=`expr "$cf_man2html_1st" - 2`
2020 cf_man2html_bot="`wc -l conftest.out |sed -e 's/[[^0-9]]//g'`"
2021 cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
2022 cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
2044 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
2045 …cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[[^0-9]]*://' -e …
2046 test -z "$cf_man2html_page" && cf_man2html_page=99999
2047 test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
2049 rm -rf conftest*
2054 MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
2057 …$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 …
2060 …$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top…
2072 dnl ---------------------------------------------------------------------------
2074 dnl ----------------
2077 [ --with-valgrind test: use valgrind],
2080 dnl ---------------------------------------------------------------------------
2082 dnl ---------------
2085 dnl without losing the common non-POSIX features.
2100 dnl https://docs.oracle.com/cd/E19253-01/816-5175/standards-5/index.html
2101 dnl https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
2113 (aix[[4-7]]*)
2114 cf_xopen_source="-D_ALL_SOURCE"
2116 (darwin[[0-8]].*)
2117 cf_xopen_source="-D_APPLE_C_SOURCE"
2120 cf_xopen_source="-D_DARWIN_C_SOURCE"
2129 …cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE…
2132 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2135 cf_xopen_source="-D_HPUX_SOURCE"
2138 cf_xopen_source="-D_SGI_SOURCE"
2141 …abin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw…
2145 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
2153 …cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, bre…
2155 (openbsd[[6-9]]*)
2156 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
2157 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
2160 cf_xopen_source="-D_BSD_SOURCE"
2163 (openbsd[[4-5]]*)
2164 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
2165 cf_xopen_source="-D_BSD_SOURCE"
2172 cf_xopen_source="-D_OSF_SOURCE"
2174 (nto-qnx*)
2175 cf_xopen_source="-D_QNX_SOURCE"
2181 cf_xopen_source="-D__EXTENSIONS__"
2192 # Some of these niche implementations use copy/paste, double-check...
2202 if test -n "$cf_xopen_source" ; then
2206 dnl In anything but the default case, we may have system-specific setting
2209 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
2221 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
2222 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
2236 dnl ---------------------------------------------------------------------------
2238 dnl ---------------------
2239 dnl body of test when test-compiling for _XOPEN_SOURCE check
2246 dnl ---------------------------------------------------------------------------
2248 dnl ---------------------
2249 dnl headers to include when test-compiling for _XOPEN_SOURCE check