New build path variable
[freeradius.git] / libltdl / aclocal.m4
1 # generated automatically by aclocal 1.9a -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005  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 # Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
15 #
16 # This file is free software; the Free Software Foundation
17 # gives unlimited permission to copy and/or distribute it,
18 # with or without modifications, as long as this notice is preserved.
19
20 # AM_AUTOMAKE_VERSION(VERSION)
21 # ----------------------------
22 # Automake X.Y traces this macro to ensure aclocal.m4 has been
23 # generated from the m4 files accompanying Automake X.Y.
24 # (This private macro should not be called outside this file.)
25 AC_DEFUN([AM_AUTOMAKE_VERSION],
26 [am__api_version='1.9a'
27 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
28 dnl require some minimum version.  Point them to the right macro.
29 m4_if([$1], [1.9a], [],
30       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
31 ])
32
33 # AM_SET_CURRENT_AUTOMAKE_VERSION
34 # -------------------------------
35 # Call AM_AUTOMAKE_VERSION so it can be traced.
36 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
37 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
38          [AM_AUTOMAKE_VERSION([1.9a])])
39
40 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
41
42 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
43 #
44 # This file is free software; the Free Software Foundation
45 # gives unlimited permission to copy and/or distribute it,
46 # with or without modifications, as long as this notice is preserved.
47
48 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
49 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
50 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
51 #
52 # Of course, Automake must honor this variable whenever it calls a
53 # tool from the auxiliary directory.  The problem is that $srcdir (and
54 # therefore $ac_aux_dir as well) can be either absolute or relative,
55 # depending on how configure is run.  This is pretty annoying, since
56 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
57 # source directory, any form will work fine, but in subdirectories a
58 # relative path needs to be adjusted first.
59 #
60 # $ac_aux_dir/missing
61 #    fails when called from a subdirectory if $ac_aux_dir is relative
62 # $top_srcdir/$ac_aux_dir/missing
63 #    fails if $ac_aux_dir is absolute,
64 #    fails when called from a subdirectory in a VPATH build with
65 #          a relative $ac_aux_dir
66 #
67 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
68 # are both prefixed by $srcdir.  In an in-source build this is usually
69 # harmless because $srcdir is `.', but things will broke when you
70 # start a VPATH build or use an absolute $srcdir.
71 #
72 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
73 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
74 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
75 # and then we would define $MISSING as
76 #   MISSING="\${SHELL} $am_aux_dir/missing"
77 # This will work as long as MISSING is not called from configure, because
78 # unfortunately $(top_srcdir) has no meaning in configure.
79 # However there are other variables, like CC, which are often used in
80 # configure, and could therefore not use this "fixed" $ac_aux_dir.
81 #
82 # Another solution, used here, is to always expand $ac_aux_dir to an
83 # absolute PATH.  The drawback is that using absolute paths prevent a
84 # configured tree to be moved without reconfiguration.
85
86 AC_DEFUN([AM_AUX_DIR_EXPAND],
87 [dnl Rely on autoconf to set up CDPATH properly.
88 AC_PREREQ([2.50])dnl
89 # expand $ac_aux_dir to an absolute path
90 am_aux_dir=`cd $ac_aux_dir && pwd`
91 ])
92
93 # AM_CONDITIONAL                                            -*- Autoconf -*-
94
95 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
96 # Free Software Foundation, Inc.
97 #
98 # This file is free software; the Free Software Foundation
99 # gives unlimited permission to copy and/or distribute it,
100 # with or without modifications, as long as this notice is preserved.
101
102 # serial 7
103
104 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
105 # -------------------------------------
106 # Define a conditional.
107 AC_DEFUN([AM_CONDITIONAL],
108 [AC_PREREQ(2.52)dnl
109  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
110         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
111 AC_SUBST([$1_TRUE])
112 AC_SUBST([$1_FALSE])
113 if $2; then
114   $1_TRUE=
115   $1_FALSE='#'
116 else
117   $1_TRUE='#'
118   $1_FALSE=
119 fi
120 AC_CONFIG_COMMANDS_PRE(
121 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
122   AC_MSG_ERROR([[conditional "$1" was never defined.
123 Usually this means the macro was only invoked conditionally.]])
124 fi])])
125
126
127 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
128 # Free Software Foundation, Inc.
129 #
130 # This file is free software; the Free Software Foundation
131 # gives unlimited permission to copy and/or distribute it,
132 # with or without modifications, as long as this notice is preserved.
133
134 # serial 8
135
136 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
137 # written in clear, in which case automake, when reading aclocal.m4,
138 # will think it sees a *use*, and therefore will trigger all it's
139 # C support machinery.  Also note that it means that autoscan, seeing
140 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
141
142
143 # _AM_DEPENDENCIES(NAME)
144 # ----------------------
145 # See how the compiler implements dependency checking.
146 # NAME is "CC", "CXX", "GCJ", or "OBJC".
147 # We try a few techniques and use that to set a single cache variable.
148 #
149 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
150 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
151 # dependency, and given that the user is not expected to run this macro,
152 # just rely on AC_PROG_CC.
153 AC_DEFUN([_AM_DEPENDENCIES],
154 [AC_REQUIRE([AM_SET_DEPDIR])dnl
155 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
156 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
157 AC_REQUIRE([AM_DEP_TRACK])dnl
158
159 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
160        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
161        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
162        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
163                    [depcc="$$1"   am_compiler_list=])
164
165 AC_CACHE_CHECK([dependency style of $depcc],
166                [am_cv_$1_dependencies_compiler_type],
167 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
168   # We make a subdir and do the tests there.  Otherwise we can end up
169   # making bogus files that we don't know about and never remove.  For
170   # instance it was reported that on HP-UX the gcc test will end up
171   # making a dummy file named `D' -- because `-MD' means `put the output
172   # in D'.
173   mkdir conftest.dir
174   # Copy depcomp to subdir because otherwise we won't find it if we're
175   # using a relative directory.
176   cp "$am_depcomp" conftest.dir
177   cd conftest.dir
178   # We will build objects and dependencies in a subdirectory because
179   # it helps to detect inapplicable dependency modes.  For instance
180   # both Tru64's cc and ICC support -MD to output dependencies as a
181   # side effect of compilation, but ICC will put the dependencies in
182   # the current directory while Tru64 will put them in the object
183   # directory.
184   mkdir sub
185
186   am_cv_$1_dependencies_compiler_type=none
187   if test "$am_compiler_list" = ""; then
188      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
189   fi
190   for depmode in $am_compiler_list; do
191     # Setup a source with many dependencies, because some compilers
192     # like to wrap large dependency lists on column 80 (with \), and
193     # we should not choose a depcomp mode which is confused by this.
194     #
195     # We need to recreate these files for each test, as the compiler may
196     # overwrite some of them when testing with obscure command lines.
197     # This happens at least with the AIX C compiler.
198     : > sub/conftest.c
199     for i in 1 2 3 4 5 6; do
200       echo '#include "conftst'$i'.h"' >> sub/conftest.c
201       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
202       # Solaris 8's {/usr,}/bin/sh.
203       touch sub/conftst$i.h
204     done
205     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
206
207     case $depmode in
208     nosideeffect)
209       # after this tag, mechanisms are not by side-effect, so they'll
210       # only be used when explicitly requested
211       if test "x$enable_dependency_tracking" = xyes; then
212         continue
213       else
214         break
215       fi
216       ;;
217     none) break ;;
218     esac
219     # We check with `-c' and `-o' for the sake of the "dashmstdout"
220     # mode.  It turns out that the SunPro C++ compiler does not properly
221     # handle `-M -o', and we need to detect this.
222     if depmode=$depmode \
223        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
224        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
225        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
226          >/dev/null 2>conftest.err &&
227        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
228        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
229        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
230       # icc doesn't choke on unknown options, it will just issue warnings
231       # or remarks (even with -Werror).  So we grep stderr for any message
232       # that says an option was ignored or not supported.
233       # When given -MP, icc 7.0 and 7.1 complain thusly:
234       #   icc: Command line warning: ignoring option '-M'; no argument required
235       # The diagnosis changed in icc 8.0:
236       #   icc: Command line remark: option '-MP' not supported
237       if (grep 'ignoring option' conftest.err ||
238           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
239         am_cv_$1_dependencies_compiler_type=$depmode
240         break
241       fi
242     fi
243   done
244
245   cd ..
246   rm -rf conftest.dir
247 else
248   am_cv_$1_dependencies_compiler_type=none
249 fi
250 ])
251 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
252 AM_CONDITIONAL([am__fastdep$1], [
253   test "x$enable_dependency_tracking" != xno \
254   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
255 ])
256
257
258 # AM_SET_DEPDIR
259 # -------------
260 # Choose a directory name for dependency files.
261 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
262 AC_DEFUN([AM_SET_DEPDIR],
263 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
264 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
265 ])
266
267
268 # AM_DEP_TRACK
269 # ------------
270 AC_DEFUN([AM_DEP_TRACK],
271 [AC_ARG_ENABLE(dependency-tracking,
272 [  --disable-dependency-tracking  speeds up one-time build
273   --enable-dependency-tracking   do not reject slow dependency extractors])
274 if test "x$enable_dependency_tracking" != xno; then
275   am_depcomp="$ac_aux_dir/depcomp"
276   AMDEPBACKSLASH='\'
277 fi
278 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
279 AC_SUBST([AMDEPBACKSLASH])
280 ])
281
282 # Generate code to set up dependency tracking.              -*- Autoconf -*-
283
284 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
285 # Free Software Foundation, Inc.
286 #
287 # This file is free software; the Free Software Foundation
288 # gives unlimited permission to copy and/or distribute it,
289 # with or without modifications, as long as this notice is preserved.
290
291 #serial 3
292
293 # _AM_OUTPUT_DEPENDENCY_COMMANDS
294 # ------------------------------
295 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
296 [for mf in $CONFIG_FILES; do
297   # Strip MF so we end up with the name of the file.
298   mf=`echo "$mf" | sed -e 's/:.*$//'`
299   # Check whether this is an Automake generated Makefile or not.
300   # We used to match only the files named `Makefile.in', but
301   # some people rename them; so instead we look at the file content.
302   # Grep'ing the first line is not enough: some people post-process
303   # each Makefile.in and add a new line on top of each file to say so.
304   # So let's grep whole file.
305   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
306     dirpart=`AS_DIRNAME("$mf")`
307   else
308     continue
309   fi
310   # Extract the definition of DEPDIR, am__include, and am__quote
311   # from the Makefile without running `make'.
312   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
313   test -z "$DEPDIR" && continue
314   am__include=`sed -n 's/^am__include = //p' < "$mf"`
315   test -z "am__include" && continue
316   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
317   # When using ansi2knr, U may be empty or an underscore; expand it
318   U=`sed -n 's/^U = //p' < "$mf"`
319   # Find all dependency output files, they are included files with
320   # $(DEPDIR) in their names.  We invoke sed twice because it is the
321   # simplest approach to changing $(DEPDIR) to its actual value in the
322   # expansion.
323   for file in `sed -n "
324     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
325        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
326     # Make sure the directory exists.
327     test -f "$dirpart/$file" && continue
328     fdir=`AS_DIRNAME(["$file"])`
329     AS_MKDIR_P([$dirpart/$fdir])
330     # echo "creating $dirpart/$file"
331     echo '# dummy' > "$dirpart/$file"
332   done
333 done
334 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
335
336
337 # AM_OUTPUT_DEPENDENCY_COMMANDS
338 # -----------------------------
339 # This macro should only be invoked once -- use via AC_REQUIRE.
340 #
341 # This code is only required when automatic dependency tracking
342 # is enabled.  FIXME.  This creates each `.P' file that we will
343 # need in order to bootstrap the dependency handling code.
344 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
345 [AC_CONFIG_COMMANDS([depfiles],
346      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
347      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
348 ])
349
350 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
351 # Free Software Foundation, Inc.
352 #
353 # This file is free software; the Free Software Foundation
354 # gives unlimited permission to copy and/or distribute it,
355 # with or without modifications, as long as this notice is preserved.
356
357 # serial 8
358
359 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
360 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
361
362 # Do all the work for Automake.                             -*- Autoconf -*-
363
364 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
365 # Free Software Foundation, Inc.
366 #
367 # This file is free software; the Free Software Foundation
368 # gives unlimited permission to copy and/or distribute it,
369 # with or without modifications, as long as this notice is preserved.
370
371 # serial 12
372
373 # This macro actually does too much.  Some checks are only needed if
374 # your package does certain things.  But this isn't really a big deal.
375
376 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
377 # AM_INIT_AUTOMAKE([OPTIONS])
378 # -----------------------------------------------
379 # The call with PACKAGE and VERSION arguments is the old style
380 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
381 # and VERSION should now be passed to AC_INIT and removed from
382 # the call to AM_INIT_AUTOMAKE.
383 # We support both call styles for the transition.  After
384 # the next Automake release, Autoconf can make the AC_INIT
385 # arguments mandatory, and then we can depend on a new Autoconf
386 # release and drop the old call support.
387 AC_DEFUN([AM_INIT_AUTOMAKE],
388 [AC_PREREQ([2.59c])dnl
389 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
390 dnl the ones we care about.
391 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
392 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
393 AC_REQUIRE([AC_PROG_INSTALL])dnl
394 # test to see if srcdir already configured
395 if test "`cd $srcdir && pwd`" != "`pwd`" &&
396    test -f $srcdir/config.status; then
397   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
398 fi
399
400 # test whether we have cygpath
401 if test -z "$CYGPATH_W"; then
402   if (cygpath --version) >/dev/null 2>/dev/null; then
403     CYGPATH_W='cygpath -w'
404   else
405     CYGPATH_W=echo
406   fi
407 fi
408 AC_SUBST([CYGPATH_W])
409
410 # Define the identity of the package.
411 dnl Distinguish between old-style and new-style calls.
412 m4_ifval([$2],
413 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
414  AC_SUBST([PACKAGE], [$1])dnl
415  AC_SUBST([VERSION], [$2])],
416 [_AM_SET_OPTIONS([$1])dnl
417  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
418  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
419
420 _AM_IF_OPTION([no-define],,
421 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
422  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
423
424 # Some tools Automake needs.
425 AC_REQUIRE([AM_SANITY_CHECK])dnl
426 AC_REQUIRE([AC_ARG_PROGRAM])dnl
427 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
428 AM_MISSING_PROG(AUTOCONF, autoconf)
429 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
430 AM_MISSING_PROG(AUTOHEADER, autoheader)
431 AM_MISSING_PROG(MAKEINFO, makeinfo)
432 AM_PROG_INSTALL_SH
433 AM_PROG_INSTALL_STRIP
434 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
435 # We need awk for the "check" target.  The system "awk" is bad on
436 # some platforms.
437 AC_REQUIRE([AC_PROG_AWK])dnl
438 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
439 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
440 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
441               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
442                              [_AM_PROG_TAR([v7])])])
443 _AM_IF_OPTION([no-dependencies],,
444 [AC_PROVIDE_IFELSE([AC_PROG_CC],
445                   [_AM_DEPENDENCIES(CC)],
446                   [define([AC_PROG_CC],
447                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
448 AC_PROVIDE_IFELSE([AC_PROG_CXX],
449                   [_AM_DEPENDENCIES(CXX)],
450                   [define([AC_PROG_CXX],
451                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
452 ])
453 ])
454
455
456 # When config.status generates a header, we must update the stamp-h file.
457 # This file resides in the same directory as the config header
458 # that is generated.  The stamp files are numbered to have different names.
459
460 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
461 # loop where config.status creates the headers, so we can generate
462 # our stamp files there.
463 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
464 [# Compute $1's index in $config_headers.
465 _am_stamp_count=1
466 for _am_header in $config_headers :; do
467   case $_am_header in
468     $1 | $1:* )
469       break ;;
470     * )
471       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
472   esac
473 done
474 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
475
476 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
477 #
478 # This file is free software; the Free Software Foundation
479 # gives unlimited permission to copy and/or distribute it,
480 # with or without modifications, as long as this notice is preserved.
481
482 # AM_PROG_INSTALL_SH
483 # ------------------
484 # Define $install_sh.
485 AC_DEFUN([AM_PROG_INSTALL_SH],
486 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
487 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
488 AC_SUBST(install_sh)])
489
490 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
491 #
492 # This file is free software; the Free Software Foundation
493 # gives unlimited permission to copy and/or distribute it,
494 # with or without modifications, as long as this notice is preserved.
495
496 # serial 2
497
498 # Check whether the underlying file-system supports filenames
499 # with a leading dot.  For instance MS-DOS doesn't.
500 AC_DEFUN([AM_SET_LEADING_DOT],
501 [rm -rf .tst 2>/dev/null
502 mkdir .tst 2>/dev/null
503 if test -d .tst; then
504   am__leading_dot=.
505 else
506   am__leading_dot=_
507 fi
508 rmdir .tst 2>/dev/null
509 AC_SUBST([am__leading_dot])])
510
511 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
512
513 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
514 #
515 # This file is free software; the Free Software Foundation
516 # gives unlimited permission to copy and/or distribute it,
517 # with or without modifications, as long as this notice is preserved.
518
519 # serial 3
520
521 # AM_MAKE_INCLUDE()
522 # -----------------
523 # Check to see how make treats includes.
524 AC_DEFUN([AM_MAKE_INCLUDE],
525 [am_make=${MAKE-make}
526 cat > confinc << 'END'
527 am__doit:
528         @echo done
529 .PHONY: am__doit
530 END
531 # If we don't find an include directive, just comment out the code.
532 AC_MSG_CHECKING([for style of include used by $am_make])
533 am__include="#"
534 am__quote=
535 _am_result=none
536 # First try GNU make style include.
537 echo "include confinc" > confmf
538 # We grep out `Entering directory' and `Leaving directory'
539 # messages which can occur if `w' ends up in MAKEFLAGS.
540 # In particular we don't look at `^make:' because GNU make might
541 # be invoked under some other name (usually "gmake"), in which
542 # case it prints its new name instead of `make'.
543 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
544    am__include=include
545    am__quote=
546    _am_result=GNU
547 fi
548 # Now try BSD make style include.
549 if test "$am__include" = "#"; then
550    echo '.include "confinc"' > confmf
551    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
552       am__include=.include
553       am__quote="\""
554       _am_result=BSD
555    fi
556 fi
557 AC_SUBST([am__include])
558 AC_SUBST([am__quote])
559 AC_MSG_RESULT([$_am_result])
560 rm -f confinc confmf
561 ])
562
563 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
564
565 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
566 # Free Software Foundation, Inc.
567 #
568 # This file is free software; the Free Software Foundation
569 # gives unlimited permission to copy and/or distribute it,
570 # with or without modifications, as long as this notice is preserved.
571
572 # serial 5
573
574 # AM_MISSING_PROG(NAME, PROGRAM)
575 # ------------------------------
576 AC_DEFUN([AM_MISSING_PROG],
577 [AC_REQUIRE([AM_MISSING_HAS_RUN])
578 $1=${$1-"${am_missing_run}$2"}
579 AC_SUBST($1)])
580
581
582 # AM_MISSING_HAS_RUN
583 # ------------------
584 # Define MISSING if not defined so far and test if it supports --run.
585 # If it does, set am_missing_run to use it, otherwise, to nothing.
586 AC_DEFUN([AM_MISSING_HAS_RUN],
587 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
588 AC_REQUIRE_AUX_FILE([missing])dnl
589 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
590 # Use eval to expand $SHELL
591 if eval "$MISSING --run true"; then
592   am_missing_run="$MISSING --run "
593 else
594   am_missing_run=
595   AC_MSG_WARN([`missing' script is too old or missing])
596 fi
597 ])
598
599 # Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
600 #
601 # This file is free software; the Free Software Foundation
602 # gives unlimited permission to copy and/or distribute it,
603 # with or without modifications, as long as this notice is preserved.
604
605 # AM_PROG_MKDIR_P
606 # ---------------
607 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
608 #
609 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
610 # created by `make install' are always world readable, even if the
611 # installer happens to have an overly restrictive umask (e.g. 077).
612 # This was a mistake.  There are at least two reasons why we must not
613 # use `-m 0755':
614 #   - it causes special bits like SGID to be ignored,
615 #   - it may be too restrictive (some setups expect 775 directories).
616 #
617 # Do not use -m 0755 and let people choose whatever they expect by
618 # setting umask.
619 #
620 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
621 # Some implementations (such as Solaris 8's) are not thread-safe: if a
622 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
623 # concurrently, both version can detect that a/ is missing, but only
624 # one can create it and the other will error out.  Consequently we
625 # restrict ourselves to GNU mkdir (using the --version option ensures
626 # this.)
627 AC_DEFUN([AM_PROG_MKDIR_P],
628 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
629   # We used to define $(mkdir_p) as `mkdir -p -- .', in order to
630   # allow $(mkdir_p) to be used without argument.  As in
631   #   $(mkdir_p) $(somedir)
632   # where $(somedir) is conditionally defined.  However we don't do
633   # that anymore.
634   #  1. before we restricted the check to GNU mkdir, `mkdir -p .' was
635   #     reported to fail in read-only directories.  The system where this
636   #     happened has been forgotten.
637   #  2. in practice we call $(mkdir_p) on directories such as
638   #       $(mkdir_p) "$(DESTDIR)$(somedir)"
639   #     and we don't want to create $(DESTDIR) if $(somedir) is empty.
640   #     To support the latter case, we have to write
641   #       test -z "$(somedir)" || $(mkdir_p) "$(DESTDIR)$(somedir)"
642   #     so $(mkdir_p) always has an argument.
643   #     We will have better chances of detecting a missing test if
644   #     $(mkdir_p) complains about missing arguments.
645   #  3. $(mkdir_p) is named after `mkdir -p' and we don't expect this
646   #     to accept no argument.
647   #  4. having something like `mkdir .' in the output is unsightly.
648   mkdir_p='mkdir -p --'
649 else
650   # On NextStep and OpenStep, the `mkdir' command does not
651   # recognize any option.  It will interpret all options as
652   # directories to create.
653   for d in ./-p ./--version;
654   do
655     test -d $d && rmdir $d
656   done
657   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
658   if test -f "$ac_aux_dir/mkinstalldirs"; then
659     mkdir_p='$(mkinstalldirs)'
660   else
661     mkdir_p='$(install_sh) -d'
662   fi
663 fi
664 AC_SUBST([mkdir_p])])
665
666 # Helper functions for option handling.                     -*- Autoconf -*-
667
668 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
669 #
670 # This file is free software; the Free Software Foundation
671 # gives unlimited permission to copy and/or distribute it,
672 # with or without modifications, as long as this notice is preserved.
673
674 # serial 3
675
676 # _AM_MANGLE_OPTION(NAME)
677 # -----------------------
678 AC_DEFUN([_AM_MANGLE_OPTION],
679 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
680
681 # _AM_SET_OPTION(NAME)
682 # ------------------------------
683 # Set option NAME.  Presently that only means defining a flag for this option.
684 AC_DEFUN([_AM_SET_OPTION],
685 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
686
687 # _AM_SET_OPTIONS(OPTIONS)
688 # ----------------------------------
689 # OPTIONS is a space-separated list of Automake options.
690 AC_DEFUN([_AM_SET_OPTIONS],
691 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
692
693 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
694 # -------------------------------------------
695 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
696 AC_DEFUN([_AM_IF_OPTION],
697 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
698
699 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
700
701 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
702 # Free Software Foundation, Inc.
703 #
704 # This file is free software; the Free Software Foundation
705 # gives unlimited permission to copy and/or distribute it,
706 # with or without modifications, as long as this notice is preserved.
707
708 # serial 4
709
710 # AM_SANITY_CHECK
711 # ---------------
712 AC_DEFUN([AM_SANITY_CHECK],
713 [AC_MSG_CHECKING([whether build environment is sane])
714 # Just in case
715 sleep 1
716 echo timestamp > conftest.file
717 # Do `set' in a subshell so we don't clobber the current shell's
718 # arguments.  Must try -L first in case configure is actually a
719 # symlink; some systems play weird games with the mod time of symlinks
720 # (eg FreeBSD returns the mod time of the symlink's containing
721 # directory).
722 if (
723    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
724    if test "$[*]" = "X"; then
725       # -L didn't work.
726       set X `ls -t $srcdir/configure conftest.file`
727    fi
728    rm -f conftest.file
729    if test "$[*]" != "X $srcdir/configure conftest.file" \
730       && test "$[*]" != "X conftest.file $srcdir/configure"; then
731
732       # If neither matched, then we have a broken ls.  This can happen
733       # if, for instance, CONFIG_SHELL is bash and it inherits a
734       # broken ls alias from the environment.  This has actually
735       # happened.  Such a system could not be considered "sane".
736       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
737 alias in your environment])
738    fi
739
740    test "$[2]" = conftest.file
741    )
742 then
743    # Ok.
744    :
745 else
746    AC_MSG_ERROR([newly created file is older than distributed files!
747 Check your system clock])
748 fi
749 AC_MSG_RESULT(yes)])
750
751 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
752 #
753 # This file is free software; the Free Software Foundation
754 # gives unlimited permission to copy and/or distribute it,
755 # with or without modifications, as long as this notice is preserved.
756
757 # AM_PROG_INSTALL_STRIP
758 # ---------------------
759 # One issue with vendor `install' (even GNU) is that you can't
760 # specify the program used to strip binaries.  This is especially
761 # annoying in cross-compiling environments, where the build's strip
762 # is unlikely to handle the host's binaries.
763 # Fortunately install-sh will honor a STRIPPROG variable, so we
764 # always use install-sh in `make install-strip', and initialize
765 # STRIPPROG with the value of the STRIP variable (set by the user).
766 AC_DEFUN([AM_PROG_INSTALL_STRIP],
767 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
768 # Installed binaries are usually stripped using `strip' when the user
769 # run `make install-strip'.  However `strip' might not be the right
770 # tool to use in cross-compilation environments, therefore Automake
771 # will honor the `STRIP' environment variable to overrule this program.
772 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
773 if test "$cross_compiling" != no; then
774   AC_CHECK_TOOL([STRIP], [strip], :)
775 fi
776 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
777 AC_SUBST([INSTALL_STRIP_PROGRAM])])
778
779 # Check how to create a tarball.                            -*- Autoconf -*-
780
781 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
782 #
783 # This file is free software; the Free Software Foundation
784 # gives unlimited permission to copy and/or distribute it,
785 # with or without modifications, as long as this notice is preserved.
786
787 # serial 2
788
789 # _AM_PROG_TAR(FORMAT)
790 # --------------------
791 # Check how to create a tarball in format FORMAT.
792 # FORMAT should be one of `v7', `ustar', or `pax'.
793 #
794 # Substitute a variable $(am__tar) that is a command
795 # writing to stdout a FORMAT-tarball containing the directory
796 # $tardir.
797 #     tardir=directory && $(am__tar) > result.tar
798 #
799 # Substitute a variable $(am__untar) that extract such
800 # a tarball read from stdin.
801 #     $(am__untar) < result.tar
802 AC_DEFUN([_AM_PROG_TAR],
803 [# Always define AMTAR for backward compatibility.
804 AM_MISSING_PROG([AMTAR], [tar])
805 m4_if([$1], [v7],
806      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
807      [m4_case([$1], [ustar],, [pax],,
808               [m4_fatal([Unknown tar format])])
809 AC_MSG_CHECKING([how to create a $1 tar archive])
810 # Loop over all known methods to create a tar archive until one works.
811 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
812 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
813 # Do not fold the above two line into one, because Tru64 sh and
814 # Solaris sh will not grok spaces in the rhs of `-'.
815 for _am_tool in $_am_tools
816 do
817   case $_am_tool in
818   gnutar)
819     for _am_tar in tar gnutar gtar;
820     do
821       AM_RUN_LOG([$_am_tar --version]) && break
822     done
823     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
824     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
825     am__untar="$_am_tar -xf -"
826     ;;
827   plaintar)
828     # Must skip GNU tar: if it does not support --format= it doesn't create
829     # ustar tarball either.
830     (tar --version) >/dev/null 2>&1 && continue
831     am__tar='tar chf - "$$tardir"'
832     am__tar_='tar chf - "$tardir"'
833     am__untar='tar xf -'
834     ;;
835   pax)
836     am__tar='pax -L -x $1 -w "$$tardir"'
837     am__tar_='pax -L -x $1 -w "$tardir"'
838     am__untar='pax -r'
839     ;;
840   cpio)
841     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
842     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
843     am__untar='cpio -i -H $1 -d'
844     ;;
845   none)
846     am__tar=false
847     am__tar_=false
848     am__untar=false
849     ;;
850   esac
851
852   # If the value was cached, stop now.  We just wanted to have am__tar
853   # and am__untar set.
854   test -n "${am_cv_prog_tar_$1}" && break
855
856   # tar/untar a dummy directory, and stop if the command works
857   rm -rf conftest.dir
858   mkdir conftest.dir
859   echo GrepMe > conftest.dir/file
860   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
861   rm -rf conftest.dir
862   if test -s conftest.tar; then
863     AM_RUN_LOG([$am__untar <conftest.tar])
864     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
865   fi
866 done
867 rm -rf conftest.dir
868
869 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
870 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
871 AC_SUBST([am__tar])
872 AC_SUBST([am__untar])
873 ]) # _AM_PROG_TAR
874
875 m4_include([acinclude.m4])