Imported Upstream version 2.27.0
[platform/upstream/pygobject2.git] / aclocal.m4
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
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.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],,
17 [m4_warning([this file was generated for autoconf 2.66.
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'.])])
21
22 # Configure paths for GLIB
23 # Owen Taylor     1997-2001
24
25 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
26 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
27 dnl gthread, or gio is specified in MODULES, pass to pkg-config
28 dnl
29 AC_DEFUN([AM_PATH_GLIB_2_0],
30 [dnl 
31 dnl Get the cflags and libraries from pkg-config
32 dnl
33 AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
34                     , enable_glibtest=yes)
35
36   pkg_config_args=glib-2.0
37   for module in . $4
38   do
39       case "$module" in
40          gmodule) 
41              pkg_config_args="$pkg_config_args gmodule-2.0"
42          ;;
43          gmodule-no-export) 
44              pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
45          ;;
46          gobject) 
47              pkg_config_args="$pkg_config_args gobject-2.0"
48          ;;
49          gthread) 
50              pkg_config_args="$pkg_config_args gthread-2.0"
51          ;;
52          gio*) 
53              pkg_config_args="$pkg_config_args $module-2.0"
54          ;;
55       esac
56   done
57
58   PKG_PROG_PKG_CONFIG([0.16])
59
60   no_glib=""
61
62   if test "x$PKG_CONFIG" = x ; then
63     no_glib=yes
64     PKG_CONFIG=no
65   fi
66
67   min_glib_version=ifelse([$1], ,2.0.0,$1)
68   AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
69
70   if test x$PKG_CONFIG != xno ; then
71     ## don't try to run the test against uninstalled libtool libs
72     if $PKG_CONFIG --uninstalled $pkg_config_args; then
73           echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
74           enable_glibtest=no
75     fi
76
77     if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
78           :
79     else
80           no_glib=yes
81     fi
82   fi
83
84   if test x"$no_glib" = x ; then
85     GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
86     GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
87     GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
88
89     GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
90     GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
91     glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
92            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
93     glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
94            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
95     glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
96            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
97     if test "x$enable_glibtest" = "xyes" ; then
98       ac_save_CFLAGS="$CFLAGS"
99       ac_save_LIBS="$LIBS"
100       CFLAGS="$CFLAGS $GLIB_CFLAGS"
101       LIBS="$GLIB_LIBS $LIBS"
102 dnl
103 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
104 dnl checks the results of pkg-config to some extent)
105 dnl
106       rm -f conf.glibtest
107       AC_TRY_RUN([
108 #include <glib.h>
109 #include <stdio.h>
110 #include <stdlib.h>
111
112 int 
113 main ()
114 {
115   int major, minor, micro;
116   char *tmp_version;
117
118   fclose (fopen ("conf.glibtest", "w"));
119
120   /* HP/UX 9 (%@#!) writes to sscanf strings */
121   tmp_version = g_strdup("$min_glib_version");
122   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
123      printf("%s, bad version string\n", "$min_glib_version");
124      exit(1);
125    }
126
127   if ((glib_major_version != $glib_config_major_version) ||
128       (glib_minor_version != $glib_config_minor_version) ||
129       (glib_micro_version != $glib_config_micro_version))
130     {
131       printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
132              $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
133              glib_major_version, glib_minor_version, glib_micro_version);
134       printf ("*** was found! If pkg-config was correct, then it is best\n");
135       printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
136       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
137       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
138       printf("*** required on your system.\n");
139       printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
140       printf("*** to point to the correct configuration files\n");
141     } 
142   else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
143            (glib_minor_version != GLIB_MINOR_VERSION) ||
144            (glib_micro_version != GLIB_MICRO_VERSION))
145     {
146       printf("*** GLIB header files (version %d.%d.%d) do not match\n",
147              GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
148       printf("*** library (version %d.%d.%d)\n",
149              glib_major_version, glib_minor_version, glib_micro_version);
150     }
151   else
152     {
153       if ((glib_major_version > major) ||
154         ((glib_major_version == major) && (glib_minor_version > minor)) ||
155         ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
156       {
157         return 0;
158        }
159      else
160       {
161         printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
162                glib_major_version, glib_minor_version, glib_micro_version);
163         printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
164                major, minor, micro);
165         printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
166         printf("***\n");
167         printf("*** If you have already installed a sufficiently new version, this error\n");
168         printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
169         printf("*** being found. The easiest way to fix this is to remove the old version\n");
170         printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
171         printf("*** correct copy of pkg-config. (In this case, you will have to\n");
172         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
173         printf("*** so that the correct libraries are found at run-time))\n");
174       }
175     }
176   return 1;
177 }
178 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
179        CFLAGS="$ac_save_CFLAGS"
180        LIBS="$ac_save_LIBS"
181      fi
182   fi
183   if test "x$no_glib" = x ; then
184      AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
185      ifelse([$2], , :, [$2])     
186   else
187      AC_MSG_RESULT(no)
188      if test "$PKG_CONFIG" = "no" ; then
189        echo "*** A new enough version of pkg-config was not found."
190        echo "*** See http://www.freedesktop.org/software/pkgconfig/"
191      else
192        if test -f conf.glibtest ; then
193         :
194        else
195           echo "*** Could not run GLIB test program, checking why..."
196           ac_save_CFLAGS="$CFLAGS"
197           ac_save_LIBS="$LIBS"
198           CFLAGS="$CFLAGS $GLIB_CFLAGS"
199           LIBS="$LIBS $GLIB_LIBS"
200           AC_TRY_LINK([
201 #include <glib.h>
202 #include <stdio.h>
203 ],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
204         [ echo "*** The test program compiled, but did not run. This usually means"
205           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
206           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
207           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
208           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
209           echo "*** is required on your system"
210           echo "***"
211           echo "*** If you have an old version installed, it is best to remove it, although"
212           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
213         [ echo "*** The test program failed to compile or link. See the file config.log for the"
214           echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
215           CFLAGS="$ac_save_CFLAGS"
216           LIBS="$ac_save_LIBS"
217        fi
218      fi
219      GLIB_CFLAGS=""
220      GLIB_LIBS=""
221      GLIB_GENMARSHAL=""
222      GOBJECT_QUERY=""
223      GLIB_MKENUMS=""
224      ifelse([$3], , :, [$3])
225   fi
226   AC_SUBST(GLIB_CFLAGS)
227   AC_SUBST(GLIB_LIBS)
228   AC_SUBST(GLIB_GENMARSHAL)
229   AC_SUBST(GOBJECT_QUERY)
230   AC_SUBST(GLIB_MKENUMS)
231   rm -f conf.glibtest
232 ])
233
234 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
235 # serial 1 (pkg-config-0.24)
236
237 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
238 #
239 # This program is free software; you can redistribute it and/or modify
240 # it under the terms of the GNU General Public License as published by
241 # the Free Software Foundation; either version 2 of the License, or
242 # (at your option) any later version.
243 #
244 # This program is distributed in the hope that it will be useful, but
245 # WITHOUT ANY WARRANTY; without even the implied warranty of
246 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
247 # General Public License for more details.
248 #
249 # You should have received a copy of the GNU General Public License
250 # along with this program; if not, write to the Free Software
251 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
252 #
253 # As a special exception to the GNU General Public License, if you
254 # distribute this file as part of a program that contains a
255 # configuration script generated by Autoconf, you may include it under
256 # the same distribution terms that you use for the rest of that program.
257
258 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
259 # ----------------------------------
260 AC_DEFUN([PKG_PROG_PKG_CONFIG],
261 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
262 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
263 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
264 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
265 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
266
267 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
268         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
269 fi
270 if test -n "$PKG_CONFIG"; then
271         _pkg_min_version=m4_default([$1], [0.9.0])
272         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
273         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
274                 AC_MSG_RESULT([yes])
275         else
276                 AC_MSG_RESULT([no])
277                 PKG_CONFIG=""
278         fi
279 fi[]dnl
280 ])# PKG_PROG_PKG_CONFIG
281
282 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
283 #
284 # Check to see whether a particular set of modules exists.  Similar
285 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
286 #
287 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
288 # only at the first occurence in configure.ac, so if the first place
289 # it's called might be skipped (such as if it is within an "if", you
290 # have to call PKG_CHECK_EXISTS manually
291 # --------------------------------------------------------------
292 AC_DEFUN([PKG_CHECK_EXISTS],
293 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
294 if test -n "$PKG_CONFIG" && \
295     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
296   m4_default([$2], [:])
297 m4_ifvaln([$3], [else
298   $3])dnl
299 fi])
300
301 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
302 # ---------------------------------------------
303 m4_define([_PKG_CONFIG],
304 [if test -n "$$1"; then
305     pkg_cv_[]$1="$$1"
306  elif test -n "$PKG_CONFIG"; then
307     PKG_CHECK_EXISTS([$3],
308                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
309                      [pkg_failed=yes])
310  else
311     pkg_failed=untried
312 fi[]dnl
313 ])# _PKG_CONFIG
314
315 # _PKG_SHORT_ERRORS_SUPPORTED
316 # -----------------------------
317 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
318 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
319 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
320         _pkg_short_errors_supported=yes
321 else
322         _pkg_short_errors_supported=no
323 fi[]dnl
324 ])# _PKG_SHORT_ERRORS_SUPPORTED
325
326
327 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
328 # [ACTION-IF-NOT-FOUND])
329 #
330 #
331 # Note that if there is a possibility the first call to
332 # PKG_CHECK_MODULES might not happen, you should be sure to include an
333 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
334 #
335 #
336 # --------------------------------------------------------------
337 AC_DEFUN([PKG_CHECK_MODULES],
338 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
339 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
340 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
341
342 pkg_failed=no
343 AC_MSG_CHECKING([for $1])
344
345 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
346 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
347
348 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
349 and $1[]_LIBS to avoid the need to call pkg-config.
350 See the pkg-config man page for more details.])
351
352 if test $pkg_failed = yes; then
353         AC_MSG_RESULT([no])
354         _PKG_SHORT_ERRORS_SUPPORTED
355         if test $_pkg_short_errors_supported = yes; then
356                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
357         else 
358                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
359         fi
360         # Put the nasty error message in config.log where it belongs
361         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
362
363         m4_default([$4], [AC_MSG_ERROR(
364 [Package requirements ($2) were not met:
365
366 $$1_PKG_ERRORS
367
368 Consider adjusting the PKG_CONFIG_PATH environment variable if you
369 installed software in a non-standard prefix.
370
371 _PKG_TEXT])
372         ])
373 elif test $pkg_failed = untried; then
374         AC_MSG_RESULT([no])
375         m4_default([$4], [AC_MSG_FAILURE(
376 [The pkg-config script could not be found or is too old.  Make sure it
377 is in your PATH or set the PKG_CONFIG environment variable to the full
378 path to pkg-config.
379
380 _PKG_TEXT
381
382 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
383         ])
384 else
385         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
386         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
387         AC_MSG_RESULT([yes])
388         $3
389 fi[]dnl
390 ])# PKG_CHECK_MODULES
391
392 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
393 #
394 # This file is free software; the Free Software Foundation
395 # gives unlimited permission to copy and/or distribute it,
396 # with or without modifications, as long as this notice is preserved.
397
398 # AM_AUTOMAKE_VERSION(VERSION)
399 # ----------------------------
400 # Automake X.Y traces this macro to ensure aclocal.m4 has been
401 # generated from the m4 files accompanying Automake X.Y.
402 # (This private macro should not be called outside this file.)
403 AC_DEFUN([AM_AUTOMAKE_VERSION],
404 [am__api_version='1.11'
405 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
406 dnl require some minimum version.  Point them to the right macro.
407 m4_if([$1], [1.11.1], [],
408       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
409 ])
410
411 # _AM_AUTOCONF_VERSION(VERSION)
412 # -----------------------------
413 # aclocal traces this macro to find the Autoconf version.
414 # This is a private macro too.  Using m4_define simplifies
415 # the logic in aclocal, which can simply ignore this definition.
416 m4_define([_AM_AUTOCONF_VERSION], [])
417
418 # AM_SET_CURRENT_AUTOMAKE_VERSION
419 # -------------------------------
420 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
421 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
422 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
423 [AM_AUTOMAKE_VERSION([1.11.1])dnl
424 m4_ifndef([AC_AUTOCONF_VERSION],
425   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
426 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
427
428 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
429
430 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
431 #
432 # This file is free software; the Free Software Foundation
433 # gives unlimited permission to copy and/or distribute it,
434 # with or without modifications, as long as this notice is preserved.
435
436 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
437 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
438 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
439 #
440 # Of course, Automake must honor this variable whenever it calls a
441 # tool from the auxiliary directory.  The problem is that $srcdir (and
442 # therefore $ac_aux_dir as well) can be either absolute or relative,
443 # depending on how configure is run.  This is pretty annoying, since
444 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
445 # source directory, any form will work fine, but in subdirectories a
446 # relative path needs to be adjusted first.
447 #
448 # $ac_aux_dir/missing
449 #    fails when called from a subdirectory if $ac_aux_dir is relative
450 # $top_srcdir/$ac_aux_dir/missing
451 #    fails if $ac_aux_dir is absolute,
452 #    fails when called from a subdirectory in a VPATH build with
453 #          a relative $ac_aux_dir
454 #
455 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
456 # are both prefixed by $srcdir.  In an in-source build this is usually
457 # harmless because $srcdir is `.', but things will broke when you
458 # start a VPATH build or use an absolute $srcdir.
459 #
460 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
461 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
462 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
463 # and then we would define $MISSING as
464 #   MISSING="\${SHELL} $am_aux_dir/missing"
465 # This will work as long as MISSING is not called from configure, because
466 # unfortunately $(top_srcdir) has no meaning in configure.
467 # However there are other variables, like CC, which are often used in
468 # configure, and could therefore not use this "fixed" $ac_aux_dir.
469 #
470 # Another solution, used here, is to always expand $ac_aux_dir to an
471 # absolute PATH.  The drawback is that using absolute paths prevent a
472 # configured tree to be moved without reconfiguration.
473
474 AC_DEFUN([AM_AUX_DIR_EXPAND],
475 [dnl Rely on autoconf to set up CDPATH properly.
476 AC_PREREQ([2.50])dnl
477 # expand $ac_aux_dir to an absolute path
478 am_aux_dir=`cd $ac_aux_dir && pwd`
479 ])
480
481
482 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
483 # Free Software Foundation, Inc.
484 #
485 # This file is free software; the Free Software Foundation
486 # gives unlimited permission to copy and/or distribute it,
487 # with or without modifications, as long as this notice is preserved.
488
489 # serial 4
490
491 # This was merged into AC_PROG_CC in Autoconf.
492
493 AU_DEFUN([AM_PROG_CC_STDC],
494 [AC_PROG_CC
495 AC_DIAGNOSE([obsolete], [$0:
496         your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
497         `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
498         you adjust the code.  You can also remove the above call to
499         AC_PROG_CC if you already called it elsewhere.])
500 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
501 ])
502 AU_DEFUN([fp_PROG_CC_STDC])
503
504 # AM_CONDITIONAL                                            -*- Autoconf -*-
505
506 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
507 # Free Software Foundation, Inc.
508 #
509 # This file is free software; the Free Software Foundation
510 # gives unlimited permission to copy and/or distribute it,
511 # with or without modifications, as long as this notice is preserved.
512
513 # serial 9
514
515 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
516 # -------------------------------------
517 # Define a conditional.
518 AC_DEFUN([AM_CONDITIONAL],
519 [AC_PREREQ(2.52)dnl
520  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
521         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
522 AC_SUBST([$1_TRUE])dnl
523 AC_SUBST([$1_FALSE])dnl
524 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
525 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
526 m4_define([_AM_COND_VALUE_$1], [$2])dnl
527 if $2; then
528   $1_TRUE=
529   $1_FALSE='#'
530 else
531   $1_TRUE='#'
532   $1_FALSE=
533 fi
534 AC_CONFIG_COMMANDS_PRE(
535 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
536   AC_MSG_ERROR([[conditional "$1" was never defined.
537 Usually this means the macro was only invoked conditionally.]])
538 fi])])
539
540 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
541 # Free Software Foundation, Inc.
542 #
543 # This file is free software; the Free Software Foundation
544 # gives unlimited permission to copy and/or distribute it,
545 # with or without modifications, as long as this notice is preserved.
546
547 # serial 10
548
549 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
550 # written in clear, in which case automake, when reading aclocal.m4,
551 # will think it sees a *use*, and therefore will trigger all it's
552 # C support machinery.  Also note that it means that autoscan, seeing
553 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
554
555
556 # _AM_DEPENDENCIES(NAME)
557 # ----------------------
558 # See how the compiler implements dependency checking.
559 # NAME is "CC", "CXX", "GCJ", or "OBJC".
560 # We try a few techniques and use that to set a single cache variable.
561 #
562 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
563 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
564 # dependency, and given that the user is not expected to run this macro,
565 # just rely on AC_PROG_CC.
566 AC_DEFUN([_AM_DEPENDENCIES],
567 [AC_REQUIRE([AM_SET_DEPDIR])dnl
568 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
569 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
570 AC_REQUIRE([AM_DEP_TRACK])dnl
571
572 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
573        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
574        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
575        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
576        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
577                    [depcc="$$1"   am_compiler_list=])
578
579 AC_CACHE_CHECK([dependency style of $depcc],
580                [am_cv_$1_dependencies_compiler_type],
581 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
582   # We make a subdir and do the tests there.  Otherwise we can end up
583   # making bogus files that we don't know about and never remove.  For
584   # instance it was reported that on HP-UX the gcc test will end up
585   # making a dummy file named `D' -- because `-MD' means `put the output
586   # in D'.
587   mkdir conftest.dir
588   # Copy depcomp to subdir because otherwise we won't find it if we're
589   # using a relative directory.
590   cp "$am_depcomp" conftest.dir
591   cd conftest.dir
592   # We will build objects and dependencies in a subdirectory because
593   # it helps to detect inapplicable dependency modes.  For instance
594   # both Tru64's cc and ICC support -MD to output dependencies as a
595   # side effect of compilation, but ICC will put the dependencies in
596   # the current directory while Tru64 will put them in the object
597   # directory.
598   mkdir sub
599
600   am_cv_$1_dependencies_compiler_type=none
601   if test "$am_compiler_list" = ""; then
602      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
603   fi
604   am__universal=false
605   m4_case([$1], [CC],
606     [case " $depcc " in #(
607      *\ -arch\ *\ -arch\ *) am__universal=true ;;
608      esac],
609     [CXX],
610     [case " $depcc " in #(
611      *\ -arch\ *\ -arch\ *) am__universal=true ;;
612      esac])
613
614   for depmode in $am_compiler_list; do
615     # Setup a source with many dependencies, because some compilers
616     # like to wrap large dependency lists on column 80 (with \), and
617     # we should not choose a depcomp mode which is confused by this.
618     #
619     # We need to recreate these files for each test, as the compiler may
620     # overwrite some of them when testing with obscure command lines.
621     # This happens at least with the AIX C compiler.
622     : > sub/conftest.c
623     for i in 1 2 3 4 5 6; do
624       echo '#include "conftst'$i'.h"' >> sub/conftest.c
625       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
626       # Solaris 8's {/usr,}/bin/sh.
627       touch sub/conftst$i.h
628     done
629     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
630
631     # We check with `-c' and `-o' for the sake of the "dashmstdout"
632     # mode.  It turns out that the SunPro C++ compiler does not properly
633     # handle `-M -o', and we need to detect this.  Also, some Intel
634     # versions had trouble with output in subdirs
635     am__obj=sub/conftest.${OBJEXT-o}
636     am__minus_obj="-o $am__obj"
637     case $depmode in
638     gcc)
639       # This depmode causes a compiler race in universal mode.
640       test "$am__universal" = false || continue
641       ;;
642     nosideeffect)
643       # after this tag, mechanisms are not by side-effect, so they'll
644       # only be used when explicitly requested
645       if test "x$enable_dependency_tracking" = xyes; then
646         continue
647       else
648         break
649       fi
650       ;;
651     msvisualcpp | msvcmsys)
652       # This compiler won't grok `-c -o', but also, the minuso test has
653       # not run yet.  These depmodes are late enough in the game, and
654       # so weak that their functioning should not be impacted.
655       am__obj=conftest.${OBJEXT-o}
656       am__minus_obj=
657       ;;
658     none) break ;;
659     esac
660     if depmode=$depmode \
661        source=sub/conftest.c object=$am__obj \
662        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
663        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
664          >/dev/null 2>conftest.err &&
665        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
666        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
667        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
668        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
669       # icc doesn't choke on unknown options, it will just issue warnings
670       # or remarks (even with -Werror).  So we grep stderr for any message
671       # that says an option was ignored or not supported.
672       # When given -MP, icc 7.0 and 7.1 complain thusly:
673       #   icc: Command line warning: ignoring option '-M'; no argument required
674       # The diagnosis changed in icc 8.0:
675       #   icc: Command line remark: option '-MP' not supported
676       if (grep 'ignoring option' conftest.err ||
677           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
678         am_cv_$1_dependencies_compiler_type=$depmode
679         break
680       fi
681     fi
682   done
683
684   cd ..
685   rm -rf conftest.dir
686 else
687   am_cv_$1_dependencies_compiler_type=none
688 fi
689 ])
690 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
691 AM_CONDITIONAL([am__fastdep$1], [
692   test "x$enable_dependency_tracking" != xno \
693   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
694 ])
695
696
697 # AM_SET_DEPDIR
698 # -------------
699 # Choose a directory name for dependency files.
700 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
701 AC_DEFUN([AM_SET_DEPDIR],
702 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
703 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
704 ])
705
706
707 # AM_DEP_TRACK
708 # ------------
709 AC_DEFUN([AM_DEP_TRACK],
710 [AC_ARG_ENABLE(dependency-tracking,
711 [  --disable-dependency-tracking  speeds up one-time build
712   --enable-dependency-tracking   do not reject slow dependency extractors])
713 if test "x$enable_dependency_tracking" != xno; then
714   am_depcomp="$ac_aux_dir/depcomp"
715   AMDEPBACKSLASH='\'
716 fi
717 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
718 AC_SUBST([AMDEPBACKSLASH])dnl
719 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
720 ])
721
722 # Generate code to set up dependency tracking.              -*- Autoconf -*-
723
724 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
725 # Free Software Foundation, Inc.
726 #
727 # This file is free software; the Free Software Foundation
728 # gives unlimited permission to copy and/or distribute it,
729 # with or without modifications, as long as this notice is preserved.
730
731 #serial 5
732
733 # _AM_OUTPUT_DEPENDENCY_COMMANDS
734 # ------------------------------
735 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
736 [{
737   # Autoconf 2.62 quotes --file arguments for eval, but not when files
738   # are listed without --file.  Let's play safe and only enable the eval
739   # if we detect the quoting.
740   case $CONFIG_FILES in
741   *\'*) eval set x "$CONFIG_FILES" ;;
742   *)   set x $CONFIG_FILES ;;
743   esac
744   shift
745   for mf
746   do
747     # Strip MF so we end up with the name of the file.
748     mf=`echo "$mf" | sed -e 's/:.*$//'`
749     # Check whether this is an Automake generated Makefile or not.
750     # We used to match only the files named `Makefile.in', but
751     # some people rename them; so instead we look at the file content.
752     # Grep'ing the first line is not enough: some people post-process
753     # each Makefile.in and add a new line on top of each file to say so.
754     # Grep'ing the whole file is not good either: AIX grep has a line
755     # limit of 2048, but all sed's we know have understand at least 4000.
756     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
757       dirpart=`AS_DIRNAME("$mf")`
758     else
759       continue
760     fi
761     # Extract the definition of DEPDIR, am__include, and am__quote
762     # from the Makefile without running `make'.
763     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
764     test -z "$DEPDIR" && continue
765     am__include=`sed -n 's/^am__include = //p' < "$mf"`
766     test -z "am__include" && continue
767     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
768     # When using ansi2knr, U may be empty or an underscore; expand it
769     U=`sed -n 's/^U = //p' < "$mf"`
770     # Find all dependency output files, they are included files with
771     # $(DEPDIR) in their names.  We invoke sed twice because it is the
772     # simplest approach to changing $(DEPDIR) to its actual value in the
773     # expansion.
774     for file in `sed -n "
775       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
776          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
777       # Make sure the directory exists.
778       test -f "$dirpart/$file" && continue
779       fdir=`AS_DIRNAME(["$file"])`
780       AS_MKDIR_P([$dirpart/$fdir])
781       # echo "creating $dirpart/$file"
782       echo '# dummy' > "$dirpart/$file"
783     done
784   done
785 }
786 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
787
788
789 # AM_OUTPUT_DEPENDENCY_COMMANDS
790 # -----------------------------
791 # This macro should only be invoked once -- use via AC_REQUIRE.
792 #
793 # This code is only required when automatic dependency tracking
794 # is enabled.  FIXME.  This creates each `.P' file that we will
795 # need in order to bootstrap the dependency handling code.
796 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
797 [AC_CONFIG_COMMANDS([depfiles],
798      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
799      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
800 ])
801
802 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
803 # Free Software Foundation, Inc.
804 #
805 # This file is free software; the Free Software Foundation
806 # gives unlimited permission to copy and/or distribute it,
807 # with or without modifications, as long as this notice is preserved.
808
809 # serial 8
810
811 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
812 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
813
814 # Do all the work for Automake.                             -*- Autoconf -*-
815
816 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
817 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
818 #
819 # This file is free software; the Free Software Foundation
820 # gives unlimited permission to copy and/or distribute it,
821 # with or without modifications, as long as this notice is preserved.
822
823 # serial 16
824
825 # This macro actually does too much.  Some checks are only needed if
826 # your package does certain things.  But this isn't really a big deal.
827
828 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
829 # AM_INIT_AUTOMAKE([OPTIONS])
830 # -----------------------------------------------
831 # The call with PACKAGE and VERSION arguments is the old style
832 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
833 # and VERSION should now be passed to AC_INIT and removed from
834 # the call to AM_INIT_AUTOMAKE.
835 # We support both call styles for the transition.  After
836 # the next Automake release, Autoconf can make the AC_INIT
837 # arguments mandatory, and then we can depend on a new Autoconf
838 # release and drop the old call support.
839 AC_DEFUN([AM_INIT_AUTOMAKE],
840 [AC_PREREQ([2.62])dnl
841 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
842 dnl the ones we care about.
843 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
844 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
845 AC_REQUIRE([AC_PROG_INSTALL])dnl
846 if test "`cd $srcdir && pwd`" != "`pwd`"; then
847   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
848   # is not polluted with repeated "-I."
849   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
850   # test to see if srcdir already configured
851   if test -f $srcdir/config.status; then
852     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
853   fi
854 fi
855
856 # test whether we have cygpath
857 if test -z "$CYGPATH_W"; then
858   if (cygpath --version) >/dev/null 2>/dev/null; then
859     CYGPATH_W='cygpath -w'
860   else
861     CYGPATH_W=echo
862   fi
863 fi
864 AC_SUBST([CYGPATH_W])
865
866 # Define the identity of the package.
867 dnl Distinguish between old-style and new-style calls.
868 m4_ifval([$2],
869 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
870  AC_SUBST([PACKAGE], [$1])dnl
871  AC_SUBST([VERSION], [$2])],
872 [_AM_SET_OPTIONS([$1])dnl
873 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
874 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
875   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
876  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
877  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
878
879 _AM_IF_OPTION([no-define],,
880 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
881  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
882
883 # Some tools Automake needs.
884 AC_REQUIRE([AM_SANITY_CHECK])dnl
885 AC_REQUIRE([AC_ARG_PROGRAM])dnl
886 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
887 AM_MISSING_PROG(AUTOCONF, autoconf)
888 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
889 AM_MISSING_PROG(AUTOHEADER, autoheader)
890 AM_MISSING_PROG(MAKEINFO, makeinfo)
891 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
892 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
893 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
894 # We need awk for the "check" target.  The system "awk" is bad on
895 # some platforms.
896 AC_REQUIRE([AC_PROG_AWK])dnl
897 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
898 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
899 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
900               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
901                              [_AM_PROG_TAR([v7])])])
902 _AM_IF_OPTION([no-dependencies],,
903 [AC_PROVIDE_IFELSE([AC_PROG_CC],
904                   [_AM_DEPENDENCIES(CC)],
905                   [define([AC_PROG_CC],
906                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
907 AC_PROVIDE_IFELSE([AC_PROG_CXX],
908                   [_AM_DEPENDENCIES(CXX)],
909                   [define([AC_PROG_CXX],
910                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
911 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
912                   [_AM_DEPENDENCIES(OBJC)],
913                   [define([AC_PROG_OBJC],
914                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
915 ])
916 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
917 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
918 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
919 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
920 AC_CONFIG_COMMANDS_PRE(dnl
921 [m4_provide_if([_AM_COMPILER_EXEEXT],
922   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
923 ])
924
925 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
926 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
927 dnl mangled by Autoconf and run in a shell conditional statement.
928 m4_define([_AC_COMPILER_EXEEXT],
929 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
930
931
932 # When config.status generates a header, we must update the stamp-h file.
933 # This file resides in the same directory as the config header
934 # that is generated.  The stamp files are numbered to have different names.
935
936 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
937 # loop where config.status creates the headers, so we can generate
938 # our stamp files there.
939 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
940 [# Compute $1's index in $config_headers.
941 _am_arg=$1
942 _am_stamp_count=1
943 for _am_header in $config_headers :; do
944   case $_am_header in
945     $_am_arg | $_am_arg:* )
946       break ;;
947     * )
948       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
949   esac
950 done
951 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
952
953 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
954 #
955 # This file is free software; the Free Software Foundation
956 # gives unlimited permission to copy and/or distribute it,
957 # with or without modifications, as long as this notice is preserved.
958
959 # AM_PROG_INSTALL_SH
960 # ------------------
961 # Define $install_sh.
962 AC_DEFUN([AM_PROG_INSTALL_SH],
963 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
964 if test x"${install_sh}" != xset; then
965   case $am_aux_dir in
966   *\ * | *\     *)
967     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
968   *)
969     install_sh="\${SHELL} $am_aux_dir/install-sh"
970   esac
971 fi
972 AC_SUBST(install_sh)])
973
974 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
975 #
976 # This file is free software; the Free Software Foundation
977 # gives unlimited permission to copy and/or distribute it,
978 # with or without modifications, as long as this notice is preserved.
979
980 # serial 2
981
982 # Check whether the underlying file-system supports filenames
983 # with a leading dot.  For instance MS-DOS doesn't.
984 AC_DEFUN([AM_SET_LEADING_DOT],
985 [rm -rf .tst 2>/dev/null
986 mkdir .tst 2>/dev/null
987 if test -d .tst; then
988   am__leading_dot=.
989 else
990   am__leading_dot=_
991 fi
992 rmdir .tst 2>/dev/null
993 AC_SUBST([am__leading_dot])])
994
995 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
996 # From Jim Meyering
997
998 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
999 # Free Software Foundation, Inc.
1000 #
1001 # This file is free software; the Free Software Foundation
1002 # gives unlimited permission to copy and/or distribute it,
1003 # with or without modifications, as long as this notice is preserved.
1004
1005 # serial 5
1006
1007 # AM_MAINTAINER_MODE([DEFAULT-MODE])
1008 # ----------------------------------
1009 # Control maintainer-specific portions of Makefiles.
1010 # Default is to disable them, unless `enable' is passed literally.
1011 # For symmetry, `disable' may be passed as well.  Anyway, the user
1012 # can override the default with the --enable/--disable switch.
1013 AC_DEFUN([AM_MAINTAINER_MODE],
1014 [m4_case(m4_default([$1], [disable]),
1015        [enable], [m4_define([am_maintainer_other], [disable])],
1016        [disable], [m4_define([am_maintainer_other], [enable])],
1017        [m4_define([am_maintainer_other], [enable])
1018         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1019 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1020   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1021   AC_ARG_ENABLE([maintainer-mode],
1022 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
1023                           (and sometimes confusing) to the casual installer],
1024       [USE_MAINTAINER_MODE=$enableval],
1025       [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1026   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1027   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1028   MAINT=$MAINTAINER_MODE_TRUE
1029   AC_SUBST([MAINT])dnl
1030 ]
1031 )
1032
1033 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1034
1035 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
1036
1037 # Copyright (C) 2001, 2002, 2003, 2005, 2009  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.
1042
1043 # serial 4
1044
1045 # AM_MAKE_INCLUDE()
1046 # -----------------
1047 # Check to see how make treats includes.
1048 AC_DEFUN([AM_MAKE_INCLUDE],
1049 [am_make=${MAKE-make}
1050 cat > confinc << 'END'
1051 am__doit:
1052         @echo this is the am__doit target
1053 .PHONY: am__doit
1054 END
1055 # If we don't find an include directive, just comment out the code.
1056 AC_MSG_CHECKING([for style of include used by $am_make])
1057 am__include="#"
1058 am__quote=
1059 _am_result=none
1060 # First try GNU make style include.
1061 echo "include confinc" > confmf
1062 # Ignore all kinds of additional output from `make'.
1063 case `$am_make -s -f confmf 2> /dev/null` in #(
1064 *the\ am__doit\ target*)
1065   am__include=include
1066   am__quote=
1067   _am_result=GNU
1068   ;;
1069 esac
1070 # Now try BSD make style include.
1071 if test "$am__include" = "#"; then
1072    echo '.include "confinc"' > confmf
1073    case `$am_make -s -f confmf 2> /dev/null` in #(
1074    *the\ am__doit\ target*)
1075      am__include=.include
1076      am__quote="\""
1077      _am_result=BSD
1078      ;;
1079    esac
1080 fi
1081 AC_SUBST([am__include])
1082 AC_SUBST([am__quote])
1083 AC_MSG_RESULT([$_am_result])
1084 rm -f confinc confmf
1085 ])
1086
1087 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1088 # Free Software Foundation, Inc.
1089 #
1090 # This file is free software; the Free Software Foundation
1091 # gives unlimited permission to copy and/or distribute it,
1092 # with or without modifications, as long as this notice is preserved.
1093
1094 # serial 6
1095
1096 # AM_PROG_CC_C_O
1097 # --------------
1098 # Like AC_PROG_CC_C_O, but changed for automake.
1099 AC_DEFUN([AM_PROG_CC_C_O],
1100 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1101 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1102 AC_REQUIRE_AUX_FILE([compile])dnl
1103 # FIXME: we rely on the cache variable name because
1104 # there is no other way.
1105 set dummy $CC
1106 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1107 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1108 if test "$am_t" != yes; then
1109    # Losing compiler, so override with the script.
1110    # FIXME: It is wrong to rewrite CC.
1111    # But if we don't then we get into trouble of one sort or another.
1112    # A longer-term fix would be to have automake use am__CC in this case,
1113    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1114    CC="$am_aux_dir/compile $CC"
1115 fi
1116 dnl Make sure AC_PROG_CC is never called again, or it will override our
1117 dnl setting of CC.
1118 m4_define([AC_PROG_CC],
1119           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1120 ])
1121
1122 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1123
1124 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1125 # Free Software Foundation, Inc.
1126 #
1127 # This file is free software; the Free Software Foundation
1128 # gives unlimited permission to copy and/or distribute it,
1129 # with or without modifications, as long as this notice is preserved.
1130
1131 # serial 6
1132
1133 # AM_MISSING_PROG(NAME, PROGRAM)
1134 # ------------------------------
1135 AC_DEFUN([AM_MISSING_PROG],
1136 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1137 $1=${$1-"${am_missing_run}$2"}
1138 AC_SUBST($1)])
1139
1140
1141 # AM_MISSING_HAS_RUN
1142 # ------------------
1143 # Define MISSING if not defined so far and test if it supports --run.
1144 # If it does, set am_missing_run to use it, otherwise, to nothing.
1145 AC_DEFUN([AM_MISSING_HAS_RUN],
1146 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1147 AC_REQUIRE_AUX_FILE([missing])dnl
1148 if test x"${MISSING+set}" != xset; then
1149   case $am_aux_dir in
1150   *\ * | *\     *)
1151     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1152   *)
1153     MISSING="\${SHELL} $am_aux_dir/missing" ;;
1154   esac
1155 fi
1156 # Use eval to expand $SHELL
1157 if eval "$MISSING --run true"; then
1158   am_missing_run="$MISSING --run "
1159 else
1160   am_missing_run=
1161   AC_MSG_WARN([`missing' script is too old or missing])
1162 fi
1163 ])
1164
1165 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
1166 #
1167 # This file is free software; the Free Software Foundation
1168 # gives unlimited permission to copy and/or distribute it,
1169 # with or without modifications, as long as this notice is preserved.
1170
1171 # AM_PROG_MKDIR_P
1172 # ---------------
1173 # Check for `mkdir -p'.
1174 AC_DEFUN([AM_PROG_MKDIR_P],
1175 [AC_PREREQ([2.60])dnl
1176 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1177 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
1178 dnl while keeping a definition of mkdir_p for backward compatibility.
1179 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1180 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1181 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1182 dnl adjustment using top_builddir (which is defined more often than
1183 dnl MKDIR_P).
1184 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1185 case $mkdir_p in
1186   [[\\/$]]* | ?:[[\\/]]*) ;;
1187   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1188 esac
1189 ])
1190
1191 # Helper functions for option handling.                     -*- Autoconf -*-
1192
1193 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
1194 #
1195 # This file is free software; the Free Software Foundation
1196 # gives unlimited permission to copy and/or distribute it,
1197 # with or without modifications, as long as this notice is preserved.
1198
1199 # serial 4
1200
1201 # _AM_MANGLE_OPTION(NAME)
1202 # -----------------------
1203 AC_DEFUN([_AM_MANGLE_OPTION],
1204 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1205
1206 # _AM_SET_OPTION(NAME)
1207 # ------------------------------
1208 # Set option NAME.  Presently that only means defining a flag for this option.
1209 AC_DEFUN([_AM_SET_OPTION],
1210 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1211
1212 # _AM_SET_OPTIONS(OPTIONS)
1213 # ----------------------------------
1214 # OPTIONS is a space-separated list of Automake options.
1215 AC_DEFUN([_AM_SET_OPTIONS],
1216 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1217
1218 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1219 # -------------------------------------------
1220 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1221 AC_DEFUN([_AM_IF_OPTION],
1222 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1223
1224 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
1225 # Free Software Foundation, Inc.
1226 #
1227 # This file is free software; the Free Software Foundation
1228 # gives unlimited permission to copy and/or distribute it,
1229 # with or without modifications, as long as this notice is preserved.
1230
1231 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1232 # ---------------------------------------------------------------------------
1233 # Adds support for distributing Python modules and packages.  To
1234 # install modules, copy them to $(pythondir), using the python_PYTHON
1235 # automake variable.  To install a package with the same name as the
1236 # automake package, install to $(pkgpythondir), or use the
1237 # pkgpython_PYTHON automake variable.
1238 #
1239 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
1240 # locations to install python extension modules (shared libraries).
1241 # Another macro is required to find the appropriate flags to compile
1242 # extension modules.
1243 #
1244 # If your package is configured with a different prefix to python,
1245 # users will have to add the install directory to the PYTHONPATH
1246 # environment variable, or create a .pth file (see the python
1247 # documentation for details).
1248 #
1249 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
1250 # cause an error if the version of python installed on the system
1251 # doesn't meet the requirement.  MINIMUM-VERSION should consist of
1252 # numbers and dots only.
1253 AC_DEFUN([AM_PATH_PYTHON],
1254  [
1255   dnl Find a Python interpreter.  Python versions prior to 2.0 are not
1256   dnl supported. (2.0 was released on October 16, 2000).
1257   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
1258                     [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
1259 python2.1 python2.0])
1260
1261   m4_if([$1],[],[
1262     dnl No version check is needed.
1263     # Find any Python interpreter.
1264     if test -z "$PYTHON"; then
1265       AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
1266     fi
1267     am_display_PYTHON=python
1268   ], [
1269     dnl A version check is needed.
1270     if test -n "$PYTHON"; then
1271       # If the user set $PYTHON, use it and don't search something else.
1272       AC_MSG_CHECKING([whether $PYTHON version >= $1])
1273       AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
1274                               [AC_MSG_RESULT(yes)],
1275                               [AC_MSG_ERROR(too old)])
1276       am_display_PYTHON=$PYTHON
1277     else
1278       # Otherwise, try each interpreter until we find one that satisfies
1279       # VERSION.
1280       AC_CACHE_CHECK([for a Python interpreter with version >= $1],
1281         [am_cv_pathless_PYTHON],[
1282         for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
1283           test "$am_cv_pathless_PYTHON" = none && break
1284           AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
1285         done])
1286       # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
1287       if test "$am_cv_pathless_PYTHON" = none; then
1288         PYTHON=:
1289       else
1290         AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
1291       fi
1292       am_display_PYTHON=$am_cv_pathless_PYTHON
1293     fi
1294   ])
1295
1296   if test "$PYTHON" = :; then
1297   dnl Run any user-specified action, or abort.
1298     m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
1299   else
1300
1301   dnl Query Python for its version number.  Getting [:3] seems to be
1302   dnl the best way to do this; it's what "site.py" does in the standard
1303   dnl library.
1304
1305   AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
1306     [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
1307   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
1308
1309   dnl Use the values of $prefix and $exec_prefix for the corresponding
1310   dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
1311   dnl distinct variables so they can be overridden if need be.  However,
1312   dnl general consensus is that you shouldn't need this ability.
1313
1314   AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
1315   AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
1316
1317   dnl At times (like when building shared libraries) you may want
1318   dnl to know which OS platform Python thinks this is.
1319
1320   AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
1321     [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
1322   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
1323
1324
1325   dnl Set up 4 directories:
1326
1327   dnl pythondir -- where to install python scripts.  This is the
1328   dnl   site-packages directory, not the python standard library
1329   dnl   directory like in previous automake betas.  This behavior
1330   dnl   is more consistent with lispdir.m4 for example.
1331   dnl Query distutils for this directory.  distutils does not exist in
1332   dnl Python 1.5, so we fall back to the hardcoded directory if it
1333   dnl doesn't work.
1334   AC_CACHE_CHECK([for $am_display_PYTHON script directory],
1335     [am_cv_python_pythondir],
1336     [if test "x$prefix" = xNONE
1337      then
1338        am_py_prefix=$ac_default_prefix
1339      else
1340        am_py_prefix=$prefix
1341      fi
1342      am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
1343      echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
1344      case $am_cv_python_pythondir in
1345      $am_py_prefix*)
1346        am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1347        am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
1348        ;;
1349      *)
1350        case $am_py_prefix in
1351          /usr|/System*) ;;
1352          *)
1353           am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
1354           ;;
1355        esac
1356        ;;
1357      esac
1358     ])
1359   AC_SUBST([pythondir], [$am_cv_python_pythondir])
1360
1361   dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
1362   dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
1363   dnl   more consistent with the rest of automake.
1364
1365   AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1366
1367   dnl pyexecdir -- directory for installing python extension modules
1368   dnl   (shared libraries)
1369   dnl Query distutils for this directory.  distutils does not exist in
1370   dnl Python 1.5, so we fall back to the hardcoded directory if it
1371   dnl doesn't work.
1372   AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
1373     [am_cv_python_pyexecdir],
1374     [if test "x$exec_prefix" = xNONE
1375      then
1376        am_py_exec_prefix=$am_py_prefix
1377      else
1378        am_py_exec_prefix=$exec_prefix
1379      fi
1380      am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
1381      echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
1382      case $am_cv_python_pyexecdir in
1383      $am_py_exec_prefix*)
1384        am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1385        am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
1386        ;;
1387      *)
1388        case $am_py_exec_prefix in
1389          /usr|/System*) ;;
1390          *)
1391            am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
1392            ;;
1393        esac
1394        ;;
1395      esac
1396     ])
1397   AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1398
1399   dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
1400
1401   AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1402
1403   dnl Run any user-specified action.
1404   $2
1405   fi
1406
1407 ])
1408
1409
1410 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1411 # ---------------------------------------------------------------------------
1412 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1413 # Run ACTION-IF-FALSE otherwise.
1414 # This test uses sys.hexversion instead of the string equivalent (first
1415 # word of sys.version), in order to cope with versions such as 2.2c1.
1416 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
1417 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
1418  [prog="import sys
1419 # split strings by '.' and convert to numeric.  Append some zeros
1420 # because we need at least 4 digits for the hex conversion.
1421 # map returns an iterator in Python 3.0 and a list in 2.x
1422 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
1423 minverhex = 0
1424 # xrange is not present in Python 3.0 and range returns an iterator
1425 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
1426 sys.exit(sys.hexversion < minverhex)"
1427   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1428
1429 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1430 #
1431 # This file is free software; the Free Software Foundation
1432 # gives unlimited permission to copy and/or distribute it,
1433 # with or without modifications, as long as this notice is preserved.
1434
1435 # AM_RUN_LOG(COMMAND)
1436 # -------------------
1437 # Run COMMAND, save the exit status in ac_status, and log it.
1438 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1439 AC_DEFUN([AM_RUN_LOG],
1440 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1441    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1442    ac_status=$?
1443    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1444    (exit $ac_status); }])
1445
1446 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1447
1448 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1449 # Free Software Foundation, Inc.
1450 #
1451 # This file is free software; the Free Software Foundation
1452 # gives unlimited permission to copy and/or distribute it,
1453 # with or without modifications, as long as this notice is preserved.
1454
1455 # serial 5
1456
1457 # AM_SANITY_CHECK
1458 # ---------------
1459 AC_DEFUN([AM_SANITY_CHECK],
1460 [AC_MSG_CHECKING([whether build environment is sane])
1461 # Just in case
1462 sleep 1
1463 echo timestamp > conftest.file
1464 # Reject unsafe characters in $srcdir or the absolute working directory
1465 # name.  Accept space and tab only in the latter.
1466 am_lf='
1467 '
1468 case `pwd` in
1469   *[[\\\"\#\$\&\'\`$am_lf]]*)
1470     AC_MSG_ERROR([unsafe absolute working directory name]);;
1471 esac
1472 case $srcdir in
1473   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1474     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1475 esac
1476
1477 # Do `set' in a subshell so we don't clobber the current shell's
1478 # arguments.  Must try -L first in case configure is actually a
1479 # symlink; some systems play weird games with the mod time of symlinks
1480 # (eg FreeBSD returns the mod time of the symlink's containing
1481 # directory).
1482 if (
1483    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1484    if test "$[*]" = "X"; then
1485       # -L didn't work.
1486       set X `ls -t "$srcdir/configure" conftest.file`
1487    fi
1488    rm -f conftest.file
1489    if test "$[*]" != "X $srcdir/configure conftest.file" \
1490       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1491
1492       # If neither matched, then we have a broken ls.  This can happen
1493       # if, for instance, CONFIG_SHELL is bash and it inherits a
1494       # broken ls alias from the environment.  This has actually
1495       # happened.  Such a system could not be considered "sane".
1496       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1497 alias in your environment])
1498    fi
1499
1500    test "$[2]" = conftest.file
1501    )
1502 then
1503    # Ok.
1504    :
1505 else
1506    AC_MSG_ERROR([newly created file is older than distributed files!
1507 Check your system clock])
1508 fi
1509 AC_MSG_RESULT(yes)])
1510
1511 # Copyright (C) 2009  Free Software Foundation, Inc.
1512 #
1513 # This file is free software; the Free Software Foundation
1514 # gives unlimited permission to copy and/or distribute it,
1515 # with or without modifications, as long as this notice is preserved.
1516
1517 # serial 1
1518
1519 # AM_SILENT_RULES([DEFAULT])
1520 # --------------------------
1521 # Enable less verbose build rules; with the default set to DEFAULT
1522 # (`yes' being less verbose, `no' or empty being verbose).
1523 AC_DEFUN([AM_SILENT_RULES],
1524 [AC_ARG_ENABLE([silent-rules],
1525 [  --enable-silent-rules          less verbose build output (undo: `make V=1')
1526   --disable-silent-rules         verbose build output (undo: `make V=0')])
1527 case $enable_silent_rules in
1528 yes) AM_DEFAULT_VERBOSITY=0;;
1529 no)  AM_DEFAULT_VERBOSITY=1;;
1530 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1531 esac
1532 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1533 AM_BACKSLASH='\'
1534 AC_SUBST([AM_BACKSLASH])dnl
1535 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1536 ])
1537
1538 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1539 #
1540 # This file is free software; the Free Software Foundation
1541 # gives unlimited permission to copy and/or distribute it,
1542 # with or without modifications, as long as this notice is preserved.
1543
1544 # AM_PROG_INSTALL_STRIP
1545 # ---------------------
1546 # One issue with vendor `install' (even GNU) is that you can't
1547 # specify the program used to strip binaries.  This is especially
1548 # annoying in cross-compiling environments, where the build's strip
1549 # is unlikely to handle the host's binaries.
1550 # Fortunately install-sh will honor a STRIPPROG variable, so we
1551 # always use install-sh in `make install-strip', and initialize
1552 # STRIPPROG with the value of the STRIP variable (set by the user).
1553 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1554 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1555 # Installed binaries are usually stripped using `strip' when the user
1556 # run `make install-strip'.  However `strip' might not be the right
1557 # tool to use in cross-compilation environments, therefore Automake
1558 # will honor the `STRIP' environment variable to overrule this program.
1559 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1560 if test "$cross_compiling" != no; then
1561   AC_CHECK_TOOL([STRIP], [strip], :)
1562 fi
1563 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1564 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1565
1566 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
1567 #
1568 # This file is free software; the Free Software Foundation
1569 # gives unlimited permission to copy and/or distribute it,
1570 # with or without modifications, as long as this notice is preserved.
1571
1572 # serial 2
1573
1574 # _AM_SUBST_NOTMAKE(VARIABLE)
1575 # ---------------------------
1576 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1577 # This macro is traced by Automake.
1578 AC_DEFUN([_AM_SUBST_NOTMAKE])
1579
1580 # AM_SUBST_NOTMAKE(VARIABLE)
1581 # ---------------------------
1582 # Public sister of _AM_SUBST_NOTMAKE.
1583 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1584
1585 # Check how to create a tarball.                            -*- Autoconf -*-
1586
1587 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
1588 #
1589 # This file is free software; the Free Software Foundation
1590 # gives unlimited permission to copy and/or distribute it,
1591 # with or without modifications, as long as this notice is preserved.
1592
1593 # serial 2
1594
1595 # _AM_PROG_TAR(FORMAT)
1596 # --------------------
1597 # Check how to create a tarball in format FORMAT.
1598 # FORMAT should be one of `v7', `ustar', or `pax'.
1599 #
1600 # Substitute a variable $(am__tar) that is a command
1601 # writing to stdout a FORMAT-tarball containing the directory
1602 # $tardir.
1603 #     tardir=directory && $(am__tar) > result.tar
1604 #
1605 # Substitute a variable $(am__untar) that extract such
1606 # a tarball read from stdin.
1607 #     $(am__untar) < result.tar
1608 AC_DEFUN([_AM_PROG_TAR],
1609 [# Always define AMTAR for backward compatibility.
1610 AM_MISSING_PROG([AMTAR], [tar])
1611 m4_if([$1], [v7],
1612      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1613      [m4_case([$1], [ustar],, [pax],,
1614               [m4_fatal([Unknown tar format])])
1615 AC_MSG_CHECKING([how to create a $1 tar archive])
1616 # Loop over all known methods to create a tar archive until one works.
1617 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1618 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1619 # Do not fold the above two line into one, because Tru64 sh and
1620 # Solaris sh will not grok spaces in the rhs of `-'.
1621 for _am_tool in $_am_tools
1622 do
1623   case $_am_tool in
1624   gnutar)
1625     for _am_tar in tar gnutar gtar;
1626     do
1627       AM_RUN_LOG([$_am_tar --version]) && break
1628     done
1629     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1630     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1631     am__untar="$_am_tar -xf -"
1632     ;;
1633   plaintar)
1634     # Must skip GNU tar: if it does not support --format= it doesn't create
1635     # ustar tarball either.
1636     (tar --version) >/dev/null 2>&1 && continue
1637     am__tar='tar chf - "$$tardir"'
1638     am__tar_='tar chf - "$tardir"'
1639     am__untar='tar xf -'
1640     ;;
1641   pax)
1642     am__tar='pax -L -x $1 -w "$$tardir"'
1643     am__tar_='pax -L -x $1 -w "$tardir"'
1644     am__untar='pax -r'
1645     ;;
1646   cpio)
1647     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1648     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1649     am__untar='cpio -i -H $1 -d'
1650     ;;
1651   none)
1652     am__tar=false
1653     am__tar_=false
1654     am__untar=false
1655     ;;
1656   esac
1657
1658   # If the value was cached, stop now.  We just wanted to have am__tar
1659   # and am__untar set.
1660   test -n "${am_cv_prog_tar_$1}" && break
1661
1662   # tar/untar a dummy directory, and stop if the command works
1663   rm -rf conftest.dir
1664   mkdir conftest.dir
1665   echo GrepMe > conftest.dir/file
1666   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1667   rm -rf conftest.dir
1668   if test -s conftest.tar; then
1669     AM_RUN_LOG([$am__untar <conftest.tar])
1670     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1671   fi
1672 done
1673 rm -rf conftest.dir
1674
1675 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1676 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1677 AC_SUBST([am__tar])
1678 AC_SUBST([am__untar])
1679 ]) # _AM_PROG_TAR
1680
1681 m4_include([m4/as-ac-expand.m4])
1682 m4_include([m4/jhflags.m4])
1683 m4_include([m4/libtool.m4])
1684 m4_include([m4/ltoptions.m4])
1685 m4_include([m4/ltsugar.m4])
1686 m4_include([m4/ltversion.m4])
1687 m4_include([m4/lt~obsolete.m4])
1688 m4_include([m4/python.m4])