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.
14 # progtest.m4 from gettext 0.32
15 # Search path for a program which passes the given test.
16 # Ulrich Drepper <drepper@cygnus.com>, 1996.
18 # This file file be copied and used freely without restrictions. It can
19 # be used in projects which are not available under the GNU Public License
20 # but which still want to provide support for the GNU gettext functionality.
21 # Please note that the actual code is *not* freely available.
25 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
26 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
27 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
28 [# Extract the first word of "$2", so it can be a program name with args.
29 set dummy $2; ac_word=[$]2
30 AC_MSG_CHECKING([for $ac_word])
31 AC_CACHE_VAL(ac_cv_path_$1,
34 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
37 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
38 for ac_dir in ifelse([$5], , $PATH, [$5]); do
39 test -z "$ac_dir" && ac_dir=.
40 if test -f $ac_dir/$ac_word; then
42 ac_cv_path_$1="$ac_dir/$ac_word"
48 dnl If no 4th arg is given, leave the cache variable unset,
49 dnl so AC_PATH_PROGS will keep looking.
50 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
55 if test -n "[$]$1"; then
64 # lcmessage.m4 from gettext 0.32
65 # Check whether LC_MESSAGES is available in <locale.h>.
66 # Ulrich Drepper <drepper@cygnus.com>, 1995.
68 # This file file be copied and used freely without restrictions. It can
69 # be used in projects which are not available under the GNU Public License
70 # but which still want to provide support for the GNU gettext functionality.
71 # Please note that the actual code is *not* freely available.
75 AC_DEFUN(AM_LC_MESSAGES,
76 [if test $ac_cv_header_locale_h = yes; then
77 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
78 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
79 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
80 if test $am_cv_val_LC_MESSAGES = yes; then
81 AC_DEFINE(HAVE_LC_MESSAGES)
87 # gettext.m4 from gettext 0.32
88 # Macro to add for using GNU gettext.
89 # Ulrich Drepper <drepper@cygnus.com>, 1995.
91 # This file file be copied and used freely without restrictions. It can
92 # be used in projects which are not available under the GNU Public License
93 # but which still want to provide support for the GNU gettext functionality.
94 # Please note that the actual code is *not* freely available.
99 [AC_MSG_CHECKING([whether NLS is requested])
100 dnl Default is enabled NLS
102 [ --disable-nls do not use Native Language Support],
103 USE_NLS=$enableval, USE_NLS=yes)
104 AC_MSG_RESULT($USE_NLS)
107 USE_INCLUDED_LIBINTL=no
109 dnl If we use NLS figure out what method
110 if test "$USE_NLS" = "yes"; then
111 AC_DEFINE(ENABLE_NLS)
112 AC_MSG_CHECKING([whether included gettext is requested])
113 AC_ARG_WITH(included-gettext,
114 [ --with-included-gettext use the GNU gettext library included here],
115 nls_cv_force_use_gnu_gettext=$withval,
116 nls_cv_force_use_gnu_gettext=no)
117 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
119 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
120 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
121 dnl User does not insist on using GNU NLS library. Figure out what
122 dnl to use. If gettext or catgets are available (in this order) we
123 dnl use this. Else we have to fall back to GNU NLS library.
124 dnl catgets is only used if permitted by option --with-catgets.
129 AC_CHECK_HEADER(libintl.h,
130 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
131 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
132 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
134 if test "$gt_cv_func_gettext_libc" != "yes"; then
135 AC_CHECK_LIB(intl, bindtextdomain,
136 [AC_CACHE_CHECK([for gettext in libintl],
137 gt_cv_func_gettext_libintl,
138 [AC_TRY_LINK([], [return (int) gettext ("")],
139 gt_cv_func_gettext_libintl=yes,
140 gt_cv_func_gettext_libintl=no)])])
143 if test "$gt_cv_func_gettext_libc" = "yes" \
144 || test "$gt_cv_func_gettext_libintl" = "yes"; then
145 AC_DEFINE(HAVE_GETTEXT)
146 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
147 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
148 if test "$MSGFMT" != "no"; then
149 AC_CHECK_FUNCS(dcgettext)
150 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
151 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
152 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
153 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
154 return _nl_msg_cat_cntr],
164 if test "$CATOBJEXT" = "NONE"; then
165 AC_MSG_CHECKING([whether catgets can be used])
167 [ --with-catgets use catgets functions if available],
168 nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
169 AC_MSG_RESULT($nls_cv_use_catgets)
171 if test "$nls_cv_use_catgets" = "yes"; then
172 dnl No gettext in C library. Try catgets next.
173 AC_CHECK_LIB(i, main)
174 AC_CHECK_FUNC(catgets,
175 [AC_DEFINE(HAVE_CATGETS)
176 INTLOBJS="\$(CATOBJS)"
177 AC_PATH_PROG(GENCAT, gencat, no)dnl
178 if test "$GENCAT" != "no"; then
179 AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
180 if test "$GMSGFMT" = "no"; then
181 AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
182 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
184 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
185 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
186 USE_INCLUDED_LIBINTL=yes
190 INTLDEPS='$(top_builddir)/intl/libintl.a'
192 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
193 nls_cv_header_intl=intl/libintl.h
194 nls_cv_header_libgt=intl/libgettext.h
199 if test "$CATOBJEXT" = "NONE"; then
200 dnl Neither gettext nor catgets in included in the C library.
201 dnl Fall back on GNU gettext library.
202 nls_cv_use_gnu_gettext=yes
206 if test "$nls_cv_use_gnu_gettext" = "yes"; then
207 dnl Mark actions used to generate GNU NLS library.
208 INTLOBJS="\$(GETTOBJS)"
209 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
210 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
211 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
212 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
213 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
215 USE_INCLUDED_LIBINTL=yes
219 INTLDEPS='$(top_builddir)/intl/libintl.a'
221 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
222 nls_cv_header_intl=intl/libintl.h
223 nls_cv_header_libgt=intl/libgettext.h
226 dnl Test whether we really found GNU xgettext.
227 if test "$XGETTEXT" != ":"; then
228 dnl If it is no GNU xgettext we define it as : so that the
229 dnl Makefiles still can work.
230 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
234 [found xgettext programs is not GNU xgettext; ignore it])
239 # We need to process the po/ directory.
243 nls_cv_header_intl=intl/libintl.h
244 nls_cv_header_libgt=intl/libgettext.h
247 # If this is used in GNU gettext we have to set USE_NLS to `yes'
248 # because some of the sources are only built for this goal.
249 if test "$PACKAGE" = gettext; then
251 USE_INCLUDED_LIBINTL=yes
254 dnl These rules are solely for the distribution goal. While doing this
255 dnl we only have to keep exactly one list of the available catalogs
257 for lang in $ALL_LINGUAS; do
258 GMOFILES="$GMOFILES $lang.gmo"
259 POFILES="$POFILES $lang.po"
262 dnl Make all variables we use known to autoconf.
263 AC_SUBST(USE_INCLUDED_LIBINTL)
266 AC_SUBST(DATADIRNAME)
276 AC_DEFUN(AM_GNU_GETTEXT,
277 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
278 AC_REQUIRE([AC_PROG_CC])dnl
279 AC_REQUIRE([AC_PROG_RANLIB])dnl
280 AC_REQUIRE([AC_ISC_POSIX])dnl
281 AC_REQUIRE([AC_HEADER_STDC])dnl
282 AC_REQUIRE([AC_C_CONST])dnl
283 AC_REQUIRE([AC_C_INLINE])dnl
284 AC_REQUIRE([AC_TYPE_OFF_T])dnl
285 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
286 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
287 AC_REQUIRE([AC_FUNC_MMAP])dnl
289 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
290 unistd.h values.h sys/param.h])
291 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
292 __argz_count __argz_stringify __argz_next])
294 if test "${ac_cv_func_stpcpy+set}" != "set"; then
295 AC_CHECK_FUNCS(stpcpy)
297 if test "${ac_cv_func_stpcpy}" = "yes"; then
298 AC_DEFINE(HAVE_STPCPY)
304 if test "x$CATOBJEXT" != "x"; then
305 if test "x$ALL_LINGUAS" = "x"; then
308 AC_MSG_CHECKING(for catalogs to be installed)
310 for lang in ${LINGUAS=$ALL_LINGUAS}; do
311 case "$ALL_LINGUAS" in
312 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
316 AC_MSG_RESULT($LINGUAS)
319 dnl Construct list of names of catalog files to be constructed.
320 if test -n "$LINGUAS"; then
321 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
325 dnl The reference to <locale.h> in the installed <libintl.h> file
326 dnl must be resolved because we cannot expect the users of this
327 dnl to define HAVE_LOCALE_H.
328 if test $ac_cv_header_locale_h = yes; then
329 INCLUDE_LOCALE_H="#include <locale.h>"
332 /* The system does not provide the header <locale.h>. Take care yourself. */"
334 AC_SUBST(INCLUDE_LOCALE_H)
336 dnl Determine which catalog format we have (if any is needed)
337 dnl For now we know about two different formats:
338 dnl Linux libc-5 and the normal X/Open format
339 test -d intl || mkdir intl
340 if test "$CATOBJEXT" = ".cat"; then
341 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
343 dnl Transform the SED scripts while copying because some dumb SEDs
344 dnl cannot handle comments.
345 sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
347 dnl po2tbl.sed is always needed.
348 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
349 $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
351 dnl In the intl/Makefile.in we have a special dependency which makes
352 dnl only sense for gettext. We comment this out for non-gettext
354 if test "$PACKAGE" = "gettext"; then
364 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
365 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
366 dnl Try to locate is.
368 if test -n "$ac_aux_dir"; then
369 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
371 if test -z "$MKINSTALLDIRS"; then
372 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
374 AC_SUBST(MKINSTALLDIRS)
376 dnl *** For now the libtool support in intl/Makefile is not for real.
380 dnl Generate list of files to be processed by xgettext which will
381 dnl be included in po/Makefile.
382 test -d po || mkdir po
383 if test "x$srcdir" != "x."; then
384 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
385 posrcprefix="$srcdir/"
387 posrcprefix="../$srcdir/"
393 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
394 < $srcdir/po/POTFILES.in > po/POTFILES
398 # This test replaces the one in autoconf.
399 # Currently this macro should have the same name as the autoconf macro
400 # because gettext's gettext.m4 (distributed in the automake package)
401 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
402 # give these diagnostics:
403 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
404 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
406 undefine([AC_ISC_POSIX])
408 AC_DEFUN([AC_ISC_POSIX],
410 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
411 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
415 # Do all the work for Automake. This macro actually does too much --
416 # some checks are only needed if your package does certain things.
417 # But this isn't really a big deal.
422 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
424 AC_DEFUN([AM_INIT_AUTOMAKE],
425 [AC_REQUIRE([AC_PROG_INSTALL])
430 dnl test to see if srcdir already configured
431 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
432 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
435 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
436 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
437 AC_REQUIRE([AM_SANITY_CHECK])
438 AC_REQUIRE([AC_ARG_PROGRAM])
439 dnl FIXME This is truly gross.
440 missing_dir=`cd $ac_aux_dir && pwd`
441 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
442 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
443 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
444 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
445 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
446 AC_REQUIRE([AC_PROG_MAKE_SET])])
449 # Check to make sure that the build environment is sane.
452 AC_DEFUN([AM_SANITY_CHECK],
453 [AC_MSG_CHECKING([whether build environment is sane])
456 echo timestamp > conftestfile
457 # Do `set' in a subshell so we don't clobber the current shell's
458 # arguments. Must try -L first in case configure is actually a
459 # symlink; some systems play weird games with the mod time of symlinks
460 # (eg FreeBSD returns the mod time of the symlink's containing
463 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
464 if test "[$]*" = "X"; then
466 set X `ls -t $srcdir/configure conftestfile`
468 if test "[$]*" != "X $srcdir/configure conftestfile" \
469 && test "[$]*" != "X conftestfile $srcdir/configure"; then
471 # If neither matched, then we have a broken ls. This can happen
472 # if, for instance, CONFIG_SHELL is bash and it inherits a
473 # broken ls alias from the environment. This has actually
474 # happened. Such a system could not be considered "sane".
475 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
476 alias in your environment])
479 test "[$]2" = conftestfile
485 AC_MSG_ERROR([newly created file is older than distributed files!
486 Check your system clock])
491 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
492 dnl The program must properly implement --version.
493 AC_DEFUN([AM_MISSING_PROG],
494 [AC_MSG_CHECKING(for working $2)
495 # Run test in a subshell; some versions of sh will print an error if
496 # an executable is not found, even if stderr is redirected.
497 # Redirect stdin to placate older versions of autoconf. Sigh.
498 if ($2 --version) < /dev/null > /dev/null 2>&1; then
503 AC_MSG_RESULT(missing)
507 # Add --enable-maintainer-mode option to configure.
512 AC_DEFUN([AM_MAINTAINER_MODE],
513 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
514 dnl maintainer-mode is disabled by default
515 AC_ARG_ENABLE(maintainer-mode,
516 [ --enable-maintainer-mode enable make rules and dependencies not useful
517 (and sometimes confusing) to the casual installer],
518 USE_MAINTAINER_MODE=$enableval,
519 USE_MAINTAINER_MODE=no)
520 AC_MSG_RESULT($USE_MAINTAINER_MODE)
521 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
522 MAINT=$MAINTAINER_MODE_TRUE
527 # Define a conditional.
529 AC_DEFUN([AM_CONDITIONAL],
540 # Like AC_CONFIG_HEADER, but automatically create stamp file.
542 AC_DEFUN([AM_CONFIG_HEADER],
544 AC_CONFIG_HEADER([$1])
545 dnl When config.status generates a header, we must update the stamp-h file.
546 dnl This file resides in the same directory as the config header
547 dnl that is generated. We must strip everything past the first ":",
548 dnl and everything past the last "/".
549 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
550 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
551 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
553 for am_file in <<$1>>; do
554 case " <<$>>CONFIG_HEADERS " in
555 *" <<$>>am_file "*<<)>>
556 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
559 am_indx=`expr "<<$>>am_indx" + 1`
564 dnl AC_PROG_INTLTOOL([MINIMUM-VERSION])
565 # serial 1 AC_PROG_INTLTOOL
566 AC_DEFUN(AC_PROG_INTLTOOL,
569 if test -n "$1"; then
570 AC_MSG_CHECKING(for intltool >= $1)
572 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
573 INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${srcdir}/intltool-update.in`
575 INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${srcdir}/intltool-update.in`
578 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
579 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
581 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.])
586 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
587 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
588 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -k -u -c $(top_builddir)/po/.intltool-merge-cache'
589 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -p'
590 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
591 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -u -c $(top_builddir)/po/.intltool-merge-cache'
592 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
593 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
594 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
595 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
596 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
597 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -s -u -c $(top_builddir)/po/.intltool-merge-cache'
599 AC_SUBST(INTLTOOL_DESKTOP_RULE)
600 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
601 AC_SUBST(INTLTOOL_KEYS_RULE)
602 AC_SUBST(INTLTOOL_OAF_RULE)
603 AC_SUBST(INTLTOOL_PONG_RULE)
604 AC_SUBST(INTLTOOL_SERVER_RULE)
605 AC_SUBST(INTLTOOL_SHEET_RULE)
606 AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
607 AC_SUBST(INTLTOOL_UI_RULE)
608 AC_SUBST(INTLTOOL_XML_RULE)
609 AC_SUBST(INTLTOOL_CAVES_RULE)
610 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
612 # Use the tools built into the package, not the ones that are installed.
614 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
615 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
616 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
618 AC_SUBST(INTLTOOL_EXTRACT)
619 AC_SUBST(INTLTOOL_MERGE)
620 AC_SUBST(INTLTOOL_UPDATE)
622 AC_PATH_PROG(INTLTOOL_PERL, perl)
623 if test -z "$INTLTOOL_PERL"; then
624 AC_MSG_ERROR([perl not found; required for intltool])
626 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
627 AC_MSG_ERROR([perl 5.x required for intltool])
630 # Remove file type tags (using []) from po/POTFILES.
632 ifdef([AC_DIVERSION_ICMDS],[
633 AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
635 mv -f po/POTFILES po/POTFILES.tmp
636 sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
637 rm -f po/POTFILES.tmp
641 ifdef([AC_CONFIG_COMMANDS_PRE],[
642 AC_CONFIG_COMMANDS_PRE([
644 mv -f po/POTFILES po/POTFILES.tmp
645 sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
646 rm -f po/POTFILES.tmp
652 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
656 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
657 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
658 rm -f intltool-extract.out
660 mv -f intltool-extract.out intltool-extract
662 chmod ugo+x intltool-extract
663 chmod u+w intltool-extract
665 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
666 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
667 rm -f intltool-merge.out
669 mv -f intltool-merge.out intltool-merge
671 chmod ugo+x intltool-merge
672 chmod u+w intltool-merge
674 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
675 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
676 rm -f intltool-update.out
678 mv -f intltool-update.out intltool-update
680 chmod ugo+x intltool-update
681 chmod u+w intltool-update
683 ], INTLTOOL_PERL=${INTLTOOL_PERL})
688 dnl GNOME_PLATFORM_GNOME_2(default, [force])
690 dnl If the first parameter is `yes', then the default is
691 dnl the GNOME 2.x platform, otherwise the GNOME 1.x one.
693 dnl If the optional second parameter is `force', then use
694 dnl the default value without command line argument.
697 AC_DEFUN([GNOME_PLATFORM_GNOME_2],[
698 AC_REQUIRE([GNOME_REQUIRE_PKGCONFIG])
700 if test x$1 = xyes ; then
701 platform_gnome_2_default=yes
703 platform_gnome_2_default=no
705 if test x$2 = xforce ; then
706 platform_gnome_2="$platform_gnome_2_default";
708 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"])
711 AM_CONDITIONAL(PLATFORM_GNOME_2, test $platform_gnome_2 = yes)
713 AC_MSG_CHECKING(for GNOME Platform)
714 if test $platform_gnome_2 = yes; then
715 AC_MSG_RESULT(GNOME 2.x)
716 GNOME_INTERFACE_VERSION=2
717 GNOME_REQUIRE_PKGCONFIG
719 AC_MSG_RESULT(GNOME 1.x)
720 GNOME_INTERFACE_VERSION=1
722 AC_SUBST(GNOME_INTERFACE_VERSION)
726 dnl GNOME_CHECK_PKGCONFIG (script-if-enabled, [failflag])
728 AC_DEFUN([GNOME_CHECK_PKGCONFIG],[
729 AC_PATH_PROG(PKG_CONFIG, pkg-config)
731 if test -x "$PKG_CONFIG" ; then
736 AC_MSG_CHECKING(for pkg-config)
737 pkgconfig_required_version=0.8.0
738 if test x$have_pkgconfig = xyes ; then
739 if ! $PKG_CONFIG --atleast-pkgconfig-version $pkgconfig_required_version; then
740 echo "*** Your version of pkg-config is too old. You need version $pkgconfig_required_version or newer."
741 echo "*** See http://www.freedesktop.org/software/pkgconfig"
745 if test x$have_pkgconfig = xyes ; then
749 AC_MSG_RESULT(not found)
750 if test x$2 = xfail; then
752 *** You need the latest pkg-config (at least $pkgconfig_required_version).
753 *** Get the latest version of pkg-config from
754 *** http://www.freedesktop.org/software/pkgconfig.])
759 AC_PROVIDE([GNOME_REQUIRE_PKGCONFIG])
763 dnl GNOME_REQUIRE_PKGCONFIG
765 AC_DEFUN([GNOME_REQUIRE_PKGCONFIG],[
766 GNOME_CHECK_PKGCONFIG([], fail)
772 # @defmac AC_PROG_CC_STDC
773 # @maindex PROG_CC_STDC
775 # If the C compiler in not in ANSI C mode by default, try to add an option
776 # to output variable @code{CC} to make it so. This macro tries various
777 # options that select ANSI C on some system or another. It considers the
778 # compiler to be in ANSI C mode if it handles function prototypes correctly.
780 # If you use this macro, you should check after calling it whether the C
781 # compiler has been set to accept ANSI C; if not, the shell variable
782 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
783 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
784 # program @code{ansi2knr}, which comes with Ghostscript.
787 AC_DEFUN([AM_PROG_CC_STDC],
788 [AC_REQUIRE([AC_PROG_CC])
789 AC_BEFORE([$0], [AC_C_INLINE])
790 AC_BEFORE([$0], [AC_C_CONST])
791 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
792 dnl a magic option to avoid problems with ANSI preprocessor commands
794 dnl FIXME: can't do this because then AC_AIX won't work due to a
795 dnl circular dependency.
796 dnl AC_BEFORE([$0], [AC_PROG_CPP])
797 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
798 AC_CACHE_VAL(am_cv_prog_cc_stdc,
799 [am_cv_prog_cc_stdc=no
801 # Don't try gcc -ansi; that turns off useful extensions and
802 # breaks some systems' header files.
804 # Ultrix and OSF/1 -std1
805 # HP-UX -Aa -D_HPUX_SOURCE
806 # SVR4 -Xc -D__EXTENSIONS__
807 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
809 CC="$ac_save_CC $ac_arg"
813 #include <sys/types.h>
814 #include <sys/stat.h>
815 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
816 struct buf { int x; };
817 FILE * (*rcsopen) (struct buf *, struct stat *, int);
818 static char *e (p, i)
824 static char *f (char * (*g) (char **, int), char **p, ...)
829 s = g (p, va_arg (v,int));
833 int test (int i, double x);
834 struct s1 {int (*f) (int a);};
835 struct s2 {int (*f) (double a);};
836 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
840 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
842 [am_cv_prog_cc_stdc="$ac_arg"; break])
846 if test -z "$am_cv_prog_cc_stdc"; then
847 AC_MSG_RESULT([none needed])
849 AC_MSG_RESULT($am_cv_prog_cc_stdc)
851 case "x$am_cv_prog_cc_stdc" in
853 *) CC="$CC $am_cv_prog_cc_stdc" ;;
857 dnl GNOME_COMPILE_WARNINGS
858 dnl Turn on many useful compiler warnings
859 dnl For now, only works on GCC
860 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
861 dnl ******************************
862 dnl More compiler warnings
863 dnl ******************************
865 if test -z "$1" ; then
866 default_compile_warnings=no
868 default_compile_warnings="$1"
871 AC_ARG_ENABLE(compile-warnings,
872 [ --enable-compile-warnings=[no/minimum/yes/maximum/error] Turn on compiler warnings.], [enable_compile_warnings="$enableval"],[enable_compile_warnings="$default_compile_warnings"])
875 if test "x$GCC" != xyes; then
876 enable_compile_warnings=no
880 realsave_CFLAGS="$CFLAGS"
882 case "$enable_compile_warnings" in
887 warning_flags="-Wall -Wunused"
890 warning_flags="-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations"
893 warning_flags="-Wall -Wunused -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
894 CFLAGS="$warning_flags $CFLAGS"
895 for option in -Wsign-promo -Wno-sign-compare; do
896 SAVE_CFLAGS="$CFLAGS"
897 CFLAGS="$CFLAGS $option"
898 AC_MSG_CHECKING([whether gcc understands $option])
899 AC_TRY_COMPILE([], [],
902 CFLAGS="$SAVE_CFLAGS"
903 AC_MSG_RESULT($has_option)
904 if test $has_option = yes; then
905 warning_flags="$warning_flags $option"
911 if test "$enable_compile_warnings" = "error" ; then
912 warning_flags="$warning_flags -Werror"
916 AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
919 CFLAGS="$realsave_CFLAGS"
920 AC_MSG_CHECKING(what warning flags to pass to the C compiler)
921 AC_MSG_RESULT($warning_flags)
924 [ --enable-iso-c Try to warn if code is not ISO C ],,
927 AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
929 if test "x$enable_iso_c" != "xno"; then
930 if test "x$GCC" = "xyes"; then
932 *[\ \ ]-ansi[\ \ ]*) ;;
933 *) complCFLAGS="$complCFLAGS -ansi" ;;
936 *[\ \ ]-pedantic[\ \ ]*) ;;
937 *) complCFLAGS="$complCFLAGS -pedantic" ;;
941 AC_MSG_RESULT($complCFLAGS)
943 WARN_CFLAGS="$warning_flags $complCFLAGS"
944 AC_SUBST(WARN_CFLAGS)
947 dnl For C++, do basically the same thing.
949 AC_DEFUN([GNOME_CXX_WARNINGS],[
950 AC_ARG_ENABLE(cxx-warnings,
951 [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum)
953 AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
955 if test "x$GCC" != xyes; then
956 enable_compile_warnings=no
958 if test "x$enable_cxx_warnings" != "xno"; then
959 if test "x$GCC" = "xyes"; then
960 case " $CXXFLAGS " in
961 *[\ \ ]-Wall[\ \ ]*) ;;
962 *) warnCXXFLAGS="-Wall -Wno-unused" ;;
965 ## -W is not all that useful. And it cannot be controlled
966 ## with individual -Wno-xxx flags, unlike -Wall
967 if test "x$enable_cxx_warnings" = "xyes"; then
968 warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wshadow -Woverloaded-virtual"
972 AC_MSG_RESULT($warnCXXFLAGS)
974 AC_ARG_ENABLE(iso-cxx,
975 [ --enable-iso-cxx Try to warn if code is not ISO C++ ],,
978 AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
980 if test "x$enable_iso_cxx" != "xno"; then
981 if test "x$GCC" = "xyes"; then
982 case " $CXXFLAGS " in
983 *[\ \ ]-ansi[\ \ ]*) ;;
984 *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
987 case " $CXXFLAGS " in
988 *[\ \ ]-pedantic[\ \ ]*) ;;
989 *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
993 AC_MSG_RESULT($complCXXFLAGS)
994 if test "x$cxxflags_set" != "xyes"; then
995 CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
997 AC_SUBST(cxxflags_set)
1002 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
1003 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
1004 dnl also defines GSTUFF_PKG_ERRORS on error
1005 AC_DEFUN(PKG_CHECK_MODULES, [
1008 if test -z "$PKG_CONFIG"; then
1009 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1012 if test "$PKG_CONFIG" = "no" ; then
1013 echo "*** The pkg-config script could not be found. Make sure it is"
1014 echo "*** in your path, or set the PKG_CONFIG environment variable"
1015 echo "*** to the full path to pkg-config."
1016 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
1018 PKG_CONFIG_MIN_VERSION=0.9.0
1019 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
1020 AC_MSG_CHECKING(for $2)
1022 if $PKG_CONFIG --exists "$2" ; then
1026 AC_MSG_CHECKING($1_CFLAGS)
1027 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
1028 AC_MSG_RESULT($$1_CFLAGS)
1030 AC_MSG_CHECKING($1_LIBS)
1031 $1_LIBS=`$PKG_CONFIG --libs "$2"`
1032 AC_MSG_RESULT($$1_LIBS)
1036 ## If we have a custom action on failure, don't print errors, but
1037 ## do set a variable so people can do so.
1038 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1039 ifelse([$4], ,echo $$1_PKG_ERRORS,)
1045 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
1046 echo "*** See http://www.freedesktop.org/software/pkgconfig"
1050 if test $succeeded = yes; then
1051 ifelse([$3], , :, [$3])
1053 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])
1059 # Macro to add for using GNU gettext.
1060 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1062 # Modified to never use included libintl.
1063 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
1066 # This file can be copied and used freely without restrictions. It can
1067 # be used in projects which are not available under the GNU Public License
1068 # but which still want to provide support for the GNU gettext functionality.
1069 # Please note that the actual code is *not* freely available.
1072 # If you make changes to this file, you MUST update the copy in
1073 # acinclude.m4. [ aclocal dies on duplicate macros, so if
1074 # we run 'aclocal -I macros/' then we'll run into problems
1075 # once we've installed glib-gettext.m4 :-( ]
1078 AC_DEFUN([AM_GLIB_LC_MESSAGES],
1079 [if test $ac_cv_header_locale_h = yes; then
1080 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1081 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1082 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1083 if test $am_cv_val_LC_MESSAGES = yes; then
1084 AC_DEFINE(HAVE_LC_MESSAGES, 1,
1085 [Define if your <locale.h> file defines LC_MESSAGES.])
1089 dnl AM_GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1090 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1091 AC_DEFUN([AM_GLIB_PATH_PROG_WITH_TEST],
1092 [# Extract the first word of "$2", so it can be a program name with args.
1093 set dummy $2; ac_word=[$]2
1094 AC_MSG_CHECKING([for $ac_word])
1095 AC_CACHE_VAL(ac_cv_path_$1,
1098 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1101 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1102 for ac_dir in ifelse([$5], , $PATH, [$5]); do
1103 test -z "$ac_dir" && ac_dir=.
1104 if test -f $ac_dir/$ac_word; then
1106 ac_cv_path_$1="$ac_dir/$ac_word"
1112 dnl If no 4th arg is given, leave the cache variable unset,
1113 dnl so AC_PATH_PROGS will keep looking.
1114 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1119 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1120 AC_MSG_RESULT([$]$1)
1129 AC_DEFUN(AM_GLIB_WITH_NLS,
1130 dnl NLS is obligatory
1134 dnl Figure out what method
1135 nls_cv_force_use_gnu_gettext="no"
1137 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
1138 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
1139 dnl User does not insist on using GNU NLS library. Figure out what
1140 dnl to use. If gettext or catgets are available (in this order) we
1141 dnl use this. Else we have to fall back to GNU NLS library.
1142 dnl catgets is only used if permitted by option --with-catgets.
1144 nls_cv_header_libgt=
1148 AC_CHECK_HEADER(libintl.h,
1149 [AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1150 [AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
1151 gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
1153 gt_cv_func_dgettext_libintl="no"
1154 libintl_extra_libs=""
1156 if test "$gt_cv_func_dgettext_libc" != "yes" ; then
1157 AC_CHECK_LIB(intl, bindtextdomain,
1158 [AC_CHECK_LIB(intl, dgettext,
1159 gt_cv_func_dgettext_libintl=yes)])
1161 if test "$gt_cv_func_dgettext_libc" != "yes" ; then
1162 AC_MSG_CHECKING([if -liconv is needed to use gettext])
1164 AC_CHECK_LIB(intl, dcgettext,
1165 [gt_cv_func_dgettext_libintl=yes
1166 libintl_extra_libs=-liconv],
1171 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1172 LIBS="$LIBS -lintl $libintl_extra_libs";
1175 if test "$gt_cv_func_dgettext_libc" = "yes" \
1176 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
1177 AC_DEFINE(HAVE_GETTEXT,1,
1178 [Define if the GNU gettext() function is already present or preinstalled.])
1179 AM_GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1180 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1181 if test "$MSGFMT" != "no"; then
1182 AC_CHECK_FUNCS(dcgettext)
1183 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1184 AM_GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1185 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1186 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1187 return _nl_msg_cat_cntr],
1196 # Added by Martin Baulig 12/15/98 for libc5 systems
1197 if test "$gt_cv_func_dgettext_libc" != "yes" \
1198 && test "$gt_cv_func_dgettext_libintl" = "yes"; then
1199 INTLLIBS="-lintl $libintl_extra_libs"
1200 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
1204 if test "$CATOBJEXT" = "NONE"; then
1205 dnl Neither gettext nor catgets in included in the C library.
1206 dnl Fall back on GNU gettext library.
1207 nls_cv_use_gnu_gettext=yes
1211 if test "$nls_cv_use_gnu_gettext" != "yes"; then
1212 AC_DEFINE(ENABLE_NLS, 1,
1213 [always defined to indicate that i18n is enabled])
1215 dnl Unset this variable since we use the non-zero value as a flag.
1219 dnl Test whether we really found GNU xgettext.
1220 if test "$XGETTEXT" != ":"; then
1221 dnl If it is no GNU xgettext we define it as : so that the
1222 dnl Makefiles still can work.
1223 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1227 [found xgettext program is not GNU xgettext; ignore it])
1232 # We need to process the po/ directory.
1236 [case "$CONFIG_FILES" in *po/Makefile.in*)
1237 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1240 dnl These rules are solely for the distribution goal. While doing this
1241 dnl we only have to keep exactly one list of the available catalogs
1242 dnl in configure.in.
1243 for lang in $ALL_LINGUAS; do
1244 GMOFILES="$GMOFILES $lang.gmo"
1245 POFILES="$POFILES $lang.po"
1248 dnl Make all variables we use known to autoconf.
1251 AC_SUBST(DATADIRNAME)
1253 AC_SUBST(INSTOBJEXT)
1261 AC_DEFUN(AM_GLIB_GNU_GETTEXT,
1262 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1263 AC_REQUIRE([AC_PROG_CC])dnl
1264 AC_REQUIRE([AC_PROG_RANLIB])dnl
1265 AC_REQUIRE([AC_HEADER_STDC])dnl
1266 AC_REQUIRE([AC_C_CONST])dnl
1267 AC_REQUIRE([AC_C_INLINE])dnl
1268 AC_REQUIRE([AC_TYPE_OFF_T])dnl
1269 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1270 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1271 AC_REQUIRE([AC_FUNC_MMAP])dnl
1273 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
1274 unistd.h sys/param.h])
1275 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
1276 strdup __argz_count __argz_stringify __argz_next])
1281 if test "x$CATOBJEXT" != "x"; then
1282 if test "x$ALL_LINGUAS" = "x"; then
1285 AC_MSG_CHECKING(for catalogs to be installed)
1287 for lang in ${LINGUAS=$ALL_LINGUAS}; do
1288 case "$ALL_LINGUAS" in
1289 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
1292 LINGUAS=$NEW_LINGUAS
1293 AC_MSG_RESULT($LINGUAS)
1296 dnl Construct list of names of catalog files to be constructed.
1297 if test -n "$LINGUAS"; then
1298 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1302 dnl Determine which catalog format we have (if any is needed)
1303 dnl For now we know about two different formats:
1304 dnl Linux libc-5 and the normal X/Open format
1305 test -d po || mkdir po
1306 if test "$CATOBJEXT" = ".cat"; then
1307 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
1309 dnl Transform the SED scripts while copying because some dumb SEDs
1310 dnl cannot handle comments.
1311 sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
1314 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1315 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1316 dnl Try to locate is.
1318 if test -n "$ac_aux_dir"; then
1319 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1321 if test -z "$MKINSTALLDIRS"; then
1322 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1324 AC_SUBST(MKINSTALLDIRS)
1326 dnl Generate list of files to be processed by xgettext which will
1327 dnl be included in po/Makefile.
1328 test -d po || mkdir po
1329 if test "x$srcdir" != "x."; then
1330 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1331 posrcprefix="$srcdir/"
1333 posrcprefix="../$srcdir/"
1339 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1340 < $srcdir/po/POTFILES.in > po/POTFILES