1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright (C) 1994, 1995-8, 1999 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 # Like AC_CONFIG_HEADER, but automatically create stamp file.
107 AC_DEFUN(AM_CONFIG_HEADER,
109 AC_CONFIG_HEADER([$1])
110 dnl When config.status generates a header, we must update the stamp-h file.
111 dnl This file resides in the same directory as the config header
112 dnl that is generated. We must strip everything past the first ":",
113 dnl and everything past the last "/".
114 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
115 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
116 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
118 for am_file in <<$1>>; do
119 case " <<$>>CONFIG_HEADERS " in
120 *" <<$>>am_file "*<<)>>
121 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
124 am_indx=`expr "<<$>>am_indx" + 1`
131 # Single argument says where are built sources to test, relative to the
132 # built test directory. Maybe omitted if the same (flat distribution).
134 AC_DEFUN([AT_CONFIG],
135 [AT_TESTPATH=ifelse([$1], [], [.], [$1])
136 AC_SUBST([AT_TESTPATH])
137 # Try to be compatible with both Autoconf 2.13 and 2.50.
138 if test -z "$ECHO_C$ECHO_N$ECHO_T"; then
151 # @defmac AC_PROG_CC_STDC
152 # @maindex PROG_CC_STDC
154 # If the C compiler in not in ANSI C mode by default, try to add an option
155 # to output variable @code{CC} to make it so. This macro tries various
156 # options that select ANSI C on some system or another. It considers the
157 # compiler to be in ANSI C mode if it handles function prototypes correctly.
159 # If you use this macro, you should check after calling it whether the C
160 # compiler has been set to accept ANSI C; if not, the shell variable
161 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
162 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
163 # program @code{ansi2knr}, which comes with Ghostscript.
166 AC_DEFUN(AM_PROG_CC_STDC,
167 [AC_REQUIRE([AC_PROG_CC])
168 AC_BEFORE([$0], [AC_C_INLINE])
169 AC_BEFORE([$0], [AC_C_CONST])
170 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
171 dnl a magic option to avoid problems with ANSI preprocessor commands
173 dnl FIXME: can't do this because then AC_AIX won't work due to a
174 dnl circular dependency.
175 dnl AC_BEFORE([$0], [AC_PROG_CPP])
176 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
177 AC_CACHE_VAL(am_cv_prog_cc_stdc,
178 [am_cv_prog_cc_stdc=no
180 # Don't try gcc -ansi; that turns off useful extensions and
181 # breaks some systems' header files.
183 # Ultrix and OSF/1 -std1
184 # HP-UX -Aa -D_HPUX_SOURCE
185 # SVR4 -Xc -D__EXTENSIONS__
186 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
188 CC="$ac_save_CC $ac_arg"
192 #include <sys/types.h>
193 #include <sys/stat.h>
194 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
195 struct buf { int x; };
196 FILE * (*rcsopen) (struct buf *, struct stat *, int);
197 static char *e (p, i)
203 static char *f (char * (*g) (char **, int), char **p, ...)
208 s = g (p, va_arg (v,int));
212 int test (int i, double x);
213 struct s1 {int (*f) (int a);};
214 struct s2 {int (*f) (double a);};
215 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
219 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
221 [am_cv_prog_cc_stdc="$ac_arg"; break])
225 if test -z "$am_cv_prog_cc_stdc"; then
226 AC_MSG_RESULT([none needed])
228 AC_MSG_RESULT($am_cv_prog_cc_stdc)
230 case "x$am_cv_prog_cc_stdc" in
232 *) CC="$CC $am_cv_prog_cc_stdc" ;;
238 # BISON_AC_PROG_GNU_M4
239 # --------------------
240 # Check for GNU m4, at least 1.3 (supports frozen files).
241 AC_DEFUN([BISON_AC_PROG_GNU_M4],
242 [AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
243 AC_CACHE_CHECK(whether m4 supports frozen files, ac_cv_prog_gnu_m4,
244 [ac_cv_prog_gnu_m4=no
245 if test x"$M4" != x; then
246 case `$M4 --help < /dev/null 2>&1` in
247 *reload-state*) ac_cv_prog_gnu_m4=yes ;;
251 AC_DEFUN(BISON_WARNING,
252 [AC_MSG_CHECKING(whether compiler accepts $1)
253 AC_SUBST(WARNING_CFLAGS)
254 ac_save_CFLAGS="$CFLAGS"
258 WARNING_CFLAGS="$WARNING_CFLAGS $1"
261 CFLAGS="$ac_save_CFLAGS"])
266 AC_DEFUN(AM_C_PROTOTYPES,
267 [AC_REQUIRE([AM_PROG_CC_STDC])
268 AC_REQUIRE([AC_PROG_CPP])
269 AC_MSG_CHECKING([for function prototypes])
270 if test "$am_cv_prog_cc_stdc" != no; then
272 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
276 U=_ ANSI2KNR=./ansi2knr
277 # Ensure some checks needed by ansi2knr itself.
279 AC_CHECK_HEADERS(string.h)
282 AC_SUBST(ANSI2KNR)dnl
287 dnl From Jim Meyering.
288 dnl Determine whether malloc accepts 0 as its argument.
289 dnl If it doesn't, arrange to use the replacement function.
292 AC_DEFUN(jm_FUNC_MALLOC,
294 dnl xmalloc.c requires that this symbol be defined so it doesn't
295 dnl mistakenly use a broken malloc -- as it might if this test were omitted.
296 AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
297 [Define if the malloc check has been performed. ])
299 AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
305 exit (malloc (0) ? 0 : 1);
308 jm_cv_func_working_malloc=yes,
309 jm_cv_func_working_malloc=no,
310 dnl When crosscompiling, assume malloc is broken.
311 jm_cv_func_working_malloc=no)
313 if test $jm_cv_func_working_malloc = no; then
315 LIBOBJS="$LIBOBJS malloc.$ac_objext"
316 AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
317 [Define to rpl_malloc if the replacement function should be used.])
323 dnl From Jim Meyering.
324 dnl Determine whether realloc works when both arguments are 0.
325 dnl If it doesn't, arrange to use the replacement function.
328 AC_DEFUN(jm_FUNC_REALLOC,
330 dnl xmalloc.c requires that this symbol be defined so it doesn't
331 dnl mistakenly use a broken realloc -- as it might if this test were omitted.
332 AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
333 [Define if the realloc check has been performed. ])
335 AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
341 exit (realloc (0, 0) ? 0 : 1);
344 jm_cv_func_working_realloc=yes,
345 jm_cv_func_working_realloc=no,
346 dnl When crosscompiling, assume realloc is broken.
347 jm_cv_func_working_realloc=no)
349 if test $jm_cv_func_working_realloc = no; then
351 LIBOBJS="$LIBOBJS realloc.$ac_objext"
352 AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
353 [Define to rpl_realloc if the replacement function should be used.])
359 dnl These are the prerequisite macros for files in the lib/
360 dnl directories of Bison.
362 AC_DEFUN([jm_PREREQ_QUOTEARG],
364 AC_CHECK_FUNCS(isascii iswprint mbrtowc)
365 AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
374 dnl From Paul Eggert.
376 AC_DEFUN(AC_C_BACKSLASH_A,
378 AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
384 char buf['\a' == 'a' ? -1 : 1];
386 return buf[0] != "\a"[0];
388 ac_cv_c_backslash_a=yes,
389 ac_cv_c_backslash_a=no)])
390 if test $ac_cv_c_backslash_a = yes; then
391 AC_DEFINE(HAVE_C_BACKSLASH_A, 1,
392 [Define if backslash-a works in C strings.])
400 # BeOS 5 has <wchar.h> but does not define mbstate_t,
401 # so you can't declare an object of that type.
402 # Check for this incompatibility with Standard C.
404 # Include stdlib.h first, because otherwise this test would fail on Linux
405 # (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
406 # a syntax error in wchar.h due to the use of undefined __int32_t.
408 AC_DEFUN(AC_MBSTATE_T,
410 AC_CHECK_HEADERS(stdlib.h)
412 AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
418 [mbstate_t x; return sizeof x;],
419 ac_cv_type_mbstate_t=yes,
420 ac_cv_type_mbstate_t=no)])
421 if test $ac_cv_type_mbstate_t = no; then
422 AC_DEFINE(mbstate_t, int,
423 [Define to a type if <wchar.h> does not define.])
426 # Macro to add for using GNU gettext.
427 # Ulrich Drepper <drepper@cygnus.com>, 1995.
429 # This file can be copied and used freely without restrictions. It can
430 # be used in projects which are not available under the GNU Public License
431 # but which still want to provide support for the GNU gettext functionality.
432 # Please note that the actual code is *not* freely available.
436 AC_PREREQ(2.13) dnl Minimum Autoconf version required.
438 AC_DEFUN(AM_WITH_NLS,
439 [AC_MSG_CHECKING([whether NLS is requested])
440 dnl Default is enabled NLS
442 [ --disable-nls do not use Native Language Support],
443 USE_NLS=$enableval, USE_NLS=yes)
444 AC_MSG_RESULT($USE_NLS)
447 USE_INCLUDED_LIBINTL=no
449 dnl If we use NLS figure out what method
450 if test "$USE_NLS" = "yes"; then
451 AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested.])
452 AC_MSG_CHECKING([whether included gettext is requested])
453 AC_ARG_WITH(included-gettext,
454 [ --with-included-gettext use the GNU gettext library included here],
455 nls_cv_force_use_gnu_gettext=$withval,
456 nls_cv_force_use_gnu_gettext=no)
457 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
459 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
460 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
461 dnl User does not insist on using GNU NLS library. Figure out what
462 dnl to use. If gettext or catgets are available (in this order) we
463 dnl use this. Else we have to fall back to GNU NLS library.
464 dnl catgets is only used if permitted by option --with-catgets.
469 AC_CHECK_HEADER(libintl.h,
470 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
471 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
472 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
474 if test "$gt_cv_func_gettext_libc" != "yes"; then
475 AC_CHECK_LIB(intl, bindtextdomain,
476 [AC_CHECK_LIB(intl, gettext)])
479 if test "$gt_cv_func_gettext_libc" = "yes" \
480 || test "$ac_cv_lib_intl_gettext" = "yes"; then
481 AC_DEFINE(HAVE_GETTEXT, 1,
482 [Define to 1 if you have gettext and don't want to use GNU gettext.])
483 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
484 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
485 if test "$MSGFMT" != "no"; then
486 AC_CHECK_FUNCS(dcgettext)
487 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
488 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
489 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
490 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
491 return _nl_msg_cat_cntr],
501 if test "$CATOBJEXT" = "NONE"; then
502 AC_MSG_CHECKING([whether catgets can be used])
504 [ --with-catgets use catgets functions if available],
505 nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
506 AC_MSG_RESULT($nls_cv_use_catgets)
508 if test "$nls_cv_use_catgets" = "yes"; then
509 dnl No gettext in C library. Try catgets next.
510 AC_CHECK_LIB(i, main)
511 AC_CHECK_FUNC(catgets,
512 [AC_DEFINE(HAVE_CATGETS, 1,
513 [Define as 1 if you have \`catgets' and don't want to use GNU gettext.])
514 INTLOBJS="\$(CATOBJS)"
515 AC_PATH_PROG(GENCAT, gencat, no)dnl
516 if test "$GENCAT" != "no"; then
517 AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
518 if test "$GMSGFMT" = "no"; then
519 AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
520 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
522 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
523 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
524 USE_INCLUDED_LIBINTL=yes
528 INTLDEPS='$(top_builddir)/intl/libintl.a'
530 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
531 nls_cv_header_intl=intl/libintl.h
532 nls_cv_header_libgt=intl/libgettext.h
537 if test "$CATOBJEXT" = "NONE"; then
538 dnl Neither gettext nor catgets in included in the C library.
539 dnl Fall back on GNU gettext library.
540 nls_cv_use_gnu_gettext=yes
544 if test "$nls_cv_use_gnu_gettext" = "yes"; then
545 dnl Mark actions used to generate GNU NLS library.
546 INTLOBJS="\$(GETTOBJS)"
547 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
548 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
549 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
550 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
551 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
553 USE_INCLUDED_LIBINTL=yes
557 INTLDEPS='$(top_builddir)/intl/libintl.a'
559 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
560 nls_cv_header_intl=intl/libintl.h
561 nls_cv_header_libgt=intl/libgettext.h
564 dnl Test whether we really found GNU xgettext.
565 if test "$XGETTEXT" != ":"; then
566 dnl If it is no GNU xgettext we define it as : so that the
567 dnl Makefiles still can work.
568 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
572 [found xgettext program is not GNU xgettext; ignore it])
577 # We need to process the po/ directory.
581 nls_cv_header_intl=intl/libintl.h
582 nls_cv_header_libgt=intl/libgettext.h
584 if test -z "$nls_cv_header_intl"; then
585 # Clean out junk possibly left behind by a previous configuration.
588 AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
590 [case "$CONFIG_FILES" in *po/Makefile.in*)
591 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
595 # If this is used in GNU gettext we have to set USE_NLS to `yes'
596 # because some of the sources are only built for this goal.
597 if test "$PACKAGE" = gettext; then
599 USE_INCLUDED_LIBINTL=yes
602 dnl These rules are solely for the distribution goal. While doing this
603 dnl we only have to keep exactly one list of the available catalogs
605 for lang in $ALL_LINGUAS; do
606 GMOFILES="$GMOFILES $lang.gmo"
607 POFILES="$POFILES $lang.po"
610 dnl Make all variables we use known to autoconf.
611 AC_SUBST(USE_INCLUDED_LIBINTL)
614 AC_SUBST(DATADIRNAME)
624 AC_DEFUN(AM_GNU_GETTEXT,
625 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
626 AC_REQUIRE([AC_PROG_CC])dnl
627 AC_REQUIRE([AC_PROG_RANLIB])dnl
628 AC_REQUIRE([AC_ISC_POSIX])dnl
629 AC_REQUIRE([AC_HEADER_STDC])dnl
630 AC_REQUIRE([AC_C_CONST])dnl
631 AC_REQUIRE([AC_C_INLINE])dnl
632 AC_REQUIRE([AC_TYPE_OFF_T])dnl
633 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
634 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
635 AC_REQUIRE([AC_FUNC_MMAP])dnl
637 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
638 unistd.h sys/param.h])
639 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
640 strdup __argz_count __argz_stringify __argz_next])
642 if test "${ac_cv_func_stpcpy+set}" != "set"; then
643 AC_CHECK_FUNCS(stpcpy)
645 if test "${ac_cv_func_stpcpy}" = "yes"; then
646 AC_DEFINE(HAVE_STPCPY, 1,
647 [Define to 1 if you have the \`stpcpy' function.])
653 if test "x$CATOBJEXT" != "x"; then
654 if test "x$ALL_LINGUAS" = "x"; then
657 AC_MSG_CHECKING(for catalogs to be installed)
659 for lang in ${LINGUAS=$ALL_LINGUAS}; do
660 case "$ALL_LINGUAS" in
661 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
665 AC_MSG_RESULT($LINGUAS)
668 dnl Construct list of names of catalog files to be constructed.
669 if test -n "$LINGUAS"; then
670 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
674 dnl The reference to <locale.h> in the installed <libintl.h> file
675 dnl must be resolved because we cannot expect the users of this
676 dnl to define HAVE_LOCALE_H.
677 if test $ac_cv_header_locale_h = yes; then
678 INCLUDE_LOCALE_H="#include <locale.h>"
681 /* The system does not provide the header <locale.h>. Take care yourself. */"
683 AC_SUBST(INCLUDE_LOCALE_H)
685 dnl Determine which catalog format we have (if any is needed)
686 dnl For now we know about two different formats:
687 dnl Linux libc-5 and the normal X/Open format
688 test -d intl || mkdir intl
689 if test "$CATOBJEXT" = ".cat"; then
690 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
692 dnl Transform the SED scripts while copying because some dumb SEDs
693 dnl cannot handle comments.
694 sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
696 dnl po2tbl.sed is always needed.
697 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
698 $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
700 dnl In the intl/Makefile.in we have a special dependency which makes
701 dnl only sense for gettext. We comment this out for non-gettext
703 if test "$PACKAGE" = "gettext"; then
713 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
714 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
715 dnl Try to locate is.
717 if test -n "$ac_aux_dir"; then
718 MKINSTALLDIRS="\$(top_srcdir)/$ac_aux_dir/mkinstalldirs"
720 if test -z "$MKINSTALLDIRS"; then
721 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
723 AC_SUBST(MKINSTALLDIRS)
725 dnl *** For now the libtool support in intl/Makefile is not for real.
729 dnl Generate list of files to be processed by xgettext which will
730 dnl be included in po/Makefile.
731 test -d po || mkdir po
737 posrcprefix="$srcdir/" ;;
739 posrcprefix="../$srcdir/" ;;
743 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
744 < $srcdir/po/POTFILES.in > po/POTFILES
747 # Search path for a program which passes the given test.
748 # Ulrich Drepper <drepper@cygnus.com>, 1996.
750 # This file can be copied and used freely without restrictions. It can
751 # be used in projects which are not available under the GNU Public License
752 # but which still want to provide support for the GNU gettext functionality.
753 # Please note that the actual code is *not* freely available.
757 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
758 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
759 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
760 [# Extract the first word of "$2", so it can be a program name with args.
761 set dummy $2; ac_word=[$]2
762 AC_MSG_CHECKING([for $ac_word])
763 AC_CACHE_VAL(ac_cv_path_$1,
766 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
769 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
770 for ac_dir in ifelse([$5], , $PATH, [$5]); do
771 test -z "$ac_dir" && ac_dir=.
772 if test -f $ac_dir/$ac_word; then
774 ac_cv_path_$1="$ac_dir/$ac_word"
780 dnl If no 4th arg is given, leave the cache variable unset,
781 dnl so AC_PATH_PROGS will keep looking.
782 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
787 if test -n "[$]$1"; then
795 # Check whether LC_MESSAGES is available in <locale.h>.
796 # Ulrich Drepper <drepper@cygnus.com>, 1995.
798 # This file can be copied and used freely without restrictions. It can
799 # be used in projects which are not available under the GNU Public License
800 # but which still want to provide support for the GNU gettext functionality.
801 # Please note that the actual code is *not* freely available.
805 AC_DEFUN(AM_LC_MESSAGES,
806 [if test $ac_cv_header_locale_h = yes; then
807 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
808 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
809 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
810 if test $am_cv_val_LC_MESSAGES = yes; then
811 AC_DEFINE(HAVE_LC_MESSAGES, 1,
812 [Define if your locale.h file contains LC_MESSAGES.])
818 dnl FIXME: put these prerequisite-only *.m4 files in a separate
819 dnl directory -- otherwise, they'll conflict with existing files.
821 dnl These are the prerequisite macros for GNU's error.c file.
822 AC_DEFUN(jm_PREREQ_ERROR,
824 AC_CHECK_FUNCS(strerror strerror_r vprintf doprnt)