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