1 dnl $Id: aclocal.m4,v 1.10 2010/02/16 09:59:33 tom Exp $
3 dnl Macros for byacc configure script (Thomas E. Dickey)
4 dnl ---------------------------------------------------------------------------
5 dnl ---------------------------------------------------------------------------
6 dnl CF_ADD_CFLAGS version: 9 updated: 2010/01/09 11:05:50
8 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
9 dnl The second parameter if given makes this macro verbose.
11 dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS,
12 dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily
13 dnl confused by the quotes (which require backslashes to keep them usable).
14 AC_DEFUN([CF_ADD_CFLAGS],
19 cf_new_extra_cppflags=
21 for cf_add_cflags in $1
23 case $cf_fix_cppflags in
25 case $cf_add_cflags in #(vi
26 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
27 case $cf_add_cflags in
29 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
31 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
32 && test -z "${cf_tst_cflags}" \
33 && cf_fix_cppflags=yes
35 if test $cf_fix_cppflags = yes ; then
36 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
38 elif test "${cf_tst_cflags}" = "\"'" ; then
39 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
48 case $cf_add_cflags in #(vi
50 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
51 CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags)
54 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
59 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
64 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
66 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'`
68 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
69 && test -z "${cf_tst_cflags}" \
75 if test -n "$cf_new_cflags" ; then
76 ifelse($2,,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)])
77 CFLAGS="$CFLAGS $cf_new_cflags"
80 if test -n "$cf_new_cppflags" ; then
81 ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])
82 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
85 if test -n "$cf_new_extra_cppflags" ; then
86 ifelse($2,,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)])
87 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
90 AC_SUBST(EXTRA_CPPFLAGS)
93 dnl ---------------------------------------------------------------------------
94 dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34
96 dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'
97 dnl in the sharutils 4.2 distribution.
98 AC_DEFUN([CF_ANSI_CC_CHECK],
100 AC_CACHE_CHECK(for ${CC-cc} option to accept ANSI C, cf_cv_ansi_cc,[
102 cf_save_CFLAGS="$CFLAGS"
103 cf_save_CPPFLAGS="$CPPFLAGS"
104 # Don't try gcc -ansi; that turns off useful extensions and
105 # breaks some systems' header files.
107 # Ultrix and OSF/1 -std1
108 # HP-UX -Aa -D_HPUX_SOURCE
110 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
111 for cf_arg in "-DCC_HAS_PROTOS" \
116 "-Aa -D_HPUX_SOURCE" \
119 CF_ADD_CFLAGS($cf_arg)
122 #ifndef CC_HAS_PROTOS
123 #if !defined(__STDC__) || (__STDC__ != 1)
128 int test (int i, double x);
129 struct s1 {int (*f) (int a);};
130 struct s2 {int (*f) (double a);};],
131 [cf_cv_ansi_cc="$cf_arg"; break])
133 CFLAGS="$cf_save_CFLAGS"
134 CPPFLAGS="$cf_save_CPPFLAGS"
137 if test "$cf_cv_ansi_cc" != "no"; then
138 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
139 CF_ADD_CFLAGS($cf_cv_ansi_cc)
141 AC_DEFINE(CC_HAS_PROTOS)
145 dnl ---------------------------------------------------------------------------
146 dnl CF_ANSI_CC_REQD version: 4 updated: 2008/03/23 14:48:54
148 dnl For programs that must use an ANSI compiler, obtain compiler options that
149 dnl will make it recognize prototypes. We'll do preprocessor checks in other
150 dnl macros, since tools such as unproto can fake prototypes, but only part of
151 dnl the preprocessor.
152 AC_DEFUN([CF_ANSI_CC_REQD],
153 [AC_REQUIRE([CF_ANSI_CC_CHECK])
154 if test "$cf_cv_ansi_cc" = "no"; then
156 [Your compiler does not appear to recognize prototypes.
157 You have the following choices:
158 a. adjust your compiler options
159 b. get an up-to-date compiler
160 c. use a wrapper such as unproto])
163 dnl ---------------------------------------------------------------------------
164 dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
166 dnl Allow user to disable a normally-on option.
167 AC_DEFUN([CF_ARG_DISABLE],
168 [CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
169 dnl ---------------------------------------------------------------------------
170 dnl CF_ARG_OPTION version: 3 updated: 1997/10/18 14:42:41
172 dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
178 dnl $3 = action to perform if option is not default
179 dnl $4 = action if perform if option is default
180 dnl $5 = default option value (either 'yes' or 'no')
181 AC_DEFUN([CF_ARG_OPTION],
182 [AC_ARG_ENABLE($1,[$2],[test "$enableval" != ifelse($5,no,yes,no) && enableval=ifelse($5,no,no,yes)
183 if test "$enableval" != "$5" ; then
185 ,[ $3]) ifelse($4,,,[
188 fi],[enableval=$5 ifelse($4,,,[
192 dnl ---------------------------------------------------------------------------
193 dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59
195 dnl Check if we're accidentally using a cache from a different machine.
196 dnl Derive the system name, as a check for reusing the autoconf cache.
198 dnl If we've packaged config.guess and config.sub, run that (since it does a
199 dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow
200 dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM
201 dnl which is useful in cross-compiles.
203 dnl Note: we would use $ac_config_sub, but that is one of the places where
204 dnl autoconf 2.5x broke compatibility with autoconf 2.13
205 AC_DEFUN([CF_CHECK_CACHE],
207 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
208 ifelse([$1],,[AC_CANONICAL_HOST],[$1])
209 system_name="$host_os"
211 system_name="`(uname -s -r) 2>/dev/null`"
212 if test -z "$system_name" ; then
213 system_name="`(hostname) 2>/dev/null`"
216 test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
217 AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
219 test -z "$system_name" && system_name="$cf_cv_system_name"
220 test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name)
222 if test ".$system_name" != ".$cf_cv_system_name" ; then
223 AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name))
224 AC_MSG_ERROR("Please remove config.cache and try again.")
227 dnl ---------------------------------------------------------------------------
228 dnl CF_DISABLE_ECHO version: 11 updated: 2009/12/13 13:16:57
230 dnl You can always use "make -n" to see the actual options, but it's hard to
231 dnl pick out/analyze warning messages when the compile-line is long.
234 dnl ECHO_LT - symbol to control if libtool is verbose
235 dnl ECHO_LD - symbol to prefix "cc -o" lines
236 dnl RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
237 dnl SHOW_CC - symbol to put before explicit "cc -c" lines
238 dnl ECHO_CC - symbol to put before any "cc" line
240 AC_DEFUN([CF_DISABLE_ECHO],[
241 AC_MSG_CHECKING(if you want to see long compiling messages)
243 [ --disable-echo display "compiling" commands],
246 ECHO_LD='@echo linking [$]@;'
247 RULE_CC='@echo compiling [$]<'
248 SHOW_CC='@echo compiling [$]@'
257 AC_MSG_RESULT($enableval)
264 dnl ---------------------------------------------------------------------------
265 dnl CF_DISABLE_LEAKS version: 4 updated: 2006/12/16 15:10:42
267 dnl Combine no-leak checks with the libraries or tools that are used for the
269 AC_DEFUN([CF_DISABLE_LEAKS],[
271 AC_REQUIRE([CF_WITH_DMALLOC])
272 AC_REQUIRE([CF_WITH_DBMALLOC])
273 AC_REQUIRE([CF_WITH_VALGRIND])
275 AC_MSG_CHECKING(if you want to perform memory-leak testing)
277 [ --disable-leaks test: free permanent memory, analyze leaks],
279 : ${with_no_leaks:=no})
280 AC_MSG_RESULT($with_no_leaks)
282 if test "$with_no_leaks" = yes ; then
286 dnl ---------------------------------------------------------------------------
287 dnl CF_GCC_ATTRIBUTES version: 13 updated: 2009/08/11 20:19:56
288 dnl -----------------
289 dnl Test for availability of useful gcc __attribute__ directives to quiet
290 dnl compiler warnings. Though useful, not all are supported -- and contrary
291 dnl to documentation, unrecognized directives cause older compilers to barf.
292 AC_DEFUN([CF_GCC_ATTRIBUTES],
296 cat > conftest.i <<EOF
304 #define GCC_NORETURN /* nothing */
307 #define GCC_UNUSED /* nothing */
312 AC_CHECKING([for $CC __attribute__ directives])
313 cat > conftest.$ac_ext <<EOF
314 #line __oline__ "${as_me-configure}"
315 #include "confdefs.h"
316 #include "conftest.h"
317 #include "conftest.i"
319 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
321 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
324 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
326 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
328 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
329 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
330 extern void foo(void) GCC_NORETURN;
331 int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }
333 cf_printf_attribute=no
334 cf_scanf_attribute=no
335 for cf_attribute in scanf printf unused noreturn
337 CF_UPPER(cf_ATTRIBUTE,$cf_attribute)
338 cf_directive="__attribute__(($cf_attribute))"
339 echo "checking for $CC $cf_directive" 1>&AC_FD_CC
341 case $cf_attribute in #(vi
343 cf_printf_attribute=yes
344 cat >conftest.h <<EOF
345 #define GCC_$cf_ATTRIBUTE 1
349 cf_scanf_attribute=yes
350 cat >conftest.h <<EOF
351 #define GCC_$cf_ATTRIBUTE 1
355 cat >conftest.h <<EOF
356 #define GCC_$cf_ATTRIBUTE $cf_directive
361 if AC_TRY_EVAL(ac_compile); then
362 test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
363 cat conftest.h >>confdefs.h
364 case $cf_attribute in #(vi
366 if test "$cf_printf_attribute" = no ; then
367 cat >>confdefs.h <<EOF
368 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
371 cat >>confdefs.h <<EOF
372 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
377 if test "$cf_scanf_attribute" = no ; then
378 cat >>confdefs.h <<EOF
379 #define GCC_SCANFLIKE(fmt,var) /* nothing */
382 cat >>confdefs.h <<EOF
383 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
391 fgrep define conftest.i >>confdefs.h
396 dnl ---------------------------------------------------------------------------
397 dnl CF_GCC_VERSION version: 4 updated: 2005/08/27 09:53:42
399 dnl Find version of gcc
400 AC_DEFUN([CF_GCC_VERSION],[
401 AC_REQUIRE([AC_PROG_CC])
403 if test "$GCC" = yes ; then
404 AC_MSG_CHECKING(version of $CC)
405 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
406 test -z "$GCC_VERSION" && GCC_VERSION=unknown
407 AC_MSG_RESULT($GCC_VERSION)
410 dnl ---------------------------------------------------------------------------
411 dnl CF_GCC_WARNINGS version: 24 updated: 2009/02/01 15:21:00
413 dnl Check if the compiler supports useful warning options. There's a few that
414 dnl we don't use, simply because they're too noisy:
416 dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x)
417 dnl -Wredundant-decls (system headers make this too noisy)
418 dnl -Wtraditional (combines too many unrelated messages, only a few useful)
419 dnl -Wwrite-strings (too noisy, but should review occasionally). This
420 dnl is enabled for ncurses using "--enable-const".
424 dnl $1 is an optional list of gcc warning flags that a particular
425 dnl application might want to use, e.g., "no-unused" for
428 dnl If $with_ext_const is "yes", add a check for -Wwrite-strings
430 AC_DEFUN([CF_GCC_WARNINGS],
432 AC_REQUIRE([CF_GCC_VERSION])
433 CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
435 cat > conftest.$ac_ext <<EOF
436 #line __oline__ "${as_me-configure}"
437 int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
440 if test "$INTEL_COMPILER" = yes
442 # The "-wdXXX" options suppress warnings:
443 # remark #1419: external declaration in primary source file
444 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
445 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
446 # remark #193: zero used for undefined preprocessing identifier
447 # remark #593: variable "curs_sb_left_arrow" was set but never used
448 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
449 # remark #869: parameter "tw" was never referenced
450 # remark #981: operands are evaluated in unspecified order
451 # warning #279: controlling expression is constant
453 AC_CHECKING([for $CC warning options])
454 cf_save_CFLAGS="$CFLAGS"
467 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
468 if AC_TRY_EVAL(ac_compile); then
469 test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
470 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
473 CFLAGS="$cf_save_CFLAGS"
475 elif test "$GCC" = yes
477 AC_CHECKING([for $CC warning options])
478 cf_save_CFLAGS="$CFLAGS"
479 EXTRA_CFLAGS="-W -Wall"
481 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
487 Wmissing-declarations \
488 Wmissing-prototypes \
493 Wundef $cf_warn_CONST $1
495 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
496 if AC_TRY_EVAL(ac_compile); then
497 test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
500 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
505 CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
510 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
513 CFLAGS="$cf_save_CFLAGS"
517 AC_SUBST(EXTRA_CFLAGS)
519 dnl ---------------------------------------------------------------------------
520 dnl CF_INTEL_COMPILER version: 3 updated: 2005/08/06 18:37:29
521 dnl -----------------
522 dnl Check if the given compiler is really the Intel compiler for Linux. It
523 dnl tries to imitate gcc, but does not return an error when it finds a mismatch
524 dnl between prototypes, e.g., as exercised by CF_MISSING_CHECK.
526 dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to
527 dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from
528 dnl the wrappers for gcc and g++ warnings.
530 dnl $1 = GCC (default) or GXX
531 dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
532 dnl $3 = CFLAGS (default) or CXXFLAGS
533 AC_DEFUN([CF_INTEL_COMPILER],[
534 ifelse($2,,INTEL_COMPILER,[$2])=no
536 if test "$ifelse($1,,[$1],GCC)" = yes ; then
539 AC_MSG_CHECKING(if this is really Intel ifelse($1,GXX,C++,C) compiler)
540 cf_save_CFLAGS="$ifelse($3,,CFLAGS,[$3])"
541 ifelse($3,,CFLAGS,[$3])="$ifelse($3,,CFLAGS,[$3]) -no-gcc"
543 #ifdef __INTEL_COMPILER
547 ],[ifelse($2,,INTEL_COMPILER,[$2])=yes
548 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
550 ifelse($3,,CFLAGS,[$3])="$cf_save_CFLAGS"
551 AC_MSG_RESULT($ifelse($2,,INTEL_COMPILER,[$2]))
556 dnl ---------------------------------------------------------------------------
557 dnl CF_MSG_LOG version: 4 updated: 2007/07/29 09:55:12
559 dnl Write a debug message to config.log, along with the line number in the
560 dnl configure script.
561 AC_DEFUN([CF_MSG_LOG],[
562 echo "${as_me-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
564 dnl ---------------------------------------------------------------------------
565 dnl CF_NO_LEAKS_OPTION version: 4 updated: 2006/12/16 14:24:05
566 dnl ------------------
567 dnl see CF_WITH_NO_LEAKS
568 AC_DEFUN([CF_NO_LEAKS_OPTION],[
569 AC_MSG_CHECKING(if you want to use $1 for testing)
572 [AC_DEFINE($3)ifelse([$4],,[
576 : ${with_no_leaks:=yes}
579 AC_MSG_RESULT(${with_$1:-no})
581 case .$with_cflags in #(vi
583 case .$CFLAGS in #(vi
593 dnl ---------------------------------------------------------------------------
594 dnl CF_PROG_EXT version: 10 updated: 2004/01/03 19:28:18
596 dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
597 AC_DEFUN([CF_PROG_EXT],
599 AC_REQUIRE([CF_CHECK_CACHE])
600 case $cf_cv_system_name in
602 CFLAGS="$CFLAGS -Zmt"
603 CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
604 CXXFLAGS="$CXXFLAGS -Zmt"
605 # autoconf's macro sets -Zexe and suffix both, which conflict:w
606 LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
616 test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
618 dnl ---------------------------------------------------------------------------
619 dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50
621 dnl Remove all -U and -D options that refer to the given symbol from a list
622 dnl of C compiler options. This works around the problem that not all
623 dnl compilers process -U and -D options from left-to-right, so a -U option
624 dnl cannot be used to cancel the effect of a preceding -D option.
626 dnl $1 = target (which could be the same as the source variable)
627 dnl $2 = source (including '$')
628 dnl $3 = symbol to remove
629 define([CF_REMOVE_DEFINE],
632 sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \
633 -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
635 dnl ---------------------------------------------------------------------------
636 dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59
638 dnl Make an uppercase version of a variable
642 $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
644 dnl ---------------------------------------------------------------------------
645 dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12
647 dnl Use AC_VERBOSE w/o the warnings
648 AC_DEFUN([CF_VERBOSE],
649 [test -n "$verbose" && echo " $1" 1>&AC_FD_MSG
652 dnl ---------------------------------------------------------------------------
653 dnl CF_WITH_DBMALLOC version: 6 updated: 2006/12/16 14:24:05
655 dnl Configure-option for dbmalloc. The optional parameter is used to override
656 dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
657 AC_DEFUN([CF_WITH_DBMALLOC],[
658 CF_NO_LEAKS_OPTION(dbmalloc,
659 [ --with-dbmalloc test: use Conor Cahill's dbmalloc library],
662 if test "$with_dbmalloc" = yes ; then
663 AC_CHECK_HEADER(dbmalloc.h,
664 [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse($1,,[],[,$1]))])
667 dnl ---------------------------------------------------------------------------
668 dnl CF_WITH_DMALLOC version: 6 updated: 2006/12/16 14:24:05
670 dnl Configure-option for dmalloc. The optional parameter is used to override
671 dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
672 AC_DEFUN([CF_WITH_DMALLOC],[
673 CF_NO_LEAKS_OPTION(dmalloc,
674 [ --with-dmalloc test: use Gray Watson's dmalloc library],
677 if test "$with_dmalloc" = yes ; then
678 AC_CHECK_HEADER(dmalloc.h,
679 [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse($1,,[],[,$1]))])
682 dnl ---------------------------------------------------------------------------
683 dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21
685 AC_DEFUN([CF_WITH_VALGRIND],[
686 CF_NO_LEAKS_OPTION(valgrind,
687 [ --with-valgrind test: use valgrind],
690 dnl ---------------------------------------------------------------------------
691 dnl CF_WITH_WARNINGS version: 5 updated: 2004/07/23 14:40:34
693 dnl Combine the checks for gcc features into a configure-script option
696 dnl $1 - see CF_GCC_WARNINGS
697 AC_DEFUN([CF_WITH_WARNINGS],
699 if ( test "$GCC" = yes || test "$GXX" = yes )
701 AC_MSG_CHECKING(if you want to check for gcc warnings)
702 AC_ARG_WITH(warnings,
703 [ --with-warnings test: turn on gcc warnings],
704 [cf_opt_with_warnings=$withval],
705 [cf_opt_with_warnings=no])
706 AC_MSG_RESULT($cf_opt_with_warnings)
707 if test "$cf_opt_with_warnings" != no ; then
709 CF_GCC_WARNINGS([$1])