1 # generated automatically by aclocal 1.11.3 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
18 [m4_warning([this file was generated for autoconf 2.68.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically `autoreconf'.])])
23 # Configure paths for GLIB
24 # Owen Taylor 1997-2001
26 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
27 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
28 dnl gthread, or gio is specified in MODULES, pass to pkg-config
30 AC_DEFUN([AM_PATH_GLIB_2_0],
32 dnl Get the cflags and libraries from pkg-config
34 AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
35 , enable_glibtest=yes)
37 pkg_config_args=glib-2.0
42 pkg_config_args="$pkg_config_args gmodule-2.0"
45 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
48 pkg_config_args="$pkg_config_args gobject-2.0"
51 pkg_config_args="$pkg_config_args gthread-2.0"
54 pkg_config_args="$pkg_config_args $module-2.0"
59 PKG_PROG_PKG_CONFIG([0.16])
63 if test "x$PKG_CONFIG" = x ; then
68 min_glib_version=ifelse([$1], ,2.0.0,$1)
69 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
71 if test x$PKG_CONFIG != xno ; then
72 ## don't try to run the test against uninstalled libtool libs
73 if $PKG_CONFIG --uninstalled $pkg_config_args; then
74 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
78 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
85 if test x"$no_glib" = x ; then
86 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
87 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
88 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
89 GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
91 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
92 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
93 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
94 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
95 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
96 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
97 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
98 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
99 if test "x$enable_glibtest" = "xyes" ; then
100 ac_save_CFLAGS="$CFLAGS"
102 CFLAGS="$CFLAGS $GLIB_CFLAGS"
103 LIBS="$GLIB_LIBS $LIBS"
105 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
106 dnl checks the results of pkg-config to some extent)
117 unsigned int major, minor, micro;
120 fclose (fopen ("conf.glibtest", "w"));
122 /* HP/UX 9 (%@#!) writes to sscanf strings */
123 tmp_version = g_strdup("$min_glib_version");
124 if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, µ) != 3) {
125 printf("%s, bad version string\n", "$min_glib_version");
129 if ((glib_major_version != $glib_config_major_version) ||
130 (glib_minor_version != $glib_config_minor_version) ||
131 (glib_micro_version != $glib_config_micro_version))
133 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
134 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
135 glib_major_version, glib_minor_version, glib_micro_version);
136 printf ("*** was found! If pkg-config was correct, then it is best\n");
137 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
138 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
139 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
140 printf("*** required on your system.\n");
141 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
142 printf("*** to point to the correct configuration files\n");
144 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
145 (glib_minor_version != GLIB_MINOR_VERSION) ||
146 (glib_micro_version != GLIB_MICRO_VERSION))
148 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
149 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
150 printf("*** library (version %d.%d.%d)\n",
151 glib_major_version, glib_minor_version, glib_micro_version);
155 if ((glib_major_version > major) ||
156 ((glib_major_version == major) && (glib_minor_version > minor)) ||
157 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
163 printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
164 glib_major_version, glib_minor_version, glib_micro_version);
165 printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
166 major, minor, micro);
167 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
169 printf("*** If you have already installed a sufficiently new version, this error\n");
170 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
171 printf("*** being found. The easiest way to fix this is to remove the old version\n");
172 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
173 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
174 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
175 printf("*** so that the correct libraries are found at run-time))\n");
180 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
181 CFLAGS="$ac_save_CFLAGS"
185 if test "x$no_glib" = x ; then
186 AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
187 ifelse([$2], , :, [$2])
190 if test "$PKG_CONFIG" = "no" ; then
191 echo "*** A new enough version of pkg-config was not found."
192 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
194 if test -f conf.glibtest ; then
197 echo "*** Could not run GLIB test program, checking why..."
198 ac_save_CFLAGS="$CFLAGS"
200 CFLAGS="$CFLAGS $GLIB_CFLAGS"
201 LIBS="$LIBS $GLIB_LIBS"
205 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
206 [ echo "*** The test program compiled, but did not run. This usually means"
207 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
208 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
209 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
210 echo "*** to the installed location Also, make sure you have run ldconfig if that"
211 echo "*** is required on your system"
213 echo "*** If you have an old version installed, it is best to remove it, although"
214 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
215 [ echo "*** The test program failed to compile or link. See the file config.log for the"
216 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
217 CFLAGS="$ac_save_CFLAGS"
226 GLIB_COMPILE_RESOURCES=""
227 ifelse([$3], , :, [$3])
229 AC_SUBST(GLIB_CFLAGS)
231 AC_SUBST(GLIB_GENMARSHAL)
232 AC_SUBST(GOBJECT_QUERY)
233 AC_SUBST(GLIB_MKENUMS)
234 AC_SUBST(GLIB_COMPILE_RESOURCES)
238 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
239 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
241 # This file is free software, distributed under the terms of the GNU
242 # General Public License. As a special exception to the GNU General
243 # Public License, this file may be distributed as part of a program
244 # that contains a configuration script generated by Autoconf, under
245 # the same distribution terms as the rest of that program.
247 # This file can be copied and used freely without restrictions. It can
248 # be used in projects which are not available under the GNU Public License
249 # but which still want to provide support for the GNU gettext functionality.
251 # Macro to add for using GNU gettext.
252 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
254 # Modified to never use included libintl.
255 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
257 # Major rework to remove unused code
258 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
260 # Added better handling of ALL_LINGUAS from GNU gettext version
261 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
263 # Modified to require ngettext
264 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
266 # We need this here as well, since someone might use autoconf-2.5x
267 # to configure GLib then an older version to configure a package
268 # using AM_GLIB_GNU_GETTEXT
272 dnl We go to great lengths to make sure that aclocal won't
273 dnl try to pull in the installed version of these macros
274 dnl when running aclocal in the glib directory.
276 m4_copy([AC_DEFUN],[glib_DEFUN])
277 m4_copy([AC_REQUIRE],[glib_REQUIRE])
279 dnl At the end, if we're not within glib, we'll define the public
280 dnl definitions in terms of our private definitions.
284 #--------------------
285 glib_DEFUN([GLIB_LC_MESSAGES],
286 [AC_CHECK_HEADERS([locale.h])
287 if test $ac_cv_header_locale_h = yes; then
288 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
289 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
290 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
291 if test $am_cv_val_LC_MESSAGES = yes; then
292 AC_DEFINE(HAVE_LC_MESSAGES, 1,
293 [Define if your <locale.h> file defines LC_MESSAGES.])
297 # GLIB_PATH_PROG_WITH_TEST
298 #----------------------------
299 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
300 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
301 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
302 [# Extract the first word of "$2", so it can be a program name with args.
303 set dummy $2; ac_word=[$]2
304 AC_MSG_CHECKING([for $ac_word])
305 AC_CACHE_VAL(ac_cv_path_$1,
308 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
311 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
312 for ac_dir in ifelse([$5], , $PATH, [$5]); do
313 test -z "$ac_dir" && ac_dir=.
314 if test -f $ac_dir/$ac_word; then
316 ac_cv_path_$1="$ac_dir/$ac_word"
322 dnl If no 4th arg is given, leave the cache variable unset,
323 dnl so AC_PATH_PROGS will keep looking.
324 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
329 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
339 glib_DEFUN([GLIB_WITH_NLS],
340 dnl NLS is obligatory
344 gt_cv_have_gettext=no
350 AC_CHECK_HEADER(libintl.h,
351 [gt_cv_func_dgettext_libintl="no"
352 libintl_extra_libs=""
355 # First check in libc
357 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
361 [return !ngettext ("","", 1)],
362 gt_cv_func_ngettext_libc=yes,
363 gt_cv_func_ngettext_libc=no)
366 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
367 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
371 [return !dgettext ("","")],
372 gt_cv_func_dgettext_libc=yes,
373 gt_cv_func_dgettext_libc=no)
377 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
378 AC_CHECK_FUNCS(bind_textdomain_codeset)
382 # If we don't have everything we want, check in libintl
384 if test "$gt_cv_func_dgettext_libc" != "yes" \
385 || test "$gt_cv_func_ngettext_libc" != "yes" \
386 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
388 AC_CHECK_LIB(intl, bindtextdomain,
389 [AC_CHECK_LIB(intl, ngettext,
390 [AC_CHECK_LIB(intl, dgettext,
391 gt_cv_func_dgettext_libintl=yes)])])
393 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
394 AC_MSG_CHECKING([if -liconv is needed to use gettext])
396 AC_CHECK_LIB(intl, ngettext,
397 [AC_CHECK_LIB(intl, dcgettext,
398 [gt_cv_func_dgettext_libintl=yes
399 libintl_extra_libs=-liconv],
405 # If we found libintl, then check in it for bind_textdomain_codeset();
406 # we'll prefer libc if neither have bind_textdomain_codeset(),
407 # and both have dgettext and ngettext
409 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
410 glib_save_LIBS="$LIBS"
411 LIBS="$LIBS -lintl $libintl_extra_libs"
412 unset ac_cv_func_bind_textdomain_codeset
413 AC_CHECK_FUNCS(bind_textdomain_codeset)
414 LIBS="$glib_save_LIBS"
416 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
417 gt_cv_func_dgettext_libc=no
419 if test "$gt_cv_func_dgettext_libc" = "yes" \
420 && test "$gt_cv_func_ngettext_libc" = "yes"; then
421 gt_cv_func_dgettext_libintl=no
427 if test "$gt_cv_func_dgettext_libc" = "yes" \
428 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
429 gt_cv_have_gettext=yes
432 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
433 INTLLIBS="-lintl $libintl_extra_libs"
436 if test "$gt_cv_have_gettext" = "yes"; then
437 AC_DEFINE(HAVE_GETTEXT,1,
438 [Define if the GNU gettext() function is already present or preinstalled.])
439 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
440 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
441 if test "$MSGFMT" != "no"; then
442 glib_save_LIBS="$LIBS"
443 LIBS="$LIBS $INTLLIBS"
444 AC_CHECK_FUNCS(dcgettext)
446 AC_MSG_CHECKING([if msgfmt accepts -c])
447 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
450 "Content-Type: text/plain; charset=UTF-8\n"
451 "Project-Id-Version: test 1.0\n"
452 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
453 "Last-Translator: test <foo@bar.xx>\n"
454 "Language-Team: C <LL@li.org>\n"
455 "MIME-Version: 1.0\n"
456 "Content-Transfer-Encoding: 8bit\n"
457 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
458 AC_SUBST(MSGFMT_OPTS)
459 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
460 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
461 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
462 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
463 return _nl_msg_cat_cntr],
468 dnl On Solaris, if bind_textdomain_codeset is in libc,
469 dnl GNU format message catalog is always supported,
470 dnl since both are added to the libc all together.
471 dnl Hence, we'd like to go with DATADIRNAME=share and
472 dnl and CATOBJEXT=.gmo in this case.
473 AC_CHECK_FUNC(bind_textdomain_codeset,
488 LIBS="$glib_save_LIBS"
491 gt_cv_have_gettext=no
496 if test "$gt_cv_have_gettext" = "yes" ; then
497 AC_DEFINE(ENABLE_NLS, 1,
498 [always defined to indicate that i18n is enabled])
501 dnl Test whether we really found GNU xgettext.
502 if test "$XGETTEXT" != ":"; then
503 dnl If it is not GNU xgettext we define it as : so that the
504 dnl Makefiles still can work.
505 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
509 [found xgettext program is not GNU xgettext; ignore it])
514 # We need to process the po/ directory.
518 [case "$CONFIG_FILES" in *po/Makefile.in*)
519 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
522 dnl These rules are solely for the distribution goal. While doing this
523 dnl we only have to keep exactly one list of the available catalogs
525 for lang in $ALL_LINGUAS; do
526 GMOFILES="$GMOFILES $lang.gmo"
527 POFILES="$POFILES $lang.po"
530 dnl Make all variables we use known to autoconf.
533 AC_SUBST(DATADIRNAME)
537 AC_SUBST(PO_IN_DATADIR_TRUE)
538 AC_SUBST(PO_IN_DATADIR_FALSE)
543 # AM_GLIB_GNU_GETTEXT
544 # -------------------
545 # Do checks necessary for use of gettext. If a suitable implementation
546 # of gettext is found in either in libintl or in the C library,
547 # it will set INTLLIBS to the libraries needed for use of gettext
548 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
549 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
550 # on various variables needed by the Makefile.in.in installed by
553 glib_DEFUN([GLIB_GNU_GETTEXT],
554 [AC_REQUIRE([AC_PROG_CC])dnl
555 AC_REQUIRE([AC_HEADER_STDC])dnl
560 if test "$gt_cv_have_gettext" = "yes"; then
561 if test "x$ALL_LINGUAS" = "x"; then
564 AC_MSG_CHECKING(for catalogs to be installed)
566 for presentlang in $ALL_LINGUAS; do
568 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
569 desiredlanguages="$LINGUAS"
571 desiredlanguages="$ALL_LINGUAS"
573 for desiredlang in $desiredlanguages; do
574 # Use the presentlang catalog if desiredlang is
575 # a. equal to presentlang, or
576 # b. a variant of presentlang (because in this case,
577 # presentlang can be used as a fallback for messages
578 # which are not translated in the desiredlang catalog).
579 case "$desiredlang" in
580 "$presentlang"*) useit=yes;;
583 if test $useit = yes; then
584 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
588 AC_MSG_RESULT($LINGUAS)
591 dnl Construct list of names of catalog files to be constructed.
592 if test -n "$LINGUAS"; then
593 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
597 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
598 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
599 dnl Try to locate is.
601 if test -n "$ac_aux_dir"; then
602 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
604 if test -z "$MKINSTALLDIRS"; then
605 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
607 AC_SUBST(MKINSTALLDIRS)
609 dnl Generate list of files to be processed by xgettext which will
610 dnl be included in po/Makefile.
611 test -d po || mkdir po
612 if test "x$srcdir" != "x."; then
613 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
614 posrcprefix="$srcdir/"
616 posrcprefix="../$srcdir/"
622 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
623 < $srcdir/po/POTFILES.in > po/POTFILES
626 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
627 # -------------------------------
628 # Define VARIABLE to the location where catalog files will
629 # be installed by po/Makefile.
630 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
631 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
632 glib_save_prefix="$prefix"
633 glib_save_exec_prefix="$exec_prefix"
634 glib_save_datarootdir="$datarootdir"
635 test "x$prefix" = xNONE && prefix=$ac_default_prefix
636 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
637 datarootdir=`eval echo "${datarootdir}"`
638 if test "x$CATOBJEXT" = "x.mo" ; then
639 localedir=`eval echo "${libdir}/locale"`
641 localedir=`eval echo "${datadir}/locale"`
643 prefix="$glib_save_prefix"
644 exec_prefix="$glib_save_exec_prefix"
645 datarootdir="$glib_save_datarootdir"
646 AC_DEFINE_UNQUOTED($1, "$localedir",
647 [Define the location where the catalogs will be installed])
651 dnl Now the definitions that aclocal will find
653 ifdef(glib_configure_ac,[],[
654 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
655 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
658 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
660 # Create a temporary file with TEST-FILE as its contents and pass the
661 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
662 # 0 and perform ACTION-IF-FAIL for any other exit status.
663 AC_DEFUN([GLIB_RUN_PROG],
664 [cat >conftest.foo <<_ACEOF
667 if AC_RUN_LOG([$1 conftest.foo]); then
668 m4_ifval([$3], [$3], [:])
669 m4_ifvaln([$4], [else $4])dnl
670 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
671 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
676 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
677 dnl the schema should be compiled
680 AC_DEFUN([GLIB_GSETTINGS],
682 m4_pattern_allow([AM_V_GEN])
683 AC_ARG_ENABLE(schemas-compile,
684 AS_HELP_STRING([--disable-schemas-compile],
685 [Disable regeneration of gschemas.compiled on install]),
686 [case ${enableval} in
687 yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
688 no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
689 *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
691 AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
692 PKG_PROG_PKG_CONFIG([0.16])
693 AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
694 if test x$cross_compiling != xyes; then
695 GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
697 AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
699 AC_SUBST(GLIB_COMPILE_SCHEMAS)
700 if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
701 ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
703 ifelse([$1],,[:],[$1])
707 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
709 mostlyclean-am: clean-gsettings-schemas
711 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
713 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
714 $(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
716 all-am: $(gsettings_SCHEMAS:.xml=.valid)
717 uninstall-am: uninstall-gsettings-schemas
718 install-data-am: install-gsettings-schemas
720 .SECONDARY: $(gsettings_SCHEMAS)
722 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
724 if test -n "$^"; then \
725 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
726 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
727 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
730 uninstall-gsettings-schemas:
732 @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
733 files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
734 test -n "$$files" || exit 0; \
735 echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
736 cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
737 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
739 clean-gsettings-schemas:
740 rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
742 ifdef gsettings_ENUM_NAMESPACE
743 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
744 $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
747 _GSETTINGS_SUBST(GSETTINGS_RULES)
750 dnl _GSETTINGS_SUBST(VARIABLE)
751 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
752 AC_DEFUN([_GSETTINGS_SUBST],
755 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
759 dnl -*- mode: autoconf -*-
760 dnl Copyright 2009 Johan Dahlin
762 dnl This file is free software; the author(s) gives unlimited
763 dnl permission to copy and/or distribute it, with or without
764 dnl modifications, as long as this notice is preserved.
769 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
771 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
772 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
773 AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
775 dnl enable/disable introspection
776 m4_if([$2], [require],
778 enable_introspection=yes
780 AC_ARG_ENABLE(introspection,
781 AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
782 [Enable introspection for this build]),,
783 [enable_introspection=auto])
786 AC_MSG_CHECKING([for gobject-introspection])
788 dnl presence/version checking
789 AS_CASE([$enable_introspection],
791 found_introspection="no (disabled, use --enable-introspection to enable)"
794 PKG_CHECK_EXISTS([gobject-introspection-1.0],,
795 AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
796 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
797 found_introspection=yes,
798 AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
801 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
802 dnl Canonicalize enable_introspection
803 enable_introspection=$found_introspection
806 AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
809 AC_MSG_RESULT([$found_introspection])
811 INTROSPECTION_SCANNER=
812 INTROSPECTION_COMPILER=
813 INTROSPECTION_GENERATE=
814 INTROSPECTION_GIRDIR=
815 INTROSPECTION_TYPELIBDIR=
816 if test "x$found_introspection" = "xyes"; then
817 INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
818 INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
819 INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
820 INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
821 INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
822 INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
823 INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
824 INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
826 AC_SUBST(INTROSPECTION_SCANNER)
827 AC_SUBST(INTROSPECTION_COMPILER)
828 AC_SUBST(INTROSPECTION_GENERATE)
829 AC_SUBST(INTROSPECTION_GIRDIR)
830 AC_SUBST(INTROSPECTION_TYPELIBDIR)
831 AC_SUBST(INTROSPECTION_CFLAGS)
832 AC_SUBST(INTROSPECTION_LIBS)
833 AC_SUBST(INTROSPECTION_MAKEFILE)
835 AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
840 dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
842 AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
844 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
848 dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
851 AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
853 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
856 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
857 # serial 1 (pkg-config-0.24)
859 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
861 # This program is free software; you can redistribute it and/or modify
862 # it under the terms of the GNU General Public License as published by
863 # the Free Software Foundation; either version 2 of the License, or
864 # (at your option) any later version.
866 # This program is distributed in the hope that it will be useful, but
867 # WITHOUT ANY WARRANTY; without even the implied warranty of
868 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
869 # General Public License for more details.
871 # You should have received a copy of the GNU General Public License
872 # along with this program; if not, write to the Free Software
873 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
875 # As a special exception to the GNU General Public License, if you
876 # distribute this file as part of a program that contains a
877 # configuration script generated by Autoconf, you may include it under
878 # the same distribution terms that you use for the rest of that program.
880 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
881 # ----------------------------------
882 AC_DEFUN([PKG_PROG_PKG_CONFIG],
883 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
884 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
885 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
886 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
887 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
889 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
890 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
892 if test -n "$PKG_CONFIG"; then
893 _pkg_min_version=m4_default([$1], [0.9.0])
894 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
895 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
902 ])# PKG_PROG_PKG_CONFIG
904 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
906 # Check to see whether a particular set of modules exists. Similar
907 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
909 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
910 # only at the first occurence in configure.ac, so if the first place
911 # it's called might be skipped (such as if it is within an "if", you
912 # have to call PKG_CHECK_EXISTS manually
913 # --------------------------------------------------------------
914 AC_DEFUN([PKG_CHECK_EXISTS],
915 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
916 if test -n "$PKG_CONFIG" && \
917 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
918 m4_default([$2], [:])
919 m4_ifvaln([$3], [else
923 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
924 # ---------------------------------------------
925 m4_define([_PKG_CONFIG],
926 [if test -n "$$1"; then
928 elif test -n "$PKG_CONFIG"; then
929 PKG_CHECK_EXISTS([$3],
930 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
937 # _PKG_SHORT_ERRORS_SUPPORTED
938 # -----------------------------
939 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
940 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
941 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
942 _pkg_short_errors_supported=yes
944 _pkg_short_errors_supported=no
946 ])# _PKG_SHORT_ERRORS_SUPPORTED
949 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
950 # [ACTION-IF-NOT-FOUND])
953 # Note that if there is a possibility the first call to
954 # PKG_CHECK_MODULES might not happen, you should be sure to include an
955 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
958 # --------------------------------------------------------------
959 AC_DEFUN([PKG_CHECK_MODULES],
960 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
961 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
962 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
965 AC_MSG_CHECKING([for $1])
967 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
968 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
970 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
971 and $1[]_LIBS to avoid the need to call pkg-config.
972 See the pkg-config man page for more details.])
974 if test $pkg_failed = yes; then
976 _PKG_SHORT_ERRORS_SUPPORTED
977 if test $_pkg_short_errors_supported = yes; then
978 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
980 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
982 # Put the nasty error message in config.log where it belongs
983 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
985 m4_default([$4], [AC_MSG_ERROR(
986 [Package requirements ($2) were not met:
990 Consider adjusting the PKG_CONFIG_PATH environment variable if you
991 installed software in a non-standard prefix.
995 elif test $pkg_failed = untried; then
997 m4_default([$4], [AC_MSG_FAILURE(
998 [The pkg-config script could not be found or is too old. Make sure it
999 is in your PATH or set the PKG_CONFIG environment variable to the full
1004 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
1007 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1008 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1009 AC_MSG_RESULT([yes])
1012 ])# PKG_CHECK_MODULES
1014 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
1017 # This file is free software; the Free Software Foundation
1018 # gives unlimited permission to copy and/or distribute it,
1019 # with or without modifications, as long as this notice is preserved.
1023 # AM_AUTOMAKE_VERSION(VERSION)
1024 # ----------------------------
1025 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1026 # generated from the m4 files accompanying Automake X.Y.
1027 # (This private macro should not be called outside this file.)
1028 AC_DEFUN([AM_AUTOMAKE_VERSION],
1029 [am__api_version='1.11'
1030 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1031 dnl require some minimum version. Point them to the right macro.
1032 m4_if([$1], [1.11.3], [],
1033 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1036 # _AM_AUTOCONF_VERSION(VERSION)
1037 # -----------------------------
1038 # aclocal traces this macro to find the Autoconf version.
1039 # This is a private macro too. Using m4_define simplifies
1040 # the logic in aclocal, which can simply ignore this definition.
1041 m4_define([_AM_AUTOCONF_VERSION], [])
1043 # AM_SET_CURRENT_AUTOMAKE_VERSION
1044 # -------------------------------
1045 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1046 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1047 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1048 [AM_AUTOMAKE_VERSION([1.11.3])dnl
1049 m4_ifndef([AC_AUTOCONF_VERSION],
1050 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1051 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1053 # Figure out how to run the assembler. -*- Autoconf -*-
1055 # Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1057 # This file is free software; the Free Software Foundation
1058 # gives unlimited permission to copy and/or distribute it,
1059 # with or without modifications, as long as this notice is preserved.
1065 AC_DEFUN([AM_PROG_AS],
1066 [# By default we simply use the C compiler to build assembly code.
1067 AC_REQUIRE([AC_PROG_CC])
1068 test "${CCAS+set}" = set || CCAS=$CC
1069 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
1070 AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
1071 AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
1072 _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
1075 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
1077 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1079 # This file is free software; the Free Software Foundation
1080 # gives unlimited permission to copy and/or distribute it,
1081 # with or without modifications, as long as this notice is preserved.
1085 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1086 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1087 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1089 # Of course, Automake must honor this variable whenever it calls a
1090 # tool from the auxiliary directory. The problem is that $srcdir (and
1091 # therefore $ac_aux_dir as well) can be either absolute or relative,
1092 # depending on how configure is run. This is pretty annoying, since
1093 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
1094 # source directory, any form will work fine, but in subdirectories a
1095 # relative path needs to be adjusted first.
1097 # $ac_aux_dir/missing
1098 # fails when called from a subdirectory if $ac_aux_dir is relative
1099 # $top_srcdir/$ac_aux_dir/missing
1100 # fails if $ac_aux_dir is absolute,
1101 # fails when called from a subdirectory in a VPATH build with
1102 # a relative $ac_aux_dir
1104 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1105 # are both prefixed by $srcdir. In an in-source build this is usually
1106 # harmless because $srcdir is `.', but things will broke when you
1107 # start a VPATH build or use an absolute $srcdir.
1109 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1110 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1111 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1112 # and then we would define $MISSING as
1113 # MISSING="\${SHELL} $am_aux_dir/missing"
1114 # This will work as long as MISSING is not called from configure, because
1115 # unfortunately $(top_srcdir) has no meaning in configure.
1116 # However there are other variables, like CC, which are often used in
1117 # configure, and could therefore not use this "fixed" $ac_aux_dir.
1119 # Another solution, used here, is to always expand $ac_aux_dir to an
1120 # absolute PATH. The drawback is that using absolute paths prevent a
1121 # configured tree to be moved without reconfiguration.
1123 AC_DEFUN([AM_AUX_DIR_EXPAND],
1124 [dnl Rely on autoconf to set up CDPATH properly.
1125 AC_PREREQ([2.50])dnl
1126 # expand $ac_aux_dir to an absolute path
1127 am_aux_dir=`cd $ac_aux_dir && pwd`
1130 # AM_CONDITIONAL -*- Autoconf -*-
1132 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1133 # Free Software Foundation, Inc.
1135 # This file is free software; the Free Software Foundation
1136 # gives unlimited permission to copy and/or distribute it,
1137 # with or without modifications, as long as this notice is preserved.
1141 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1142 # -------------------------------------
1143 # Define a conditional.
1144 AC_DEFUN([AM_CONDITIONAL],
1146 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1147 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1148 AC_SUBST([$1_TRUE])dnl
1149 AC_SUBST([$1_FALSE])dnl
1150 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1151 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1152 m4_define([_AM_COND_VALUE_$1], [$2])dnl
1160 AC_CONFIG_COMMANDS_PRE(
1161 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1162 AC_MSG_ERROR([[conditional "$1" was never defined.
1163 Usually this means the macro was only invoked conditionally.]])
1166 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
1167 # 2010, 2011 Free Software Foundation, Inc.
1169 # This file is free software; the Free Software Foundation
1170 # gives unlimited permission to copy and/or distribute it,
1171 # with or without modifications, as long as this notice is preserved.
1175 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1176 # written in clear, in which case automake, when reading aclocal.m4,
1177 # will think it sees a *use*, and therefore will trigger all it's
1178 # C support machinery. Also note that it means that autoscan, seeing
1179 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1182 # _AM_DEPENDENCIES(NAME)
1183 # ----------------------
1184 # See how the compiler implements dependency checking.
1185 # NAME is "CC", "CXX", "GCJ", or "OBJC".
1186 # We try a few techniques and use that to set a single cache variable.
1188 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1189 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1190 # dependency, and given that the user is not expected to run this macro,
1191 # just rely on AC_PROG_CC.
1192 AC_DEFUN([_AM_DEPENDENCIES],
1193 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1194 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1195 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1196 AC_REQUIRE([AM_DEP_TRACK])dnl
1198 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1199 [$1], CXX, [depcc="$CXX" am_compiler_list=],
1200 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1201 [$1], UPC, [depcc="$UPC" am_compiler_list=],
1202 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1203 [depcc="$$1" am_compiler_list=])
1205 AC_CACHE_CHECK([dependency style of $depcc],
1206 [am_cv_$1_dependencies_compiler_type],
1207 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1208 # We make a subdir and do the tests there. Otherwise we can end up
1209 # making bogus files that we don't know about and never remove. For
1210 # instance it was reported that on HP-UX the gcc test will end up
1211 # making a dummy file named `D' -- because `-MD' means `put the output
1215 # Copy depcomp to subdir because otherwise we won't find it if we're
1216 # using a relative directory.
1217 cp "$am_depcomp" conftest.dir
1219 # We will build objects and dependencies in a subdirectory because
1220 # it helps to detect inapplicable dependency modes. For instance
1221 # both Tru64's cc and ICC support -MD to output dependencies as a
1222 # side effect of compilation, but ICC will put the dependencies in
1223 # the current directory while Tru64 will put them in the object
1227 am_cv_$1_dependencies_compiler_type=none
1228 if test "$am_compiler_list" = ""; then
1229 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1233 [case " $depcc " in #(
1234 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1237 [case " $depcc " in #(
1238 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1241 for depmode in $am_compiler_list; do
1242 # Setup a source with many dependencies, because some compilers
1243 # like to wrap large dependency lists on column 80 (with \), and
1244 # we should not choose a depcomp mode which is confused by this.
1246 # We need to recreate these files for each test, as the compiler may
1247 # overwrite some of them when testing with obscure command lines.
1248 # This happens at least with the AIX C compiler.
1250 for i in 1 2 3 4 5 6; do
1251 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1252 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1253 # Solaris 8's {/usr,}/bin/sh.
1254 touch sub/conftst$i.h
1256 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1258 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1259 # mode. It turns out that the SunPro C++ compiler does not properly
1260 # handle `-M -o', and we need to detect this. Also, some Intel
1261 # versions had trouble with output in subdirs
1262 am__obj=sub/conftest.${OBJEXT-o}
1263 am__minus_obj="-o $am__obj"
1266 # This depmode causes a compiler race in universal mode.
1267 test "$am__universal" = false || continue
1270 # after this tag, mechanisms are not by side-effect, so they'll
1271 # only be used when explicitly requested
1272 if test "x$enable_dependency_tracking" = xyes; then
1278 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1279 # This compiler won't grok `-c -o', but also, the minuso test has
1280 # not run yet. These depmodes are late enough in the game, and
1281 # so weak that their functioning should not be impacted.
1282 am__obj=conftest.${OBJEXT-o}
1287 if depmode=$depmode \
1288 source=sub/conftest.c object=$am__obj \
1289 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1290 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1291 >/dev/null 2>conftest.err &&
1292 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1293 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1294 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1295 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1296 # icc doesn't choke on unknown options, it will just issue warnings
1297 # or remarks (even with -Werror). So we grep stderr for any message
1298 # that says an option was ignored or not supported.
1299 # When given -MP, icc 7.0 and 7.1 complain thusly:
1300 # icc: Command line warning: ignoring option '-M'; no argument required
1301 # The diagnosis changed in icc 8.0:
1302 # icc: Command line remark: option '-MP' not supported
1303 if (grep 'ignoring option' conftest.err ||
1304 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1305 am_cv_$1_dependencies_compiler_type=$depmode
1314 am_cv_$1_dependencies_compiler_type=none
1317 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1318 AM_CONDITIONAL([am__fastdep$1], [
1319 test "x$enable_dependency_tracking" != xno \
1320 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1326 # Choose a directory name for dependency files.
1327 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1328 AC_DEFUN([AM_SET_DEPDIR],
1329 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1330 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1336 AC_DEFUN([AM_DEP_TRACK],
1337 [AC_ARG_ENABLE(dependency-tracking,
1338 [ --disable-dependency-tracking speeds up one-time build
1339 --enable-dependency-tracking do not reject slow dependency extractors])
1340 if test "x$enable_dependency_tracking" != xno; then
1341 am_depcomp="$ac_aux_dir/depcomp"
1345 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1346 AC_SUBST([AMDEPBACKSLASH])dnl
1347 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1348 AC_SUBST([am__nodep])dnl
1349 _AM_SUBST_NOTMAKE([am__nodep])dnl
1352 # Generate code to set up dependency tracking. -*- Autoconf -*-
1354 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1355 # Free Software Foundation, Inc.
1357 # This file is free software; the Free Software Foundation
1358 # gives unlimited permission to copy and/or distribute it,
1359 # with or without modifications, as long as this notice is preserved.
1363 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1364 # ------------------------------
1365 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1367 # Autoconf 2.62 quotes --file arguments for eval, but not when files
1368 # are listed without --file. Let's play safe and only enable the eval
1369 # if we detect the quoting.
1370 case $CONFIG_FILES in
1371 *\'*) eval set x "$CONFIG_FILES" ;;
1372 *) set x $CONFIG_FILES ;;
1377 # Strip MF so we end up with the name of the file.
1378 mf=`echo "$mf" | sed -e 's/:.*$//'`
1379 # Check whether this is an Automake generated Makefile or not.
1380 # We used to match only the files named `Makefile.in', but
1381 # some people rename them; so instead we look at the file content.
1382 # Grep'ing the first line is not enough: some people post-process
1383 # each Makefile.in and add a new line on top of each file to say so.
1384 # Grep'ing the whole file is not good either: AIX grep has a line
1385 # limit of 2048, but all sed's we know have understand at least 4000.
1386 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1387 dirpart=`AS_DIRNAME("$mf")`
1391 # Extract the definition of DEPDIR, am__include, and am__quote
1392 # from the Makefile without running `make'.
1393 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1394 test -z "$DEPDIR" && continue
1395 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1396 test -z "am__include" && continue
1397 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1398 # When using ansi2knr, U may be empty or an underscore; expand it
1399 U=`sed -n 's/^U = //p' < "$mf"`
1400 # Find all dependency output files, they are included files with
1401 # $(DEPDIR) in their names. We invoke sed twice because it is the
1402 # simplest approach to changing $(DEPDIR) to its actual value in the
1404 for file in `sed -n "
1405 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1406 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1407 # Make sure the directory exists.
1408 test -f "$dirpart/$file" && continue
1409 fdir=`AS_DIRNAME(["$file"])`
1410 AS_MKDIR_P([$dirpart/$fdir])
1411 # echo "creating $dirpart/$file"
1412 echo '# dummy' > "$dirpart/$file"
1416 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1419 # AM_OUTPUT_DEPENDENCY_COMMANDS
1420 # -----------------------------
1421 # This macro should only be invoked once -- use via AC_REQUIRE.
1423 # This code is only required when automatic dependency tracking
1424 # is enabled. FIXME. This creates each `.P' file that we will
1425 # need in order to bootstrap the dependency handling code.
1426 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1427 [AC_CONFIG_COMMANDS([depfiles],
1428 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1429 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1432 # Do all the work for Automake. -*- Autoconf -*-
1434 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1435 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1437 # This file is free software; the Free Software Foundation
1438 # gives unlimited permission to copy and/or distribute it,
1439 # with or without modifications, as long as this notice is preserved.
1443 # This macro actually does too much. Some checks are only needed if
1444 # your package does certain things. But this isn't really a big deal.
1446 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1447 # AM_INIT_AUTOMAKE([OPTIONS])
1448 # -----------------------------------------------
1449 # The call with PACKAGE and VERSION arguments is the old style
1450 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1451 # and VERSION should now be passed to AC_INIT and removed from
1452 # the call to AM_INIT_AUTOMAKE.
1453 # We support both call styles for the transition. After
1454 # the next Automake release, Autoconf can make the AC_INIT
1455 # arguments mandatory, and then we can depend on a new Autoconf
1456 # release and drop the old call support.
1457 AC_DEFUN([AM_INIT_AUTOMAKE],
1458 [AC_PREREQ([2.62])dnl
1459 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1460 dnl the ones we care about.
1461 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1462 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1463 AC_REQUIRE([AC_PROG_INSTALL])dnl
1464 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1465 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1466 # is not polluted with repeated "-I."
1467 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1468 # test to see if srcdir already configured
1469 if test -f $srcdir/config.status; then
1470 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1474 # test whether we have cygpath
1475 if test -z "$CYGPATH_W"; then
1476 if (cygpath --version) >/dev/null 2>/dev/null; then
1477 CYGPATH_W='cygpath -w'
1482 AC_SUBST([CYGPATH_W])
1484 # Define the identity of the package.
1485 dnl Distinguish between old-style and new-style calls.
1487 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1488 AC_SUBST([PACKAGE], [$1])dnl
1489 AC_SUBST([VERSION], [$2])],
1490 [_AM_SET_OPTIONS([$1])dnl
1491 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1492 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1493 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1494 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1495 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1497 _AM_IF_OPTION([no-define],,
1498 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1499 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1501 # Some tools Automake needs.
1502 AC_REQUIRE([AM_SANITY_CHECK])dnl
1503 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1504 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1505 AM_MISSING_PROG(AUTOCONF, autoconf)
1506 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1507 AM_MISSING_PROG(AUTOHEADER, autoheader)
1508 AM_MISSING_PROG(MAKEINFO, makeinfo)
1509 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1510 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1511 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1512 # We need awk for the "check" target. The system "awk" is bad on
1514 AC_REQUIRE([AC_PROG_AWK])dnl
1515 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1516 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1517 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1518 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1519 [_AM_PROG_TAR([v7])])])
1520 _AM_IF_OPTION([no-dependencies],,
1521 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1522 [_AM_DEPENDENCIES(CC)],
1523 [define([AC_PROG_CC],
1524 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1525 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1526 [_AM_DEPENDENCIES(CXX)],
1527 [define([AC_PROG_CXX],
1528 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1529 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1530 [_AM_DEPENDENCIES(OBJC)],
1531 [define([AC_PROG_OBJC],
1532 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1534 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1535 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1536 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1537 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1538 AC_CONFIG_COMMANDS_PRE(dnl
1539 [m4_provide_if([_AM_COMPILER_EXEEXT],
1540 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1543 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1544 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1545 dnl mangled by Autoconf and run in a shell conditional statement.
1546 m4_define([_AC_COMPILER_EXEEXT],
1547 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1550 # When config.status generates a header, we must update the stamp-h file.
1551 # This file resides in the same directory as the config header
1552 # that is generated. The stamp files are numbered to have different names.
1554 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1555 # loop where config.status creates the headers, so we can generate
1556 # our stamp files there.
1557 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1558 [# Compute $1's index in $config_headers.
1561 for _am_header in $config_headers :; do
1563 $_am_arg | $_am_arg:* )
1566 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1569 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1571 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
1574 # This file is free software; the Free Software Foundation
1575 # gives unlimited permission to copy and/or distribute it,
1576 # with or without modifications, as long as this notice is preserved.
1580 # AM_PROG_INSTALL_SH
1581 # ------------------
1582 # Define $install_sh.
1583 AC_DEFUN([AM_PROG_INSTALL_SH],
1584 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1585 if test x"${install_sh}" != xset; then
1588 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1590 install_sh="\${SHELL} $am_aux_dir/install-sh"
1593 AC_SUBST(install_sh)])
1595 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1597 # This file is free software; the Free Software Foundation
1598 # gives unlimited permission to copy and/or distribute it,
1599 # with or without modifications, as long as this notice is preserved.
1603 # Check whether the underlying file-system supports filenames
1604 # with a leading dot. For instance MS-DOS doesn't.
1605 AC_DEFUN([AM_SET_LEADING_DOT],
1606 [rm -rf .tst 2>/dev/null
1607 mkdir .tst 2>/dev/null
1608 if test -d .tst; then
1613 rmdir .tst 2>/dev/null
1614 AC_SUBST([am__leading_dot])])
1616 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1619 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
1620 # 2011 Free Software Foundation, Inc.
1622 # This file is free software; the Free Software Foundation
1623 # gives unlimited permission to copy and/or distribute it,
1624 # with or without modifications, as long as this notice is preserved.
1628 # AM_MAINTAINER_MODE([DEFAULT-MODE])
1629 # ----------------------------------
1630 # Control maintainer-specific portions of Makefiles.
1631 # Default is to disable them, unless `enable' is passed literally.
1632 # For symmetry, `disable' may be passed as well. Anyway, the user
1633 # can override the default with the --enable/--disable switch.
1634 AC_DEFUN([AM_MAINTAINER_MODE],
1635 [m4_case(m4_default([$1], [disable]),
1636 [enable], [m4_define([am_maintainer_other], [disable])],
1637 [disable], [m4_define([am_maintainer_other], [enable])],
1638 [m4_define([am_maintainer_other], [enable])
1639 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1640 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1641 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1642 AC_ARG_ENABLE([maintainer-mode],
1643 [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
1644 (and sometimes confusing) to the casual installer],
1645 [USE_MAINTAINER_MODE=$enableval],
1646 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1647 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1648 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1649 MAINT=$MAINTAINER_MODE_TRUE
1650 AC_SUBST([MAINT])dnl
1654 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1656 # Check to see how 'make' treats includes. -*- Autoconf -*-
1658 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1660 # This file is free software; the Free Software Foundation
1661 # gives unlimited permission to copy and/or distribute it,
1662 # with or without modifications, as long as this notice is preserved.
1668 # Check to see how make treats includes.
1669 AC_DEFUN([AM_MAKE_INCLUDE],
1670 [am_make=${MAKE-make}
1671 cat > confinc << 'END'
1673 @echo this is the am__doit target
1676 # If we don't find an include directive, just comment out the code.
1677 AC_MSG_CHECKING([for style of include used by $am_make])
1681 # First try GNU make style include.
1682 echo "include confinc" > confmf
1683 # Ignore all kinds of additional output from `make'.
1684 case `$am_make -s -f confmf 2> /dev/null` in #(
1685 *the\ am__doit\ target*)
1691 # Now try BSD make style include.
1692 if test "$am__include" = "#"; then
1693 echo '.include "confinc"' > confmf
1694 case `$am_make -s -f confmf 2> /dev/null` in #(
1695 *the\ am__doit\ target*)
1696 am__include=.include
1702 AC_SUBST([am__include])
1703 AC_SUBST([am__quote])
1704 AC_MSG_RESULT([$_am_result])
1705 rm -f confinc confmf
1708 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1710 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1711 # Free Software Foundation, Inc.
1713 # This file is free software; the Free Software Foundation
1714 # gives unlimited permission to copy and/or distribute it,
1715 # with or without modifications, as long as this notice is preserved.
1719 # AM_MISSING_PROG(NAME, PROGRAM)
1720 # ------------------------------
1721 AC_DEFUN([AM_MISSING_PROG],
1722 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1723 $1=${$1-"${am_missing_run}$2"}
1727 # AM_MISSING_HAS_RUN
1728 # ------------------
1729 # Define MISSING if not defined so far and test if it supports --run.
1730 # If it does, set am_missing_run to use it, otherwise, to nothing.
1731 AC_DEFUN([AM_MISSING_HAS_RUN],
1732 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1733 AC_REQUIRE_AUX_FILE([missing])dnl
1734 if test x"${MISSING+set}" != xset; then
1737 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1739 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1742 # Use eval to expand $SHELL
1743 if eval "$MISSING --run true"; then
1744 am_missing_run="$MISSING --run "
1747 AC_MSG_WARN([`missing' script is too old or missing])
1751 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
1754 # This file is free software; the Free Software Foundation
1755 # gives unlimited permission to copy and/or distribute it,
1756 # with or without modifications, as long as this notice is preserved.
1762 # Check for `mkdir -p'.
1763 AC_DEFUN([AM_PROG_MKDIR_P],
1764 [AC_PREREQ([2.60])dnl
1765 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1766 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1767 dnl while keeping a definition of mkdir_p for backward compatibility.
1768 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1769 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1770 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1771 dnl adjustment using top_builddir (which is defined more often than
1773 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1775 [[\\/$]]* | ?:[[\\/]]*) ;;
1776 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1780 # Helper functions for option handling. -*- Autoconf -*-
1782 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
1785 # This file is free software; the Free Software Foundation
1786 # gives unlimited permission to copy and/or distribute it,
1787 # with or without modifications, as long as this notice is preserved.
1791 # _AM_MANGLE_OPTION(NAME)
1792 # -----------------------
1793 AC_DEFUN([_AM_MANGLE_OPTION],
1794 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1796 # _AM_SET_OPTION(NAME)
1797 # --------------------
1798 # Set option NAME. Presently that only means defining a flag for this option.
1799 AC_DEFUN([_AM_SET_OPTION],
1800 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1802 # _AM_SET_OPTIONS(OPTIONS)
1803 # ------------------------
1804 # OPTIONS is a space-separated list of Automake options.
1805 AC_DEFUN([_AM_SET_OPTIONS],
1806 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1808 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1809 # -------------------------------------------
1810 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1811 AC_DEFUN([_AM_IF_OPTION],
1812 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1814 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1816 # This file is free software; the Free Software Foundation
1817 # gives unlimited permission to copy and/or distribute it,
1818 # with or without modifications, as long as this notice is preserved.
1822 # AM_RUN_LOG(COMMAND)
1823 # -------------------
1824 # Run COMMAND, save the exit status in ac_status, and log it.
1825 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1826 AC_DEFUN([AM_RUN_LOG],
1827 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1828 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1830 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1831 (exit $ac_status); }])
1833 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1835 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1836 # Free Software Foundation, Inc.
1838 # This file is free software; the Free Software Foundation
1839 # gives unlimited permission to copy and/or distribute it,
1840 # with or without modifications, as long as this notice is preserved.
1846 AC_DEFUN([AM_SANITY_CHECK],
1847 [AC_MSG_CHECKING([whether build environment is sane])
1850 echo timestamp > conftest.file
1851 # Reject unsafe characters in $srcdir or the absolute working directory
1852 # name. Accept space and tab only in the latter.
1856 *[[\\\"\#\$\&\'\`$am_lf]]*)
1857 AC_MSG_ERROR([unsafe absolute working directory name]);;
1860 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1861 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1864 # Do `set' in a subshell so we don't clobber the current shell's
1865 # arguments. Must try -L first in case configure is actually a
1866 # symlink; some systems play weird games with the mod time of symlinks
1867 # (eg FreeBSD returns the mod time of the symlink's containing
1870 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1871 if test "$[*]" = "X"; then
1873 set X `ls -t "$srcdir/configure" conftest.file`
1876 if test "$[*]" != "X $srcdir/configure conftest.file" \
1877 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1879 # If neither matched, then we have a broken ls. This can happen
1880 # if, for instance, CONFIG_SHELL is bash and it inherits a
1881 # broken ls alias from the environment. This has actually
1882 # happened. Such a system could not be considered "sane".
1883 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1884 alias in your environment])
1887 test "$[2]" = conftest.file
1893 AC_MSG_ERROR([newly created file is older than distributed files!
1894 Check your system clock])
1896 AC_MSG_RESULT(yes)])
1898 # Copyright (C) 2009, 2011 Free Software Foundation, Inc.
1900 # This file is free software; the Free Software Foundation
1901 # gives unlimited permission to copy and/or distribute it,
1902 # with or without modifications, as long as this notice is preserved.
1906 # AM_SILENT_RULES([DEFAULT])
1907 # --------------------------
1908 # Enable less verbose build rules; with the default set to DEFAULT
1909 # (`yes' being less verbose, `no' or empty being verbose).
1910 AC_DEFUN([AM_SILENT_RULES],
1911 [AC_ARG_ENABLE([silent-rules],
1912 [ --enable-silent-rules less verbose build output (undo: `make V=1')
1913 --disable-silent-rules verbose build output (undo: `make V=0')])
1914 case $enable_silent_rules in
1915 yes) AM_DEFAULT_VERBOSITY=0;;
1916 no) AM_DEFAULT_VERBOSITY=1;;
1917 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1920 dnl A few `make' implementations (e.g., NonStop OS and NextStep)
1921 dnl do not support nested variable expansions.
1922 dnl See automake bug#9928 and bug#10237.
1923 am_make=${MAKE-make}
1924 AC_CACHE_CHECK([whether $am_make supports nested variables],
1925 [am_cv_make_support_nested_variables],
1926 [if AS_ECHO([['TRUE=$(BAR$(V))
1932 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1933 am_cv_make_support_nested_variables=yes
1935 am_cv_make_support_nested_variables=no
1937 if test $am_cv_make_support_nested_variables = yes; then
1938 dnl Using `$V' instead of `$(V)' breaks IRIX make.
1940 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1942 AM_V=$AM_DEFAULT_VERBOSITY
1943 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1946 AM_SUBST_NOTMAKE([AM_V])dnl
1947 AC_SUBST([AM_DEFAULT_V])dnl
1948 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1949 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1951 AC_SUBST([AM_BACKSLASH])dnl
1952 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1955 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1957 # This file is free software; the Free Software Foundation
1958 # gives unlimited permission to copy and/or distribute it,
1959 # with or without modifications, as long as this notice is preserved.
1963 # AM_PROG_INSTALL_STRIP
1964 # ---------------------
1965 # One issue with vendor `install' (even GNU) is that you can't
1966 # specify the program used to strip binaries. This is especially
1967 # annoying in cross-compiling environments, where the build's strip
1968 # is unlikely to handle the host's binaries.
1969 # Fortunately install-sh will honor a STRIPPROG variable, so we
1970 # always use install-sh in `make install-strip', and initialize
1971 # STRIPPROG with the value of the STRIP variable (set by the user).
1972 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1973 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1974 # Installed binaries are usually stripped using `strip' when the user
1975 # run `make install-strip'. However `strip' might not be the right
1976 # tool to use in cross-compilation environments, therefore Automake
1977 # will honor the `STRIP' environment variable to overrule this program.
1978 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1979 if test "$cross_compiling" != no; then
1980 AC_CHECK_TOOL([STRIP], [strip], :)
1982 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1983 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1985 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
1987 # This file is free software; the Free Software Foundation
1988 # gives unlimited permission to copy and/or distribute it,
1989 # with or without modifications, as long as this notice is preserved.
1993 # _AM_SUBST_NOTMAKE(VARIABLE)
1994 # ---------------------------
1995 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1996 # This macro is traced by Automake.
1997 AC_DEFUN([_AM_SUBST_NOTMAKE])
1999 # AM_SUBST_NOTMAKE(VARIABLE)
2000 # --------------------------
2001 # Public sister of _AM_SUBST_NOTMAKE.
2002 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2004 # Check how to create a tarball. -*- Autoconf -*-
2006 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
2008 # This file is free software; the Free Software Foundation
2009 # gives unlimited permission to copy and/or distribute it,
2010 # with or without modifications, as long as this notice is preserved.
2014 # _AM_PROG_TAR(FORMAT)
2015 # --------------------
2016 # Check how to create a tarball in format FORMAT.
2017 # FORMAT should be one of `v7', `ustar', or `pax'.
2019 # Substitute a variable $(am__tar) that is a command
2020 # writing to stdout a FORMAT-tarball containing the directory
2022 # tardir=directory && $(am__tar) > result.tar
2024 # Substitute a variable $(am__untar) that extract such
2025 # a tarball read from stdin.
2026 # $(am__untar) < result.tar
2027 AC_DEFUN([_AM_PROG_TAR],
2028 [# Always define AMTAR for backward compatibility. Yes, it's still used
2029 # in the wild :-( We should find a proper way to deprecate it ...
2030 AC_SUBST([AMTAR], ['$${TAR-tar}'])
2032 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2033 [m4_case([$1], [ustar],, [pax],,
2034 [m4_fatal([Unknown tar format])])
2035 AC_MSG_CHECKING([how to create a $1 tar archive])
2036 # Loop over all known methods to create a tar archive until one works.
2037 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2038 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2039 # Do not fold the above two line into one, because Tru64 sh and
2040 # Solaris sh will not grok spaces in the rhs of `-'.
2041 for _am_tool in $_am_tools
2045 for _am_tar in tar gnutar gtar;
2047 AM_RUN_LOG([$_am_tar --version]) && break
2049 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2050 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2051 am__untar="$_am_tar -xf -"
2054 # Must skip GNU tar: if it does not support --format= it doesn't create
2055 # ustar tarball either.
2056 (tar --version) >/dev/null 2>&1 && continue
2057 am__tar='tar chf - "$$tardir"'
2058 am__tar_='tar chf - "$tardir"'
2059 am__untar='tar xf -'
2062 am__tar='pax -L -x $1 -w "$$tardir"'
2063 am__tar_='pax -L -x $1 -w "$tardir"'
2067 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2068 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2069 am__untar='cpio -i -H $1 -d'
2078 # If the value was cached, stop now. We just wanted to have am__tar
2079 # and am__untar set.
2080 test -n "${am_cv_prog_tar_$1}" && break
2082 # tar/untar a dummy directory, and stop if the command works
2085 echo GrepMe > conftest.dir/file
2086 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2088 if test -s conftest.tar; then
2089 AM_RUN_LOG([$am__untar <conftest.tar])
2090 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2095 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2096 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2098 AC_SUBST([am__untar])
2101 m4_include([m4/gtk-doc.m4])
2102 m4_include([m4/libtool.m4])
2103 m4_include([m4/ltoptions.m4])
2104 m4_include([m4/ltsugar.m4])
2105 m4_include([m4/ltversion.m4])
2106 m4_include([m4/lt~obsolete.m4])
2107 m4_include([acinclude.m4])