PCem
view aclocal.m4 @ 154:d0d530adce12
Initial port to Linux (using Allegro).
64-bit fixes.
Some changes to aid portability.
A few other tweaks.
| author | TomW |
|---|---|
| date | Thu Sep 04 21:07:24 2014 +0100 |
| parents | |
| children |
line source
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009 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.65],,
17 [m4_warning([this file was generated for autoconf 2.65.
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 Allegro
23 # Shamelessly stolen from libxml.a4
24 # Jon Rafkind 2004-06-06
25 # Adapted from:
26 # Configure paths for libXML
27 # Toshio Kuratomi 2001-04-21
28 # Adapted from:
29 # Configure paths for GLIB
30 # Owen Taylor 97-11-3
32 dnl AM_PATH_allegro([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
33 dnl Test for allegro, and define allegro_CFLAGS and allegro_LIBS
34 dnl
35 AC_DEFUN([AM_PATH_ALLEGRO],[
36 AC_ARG_WITH(allegro-prefix,
37 [ --with-allegro-prefix=PFX Prefix where liballegro is installed (optional)],
38 ALLEGRO_CONFIG_prefix="$withval", ALLEGRO_CONFIG_prefix="")
39 AC_ARG_WITH(allegro-exec-prefix,
40 [ --with-allegro-exec-prefix=PFX Exec prefix where liballegro is installed (optional)],
41 ALLEGRO_CONFIG_exec_prefix="$withval", ALLEGRO_CONFIG_exec_prefix="")
42 AC_ARG_ENABLE(allegrotest,
43 [ --disable-allegrotest Do not try to compile and run a test LIBallegro program],,
44 enable_allegrotest=yes)
46 if test x$ALLEGRO_CONFIG_exec_prefix != x ; then
47 ALLEGRO_CONFIG_args="$ALLEGRO_CONFIG_args --exec-prefix=$ALLEGRO_CONFIG_exec_prefix"
48 if test x${ALLEGRO_CONFIG+set} != xset ; then
49 ALLEGRO_CONFIG=$ALLEGRO_CONFIG_exec_prefix/bin/allegro-config
50 fi
51 fi
52 if test x$ALLEGRO_CONFIG_prefix != x ; then
53 ALLEGRO_CONFIG_args="$ALLEGRO_CONFIG_args --prefix=$ALLEGRO_CONFIG_prefix"
54 if test x${ALLEGRO_CONFIG+set} != xset ; then
55 ALLEGRO_CONFIG=$ALLEGRO_CONFIG_prefix/bin/allegro-config
56 fi
57 fi
59 AC_PATH_PROG(ALLEGRO_CONFIG, allegro-config, no)
60 min_allegro_version=ifelse([$1], ,4.0.0,[$1])
61 AC_MSG_CHECKING(for Allegro - version >= $min_allegro_version)
62 no_allegro=""
63 if test "$ALLEGRO_CONFIG" = "no" ; then
64 no_allegro=yes
65 else
66 allegro_CFLAGS=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --cflags`
67 allegro_LIBS=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --libs`
68 ALLEGRO_CONFIG_major_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \
69 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
70 ALLEGRO_CONFIG_minor_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \
71 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
72 ALLEGRO_CONFIG_micro_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \
73 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
74 if test "x$enable_allegrotest" = "xyes" ; then
75 ac_save_CFLAGS="$CFLAGS"
76 ac_save_LIBS="$LIBS"
77 CFLAGS="$CFLAGS $allegro_CFLAGS"
78 LIBS="$allegro_LIBS $LIBS"
79 dnl
80 dnl Now check if the installed liballegro is sufficiently new.
81 dnl (Also sanity checks the results of allegro-config to some extent)
82 dnl
83 rm -f conf.allegrotest
84 AC_TRY_RUN([
85 #include <stdlib.h>
86 #include <stdio.h>
87 #include <string.h>
88 #include <allegro.h>
90 int
91 main()
92 {
93 int allegro_major_version, allegro_minor_version, allegro_micro_version;
94 int major, minor, micro;
95 char *tmp_version;
96 int tmp_int_version;
98 system("touch conf.allegrotest");
100 /* Capture allegro-config output via autoconf/configure variables */
101 /* HP/UX 9 (%@#!) writes to sscanf strings */
102 tmp_version = (char *)strdup("$min_allegro_version");
103 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
104 printf("%s, bad version string from allegro-config\n", "$min_allegro_version");
105 free(tmp_version);
106 exit(1);
107 }
108 free(tmp_version);
110 /* Capture the version information from the header files */
111 allegro_major_version = ALLEGRO_VERSION;
112 allegro_minor_version = ALLEGRO_SUB_VERSION;
113 allegro_micro_version = ALLEGRO_WIP_VERSION;
115 /* Compare allegro-config output to the Allegro headers */
116 if ((allegro_major_version != $ALLEGRO_CONFIG_major_version) ||
117 (allegro_minor_version != $ALLEGRO_CONFIG_minor_version))
119 {
120 printf("*** Allegro header files (version %d.%d.%d) do not match\n",
121 allegro_major_version, allegro_minor_version, allegro_micro_version);
122 printf("*** allegro-config (version %d.%d.%d)\n",
123 $ALLEGRO_CONFIG_major_version, $ALLEGRO_CONFIG_minor_version, $ALLEGRO_CONFIG_micro_version);
124 return 1;
125 }
126 /* Compare the headers to the library to make sure we match */
127 /* Less than ideal -- doesn't provide us with return value feedback,
128 * only exits if there's a serious mismatch between header and library.
129 */
130 /* TODO:
131 * This doesnt work!
132 */
133 /* ALLEGRO_TEST_VERSION; */
135 /* Test that the library is greater than our minimum version */
136 if (($ALLEGRO_CONFIG_major_version > major) ||
137 (($ALLEGRO_CONFIG_major_version == major) && ($ALLEGRO_CONFIG_minor_version > minor)) ||
138 (($ALLEGRO_CONFIG_major_version == major) && ($ALLEGRO_CONFIG_minor_version == minor) &&
139 ($ALLEGRO_CONFIG_micro_version >= micro)))
140 {
141 return 0;
142 }
143 else
144 {
145 printf("\n*** An old version of Allegro (%d.%d.%d) was found.\n",
146 allegro_major_version, allegro_minor_version, allegro_micro_version);
147 printf("*** You need a version of Allegro newer than %d.%d.%d. The latest version of\n",
148 major, minor, micro);
149 printf("*** Allegro is always available from http://alleg.sf.net.\n");
150 printf("***\n");
151 printf("*** If you have already installed a sufficiently new version, this error\n");
152 printf("*** probably means that the wrong copy of the allegro-config shell script is\n");
153 printf("*** being found. The easiest way to fix this is to remove the old version\n");
154 printf("*** of Allegro, but you can also set the ALLEGRO_CONFIG environment to point to the\n");
155 printf("*** correct copy of allegro-config. (In this case, you will have to\n");
156 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
157 printf("*** so that the correct libraries are found at run-time))\n");
158 }
159 return 1;
160 } END_OF_MAIN()
161 ],, no_allegro=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
162 CFLAGS="$ac_save_CFLAGS"
163 LIBS="$ac_save_LIBS"
164 fi
165 fi
167 if test "x$no_allegro" = x ; then
168 AC_MSG_RESULT(yes (version $ALLEGRO_CONFIG_major_version.$ALLEGRO_CONFIG_minor_version.$ALLEGRO_CONFIG_micro_version))
169 ifelse([$2], , :, [$2])
170 else
171 AC_MSG_RESULT(no)
172 if test "$ALLEGRO_CONFIG" = "no" ; then
173 echo "*** The allegro-config script installed by Allegro could not be found"
174 echo "*** If Allegro was installed in PREFIX, make sure PREFIX/bin is in"
175 echo "*** your path, or set the ALLEGRO_CONFIG environment variable to the"
176 echo "*** full path to allegro-config."
177 else
178 if test -f conf.allegrotest ; then
179 :
180 else
181 echo "*** Could not run Allegro test program, checking why..."
182 CFLAGS="$CFLAGS $allegro_CFLAGS"
183 LIBS="$LIBS $allegro_LIBS"
184 AC_TRY_LINK([
185 #include <allegro.h>
186 #include <stdio.h>
187 ], [ ALLEGRO_TEST_VERSION; return 0;],
188 [ echo "*** The test program compiled, but did not run. This usually means"
189 echo "*** that the run-time linker is not finding Allegro or finding the wrong"
190 echo "*** version of Allegro. If it is not finding Allegro, you'll need to set your"
191 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
192 echo "*** to the installed location Also, make sure you have run ldconfig if that"
193 echo "*** is required on your system"
194 echo "***"
195 echo "*** If you have an old version installed, it is best to remove it, although"
196 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
197 [ echo "*** The test program failed to compile or link. See the file config.log for the"
198 echo "*** exact error that occured. This usually means Allegro was incorrectly installed"
199 echo "*** or that you have moved Allegro since it was installed. In the latter case, you"
200 echo "*** may want to edit the allegro-config script: $ALLEGRO_CONFIG" ])
201 CFLAGS="$ac_save_CFLAGS"
202 LIBS="$ac_save_LIBS"
203 fi
204 fi
206 allegro_CFLAGS=""
207 allegro_LIBS=""
208 ifelse([$3], , :, [$3])
209 fi
210 AC_SUBST(allegro_CFLAGS)
211 AC_SUBST(allegro_LIBS)
212 rm -f conf.allegrotest
213 ])
215 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
216 #
217 # This file is free software; the Free Software Foundation
218 # gives unlimited permission to copy and/or distribute it,
219 # with or without modifications, as long as this notice is preserved.
221 # AM_AUTOMAKE_VERSION(VERSION)
222 # ----------------------------
223 # Automake X.Y traces this macro to ensure aclocal.m4 has been
224 # generated from the m4 files accompanying Automake X.Y.
225 # (This private macro should not be called outside this file.)
226 AC_DEFUN([AM_AUTOMAKE_VERSION],
227 [am__api_version='1.11'
228 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
229 dnl require some minimum version. Point them to the right macro.
230 m4_if([$1], [1.11.1], [],
231 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
232 ])
234 # _AM_AUTOCONF_VERSION(VERSION)
235 # -----------------------------
236 # aclocal traces this macro to find the Autoconf version.
237 # This is a private macro too. Using m4_define simplifies
238 # the logic in aclocal, which can simply ignore this definition.
239 m4_define([_AM_AUTOCONF_VERSION], [])
241 # AM_SET_CURRENT_AUTOMAKE_VERSION
242 # -------------------------------
243 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
244 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
245 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
246 [AM_AUTOMAKE_VERSION([1.11.1])dnl
247 m4_ifndef([AC_AUTOCONF_VERSION],
248 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
249 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
251 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
253 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
254 #
255 # This file is free software; the Free Software Foundation
256 # gives unlimited permission to copy and/or distribute it,
257 # with or without modifications, as long as this notice is preserved.
259 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
260 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
261 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
262 #
263 # Of course, Automake must honor this variable whenever it calls a
264 # tool from the auxiliary directory. The problem is that $srcdir (and
265 # therefore $ac_aux_dir as well) can be either absolute or relative,
266 # depending on how configure is run. This is pretty annoying, since
267 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
268 # source directory, any form will work fine, but in subdirectories a
269 # relative path needs to be adjusted first.
270 #
271 # $ac_aux_dir/missing
272 # fails when called from a subdirectory if $ac_aux_dir is relative
273 # $top_srcdir/$ac_aux_dir/missing
274 # fails if $ac_aux_dir is absolute,
275 # fails when called from a subdirectory in a VPATH build with
276 # a relative $ac_aux_dir
277 #
278 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
279 # are both prefixed by $srcdir. In an in-source build this is usually
280 # harmless because $srcdir is `.', but things will broke when you
281 # start a VPATH build or use an absolute $srcdir.
282 #
283 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
284 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
285 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
286 # and then we would define $MISSING as
287 # MISSING="\${SHELL} $am_aux_dir/missing"
288 # This will work as long as MISSING is not called from configure, because
289 # unfortunately $(top_srcdir) has no meaning in configure.
290 # However there are other variables, like CC, which are often used in
291 # configure, and could therefore not use this "fixed" $ac_aux_dir.
292 #
293 # Another solution, used here, is to always expand $ac_aux_dir to an
294 # absolute PATH. The drawback is that using absolute paths prevent a
295 # configured tree to be moved without reconfiguration.
297 AC_DEFUN([AM_AUX_DIR_EXPAND],
298 [dnl Rely on autoconf to set up CDPATH properly.
299 AC_PREREQ([2.50])dnl
300 # expand $ac_aux_dir to an absolute path
301 am_aux_dir=`cd $ac_aux_dir && pwd`
302 ])
304 # AM_CONDITIONAL -*- Autoconf -*-
306 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
307 # Free Software Foundation, Inc.
308 #
309 # This file is free software; the Free Software Foundation
310 # gives unlimited permission to copy and/or distribute it,
311 # with or without modifications, as long as this notice is preserved.
313 # serial 9
315 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
316 # -------------------------------------
317 # Define a conditional.
318 AC_DEFUN([AM_CONDITIONAL],
319 [AC_PREREQ(2.52)dnl
320 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
321 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
322 AC_SUBST([$1_TRUE])dnl
323 AC_SUBST([$1_FALSE])dnl
324 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
325 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
326 m4_define([_AM_COND_VALUE_$1], [$2])dnl
327 if $2; then
328 $1_TRUE=
329 $1_FALSE='#'
330 else
331 $1_TRUE='#'
332 $1_FALSE=
333 fi
334 AC_CONFIG_COMMANDS_PRE(
335 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
336 AC_MSG_ERROR([[conditional "$1" was never defined.
337 Usually this means the macro was only invoked conditionally.]])
338 fi])])
340 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
341 # Free Software Foundation, Inc.
342 #
343 # This file is free software; the Free Software Foundation
344 # gives unlimited permission to copy and/or distribute it,
345 # with or without modifications, as long as this notice is preserved.
347 # serial 10
349 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
350 # written in clear, in which case automake, when reading aclocal.m4,
351 # will think it sees a *use*, and therefore will trigger all it's
352 # C support machinery. Also note that it means that autoscan, seeing
353 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
356 # _AM_DEPENDENCIES(NAME)
357 # ----------------------
358 # See how the compiler implements dependency checking.
359 # NAME is "CC", "CXX", "GCJ", or "OBJC".
360 # We try a few techniques and use that to set a single cache variable.
361 #
362 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
363 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
364 # dependency, and given that the user is not expected to run this macro,
365 # just rely on AC_PROG_CC.
366 AC_DEFUN([_AM_DEPENDENCIES],
367 [AC_REQUIRE([AM_SET_DEPDIR])dnl
368 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
369 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
370 AC_REQUIRE([AM_DEP_TRACK])dnl
372 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
373 [$1], CXX, [depcc="$CXX" am_compiler_list=],
374 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
375 [$1], UPC, [depcc="$UPC" am_compiler_list=],
376 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
377 [depcc="$$1" am_compiler_list=])
379 AC_CACHE_CHECK([dependency style of $depcc],
380 [am_cv_$1_dependencies_compiler_type],
381 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
382 # We make a subdir and do the tests there. Otherwise we can end up
383 # making bogus files that we don't know about and never remove. For
384 # instance it was reported that on HP-UX the gcc test will end up
385 # making a dummy file named `D' -- because `-MD' means `put the output
386 # in D'.
387 mkdir conftest.dir
388 # Copy depcomp to subdir because otherwise we won't find it if we're
389 # using a relative directory.
390 cp "$am_depcomp" conftest.dir
391 cd conftest.dir
392 # We will build objects and dependencies in a subdirectory because
393 # it helps to detect inapplicable dependency modes. For instance
394 # both Tru64's cc and ICC support -MD to output dependencies as a
395 # side effect of compilation, but ICC will put the dependencies in
396 # the current directory while Tru64 will put them in the object
397 # directory.
398 mkdir sub
400 am_cv_$1_dependencies_compiler_type=none
401 if test "$am_compiler_list" = ""; then
402 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
403 fi
404 am__universal=false
405 m4_case([$1], [CC],
406 [case " $depcc " in #(
407 *\ -arch\ *\ -arch\ *) am__universal=true ;;
408 esac],
409 [CXX],
410 [case " $depcc " in #(
411 *\ -arch\ *\ -arch\ *) am__universal=true ;;
412 esac])
414 for depmode in $am_compiler_list; do
415 # Setup a source with many dependencies, because some compilers
416 # like to wrap large dependency lists on column 80 (with \), and
417 # we should not choose a depcomp mode which is confused by this.
418 #
419 # We need to recreate these files for each test, as the compiler may
420 # overwrite some of them when testing with obscure command lines.
421 # This happens at least with the AIX C compiler.
422 : > sub/conftest.c
423 for i in 1 2 3 4 5 6; do
424 echo '#include "conftst'$i'.h"' >> sub/conftest.c
425 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
426 # Solaris 8's {/usr,}/bin/sh.
427 touch sub/conftst$i.h
428 done
429 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
431 # We check with `-c' and `-o' for the sake of the "dashmstdout"
432 # mode. It turns out that the SunPro C++ compiler does not properly
433 # handle `-M -o', and we need to detect this. Also, some Intel
434 # versions had trouble with output in subdirs
435 am__obj=sub/conftest.${OBJEXT-o}
436 am__minus_obj="-o $am__obj"
437 case $depmode in
438 gcc)
439 # This depmode causes a compiler race in universal mode.
440 test "$am__universal" = false || continue
441 ;;
442 nosideeffect)
443 # after this tag, mechanisms are not by side-effect, so they'll
444 # only be used when explicitly requested
445 if test "x$enable_dependency_tracking" = xyes; then
446 continue
447 else
448 break
449 fi
450 ;;
451 msvisualcpp | msvcmsys)
452 # This compiler won't grok `-c -o', but also, the minuso test has
453 # not run yet. These depmodes are late enough in the game, and
454 # so weak that their functioning should not be impacted.
455 am__obj=conftest.${OBJEXT-o}
456 am__minus_obj=
457 ;;
458 none) break ;;
459 esac
460 if depmode=$depmode \
461 source=sub/conftest.c object=$am__obj \
462 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
463 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
464 >/dev/null 2>conftest.err &&
465 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
466 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
467 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
468 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
469 # icc doesn't choke on unknown options, it will just issue warnings
470 # or remarks (even with -Werror). So we grep stderr for any message
471 # that says an option was ignored or not supported.
472 # When given -MP, icc 7.0 and 7.1 complain thusly:
473 # icc: Command line warning: ignoring option '-M'; no argument required
474 # The diagnosis changed in icc 8.0:
475 # icc: Command line remark: option '-MP' not supported
476 if (grep 'ignoring option' conftest.err ||
477 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
478 am_cv_$1_dependencies_compiler_type=$depmode
479 break
480 fi
481 fi
482 done
484 cd ..
485 rm -rf conftest.dir
486 else
487 am_cv_$1_dependencies_compiler_type=none
488 fi
489 ])
490 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
491 AM_CONDITIONAL([am__fastdep$1], [
492 test "x$enable_dependency_tracking" != xno \
493 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
494 ])
497 # AM_SET_DEPDIR
498 # -------------
499 # Choose a directory name for dependency files.
500 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
501 AC_DEFUN([AM_SET_DEPDIR],
502 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
503 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
504 ])
507 # AM_DEP_TRACK
508 # ------------
509 AC_DEFUN([AM_DEP_TRACK],
510 [AC_ARG_ENABLE(dependency-tracking,
511 [ --disable-dependency-tracking speeds up one-time build
512 --enable-dependency-tracking do not reject slow dependency extractors])
513 if test "x$enable_dependency_tracking" != xno; then
514 am_depcomp="$ac_aux_dir/depcomp"
515 AMDEPBACKSLASH='\'
516 fi
517 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
518 AC_SUBST([AMDEPBACKSLASH])dnl
519 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
520 ])
522 # Generate code to set up dependency tracking. -*- Autoconf -*-
524 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
525 # Free Software Foundation, Inc.
526 #
527 # This file is free software; the Free Software Foundation
528 # gives unlimited permission to copy and/or distribute it,
529 # with or without modifications, as long as this notice is preserved.
531 #serial 5
533 # _AM_OUTPUT_DEPENDENCY_COMMANDS
534 # ------------------------------
535 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
536 [{
537 # Autoconf 2.62 quotes --file arguments for eval, but not when files
538 # are listed without --file. Let's play safe and only enable the eval
539 # if we detect the quoting.
540 case $CONFIG_FILES in
541 *\'*) eval set x "$CONFIG_FILES" ;;
542 *) set x $CONFIG_FILES ;;
543 esac
544 shift
545 for mf
546 do
547 # Strip MF so we end up with the name of the file.
548 mf=`echo "$mf" | sed -e 's/:.*$//'`
549 # Check whether this is an Automake generated Makefile or not.
550 # We used to match only the files named `Makefile.in', but
551 # some people rename them; so instead we look at the file content.
552 # Grep'ing the first line is not enough: some people post-process
553 # each Makefile.in and add a new line on top of each file to say so.
554 # Grep'ing the whole file is not good either: AIX grep has a line
555 # limit of 2048, but all sed's we know have understand at least 4000.
556 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
557 dirpart=`AS_DIRNAME("$mf")`
558 else
559 continue
560 fi
561 # Extract the definition of DEPDIR, am__include, and am__quote
562 # from the Makefile without running `make'.
563 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
564 test -z "$DEPDIR" && continue
565 am__include=`sed -n 's/^am__include = //p' < "$mf"`
566 test -z "am__include" && continue
567 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
568 # When using ansi2knr, U may be empty or an underscore; expand it
569 U=`sed -n 's/^U = //p' < "$mf"`
570 # Find all dependency output files, they are included files with
571 # $(DEPDIR) in their names. We invoke sed twice because it is the
572 # simplest approach to changing $(DEPDIR) to its actual value in the
573 # expansion.
574 for file in `sed -n "
575 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
576 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
577 # Make sure the directory exists.
578 test -f "$dirpart/$file" && continue
579 fdir=`AS_DIRNAME(["$file"])`
580 AS_MKDIR_P([$dirpart/$fdir])
581 # echo "creating $dirpart/$file"
582 echo '# dummy' > "$dirpart/$file"
583 done
584 done
585 }
586 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
589 # AM_OUTPUT_DEPENDENCY_COMMANDS
590 # -----------------------------
591 # This macro should only be invoked once -- use via AC_REQUIRE.
592 #
593 # This code is only required when automatic dependency tracking
594 # is enabled. FIXME. This creates each `.P' file that we will
595 # need in order to bootstrap the dependency handling code.
596 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
597 [AC_CONFIG_COMMANDS([depfiles],
598 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
599 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
600 ])
602 # Do all the work for Automake. -*- Autoconf -*-
604 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
605 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
606 #
607 # This file is free software; the Free Software Foundation
608 # gives unlimited permission to copy and/or distribute it,
609 # with or without modifications, as long as this notice is preserved.
611 # serial 16
613 # This macro actually does too much. Some checks are only needed if
614 # your package does certain things. But this isn't really a big deal.
616 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
617 # AM_INIT_AUTOMAKE([OPTIONS])
618 # -----------------------------------------------
619 # The call with PACKAGE and VERSION arguments is the old style
620 # call (pre autoconf-2.50), which is being phased out. PACKAGE
621 # and VERSION should now be passed to AC_INIT and removed from
622 # the call to AM_INIT_AUTOMAKE.
623 # We support both call styles for the transition. After
624 # the next Automake release, Autoconf can make the AC_INIT
625 # arguments mandatory, and then we can depend on a new Autoconf
626 # release and drop the old call support.
627 AC_DEFUN([AM_INIT_AUTOMAKE],
628 [AC_PREREQ([2.62])dnl
629 dnl Autoconf wants to disallow AM_ names. We explicitly allow
630 dnl the ones we care about.
631 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
632 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
633 AC_REQUIRE([AC_PROG_INSTALL])dnl
634 if test "`cd $srcdir && pwd`" != "`pwd`"; then
635 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
636 # is not polluted with repeated "-I."
637 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
638 # test to see if srcdir already configured
639 if test -f $srcdir/config.status; then
640 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
641 fi
642 fi
644 # test whether we have cygpath
645 if test -z "$CYGPATH_W"; then
646 if (cygpath --version) >/dev/null 2>/dev/null; then
647 CYGPATH_W='cygpath -w'
648 else
649 CYGPATH_W=echo
650 fi
651 fi
652 AC_SUBST([CYGPATH_W])
654 # Define the identity of the package.
655 dnl Distinguish between old-style and new-style calls.
656 m4_ifval([$2],
657 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
658 AC_SUBST([PACKAGE], [$1])dnl
659 AC_SUBST([VERSION], [$2])],
660 [_AM_SET_OPTIONS([$1])dnl
661 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
662 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
663 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
664 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
665 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
667 _AM_IF_OPTION([no-define],,
668 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
669 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
671 # Some tools Automake needs.
672 AC_REQUIRE([AM_SANITY_CHECK])dnl
673 AC_REQUIRE([AC_ARG_PROGRAM])dnl
674 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
675 AM_MISSING_PROG(AUTOCONF, autoconf)
676 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
677 AM_MISSING_PROG(AUTOHEADER, autoheader)
678 AM_MISSING_PROG(MAKEINFO, makeinfo)
679 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
680 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
681 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
682 # We need awk for the "check" target. The system "awk" is bad on
683 # some platforms.
684 AC_REQUIRE([AC_PROG_AWK])dnl
685 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
686 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
687 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
688 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
689 [_AM_PROG_TAR([v7])])])
690 _AM_IF_OPTION([no-dependencies],,
691 [AC_PROVIDE_IFELSE([AC_PROG_CC],
692 [_AM_DEPENDENCIES(CC)],
693 [define([AC_PROG_CC],
694 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
695 AC_PROVIDE_IFELSE([AC_PROG_CXX],
696 [_AM_DEPENDENCIES(CXX)],
697 [define([AC_PROG_CXX],
698 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
699 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
700 [_AM_DEPENDENCIES(OBJC)],
701 [define([AC_PROG_OBJC],
702 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
703 ])
704 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
705 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
706 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
707 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
708 AC_CONFIG_COMMANDS_PRE(dnl
709 [m4_provide_if([_AM_COMPILER_EXEEXT],
710 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
711 ])
713 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
714 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
715 dnl mangled by Autoconf and run in a shell conditional statement.
716 m4_define([_AC_COMPILER_EXEEXT],
717 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
720 # When config.status generates a header, we must update the stamp-h file.
721 # This file resides in the same directory as the config header
722 # that is generated. The stamp files are numbered to have different names.
724 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
725 # loop where config.status creates the headers, so we can generate
726 # our stamp files there.
727 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
728 [# Compute $1's index in $config_headers.
729 _am_arg=$1
730 _am_stamp_count=1
731 for _am_header in $config_headers :; do
732 case $_am_header in
733 $_am_arg | $_am_arg:* )
734 break ;;
735 * )
736 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
737 esac
738 done
739 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
741 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
742 #
743 # This file is free software; the Free Software Foundation
744 # gives unlimited permission to copy and/or distribute it,
745 # with or without modifications, as long as this notice is preserved.
747 # AM_PROG_INSTALL_SH
748 # ------------------
749 # Define $install_sh.
750 AC_DEFUN([AM_PROG_INSTALL_SH],
751 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
752 if test x"${install_sh}" != xset; then
753 case $am_aux_dir in
754 *\ * | *\ *)
755 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
756 *)
757 install_sh="\${SHELL} $am_aux_dir/install-sh"
758 esac
759 fi
760 AC_SUBST(install_sh)])
762 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
763 #
764 # This file is free software; the Free Software Foundation
765 # gives unlimited permission to copy and/or distribute it,
766 # with or without modifications, as long as this notice is preserved.
768 # serial 2
770 # Check whether the underlying file-system supports filenames
771 # with a leading dot. For instance MS-DOS doesn't.
772 AC_DEFUN([AM_SET_LEADING_DOT],
773 [rm -rf .tst 2>/dev/null
774 mkdir .tst 2>/dev/null
775 if test -d .tst; then
776 am__leading_dot=.
777 else
778 am__leading_dot=_
779 fi
780 rmdir .tst 2>/dev/null
781 AC_SUBST([am__leading_dot])])
783 # Check to see how 'make' treats includes. -*- Autoconf -*-
785 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
786 #
787 # This file is free software; the Free Software Foundation
788 # gives unlimited permission to copy and/or distribute it,
789 # with or without modifications, as long as this notice is preserved.
791 # serial 4
793 # AM_MAKE_INCLUDE()
794 # -----------------
795 # Check to see how make treats includes.
796 AC_DEFUN([AM_MAKE_INCLUDE],
797 [am_make=${MAKE-make}
798 cat > confinc << 'END'
799 am__doit:
800 @echo this is the am__doit target
801 .PHONY: am__doit
802 END
803 # If we don't find an include directive, just comment out the code.
804 AC_MSG_CHECKING([for style of include used by $am_make])
805 am__include="#"
806 am__quote=
807 _am_result=none
808 # First try GNU make style include.
809 echo "include confinc" > confmf
810 # Ignore all kinds of additional output from `make'.
811 case `$am_make -s -f confmf 2> /dev/null` in #(
812 *the\ am__doit\ target*)
813 am__include=include
814 am__quote=
815 _am_result=GNU
816 ;;
817 esac
818 # Now try BSD make style include.
819 if test "$am__include" = "#"; then
820 echo '.include "confinc"' > confmf
821 case `$am_make -s -f confmf 2> /dev/null` in #(
822 *the\ am__doit\ target*)
823 am__include=.include
824 am__quote="\""
825 _am_result=BSD
826 ;;
827 esac
828 fi
829 AC_SUBST([am__include])
830 AC_SUBST([am__quote])
831 AC_MSG_RESULT([$_am_result])
832 rm -f confinc confmf
833 ])
835 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
836 # Free Software Foundation, Inc.
837 #
838 # This file is free software; the Free Software Foundation
839 # gives unlimited permission to copy and/or distribute it,
840 # with or without modifications, as long as this notice is preserved.
842 # serial 6
844 # AM_PROG_CC_C_O
845 # --------------
846 # Like AC_PROG_CC_C_O, but changed for automake.
847 AC_DEFUN([AM_PROG_CC_C_O],
848 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
849 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
850 AC_REQUIRE_AUX_FILE([compile])dnl
851 # FIXME: we rely on the cache variable name because
852 # there is no other way.
853 set dummy $CC
854 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
855 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
856 if test "$am_t" != yes; then
857 # Losing compiler, so override with the script.
858 # FIXME: It is wrong to rewrite CC.
859 # But if we don't then we get into trouble of one sort or another.
860 # A longer-term fix would be to have automake use am__CC in this case,
861 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
862 CC="$am_aux_dir/compile $CC"
863 fi
864 dnl Make sure AC_PROG_CC is never called again, or it will override our
865 dnl setting of CC.
866 m4_define([AC_PROG_CC],
867 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
868 ])
870 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
872 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
873 # Free Software Foundation, Inc.
874 #
875 # This file is free software; the Free Software Foundation
876 # gives unlimited permission to copy and/or distribute it,
877 # with or without modifications, as long as this notice is preserved.
879 # serial 6
881 # AM_MISSING_PROG(NAME, PROGRAM)
882 # ------------------------------
883 AC_DEFUN([AM_MISSING_PROG],
884 [AC_REQUIRE([AM_MISSING_HAS_RUN])
885 $1=${$1-"${am_missing_run}$2"}
886 AC_SUBST($1)])
889 # AM_MISSING_HAS_RUN
890 # ------------------
891 # Define MISSING if not defined so far and test if it supports --run.
892 # If it does, set am_missing_run to use it, otherwise, to nothing.
893 AC_DEFUN([AM_MISSING_HAS_RUN],
894 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
895 AC_REQUIRE_AUX_FILE([missing])dnl
896 if test x"${MISSING+set}" != xset; then
897 case $am_aux_dir in
898 *\ * | *\ *)
899 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
900 *)
901 MISSING="\${SHELL} $am_aux_dir/missing" ;;
902 esac
903 fi
904 # Use eval to expand $SHELL
905 if eval "$MISSING --run true"; then
906 am_missing_run="$MISSING --run "
907 else
908 am_missing_run=
909 AC_MSG_WARN([`missing' script is too old or missing])
910 fi
911 ])
913 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
914 #
915 # This file is free software; the Free Software Foundation
916 # gives unlimited permission to copy and/or distribute it,
917 # with or without modifications, as long as this notice is preserved.
919 # AM_PROG_MKDIR_P
920 # ---------------
921 # Check for `mkdir -p'.
922 AC_DEFUN([AM_PROG_MKDIR_P],
923 [AC_PREREQ([2.60])dnl
924 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
925 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
926 dnl while keeping a definition of mkdir_p for backward compatibility.
927 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
928 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
929 dnl Makefile.ins that do not define MKDIR_P, so we do our own
930 dnl adjustment using top_builddir (which is defined more often than
931 dnl MKDIR_P).
932 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
933 case $mkdir_p in
934 [[\\/$]]* | ?:[[\\/]]*) ;;
935 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
936 esac
937 ])
939 # Helper functions for option handling. -*- Autoconf -*-
941 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
942 #
943 # This file is free software; the Free Software Foundation
944 # gives unlimited permission to copy and/or distribute it,
945 # with or without modifications, as long as this notice is preserved.
947 # serial 4
949 # _AM_MANGLE_OPTION(NAME)
950 # -----------------------
951 AC_DEFUN([_AM_MANGLE_OPTION],
952 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
954 # _AM_SET_OPTION(NAME)
955 # ------------------------------
956 # Set option NAME. Presently that only means defining a flag for this option.
957 AC_DEFUN([_AM_SET_OPTION],
958 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
960 # _AM_SET_OPTIONS(OPTIONS)
961 # ----------------------------------
962 # OPTIONS is a space-separated list of Automake options.
963 AC_DEFUN([_AM_SET_OPTIONS],
964 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
966 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
967 # -------------------------------------------
968 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
969 AC_DEFUN([_AM_IF_OPTION],
970 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
972 # Check to make sure that the build environment is sane. -*- Autoconf -*-
974 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
975 # Free Software Foundation, Inc.
976 #
977 # This file is free software; the Free Software Foundation
978 # gives unlimited permission to copy and/or distribute it,
979 # with or without modifications, as long as this notice is preserved.
981 # serial 5
983 # AM_SANITY_CHECK
984 # ---------------
985 AC_DEFUN([AM_SANITY_CHECK],
986 [AC_MSG_CHECKING([whether build environment is sane])
987 # Just in case
988 sleep 1
989 echo timestamp > conftest.file
990 # Reject unsafe characters in $srcdir or the absolute working directory
991 # name. Accept space and tab only in the latter.
992 am_lf='
993 '
994 case `pwd` in
995 *[[\\\"\#\$\&\'\`$am_lf]]*)
996 AC_MSG_ERROR([unsafe absolute working directory name]);;
997 esac
998 case $srcdir in
999 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1000 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1001 esac
1003 # Do `set' in a subshell so we don't clobber the current shell's
1004 # arguments. Must try -L first in case configure is actually a
1005 # symlink; some systems play weird games with the mod time of symlinks
1006 # (eg FreeBSD returns the mod time of the symlink's containing
1007 # directory).
1008 if (
1009 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1010 if test "$[*]" = "X"; then
1011 # -L didn't work.
1012 set X `ls -t "$srcdir/configure" conftest.file`
1013 fi
1014 rm -f conftest.file
1015 if test "$[*]" != "X $srcdir/configure conftest.file" \
1016 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1018 # If neither matched, then we have a broken ls. This can happen
1019 # if, for instance, CONFIG_SHELL is bash and it inherits a
1020 # broken ls alias from the environment. This has actually
1021 # happened. Such a system could not be considered "sane".
1022 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1023 alias in your environment])
1024 fi
1026 test "$[2]" = conftest.file
1027 )
1028 then
1029 # Ok.
1030 :
1031 else
1032 AC_MSG_ERROR([newly created file is older than distributed files!
1033 Check your system clock])
1034 fi
1035 AC_MSG_RESULT(yes)])
1037 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1038 #
1039 # This file is free software; the Free Software Foundation
1040 # gives unlimited permission to copy and/or distribute it,
1041 # with or without modifications, as long as this notice is preserved.
1043 # AM_PROG_INSTALL_STRIP
1044 # ---------------------
1045 # One issue with vendor `install' (even GNU) is that you can't
1046 # specify the program used to strip binaries. This is especially
1047 # annoying in cross-compiling environments, where the build's strip
1048 # is unlikely to handle the host's binaries.
1049 # Fortunately install-sh will honor a STRIPPROG variable, so we
1050 # always use install-sh in `make install-strip', and initialize
1051 # STRIPPROG with the value of the STRIP variable (set by the user).
1052 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1053 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1054 # Installed binaries are usually stripped using `strip' when the user
1055 # run `make install-strip'. However `strip' might not be the right
1056 # tool to use in cross-compilation environments, therefore Automake
1057 # will honor the `STRIP' environment variable to overrule this program.
1058 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1059 if test "$cross_compiling" != no; then
1060 AC_CHECK_TOOL([STRIP], [strip], :)
1061 fi
1062 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1063 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1065 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1066 #
1067 # This file is free software; the Free Software Foundation
1068 # gives unlimited permission to copy and/or distribute it,
1069 # with or without modifications, as long as this notice is preserved.
1071 # serial 2
1073 # _AM_SUBST_NOTMAKE(VARIABLE)
1074 # ---------------------------
1075 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1076 # This macro is traced by Automake.
1077 AC_DEFUN([_AM_SUBST_NOTMAKE])
1079 # AM_SUBST_NOTMAKE(VARIABLE)
1080 # ---------------------------
1081 # Public sister of _AM_SUBST_NOTMAKE.
1082 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1084 # Check how to create a tarball. -*- Autoconf -*-
1086 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1087 #
1088 # This file is free software; the Free Software Foundation
1089 # gives unlimited permission to copy and/or distribute it,
1090 # with or without modifications, as long as this notice is preserved.
1092 # serial 2
1094 # _AM_PROG_TAR(FORMAT)
1095 # --------------------
1096 # Check how to create a tarball in format FORMAT.
1097 # FORMAT should be one of `v7', `ustar', or `pax'.
1098 #
1099 # Substitute a variable $(am__tar) that is a command
1100 # writing to stdout a FORMAT-tarball containing the directory
1101 # $tardir.
1102 # tardir=directory && $(am__tar) > result.tar
1103 #
1104 # Substitute a variable $(am__untar) that extract such
1105 # a tarball read from stdin.
1106 # $(am__untar) < result.tar
1107 AC_DEFUN([_AM_PROG_TAR],
1108 [# Always define AMTAR for backward compatibility.
1109 AM_MISSING_PROG([AMTAR], [tar])
1110 m4_if([$1], [v7],
1111 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1112 [m4_case([$1], [ustar],, [pax],,
1113 [m4_fatal([Unknown tar format])])
1114 AC_MSG_CHECKING([how to create a $1 tar archive])
1115 # Loop over all known methods to create a tar archive until one works.
1116 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1117 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1118 # Do not fold the above two line into one, because Tru64 sh and
1119 # Solaris sh will not grok spaces in the rhs of `-'.
1120 for _am_tool in $_am_tools
1121 do
1122 case $_am_tool in
1123 gnutar)
1124 for _am_tar in tar gnutar gtar;
1125 do
1126 AM_RUN_LOG([$_am_tar --version]) && break
1127 done
1128 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1129 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1130 am__untar="$_am_tar -xf -"
1131 ;;
1132 plaintar)
1133 # Must skip GNU tar: if it does not support --format= it doesn't create
1134 # ustar tarball either.
1135 (tar --version) >/dev/null 2>&1 && continue
1136 am__tar='tar chf - "$$tardir"'
1137 am__tar_='tar chf - "$tardir"'
1138 am__untar='tar xf -'
1139 ;;
1140 pax)
1141 am__tar='pax -L -x $1 -w "$$tardir"'
1142 am__tar_='pax -L -x $1 -w "$tardir"'
1143 am__untar='pax -r'
1144 ;;
1145 cpio)
1146 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1147 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1148 am__untar='cpio -i -H $1 -d'
1149 ;;
1150 none)
1151 am__tar=false
1152 am__tar_=false
1153 am__untar=false
1154 ;;
1155 esac
1157 # If the value was cached, stop now. We just wanted to have am__tar
1158 # and am__untar set.
1159 test -n "${am_cv_prog_tar_$1}" && break
1161 # tar/untar a dummy directory, and stop if the command works
1162 rm -rf conftest.dir
1163 mkdir conftest.dir
1164 echo GrepMe > conftest.dir/file
1165 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1166 rm -rf conftest.dir
1167 if test -s conftest.tar; then
1168 AM_RUN_LOG([$am__untar <conftest.tar])
1169 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1170 fi
1171 done
1172 rm -rf conftest.dir
1174 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1175 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1176 AC_SUBST([am__tar])
1177 AC_SUBST([am__untar])
1178 ]) # _AM_PROG_TAR
