1 # gettext.m4 serial 15 (gettext-0.11.3)
2 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
3 dnl This file is free software, distributed under the terms of the GNU
4 dnl General Public License. As a special exception to the GNU General
5 dnl Public License, this file may be distributed as part of a program
6 dnl that contains a configuration script generated by Autoconf, under
7 dnl the same distribution terms as the rest of that program.
9 dnl This file can can be used in projects which are not available under
10 dnl the GNU General Public License or the GNU Library General Public
11 dnl License but which still want to provide support for the GNU gettext
13 dnl Please note that the actual code of the GNU gettext library is covered
14 dnl by the GNU Library General Public License, and the rest of the GNU
15 dnl gettext package package is covered by the GNU General Public License.
16 dnl They are *not* in the public domain.
19 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
20 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
22 dnl Macro to add for using GNU gettext.
24 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
25 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
26 dnl default (if it is not specified or empty) is 'no-libtool'.
27 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
28 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
29 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
30 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
31 dnl depending on --{enable,disable}-{shared,static} and on the presence of
32 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
33 dnl $(top_builddir)/intl/libintl.a will be created.
34 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
35 dnl implementations (in libc or libintl) without the ngettext() function
37 dnl INTLDIR is used to find the intl libraries. If empty,
38 dnl the value `$(top_builddir)/intl/' is used.
40 dnl The result of the configuration is one of three cases:
41 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
43 dnl Catalog format: GNU --> install in $(datadir)
44 dnl Catalog extension: .mo after installation, .gmo in source tree
45 dnl 2) GNU gettext has been found in the system's C library.
46 dnl Catalog format: GNU --> install in $(datadir)
47 dnl Catalog extension: .mo after installation, .gmo in source tree
48 dnl 3) No internationalization, always use English msgid.
49 dnl Catalog format: none
50 dnl Catalog extension: none
51 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
52 dnl The use of .gmo is historical (it was needed to avoid overwriting the
53 dnl GNU format catalogs when building on a platform with an X/Open gettext),
54 dnl but we keep it in order not to force irrelevant filename changes on the
57 AC_DEFUN([AM_GNU_GETTEXT],
59 dnl Argument checking.
60 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
61 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
63 ifelse([$2], [], , [ifelse([$2], [need-ngettext], ,
64 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
66 define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
67 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
69 AC_REQUIRE([AM_PO_SUBDIRS])dnl
70 ifelse(gt_included_intl, yes, [
71 AC_REQUIRE([AM_INTL_SUBDIR])dnl
74 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
75 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
76 AC_REQUIRE([AC_LIB_RPATH])
78 dnl Sometimes libintl requires libiconv, so first search for libiconv.
79 dnl Ideally we would do this search only after the
80 dnl if test "$USE_NLS" = "yes"; then
81 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
82 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
83 dnl the configure script would need to contain the same shell code
84 dnl again, outside any 'if'. There are two solutions:
85 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
86 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
87 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
88 dnl documented, we avoid it.
89 ifelse(gt_included_intl, yes, , [
90 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
93 AC_MSG_CHECKING([whether NLS is requested])
94 dnl Default is enabled NLS
96 [ --disable-nls do not use Native Language Support],
97 USE_NLS=$enableval, USE_NLS=yes)
98 AC_MSG_RESULT($USE_NLS)
101 ifelse(gt_included_intl, yes, [
102 BUILD_INCLUDED_LIBINTL=no
103 USE_INCLUDED_LIBINTL=no
109 dnl If we use NLS figure out what method
110 if test "$USE_NLS" = "yes"; then
111 gt_use_preinstalled_gnugettext=no
112 ifelse(gt_included_intl, yes, [
113 AC_MSG_CHECKING([whether included gettext is requested])
114 AC_ARG_WITH(included-gettext,
115 [ --with-included-gettext use the GNU gettext library included here],
116 nls_cv_force_use_gnu_gettext=$withval,
117 nls_cv_force_use_gnu_gettext=no)
118 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
120 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
121 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
123 dnl User does not insist on using GNU NLS library. Figure out what
124 dnl to use. If GNU gettext is available we use this. Else we have
125 dnl to fall back to GNU NLS library.
127 dnl Add a version number to the cache macros.
128 define([gt_api_version], ifelse([$2], [need-ngettext], 2, 1))
129 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
130 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
132 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
133 [AC_TRY_LINK([#include <libintl.h>
134 extern int _nl_msg_cat_cntr;
135 extern int *_nl_domain_bindings;],
136 [bindtextdomain ("", "");
137 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
138 gt_cv_func_gnugettext_libc=yes,
139 gt_cv_func_gnugettext_libc=no)])
141 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
142 dnl Sometimes libintl requires libiconv, so first search for libiconv.
143 ifelse(gt_included_intl, yes, , [
146 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
147 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
148 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
149 dnl even if libiconv doesn't exist.
150 AC_LIB_LINKFLAGS_BODY([intl])
151 AC_CACHE_CHECK([for GNU gettext in libintl],
152 gt_cv_func_gnugettext_libintl,
153 [gt_save_CPPFLAGS="$CPPFLAGS"
154 CPPFLAGS="$CPPFLAGS $INCINTL"
156 LIBS="$LIBS $LIBINTL"
157 dnl Now see whether libintl exists and does not depend on libiconv.
158 AC_TRY_LINK([#include <libintl.h>
159 extern int _nl_msg_cat_cntr;
164 const char *_nl_expand_alias ();],
165 [bindtextdomain ("", "");
166 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
167 gt_cv_func_gnugettext_libintl=yes,
168 gt_cv_func_gnugettext_libintl=no)
169 dnl Now see whether libintl exists and depends on libiconv.
170 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
171 LIBS="$LIBS $LIBICONV"
172 AC_TRY_LINK([#include <libintl.h>
173 extern int _nl_msg_cat_cntr;
178 const char *_nl_expand_alias ();],
179 [bindtextdomain ("", "");
180 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
181 [LIBINTL="$LIBINTL $LIBICONV"
182 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
183 gt_cv_func_gnugettext_libintl=yes
186 CPPFLAGS="$gt_save_CPPFLAGS"
187 LIBS="$gt_save_LIBS"])
190 dnl If an already present or preinstalled GNU gettext() is found,
191 dnl use it. But if this macro is used in GNU gettext, and GNU
192 dnl gettext is already preinstalled in libintl, we update this
193 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
194 if test "$gt_cv_func_gnugettext_libc" = "yes" \
195 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
196 && test "$PACKAGE" != gettext; }; then
197 gt_use_preinstalled_gnugettext=yes
199 dnl Reset the values set by searching for libintl.
205 ifelse(gt_included_intl, yes, [
206 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
207 dnl GNU gettext is not found in the C library.
208 dnl Fall back on included GNU gettext library.
209 nls_cv_use_gnu_gettext=yes
213 if test "$nls_cv_use_gnu_gettext" = "yes"; then
214 dnl Mark actions used to generate GNU NLS library.
215 INTLOBJS="\$(GETTOBJS)"
216 BUILD_INCLUDED_LIBINTL=yes
217 USE_INCLUDED_LIBINTL=yes
218 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
219 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
220 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
223 if test "$gt_use_preinstalled_gnugettext" = "yes" \
224 || test "$nls_cv_use_gnu_gettext" = "yes"; then
225 dnl Mark actions to use GNU gettext tools.
230 if test "$gt_use_preinstalled_gnugettext" = "yes" \
231 || test "$nls_cv_use_gnu_gettext" = "yes"; then
232 AC_DEFINE(ENABLE_NLS, 1,
233 [Define to 1 if translation of program messages to the user's native language
240 if test "$USE_NLS" = "yes"; then
242 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
243 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
244 AC_MSG_CHECKING([how to link with libintl])
245 AC_MSG_RESULT([$LIBINTL])
246 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
249 dnl For backward compatibility. Some packages may be using this.
250 AC_DEFINE(HAVE_GETTEXT, 1,
251 [Define if the GNU gettext() function is already present or preinstalled.])
252 AC_DEFINE(HAVE_DCGETTEXT, 1,
253 [Define if the GNU dcgettext() function is already present or preinstalled.])
256 dnl We need to process the po/ directory.
260 ifelse(gt_included_intl, yes, [
261 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
262 dnl to 'yes' because some of the testsuite requires it.
263 if test "$PACKAGE" = gettext; then
264 BUILD_INCLUDED_LIBINTL=yes
267 dnl Make all variables we use known to autoconf.
268 AC_SUBST(BUILD_INCLUDED_LIBINTL)
269 AC_SUBST(USE_INCLUDED_LIBINTL)
273 dnl For backward compatibility. Some configure.ins may be using this.
277 dnl For backward compatibility. Some Makefiles may be using this.
279 AC_SUBST(DATADIRNAME)
281 dnl For backward compatibility. Some Makefiles may be using this.
285 dnl For backward compatibility. Some Makefiles may be using this.
289 dnl Enable libtool support if the surrounding package wishes it.
290 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
291 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
294 dnl For backward compatibility. Some Makefiles may be using this.
298 dnl Make all documented variables known to autoconf.
305 dnl Checks for all prerequisites of the po subdirectory,
306 dnl except for USE_NLS.
307 AC_DEFUN([AM_PO_SUBDIRS],
309 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
310 AC_REQUIRE([AC_PROG_INSTALL])dnl
311 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
313 dnl Perform the following tests also if --disable-nls has been given,
314 dnl because they are needed for "make dist" to work.
316 dnl Search for GNU msgfmt in the PATH.
317 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
318 dnl The second test excludes FreeBSD msgfmt.
319 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
320 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
321 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
323 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
325 dnl Search for GNU xgettext 0.11 or newer in the PATH.
326 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
327 dnl The second test excludes FreeBSD xgettext.
328 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
329 [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
330 (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
332 dnl Remove leftover from FreeBSD xgettext call.
335 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
336 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
337 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
339 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
340 dnl Test whether we really found GNU msgfmt.
341 if test "$GMSGFMT" != ":"; then
342 dnl If it is no GNU msgfmt we define it as : so that the
343 dnl Makefiles still can work.
344 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
345 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
348 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
350 [found $GMSGFMT program is not GNU msgfmt; ignore it])
355 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
356 dnl Test whether we really found GNU xgettext.
357 if test "$XGETTEXT" != ":"; then
358 dnl If it is no GNU xgettext we define it as : so that the
359 dnl Makefiles still can work.
360 if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
361 (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
365 [found xgettext program is not GNU xgettext; ignore it])
368 dnl Remove leftover from FreeBSD xgettext call.
373 for ac_file in $CONFIG_FILES; do
374 # Support "outfile[:infile[:infile...]]"
376 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
378 # PO directories have a Makefile.in generated from Makefile.in.in.
379 case "$ac_file" in */Makefile.in)
380 # Adjust a relative srcdir.
381 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
382 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
383 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
384 # In autoconf-2.13 it is called $ac_given_srcdir.
385 # In autoconf-2.50 it is called $srcdir.
386 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
387 case "$ac_given_srcdir" in
388 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
389 /*) top_srcdir="$ac_given_srcdir" ;;
390 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
392 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
393 rm -f "$ac_dir/POTFILES"
394 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
395 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
396 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
397 # on $ac_dir but don't depend on user-specified configuration
399 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
400 # The LINGUAS file contains the set of available languages.
401 if test -n "$ALL_LINGUAS"; then
402 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
404 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
405 # Hide the ALL_LINGUAS assigment from automake.
406 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
408 case "$ac_given_srcdir" in
410 *) srcdirpre='$(srcdir)/' ;;
416 for lang in $ALL_LINGUAS; do
417 POFILES="$POFILES $srcdirpre$lang.po"
418 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
419 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
420 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
422 # CATALOGS depends on both $ac_dir and the user's LINGUAS
423 # environment variable.
425 if test -n "$ALL_LINGUAS"; then
426 for presentlang in $ALL_LINGUAS; do
428 if test "%UNSET%" != "$LINGUAS"; then
429 desiredlanguages="$LINGUAS"
431 desiredlanguages="$ALL_LINGUAS"
433 for desiredlang in $desiredlanguages; do
434 # Use the presentlang catalog if desiredlang is
435 # a. equal to presentlang, or
436 # b. a variant of presentlang (because in this case,
437 # presentlang can be used as a fallback for messages
438 # which are not translated in the desiredlang catalog).
439 case "$desiredlang" in
440 "$presentlang"*) useit=yes;;
443 if test $useit = yes; then
444 INST_LINGUAS="$INST_LINGUAS $presentlang"
449 if test -n "$INST_LINGUAS"; then
450 for lang in $INST_LINGUAS; do
451 CATALOGS="$CATALOGS $lang.gmo"
454 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
455 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
456 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
457 if test -f "$f"; then
459 *.orig | *.bak | *~) ;;
460 *) cat "$f" >> "$ac_dir/Makefile" ;;
468 [# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
469 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
471 eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
472 # Capture the value of LINGUAS because we need it to compute CATALOGS.
473 LINGUAS="${LINGUAS-%UNSET%}"
478 dnl Checks for all prerequisites of the intl subdirectory,
479 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
480 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
481 AC_DEFUN([AM_INTL_SUBDIR],
483 AC_REQUIRE([AC_PROG_INSTALL])dnl
484 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
485 AC_REQUIRE([AC_PROG_CC])dnl
486 AC_REQUIRE([AC_CANONICAL_HOST])dnl
487 AC_REQUIRE([AC_PROG_RANLIB])dnl
488 AC_REQUIRE([AC_ISC_POSIX])dnl
489 AC_REQUIRE([AC_HEADER_STDC])dnl
490 AC_REQUIRE([AC_C_CONST])dnl
491 AC_REQUIRE([AC_C_INLINE])dnl
492 AC_REQUIRE([AC_TYPE_OFF_T])dnl
493 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
494 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
495 AC_REQUIRE([AC_FUNC_MMAP])dnl
496 AC_REQUIRE([jm_GLIBC21])dnl
497 AC_REQUIRE([gt_INTDIV0])dnl
499 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
500 stdlib.h string.h unistd.h sys/param.h])
501 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
502 geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
503 strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
507 if test $ac_cv_header_locale_h = yes; then
511 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
512 dnl because plural.y uses bison specific features. It requires at least
513 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
515 dnl bison is only needed for the maintainer (who touches plural.y). But in
516 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
517 dnl the rule in general Makefile. Now, some people carelessly touch the
518 dnl files or have a broken "make" program, hence the plural.c rule will
519 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
520 dnl present or too old.
521 AC_CHECK_PROGS([INTLBISON], [bison])
522 if test -z "$INTLBISON"; then
525 dnl Found it, now check the version.
526 AC_MSG_CHECKING([version of bison])
527 changequote(<<,>>)dnl
528 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
529 case $ac_prog_version in
530 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
531 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
533 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
534 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
536 AC_MSG_RESULT([$ac_prog_version])
538 if test $ac_verc_fail = yes; then
544 AC_DEFUN([AM_MKINSTALLDIRS],
546 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
547 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
548 dnl Try to locate is.
550 if test -n "$ac_aux_dir"; then
551 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
553 if test -z "$MKINSTALLDIRS"; then
554 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
556 AC_SUBST(MKINSTALLDIRS)