1 dnl -*-fundamental-*- *@--GLOB-HEADER--@*
3 dnl $Id: aclocal.glob,v 1.3 1999/07/17 10:27:44 mdw Exp $
5 dnl Common library of autoconf macros
7 dnl (c) 1997 Mark Wooding, except for macros and documentation where noted.
10 dnl----- Licensing notice ---------------------------------------------------
12 dnl This file is part of the Common Files Distribution (`common')
14 dnl `Common' is free software; you can redistribute it and/or modify
15 dnl it under the terms of the GNU General Public License as published by
16 dnl the Free Software Foundation; either version 2 of the License, or
17 dnl (at your option) any later version.
19 dnl `Common' is distributed in the hope that it will be useful,
20 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
21 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 dnl GNU General Public License for more details.
24 dnl You should have received a copy of the GNU General Public License
25 dnl along with `common'; if not, write to the Free Software Foundation,
26 dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 dnl----- Revision history ---------------------------------------------------
30 dnl $Log: aclocal.glob,v $
31 dnl Revision 1.3 1999/07/17 10:27:44 mdw
32 dnl More useful macros added.
34 dnl Revision 1.2 1999/05/13 22:57:23 mdw
35 dnl Change `-ise' to `-ize' throughout.
37 dnl Revision 1.1.1.1 1999/05/05 19:23:47 mdw
38 dnl New import. The old CVS repository was lost in a disk disaster.
41 dnl----- Common files distribution --------------------------- *@--NOTICE--@*
43 dnl $Id: aclocal.glob,v 1.3 1999/07/17 10:27:44 mdw Exp $
45 dnl --- *@-AC_PROG_CC_STDC-@* ---
47 dnl Author: Franc,ois Pinard
49 dnl Synopsis: AC_PROG_CC_STDC
53 dnl Use: If the C compiler in not in ANSI C mode by default, try to
54 dnl add an option to output variable `CC' to make it so. This
55 dnl macro tries various options that select ANSI C on some system
56 dnl or another. It considers the compiler to be in ANSI C mode
57 dnl if it defines `__STDC__' to 1 and handles function prototypes
60 dnl If you use this macro, you should check after calling it
61 dnl whether the C compiler has been set to accept ANSI C; if not,
62 dnl the shell variable `ac_cv_prog_cc_stdc' is set to `no'. If
63 dnl you wrote your source code in ANSI C, you can make an
64 dnl un-ANSIfied copy of it by using the program `ansi2knr', which
65 dnl comes with Ghostscript.
67 dnl (documentation by Franc,ois Pinard)
69 AC_DEFUN(AM_PROG_CC_STDC,
70 [AC_REQUIRE([AC_PROG_CC])
71 AC_BEFORE([$0], [AC_C_INLINE])
72 AC_BEFORE([$0], [AC_C_CONST])
73 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
74 AC_CACHE_VAL(am_cv_prog_cc_stdc,
75 [am_cv_prog_cc_stdc=no
77 # Don't try gcc -ansi; that turns off useful extensions and
78 # breaks some systems' header files.
80 # Ultrix and OSF/1 -std1
81 # HP-UX -Aa -D_HPUX_SOURCE
82 # SVR4 -Xc -D__EXTENSIONS__
83 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
85 CC="$ac_save_CC $ac_arg"
87 [#if !defined(__STDC__) || __STDC__ != 1
90 /* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
92 # include <sys/types.h>
93 # include <sys/stat.h>
96 int test (int i, double x);
97 struct s1 {int (*f) (int a);};
98 struct s2 {int (*f) (double a);};],
99 [am_cv_prog_cc_stdc="$ac_arg"; break])
103 if test -z "$am_cv_prog_cc_stdc"; then
104 AC_MSG_RESULT([none needed])
106 AC_MSG_RESULT($am_cv_prog_cc_stdc)
108 case "x$am_cv_prog_cc_stdc" in
110 *) CC="$CC $am_cv_prog_cc_stdc" ;;
114 dnl----- AutoMake macros ------------------------------------- *@--IGNORE--@*
116 dnl --- *@-AM_CONDITIONAL-@* ---
120 dnl Synopsis: AM_CONDITIONAL(NAME, TEST)
122 dnl Arguments: NAME = name of the conditional
123 dnl TEST = a shell list to execute
125 dnl Use: Allows conditional sections in Makefiles.
127 AC_DEFUN(AM_CONDITIONAL,
138 dnl --- *@-AM_CYGWIN32-@* ---
140 dnl Author: Cygnus (I guess)
142 dnl Synopsis: AM_CYGWIN32
146 dnl Use: Check to see if we're running under Cygwin32, without using
147 dnl AC_CANONICAL_*. If so, set output variable EXEEXT to
148 dnl ".exe". Otherwise set it to "".
151 dnl You might think we can do this by checking for a cygwin32-specific
152 dnl cpp define. We can't, because cross-compilers that target
153 dnl cygwin32 don't use the .exe suffix. I don't know why.
154 AC_DEFUN(AM_CYGWIN32,
155 [AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
156 [cat > conftest.$ac_ext << 'EOF'
161 if AC_TRY_EVAL(ac_link) && test -s conftest.exe; then
168 test "$am_cv_cygwin32" = yes && EXEEXT=.exe
171 dnl --- *@-AM_WITH_DMALLOC-@* ---
173 dnl Author: Franc,ois Pinard
175 dnl Synopsis: AM_WITH_DMALLOC
179 dnl Use: Links with `-dmalloc' if told to by the user.
181 ## ----------------------------------- ##
182 ## Check if --with-dmalloc was given. ##
183 ## From Franc,ois Pinard ##
184 ## ----------------------------------- ##
188 AC_DEFUN(AM_WITH_DMALLOC,
189 [AC_MSG_CHECKING(if malloc debugging is wanted)
191 [ --with-dmalloc use dmalloc, as in
192 ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz],
193 [if test "$withval" = yes; then
195 AC_DEFINE(WITH_DMALLOC)
196 LIBS="$LIBS -ldmalloc"
197 LDFLAGS="$LDFLAGS -g"
200 fi], [AC_MSG_RESULT(no)])
203 dnl --- *@-AM_FUNC_ERROR_AT_LINE-@* ---
205 dnl Author: Jim Meyering
207 dnl Synopsis: AM_FUNC_ERROR_AT_LINE
211 dnl Use: Use this if you use the GNU error.[ch].
213 dnl FIXME: Migrate into libit
215 AC_DEFUN(AM_FUNC_ERROR_AT_LINE,
216 [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
217 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
218 am_cv_lib_error_at_line=yes,
219 am_cv_lib_error_at_line=no)])
220 if test $am_cv_lib_error_at_line = no; then
221 LIBOBJS="$LIBOBJS error.o"
226 dnl --- *@-AM_INIT_GUILE_MODULE-@* ---
230 dnl Synopsis: AM_INIT_GUILE_MODULE(MODNAME)
232 dnl Arguments: MODNAME = value to initialize `module' variable with
234 dnl Use: This macro will automatically get the guile version from the
235 dnl top-level srcdir, and will initialize automake. It also
236 dnl defines the `module' variable.
238 AC_DEFUN([AM_INIT_GUILE_MODULE],[
239 . $srcdir/../GUILE-VERSION
240 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
241 AC_CONFIG_AUX_DIR(..)
245 dnl --- *@-AM_CONFIG_HEADER-@* ---
249 dnl Synopsis: AM_CONFIG_HEADER(HEADER ...)
251 dnl Arguments: HEADER = a header spec, as for AC_CONFIG_HEADER
253 dnl Use: Like AC_CONFIG_HEADER, but automatically create stamp file.
255 AC_DEFUN(AM_CONFIG_HEADER,
257 AC_CONFIG_HEADER([$1])
258 dnl When config.status generates a header, we must update the stamp-h file.
259 dnl This file resides in the same directory as the config header
260 dnl that is generated. We must strip everything past the first ":",
261 dnl and everything past the last "/".
262 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
263 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
264 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/
265 \)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
267 for am_file in <<$1>>; do
268 case " <<$>>CONFIG_HEADERS " in
269 *" <<$>>am_file "*<<)>>
270 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
273 am_indx=`expr "<<$>>am_indx" + 1`
277 dnl --- *@-AM_INIT_AUTOMAKE-@*
281 dnl Synopsis: AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
283 dnl Arguments: PACKAGE = package name
284 dnl VERSION = version number
285 dnl NO-DEFINE = if set, don't define package and version number
287 dnl Use: Do all the work for Automake. This macro actually does too
288 dnl much -- some checks are only needed if your package does
289 dnl certain things. But this isn't really a big deal.
293 AC_DEFUN(AM_INIT_AUTOMAKE,
294 [AC_REQUIRE([AM_PROG_INSTALL])
299 dnl test to see if srcdir already configured
300 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
301 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
304 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
305 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
308 dnl FIXME This is truly gross.
309 missing_dir=`cd $ac_aux_dir && pwd`
310 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
311 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
312 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
313 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
314 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
317 dnl --- *@-AM_PROG_INSTALL-@* ---
319 dnl Author: Franc,ois Pinard
321 dnl Synopsis: AM_PROG_INSTALL
325 dnl Use: Calls `AC_PROG_INSTALL' to find an installer. Then it sets
326 dnl `INSTALL_SCRIPT' to a suitable value if necessary.
330 AC_DEFUN(AM_PROG_INSTALL,
332 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL} -m 755'
333 AC_SUBST(INSTALL_SCRIPT)dnl
336 dnl --- *@-AM_PROG_LEX-@* ---
338 dnl Author: Alexandre Oliva
340 dnl Synopsis: AM_PROG_LEX
344 dnl Use: Replacement for AC_PROG_LEX and AC_DECL_YYTEXT
347 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
348 AC_DEFUN(AM_PROG_LEX,
349 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
350 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
354 dnl --- *@-AM_PROG_LIBTOOL-@* ---
358 dnl Synopsis: AM_PROG_LIBTOOL
362 dnl Use: Configures `libtool' for the target architecture.
365 ## Configure libtool for the target system.
367 # serial 1 AM_PROG_LIBTOOL
368 AC_DEFUN(AM_PROG_LIBTOOL,
369 [AC_REQUIRE([AC_CANONICAL_HOST])
370 AC_REQUIRE([AC_PROG_CC])
371 AC_REQUIRE([AC_PROG_RANLIB])
373 # Always use our own libtool.
374 LIBTOOL='$(top_builddir)/libtool'
377 dnl Allow the --disable-shared flag to stop us from building shared libs.
378 AC_ARG_ENABLE(shared,
379 [ --enable-shared build shared libraries [default=yes]],
380 test "$enableval" = no && libtool_shared=" --disable-shared",
383 libtool_flags="$libtool_shared"
384 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
385 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
387 # Actually configure libtool. ac_aux_dir is where install-sh is found.
388 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LD="$LD" RANLIB="$RANLIB" \
389 $ac_aux_dir/ltconfig $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
390 || AC_MSG_ERROR([libtool configure failed])
393 dnl --- *@-AM_PATH_LISPDIR-@* ---
395 dnl Author: Ulrich Drepper
397 dnl Synopsis: AM_PATH_LISPDIR
401 dnl Use: Sets the variable `lispdir' to point to a place to install
402 dnl Emacs lisp files.
404 ## ------------------------
405 ## Emacs LISP file handling
406 ## From Ulrich Drepper
407 ## ------------------------
411 AC_DEFUN(AM_PATH_LISPDIR,
412 [# If set to t, that means we are running in a shell under Emacs.
413 # If you have an Emacs named "t", then use the full path.
414 test "$EMACS" = t && EMACS=
415 AC_PATH_PROG(EMACS, emacs xemacs, no)
416 if test $EMACS != "no"; then
417 AC_MSG_CHECKING([where .elc files should go])
418 dnl Set default value
419 lispdir="\$(datadir)/emacs/site-lisp"
420 if test "x$prefix" = "xNONE"; then
421 if test -d $ac_default_prefix/share/emacs/site-lisp; then
422 lispdir="\$(prefix)/share/emacs/site-lisp"
424 if test -d $ac_default_prefix/lib/emacs/site-lisp; then
425 lispdir="\$(prefix)/lib/emacs/site-lisp"
429 if test -d $prefix/share/emacs/site-lisp; then
430 lispdir="\$(prefix)/share/emacs/site-lisp"
432 if test -d $prefix/lib/emacs/site-lisp; then
433 lispdir="\$(prefix)/lib/emacs/site-lisp"
437 AC_MSG_RESULT($lispdir)
441 dnl --- *@-AM_MAINTAINTER_MODE-@* ---
443 dnl Author: Jim Meyering
445 dnl Synopsis: jm_MAINTAINER_MODE
449 dnl Use: Provides an option `--enable-maintainer-mode' which turns
450 dnl on rules which might normally be commented out. The
451 dnl substitution variable `MAINT' is set to be a comment when
452 dnl this option is disabled, which it is by default.
456 AC_DEFUN(AM_MAINTAINER_MODE,
457 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
458 dnl maintainer-mode is disabled by default
459 AC_ARG_ENABLE(maintainer-mode,
460 [ --enable-maintainer-mode enable make rules and dependencies not useful
461 (and sometimes confusing) to the casual installer],
462 USE_MAINTAINER_MODE=$enableval,
463 USE_MAINTAINER_MODE=no)
464 AC_MSG_RESULT($USE_MAINTAINER_MODE)
465 if test $USE_MAINTAINER_MODE = yes; then
474 dnl --- *@-AM_MISSING_PROG-@* ---
478 dnl Synopsis: AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
480 dnl Arguments: NAME = variable to set to the file's location
481 dnl PROGRAM = name of program to find
482 dnl DIRECTORY = directory to look in
484 dnl Use: Fakes existence of a useful GNU maintainer tool.
486 AC_DEFUN(AM_MISSING_PROG,
487 [AC_MSG_CHECKING(for working $2)
488 # Run test in a subshell; some versions of sh will print an error if
489 # an executable is not found, even if stderr is redirected.
490 # Redirect stdin to placate older versions of autoconf. Sigh.
491 if ($2 --version) < /dev/null > /dev/null 2>&1; then
496 AC_MSG_RESULT(missing)
500 dnl --- *@-AM_FUNC_MKTIME-@* ---
502 dnl Author: Jim Meyering
504 dnl Synopsis: AM_FUNC_MKTIME
508 dnl Use: Checks for a working mktime function.
510 AC_DEFUN(AM_FUNC_MKTIME,
511 [AC_REQUIRE([AC_HEADER_TIME])dnl
512 AC_CHECK_HEADERS(sys/time.h)
513 AC_CACHE_CHECK([for working mktime], am_cv_func_working_mktime,
515 changequote(<<, >>)dnl
516 <</* Test program from Paul Eggert (eggert@twinsun.com)
517 and Tony Leneis (tony@plaza.ds.adp.com). */
518 #if TIME_WITH_SYS_TIME
519 # include <sys/time.h>
523 # include <sys/time.h>
529 static time_t time_t_max;
531 /* Values we'll use to set the TZ environment variable. */
532 static const char *const tz_strings[] = {
533 NULL, "GMT0", "JST-9", "EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
535 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
541 if (mktime (localtime (&now)) != now)
543 now = time_t_max - now;
544 if (mktime (localtime (&now)) != now)
554 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
557 delta = time_t_max / 997; /* a suitable prime number */
558 for (i = 0; i < N_STRINGS; i++)
561 putenv (tz_strings[i]);
563 for (t = 0; t <= time_t_max - delta; t += delta)
565 mktime_test ((time_t) 60 * 60);
566 mktime_test ((time_t) 60 * 60 * 24);
572 am_cv_func_working_mktime=yes, am_cv_func_working_mktime=no,
573 dnl When crosscompiling, assume mktime is missing or broken.
574 am_cv_func_working_mktime=no)
576 if test $am_cv_func_working_mktime = no; then
577 LIBOBJS="$LIBOBJS mktime.o"
581 dnl --- *@-AM_FUNC_OBSTACK-@* ---
583 dnl Author: Jim Meyering
585 dnl Synopsis: AM_FUNC_OBSTACK
589 dnl Use: Checks for GNU obstacks.
591 AC_DEFUN(AM_FUNC_OBSTACK,
592 [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
593 [AC_TRY_LINK([#include "obstack.h"],
594 [struct obstack *mem;obstack_free(mem,(char *) 0)],
595 am_cv_func_obstack=yes,
596 am_cv_func_obstack=no)])
597 if test $am_cv_func_obstack = yes; then
598 AC_DEFINE(HAVE_OBSTACK)
600 LIBOBJS="$LIBOBJS obstack.o"
604 dnl --- *@-AC_C_PROTOTYPES-@* ---
606 dnl Author: Franc,ois Pinard
608 dnl Synopsis: AC_C_PROTOTYPES
612 dnl Use: If the C compiler understands ANSI C, define `PROTOTYPES',
613 dnl and clear the `U' and `ANSI2KNR' variables. Otherwise,
614 dnl set `U' to be `_' and `ANSI2KNR' to be `./ansi2knr'.
618 AC_DEFUN(fp_C_PROTOTYPES,
619 [AC_REQUIRE([fp_PROG_CC_STDC])
620 AC_MSG_CHECKING([for function prototypes])
621 if test "$ac_cv_prog_cc_stdc" != no; then
623 AC_DEFINE(PROTOTYPES)
627 U=_ ANSI2KNR=./ansi2knr
630 AC_SUBST(ANSI2KNR)dnl
633 dnl --- *@-AM_PATH_GTK-@* ---
635 dnl Author: Owen Taylor
637 dnl Synopsis: AM_PATH_GTK(MIN-VERSION, [ACTION-IF-FOUND], [ACTION-IF-NOT])
639 dnl Arguments: MIN-VERSION = minimum version of GTK required
640 dnl ACTION-IF-FOUND = executed if GTK found OK
641 dnl ACTION-IF-NOT-FOUND = what to do if GTK not available
643 dnl Use: Sets up compilation environment suitably for GTK programming.
645 # Configure paths for GTK+
646 # Owen Taylor 97-11-3
648 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
649 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
651 AC_DEFUN(AM_PATH_GTK,
653 dnl Get the cflags and libraries from the gtk-config script
655 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
656 gtk_config_prefix="$withval", gtk_config_prefix="")
657 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
658 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
659 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
660 , enable_gtktest=yes)
662 if test x$gtk_config_exec_prefix != x ; then
663 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
664 if test x${GTK_CONFIG+set} != xset ; then
665 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
668 if test x$gtk_config_prefix != x ; then
669 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
670 if test x${GTK_CONFIG+set} != xset ; then
671 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
675 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
676 min_gtk_version=ifelse([$1], ,0.99.7,$1)
677 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
679 if test "$GTK_CONFIG" = "no" ; then
682 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
683 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
684 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
685 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
686 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
687 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
688 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
689 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
690 if test "x$enable_gtktest" = "xyes" ; then
691 ac_save_CFLAGS="$CFLAGS"
693 CFLAGS="$CFLAGS $GTK_CFLAGS"
694 LIBS="$LIBS $GTK_LIBS"
696 dnl Now check if the installed GTK is sufficiently new. (Also sanity
697 dnl checks the results of gtk-config to some extent
707 int major, minor, micro;
710 system ("touch conf.gtktest");
712 /* HP/UX 9 (%@#!) writes to sscanf strings */
713 tmp_version = g_strdup("$min_gtk_version");
714 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
715 printf("%s, bad version string\n", "$min_gtk_version");
719 if ((gtk_major_version != $gtk_config_major_version) ||
720 (gtk_minor_version != $gtk_config_minor_version) ||
721 (gtk_micro_version != $gtk_config_micro_version))
723 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
724 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
725 gtk_major_version, gtk_minor_version, gtk_micro_version);
726 printf ("*** was found! If gtk-config was correct, then it is best\n");
727 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
728 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
729 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
730 printf("*** required on your system.\n");
731 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
732 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
733 printf("*** before re-running configure\n");
737 if ((gtk_major_version > major) ||
738 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
739 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
745 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
746 gtk_major_version, gtk_minor_version, gtk_micro_version);
747 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
748 major, minor, micro);
749 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
751 printf("*** If you have already installed a sufficiently new version, this error\n");
752 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
753 printf("*** being found. The easiest way to fix this is to remove the old version\n");
754 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
755 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
756 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
757 printf("*** so that the correct libraries are found at run-time))\n");
762 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
763 CFLAGS="$ac_save_CFLAGS"
767 if test "x$no_gtk" = x ; then
769 ifelse([$2], , :, [$2])
772 if test "$GTK_CONFIG" = "no" ; then
773 echo "*** The gtk-config script installed by GTK could not be found"
774 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
775 echo "*** your path, or set the GTK_CONFIG environment variable to the"
776 echo "*** full path to gtk-config."
778 if test -f conf.gtktest ; then
781 echo "*** Could not run GTK test program, checking why..."
782 CFLAGS="$CFLAGS $GTK_CFLAGS"
783 LIBS="$LIBS $GTK_LIBS"
787 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
788 [ echo "*** The test program compiled, but did not run. This usually means"
789 echo "*** that the run-time linker is not finding GTK or finding the wrong"
790 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
791 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
792 echo "*** to the installed location Also, make sure you have run ldconfig if that"
793 echo "*** is required on your system"
795 echo "*** If you have an old version installed, it is best to remove it, although"
796 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
798 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
799 echo "*** came with the system with the command"
801 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
802 [ echo "*** The test program failed to compile or link. See the file config.log for the"
803 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
804 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
805 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
806 CFLAGS="$ac_save_CFLAGS"
812 ifelse([$3], , :, [$3])
819 dnl --- *@-AC_TYPE_PTRDIFF_T-@* ---
821 dnl Author: Ulrich Drepper
823 dnl Synopsis: AC_TYPE_PTRDIFF_T
827 dnl Use: Sets HAVE_PTRDIFF_T if the type exists.
829 AC_DEFUN(AM_TYPE_PTRDIFF_T,
830 [AC_CACHE_CHECK([for ptrdiff_t], am_cv_type_ptrdiff_t,
831 [AC_TRY_COMPILE([#include <stddef.h>], [ptrdiff_t p],
832 am_cv_type_ptrdiff_t=yes, am_cv_type_ptrdiff_t=no)])
833 if test $am_cv_type_ptrdiff_t = yes; then
834 AC_DEFINE(HAVE_PTRDIFF_T)
838 dnl --- *@-AM_WITH_REGEX-@* ---
840 dnl Author: Unknown (possibly Franc,ois Pinard)
842 dnl Synopsis: AM_WITH_REGEX
847 dnl The idea is to distribute rx.[hc] and regex.[hc] together,
848 dnl for a while. The WITH_REGEX symbol (which should also be
849 dnl documented in acconfig.h) is used to decide which of regex.h
850 dnl or rx.h should be included in the application. If
851 dnl `./configure --with-regex' is given (the default), the
852 dnl package will use gawk's regex. If `./configure
853 dnl --without-regex', a check is made to see if rx is already
854 dnl installed, as with newer Linux'es. If not found, the package
855 dnl will use the rx from the distribution. If found, the package
856 dnl will use the system's rx which, on Linux at least, will
857 dnl result in a smaller executable file.
859 AC_DEFUN(AM_WITH_REGEX,
860 [AC_MSG_CHECKING(which of GNU rx or gawk's regex is wanted)
862 [ --without-regex use GNU rx in lieu of gawk's regex for matching],
863 [test "$withval" = yes && am_with_regex=1],
865 if test -n "$am_with_regex"; then
867 AC_DEFINE(WITH_REGEX)
868 AC_CACHE_CHECK([for GNU regex in libc], am_cv_gnu_regex,
869 AC_TRY_LINK([], [extern int re_max_failures; re_max_failures = 1],
870 am_cv_gnu_regex=yes, am_cv_gnu_regex=no))
871 if test $am_cv_gnu_regex = no; then
872 LIBOBJS="$LIBOBJS regex.o"
876 AC_CHECK_FUNC(re_rx_search, , [LIBOBJS="$LIBOBJS rx.o"])
881 dnl --- *@-AM_SANITY_CHECK-@*
885 dnl Synopsis: AM_SANITY_CHECK
889 dnl Use: Check for build environment sanity.
891 AC_DEFUN(AM_SANITY_CHECK,
892 [AC_MSG_CHECKING([whether build environment is sane])
895 echo timestamp > conftestfile
896 # Do `set' in a subshell so we don't clobber the current shell's
897 # arguments. Must try -L first in case configure is actually a
898 # symlink; some systems play weird games with the mod time of symlinks
899 # (eg FreeBSD returns the mod time of the symlink's containing
902 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
903 if test "$@" = "X"; then
905 set X `ls -t $srcdir/configure conftestfile`
907 test "[$]2" = conftestfile
913 AC_MSG_ERROR([newly created file is older than distributed files!
914 Check your system clock])
919 dnl --- *@-AM_FUNC_STRDOD-@* ---
921 dnl Author: Jim Meyering
923 dnl Synopsis: AM_FUNC_STRTOD
927 dnl Use: Checks for a working strtod function.
929 ## Copyright (C) 1996 Free Software Foundation, Inc.
931 ## This program is free software; you can redistribute it and/or modify
932 ## it under the terms of the GNU General Public License as published by
933 ## the Free Software Foundation; either version 2, or (at your option)
934 ## any later version.
936 ## This program is distributed in the hope that it will be useful,
937 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
938 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
939 ## GNU General Public License for more details.
941 ## You should have received a copy of the GNU General Public License
942 ## along with this program; if not, write to the Free Software
943 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
946 ## From Jim Meyering.
950 ## @defmac AC_FUNC_STRTOD
951 ## @maindex FUNC_STRTOD
953 ## If the @code{strtod} function is not available, or does not work
954 ## correctly (like the one on SunOS 5.4), add @samp{strtod.o} to output
955 ## variable @code{LIBOBJS}.
958 AC_DEFUN(AM_FUNC_STRTOD,
959 [AC_CACHE_CHECK(for working strtod, am_cv_func_strtod,
966 /* Some versions of Linux strtod mis-parse strings with leading '+'. */
967 char *string = " +69";
970 value = strtod (string, &term);
971 if (value != 69 || term != (string + 4))
976 /* Under Solaris 2.4, strtod returns the wrong value for the
977 terminating character under some conditions. */
979 ## @defmac AC_FUNC_STRTOD
980 ## @maindex FUNC_STRTOD
982 ## If the @code{strtod} function is not available, or does not work
983 ## correctly (like the one on SunOS 5.4), add @samp{strtod.o} to output
984 ## variable @code{LIBOBJS}.
987 AC_DEFUN(AM_FUNC_STRTOD,
988 [AC_CACHE_CHECK(for working strtod, am_cv_func_strtod,
995 /* Some versions of Linux strtod mis-parse strings with leading '+'. */
996 char *string = " +69";
999 value = strtod (string, &term);
1000 if (value != 69 || term != (string + 4))
1005 /* Under Solaris 2.4, strtod returns the wrong value for the
1006 terminating character under some conditions. */
1007 char *string = "NaN";
1009 strtod (string, &term);
1010 if (term != string && *(term - 1) == 0)
1015 ], am_cv_func_strtod=yes, am_cv_func_strtod=no, am_cv_func_strtod=no)])
1016 test $am_cv_func_strtod = no && LIBOBJS="$LIBOBJS strtod.o"
1017 AC_SUBST(LIBOBJS)dnl
1018 am_cv_func_strtod_needs_libm=no
1019 if test $am_cv_func_strtod = no; then
1021 if test $ac_cv_func_pow = no; then
1022 AC_CHECK_LIB(m, pow, [am_cv_func_strtod_needs_libm=yes],
1023 [AC_MSG_WARN(can't find library containing definition of pow)])
1028 dnl --- *@-AM_SYS_POSIX_TERMIOS-@* ---
1030 dnl Author: Jim Meyering
1032 dnl Synopsis: AM_SYS_POSIX_TERMIOS
1036 dnl Use: Checks for a POSIX termios.h.
1038 AC_DEFUN(AM_SYS_POSIX_TERMIOS,
1039 [AC_CACHE_CHECK([POSIX termios], am_cv_sys_posix_termios,
1040 [AC_TRY_LINK([#include <sys/types.h>
1042 #include <termios.h>],
1043 [/* SunOS 4.0.3 has termios.h but not the library calls. */
1045 am_cv_sys_posix_termios=yes,
1046 am_cv_sys_posix_termios=no)])
1049 dnl----- Macros by Mark Wooding ------------------------------ *@--IGNORE--@*
1051 dnl --- *@-mdw_DECL_ENVIRON-@* ---
1053 dnl Author: Mark Wooding
1055 dnl Synopsis: mdw_DECL_ENVIRON
1059 dnl Use: If the global variable `environ' is declared anywhere
1060 dnl `obvious', then define the preprocessor symbol DECL_ENVIRON.
1062 AC_DEFUN(mdw_DECL_ENVIRON,
1063 [AC_CHECK_HEADERS([unistd.h])
1064 AC_CACHE_CHECK([for declaration of \`environ'], sw_cv_environ,
1065 [AC_EGREP_CPP(environ,
1066 [#include <sys/types.h>
1073 #endif], [sw_cv_environ=yes], [sw_cv_environ=no])])
1074 if test $sw_cv_environ = yes; then
1075 AC_DEFINE(DECL_ENVIRON)
1078 dnl --- *@-mdw_CURSES-@* ---
1080 dnl Author: Mark Wooding
1082 dnl Synopsis: mdw_CURSES
1086 dnl Use: Attempts to find an implementation of `curses'. A `curses'
1087 dnl library (`ncurses' by preference) will be added to `LIBS'.
1088 dnl If a library could be found, the preprocessor symbol
1089 dnl HAVE_CURSES is defined, along with one of HAVE_NCURSES_H,
1090 dnl HAVE_NCURSES_NCURSES_H or HAVE_CURSES_H, suggesting which
1091 dnl header to include (in the obvious way).
1093 AC_DEFUN(mdw_CURSES,
1094 [mdw_CHECK_MANYLIBS(newwin, ncurses curses, AC_DEFINE(HAVE_CURSES))
1095 if test $mdw_cv_lib_newwin != no; then
1096 AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h curses.h], [break])
1097 if test "$ac_cv_header_ncurses_h" = "no" &&
1098 test "$ac_cv_header_ncurses_ncurses_h" = "no" &&
1099 test "$ac_cv_header_curses_h" = "no"; then
1100 AC_MSG_WARN([couldn't find a \`curses' header. Assuming \`curses.h'.])
1101 AC_DEFINE(HAVE_CURSES_H)
1103 AC_CHECK_FUNCS(wresize)
1106 dnl --- *@-mdw_TYPE_SSIZE_T-@* ---
1108 dnl Author: Mark Wooding
1110 dnl Synopsis: mdw_TYPE_SSIZE_T
1114 dnl Use: Finds an appropriate type for `ssize_t' if there isn't a
1115 dnl sensible one to use already.
1117 AC_DEFUN(mdw_TYPE_SSIZE_T,
1118 [AC_CACHE_CHECK(for ssize_t, sw_cv_ssize_t,
1119 [AC_EGREP_CPP(ssize_t,
1120 [#include <sys/types.h>
1128 [sw_cv_ssize_t=yes], [sw_cv_ssize_t=no])])
1129 if test $sw_cv_ssize_t = no; then
1130 AC_DEFINE(ssize_t, int)
1133 dnl --- *@-mdw_REQUIRE-@* ---
1135 dnl Author: Mark Wooding
1137 dnl Synopsis: mdw_REQUIRE(MACRO, ARGS...)
1139 dnl Arguments: MACRO = name of a macro which should have been called
1140 dnl ARGS = arguments to pass
1142 dnl Use: Like `AC_REQUIRE', only it handles arguments.
1144 AC_DEFUN(mdw_REQUIRE,
1145 [ifdef([AC_PROVIDED_$1], ,
1146 [AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl
1151 dnl --- *@-mdw_CHECK_MANYLIBS-@* ---
1153 dnl Author: Mark Wooding
1155 dnl Synopsis: mdw_CHECK_MANYLIBS(FUNC, LIBS, [IF-FOUND], [IF-NOT-FOUND])
1157 dnl Arguments: FUNC = a function to try to find
1158 dnl LIBS = a whitespace-separated list of libraries to search
1159 dnl IF-FOUND = what to do when the function is found
1160 dnl IF-NOT-FOUND = what to do when the function isn't found
1162 dnl Use: Searches for a library which defines FUNC. It first tries
1163 dnl without any libraries; then it tries each library specified
1164 dnl in LIBS in turn. If it finds a match, it adds the
1165 dnl appropriate library to `LIBS'.
1167 dnl This is particularly handy under DIREIX: if you link with
1168 dnl `-lnsl' then you get non-NIS-aware versions of getpwnam and
1169 dnl so on, which is clearly a Bad Thing.
1171 AC_DEFUN(mdw_CHECK_MANYLIBS,
1172 [AC_CACHE_CHECK([for library containing $1], [mdw_cv_lib_$1],
1173 [mdw_save_LIBS="$LIBS"
1175 AC_TRY_LINK(,[$1()], [mdw_cv_lib_$1="none required"])
1176 test "$mdw_cv_lib_$1" = "no" && for i in $2; do
1177 LIBS="-l$i $mdw_save_LIBS"
1178 AC_TRY_LINK(,[$1()],
1179 [mdw_cv_lib_$1="-l$i"
1182 LIBS="$mdw_save_LIBS"])
1183 if test "$mdw_cv_lib_$1" != "no"; then
1184 test "$mdw_cv_lib_$1" = "none required" || LIBS="$mdw_cv_lib_$1 $LIBS"
1190 dnl --- *@-mdw__PERL_VERSION-@* ---
1192 dnl AC_DEFUN relies on `[', `]' being quotes, so I have to drop down a level.
1195 define(mdw__PERL_VERSION, <<$1 -e 'exit ($] < $2);' >&5 2>&5>>)
1198 dnl --- *@-mdw_PROG_PERL-@* ---
1200 dnl Author: Mark Wooding
1202 dnl Synopsis: mdw_PROG_PERL(VERSION, [IF-FOUND], [IF-NOT-FOUND])
1204 dnl Arguments: VERSION = version number of Perl required
1205 dnl IF-FOUND = what to do if it's found
1206 dnl IF-NOT-FOUND = what to do if it isn't
1208 dnl Use: Attempts to find a working version of Perl with a late
1209 dnl enough version number. It supplies an option `--with-perl'
1210 dnl to allow the user to provide a Perl interpreter. If one
1211 dnl isn't provided explicitly, it searches for `perl' and `perl5'
1212 dnl in the current PATH, asking them whether they have a late
1213 dnl enough version number. The path of the working Perl is
1214 dnl put into the `PERL' environment variable; `AC_SUBST' is used
1215 dnl to substitute its value into Perl scripts. If there is no
1216 dnl Perl to be found, the value of `PERL' is set to be `none'.
1218 AC_DEFUN(mdw_PROG_PERL,
1219 [AC_ARG_WITH([perl],
1220 [ --with-perl=PERL specify path to Perl version $1 or newer],
1222 if test -z "$PERL"; then
1223 [AC_CACHE_CHECK([for Perl version $1 or later], mdw_cv_prog_perl,
1224 [mdw_cv_prog_perl="none"
1225 for p in `echo "$PATH:/usr/local/bin" | tr ":" " "`; do
1226 case $p in /*) ;; *) p=`pwd`/$p ;; esac
1227 if mdw__PERL_VERSION(["$p/perl"], $1); then
1228 mdw_cv_prog_perl="$p/perl"
1231 if mdw__PERL_VERSION(["$p/perl5"], $1); then
1232 mdw_cv_prog_perl="$p/perl5"
1236 PERL="$mdw_cv_prog_perl"])
1240 if test "$PERL" = "none"; then :
1246 dnl --- *@-mdw_CHECK_PERL-@* ---
1248 dnl Author: Mark Wooding
1250 dnl Synopsis: mdw_CHECK_PERL(VERSION)
1252 dnl Arguments: VERSION = version number of Perl required
1254 dnl Use: Verifies that the Perl interpreter in the `PERL' shell
1255 dnl variable actually works and is of the right version. If it's
1256 dnl not, an error is raised and configuration is aborted.
1258 AC_DEFUN(mdw_CHECK_PERL,
1259 [mdw_REQUIRE([mdw_PROG_PERL], [$1])
1260 AC_MSG_CHECKING([whether Perl ($PERL) works])
1261 if test "$PERL" != "none" && mdw__PERL_VERSION("$PERL", $1); then
1262 AC_MSG_RESULT([yes])
1265 AC_MSG_ERROR([Perl version $1 or newer not found.
1266 If you have a recent enough Perl, and I just failed to find it, try using
1267 the --with-perl=PERL option to give me an explicit pathname.])
1270 dnl --- *@-mdw_PERLLIB_CHECK-@* ---
1272 dnl Author: Mark Wooding
1274 dnl Synopsis: mdw_PERLLIB_CHECK(LIBRARY)
1276 dnl Arguments: LIBRARY = name of a Perl library to check for
1278 dnl Use: Ensures that a Perl script can `use LIBRARY;'. If it can,
1279 dnl all's well and good; if it can't, `LIBRARY.pm' is added to
1280 dnl the variable `NEEDED_PERLLIBS' and a line which adds
1281 dnl `pkgdatadir' to Perl's `@INC' array is placed in the
1282 dnl variable `INC_PERLLIBS'; `AC_SUBST' is called for both of
1283 dnl these variables. It's expected that `NEEDED_PERLLIBS' will
1284 dnl be used in the `Makefile.in' to decide which versions from
1285 dnl the distribution need installing.
1287 dnl This macro isn't terribly useful in the general case. It
1288 dnl Also implicitly assumes that `$PERL' is Perl 5 or later.
1290 AC_DEFUN(mdw__PERLLIB_INIT,
1291 [AC_SUBST(INC_PERLLIBS)dnl
1292 AC_SUBST(NEEDED_PERLLIBS)dnl
1295 AC_DEFUN(mdw_PERLLIB_CHECK,
1296 [AC_REQUIRE([mdw__PERLLIB_INIT])
1297 mdw_REQUIRE([mdw_CHECK_PERL], 5)
1298 AC_CACHE_CHECK([for Perl library $1], mdw_cv_perllib_$1,
1299 [if $PERL -e 'use $1;' >&5 2>&5; then
1300 mdw_cv_perllib_$1="yes"
1302 mdw_cv_perllib_$1="no"
1305 if test "$mdw_cv_perllib_$1" = "no"; then
1306 NEEDED_PERLLIBS="$NEEDED_PERLLIBS $1.pm"
1308 # --- Deal with autoconf lossage ---
1310 # It doesn't want to define `prefix' until rather later on, so I have
1313 if test -z "$INC_PERLLIBS"; then
1314 mdw_old_prefix="$prefix"
1315 test "$prefix" = "NONE" && prefix="$ac_default_prefix";
1316 INC_PERLLIBS="BEGIN { push @INC, \"`eval echo $datadir/$PACKAGE`\"; }"
1317 prefix="$mdw_old_prefix";
1321 dnl --- *@-mdw_GCC_FLAGS-@* ---
1323 dnl Author: Mark Wooding
1325 dnl Synopsis: mdw_GCC_FLAGS([FLAGS], [CFLAGS], [C++FLAGS])
1327 dnl Arguments: FLAGS = GCC compiler flags to add (default is
1328 dnl `-pedantic -Wall')
1329 dnl CFLAGS = GCC C compiler flags to add (default is empty)
1330 dnl C++FLAGS = GCC C++ compiler flags to add (default is
1331 dnl `-fhandle-exceptions').
1333 dnl Use: If the C compiler is GCC, add the compiler flags.
1335 AC_DEFUN(mdw_GCC_FLAGS,
1336 [if test "$GCC" = "yes"; then
1337 CFLAGS="$CFLAGS ifelse([$1], [], [-pedantic -Wall], [$1])"
1338 CFLAGS="$CFLAGS ifelse([$2], [], [], [$2])"
1340 if test "$GXX" = "yes"; then
1341 CXXFLAGS="$CXXFLAGS ifelse([$1], [], [-pedantic -Wall], [$1])"
1342 CXXFLAGS="$CXXFLAGS ifelse([$3], [], [-fhandle-exceptions], [$3])"
1345 dnl --- *@-mdw_OPT_NDEBUG-@* ---
1347 dnl Author: Mark Wooding
1349 dnl Synopsis: mdw_OPT_NDEBUG
1353 dnl Use: Turns off the `NDEBUG' flag if the user wants to do
1356 AC_DEFUN(mdw_OPT_NDEBUG,
1357 [AC_ARG_ENABLE(debugging,
1358 [ --enable-debugging spews vast swathes of useless information],
1359 [if test "$enableval" = "no"; then
1360 AC_DEFINE(NDEBUG, 1)
1362 [AC_DEFINE(NDEBUG, 1)])])
1364 dnl --- *@-mdw_OPT_EFENCE-@* ---
1366 dnl Author: Mark Wooding
1368 dnl Synopsis: mdw_OPT_EFENCE
1372 dnl Use: Links with the Electric Fence library.
1374 AC_DEFUN(mdw_OPT_EFENCE,
1375 [AC_ARG_WITH(electric-fence,
1376 [ --with-electric-fence link programs with Electric Fence],
1377 [if test "$withval" = "yes"; then
1378 AC_CHECK_LIB(efence, malloc)
1381 dnl --- *@-mdw_OPT_mLib_DEBUG-@* ---
1383 dnl Author: Mark Wooding
1385 dnl Synopsis: mdw_OPT_mLib_DEBUG(PROGRAM)
1389 dnl Use: Provides options for mLib debugging. In particular, the
1390 dnl following are defined:
1392 dnl --enable-tracing turns off the NTRACE variable
1393 dnl --enable-track turns on malloc tracking
1394 dnl --enable-blame-PROGRAM tracks malloc contexts in PROGRAM
1396 dnl There must be a separate `blame' option, so that the various
1397 dnl blame options work properly.
1399 AC_DEFUN(mdw_OPT_mLib_DEBUG,
1403 AC_ARG_ENABLE(tracing,
1404 [ --enable-tracing enable output of tracing information],
1405 [if test "$enableval" = "no"; then
1406 AC_DEFINE(NTRACE, 1)
1408 [AC_DEFINE(NTRACE, 1)])
1410 AC_ARG_ENABLE(track,
1411 [ --enable-track enable tracking of malloc and free],
1412 [AC_DEFINE(TRACK_ENABLE, 1)])
1414 AC_ARG_ENABLE(blame-$1,
1416 track malloc contexts while in $1],
1417 [AC_DEFINE(TRACK_BLAME, 1)])])
1419 dnl----- That's all, folks --------------------------------- *@--GLOB-END--@*