2000-07-19 H.J. Lu <hjl@gnu.org>
[deliverable/binutils-gdb.git] / bfd / aclocal.m4
CommitLineData
252b5132
RH
1dnl aclocal.m4 generated automatically by aclocal 1.4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
14AC_DEFUN(BFD_BINARY_FOPEN,
15[AC_REQUIRE([AC_CANONICAL_SYSTEM])
16case "${host}" in
17changequote(,)dnl
855b0be7 18*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
252b5132
RH
19changequote([,])dnl
20 AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
21esac])dnl
22
23dnl Get a default for CC_FOR_BUILD to put into Makefile.
24AC_DEFUN(BFD_CC_FOR_BUILD,
25[# Put a plausible default for CC_FOR_BUILD in Makefile.
26if test -z "$CC_FOR_BUILD"; then
27 if test "x$cross_compiling" = "xno"; then
28 CC_FOR_BUILD='$(CC)'
29 else
30 CC_FOR_BUILD=gcc
31 fi
32fi
33AC_SUBST(CC_FOR_BUILD)
34# Also set EXEEXT_FOR_BUILD.
35if test "x$cross_compiling" = "xno"; then
36 EXEEXT_FOR_BUILD='$(EXEEXT)'
37else
38 AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
aab08431
ILT
39 [rm -f conftest*
40 echo 'int main () { return 0; }' > conftest.c
41 bfd_cv_build_exeext=
42 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
43 for file in conftest.*; do
44 case $file in
45 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
46 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
47 esac
48 done
49 rm -f conftest*
50 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
252b5132
RH
51 EXEEXT_FOR_BUILD=""
52 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
53fi
54AC_SUBST(EXEEXT_FOR_BUILD)])dnl
55
56dnl See whether we need a declaration for a function.
57AC_DEFUN(BFD_NEED_DECLARATION,
58[AC_MSG_CHECKING([whether $1 must be declared])
59AC_CACHE_VAL(bfd_cv_decl_needed_$1,
60[AC_TRY_COMPILE([
61#include <stdio.h>
62#ifdef HAVE_STRING_H
63#include <string.h>
64#else
65#ifdef HAVE_STRINGS_H
66#include <strings.h>
67#endif
68#endif
69#ifdef HAVE_STDLIB_H
70#include <stdlib.h>
71#endif
72#ifdef HAVE_UNISTD_H
73#include <unistd.h>
74#endif],
75[char *(*pfn) = (char *(*)) $1],
76bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
77AC_MSG_RESULT($bfd_cv_decl_needed_$1)
78if test $bfd_cv_decl_needed_$1 = yes; then
79 AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
80 [Define if $1 is not declared in system header files.])
81fi
82])dnl
83
84dnl Check for existence of a type $1 in sys/procfs.h
85
86AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE,
87[AC_MSG_CHECKING([for $1 in sys/procfs.h])
88 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1,
89 [AC_TRY_COMPILE([#include <sys/procfs.h>],
90 [$1 avar],
91 bfd_cv_have_sys_procfs_type_$1=yes,
92 bfd_cv_have_sys_procfs_type_$1=no
93 )])
94 if test $bfd_cv_have_sys_procfs_type_$1 = yes; then
95 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
96 [Define if <sys/procfs.h> has $1.])
97 fi
98 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1)
99])
100
101
102dnl Check for existence of member $2 in type $1 in sys/procfs.h
103
104AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER,
105[AC_MSG_CHECKING([for $1.$2 in sys/procfs.h])
106 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2,
107 [AC_TRY_COMPILE([#include <sys/procfs.h>],
108 [$1 avar; void* aref = (void*) &avar.$2],
109 bfd_cv_have_sys_procfs_type_member_$1_$2=yes,
110 bfd_cv_have_sys_procfs_type_member_$1_$2=no
111 )])
112 if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then
113 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1,
114 [Define if <sys/procfs.h> has $1.$2.])
115 fi
116 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
117])
118
119
120
121# Do all the work for Automake. This macro actually does too much --
122# some checks are only needed if your package does certain things.
123# But this isn't really a big deal.
124
125# serial 1
126
127dnl Usage:
128dnl AM_INIT_AUTOMAKE(package,version, [no-define])
129
130AC_DEFUN(AM_INIT_AUTOMAKE,
131[AC_REQUIRE([AC_PROG_INSTALL])
132PACKAGE=[$1]
133AC_SUBST(PACKAGE)
134VERSION=[$2]
135AC_SUBST(VERSION)
136dnl test to see if srcdir already configured
137if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
138 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
139fi
140ifelse([$3],,
141AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
142AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
143AC_REQUIRE([AM_SANITY_CHECK])
144AC_REQUIRE([AC_ARG_PROGRAM])
145dnl FIXME This is truly gross.
146missing_dir=`cd $ac_aux_dir && pwd`
147AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
148AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
149AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
150AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
151AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
152AC_REQUIRE([AC_PROG_MAKE_SET])])
153
154#
155# Check to make sure that the build environment is sane.
156#
157
158AC_DEFUN(AM_SANITY_CHECK,
159[AC_MSG_CHECKING([whether build environment is sane])
160# Just in case
161sleep 1
162echo timestamp > conftestfile
163# Do `set' in a subshell so we don't clobber the current shell's
164# arguments. Must try -L first in case configure is actually a
165# symlink; some systems play weird games with the mod time of symlinks
166# (eg FreeBSD returns the mod time of the symlink's containing
167# directory).
168if (
169 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
170 if test "[$]*" = "X"; then
171 # -L didn't work.
172 set X `ls -t $srcdir/configure conftestfile`
173 fi
174 if test "[$]*" != "X $srcdir/configure conftestfile" \
175 && test "[$]*" != "X conftestfile $srcdir/configure"; then
176
177 # If neither matched, then we have a broken ls. This can happen
178 # if, for instance, CONFIG_SHELL is bash and it inherits a
179 # broken ls alias from the environment. This has actually
180 # happened. Such a system could not be considered "sane".
181 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
182alias in your environment])
183 fi
184
185 test "[$]2" = conftestfile
186 )
187then
188 # Ok.
189 :
190else
191 AC_MSG_ERROR([newly created file is older than distributed files!
192Check your system clock])
193fi
194rm -f conftest*
195AC_MSG_RESULT(yes)])
196
197dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
198dnl The program must properly implement --version.
199AC_DEFUN(AM_MISSING_PROG,
200[AC_MSG_CHECKING(for working $2)
201# Run test in a subshell; some versions of sh will print an error if
202# an executable is not found, even if stderr is redirected.
203# Redirect stdin to placate older versions of autoconf. Sigh.
204if ($2 --version) < /dev/null > /dev/null 2>&1; then
205 $1=$2
206 AC_MSG_RESULT(found)
207else
208 $1="$3/missing $2"
209 AC_MSG_RESULT(missing)
210fi
211AC_SUBST($1)])
212
213
a74801ba 214# serial 40 AC_PROG_LIBTOOL
b2ef150d
ILT
215AC_DEFUN(AC_PROG_LIBTOOL,
216[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
217
218# Save cache, so that ltconfig can load it
219AC_CACHE_SAVE
220
221# Actually configure libtool. ac_aux_dir is where install-sh is found.
222CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
a74801ba
ILT
223LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
224LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
225DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
b2ef150d 226${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
289c596c 227$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
b2ef150d
ILT
228|| AC_MSG_ERROR([libtool configure failed])
229
230# Reload cache, that may have been modified by ltconfig
231AC_CACHE_LOAD
232
233# This can be used to rebuild libtool when needed
234LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
235
236# Always use our own libtool.
237LIBTOOL='$(SHELL) $(top_builddir)/libtool'
238AC_SUBST(LIBTOOL)dnl
239
240# Redirect the config.log output again, so that the ltconfig log is not
241# clobbered by the next message.
242exec 5>>./config.log
243])
244
245AC_DEFUN(AC_LIBTOOL_SETUP,
246[AC_PREREQ(2.13)dnl
247AC_REQUIRE([AC_ENABLE_SHARED])dnl
248AC_REQUIRE([AC_ENABLE_STATIC])dnl
249AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
252b5132
RH
250AC_REQUIRE([AC_CANONICAL_HOST])dnl
251AC_REQUIRE([AC_CANONICAL_BUILD])dnl
252AC_REQUIRE([AC_PROG_RANLIB])dnl
253AC_REQUIRE([AC_PROG_CC])dnl
b2ef150d
ILT
254AC_REQUIRE([AC_PROG_LD])dnl
255AC_REQUIRE([AC_PROG_NM])dnl
252b5132
RH
256AC_REQUIRE([AC_PROG_LN_S])dnl
257dnl
252b5132
RH
258
259# Check for any special flags to pass to ltconfig.
b2ef150d 260libtool_flags="--cache-file=$cache_file"
252b5132
RH
261test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
262test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
b2ef150d 263test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
252b5132
RH
264test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
265test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
a74801ba
ILT
266ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
267[libtool_flags="$libtool_flags --enable-dlopen"])
268ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
269[libtool_flags="$libtool_flags --enable-win32-dll"])
270AC_ARG_ENABLE(libtool-lock,
271 [ --disable-libtool-lock avoid locking (might break parallel builds)])
272test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
273test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
252b5132
RH
274
275# Some flags need to be propagated to the compiler or linker for good
276# libtool support.
289c596c 277case "$host" in
252b5132
RH
278*-*-irix6*)
279 # Find out which ABI we are using.
280 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
281 if AC_TRY_EVAL(ac_compile); then
282 case "`/usr/bin/file conftest.o`" in
283 *32-bit*)
284 LD="${LD-ld} -32"
285 ;;
286 *N32*)
287 LD="${LD-ld} -n32"
288 ;;
289 *64-bit*)
290 LD="${LD-ld} -64"
291 ;;
292 esac
293 fi
294 rm -rf conftest*
295 ;;
296
297*-*-sco3.2v5*)
298 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
b2ef150d 299 SAVE_CFLAGS="$CFLAGS"
252b5132 300 CFLAGS="$CFLAGS -belf"
b2ef150d
ILT
301 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
302 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
303 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
304 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
305 CFLAGS="$SAVE_CFLAGS"
306 fi
252b5132
RH
307 ;;
308
a74801ba
ILT
309ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
310[*-*-cygwin* | *-*-mingw*)
311 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
312 AC_CHECK_TOOL(AS, as, false)
313 AC_CHECK_TOOL(OBJDUMP, objdump, false)
252b5132 314 ;;
a74801ba 315])
252b5132 316esac
252b5132
RH
317])
318
a74801ba
ILT
319# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
320AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
321
322# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
323AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
b2ef150d
ILT
324
325# AC_ENABLE_SHARED - implement the --enable-shared flag
326# Usage: AC_ENABLE_SHARED[(DEFAULT)]
252b5132
RH
327# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
328# `yes'.
a74801ba
ILT
329AC_DEFUN(AC_ENABLE_SHARED, [dnl
330define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
252b5132
RH
331AC_ARG_ENABLE(shared,
332changequote(<<, >>)dnl
b2ef150d 333<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
252b5132
RH
334changequote([, ])dnl
335[p=${PACKAGE-default}
336case "$enableval" in
337yes) enable_shared=yes ;;
338no) enable_shared=no ;;
339*)
340 enable_shared=no
341 # Look at the argument we got. We use all the common list separators.
342 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
343 for pkg in $enableval; do
344 if test "X$pkg" = "X$p"; then
345 enable_shared=yes
346 fi
347 done
348 IFS="$ac_save_ifs"
349 ;;
350esac],
b2ef150d 351enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
252b5132
RH
352])
353
b2ef150d 354# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
a74801ba
ILT
355AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
356AC_ENABLE_SHARED(no)])
252b5132 357
b2ef150d
ILT
358# AC_ENABLE_STATIC - implement the --enable-static flag
359# Usage: AC_ENABLE_STATIC[(DEFAULT)]
252b5132
RH
360# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
361# `yes'.
a74801ba
ILT
362AC_DEFUN(AC_ENABLE_STATIC, [dnl
363define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
252b5132
RH
364AC_ARG_ENABLE(static,
365changequote(<<, >>)dnl
b2ef150d 366<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
252b5132
RH
367changequote([, ])dnl
368[p=${PACKAGE-default}
369case "$enableval" in
370yes) enable_static=yes ;;
371no) enable_static=no ;;
372*)
373 enable_static=no
374 # Look at the argument we got. We use all the common list separators.
375 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
376 for pkg in $enableval; do
377 if test "X$pkg" = "X$p"; then
378 enable_static=yes
379 fi
380 done
381 IFS="$ac_save_ifs"
382 ;;
383esac],
b2ef150d
ILT
384enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
385])
386
387# AC_DISABLE_STATIC - set the default static flag to --disable-static
a74801ba
ILT
388AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
389AC_ENABLE_STATIC(no)])
b2ef150d
ILT
390
391
392# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
393# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
394# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
395# `yes'.
a74801ba
ILT
396AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
397define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
b2ef150d
ILT
398AC_ARG_ENABLE(fast-install,
399changequote(<<, >>)dnl
400<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
401changequote([, ])dnl
402[p=${PACKAGE-default}
403case "$enableval" in
404yes) enable_fast_install=yes ;;
405no) enable_fast_install=no ;;
406*)
407 enable_fast_install=no
408 # Look at the argument we got. We use all the common list separators.
409 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
410 for pkg in $enableval; do
411 if test "X$pkg" = "X$p"; then
412 enable_fast_install=yes
413 fi
414 done
415 IFS="$ac_save_ifs"
416 ;;
417esac],
418enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
252b5132
RH
419])
420
b2ef150d 421# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
a74801ba
ILT
422AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
423AC_ENABLE_FAST_INSTALL(no)])
b2ef150d
ILT
424
425# AC_PROG_LD - find the path to the GNU or non-GNU linker
426AC_DEFUN(AC_PROG_LD,
252b5132
RH
427[AC_ARG_WITH(gnu-ld,
428[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
429test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
b2ef150d
ILT
430AC_REQUIRE([AC_PROG_CC])dnl
431AC_REQUIRE([AC_CANONICAL_HOST])dnl
432AC_REQUIRE([AC_CANONICAL_BUILD])dnl
252b5132
RH
433ac_prog=ld
434if test "$ac_cv_prog_gcc" = yes; then
435 # Check if gcc -print-prog-name=ld gives a path.
436 AC_MSG_CHECKING([for ld used by GCC])
437 ac_prog=`($CC -print-prog-name=ld) 2>&5`
438 case "$ac_prog" in
b2ef150d 439 # Accept absolute paths.
252b5132 440changequote(,)dnl
a74801ba 441 [\\/]* | [A-Za-z]:[\\/]*)
b2ef150d 442 re_direlt='/[^/][^/]*/\.\./'
252b5132 443changequote([,])dnl
b2ef150d
ILT
444 # Canonicalize the path of ld
445 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
446 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
447 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
448 done
449 test -z "$LD" && LD="$ac_prog"
450 ;;
252b5132
RH
451 "")
452 # If it fails, then pretend we aren't using GCC.
453 ac_prog=ld
454 ;;
455 *)
456 # If it is relative, then search for the first ld in PATH.
457 with_gnu_ld=unknown
458 ;;
459 esac
460elif test "$with_gnu_ld" = yes; then
461 AC_MSG_CHECKING([for GNU ld])
462else
463 AC_MSG_CHECKING([for non-GNU ld])
464fi
465AC_CACHE_VAL(ac_cv_path_LD,
466[if test -z "$LD"; then
a74801ba 467 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
252b5132
RH
468 for ac_dir in $PATH; do
469 test -z "$ac_dir" && ac_dir=.
a74801ba 470 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
252b5132
RH
471 ac_cv_path_LD="$ac_dir/$ac_prog"
472 # Check to see if the program is GNU ld. I'd rather use --version,
473 # but apparently some GNU ld's only accept -v.
474 # Break only if it was the GNU/non-GNU ld that we prefer.
475 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
476 test "$with_gnu_ld" != no && break
477 else
b2ef150d 478 test "$with_gnu_ld" != yes && break
252b5132
RH
479 fi
480 fi
481 done
482 IFS="$ac_save_ifs"
483else
484 ac_cv_path_LD="$LD" # Let the user override the test with a path.
485fi])
486LD="$ac_cv_path_LD"
487if test -n "$LD"; then
488 AC_MSG_RESULT($LD)
489else
490 AC_MSG_RESULT(no)
491fi
492test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
b2ef150d 493AC_PROG_LD_GNU
252b5132
RH
494])
495
b2ef150d 496AC_DEFUN(AC_PROG_LD_GNU,
252b5132
RH
497[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
498[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
499if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
500 ac_cv_prog_gnu_ld=yes
501else
502 ac_cv_prog_gnu_ld=no
503fi])
504])
505
b2ef150d
ILT
506# AC_PROG_NM - find the path to a BSD-compatible name lister
507AC_DEFUN(AC_PROG_NM,
252b5132
RH
508[AC_MSG_CHECKING([for BSD-compatible nm])
509AC_CACHE_VAL(ac_cv_path_NM,
510[if test -n "$NM"; then
511 # Let the user override the test.
512 ac_cv_path_NM="$NM"
513else
a74801ba 514 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
b2ef150d 515 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
252b5132 516 test -z "$ac_dir" && ac_dir=.
a74801ba 517 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
252b5132
RH
518 # Check to see if the nm accepts a BSD-compat flag.
519 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
520 # nm: unknown option "B" ignored
521 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
b2ef150d
ILT
522 ac_cv_path_NM="$ac_dir/nm -B"
523 break
252b5132 524 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
b2ef150d
ILT
525 ac_cv_path_NM="$ac_dir/nm -p"
526 break
252b5132 527 else
b2ef150d
ILT
528 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
529 continue # so that we can try to find one that supports BSD flags
252b5132 530 fi
252b5132
RH
531 fi
532 done
533 IFS="$ac_save_ifs"
534 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
535fi])
536NM="$ac_cv_path_NM"
537AC_MSG_RESULT([$NM])
252b5132
RH
538])
539
a74801ba
ILT
540# AC_CHECK_LIBM - check for math library
541AC_DEFUN(AC_CHECK_LIBM,
b2ef150d 542[AC_REQUIRE([AC_CANONICAL_HOST])dnl
a74801ba 543LIBM=
289c596c 544case "$host" in
a74801ba
ILT
545*-*-beos* | *-*-cygwin*)
546 # These system don't have libm
b2ef150d 547 ;;
a74801ba
ILT
548*-ncr-sysv4.3*)
549 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
550 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
b2ef150d 551 ;;
a74801ba
ILT
552*)
553 AC_CHECK_LIB(m, main, LIBM="-lm")
b2ef150d
ILT
554 ;;
555esac
b2ef150d
ILT
556])
557
558# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
559# the libltdl convenience library, adds --enable-ltdl-convenience to
560# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
561# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
562# to be `${top_builddir}/libltdl'. Make sure you start DIR with
563# '${top_builddir}/' (note the single quotes!) if your package is not
564# flat, and, if you're not using automake, define top_builddir as
565# appropriate in the Makefiles.
a74801ba 566AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
b2ef150d
ILT
567 case "$enable_ltdl_convenience" in
568 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
569 "") enable_ltdl_convenience=yes
570 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
571 esac
572 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
a74801ba 573 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
b2ef150d
ILT
574])
575
576# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
577# the libltdl installable library, and adds --enable-ltdl-install to
578# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
579# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
580# to be `${top_builddir}/libltdl'. Make sure you start DIR with
581# '${top_builddir}/' (note the single quotes!) if your package is not
582# flat, and, if you're not using automake, define top_builddir as
583# appropriate in the Makefiles.
584# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
a74801ba
ILT
585AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
586 AC_CHECK_LIB(ltdl, main,
587 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
588 [if test x"$enable_ltdl_install" = xno; then
589 AC_MSG_WARN([libltdl not installed, but installation disabled])
590 else
591 enable_ltdl_install=yes
592 fi
b2ef150d 593 ])
a74801ba
ILT
594 if test x"$enable_ltdl_install" = x"yes"; then
595 ac_configure_args="$ac_configure_args --enable-ltdl-install"
b2ef150d 596 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
a74801ba
ILT
597 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
598 else
599 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
600 LIBLTDL="-lltdl"
601 INCLTDL=
b2ef150d
ILT
602 fi
603])
604
605dnl old names
606AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
607AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
608AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
609AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
610AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
611AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
612AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
a74801ba
ILT
613
614dnl This is just to silence aclocal about the macro not being used
615ifelse([AC_DISABLE_FAST_INSTALL])dnl
b2ef150d 616
252b5132
RH
617# Like AC_CONFIG_HEADER, but automatically create stamp file.
618
619AC_DEFUN(AM_CONFIG_HEADER,
620[AC_PREREQ([2.12])
621AC_CONFIG_HEADER([$1])
622dnl When config.status generates a header, we must update the stamp-h file.
623dnl This file resides in the same directory as the config header
624dnl that is generated. We must strip everything past the first ":",
625dnl and everything past the last "/".
626AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
627ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
628<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
629<<am_indx=1
630for am_file in <<$1>>; do
631 case " <<$>>CONFIG_HEADERS " in
632 *" <<$>>am_file "*<<)>>
633 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
634 ;;
635 esac
636 am_indx=`expr "<<$>>am_indx" + 1`
637done<<>>dnl>>)
638changequote([,]))])
639
640# Add --enable-maintainer-mode option to configure.
641# From Jim Meyering
642
643# serial 1
644
645AC_DEFUN(AM_MAINTAINER_MODE,
646[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
647 dnl maintainer-mode is disabled by default
648 AC_ARG_ENABLE(maintainer-mode,
649[ --enable-maintainer-mode enable make rules and dependencies not useful
650 (and sometimes confusing) to the casual installer],
651 USE_MAINTAINER_MODE=$enableval,
652 USE_MAINTAINER_MODE=no)
653 AC_MSG_RESULT($USE_MAINTAINER_MODE)
654 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
655 MAINT=$MAINTAINER_MODE_TRUE
656 AC_SUBST(MAINT)dnl
657]
658)
659
660# Define a conditional.
661
662AC_DEFUN(AM_CONDITIONAL,
663[AC_SUBST($1_TRUE)
664AC_SUBST($1_FALSE)
665if $2; then
666 $1_TRUE=
667 $1_FALSE='#'
668else
669 $1_TRUE='#'
670 $1_FALSE=
671fi])
672
673# This file is derived from `gettext.m4'. The difference is that the
674# included macros assume Cygnus-style source and build trees.
675
676# Macro to add for using GNU gettext.
677# Ulrich Drepper <drepper@cygnus.com>, 1995.
678#
679# This file file be copied and used freely without restrictions. It can
680# be used in projects which are not available under the GNU Public License
681# but which still want to provide support for the GNU gettext functionality.
682# Please note that the actual code is *not* freely available.
683
684# serial 3
685
686AC_DEFUN(CY_WITH_NLS,
687 [AC_MSG_CHECKING([whether NLS is requested])
688 dnl Default is enabled NLS
689 AC_ARG_ENABLE(nls,
690 [ --disable-nls do not use Native Language Support],
691 USE_NLS=$enableval, USE_NLS=yes)
692 AC_MSG_RESULT($USE_NLS)
693 AC_SUBST(USE_NLS)
694
695 USE_INCLUDED_LIBINTL=no
696
697 dnl If we use NLS figure out what method
698 if test "$USE_NLS" = "yes"; then
699 AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
700 AC_MSG_CHECKING([whether included gettext is requested])
701 AC_ARG_WITH(included-gettext,
702 [ --with-included-gettext use the GNU gettext library included here],
703 nls_cv_force_use_gnu_gettext=$withval,
704 nls_cv_force_use_gnu_gettext=no)
705 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
706
707 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
708 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
709 dnl User does not insist on using GNU NLS library. Figure out what
710 dnl to use. If gettext or catgets are available (in this order) we
711 dnl use this. Else we have to fall back to GNU NLS library.
712 dnl catgets is only used if permitted by option --with-catgets.
713 nls_cv_header_intl=
714 nls_cv_header_libgt=
715 CATOBJEXT=NONE
716
717 AC_CHECK_HEADER(libintl.h,
718 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
719 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
720 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
721
722 if test "$gt_cv_func_gettext_libc" != "yes"; then
723 AC_CHECK_LIB(intl, bindtextdomain,
724 [AC_CACHE_CHECK([for gettext in libintl],
725 gt_cv_func_gettext_libintl,
726 [AC_TRY_LINK([], [return (int) gettext ("")],
727 gt_cv_func_gettext_libintl=yes,
728 gt_cv_func_gettext_libintl=no)])])
729 fi
730
731 if test "$gt_cv_func_gettext_libc" = "yes" \
732 || test "$gt_cv_func_gettext_libintl" = "yes"; then
733 AC_DEFINE(HAVE_GETTEXT, 1,
734 [Define as 1 if you have gettext and don't want to use GNU gettext.])
735 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
736 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
737 if test "$MSGFMT" != "no"; then
738 AC_CHECK_FUNCS(dcgettext)
739 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
740 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
741 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
742 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
743 return _nl_msg_cat_cntr],
744 [CATOBJEXT=.gmo
745 DATADIRNAME=share],
746 [CATOBJEXT=.mo
747 DATADIRNAME=lib])
748 INSTOBJEXT=.mo
749 fi
750 fi
751 ])
752
753 dnl In the standard gettext, we would now check for catgets.
754 dnl However, we never want to use catgets for our releases.
755
756 if test "$CATOBJEXT" = "NONE"; then
757 dnl Neither gettext nor catgets in included in the C library.
758 dnl Fall back on GNU gettext library.
759 nls_cv_use_gnu_gettext=yes
760 fi
761 fi
762
763 if test "$nls_cv_use_gnu_gettext" = "yes"; then
764 dnl Mark actions used to generate GNU NLS library.
765 INTLOBJS="\$(GETTOBJS)"
766 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
767 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
768 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
769 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
770 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
771 AC_SUBST(MSGFMT)
772 USE_INCLUDED_LIBINTL=yes
773 CATOBJEXT=.gmo
774 INSTOBJEXT=.mo
775 DATADIRNAME=share
776 INTLDEPS='$(top_builddir)/../intl/libintl.a'
777 INTLLIBS=$INTLDEPS
778 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
779 nls_cv_header_intl=libintl.h
780 nls_cv_header_libgt=libgettext.h
781 fi
782
783 dnl Test whether we really found GNU xgettext.
784 if test "$XGETTEXT" != ":"; then
785 dnl If it is no GNU xgettext we define it as : so that the
786 dnl Makefiles still can work.
787 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
788 : ;
789 else
790 AC_MSG_RESULT(
791 [found xgettext programs is not GNU xgettext; ignore it])
792 XGETTEXT=":"
793 fi
794 fi
795
796 # We need to process the po/ directory.
797 POSUB=po
798 else
799 DATADIRNAME=share
800 nls_cv_header_intl=libintl.h
801 nls_cv_header_libgt=libgettext.h
802 fi
803
804 # If this is used in GNU gettext we have to set USE_NLS to `yes'
805 # because some of the sources are only built for this goal.
806 if test "$PACKAGE" = gettext; then
807 USE_NLS=yes
808 USE_INCLUDED_LIBINTL=yes
809 fi
810
811 dnl These rules are solely for the distribution goal. While doing this
812 dnl we only have to keep exactly one list of the available catalogs
813 dnl in configure.in.
814 for lang in $ALL_LINGUAS; do
815 GMOFILES="$GMOFILES $lang.gmo"
816 POFILES="$POFILES $lang.po"
817 done
818
819 dnl Make all variables we use known to autoconf.
820 AC_SUBST(USE_INCLUDED_LIBINTL)
821 AC_SUBST(CATALOGS)
822 AC_SUBST(CATOBJEXT)
823 AC_SUBST(DATADIRNAME)
824 AC_SUBST(GMOFILES)
825 AC_SUBST(INSTOBJEXT)
826 AC_SUBST(INTLDEPS)
827 AC_SUBST(INTLLIBS)
828 AC_SUBST(INTLOBJS)
829 AC_SUBST(POFILES)
830 AC_SUBST(POSUB)
831 ])
832
833AC_DEFUN(CY_GNU_GETTEXT,
834 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
835 AC_REQUIRE([AC_PROG_CC])dnl
836 AC_REQUIRE([AC_PROG_RANLIB])dnl
837 AC_REQUIRE([AC_ISC_POSIX])dnl
838 AC_REQUIRE([AC_HEADER_STDC])dnl
839 AC_REQUIRE([AC_C_CONST])dnl
840 AC_REQUIRE([AC_C_INLINE])dnl
841 AC_REQUIRE([AC_TYPE_OFF_T])dnl
842 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
843 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
844 AC_REQUIRE([AC_FUNC_MMAP])dnl
845
846 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
847unistd.h values.h sys/param.h])
848 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
849__argz_count __argz_stringify __argz_next])
850
851 if test "${ac_cv_func_stpcpy+set}" != "set"; then
852 AC_CHECK_FUNCS(stpcpy)
853 fi
854 if test "${ac_cv_func_stpcpy}" = "yes"; then
855 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
856 fi
857
858 AM_LC_MESSAGES
859 CY_WITH_NLS
860
861 if test "x$CATOBJEXT" != "x"; then
862 if test "x$ALL_LINGUAS" = "x"; then
863 LINGUAS=
864 else
865 AC_MSG_CHECKING(for catalogs to be installed)
866 NEW_LINGUAS=
867 for lang in ${LINGUAS=$ALL_LINGUAS}; do
868 case "$ALL_LINGUAS" in
869 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
870 esac
871 done
872 LINGUAS=$NEW_LINGUAS
873 AC_MSG_RESULT($LINGUAS)
874 fi
875
876 dnl Construct list of names of catalog files to be constructed.
877 if test -n "$LINGUAS"; then
878 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
879 fi
880 fi
881
882 dnl The reference to <locale.h> in the installed <libintl.h> file
883 dnl must be resolved because we cannot expect the users of this
884 dnl to define HAVE_LOCALE_H.
885 if test $ac_cv_header_locale_h = yes; then
886 INCLUDE_LOCALE_H="#include <locale.h>"
887 else
888 INCLUDE_LOCALE_H="\
889/* The system does not provide the header <locale.h>. Take care yourself. */"
890 fi
891 AC_SUBST(INCLUDE_LOCALE_H)
892
893 dnl Determine which catalog format we have (if any is needed)
894 dnl For now we know about two different formats:
895 dnl Linux libc-5 and the normal X/Open format
896 if test -f $srcdir/po2tbl.sed.in; then
897 if test "$CATOBJEXT" = ".cat"; then
898 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
899
900 dnl Transform the SED scripts while copying because some dumb SEDs
901 dnl cannot handle comments.
902 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
903 fi
904 dnl po2tbl.sed is always needed.
905 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
906 $srcdir/po2tbl.sed.in > po2tbl.sed
907 fi
908
909 dnl In the intl/Makefile.in we have a special dependency which makes
910 dnl only sense for gettext. We comment this out for non-gettext
911 dnl packages.
912 if test "$PACKAGE" = "gettext"; then
913 GT_NO="#NO#"
914 GT_YES=
915 else
916 GT_NO=
917 GT_YES="#YES#"
918 fi
919 AC_SUBST(GT_NO)
920 AC_SUBST(GT_YES)
921
922 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
923 AC_SUBST(MKINSTALLDIRS)
924
925 dnl *** For now the libtool support in intl/Makefile is not for real.
926 l=
927 AC_SUBST(l)
928
929 dnl Generate list of files to be processed by xgettext which will
930 dnl be included in po/Makefile. But only do this if the po directory
931 dnl exists in srcdir.
932 if test -d $srcdir/po; then
933 test -d po || mkdir po
934 if test "x$srcdir" != "x."; then
935 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
936 posrcprefix="$srcdir/"
937 else
938 posrcprefix="../$srcdir/"
939 fi
940 else
941 posrcprefix="../"
942 fi
943 rm -f po/POTFILES
944 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
945 < $srcdir/po/POTFILES.in > po/POTFILES
946 fi
947 ])
948
949# Search path for a program which passes the given test.
950# Ulrich Drepper <drepper@cygnus.com>, 1996.
951#
952# This file file be copied and used freely without restrictions. It can
953# be used in projects which are not available under the GNU Public License
954# but which still want to provide support for the GNU gettext functionality.
955# Please note that the actual code is *not* freely available.
956
957# serial 1
958
959dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
960dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
961AC_DEFUN(AM_PATH_PROG_WITH_TEST,
962[# Extract the first word of "$2", so it can be a program name with args.
963set dummy $2; ac_word=[$]2
964AC_MSG_CHECKING([for $ac_word])
965AC_CACHE_VAL(ac_cv_path_$1,
966[case "[$]$1" in
967 /*)
968 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
969 ;;
970 *)
971 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
972 for ac_dir in ifelse([$5], , $PATH, [$5]); do
973 test -z "$ac_dir" && ac_dir=.
974 if test -f $ac_dir/$ac_word; then
975 if [$3]; then
976 ac_cv_path_$1="$ac_dir/$ac_word"
977 break
978 fi
979 fi
980 done
981 IFS="$ac_save_ifs"
982dnl If no 4th arg is given, leave the cache variable unset,
983dnl so AC_PATH_PROGS will keep looking.
984ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
985])dnl
986 ;;
987esac])dnl
988$1="$ac_cv_path_$1"
989if test -n "[$]$1"; then
990 AC_MSG_RESULT([$]$1)
991else
992 AC_MSG_RESULT(no)
993fi
994AC_SUBST($1)dnl
995])
996
997# Check whether LC_MESSAGES is available in <locale.h>.
998# Ulrich Drepper <drepper@cygnus.com>, 1995.
999#
1000# This file file be copied and used freely without restrictions. It can
1001# be used in projects which are not available under the GNU Public License
1002# but which still want to provide support for the GNU gettext functionality.
1003# Please note that the actual code is *not* freely available.
1004
1005# serial 1
1006
1007AC_DEFUN(AM_LC_MESSAGES,
1008 [if test $ac_cv_header_locale_h = yes; then
1009 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1010 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1011 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1012 if test $am_cv_val_LC_MESSAGES = yes; then
1013 AC_DEFINE(HAVE_LC_MESSAGES, 1,
1014 [Define if your locale.h file contains LC_MESSAGES.])
1015 fi
1016 fi])
1017
This page took 0.088625 seconds and 4 git commands to generate.