This commit was generated by cvs2svn to track changes on a CVS vendor
[deliverable/binutils-gdb.git] / ld / 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 # This file is derived from `gettext.m4'. The difference is that the
735 # included macros assume Cygnus-style source and build trees.
736
737 # Macro to add for using GNU gettext.
738 # Ulrich Drepper <drepper@cygnus.com>, 1995.
739 #
740 # This file file be copied and used freely without restrictions. It can
741 # be used in projects which are not available under the GNU Public License
742 # but which still want to provide support for the GNU gettext functionality.
743 # Please note that the actual code is *not* freely available.
744
745 # serial 3
746
747 AC_DEFUN(CY_WITH_NLS,
748 [AC_MSG_CHECKING([whether NLS is requested])
749 dnl Default is enabled NLS
750 AC_ARG_ENABLE(nls,
751 [ --disable-nls do not use Native Language Support],
752 USE_NLS=$enableval, USE_NLS=yes)
753 AC_MSG_RESULT($USE_NLS)
754 AC_SUBST(USE_NLS)
755
756 USE_INCLUDED_LIBINTL=no
757
758 dnl If we use NLS figure out what method
759 if test "$USE_NLS" = "yes"; then
760 AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
761 AC_MSG_CHECKING([whether included gettext is requested])
762 AC_ARG_WITH(included-gettext,
763 [ --with-included-gettext use the GNU gettext library included here],
764 nls_cv_force_use_gnu_gettext=$withval,
765 nls_cv_force_use_gnu_gettext=no)
766 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
767
768 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
769 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
770 dnl User does not insist on using GNU NLS library. Figure out what
771 dnl to use. If gettext or catgets are available (in this order) we
772 dnl use this. Else we have to fall back to GNU NLS library.
773 dnl catgets is only used if permitted by option --with-catgets.
774 nls_cv_header_intl=
775 nls_cv_header_libgt=
776 CATOBJEXT=NONE
777
778 AC_CHECK_HEADER(libintl.h,
779 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
780 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
781 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
782
783 if test "$gt_cv_func_gettext_libc" != "yes"; then
784 AC_CHECK_LIB(intl, bindtextdomain,
785 [AC_CACHE_CHECK([for gettext in libintl],
786 gt_cv_func_gettext_libintl,
787 [AC_TRY_LINK([], [return (int) gettext ("")],
788 gt_cv_func_gettext_libintl=yes,
789 gt_cv_func_gettext_libintl=no)])])
790 fi
791
792 if test "$gt_cv_func_gettext_libc" = "yes" \
793 || test "$gt_cv_func_gettext_libintl" = "yes"; then
794 AC_DEFINE(HAVE_GETTEXT, 1,
795 [Define as 1 if you have gettext and don't want to use GNU gettext.])
796 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
797 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
798 if test "$MSGFMT" != "no"; then
799 AC_CHECK_FUNCS(dcgettext)
800 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
801 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
802 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
803 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
804 return _nl_msg_cat_cntr],
805 [CATOBJEXT=.gmo
806 DATADIRNAME=share],
807 [CATOBJEXT=.mo
808 DATADIRNAME=lib])
809 INSTOBJEXT=.mo
810 fi
811 fi
812 ])
813
814 dnl In the standard gettext, we would now check for catgets.
815 dnl However, we never want to use catgets for our releases.
816
817 if test "$CATOBJEXT" = "NONE"; then
818 dnl Neither gettext nor catgets in included in the C library.
819 dnl Fall back on GNU gettext library.
820 nls_cv_use_gnu_gettext=yes
821 fi
822 fi
823
824 if test "$nls_cv_use_gnu_gettext" = "yes"; then
825 dnl Mark actions used to generate GNU NLS library.
826 INTLOBJS="\$(GETTOBJS)"
827 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
828 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
829 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
830 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
831 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
832 AC_SUBST(MSGFMT)
833 USE_INCLUDED_LIBINTL=yes
834 CATOBJEXT=.gmo
835 INSTOBJEXT=.mo
836 DATADIRNAME=share
837 INTLDEPS='$(top_builddir)/../intl/libintl.a'
838 INTLLIBS=$INTLDEPS
839 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
840 nls_cv_header_intl=libintl.h
841 nls_cv_header_libgt=libgettext.h
842 fi
843
844 dnl Test whether we really found GNU xgettext.
845 if test "$XGETTEXT" != ":"; then
846 dnl If it is no GNU xgettext we define it as : so that the
847 dnl Makefiles still can work.
848 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
849 : ;
850 else
851 AC_MSG_RESULT(
852 [found xgettext programs is not GNU xgettext; ignore it])
853 XGETTEXT=":"
854 fi
855 fi
856
857 # We need to process the po/ directory.
858 POSUB=po
859 else
860 DATADIRNAME=share
861 nls_cv_header_intl=libintl.h
862 nls_cv_header_libgt=libgettext.h
863 fi
864
865 # If this is used in GNU gettext we have to set USE_NLS to `yes'
866 # because some of the sources are only built for this goal.
867 if test "$PACKAGE" = gettext; then
868 USE_NLS=yes
869 USE_INCLUDED_LIBINTL=yes
870 fi
871
872 dnl These rules are solely for the distribution goal. While doing this
873 dnl we only have to keep exactly one list of the available catalogs
874 dnl in configure.in.
875 for lang in $ALL_LINGUAS; do
876 GMOFILES="$GMOFILES $lang.gmo"
877 POFILES="$POFILES $lang.po"
878 done
879
880 dnl Make all variables we use known to autoconf.
881 AC_SUBST(USE_INCLUDED_LIBINTL)
882 AC_SUBST(CATALOGS)
883 AC_SUBST(CATOBJEXT)
884 AC_SUBST(DATADIRNAME)
885 AC_SUBST(GMOFILES)
886 AC_SUBST(INSTOBJEXT)
887 AC_SUBST(INTLDEPS)
888 AC_SUBST(INTLLIBS)
889 AC_SUBST(INTLOBJS)
890 AC_SUBST(POFILES)
891 AC_SUBST(POSUB)
892 ])
893
894 AC_DEFUN(CY_GNU_GETTEXT,
895 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
896 AC_REQUIRE([AC_PROG_CC])dnl
897 AC_REQUIRE([AC_PROG_RANLIB])dnl
898 AC_REQUIRE([AC_ISC_POSIX])dnl
899 AC_REQUIRE([AC_HEADER_STDC])dnl
900 AC_REQUIRE([AC_C_CONST])dnl
901 AC_REQUIRE([AC_C_INLINE])dnl
902 AC_REQUIRE([AC_TYPE_OFF_T])dnl
903 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
904 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
905 AC_REQUIRE([AC_FUNC_MMAP])dnl
906
907 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
908 unistd.h values.h sys/param.h])
909 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
910 __argz_count __argz_stringify __argz_next])
911
912 if test "${ac_cv_func_stpcpy+set}" != "set"; then
913 AC_CHECK_FUNCS(stpcpy)
914 fi
915 if test "${ac_cv_func_stpcpy}" = "yes"; then
916 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
917 fi
918
919 AM_LC_MESSAGES
920 CY_WITH_NLS
921
922 if test "x$CATOBJEXT" != "x"; then
923 if test "x$ALL_LINGUAS" = "x"; then
924 LINGUAS=
925 else
926 AC_MSG_CHECKING(for catalogs to be installed)
927 NEW_LINGUAS=
928 for lang in ${LINGUAS=$ALL_LINGUAS}; do
929 case "$ALL_LINGUAS" in
930 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
931 esac
932 done
933 LINGUAS=$NEW_LINGUAS
934 AC_MSG_RESULT($LINGUAS)
935 fi
936
937 dnl Construct list of names of catalog files to be constructed.
938 if test -n "$LINGUAS"; then
939 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
940 fi
941 fi
942
943 dnl The reference to <locale.h> in the installed <libintl.h> file
944 dnl must be resolved because we cannot expect the users of this
945 dnl to define HAVE_LOCALE_H.
946 if test $ac_cv_header_locale_h = yes; then
947 INCLUDE_LOCALE_H="#include <locale.h>"
948 else
949 INCLUDE_LOCALE_H="\
950 /* The system does not provide the header <locale.h>. Take care yourself. */"
951 fi
952 AC_SUBST(INCLUDE_LOCALE_H)
953
954 dnl Determine which catalog format we have (if any is needed)
955 dnl For now we know about two different formats:
956 dnl Linux libc-5 and the normal X/Open format
957 if test -f $srcdir/po2tbl.sed.in; then
958 if test "$CATOBJEXT" = ".cat"; then
959 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
960
961 dnl Transform the SED scripts while copying because some dumb SEDs
962 dnl cannot handle comments.
963 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
964 fi
965 dnl po2tbl.sed is always needed.
966 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
967 $srcdir/po2tbl.sed.in > po2tbl.sed
968 fi
969
970 dnl In the intl/Makefile.in we have a special dependency which makes
971 dnl only sense for gettext. We comment this out for non-gettext
972 dnl packages.
973 if test "$PACKAGE" = "gettext"; then
974 GT_NO="#NO#"
975 GT_YES=
976 else
977 GT_NO=
978 GT_YES="#YES#"
979 fi
980 AC_SUBST(GT_NO)
981 AC_SUBST(GT_YES)
982
983 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
984 AC_SUBST(MKINSTALLDIRS)
985
986 dnl *** For now the libtool support in intl/Makefile is not for real.
987 l=
988 AC_SUBST(l)
989
990 dnl Generate list of files to be processed by xgettext which will
991 dnl be included in po/Makefile. But only do this if the po directory
992 dnl exists in srcdir.
993 if test -d $srcdir/po; then
994 test -d po || mkdir po
995 if test "x$srcdir" != "x."; then
996 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
997 posrcprefix="$srcdir/"
998 else
999 posrcprefix="../$srcdir/"
1000 fi
1001 else
1002 posrcprefix="../"
1003 fi
1004 rm -f po/POTFILES
1005 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1006 < $srcdir/po/POTFILES.in > po/POTFILES
1007 fi
1008 ])
1009
1010 # Search path for a program which passes the given test.
1011 # Ulrich Drepper <drepper@cygnus.com>, 1996.
1012 #
1013 # This file file be copied and used freely without restrictions. It can
1014 # be used in projects which are not available under the GNU Public License
1015 # but which still want to provide support for the GNU gettext functionality.
1016 # Please note that the actual code is *not* freely available.
1017
1018 # serial 1
1019
1020 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1021 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1022 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
1023 [# Extract the first word of "$2", so it can be a program name with args.
1024 set dummy $2; ac_word=[$]2
1025 AC_MSG_CHECKING([for $ac_word])
1026 AC_CACHE_VAL(ac_cv_path_$1,
1027 [case "[$]$1" in
1028 /*)
1029 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1030 ;;
1031 *)
1032 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1033 for ac_dir in ifelse([$5], , $PATH, [$5]); do
1034 test -z "$ac_dir" && ac_dir=.
1035 if test -f $ac_dir/$ac_word; then
1036 if [$3]; then
1037 ac_cv_path_$1="$ac_dir/$ac_word"
1038 break
1039 fi
1040 fi
1041 done
1042 IFS="$ac_save_ifs"
1043 dnl If no 4th arg is given, leave the cache variable unset,
1044 dnl so AC_PATH_PROGS will keep looking.
1045 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1046 ])dnl
1047 ;;
1048 esac])dnl
1049 $1="$ac_cv_path_$1"
1050 if test -n "[$]$1"; then
1051 AC_MSG_RESULT([$]$1)
1052 else
1053 AC_MSG_RESULT(no)
1054 fi
1055 AC_SUBST($1)dnl
1056 ])
1057
1058 # Check whether LC_MESSAGES is available in <locale.h>.
1059 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1060 #
1061 # This file file be copied and used freely without restrictions. It can
1062 # be used in projects which are not available under the GNU Public License
1063 # but which still want to provide support for the GNU gettext functionality.
1064 # Please note that the actual code is *not* freely available.
1065
1066 # serial 1
1067
1068 AC_DEFUN(AM_LC_MESSAGES,
1069 [if test $ac_cv_header_locale_h = yes; then
1070 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1071 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1072 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1073 if test $am_cv_val_LC_MESSAGES = yes; then
1074 AC_DEFINE(HAVE_LC_MESSAGES, 1,
1075 [Define if your locale.h file contains LC_MESSAGES.])
1076 fi
1077 fi])
1078
1079
1080 dnl AM_PROG_LEX
1081 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
1082 AC_DEFUN(AM_PROG_LEX,
1083 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
1084 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
1085 AC_PROG_LEX
1086 AC_DECL_YYTEXT])
1087
1088 # Add --enable-maintainer-mode option to configure.
1089 # From Jim Meyering
1090
1091 # serial 1
1092
1093 AC_DEFUN(AM_MAINTAINER_MODE,
1094 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1095 dnl maintainer-mode is disabled by default
1096 AC_ARG_ENABLE(maintainer-mode,
1097 [ --enable-maintainer-mode enable make rules and dependencies not useful
1098 (and sometimes confusing) to the casual installer],
1099 USE_MAINTAINER_MODE=$enableval,
1100 USE_MAINTAINER_MODE=no)
1101 AC_MSG_RESULT($USE_MAINTAINER_MODE)
1102 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
1103 MAINT=$MAINTAINER_MODE_TRUE
1104 AC_SUBST(MAINT)dnl
1105 ]
1106 )
1107
1108 # Define a conditional.
1109
1110 AC_DEFUN(AM_CONDITIONAL,
1111 [AC_SUBST($1_TRUE)
1112 AC_SUBST($1_FALSE)
1113 if $2; then
1114 $1_TRUE=
1115 $1_FALSE='#'
1116 else
1117 $1_TRUE='#'
1118 $1_FALSE=
1119 fi])
1120
This page took 0.07388 seconds and 5 git commands to generate.