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 if test $gas_cv_decl_needed_$1 = yes; then
25 AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
26 [Define if $1 is not declared in system header files.])
30 dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad
31 dnl enough, but on some of those systems, the assert macro relies on requoting
33 dnl GAS_WORKING_ASSERT
34 AC_DEFUN(GAS_WORKING_ASSERT,
35 [AC_MSG_CHECKING([for working assert macro])
36 AC_CACHE_VAL(gas_cv_assert_ok,
37 AC_TRY_LINK([#include <assert.h>
38 #include <stdio.h>], [
39 /* check for requoting problems */
40 static int a, b, c, d;
42 assert (!strcmp(s, "foo bar baz quux"));
43 /* check for newline handling */
46 ], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
47 AC_MSG_RESULT($gas_cv_assert_ok)
48 test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT, 1, [assert broken?])
51 dnl Since many Bourne shell implementations lack subroutines, use this
52 dnl hack to simplify the code in configure.in.
55 [_gas_uniq_list="[$]$1"
57 dnl Protect against empty input list.
58 for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
59 case [$]_gas_uniq_i in
61 *) case " [$]_gas_uniq_newlist " in
62 *" [$]_gas_uniq_i "*) ;;
63 *) _gas_uniq_newlist="[$]_gas_uniq_newlist [$]_gas_uniq_i" ;;
67 $1=[$]_gas_uniq_newlist
70 # Do all the work for Automake. This macro actually does too much --
71 # some checks are only needed if your package does certain things.
72 # But this isn't really a big deal.
77 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
79 AC_DEFUN(AM_INIT_AUTOMAKE,
80 [AC_REQUIRE([AC_PROG_INSTALL])
85 dnl test to see if srcdir already configured
86 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
87 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
90 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
91 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
92 AC_REQUIRE([AM_SANITY_CHECK])
93 AC_REQUIRE([AC_ARG_PROGRAM])
94 dnl FIXME This is truly gross.
95 missing_dir=`cd $ac_aux_dir && pwd`
96 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
97 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
98 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
99 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
100 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
101 AC_REQUIRE([AC_PROG_MAKE_SET])])
104 # Check to make sure that the build environment is sane.
107 AC_DEFUN(AM_SANITY_CHECK,
108 [AC_MSG_CHECKING([whether build environment is sane])
111 echo timestamp > conftestfile
112 # Do `set' in a subshell so we don't clobber the current shell's
113 # arguments. Must try -L first in case configure is actually a
114 # symlink; some systems play weird games with the mod time of symlinks
115 # (eg FreeBSD returns the mod time of the symlink's containing
118 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
119 if test "[$]*" = "X"; then
121 set X `ls -t $srcdir/configure conftestfile`
123 if test "[$]*" != "X $srcdir/configure conftestfile" \
124 && test "[$]*" != "X conftestfile $srcdir/configure"; then
126 # If neither matched, then we have a broken ls. This can happen
127 # if, for instance, CONFIG_SHELL is bash and it inherits a
128 # broken ls alias from the environment. This has actually
129 # happened. Such a system could not be considered "sane".
130 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
131 alias in your environment])
134 test "[$]2" = conftestfile
140 AC_MSG_ERROR([newly created file is older than distributed files!
141 Check your system clock])
146 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
147 dnl The program must properly implement --version.
148 AC_DEFUN(AM_MISSING_PROG,
149 [AC_MSG_CHECKING(for working $2)
150 # Run test in a subshell; some versions of sh will print an error if
151 # an executable is not found, even if stderr is redirected.
152 # Redirect stdin to placate older versions of autoconf. Sigh.
153 if ($2 --version) < /dev/null > /dev/null 2>&1; then
158 AC_MSG_RESULT(missing)
163 # serial 25 AM_PROG_LIBTOOL
164 AC_DEFUN(AM_PROG_LIBTOOL,
165 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
166 AC_REQUIRE([AM_ENABLE_STATIC])dnl
167 AC_REQUIRE([AC_CANONICAL_HOST])dnl
168 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
169 AC_REQUIRE([AC_PROG_RANLIB])dnl
170 AC_REQUIRE([AC_PROG_CC])dnl
171 AC_REQUIRE([AM_PROG_LD])dnl
172 AC_REQUIRE([AM_PROG_NM])dnl
173 AC_REQUIRE([AC_PROG_LN_S])dnl
175 # Always use our own libtool.
176 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
179 # Check for any special flags to pass to ltconfig.
181 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
182 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
183 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
184 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
185 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
187 # Some flags need to be propagated to the compiler or linker for good
191 # Find out which ABI we are using.
192 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
193 if AC_TRY_EVAL(ac_compile); then
194 case "`/usr/bin/file conftest.o`" in
210 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
211 CFLAGS="$CFLAGS -belf"
215 AM_SYS_LIBTOOL_CYGWIN
220 # Actually configure libtool. ac_aux_dir is where install-sh is found.
221 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
222 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
223 DLLTOOL="$DLLTOOL" AS="$AS" \
224 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
225 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
226 || AC_MSG_ERROR([libtool configure failed])
228 # Redirect the config.log output again, so that the ltconfig log is not
229 # clobbered by the next message.
233 # AM_ENABLE_SHARED - implement the --enable-shared flag
234 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
235 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
237 AC_DEFUN(AM_ENABLE_SHARED,
238 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
239 AC_ARG_ENABLE(shared,
240 changequote(<<, >>)dnl
241 << --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
243 [p=${PACKAGE-default}
245 yes) enable_shared=yes ;;
246 no) enable_shared=no ;;
249 # Look at the argument we got. We use all the common list separators.
250 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
251 for pkg in $enableval; do
252 if test "X$pkg" = "X$p"; then
259 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
262 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
263 AC_DEFUN(AM_DISABLE_SHARED,
264 [AM_ENABLE_SHARED(no)])
266 # AM_DISABLE_STATIC - set the default static flag to --disable-static
267 AC_DEFUN(AM_DISABLE_STATIC,
268 [AM_ENABLE_STATIC(no)])
270 # AM_ENABLE_STATIC - implement the --enable-static flag
271 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
272 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
274 AC_DEFUN(AM_ENABLE_STATIC,
275 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
276 AC_ARG_ENABLE(static,
277 changequote(<<, >>)dnl
278 << --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
280 [p=${PACKAGE-default}
282 yes) enable_static=yes ;;
283 no) enable_static=no ;;
286 # Look at the argument we got. We use all the common list separators.
287 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
288 for pkg in $enableval; do
289 if test "X$pkg" = "X$p"; then
296 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
300 # AM_PROG_LD - find the path to the GNU or non-GNU linker
303 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
304 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
305 AC_REQUIRE([AC_PROG_CC])
307 if test "$ac_cv_prog_gcc" = yes; then
308 # Check if gcc -print-prog-name=ld gives a path.
309 AC_MSG_CHECKING([for ld used by GCC])
310 ac_prog=`($CC -print-prog-name=ld) 2>&5`
312 # Accept absolute paths.
316 test -z "$LD" && LD="$ac_prog"
319 # If it fails, then pretend we aren't using GCC.
323 # If it is relative, then search for the first ld in PATH.
327 elif test "$with_gnu_ld" = yes; then
328 AC_MSG_CHECKING([for GNU ld])
330 AC_MSG_CHECKING([for non-GNU ld])
332 AC_CACHE_VAL(ac_cv_path_LD,
333 [if test -z "$LD"; then
334 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
335 for ac_dir in $PATH; do
336 test -z "$ac_dir" && ac_dir=.
337 if test -f "$ac_dir/$ac_prog"; then
338 ac_cv_path_LD="$ac_dir/$ac_prog"
339 # Check to see if the program is GNU ld. I'd rather use --version,
340 # but apparently some GNU ld's only accept -v.
341 # Break only if it was the GNU/non-GNU ld that we prefer.
342 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
343 test "$with_gnu_ld" != no && break
345 test "$with_gnu_ld" != yes && break
351 ac_cv_path_LD="$LD" # Let the user override the test with a path.
354 if test -n "$LD"; then
359 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
364 AC_DEFUN(AM_PROG_LD_GNU,
365 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
366 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
367 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
368 ac_cv_prog_gnu_ld=yes
374 # AM_PROG_NM - find the path to a BSD-compatible name lister
376 [AC_MSG_CHECKING([for BSD-compatible nm])
377 AC_CACHE_VAL(ac_cv_path_NM,
378 [if test -n "$NM"; then
379 # Let the user override the test.
382 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
383 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
384 test -z "$ac_dir" && ac_dir=.
385 if test -f $ac_dir/nm; then
386 # Check to see if the nm accepts a BSD-compat flag.
387 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
388 # nm: unknown option "B" ignored
389 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
390 ac_cv_path_NM="$ac_dir/nm -B"
391 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
392 ac_cv_path_NM="$ac_dir/nm -p"
394 ac_cv_path_NM="$ac_dir/nm"
400 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
407 # AM_SYS_LIBTOOL_CYGWIN - find tools needed on cygwin
408 AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN,
409 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
410 AC_CHECK_TOOL(AS, as, false)
413 # Like AC_CONFIG_HEADER, but automatically create stamp file.
415 AC_DEFUN(AM_CONFIG_HEADER,
417 AC_CONFIG_HEADER([$1])
418 dnl When config.status generates a header, we must update the stamp-h file.
419 dnl This file resides in the same directory as the config header
420 dnl that is generated. We must strip everything past the first ":",
421 dnl and everything past the last "/".
422 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
423 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
424 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
426 for am_file in <<$1>>; do
427 case " <<$>>CONFIG_HEADERS " in
428 *" <<$>>am_file "*<<)>>
429 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
432 am_indx=`expr "<<$>>am_indx" + 1`
438 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
439 AC_DEFUN(AM_PROG_LEX,
440 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
441 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
445 # This file is derived from `gettext.m4'. The difference is that the
446 # included macros assume Cygnus-style source and build trees.
448 # Macro to add for using GNU gettext.
449 # Ulrich Drepper <drepper@cygnus.com>, 1995.
451 # This file file be copied and used freely without restrictions. It can
452 # be used in projects which are not available under the GNU Public License
453 # but which still want to provide support for the GNU gettext functionality.
454 # Please note that the actual code is *not* freely available.
458 AC_DEFUN(CY_WITH_NLS,
459 [AC_MSG_CHECKING([whether NLS is requested])
460 dnl Default is enabled NLS
462 [ --disable-nls do not use Native Language Support],
463 USE_NLS=$enableval, USE_NLS=yes)
464 AC_MSG_RESULT($USE_NLS)
467 USE_INCLUDED_LIBINTL=no
469 dnl If we use NLS figure out what method
470 if test "$USE_NLS" = "yes"; then
471 AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
472 AC_MSG_CHECKING([whether included gettext is requested])
473 AC_ARG_WITH(included-gettext,
474 [ --with-included-gettext use the GNU gettext library included here],
475 nls_cv_force_use_gnu_gettext=$withval,
476 nls_cv_force_use_gnu_gettext=no)
477 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
479 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
480 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
481 dnl User does not insist on using GNU NLS library. Figure out what
482 dnl to use. If gettext or catgets are available (in this order) we
483 dnl use this. Else we have to fall back to GNU NLS library.
484 dnl catgets is only used if permitted by option --with-catgets.
489 AC_CHECK_HEADER(libintl.h,
490 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
491 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
492 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
494 if test "$gt_cv_func_gettext_libc" != "yes"; then
495 AC_CHECK_LIB(intl, bindtextdomain,
496 [AC_CACHE_CHECK([for gettext in libintl],
497 gt_cv_func_gettext_libintl,
498 [AC_TRY_LINK([], [return (int) gettext ("")],
499 gt_cv_func_gettext_libintl=yes,
500 gt_cv_func_gettext_libintl=no)])])
503 if test "$gt_cv_func_gettext_libc" = "yes" \
504 || test "$gt_cv_func_gettext_libintl" = "yes"; then
505 AC_DEFINE(HAVE_GETTEXT, 1,
506 [Define as 1 if you have gettext and don't want to use GNU gettext.])
507 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
508 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
509 if test "$MSGFMT" != "no"; then
510 AC_CHECK_FUNCS(dcgettext)
511 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
512 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
513 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
514 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
515 return _nl_msg_cat_cntr],
525 dnl In the standard gettext, we would now check for catgets.
526 dnl However, we never want to use catgets for our releases.
528 if test "$CATOBJEXT" = "NONE"; then
529 dnl Neither gettext nor catgets in included in the C library.
530 dnl Fall back on GNU gettext library.
531 nls_cv_use_gnu_gettext=yes
535 if test "$nls_cv_use_gnu_gettext" = "yes"; then
536 dnl Mark actions used to generate GNU NLS library.
537 INTLOBJS="\$(GETTOBJS)"
538 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
539 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
540 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
541 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
542 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
544 USE_INCLUDED_LIBINTL=yes
548 INTLDEPS='$(top_builddir)/../intl/libintl.a'
550 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
551 nls_cv_header_intl=libintl.h
552 nls_cv_header_libgt=libgettext.h
555 dnl Test whether we really found GNU xgettext.
556 if test "$XGETTEXT" != ":"; then
557 dnl If it is no GNU xgettext we define it as : so that the
558 dnl Makefiles still can work.
559 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
563 [found xgettext programs is not GNU xgettext; ignore it])
568 # We need to process the po/ directory.
572 nls_cv_header_intl=libintl.h
573 nls_cv_header_libgt=libgettext.h
576 # If this is used in GNU gettext we have to set USE_NLS to `yes'
577 # because some of the sources are only built for this goal.
578 if test "$PACKAGE" = gettext; then
580 USE_INCLUDED_LIBINTL=yes
583 dnl These rules are solely for the distribution goal. While doing this
584 dnl we only have to keep exactly one list of the available catalogs
586 for lang in $ALL_LINGUAS; do
587 GMOFILES="$GMOFILES $lang.gmo"
588 POFILES="$POFILES $lang.po"
591 dnl Make all variables we use known to autoconf.
592 AC_SUBST(USE_INCLUDED_LIBINTL)
595 AC_SUBST(DATADIRNAME)
605 AC_DEFUN(CY_GNU_GETTEXT,
606 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
607 AC_REQUIRE([AC_PROG_CC])dnl
608 AC_REQUIRE([AC_PROG_RANLIB])dnl
609 AC_REQUIRE([AC_ISC_POSIX])dnl
610 AC_REQUIRE([AC_HEADER_STDC])dnl
611 AC_REQUIRE([AC_C_CONST])dnl
612 AC_REQUIRE([AC_C_INLINE])dnl
613 AC_REQUIRE([AC_TYPE_OFF_T])dnl
614 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
615 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
616 AC_REQUIRE([AC_FUNC_MMAP])dnl
618 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
619 unistd.h values.h sys/param.h])
620 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
621 __argz_count __argz_stringify __argz_next])
623 if test "${ac_cv_func_stpcpy+set}" != "set"; then
624 AC_CHECK_FUNCS(stpcpy)
626 if test "${ac_cv_func_stpcpy}" = "yes"; then
627 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
633 if test "x$CATOBJEXT" != "x"; then
634 if test "x$ALL_LINGUAS" = "x"; then
637 AC_MSG_CHECKING(for catalogs to be installed)
639 for lang in ${LINGUAS=$ALL_LINGUAS}; do
640 case "$ALL_LINGUAS" in
641 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
645 AC_MSG_RESULT($LINGUAS)
648 dnl Construct list of names of catalog files to be constructed.
649 if test -n "$LINGUAS"; then
650 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
654 dnl The reference to <locale.h> in the installed <libintl.h> file
655 dnl must be resolved because we cannot expect the users of this
656 dnl to define HAVE_LOCALE_H.
657 if test $ac_cv_header_locale_h = yes; then
658 INCLUDE_LOCALE_H="#include <locale.h>"
661 /* The system does not provide the header <locale.h>. Take care yourself. */"
663 AC_SUBST(INCLUDE_LOCALE_H)
665 dnl Determine which catalog format we have (if any is needed)
666 dnl For now we know about two different formats:
667 dnl Linux libc-5 and the normal X/Open format
668 if test -f $srcdir/po2tbl.sed.in; then
669 if test "$CATOBJEXT" = ".cat"; then
670 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
672 dnl Transform the SED scripts while copying because some dumb SEDs
673 dnl cannot handle comments.
674 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
676 dnl po2tbl.sed is always needed.
677 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
678 $srcdir/po2tbl.sed.in > po2tbl.sed
681 dnl In the intl/Makefile.in we have a special dependency which makes
682 dnl only sense for gettext. We comment this out for non-gettext
684 if test "$PACKAGE" = "gettext"; then
694 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
695 AC_SUBST(MKINSTALLDIRS)
697 dnl *** For now the libtool support in intl/Makefile is not for real.
701 dnl Generate list of files to be processed by xgettext which will
702 dnl be included in po/Makefile. But only do this if the po directory
703 dnl exists in srcdir.
704 if test -d $srcdir/po; then
705 test -d po || mkdir po
706 if test "x$srcdir" != "x."; then
707 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
708 posrcprefix="$srcdir/"
710 posrcprefix="../$srcdir/"
716 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
717 < $srcdir/po/POTFILES.in > po/POTFILES
721 # Search path for a program which passes the given test.
722 # Ulrich Drepper <drepper@cygnus.com>, 1996.
724 # This file file be copied and used freely without restrictions. It can
725 # be used in projects which are not available under the GNU Public License
726 # but which still want to provide support for the GNU gettext functionality.
727 # Please note that the actual code is *not* freely available.
731 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
732 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
733 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
734 [# Extract the first word of "$2", so it can be a program name with args.
735 set dummy $2; ac_word=[$]2
736 AC_MSG_CHECKING([for $ac_word])
737 AC_CACHE_VAL(ac_cv_path_$1,
740 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
743 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
744 for ac_dir in ifelse([$5], , $PATH, [$5]); do
745 test -z "$ac_dir" && ac_dir=.
746 if test -f $ac_dir/$ac_word; then
748 ac_cv_path_$1="$ac_dir/$ac_word"
754 dnl If no 4th arg is given, leave the cache variable unset,
755 dnl so AC_PATH_PROGS will keep looking.
756 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
761 if test -n "[$]$1"; then
769 # Check whether LC_MESSAGES is available in <locale.h>.
770 # Ulrich Drepper <drepper@cygnus.com>, 1995.
772 # This file file be copied and used freely without restrictions. It can
773 # be used in projects which are not available under the GNU Public License
774 # but which still want to provide support for the GNU gettext functionality.
775 # Please note that the actual code is *not* freely available.
779 AC_DEFUN(AM_LC_MESSAGES,
780 [if test $ac_cv_header_locale_h = yes; then
781 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
782 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
783 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
784 if test $am_cv_val_LC_MESSAGES = yes; then
785 AC_DEFINE(HAVE_LC_MESSAGES, 1,
786 [Define if your locale.h file contains LC_MESSAGES.])
790 # Add --enable-maintainer-mode option to configure.
795 AC_DEFUN(AM_MAINTAINER_MODE,
796 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
797 dnl maintainer-mode is disabled by default
798 AC_ARG_ENABLE(maintainer-mode,
799 [ --enable-maintainer-mode enable make rules and dependencies not useful
800 (and sometimes confusing) to the casual installer],
801 USE_MAINTAINER_MODE=$enableval,
802 USE_MAINTAINER_MODE=no)
803 AC_MSG_RESULT($USE_MAINTAINER_MODE)
804 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
805 MAINT=$MAINTAINER_MODE_TRUE
810 # Define a conditional.
812 AC_DEFUN(AM_CONDITIONAL,