1 dnl aclocal.m4 generated automatically by aclocal 1.2e
3 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4 dnl This Makefile.in 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 # Like AC_CONFIG_HEADER, but automatically create stamp file.
15 AC_DEFUN(AM_CONFIG_HEADER,
17 AC_CONFIG_HEADER([$1])
18 dnl When config.status generates a header, we must update the stamp-h file.
19 dnl This file resides in the same directory as the config header
20 dnl that is generated. We must strip everything past the first ":",
21 dnl and everything past the last "/".
22 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
23 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
24 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
26 for am_file in <<$1>>; do
27 case " <<$>>CONFIG_HEADERS " in
28 *" <<$>>am_file "*<<)>>
29 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
32 am_indx=`expr "<<$>>am_indx" + 1`
39 AC_DEFUN(AM_PROG_INSTALL,
40 [AC_REQUIRE([AC_PROG_INSTALL])
41 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
42 AC_SUBST(INSTALL_SCRIPT)dnl
45 # This file is derived from `gettext.m4'. The difference is that the
46 # included macros assume Cygnus-style source and build trees.
48 # Macro to add for using GNU gettext.
49 # Ulrich Drepper <drepper@cygnus.com>, 1995.
51 # This file file be copied and used freely without restrictions. It can
52 # be used in projects which are not available under the GNU Public License
53 # but which still want to provide support for the GNU gettext functionality.
54 # Please note that the actual code is *not* freely available.
59 [AC_MSG_CHECKING([whether NLS is requested])
60 dnl Default is enabled NLS
62 [ --disable-nls do not use Native Language Support],
63 USE_NLS=$enableval, USE_NLS=yes)
64 AC_MSG_RESULT($USE_NLS)
67 USE_INCLUDED_LIBINTL=no
69 dnl If we use NLS figure out what method
70 if test "$USE_NLS" = "yes"; then
72 AC_MSG_CHECKING([whether included gettext is requested])
73 AC_ARG_WITH(included-gettext,
74 [ --with-included-gettext use the GNU gettext library included here],
75 nls_cv_force_use_gnu_gettext=$withval,
76 nls_cv_force_use_gnu_gettext=no)
77 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
79 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
80 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
81 dnl User does not insist on using GNU NLS library. Figure out what
82 dnl to use. If gettext or catgets are available (in this order) we
83 dnl use this. Else we have to fall back to GNU NLS library.
84 dnl catgets is only used if permitted by option --with-catgets.
89 AC_CHECK_HEADER(libintl.h,
90 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
91 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
92 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
94 if test "$gt_cv_func_gettext_libc" != "yes"; then
95 AC_CHECK_LIB(intl, bindtextdomain,
96 [AC_CACHE_CHECK([for gettext in libintl],
97 gt_cv_func_gettext_libintl,
98 [AC_TRY_LINK([], [return (int) gettext ("")],
99 gt_cv_func_gettext_libintl=yes,
100 gt_cv_func_gettext_libintl=no)])])
103 if test "$gt_cv_func_gettext_libc" = "yes" \
104 || test "$gt_cv_func_gettext_libintl" = "yes"; then
105 AC_DEFINE(HAVE_GETTEXT)
106 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
107 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
108 if test "$MSGFMT" != "no"; then
109 AC_CHECK_FUNCS(dcgettext)
110 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
111 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
112 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
113 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
114 return _nl_msg_cat_cntr],
124 if test "$CATOBJEXT" = "NONE"; then
125 AC_MSG_CHECKING([whether catgets can be used])
127 [ --with-catgets use catgets functions if available],
128 nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
129 AC_MSG_RESULT($nls_cv_use_catgets)
131 if test "$nls_cv_use_catgets" = "yes"; then
132 dnl No gettext in C library. Try catgets next.
133 AC_CHECK_LIB(i, main)
134 AC_CHECK_FUNC(catgets,
135 [AC_DEFINE(HAVE_CATGETS)
136 INTLOBJS="\$(CATOBJS)"
137 AC_PATH_PROG(GENCAT, gencat, no)dnl
138 if test "$GENCAT" != "no"; then
139 AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
140 if test "$GMSGFMT" = "no"; then
141 AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
142 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
144 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
145 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
146 USE_INCLUDED_LIBINTL=yes
150 INTLDEPS='$(top_builddir)/../intl/libintl.a'
152 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
153 nls_cv_header_intl=intl/libintl.h
154 nls_cv_header_libgt=intl/libgettext.h
159 if test "$CATOBJEXT" = "NONE"; then
160 dnl Neither gettext nor catgets in included in the C library.
161 dnl Fall back on GNU gettext library.
162 nls_cv_use_gnu_gettext=yes
166 if test "$nls_cv_use_gnu_gettext" = "yes"; then
167 dnl Mark actions used to generate GNU NLS library.
168 INTLOBJS="\$(GETTOBJS)"
169 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
170 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
171 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
172 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
173 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
175 USE_INCLUDED_LIBINTL=yes
179 INTLDEPS='$(top_builddir)/../intl/libintl.a'
181 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
182 nls_cv_header_intl=intl/libintl.h
183 nls_cv_header_libgt=intl/libgettext.h
186 dnl Test whether we really found GNU xgettext.
187 if test "$XGETTEXT" != ":"; then
188 dnl If it is no GNU xgettext we define it as : so that the
189 dnl Makefiles still can work.
190 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
194 [found xgettext programs is not GNU xgettext; ignore it])
199 # We need to process the po/ directory.
203 nls_cv_header_intl=intl/libintl.h
204 nls_cv_header_libgt=intl/libgettext.h
207 # If this is used in GNU gettext we have to set USE_NLS to `yes'
208 # because some of the sources are only built for this goal.
209 if test "$PACKAGE" = gettext; then
211 USE_INCLUDED_LIBINTL=yes
214 dnl These rules are solely for the distribution goal. While doing this
215 dnl we only have to keep exactly one list of the available catalogs
217 for lang in $ALL_LINGUAS; do
218 GMOFILES="$GMOFILES $lang.gmo"
219 POFILES="$POFILES $lang.po"
222 dnl Make all variables we use known to autoconf.
223 AC_SUBST(USE_INCLUDED_LIBINTL)
226 AC_SUBST(DATADIRNAME)
236 AC_DEFUN(CY_GNU_GETTEXT,
237 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
238 AC_REQUIRE([AC_PROG_CC])dnl
239 AC_REQUIRE([AC_PROG_RANLIB])dnl
240 AC_REQUIRE([AC_ISC_POSIX])dnl
241 AC_REQUIRE([AC_HEADER_STDC])dnl
242 AC_REQUIRE([AC_C_CONST])dnl
243 AC_REQUIRE([AC_C_INLINE])dnl
244 AC_REQUIRE([AC_TYPE_OFF_T])dnl
245 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
246 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
247 AC_REQUIRE([AC_FUNC_MMAP])dnl
249 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
250 unistd.h values.h sys/param.h])
251 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
252 __argz_count __argz_stringify __argz_next])
254 if test "${ac_cv_func_stpcpy+set}" != "set"; then
255 AC_CHECK_FUNCS(stpcpy)
257 if test "${ac_cv_func_stpcpy}" = "yes"; then
258 AC_DEFINE(HAVE_STPCPY)
264 if test "x$CATOBJEXT" != "x"; then
265 if test "x$ALL_LINGUAS" = "x"; then
268 AC_MSG_CHECKING(for catalogs to be installed)
270 for lang in ${LINGUAS=$ALL_LINGUAS}; do
271 case "$ALL_LINGUAS" in
272 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
276 AC_MSG_RESULT($LINGUAS)
279 dnl Construct list of names of catalog files to be constructed.
280 if test -n "$LINGUAS"; then
281 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
285 dnl The reference to <locale.h> in the installed <libintl.h> file
286 dnl must be resolved because we cannot expect the users of this
287 dnl to define HAVE_LOCALE_H.
288 if test $ac_cv_header_locale_h = yes; then
289 INCLUDE_LOCALE_H="#include <locale.h>"
292 /* The system does not provide the header <locale.h>. Take care yourself. */"
294 AC_SUBST(INCLUDE_LOCALE_H)
296 dnl Determine which catalog format we have (if any is needed)
297 dnl For now we know about two different formats:
298 dnl Linux libc-5 and the normal X/Open format
299 if test -f $srcdir/po2tbl.sed.in; then
300 if test "$CATOBJEXT" = ".cat"; then
301 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
303 dnl Transform the SED scripts while copying because some dumb SEDs
304 dnl cannot handle comments.
305 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
307 dnl po2tbl.sed is always needed.
308 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
309 $srcdir/po2tbl.sed.in > po2tbl.sed
312 dnl In the intl/Makefile.in we have a special dependency which makes
313 dnl only sense for gettext. We comment this out for non-gettext
315 if test "$PACKAGE" = "gettext"; then
325 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
326 AC_SUBST(MKINSTALLDIRS)
328 dnl *** For now the libtool support in intl/Makefile is not for real.
332 dnl Generate list of files to be processed by xgettext which will
333 dnl be included in po/Makefile. But only do this if the po directory
334 dnl exists in srcdir.
335 if test -d $srcdir/po; then
336 test -d po || mkdir po
337 if test "x$srcdir" != "x."; then
338 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
339 posrcprefix="$srcdir/"
341 posrcprefix="../$srcdir/"
347 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
348 < $srcdir/po/POTFILES.in > po/POTFILES
352 # Search path for a program which passes the given test.
353 # Ulrich Drepper <drepper@cygnus.com>, 1996.
355 # This file file be copied and used freely without restrictions. It can
356 # be used in projects which are not available under the GNU Public License
357 # but which still want to provide support for the GNU gettext functionality.
358 # Please note that the actual code is *not* freely available.
362 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
363 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
364 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
365 [# Extract the first word of "$2", so it can be a program name with args.
366 set dummy $2; ac_word=[$]2
367 AC_MSG_CHECKING([for $ac_word])
368 AC_CACHE_VAL(ac_cv_path_$1,
371 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
374 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
375 for ac_dir in ifelse([$5], , $PATH, [$5]); do
376 test -z "$ac_dir" && ac_dir=.
377 if test -f $ac_dir/$ac_word; then
379 ac_cv_path_$1="$ac_dir/$ac_word"
385 dnl If no 4th arg is given, leave the cache variable unset,
386 dnl so AC_PATH_PROGS will keep looking.
387 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
392 if test -n "[$]$1"; then
400 # Check whether LC_MESSAGES is available in <locale.h>.
401 # Ulrich Drepper <drepper@cygnus.com>, 1995.
403 # This file file be copied and used freely without restrictions. It can
404 # be used in projects which are not available under the GNU Public License
405 # but which still want to provide support for the GNU gettext functionality.
406 # Please note that the actual code is *not* freely available.
410 AC_DEFUN(AM_LC_MESSAGES,
411 [if test $ac_cv_header_locale_h = yes; then
412 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
413 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
414 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
415 if test $am_cv_val_LC_MESSAGES = yes; then
416 AC_DEFINE(HAVE_LC_MESSAGES)