1 dnl aclocal.m4 generated automatically by aclocal 1.4-p5
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([AC_PROG_INSTALL])
28 dnl test to see if srcdir already configured
29 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
30 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
33 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
34 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
35 AC_REQUIRE([AM_SANITY_CHECK])
36 AC_REQUIRE([AC_ARG_PROGRAM])
37 dnl FIXME This is truly gross.
38 missing_dir=`cd $ac_aux_dir && pwd`
39 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
40 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
41 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
42 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
43 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
44 AC_REQUIRE([AC_PROG_MAKE_SET])])
47 # Check to make sure that the build environment is sane.
50 AC_DEFUN([AM_SANITY_CHECK],
51 [AC_MSG_CHECKING([whether build environment is sane])
54 echo timestamp > conftestfile
55 # Do `set' in a subshell so we don't clobber the current shell's
56 # arguments. Must try -L first in case configure is actually a
57 # symlink; some systems play weird games with the mod time of symlinks
58 # (eg FreeBSD returns the mod time of the symlink's containing
61 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
62 if test "[$]*" = "X"; then
64 set X `ls -t $srcdir/configure conftestfile`
66 if test "[$]*" != "X $srcdir/configure conftestfile" \
67 && test "[$]*" != "X conftestfile $srcdir/configure"; then
69 # If neither matched, then we have a broken ls. This can happen
70 # if, for instance, CONFIG_SHELL is bash and it inherits a
71 # broken ls alias from the environment. This has actually
72 # happened. Such a system could not be considered "sane".
73 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
74 alias in your environment])
77 test "[$]2" = conftestfile
83 AC_MSG_ERROR([newly created file is older than distributed files!
84 Check your system clock])
89 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
90 dnl The program must properly implement --version.
91 AC_DEFUN([AM_MISSING_PROG],
92 [AC_MSG_CHECKING(for working $2)
93 # Run test in a subshell; some versions of sh will print an error if
94 # an executable is not found, even if stderr is redirected.
95 # Redirect stdin to placate older versions of autoconf. Sigh.
96 if ($2 --version) < /dev/null > /dev/null 2>&1; then
101 AC_MSG_RESULT(missing)
105 # Add --enable-maintainer-mode option to configure.
110 AC_DEFUN([AM_MAINTAINER_MODE],
111 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
112 dnl maintainer-mode is disabled by default
113 AC_ARG_ENABLE(maintainer-mode,
114 [ --enable-maintainer-mode enable make rules and dependencies not useful
115 (and sometimes confusing) to the casual installer],
116 USE_MAINTAINER_MODE=$enableval,
117 USE_MAINTAINER_MODE=no)
118 AC_MSG_RESULT($USE_MAINTAINER_MODE)
119 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
120 MAINT=$MAINTAINER_MODE_TRUE
125 # Define a conditional.
127 AC_DEFUN([AM_CONDITIONAL],
138 # Like AC_CONFIG_HEADER, but automatically create stamp file.
140 AC_DEFUN([AM_CONFIG_HEADER],
142 AC_CONFIG_HEADER([$1])
143 dnl When config.status generates a header, we must update the stamp-h file.
144 dnl This file resides in the same directory as the config header
145 dnl that is generated. We must strip everything past the first ":",
146 dnl and everything past the last "/".
147 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
148 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
149 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
151 for am_file in <<$1>>; do
152 case " <<$>>CONFIG_HEADERS " in
153 *" <<$>>am_file "*<<)>>
154 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
157 am_indx=`expr "<<$>>am_indx" + 1`
162 dnl GNOME_PLATFORM_GNOME_2(default, [force])
164 dnl If the first parameter is `yes', then the default is
165 dnl the GNOME 2.x platform, otherwise the GNOME 1.x one.
167 dnl If the optional second parameter is `force', then use
168 dnl the default value without command line argument.
171 AC_DEFUN([GNOME_PLATFORM_GNOME_2],[
172 AC_REQUIRE([GNOME_REQUIRE_PKGCONFIG])
174 if test x$1 = xyes ; then
175 platform_gnome_2_default=yes
177 platform_gnome_2_default=no
179 if test x$2 = xforce ; then
180 platform_gnome_2="$platform_gnome_2_default";
182 AC_ARG_ENABLE(platform-gnome-2, [ --enable-platform-gnome-2 enable GNOME 2.x platform [default=no]],[platform_gnome_2="$enableval"],[platform_gnome_2="$platform_gnome_2_default"])
185 AM_CONDITIONAL(PLATFORM_GNOME_2, test $platform_gnome_2 = yes)
187 AC_MSG_CHECKING(for GNOME Platform)
188 if test $platform_gnome_2 = yes; then
189 AC_MSG_RESULT(GNOME 2.x)
190 GNOME_INTERFACE_VERSION=2
191 GNOME_REQUIRE_PKGCONFIG
193 AC_MSG_RESULT(GNOME 1.x)
194 GNOME_INTERFACE_VERSION=1
196 AC_SUBST(GNOME_INTERFACE_VERSION)
200 dnl GNOME_CHECK_PKGCONFIG (script-if-enabled, [failflag])
202 AC_DEFUN([GNOME_CHECK_PKGCONFIG],[
203 AC_PATH_PROG(PKG_CONFIG, pkg-config)
205 if test -x "$PKG_CONFIG" ; then
210 AC_MSG_CHECKING(for pkg-config)
211 pkgconfig_required_version=0.8.0
212 if test x$have_pkgconfig = xyes ; then
213 $PKG_CONFIG --atleast-pkgconfig-version $pkgconfig_required_version
214 if test $? -ne 0; then
215 echo "*** Your version of pkg-config is too old. You need version $pkgconfig_required_version or newer."
216 echo "*** See http://www.freedesktop.org/software/pkgconfig"
220 if test x$have_pkgconfig = xyes ; then
224 AC_MSG_RESULT(not found)
225 if test x$2 = xfail; then
227 *** You need the latest pkg-config (at least $pkgconfig_required_version).
228 *** Get the latest version of pkg-config from
229 *** http://www.freedesktop.org/software/pkgconfig.])
234 AC_PROVIDE([GNOME_REQUIRE_PKGCONFIG])
238 dnl GNOME_REQUIRE_PKGCONFIG
240 AC_DEFUN([GNOME_REQUIRE_PKGCONFIG],[
241 GNOME_CHECK_PKGCONFIG([], fail)
245 # This test replaces the one in autoconf.
246 # Currently this macro should have the same name as the autoconf macro
247 # because gettext's gettext.m4 (distributed in the automake package)
248 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
249 # give these diagnostics:
250 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
251 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
253 undefine([AC_ISC_POSIX])
255 AC_DEFUN([AC_ISC_POSIX],
257 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
258 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
265 # @defmac AC_PROG_CC_STDC
266 # @maindex PROG_CC_STDC
268 # If the C compiler in not in ANSI C mode by default, try to add an option
269 # to output variable @code{CC} to make it so. This macro tries various
270 # options that select ANSI C on some system or another. It considers the
271 # compiler to be in ANSI C mode if it handles function prototypes correctly.
273 # If you use this macro, you should check after calling it whether the C
274 # compiler has been set to accept ANSI C; if not, the shell variable
275 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
276 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
277 # program @code{ansi2knr}, which comes with Ghostscript.
280 AC_DEFUN([AM_PROG_CC_STDC],
281 [AC_REQUIRE([AC_PROG_CC])
282 AC_BEFORE([$0], [AC_C_INLINE])
283 AC_BEFORE([$0], [AC_C_CONST])
284 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
285 dnl a magic option to avoid problems with ANSI preprocessor commands
287 dnl FIXME: can't do this because then AC_AIX won't work due to a
288 dnl circular dependency.
289 dnl AC_BEFORE([$0], [AC_PROG_CPP])
290 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
291 AC_CACHE_VAL(am_cv_prog_cc_stdc,
292 [am_cv_prog_cc_stdc=no
294 # Don't try gcc -ansi; that turns off useful extensions and
295 # breaks some systems' header files.
297 # Ultrix and OSF/1 -std1
298 # HP-UX -Aa -D_HPUX_SOURCE
299 # SVR4 -Xc -D__EXTENSIONS__
300 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
302 CC="$ac_save_CC $ac_arg"
306 #include <sys/types.h>
307 #include <sys/stat.h>
308 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
309 struct buf { int x; };
310 FILE * (*rcsopen) (struct buf *, struct stat *, int);
311 static char *e (p, i)
317 static char *f (char * (*g) (char **, int), char **p, ...)
322 s = g (p, va_arg (v,int));
326 int test (int i, double x);
327 struct s1 {int (*f) (int a);};
328 struct s2 {int (*f) (double a);};
329 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
333 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
335 [am_cv_prog_cc_stdc="$ac_arg"; break])
339 if test -z "$am_cv_prog_cc_stdc"; then
340 AC_MSG_RESULT([none needed])
342 AC_MSG_RESULT($am_cv_prog_cc_stdc)
344 case "x$am_cv_prog_cc_stdc" in
346 *) CC="$CC $am_cv_prog_cc_stdc" ;;
350 dnl GNOME_COMPILE_WARNINGS
351 dnl Turn on many useful compiler warnings
352 dnl For now, only works on GCC
353 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
354 dnl ******************************
355 dnl More compiler warnings
356 dnl ******************************
358 if test -z "$1" ; then
359 default_compile_warnings=no
361 default_compile_warnings="$1"
364 AC_ARG_ENABLE(compile-warnings,
365 [ --enable-compile-warnings=[no/minimum/yes/maximum/error] Turn on compiler warnings.], [enable_compile_warnings="$enableval"],[enable_compile_warnings="$default_compile_warnings"])
368 if test "x$GCC" != xyes; then
369 enable_compile_warnings=no
373 realsave_CFLAGS="$CFLAGS"
375 case "$enable_compile_warnings" in
380 warning_flags="-Wall -Wunused"
383 warning_flags="-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations"
386 warning_flags="-Wall -Wunused -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
387 CFLAGS="$warning_flags $CFLAGS"
388 for option in -Wsign-promo -Wno-sign-compare; do
389 SAVE_CFLAGS="$CFLAGS"
390 CFLAGS="$CFLAGS $option"
391 AC_MSG_CHECKING([whether gcc understands $option])
392 AC_TRY_COMPILE([], [],
395 CFLAGS="$SAVE_CFLAGS"
396 AC_MSG_RESULT($has_option)
397 if test $has_option = yes; then
398 warning_flags="$warning_flags $option"
404 if test "$enable_compile_warnings" = "error" ; then
405 warning_flags="$warning_flags -Werror"
409 AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
412 CFLAGS="$realsave_CFLAGS"
413 AC_MSG_CHECKING(what warning flags to pass to the C compiler)
414 AC_MSG_RESULT($warning_flags)
417 [ --enable-iso-c Try to warn if code is not ISO C ],,
420 AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
422 if test "x$enable_iso_c" != "xno"; then
423 if test "x$GCC" = "xyes"; then
425 *[\ \ ]-ansi[\ \ ]*) ;;
426 *) complCFLAGS="$complCFLAGS -ansi" ;;
429 *[\ \ ]-pedantic[\ \ ]*) ;;
430 *) complCFLAGS="$complCFLAGS -pedantic" ;;
434 AC_MSG_RESULT($complCFLAGS)
436 WARN_CFLAGS="$warning_flags $complCFLAGS"
437 AC_SUBST(WARN_CFLAGS)
440 dnl For C++, do basically the same thing.
442 AC_DEFUN([GNOME_CXX_WARNINGS],[
443 AC_ARG_ENABLE(cxx-warnings,
444 [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum)
446 AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
448 if test "x$GCC" != xyes; then
449 enable_compile_warnings=no
451 if test "x$enable_cxx_warnings" != "xno"; then
452 if test "x$GCC" = "xyes"; then
453 case " $CXXFLAGS " in
454 *[\ \ ]-Wall[\ \ ]*) ;;
455 *) warnCXXFLAGS="-Wall -Wno-unused" ;;
458 ## -W is not all that useful. And it cannot be controlled
459 ## with individual -Wno-xxx flags, unlike -Wall
460 if test "x$enable_cxx_warnings" = "xyes"; then
461 warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wshadow -Woverloaded-virtual"
465 AC_MSG_RESULT($warnCXXFLAGS)
467 AC_ARG_ENABLE(iso-cxx,
468 [ --enable-iso-cxx Try to warn if code is not ISO C++ ],,
471 AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
473 if test "x$enable_iso_cxx" != "xno"; then
474 if test "x$GCC" = "xyes"; then
475 case " $CXXFLAGS " in
476 *[\ \ ]-ansi[\ \ ]*) ;;
477 *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
480 case " $CXXFLAGS " in
481 *[\ \ ]-pedantic[\ \ ]*) ;;
482 *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
486 AC_MSG_RESULT($complCXXFLAGS)
487 if test "x$cxxflags_set" != "xyes"; then
488 CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
490 AC_SUBST(cxxflags_set)
495 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
496 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
497 dnl also defines GSTUFF_PKG_ERRORS on error
498 AC_DEFUN(PKG_CHECK_MODULES, [
501 if test -z "$PKG_CONFIG"; then
502 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
505 if test "$PKG_CONFIG" = "no" ; then
506 echo "*** The pkg-config script could not be found. Make sure it is"
507 echo "*** in your path, or set the PKG_CONFIG environment variable"
508 echo "*** to the full path to pkg-config."
509 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
511 PKG_CONFIG_MIN_VERSION=0.9.0
512 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
513 AC_MSG_CHECKING(for $2)
515 if $PKG_CONFIG --exists "$2" ; then
519 AC_MSG_CHECKING($1_CFLAGS)
520 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
521 AC_MSG_RESULT($$1_CFLAGS)
523 AC_MSG_CHECKING($1_LIBS)
524 $1_LIBS=`$PKG_CONFIG --libs "$2"`
525 AC_MSG_RESULT($$1_LIBS)
529 ## If we have a custom action on failure, don't print errors, but
530 ## do set a variable so people can do so.
531 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
532 ifelse([$4], ,echo $$1_PKG_ERRORS,)
538 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
539 echo "*** See http://www.freedesktop.org/software/pkgconfig"
543 if test $succeeded = yes; then
544 ifelse([$3], , :, [$3])
546 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])
552 # Macro to add for using GNU gettext.
553 # Ulrich Drepper <drepper@cygnus.com>, 1995.
555 # Modified to never use included libintl.
556 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
559 # This file can be copied and used freely without restrictions. It can
560 # be used in projects which are not available under the GNU Public License
561 # but which still want to provide support for the GNU gettext functionality.
562 # Please note that the actual code is *not* freely available.
565 # If you make changes to this file, you MUST update the copy in
566 # acinclude.m4. [ aclocal dies on duplicate macros, so if
567 # we run 'aclocal -I macros/' then we'll run into problems
568 # once we've installed glib-gettext.m4 :-( ]
573 AC_DEFUN(AM_GLIB_WITH_NLS,
574 dnl NLS is obligatory
578 dnl Figure out what method
579 nls_cv_force_use_gnu_gettext="no"
581 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
582 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
583 dnl User does not insist on using GNU NLS library. Figure out what
584 dnl to use. If gettext or catgets are available (in this order) we
585 dnl use this. Else we have to fall back to GNU NLS library.
586 dnl catgets is only used if permitted by option --with-catgets.
591 AC_CHECK_HEADER(libintl.h,
592 [AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
593 [AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
594 gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
596 if test "$gt_cv_func_dgettext_libc" != "yes"; then
597 AC_CHECK_LIB(intl, bindtextdomain,
598 [AC_CACHE_CHECK([for dgettext in libintl],
599 gt_cv_func_dgettext_libintl,
600 [AC_CHECK_LIB(intl, dgettext,
601 gt_cv_func_dgettext_libintl=yes,
602 gt_cv_func_dgettext_libintl=no)],
603 gt_cv_func_dgettext_libintl=no)])
606 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
610 if test "$gt_cv_func_dgettext_libc" = "yes" \
611 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
612 AC_DEFINE(HAVE_GETTEXT,1,
613 [Define if the GNU gettext() function is already present or preinstalled.])
614 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
615 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
616 if test "$MSGFMT" != "no"; then
617 AC_CHECK_FUNCS(dcgettext)
618 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
619 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
620 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
621 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
622 return _nl_msg_cat_cntr],
631 # Added by Martin Baulig 12/15/98 for libc5 systems
632 if test "$gt_cv_func_dgettext_libc" != "yes" \
633 && test "$gt_cv_func_dgettext_libintl" = "yes"; then
635 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
639 if test "$CATOBJEXT" = "NONE"; then
640 dnl Neither gettext nor catgets in included in the C library.
641 dnl Fall back on GNU gettext library.
642 nls_cv_use_gnu_gettext=yes
646 if test "$nls_cv_use_gnu_gettext" != "yes"; then
647 AC_DEFINE(ENABLE_NLS, 1,
648 [always defined to indicate that i18n is enabled])
650 dnl Unset this variable since we use the non-zero value as a flag.
654 dnl Test whether we really found GNU xgettext.
655 if test "$XGETTEXT" != ":"; then
656 dnl If it is no GNU xgettext we define it as : so that the
657 dnl Makefiles still can work.
658 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
662 [found xgettext program is not GNU xgettext; ignore it])
667 # We need to process the po/ directory.
671 [case "$CONFIG_FILES" in *po/Makefile.in*)
672 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
675 dnl These rules are solely for the distribution goal. While doing this
676 dnl we only have to keep exactly one list of the available catalogs
678 for lang in $ALL_LINGUAS; do
679 GMOFILES="$GMOFILES $lang.gmo"
680 POFILES="$POFILES $lang.po"
683 dnl Make all variables we use known to autoconf.
686 AC_SUBST(DATADIRNAME)
696 AC_DEFUN(AM_GLIB_GNU_GETTEXT,
697 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
698 AC_REQUIRE([AC_PROG_CC])dnl
699 AC_REQUIRE([AC_PROG_RANLIB])dnl
700 AC_REQUIRE([AC_HEADER_STDC])dnl
701 AC_REQUIRE([AC_C_CONST])dnl
702 AC_REQUIRE([AC_C_INLINE])dnl
703 AC_REQUIRE([AC_TYPE_OFF_T])dnl
704 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
705 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
706 AC_REQUIRE([AC_FUNC_MMAP])dnl
708 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
709 unistd.h sys/param.h])
710 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
711 strdup __argz_count __argz_stringify __argz_next])
716 if test "x$CATOBJEXT" != "x"; then
717 if test "x$ALL_LINGUAS" = "x"; then
720 AC_MSG_CHECKING(for catalogs to be installed)
722 for lang in ${LINGUAS=$ALL_LINGUAS}; do
723 case "$ALL_LINGUAS" in
724 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
728 AC_MSG_RESULT($LINGUAS)
731 dnl Construct list of names of catalog files to be constructed.
732 if test -n "$LINGUAS"; then
733 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
737 dnl Determine which catalog format we have (if any is needed)
738 dnl For now we know about two different formats:
739 dnl Linux libc-5 and the normal X/Open format
740 test -d po || mkdir po
741 if test "$CATOBJEXT" = ".cat"; then
742 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
744 dnl Transform the SED scripts while copying because some dumb SEDs
745 dnl cannot handle comments.
746 sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
749 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
750 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
751 dnl Try to locate is.
753 if test -n "$ac_aux_dir"; then
754 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
756 if test -z "$MKINSTALLDIRS"; then
757 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
759 AC_SUBST(MKINSTALLDIRS)
761 dnl Generate list of files to be processed by xgettext which will
762 dnl be included in po/Makefile.
763 test -d po || mkdir po
764 if test "x$srcdir" != "x."; then
765 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
766 posrcprefix="$srcdir/"
768 posrcprefix="../$srcdir/"
774 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
775 < $srcdir/po/POTFILES.in > po/POTFILES
779 # Search path for a program which passes the given test.
780 # Ulrich Drepper <drepper@cygnus.com>, 1996.
782 # This file can be copied and used freely without restrictions. It can
783 # be used in projects which are not available under the GNU Public License
784 # but which still want to provide support for the GNU gettext functionality.
785 # Please note that the actual code is *not* freely available.
789 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
790 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
791 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
792 [# Extract the first word of "$2", so it can be a program name with args.
793 set dummy $2; ac_word=[$]2
794 AC_MSG_CHECKING([for $ac_word])
795 AC_CACHE_VAL(ac_cv_path_$1,
798 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
801 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
802 for ac_dir in ifelse([$5], , $PATH, [$5]); do
803 test -z "$ac_dir" && ac_dir=.
804 if test -f $ac_dir/$ac_word; then
806 ac_cv_path_$1="$ac_dir/$ac_word"
812 dnl If no 4th arg is given, leave the cache variable unset,
813 dnl so AC_PATH_PROGS will keep looking.
814 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
819 if test -n "[$]$1"; then
827 # Check whether LC_MESSAGES is available in <locale.h>.
828 # Ulrich Drepper <drepper@cygnus.com>, 1995.
830 # This file can be copied and used freely without restrictions. It can
831 # be used in projects which are not available under the GNU Public License
832 # but which still want to provide support for the GNU gettext functionality.
833 # Please note that the actual code is *not* freely available.
837 AC_DEFUN([AM_LC_MESSAGES],
838 [if test $ac_cv_header_locale_h = yes; then
839 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
840 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
841 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
842 if test $am_cv_val_LC_MESSAGES = yes; then
843 AC_DEFINE(HAVE_LC_MESSAGES, 1,
844 [Define if your <locale.h> file defines LC_MESSAGES.])