masqmail-0.2

view aclocal.m4 @ 27:3654c502a4df

g_malloc terminates the program on failure automatically
author meillo@marmaro.de
date Thu, 06 May 2010 11:50:40 +0200
parents 08114f7dcc23
children 9cb4031fa5e0
line source
1 # generated automatically by aclocal 1.7.9 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # 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 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
16 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
18 # This program is free software; you can redistribute it and/or modify
19 # it under the terms of the GNU General Public License as published by
20 # the Free Software Foundation; either version 2, or (at your option)
21 # any later version.
23 # This program is distributed in the hope that it will be useful,
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 # GNU General Public License for more details.
28 # You should have received a copy of the GNU General Public License
29 # along with this program; if not, write to the Free Software
30 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31 # 02111-1307, USA.
33 AC_PREREQ([2.52])
35 # serial 6
37 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
38 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
40 # Do all the work for Automake. -*- Autoconf -*-
42 # This macro actually does too much some checks are only needed if
43 # your package does certain things. But this isn't really a big deal.
45 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
46 # Free Software Foundation, Inc.
48 # This program is free software; you can redistribute it and/or modify
49 # it under the terms of the GNU General Public License as published by
50 # the Free Software Foundation; either version 2, or (at your option)
51 # any later version.
53 # This program is distributed in the hope that it will be useful,
54 # but WITHOUT ANY WARRANTY; without even the implied warranty of
55 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56 # GNU General Public License for more details.
58 # You should have received a copy of the GNU General Public License
59 # along with this program; if not, write to the Free Software
60 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
61 # 02111-1307, USA.
63 # serial 10
65 AC_PREREQ([2.54])
67 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
68 # the ones we care about.
69 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
71 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
72 # AM_INIT_AUTOMAKE([OPTIONS])
73 # -----------------------------------------------
74 # The call with PACKAGE and VERSION arguments is the old style
75 # call (pre autoconf-2.50), which is being phased out. PACKAGE
76 # and VERSION should now be passed to AC_INIT and removed from
77 # the call to AM_INIT_AUTOMAKE.
78 # We support both call styles for the transition. After
79 # the next Automake release, Autoconf can make the AC_INIT
80 # arguments mandatory, and then we can depend on a new Autoconf
81 # release and drop the old call support.
82 AC_DEFUN([AM_INIT_AUTOMAKE],
83 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
84 AC_REQUIRE([AC_PROG_INSTALL])dnl
85 # test to see if srcdir already configured
86 if test "`cd $srcdir && pwd`" != "`pwd`" &&
87 test -f $srcdir/config.status; then
88 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
89 fi
91 # test whether we have cygpath
92 if test -z "$CYGPATH_W"; then
93 if (cygpath --version) >/dev/null 2>/dev/null; then
94 CYGPATH_W='cygpath -w'
95 else
96 CYGPATH_W=echo
97 fi
98 fi
99 AC_SUBST([CYGPATH_W])
101 # Define the identity of the package.
102 dnl Distinguish between old-style and new-style calls.
103 m4_ifval([$2],
104 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
105 AC_SUBST([PACKAGE], [$1])dnl
106 AC_SUBST([VERSION], [$2])],
107 [_AM_SET_OPTIONS([$1])dnl
108 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
109 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
111 _AM_IF_OPTION([no-define],,
112 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
113 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
115 # Some tools Automake needs.
116 AC_REQUIRE([AM_SANITY_CHECK])dnl
117 AC_REQUIRE([AC_ARG_PROGRAM])dnl
118 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
119 AM_MISSING_PROG(AUTOCONF, autoconf)
120 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
121 AM_MISSING_PROG(AUTOHEADER, autoheader)
122 AM_MISSING_PROG(MAKEINFO, makeinfo)
123 AM_MISSING_PROG(AMTAR, tar)
124 AM_PROG_INSTALL_SH
125 AM_PROG_INSTALL_STRIP
126 # We need awk for the "check" target. The system "awk" is bad on
127 # some platforms.
128 AC_REQUIRE([AC_PROG_AWK])dnl
129 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
130 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
132 _AM_IF_OPTION([no-dependencies],,
133 [AC_PROVIDE_IFELSE([AC_PROG_CC],
134 [_AM_DEPENDENCIES(CC)],
135 [define([AC_PROG_CC],
136 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
137 AC_PROVIDE_IFELSE([AC_PROG_CXX],
138 [_AM_DEPENDENCIES(CXX)],
139 [define([AC_PROG_CXX],
140 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
141 ])
142 ])
145 # When config.status generates a header, we must update the stamp-h file.
146 # This file resides in the same directory as the config header
147 # that is generated. The stamp files are numbered to have different names.
149 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
150 # loop where config.status creates the headers, so we can generate
151 # our stamp files there.
152 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
153 [# Compute $1's index in $config_headers.
154 _am_stamp_count=1
155 for _am_header in $config_headers :; do
156 case $_am_header in
157 $1 | $1:* )
158 break ;;
159 * )
160 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
161 esac
162 done
163 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
165 # Copyright 2002 Free Software Foundation, Inc.
167 # This program is free software; you can redistribute it and/or modify
168 # it under the terms of the GNU General Public License as published by
169 # the Free Software Foundation; either version 2, or (at your option)
170 # any later version.
172 # This program is distributed in the hope that it will be useful,
173 # but WITHOUT ANY WARRANTY; without even the implied warranty of
174 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
175 # GNU General Public License for more details.
177 # You should have received a copy of the GNU General Public License
178 # along with this program; if not, write to the Free Software
179 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
181 # AM_AUTOMAKE_VERSION(VERSION)
182 # ----------------------------
183 # Automake X.Y traces this macro to ensure aclocal.m4 has been
184 # generated from the m4 files accompanying Automake X.Y.
185 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
187 # AM_SET_CURRENT_AUTOMAKE_VERSION
188 # -------------------------------
189 # Call AM_AUTOMAKE_VERSION so it can be traced.
190 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
191 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
192 [AM_AUTOMAKE_VERSION([1.7.9])])
194 # Helper functions for option handling. -*- Autoconf -*-
196 # Copyright 2001, 2002 Free Software Foundation, Inc.
198 # This program is free software; you can redistribute it and/or modify
199 # it under the terms of the GNU General Public License as published by
200 # the Free Software Foundation; either version 2, or (at your option)
201 # any later version.
203 # This program is distributed in the hope that it will be useful,
204 # but WITHOUT ANY WARRANTY; without even the implied warranty of
205 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
206 # GNU General Public License for more details.
208 # You should have received a copy of the GNU General Public License
209 # along with this program; if not, write to the Free Software
210 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
211 # 02111-1307, USA.
213 # serial 2
215 # _AM_MANGLE_OPTION(NAME)
216 # -----------------------
217 AC_DEFUN([_AM_MANGLE_OPTION],
218 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
220 # _AM_SET_OPTION(NAME)
221 # ------------------------------
222 # Set option NAME. Presently that only means defining a flag for this option.
223 AC_DEFUN([_AM_SET_OPTION],
224 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
226 # _AM_SET_OPTIONS(OPTIONS)
227 # ----------------------------------
228 # OPTIONS is a space-separated list of Automake options.
229 AC_DEFUN([_AM_SET_OPTIONS],
230 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
232 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
233 # -------------------------------------------
234 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
235 AC_DEFUN([_AM_IF_OPTION],
236 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
238 #
239 # Check to make sure that the build environment is sane.
240 #
242 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
244 # This program is free software; you can redistribute it and/or modify
245 # it under the terms of the GNU General Public License as published by
246 # the Free Software Foundation; either version 2, or (at your option)
247 # any later version.
249 # This program is distributed in the hope that it will be useful,
250 # but WITHOUT ANY WARRANTY; without even the implied warranty of
251 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
252 # GNU General Public License for more details.
254 # You should have received a copy of the GNU General Public License
255 # along with this program; if not, write to the Free Software
256 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
257 # 02111-1307, USA.
259 # serial 3
261 # AM_SANITY_CHECK
262 # ---------------
263 AC_DEFUN([AM_SANITY_CHECK],
264 [AC_MSG_CHECKING([whether build environment is sane])
265 # Just in case
266 sleep 1
267 echo timestamp > conftest.file
268 # Do `set' in a subshell so we don't clobber the current shell's
269 # arguments. Must try -L first in case configure is actually a
270 # symlink; some systems play weird games with the mod time of symlinks
271 # (eg FreeBSD returns the mod time of the symlink's containing
272 # directory).
273 if (
274 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
275 if test "$[*]" = "X"; then
276 # -L didn't work.
277 set X `ls -t $srcdir/configure conftest.file`
278 fi
279 rm -f conftest.file
280 if test "$[*]" != "X $srcdir/configure conftest.file" \
281 && test "$[*]" != "X conftest.file $srcdir/configure"; then
283 # If neither matched, then we have a broken ls. This can happen
284 # if, for instance, CONFIG_SHELL is bash and it inherits a
285 # broken ls alias from the environment. This has actually
286 # happened. Such a system could not be considered "sane".
287 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
288 alias in your environment])
289 fi
291 test "$[2]" = conftest.file
292 )
293 then
294 # Ok.
295 :
296 else
297 AC_MSG_ERROR([newly created file is older than distributed files!
298 Check your system clock])
299 fi
300 AC_MSG_RESULT(yes)])
302 # -*- Autoconf -*-
305 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
307 # This program is free software; you can redistribute it and/or modify
308 # it under the terms of the GNU General Public License as published by
309 # the Free Software Foundation; either version 2, or (at your option)
310 # any later version.
312 # This program is distributed in the hope that it will be useful,
313 # but WITHOUT ANY WARRANTY; without even the implied warranty of
314 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
315 # GNU General Public License for more details.
317 # You should have received a copy of the GNU General Public License
318 # along with this program; if not, write to the Free Software
319 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
320 # 02111-1307, USA.
322 # serial 3
324 # AM_MISSING_PROG(NAME, PROGRAM)
325 # ------------------------------
326 AC_DEFUN([AM_MISSING_PROG],
327 [AC_REQUIRE([AM_MISSING_HAS_RUN])
328 $1=${$1-"${am_missing_run}$2"}
329 AC_SUBST($1)])
332 # AM_MISSING_HAS_RUN
333 # ------------------
334 # Define MISSING if not defined so far and test if it supports --run.
335 # If it does, set am_missing_run to use it, otherwise, to nothing.
336 AC_DEFUN([AM_MISSING_HAS_RUN],
337 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
338 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
339 # Use eval to expand $SHELL
340 if eval "$MISSING --run true"; then
341 am_missing_run="$MISSING --run "
342 else
343 am_missing_run=
344 AC_MSG_WARN([`missing' script is too old or missing])
345 fi
346 ])
348 # AM_AUX_DIR_EXPAND
350 # Copyright 2001 Free Software Foundation, Inc.
352 # This program is free software; you can redistribute it and/or modify
353 # it under the terms of the GNU General Public License as published by
354 # the Free Software Foundation; either version 2, or (at your option)
355 # any later version.
357 # This program is distributed in the hope that it will be useful,
358 # but WITHOUT ANY WARRANTY; without even the implied warranty of
359 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
360 # GNU General Public License for more details.
362 # You should have received a copy of the GNU General Public License
363 # along with this program; if not, write to the Free Software
364 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
365 # 02111-1307, USA.
367 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
368 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
369 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
370 #
371 # Of course, Automake must honor this variable whenever it calls a
372 # tool from the auxiliary directory. The problem is that $srcdir (and
373 # therefore $ac_aux_dir as well) can be either absolute or relative,
374 # depending on how configure is run. This is pretty annoying, since
375 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
376 # source directory, any form will work fine, but in subdirectories a
377 # relative path needs to be adjusted first.
378 #
379 # $ac_aux_dir/missing
380 # fails when called from a subdirectory if $ac_aux_dir is relative
381 # $top_srcdir/$ac_aux_dir/missing
382 # fails if $ac_aux_dir is absolute,
383 # fails when called from a subdirectory in a VPATH build with
384 # a relative $ac_aux_dir
385 #
386 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
387 # are both prefixed by $srcdir. In an in-source build this is usually
388 # harmless because $srcdir is `.', but things will broke when you
389 # start a VPATH build or use an absolute $srcdir.
390 #
391 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
392 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
393 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
394 # and then we would define $MISSING as
395 # MISSING="\${SHELL} $am_aux_dir/missing"
396 # This will work as long as MISSING is not called from configure, because
397 # unfortunately $(top_srcdir) has no meaning in configure.
398 # However there are other variables, like CC, which are often used in
399 # configure, and could therefore not use this "fixed" $ac_aux_dir.
400 #
401 # Another solution, used here, is to always expand $ac_aux_dir to an
402 # absolute PATH. The drawback is that using absolute paths prevent a
403 # configured tree to be moved without reconfiguration.
405 # Rely on autoconf to set up CDPATH properly.
406 AC_PREREQ([2.50])
408 AC_DEFUN([AM_AUX_DIR_EXPAND], [
409 # expand $ac_aux_dir to an absolute path
410 am_aux_dir=`cd $ac_aux_dir && pwd`
411 ])
413 # AM_PROG_INSTALL_SH
414 # ------------------
415 # Define $install_sh.
417 # Copyright 2001 Free Software Foundation, Inc.
419 # This program is free software; you can redistribute it and/or modify
420 # it under the terms of the GNU General Public License as published by
421 # the Free Software Foundation; either version 2, or (at your option)
422 # any later version.
424 # This program is distributed in the hope that it will be useful,
425 # but WITHOUT ANY WARRANTY; without even the implied warranty of
426 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
427 # GNU General Public License for more details.
429 # You should have received a copy of the GNU General Public License
430 # along with this program; if not, write to the Free Software
431 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
432 # 02111-1307, USA.
434 AC_DEFUN([AM_PROG_INSTALL_SH],
435 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
436 install_sh=${install_sh-"$am_aux_dir/install-sh"}
437 AC_SUBST(install_sh)])
439 # AM_PROG_INSTALL_STRIP
441 # Copyright 2001 Free Software Foundation, Inc.
443 # This program is free software; you can redistribute it and/or modify
444 # it under the terms of the GNU General Public License as published by
445 # the Free Software Foundation; either version 2, or (at your option)
446 # any later version.
448 # This program is distributed in the hope that it will be useful,
449 # but WITHOUT ANY WARRANTY; without even the implied warranty of
450 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
451 # GNU General Public License for more details.
453 # You should have received a copy of the GNU General Public License
454 # along with this program; if not, write to the Free Software
455 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
456 # 02111-1307, USA.
458 # One issue with vendor `install' (even GNU) is that you can't
459 # specify the program used to strip binaries. This is especially
460 # annoying in cross-compiling environments, where the build's strip
461 # is unlikely to handle the host's binaries.
462 # Fortunately install-sh will honor a STRIPPROG variable, so we
463 # always use install-sh in `make install-strip', and initialize
464 # STRIPPROG with the value of the STRIP variable (set by the user).
465 AC_DEFUN([AM_PROG_INSTALL_STRIP],
466 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
467 # Installed binaries are usually stripped using `strip' when the user
468 # run `make install-strip'. However `strip' might not be the right
469 # tool to use in cross-compilation environments, therefore Automake
470 # will honor the `STRIP' environment variable to overrule this program.
471 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
472 if test "$cross_compiling" != no; then
473 AC_CHECK_TOOL([STRIP], [strip], :)
474 fi
475 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
476 AC_SUBST([INSTALL_STRIP_PROGRAM])])
478 # -*- Autoconf -*-
479 # Copyright (C) 2003 Free Software Foundation, Inc.
481 # This program is free software; you can redistribute it and/or modify
482 # it under the terms of the GNU General Public License as published by
483 # the Free Software Foundation; either version 2, or (at your option)
484 # any later version.
486 # This program is distributed in the hope that it will be useful,
487 # but WITHOUT ANY WARRANTY; without even the implied warranty of
488 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
489 # GNU General Public License for more details.
491 # You should have received a copy of the GNU General Public License
492 # along with this program; if not, write to the Free Software
493 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
494 # 02111-1307, USA.
496 # serial 1
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])])
511 # serial 5 -*- Autoconf -*-
513 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
515 # This program is free software; you can redistribute it and/or modify
516 # it under the terms of the GNU General Public License as published by
517 # the Free Software Foundation; either version 2, or (at your option)
518 # any later version.
520 # This program is distributed in the hope that it will be useful,
521 # but WITHOUT ANY WARRANTY; without even the implied warranty of
522 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
523 # GNU General Public License for more details.
525 # You should have received a copy of the GNU General Public License
526 # along with this program; if not, write to the Free Software
527 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
528 # 02111-1307, USA.
531 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
532 # written in clear, in which case automake, when reading aclocal.m4,
533 # will think it sees a *use*, and therefore will trigger all it's
534 # C support machinery. Also note that it means that autoscan, seeing
535 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
539 # _AM_DEPENDENCIES(NAME)
540 # ----------------------
541 # See how the compiler implements dependency checking.
542 # NAME is "CC", "CXX", "GCJ", or "OBJC".
543 # We try a few techniques and use that to set a single cache variable.
544 #
545 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
546 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
547 # dependency, and given that the user is not expected to run this macro,
548 # just rely on AC_PROG_CC.
549 AC_DEFUN([_AM_DEPENDENCIES],
550 [AC_REQUIRE([AM_SET_DEPDIR])dnl
551 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
552 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
553 AC_REQUIRE([AM_DEP_TRACK])dnl
555 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
556 [$1], CXX, [depcc="$CXX" am_compiler_list=],
557 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
558 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
559 [depcc="$$1" am_compiler_list=])
561 AC_CACHE_CHECK([dependency style of $depcc],
562 [am_cv_$1_dependencies_compiler_type],
563 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
564 # We make a subdir and do the tests there. Otherwise we can end up
565 # making bogus files that we don't know about and never remove. For
566 # instance it was reported that on HP-UX the gcc test will end up
567 # making a dummy file named `D' -- because `-MD' means `put the output
568 # in D'.
569 mkdir conftest.dir
570 # Copy depcomp to subdir because otherwise we won't find it if we're
571 # using a relative directory.
572 cp "$am_depcomp" conftest.dir
573 cd conftest.dir
574 # We will build objects and dependencies in a subdirectory because
575 # it helps to detect inapplicable dependency modes. For instance
576 # both Tru64's cc and ICC support -MD to output dependencies as a
577 # side effect of compilation, but ICC will put the dependencies in
578 # the current directory while Tru64 will put them in the object
579 # directory.
580 mkdir sub
582 am_cv_$1_dependencies_compiler_type=none
583 if test "$am_compiler_list" = ""; then
584 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
585 fi
586 for depmode in $am_compiler_list; do
587 # Setup a source with many dependencies, because some compilers
588 # like to wrap large dependency lists on column 80 (with \), and
589 # we should not choose a depcomp mode which is confused by this.
590 #
591 # We need to recreate these files for each test, as the compiler may
592 # overwrite some of them when testing with obscure command lines.
593 # This happens at least with the AIX C compiler.
594 : > sub/conftest.c
595 for i in 1 2 3 4 5 6; do
596 echo '#include "conftst'$i'.h"' >> sub/conftest.c
597 : > sub/conftst$i.h
598 done
599 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
601 case $depmode in
602 nosideeffect)
603 # after this tag, mechanisms are not by side-effect, so they'll
604 # only be used when explicitly requested
605 if test "x$enable_dependency_tracking" = xyes; then
606 continue
607 else
608 break
609 fi
610 ;;
611 none) break ;;
612 esac
613 # We check with `-c' and `-o' for the sake of the "dashmstdout"
614 # mode. It turns out that the SunPro C++ compiler does not properly
615 # handle `-M -o', and we need to detect this.
616 if depmode=$depmode \
617 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
618 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
619 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
620 >/dev/null 2>conftest.err &&
621 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
622 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
623 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
624 # icc doesn't choke on unknown options, it will just issue warnings
625 # (even with -Werror). So we grep stderr for any message
626 # that says an option was ignored.
627 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
628 am_cv_$1_dependencies_compiler_type=$depmode
629 break
630 fi
631 fi
632 done
634 cd ..
635 rm -rf conftest.dir
636 else
637 am_cv_$1_dependencies_compiler_type=none
638 fi
639 ])
640 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
641 AM_CONDITIONAL([am__fastdep$1], [
642 test "x$enable_dependency_tracking" != xno \
643 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
644 ])
647 # AM_SET_DEPDIR
648 # -------------
649 # Choose a directory name for dependency files.
650 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
651 AC_DEFUN([AM_SET_DEPDIR],
652 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
653 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
654 ])
657 # AM_DEP_TRACK
658 # ------------
659 AC_DEFUN([AM_DEP_TRACK],
660 [AC_ARG_ENABLE(dependency-tracking,
661 [ --disable-dependency-tracking Speeds up one-time builds
662 --enable-dependency-tracking Do not reject slow dependency extractors])
663 if test "x$enable_dependency_tracking" != xno; then
664 am_depcomp="$ac_aux_dir/depcomp"
665 AMDEPBACKSLASH='\'
666 fi
667 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
668 AC_SUBST([AMDEPBACKSLASH])
669 ])
671 # Generate code to set up dependency tracking. -*- Autoconf -*-
673 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
675 # This program is free software; you can redistribute it and/or modify
676 # it under the terms of the GNU General Public License as published by
677 # the Free Software Foundation; either version 2, or (at your option)
678 # any later version.
680 # This program is distributed in the hope that it will be useful,
681 # but WITHOUT ANY WARRANTY; without even the implied warranty of
682 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
683 # GNU General Public License for more details.
685 # You should have received a copy of the GNU General Public License
686 # along with this program; if not, write to the Free Software
687 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
688 # 02111-1307, USA.
690 #serial 2
692 # _AM_OUTPUT_DEPENDENCY_COMMANDS
693 # ------------------------------
694 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
695 [for mf in $CONFIG_FILES; do
696 # Strip MF so we end up with the name of the file.
697 mf=`echo "$mf" | sed -e 's/:.*$//'`
698 # Check whether this is an Automake generated Makefile or not.
699 # We used to match only the files named `Makefile.in', but
700 # some people rename them; so instead we look at the file content.
701 # Grep'ing the first line is not enough: some people post-process
702 # each Makefile.in and add a new line on top of each file to say so.
703 # So let's grep whole file.
704 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
705 dirpart=`AS_DIRNAME("$mf")`
706 else
707 continue
708 fi
709 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
710 # Extract the definition of DEP_FILES from the Makefile without
711 # running `make'.
712 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
713 test -z "$DEPDIR" && continue
714 # When using ansi2knr, U may be empty or an underscore; expand it
715 U=`sed -n -e '/^U = / s///p' < "$mf"`
716 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
717 # We invoke sed twice because it is the simplest approach to
718 # changing $(DEPDIR) to its actual value in the expansion.
719 for file in `sed -n -e '
720 /^DEP_FILES = .*\\\\$/ {
721 s/^DEP_FILES = //
722 :loop
723 s/\\\\$//
724 p
725 n
726 /\\\\$/ b loop
727 p
728 }
729 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
730 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
731 # Make sure the directory exists.
732 test -f "$dirpart/$file" && continue
733 fdir=`AS_DIRNAME(["$file"])`
734 AS_MKDIR_P([$dirpart/$fdir])
735 # echo "creating $dirpart/$file"
736 echo '# dummy' > "$dirpart/$file"
737 done
738 done
739 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
742 # AM_OUTPUT_DEPENDENCY_COMMANDS
743 # -----------------------------
744 # This macro should only be invoked once -- use via AC_REQUIRE.
745 #
746 # This code is only required when automatic dependency tracking
747 # is enabled. FIXME. This creates each `.P' file that we will
748 # need in order to bootstrap the dependency handling code.
749 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
750 [AC_CONFIG_COMMANDS([depfiles],
751 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
752 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
753 ])
755 # Check to see how 'make' treats includes. -*- Autoconf -*-
757 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
759 # This program is free software; you can redistribute it and/or modify
760 # it under the terms of the GNU General Public License as published by
761 # the Free Software Foundation; either version 2, or (at your option)
762 # any later version.
764 # This program is distributed in the hope that it will be useful,
765 # but WITHOUT ANY WARRANTY; without even the implied warranty of
766 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
767 # GNU General Public License for more details.
769 # You should have received a copy of the GNU General Public License
770 # along with this program; if not, write to the Free Software
771 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
772 # 02111-1307, USA.
774 # serial 2
776 # AM_MAKE_INCLUDE()
777 # -----------------
778 # Check to see how make treats includes.
779 AC_DEFUN([AM_MAKE_INCLUDE],
780 [am_make=${MAKE-make}
781 cat > confinc << 'END'
782 am__doit:
783 @echo done
784 .PHONY: am__doit
785 END
786 # If we don't find an include directive, just comment out the code.
787 AC_MSG_CHECKING([for style of include used by $am_make])
788 am__include="#"
789 am__quote=
790 _am_result=none
791 # First try GNU make style include.
792 echo "include confinc" > confmf
793 # We grep out `Entering directory' and `Leaving directory'
794 # messages which can occur if `w' ends up in MAKEFLAGS.
795 # In particular we don't look at `^make:' because GNU make might
796 # be invoked under some other name (usually "gmake"), in which
797 # case it prints its new name instead of `make'.
798 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
799 am__include=include
800 am__quote=
801 _am_result=GNU
802 fi
803 # Now try BSD make style include.
804 if test "$am__include" = "#"; then
805 echo '.include "confinc"' > confmf
806 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
807 am__include=.include
808 am__quote="\""
809 _am_result=BSD
810 fi
811 fi
812 AC_SUBST([am__include])
813 AC_SUBST([am__quote])
814 AC_MSG_RESULT([$_am_result])
815 rm -f confinc confmf
816 ])
818 # AM_CONDITIONAL -*- Autoconf -*-
820 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
822 # This program is free software; you can redistribute it and/or modify
823 # it under the terms of the GNU General Public License as published by
824 # the Free Software Foundation; either version 2, or (at your option)
825 # any later version.
827 # This program is distributed in the hope that it will be useful,
828 # but WITHOUT ANY WARRANTY; without even the implied warranty of
829 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
830 # GNU General Public License for more details.
832 # You should have received a copy of the GNU General Public License
833 # along with this program; if not, write to the Free Software
834 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
835 # 02111-1307, USA.
837 # serial 5
839 AC_PREREQ(2.52)
841 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
842 # -------------------------------------
843 # Define a conditional.
844 AC_DEFUN([AM_CONDITIONAL],
845 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
846 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
847 AC_SUBST([$1_TRUE])
848 AC_SUBST([$1_FALSE])
849 if $2; then
850 $1_TRUE=
851 $1_FALSE='#'
852 else
853 $1_TRUE='#'
854 $1_FALSE=
855 fi
856 AC_CONFIG_COMMANDS_PRE(
857 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
858 AC_MSG_ERROR([conditional "$1" was never defined.
859 Usually this means the macro was only invoked conditionally.])
860 fi])])
862 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
863 #
864 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
865 #
866 # This program is free software; you can redistribute it and/or modify
867 # it under the terms of the GNU General Public License as published by
868 # the Free Software Foundation; either version 2 of the License, or
869 # (at your option) any later version.
870 #
871 # This program is distributed in the hope that it will be useful, but
872 # WITHOUT ANY WARRANTY; without even the implied warranty of
873 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
874 # General Public License for more details.
875 #
876 # You should have received a copy of the GNU General Public License
877 # along with this program; if not, write to the Free Software
878 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
879 #
880 # As a special exception to the GNU General Public License, if you
881 # distribute this file as part of a program that contains a
882 # configuration script generated by Autoconf, you may include it under
883 # the same distribution terms that you use for the rest of that program.
885 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
886 # ----------------------------------
887 AC_DEFUN([PKG_PROG_PKG_CONFIG],
888 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
889 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
890 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
891 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
892 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
893 fi
894 if test -n "$PKG_CONFIG"; then
895 _pkg_min_version=m4_default([$1], [0.9.0])
896 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
897 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
898 AC_MSG_RESULT([yes])
899 else
900 AC_MSG_RESULT([no])
901 PKG_CONFIG=""
902 fi
904 fi[]dnl
905 ])# PKG_PROG_PKG_CONFIG
907 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
908 #
909 # Check to see whether a particular set of modules exists. Similar
910 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
911 #
912 #
913 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
914 # this or PKG_CHECK_MODULES is called, or make sure to call
915 # PKG_CHECK_EXISTS manually
916 # --------------------------------------------------------------
917 AC_DEFUN([PKG_CHECK_EXISTS],
918 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
919 if test -n "$PKG_CONFIG" && \
920 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
921 m4_ifval([$2], [$2], [:])
922 m4_ifvaln([$3], [else
923 $3])dnl
924 fi])
927 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
928 # ---------------------------------------------
929 m4_define([_PKG_CONFIG],
930 [if test -n "$PKG_CONFIG"; then
931 if test -n "$$1"; then
932 pkg_cv_[]$1="$$1"
933 else
934 PKG_CHECK_EXISTS([$3],
935 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
936 [pkg_failed=yes])
937 fi
938 else
939 pkg_failed=untried
940 fi[]dnl
941 ])# _PKG_CONFIG
943 # _PKG_SHORT_ERRORS_SUPPORTED
944 # -----------------------------
945 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
946 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
947 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
948 _pkg_short_errors_supported=yes
949 else
950 _pkg_short_errors_supported=no
951 fi[]dnl
952 ])# _PKG_SHORT_ERRORS_SUPPORTED
955 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
956 # [ACTION-IF-NOT-FOUND])
957 #
958 #
959 # Note that if there is a possibility the first call to
960 # PKG_CHECK_MODULES might not happen, you should be sure to include an
961 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
962 #
963 #
964 # --------------------------------------------------------------
965 AC_DEFUN([PKG_CHECK_MODULES],
966 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
967 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
968 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
970 pkg_failed=no
971 AC_MSG_CHECKING([for $1])
973 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
974 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
976 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
977 and $1[]_LIBS to avoid the need to call pkg-config.
978 See the pkg-config man page for more details.])
980 if test $pkg_failed = yes; then
981 _PKG_SHORT_ERRORS_SUPPORTED
982 if test $_pkg_short_errors_supported = yes; then
983 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
984 else
985 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
986 fi
987 # Put the nasty error message in config.log where it belongs
988 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
990 ifelse([$4], , [AC_MSG_ERROR(dnl
991 [Package requirements ($2) were not met:
993 $$1_PKG_ERRORS
995 Consider adjusting the PKG_CONFIG_PATH environment variable if you
996 installed software in a non-standard prefix.
998 _PKG_TEXT
999 ])],
1000 [AC_MSG_RESULT([no])
1001 $4])
1002 elif test $pkg_failed = untried; then
1003 ifelse([$4], , [AC_MSG_FAILURE(dnl
1004 [The pkg-config script could not be found or is too old. Make sure it
1005 is in your PATH or set the PKG_CONFIG environment variable to the full
1006 path to pkg-config.
1008 _PKG_TEXT
1010 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1011 [$4])
1012 else
1013 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1014 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1015 AC_MSG_RESULT([yes])
1016 ifelse([$3], , :, [$3])
1017 fi[]dnl
1018 ])# PKG_CHECK_MODULES