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 See whether we need to use fopen-bin.h rather than fopen-same.h.
14 AC_DEFUN(BFD_BINARY_FOPEN,
15 [AC_REQUIRE([AC_CANONICAL_SYSTEM])
18 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows)
20 AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
23 dnl Get a default for CC_FOR_BUILD to put into Makefile.
24 AC_DEFUN(BFD_CC_FOR_BUILD,
25 [# Put a plausible default for CC_FOR_BUILD in Makefile.
26 if test -z "$CC_FOR_BUILD"; then
27 if test "x$cross_compiling" = "xno"; then
33 AC_SUBST(CC_FOR_BUILD)
34 # Also set EXEEXT_FOR_BUILD.
35 if test "x$cross_compiling" = "xno"; then
36 EXEEXT_FOR_BUILD='$(EXEEXT)'
38 AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
39 [cat > ac_c_test.c << 'EOF'
41 /* Nothing needed here */
44 ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
45 bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
47 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
49 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
51 AC_SUBST(EXEEXT_FOR_BUILD)])dnl
53 dnl See whether we need a declaration for a function.
54 AC_DEFUN(BFD_NEED_DECLARATION,
55 [AC_MSG_CHECKING([whether $1 must be declared])
56 AC_CACHE_VAL(bfd_cv_decl_needed_$1,
72 [char *(*pfn) = (char *(*)) $1],
73 bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
74 AC_MSG_RESULT($bfd_cv_decl_needed_$1)
75 if test $bfd_cv_decl_needed_$1 = yes; then
76 AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
77 [Define if $1 is not declared in system header files.])
81 dnl Check for existence of a type $1 in sys/procfs.h
83 AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE,
84 [AC_MSG_CHECKING([for $1 in sys/procfs.h])
85 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1,
86 [AC_TRY_COMPILE([#include <sys/procfs.h>],
88 bfd_cv_have_sys_procfs_type_$1=yes,
89 bfd_cv_have_sys_procfs_type_$1=no
91 if test $bfd_cv_have_sys_procfs_type_$1 = yes; then
92 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
93 [Define if <sys/procfs.h> has $1.])
95 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1)
99 dnl Check for existence of member $2 in type $1 in sys/procfs.h
101 AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER,
102 [AC_MSG_CHECKING([for $1.$2 in sys/procfs.h])
103 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2,
104 [AC_TRY_COMPILE([#include <sys/procfs.h>],
105 [$1 avar; void* aref = (void*) &avar.$2],
106 bfd_cv_have_sys_procfs_type_member_$1_$2=yes,
107 bfd_cv_have_sys_procfs_type_member_$1_$2=no
109 if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then
110 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1,
111 [Define if <sys/procfs.h> has $1.$2.])
113 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
118 # Do all the work for Automake. This macro actually does too much --
119 # some checks are only needed if your package does certain things.
120 # But this isn't really a big deal.
125 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
127 AC_DEFUN(AM_INIT_AUTOMAKE,
128 [AC_REQUIRE([AC_PROG_INSTALL])
133 dnl test to see if srcdir already configured
134 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
135 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
138 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
139 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
140 AC_REQUIRE([AM_SANITY_CHECK])
141 AC_REQUIRE([AC_ARG_PROGRAM])
142 dnl FIXME This is truly gross.
143 missing_dir=`cd $ac_aux_dir && pwd`
144 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
145 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
146 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
147 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
148 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
149 AC_REQUIRE([AC_PROG_MAKE_SET])])
152 # Check to make sure that the build environment is sane.
155 AC_DEFUN(AM_SANITY_CHECK,
156 [AC_MSG_CHECKING([whether build environment is sane])
159 echo timestamp > conftestfile
160 # Do `set' in a subshell so we don't clobber the current shell's
161 # arguments. Must try -L first in case configure is actually a
162 # symlink; some systems play weird games with the mod time of symlinks
163 # (eg FreeBSD returns the mod time of the symlink's containing
166 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
167 if test "[$]*" = "X"; then
169 set X `ls -t $srcdir/configure conftestfile`
171 if test "[$]*" != "X $srcdir/configure conftestfile" \
172 && test "[$]*" != "X conftestfile $srcdir/configure"; then
174 # If neither matched, then we have a broken ls. This can happen
175 # if, for instance, CONFIG_SHELL is bash and it inherits a
176 # broken ls alias from the environment. This has actually
177 # happened. Such a system could not be considered "sane".
178 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
179 alias in your environment])
182 test "[$]2" = conftestfile
188 AC_MSG_ERROR([newly created file is older than distributed files!
189 Check your system clock])
194 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
195 dnl The program must properly implement --version.
196 AC_DEFUN(AM_MISSING_PROG,
197 [AC_MSG_CHECKING(for working $2)
198 # Run test in a subshell; some versions of sh will print an error if
199 # an executable is not found, even if stderr is redirected.
200 # Redirect stdin to placate older versions of autoconf. Sigh.
201 if ($2 --version) < /dev/null > /dev/null 2>&1; then
206 AC_MSG_RESULT(missing)
211 # serial 25 AM_PROG_LIBTOOL
212 AC_DEFUN(AM_PROG_LIBTOOL,
213 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
214 AC_REQUIRE([AM_ENABLE_STATIC])dnl
215 AC_REQUIRE([AC_CANONICAL_HOST])dnl
216 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
217 AC_REQUIRE([AC_PROG_RANLIB])dnl
218 AC_REQUIRE([AC_PROG_CC])dnl
219 AC_REQUIRE([AM_PROG_LD])dnl
220 AC_REQUIRE([AM_PROG_NM])dnl
221 AC_REQUIRE([AC_PROG_LN_S])dnl
223 # Always use our own libtool.
224 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
227 # Check for any special flags to pass to ltconfig.
229 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
230 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
231 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
232 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
233 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
235 # Some flags need to be propagated to the compiler or linker for good
239 # Find out which ABI we are using.
240 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
241 if AC_TRY_EVAL(ac_compile); then
242 case "`/usr/bin/file conftest.o`" in
258 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
259 CFLAGS="$CFLAGS -belf"
263 AM_SYS_LIBTOOL_CYGWIN
268 # Actually configure libtool. ac_aux_dir is where install-sh is found.
269 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
270 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
271 DLLTOOL="$DLLTOOL" AS="$AS" \
272 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
273 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
274 || AC_MSG_ERROR([libtool configure failed])
276 # Redirect the config.log output again, so that the ltconfig log is not
277 # clobbered by the next message.
281 # AM_ENABLE_SHARED - implement the --enable-shared flag
282 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
283 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
285 AC_DEFUN(AM_ENABLE_SHARED,
286 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
287 AC_ARG_ENABLE(shared,
288 changequote(<<, >>)dnl
289 << --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
291 [p=${PACKAGE-default}
293 yes) enable_shared=yes ;;
294 no) enable_shared=no ;;
297 # Look at the argument we got. We use all the common list separators.
298 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
299 for pkg in $enableval; do
300 if test "X$pkg" = "X$p"; then
307 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
310 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
311 AC_DEFUN(AM_DISABLE_SHARED,
312 [AM_ENABLE_SHARED(no)])
314 # AM_DISABLE_STATIC - set the default static flag to --disable-static
315 AC_DEFUN(AM_DISABLE_STATIC,
316 [AM_ENABLE_STATIC(no)])
318 # AM_ENABLE_STATIC - implement the --enable-static flag
319 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
320 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
322 AC_DEFUN(AM_ENABLE_STATIC,
323 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
324 AC_ARG_ENABLE(static,
325 changequote(<<, >>)dnl
326 << --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
328 [p=${PACKAGE-default}
330 yes) enable_static=yes ;;
331 no) enable_static=no ;;
334 # Look at the argument we got. We use all the common list separators.
335 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
336 for pkg in $enableval; do
337 if test "X$pkg" = "X$p"; then
344 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
348 # AM_PROG_LD - find the path to the GNU or non-GNU linker
351 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
352 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
353 AC_REQUIRE([AC_PROG_CC])
355 if test "$ac_cv_prog_gcc" = yes; then
356 # Check if gcc -print-prog-name=ld gives a path.
357 AC_MSG_CHECKING([for ld used by GCC])
358 ac_prog=`($CC -print-prog-name=ld) 2>&5`
360 # Accept absolute paths.
364 test -z "$LD" && LD="$ac_prog"
367 # If it fails, then pretend we aren't using GCC.
371 # If it is relative, then search for the first ld in PATH.
375 elif test "$with_gnu_ld" = yes; then
376 AC_MSG_CHECKING([for GNU ld])
378 AC_MSG_CHECKING([for non-GNU ld])
380 AC_CACHE_VAL(ac_cv_path_LD,
381 [if test -z "$LD"; then
382 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
383 for ac_dir in $PATH; do
384 test -z "$ac_dir" && ac_dir=.
385 if test -f "$ac_dir/$ac_prog"; then
386 ac_cv_path_LD="$ac_dir/$ac_prog"
387 # Check to see if the program is GNU ld. I'd rather use --version,
388 # but apparently some GNU ld's only accept -v.
389 # Break only if it was the GNU/non-GNU ld that we prefer.
390 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
391 test "$with_gnu_ld" != no && break
393 test "$with_gnu_ld" != yes && break
399 ac_cv_path_LD="$LD" # Let the user override the test with a path.
402 if test -n "$LD"; then
407 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
412 AC_DEFUN(AM_PROG_LD_GNU,
413 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
414 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
415 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
416 ac_cv_prog_gnu_ld=yes
422 # AM_PROG_NM - find the path to a BSD-compatible name lister
424 [AC_MSG_CHECKING([for BSD-compatible nm])
425 AC_CACHE_VAL(ac_cv_path_NM,
426 [if test -n "$NM"; then
427 # Let the user override the test.
430 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
431 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
432 test -z "$ac_dir" && ac_dir=.
433 if test -f $ac_dir/nm; then
434 # Check to see if the nm accepts a BSD-compat flag.
435 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
436 # nm: unknown option "B" ignored
437 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
438 ac_cv_path_NM="$ac_dir/nm -B"
439 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
440 ac_cv_path_NM="$ac_dir/nm -p"
442 ac_cv_path_NM="$ac_dir/nm"
448 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
455 # AM_SYS_LIBTOOL_CYGWIN - find tools needed on cygwin
456 AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN,
457 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
458 AC_CHECK_TOOL(AS, as, false)
461 # Like AC_CONFIG_HEADER, but automatically create stamp file.
463 AC_DEFUN(AM_CONFIG_HEADER,
465 AC_CONFIG_HEADER([$1])
466 dnl When config.status generates a header, we must update the stamp-h file.
467 dnl This file resides in the same directory as the config header
468 dnl that is generated. We must strip everything past the first ":",
469 dnl and everything past the last "/".
470 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
471 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
472 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
474 for am_file in <<$1>>; do
475 case " <<$>>CONFIG_HEADERS " in
476 *" <<$>>am_file "*<<)>>
477 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
480 am_indx=`expr "<<$>>am_indx" + 1`
484 # Add --enable-maintainer-mode option to configure.
489 AC_DEFUN(AM_MAINTAINER_MODE,
490 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
491 dnl maintainer-mode is disabled by default
492 AC_ARG_ENABLE(maintainer-mode,
493 [ --enable-maintainer-mode enable make rules and dependencies not useful
494 (and sometimes confusing) to the casual installer],
495 USE_MAINTAINER_MODE=$enableval,
496 USE_MAINTAINER_MODE=no)
497 AC_MSG_RESULT($USE_MAINTAINER_MODE)
498 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
499 MAINT=$MAINTAINER_MODE_TRUE
504 # Define a conditional.
506 AC_DEFUN(AM_CONDITIONAL,
517 # This file is derived from `gettext.m4'. The difference is that the
518 # included macros assume Cygnus-style source and build trees.
520 # Macro to add for using GNU gettext.
521 # Ulrich Drepper <drepper@cygnus.com>, 1995.
523 # This file file be copied and used freely without restrictions. It can
524 # be used in projects which are not available under the GNU Public License
525 # but which still want to provide support for the GNU gettext functionality.
526 # Please note that the actual code is *not* freely available.
530 AC_DEFUN(CY_WITH_NLS,
531 [AC_MSG_CHECKING([whether NLS is requested])
532 dnl Default is enabled NLS
534 [ --disable-nls do not use Native Language Support],
535 USE_NLS=$enableval, USE_NLS=yes)
536 AC_MSG_RESULT($USE_NLS)
539 USE_INCLUDED_LIBINTL=no
541 dnl If we use NLS figure out what method
542 if test "$USE_NLS" = "yes"; then
543 AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
544 AC_MSG_CHECKING([whether included gettext is requested])
545 AC_ARG_WITH(included-gettext,
546 [ --with-included-gettext use the GNU gettext library included here],
547 nls_cv_force_use_gnu_gettext=$withval,
548 nls_cv_force_use_gnu_gettext=no)
549 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
551 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
552 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
553 dnl User does not insist on using GNU NLS library. Figure out what
554 dnl to use. If gettext or catgets are available (in this order) we
555 dnl use this. Else we have to fall back to GNU NLS library.
556 dnl catgets is only used if permitted by option --with-catgets.
561 AC_CHECK_HEADER(libintl.h,
562 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
563 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
564 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
566 if test "$gt_cv_func_gettext_libc" != "yes"; then
567 AC_CHECK_LIB(intl, bindtextdomain,
568 [AC_CACHE_CHECK([for gettext in libintl],
569 gt_cv_func_gettext_libintl,
570 [AC_TRY_LINK([], [return (int) gettext ("")],
571 gt_cv_func_gettext_libintl=yes,
572 gt_cv_func_gettext_libintl=no)])])
575 if test "$gt_cv_func_gettext_libc" = "yes" \
576 || test "$gt_cv_func_gettext_libintl" = "yes"; then
577 AC_DEFINE(HAVE_GETTEXT, 1,
578 [Define as 1 if you have gettext and don't want to use GNU gettext.])
579 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
580 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
581 if test "$MSGFMT" != "no"; then
582 AC_CHECK_FUNCS(dcgettext)
583 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
584 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
585 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
586 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
587 return _nl_msg_cat_cntr],
597 dnl In the standard gettext, we would now check for catgets.
598 dnl However, we never want to use catgets for our releases.
600 if test "$CATOBJEXT" = "NONE"; then
601 dnl Neither gettext nor catgets in included in the C library.
602 dnl Fall back on GNU gettext library.
603 nls_cv_use_gnu_gettext=yes
607 if test "$nls_cv_use_gnu_gettext" = "yes"; then
608 dnl Mark actions used to generate GNU NLS library.
609 INTLOBJS="\$(GETTOBJS)"
610 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
611 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
612 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
613 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
614 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
616 USE_INCLUDED_LIBINTL=yes
620 INTLDEPS='$(top_builddir)/../intl/libintl.a'
622 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
623 nls_cv_header_intl=libintl.h
624 nls_cv_header_libgt=libgettext.h
627 dnl Test whether we really found GNU xgettext.
628 if test "$XGETTEXT" != ":"; then
629 dnl If it is no GNU xgettext we define it as : so that the
630 dnl Makefiles still can work.
631 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
635 [found xgettext programs is not GNU xgettext; ignore it])
640 # We need to process the po/ directory.
644 nls_cv_header_intl=libintl.h
645 nls_cv_header_libgt=libgettext.h
648 # If this is used in GNU gettext we have to set USE_NLS to `yes'
649 # because some of the sources are only built for this goal.
650 if test "$PACKAGE" = gettext; then
652 USE_INCLUDED_LIBINTL=yes
655 dnl These rules are solely for the distribution goal. While doing this
656 dnl we only have to keep exactly one list of the available catalogs
658 for lang in $ALL_LINGUAS; do
659 GMOFILES="$GMOFILES $lang.gmo"
660 POFILES="$POFILES $lang.po"
663 dnl Make all variables we use known to autoconf.
664 AC_SUBST(USE_INCLUDED_LIBINTL)
667 AC_SUBST(DATADIRNAME)
677 AC_DEFUN(CY_GNU_GETTEXT,
678 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
679 AC_REQUIRE([AC_PROG_CC])dnl
680 AC_REQUIRE([AC_PROG_RANLIB])dnl
681 AC_REQUIRE([AC_ISC_POSIX])dnl
682 AC_REQUIRE([AC_HEADER_STDC])dnl
683 AC_REQUIRE([AC_C_CONST])dnl
684 AC_REQUIRE([AC_C_INLINE])dnl
685 AC_REQUIRE([AC_TYPE_OFF_T])dnl
686 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
687 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
688 AC_REQUIRE([AC_FUNC_MMAP])dnl
690 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
691 unistd.h values.h sys/param.h])
692 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
693 __argz_count __argz_stringify __argz_next])
695 if test "${ac_cv_func_stpcpy+set}" != "set"; then
696 AC_CHECK_FUNCS(stpcpy)
698 if test "${ac_cv_func_stpcpy}" = "yes"; then
699 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
705 if test "x$CATOBJEXT" != "x"; then
706 if test "x$ALL_LINGUAS" = "x"; then
709 AC_MSG_CHECKING(for catalogs to be installed)
711 for lang in ${LINGUAS=$ALL_LINGUAS}; do
712 case "$ALL_LINGUAS" in
713 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
717 AC_MSG_RESULT($LINGUAS)
720 dnl Construct list of names of catalog files to be constructed.
721 if test -n "$LINGUAS"; then
722 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
726 dnl The reference to <locale.h> in the installed <libintl.h> file
727 dnl must be resolved because we cannot expect the users of this
728 dnl to define HAVE_LOCALE_H.
729 if test $ac_cv_header_locale_h = yes; then
730 INCLUDE_LOCALE_H="#include <locale.h>"
733 /* The system does not provide the header <locale.h>. Take care yourself. */"
735 AC_SUBST(INCLUDE_LOCALE_H)
737 dnl Determine which catalog format we have (if any is needed)
738 dnl For now we know about two different formats:
739 dnl Linux libc-5 and the normal X/Open format
740 if test -f $srcdir/po2tbl.sed.in; then
741 if test "$CATOBJEXT" = ".cat"; then
742 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
744 dnl Transform the SED scripts while copying because some dumb SEDs
745 dnl cannot handle comments.
746 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
748 dnl po2tbl.sed is always needed.
749 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
750 $srcdir/po2tbl.sed.in > po2tbl.sed
753 dnl In the intl/Makefile.in we have a special dependency which makes
754 dnl only sense for gettext. We comment this out for non-gettext
756 if test "$PACKAGE" = "gettext"; then
766 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
767 AC_SUBST(MKINSTALLDIRS)
769 dnl *** For now the libtool support in intl/Makefile is not for real.
773 dnl Generate list of files to be processed by xgettext which will
774 dnl be included in po/Makefile. But only do this if the po directory
775 dnl exists in srcdir.
776 if test -d $srcdir/po; then
777 test -d po || mkdir po
778 if test "x$srcdir" != "x."; then
779 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
780 posrcprefix="$srcdir/"
782 posrcprefix="../$srcdir/"
788 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
789 < $srcdir/po/POTFILES.in > po/POTFILES
793 # Search path for a program which passes the given test.
794 # Ulrich Drepper <drepper@cygnus.com>, 1996.
796 # This file file be copied and used freely without restrictions. It can
797 # be used in projects which are not available under the GNU Public License
798 # but which still want to provide support for the GNU gettext functionality.
799 # Please note that the actual code is *not* freely available.
803 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
804 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
805 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
806 [# Extract the first word of "$2", so it can be a program name with args.
807 set dummy $2; ac_word=[$]2
808 AC_MSG_CHECKING([for $ac_word])
809 AC_CACHE_VAL(ac_cv_path_$1,
812 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
815 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
816 for ac_dir in ifelse([$5], , $PATH, [$5]); do
817 test -z "$ac_dir" && ac_dir=.
818 if test -f $ac_dir/$ac_word; then
820 ac_cv_path_$1="$ac_dir/$ac_word"
826 dnl If no 4th arg is given, leave the cache variable unset,
827 dnl so AC_PATH_PROGS will keep looking.
828 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
833 if test -n "[$]$1"; then
841 # Check whether LC_MESSAGES is available in <locale.h>.
842 # Ulrich Drepper <drepper@cygnus.com>, 1995.
844 # This file file be copied and used freely without restrictions. It can
845 # be used in projects which are not available under the GNU Public License
846 # but which still want to provide support for the GNU gettext functionality.
847 # Please note that the actual code is *not* freely available.
851 AC_DEFUN(AM_LC_MESSAGES,
852 [if test $ac_cv_header_locale_h = yes; then
853 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
854 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
855 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
856 if test $am_cv_val_LC_MESSAGES = yes; then
857 AC_DEFINE(HAVE_LC_MESSAGES, 1,
858 [Define if your locale.h file contains LC_MESSAGES.])