Initial commit
[circ.git] / aclocal.m4
blobae27dbbab15d07b005f19d2c86de6539b341e6ab
1 # generated automatically by aclocal 1.10 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006  Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
14 m4_if(m4_PACKAGE_VERSION, [2.61],,
15 [m4_fatal([this file was generated for autoconf 2.61.
16 You have another version of autoconf.  If you want to use that,
17 you should regenerate the build system entirely.], [63])])
19 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
20
21 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
23 # This program is free software; you can redistribute it and/or modify
24 # it under the terms of the GNU General Public License as published by
25 # the Free Software Foundation; either version 2 of the License, or
26 # (at your option) any later version.
28 # This program is distributed in the hope that it will be useful, but
29 # WITHOUT ANY WARRANTY; without even the implied warranty of
30 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31 # General Public License for more details.
33 # You should have received a copy of the GNU General Public License
34 # along with this program; if not, write to the Free Software
35 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
37 # As a special exception to the GNU General Public License, if you
38 # distribute this file as part of a program that contains a
39 # configuration script generated by Autoconf, you may include it under
40 # the same distribution terms that you use for the rest of that program.
42 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
43 # ----------------------------------
44 AC_DEFUN([PKG_PROG_PKG_CONFIG],
45 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
46 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
47 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
48 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
49         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
51 if test -n "$PKG_CONFIG"; then
52         _pkg_min_version=m4_default([$1], [0.9.0])
53         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
54         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
55                 AC_MSG_RESULT([yes])
56         else
57                 AC_MSG_RESULT([no])
58                 PKG_CONFIG=""
59         fi
60                 
61 fi[]dnl
62 ])# PKG_PROG_PKG_CONFIG
64 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
66 # Check to see whether a particular set of modules exists.  Similar
67 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
70 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
71 # this or PKG_CHECK_MODULES is called, or make sure to call
72 # PKG_CHECK_EXISTS manually
73 # --------------------------------------------------------------
74 AC_DEFUN([PKG_CHECK_EXISTS],
75 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
76 if test -n "$PKG_CONFIG" && \
77     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
78   m4_ifval([$2], [$2], [:])
79 m4_ifvaln([$3], [else
80   $3])dnl
81 fi])
84 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
85 # ---------------------------------------------
86 m4_define([_PKG_CONFIG],
87 [if test -n "$PKG_CONFIG"; then
88     if test -n "$$1"; then
89         pkg_cv_[]$1="$$1"
90     else
91         PKG_CHECK_EXISTS([$3],
92                          [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
93                          [pkg_failed=yes])
94     fi
95 else
96         pkg_failed=untried
97 fi[]dnl
98 ])# _PKG_CONFIG
100 # _PKG_SHORT_ERRORS_SUPPORTED
101 # -----------------------------
102 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
103 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
104 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
105         _pkg_short_errors_supported=yes
106 else
107         _pkg_short_errors_supported=no
108 fi[]dnl
109 ])# _PKG_SHORT_ERRORS_SUPPORTED
112 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
113 # [ACTION-IF-NOT-FOUND])
116 # Note that if there is a possibility the first call to
117 # PKG_CHECK_MODULES might not happen, you should be sure to include an
118 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
121 # --------------------------------------------------------------
122 AC_DEFUN([PKG_CHECK_MODULES],
123 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
124 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
125 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
127 pkg_failed=no
128 AC_MSG_CHECKING([for $1])
130 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
131 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
133 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
134 and $1[]_LIBS to avoid the need to call pkg-config.
135 See the pkg-config man page for more details.])
137 if test $pkg_failed = yes; then
138         _PKG_SHORT_ERRORS_SUPPORTED
139         if test $_pkg_short_errors_supported = yes; then
140                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
141         else 
142                 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
143         fi
144         # Put the nasty error message in config.log where it belongs
145         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
147         ifelse([$4], , [AC_MSG_ERROR(dnl
148 [Package requirements ($2) were not met:
150 $$1_PKG_ERRORS
152 Consider adjusting the PKG_CONFIG_PATH environment variable if you
153 installed software in a non-standard prefix.
155 _PKG_TEXT
156 ])],
157                 [AC_MSG_RESULT([no])
158                 $4])
159 elif test $pkg_failed = untried; then
160         ifelse([$4], , [AC_MSG_FAILURE(dnl
161 [The pkg-config script could not be found or is too old.  Make sure it
162 is in your PATH or set the PKG_CONFIG environment variable to the full
163 path to pkg-config.
165 _PKG_TEXT
167 To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
168                 [$4])
169 else
170         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
171         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
172         AC_MSG_RESULT([yes])
173         ifelse([$3], , :, [$3])
174 fi[]dnl
175 ])# PKG_CHECK_MODULES
177 # Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
179 # This file is free software; the Free Software Foundation
180 # gives unlimited permission to copy and/or distribute it,
181 # with or without modifications, as long as this notice is preserved.
183 # AM_AUTOMAKE_VERSION(VERSION)
184 # ----------------------------
185 # Automake X.Y traces this macro to ensure aclocal.m4 has been
186 # generated from the m4 files accompanying Automake X.Y.
187 # (This private macro should not be called outside this file.)
188 AC_DEFUN([AM_AUTOMAKE_VERSION],
189 [am__api_version='1.10'
190 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
191 dnl require some minimum version.  Point them to the right macro.
192 m4_if([$1], [1.10], [],
193       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
196 # _AM_AUTOCONF_VERSION(VERSION)
197 # -----------------------------
198 # aclocal traces this macro to find the Autoconf version.
199 # This is a private macro too.  Using m4_define simplifies
200 # the logic in aclocal, which can simply ignore this definition.
201 m4_define([_AM_AUTOCONF_VERSION], [])
203 # AM_SET_CURRENT_AUTOMAKE_VERSION
204 # -------------------------------
205 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
206 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
207 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
208 [AM_AUTOMAKE_VERSION([1.10])dnl
209 _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
211 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
213 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
215 # This file is free software; the Free Software Foundation
216 # gives unlimited permission to copy and/or distribute it,
217 # with or without modifications, as long as this notice is preserved.
219 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
220 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
221 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
223 # Of course, Automake must honor this variable whenever it calls a
224 # tool from the auxiliary directory.  The problem is that $srcdir (and
225 # therefore $ac_aux_dir as well) can be either absolute or relative,
226 # depending on how configure is run.  This is pretty annoying, since
227 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
228 # source directory, any form will work fine, but in subdirectories a
229 # relative path needs to be adjusted first.
231 # $ac_aux_dir/missing
232 #    fails when called from a subdirectory if $ac_aux_dir is relative
233 # $top_srcdir/$ac_aux_dir/missing
234 #    fails if $ac_aux_dir is absolute,
235 #    fails when called from a subdirectory in a VPATH build with
236 #          a relative $ac_aux_dir
238 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
239 # are both prefixed by $srcdir.  In an in-source build this is usually
240 # harmless because $srcdir is `.', but things will broke when you
241 # start a VPATH build or use an absolute $srcdir.
243 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
244 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
245 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
246 # and then we would define $MISSING as
247 #   MISSING="\${SHELL} $am_aux_dir/missing"
248 # This will work as long as MISSING is not called from configure, because
249 # unfortunately $(top_srcdir) has no meaning in configure.
250 # However there are other variables, like CC, which are often used in
251 # configure, and could therefore not use this "fixed" $ac_aux_dir.
253 # Another solution, used here, is to always expand $ac_aux_dir to an
254 # absolute PATH.  The drawback is that using absolute paths prevent a
255 # configured tree to be moved without reconfiguration.
257 AC_DEFUN([AM_AUX_DIR_EXPAND],
258 [dnl Rely on autoconf to set up CDPATH properly.
259 AC_PREREQ([2.50])dnl
260 # expand $ac_aux_dir to an absolute path
261 am_aux_dir=`cd $ac_aux_dir && pwd`
264 # AM_CONDITIONAL                                            -*- Autoconf -*-
266 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
267 # Free Software Foundation, Inc.
269 # This file is free software; the Free Software Foundation
270 # gives unlimited permission to copy and/or distribute it,
271 # with or without modifications, as long as this notice is preserved.
273 # serial 8
275 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
276 # -------------------------------------
277 # Define a conditional.
278 AC_DEFUN([AM_CONDITIONAL],
279 [AC_PREREQ(2.52)dnl
280  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
281         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
282 AC_SUBST([$1_TRUE])dnl
283 AC_SUBST([$1_FALSE])dnl
284 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
285 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
286 if $2; then
287   $1_TRUE=
288   $1_FALSE='#'
289 else
290   $1_TRUE='#'
291   $1_FALSE=
293 AC_CONFIG_COMMANDS_PRE(
294 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
295   AC_MSG_ERROR([[conditional "$1" was never defined.
296 Usually this means the macro was only invoked conditionally.]])
297 fi])])
299 # Do all the work for Automake.                             -*- Autoconf -*-
301 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
302 # 2005, 2006 Free Software Foundation, Inc.
304 # This file is free software; the Free Software Foundation
305 # gives unlimited permission to copy and/or distribute it,
306 # with or without modifications, as long as this notice is preserved.
308 # serial 12
310 # This macro actually does too much.  Some checks are only needed if
311 # your package does certain things.  But this isn't really a big deal.
313 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
314 # AM_INIT_AUTOMAKE([OPTIONS])
315 # -----------------------------------------------
316 # The call with PACKAGE and VERSION arguments is the old style
317 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
318 # and VERSION should now be passed to AC_INIT and removed from
319 # the call to AM_INIT_AUTOMAKE.
320 # We support both call styles for the transition.  After
321 # the next Automake release, Autoconf can make the AC_INIT
322 # arguments mandatory, and then we can depend on a new Autoconf
323 # release and drop the old call support.
324 AC_DEFUN([AM_INIT_AUTOMAKE],
325 [AC_PREREQ([2.60])dnl
326 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
327 dnl the ones we care about.
328 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
329 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
330 AC_REQUIRE([AC_PROG_INSTALL])dnl
331 if test "`cd $srcdir && pwd`" != "`pwd`"; then
332   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
333   # is not polluted with repeated "-I."
334   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
335   # test to see if srcdir already configured
336   if test -f $srcdir/config.status; then
337     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
338   fi
341 # test whether we have cygpath
342 if test -z "$CYGPATH_W"; then
343   if (cygpath --version) >/dev/null 2>/dev/null; then
344     CYGPATH_W='cygpath -w'
345   else
346     CYGPATH_W=echo
347   fi
349 AC_SUBST([CYGPATH_W])
351 # Define the identity of the package.
352 dnl Distinguish between old-style and new-style calls.
353 m4_ifval([$2],
354 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
355  AC_SUBST([PACKAGE], [$1])dnl
356  AC_SUBST([VERSION], [$2])],
357 [_AM_SET_OPTIONS([$1])dnl
358 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
359 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
360   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
361  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
362  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
364 _AM_IF_OPTION([no-define],,
365 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
366  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
368 # Some tools Automake needs.
369 AC_REQUIRE([AM_SANITY_CHECK])dnl
370 AC_REQUIRE([AC_ARG_PROGRAM])dnl
371 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
372 AM_MISSING_PROG(AUTOCONF, autoconf)
373 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
374 AM_MISSING_PROG(AUTOHEADER, autoheader)
375 AM_MISSING_PROG(MAKEINFO, makeinfo)
376 AM_PROG_INSTALL_SH
377 AM_PROG_INSTALL_STRIP
378 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
379 # We need awk for the "check" target.  The system "awk" is bad on
380 # some platforms.
381 AC_REQUIRE([AC_PROG_AWK])dnl
382 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
383 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
384 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
385               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
386                              [_AM_PROG_TAR([v7])])])
387 _AM_IF_OPTION([no-dependencies],,
388 [AC_PROVIDE_IFELSE([AC_PROG_CC],
389                   [_AM_DEPENDENCIES(CC)],
390                   [define([AC_PROG_CC],
391                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
392 AC_PROVIDE_IFELSE([AC_PROG_CXX],
393                   [_AM_DEPENDENCIES(CXX)],
394                   [define([AC_PROG_CXX],
395                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
396 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
397                   [_AM_DEPENDENCIES(OBJC)],
398                   [define([AC_PROG_OBJC],
399                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
404 # When config.status generates a header, we must update the stamp-h file.
405 # This file resides in the same directory as the config header
406 # that is generated.  The stamp files are numbered to have different names.
408 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
409 # loop where config.status creates the headers, so we can generate
410 # our stamp files there.
411 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
412 [# Compute $1's index in $config_headers.
413 _am_stamp_count=1
414 for _am_header in $config_headers :; do
415   case $_am_header in
416     $1 | $1:* )
417       break ;;
418     * )
419       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
420   esac
421 done
422 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
424 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
426 # This file is free software; the Free Software Foundation
427 # gives unlimited permission to copy and/or distribute it,
428 # with or without modifications, as long as this notice is preserved.
430 # AM_PROG_INSTALL_SH
431 # ------------------
432 # Define $install_sh.
433 AC_DEFUN([AM_PROG_INSTALL_SH],
434 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
435 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
436 AC_SUBST(install_sh)])
438 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
440 # This file is free software; the Free Software Foundation
441 # gives unlimited permission to copy and/or distribute it,
442 # with or without modifications, as long as this notice is preserved.
444 # serial 2
446 # Check whether the underlying file-system supports filenames
447 # with a leading dot.  For instance MS-DOS doesn't.
448 AC_DEFUN([AM_SET_LEADING_DOT],
449 [rm -rf .tst 2>/dev/null
450 mkdir .tst 2>/dev/null
451 if test -d .tst; then
452   am__leading_dot=.
453 else
454   am__leading_dot=_
456 rmdir .tst 2>/dev/null
457 AC_SUBST([am__leading_dot])])
459 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
461 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
462 # Free Software Foundation, Inc.
464 # This file is free software; the Free Software Foundation
465 # gives unlimited permission to copy and/or distribute it,
466 # with or without modifications, as long as this notice is preserved.
468 # serial 5
470 # AM_MISSING_PROG(NAME, PROGRAM)
471 # ------------------------------
472 AC_DEFUN([AM_MISSING_PROG],
473 [AC_REQUIRE([AM_MISSING_HAS_RUN])
474 $1=${$1-"${am_missing_run}$2"}
475 AC_SUBST($1)])
478 # AM_MISSING_HAS_RUN
479 # ------------------
480 # Define MISSING if not defined so far and test if it supports --run.
481 # If it does, set am_missing_run to use it, otherwise, to nothing.
482 AC_DEFUN([AM_MISSING_HAS_RUN],
483 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
484 AC_REQUIRE_AUX_FILE([missing])dnl
485 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
486 # Use eval to expand $SHELL
487 if eval "$MISSING --run true"; then
488   am_missing_run="$MISSING --run "
489 else
490   am_missing_run=
491   AC_MSG_WARN([`missing' script is too old or missing])
495 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
497 # This file is free software; the Free Software Foundation
498 # gives unlimited permission to copy and/or distribute it,
499 # with or without modifications, as long as this notice is preserved.
501 # AM_PROG_MKDIR_P
502 # ---------------
503 # Check for `mkdir -p'.
504 AC_DEFUN([AM_PROG_MKDIR_P],
505 [AC_PREREQ([2.60])dnl
506 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
507 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
508 dnl while keeping a definition of mkdir_p for backward compatibility.
509 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
510 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
511 dnl Makefile.ins that do not define MKDIR_P, so we do our own
512 dnl adjustment using top_builddir (which is defined more often than
513 dnl MKDIR_P).
514 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
515 case $mkdir_p in
516   [[\\/$]]* | ?:[[\\/]]*) ;;
517   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
518 esac
521 # Helper functions for option handling.                     -*- Autoconf -*-
523 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
525 # This file is free software; the Free Software Foundation
526 # gives unlimited permission to copy and/or distribute it,
527 # with or without modifications, as long as this notice is preserved.
529 # serial 3
531 # _AM_MANGLE_OPTION(NAME)
532 # -----------------------
533 AC_DEFUN([_AM_MANGLE_OPTION],
534 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
536 # _AM_SET_OPTION(NAME)
537 # ------------------------------
538 # Set option NAME.  Presently that only means defining a flag for this option.
539 AC_DEFUN([_AM_SET_OPTION],
540 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
542 # _AM_SET_OPTIONS(OPTIONS)
543 # ----------------------------------
544 # OPTIONS is a space-separated list of Automake options.
545 AC_DEFUN([_AM_SET_OPTIONS],
546 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
548 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
549 # -------------------------------------------
550 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
551 AC_DEFUN([_AM_IF_OPTION],
552 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
554 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
556 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
557 # Free Software Foundation, Inc.
559 # This file is free software; the Free Software Foundation
560 # gives unlimited permission to copy and/or distribute it,
561 # with or without modifications, as long as this notice is preserved.
563 # serial 4
565 # AM_SANITY_CHECK
566 # ---------------
567 AC_DEFUN([AM_SANITY_CHECK],
568 [AC_MSG_CHECKING([whether build environment is sane])
569 # Just in case
570 sleep 1
571 echo timestamp > conftest.file
572 # Do `set' in a subshell so we don't clobber the current shell's
573 # arguments.  Must try -L first in case configure is actually a
574 # symlink; some systems play weird games with the mod time of symlinks
575 # (eg FreeBSD returns the mod time of the symlink's containing
576 # directory).
577 if (
578    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
579    if test "$[*]" = "X"; then
580       # -L didn't work.
581       set X `ls -t $srcdir/configure conftest.file`
582    fi
583    rm -f conftest.file
584    if test "$[*]" != "X $srcdir/configure conftest.file" \
585       && test "$[*]" != "X conftest.file $srcdir/configure"; then
587       # If neither matched, then we have a broken ls.  This can happen
588       # if, for instance, CONFIG_SHELL is bash and it inherits a
589       # broken ls alias from the environment.  This has actually
590       # happened.  Such a system could not be considered "sane".
591       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
592 alias in your environment])
593    fi
595    test "$[2]" = conftest.file
596    )
597 then
598    # Ok.
599    :
600 else
601    AC_MSG_ERROR([newly created file is older than distributed files!
602 Check your system clock])
604 AC_MSG_RESULT(yes)])
606 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
608 # This file is free software; the Free Software Foundation
609 # gives unlimited permission to copy and/or distribute it,
610 # with or without modifications, as long as this notice is preserved.
612 # AM_PROG_INSTALL_STRIP
613 # ---------------------
614 # One issue with vendor `install' (even GNU) is that you can't
615 # specify the program used to strip binaries.  This is especially
616 # annoying in cross-compiling environments, where the build's strip
617 # is unlikely to handle the host's binaries.
618 # Fortunately install-sh will honor a STRIPPROG variable, so we
619 # always use install-sh in `make install-strip', and initialize
620 # STRIPPROG with the value of the STRIP variable (set by the user).
621 AC_DEFUN([AM_PROG_INSTALL_STRIP],
622 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
623 # Installed binaries are usually stripped using `strip' when the user
624 # run `make install-strip'.  However `strip' might not be the right
625 # tool to use in cross-compilation environments, therefore Automake
626 # will honor the `STRIP' environment variable to overrule this program.
627 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
628 if test "$cross_compiling" != no; then
629   AC_CHECK_TOOL([STRIP], [strip], :)
631 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
632 AC_SUBST([INSTALL_STRIP_PROGRAM])])
634 # Copyright (C) 2006  Free Software Foundation, Inc.
636 # This file is free software; the Free Software Foundation
637 # gives unlimited permission to copy and/or distribute it,
638 # with or without modifications, as long as this notice is preserved.
640 # _AM_SUBST_NOTMAKE(VARIABLE)
641 # ---------------------------
642 # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
643 # This macro is traced by Automake.
644 AC_DEFUN([_AM_SUBST_NOTMAKE])
646 # Check how to create a tarball.                            -*- Autoconf -*-
648 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
650 # This file is free software; the Free Software Foundation
651 # gives unlimited permission to copy and/or distribute it,
652 # with or without modifications, as long as this notice is preserved.
654 # serial 2
656 # _AM_PROG_TAR(FORMAT)
657 # --------------------
658 # Check how to create a tarball in format FORMAT.
659 # FORMAT should be one of `v7', `ustar', or `pax'.
661 # Substitute a variable $(am__tar) that is a command
662 # writing to stdout a FORMAT-tarball containing the directory
663 # $tardir.
664 #     tardir=directory && $(am__tar) > result.tar
666 # Substitute a variable $(am__untar) that extract such
667 # a tarball read from stdin.
668 #     $(am__untar) < result.tar
669 AC_DEFUN([_AM_PROG_TAR],
670 [# Always define AMTAR for backward compatibility.
671 AM_MISSING_PROG([AMTAR], [tar])
672 m4_if([$1], [v7],
673      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
674      [m4_case([$1], [ustar],, [pax],,
675               [m4_fatal([Unknown tar format])])
676 AC_MSG_CHECKING([how to create a $1 tar archive])
677 # Loop over all known methods to create a tar archive until one works.
678 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
679 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
680 # Do not fold the above two line into one, because Tru64 sh and
681 # Solaris sh will not grok spaces in the rhs of `-'.
682 for _am_tool in $_am_tools
684   case $_am_tool in
685   gnutar)
686     for _am_tar in tar gnutar gtar;
687     do
688       AM_RUN_LOG([$_am_tar --version]) && break
689     done
690     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
691     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
692     am__untar="$_am_tar -xf -"
693     ;;
694   plaintar)
695     # Must skip GNU tar: if it does not support --format= it doesn't create
696     # ustar tarball either.
697     (tar --version) >/dev/null 2>&1 && continue
698     am__tar='tar chf - "$$tardir"'
699     am__tar_='tar chf - "$tardir"'
700     am__untar='tar xf -'
701     ;;
702   pax)
703     am__tar='pax -L -x $1 -w "$$tardir"'
704     am__tar_='pax -L -x $1 -w "$tardir"'
705     am__untar='pax -r'
706     ;;
707   cpio)
708     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
709     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
710     am__untar='cpio -i -H $1 -d'
711     ;;
712   none)
713     am__tar=false
714     am__tar_=false
715     am__untar=false
716     ;;
717   esac
719   # If the value was cached, stop now.  We just wanted to have am__tar
720   # and am__untar set.
721   test -n "${am_cv_prog_tar_$1}" && break
723   # tar/untar a dummy directory, and stop if the command works
724   rm -rf conftest.dir
725   mkdir conftest.dir
726   echo GrepMe > conftest.dir/file
727   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
728   rm -rf conftest.dir
729   if test -s conftest.tar; then
730     AM_RUN_LOG([$am__untar <conftest.tar])
731     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
732   fi
733 done
734 rm -rf conftest.dir
736 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
737 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
738 AC_SUBST([am__tar])
739 AC_SUBST([am__untar])
740 ]) # _AM_PROG_TAR