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 dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
14 AC_DEFUN(GAS_CHECK_DECL_NEEDED,[
15 AC_MSG_CHECKING(whether declaration is required for $1)
16 AC_CACHE_VAL(gas_cv_decl_needed_$1,
22 ], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
23 AC_MSG_RESULT($gas_cv_decl_needed_$1)
24 test $gas_cv_decl_needed_$1 = no || {
25 ifelse(index($1,[$]),-1,
26 [AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]))],
27 [gas_decl_name_upcase=`echo $1 | tr '[a-z]' '[A-Z]'`
28 AC_DEFINE_UNQUOTED(NEED_DECLARATION_$gas_decl_name_upcase)])
32 dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad
33 dnl enough, but on some of those systems, the assert macro relies on requoting
35 dnl GAS_WORKING_ASSERT
36 AC_DEFUN(GAS_WORKING_ASSERT,
37 [AC_MSG_CHECKING([for working assert macro])
38 AC_CACHE_VAL(gas_cv_assert_ok,
39 AC_TRY_LINK([#include <assert.h>
40 #include <stdio.h>], [
41 /* check for requoting problems */
42 static int a, b, c, d;
44 assert (!strcmp(s, "foo bar baz quux"));
45 /* check for newline handling */
48 ], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
49 AC_MSG_RESULT($gas_cv_assert_ok)
50 test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT)
53 dnl Since many Bourne shell implementations lack subroutines, use this
54 dnl hack to simplify the code in configure.in.
57 [_gas_uniq_list="[$]$1"
59 dnl Protect against empty input list.
60 for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
61 case [$]_gas_uniq_i in
63 *) case " [$]_gas_uniq_newlist " in
64 *" [$]_gas_uniq_i "*) ;;
65 *) _gas_uniq_newlist="[$]_gas_uniq_newlist [$]_gas_uniq_i" ;;
69 $1=[$]_gas_uniq_newlist
72 # Do all the work for Automake. This macro actually does too much --
73 # some checks are only needed if your package does certain things.
74 # But this isn't really a big deal.
79 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
81 AC_DEFUN(AM_INIT_AUTOMAKE,
82 [AC_REQUIRE([AC_PROG_INSTALL])
87 dnl test to see if srcdir already configured
88 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
89 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
92 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
93 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
94 AC_REQUIRE([AM_SANITY_CHECK])
95 AC_REQUIRE([AC_ARG_PROGRAM])
96 dnl FIXME This is truly gross.
97 missing_dir=`cd $ac_aux_dir && pwd`
98 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
99 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
100 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
101 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
102 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
103 AC_REQUIRE([AC_PROG_MAKE_SET])])
106 # Check to make sure that the build environment is sane.
109 AC_DEFUN(AM_SANITY_CHECK,
110 [AC_MSG_CHECKING([whether build environment is sane])
113 echo timestamp > conftestfile
114 # Do `set' in a subshell so we don't clobber the current shell's
115 # arguments. Must try -L first in case configure is actually a
116 # symlink; some systems play weird games with the mod time of symlinks
117 # (eg FreeBSD returns the mod time of the symlink's containing
120 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
121 if test "[$]*" = "X"; then
123 set X `ls -t $srcdir/configure conftestfile`
125 if test "[$]*" != "X $srcdir/configure conftestfile" \
126 && test "[$]*" != "X conftestfile $srcdir/configure"; then
128 # If neither matched, then we have a broken ls. This can happen
129 # if, for instance, CONFIG_SHELL is bash and it inherits a
130 # broken ls alias from the environment. This has actually
131 # happened. Such a system could not be considered "sane".
132 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
133 alias in your environment])
136 test "[$]2" = conftestfile
142 AC_MSG_ERROR([newly created file is older than distributed files!
143 Check your system clock])
148 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
149 dnl The program must properly implement --version.
150 AC_DEFUN(AM_MISSING_PROG,
151 [AC_MSG_CHECKING(for working $2)
152 # Run test in a subshell; some versions of sh will print an error if
153 # an executable is not found, even if stderr is redirected.
154 # Redirect stdin to placate older versions of autoconf. Sigh.
155 if ($2 --version) < /dev/null > /dev/null 2>&1; then
160 AC_MSG_RESULT(missing)
165 # serial 25 AM_PROG_LIBTOOL
166 AC_DEFUN(AM_PROG_LIBTOOL,
167 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
168 AC_REQUIRE([AM_ENABLE_STATIC])dnl
169 AC_REQUIRE([AC_CANONICAL_HOST])dnl
170 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
171 AC_REQUIRE([AC_PROG_RANLIB])dnl
172 AC_REQUIRE([AC_PROG_CC])dnl
173 AC_REQUIRE([AM_PROG_LD])dnl
174 AC_REQUIRE([AM_PROG_NM])dnl
175 AC_REQUIRE([AC_PROG_LN_S])dnl
177 # Always use our own libtool.
178 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
181 # Check for any special flags to pass to ltconfig.
183 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
184 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
185 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
186 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
187 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
189 # Some flags need to be propagated to the compiler or linker for good
193 # Find out which ABI we are using.
194 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
195 if AC_TRY_EVAL(ac_compile); then
196 case "`/usr/bin/file conftest.o`" in
212 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
213 CFLAGS="$CFLAGS -belf"
217 AM_SYS_LIBTOOL_CYGWIN
222 # Actually configure libtool. ac_aux_dir is where install-sh is found.
223 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
224 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
225 DLLTOOL="$DLLTOOL" AS="$AS" \
226 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
227 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
228 || AC_MSG_ERROR([libtool configure failed])
230 # Redirect the config.log output again, so that the ltconfig log is not
231 # clobbered by the next message.
235 # AM_ENABLE_SHARED - implement the --enable-shared flag
236 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
237 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
239 AC_DEFUN(AM_ENABLE_SHARED,
240 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
241 AC_ARG_ENABLE(shared,
242 changequote(<<, >>)dnl
243 << --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
245 [p=${PACKAGE-default}
247 yes) enable_shared=yes ;;
248 no) enable_shared=no ;;
251 # Look at the argument we got. We use all the common list separators.
252 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
253 for pkg in $enableval; do
254 if test "X$pkg" = "X$p"; then
261 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
264 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
265 AC_DEFUN(AM_DISABLE_SHARED,
266 [AM_ENABLE_SHARED(no)])
268 # AM_DISABLE_STATIC - set the default static flag to --disable-static
269 AC_DEFUN(AM_DISABLE_STATIC,
270 [AM_ENABLE_STATIC(no)])
272 # AM_ENABLE_STATIC - implement the --enable-static flag
273 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
274 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
276 AC_DEFUN(AM_ENABLE_STATIC,
277 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
278 AC_ARG_ENABLE(static,
279 changequote(<<, >>)dnl
280 << --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
282 [p=${PACKAGE-default}
284 yes) enable_static=yes ;;
285 no) enable_static=no ;;
288 # Look at the argument we got. We use all the common list separators.
289 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
290 for pkg in $enableval; do
291 if test "X$pkg" = "X$p"; then
298 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
302 # AM_PROG_LD - find the path to the GNU or non-GNU linker
305 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
306 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
307 AC_REQUIRE([AC_PROG_CC])
309 if test "$ac_cv_prog_gcc" = yes; then
310 # Check if gcc -print-prog-name=ld gives a path.
311 AC_MSG_CHECKING([for ld used by GCC])
312 ac_prog=`($CC -print-prog-name=ld) 2>&5`
314 # Accept absolute paths.
318 test -z "$LD" && LD="$ac_prog"
321 # If it fails, then pretend we aren't using GCC.
325 # If it is relative, then search for the first ld in PATH.
329 elif test "$with_gnu_ld" = yes; then
330 AC_MSG_CHECKING([for GNU ld])
332 AC_MSG_CHECKING([for non-GNU ld])
334 AC_CACHE_VAL(ac_cv_path_LD,
335 [if test -z "$LD"; then
336 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
337 for ac_dir in $PATH; do
338 test -z "$ac_dir" && ac_dir=.
339 if test -f "$ac_dir/$ac_prog"; then
340 ac_cv_path_LD="$ac_dir/$ac_prog"
341 # Check to see if the program is GNU ld. I'd rather use --version,
342 # but apparently some GNU ld's only accept -v.
343 # Break only if it was the GNU/non-GNU ld that we prefer.
344 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
345 test "$with_gnu_ld" != no && break
347 test "$with_gnu_ld" != yes && break
353 ac_cv_path_LD="$LD" # Let the user override the test with a path.
356 if test -n "$LD"; then
361 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
366 AC_DEFUN(AM_PROG_LD_GNU,
367 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
368 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
369 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
370 ac_cv_prog_gnu_ld=yes
376 # AM_PROG_NM - find the path to a BSD-compatible name lister
378 [AC_MSG_CHECKING([for BSD-compatible nm])
379 AC_CACHE_VAL(ac_cv_path_NM,
380 [if test -n "$NM"; then
381 # Let the user override the test.
384 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
385 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
386 test -z "$ac_dir" && ac_dir=.
387 if test -f $ac_dir/nm; then
388 # Check to see if the nm accepts a BSD-compat flag.
389 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
390 # nm: unknown option "B" ignored
391 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
392 ac_cv_path_NM="$ac_dir/nm -B"
393 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
394 ac_cv_path_NM="$ac_dir/nm -p"
396 ac_cv_path_NM="$ac_dir/nm"
402 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
409 # AM_SYS_LIBTOOL_CYGWIN - find tools needed on cygwin
410 AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN,
411 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
412 AC_CHECK_TOOL(AS, as, false)
415 # Like AC_CONFIG_HEADER, but automatically create stamp file.
417 AC_DEFUN(AM_CONFIG_HEADER,
419 AC_CONFIG_HEADER([$1])
420 dnl When config.status generates a header, we must update the stamp-h file.
421 dnl This file resides in the same directory as the config header
422 dnl that is generated. We must strip everything past the first ":",
423 dnl and everything past the last "/".
424 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
425 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
426 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
428 for am_file in <<$1>>; do
429 case " <<$>>CONFIG_HEADERS " in
430 *" <<$>>am_file "*<<)>>
431 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
434 am_indx=`expr "<<$>>am_indx" + 1`
440 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
441 AC_DEFUN(AM_PROG_LEX,
442 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
443 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
447 # This file is derived from `gettext.m4'. The difference is that the
448 # included macros assume Cygnus-style source and build trees.
450 # Macro to add for using GNU gettext.
451 # Ulrich Drepper <drepper@cygnus.com>, 1995.
453 # This file file be copied and used freely without restrictions. It can
454 # be used in projects which are not available under the GNU Public License
455 # but which still want to provide support for the GNU gettext functionality.
456 # Please note that the actual code is *not* freely available.
460 AC_DEFUN(CY_WITH_NLS,
461 [AC_MSG_CHECKING([whether NLS is requested])
462 dnl Default is enabled NLS
464 [ --disable-nls do not use Native Language Support],
465 USE_NLS=$enableval, USE_NLS=yes)
466 AC_MSG_RESULT($USE_NLS)
469 USE_INCLUDED_LIBINTL=no
471 dnl If we use NLS figure out what method
472 if test "$USE_NLS" = "yes"; then
473 AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
474 AC_MSG_CHECKING([whether included gettext is requested])
475 AC_ARG_WITH(included-gettext,
476 [ --with-included-gettext use the GNU gettext library included here],
477 nls_cv_force_use_gnu_gettext=$withval,
478 nls_cv_force_use_gnu_gettext=no)
479 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
481 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
482 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
483 dnl User does not insist on using GNU NLS library. Figure out what
484 dnl to use. If gettext or catgets are available (in this order) we
485 dnl use this. Else we have to fall back to GNU NLS library.
486 dnl catgets is only used if permitted by option --with-catgets.
491 AC_CHECK_HEADER(libintl.h,
492 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
493 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
494 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
496 if test "$gt_cv_func_gettext_libc" != "yes"; then
497 AC_CHECK_LIB(intl, bindtextdomain,
498 [AC_CACHE_CHECK([for gettext in libintl],
499 gt_cv_func_gettext_libintl,
500 [AC_TRY_LINK([], [return (int) gettext ("")],
501 gt_cv_func_gettext_libintl=yes,
502 gt_cv_func_gettext_libintl=no)])])
505 if test "$gt_cv_func_gettext_libc" = "yes" \
506 || test "$gt_cv_func_gettext_libintl" = "yes"; then
507 AC_DEFINE(HAVE_GETTEXT, 1,
508 [Define as 1 if you have gettext and don't want to use GNU gettext.])
509 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
510 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
511 if test "$MSGFMT" != "no"; then
512 AC_CHECK_FUNCS(dcgettext)
513 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
514 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
515 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
516 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
517 return _nl_msg_cat_cntr],
527 dnl In the standard gettext, we would now check for catgets.
528 dnl However, we never want to use catgets for our releases.
530 if test "$CATOBJEXT" = "NONE"; then
531 dnl Neither gettext nor catgets in included in the C library.
532 dnl Fall back on GNU gettext library.
533 nls_cv_use_gnu_gettext=yes
537 if test "$nls_cv_use_gnu_gettext" = "yes"; then
538 dnl Mark actions used to generate GNU NLS library.
539 INTLOBJS="\$(GETTOBJS)"
540 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
541 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
542 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
543 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
544 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
546 USE_INCLUDED_LIBINTL=yes
550 INTLDEPS='$(top_builddir)/../intl/libintl.a'
552 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
553 nls_cv_header_intl=libintl.h
554 nls_cv_header_libgt=libgettext.h
557 dnl Test whether we really found GNU xgettext.
558 if test "$XGETTEXT" != ":"; then
559 dnl If it is no GNU xgettext we define it as : so that the
560 dnl Makefiles still can work.
561 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
565 [found xgettext programs is not GNU xgettext; ignore it])
570 # We need to process the po/ directory.
574 nls_cv_header_intl=libintl.h
575 nls_cv_header_libgt=libgettext.h
578 # If this is used in GNU gettext we have to set USE_NLS to `yes'
579 # because some of the sources are only built for this goal.
580 if test "$PACKAGE" = gettext; then
582 USE_INCLUDED_LIBINTL=yes
585 dnl These rules are solely for the distribution goal. While doing this
586 dnl we only have to keep exactly one list of the available catalogs
588 for lang in $ALL_LINGUAS; do
589 GMOFILES="$GMOFILES $lang.gmo"
590 POFILES="$POFILES $lang.po"
593 dnl Make all variables we use known to autoconf.
594 AC_SUBST(USE_INCLUDED_LIBINTL)
597 AC_SUBST(DATADIRNAME)
607 AC_DEFUN(CY_GNU_GETTEXT,
608 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
609 AC_REQUIRE([AC_PROG_CC])dnl
610 AC_REQUIRE([AC_PROG_RANLIB])dnl
611 AC_REQUIRE([AC_ISC_POSIX])dnl
612 AC_REQUIRE([AC_HEADER_STDC])dnl
613 AC_REQUIRE([AC_C_CONST])dnl
614 AC_REQUIRE([AC_C_INLINE])dnl
615 AC_REQUIRE([AC_TYPE_OFF_T])dnl
616 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
617 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
618 AC_REQUIRE([AC_FUNC_MMAP])dnl
620 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
621 unistd.h values.h sys/param.h])
622 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
623 __argz_count __argz_stringify __argz_next])
625 if test "${ac_cv_func_stpcpy+set}" != "set"; then
626 AC_CHECK_FUNCS(stpcpy)
628 if test "${ac_cv_func_stpcpy}" = "yes"; then
629 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
635 if test "x$CATOBJEXT" != "x"; then
636 if test "x$ALL_LINGUAS" = "x"; then
639 AC_MSG_CHECKING(for catalogs to be installed)
641 for lang in ${LINGUAS=$ALL_LINGUAS}; do
642 case "$ALL_LINGUAS" in
643 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
647 AC_MSG_RESULT($LINGUAS)
650 dnl Construct list of names of catalog files to be constructed.
651 if test -n "$LINGUAS"; then
652 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
656 dnl The reference to <locale.h> in the installed <libintl.h> file
657 dnl must be resolved because we cannot expect the users of this
658 dnl to define HAVE_LOCALE_H.
659 if test $ac_cv_header_locale_h = yes; then
660 INCLUDE_LOCALE_H="#include <locale.h>"
663 /* The system does not provide the header <locale.h>. Take care yourself. */"
665 AC_SUBST(INCLUDE_LOCALE_H)
667 dnl Determine which catalog format we have (if any is needed)
668 dnl For now we know about two different formats:
669 dnl Linux libc-5 and the normal X/Open format
670 if test -f $srcdir/po2tbl.sed.in; then
671 if test "$CATOBJEXT" = ".cat"; then
672 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
674 dnl Transform the SED scripts while copying because some dumb SEDs
675 dnl cannot handle comments.
676 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
678 dnl po2tbl.sed is always needed.
679 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
680 $srcdir/po2tbl.sed.in > po2tbl.sed
683 dnl In the intl/Makefile.in we have a special dependency which makes
684 dnl only sense for gettext. We comment this out for non-gettext
686 if test "$PACKAGE" = "gettext"; then
696 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
697 AC_SUBST(MKINSTALLDIRS)
699 dnl *** For now the libtool support in intl/Makefile is not for real.
703 dnl Generate list of files to be processed by xgettext which will
704 dnl be included in po/Makefile. But only do this if the po directory
705 dnl exists in srcdir.
706 if test -d $srcdir/po; then
707 test -d po || mkdir po
708 if test "x$srcdir" != "x."; then
709 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
710 posrcprefix="$srcdir/"
712 posrcprefix="../$srcdir/"
718 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
719 < $srcdir/po/POTFILES.in > po/POTFILES
723 # Search path for a program which passes the given test.
724 # Ulrich Drepper <drepper@cygnus.com>, 1996.
726 # This file file be copied and used freely without restrictions. It can
727 # be used in projects which are not available under the GNU Public License
728 # but which still want to provide support for the GNU gettext functionality.
729 # Please note that the actual code is *not* freely available.
733 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
734 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
735 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
736 [# Extract the first word of "$2", so it can be a program name with args.
737 set dummy $2; ac_word=[$]2
738 AC_MSG_CHECKING([for $ac_word])
739 AC_CACHE_VAL(ac_cv_path_$1,
742 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
745 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
746 for ac_dir in ifelse([$5], , $PATH, [$5]); do
747 test -z "$ac_dir" && ac_dir=.
748 if test -f $ac_dir/$ac_word; then
750 ac_cv_path_$1="$ac_dir/$ac_word"
756 dnl If no 4th arg is given, leave the cache variable unset,
757 dnl so AC_PATH_PROGS will keep looking.
758 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
763 if test -n "[$]$1"; then
771 # Check whether LC_MESSAGES is available in <locale.h>.
772 # Ulrich Drepper <drepper@cygnus.com>, 1995.
774 # This file file be copied and used freely without restrictions. It can
775 # be used in projects which are not available under the GNU Public License
776 # but which still want to provide support for the GNU gettext functionality.
777 # Please note that the actual code is *not* freely available.
781 AC_DEFUN(AM_LC_MESSAGES,
782 [if test $ac_cv_header_locale_h = yes; then
783 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
784 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
785 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
786 if test $am_cv_val_LC_MESSAGES = yes; then
787 AC_DEFINE(HAVE_LC_MESSAGES, 1,
788 [Define if your locale.h file contains LC_MESSAGES.])
792 # Add --enable-maintainer-mode option to configure.
797 AC_DEFUN(AM_MAINTAINER_MODE,
798 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
799 dnl maintainer-mode is disabled by default
800 AC_ARG_ENABLE(maintainer-mode,
801 [ --enable-maintainer-mode enable make rules and dependencies not useful
802 (and sometimes confusing) to the casual installer],
803 USE_MAINTAINER_MODE=$enableval,
804 USE_MAINTAINER_MODE=no)
805 AC_MSG_RESULT($USE_MAINTAINER_MODE)
806 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
807 MAINT=$MAINTAINER_MODE_TRUE
812 # Define a conditional.
814 AC_DEFUN(AM_CONDITIONAL,