1 dnl aclocal.m4 generated automatically by aclocal 1.3
3 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4 dnl This Makefile.in is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 dnl Macros that test for specific features.
14 dnl This file is part of Autoconf.
15 dnl Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
17 dnl This program is free software; you can redistribute it and/or modify
18 dnl it under the terms of the GNU General Public License as published by
19 dnl the Free Software Foundation; either version 2, or (at your option)
20 dnl any later version.
22 dnl This program is distributed in the hope that it will be useful,
23 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
24 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 dnl GNU General Public License for more details.
27 dnl You should have received a copy of the GNU General Public License
28 dnl along with this program; if not, write to the Free Software
29 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
32 dnl As a special exception, the Free Software Foundation gives unlimited
33 dnl permission to copy, distribute and modify the configure scripts that
34 dnl are the output of Autoconf. You need not follow the terms of the GNU
35 dnl General Public License when using or distributing such scripts, even
36 dnl though portions of the text of Autoconf appear in them. The GNU
37 dnl General Public License (GPL) does govern all other use of the material
38 dnl that constitutes the Autoconf program.
40 dnl Certain portions of the Autoconf source text are designed to be copied
41 dnl (in certain cases, depending on the input) into the output of
42 dnl Autoconf. We call these the "data" portions. The rest of the Autoconf
43 dnl source text consists of comments plus executable code that decides which
44 dnl of the data portions to output in any given case. We call these
45 dnl comments and executable code the "non-data" portions. Autoconf never
46 dnl copies any of the non-data portions into its output.
48 dnl This special exception to the GPL applies to versions of Autoconf
49 dnl released by the Free Software Foundation. When you make and
50 dnl distribute a modified version of Autoconf, you may extend this special
51 dnl exception to the GPL to apply to your modified version as well, *unless*
52 dnl your modified version has the potential to copy into its output some
53 dnl of the text that was the non-data portion of the version that you started
54 dnl with. (In other words, unless your change moves or copies text from
55 dnl the non-data portions to the data portions.) If your modification has
56 dnl such potential, you must delete any notice of this special exception
57 dnl to the GPL from your modified version.
59 dnl Written by David MacKenzie, with help from
60 dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
61 dnl Roland McGrath, Noah Friedman, david d zuhn, and many others.
63 dnl AC_STRUCT_ST_BLKSIZE extracted from the file in qustion,
64 dnl "acspecific.m4" in GNU Autoconf 2.12, and turned into
65 dnl AC_ETHEREAL_STRUCT_SA_LEN, which checks if "struct sockaddr"
66 dnl has the 4.4BSD "sa_len" member, and defines HAVE_SA_LEN; that's
67 dnl what's in this file.
68 dnl Done by Guy Harris <guy@netapp.com> on 1998-11-14.
70 dnl ### Checks for structure members
73 AC_DEFUN(AC_ETHEREAL_STRUCT_SA_LEN,
74 [AC_CACHE_CHECK([for sa_len in struct sockaddr], ac_cv_ethereal_struct_sa_len,
75 [AC_TRY_COMPILE([#include <sys/types.h>
76 #include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
77 ac_cv_ethereal_struct_sa_len=yes, ac_cv_ethereal_struct_sa_len=no)])
78 if test $ac_cv_ethereal_struct_sa_len = yes; then
79 AC_DEFINE(HAVE_SA_LEN)
83 # Do all the work for Automake. This macro actually does too much --
84 # some checks are only needed if your package does certain things.
85 # But this isn't really a big deal.
90 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
92 AC_DEFUN(AM_INIT_AUTOMAKE,
93 [AC_REQUIRE([AM_PROG_INSTALL])
98 dnl test to see if srcdir already configured
99 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
100 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
103 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
104 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
105 AC_REQUIRE([AM_SANITY_CHECK])
106 AC_REQUIRE([AC_ARG_PROGRAM])
107 dnl FIXME This is truly gross.
108 missing_dir=`cd $ac_aux_dir && pwd`
109 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
110 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
111 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
112 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
113 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
114 AC_REQUIRE([AC_PROG_MAKE_SET])])
119 AC_DEFUN(AM_PROG_INSTALL,
120 [AC_REQUIRE([AC_PROG_INSTALL])
121 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
122 AC_SUBST(INSTALL_SCRIPT)dnl
126 # Check to make sure that the build environment is sane.
129 AC_DEFUN(AM_SANITY_CHECK,
130 [AC_MSG_CHECKING([whether build environment is sane])
133 echo timestamp > conftestfile
134 # Do `set' in a subshell so we don't clobber the current shell's
135 # arguments. Must try -L first in case configure is actually a
136 # symlink; some systems play weird games with the mod time of symlinks
137 # (eg FreeBSD returns the mod time of the symlink's containing
140 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
141 if test "[$]*" = "X"; then
143 set X `ls -t $srcdir/configure conftestfile`
145 if test "[$]*" != "X $srcdir/configure conftestfile" \
146 && test "[$]*" != "X conftestfile $srcdir/configure"; then
148 # If neither matched, then we have a broken ls. This can happen
149 # if, for instance, CONFIG_SHELL is bash and it inherits a
150 # broken ls alias from the environment. This has actually
151 # happened. Such a system could not be considered "sane".
152 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
153 alias in your environment])
156 test "[$]2" = conftestfile
162 AC_MSG_ERROR([newly created file is older than distributed files!
163 Check your system clock])
168 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
169 dnl The program must properly implement --version.
170 AC_DEFUN(AM_MISSING_PROG,
171 [AC_MSG_CHECKING(for working $2)
172 # Run test in a subshell; some versions of sh will print an error if
173 # an executable is not found, even if stderr is redirected.
174 # Redirect stdin to placate older versions of autoconf. Sigh.
175 if ($2 --version) < /dev/null > /dev/null 2>&1; then
180 AC_MSG_RESULT(missing)
184 # Configure paths for GTK+
185 # Owen Taylor 97-11-3
187 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
188 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
190 AC_DEFUN(AM_PATH_GTK,
192 dnl Get the cflags and libraries from the gtk-config script
194 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
195 gtk_config_prefix="$withval", gtk_config_prefix="")
196 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
197 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
198 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
199 , enable_gtktest=yes)
201 if test x$gtk_config_exec_prefix != x ; then
202 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
203 if test x${GTK_CONFIG+set} != xset ; then
204 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
207 if test x$gtk_config_prefix != x ; then
208 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
209 if test x${GTK_CONFIG+set} != xset ; then
210 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
214 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
215 min_gtk_version=ifelse([$1], ,0.99.7,$1)
216 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
218 if test "$GTK_CONFIG" = "no" ; then
221 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
222 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
223 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
224 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
225 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
226 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
227 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
228 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
229 if test "x$enable_gtktest" = "xyes" ; then
230 ac_save_CFLAGS="$CFLAGS"
232 CFLAGS="$CFLAGS $GTK_CFLAGS"
233 LIBS="$LIBS $GTK_LIBS"
235 dnl Now check if the installed GTK is sufficiently new. (Also sanity
236 dnl checks the results of gtk-config to some extent
246 int major, minor, micro;
248 system ("touch conf.gtktest");
250 if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
251 printf("%s, bad version string\n", "$min_gtk_version");
255 if ((gtk_major_version != $gtk_config_major_version) ||
256 (gtk_minor_version != $gtk_config_minor_version) ||
257 (gtk_micro_version != $gtk_config_micro_version))
259 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
260 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
261 gtk_major_version, gtk_minor_version, gtk_micro_version);
262 printf ("*** was found! If gtk-config was correct, then it is best\n");
263 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
264 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
265 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
266 printf("*** required on your system.\n");
267 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
268 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
269 printf("*** before re-running configure\n");
273 if ((gtk_major_version > major) ||
274 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
275 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
281 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
282 gtk_major_version, gtk_minor_version, gtk_micro_version);
283 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
284 major, minor, micro);
285 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
287 printf("*** If you have already installed a sufficiently new version, this error\n");
288 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
289 printf("*** being found. The easiest way to fix this is to remove the old version\n");
290 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
291 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
292 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
293 printf("*** so that the correct libraries are found at run-time))\n");
298 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
299 CFLAGS="$ac_save_CFLAGS"
303 if test "x$no_gtk" = x ; then
305 ifelse([$2], , :, [$2])
308 if test "$GTK_CONFIG" = "no" ; then
309 echo "*** The gtk-config script installed by GTK could not be found"
310 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
311 echo "*** your path, or set the GTK_CONFIG environment variable to the"
312 echo "*** full path to gtk-config."
314 if test -f conf.gtktest ; then
317 echo "*** Could not run GTK test program, checking why..."
318 CFLAGS="$CFLAGS $GTK_CFLAGS"
319 LIBS="$LIBS $GTK_LIBS"
323 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
324 [ echo "*** The test program compiled, but did not run. This usually means"
325 echo "*** that the run-time linker is not finding GTK or finding the wrong"
326 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
327 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
328 echo "*** to the installed location Also, make sure you have run ldconfig if that"
329 echo "*** is required on your system"
331 echo "*** If you have an old version installed, it is best to remove it, although"
332 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
334 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
335 echo "*** came with the system with the command"
337 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
338 [ echo "*** The test program failed to compile or link. See the file config.log for the"
339 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
340 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
341 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
342 CFLAGS="$ac_save_CFLAGS"
348 ifelse([$3], , :, [$3])
355 # Like AC_CONFIG_HEADER, but automatically create stamp file.
357 AC_DEFUN(AM_CONFIG_HEADER,
359 AC_CONFIG_HEADER([$1])
360 dnl When config.status generates a header, we must update the stamp-h file.
361 dnl This file resides in the same directory as the config header
362 dnl that is generated. We must strip everything past the first ":",
363 dnl and everything past the last "/".
364 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
365 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
366 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
368 for am_file in <<$1>>; do
369 case " <<$>>CONFIG_HEADERS " in
370 *" <<$>>am_file "*<<)>>
371 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
374 am_indx=`expr "<<$>>am_indx" + 1`