Mass update GPLv2 from http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
[dockapps.git] / wmstickynotes / aclocal.m4
blobec50a38e7e8b64f9ea5edc07e6e94179352a0719
1 # generated automatically by aclocal 1.10.2 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008  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.
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.
14 m4_ifndef([AC_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17 [m4_warning([this file was generated for autoconf 2.63.
18 You have another version of autoconf.  It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22 # Configure paths for GTK+
23 # Owen Taylor     1997-2001
25 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
26 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, 
27 dnl pass to pkg-config
28 dnl
29 AC_DEFUN([AM_PATH_GTK_2_0],
30 [dnl 
31 dnl Get the cflags and libraries from pkg-config
32 dnl
33 AC_ARG_ENABLE(gtktest, [  --disable-gtktest       do not try to compile and run a test GTK+ program],
34                     , enable_gtktest=yes)
36   pkg_config_args=gtk+-2.0
37   for module in . $4
38   do
39       case "$module" in
40          gthread) 
41              pkg_config_args="$pkg_config_args gthread-2.0"
42          ;;
43       esac
44   done
46   no_gtk=""
48   AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
50   if test x$PKG_CONFIG != xno ; then
51     if pkg-config --atleast-pkgconfig-version 0.7 ; then
52       :
53     else
54       echo "*** pkg-config too old; version 0.7 or better required."
55       no_gtk=yes
56       PKG_CONFIG=no
57     fi
58   else
59     no_gtk=yes
60   fi
62   min_gtk_version=ifelse([$1], ,2.0.0,$1)
63   AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
65   if test x$PKG_CONFIG != xno ; then
66     ## don't try to run the test against uninstalled libtool libs
67     if $PKG_CONFIG --uninstalled $pkg_config_args; then
68           echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
69           enable_gtktest=no
70     fi
72     if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
73           :
74     else
75           no_gtk=yes
76     fi
77   fi
79   if test x"$no_gtk" = x ; then
80     GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
81     GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
82     gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
83            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
84     gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
85            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
86     gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
87            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
88     if test "x$enable_gtktest" = "xyes" ; then
89       ac_save_CFLAGS="$CFLAGS"
90       ac_save_LIBS="$LIBS"
91       CFLAGS="$CFLAGS $GTK_CFLAGS"
92       LIBS="$GTK_LIBS $LIBS"
93 dnl
94 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
95 dnl checks the results of pkg-config to some extent)
96 dnl
97       rm -f conf.gtktest
98       AC_TRY_RUN([
99 #include <gtk/gtk.h>
100 #include <stdio.h>
101 #include <stdlib.h>
103 int 
104 main ()
106   int major, minor, micro;
107   char *tmp_version;
109   system ("touch conf.gtktest");
111   /* HP/UX 9 (%@#!) writes to sscanf strings */
112   tmp_version = g_strdup("$min_gtk_version");
113   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
114      printf("%s, bad version string\n", "$min_gtk_version");
115      exit(1);
116    }
118   if ((gtk_major_version != $gtk_config_major_version) ||
119       (gtk_minor_version != $gtk_config_minor_version) ||
120       (gtk_micro_version != $gtk_config_micro_version))
121     {
122       printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
123              $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
124              gtk_major_version, gtk_minor_version, gtk_micro_version);
125       printf ("*** was found! If pkg-config was correct, then it is best\n");
126       printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
127       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
128       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
129       printf("*** required on your system.\n");
130       printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
131       printf("*** to point to the correct configuration files\n");
132     } 
133   else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
134            (gtk_minor_version != GTK_MINOR_VERSION) ||
135            (gtk_micro_version != GTK_MICRO_VERSION))
136     {
137       printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
138              GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
139       printf("*** library (version %d.%d.%d)\n",
140              gtk_major_version, gtk_minor_version, gtk_micro_version);
141     }
142   else
143     {
144       if ((gtk_major_version > major) ||
145         ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
146         ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
147       {
148         return 0;
149        }
150      else
151       {
152         printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
153                gtk_major_version, gtk_minor_version, gtk_micro_version);
154         printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
155                major, minor, micro);
156         printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
157         printf("***\n");
158         printf("*** If you have already installed a sufficiently new version, this error\n");
159         printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
160         printf("*** being found. The easiest way to fix this is to remove the old version\n");
161         printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
162         printf("*** correct copy of pkg-config. (In this case, you will have to\n");
163         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
164         printf("*** so that the correct libraries are found at run-time))\n");
165       }
166     }
167   return 1;
169 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
170        CFLAGS="$ac_save_CFLAGS"
171        LIBS="$ac_save_LIBS"
172      fi
173   fi
174   if test "x$no_gtk" = x ; then
175      AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
176      ifelse([$2], , :, [$2])     
177   else
178      AC_MSG_RESULT(no)
179      if test "$PKG_CONFIG" = "no" ; then
180        echo "*** A new enough version of pkg-config was not found."
181        echo "*** See http://pkgconfig.sourceforge.net"
182      else
183        if test -f conf.gtktest ; then
184         :
185        else
186           echo "*** Could not run GTK+ test program, checking why..."
187           ac_save_CFLAGS="$CFLAGS"
188           ac_save_LIBS="$LIBS"
189           CFLAGS="$CFLAGS $GTK_CFLAGS"
190           LIBS="$LIBS $GTK_LIBS"
191           AC_TRY_LINK([
192 #include <gtk/gtk.h>
193 #include <stdio.h>
194 ],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
195         [ echo "*** The test program compiled, but did not run. This usually means"
196           echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
197           echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
198           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
199           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
200           echo "*** is required on your system"
201           echo "***"
202           echo "*** If you have an old version installed, it is best to remove it, although"
203           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
204         [ echo "*** The test program failed to compile or link. See the file config.log for the"
205           echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
206           CFLAGS="$ac_save_CFLAGS"
207           LIBS="$ac_save_LIBS"
208        fi
209      fi
210      GTK_CFLAGS=""
211      GTK_LIBS=""
212      ifelse([$3], , :, [$3])
213   fi
214   AC_SUBST(GTK_CFLAGS)
215   AC_SUBST(GTK_LIBS)
216   rm -f conf.gtktest
219 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
221 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
223 # This program is free software; you can redistribute it and/or modify
224 # it under the terms of the GNU General Public License as published by
225 # the Free Software Foundation; either version 2 of the License, or
226 # (at your option) any later version.
228 # This program is distributed in the hope that it will be useful, but
229 # WITHOUT ANY WARRANTY; without even the implied warranty of
230 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
231 # General Public License for more details.
233 # You should have received a copy of the GNU General Public License
234 # along with this program; if not, write to the Free Software
235 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
237 # As a special exception to the GNU General Public License, if you
238 # distribute this file as part of a program that contains a
239 # configuration script generated by Autoconf, you may include it under
240 # the same distribution terms that you use for the rest of that program.
242 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
243 # ----------------------------------
244 AC_DEFUN([PKG_PROG_PKG_CONFIG],
245 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
246 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
247 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
248 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
249         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
251 if test -n "$PKG_CONFIG"; then
252         _pkg_min_version=m4_default([$1], [0.9.0])
253         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
254         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
255                 AC_MSG_RESULT([yes])
256         else
257                 AC_MSG_RESULT([no])
258                 PKG_CONFIG=""
259         fi
260                 
261 fi[]dnl
262 ])# PKG_PROG_PKG_CONFIG
264 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
266 # Check to see whether a particular set of modules exists.  Similar
267 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
270 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
271 # this or PKG_CHECK_MODULES is called, or make sure to call
272 # PKG_CHECK_EXISTS manually
273 # --------------------------------------------------------------
274 AC_DEFUN([PKG_CHECK_EXISTS],
275 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
276 if test -n "$PKG_CONFIG" && \
277     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
278   m4_ifval([$2], [$2], [:])
279 m4_ifvaln([$3], [else
280   $3])dnl
281 fi])
284 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
285 # ---------------------------------------------
286 m4_define([_PKG_CONFIG],
287 [if test -n "$$1"; then
288     pkg_cv_[]$1="$$1"
289  elif test -n "$PKG_CONFIG"; then
290     PKG_CHECK_EXISTS([$3],
291                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
292                      [pkg_failed=yes])
293  else
294     pkg_failed=untried
295 fi[]dnl
296 ])# _PKG_CONFIG
298 # _PKG_SHORT_ERRORS_SUPPORTED
299 # -----------------------------
300 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
301 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
302 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
303         _pkg_short_errors_supported=yes
304 else
305         _pkg_short_errors_supported=no
306 fi[]dnl
307 ])# _PKG_SHORT_ERRORS_SUPPORTED
310 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
311 # [ACTION-IF-NOT-FOUND])
314 # Note that if there is a possibility the first call to
315 # PKG_CHECK_MODULES might not happen, you should be sure to include an
316 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
319 # --------------------------------------------------------------
320 AC_DEFUN([PKG_CHECK_MODULES],
321 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
322 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
323 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
325 pkg_failed=no
326 AC_MSG_CHECKING([for $1])
328 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
329 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
331 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
332 and $1[]_LIBS to avoid the need to call pkg-config.
333 See the pkg-config man page for more details.])
335 if test $pkg_failed = yes; then
336         _PKG_SHORT_ERRORS_SUPPORTED
337         if test $_pkg_short_errors_supported = yes; then
338                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
339         else 
340                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
341         fi
342         # Put the nasty error message in config.log where it belongs
343         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
345         ifelse([$4], , [AC_MSG_ERROR(dnl
346 [Package requirements ($2) were not met:
348 $$1_PKG_ERRORS
350 Consider adjusting the PKG_CONFIG_PATH environment variable if you
351 installed software in a non-standard prefix.
353 _PKG_TEXT
354 ])],
355                 [AC_MSG_RESULT([no])
356                 $4])
357 elif test $pkg_failed = untried; then
358         ifelse([$4], , [AC_MSG_FAILURE(dnl
359 [The pkg-config script could not be found or is too old.  Make sure it
360 is in your PATH or set the PKG_CONFIG environment variable to the full
361 path to pkg-config.
363 _PKG_TEXT
365 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
366                 [$4])
367 else
368         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
369         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
370         AC_MSG_RESULT([yes])
371         ifelse([$3], , :, [$3])
372 fi[]dnl
373 ])# PKG_CHECK_MODULES
375 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
377 # This file is free software; the Free Software Foundation
378 # gives unlimited permission to copy and/or distribute it,
379 # with or without modifications, as long as this notice is preserved.
381 # AM_AUTOMAKE_VERSION(VERSION)
382 # ----------------------------
383 # Automake X.Y traces this macro to ensure aclocal.m4 has been
384 # generated from the m4 files accompanying Automake X.Y.
385 # (This private macro should not be called outside this file.)
386 AC_DEFUN([AM_AUTOMAKE_VERSION],
387 [am__api_version='1.10'
388 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
389 dnl require some minimum version.  Point them to the right macro.
390 m4_if([$1], [1.10.2], [],
391       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
394 # _AM_AUTOCONF_VERSION(VERSION)
395 # -----------------------------
396 # aclocal traces this macro to find the Autoconf version.
397 # This is a private macro too.  Using m4_define simplifies
398 # the logic in aclocal, which can simply ignore this definition.
399 m4_define([_AM_AUTOCONF_VERSION], [])
401 # AM_SET_CURRENT_AUTOMAKE_VERSION
402 # -------------------------------
403 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
404 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
405 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
406 [AM_AUTOMAKE_VERSION([1.10.2])dnl
407 m4_ifndef([AC_AUTOCONF_VERSION],
408   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
409 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
411 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
413 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
415 # This file is free software; the Free Software Foundation
416 # gives unlimited permission to copy and/or distribute it,
417 # with or without modifications, as long as this notice is preserved.
419 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
420 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
421 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
423 # Of course, Automake must honor this variable whenever it calls a
424 # tool from the auxiliary directory.  The problem is that $srcdir (and
425 # therefore $ac_aux_dir as well) can be either absolute or relative,
426 # depending on how configure is run.  This is pretty annoying, since
427 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
428 # source directory, any form will work fine, but in subdirectories a
429 # relative path needs to be adjusted first.
431 # $ac_aux_dir/missing
432 #    fails when called from a subdirectory if $ac_aux_dir is relative
433 # $top_srcdir/$ac_aux_dir/missing
434 #    fails if $ac_aux_dir is absolute,
435 #    fails when called from a subdirectory in a VPATH build with
436 #          a relative $ac_aux_dir
438 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
439 # are both prefixed by $srcdir.  In an in-source build this is usually
440 # harmless because $srcdir is `.', but things will broke when you
441 # start a VPATH build or use an absolute $srcdir.
443 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
444 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
445 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
446 # and then we would define $MISSING as
447 #   MISSING="\${SHELL} $am_aux_dir/missing"
448 # This will work as long as MISSING is not called from configure, because
449 # unfortunately $(top_srcdir) has no meaning in configure.
450 # However there are other variables, like CC, which are often used in
451 # configure, and could therefore not use this "fixed" $ac_aux_dir.
453 # Another solution, used here, is to always expand $ac_aux_dir to an
454 # absolute PATH.  The drawback is that using absolute paths prevent a
455 # configured tree to be moved without reconfiguration.
457 AC_DEFUN([AM_AUX_DIR_EXPAND],
458 [dnl Rely on autoconf to set up CDPATH properly.
459 AC_PREREQ([2.50])dnl
460 # expand $ac_aux_dir to an absolute path
461 am_aux_dir=`cd $ac_aux_dir && pwd`
464 # AM_CONDITIONAL                                            -*- Autoconf -*-
466 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
467 # Free Software Foundation, Inc.
469 # This file is free software; the Free Software Foundation
470 # gives unlimited permission to copy and/or distribute it,
471 # with or without modifications, as long as this notice is preserved.
473 # serial 8
475 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
476 # -------------------------------------
477 # Define a conditional.
478 AC_DEFUN([AM_CONDITIONAL],
479 [AC_PREREQ(2.52)dnl
480  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
481         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
482 AC_SUBST([$1_TRUE])dnl
483 AC_SUBST([$1_FALSE])dnl
484 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
485 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
486 if $2; then
487   $1_TRUE=
488   $1_FALSE='#'
489 else
490   $1_TRUE='#'
491   $1_FALSE=
493 AC_CONFIG_COMMANDS_PRE(
494 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
495   AC_MSG_ERROR([[conditional "$1" was never defined.
496 Usually this means the macro was only invoked conditionally.]])
497 fi])])
499 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
500 # Free Software Foundation, Inc.
502 # This file is free software; the Free Software Foundation
503 # gives unlimited permission to copy and/or distribute it,
504 # with or without modifications, as long as this notice is preserved.
506 # serial 9
508 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
509 # written in clear, in which case automake, when reading aclocal.m4,
510 # will think it sees a *use*, and therefore will trigger all it's
511 # C support machinery.  Also note that it means that autoscan, seeing
512 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
515 # _AM_DEPENDENCIES(NAME)
516 # ----------------------
517 # See how the compiler implements dependency checking.
518 # NAME is "CC", "CXX", "GCJ", or "OBJC".
519 # We try a few techniques and use that to set a single cache variable.
521 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
522 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
523 # dependency, and given that the user is not expected to run this macro,
524 # just rely on AC_PROG_CC.
525 AC_DEFUN([_AM_DEPENDENCIES],
526 [AC_REQUIRE([AM_SET_DEPDIR])dnl
527 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
528 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
529 AC_REQUIRE([AM_DEP_TRACK])dnl
531 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
532        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
533        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
534        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
535        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
536                    [depcc="$$1"   am_compiler_list=])
538 AC_CACHE_CHECK([dependency style of $depcc],
539                [am_cv_$1_dependencies_compiler_type],
540 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
541   # We make a subdir and do the tests there.  Otherwise we can end up
542   # making bogus files that we don't know about and never remove.  For
543   # instance it was reported that on HP-UX the gcc test will end up
544   # making a dummy file named `D' -- because `-MD' means `put the output
545   # in D'.
546   mkdir conftest.dir
547   # Copy depcomp to subdir because otherwise we won't find it if we're
548   # using a relative directory.
549   cp "$am_depcomp" conftest.dir
550   cd conftest.dir
551   # We will build objects and dependencies in a subdirectory because
552   # it helps to detect inapplicable dependency modes.  For instance
553   # both Tru64's cc and ICC support -MD to output dependencies as a
554   # side effect of compilation, but ICC will put the dependencies in
555   # the current directory while Tru64 will put them in the object
556   # directory.
557   mkdir sub
559   am_cv_$1_dependencies_compiler_type=none
560   if test "$am_compiler_list" = ""; then
561      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
562   fi
563   for depmode in $am_compiler_list; do
564     # Setup a source with many dependencies, because some compilers
565     # like to wrap large dependency lists on column 80 (with \), and
566     # we should not choose a depcomp mode which is confused by this.
567     #
568     # We need to recreate these files for each test, as the compiler may
569     # overwrite some of them when testing with obscure command lines.
570     # This happens at least with the AIX C compiler.
571     : > sub/conftest.c
572     for i in 1 2 3 4 5 6; do
573       echo '#include "conftst'$i'.h"' >> sub/conftest.c
574       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
575       # Solaris 8's {/usr,}/bin/sh.
576       touch sub/conftst$i.h
577     done
578     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
580     case $depmode in
581     nosideeffect)
582       # after this tag, mechanisms are not by side-effect, so they'll
583       # only be used when explicitly requested
584       if test "x$enable_dependency_tracking" = xyes; then
585         continue
586       else
587         break
588       fi
589       ;;
590     none) break ;;
591     esac
592     # We check with `-c' and `-o' for the sake of the "dashmstdout"
593     # mode.  It turns out that the SunPro C++ compiler does not properly
594     # handle `-M -o', and we need to detect this.
595     if depmode=$depmode \
596        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
597        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
598        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
599          >/dev/null 2>conftest.err &&
600        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
601        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
602        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
603        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
604       # icc doesn't choke on unknown options, it will just issue warnings
605       # or remarks (even with -Werror).  So we grep stderr for any message
606       # that says an option was ignored or not supported.
607       # When given -MP, icc 7.0 and 7.1 complain thusly:
608       #   icc: Command line warning: ignoring option '-M'; no argument required
609       # The diagnosis changed in icc 8.0:
610       #   icc: Command line remark: option '-MP' not supported
611       if (grep 'ignoring option' conftest.err ||
612           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
613         am_cv_$1_dependencies_compiler_type=$depmode
614         break
615       fi
616     fi
617   done
619   cd ..
620   rm -rf conftest.dir
621 else
622   am_cv_$1_dependencies_compiler_type=none
625 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
626 AM_CONDITIONAL([am__fastdep$1], [
627   test "x$enable_dependency_tracking" != xno \
628   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
632 # AM_SET_DEPDIR
633 # -------------
634 # Choose a directory name for dependency files.
635 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
636 AC_DEFUN([AM_SET_DEPDIR],
637 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
638 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
642 # AM_DEP_TRACK
643 # ------------
644 AC_DEFUN([AM_DEP_TRACK],
645 [AC_ARG_ENABLE(dependency-tracking,
646 [  --disable-dependency-tracking  speeds up one-time build
647   --enable-dependency-tracking   do not reject slow dependency extractors])
648 if test "x$enable_dependency_tracking" != xno; then
649   am_depcomp="$ac_aux_dir/depcomp"
650   AMDEPBACKSLASH='\'
652 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
653 AC_SUBST([AMDEPBACKSLASH])dnl
654 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
657 # Generate code to set up dependency tracking.              -*- Autoconf -*-
659 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
660 # Free Software Foundation, Inc.
662 # This file is free software; the Free Software Foundation
663 # gives unlimited permission to copy and/or distribute it,
664 # with or without modifications, as long as this notice is preserved.
666 #serial 4
668 # _AM_OUTPUT_DEPENDENCY_COMMANDS
669 # ------------------------------
670 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
671 [# Autoconf 2.62 quotes --file arguments for eval, but not when files
672 # are listed without --file.  Let's play safe and only enable the eval
673 # if we detect the quoting.
674 case $CONFIG_FILES in
675 *\'*) eval set x "$CONFIG_FILES" ;;
676 *)   set x $CONFIG_FILES ;;
677 esac
678 shift
679 for mf
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 -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/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
722 # AM_OUTPUT_DEPENDENCY_COMMANDS
723 # -----------------------------
724 # This macro should only be invoked once -- use via AC_REQUIRE.
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"])
735 # Do all the work for Automake.                             -*- Autoconf -*-
737 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
738 # 2005, 2006, 2008 Free Software Foundation, Inc.
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.
744 # serial 13
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.
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
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
785 AC_SUBST([CYGPATH_W])
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
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
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
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.
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_arg=$1
850 _am_stamp_count=1
851 for _am_header in $config_headers :; do
852   case $_am_header in
853     $_am_arg | $_am_arg:* )
854       break ;;
855     * )
856       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
857   esac
858 done
859 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
861 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
863 # This file is free software; the Free Software Foundation
864 # gives unlimited permission to copy and/or distribute it,
865 # with or without modifications, as long as this notice is preserved.
867 # AM_PROG_INSTALL_SH
868 # ------------------
869 # Define $install_sh.
870 AC_DEFUN([AM_PROG_INSTALL_SH],
871 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
872 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
873 AC_SUBST(install_sh)])
875 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
877 # This file is free software; the Free Software Foundation
878 # gives unlimited permission to copy and/or distribute it,
879 # with or without modifications, as long as this notice is preserved.
881 # serial 2
883 # Check whether the underlying file-system supports filenames
884 # with a leading dot.  For instance MS-DOS doesn't.
885 AC_DEFUN([AM_SET_LEADING_DOT],
886 [rm -rf .tst 2>/dev/null
887 mkdir .tst 2>/dev/null
888 if test -d .tst; then
889   am__leading_dot=.
890 else
891   am__leading_dot=_
893 rmdir .tst 2>/dev/null
894 AC_SUBST([am__leading_dot])])
896 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
898 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
900 # This file is free software; the Free Software Foundation
901 # gives unlimited permission to copy and/or distribute it,
902 # with or without modifications, as long as this notice is preserved.
904 # serial 3
906 # AM_MAKE_INCLUDE()
907 # -----------------
908 # Check to see how make treats includes.
909 AC_DEFUN([AM_MAKE_INCLUDE],
910 [am_make=${MAKE-make}
911 cat > confinc << 'END'
912 am__doit:
913         @echo done
914 .PHONY: am__doit
916 # If we don't find an include directive, just comment out the code.
917 AC_MSG_CHECKING([for style of include used by $am_make])
918 am__include="#"
919 am__quote=
920 _am_result=none
921 # First try GNU make style include.
922 echo "include confinc" > confmf
923 # We grep out `Entering directory' and `Leaving directory'
924 # messages which can occur if `w' ends up in MAKEFLAGS.
925 # In particular we don't look at `^make:' because GNU make might
926 # be invoked under some other name (usually "gmake"), in which
927 # case it prints its new name instead of `make'.
928 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
929    am__include=include
930    am__quote=
931    _am_result=GNU
933 # Now try BSD make style include.
934 if test "$am__include" = "#"; then
935    echo '.include "confinc"' > confmf
936    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
937       am__include=.include
938       am__quote="\""
939       _am_result=BSD
940    fi
942 AC_SUBST([am__include])
943 AC_SUBST([am__quote])
944 AC_MSG_RESULT([$_am_result])
945 rm -f confinc confmf
948 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
950 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
951 # Free Software Foundation, Inc.
953 # This file is free software; the Free Software Foundation
954 # gives unlimited permission to copy and/or distribute it,
955 # with or without modifications, as long as this notice is preserved.
957 # serial 5
959 # AM_MISSING_PROG(NAME, PROGRAM)
960 # ------------------------------
961 AC_DEFUN([AM_MISSING_PROG],
962 [AC_REQUIRE([AM_MISSING_HAS_RUN])
963 $1=${$1-"${am_missing_run}$2"}
964 AC_SUBST($1)])
967 # AM_MISSING_HAS_RUN
968 # ------------------
969 # Define MISSING if not defined so far and test if it supports --run.
970 # If it does, set am_missing_run to use it, otherwise, to nothing.
971 AC_DEFUN([AM_MISSING_HAS_RUN],
972 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
973 AC_REQUIRE_AUX_FILE([missing])dnl
974 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
975 # Use eval to expand $SHELL
976 if eval "$MISSING --run true"; then
977   am_missing_run="$MISSING --run "
978 else
979   am_missing_run=
980   AC_MSG_WARN([`missing' script is too old or missing])
984 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
986 # This file is free software; the Free Software Foundation
987 # gives unlimited permission to copy and/or distribute it,
988 # with or without modifications, as long as this notice is preserved.
990 # AM_PROG_MKDIR_P
991 # ---------------
992 # Check for `mkdir -p'.
993 AC_DEFUN([AM_PROG_MKDIR_P],
994 [AC_PREREQ([2.60])dnl
995 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
996 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
997 dnl while keeping a definition of mkdir_p for backward compatibility.
998 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
999 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1000 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1001 dnl adjustment using top_builddir (which is defined more often than
1002 dnl MKDIR_P).
1003 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1004 case $mkdir_p in
1005   [[\\/$]]* | ?:[[\\/]]*) ;;
1006   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1007 esac
1010 # Helper functions for option handling.                     -*- Autoconf -*-
1012 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
1014 # This file is free software; the Free Software Foundation
1015 # gives unlimited permission to copy and/or distribute it,
1016 # with or without modifications, as long as this notice is preserved.
1018 # serial 4
1020 # _AM_MANGLE_OPTION(NAME)
1021 # -----------------------
1022 AC_DEFUN([_AM_MANGLE_OPTION],
1023 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1025 # _AM_SET_OPTION(NAME)
1026 # ------------------------------
1027 # Set option NAME.  Presently that only means defining a flag for this option.
1028 AC_DEFUN([_AM_SET_OPTION],
1029 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1031 # _AM_SET_OPTIONS(OPTIONS)
1032 # ----------------------------------
1033 # OPTIONS is a space-separated list of Automake options.
1034 AC_DEFUN([_AM_SET_OPTIONS],
1035 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1037 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1038 # -------------------------------------------
1039 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1040 AC_DEFUN([_AM_IF_OPTION],
1041 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1043 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1045 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1046 # Free Software Foundation, Inc.
1048 # This file is free software; the Free Software Foundation
1049 # gives unlimited permission to copy and/or distribute it,
1050 # with or without modifications, as long as this notice is preserved.
1052 # serial 4
1054 # AM_SANITY_CHECK
1055 # ---------------
1056 AC_DEFUN([AM_SANITY_CHECK],
1057 [AC_MSG_CHECKING([whether build environment is sane])
1058 # Just in case
1059 sleep 1
1060 echo timestamp > conftest.file
1061 # Do `set' in a subshell so we don't clobber the current shell's
1062 # arguments.  Must try -L first in case configure is actually a
1063 # symlink; some systems play weird games with the mod time of symlinks
1064 # (eg FreeBSD returns the mod time of the symlink's containing
1065 # directory).
1066 if (
1067    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1068    if test "$[*]" = "X"; then
1069       # -L didn't work.
1070       set X `ls -t $srcdir/configure conftest.file`
1071    fi
1072    rm -f conftest.file
1073    if test "$[*]" != "X $srcdir/configure conftest.file" \
1074       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1076       # If neither matched, then we have a broken ls.  This can happen
1077       # if, for instance, CONFIG_SHELL is bash and it inherits a
1078       # broken ls alias from the environment.  This has actually
1079       # happened.  Such a system could not be considered "sane".
1080       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1081 alias in your environment])
1082    fi
1084    test "$[2]" = conftest.file
1085    )
1086 then
1087    # Ok.
1088    :
1089 else
1090    AC_MSG_ERROR([newly created file is older than distributed files!
1091 Check your system clock])
1093 AC_MSG_RESULT(yes)])
1095 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1097 # This file is free software; the Free Software Foundation
1098 # gives unlimited permission to copy and/or distribute it,
1099 # with or without modifications, as long as this notice is preserved.
1101 # AM_PROG_INSTALL_STRIP
1102 # ---------------------
1103 # One issue with vendor `install' (even GNU) is that you can't
1104 # specify the program used to strip binaries.  This is especially
1105 # annoying in cross-compiling environments, where the build's strip
1106 # is unlikely to handle the host's binaries.
1107 # Fortunately install-sh will honor a STRIPPROG variable, so we
1108 # always use install-sh in `make install-strip', and initialize
1109 # STRIPPROG with the value of the STRIP variable (set by the user).
1110 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1111 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1112 # Installed binaries are usually stripped using `strip' when the user
1113 # run `make install-strip'.  However `strip' might not be the right
1114 # tool to use in cross-compilation environments, therefore Automake
1115 # will honor the `STRIP' environment variable to overrule this program.
1116 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1117 if test "$cross_compiling" != no; then
1118   AC_CHECK_TOOL([STRIP], [strip], :)
1120 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1121 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1123 # Copyright (C) 2006  Free Software Foundation, Inc.
1125 # This file is free software; the Free Software Foundation
1126 # gives unlimited permission to copy and/or distribute it,
1127 # with or without modifications, as long as this notice is preserved.
1129 # _AM_SUBST_NOTMAKE(VARIABLE)
1130 # ---------------------------
1131 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1132 # This macro is traced by Automake.
1133 AC_DEFUN([_AM_SUBST_NOTMAKE])
1135 # Check how to create a tarball.                            -*- Autoconf -*-
1137 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
1139 # This file is free software; the Free Software Foundation
1140 # gives unlimited permission to copy and/or distribute it,
1141 # with or without modifications, as long as this notice is preserved.
1143 # serial 2
1145 # _AM_PROG_TAR(FORMAT)
1146 # --------------------
1147 # Check how to create a tarball in format FORMAT.
1148 # FORMAT should be one of `v7', `ustar', or `pax'.
1150 # Substitute a variable $(am__tar) that is a command
1151 # writing to stdout a FORMAT-tarball containing the directory
1152 # $tardir.
1153 #     tardir=directory && $(am__tar) > result.tar
1155 # Substitute a variable $(am__untar) that extract such
1156 # a tarball read from stdin.
1157 #     $(am__untar) < result.tar
1158 AC_DEFUN([_AM_PROG_TAR],
1159 [# Always define AMTAR for backward compatibility.
1160 AM_MISSING_PROG([AMTAR], [tar])
1161 m4_if([$1], [v7],
1162      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1163      [m4_case([$1], [ustar],, [pax],,
1164               [m4_fatal([Unknown tar format])])
1165 AC_MSG_CHECKING([how to create a $1 tar archive])
1166 # Loop over all known methods to create a tar archive until one works.
1167 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1168 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1169 # Do not fold the above two line into one, because Tru64 sh and
1170 # Solaris sh will not grok spaces in the rhs of `-'.
1171 for _am_tool in $_am_tools
1173   case $_am_tool in
1174   gnutar)
1175     for _am_tar in tar gnutar gtar;
1176     do
1177       AM_RUN_LOG([$_am_tar --version]) && break
1178     done
1179     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1180     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1181     am__untar="$_am_tar -xf -"
1182     ;;
1183   plaintar)
1184     # Must skip GNU tar: if it does not support --format= it doesn't create
1185     # ustar tarball either.
1186     (tar --version) >/dev/null 2>&1 && continue
1187     am__tar='tar chf - "$$tardir"'
1188     am__tar_='tar chf - "$tardir"'
1189     am__untar='tar xf -'
1190     ;;
1191   pax)
1192     am__tar='pax -L -x $1 -w "$$tardir"'
1193     am__tar_='pax -L -x $1 -w "$tardir"'
1194     am__untar='pax -r'
1195     ;;
1196   cpio)
1197     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1198     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1199     am__untar='cpio -i -H $1 -d'
1200     ;;
1201   none)
1202     am__tar=false
1203     am__tar_=false
1204     am__untar=false
1205     ;;
1206   esac
1208   # If the value was cached, stop now.  We just wanted to have am__tar
1209   # and am__untar set.
1210   test -n "${am_cv_prog_tar_$1}" && break
1212   # tar/untar a dummy directory, and stop if the command works
1213   rm -rf conftest.dir
1214   mkdir conftest.dir
1215   echo GrepMe > conftest.dir/file
1216   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1217   rm -rf conftest.dir
1218   if test -s conftest.tar; then
1219     AM_RUN_LOG([$am__untar <conftest.tar])
1220     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1221   fi
1222 done
1223 rm -rf conftest.dir
1225 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1226 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1227 AC_SUBST([am__tar])
1228 AC_SUBST([am__untar])
1229 ]) # _AM_PROG_TAR