1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 # Do all the work for Automake. This macro actually does too much --
14 # some checks are only needed if your package does certain things.
15 # But this isn't really a big deal.
20 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
22 AC_DEFUN([AM_INIT_AUTOMAKE],
23 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
24 AC_REQUIRE([AC_PROG_INSTALL])
29 dnl test to see if srcdir already configured
30 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
31 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
34 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
35 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
36 AC_REQUIRE([AM_SANITY_CHECK])
37 AC_REQUIRE([AC_ARG_PROGRAM])
38 dnl FIXME This is truly gross.
39 missing_dir=`cd $ac_aux_dir && pwd`
40 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
41 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
42 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
43 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
44 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
45 AC_REQUIRE([AC_PROG_MAKE_SET])])
47 # Copyright 2002 Free Software Foundation, Inc.
49 # This program is free software; you can redistribute it and/or modify
50 # it under the terms of the GNU General Public License as published by
51 # the Free Software Foundation; either version 2, or (at your option)
54 # This program is distributed in the hope that it will be useful,
55 # but WITHOUT ANY WARRANTY; without even the implied warranty of
56 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57 # GNU General Public License for more details.
59 # You should have received a copy of the GNU General Public License
60 # along with this program; if not, write to the Free Software
61 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
63 # AM_AUTOMAKE_VERSION(VERSION)
64 # ----------------------------
65 # Automake X.Y traces this macro to ensure aclocal.m4 has been
66 # generated from the m4 files accompanying Automake X.Y.
67 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
69 # AM_SET_CURRENT_AUTOMAKE_VERSION
70 # -------------------------------
71 # Call AM_AUTOMAKE_VERSION so it can be traced.
72 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
73 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
74 [AM_AUTOMAKE_VERSION([1.4-p6])])
77 # Check to make sure that the build environment is sane.
80 AC_DEFUN([AM_SANITY_CHECK],
81 [AC_MSG_CHECKING([whether build environment is sane])
84 echo timestamp > conftestfile
85 # Do `set' in a subshell so we don't clobber the current shell's
86 # arguments. Must try -L first in case configure is actually a
87 # symlink; some systems play weird games with the mod time of symlinks
88 # (eg FreeBSD returns the mod time of the symlink's containing
91 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
92 if test "[$]*" = "X"; then
94 set X `ls -t $srcdir/configure conftestfile`
96 if test "[$]*" != "X $srcdir/configure conftestfile" \
97 && test "[$]*" != "X conftestfile $srcdir/configure"; then
99 # If neither matched, then we have a broken ls. This can happen
100 # if, for instance, CONFIG_SHELL is bash and it inherits a
101 # broken ls alias from the environment. This has actually
102 # happened. Such a system could not be considered "sane".
103 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
104 alias in your environment])
107 test "[$]2" = conftestfile
113 AC_MSG_ERROR([newly created file is older than distributed files!
114 Check your system clock])
119 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
120 dnl The program must properly implement --version.
121 AC_DEFUN([AM_MISSING_PROG],
122 [AC_MSG_CHECKING(for working $2)
123 # Run test in a subshell; some versions of sh will print an error if
124 # an executable is not found, even if stderr is redirected.
125 # Redirect stdin to placate older versions of autoconf. Sigh.
126 if ($2 --version) < /dev/null > /dev/null 2>&1; then
131 AC_MSG_RESULT(missing)
135 # Add --enable-maintainer-mode option to configure.
140 AC_DEFUN([AM_MAINTAINER_MODE],
141 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
142 dnl maintainer-mode is disabled by default
143 AC_ARG_ENABLE(maintainer-mode,
144 [ --enable-maintainer-mode enable make rules and dependencies not useful
145 (and sometimes confusing) to the casual installer],
146 USE_MAINTAINER_MODE=$enableval,
147 USE_MAINTAINER_MODE=no)
148 AC_MSG_RESULT($USE_MAINTAINER_MODE)
149 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
150 MAINT=$MAINTAINER_MODE_TRUE
155 # Define a conditional.
157 AC_DEFUN([AM_CONDITIONAL],
168 # Like AC_CONFIG_HEADER, but automatically create stamp file.
170 AC_DEFUN([AM_CONFIG_HEADER],
172 AC_CONFIG_HEADER([$1])
173 dnl When config.status generates a header, we must update the stamp-h file.
174 dnl This file resides in the same directory as the config header
175 dnl that is generated. We must strip everything past the first ":",
176 dnl and everything past the last "/".
177 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
178 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
179 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
181 for am_file in <<$1>>; do
182 case " <<$>>CONFIG_HEADERS " in
183 *" <<$>>am_file "*<<)>>
184 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
187 am_indx=`expr "<<$>>am_indx" + 1`
191 # isc-posix.m4 serial 2 (gettext-0.11.2)
192 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
193 dnl This file is free software, distributed under the terms of the GNU
194 dnl General Public License. As a special exception to the GNU General
195 dnl Public License, this file may be distributed as part of a program
196 dnl that contains a configuration script generated by Autoconf, under
197 dnl the same distribution terms as the rest of that program.
199 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
201 # This test replaces the one in autoconf.
202 # Currently this macro should have the same name as the autoconf macro
203 # because gettext's gettext.m4 (distributed in the automake package)
204 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
205 # give these diagnostics:
206 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
207 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
209 undefine([AC_ISC_POSIX])
211 AC_DEFUN([AC_ISC_POSIX],
213 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
214 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
221 # @defmac AC_PROG_CC_STDC
222 # @maindex PROG_CC_STDC
224 # If the C compiler in not in ANSI C mode by default, try to add an option
225 # to output variable @code{CC} to make it so. This macro tries various
226 # options that select ANSI C on some system or another. It considers the
227 # compiler to be in ANSI C mode if it handles function prototypes correctly.
229 # If you use this macro, you should check after calling it whether the C
230 # compiler has been set to accept ANSI C; if not, the shell variable
231 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
232 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
233 # program @code{ansi2knr}, which comes with Ghostscript.
236 AC_DEFUN([AM_PROG_CC_STDC],
237 [AC_REQUIRE([AC_PROG_CC])
238 AC_BEFORE([$0], [AC_C_INLINE])
239 AC_BEFORE([$0], [AC_C_CONST])
240 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
241 dnl a magic option to avoid problems with ANSI preprocessor commands
243 dnl FIXME: can't do this because then AC_AIX won't work due to a
244 dnl circular dependency.
245 dnl AC_BEFORE([$0], [AC_PROG_CPP])
246 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
247 AC_CACHE_VAL(am_cv_prog_cc_stdc,
248 [am_cv_prog_cc_stdc=no
250 # Don't try gcc -ansi; that turns off useful extensions and
251 # breaks some systems' header files.
253 # Ultrix and OSF/1 -std1
254 # HP-UX -Aa -D_HPUX_SOURCE
255 # SVR4 -Xc -D__EXTENSIONS__
256 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
258 CC="$ac_save_CC $ac_arg"
262 #include <sys/types.h>
263 #include <sys/stat.h>
264 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
265 struct buf { int x; };
266 FILE * (*rcsopen) (struct buf *, struct stat *, int);
267 static char *e (p, i)
273 static char *f (char * (*g) (char **, int), char **p, ...)
278 s = g (p, va_arg (v,int));
282 int test (int i, double x);
283 struct s1 {int (*f) (int a);};
284 struct s2 {int (*f) (double a);};
285 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
289 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
291 [am_cv_prog_cc_stdc="$ac_arg"; break])
295 if test -z "$am_cv_prog_cc_stdc"; then
296 AC_MSG_RESULT([none needed])
298 AC_MSG_RESULT($am_cv_prog_cc_stdc)
300 case "x$am_cv_prog_cc_stdc" in
302 *) CC="$CC $am_cv_prog_cc_stdc" ;;
307 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
308 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
309 dnl also defines GSTUFF_PKG_ERRORS on error
310 AC_DEFUN(PKG_CHECK_MODULES, [
313 if test -z "$PKG_CONFIG"; then
314 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
317 if test "$PKG_CONFIG" = "no" ; then
318 echo "*** The pkg-config script could not be found. Make sure it is"
319 echo "*** in your path, or set the PKG_CONFIG environment variable"
320 echo "*** to the full path to pkg-config."
321 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
323 PKG_CONFIG_MIN_VERSION=0.9.0
324 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
325 AC_MSG_CHECKING(for $2)
327 if $PKG_CONFIG --exists "$2" ; then
331 AC_MSG_CHECKING($1_CFLAGS)
332 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
333 AC_MSG_RESULT($$1_CFLAGS)
335 AC_MSG_CHECKING($1_LIBS)
336 $1_LIBS=`$PKG_CONFIG --libs "$2"`
337 AC_MSG_RESULT($$1_LIBS)
341 ## If we have a custom action on failure, don't print errors, but
342 ## do set a variable so people can do so.
343 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
344 ifelse([$4], ,echo $$1_PKG_ERRORS,)
350 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
351 echo "*** See http://www.freedesktop.org/software/pkgconfig"
355 if test $succeeded = yes; then
356 ifelse([$3], , :, [$3])
358 ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
364 # Macro to add for using GNU gettext.
365 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
367 # Modified to never use included libintl.
368 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
371 # This file can be copied and used freely without restrictions. It can
372 # be used in projects which are not available under the GNU Public License
373 # but which still want to provide support for the GNU gettext functionality.
374 # Please note that the actual code is *not* freely available.
377 # If you make changes to this file, you MUST update the copy in
378 # acinclude.m4. [ aclocal dies on duplicate macros, so if
379 # we run 'aclocal -I macros/' then we'll run into problems
380 # once we've installed glib-gettext.m4 :-( ]
383 AC_DEFUN([AM_GLIB_LC_MESSAGES],
384 [if test $ac_cv_header_locale_h = yes; then
385 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
386 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
387 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
388 if test $am_cv_val_LC_MESSAGES = yes; then
389 AC_DEFINE(HAVE_LC_MESSAGES, 1,
390 [Define if your <locale.h> file defines LC_MESSAGES.])
394 dnl AM_GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
395 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
396 AC_DEFUN([AM_GLIB_PATH_PROG_WITH_TEST],
397 [# Extract the first word of "$2", so it can be a program name with args.
398 set dummy $2; ac_word=[$]2
399 AC_MSG_CHECKING([for $ac_word])
400 AC_CACHE_VAL(ac_cv_path_$1,
403 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
406 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
407 for ac_dir in ifelse([$5], , $PATH, [$5]); do
408 test -z "$ac_dir" && ac_dir=.
409 if test -f $ac_dir/$ac_word; then
411 ac_cv_path_$1="$ac_dir/$ac_word"
417 dnl If no 4th arg is given, leave the cache variable unset,
418 dnl so AC_PATH_PROGS will keep looking.
419 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
424 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
434 AC_DEFUN(AM_GLIB_WITH_NLS,
435 dnl NLS is obligatory
439 dnl Figure out what method
440 nls_cv_force_use_gnu_gettext="no"
442 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
443 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
444 dnl User does not insist on using GNU NLS library. Figure out what
445 dnl to use. If gettext or catgets are available (in this order) we
446 dnl use this. Else we have to fall back to GNU NLS library.
447 dnl catgets is only used if permitted by option --with-catgets.
453 AC_CHECK_HEADER(libintl.h,
454 [AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
455 [AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
456 gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
458 gt_cv_func_dgettext_libintl="no"
459 libintl_extra_libs=""
461 if test "$gt_cv_func_dgettext_libc" != "yes" ; then
462 AC_CHECK_LIB(intl, bindtextdomain,
463 [AC_CHECK_LIB(intl, dgettext,
464 gt_cv_func_dgettext_libintl=yes)])
466 if test "$gt_cv_func_dgettext_libc" != "yes" ; then
467 AC_MSG_CHECKING([if -liconv is needed to use gettext])
469 AC_CHECK_LIB(intl, dcgettext,
470 [gt_cv_func_dgettext_libintl=yes
471 libintl_extra_libs=-liconv],
476 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
477 LIBS="$LIBS -lintl $libintl_extra_libs";
480 if test "$gt_cv_func_dgettext_libc" = "yes" \
481 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
482 AC_DEFINE(HAVE_GETTEXT,1,
483 [Define if the GNU gettext() function is already present or preinstalled.])
484 AM_GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
485 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
486 if test "$MSGFMT" != "no"; then
487 AC_CHECK_FUNCS(dcgettext)
488 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
489 AM_GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
490 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
491 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
492 return _nl_msg_cat_cntr],
501 # Added by Martin Baulig 12/15/98 for libc5 systems
502 if test "$gt_cv_func_dgettext_libc" != "yes" \
503 && test "$gt_cv_func_dgettext_libintl" = "yes"; then
504 INTLLIBS="-lintl $libintl_extra_libs"
505 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
509 if test "$CATOBJEXT" = "NONE"; then
510 dnl Neither gettext nor catgets in included in the C library.
511 dnl Fall back on GNU gettext library.
512 nls_cv_use_gnu_gettext=yes
516 if test "$nls_cv_use_gnu_gettext" != "yes"; then
517 AC_DEFINE(ENABLE_NLS, 1,
518 [always defined to indicate that i18n is enabled])
520 dnl Unset this variable since we use the non-zero value as a flag.
524 dnl Test whether we really found GNU xgettext.
525 if test "$XGETTEXT" != ":"; then
526 dnl If it is no GNU xgettext we define it as : so that the
527 dnl Makefiles still can work.
528 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
532 [found xgettext program is not GNU xgettext; ignore it])
537 # We need to process the po/ directory.
541 [case "$CONFIG_FILES" in *po/Makefile.in*)
542 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
545 dnl These rules are solely for the distribution goal. While doing this
546 dnl we only have to keep exactly one list of the available catalogs
548 for lang in $ALL_LINGUAS; do
549 GMOFILES="$GMOFILES $lang.gmo"
550 POFILES="$POFILES $lang.po"
553 dnl Make all variables we use known to autoconf.
556 AC_SUBST(DATADIRNAME)
566 AC_DEFUN(AM_GLIB_GNU_GETTEXT,
567 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
568 AC_REQUIRE([AC_PROG_CC])dnl
569 AC_REQUIRE([AC_PROG_RANLIB])dnl
570 AC_REQUIRE([AC_HEADER_STDC])dnl
571 AC_REQUIRE([AC_C_CONST])dnl
572 AC_REQUIRE([AC_C_INLINE])dnl
573 AC_REQUIRE([AC_TYPE_OFF_T])dnl
574 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
575 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
576 AC_REQUIRE([AC_FUNC_MMAP])dnl
578 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
579 unistd.h sys/param.h])
580 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
581 strdup __argz_count __argz_stringify __argz_next])
586 if test "x$CATOBJEXT" != "x"; then
587 if test "x$ALL_LINGUAS" = "x"; then
590 AC_MSG_CHECKING(for catalogs to be installed)
592 for lang in ${LINGUAS=$ALL_LINGUAS}; do
593 case "$ALL_LINGUAS" in
594 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
598 AC_MSG_RESULT($LINGUAS)
601 dnl Construct list of names of catalog files to be constructed.
602 if test -n "$LINGUAS"; then
603 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
607 dnl Determine which catalog format we have (if any is needed)
608 dnl For now we know about two different formats:
609 dnl Linux libc-5 and the normal X/Open format
610 test -d po || mkdir po
611 if test "$CATOBJEXT" = ".cat"; then
612 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
614 dnl Transform the SED scripts while copying because some dumb SEDs
615 dnl cannot handle comments.
616 sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
619 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
620 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
621 dnl Try to locate is.
623 if test -n "$ac_aux_dir"; then
624 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
626 if test -z "$MKINSTALLDIRS"; then
627 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
629 AC_SUBST(MKINSTALLDIRS)
631 dnl Generate list of files to be processed by xgettext which will
632 dnl be included in po/Makefile.
633 test -d po || mkdir po
634 if test "x$srcdir" != "x."; then
635 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
636 posrcprefix="$srcdir/"
638 posrcprefix="../$srcdir/"
644 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
645 < $srcdir/po/POTFILES.in > po/POTFILES