1 dnl aclocal.m4 generated automatically by aclocal 1.3
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 dnl In the standard gettext, we would now check for catgets.
125 dnl However, we never want to use catgets for our releases.
127 if test "$CATOBJEXT" = "NONE"; then
128 dnl Neither gettext nor catgets in included in the C library.
129 dnl Fall back on GNU gettext library.
130 nls_cv_use_gnu_gettext=yes
134 if test "$nls_cv_use_gnu_gettext" = "yes"; then
135 dnl Mark actions used to generate GNU NLS library.
136 INTLOBJS="\$(GETTOBJS)"
137 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
138 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
139 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
140 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
141 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
143 USE_INCLUDED_LIBINTL=yes
147 INTLDEPS='$(top_builddir)/../intl/libintl.a'
149 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
150 nls_cv_header_intl=libintl.h
151 nls_cv_header_libgt=libgettext.h
154 dnl Test whether we really found GNU xgettext.
155 if test "$XGETTEXT" != ":"; then
156 dnl If it is no GNU xgettext we define it as : so that the
157 dnl Makefiles still can work.
158 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
162 [found xgettext programs is not GNU xgettext; ignore it])
167 # We need to process the po/ directory.
171 nls_cv_header_intl=libintl.h
172 nls_cv_header_libgt=libgettext.h
175 # If this is used in GNU gettext we have to set USE_NLS to `yes'
176 # because some of the sources are only built for this goal.
177 if test "$PACKAGE" = gettext; then
179 USE_INCLUDED_LIBINTL=yes
182 dnl These rules are solely for the distribution goal. While doing this
183 dnl we only have to keep exactly one list of the available catalogs
185 for lang in $ALL_LINGUAS; do
186 GMOFILES="$GMOFILES $lang.gmo"
187 POFILES="$POFILES $lang.po"
190 dnl Make all variables we use known to autoconf.
191 AC_SUBST(USE_INCLUDED_LIBINTL)
194 AC_SUBST(DATADIRNAME)
204 AC_DEFUN(CY_GNU_GETTEXT,
205 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
206 AC_REQUIRE([AC_PROG_CC])dnl
207 AC_REQUIRE([AC_PROG_RANLIB])dnl
208 AC_REQUIRE([AC_ISC_POSIX])dnl
209 AC_REQUIRE([AC_HEADER_STDC])dnl
210 AC_REQUIRE([AC_C_CONST])dnl
211 AC_REQUIRE([AC_C_INLINE])dnl
212 AC_REQUIRE([AC_TYPE_OFF_T])dnl
213 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
214 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
215 AC_REQUIRE([AC_FUNC_MMAP])dnl
217 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
218 unistd.h values.h sys/param.h])
219 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
220 __argz_count __argz_stringify __argz_next])
222 if test "${ac_cv_func_stpcpy+set}" != "set"; then
223 AC_CHECK_FUNCS(stpcpy)
225 if test "${ac_cv_func_stpcpy}" = "yes"; then
226 AC_DEFINE(HAVE_STPCPY)
232 if test "x$CATOBJEXT" != "x"; then
233 if test "x$ALL_LINGUAS" = "x"; then
236 AC_MSG_CHECKING(for catalogs to be installed)
238 for lang in ${LINGUAS=$ALL_LINGUAS}; do
239 case "$ALL_LINGUAS" in
240 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
244 AC_MSG_RESULT($LINGUAS)
247 dnl Construct list of names of catalog files to be constructed.
248 if test -n "$LINGUAS"; then
249 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
253 dnl The reference to <locale.h> in the installed <libintl.h> file
254 dnl must be resolved because we cannot expect the users of this
255 dnl to define HAVE_LOCALE_H.
256 if test $ac_cv_header_locale_h = yes; then
257 INCLUDE_LOCALE_H="#include <locale.h>"
260 /* The system does not provide the header <locale.h>. Take care yourself. */"
262 AC_SUBST(INCLUDE_LOCALE_H)
264 dnl Determine which catalog format we have (if any is needed)
265 dnl For now we know about two different formats:
266 dnl Linux libc-5 and the normal X/Open format
267 if test -f $srcdir/po2tbl.sed.in; then
268 if test "$CATOBJEXT" = ".cat"; then
269 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
271 dnl Transform the SED scripts while copying because some dumb SEDs
272 dnl cannot handle comments.
273 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
275 dnl po2tbl.sed is always needed.
276 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
277 $srcdir/po2tbl.sed.in > po2tbl.sed
280 dnl In the intl/Makefile.in we have a special dependency which makes
281 dnl only sense for gettext. We comment this out for non-gettext
283 if test "$PACKAGE" = "gettext"; then
293 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
294 AC_SUBST(MKINSTALLDIRS)
296 dnl *** For now the libtool support in intl/Makefile is not for real.
300 dnl Generate list of files to be processed by xgettext which will
301 dnl be included in po/Makefile. But only do this if the po directory
302 dnl exists in srcdir.
303 if test -d $srcdir/po; then
304 test -d po || mkdir po
305 if test "x$srcdir" != "x."; then
306 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
307 posrcprefix="$srcdir/"
309 posrcprefix="../$srcdir/"
315 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
316 < $srcdir/po/POTFILES.in > po/POTFILES
320 # Search path for a program which passes the given test.
321 # Ulrich Drepper <drepper@cygnus.com>, 1996.
323 # This file file be copied and used freely without restrictions. It can
324 # be used in projects which are not available under the GNU Public License
325 # but which still want to provide support for the GNU gettext functionality.
326 # Please note that the actual code is *not* freely available.
330 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
331 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
332 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
333 [# Extract the first word of "$2", so it can be a program name with args.
334 set dummy $2; ac_word=[$]2
335 AC_MSG_CHECKING([for $ac_word])
336 AC_CACHE_VAL(ac_cv_path_$1,
339 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
342 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
343 for ac_dir in ifelse([$5], , $PATH, [$5]); do
344 test -z "$ac_dir" && ac_dir=.
345 if test -f $ac_dir/$ac_word; then
347 ac_cv_path_$1="$ac_dir/$ac_word"
353 dnl If no 4th arg is given, leave the cache variable unset,
354 dnl so AC_PATH_PROGS will keep looking.
355 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
360 if test -n "[$]$1"; then
368 # Check whether LC_MESSAGES is available in <locale.h>.
369 # Ulrich Drepper <drepper@cygnus.com>, 1995.
371 # This file file 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.
378 AC_DEFUN(AM_LC_MESSAGES,
379 [if test $ac_cv_header_locale_h = yes; then
380 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
381 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
382 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
383 if test $am_cv_val_LC_MESSAGES = yes; then
384 AC_DEFINE(HAVE_LC_MESSAGES)