wfarr / newskit

A feed reader for the GNOME desktop

This URL has Read+Write access

newskit / aclocal.m4
fe03dab1 » Ethan Osten 2008-07-12 etc. 1 # generated automatically by aclocal 1.10 -*- Autoconf -*-
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
fe03dab1 » Ethan Osten 2008-07-12 etc. 4 # 2005, 2006 Free Software Foundation, Inc.
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 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
fe03dab1 » Ethan Osten 2008-07-12 etc. 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])])
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 18
19 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
20 #
21 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
22 #
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.
27 #
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.
32 #
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.
36 #
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.
41
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])
50 fi
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
63
64 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
65 #
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.
68 #
69 #
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])
82
83
84 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
85 # ---------------------------------------------
86 m4_define([_PKG_CONFIG],
fe03dab1 » Ethan Osten 2008-07-12 etc. 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
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 97 fi[]dnl
98 ])# _PKG_CONFIG
99
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
110
111
112 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
113 # [ACTION-IF-NOT-FOUND])
114 #
115 #
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
119 #
120 #
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
126
127 pkg_failed=no
128 AC_MSG_CHECKING([for $1])
129
130 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
131 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
132
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.])
136
137 if test $pkg_failed = yes; then
138 _PKG_SHORT_ERRORS_SUPPORTED
139 if test $_pkg_short_errors_supported = yes; then
fe03dab1 » Ethan Osten 2008-07-12 etc. 140 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 141 else
fe03dab1 » Ethan Osten 2008-07-12 etc. 142 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 143 fi
144 # Put the nasty error message in config.log where it belongs
145 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
146
147 ifelse([$4], , [AC_MSG_ERROR(dnl
148 [Package requirements ($2) were not met:
149
150 $$1_PKG_ERRORS
151
152 Consider adjusting the PKG_CONFIG_PATH environment variable if you
153 installed software in a non-standard prefix.
154
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.
164
165 _PKG_TEXT
166
167 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
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
176
fe03dab1 » Ethan Osten 2008-07-12 etc. 177 # Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 178 #
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.
182
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.
fe03dab1 » Ethan Osten 2008-07-12 etc. 192 m4_if([$1], [1.10], [],
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 193 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
194 ])
195
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], [])
202
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],
fe03dab1 » Ethan Osten 2008-07-12 etc. 208 [AM_AUTOMAKE_VERSION([1.10])dnl
209 _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 210
211 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
212
213 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
214 #
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.
218
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/../..'.
222 #
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.
230 #
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
237 #
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.
242 #
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.
252 #
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.
256
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`
262 ])
263
264 # AM_CONDITIONAL -*- Autoconf -*-
265
266 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
267 # Free Software Foundation, Inc.
268 #
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.
272
273 # serial 8
274
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=
292 fi
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])])
298
299 # Do all the work for Automake. -*- Autoconf -*-
300
301 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
fe03dab1 » Ethan Osten 2008-07-12 etc. 302 # 2005, 2006 Free Software Foundation, Inc.
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 303 #
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.
307
fe03dab1 » Ethan Osten 2008-07-12 etc. 308 # serial 12
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 309
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.
312
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
339 fi
340
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
348 fi
349 AC_SUBST([CYGPATH_W])
350
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
363
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
367
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
400 ])
401 ])
402
403
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.
407
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
fe03dab1 » Ethan Osten 2008-07-12 etc. 416 $1 | $1:* )
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 417 break ;;
418 * )
419 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
420 esac
421 done
fe03dab1 » Ethan Osten 2008-07-12 etc. 422 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 423
424 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
425 #
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.
429
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)])
437
438 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
439 #
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.
443
444 # serial 2
445
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=_
455 fi
456 rmdir .tst 2>/dev/null
457 AC_SUBST([am__leading_dot])])
458
459 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
460 # From Jim Meyering
461
462 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
463 # Free Software Foundation, Inc.
464 #
465 # This file is free software; the Free Software Foundation
466 # gives unlimited permission to copy and/or distribute it,
467 # with or without modifications, as long as this notice is preserved.
468
469 # serial 4
470
471 AC_DEFUN([AM_MAINTAINER_MODE],
472 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
473 dnl maintainer-mode is disabled by default
474 AC_ARG_ENABLE(maintainer-mode,
475 [ --enable-maintainer-mode enable make rules and dependencies not useful
476 (and sometimes confusing) to the casual installer],
477 USE_MAINTAINER_MODE=$enableval,
478 USE_MAINTAINER_MODE=no)
479 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
480 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
481 MAINT=$MAINTAINER_MODE_TRUE
482 AC_SUBST(MAINT)dnl
483 ]
484 )
485
486 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
487
488 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
489
490 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
491 # Free Software Foundation, Inc.
492 #
493 # This file is free software; the Free Software Foundation
494 # gives unlimited permission to copy and/or distribute it,
495 # with or without modifications, as long as this notice is preserved.
496
497 # serial 5
498
499 # AM_MISSING_PROG(NAME, PROGRAM)
500 # ------------------------------
501 AC_DEFUN([AM_MISSING_PROG],
502 [AC_REQUIRE([AM_MISSING_HAS_RUN])
503 $1=${$1-"${am_missing_run}$2"}
504 AC_SUBST($1)])
505
506
507 # AM_MISSING_HAS_RUN
508 # ------------------
509 # Define MISSING if not defined so far and test if it supports --run.
510 # If it does, set am_missing_run to use it, otherwise, to nothing.
511 AC_DEFUN([AM_MISSING_HAS_RUN],
512 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
513 AC_REQUIRE_AUX_FILE([missing])dnl
514 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
515 # Use eval to expand $SHELL
516 if eval "$MISSING --run true"; then
517 am_missing_run="$MISSING --run "
518 else
519 am_missing_run=
520 AC_MSG_WARN([`missing' script is too old or missing])
521 fi
522 ])
523
524 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
525 #
526 # This file is free software; the Free Software Foundation
527 # gives unlimited permission to copy and/or distribute it,
528 # with or without modifications, as long as this notice is preserved.
529
530 # AM_PROG_MKDIR_P
531 # ---------------
532 # Check for `mkdir -p'.
533 AC_DEFUN([AM_PROG_MKDIR_P],
534 [AC_PREREQ([2.60])dnl
535 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
536 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
537 dnl while keeping a definition of mkdir_p for backward compatibility.
538 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
539 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
540 dnl Makefile.ins that do not define MKDIR_P, so we do our own
541 dnl adjustment using top_builddir (which is defined more often than
542 dnl MKDIR_P).
543 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
544 case $mkdir_p in
545 [[\\/$]]* | ?:[[\\/]]*) ;;
546 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
547 esac
548 ])
549
550 # Helper functions for option handling. -*- Autoconf -*-
551
552 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
553 #
554 # This file is free software; the Free Software Foundation
555 # gives unlimited permission to copy and/or distribute it,
556 # with or without modifications, as long as this notice is preserved.
557
558 # serial 3
559
560 # _AM_MANGLE_OPTION(NAME)
561 # -----------------------
562 AC_DEFUN([_AM_MANGLE_OPTION],
563 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
564
565 # _AM_SET_OPTION(NAME)
566 # ------------------------------
567 # Set option NAME. Presently that only means defining a flag for this option.
568 AC_DEFUN([_AM_SET_OPTION],
569 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
570
571 # _AM_SET_OPTIONS(OPTIONS)
572 # ----------------------------------
573 # OPTIONS is a space-separated list of Automake options.
574 AC_DEFUN([_AM_SET_OPTIONS],
575 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
576
577 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
578 # -------------------------------------------
579 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
580 AC_DEFUN([_AM_IF_OPTION],
581 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
582
583 # Check to make sure that the build environment is sane. -*- Autoconf -*-
584
585 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
586 # Free Software Foundation, Inc.
587 #
588 # This file is free software; the Free Software Foundation
589 # gives unlimited permission to copy and/or distribute it,
590 # with or without modifications, as long as this notice is preserved.
591
592 # serial 4
593
594 # AM_SANITY_CHECK
595 # ---------------
596 AC_DEFUN([AM_SANITY_CHECK],
597 [AC_MSG_CHECKING([whether build environment is sane])
598 # Just in case
599 sleep 1
600 echo timestamp > conftest.file
601 # Do `set' in a subshell so we don't clobber the current shell's
602 # arguments. Must try -L first in case configure is actually a
603 # symlink; some systems play weird games with the mod time of symlinks
604 # (eg FreeBSD returns the mod time of the symlink's containing
605 # directory).
606 if (
607 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
608 if test "$[*]" = "X"; then
609 # -L didn't work.
610 set X `ls -t $srcdir/configure conftest.file`
611 fi
612 rm -f conftest.file
613 if test "$[*]" != "X $srcdir/configure conftest.file" \
614 && test "$[*]" != "X conftest.file $srcdir/configure"; then
615
616 # If neither matched, then we have a broken ls. This can happen
617 # if, for instance, CONFIG_SHELL is bash and it inherits a
618 # broken ls alias from the environment. This has actually
619 # happened. Such a system could not be considered "sane".
620 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
621 alias in your environment])
622 fi
623
624 test "$[2]" = conftest.file
625 )
626 then
627 # Ok.
628 :
629 else
630 AC_MSG_ERROR([newly created file is older than distributed files!
631 Check your system clock])
632 fi
633 AC_MSG_RESULT(yes)])
634
635 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
636 #
637 # This file is free software; the Free Software Foundation
638 # gives unlimited permission to copy and/or distribute it,
639 # with or without modifications, as long as this notice is preserved.
640
641 # AM_PROG_INSTALL_STRIP
642 # ---------------------
643 # One issue with vendor `install' (even GNU) is that you can't
644 # specify the program used to strip binaries. This is especially
645 # annoying in cross-compiling environments, where the build's strip
646 # is unlikely to handle the host's binaries.
647 # Fortunately install-sh will honor a STRIPPROG variable, so we
648 # always use install-sh in `make install-strip', and initialize
649 # STRIPPROG with the value of the STRIP variable (set by the user).
650 AC_DEFUN([AM_PROG_INSTALL_STRIP],
651 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
652 # Installed binaries are usually stripped using `strip' when the user
653 # run `make install-strip'. However `strip' might not be the right
654 # tool to use in cross-compilation environments, therefore Automake
655 # will honor the `STRIP' environment variable to overrule this program.
656 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
657 if test "$cross_compiling" != no; then
658 AC_CHECK_TOOL([STRIP], [strip], :)
659 fi
660 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
661 AC_SUBST([INSTALL_STRIP_PROGRAM])])
662
663 # Copyright (C) 2006 Free Software Foundation, Inc.
664 #
665 # This file is free software; the Free Software Foundation
666 # gives unlimited permission to copy and/or distribute it,
667 # with or without modifications, as long as this notice is preserved.
668
669 # _AM_SUBST_NOTMAKE(VARIABLE)
670 # ---------------------------
fe03dab1 » Ethan Osten 2008-07-12 etc. 671 # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
4a671cd7 » Ethan Osten 2008-07-04 refactored code tree, with ... 672 # This macro is traced by Automake.
673 AC_DEFUN([_AM_SUBST_NOTMAKE])
674
675 # Check how to create a tarball. -*- Autoconf -*-
676
677 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
678 #
679 # This file is free software; the Free Software Foundation
680 # gives unlimited permission to copy and/or distribute it,
681 # with or without modifications, as long as this notice is preserved.
682
683 # serial 2
684
685 # _AM_PROG_TAR(FORMAT)
686 # --------------------
687 # Check how to create a tarball in format FORMAT.
688 # FORMAT should be one of `v7', `ustar', or `pax'.
689 #
690 # Substitute a variable $(am__tar) that is a command
691 # writing to stdout a FORMAT-tarball containing the directory
692 # $tardir.
693 # tardir=directory && $(am__tar) > result.tar
694 #
695 # Substitute a variable $(am__untar) that extract such
696 # a tarball read from stdin.
697 # $(am__untar) < result.tar
698 AC_DEFUN([_AM_PROG_TAR],
699 [# Always define AMTAR for backward compatibility.
700 AM_MISSING_PROG([AMTAR], [tar])
701 m4_if([$1], [v7],
702 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
703 [m4_case([$1], [ustar],, [pax],,
704 [m4_fatal([Unknown tar format])])
705 AC_MSG_CHECKING([how to create a $1 tar archive])
706 # Loop over all known methods to create a tar archive until one works.
707 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
708 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
709 # Do not fold the above two line into one, because Tru64 sh and
710 # Solaris sh will not grok spaces in the rhs of `-'.
711 for _am_tool in $_am_tools
712 do
713 case $_am_tool in
714 gnutar)
715 for _am_tar in tar gnutar gtar;
716 do
717 AM_RUN_LOG([$_am_tar --version]) && break
718 done
719 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
720 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
721 am__untar="$_am_tar -xf -"
722 ;;
723 plaintar)
724 # Must skip GNU tar: if it does not support --format= it doesn't create
725 # ustar tarball either.
726 (tar --version) >/dev/null 2>&1 && continue
727 am__tar='tar chf - "$$tardir"'
728 am__tar_='tar chf - "$tardir"'
729 am__untar='tar xf -'
730 ;;
731 pax)
732 am__tar='pax -L -x $1 -w "$$tardir"'
733 am__tar_='pax -L -x $1 -w "$tardir"'
734 am__untar='pax -r'
735 ;;
736 cpio)
737 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
738 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
739 am__untar='cpio -i -H $1 -d'
740 ;;
741 none)
742 am__tar=false
743 am__tar_=false
744 am__untar=false
745 ;;
746 esac
747
748 # If the value was cached, stop now. We just wanted to have am__tar
749 # and am__untar set.
750 test -n "${am_cv_prog_tar_$1}" && break
751
752 # tar/untar a dummy directory, and stop if the command works
753 rm -rf conftest.dir
754 mkdir conftest.dir
755 echo GrepMe > conftest.dir/file
756 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
757 rm -rf conftest.dir
758 if test -s conftest.tar; then
759 AM_RUN_LOG([$am__untar <conftest.tar])
760 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
761 fi
762 done
763 rm -rf conftest.dir
764
765 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
766 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
767 AC_SUBST([am__tar])
768 AC_SUBST([am__untar])
769 ]) # _AM_PROG_TAR
770