OSDN Git Service

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