Imported Upstream version 2.6.0
[debian/amanda] / aclocal.m4
1 # generated automatically by aclocal 1.10 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006  Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_if(m4_PACKAGE_VERSION, [2.61],,
15 [m4_fatal([this file was generated for autoconf 2.61.
16 You have another version of autoconf.  If you want to use that,
17 you should regenerate the build system entirely.], [63])])
18
19 # Configure paths for GLIB
20 # Owen Taylor     1997-2001
21
22 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
23 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or 
24 dnl gthread is specified in MODULES, pass to pkg-config
25 dnl
26 AC_DEFUN([AM_PATH_GLIB_2_0],
27 [dnl 
28 dnl Get the cflags and libraries from pkg-config
29 dnl
30 AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
31                     , enable_glibtest=yes)
32
33   pkg_config_args=glib-2.0
34   for module in . $4
35   do
36       case "$module" in
37          gmodule) 
38              pkg_config_args="$pkg_config_args gmodule-2.0"
39          ;;
40          gmodule-no-export) 
41              pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
42          ;;
43          gobject) 
44              pkg_config_args="$pkg_config_args gobject-2.0"
45          ;;
46          gthread) 
47              pkg_config_args="$pkg_config_args gthread-2.0"
48          ;;
49       esac
50   done
51
52   PKG_PROG_PKG_CONFIG([0.16])
53
54   no_glib=""
55
56   if test "x$PKG_CONFIG" = x ; then
57     no_glib=yes
58     PKG_CONFIG=no
59   fi
60
61   min_glib_version=ifelse([$1], ,2.0.0,$1)
62   AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
63
64   if test x$PKG_CONFIG != xno ; then
65     ## don't try to run the test against uninstalled libtool libs
66     if $PKG_CONFIG --uninstalled $pkg_config_args; then
67           echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
68           enable_glibtest=no
69     fi
70
71     if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
72           :
73     else
74           no_glib=yes
75     fi
76   fi
77
78   if test x"$no_glib" = x ; then
79     GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
80     GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
81     GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
82
83     GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
84     GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
85     glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
86            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
87     glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
88            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
89     glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
90            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
91     if test "x$enable_glibtest" = "xyes" ; then
92       ac_save_CFLAGS="$CFLAGS"
93       ac_save_LIBS="$LIBS"
94       CFLAGS="$CFLAGS $GLIB_CFLAGS"
95       LIBS="$GLIB_LIBS $LIBS"
96 dnl
97 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
98 dnl checks the results of pkg-config to some extent)
99 dnl
100       rm -f conf.glibtest
101       AC_TRY_RUN([
102 #include <glib.h>
103 #include <stdio.h>
104 #include <stdlib.h>
105
106 int 
107 main ()
108 {
109   int major, minor, micro;
110   char *tmp_version;
111
112   system ("touch conf.glibtest");
113
114   /* HP/UX 9 (%@#!) writes to sscanf strings */
115   tmp_version = g_strdup("$min_glib_version");
116   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
117      printf("%s, bad version string\n", "$min_glib_version");
118      exit(1);
119    }
120
121   if ((glib_major_version != $glib_config_major_version) ||
122       (glib_minor_version != $glib_config_minor_version) ||
123       (glib_micro_version != $glib_config_micro_version))
124     {
125       printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
126              $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
127              glib_major_version, glib_minor_version, glib_micro_version);
128       printf ("*** was found! If pkg-config was correct, then it is best\n");
129       printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
130       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
131       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
132       printf("*** required on your system.\n");
133       printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
134       printf("*** to point to the correct configuration files\n");
135     } 
136   else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
137            (glib_minor_version != GLIB_MINOR_VERSION) ||
138            (glib_micro_version != GLIB_MICRO_VERSION))
139     {
140       printf("*** GLIB header files (version %d.%d.%d) do not match\n",
141              GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
142       printf("*** library (version %d.%d.%d)\n",
143              glib_major_version, glib_minor_version, glib_micro_version);
144     }
145   else
146     {
147       if ((glib_major_version > major) ||
148         ((glib_major_version == major) && (glib_minor_version > minor)) ||
149         ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
150       {
151         return 0;
152        }
153      else
154       {
155         printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
156                glib_major_version, glib_minor_version, glib_micro_version);
157         printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
158                major, minor, micro);
159         printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
160         printf("***\n");
161         printf("*** If you have already installed a sufficiently new version, this error\n");
162         printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
163         printf("*** being found. The easiest way to fix this is to remove the old version\n");
164         printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
165         printf("*** correct copy of pkg-config. (In this case, you will have to\n");
166         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
167         printf("*** so that the correct libraries are found at run-time))\n");
168       }
169     }
170   return 1;
171 }
172 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
173        CFLAGS="$ac_save_CFLAGS"
174        LIBS="$ac_save_LIBS"
175      fi
176   fi
177   if test "x$no_glib" = x ; then
178      AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
179      ifelse([$2], , :, [$2])     
180   else
181      AC_MSG_RESULT(no)
182      if test "$PKG_CONFIG" = "no" ; then
183        echo "*** A new enough version of pkg-config was not found."
184        echo "*** See http://www.freedesktop.org/software/pkgconfig/"
185      else
186        if test -f conf.glibtest ; then
187         :
188        else
189           echo "*** Could not run GLIB test program, checking why..."
190           ac_save_CFLAGS="$CFLAGS"
191           ac_save_LIBS="$LIBS"
192           CFLAGS="$CFLAGS $GLIB_CFLAGS"
193           LIBS="$LIBS $GLIB_LIBS"
194           AC_TRY_LINK([
195 #include <glib.h>
196 #include <stdio.h>
197 ],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
198         [ echo "*** The test program compiled, but did not run. This usually means"
199           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
200           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
201           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
202           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
203           echo "*** is required on your system"
204           echo "***"
205           echo "*** If you have an old version installed, it is best to remove it, although"
206           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
207         [ echo "*** The test program failed to compile or link. See the file config.log for the"
208           echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
209           CFLAGS="$ac_save_CFLAGS"
210           LIBS="$ac_save_LIBS"
211        fi
212      fi
213      GLIB_CFLAGS=""
214      GLIB_LIBS=""
215      GLIB_GENMARSHAL=""
216      GOBJECT_QUERY=""
217      GLIB_MKENUMS=""
218      ifelse([$3], , :, [$3])
219   fi
220   AC_SUBST(GLIB_CFLAGS)
221   AC_SUBST(GLIB_LIBS)
222   AC_SUBST(GLIB_GENMARSHAL)
223   AC_SUBST(GOBJECT_QUERY)
224   AC_SUBST(GLIB_MKENUMS)
225   rm -f conf.glibtest
226 ])
227
228 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
229
230 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
231 #
232 # This program is free software; you can redistribute it and/or modify
233 # it under the terms of the GNU General Public License as published by
234 # the Free Software Foundation; either version 2 of the License, or
235 # (at your option) any later version.
236 #
237 # This program is distributed in the hope that it will be useful, but
238 # WITHOUT ANY WARRANTY; without even the implied warranty of
239 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
240 # General Public License for more details.
241 #
242 # You should have received a copy of the GNU General Public License
243 # along with this program; if not, write to the Free Software
244 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
245 #
246 # As a special exception to the GNU General Public License, if you
247 # distribute this file as part of a program that contains a
248 # configuration script generated by Autoconf, you may include it under
249 # the same distribution terms that you use for the rest of that program.
250
251 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
252 # ----------------------------------
253 AC_DEFUN([PKG_PROG_PKG_CONFIG],
254 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
255 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
256 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
257 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
258         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
259 fi
260 if test -n "$PKG_CONFIG"; then
261         _pkg_min_version=m4_default([$1], [0.9.0])
262         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
263         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
264                 AC_MSG_RESULT([yes])
265         else
266                 AC_MSG_RESULT([no])
267                 PKG_CONFIG=""
268         fi
269                 
270 fi[]dnl
271 ])# PKG_PROG_PKG_CONFIG
272
273 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
274 #
275 # Check to see whether a particular set of modules exists.  Similar
276 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
277 #
278 #
279 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
280 # this or PKG_CHECK_MODULES is called, or make sure to call
281 # PKG_CHECK_EXISTS manually
282 # --------------------------------------------------------------
283 AC_DEFUN([PKG_CHECK_EXISTS],
284 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
285 if test -n "$PKG_CONFIG" && \
286     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
287   m4_ifval([$2], [$2], [:])
288 m4_ifvaln([$3], [else
289   $3])dnl
290 fi])
291
292
293 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
294 # ---------------------------------------------
295 m4_define([_PKG_CONFIG],
296 [if test -n "$PKG_CONFIG"; then
297     if test -n "$$1"; then
298         pkg_cv_[]$1="$$1"
299     else
300         PKG_CHECK_EXISTS([$3],
301                          [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
302                          [pkg_failed=yes])
303     fi
304 else
305         pkg_failed=untried
306 fi[]dnl
307 ])# _PKG_CONFIG
308
309 # _PKG_SHORT_ERRORS_SUPPORTED
310 # -----------------------------
311 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
312 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
313 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
314         _pkg_short_errors_supported=yes
315 else
316         _pkg_short_errors_supported=no
317 fi[]dnl
318 ])# _PKG_SHORT_ERRORS_SUPPORTED
319
320
321 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
322 # [ACTION-IF-NOT-FOUND])
323 #
324 #
325 # Note that if there is a possibility the first call to
326 # PKG_CHECK_MODULES might not happen, you should be sure to include an
327 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
328 #
329 #
330 # --------------------------------------------------------------
331 AC_DEFUN([PKG_CHECK_MODULES],
332 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
333 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
334 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
335
336 pkg_failed=no
337 AC_MSG_CHECKING([for $1])
338
339 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
340 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
341
342 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
343 and $1[]_LIBS to avoid the need to call pkg-config.
344 See the pkg-config man page for more details.])
345
346 if test $pkg_failed = yes; then
347         _PKG_SHORT_ERRORS_SUPPORTED
348         if test $_pkg_short_errors_supported = yes; then
349                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
350         else 
351                 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
352         fi
353         # Put the nasty error message in config.log where it belongs
354         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
355
356         ifelse([$4], , [AC_MSG_ERROR(dnl
357 [Package requirements ($2) were not met:
358
359 $$1_PKG_ERRORS
360
361 Consider adjusting the PKG_CONFIG_PATH environment variable if you
362 installed software in a non-standard prefix.
363
364 _PKG_TEXT
365 ])],
366                 [AC_MSG_RESULT([no])
367                 $4])
368 elif test $pkg_failed = untried; then
369         ifelse([$4], , [AC_MSG_FAILURE(dnl
370 [The pkg-config script could not be found or is too old.  Make sure it
371 is in your PATH or set the PKG_CONFIG environment variable to the full
372 path to pkg-config.
373
374 _PKG_TEXT
375
376 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
377                 [$4])
378 else
379         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
380         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
381         AC_MSG_RESULT([yes])
382         ifelse([$3], , :, [$3])
383 fi[]dnl
384 ])# PKG_CHECK_MODULES
385
386 # Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
387 #
388 # This file is free software; the Free Software Foundation
389 # gives unlimited permission to copy and/or distribute it,
390 # with or without modifications, as long as this notice is preserved.
391
392 # AM_AUTOMAKE_VERSION(VERSION)
393 # ----------------------------
394 # Automake X.Y traces this macro to ensure aclocal.m4 has been
395 # generated from the m4 files accompanying Automake X.Y.
396 # (This private macro should not be called outside this file.)
397 AC_DEFUN([AM_AUTOMAKE_VERSION],
398 [am__api_version='1.10'
399 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
400 dnl require some minimum version.  Point them to the right macro.
401 m4_if([$1], [1.10], [],
402       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
403 ])
404
405 # _AM_AUTOCONF_VERSION(VERSION)
406 # -----------------------------
407 # aclocal traces this macro to find the Autoconf version.
408 # This is a private macro too.  Using m4_define simplifies
409 # the logic in aclocal, which can simply ignore this definition.
410 m4_define([_AM_AUTOCONF_VERSION], [])
411
412 # AM_SET_CURRENT_AUTOMAKE_VERSION
413 # -------------------------------
414 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
415 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
416 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
417 [AM_AUTOMAKE_VERSION([1.10])dnl
418 _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
419
420 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
421
422 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
423 #
424 # This file is free software; the Free Software Foundation
425 # gives unlimited permission to copy and/or distribute it,
426 # with or without modifications, as long as this notice is preserved.
427
428 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
429 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
430 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
431 #
432 # Of course, Automake must honor this variable whenever it calls a
433 # tool from the auxiliary directory.  The problem is that $srcdir (and
434 # therefore $ac_aux_dir as well) can be either absolute or relative,
435 # depending on how configure is run.  This is pretty annoying, since
436 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
437 # source directory, any form will work fine, but in subdirectories a
438 # relative path needs to be adjusted first.
439 #
440 # $ac_aux_dir/missing
441 #    fails when called from a subdirectory if $ac_aux_dir is relative
442 # $top_srcdir/$ac_aux_dir/missing
443 #    fails if $ac_aux_dir is absolute,
444 #    fails when called from a subdirectory in a VPATH build with
445 #          a relative $ac_aux_dir
446 #
447 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
448 # are both prefixed by $srcdir.  In an in-source build this is usually
449 # harmless because $srcdir is `.', but things will broke when you
450 # start a VPATH build or use an absolute $srcdir.
451 #
452 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
453 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
454 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
455 # and then we would define $MISSING as
456 #   MISSING="\${SHELL} $am_aux_dir/missing"
457 # This will work as long as MISSING is not called from configure, because
458 # unfortunately $(top_srcdir) has no meaning in configure.
459 # However there are other variables, like CC, which are often used in
460 # configure, and could therefore not use this "fixed" $ac_aux_dir.
461 #
462 # Another solution, used here, is to always expand $ac_aux_dir to an
463 # absolute PATH.  The drawback is that using absolute paths prevent a
464 # configured tree to be moved without reconfiguration.
465
466 AC_DEFUN([AM_AUX_DIR_EXPAND],
467 [dnl Rely on autoconf to set up CDPATH properly.
468 AC_PREREQ([2.50])dnl
469 # expand $ac_aux_dir to an absolute path
470 am_aux_dir=`cd $ac_aux_dir && pwd`
471 ])
472
473 # AM_CONDITIONAL                                            -*- Autoconf -*-
474
475 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
476 # Free Software Foundation, Inc.
477 #
478 # This file is free software; the Free Software Foundation
479 # gives unlimited permission to copy and/or distribute it,
480 # with or without modifications, as long as this notice is preserved.
481
482 # serial 8
483
484 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
485 # -------------------------------------
486 # Define a conditional.
487 AC_DEFUN([AM_CONDITIONAL],
488 [AC_PREREQ(2.52)dnl
489  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
490         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
491 AC_SUBST([$1_TRUE])dnl
492 AC_SUBST([$1_FALSE])dnl
493 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
494 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
495 if $2; then
496   $1_TRUE=
497   $1_FALSE='#'
498 else
499   $1_TRUE='#'
500   $1_FALSE=
501 fi
502 AC_CONFIG_COMMANDS_PRE(
503 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
504   AC_MSG_ERROR([[conditional "$1" was never defined.
505 Usually this means the macro was only invoked conditionally.]])
506 fi])])
507
508 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
509 # Free Software Foundation, Inc.
510 #
511 # This file is free software; the Free Software Foundation
512 # gives unlimited permission to copy and/or distribute it,
513 # with or without modifications, as long as this notice is preserved.
514
515 # serial 9
516
517 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
518 # written in clear, in which case automake, when reading aclocal.m4,
519 # will think it sees a *use*, and therefore will trigger all it's
520 # C support machinery.  Also note that it means that autoscan, seeing
521 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
522
523
524 # _AM_DEPENDENCIES(NAME)
525 # ----------------------
526 # See how the compiler implements dependency checking.
527 # NAME is "CC", "CXX", "GCJ", or "OBJC".
528 # We try a few techniques and use that to set a single cache variable.
529 #
530 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
531 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
532 # dependency, and given that the user is not expected to run this macro,
533 # just rely on AC_PROG_CC.
534 AC_DEFUN([_AM_DEPENDENCIES],
535 [AC_REQUIRE([AM_SET_DEPDIR])dnl
536 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
537 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
538 AC_REQUIRE([AM_DEP_TRACK])dnl
539
540 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
541        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
542        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
543        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
544        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
545                    [depcc="$$1"   am_compiler_list=])
546
547 AC_CACHE_CHECK([dependency style of $depcc],
548                [am_cv_$1_dependencies_compiler_type],
549 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
550   # We make a subdir and do the tests there.  Otherwise we can end up
551   # making bogus files that we don't know about and never remove.  For
552   # instance it was reported that on HP-UX the gcc test will end up
553   # making a dummy file named `D' -- because `-MD' means `put the output
554   # in D'.
555   mkdir conftest.dir
556   # Copy depcomp to subdir because otherwise we won't find it if we're
557   # using a relative directory.
558   cp "$am_depcomp" conftest.dir
559   cd conftest.dir
560   # We will build objects and dependencies in a subdirectory because
561   # it helps to detect inapplicable dependency modes.  For instance
562   # both Tru64's cc and ICC support -MD to output dependencies as a
563   # side effect of compilation, but ICC will put the dependencies in
564   # the current directory while Tru64 will put them in the object
565   # directory.
566   mkdir sub
567
568   am_cv_$1_dependencies_compiler_type=none
569   if test "$am_compiler_list" = ""; then
570      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
571   fi
572   for depmode in $am_compiler_list; do
573     # Setup a source with many dependencies, because some compilers
574     # like to wrap large dependency lists on column 80 (with \), and
575     # we should not choose a depcomp mode which is confused by this.
576     #
577     # We need to recreate these files for each test, as the compiler may
578     # overwrite some of them when testing with obscure command lines.
579     # This happens at least with the AIX C compiler.
580     : > sub/conftest.c
581     for i in 1 2 3 4 5 6; do
582       echo '#include "conftst'$i'.h"' >> sub/conftest.c
583       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
584       # Solaris 8's {/usr,}/bin/sh.
585       touch sub/conftst$i.h
586     done
587     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
588
589     case $depmode in
590     nosideeffect)
591       # after this tag, mechanisms are not by side-effect, so they'll
592       # only be used when explicitly requested
593       if test "x$enable_dependency_tracking" = xyes; then
594         continue
595       else
596         break
597       fi
598       ;;
599     none) break ;;
600     esac
601     # We check with `-c' and `-o' for the sake of the "dashmstdout"
602     # mode.  It turns out that the SunPro C++ compiler does not properly
603     # handle `-M -o', and we need to detect this.
604     if depmode=$depmode \
605        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
606        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
607        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
608          >/dev/null 2>conftest.err &&
609        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
610        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
611        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
612        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
613       # icc doesn't choke on unknown options, it will just issue warnings
614       # or remarks (even with -Werror).  So we grep stderr for any message
615       # that says an option was ignored or not supported.
616       # When given -MP, icc 7.0 and 7.1 complain thusly:
617       #   icc: Command line warning: ignoring option '-M'; no argument required
618       # The diagnosis changed in icc 8.0:
619       #   icc: Command line remark: option '-MP' not supported
620       if (grep 'ignoring option' conftest.err ||
621           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
622         am_cv_$1_dependencies_compiler_type=$depmode
623         break
624       fi
625     fi
626   done
627
628   cd ..
629   rm -rf conftest.dir
630 else
631   am_cv_$1_dependencies_compiler_type=none
632 fi
633 ])
634 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
635 AM_CONDITIONAL([am__fastdep$1], [
636   test "x$enable_dependency_tracking" != xno \
637   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
638 ])
639
640
641 # AM_SET_DEPDIR
642 # -------------
643 # Choose a directory name for dependency files.
644 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
645 AC_DEFUN([AM_SET_DEPDIR],
646 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
647 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
648 ])
649
650
651 # AM_DEP_TRACK
652 # ------------
653 AC_DEFUN([AM_DEP_TRACK],
654 [AC_ARG_ENABLE(dependency-tracking,
655 [  --disable-dependency-tracking  speeds up one-time build
656   --enable-dependency-tracking   do not reject slow dependency extractors])
657 if test "x$enable_dependency_tracking" != xno; then
658   am_depcomp="$ac_aux_dir/depcomp"
659   AMDEPBACKSLASH='\'
660 fi
661 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
662 AC_SUBST([AMDEPBACKSLASH])dnl
663 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
664 ])
665
666 # Generate code to set up dependency tracking.              -*- Autoconf -*-
667
668 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
669 # Free Software Foundation, Inc.
670 #
671 # This file is free software; the Free Software Foundation
672 # gives unlimited permission to copy and/or distribute it,
673 # with or without modifications, as long as this notice is preserved.
674
675 #serial 3
676
677 # _AM_OUTPUT_DEPENDENCY_COMMANDS
678 # ------------------------------
679 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
680 [for mf in $CONFIG_FILES; do
681   # Strip MF so we end up with the name of the file.
682   mf=`echo "$mf" | sed -e 's/:.*$//'`
683   # Check whether this is an Automake generated Makefile or not.
684   # We used to match only the files named `Makefile.in', but
685   # some people rename them; so instead we look at the file content.
686   # Grep'ing the first line is not enough: some people post-process
687   # each Makefile.in and add a new line on top of each file to say so.
688   # Grep'ing the whole file is not good either: AIX grep has a line
689   # limit of 2048, but all sed's we know have understand at least 4000.
690   if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
691     dirpart=`AS_DIRNAME("$mf")`
692   else
693     continue
694   fi
695   # Extract the definition of DEPDIR, am__include, and am__quote
696   # from the Makefile without running `make'.
697   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
698   test -z "$DEPDIR" && continue
699   am__include=`sed -n 's/^am__include = //p' < "$mf"`
700   test -z "am__include" && continue
701   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
702   # When using ansi2knr, U may be empty or an underscore; expand it
703   U=`sed -n 's/^U = //p' < "$mf"`
704   # Find all dependency output files, they are included files with
705   # $(DEPDIR) in their names.  We invoke sed twice because it is the
706   # simplest approach to changing $(DEPDIR) to its actual value in the
707   # expansion.
708   for file in `sed -n "
709     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
710        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
711     # Make sure the directory exists.
712     test -f "$dirpart/$file" && continue
713     fdir=`AS_DIRNAME(["$file"])`
714     AS_MKDIR_P([$dirpart/$fdir])
715     # echo "creating $dirpart/$file"
716     echo '# dummy' > "$dirpart/$file"
717   done
718 done
719 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
720
721
722 # AM_OUTPUT_DEPENDENCY_COMMANDS
723 # -----------------------------
724 # This macro should only be invoked once -- use via AC_REQUIRE.
725 #
726 # This code is only required when automatic dependency tracking
727 # is enabled.  FIXME.  This creates each `.P' file that we will
728 # need in order to bootstrap the dependency handling code.
729 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
730 [AC_CONFIG_COMMANDS([depfiles],
731      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
732      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
733 ])
734
735 # Do all the work for Automake.                             -*- Autoconf -*-
736
737 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
738 # 2005, 2006 Free Software Foundation, Inc.
739 #
740 # This file is free software; the Free Software Foundation
741 # gives unlimited permission to copy and/or distribute it,
742 # with or without modifications, as long as this notice is preserved.
743
744 # serial 12
745
746 # This macro actually does too much.  Some checks are only needed if
747 # your package does certain things.  But this isn't really a big deal.
748
749 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
750 # AM_INIT_AUTOMAKE([OPTIONS])
751 # -----------------------------------------------
752 # The call with PACKAGE and VERSION arguments is the old style
753 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
754 # and VERSION should now be passed to AC_INIT and removed from
755 # the call to AM_INIT_AUTOMAKE.
756 # We support both call styles for the transition.  After
757 # the next Automake release, Autoconf can make the AC_INIT
758 # arguments mandatory, and then we can depend on a new Autoconf
759 # release and drop the old call support.
760 AC_DEFUN([AM_INIT_AUTOMAKE],
761 [AC_PREREQ([2.60])dnl
762 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
763 dnl the ones we care about.
764 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
765 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
766 AC_REQUIRE([AC_PROG_INSTALL])dnl
767 if test "`cd $srcdir && pwd`" != "`pwd`"; then
768   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
769   # is not polluted with repeated "-I."
770   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
771   # test to see if srcdir already configured
772   if test -f $srcdir/config.status; then
773     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
774   fi
775 fi
776
777 # test whether we have cygpath
778 if test -z "$CYGPATH_W"; then
779   if (cygpath --version) >/dev/null 2>/dev/null; then
780     CYGPATH_W='cygpath -w'
781   else
782     CYGPATH_W=echo
783   fi
784 fi
785 AC_SUBST([CYGPATH_W])
786
787 # Define the identity of the package.
788 dnl Distinguish between old-style and new-style calls.
789 m4_ifval([$2],
790 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
791  AC_SUBST([PACKAGE], [$1])dnl
792  AC_SUBST([VERSION], [$2])],
793 [_AM_SET_OPTIONS([$1])dnl
794 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
795 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
796   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
797  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
798  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
799
800 _AM_IF_OPTION([no-define],,
801 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
802  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
803
804 # Some tools Automake needs.
805 AC_REQUIRE([AM_SANITY_CHECK])dnl
806 AC_REQUIRE([AC_ARG_PROGRAM])dnl
807 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
808 AM_MISSING_PROG(AUTOCONF, autoconf)
809 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
810 AM_MISSING_PROG(AUTOHEADER, autoheader)
811 AM_MISSING_PROG(MAKEINFO, makeinfo)
812 AM_PROG_INSTALL_SH
813 AM_PROG_INSTALL_STRIP
814 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
815 # We need awk for the "check" target.  The system "awk" is bad on
816 # some platforms.
817 AC_REQUIRE([AC_PROG_AWK])dnl
818 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
819 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
820 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
821               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
822                              [_AM_PROG_TAR([v7])])])
823 _AM_IF_OPTION([no-dependencies],,
824 [AC_PROVIDE_IFELSE([AC_PROG_CC],
825                   [_AM_DEPENDENCIES(CC)],
826                   [define([AC_PROG_CC],
827                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
828 AC_PROVIDE_IFELSE([AC_PROG_CXX],
829                   [_AM_DEPENDENCIES(CXX)],
830                   [define([AC_PROG_CXX],
831                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
832 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
833                   [_AM_DEPENDENCIES(OBJC)],
834                   [define([AC_PROG_OBJC],
835                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
836 ])
837 ])
838
839
840 # When config.status generates a header, we must update the stamp-h file.
841 # This file resides in the same directory as the config header
842 # that is generated.  The stamp files are numbered to have different names.
843
844 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
845 # loop where config.status creates the headers, so we can generate
846 # our stamp files there.
847 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
848 [# Compute $1's index in $config_headers.
849 _am_stamp_count=1
850 for _am_header in $config_headers :; do
851   case $_am_header in
852     $1 | $1:* )
853       break ;;
854     * )
855       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
856   esac
857 done
858 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
859
860 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
861 #
862 # This file is free software; the Free Software Foundation
863 # gives unlimited permission to copy and/or distribute it,
864 # with or without modifications, as long as this notice is preserved.
865
866 # AM_PROG_INSTALL_SH
867 # ------------------
868 # Define $install_sh.
869 AC_DEFUN([AM_PROG_INSTALL_SH],
870 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
871 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
872 AC_SUBST(install_sh)])
873
874 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
875 #
876 # This file is free software; the Free Software Foundation
877 # gives unlimited permission to copy and/or distribute it,
878 # with or without modifications, as long as this notice is preserved.
879
880 # serial 2
881
882 # Check whether the underlying file-system supports filenames
883 # with a leading dot.  For instance MS-DOS doesn't.
884 AC_DEFUN([AM_SET_LEADING_DOT],
885 [rm -rf .tst 2>/dev/null
886 mkdir .tst 2>/dev/null
887 if test -d .tst; then
888   am__leading_dot=.
889 else
890   am__leading_dot=_
891 fi
892 rmdir .tst 2>/dev/null
893 AC_SUBST([am__leading_dot])])
894
895 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
896 # Free Software Foundation, Inc.
897 #
898 # This file is free software; the Free Software Foundation
899 # gives unlimited permission to copy and/or distribute it,
900 # with or without modifications, as long as this notice is preserved.
901
902 # serial 5
903
904 # AM_PROG_LEX
905 # -----------
906 # Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
907 # "missing" invocation, for better error output.
908 AC_DEFUN([AM_PROG_LEX],
909 [AC_PREREQ(2.50)dnl
910 AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
911 AC_REQUIRE([AC_PROG_LEX])dnl
912 if test "$LEX" = :; then
913   LEX=${am_missing_run}flex
914 fi])
915
916 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
917
918 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
919 #
920 # This file is free software; the Free Software Foundation
921 # gives unlimited permission to copy and/or distribute it,
922 # with or without modifications, as long as this notice is preserved.
923
924 # serial 3
925
926 # AM_MAKE_INCLUDE()
927 # -----------------
928 # Check to see how make treats includes.
929 AC_DEFUN([AM_MAKE_INCLUDE],
930 [am_make=${MAKE-make}
931 cat > confinc << 'END'
932 am__doit:
933         @echo done
934 .PHONY: am__doit
935 END
936 # If we don't find an include directive, just comment out the code.
937 AC_MSG_CHECKING([for style of include used by $am_make])
938 am__include="#"
939 am__quote=
940 _am_result=none
941 # First try GNU make style include.
942 echo "include confinc" > confmf
943 # We grep out `Entering directory' and `Leaving directory'
944 # messages which can occur if `w' ends up in MAKEFLAGS.
945 # In particular we don't look at `^make:' because GNU make might
946 # be invoked under some other name (usually "gmake"), in which
947 # case it prints its new name instead of `make'.
948 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
949    am__include=include
950    am__quote=
951    _am_result=GNU
952 fi
953 # Now try BSD make style include.
954 if test "$am__include" = "#"; then
955    echo '.include "confinc"' > confmf
956    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
957       am__include=.include
958       am__quote="\""
959       _am_result=BSD
960    fi
961 fi
962 AC_SUBST([am__include])
963 AC_SUBST([am__quote])
964 AC_MSG_RESULT([$_am_result])
965 rm -f confinc confmf
966 ])
967
968 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
969
970 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
971 # Free Software Foundation, Inc.
972 #
973 # This file is free software; the Free Software Foundation
974 # gives unlimited permission to copy and/or distribute it,
975 # with or without modifications, as long as this notice is preserved.
976
977 # serial 5
978
979 # AM_MISSING_PROG(NAME, PROGRAM)
980 # ------------------------------
981 AC_DEFUN([AM_MISSING_PROG],
982 [AC_REQUIRE([AM_MISSING_HAS_RUN])
983 $1=${$1-"${am_missing_run}$2"}
984 AC_SUBST($1)])
985
986
987 # AM_MISSING_HAS_RUN
988 # ------------------
989 # Define MISSING if not defined so far and test if it supports --run.
990 # If it does, set am_missing_run to use it, otherwise, to nothing.
991 AC_DEFUN([AM_MISSING_HAS_RUN],
992 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
993 AC_REQUIRE_AUX_FILE([missing])dnl
994 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
995 # Use eval to expand $SHELL
996 if eval "$MISSING --run true"; then
997   am_missing_run="$MISSING --run "
998 else
999   am_missing_run=
1000   AC_MSG_WARN([`missing' script is too old or missing])
1001 fi
1002 ])
1003
1004 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
1005 #
1006 # This file is free software; the Free Software Foundation
1007 # gives unlimited permission to copy and/or distribute it,
1008 # with or without modifications, as long as this notice is preserved.
1009
1010 # AM_PROG_MKDIR_P
1011 # ---------------
1012 # Check for `mkdir -p'.
1013 AC_DEFUN([AM_PROG_MKDIR_P],
1014 [AC_PREREQ([2.60])dnl
1015 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1016 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
1017 dnl while keeping a definition of mkdir_p for backward compatibility.
1018 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1019 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1020 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1021 dnl adjustment using top_builddir (which is defined more often than
1022 dnl MKDIR_P).
1023 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1024 case $mkdir_p in
1025   [[\\/$]]* | ?:[[\\/]]*) ;;
1026   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1027 esac
1028 ])
1029
1030 # Helper functions for option handling.                     -*- Autoconf -*-
1031
1032 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
1033 #
1034 # This file is free software; the Free Software Foundation
1035 # gives unlimited permission to copy and/or distribute it,
1036 # with or without modifications, as long as this notice is preserved.
1037
1038 # serial 3
1039
1040 # _AM_MANGLE_OPTION(NAME)
1041 # -----------------------
1042 AC_DEFUN([_AM_MANGLE_OPTION],
1043 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1044
1045 # _AM_SET_OPTION(NAME)
1046 # ------------------------------
1047 # Set option NAME.  Presently that only means defining a flag for this option.
1048 AC_DEFUN([_AM_SET_OPTION],
1049 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1050
1051 # _AM_SET_OPTIONS(OPTIONS)
1052 # ----------------------------------
1053 # OPTIONS is a space-separated list of Automake options.
1054 AC_DEFUN([_AM_SET_OPTIONS],
1055 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1056
1057 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1058 # -------------------------------------------
1059 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1060 AC_DEFUN([_AM_IF_OPTION],
1061 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1062
1063 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1064
1065 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1066 # Free Software Foundation, Inc.
1067 #
1068 # This file is free software; the Free Software Foundation
1069 # gives unlimited permission to copy and/or distribute it,
1070 # with or without modifications, as long as this notice is preserved.
1071
1072 # serial 4
1073
1074 # AM_SANITY_CHECK
1075 # ---------------
1076 AC_DEFUN([AM_SANITY_CHECK],
1077 [AC_MSG_CHECKING([whether build environment is sane])
1078 # Just in case
1079 sleep 1
1080 echo timestamp > conftest.file
1081 # Do `set' in a subshell so we don't clobber the current shell's
1082 # arguments.  Must try -L first in case configure is actually a
1083 # symlink; some systems play weird games with the mod time of symlinks
1084 # (eg FreeBSD returns the mod time of the symlink's containing
1085 # directory).
1086 if (
1087    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1088    if test "$[*]" = "X"; then
1089       # -L didn't work.
1090       set X `ls -t $srcdir/configure conftest.file`
1091    fi
1092    rm -f conftest.file
1093    if test "$[*]" != "X $srcdir/configure conftest.file" \
1094       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1095
1096       # If neither matched, then we have a broken ls.  This can happen
1097       # if, for instance, CONFIG_SHELL is bash and it inherits a
1098       # broken ls alias from the environment.  This has actually
1099       # happened.  Such a system could not be considered "sane".
1100       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1101 alias in your environment])
1102    fi
1103
1104    test "$[2]" = conftest.file
1105    )
1106 then
1107    # Ok.
1108    :
1109 else
1110    AC_MSG_ERROR([newly created file is older than distributed files!
1111 Check your system clock])
1112 fi
1113 AC_MSG_RESULT(yes)])
1114
1115 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1116 #
1117 # This file is free software; the Free Software Foundation
1118 # gives unlimited permission to copy and/or distribute it,
1119 # with or without modifications, as long as this notice is preserved.
1120
1121 # AM_PROG_INSTALL_STRIP
1122 # ---------------------
1123 # One issue with vendor `install' (even GNU) is that you can't
1124 # specify the program used to strip binaries.  This is especially
1125 # annoying in cross-compiling environments, where the build's strip
1126 # is unlikely to handle the host's binaries.
1127 # Fortunately install-sh will honor a STRIPPROG variable, so we
1128 # always use install-sh in `make install-strip', and initialize
1129 # STRIPPROG with the value of the STRIP variable (set by the user).
1130 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1131 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1132 # Installed binaries are usually stripped using `strip' when the user
1133 # run `make install-strip'.  However `strip' might not be the right
1134 # tool to use in cross-compilation environments, therefore Automake
1135 # will honor the `STRIP' environment variable to overrule this program.
1136 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1137 if test "$cross_compiling" != no; then
1138   AC_CHECK_TOOL([STRIP], [strip], :)
1139 fi
1140 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1141 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1142
1143 # Copyright (C) 2006  Free Software Foundation, Inc.
1144 #
1145 # This file is free software; the Free Software Foundation
1146 # gives unlimited permission to copy and/or distribute it,
1147 # with or without modifications, as long as this notice is preserved.
1148
1149 # _AM_SUBST_NOTMAKE(VARIABLE)
1150 # ---------------------------
1151 # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
1152 # This macro is traced by Automake.
1153 AC_DEFUN([_AM_SUBST_NOTMAKE])
1154
1155 # Check how to create a tarball.                            -*- Autoconf -*-
1156
1157 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
1158 #
1159 # This file is free software; the Free Software Foundation
1160 # gives unlimited permission to copy and/or distribute it,
1161 # with or without modifications, as long as this notice is preserved.
1162
1163 # serial 2
1164
1165 # _AM_PROG_TAR(FORMAT)
1166 # --------------------
1167 # Check how to create a tarball in format FORMAT.
1168 # FORMAT should be one of `v7', `ustar', or `pax'.
1169 #
1170 # Substitute a variable $(am__tar) that is a command
1171 # writing to stdout a FORMAT-tarball containing the directory
1172 # $tardir.
1173 #     tardir=directory && $(am__tar) > result.tar
1174 #
1175 # Substitute a variable $(am__untar) that extract such
1176 # a tarball read from stdin.
1177 #     $(am__untar) < result.tar
1178 AC_DEFUN([_AM_PROG_TAR],
1179 [# Always define AMTAR for backward compatibility.
1180 AM_MISSING_PROG([AMTAR], [tar])
1181 m4_if([$1], [v7],
1182      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1183      [m4_case([$1], [ustar],, [pax],,
1184               [m4_fatal([Unknown tar format])])
1185 AC_MSG_CHECKING([how to create a $1 tar archive])
1186 # Loop over all known methods to create a tar archive until one works.
1187 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1188 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1189 # Do not fold the above two line into one, because Tru64 sh and
1190 # Solaris sh will not grok spaces in the rhs of `-'.
1191 for _am_tool in $_am_tools
1192 do
1193   case $_am_tool in
1194   gnutar)
1195     for _am_tar in tar gnutar gtar;
1196     do
1197       AM_RUN_LOG([$_am_tar --version]) && break
1198     done
1199     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1200     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1201     am__untar="$_am_tar -xf -"
1202     ;;
1203   plaintar)
1204     # Must skip GNU tar: if it does not support --format= it doesn't create
1205     # ustar tarball either.
1206     (tar --version) >/dev/null 2>&1 && continue
1207     am__tar='tar chf - "$$tardir"'
1208     am__tar_='tar chf - "$tardir"'
1209     am__untar='tar xf -'
1210     ;;
1211   pax)
1212     am__tar='pax -L -x $1 -w "$$tardir"'
1213     am__tar_='pax -L -x $1 -w "$tardir"'
1214     am__untar='pax -r'
1215     ;;
1216   cpio)
1217     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1218     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1219     am__untar='cpio -i -H $1 -d'
1220     ;;
1221   none)
1222     am__tar=false
1223     am__tar_=false
1224     am__untar=false
1225     ;;
1226   esac
1227
1228   # If the value was cached, stop now.  We just wanted to have am__tar
1229   # and am__untar set.
1230   test -n "${am_cv_prog_tar_$1}" && break
1231
1232   # tar/untar a dummy directory, and stop if the command works
1233   rm -rf conftest.dir
1234   mkdir conftest.dir
1235   echo GrepMe > conftest.dir/file
1236   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1237   rm -rf conftest.dir
1238   if test -s conftest.tar; then
1239     AM_RUN_LOG([$am__untar <conftest.tar])
1240     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1241   fi
1242 done
1243 rm -rf conftest.dir
1244
1245 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1246 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1247 AC_SUBST([am__tar])
1248 AC_SUBST([am__untar])
1249 ]) # _AM_PROG_TAR
1250
1251 m4_include([config/macro-archive/ac_define_dir.m4])
1252 m4_include([config/macro-archive/ac_prog_perl_version.m4])
1253 m4_include([config/macro-archive/ac_prog_swig.m4])
1254 m4_include([config/macro-archive/ax_compare_version.m4])
1255 m4_include([config/macro-archive/docbook-dtd.m4])
1256 m4_include([config/macro-archive/docbook-xslt-min.m4])
1257 m4_include([config/macro-archive/docbook-xslt.m4])
1258 m4_include([config/macro-archive/xsltproc.m4])
1259 m4_include([config/amanda/amplot.m4])
1260 m4_include([config/amanda/bsd-security.m4])
1261 m4_include([config/amanda/bsdtcp-security.m4])
1262 m4_include([config/amanda/bsdudp-security.m4])
1263 m4_include([config/amanda/changer.m4])
1264 m4_include([config/amanda/components.m4])
1265 m4_include([config/amanda/compress.m4])
1266 m4_include([config/amanda/config.m4])
1267 m4_include([config/amanda/debugging.m4])
1268 m4_include([config/amanda/defaults.m4])
1269 m4_include([config/amanda/devprefix.m4])
1270 m4_include([config/amanda/dirs.m4])
1271 m4_include([config/amanda/documentation.m4])
1272 m4_include([config/amanda/dumpers.m4])
1273 m4_include([config/amanda/flags.m4])
1274 m4_include([config/amanda/flock.m4])
1275 m4_include([config/amanda/funcs.m4])
1276 m4_include([config/amanda/getfsent.m4])
1277 m4_include([config/amanda/i18n.m4])
1278 m4_include([config/amanda/ipv6.m4])
1279 m4_include([config/amanda/krb4-security.m4])
1280 m4_include([config/amanda/krb5-security.m4])
1281 m4_include([config/amanda/lfs.m4])
1282 m4_include([config/amanda/libs.m4])
1283 m4_include([config/amanda/net.m4])
1284 m4_include([config/amanda/progs.m4])
1285 m4_include([config/amanda/readdir.m4])
1286 m4_include([config/amanda/readline.m4])
1287 m4_include([config/amanda/rsh-security.m4])
1288 m4_include([config/amanda/s3-device.m4])
1289 m4_include([config/amanda/shmem.m4])
1290 m4_include([config/amanda/ssh-security.m4])
1291 m4_include([config/amanda/summary.m4])
1292 m4_include([config/amanda/swig.m4])
1293 m4_include([config/amanda/syshacks.m4])
1294 m4_include([config/amanda/tape.m4])
1295 m4_include([config/amanda/types.m4])
1296 m4_include([config/amanda/userid.m4])
1297 m4_include([config/amanda/version.m4])
1298 m4_include([config/gnulib/alloca.m4])
1299 m4_include([config/gnulib/arpa_inet_h.m4])
1300 m4_include([config/gnulib/base64.m4])
1301 m4_include([config/gnulib/eoverflow.m4])
1302 m4_include([config/gnulib/extensions.m4])
1303 m4_include([config/gnulib/float_h.m4])
1304 m4_include([config/gnulib/fsusage.m4])
1305 m4_include([config/gnulib/getaddrinfo.m4])
1306 m4_include([config/gnulib/gettimeofday.m4])
1307 m4_include([config/gnulib/gnulib-comp.m4])
1308 m4_include([config/gnulib/include_next.m4])
1309 m4_include([config/gnulib/inet_ntop.m4])
1310 m4_include([config/gnulib/intmax_t.m4])
1311 m4_include([config/gnulib/lock.m4])
1312 m4_include([config/gnulib/longlong.m4])
1313 m4_include([config/gnulib/malloc.m4])
1314 m4_include([config/gnulib/mkdtemp.m4])
1315 m4_include([config/gnulib/netinet_in_h.m4])
1316 m4_include([config/gnulib/onceonly_2_57.m4])
1317 m4_include([config/gnulib/physmem.m4])
1318 m4_include([config/gnulib/safe-read.m4])
1319 m4_include([config/gnulib/safe-write.m4])
1320 m4_include([config/gnulib/snprintf.m4])
1321 m4_include([config/gnulib/socklen.m4])
1322 m4_include([config/gnulib/sockpfaf.m4])
1323 m4_include([config/gnulib/ssize_t.m4])
1324 m4_include([config/gnulib/stdbool.m4])
1325 m4_include([config/gnulib/stdint.m4])
1326 m4_include([config/gnulib/stdio_h.m4])
1327 m4_include([config/gnulib/stdlib_h.m4])
1328 m4_include([config/gnulib/strdup.m4])
1329 m4_include([config/gnulib/string_h.m4])
1330 m4_include([config/gnulib/sys_socket_h.m4])
1331 m4_include([config/gnulib/sys_stat_h.m4])
1332 m4_include([config/gnulib/sys_time_h.m4])
1333 m4_include([config/gnulib/tempname.m4])
1334 m4_include([config/gnulib/ulonglong.m4])
1335 m4_include([config/gnulib/unistd_h.m4])
1336 m4_include([config/gnulib/vasnprintf.m4])
1337 m4_include([config/gnulib/visibility.m4])
1338 m4_include([config/gnulib/wchar.m4])
1339 m4_include([config/gettext-macros/gettext.m4])
1340 m4_include([config/gettext-macros/iconv.m4])
1341 m4_include([config/gettext-macros/inttypes_h.m4])
1342 m4_include([config/gettext-macros/lib-ld.m4])
1343 m4_include([config/gettext-macros/lib-link.m4])
1344 m4_include([config/gettext-macros/lib-prefix.m4])
1345 m4_include([config/gettext-macros/longlong.m4])
1346 m4_include([config/gettext-macros/nls.m4])
1347 m4_include([config/gettext-macros/po.m4])
1348 m4_include([config/gettext-macros/progtest.m4])
1349 m4_include([config/gettext-macros/size_max.m4])
1350 m4_include([config/gettext-macros/stdint_h.m4])
1351 m4_include([config/gettext-macros/wchar_t.m4])
1352 m4_include([config/gettext-macros/wint_t.m4])
1353 m4_include([config/gettext-macros/xsize.m4])
1354 m4_include([config/libtool.m4])