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