Bug 524030 – provide option to hide statusbar
[xchat-gnome.git] / aclocal.m4
blob712a734b899991b60fa45e4bd4c676d665681c75
1 # generated automatically by aclocal 1.10.2 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
14 m4_ifndef([AC_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17 [m4_warning([this file was generated for autoconf 2.63.
18 You have another version of autoconf.  It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22 dnl AM_GCONF_SOURCE_2
23 dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
24 dnl  (i.e. pass to gconftool-2
25 dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
26 dnl  you should install foo.schemas files
27 dnl
29 AC_DEFUN([AM_GCONF_SOURCE_2],
31   if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
32     GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
33   else
34     GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
35   fi
37   AC_ARG_WITH([gconf-source],
38               AC_HELP_STRING([--with-gconf-source=sourceaddress],
39                              [Config database for installing schema files.]),
40               [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
42   AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
43   AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
45   if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
46     GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
47   fi
49   AC_ARG_WITH([gconf-schema-file-dir],
50               AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
51                              [Directory for installing schema files.]),
52               [GCONF_SCHEMA_FILE_DIR="$withval"],)
54   AC_SUBST(GCONF_SCHEMA_FILE_DIR)
55   AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
57   AC_ARG_ENABLE(schemas-install,
58      [  --disable-schemas-install       Disable the schemas installation],
59      [case ${enableval} in
60        yes|no) ;;
61        *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
62       esac])
63   AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
66 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
67 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
69 # This file is free software, distributed under the terms of the GNU
70 # General Public License.  As a special exception to the GNU General
71 # Public License, this file may be distributed as part of a program
72 # that contains a configuration script generated by Autoconf, under
73 # the same distribution terms as the rest of that program.
75 # This file can be copied and used freely without restrictions.  It can
76 # be used in projects which are not available under the GNU Public License
77 # but which still want to provide support for the GNU gettext functionality.
79 # Macro to add for using GNU gettext.
80 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
82 # Modified to never use included libintl. 
83 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
85 # Major rework to remove unused code
86 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
88 # Added better handling of ALL_LINGUAS from GNU gettext version 
89 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
91 # Modified to require ngettext
92 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
94 # We need this here as well, since someone might use autoconf-2.5x
95 # to configure GLib then an older version to configure a package
96 # using AM_GLIB_GNU_GETTEXT
97 AC_PREREQ(2.53)
99 dnl
100 dnl We go to great lengths to make sure that aclocal won't 
101 dnl try to pull in the installed version of these macros
102 dnl when running aclocal in the glib directory.
104 m4_copy([AC_DEFUN],[glib_DEFUN])
105 m4_copy([AC_REQUIRE],[glib_REQUIRE])
107 dnl At the end, if we're not within glib, we'll define the public
108 dnl definitions in terms of our private definitions.
111 # GLIB_LC_MESSAGES
112 #--------------------
113 glib_DEFUN([GLIB_LC_MESSAGES],
114   [AC_CHECK_HEADERS([locale.h])
115     if test $ac_cv_header_locale_h = yes; then
116     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
117       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
118        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
119     if test $am_cv_val_LC_MESSAGES = yes; then
120       AC_DEFINE(HAVE_LC_MESSAGES, 1,
121         [Define if your <locale.h> file defines LC_MESSAGES.])
122     fi
123   fi])
125 # GLIB_PATH_PROG_WITH_TEST
126 #----------------------------
127 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
128 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
129 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
130 [# Extract the first word of "$2", so it can be a program name with args.
131 set dummy $2; ac_word=[$]2
132 AC_MSG_CHECKING([for $ac_word])
133 AC_CACHE_VAL(ac_cv_path_$1,
134 [case "[$]$1" in
135   /*)
136   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
137   ;;
138   *)
139   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
140   for ac_dir in ifelse([$5], , $PATH, [$5]); do
141     test -z "$ac_dir" && ac_dir=.
142     if test -f $ac_dir/$ac_word; then
143       if [$3]; then
144         ac_cv_path_$1="$ac_dir/$ac_word"
145         break
146       fi
147     fi
148   done
149   IFS="$ac_save_ifs"
150 dnl If no 4th arg is given, leave the cache variable unset,
151 dnl so AC_PATH_PROGS will keep looking.
152 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
153 ])dnl
154   ;;
155 esac])dnl
156 $1="$ac_cv_path_$1"
157 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
158   AC_MSG_RESULT([$]$1)
159 else
160   AC_MSG_RESULT(no)
162 AC_SUBST($1)dnl
165 # GLIB_WITH_NLS
166 #-----------------
167 glib_DEFUN([GLIB_WITH_NLS],
168   dnl NLS is obligatory
169   [USE_NLS=yes
170     AC_SUBST(USE_NLS)
172     gt_cv_have_gettext=no
174     CATOBJEXT=NONE
175     XGETTEXT=:
176     INTLLIBS=
178     AC_CHECK_HEADER(libintl.h,
179      [gt_cv_func_dgettext_libintl="no"
180       libintl_extra_libs=""
182       #
183       # First check in libc
184       #
185       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
186         [AC_TRY_LINK([
187 #include <libintl.h>
189          [return !ngettext ("","", 1)],
190           gt_cv_func_ngettext_libc=yes,
191           gt_cv_func_ngettext_libc=no)
192         ])
193   
194       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
195               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
196                 [AC_TRY_LINK([
197 #include <libintl.h>
199                   [return !dgettext ("","")],
200                   gt_cv_func_dgettext_libc=yes,
201                   gt_cv_func_dgettext_libc=no)
202                 ])
203       fi
204   
205       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
206         AC_CHECK_FUNCS(bind_textdomain_codeset)
207       fi
209       #
210       # If we don't have everything we want, check in libintl
211       #
212       if test "$gt_cv_func_dgettext_libc" != "yes" \
213          || test "$gt_cv_func_ngettext_libc" != "yes" \
214          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
215         
216         AC_CHECK_LIB(intl, bindtextdomain,
217             [AC_CHECK_LIB(intl, ngettext,
218                     [AC_CHECK_LIB(intl, dgettext,
219                                   gt_cv_func_dgettext_libintl=yes)])])
221         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
222           AC_MSG_CHECKING([if -liconv is needed to use gettext])
223           AC_MSG_RESULT([])
224           AC_CHECK_LIB(intl, ngettext,
225                 [AC_CHECK_LIB(intl, dcgettext,
226                        [gt_cv_func_dgettext_libintl=yes
227                         libintl_extra_libs=-liconv],
228                         :,-liconv)],
229                 :,-liconv)
230         fi
232         #
233         # If we found libintl, then check in it for bind_textdomain_codeset();
234         # we'll prefer libc if neither have bind_textdomain_codeset(),
235         # and both have dgettext and ngettext
236         #
237         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
238           glib_save_LIBS="$LIBS"
239           LIBS="$LIBS -lintl $libintl_extra_libs"
240           unset ac_cv_func_bind_textdomain_codeset
241           AC_CHECK_FUNCS(bind_textdomain_codeset)
242           LIBS="$glib_save_LIBS"
244           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
245             gt_cv_func_dgettext_libc=no
246           else
247             if test "$gt_cv_func_dgettext_libc" = "yes" \
248                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
249               gt_cv_func_dgettext_libintl=no
250             fi
251           fi
252         fi
253       fi
255       if test "$gt_cv_func_dgettext_libc" = "yes" \
256         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
257         gt_cv_have_gettext=yes
258       fi
259   
260       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
261         INTLLIBS="-lintl $libintl_extra_libs"
262       fi
263   
264       if test "$gt_cv_have_gettext" = "yes"; then
265         AC_DEFINE(HAVE_GETTEXT,1,
266           [Define if the GNU gettext() function is already present or preinstalled.])
267         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
268           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
269         if test "$MSGFMT" != "no"; then
270           glib_save_LIBS="$LIBS"
271           LIBS="$LIBS $INTLLIBS"
272           AC_CHECK_FUNCS(dcgettext)
273           MSGFMT_OPTS=
274           AC_MSG_CHECKING([if msgfmt accepts -c])
275           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
276 msgid ""
277 msgstr ""
278 "Content-Type: text/plain; charset=UTF-8\n"
279 "Project-Id-Version: test 1.0\n"
280 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
281 "Last-Translator: test <foo@bar.xx>\n"
282 "Language-Team: C <LL@li.org>\n"
283 "MIME-Version: 1.0\n"
284 "Content-Transfer-Encoding: 8bit\n"
285 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
286           AC_SUBST(MSGFMT_OPTS)
287           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
288           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
289             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
290           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
291                          return _nl_msg_cat_cntr],
292             [CATOBJEXT=.gmo 
293              DATADIRNAME=share],
294             [case $host in
295             *-*-solaris*)
296             dnl On Solaris, if bind_textdomain_codeset is in libc,
297             dnl GNU format message catalog is always supported,
298             dnl since both are added to the libc all together.
299             dnl Hence, we'd like to go with DATADIRNAME=share and
300             dnl and CATOBJEXT=.gmo in this case.
301             AC_CHECK_FUNC(bind_textdomain_codeset,
302               [CATOBJEXT=.gmo 
303                DATADIRNAME=share],
304               [CATOBJEXT=.mo
305                DATADIRNAME=lib])
306             ;;
307             *)
308             CATOBJEXT=.mo
309             DATADIRNAME=lib
310             ;;
311             esac])
312           LIBS="$glib_save_LIBS"
313           INSTOBJEXT=.mo
314         else
315           gt_cv_have_gettext=no
316         fi
317       fi
318     ])
320     if test "$gt_cv_have_gettext" = "yes" ; then
321       AC_DEFINE(ENABLE_NLS, 1,
322         [always defined to indicate that i18n is enabled])
323     fi
325     dnl Test whether we really found GNU xgettext.
326     if test "$XGETTEXT" != ":"; then
327       dnl If it is not GNU xgettext we define it as : so that the
328       dnl Makefiles still can work.
329       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
330         : ;
331       else
332         AC_MSG_RESULT(
333           [found xgettext program is not GNU xgettext; ignore it])
334         XGETTEXT=":"
335       fi
336     fi
338     # We need to process the po/ directory.
339     POSUB=po
341     AC_OUTPUT_COMMANDS(
342       [case "$CONFIG_FILES" in *po/Makefile.in*)
343         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
344       esac])
346     dnl These rules are solely for the distribution goal.  While doing this
347     dnl we only have to keep exactly one list of the available catalogs
348     dnl in configure.in.
349     for lang in $ALL_LINGUAS; do
350       GMOFILES="$GMOFILES $lang.gmo"
351       POFILES="$POFILES $lang.po"
352     done
354     dnl Make all variables we use known to autoconf.
355     AC_SUBST(CATALOGS)
356     AC_SUBST(CATOBJEXT)
357     AC_SUBST(DATADIRNAME)
358     AC_SUBST(GMOFILES)
359     AC_SUBST(INSTOBJEXT)
360     AC_SUBST(INTLLIBS)
361     AC_SUBST(PO_IN_DATADIR_TRUE)
362     AC_SUBST(PO_IN_DATADIR_FALSE)
363     AC_SUBST(POFILES)
364     AC_SUBST(POSUB)
365   ])
367 # AM_GLIB_GNU_GETTEXT
368 # -------------------
369 # Do checks necessary for use of gettext. If a suitable implementation 
370 # of gettext is found in either in libintl or in the C library,
371 # it will set INTLLIBS to the libraries needed for use of gettext
372 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
373 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
374 # on various variables needed by the Makefile.in.in installed by 
375 # glib-gettextize.
377 glib_DEFUN([GLIB_GNU_GETTEXT],
378   [AC_REQUIRE([AC_PROG_CC])dnl
379    AC_REQUIRE([AC_HEADER_STDC])dnl
380    
381    GLIB_LC_MESSAGES
382    GLIB_WITH_NLS
384    if test "$gt_cv_have_gettext" = "yes"; then
385      if test "x$ALL_LINGUAS" = "x"; then
386        LINGUAS=
387      else
388        AC_MSG_CHECKING(for catalogs to be installed)
389        NEW_LINGUAS=
390        for presentlang in $ALL_LINGUAS; do
391          useit=no
392          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
393            desiredlanguages="$LINGUAS"
394          else
395            desiredlanguages="$ALL_LINGUAS"
396          fi
397          for desiredlang in $desiredlanguages; do
398            # Use the presentlang catalog if desiredlang is
399            #   a. equal to presentlang, or
400            #   b. a variant of presentlang (because in this case,
401            #      presentlang can be used as a fallback for messages
402            #      which are not translated in the desiredlang catalog).
403            case "$desiredlang" in
404              "$presentlang"*) useit=yes;;
405            esac
406          done
407          if test $useit = yes; then
408            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
409          fi
410        done
411        LINGUAS=$NEW_LINGUAS
412        AC_MSG_RESULT($LINGUAS)
413      fi
415      dnl Construct list of names of catalog files to be constructed.
416      if test -n "$LINGUAS"; then
417        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
418      fi
419    fi
421    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
422    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
423    dnl Try to locate is.
424    MKINSTALLDIRS=
425    if test -n "$ac_aux_dir"; then
426      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
427    fi
428    if test -z "$MKINSTALLDIRS"; then
429      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
430    fi
431    AC_SUBST(MKINSTALLDIRS)
433    dnl Generate list of files to be processed by xgettext which will
434    dnl be included in po/Makefile.
435    test -d po || mkdir po
436    if test "x$srcdir" != "x."; then
437      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
438        posrcprefix="$srcdir/"
439      else
440        posrcprefix="../$srcdir/"
441      fi
442    else
443      posrcprefix="../"
444    fi
445    rm -f po/POTFILES
446    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
447         < $srcdir/po/POTFILES.in > po/POTFILES
448   ])
450 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
451 # -------------------------------
452 # Define VARIABLE to the location where catalog files will
453 # be installed by po/Makefile.
454 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
455 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
456 glib_save_prefix="$prefix"
457 glib_save_exec_prefix="$exec_prefix"
458 glib_save_datarootdir="$datarootdir"
459 test "x$prefix" = xNONE && prefix=$ac_default_prefix
460 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
461 datarootdir=`eval echo "${datarootdir}"`
462 if test "x$CATOBJEXT" = "x.mo" ; then
463   localedir=`eval echo "${libdir}/locale"`
464 else
465   localedir=`eval echo "${datadir}/locale"`
467 prefix="$glib_save_prefix"
468 exec_prefix="$glib_save_exec_prefix"
469 datarootdir="$glib_save_datarootdir"
470 AC_DEFINE_UNQUOTED($1, "$localedir",
471   [Define the location where the catalogs will be installed])
475 dnl Now the definitions that aclocal will find
477 ifdef(glib_configure_in,[],[
478 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
479 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
480 ])dnl
482 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
484 # Create a temporary file with TEST-FILE as its contents and pass the
485 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
486 # 0 and perform ACTION-IF-FAIL for any other exit status.
487 AC_DEFUN([GLIB_RUN_PROG],
488 [cat >conftest.foo <<_ACEOF
490 _ACEOF
491 if AC_RUN_LOG([$1 conftest.foo]); then
492   m4_ifval([$3], [$3], [:])
493 m4_ifvaln([$4], [else $4])dnl
494 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
495 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
496 fi])
499 # gnome-common.m4
502 dnl GNOME_COMMON_INIT
504 AC_DEFUN([GNOME_COMMON_INIT],
506   dnl this macro should come after AC_CONFIG_MACRO_DIR
507   AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
509   dnl ensure that when the Automake generated makefile calls aclocal,
510   dnl it honours the $ACLOCAL_FLAGS environment variable
511   ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
512   if test -n "$ac_macro_dir"; then
513     ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
514   fi
516   AC_SUBST([ACLOCAL_AMFLAGS])
519 AC_DEFUN([GNOME_DEBUG_CHECK],
521         AC_ARG_ENABLE([debug],
522                       AC_HELP_STRING([--enable-debug],
523                                      [turn on debugging]),,
524                       [enable_debug=no])
526         if test x$enable_debug = xyes ; then
527             AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
528                 [Enable additional debugging at the expense of performance and size])
529         fi
532 dnl GNOME_MAINTAINER_MODE_DEFINES ()
533 dnl define DISABLE_DEPRECATED
535 AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
537         AC_REQUIRE([AM_MAINTAINER_MODE])
539         if test $USE_MAINTAINER_MODE = yes; then
540                 DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED -DWNCK_DISABLE_DEPRECATED -DLIBSOUP_DISABLE_DEPRECATED"
541         else
542                 DISABLE_DEPRECATED=""
543         fi
544         AC_SUBST(DISABLE_DEPRECATED)
547 dnl GNOME_COMPILE_WARNINGS
548 dnl Turn on many useful compiler warnings
549 dnl For now, only works on GCC
550 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
551     dnl ******************************
552     dnl More compiler warnings
553     dnl ******************************
555     AC_ARG_ENABLE(compile-warnings, 
556                   AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
557                                  [Turn on compiler warnings]),,
558                   [enable_compile_warnings="m4_default([$1],[yes])"])
560     warnCFLAGS=
561     if test "x$GCC" != xyes; then
562         enable_compile_warnings=no
563     fi
565     warning_flags=
566     realsave_CFLAGS="$CFLAGS"
568     case "$enable_compile_warnings" in
569     no)
570         warning_flags=
571         ;;
572     minimum)
573         warning_flags="-Wall"
574         ;;
575     yes)
576         warning_flags="-Wall -Wmissing-prototypes"
577         ;;
578     maximum|error)
579         warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
580         CFLAGS="$warning_flags $CFLAGS"
581         for option in -Wno-sign-compare; do
582                 SAVE_CFLAGS="$CFLAGS"
583                 CFLAGS="$CFLAGS $option"
584                 AC_MSG_CHECKING([whether gcc understands $option])
585                 AC_TRY_COMPILE([], [],
586                         has_option=yes,
587                         has_option=no,)
588                 CFLAGS="$SAVE_CFLAGS"
589                 AC_MSG_RESULT($has_option)
590                 if test $has_option = yes; then
591                   warning_flags="$warning_flags $option"
592                 fi
593                 unset has_option
594                 unset SAVE_CFLAGS
595         done
596         unset option
597         if test "$enable_compile_warnings" = "error" ; then
598             warning_flags="$warning_flags -Werror"
599         fi
600         ;;
601     *)
602         AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
603         ;;
604     esac
605     CFLAGS="$realsave_CFLAGS"
606     AC_MSG_CHECKING(what warning flags to pass to the C compiler)
607     AC_MSG_RESULT($warning_flags)
609     AC_ARG_ENABLE(iso-c,
610                   AC_HELP_STRING([--enable-iso-c],
611                                  [Try to warn if code is not ISO C ]),,
612                   [enable_iso_c=no])
614     AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
615     complCFLAGS=
616     if test "x$enable_iso_c" != "xno"; then
617         if test "x$GCC" = "xyes"; then
618         case " $CFLAGS " in
619             *[\ \       ]-ansi[\ \      ]*) ;;
620             *) complCFLAGS="$complCFLAGS -ansi" ;;
621         esac
622         case " $CFLAGS " in
623             *[\ \       ]-pedantic[\ \  ]*) ;;
624             *) complCFLAGS="$complCFLAGS -pedantic" ;;
625         esac
626         fi
627     fi
628     AC_MSG_RESULT($complCFLAGS)
630     WARN_CFLAGS="$warning_flags $complCFLAGS"
631     AC_SUBST(WARN_CFLAGS)
634 dnl For C++, do basically the same thing.
636 AC_DEFUN([GNOME_CXX_WARNINGS],[
637   AC_ARG_ENABLE(cxx-warnings,
638                 AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
639                                [Turn on compiler warnings.]),,
640                 [enable_cxx_warnings="m4_default([$1],[minimum])"])
642   AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
643   warnCXXFLAGS=
644   if test "x$GXX" != xyes; then
645     enable_cxx_warnings=no
646   fi
647   if test "x$enable_cxx_warnings" != "xno"; then
648     if test "x$GXX" = "xyes"; then
649       case " $CXXFLAGS " in
650       *[\ \     ]-Wall[\ \      ]*) ;;
651       *) warnCXXFLAGS="-Wall -Wno-unused" ;;
652       esac
654       ## -W is not all that useful.  And it cannot be controlled
655       ## with individual -Wno-xxx flags, unlike -Wall
656       if test "x$enable_cxx_warnings" = "xyes"; then
657         warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
658       fi
659     fi
660   fi
661   AC_MSG_RESULT($warnCXXFLAGS)
663    AC_ARG_ENABLE(iso-cxx,
664                  AC_HELP_STRING([--enable-iso-cxx],
665                                 [Try to warn if code is not ISO C++ ]),,
666                  [enable_iso_cxx=no])
668    AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
669    complCXXFLAGS=
670    if test "x$enable_iso_cxx" != "xno"; then
671      if test "x$GXX" = "xyes"; then
672       case " $CXXFLAGS " in
673       *[\ \     ]-ansi[\ \      ]*) ;;
674       *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
675       esac
677       case " $CXXFLAGS " in
678       *[\ \     ]-pedantic[\ \  ]*) ;;
679       *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
680       esac
681      fi
682    fi
683   AC_MSG_RESULT($complCXXFLAGS)
685   WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
686   AC_SUBST(WARN_CXXFLAGS)
689 # nls.m4 serial 3 (gettext-0.15)
690 dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
691 dnl This file is free software; the Free Software Foundation
692 dnl gives unlimited permission to copy and/or distribute it,
693 dnl with or without modifications, as long as this notice is preserved.
695 dnl This file can can be used in projects which are not available under
696 dnl the GNU General Public License or the GNU Library General Public
697 dnl License but which still want to provide support for the GNU gettext
698 dnl functionality.
699 dnl Please note that the actual code of the GNU gettext library is covered
700 dnl by the GNU Library General Public License, and the rest of the GNU
701 dnl gettext package package is covered by the GNU General Public License.
702 dnl They are *not* in the public domain.
704 dnl Authors:
705 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
706 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
708 AC_PREREQ(2.50)
710 AC_DEFUN([AM_NLS],
712   AC_MSG_CHECKING([whether NLS is requested])
713   dnl Default is enabled NLS
714   AC_ARG_ENABLE(nls,
715     [  --disable-nls           do not use Native Language Support],
716     USE_NLS=$enableval, USE_NLS=yes)
717   AC_MSG_RESULT($USE_NLS)
718   AC_SUBST(USE_NLS)
721 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
723 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
725 # This program is free software; you can redistribute it and/or modify
726 # it under the terms of the GNU General Public License as published by
727 # the Free Software Foundation; either version 2 of the License, or
728 # (at your option) any later version.
730 # This program is distributed in the hope that it will be useful, but
731 # WITHOUT ANY WARRANTY; without even the implied warranty of
732 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
733 # General Public License for more details.
735 # You should have received a copy of the GNU General Public License
736 # along with this program; if not, write to the Free Software
737 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
739 # As a special exception to the GNU General Public License, if you
740 # distribute this file as part of a program that contains a
741 # configuration script generated by Autoconf, you may include it under
742 # the same distribution terms that you use for the rest of that program.
744 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
745 # ----------------------------------
746 AC_DEFUN([PKG_PROG_PKG_CONFIG],
747 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
748 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
749 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
750 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
751         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
753 if test -n "$PKG_CONFIG"; then
754         _pkg_min_version=m4_default([$1], [0.9.0])
755         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
756         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
757                 AC_MSG_RESULT([yes])
758         else
759                 AC_MSG_RESULT([no])
760                 PKG_CONFIG=""
761         fi
762                 
763 fi[]dnl
764 ])# PKG_PROG_PKG_CONFIG
766 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
768 # Check to see whether a particular set of modules exists.  Similar
769 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
772 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
773 # this or PKG_CHECK_MODULES is called, or make sure to call
774 # PKG_CHECK_EXISTS manually
775 # --------------------------------------------------------------
776 AC_DEFUN([PKG_CHECK_EXISTS],
777 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
778 if test -n "$PKG_CONFIG" && \
779     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
780   m4_ifval([$2], [$2], [:])
781 m4_ifvaln([$3], [else
782   $3])dnl
783 fi])
786 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
787 # ---------------------------------------------
788 m4_define([_PKG_CONFIG],
789 [if test -n "$$1"; then
790     pkg_cv_[]$1="$$1"
791  elif test -n "$PKG_CONFIG"; then
792     PKG_CHECK_EXISTS([$3],
793                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
794                      [pkg_failed=yes])
795  else
796     pkg_failed=untried
797 fi[]dnl
798 ])# _PKG_CONFIG
800 # _PKG_SHORT_ERRORS_SUPPORTED
801 # -----------------------------
802 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
803 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
804 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
805         _pkg_short_errors_supported=yes
806 else
807         _pkg_short_errors_supported=no
808 fi[]dnl
809 ])# _PKG_SHORT_ERRORS_SUPPORTED
812 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
813 # [ACTION-IF-NOT-FOUND])
816 # Note that if there is a possibility the first call to
817 # PKG_CHECK_MODULES might not happen, you should be sure to include an
818 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
821 # --------------------------------------------------------------
822 AC_DEFUN([PKG_CHECK_MODULES],
823 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
824 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
825 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
827 pkg_failed=no
828 AC_MSG_CHECKING([for $1])
830 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
831 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
833 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
834 and $1[]_LIBS to avoid the need to call pkg-config.
835 See the pkg-config man page for more details.])
837 if test $pkg_failed = yes; then
838         _PKG_SHORT_ERRORS_SUPPORTED
839         if test $_pkg_short_errors_supported = yes; then
840                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
841         else 
842                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
843         fi
844         # Put the nasty error message in config.log where it belongs
845         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
847         ifelse([$4], , [AC_MSG_ERROR(dnl
848 [Package requirements ($2) were not met:
850 $$1_PKG_ERRORS
852 Consider adjusting the PKG_CONFIG_PATH environment variable if you
853 installed software in a non-standard prefix.
855 _PKG_TEXT
856 ])],
857                 [AC_MSG_RESULT([no])
858                 $4])
859 elif test $pkg_failed = untried; then
860         ifelse([$4], , [AC_MSG_FAILURE(dnl
861 [The pkg-config script could not be found or is too old.  Make sure it
862 is in your PATH or set the PKG_CONFIG environment variable to the full
863 path to pkg-config.
865 _PKG_TEXT
867 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
868                 [$4])
869 else
870         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
871         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
872         AC_MSG_RESULT([yes])
873         ifelse([$3], , :, [$3])
874 fi[]dnl
875 ])# PKG_CHECK_MODULES
877 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
879 # This file is free software; the Free Software Foundation
880 # gives unlimited permission to copy and/or distribute it,
881 # with or without modifications, as long as this notice is preserved.
883 # AM_AUTOMAKE_VERSION(VERSION)
884 # ----------------------------
885 # Automake X.Y traces this macro to ensure aclocal.m4 has been
886 # generated from the m4 files accompanying Automake X.Y.
887 # (This private macro should not be called outside this file.)
888 AC_DEFUN([AM_AUTOMAKE_VERSION],
889 [am__api_version='1.10'
890 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
891 dnl require some minimum version.  Point them to the right macro.
892 m4_if([$1], [1.10.2], [],
893       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
896 # _AM_AUTOCONF_VERSION(VERSION)
897 # -----------------------------
898 # aclocal traces this macro to find the Autoconf version.
899 # This is a private macro too.  Using m4_define simplifies
900 # the logic in aclocal, which can simply ignore this definition.
901 m4_define([_AM_AUTOCONF_VERSION], [])
903 # AM_SET_CURRENT_AUTOMAKE_VERSION
904 # -------------------------------
905 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
906 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
907 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
908 [AM_AUTOMAKE_VERSION([1.10.2])dnl
909 m4_ifndef([AC_AUTOCONF_VERSION],
910   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
911 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
913 # Figure out how to run the assembler.                      -*- Autoconf -*-
915 # Copyright (C) 2001, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
917 # This file is free software; the Free Software Foundation
918 # gives unlimited permission to copy and/or distribute it,
919 # with or without modifications, as long as this notice is preserved.
921 # serial 5
923 # AM_PROG_AS
924 # ----------
925 AC_DEFUN([AM_PROG_AS],
926 [# By default we simply use the C compiler to build assembly code.
927 AC_REQUIRE([AC_PROG_CC])
928 test "${CCAS+set}" = set || CCAS=$CC
929 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
930 AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
931 AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
932 _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
935 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
937 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
939 # This file is free software; the Free Software Foundation
940 # gives unlimited permission to copy and/or distribute it,
941 # with or without modifications, as long as this notice is preserved.
943 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
944 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
945 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
947 # Of course, Automake must honor this variable whenever it calls a
948 # tool from the auxiliary directory.  The problem is that $srcdir (and
949 # therefore $ac_aux_dir as well) can be either absolute or relative,
950 # depending on how configure is run.  This is pretty annoying, since
951 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
952 # source directory, any form will work fine, but in subdirectories a
953 # relative path needs to be adjusted first.
955 # $ac_aux_dir/missing
956 #    fails when called from a subdirectory if $ac_aux_dir is relative
957 # $top_srcdir/$ac_aux_dir/missing
958 #    fails if $ac_aux_dir is absolute,
959 #    fails when called from a subdirectory in a VPATH build with
960 #          a relative $ac_aux_dir
962 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
963 # are both prefixed by $srcdir.  In an in-source build this is usually
964 # harmless because $srcdir is `.', but things will broke when you
965 # start a VPATH build or use an absolute $srcdir.
967 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
968 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
969 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
970 # and then we would define $MISSING as
971 #   MISSING="\${SHELL} $am_aux_dir/missing"
972 # This will work as long as MISSING is not called from configure, because
973 # unfortunately $(top_srcdir) has no meaning in configure.
974 # However there are other variables, like CC, which are often used in
975 # configure, and could therefore not use this "fixed" $ac_aux_dir.
977 # Another solution, used here, is to always expand $ac_aux_dir to an
978 # absolute PATH.  The drawback is that using absolute paths prevent a
979 # configured tree to be moved without reconfiguration.
981 AC_DEFUN([AM_AUX_DIR_EXPAND],
982 [dnl Rely on autoconf to set up CDPATH properly.
983 AC_PREREQ([2.50])dnl
984 # expand $ac_aux_dir to an absolute path
985 am_aux_dir=`cd $ac_aux_dir && pwd`
988 # AM_CONDITIONAL                                            -*- Autoconf -*-
990 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
991 # Free Software Foundation, Inc.
993 # This file is free software; the Free Software Foundation
994 # gives unlimited permission to copy and/or distribute it,
995 # with or without modifications, as long as this notice is preserved.
997 # serial 8
999 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1000 # -------------------------------------
1001 # Define a conditional.
1002 AC_DEFUN([AM_CONDITIONAL],
1003 [AC_PREREQ(2.52)dnl
1004  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1005         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1006 AC_SUBST([$1_TRUE])dnl
1007 AC_SUBST([$1_FALSE])dnl
1008 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
1009 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
1010 if $2; then
1011   $1_TRUE=
1012   $1_FALSE='#'
1013 else
1014   $1_TRUE='#'
1015   $1_FALSE=
1017 AC_CONFIG_COMMANDS_PRE(
1018 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1019   AC_MSG_ERROR([[conditional "$1" was never defined.
1020 Usually this means the macro was only invoked conditionally.]])
1021 fi])])
1023 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
1024 # Free Software Foundation, Inc.
1026 # This file is free software; the Free Software Foundation
1027 # gives unlimited permission to copy and/or distribute it,
1028 # with or without modifications, as long as this notice is preserved.
1030 # serial 9
1032 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1033 # written in clear, in which case automake, when reading aclocal.m4,
1034 # will think it sees a *use*, and therefore will trigger all it's
1035 # C support machinery.  Also note that it means that autoscan, seeing
1036 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1039 # _AM_DEPENDENCIES(NAME)
1040 # ----------------------
1041 # See how the compiler implements dependency checking.
1042 # NAME is "CC", "CXX", "GCJ", or "OBJC".
1043 # We try a few techniques and use that to set a single cache variable.
1045 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1046 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1047 # dependency, and given that the user is not expected to run this macro,
1048 # just rely on AC_PROG_CC.
1049 AC_DEFUN([_AM_DEPENDENCIES],
1050 [AC_REQUIRE([AM_SET_DEPDIR])dnl
1051 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1052 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1053 AC_REQUIRE([AM_DEP_TRACK])dnl
1055 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
1056        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
1057        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1058        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
1059        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1060                    [depcc="$$1"   am_compiler_list=])
1062 AC_CACHE_CHECK([dependency style of $depcc],
1063                [am_cv_$1_dependencies_compiler_type],
1064 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1065   # We make a subdir and do the tests there.  Otherwise we can end up
1066   # making bogus files that we don't know about and never remove.  For
1067   # instance it was reported that on HP-UX the gcc test will end up
1068   # making a dummy file named `D' -- because `-MD' means `put the output
1069   # in D'.
1070   mkdir conftest.dir
1071   # Copy depcomp to subdir because otherwise we won't find it if we're
1072   # using a relative directory.
1073   cp "$am_depcomp" conftest.dir
1074   cd conftest.dir
1075   # We will build objects and dependencies in a subdirectory because
1076   # it helps to detect inapplicable dependency modes.  For instance
1077   # both Tru64's cc and ICC support -MD to output dependencies as a
1078   # side effect of compilation, but ICC will put the dependencies in
1079   # the current directory while Tru64 will put them in the object
1080   # directory.
1081   mkdir sub
1083   am_cv_$1_dependencies_compiler_type=none
1084   if test "$am_compiler_list" = ""; then
1085      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1086   fi
1087   for depmode in $am_compiler_list; do
1088     # Setup a source with many dependencies, because some compilers
1089     # like to wrap large dependency lists on column 80 (with \), and
1090     # we should not choose a depcomp mode which is confused by this.
1091     #
1092     # We need to recreate these files for each test, as the compiler may
1093     # overwrite some of them when testing with obscure command lines.
1094     # This happens at least with the AIX C compiler.
1095     : > sub/conftest.c
1096     for i in 1 2 3 4 5 6; do
1097       echo '#include "conftst'$i'.h"' >> sub/conftest.c
1098       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1099       # Solaris 8's {/usr,}/bin/sh.
1100       touch sub/conftst$i.h
1101     done
1102     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1104     case $depmode in
1105     nosideeffect)
1106       # after this tag, mechanisms are not by side-effect, so they'll
1107       # only be used when explicitly requested
1108       if test "x$enable_dependency_tracking" = xyes; then
1109         continue
1110       else
1111         break
1112       fi
1113       ;;
1114     none) break ;;
1115     esac
1116     # We check with `-c' and `-o' for the sake of the "dashmstdout"
1117     # mode.  It turns out that the SunPro C++ compiler does not properly
1118     # handle `-M -o', and we need to detect this.
1119     if depmode=$depmode \
1120        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
1121        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1122        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
1123          >/dev/null 2>conftest.err &&
1124        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1125        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1126        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
1127        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1128       # icc doesn't choke on unknown options, it will just issue warnings
1129       # or remarks (even with -Werror).  So we grep stderr for any message
1130       # that says an option was ignored or not supported.
1131       # When given -MP, icc 7.0 and 7.1 complain thusly:
1132       #   icc: Command line warning: ignoring option '-M'; no argument required
1133       # The diagnosis changed in icc 8.0:
1134       #   icc: Command line remark: option '-MP' not supported
1135       if (grep 'ignoring option' conftest.err ||
1136           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1137         am_cv_$1_dependencies_compiler_type=$depmode
1138         break
1139       fi
1140     fi
1141   done
1143   cd ..
1144   rm -rf conftest.dir
1145 else
1146   am_cv_$1_dependencies_compiler_type=none
1149 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1150 AM_CONDITIONAL([am__fastdep$1], [
1151   test "x$enable_dependency_tracking" != xno \
1152   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1156 # AM_SET_DEPDIR
1157 # -------------
1158 # Choose a directory name for dependency files.
1159 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1160 AC_DEFUN([AM_SET_DEPDIR],
1161 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1162 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1166 # AM_DEP_TRACK
1167 # ------------
1168 AC_DEFUN([AM_DEP_TRACK],
1169 [AC_ARG_ENABLE(dependency-tracking,
1170 [  --disable-dependency-tracking  speeds up one-time build
1171   --enable-dependency-tracking   do not reject slow dependency extractors])
1172 if test "x$enable_dependency_tracking" != xno; then
1173   am_depcomp="$ac_aux_dir/depcomp"
1174   AMDEPBACKSLASH='\'
1176 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1177 AC_SUBST([AMDEPBACKSLASH])dnl
1178 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1181 # Generate code to set up dependency tracking.              -*- Autoconf -*-
1183 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1184 # Free Software Foundation, Inc.
1186 # This file is free software; the Free Software Foundation
1187 # gives unlimited permission to copy and/or distribute it,
1188 # with or without modifications, as long as this notice is preserved.
1190 #serial 4
1192 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1193 # ------------------------------
1194 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1195 [# Autoconf 2.62 quotes --file arguments for eval, but not when files
1196 # are listed without --file.  Let's play safe and only enable the eval
1197 # if we detect the quoting.
1198 case $CONFIG_FILES in
1199 *\'*) eval set x "$CONFIG_FILES" ;;
1200 *)   set x $CONFIG_FILES ;;
1201 esac
1202 shift
1203 for mf
1205   # Strip MF so we end up with the name of the file.
1206   mf=`echo "$mf" | sed -e 's/:.*$//'`
1207   # Check whether this is an Automake generated Makefile or not.
1208   # We used to match only the files named `Makefile.in', but
1209   # some people rename them; so instead we look at the file content.
1210   # Grep'ing the first line is not enough: some people post-process
1211   # each Makefile.in and add a new line on top of each file to say so.
1212   # Grep'ing the whole file is not good either: AIX grep has a line
1213   # limit of 2048, but all sed's we know have understand at least 4000.
1214   if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1215     dirpart=`AS_DIRNAME("$mf")`
1216   else
1217     continue
1218   fi
1219   # Extract the definition of DEPDIR, am__include, and am__quote
1220   # from the Makefile without running `make'.
1221   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1222   test -z "$DEPDIR" && continue
1223   am__include=`sed -n 's/^am__include = //p' < "$mf"`
1224   test -z "am__include" && continue
1225   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1226   # When using ansi2knr, U may be empty or an underscore; expand it
1227   U=`sed -n 's/^U = //p' < "$mf"`
1228   # Find all dependency output files, they are included files with
1229   # $(DEPDIR) in their names.  We invoke sed twice because it is the
1230   # simplest approach to changing $(DEPDIR) to its actual value in the
1231   # expansion.
1232   for file in `sed -n "
1233     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1234        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1235     # Make sure the directory exists.
1236     test -f "$dirpart/$file" && continue
1237     fdir=`AS_DIRNAME(["$file"])`
1238     AS_MKDIR_P([$dirpart/$fdir])
1239     # echo "creating $dirpart/$file"
1240     echo '# dummy' > "$dirpart/$file"
1241   done
1242 done
1243 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1246 # AM_OUTPUT_DEPENDENCY_COMMANDS
1247 # -----------------------------
1248 # This macro should only be invoked once -- use via AC_REQUIRE.
1250 # This code is only required when automatic dependency tracking
1251 # is enabled.  FIXME.  This creates each `.P' file that we will
1252 # need in order to bootstrap the dependency handling code.
1253 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1254 [AC_CONFIG_COMMANDS([depfiles],
1255      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1256      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1259 # Do all the work for Automake.                             -*- Autoconf -*-
1261 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1262 # 2005, 2006, 2008 Free Software Foundation, Inc.
1264 # This file is free software; the Free Software Foundation
1265 # gives unlimited permission to copy and/or distribute it,
1266 # with or without modifications, as long as this notice is preserved.
1268 # serial 13
1270 # This macro actually does too much.  Some checks are only needed if
1271 # your package does certain things.  But this isn't really a big deal.
1273 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1274 # AM_INIT_AUTOMAKE([OPTIONS])
1275 # -----------------------------------------------
1276 # The call with PACKAGE and VERSION arguments is the old style
1277 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
1278 # and VERSION should now be passed to AC_INIT and removed from
1279 # the call to AM_INIT_AUTOMAKE.
1280 # We support both call styles for the transition.  After
1281 # the next Automake release, Autoconf can make the AC_INIT
1282 # arguments mandatory, and then we can depend on a new Autoconf
1283 # release and drop the old call support.
1284 AC_DEFUN([AM_INIT_AUTOMAKE],
1285 [AC_PREREQ([2.60])dnl
1286 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
1287 dnl the ones we care about.
1288 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1289 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1290 AC_REQUIRE([AC_PROG_INSTALL])dnl
1291 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1292   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1293   # is not polluted with repeated "-I."
1294   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1295   # test to see if srcdir already configured
1296   if test -f $srcdir/config.status; then
1297     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1298   fi
1301 # test whether we have cygpath
1302 if test -z "$CYGPATH_W"; then
1303   if (cygpath --version) >/dev/null 2>/dev/null; then
1304     CYGPATH_W='cygpath -w'
1305   else
1306     CYGPATH_W=echo
1307   fi
1309 AC_SUBST([CYGPATH_W])
1311 # Define the identity of the package.
1312 dnl Distinguish between old-style and new-style calls.
1313 m4_ifval([$2],
1314 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1315  AC_SUBST([PACKAGE], [$1])dnl
1316  AC_SUBST([VERSION], [$2])],
1317 [_AM_SET_OPTIONS([$1])dnl
1318 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1319 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1320   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1321  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1322  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1324 _AM_IF_OPTION([no-define],,
1325 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1326  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1328 # Some tools Automake needs.
1329 AC_REQUIRE([AM_SANITY_CHECK])dnl
1330 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1331 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1332 AM_MISSING_PROG(AUTOCONF, autoconf)
1333 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1334 AM_MISSING_PROG(AUTOHEADER, autoheader)
1335 AM_MISSING_PROG(MAKEINFO, makeinfo)
1336 AM_PROG_INSTALL_SH
1337 AM_PROG_INSTALL_STRIP
1338 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1339 # We need awk for the "check" target.  The system "awk" is bad on
1340 # some platforms.
1341 AC_REQUIRE([AC_PROG_AWK])dnl
1342 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1343 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1344 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1345               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1346                              [_AM_PROG_TAR([v7])])])
1347 _AM_IF_OPTION([no-dependencies],,
1348 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1349                   [_AM_DEPENDENCIES(CC)],
1350                   [define([AC_PROG_CC],
1351                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1352 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1353                   [_AM_DEPENDENCIES(CXX)],
1354                   [define([AC_PROG_CXX],
1355                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1356 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1357                   [_AM_DEPENDENCIES(OBJC)],
1358                   [define([AC_PROG_OBJC],
1359                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1364 # When config.status generates a header, we must update the stamp-h file.
1365 # This file resides in the same directory as the config header
1366 # that is generated.  The stamp files are numbered to have different names.
1368 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1369 # loop where config.status creates the headers, so we can generate
1370 # our stamp files there.
1371 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1372 [# Compute $1's index in $config_headers.
1373 _am_arg=$1
1374 _am_stamp_count=1
1375 for _am_header in $config_headers :; do
1376   case $_am_header in
1377     $_am_arg | $_am_arg:* )
1378       break ;;
1379     * )
1380       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1381   esac
1382 done
1383 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1385 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1387 # This file is free software; the Free Software Foundation
1388 # gives unlimited permission to copy and/or distribute it,
1389 # with or without modifications, as long as this notice is preserved.
1391 # AM_PROG_INSTALL_SH
1392 # ------------------
1393 # Define $install_sh.
1394 AC_DEFUN([AM_PROG_INSTALL_SH],
1395 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1396 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
1397 AC_SUBST(install_sh)])
1399 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
1401 # This file is free software; the Free Software Foundation
1402 # gives unlimited permission to copy and/or distribute it,
1403 # with or without modifications, as long as this notice is preserved.
1405 # serial 2
1407 # Check whether the underlying file-system supports filenames
1408 # with a leading dot.  For instance MS-DOS doesn't.
1409 AC_DEFUN([AM_SET_LEADING_DOT],
1410 [rm -rf .tst 2>/dev/null
1411 mkdir .tst 2>/dev/null
1412 if test -d .tst; then
1413   am__leading_dot=.
1414 else
1415   am__leading_dot=_
1417 rmdir .tst 2>/dev/null
1418 AC_SUBST([am__leading_dot])])
1420 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
1421 # From Jim Meyering
1423 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
1424 # Free Software Foundation, Inc.
1426 # This file is free software; the Free Software Foundation
1427 # gives unlimited permission to copy and/or distribute it,
1428 # with or without modifications, as long as this notice is preserved.
1430 # serial 4
1432 AC_DEFUN([AM_MAINTAINER_MODE],
1433 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1434   dnl maintainer-mode is disabled by default
1435   AC_ARG_ENABLE(maintainer-mode,
1436 [  --enable-maintainer-mode  enable make rules and dependencies not useful
1437                           (and sometimes confusing) to the casual installer],
1438       USE_MAINTAINER_MODE=$enableval,
1439       USE_MAINTAINER_MODE=no)
1440   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1441   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1442   MAINT=$MAINTAINER_MODE_TRUE
1443   AC_SUBST(MAINT)dnl
1447 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1449 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
1451 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
1453 # This file is free software; the Free Software Foundation
1454 # gives unlimited permission to copy and/or distribute it,
1455 # with or without modifications, as long as this notice is preserved.
1457 # serial 3
1459 # AM_MAKE_INCLUDE()
1460 # -----------------
1461 # Check to see how make treats includes.
1462 AC_DEFUN([AM_MAKE_INCLUDE],
1463 [am_make=${MAKE-make}
1464 cat > confinc << 'END'
1465 am__doit:
1466         @echo done
1467 .PHONY: am__doit
1469 # If we don't find an include directive, just comment out the code.
1470 AC_MSG_CHECKING([for style of include used by $am_make])
1471 am__include="#"
1472 am__quote=
1473 _am_result=none
1474 # First try GNU make style include.
1475 echo "include confinc" > confmf
1476 # We grep out `Entering directory' and `Leaving directory'
1477 # messages which can occur if `w' ends up in MAKEFLAGS.
1478 # In particular we don't look at `^make:' because GNU make might
1479 # be invoked under some other name (usually "gmake"), in which
1480 # case it prints its new name instead of `make'.
1481 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1482    am__include=include
1483    am__quote=
1484    _am_result=GNU
1486 # Now try BSD make style include.
1487 if test "$am__include" = "#"; then
1488    echo '.include "confinc"' > confmf
1489    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1490       am__include=.include
1491       am__quote="\""
1492       _am_result=BSD
1493    fi
1495 AC_SUBST([am__include])
1496 AC_SUBST([am__quote])
1497 AC_MSG_RESULT([$_am_result])
1498 rm -f confinc confmf
1501 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1502 # Free Software Foundation, Inc.
1504 # This file is free software; the Free Software Foundation
1505 # gives unlimited permission to copy and/or distribute it,
1506 # with or without modifications, as long as this notice is preserved.
1508 # serial 6
1510 # AM_PROG_CC_C_O
1511 # --------------
1512 # Like AC_PROG_CC_C_O, but changed for automake.
1513 AC_DEFUN([AM_PROG_CC_C_O],
1514 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1515 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1516 AC_REQUIRE_AUX_FILE([compile])dnl
1517 # FIXME: we rely on the cache variable name because
1518 # there is no other way.
1519 set dummy $CC
1520 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1521 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1522 if test "$am_t" != yes; then
1523    # Losing compiler, so override with the script.
1524    # FIXME: It is wrong to rewrite CC.
1525    # But if we don't then we get into trouble of one sort or another.
1526    # A longer-term fix would be to have automake use am__CC in this case,
1527    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1528    CC="$am_aux_dir/compile $CC"
1530 dnl Make sure AC_PROG_CC is never called again, or it will override our
1531 dnl setting of CC.
1532 m4_define([AC_PROG_CC],
1533           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1536 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1538 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
1539 # Free Software Foundation, Inc.
1541 # This file is free software; the Free Software Foundation
1542 # gives unlimited permission to copy and/or distribute it,
1543 # with or without modifications, as long as this notice is preserved.
1545 # serial 5
1547 # AM_MISSING_PROG(NAME, PROGRAM)
1548 # ------------------------------
1549 AC_DEFUN([AM_MISSING_PROG],
1550 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1551 $1=${$1-"${am_missing_run}$2"}
1552 AC_SUBST($1)])
1555 # AM_MISSING_HAS_RUN
1556 # ------------------
1557 # Define MISSING if not defined so far and test if it supports --run.
1558 # If it does, set am_missing_run to use it, otherwise, to nothing.
1559 AC_DEFUN([AM_MISSING_HAS_RUN],
1560 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1561 AC_REQUIRE_AUX_FILE([missing])dnl
1562 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1563 # Use eval to expand $SHELL
1564 if eval "$MISSING --run true"; then
1565   am_missing_run="$MISSING --run "
1566 else
1567   am_missing_run=
1568   AC_MSG_WARN([`missing' script is too old or missing])
1572 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
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.
1578 # AM_PROG_MKDIR_P
1579 # ---------------
1580 # Check for `mkdir -p'.
1581 AC_DEFUN([AM_PROG_MKDIR_P],
1582 [AC_PREREQ([2.60])dnl
1583 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1584 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
1585 dnl while keeping a definition of mkdir_p for backward compatibility.
1586 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1587 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1588 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1589 dnl adjustment using top_builddir (which is defined more often than
1590 dnl MKDIR_P).
1591 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1592 case $mkdir_p in
1593   [[\\/$]]* | ?:[[\\/]]*) ;;
1594   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1595 esac
1598 # Helper functions for option handling.                     -*- Autoconf -*-
1600 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
1602 # This file is free software; the Free Software Foundation
1603 # gives unlimited permission to copy and/or distribute it,
1604 # with or without modifications, as long as this notice is preserved.
1606 # serial 4
1608 # _AM_MANGLE_OPTION(NAME)
1609 # -----------------------
1610 AC_DEFUN([_AM_MANGLE_OPTION],
1611 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1613 # _AM_SET_OPTION(NAME)
1614 # ------------------------------
1615 # Set option NAME.  Presently that only means defining a flag for this option.
1616 AC_DEFUN([_AM_SET_OPTION],
1617 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1619 # _AM_SET_OPTIONS(OPTIONS)
1620 # ----------------------------------
1621 # OPTIONS is a space-separated list of Automake options.
1622 AC_DEFUN([_AM_SET_OPTIONS],
1623 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1625 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1626 # -------------------------------------------
1627 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1628 AC_DEFUN([_AM_IF_OPTION],
1629 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1631 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
1632 # Free Software Foundation, Inc.
1634 # This file is free software; the Free Software Foundation
1635 # gives unlimited permission to copy and/or distribute it,
1636 # with or without modifications, as long as this notice is preserved.
1638 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1639 # ---------------------------------------------------------------------------
1640 # Adds support for distributing Python modules and packages.  To
1641 # install modules, copy them to $(pythondir), using the python_PYTHON
1642 # automake variable.  To install a package with the same name as the
1643 # automake package, install to $(pkgpythondir), or use the
1644 # pkgpython_PYTHON automake variable.
1646 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
1647 # locations to install python extension modules (shared libraries).
1648 # Another macro is required to find the appropriate flags to compile
1649 # extension modules.
1651 # If your package is configured with a different prefix to python,
1652 # users will have to add the install directory to the PYTHONPATH
1653 # environment variable, or create a .pth file (see the python
1654 # documentation for details).
1656 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
1657 # cause an error if the version of python installed on the system
1658 # doesn't meet the requirement.  MINIMUM-VERSION should consist of
1659 # numbers and dots only.
1660 AC_DEFUN([AM_PATH_PYTHON],
1662   dnl Find a Python interpreter.  Python versions prior to 1.5 are not
1663   dnl supported because the default installation locations changed from
1664   dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
1665   dnl in 1.5.
1666   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
1667                     [python python2 python2.5 python2.4 python2.3 python2.2 dnl
1668 python2.1 python2.0 python1.6 python1.5])
1670   m4_if([$1],[],[
1671     dnl No version check is needed.
1672     # Find any Python interpreter.
1673     if test -z "$PYTHON"; then
1674       AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
1675     fi
1676     am_display_PYTHON=python
1677   ], [
1678     dnl A version check is needed.
1679     if test -n "$PYTHON"; then
1680       # If the user set $PYTHON, use it and don't search something else.
1681       AC_MSG_CHECKING([whether $PYTHON version >= $1])
1682       AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
1683                               [AC_MSG_RESULT(yes)],
1684                               [AC_MSG_ERROR(too old)])
1685       am_display_PYTHON=$PYTHON
1686     else
1687       # Otherwise, try each interpreter until we find one that satisfies
1688       # VERSION.
1689       AC_CACHE_CHECK([for a Python interpreter with version >= $1],
1690         [am_cv_pathless_PYTHON],[
1691         for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
1692           test "$am_cv_pathless_PYTHON" = none && break
1693           AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
1694         done])
1695       # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
1696       if test "$am_cv_pathless_PYTHON" = none; then
1697         PYTHON=:
1698       else
1699         AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
1700       fi
1701       am_display_PYTHON=$am_cv_pathless_PYTHON
1702     fi
1703   ])
1705   if test "$PYTHON" = :; then
1706   dnl Run any user-specified action, or abort.
1707     m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
1708   else
1710   dnl Query Python for its version number.  Getting [:3] seems to be
1711   dnl the best way to do this; it's what "site.py" does in the standard
1712   dnl library.
1714   AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
1715     [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
1716   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
1718   dnl Use the values of $prefix and $exec_prefix for the corresponding
1719   dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
1720   dnl distinct variables so they can be overridden if need be.  However,
1721   dnl general consensus is that you shouldn't need this ability.
1723   AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
1724   AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
1726   dnl At times (like when building shared libraries) you may want
1727   dnl to know which OS platform Python thinks this is.
1729   AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
1730     [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
1731   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
1734   dnl Set up 4 directories:
1736   dnl pythondir -- where to install python scripts.  This is the
1737   dnl   site-packages directory, not the python standard library
1738   dnl   directory like in previous automake betas.  This behavior
1739   dnl   is more consistent with lispdir.m4 for example.
1740   dnl Query distutils for this directory.  distutils does not exist in
1741   dnl Python 1.5, so we fall back to the hardcoded directory if it
1742   dnl doesn't work.
1743   AC_CACHE_CHECK([for $am_display_PYTHON script directory],
1744     [am_cv_python_pythondir],
1745     [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
1746      echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
1747   AC_SUBST([pythondir], [$am_cv_python_pythondir])
1749   dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
1750   dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
1751   dnl   more consistent with the rest of automake.
1753   AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1755   dnl pyexecdir -- directory for installing python extension modules
1756   dnl   (shared libraries)
1757   dnl Query distutils for this directory.  distutils does not exist in
1758   dnl Python 1.5, so we fall back to the hardcoded directory if it
1759   dnl doesn't work.
1760   AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
1761     [am_cv_python_pyexecdir],
1762     [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
1763      echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
1764   AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1766   dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
1768   AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1770   dnl Run any user-specified action.
1771   $2
1772   fi
1777 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1778 # ---------------------------------------------------------------------------
1779 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1780 # Run ACTION-IF-FALSE otherwise.
1781 # This test uses sys.hexversion instead of the string equivalent (first
1782 # word of sys.version), in order to cope with versions such as 2.2c1.
1783 # hexversion has been introduced in Python 1.5.2; it's probably not
1784 # worth to support older versions (1.5.1 was released on October 31, 1998).
1785 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
1786  [prog="import sys, string
1787 # split strings by '.' and convert to numeric.  Append some zeros
1788 # because we need at least 4 digits for the hex conversion.
1789 minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
1790 minverhex = 0
1791 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
1792 sys.exit(sys.hexversion < minverhex)"
1793   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1795 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1797 # This file is free software; the Free Software Foundation
1798 # gives unlimited permission to copy and/or distribute it,
1799 # with or without modifications, as long as this notice is preserved.
1801 # AM_RUN_LOG(COMMAND)
1802 # -------------------
1803 # Run COMMAND, save the exit status in ac_status, and log it.
1804 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1805 AC_DEFUN([AM_RUN_LOG],
1806 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1807    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1808    ac_status=$?
1809    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1810    (exit $ac_status); }])
1812 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1814 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1815 # Free Software Foundation, Inc.
1817 # This file is free software; the Free Software Foundation
1818 # gives unlimited permission to copy and/or distribute it,
1819 # with or without modifications, as long as this notice is preserved.
1821 # serial 4
1823 # AM_SANITY_CHECK
1824 # ---------------
1825 AC_DEFUN([AM_SANITY_CHECK],
1826 [AC_MSG_CHECKING([whether build environment is sane])
1827 # Just in case
1828 sleep 1
1829 echo timestamp > conftest.file
1830 # Do `set' in a subshell so we don't clobber the current shell's
1831 # arguments.  Must try -L first in case configure is actually a
1832 # symlink; some systems play weird games with the mod time of symlinks
1833 # (eg FreeBSD returns the mod time of the symlink's containing
1834 # directory).
1835 if (
1836    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1837    if test "$[*]" = "X"; then
1838       # -L didn't work.
1839       set X `ls -t $srcdir/configure conftest.file`
1840    fi
1841    rm -f conftest.file
1842    if test "$[*]" != "X $srcdir/configure conftest.file" \
1843       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1845       # If neither matched, then we have a broken ls.  This can happen
1846       # if, for instance, CONFIG_SHELL is bash and it inherits a
1847       # broken ls alias from the environment.  This has actually
1848       # happened.  Such a system could not be considered "sane".
1849       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1850 alias in your environment])
1851    fi
1853    test "$[2]" = conftest.file
1854    )
1855 then
1856    # Ok.
1857    :
1858 else
1859    AC_MSG_ERROR([newly created file is older than distributed files!
1860 Check your system clock])
1862 AC_MSG_RESULT(yes)])
1864 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1866 # This file is free software; the Free Software Foundation
1867 # gives unlimited permission to copy and/or distribute it,
1868 # with or without modifications, as long as this notice is preserved.
1870 # AM_PROG_INSTALL_STRIP
1871 # ---------------------
1872 # One issue with vendor `install' (even GNU) is that you can't
1873 # specify the program used to strip binaries.  This is especially
1874 # annoying in cross-compiling environments, where the build's strip
1875 # is unlikely to handle the host's binaries.
1876 # Fortunately install-sh will honor a STRIPPROG variable, so we
1877 # always use install-sh in `make install-strip', and initialize
1878 # STRIPPROG with the value of the STRIP variable (set by the user).
1879 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1880 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1881 # Installed binaries are usually stripped using `strip' when the user
1882 # run `make install-strip'.  However `strip' might not be the right
1883 # tool to use in cross-compilation environments, therefore Automake
1884 # will honor the `STRIP' environment variable to overrule this program.
1885 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1886 if test "$cross_compiling" != no; then
1887   AC_CHECK_TOOL([STRIP], [strip], :)
1889 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1890 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1892 # Copyright (C) 2006  Free Software Foundation, Inc.
1894 # This file is free software; the Free Software Foundation
1895 # gives unlimited permission to copy and/or distribute it,
1896 # with or without modifications, as long as this notice is preserved.
1898 # _AM_SUBST_NOTMAKE(VARIABLE)
1899 # ---------------------------
1900 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1901 # This macro is traced by Automake.
1902 AC_DEFUN([_AM_SUBST_NOTMAKE])
1904 # Check how to create a tarball.                            -*- Autoconf -*-
1906 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
1908 # This file is free software; the Free Software Foundation
1909 # gives unlimited permission to copy and/or distribute it,
1910 # with or without modifications, as long as this notice is preserved.
1912 # serial 2
1914 # _AM_PROG_TAR(FORMAT)
1915 # --------------------
1916 # Check how to create a tarball in format FORMAT.
1917 # FORMAT should be one of `v7', `ustar', or `pax'.
1919 # Substitute a variable $(am__tar) that is a command
1920 # writing to stdout a FORMAT-tarball containing the directory
1921 # $tardir.
1922 #     tardir=directory && $(am__tar) > result.tar
1924 # Substitute a variable $(am__untar) that extract such
1925 # a tarball read from stdin.
1926 #     $(am__untar) < result.tar
1927 AC_DEFUN([_AM_PROG_TAR],
1928 [# Always define AMTAR for backward compatibility.
1929 AM_MISSING_PROG([AMTAR], [tar])
1930 m4_if([$1], [v7],
1931      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1932      [m4_case([$1], [ustar],, [pax],,
1933               [m4_fatal([Unknown tar format])])
1934 AC_MSG_CHECKING([how to create a $1 tar archive])
1935 # Loop over all known methods to create a tar archive until one works.
1936 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1937 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1938 # Do not fold the above two line into one, because Tru64 sh and
1939 # Solaris sh will not grok spaces in the rhs of `-'.
1940 for _am_tool in $_am_tools
1942   case $_am_tool in
1943   gnutar)
1944     for _am_tar in tar gnutar gtar;
1945     do
1946       AM_RUN_LOG([$_am_tar --version]) && break
1947     done
1948     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1949     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1950     am__untar="$_am_tar -xf -"
1951     ;;
1952   plaintar)
1953     # Must skip GNU tar: if it does not support --format= it doesn't create
1954     # ustar tarball either.
1955     (tar --version) >/dev/null 2>&1 && continue
1956     am__tar='tar chf - "$$tardir"'
1957     am__tar_='tar chf - "$tardir"'
1958     am__untar='tar xf -'
1959     ;;
1960   pax)
1961     am__tar='pax -L -x $1 -w "$$tardir"'
1962     am__tar_='pax -L -x $1 -w "$tardir"'
1963     am__untar='pax -r'
1964     ;;
1965   cpio)
1966     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1967     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1968     am__untar='cpio -i -H $1 -d'
1969     ;;
1970   none)
1971     am__tar=false
1972     am__tar_=false
1973     am__untar=false
1974     ;;
1975   esac
1977   # If the value was cached, stop now.  We just wanted to have am__tar
1978   # and am__untar set.
1979   test -n "${am_cv_prog_tar_$1}" && break
1981   # tar/untar a dummy directory, and stop if the command works
1982   rm -rf conftest.dir
1983   mkdir conftest.dir
1984   echo GrepMe > conftest.dir/file
1985   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1986   rm -rf conftest.dir
1987   if test -s conftest.tar; then
1988     AM_RUN_LOG([$am__untar <conftest.tar])
1989     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1990   fi
1991 done
1992 rm -rf conftest.dir
1994 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1995 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1996 AC_SUBST([am__tar])
1997 AC_SUBST([am__untar])
1998 ]) # _AM_PROG_TAR
2000 m4_include([m4/gnome-doc-utils.m4])
2001 m4_include([m4/intltool.m4])
2002 m4_include([m4/libtool.m4])
2003 m4_include([m4/ltoptions.m4])
2004 m4_include([m4/ltsugar.m4])
2005 m4_include([m4/ltversion.m4])
2006 m4_include([m4/lt~obsolete.m4])
2007 m4_include([m4/python.m4])
2008 m4_include([acinclude.m4])