* ltconfig, ltmain.sh: Update to libtool 1.3.4.
[deliverable/binutils-gdb.git] / gas / 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 GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
14AC_DEFUN(GAS_CHECK_DECL_NEEDED,[
15AC_MSG_CHECKING(whether declaration is required for $1)
16AC_CACHE_VAL(gas_cv_decl_needed_$1,
17AC_TRY_LINK([$4],
18[
19typedef $3;
20$2 x;
21x = ($2) $1;
22], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
23AC_MSG_RESULT($gas_cv_decl_needed_$1)
24if 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.])
27fi
28])dnl
29dnl
30dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad
31dnl enough, but on some of those systems, the assert macro relies on requoting
32dnl working properly!
33dnl GAS_WORKING_ASSERT
34AC_DEFUN(GAS_WORKING_ASSERT,
35[AC_MSG_CHECKING([for working assert macro])
36AC_CACHE_VAL(gas_cv_assert_ok,
37AC_TRY_LINK([#include <assert.h>
38#include <stdio.h>], [
39/* check for requoting problems */
40static int a, b, c, d;
41static char *s;
42assert (!strcmp(s, "foo bar baz quux"));
43/* check for newline handling */
44assert (a == b
45 || c == d);
46], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
47AC_MSG_RESULT($gas_cv_assert_ok)
48test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT, 1, [assert broken?])
49])dnl
50dnl
51dnl Since many Bourne shell implementations lack subroutines, use this
52dnl hack to simplify the code in configure.in.
53dnl GAS_UNIQ(listvar)
54AC_DEFUN(GAS_UNIQ,
55[_gas_uniq_list="[$]$1"
56_gas_uniq_newlist=""
57dnl Protect against empty input list.
58for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
59 case [$]_gas_uniq_i in
60 _gas_uniq_dummy) ;;
61 *) case " [$]_gas_uniq_newlist " in
62 *" [$]_gas_uniq_i "*) ;;
63 *) _gas_uniq_newlist="[$]_gas_uniq_newlist [$]_gas_uniq_i" ;;
64 esac ;;
65 esac
66done
67$1=[$]_gas_uniq_newlist
68])dnl
69
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.
73
74# serial 1
75
76dnl Usage:
77dnl AM_INIT_AUTOMAKE(package,version, [no-define])
78
79AC_DEFUN(AM_INIT_AUTOMAKE,
80[AC_REQUIRE([AC_PROG_INSTALL])
81PACKAGE=[$1]
82AC_SUBST(PACKAGE)
83VERSION=[$2]
84AC_SUBST(VERSION)
85dnl test to see if srcdir already configured
86if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
87 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
88fi
89ifelse([$3],,
90AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
91AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
92AC_REQUIRE([AM_SANITY_CHECK])
93AC_REQUIRE([AC_ARG_PROGRAM])
94dnl FIXME This is truly gross.
95missing_dir=`cd $ac_aux_dir && pwd`
96AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
97AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
98AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
99AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
100AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
101AC_REQUIRE([AC_PROG_MAKE_SET])])
102
103#
104# Check to make sure that the build environment is sane.
105#
106
107AC_DEFUN(AM_SANITY_CHECK,
108[AC_MSG_CHECKING([whether build environment is sane])
109# Just in case
110sleep 1
111echo 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
116# directory).
117if (
118 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
119 if test "[$]*" = "X"; then
120 # -L didn't work.
121 set X `ls -t $srcdir/configure conftestfile`
122 fi
123 if test "[$]*" != "X $srcdir/configure conftestfile" \
124 && test "[$]*" != "X conftestfile $srcdir/configure"; then
125
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
131alias in your environment])
132 fi
133
134 test "[$]2" = conftestfile
135 )
136then
137 # Ok.
138 :
139else
140 AC_MSG_ERROR([newly created file is older than distributed files!
141Check your system clock])
142fi
143rm -f conftest*
144AC_MSG_RESULT(yes)])
145
146dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
147dnl The program must properly implement --version.
148AC_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.
153if ($2 --version) < /dev/null > /dev/null 2>&1; then
154 $1=$2
155 AC_MSG_RESULT(found)
156else
157 $1="$3/missing $2"
158 AC_MSG_RESULT(missing)
159fi
160AC_SUBST($1)])
161
162
bedf545c
ILT
163# serial 35 AC_PROG_LIBTOOL
164AC_DEFUN(AC_PROG_LIBTOOL,
165[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
166
167# Save cache, so that ltconfig can load it
168AC_CACHE_SAVE
169
170# Actually configure libtool. ac_aux_dir is where install-sh is found.
171CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
172LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
173DLLTOOL="$DLLTOOL" AS="$AS" \
174${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
175$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
176|| AC_MSG_ERROR([libtool configure failed])
177
178# Reload cache, that may have been modified by ltconfig
179AC_CACHE_LOAD
180
181# This can be used to rebuild libtool when needed
182LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
183
184# Always use our own libtool.
185LIBTOOL='$(SHELL) $(top_builddir)/libtool'
186AC_SUBST(LIBTOOL)dnl
187
188# Redirect the config.log output again, so that the ltconfig log is not
189# clobbered by the next message.
190exec 5>>./config.log
191])
192
193AC_DEFUN(AC_LIBTOOL_SETUP,
194[AC_PREREQ(2.13)dnl
195AC_REQUIRE([AC_ENABLE_SHARED])dnl
196AC_REQUIRE([AC_ENABLE_STATIC])dnl
197AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
252b5132
RH
198AC_REQUIRE([AC_CANONICAL_HOST])dnl
199AC_REQUIRE([AC_CANONICAL_BUILD])dnl
200AC_REQUIRE([AC_PROG_RANLIB])dnl
201AC_REQUIRE([AC_PROG_CC])dnl
bedf545c
ILT
202AC_REQUIRE([AC_PROG_LD])dnl
203AC_REQUIRE([AC_PROG_NM])dnl
204AC_REQUIRE([AC_SYS_NM_PARSE])dnl
205AC_REQUIRE([AC_SYS_SYMBOL_UNDERSCORE])dnl
252b5132
RH
206AC_REQUIRE([AC_PROG_LN_S])dnl
207dnl
252b5132
RH
208
209# Check for any special flags to pass to ltconfig.
bedf545c 210libtool_flags="--cache-file=$cache_file"
252b5132
RH
211test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
212test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
bedf545c
ILT
213test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
214test "$lt_dlopen" = yes && libtool_flags="$libtool_flags --enable-dlopen"
252b5132
RH
215test "$silent" = yes && libtool_flags="$libtool_flags --silent"
216test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
217test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
218
219# Some flags need to be propagated to the compiler or linker for good
220# libtool support.
221case "$host" in
222*-*-irix6*)
223 # Find out which ABI we are using.
224 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
225 if AC_TRY_EVAL(ac_compile); then
226 case "`/usr/bin/file conftest.o`" in
227 *32-bit*)
228 LD="${LD-ld} -32"
229 ;;
230 *N32*)
231 LD="${LD-ld} -n32"
232 ;;
233 *64-bit*)
234 LD="${LD-ld} -64"
235 ;;
236 esac
237 fi
238 rm -rf conftest*
239 ;;
240
241*-*-sco3.2v5*)
242 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
bedf545c 243 SAVE_CFLAGS="$CFLAGS"
252b5132 244 CFLAGS="$CFLAGS -belf"
bedf545c
ILT
245 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
246 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
247 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
248 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
249 CFLAGS="$SAVE_CFLAGS"
250 fi
252b5132
RH
251 ;;
252
253*-*-cygwin*)
bedf545c 254 AC_SYS_LIBTOOL_CYGWIN
252b5132
RH
255 ;;
256
257esac
258
bedf545c 259# enable the --disable-libtool-lock switch
252b5132 260
bedf545c
ILT
261AC_ARG_ENABLE(libtool-lock,
262[ --disable-libtool-lock force libtool not to do file locking],
263need_locks=$enableval,
264need_locks=yes)
265
266if test x"$need_locks" = xno; then
267 libtool_flags="$libtool_flags --disable-lock"
268fi
252b5132
RH
269])
270
bedf545c
ILT
271# AC_LIBTOOL_DLOPEN - check for dlopen support
272AC_DEFUN(AC_LIBTOOL_DLOPEN, [lt_dlopen=yes])
273
274# AC_ENABLE_SHARED - implement the --enable-shared flag
275# Usage: AC_ENABLE_SHARED[(DEFAULT)]
252b5132
RH
276# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
277# `yes'.
bedf545c
ILT
278AC_DEFUN(AC_ENABLE_SHARED,
279[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
252b5132
RH
280AC_ARG_ENABLE(shared,
281changequote(<<, >>)dnl
bedf545c 282<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
252b5132
RH
283changequote([, ])dnl
284[p=${PACKAGE-default}
285case "$enableval" in
286yes) enable_shared=yes ;;
287no) enable_shared=no ;;
288*)
289 enable_shared=no
290 # Look at the argument we got. We use all the common list separators.
291 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
292 for pkg in $enableval; do
293 if test "X$pkg" = "X$p"; then
294 enable_shared=yes
295 fi
296 done
297 IFS="$ac_save_ifs"
298 ;;
299esac],
bedf545c 300enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
252b5132
RH
301])
302
bedf545c
ILT
303# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
304AC_DEFUN(AC_DISABLE_SHARED,
305[AC_ENABLE_SHARED(no)])
252b5132 306
bedf545c
ILT
307# AC_ENABLE_STATIC - implement the --enable-static flag
308# Usage: AC_ENABLE_STATIC[(DEFAULT)]
252b5132
RH
309# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
310# `yes'.
bedf545c
ILT
311AC_DEFUN(AC_ENABLE_STATIC,
312[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
252b5132
RH
313AC_ARG_ENABLE(static,
314changequote(<<, >>)dnl
bedf545c 315<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
252b5132
RH
316changequote([, ])dnl
317[p=${PACKAGE-default}
318case "$enableval" in
319yes) enable_static=yes ;;
320no) enable_static=no ;;
321*)
322 enable_static=no
323 # Look at the argument we got. We use all the common list separators.
324 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
325 for pkg in $enableval; do
326 if test "X$pkg" = "X$p"; then
327 enable_static=yes
328 fi
329 done
330 IFS="$ac_save_ifs"
331 ;;
332esac],
bedf545c
ILT
333enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
334])
335
336# AC_DISABLE_STATIC - set the default static flag to --disable-static
337AC_DEFUN(AC_DISABLE_STATIC,
338[AC_ENABLE_STATIC(no)])
339
340
341# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
342# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
343# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
344# `yes'.
345AC_DEFUN(AC_ENABLE_FAST_INSTALL,
346[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
347AC_ARG_ENABLE(fast-install,
348changequote(<<, >>)dnl
349<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
350changequote([, ])dnl
351[p=${PACKAGE-default}
352case "$enableval" in
353yes) enable_fast_install=yes ;;
354no) enable_fast_install=no ;;
355*)
356 enable_fast_install=no
357 # Look at the argument we got. We use all the common list separators.
358 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
359 for pkg in $enableval; do
360 if test "X$pkg" = "X$p"; then
361 enable_fast_install=yes
362 fi
363 done
364 IFS="$ac_save_ifs"
365 ;;
366esac],
367enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
252b5132
RH
368])
369
bedf545c
ILT
370# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
371AC_DEFUN(AC_DISABLE_FAST_INSTALL,
372[AC_ENABLE_FAST_INSTALL(no)])
373
252b5132 374
bedf545c
ILT
375# AC_PROG_LD - find the path to the GNU or non-GNU linker
376AC_DEFUN(AC_PROG_LD,
252b5132
RH
377[AC_ARG_WITH(gnu-ld,
378[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
379test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
bedf545c
ILT
380AC_REQUIRE([AC_PROG_CC])dnl
381AC_REQUIRE([AC_CANONICAL_HOST])dnl
382AC_REQUIRE([AC_CANONICAL_BUILD])dnl
252b5132
RH
383ac_prog=ld
384if test "$ac_cv_prog_gcc" = yes; then
385 # Check if gcc -print-prog-name=ld gives a path.
386 AC_MSG_CHECKING([for ld used by GCC])
387 ac_prog=`($CC -print-prog-name=ld) 2>&5`
388 case "$ac_prog" in
bedf545c 389 # Accept absolute paths.
252b5132 390changequote(,)dnl
bedf545c
ILT
391 /* | [A-Za-z]:[\\/]*)
392 re_direlt='/[^/][^/]*/\.\./'
252b5132 393changequote([,])dnl
bedf545c
ILT
394 # Canonicalize the path of ld
395 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
396 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
397 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
398 done
399 test -z "$LD" && LD="$ac_prog"
400 ;;
252b5132
RH
401 "")
402 # If it fails, then pretend we aren't using GCC.
403 ac_prog=ld
404 ;;
405 *)
406 # If it is relative, then search for the first ld in PATH.
407 with_gnu_ld=unknown
408 ;;
409 esac
410elif test "$with_gnu_ld" = yes; then
411 AC_MSG_CHECKING([for GNU ld])
412else
413 AC_MSG_CHECKING([for non-GNU ld])
414fi
415AC_CACHE_VAL(ac_cv_path_LD,
416[if test -z "$LD"; then
417 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
418 for ac_dir in $PATH; do
419 test -z "$ac_dir" && ac_dir=.
420 if test -f "$ac_dir/$ac_prog"; then
421 ac_cv_path_LD="$ac_dir/$ac_prog"
422 # Check to see if the program is GNU ld. I'd rather use --version,
423 # but apparently some GNU ld's only accept -v.
424 # Break only if it was the GNU/non-GNU ld that we prefer.
425 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
426 test "$with_gnu_ld" != no && break
427 else
bedf545c 428 test "$with_gnu_ld" != yes && break
252b5132
RH
429 fi
430 fi
431 done
432 IFS="$ac_save_ifs"
433else
434 ac_cv_path_LD="$LD" # Let the user override the test with a path.
435fi])
436LD="$ac_cv_path_LD"
437if test -n "$LD"; then
438 AC_MSG_RESULT($LD)
439else
440 AC_MSG_RESULT(no)
441fi
442test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
443AC_SUBST(LD)
bedf545c 444AC_PROG_LD_GNU
252b5132
RH
445])
446
bedf545c 447AC_DEFUN(AC_PROG_LD_GNU,
252b5132
RH
448[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
449[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
450if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
451 ac_cv_prog_gnu_ld=yes
452else
453 ac_cv_prog_gnu_ld=no
454fi])
455])
456
bedf545c
ILT
457# AC_PROG_NM - find the path to a BSD-compatible name lister
458AC_DEFUN(AC_PROG_NM,
252b5132
RH
459[AC_MSG_CHECKING([for BSD-compatible nm])
460AC_CACHE_VAL(ac_cv_path_NM,
461[if test -n "$NM"; then
462 # Let the user override the test.
463 ac_cv_path_NM="$NM"
464else
465 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
bedf545c 466 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
252b5132
RH
467 test -z "$ac_dir" && ac_dir=.
468 if test -f $ac_dir/nm; then
469 # Check to see if the nm accepts a BSD-compat flag.
470 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
471 # nm: unknown option "B" ignored
472 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
bedf545c
ILT
473 ac_cv_path_NM="$ac_dir/nm -B"
474 break
252b5132 475 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
bedf545c
ILT
476 ac_cv_path_NM="$ac_dir/nm -p"
477 break
252b5132 478 else
bedf545c
ILT
479 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
480 continue # so that we can try to find one that supports BSD flags
252b5132 481 fi
252b5132
RH
482 fi
483 done
484 IFS="$ac_save_ifs"
485 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
486fi])
487NM="$ac_cv_path_NM"
488AC_MSG_RESULT([$NM])
489AC_SUBST(NM)
490])
491
bedf545c
ILT
492# AC_SYS_NM_PARSE - Check for command to grab the raw symbol name followed
493# by C symbol name from nm.
494AC_DEFUN(AC_SYS_NM_PARSE,
495[AC_REQUIRE([AC_CANONICAL_HOST])dnl
496AC_REQUIRE([AC_PROG_NM])dnl
497# Check for command to grab the raw symbol name followed by C symbol from nm.
498AC_MSG_CHECKING([command to parse $NM output])
499AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
500[# These are sane defaults that work on at least a few old systems.
501# {They come from Ultrix. What could be older than Ultrix?!! ;)}
502
503changequote(,)dnl
504# Character class describing NM global symbol codes.
505ac_symcode='[BCDEGRST]'
506
507# Regexp to match symbols that can be accessed directly from C.
508ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
509
510# Transform the above into a raw symbol and a C symbol.
511ac_symxfrm='\1 \2\3 \3'
512
513# Transform an extracted symbol line into a proper C declaration
514ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
515
516# Define system-specific variables.
517case "$host_os" in
518aix*)
519 ac_symcode='[BCDT]'
520 ;;
521cygwin* | mingw*)
522 ac_symcode='[ABCDGISTW]'
523 ;;
524hpux*)
525 ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
526 ;;
527irix*)
528 ac_symcode='[BCDEGRST]'
529 ;;
530solaris*)
531 ac_symcode='[BDT]'
532 ;;
533esac
534
535# If we're using GNU nm, then use its standard symbol codes.
536if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
537 ac_symcode='[ABCDGISTW]'
538fi
539changequote([,])dnl
540
541# Try without a prefix undercore, then with it.
542for ac_symprfx in "" "_"; do
543
544 ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
545
546 # Check to see that the pipe works correctly.
547 ac_pipe_works=no
548 rm -f conftest.$ac_ext
549 cat > conftest.$ac_ext <<EOF
550#ifdef __cplusplus
551extern "C" {
552#endif
553char nm_test_var;
554void nm_test_func(){}
555#ifdef __cplusplus
556}
557#endif
558int main(){nm_test_var='a';nm_test_func;return 0;}
559EOF
560
561 if AC_TRY_EVAL(ac_compile); then
562 # Now try to grab the symbols.
563 ac_nlist=conftest.nm
564
565 if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
566
567 # Try sorting and uniquifying the output.
568 if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
569 mv -f "$ac_nlist"T "$ac_nlist"
570 else
571 rm -f "$ac_nlist"T
572 fi
573
574 # Make sure that we snagged all the symbols we need.
575 if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
576 if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
577 cat <<EOF > conftest.c
578#ifdef __cplusplus
579extern "C" {
580#endif
581
582EOF
583 # Now generate the symbol file.
584 eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
585
586 cat <<EOF >> conftest.c
587#if defined (__STDC__) && __STDC__
588# define lt_ptr_t void *
589#else
590# define lt_ptr_t char *
591# define const
592#endif
593
594/* The mapping between symbol names and symbols. */
595const struct {
596 const char *name;
597 lt_ptr_t address;
598}
599changequote(,)dnl
600lt_preloaded_symbols[] =
601changequote([,])dnl
602{
603EOF
604 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
605 cat <<\EOF >> conftest.c
606 {0, (lt_ptr_t) 0}
607};
608
609#ifdef __cplusplus
610}
611#endif
612EOF
613 # Now try linking the two files.
614 mv conftest.$ac_objext conftestm.$ac_objext
615 ac_save_LIBS="$LIBS"
616 ac_save_CFLAGS="$CFLAGS"
617 LIBS="conftestm.$ac_objext"
618 CFLAGS="$CFLAGS$no_builtin_flag"
619 if AC_TRY_EVAL(ac_link) && test -s conftest; then
620 ac_pipe_works=yes
621 else
622 echo "configure: failed program was:" >&AC_FD_CC
623 cat conftest.c >&AC_FD_CC
624 fi
625 LIBS="$ac_save_LIBS"
626 CFLAGS="$ac_save_CFLAGS"
627 else
628 echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
629 fi
630 else
631 echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
632 fi
633 else
634 echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
635 fi
636 else
637 echo "$progname: failed program was:" >&AC_FD_CC
638 cat conftest.c >&AC_FD_CC
639 fi
640 rm -rf conftest*
641
642 # Do not use the global_symbol_pipe unless it works.
643 if test "$ac_pipe_works" = yes; then
644 if test x"$ac_symprfx" = x"_"; then
645 ac_cv_sys_symbol_underscore=yes
646 else
647 ac_cv_sys_symbol_underscore=no
648 fi
649 break
650 else
651 ac_cv_sys_global_symbol_pipe=
652 fi
653done
654])
655
656ac_result=yes
657if test -z "$ac_cv_sys_global_symbol_pipe"; then
658 ac_result=no
659fi
660AC_MSG_RESULT($ac_result)
661])
662
663# AC_SYS_LIBTOOL_CYGWIN - find tools needed on cygwin
664AC_DEFUN(AC_SYS_LIBTOOL_CYGWIN,
252b5132
RH
665[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
666AC_CHECK_TOOL(AS, as, false)
667])
668
bedf545c
ILT
669# AC_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols
670# with an underscore?
671AC_DEFUN(AC_SYS_SYMBOL_UNDERSCORE,
672[AC_REQUIRE([AC_PROG_NM])dnl
673AC_REQUIRE([AC_SYS_NM_PARSE])dnl
674AC_MSG_CHECKING([for _ prefix in compiled symbols])
675AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
676[ac_cv_sys_symbol_underscore=no
677cat > conftest.$ac_ext <<EOF
678void nm_test_func(){}
679int main(){nm_test_func;return 0;}
680EOF
681if AC_TRY_EVAL(ac_compile); then
682 # Now try to grab the symbols.
683 ac_nlist=conftest.nm
684 if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
685 # See whether the symbols have a leading underscore.
686 if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
687 ac_cv_sys_symbol_underscore=yes
688 else
689 if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
690 :
691 else
692 echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
693 fi
694 fi
695 else
696 echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
697 fi
698else
699 echo "configure: failed program was:" >&AC_FD_CC
700 cat conftest.c >&AC_FD_CC
701fi
702rm -rf conftest*
703])
704AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
705USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no}
706AC_SUBST(USE_SYMBOL_UNDERSCORE)dnl
707])
708
709# AC_CHECK_LIBM - check for math library
710AC_DEFUN(AC_CHECK_LIBM, [
711AC_CHECK_LIB(mw, _mwvalidcheckl)
712AC_CHECK_LIB(m, cos)
713])
714
715# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
716# the libltdl convenience library, adds --enable-ltdl-convenience to
717# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
718# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
719# to be `${top_builddir}/libltdl'. Make sure you start DIR with
720# '${top_builddir}/' (note the single quotes!) if your package is not
721# flat, and, if you're not using automake, define top_builddir as
722# appropriate in the Makefiles.
723AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [
724 case "$enable_ltdl_convenience" in
725 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
726 "") enable_ltdl_convenience=yes
727 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
728 esac
729 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
730])
731
732# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
733# the libltdl installable library, and adds --enable-ltdl-install to
734# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
735# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
736# to be `${top_builddir}/libltdl'. Make sure you start DIR with
737# '${top_builddir}/' (note the single quotes!) if your package is not
738# flat, and, if you're not using automake, define top_builddir as
739# appropriate in the Makefiles.
740# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
741AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [
742 AC_CHECK_LIB(ltdl, main, LIBLTDL="-lltdl", [
743 case "$enable_ltdl_install" in
744 no) AC_MSG_WARN([libltdl not installed, but installation disabled]) ;;
745 "") enable_ltdl_install=yes
746 ac_configure_args="$ac_configure_args --enable-ltdl-install" ;;
747 esac
748 ])
749 if test x"$enable_ltdl_install" != x"no"; then
750 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
751 fi
752])
753
754dnl old names
755AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
756AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
757AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
758AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
759AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
760AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
761AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
762AC_DEFUN(AM_SYS_NM_PARSE, [indir([AC_SYS_NM_PARSE])])dnl
763AC_DEFUN(AM_SYS_SYMBOL_UNDERSCORE, [indir([AC_SYS_SYMBOL_UNDERSCORE])])dnl
764AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN, [indir([AC_SYS_LIBTOOL_CYGWIN])])dnl
765
252b5132
RH
766# Like AC_CONFIG_HEADER, but automatically create stamp file.
767
768AC_DEFUN(AM_CONFIG_HEADER,
769[AC_PREREQ([2.12])
770AC_CONFIG_HEADER([$1])
771dnl When config.status generates a header, we must update the stamp-h file.
772dnl This file resides in the same directory as the config header
773dnl that is generated. We must strip everything past the first ":",
774dnl and everything past the last "/".
775AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
776ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
777<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
778<<am_indx=1
779for am_file in <<$1>>; do
780 case " <<$>>CONFIG_HEADERS " in
781 *" <<$>>am_file "*<<)>>
782 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
783 ;;
784 esac
785 am_indx=`expr "<<$>>am_indx" + 1`
786done<<>>dnl>>)
787changequote([,]))])
788
789
790dnl AM_PROG_LEX
791dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
792AC_DEFUN(AM_PROG_LEX,
793[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
794AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
795AC_PROG_LEX
796AC_DECL_YYTEXT])
797
798# This file is derived from `gettext.m4'. The difference is that the
799# included macros assume Cygnus-style source and build trees.
800
801# Macro to add for using GNU gettext.
802# Ulrich Drepper <drepper@cygnus.com>, 1995.
803#
804# This file file be copied and used freely without restrictions. It can
805# be used in projects which are not available under the GNU Public License
806# but which still want to provide support for the GNU gettext functionality.
807# Please note that the actual code is *not* freely available.
808
809# serial 3
810
811AC_DEFUN(CY_WITH_NLS,
812 [AC_MSG_CHECKING([whether NLS is requested])
813 dnl Default is enabled NLS
814 AC_ARG_ENABLE(nls,
815 [ --disable-nls do not use Native Language Support],
816 USE_NLS=$enableval, USE_NLS=yes)
817 AC_MSG_RESULT($USE_NLS)
818 AC_SUBST(USE_NLS)
819
820 USE_INCLUDED_LIBINTL=no
821
822 dnl If we use NLS figure out what method
823 if test "$USE_NLS" = "yes"; then
824 AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
825 AC_MSG_CHECKING([whether included gettext is requested])
826 AC_ARG_WITH(included-gettext,
827 [ --with-included-gettext use the GNU gettext library included here],
828 nls_cv_force_use_gnu_gettext=$withval,
829 nls_cv_force_use_gnu_gettext=no)
830 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
831
832 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
833 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
834 dnl User does not insist on using GNU NLS library. Figure out what
835 dnl to use. If gettext or catgets are available (in this order) we
836 dnl use this. Else we have to fall back to GNU NLS library.
837 dnl catgets is only used if permitted by option --with-catgets.
838 nls_cv_header_intl=
839 nls_cv_header_libgt=
840 CATOBJEXT=NONE
841
842 AC_CHECK_HEADER(libintl.h,
843 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
844 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
845 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
846
847 if test "$gt_cv_func_gettext_libc" != "yes"; then
848 AC_CHECK_LIB(intl, bindtextdomain,
849 [AC_CACHE_CHECK([for gettext in libintl],
850 gt_cv_func_gettext_libintl,
851 [AC_TRY_LINK([], [return (int) gettext ("")],
852 gt_cv_func_gettext_libintl=yes,
853 gt_cv_func_gettext_libintl=no)])])
854 fi
855
856 if test "$gt_cv_func_gettext_libc" = "yes" \
857 || test "$gt_cv_func_gettext_libintl" = "yes"; then
858 AC_DEFINE(HAVE_GETTEXT, 1,
859 [Define as 1 if you have gettext and don't want to use GNU gettext.])
860 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
861 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
862 if test "$MSGFMT" != "no"; then
863 AC_CHECK_FUNCS(dcgettext)
864 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
865 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
866 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
867 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
868 return _nl_msg_cat_cntr],
869 [CATOBJEXT=.gmo
870 DATADIRNAME=share],
871 [CATOBJEXT=.mo
872 DATADIRNAME=lib])
873 INSTOBJEXT=.mo
874 fi
875 fi
876 ])
877
878 dnl In the standard gettext, we would now check for catgets.
879 dnl However, we never want to use catgets for our releases.
880
881 if test "$CATOBJEXT" = "NONE"; then
882 dnl Neither gettext nor catgets in included in the C library.
883 dnl Fall back on GNU gettext library.
884 nls_cv_use_gnu_gettext=yes
885 fi
886 fi
887
888 if test "$nls_cv_use_gnu_gettext" = "yes"; then
889 dnl Mark actions used to generate GNU NLS library.
890 INTLOBJS="\$(GETTOBJS)"
891 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
892 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
893 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
894 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
895 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
896 AC_SUBST(MSGFMT)
897 USE_INCLUDED_LIBINTL=yes
898 CATOBJEXT=.gmo
899 INSTOBJEXT=.mo
900 DATADIRNAME=share
901 INTLDEPS='$(top_builddir)/../intl/libintl.a'
902 INTLLIBS=$INTLDEPS
903 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
904 nls_cv_header_intl=libintl.h
905 nls_cv_header_libgt=libgettext.h
906 fi
907
908 dnl Test whether we really found GNU xgettext.
909 if test "$XGETTEXT" != ":"; then
910 dnl If it is no GNU xgettext we define it as : so that the
911 dnl Makefiles still can work.
912 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
913 : ;
914 else
915 AC_MSG_RESULT(
916 [found xgettext programs is not GNU xgettext; ignore it])
917 XGETTEXT=":"
918 fi
919 fi
920
921 # We need to process the po/ directory.
922 POSUB=po
923 else
924 DATADIRNAME=share
925 nls_cv_header_intl=libintl.h
926 nls_cv_header_libgt=libgettext.h
927 fi
928
929 # If this is used in GNU gettext we have to set USE_NLS to `yes'
930 # because some of the sources are only built for this goal.
931 if test "$PACKAGE" = gettext; then
932 USE_NLS=yes
933 USE_INCLUDED_LIBINTL=yes
934 fi
935
936 dnl These rules are solely for the distribution goal. While doing this
937 dnl we only have to keep exactly one list of the available catalogs
938 dnl in configure.in.
939 for lang in $ALL_LINGUAS; do
940 GMOFILES="$GMOFILES $lang.gmo"
941 POFILES="$POFILES $lang.po"
942 done
943
944 dnl Make all variables we use known to autoconf.
945 AC_SUBST(USE_INCLUDED_LIBINTL)
946 AC_SUBST(CATALOGS)
947 AC_SUBST(CATOBJEXT)
948 AC_SUBST(DATADIRNAME)
949 AC_SUBST(GMOFILES)
950 AC_SUBST(INSTOBJEXT)
951 AC_SUBST(INTLDEPS)
952 AC_SUBST(INTLLIBS)
953 AC_SUBST(INTLOBJS)
954 AC_SUBST(POFILES)
955 AC_SUBST(POSUB)
956 ])
957
958AC_DEFUN(CY_GNU_GETTEXT,
959 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
960 AC_REQUIRE([AC_PROG_CC])dnl
961 AC_REQUIRE([AC_PROG_RANLIB])dnl
962 AC_REQUIRE([AC_ISC_POSIX])dnl
963 AC_REQUIRE([AC_HEADER_STDC])dnl
964 AC_REQUIRE([AC_C_CONST])dnl
965 AC_REQUIRE([AC_C_INLINE])dnl
966 AC_REQUIRE([AC_TYPE_OFF_T])dnl
967 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
968 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
969 AC_REQUIRE([AC_FUNC_MMAP])dnl
970
971 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
972unistd.h values.h sys/param.h])
973 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
974__argz_count __argz_stringify __argz_next])
975
976 if test "${ac_cv_func_stpcpy+set}" != "set"; then
977 AC_CHECK_FUNCS(stpcpy)
978 fi
979 if test "${ac_cv_func_stpcpy}" = "yes"; then
980 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
981 fi
982
983 AM_LC_MESSAGES
984 CY_WITH_NLS
985
986 if test "x$CATOBJEXT" != "x"; then
987 if test "x$ALL_LINGUAS" = "x"; then
988 LINGUAS=
989 else
990 AC_MSG_CHECKING(for catalogs to be installed)
991 NEW_LINGUAS=
992 for lang in ${LINGUAS=$ALL_LINGUAS}; do
993 case "$ALL_LINGUAS" in
994 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
995 esac
996 done
997 LINGUAS=$NEW_LINGUAS
998 AC_MSG_RESULT($LINGUAS)
999 fi
1000
1001 dnl Construct list of names of catalog files to be constructed.
1002 if test -n "$LINGUAS"; then
1003 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1004 fi
1005 fi
1006
1007 dnl The reference to <locale.h> in the installed <libintl.h> file
1008 dnl must be resolved because we cannot expect the users of this
1009 dnl to define HAVE_LOCALE_H.
1010 if test $ac_cv_header_locale_h = yes; then
1011 INCLUDE_LOCALE_H="#include <locale.h>"
1012 else
1013 INCLUDE_LOCALE_H="\
1014/* The system does not provide the header <locale.h>. Take care yourself. */"
1015 fi
1016 AC_SUBST(INCLUDE_LOCALE_H)
1017
1018 dnl Determine which catalog format we have (if any is needed)
1019 dnl For now we know about two different formats:
1020 dnl Linux libc-5 and the normal X/Open format
1021 if test -f $srcdir/po2tbl.sed.in; then
1022 if test "$CATOBJEXT" = ".cat"; then
1023 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
1024
1025 dnl Transform the SED scripts while copying because some dumb SEDs
1026 dnl cannot handle comments.
1027 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
1028 fi
1029 dnl po2tbl.sed is always needed.
1030 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
1031 $srcdir/po2tbl.sed.in > po2tbl.sed
1032 fi
1033
1034 dnl In the intl/Makefile.in we have a special dependency which makes
1035 dnl only sense for gettext. We comment this out for non-gettext
1036 dnl packages.
1037 if test "$PACKAGE" = "gettext"; then
1038 GT_NO="#NO#"
1039 GT_YES=
1040 else
1041 GT_NO=
1042 GT_YES="#YES#"
1043 fi
1044 AC_SUBST(GT_NO)
1045 AC_SUBST(GT_YES)
1046
1047 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
1048 AC_SUBST(MKINSTALLDIRS)
1049
1050 dnl *** For now the libtool support in intl/Makefile is not for real.
1051 l=
1052 AC_SUBST(l)
1053
1054 dnl Generate list of files to be processed by xgettext which will
1055 dnl be included in po/Makefile. But only do this if the po directory
1056 dnl exists in srcdir.
1057 if test -d $srcdir/po; then
1058 test -d po || mkdir po
1059 if test "x$srcdir" != "x."; then
1060 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1061 posrcprefix="$srcdir/"
1062 else
1063 posrcprefix="../$srcdir/"
1064 fi
1065 else
1066 posrcprefix="../"
1067 fi
1068 rm -f po/POTFILES
1069 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1070 < $srcdir/po/POTFILES.in > po/POTFILES
1071 fi
1072 ])
1073
1074# Search path for a program which passes the given test.
1075# Ulrich Drepper <drepper@cygnus.com>, 1996.
1076#
1077# This file file be copied and used freely without restrictions. It can
1078# be used in projects which are not available under the GNU Public License
1079# but which still want to provide support for the GNU gettext functionality.
1080# Please note that the actual code is *not* freely available.
1081
1082# serial 1
1083
1084dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1085dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1086AC_DEFUN(AM_PATH_PROG_WITH_TEST,
1087[# Extract the first word of "$2", so it can be a program name with args.
1088set dummy $2; ac_word=[$]2
1089AC_MSG_CHECKING([for $ac_word])
1090AC_CACHE_VAL(ac_cv_path_$1,
1091[case "[$]$1" in
1092 /*)
1093 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1094 ;;
1095 *)
1096 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1097 for ac_dir in ifelse([$5], , $PATH, [$5]); do
1098 test -z "$ac_dir" && ac_dir=.
1099 if test -f $ac_dir/$ac_word; then
1100 if [$3]; then
1101 ac_cv_path_$1="$ac_dir/$ac_word"
1102 break
1103 fi
1104 fi
1105 done
1106 IFS="$ac_save_ifs"
1107dnl If no 4th arg is given, leave the cache variable unset,
1108dnl so AC_PATH_PROGS will keep looking.
1109ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1110])dnl
1111 ;;
1112esac])dnl
1113$1="$ac_cv_path_$1"
1114if test -n "[$]$1"; then
1115 AC_MSG_RESULT([$]$1)
1116else
1117 AC_MSG_RESULT(no)
1118fi
1119AC_SUBST($1)dnl
1120])
1121
1122# Check whether LC_MESSAGES is available in <locale.h>.
1123# Ulrich Drepper <drepper@cygnus.com>, 1995.
1124#
1125# This file file be copied and used freely without restrictions. It can
1126# be used in projects which are not available under the GNU Public License
1127# but which still want to provide support for the GNU gettext functionality.
1128# Please note that the actual code is *not* freely available.
1129
1130# serial 1
1131
1132AC_DEFUN(AM_LC_MESSAGES,
1133 [if test $ac_cv_header_locale_h = yes; then
1134 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1135 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1136 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1137 if test $am_cv_val_LC_MESSAGES = yes; then
1138 AC_DEFINE(HAVE_LC_MESSAGES, 1,
1139 [Define if your locale.h file contains LC_MESSAGES.])
1140 fi
1141 fi])
1142
1143# Add --enable-maintainer-mode option to configure.
1144# From Jim Meyering
1145
1146# serial 1
1147
1148AC_DEFUN(AM_MAINTAINER_MODE,
1149[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1150 dnl maintainer-mode is disabled by default
1151 AC_ARG_ENABLE(maintainer-mode,
1152[ --enable-maintainer-mode enable make rules and dependencies not useful
1153 (and sometimes confusing) to the casual installer],
1154 USE_MAINTAINER_MODE=$enableval,
1155 USE_MAINTAINER_MODE=no)
1156 AC_MSG_RESULT($USE_MAINTAINER_MODE)
1157 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
1158 MAINT=$MAINTAINER_MODE_TRUE
1159 AC_SUBST(MAINT)dnl
1160]
1161)
1162
1163# Define a conditional.
1164
1165AC_DEFUN(AM_CONDITIONAL,
1166[AC_SUBST($1_TRUE)
1167AC_SUBST($1_FALSE)
1168if $2; then
1169 $1_TRUE=
1170 $1_FALSE='#'
1171else
1172 $1_TRUE='#'
1173 $1_FALSE=
1174fi])
1175
This page took 0.087073 seconds and 4 git commands to generate.