83
246
AC_MSG_ERROR([newly created file is older than distributed files!
84
247
Check your system clock])
87
249
AC_MSG_RESULT(yes)])
89
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
90
dnl The program must properly implement --version.
91
AC_DEFUN(AM_MISSING_PROG,
92
[AC_MSG_CHECKING(for working $2)
93
# Run test in a subshell; some versions of sh will print an error if
94
# an executable is not found, even if stderr is redirected.
95
# Redirect stdin to placate older versions of autoconf. Sigh.
96
if ($2 --version) < /dev/null > /dev/null 2>&1; then
101
AC_MSG_RESULT(missing)
254
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
256
# This program is free software; you can redistribute it and/or modify
257
# it under the terms of the GNU General Public License as published by
258
# the Free Software Foundation; either version 2, or (at your option)
261
# This program is distributed in the hope that it will be useful,
262
# but WITHOUT ANY WARRANTY; without even the implied warranty of
263
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
264
# GNU General Public License for more details.
266
# You should have received a copy of the GNU General Public License
267
# along with this program; if not, write to the Free Software
268
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
273
# AM_MISSING_PROG(NAME, PROGRAM)
274
# ------------------------------
275
AC_DEFUN([AM_MISSING_PROG],
276
[AC_REQUIRE([AM_MISSING_HAS_RUN])
277
$1=${$1-"${am_missing_run}$2"}
105
# Like AC_CONFIG_HEADER, but automatically create stamp file.
107
AC_DEFUN(AM_CONFIG_HEADER,
109
AC_CONFIG_HEADER([$1])
110
dnl When config.status generates a header, we must update the stamp-h file.
111
dnl This file resides in the same directory as the config header
112
dnl that is generated. We must strip everything past the first ":",
113
dnl and everything past the last "/".
114
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
115
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
116
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
118
for am_file in <<$1>>; do
119
case " <<$>>CONFIG_HEADERS " in
120
*" <<$>>am_file "*<<)>>
121
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
124
am_indx=`expr "<<$>>am_indx" + 1`
128
# Configure paths for GTK+
129
# Owen Taylor 97-11-3
131
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
132
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
134
AC_DEFUN(AM_PATH_GTK,
136
dnl Get the cflags and libraries from the gtk-config script
138
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
139
gtk_config_prefix="$withval", gtk_config_prefix="")
140
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
141
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
142
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
143
, enable_gtktest=yes)
149
gtk_config_args="$gtk_config_args gthread"
154
if test x$gtk_config_exec_prefix != x ; then
155
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
156
if test x${GTK_CONFIG+set} != xset ; then
157
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
160
if test x$gtk_config_prefix != x ; then
161
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
162
if test x${GTK_CONFIG+set} != xset ; then
163
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
167
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
168
min_gtk_version=ifelse([$1], ,0.99.7,$1)
169
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
171
if test "$GTK_CONFIG" = "no" ; then
174
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
175
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
176
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
177
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
178
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
179
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
180
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
181
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
182
if test "x$enable_gtktest" = "xyes" ; then
183
ac_save_CFLAGS="$CFLAGS"
185
CFLAGS="$CFLAGS $GTK_CFLAGS"
186
LIBS="$GTK_LIBS $LIBS"
188
dnl Now check if the installed GTK is sufficiently new. (Also sanity
189
dnl checks the results of gtk-config to some extent
283
# Define MISSING if not defined so far and test if it supports --run.
284
# If it does, set am_missing_run to use it, otherwise, to nothing.
285
AC_DEFUN([AM_MISSING_HAS_RUN],
286
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
287
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
288
# Use eval to expand $SHELL
289
if eval "$MISSING --run true"; then
290
am_missing_run="$MISSING --run "
293
AC_MSG_WARN([`missing' script is too old or missing])
299
# Copyright 2001 Free Software Foundation, Inc.
301
# This program is free software; you can redistribute it and/or modify
302
# it under the terms of the GNU General Public License as published by
303
# the Free Software Foundation; either version 2, or (at your option)
306
# This program is distributed in the hope that it will be useful,
307
# but WITHOUT ANY WARRANTY; without even the implied warranty of
308
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
309
# GNU General Public License for more details.
311
# You should have received a copy of the GNU General Public License
312
# along with this program; if not, write to the Free Software
313
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
316
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
317
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
318
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
320
# Of course, Automake must honor this variable whenever it calls a
321
# tool from the auxiliary directory. The problem is that $srcdir (and
322
# therefore $ac_aux_dir as well) can be either absolute or relative,
323
# depending on how configure is run. This is pretty annoying, since
324
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
325
# source directory, any form will work fine, but in subdirectories a
326
# relative path needs to be adjusted first.
328
# $ac_aux_dir/missing
329
# fails when called from a subdirectory if $ac_aux_dir is relative
330
# $top_srcdir/$ac_aux_dir/missing
331
# fails if $ac_aux_dir is absolute,
332
# fails when called from a subdirectory in a VPATH build with
333
# a relative $ac_aux_dir
335
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
336
# are both prefixed by $srcdir. In an in-source build this is usually
337
# harmless because $srcdir is `.', but things will broke when you
338
# start a VPATH build or use an absolute $srcdir.
340
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
341
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
342
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
343
# and then we would define $MISSING as
344
# MISSING="\${SHELL} $am_aux_dir/missing"
345
# This will work as long as MISSING is not called from configure, because
346
# unfortunately $(top_srcdir) has no meaning in configure.
347
# However there are other variables, like CC, which are often used in
348
# configure, and could therefore not use this "fixed" $ac_aux_dir.
350
# Another solution, used here, is to always expand $ac_aux_dir to an
351
# absolute PATH. The drawback is that using absolute paths prevent a
352
# configured tree to be moved without reconfiguration.
354
# Rely on autoconf to set up CDPATH properly.
357
AC_DEFUN([AM_AUX_DIR_EXPAND], [
358
# expand $ac_aux_dir to an absolute path
359
am_aux_dir=`cd $ac_aux_dir && pwd`
364
# Define $install_sh.
366
# Copyright 2001 Free Software Foundation, Inc.
368
# This program is free software; you can redistribute it and/or modify
369
# it under the terms of the GNU General Public License as published by
370
# the Free Software Foundation; either version 2, or (at your option)
373
# This program is distributed in the hope that it will be useful,
374
# but WITHOUT ANY WARRANTY; without even the implied warranty of
375
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376
# GNU General Public License for more details.
378
# You should have received a copy of the GNU General Public License
379
# along with this program; if not, write to the Free Software
380
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
383
AC_DEFUN([AM_PROG_INSTALL_SH],
384
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
385
install_sh=${install_sh-"$am_aux_dir/install-sh"}
386
AC_SUBST(install_sh)])
388
# AM_PROG_INSTALL_STRIP
390
# Copyright 2001 Free Software Foundation, Inc.
392
# This program is free software; you can redistribute it and/or modify
393
# it under the terms of the GNU General Public License as published by
394
# the Free Software Foundation; either version 2, or (at your option)
397
# This program is distributed in the hope that it will be useful,
398
# but WITHOUT ANY WARRANTY; without even the implied warranty of
399
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
400
# GNU General Public License for more details.
402
# You should have received a copy of the GNU General Public License
403
# along with this program; if not, write to the Free Software
404
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
407
# One issue with vendor `install' (even GNU) is that you can't
408
# specify the program used to strip binaries. This is especially
409
# annoying in cross-compiling environments, where the build's strip
410
# is unlikely to handle the host's binaries.
411
# Fortunately install-sh will honor a STRIPPROG variable, so we
412
# always use install-sh in `make install-strip', and initialize
413
# STRIPPROG with the value of the STRIP variable (set by the user).
414
AC_DEFUN([AM_PROG_INSTALL_STRIP],
415
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
416
# Installed binaries are usually stripped using `strip' when the user
417
# run `make install-strip'. However `strip' might not be the right
418
# tool to use in cross-compilation environments, therefore Automake
419
# will honor the `STRIP' environment variable to overrule this program.
420
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
421
if test "$cross_compiling" != no; then
422
AC_CHECK_TOOL([STRIP], [strip], :)
424
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
425
AC_SUBST([INSTALL_STRIP_PROGRAM])])
427
# serial 4 -*- Autoconf -*-
429
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
431
# This program is free software; you can redistribute it and/or modify
432
# it under the terms of the GNU General Public License as published by
433
# the Free Software Foundation; either version 2, or (at your option)
436
# This program is distributed in the hope that it will be useful,
437
# but WITHOUT ANY WARRANTY; without even the implied warranty of
438
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
439
# GNU General Public License for more details.
441
# You should have received a copy of the GNU General Public License
442
# along with this program; if not, write to the Free Software
443
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
447
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
448
# written in clear, in which case automake, when reading aclocal.m4,
449
# will think it sees a *use*, and therefore will trigger all it's
450
# C support machinery. Also note that it means that autoscan, seeing
451
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
455
# _AM_DEPENDENCIES(NAME)
456
# ----------------------
457
# See how the compiler implements dependency checking.
458
# NAME is "CC", "CXX", "GCJ", or "OBJC".
459
# We try a few techniques and use that to set a single cache variable.
461
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
462
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
463
# dependency, and given that the user is not expected to run this macro,
464
# just rely on AC_PROG_CC.
465
AC_DEFUN([_AM_DEPENDENCIES],
466
[AC_REQUIRE([AM_SET_DEPDIR])dnl
467
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
468
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
469
AC_REQUIRE([AM_DEP_TRACK])dnl
471
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
472
[$1], CXX, [depcc="$CXX" am_compiler_list=],
473
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
474
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
475
[depcc="$$1" am_compiler_list=])
477
AC_CACHE_CHECK([dependency style of $depcc],
478
[am_cv_$1_dependencies_compiler_type],
479
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
480
# We make a subdir and do the tests there. Otherwise we can end up
481
# making bogus files that we don't know about and never remove. For
482
# instance it was reported that on HP-UX the gcc test will end up
483
# making a dummy file named `D' -- because `-MD' means `put the output
486
# Copy depcomp to subdir because otherwise we won't find it if we're
487
# using a relative directory.
488
cp "$am_depcomp" conftest.dir
491
am_cv_$1_dependencies_compiler_type=none
492
if test "$am_compiler_list" = ""; then
493
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
495
for depmode in $am_compiler_list; do
496
# We need to recreate these files for each test, as the compiler may
497
# overwrite some of them when testing with obscure command lines.
498
# This happens at least with the AIX C compiler.
499
echo '#include "conftest.h"' > conftest.c
500
echo 'int i;' > conftest.h
501
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
505
# after this tag, mechanisms are not by side-effect, so they'll
506
# only be used when explicitly requested
507
if test "x$enable_dependency_tracking" = xyes; then
515
# We check with `-c' and `-o' for the sake of the "dashmstdout"
516
# mode. It turns out that the SunPro C++ compiler does not properly
517
# handle `-M -o', and we need to detect this.
518
if depmode=$depmode \
519
source=conftest.c object=conftest.o \
520
depfile=conftest.Po tmpdepfile=conftest.TPo \
521
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
522
grep conftest.h conftest.Po > /dev/null 2>&1 &&
523
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
524
am_cv_$1_dependencies_compiler_type=$depmode
532
am_cv_$1_dependencies_compiler_type=none
535
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
541
# Choose a directory name for dependency files.
542
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
543
AC_DEFUN([AM_SET_DEPDIR],
544
[rm -f .deps 2>/dev/null
545
mkdir .deps 2>/dev/null
546
if test -d .deps; then
549
# MS-DOS does not allow filenames that begin with a dot.
552
rmdir .deps 2>/dev/null
559
AC_DEFUN([AM_DEP_TRACK],
560
[AC_ARG_ENABLE(dependency-tracking,
561
[ --disable-dependency-tracking Speeds up one-time builds
562
--enable-dependency-tracking Do not reject slow dependency extractors])
563
if test "x$enable_dependency_tracking" != xno; then
564
am_depcomp="$ac_aux_dir/depcomp"
567
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
568
AC_SUBST([AMDEPBACKSLASH])
571
# Generate code to set up dependency tracking. -*- Autoconf -*-
573
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
575
# This program is free software; you can redistribute it and/or modify
576
# it under the terms of the GNU General Public License as published by
577
# the Free Software Foundation; either version 2, or (at your option)
580
# This program is distributed in the hope that it will be useful,
581
# but WITHOUT ANY WARRANTY; without even the implied warranty of
582
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
583
# GNU General Public License for more details.
585
# You should have received a copy of the GNU General Public License
586
# along with this program; if not, write to the Free Software
587
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
592
# _AM_OUTPUT_DEPENDENCY_COMMANDS
593
# ------------------------------
594
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
595
[for mf in $CONFIG_FILES; do
596
# Strip MF so we end up with the name of the file.
597
mf=`echo "$mf" | sed -e 's/:.*$//'`
598
# Check whether this is an Automake generated Makefile or not.
599
# We used to match only the files named `Makefile.in', but
600
# some people rename them; so instead we look at the file content.
601
# Grep'ing the first line is not enough: some people post-process
602
# each Makefile.in and add a new line on top of each file to say so.
603
# So let's grep whole file.
604
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
605
dirpart=`AS_DIRNAME("$mf")`
609
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
610
# Extract the definition of DEP_FILES from the Makefile without
612
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
613
test -z "$DEPDIR" && continue
614
# When using ansi2knr, U may be empty or an underscore; expand it
615
U=`sed -n -e '/^U = / s///p' < "$mf"`
616
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
617
# We invoke sed twice because it is the simplest approach to
618
# changing $(DEPDIR) to its actual value in the expansion.
619
for file in `sed -n -e '
620
/^DEP_FILES = .*\\\\$/ {
629
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
630
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
631
# Make sure the directory exists.
632
test -f "$dirpart/$file" && continue
633
fdir=`AS_DIRNAME(["$file"])`
634
AS_MKDIR_P([$dirpart/$fdir])
635
# echo "creating $dirpart/$file"
636
echo '# dummy' > "$dirpart/$file"
639
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
642
# AM_OUTPUT_DEPENDENCY_COMMANDS
643
# -----------------------------
644
# This macro should only be invoked once -- use via AC_REQUIRE.
646
# This code is only required when automatic dependency tracking
647
# is enabled. FIXME. This creates each `.P' file that we will
648
# need in order to bootstrap the dependency handling code.
649
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
650
[AC_CONFIG_COMMANDS([depfiles],
651
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
652
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
655
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
657
# This program is free software; you can redistribute it and/or modify
658
# it under the terms of the GNU General Public License as published by
659
# the Free Software Foundation; either version 2, or (at your option)
662
# This program is distributed in the hope that it will be useful,
663
# but WITHOUT ANY WARRANTY; without even the implied warranty of
664
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
665
# GNU General Public License for more details.
667
# You should have received a copy of the GNU General Public License
668
# along with this program; if not, write to the Free Software
669
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
676
# Check to see how make treats includes.
677
AC_DEFUN([AM_MAKE_INCLUDE],
678
[am_make=${MAKE-make}
679
cat > confinc << 'END'
683
# If we don't find an include directive, just comment out the code.
684
AC_MSG_CHECKING([for style of include used by $am_make])
688
# First try GNU make style include.
689
echo "include confinc" > confmf
690
# We grep out `Entering directory' and `Leaving directory'
691
# messages which can occur if `w' ends up in MAKEFLAGS.
692
# In particular we don't look at `^make:' because GNU make might
693
# be invoked under some other name (usually "gmake"), in which
694
# case it prints its new name instead of `make'.
695
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
700
# Now try BSD make style include.
701
if test "$am__include" = "#"; then
702
echo '.include "confinc"' > confmf
703
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
709
AC_SUBST(am__include)
711
AC_MSG_RESULT($_am_result)
715
# AM_CONDITIONAL -*- Autoconf -*-
717
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
719
# This program is free software; you can redistribute it and/or modify
720
# it under the terms of the GNU General Public License as published by
721
# the Free Software Foundation; either version 2, or (at your option)
724
# This program is distributed in the hope that it will be useful,
725
# but WITHOUT ANY WARRANTY; without even the implied warranty of
726
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
727
# GNU General Public License for more details.
729
# You should have received a copy of the GNU General Public License
730
# along with this program; if not, write to the Free Software
731
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
738
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
739
# -------------------------------------
740
# Define a conditional.
741
AC_DEFUN([AM_CONDITIONAL],
742
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
743
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
753
AC_CONFIG_COMMANDS_PRE(
754
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
755
AC_MSG_ERROR([conditional \"$1\" was never defined.
756
Usually this means the macro was only invoked conditionally.])
759
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
761
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
763
# This program is free software; you can redistribute it and/or modify
764
# it under the terms of the GNU General Public License as published by
765
# the Free Software Foundation; either version 2, or (at your option)
768
# This program is distributed in the hope that it will be useful,
769
# but WITHOUT ANY WARRANTY; without even the implied warranty of
770
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
771
# GNU General Public License for more details.
773
# You should have received a copy of the GNU General Public License
774
# along with this program; if not, write to the Free Software
775
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
782
# When config.status generates a header, we must update the stamp-h file.
783
# This file resides in the same directory as the config header
784
# that is generated. We must strip everything past the first ":",
785
# and everything past the last "/".
789
# Like AS_DIRNAME, only do it during macro expansion
790
AC_DEFUN([_AM_DIRNAME],
791
[m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
792
m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
793
m4_if(regexp([$1], [^/.*]), -1,
795
patsubst([$1], [^\(/\).*], [\1])),
796
patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
797
patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
801
# The stamp files are numbered to have different names.
802
# We could number them on a directory basis, but that's additional
803
# complications, let's have a unique counter.
804
m4_define([_AM_STAMP_Count], [0])
809
# The name of the stamp file for HEADER.
810
AC_DEFUN([_AM_STAMP],
811
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
812
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
813
[:.*])))/stamp-h[]_AM_STAMP_Count])
816
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
817
# ------------------------------------------------------------
818
# We used to try to get a real timestamp in stamp-h. But the fear is that
819
# that will cause unnecessary cvs conflicts.
820
AC_DEFUN([_AM_CONFIG_HEADER],
821
[# Add the stamp file to the list of files AC keeps track of,
822
# along with our hook.
823
AC_CONFIG_HEADERS([$1],
824
[# update the timestamp
825
echo 'timestamp for $1' >"_AM_STAMP([$1])"
828
])# _AM_CONFIG_HEADER
831
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
832
# --------------------------------------------------------------
833
AC_DEFUN([AM_CONFIG_HEADER],
834
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
838
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
839
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
840
dnl also defines GSTUFF_PKG_ERRORS on error
841
AC_DEFUN(PKG_CHECK_MODULES, [
844
if test -z "$PKG_CONFIG"; then
845
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
848
if test "$PKG_CONFIG" = "no" ; then
849
echo "*** The pkg-config script could not be found. Make sure it is"
850
echo "*** in your path, or set the PKG_CONFIG environment variable"
851
echo "*** to the full path to pkg-config."
852
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
854
PKG_CONFIG_MIN_VERSION=0.9.0
855
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
856
AC_MSG_CHECKING(for $2)
858
if $PKG_CONFIG --exists "$2" ; then
862
AC_MSG_CHECKING($1_CFLAGS)
863
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
864
AC_MSG_RESULT($$1_CFLAGS)
866
AC_MSG_CHECKING($1_LIBS)
867
$1_LIBS=`$PKG_CONFIG --libs "$2"`
868
AC_MSG_RESULT($$1_LIBS)
872
## If we have a custom action on failure, don't print errors, but
873
## do set a variable so people can do so.
874
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
875
ifelse([$4], ,echo $$1_PKG_ERRORS,)
881
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
882
echo "*** See http://www.freedesktop.org/software/pkgconfig"
886
if test $succeeded = yes; then
887
ifelse([$3], , :, [$3])
889
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
895
# gettext.m4 serial 20 (gettext-0.12)
896
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
897
dnl This file is free software, distributed under the terms of the GNU
898
dnl General Public License. As a special exception to the GNU General
899
dnl Public License, this file may be distributed as part of a program
900
dnl that contains a configuration script generated by Autoconf, under
901
dnl the same distribution terms as the rest of that program.
903
dnl This file can can be used in projects which are not available under
904
dnl the GNU General Public License or the GNU Library General Public
905
dnl License but which still want to provide support for the GNU gettext
907
dnl Please note that the actual code of the GNU gettext library is covered
908
dnl by the GNU Library General Public License, and the rest of the GNU
909
dnl gettext package package is covered by the GNU General Public License.
910
dnl They are *not* in the public domain.
913
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
914
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
916
dnl Macro to add for using GNU gettext.
918
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
919
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
920
dnl default (if it is not specified or empty) is 'no-libtool'.
921
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
922
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
923
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
924
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
925
dnl depending on --{enable,disable}-{shared,static} and on the presence of
926
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
927
dnl $(top_builddir)/intl/libintl.a will be created.
928
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
929
dnl implementations (in libc or libintl) without the ngettext() function
930
dnl will be ignored. If NEEDSYMBOL is specified and is
931
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
932
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
933
dnl INTLDIR is used to find the intl libraries. If empty,
934
dnl the value `$(top_builddir)/intl/' is used.
936
dnl The result of the configuration is one of three cases:
937
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
939
dnl Catalog format: GNU --> install in $(datadir)
940
dnl Catalog extension: .mo after installation, .gmo in source tree
941
dnl 2) GNU gettext has been found in the system's C library.
942
dnl Catalog format: GNU --> install in $(datadir)
943
dnl Catalog extension: .mo after installation, .gmo in source tree
944
dnl 3) No internationalization, always use English msgid.
945
dnl Catalog format: none
946
dnl Catalog extension: none
947
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
948
dnl The use of .gmo is historical (it was needed to avoid overwriting the
949
dnl GNU format catalogs when building on a platform with an X/Open gettext),
950
dnl but we keep it in order not to force irrelevant filename changes on the
953
AC_DEFUN([AM_GNU_GETTEXT],
955
dnl Argument checking.
956
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
957
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
959
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
960
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
962
define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
963
define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
965
AC_REQUIRE([AM_PO_SUBDIRS])dnl
966
ifelse(gt_included_intl, yes, [
967
AC_REQUIRE([AM_INTL_SUBDIR])dnl
970
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
971
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
972
AC_REQUIRE([AC_LIB_RPATH])
974
dnl Sometimes libintl requires libiconv, so first search for libiconv.
975
dnl Ideally we would do this search only after the
976
dnl if test "$USE_NLS" = "yes"; then
977
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
978
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
979
dnl the configure script would need to contain the same shell code
980
dnl again, outside any 'if'. There are two solutions:
981
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
982
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
983
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
984
dnl documented, we avoid it.
985
ifelse(gt_included_intl, yes, , [
986
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
992
ifelse(gt_included_intl, yes, [
993
BUILD_INCLUDED_LIBINTL=no
994
USE_INCLUDED_LIBINTL=no
1000
dnl If we use NLS figure out what method
1001
if test "$USE_NLS" = "yes"; then
1002
gt_use_preinstalled_gnugettext=no
1003
ifelse(gt_included_intl, yes, [
1004
AC_MSG_CHECKING([whether included gettext is requested])
1005
AC_ARG_WITH(included-gettext,
1006
[ --with-included-gettext use the GNU gettext library included here],
1007
nls_cv_force_use_gnu_gettext=$withval,
1008
nls_cv_force_use_gnu_gettext=no)
1009
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
1011
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
1012
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
1014
dnl User does not insist on using GNU NLS library. Figure out what
1015
dnl to use. If GNU gettext is available we use this. Else we have
1016
dnl to fall back to GNU NLS library.
1018
dnl Add a version number to the cache macros.
1019
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
1020
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
1021
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
1023
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
1024
[AC_TRY_LINK([#include <libintl.h>
1025
]ifelse([$2], [need-formatstring-macros],
1026
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1027
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1030
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1032
], [])[extern int _nl_msg_cat_cntr;
1033
extern int *_nl_domain_bindings;],
1034
[bindtextdomain ("", "");
1035
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
1036
gt_cv_func_gnugettext_libc=yes,
1037
gt_cv_func_gnugettext_libc=no)])
1039
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1040
dnl Sometimes libintl requires libiconv, so first search for libiconv.
1041
ifelse(gt_included_intl, yes, , [
1044
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
1045
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
1046
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
1047
dnl even if libiconv doesn't exist.
1048
AC_LIB_LINKFLAGS_BODY([intl])
1049
AC_CACHE_CHECK([for GNU gettext in libintl],
1050
gt_cv_func_gnugettext_libintl,
1051
[gt_save_CPPFLAGS="$CPPFLAGS"
1052
CPPFLAGS="$CPPFLAGS $INCINTL"
1053
gt_save_LIBS="$LIBS"
1054
LIBS="$LIBS $LIBINTL"
1055
dnl Now see whether libintl exists and does not depend on libiconv.
1056
AC_TRY_LINK([#include <libintl.h>
1057
]ifelse([$2], [need-formatstring-macros],
1058
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1059
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1062
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1064
], [])[extern int _nl_msg_cat_cntr;
1069
const char *_nl_expand_alias ();],
1070
[bindtextdomain ("", "");
1071
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1072
gt_cv_func_gnugettext_libintl=yes,
1073
gt_cv_func_gnugettext_libintl=no)
1074
dnl Now see whether libintl exists and depends on libiconv.
1075
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
1076
LIBS="$LIBS $LIBICONV"
1077
AC_TRY_LINK([#include <libintl.h>
1078
]ifelse([$2], [need-formatstring-macros],
1079
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1080
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1083
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1085
], [])[extern int _nl_msg_cat_cntr;
1090
const char *_nl_expand_alias ();],
1091
[bindtextdomain ("", "");
1092
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1093
[LIBINTL="$LIBINTL $LIBICONV"
1094
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1095
gt_cv_func_gnugettext_libintl=yes
1098
CPPFLAGS="$gt_save_CPPFLAGS"
1099
LIBS="$gt_save_LIBS"])
1102
dnl If an already present or preinstalled GNU gettext() is found,
1103
dnl use it. But if this macro is used in GNU gettext, and GNU
1104
dnl gettext is already preinstalled in libintl, we update this
1105
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
1106
if test "$gt_cv_func_gnugettext_libc" = "yes" \
1107
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
1108
&& test "$PACKAGE" != gettext-runtime \
1109
&& test "$PACKAGE" != gettext-tools; }; then
1110
gt_use_preinstalled_gnugettext=yes
1112
dnl Reset the values set by searching for libintl.
1118
ifelse(gt_included_intl, yes, [
1119
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1120
dnl GNU gettext is not found in the C library.
1121
dnl Fall back on included GNU gettext library.
1122
nls_cv_use_gnu_gettext=yes
1126
if test "$nls_cv_use_gnu_gettext" = "yes"; then
1127
dnl Mark actions used to generate GNU NLS library.
1128
BUILD_INCLUDED_LIBINTL=yes
1129
USE_INCLUDED_LIBINTL=yes
1130
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
1131
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
1132
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1135
if test "$gt_use_preinstalled_gnugettext" = "yes" \
1136
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
1137
dnl Mark actions to use GNU gettext tools.
1142
if test "$gt_use_preinstalled_gnugettext" = "yes" \
1143
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
1144
AC_DEFINE(ENABLE_NLS, 1,
1145
[Define to 1 if translation of program messages to the user's native language
1152
AC_MSG_CHECKING([whether to use NLS])
1153
AC_MSG_RESULT([$USE_NLS])
1154
if test "$USE_NLS" = "yes"; then
1155
AC_MSG_CHECKING([where the gettext function comes from])
1156
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1157
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1158
gt_source="external libintl"
1163
gt_source="included intl directory"
1165
AC_MSG_RESULT([$gt_source])
1168
if test "$USE_NLS" = "yes"; then
1170
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1171
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1172
AC_MSG_CHECKING([how to link with libintl])
1173
AC_MSG_RESULT([$LIBINTL])
1174
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1177
dnl For backward compatibility. Some packages may be using this.
1178
AC_DEFINE(HAVE_GETTEXT, 1,
1179
[Define if the GNU gettext() function is already present or preinstalled.])
1180
AC_DEFINE(HAVE_DCGETTEXT, 1,
1181
[Define if the GNU dcgettext() function is already present or preinstalled.])
1184
dnl We need to process the po/ directory.
1188
ifelse(gt_included_intl, yes, [
1189
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1190
dnl to 'yes' because some of the testsuite requires it.
1191
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
1192
BUILD_INCLUDED_LIBINTL=yes
1195
dnl Make all variables we use known to autoconf.
1196
AC_SUBST(BUILD_INCLUDED_LIBINTL)
1197
AC_SUBST(USE_INCLUDED_LIBINTL)
1200
dnl For backward compatibility. Some configure.ins may be using this.
1202
nls_cv_header_libgt=
1204
dnl For backward compatibility. Some Makefiles may be using this.
1206
AC_SUBST(DATADIRNAME)
1208
dnl For backward compatibility. Some Makefiles may be using this.
1210
AC_SUBST(INSTOBJEXT)
1212
dnl For backward compatibility. Some Makefiles may be using this.
1216
dnl For backward compatibility. Some Makefiles may be using this.
1217
if test "$USE_INCLUDED_LIBINTL" = yes; then
1218
INTLOBJS="\$(GETTOBJS)"
1222
dnl Enable libtool support if the surrounding package wishes it.
1223
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1224
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
1227
dnl For backward compatibility. Some Makefiles may be using this.
1231
dnl Make all documented variables known to autoconf.
1238
dnl Checks for all prerequisites of the intl subdirectory,
1239
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
1240
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1241
AC_DEFUN([AM_INTL_SUBDIR],
1243
AC_REQUIRE([AC_PROG_INSTALL])dnl
1244
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1245
AC_REQUIRE([AC_PROG_CC])dnl
1246
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1247
AC_REQUIRE([AC_PROG_RANLIB])dnl
1248
AC_REQUIRE([AC_ISC_POSIX])dnl
1249
AC_REQUIRE([AC_HEADER_STDC])dnl
1250
AC_REQUIRE([AC_C_CONST])dnl
1251
AC_REQUIRE([AC_C_INLINE])dnl
1252
AC_REQUIRE([AC_TYPE_OFF_T])dnl
1253
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1254
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1255
AC_REQUIRE([AC_FUNC_MMAP])dnl
1256
AC_REQUIRE([jm_GLIBC21])dnl
1257
AC_REQUIRE([gt_INTDIV0])dnl
1258
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
1259
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
1260
AC_REQUIRE([gt_INTTYPES_PRI])dnl
1262
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1263
stdlib.h string.h unistd.h sys/param.h])
1264
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
1265
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
1266
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
1271
if test $ac_cv_header_locale_h = yes; then
1275
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
1276
dnl because plural.y uses bison specific features. It requires at least
1277
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
1279
dnl bison is only needed for the maintainer (who touches plural.y). But in
1280
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
1281
dnl the rule in general Makefile. Now, some people carelessly touch the
1282
dnl files or have a broken "make" program, hence the plural.c rule will
1283
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
1284
dnl present or too old.
1285
AC_CHECK_PROGS([INTLBISON], [bison])
1286
if test -z "$INTLBISON"; then
1289
dnl Found it, now check the version.
1290
AC_MSG_CHECKING([version of bison])
1291
changequote(<<,>>)dnl
1292
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
1293
case $ac_prog_version in
1294
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1295
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
1297
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1298
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1300
AC_MSG_RESULT([$ac_prog_version])
1302
if test $ac_verc_fail = yes; then
1308
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
1309
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
1311
# po.m4 serial 1 (gettext-0.12)
1312
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
1313
dnl This file is free software, distributed under the terms of the GNU
1314
dnl General Public License. As a special exception to the GNU General
1315
dnl Public License, this file may be distributed as part of a program
1316
dnl that contains a configuration script generated by Autoconf, under
1317
dnl the same distribution terms as the rest of that program.
1319
dnl This file can can be used in projects which are not available under
1320
dnl the GNU General Public License or the GNU Library General Public
1321
dnl License but which still want to provide support for the GNU gettext
1323
dnl Please note that the actual code of the GNU gettext library is covered
1324
dnl by the GNU Library General Public License, and the rest of the GNU
1325
dnl gettext package package is covered by the GNU General Public License.
1326
dnl They are *not* in the public domain.
1329
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1330
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1332
dnl Checks for all prerequisites of the po subdirectory.
1333
AC_DEFUN([AM_PO_SUBDIRS],
1335
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1336
AC_REQUIRE([AC_PROG_INSTALL])dnl
1337
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1338
AC_REQUIRE([AM_NLS])dnl
1340
dnl Perform the following tests also if --disable-nls has been given,
1341
dnl because they are needed for "make dist" to work.
1343
dnl Search for GNU msgfmt in the PATH.
1344
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1345
dnl The second test excludes FreeBSD msgfmt.
1346
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1347
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1348
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1350
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1352
dnl Search for GNU xgettext 0.12 or newer in the PATH.
1353
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1354
dnl The second test excludes FreeBSD xgettext.
1355
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1356
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
1357
(if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1359
dnl Remove leftover from FreeBSD xgettext call.
1362
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1363
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1364
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1366
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1367
dnl Test whether we really found GNU msgfmt.
1368
if test "$GMSGFMT" != ":"; then
1369
dnl If it is no GNU msgfmt we define it as : so that the
1370
dnl Makefiles still can work.
1371
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1372
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1375
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1377
[found $GMSGFMT program is not GNU msgfmt; ignore it])
1382
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1383
dnl Test whether we really found GNU xgettext.
1384
if test "$XGETTEXT" != ":"; then
1385
dnl If it is no GNU xgettext we define it as : so that the
1386
dnl Makefiles still can work.
1387
if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
1388
(if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1392
[found xgettext program is not GNU xgettext; ignore it])
1395
dnl Remove leftover from FreeBSD xgettext call.
1399
AC_OUTPUT_COMMANDS([
1400
for ac_file in $CONFIG_FILES; do
1401
# Support "outfile[:infile[:infile...]]"
1403
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1405
# PO directories have a Makefile.in generated from Makefile.in.in.
1406
case "$ac_file" in */Makefile.in)
1407
# Adjust a relative srcdir.
1408
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1409
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1410
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1411
# In autoconf-2.13 it is called $ac_given_srcdir.
1412
# In autoconf-2.50 it is called $srcdir.
1413
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1414
case "$ac_given_srcdir" in
1415
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1416
/*) top_srcdir="$ac_given_srcdir" ;;
1417
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1419
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1420
rm -f "$ac_dir/POTFILES"
1421
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1422
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1423
POMAKEFILEDEPS="POTFILES.in"
1424
# ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
1425
# on $ac_dir but don't depend on user-specified configuration
1427
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1428
# The LINGUAS file contains the set of available languages.
1429
if test -n "$OBSOLETE_ALL_LINGUAS"; then
1430
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1432
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1433
# Hide the ALL_LINGUAS assigment from automake.
1434
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1435
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
1437
# The set of available languages was given in configure.in.
1438
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
1440
case "$ac_given_srcdir" in
1442
*) srcdirpre='$(srcdir)/' ;;
1448
for lang in $ALL_LINGUAS; do
1449
POFILES="$POFILES $srcdirpre$lang.po"
1450
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1451
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1452
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1454
# CATALOGS depends on both $ac_dir and the user's LINGUAS
1455
# environment variable.
1457
if test -n "$ALL_LINGUAS"; then
1458
for presentlang in $ALL_LINGUAS; do
1460
if test "%UNSET%" != "$LINGUAS"; then
1461
desiredlanguages="$LINGUAS"
1463
desiredlanguages="$ALL_LINGUAS"
1465
for desiredlang in $desiredlanguages; do
1466
# Use the presentlang catalog if desiredlang is
1467
# a. equal to presentlang, or
1468
# b. a variant of presentlang (because in this case,
1469
# presentlang can be used as a fallback for messages
1470
# which are not translated in the desiredlang catalog).
1471
case "$desiredlang" in
1472
"$presentlang"*) useit=yes;;
1475
if test $useit = yes; then
1476
INST_LINGUAS="$INST_LINGUAS $presentlang"
1481
if test -n "$INST_LINGUAS"; then
1482
for lang in $INST_LINGUAS; do
1483
CATALOGS="$CATALOGS $lang.gmo"
1486
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1487
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
1488
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1489
if test -f "$f"; then
1491
*.orig | *.bak | *~) ;;
1492
*) cat "$f" >> "$ac_dir/Makefile" ;;
1500
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
1501
# POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
1503
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
1504
# Capture the value of LINGUAS because we need it to compute CATALOGS.
1505
LINGUAS="${LINGUAS-%UNSET%}"
1509
# nls.m4 serial 1 (gettext-0.12)
1510
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
1511
dnl This file is free software, distributed under the terms of the GNU
1512
dnl General Public License. As a special exception to the GNU General
1513
dnl Public License, this file may be distributed as part of a program
1514
dnl that contains a configuration script generated by Autoconf, under
1515
dnl the same distribution terms as the rest of that program.
1517
dnl This file can can be used in projects which are not available under
1518
dnl the GNU General Public License or the GNU Library General Public
1519
dnl License but which still want to provide support for the GNU gettext
1521
dnl Please note that the actual code of the GNU gettext library is covered
1522
dnl by the GNU Library General Public License, and the rest of the GNU
1523
dnl gettext package package is covered by the GNU General Public License.
1524
dnl They are *not* in the public domain.
1527
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1528
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1532
AC_MSG_CHECKING([whether NLS is requested])
1533
dnl Default is enabled NLS
1535
[ --disable-nls do not use Native Language Support],
1536
USE_NLS=$enableval, USE_NLS=yes)
1537
AC_MSG_RESULT($USE_NLS)
1541
AC_DEFUN([AM_MKINSTALLDIRS],
1543
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1544
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1545
dnl Try to locate it.
1547
if test -n "$ac_aux_dir"; then
1548
case "$ac_aux_dir" in
1549
/*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
1550
*) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
1553
if test -z "$MKINSTALLDIRS"; then
1554
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1556
AC_SUBST(MKINSTALLDIRS)
1559
# progtest.m4 serial 3 (gettext-0.12)
1560
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1561
dnl This file is free software, distributed under the terms of the GNU
1562
dnl General Public License. As a special exception to the GNU General
1563
dnl Public License, this file may be distributed as part of a program
1564
dnl that contains a configuration script generated by Autoconf, under
1565
dnl the same distribution terms as the rest of that program.
1567
dnl This file can can be used in projects which are not available under
1568
dnl the GNU General Public License or the GNU Library General Public
1569
dnl License but which still want to provide support for the GNU gettext
1571
dnl Please note that the actual code of the GNU gettext library is covered
1572
dnl by the GNU Library General Public License, and the rest of the GNU
1573
dnl gettext package package is covered by the GNU General Public License.
1574
dnl They are *not* in the public domain.
1577
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
1579
# Search path for a program which passes the given test.
1581
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1582
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1583
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
1585
# Prepare PATH_SEPARATOR.
1586
# The user is always right.
1587
if test "${PATH_SEPARATOR+set}" != set; then
1588
echo "#! /bin/sh" >conf$$.sh
1589
echo "exit 0" >>conf$$.sh
1591
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1599
# Find out how to test for executable files. Don't use a zero-byte file,
1600
# as systems may use methods other than mode bits to determine executability.
1601
cat >conf$$.file <<_ASEOF
1605
chmod +x conf$$.file
1606
if test -x conf$$.file >/dev/null 2>&1; then
1607
ac_executable_p="test -x"
1609
ac_executable_p="test -f"
1613
# Extract the first word of "$2", so it can be a program name with args.
1614
set dummy $2; ac_word=[$]2
1615
AC_MSG_CHECKING([for $ac_word])
1616
AC_CACHE_VAL(ac_cv_path_$1,
1618
[[\\/]]* | ?:[[\\/]]*)
1619
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1622
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
1623
for ac_dir in ifelse([$5], , $PATH, [$5]); do
1625
test -z "$ac_dir" && ac_dir=.
1626
for ac_exec_ext in '' $ac_executable_extensions; do
1627
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
1629
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
1636
dnl If no 4th arg is given, leave the cache variable unset,
1637
dnl so AC_PATH_PROGS will keep looking.
1638
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1643
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1644
AC_MSG_RESULT([$]$1)
1651
# lib-prefix.m4 serial 3 (gettext-0.12.2)
1652
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1653
dnl This file is free software, distributed under the terms of the GNU
1654
dnl General Public License. As a special exception to the GNU General
1655
dnl Public License, this file may be distributed as part of a program
1656
dnl that contains a configuration script generated by Autoconf, under
1657
dnl the same distribution terms as the rest of that program.
1659
dnl From Bruno Haible.
1661
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1662
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1663
dnl require excessive bracketing.
1664
ifdef([AC_HELP_STRING],
1665
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1666
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1668
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1669
dnl to access previously installed libraries. The basic assumption is that
1670
dnl a user will want packages to use other packages he previously installed
1671
dnl with the same --prefix option.
1672
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1673
dnl libraries, but is otherwise very convenient.
1674
AC_DEFUN([AC_LIB_PREFIX],
1676
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1677
AC_REQUIRE([AC_PROG_CC])
1678
AC_REQUIRE([AC_CANONICAL_HOST])
1679
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1680
dnl By default, look in $includedir and $libdir.
1682
AC_LIB_WITH_FINAL_PREFIX([
1683
eval additional_includedir=\"$includedir\"
1684
eval additional_libdir=\"$libdir\"
1686
AC_LIB_ARG_WITH([lib-prefix],
1687
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1688
--without-lib-prefix don't search for libraries in includedir and libdir],
1690
if test "X$withval" = "Xno"; then
1693
if test "X$withval" = "X"; then
1694
AC_LIB_WITH_FINAL_PREFIX([
1695
eval additional_includedir=\"$includedir\"
1696
eval additional_libdir=\"$libdir\"
1699
additional_includedir="$withval/include"
1700
additional_libdir="$withval/lib"
1704
if test $use_additional = yes; then
1705
dnl Potentially add $additional_includedir to $CPPFLAGS.
1706
dnl But don't add it
1707
dnl 1. if it's the standard /usr/include,
1708
dnl 2. if it's already present in $CPPFLAGS,
1709
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1710
dnl 4. if it doesn't exist as a directory.
1711
if test "X$additional_includedir" != "X/usr/include"; then
1713
for x in $CPPFLAGS; do
1714
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1715
if test "X$x" = "X-I$additional_includedir"; then
1720
if test -z "$haveit"; then
1721
if test "X$additional_includedir" = "X/usr/local/include"; then
1722
if test -n "$GCC"; then
1724
linux*) haveit=yes;;
1728
if test -z "$haveit"; then
1729
if test -d "$additional_includedir"; then
1730
dnl Really add $additional_includedir to $CPPFLAGS.
1731
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1736
dnl Potentially add $additional_libdir to $LDFLAGS.
1737
dnl But don't add it
1738
dnl 1. if it's the standard /usr/lib,
1739
dnl 2. if it's already present in $LDFLAGS,
1740
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1741
dnl 4. if it doesn't exist as a directory.
1742
if test "X$additional_libdir" != "X/usr/lib"; then
1744
for x in $LDFLAGS; do
1745
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1746
if test "X$x" = "X-L$additional_libdir"; then
1751
if test -z "$haveit"; then
1752
if test "X$additional_libdir" = "X/usr/local/lib"; then
1753
if test -n "$GCC"; then
1755
linux*) haveit=yes;;
1759
if test -z "$haveit"; then
1760
if test -d "$additional_libdir"; then
1761
dnl Really add $additional_libdir to $LDFLAGS.
1762
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1770
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1771
dnl acl_final_exec_prefix, containing the values to which $prefix and
1772
dnl $exec_prefix will expand at the end of the configure script.
1773
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1775
dnl Unfortunately, prefix and exec_prefix get only finally determined
1776
dnl at the end of configure.
1777
if test "X$prefix" = "XNONE"; then
1778
acl_final_prefix="$ac_default_prefix"
1780
acl_final_prefix="$prefix"
1782
if test "X$exec_prefix" = "XNONE"; then
1783
acl_final_exec_prefix='${prefix}'
1785
acl_final_exec_prefix="$exec_prefix"
1787
acl_save_prefix="$prefix"
1788
prefix="$acl_final_prefix"
1789
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1790
prefix="$acl_save_prefix"
1793
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1794
dnl variables prefix and exec_prefix bound to the values they will have
1795
dnl at the end of the configure script.
1796
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1798
acl_save_prefix="$prefix"
1799
prefix="$acl_final_prefix"
1800
acl_save_exec_prefix="$exec_prefix"
1801
exec_prefix="$acl_final_exec_prefix"
1803
exec_prefix="$acl_save_exec_prefix"
1804
prefix="$acl_save_prefix"
1807
# lib-link.m4 serial 4 (gettext-0.12)
1808
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1809
dnl This file is free software, distributed under the terms of the GNU
1810
dnl General Public License. As a special exception to the GNU General
1811
dnl Public License, this file may be distributed as part of a program
1812
dnl that contains a configuration script generated by Autoconf, under
1813
dnl the same distribution terms as the rest of that program.
1815
dnl From Bruno Haible.
1817
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1818
dnl the libraries corresponding to explicit and implicit dependencies.
1819
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1820
dnl augments the CPPFLAGS variable.
1821
AC_DEFUN([AC_LIB_LINKFLAGS],
1823
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1824
AC_REQUIRE([AC_LIB_RPATH])
1825
define([Name],[translit([$1],[./-], [___])])
1826
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1827
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1828
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1829
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1830
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1831
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1832
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1834
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1835
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1836
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1837
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1839
AC_SUBST([LTLIB]NAME)
1840
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1841
dnl results of this search when this library appears as a dependency.
1847
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1848
dnl searches for libname and the libraries corresponding to explicit and
1849
dnl implicit dependencies, together with the specified include files and
1850
dnl the ability to compile and link the specified testcode. If found, it
1851
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1852
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1853
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1854
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1855
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1857
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1858
AC_REQUIRE([AC_LIB_RPATH])
1859
define([Name],[translit([$1],[./-], [___])])
1860
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1861
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1863
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1865
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1867
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1868
dnl because if the user has installed lib[]Name and not disabled its use
1869
dnl via --without-lib[]Name-prefix, he wants to use it.
1870
ac_save_CPPFLAGS="$CPPFLAGS"
1871
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1873
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1874
ac_save_LIBS="$LIBS"
1875
LIBS="$LIBS $LIB[]NAME"
1876
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1877
LIBS="$ac_save_LIBS"
1879
if test "$ac_cv_lib[]Name" = yes; then
1881
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1882
AC_MSG_CHECKING([how to link with lib[]$1])
1883
AC_MSG_RESULT([$LIB[]NAME])
1886
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1887
dnl $INC[]NAME either.
1888
CPPFLAGS="$ac_save_CPPFLAGS"
1892
AC_SUBST([HAVE_LIB]NAME)
1894
AC_SUBST([LTLIB]NAME)
1899
dnl Determine the platform dependent parameters needed to use rpath:
1900
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1901
dnl hardcode_direct, hardcode_minus_L.
1902
AC_DEFUN([AC_LIB_RPATH],
1904
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1905
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1906
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1907
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1908
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1909
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1910
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1916
libext="$acl_cv_libext"
1917
shlibext="$acl_cv_shlibext"
1918
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1919
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1920
hardcode_direct="$acl_cv_hardcode_direct"
1921
hardcode_minus_L="$acl_cv_hardcode_minus_L"
1922
dnl Determine whether the user wants rpath handling at all.
1923
AC_ARG_ENABLE(rpath,
1924
[ --disable-rpath do not hardcode runtime library paths],
1925
:, enable_rpath=yes)
1928
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1929
dnl the libraries corresponding to explicit and implicit dependencies.
1930
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1931
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1933
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1934
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1935
dnl By default, look in $includedir and $libdir.
1937
AC_LIB_WITH_FINAL_PREFIX([
1938
eval additional_includedir=\"$includedir\"
1939
eval additional_libdir=\"$libdir\"
1941
AC_LIB_ARG_WITH([lib$1-prefix],
1942
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
1943
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
1945
if test "X$withval" = "Xno"; then
1948
if test "X$withval" = "X"; then
1949
AC_LIB_WITH_FINAL_PREFIX([
1950
eval additional_includedir=\"$includedir\"
1951
eval additional_libdir=\"$libdir\"
1954
additional_includedir="$withval/include"
1955
additional_libdir="$withval/lib"
1959
dnl Search the library and its dependencies in $additional_libdir and
1960
dnl $LDFLAGS. Using breadth-first-seach.
1966
names_already_handled=
1967
names_next_round='$1 $2'
1968
while test -n "$names_next_round"; do
1969
names_this_round="$names_next_round"
1971
for name in $names_this_round; do
1973
for n in $names_already_handled; do
1974
if test "$n" = "$name"; then
1979
if test -z "$already_handled"; then
1980
names_already_handled="$names_already_handled $name"
1981
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1982
dnl or AC_LIB_HAVE_LINKFLAGS call.
1983
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1984
eval value=\"\$HAVE_LIB$uppername\"
1985
if test -n "$value"; then
1986
if test "$value" = yes; then
1987
eval value=\"\$LIB$uppername\"
1988
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1989
eval value=\"\$LTLIB$uppername\"
1990
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1992
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1993
dnl that this library doesn't exist. So just drop it.
1997
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1998
dnl and the already constructed $LIBNAME/$LTLIBNAME.
2003
if test $use_additional = yes; then
2004
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
2005
found_dir="$additional_libdir"
2006
found_so="$additional_libdir/lib$name.$shlibext"
2007
if test -f "$additional_libdir/lib$name.la"; then
2008
found_la="$additional_libdir/lib$name.la"
2011
if test -f "$additional_libdir/lib$name.$libext"; then
2012
found_dir="$additional_libdir"
2013
found_a="$additional_libdir/lib$name.$libext"
2014
if test -f "$additional_libdir/lib$name.la"; then
2015
found_la="$additional_libdir/lib$name.la"
2020
if test "X$found_dir" = "X"; then
2021
for x in $LDFLAGS $LTLIB[]NAME; do
2022
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2025
dir=`echo "X$x" | sed -e 's/^X-L//'`
2026
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
2028
found_so="$dir/lib$name.$shlibext"
2029
if test -f "$dir/lib$name.la"; then
2030
found_la="$dir/lib$name.la"
2033
if test -f "$dir/lib$name.$libext"; then
2035
found_a="$dir/lib$name.$libext"
2036
if test -f "$dir/lib$name.la"; then
2037
found_la="$dir/lib$name.la"
2043
if test "X$found_dir" != "X"; then
2048
if test "X$found_dir" != "X"; then
2049
dnl Found the library.
2050
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
2051
if test "X$found_so" != "X"; then
2052
dnl Linking with a shared library. We attempt to hardcode its
2053
dnl directory into the executable's runpath, unless it's the
2054
dnl standard /usr/lib.
2055
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
2056
dnl No hardcoding is needed.
2057
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2059
dnl Use an explicit option to hardcode DIR into the resulting
2061
dnl Potentially add DIR to ltrpathdirs.
2062
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2064
for x in $ltrpathdirs; do
2065
if test "X$x" = "X$found_dir"; then
2070
if test -z "$haveit"; then
2071
ltrpathdirs="$ltrpathdirs $found_dir"
2073
dnl The hardcoding into $LIBNAME is system dependent.
2074
if test "$hardcode_direct" = yes; then
2075
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
2076
dnl resulting binary.
2077
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2079
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
2080
dnl Use an explicit option to hardcode DIR into the resulting
2082
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2083
dnl Potentially add DIR to rpathdirs.
2084
dnl The rpathdirs will be appended to $LIBNAME at the end.
2086
for x in $rpathdirs; do
2087
if test "X$x" = "X$found_dir"; then
2092
if test -z "$haveit"; then
2093
rpathdirs="$rpathdirs $found_dir"
2096
dnl Rely on "-L$found_dir".
2097
dnl But don't add it if it's already contained in the LDFLAGS
2098
dnl or the already constructed $LIBNAME
2100
for x in $LDFLAGS $LIB[]NAME; do
2101
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2102
if test "X$x" = "X-L$found_dir"; then
2107
if test -z "$haveit"; then
2108
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
2110
if test "$hardcode_minus_L" != no; then
2111
dnl FIXME: Not sure whether we should use
2112
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2114
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2116
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
2117
dnl here, because this doesn't fit in flags passed to the
2118
dnl compiler. So give up. No hardcoding. This affects only
2119
dnl very old systems.
2120
dnl FIXME: Not sure whether we should use
2121
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2123
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2129
if test "X$found_a" != "X"; then
2130
dnl Linking with a static library.
2131
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
2133
dnl We shouldn't come here, but anyway it's good to have a
2135
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
2138
dnl Assume the include files are nearby.
2139
additional_includedir=
2140
case "$found_dir" in
2142
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
2143
additional_includedir="$basedir/include"
2146
if test "X$additional_includedir" != "X"; then
2147
dnl Potentially add $additional_includedir to $INCNAME.
2148
dnl But don't add it
2149
dnl 1. if it's the standard /usr/include,
2150
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
2151
dnl 3. if it's already present in $CPPFLAGS or the already
2152
dnl constructed $INCNAME,
2153
dnl 4. if it doesn't exist as a directory.
2154
if test "X$additional_includedir" != "X/usr/include"; then
2156
if test "X$additional_includedir" = "X/usr/local/include"; then
2157
if test -n "$GCC"; then
2159
linux*) haveit=yes;;
2163
if test -z "$haveit"; then
2164
for x in $CPPFLAGS $INC[]NAME; do
2165
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2166
if test "X$x" = "X-I$additional_includedir"; then
2171
if test -z "$haveit"; then
2172
if test -d "$additional_includedir"; then
2173
dnl Really add $additional_includedir to $INCNAME.
2174
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
2180
dnl Look for dependencies.
2181
if test -n "$found_la"; then
2182
dnl Read the .la file. It defines the variables
2183
dnl dlname, library_names, old_library, dependency_libs, current,
2184
dnl age, revision, installed, dlopen, dlpreopen, libdir.
2185
save_libdir="$libdir"
2187
*/* | *\\*) . "$found_la" ;;
2188
*) . "./$found_la" ;;
2190
libdir="$save_libdir"
2191
dnl We use only dependency_libs.
2192
for dep in $dependency_libs; do
2195
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
2196
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
2197
dnl But don't add it
2198
dnl 1. if it's the standard /usr/lib,
2199
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
2200
dnl 3. if it's already present in $LDFLAGS or the already
2201
dnl constructed $LIBNAME,
2202
dnl 4. if it doesn't exist as a directory.
2203
if test "X$additional_libdir" != "X/usr/lib"; then
2205
if test "X$additional_libdir" = "X/usr/local/lib"; then
2206
if test -n "$GCC"; then
2208
linux*) haveit=yes;;
2212
if test -z "$haveit"; then
2214
for x in $LDFLAGS $LIB[]NAME; do
2215
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2216
if test "X$x" = "X-L$additional_libdir"; then
2221
if test -z "$haveit"; then
2222
if test -d "$additional_libdir"; then
2223
dnl Really add $additional_libdir to $LIBNAME.
2224
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2228
for x in $LDFLAGS $LTLIB[]NAME; do
2229
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2230
if test "X$x" = "X-L$additional_libdir"; then
2235
if test -z "$haveit"; then
2236
if test -d "$additional_libdir"; then
2237
dnl Really add $additional_libdir to $LTLIBNAME.
2238
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2245
dir=`echo "X$dep" | sed -e 's/^X-R//'`
2246
if test "$enable_rpath" != no; then
2247
dnl Potentially add DIR to rpathdirs.
2248
dnl The rpathdirs will be appended to $LIBNAME at the end.
2250
for x in $rpathdirs; do
2251
if test "X$x" = "X$dir"; then
2256
if test -z "$haveit"; then
2257
rpathdirs="$rpathdirs $dir"
2259
dnl Potentially add DIR to ltrpathdirs.
2260
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2262
for x in $ltrpathdirs; do
2263
if test "X$x" = "X$dir"; then
2268
if test -z "$haveit"; then
2269
ltrpathdirs="$ltrpathdirs $dir"
2274
dnl Handle this in the next round.
2275
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2278
dnl Handle this in the next round. Throw away the .la's
2279
dnl directory; it is already contained in a preceding -L
2281
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2284
dnl Most likely an immediate library name.
2285
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2286
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2292
dnl Didn't find the library; assume it is in the system directories
2293
dnl known to the linker and runtime loader. (All the system
2294
dnl directories known to the linker should also be known to the
2295
dnl runtime loader, otherwise the system is severely misconfigured.)
2296
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2297
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2303
if test "X$rpathdirs" != "X"; then
2304
if test -n "$hardcode_libdir_separator"; then
2305
dnl Weird platform: only the last -rpath option counts, the user must
2306
dnl pass all path elements in one option. We can arrange that for a
2307
dnl single library, but not when more than one $LIBNAMEs are used.
2309
for found_dir in $rpathdirs; do
2310
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
2312
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
2313
acl_save_libdir="$libdir"
2315
eval flag=\"$hardcode_libdir_flag_spec\"
2316
libdir="$acl_save_libdir"
2317
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2319
dnl The -rpath options are cumulative.
2320
for found_dir in $rpathdirs; do
2321
acl_save_libdir="$libdir"
2323
eval flag=\"$hardcode_libdir_flag_spec\"
2324
libdir="$acl_save_libdir"
2325
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2329
if test "X$ltrpathdirs" != "X"; then
2330
dnl When using libtool, the option that works for both libraries and
2331
dnl executables is -R. The -R options are cumulative.
2332
for found_dir in $ltrpathdirs; do
2333
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2338
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2339
dnl unless already present in VAR.
2340
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2341
dnl contains two or three consecutive elements that belong together.
2342
AC_DEFUN([AC_LIB_APPENDTOVAR],
2344
for element in [$2]; do
2347
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2348
if test "X$x" = "X$element"; then
2353
if test -z "$haveit"; then
2354
[$1]="${[$1]}${[$1]:+ }$element"
2359
# lib-ld.m4 serial 2 (gettext-0.12)
2360
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
2361
dnl This file is free software, distributed under the terms of the GNU
2362
dnl General Public License. As a special exception to the GNU General
2363
dnl Public License, this file may be distributed as part of a program
2364
dnl that contains a configuration script generated by Autoconf, under
2365
dnl the same distribution terms as the rest of that program.
2367
dnl Subroutines of libtool.m4,
2368
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
2369
dnl with libtool.m4.
2371
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
2372
AC_DEFUN([AC_LIB_PROG_LD_GNU],
2373
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
2374
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2375
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2376
acl_cv_prog_gnu_ld=yes
2378
acl_cv_prog_gnu_ld=no
2380
with_gnu_ld=$acl_cv_prog_gnu_ld
2383
dnl From libtool-1.4. Sets the variable LD.
2384
AC_DEFUN([AC_LIB_PROG_LD],
2385
[AC_ARG_WITH(gnu-ld,
2386
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2387
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2388
AC_REQUIRE([AC_PROG_CC])dnl
2389
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2390
# Prepare PATH_SEPARATOR.
2391
# The user is always right.
2392
if test "${PATH_SEPARATOR+set}" != set; then
2393
echo "#! /bin/sh" >conf$$.sh
2394
echo "exit 0" >>conf$$.sh
2396
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2404
if test "$GCC" = yes; then
2405
# Check if gcc -print-prog-name=ld gives a path.
2406
AC_MSG_CHECKING([for ld used by GCC])
2409
# gcc leaves a trailing carriage return which upsets mingw
2410
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2412
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2415
# Accept absolute paths.
2416
[[\\/]* | [A-Za-z]:[\\/]*)]
2417
[re_direlt='/[^/][^/]*/\.\./']
2418
# Canonicalize the path of ld
2419
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2420
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2421
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2423
test -z "$LD" && LD="$ac_prog"
2426
# If it fails, then pretend we aren't using GCC.
2430
# If it is relative, then search for the first ld in PATH.
2434
elif test "$with_gnu_ld" = yes; then
2435
AC_MSG_CHECKING([for GNU ld])
2437
AC_MSG_CHECKING([for non-GNU ld])
2439
AC_CACHE_VAL(acl_cv_path_LD,
2440
[if test -z "$LD"; then
2441
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2442
for ac_dir in $PATH; do
2443
test -z "$ac_dir" && ac_dir=.
2444
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2445
acl_cv_path_LD="$ac_dir/$ac_prog"
2446
# Check to see if the program is GNU ld. I'd rather use --version,
2447
# but apparently some GNU ld's only accept -v.
2448
# Break only if it was the GNU/non-GNU ld that we prefer.
2449
if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2450
test "$with_gnu_ld" != no && break
2452
test "$with_gnu_ld" != yes && break
2458
acl_cv_path_LD="$LD" # Let the user override the test with a path.
2460
LD="$acl_cv_path_LD"
2461
if test -n "$LD"; then
2466
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2470
# iconv.m4 serial AM4 (gettext-0.11.3)
2471
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2472
dnl This file is free software, distributed under the terms of the GNU
2473
dnl General Public License. As a special exception to the GNU General
2474
dnl Public License, this file may be distributed as part of a program
2475
dnl that contains a configuration script generated by Autoconf, under
2476
dnl the same distribution terms as the rest of that program.
2478
dnl From Bruno Haible.
2480
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
2482
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2483
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2484
AC_REQUIRE([AC_LIB_RPATH])
2486
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2488
AC_LIB_LINKFLAGS_BODY([iconv])
2491
AC_DEFUN([AM_ICONV_LINK],
2493
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2494
dnl those with the standalone portable GNU libiconv installed).
2496
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2498
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
2500
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2501
dnl because if the user has installed libiconv and not disabled its use
2502
dnl via --without-libiconv-prefix, he wants to use it. The first
2503
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2504
am_save_CPPFLAGS="$CPPFLAGS"
2505
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2507
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2508
am_cv_func_iconv="no, consider installing GNU libiconv"
2510
AC_TRY_LINK([#include <stdlib.h>
2511
#include <iconv.h>],
2512
[iconv_t cd = iconv_open("","");
2513
iconv(cd,NULL,NULL,NULL,NULL);
2515
am_cv_func_iconv=yes)
2516
if test "$am_cv_func_iconv" != yes; then
2517
am_save_LIBS="$LIBS"
2518
LIBS="$LIBS $LIBICONV"
2519
AC_TRY_LINK([#include <stdlib.h>
2520
#include <iconv.h>],
2521
[iconv_t cd = iconv_open("","");
2522
iconv(cd,NULL,NULL,NULL,NULL);
2525
am_cv_func_iconv=yes)
2526
LIBS="$am_save_LIBS"
2529
if test "$am_cv_func_iconv" = yes; then
2530
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2532
if test "$am_cv_lib_iconv" = yes; then
2533
AC_MSG_CHECKING([how to link with libiconv])
2534
AC_MSG_RESULT([$LIBICONV])
2536
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2538
CPPFLAGS="$am_save_CPPFLAGS"
2543
AC_SUBST(LTLIBICONV)
2546
AC_DEFUN([AM_ICONV],
2549
if test "$am_cv_func_iconv" = yes; then
2550
AC_MSG_CHECKING([for iconv declaration])
2551
AC_CACHE_VAL(am_cv_proto_iconv, [
2559
#if defined(__STDC__) || defined(__cplusplus)
2560
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2564
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2565
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
2566
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2567
AC_MSG_RESULT([$]{ac_t:-
2568
}[$]am_cv_proto_iconv)
2569
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2570
[Define as const if the declaration of iconv() needs const.])
2574
# isc-posix.m4 serial 2 (gettext-0.11.2)
2575
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2576
dnl This file is free software, distributed under the terms of the GNU
2577
dnl General Public License. As a special exception to the GNU General
2578
dnl Public License, this file may be distributed as part of a program
2579
dnl that contains a configuration script generated by Autoconf, under
2580
dnl the same distribution terms as the rest of that program.
2582
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
2584
# This test replaces the one in autoconf.
2585
# Currently this macro should have the same name as the autoconf macro
2586
# because gettext's gettext.m4 (distributed in the automake package)
2587
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
2588
# give these diagnostics:
2589
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
2590
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
2592
undefine([AC_ISC_POSIX])
2594
AC_DEFUN([AC_ISC_POSIX],
2596
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
2597
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
2601
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
2602
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2603
dnl This file is free software, distributed under the terms of the GNU
2604
dnl General Public License. As a special exception to the GNU General
2605
dnl Public License, this file may be distributed as part of a program
2606
dnl that contains a configuration script generated by Autoconf, under
2607
dnl the same distribution terms as the rest of that program.
2609
# Test for the GNU C Library, version 2.1 or newer.
2610
# From Bruno Haible.
2612
AC_DEFUN([jm_GLIBC21],
2614
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
2615
ac_cv_gnu_library_2_1,
2616
[AC_EGREP_CPP([Lucky GNU user],
2618
#include <features.h>
2619
#ifdef __GNU_LIBRARY__
2620
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
2625
ac_cv_gnu_library_2_1=yes,
2626
ac_cv_gnu_library_2_1=no)
2630
GLIBC21="$ac_cv_gnu_library_2_1"
2634
# intdiv0.m4 serial 1 (gettext-0.11.3)
2635
dnl Copyright (C) 2002 Free Software Foundation, Inc.
2636
dnl This file is free software, distributed under the terms of the GNU
2637
dnl General Public License. As a special exception to the GNU General
2638
dnl Public License, this file may be distributed as part of a program
2639
dnl that contains a configuration script generated by Autoconf, under
2640
dnl the same distribution terms as the rest of that program.
2642
dnl From Bruno Haible.
2644
AC_DEFUN([gt_INTDIV0],
2646
AC_REQUIRE([AC_PROG_CC])dnl
2647
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2649
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
2650
gt_cv_int_divbyzero_sigfpe,
195
2653
#include <stdlib.h>
200
int major, minor, micro;
203
system ("touch conf.gtktest");
205
/* HP/UX 9 (%@#!) writes to sscanf strings */
206
tmp_version = g_strdup("$min_gtk_version");
207
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
208
printf("%s, bad version string\n", "$min_gtk_version");
212
if ((gtk_major_version != $gtk_config_major_version) ||
213
(gtk_minor_version != $gtk_config_minor_version) ||
214
(gtk_micro_version != $gtk_config_micro_version))
216
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
217
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
218
gtk_major_version, gtk_minor_version, gtk_micro_version);
219
printf ("*** was found! If gtk-config was correct, then it is best\n");
220
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
221
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
222
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
223
printf("*** required on your system.\n");
224
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
225
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
226
printf("*** before re-running configure\n");
228
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
229
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
230
(gtk_minor_version != GTK_MINOR_VERSION) ||
231
(gtk_micro_version != GTK_MICRO_VERSION))
233
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
234
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
235
printf("*** library (version %d.%d.%d)\n",
236
gtk_major_version, gtk_minor_version, gtk_micro_version);
238
#endif /* defined (GTK_MAJOR_VERSION) ... */
241
if ((gtk_major_version > major) ||
242
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
243
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
249
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
250
gtk_major_version, gtk_minor_version, gtk_micro_version);
251
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
252
major, minor, micro);
253
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
255
printf("*** If you have already installed a sufficiently new version, this error\n");
256
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
257
printf("*** being found. The easiest way to fix this is to remove the old version\n");
258
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
259
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
260
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
261
printf("*** so that the correct libraries are found at run-time))\n");
266
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
267
CFLAGS="$ac_save_CFLAGS"
271
if test "x$no_gtk" = x ; then
273
ifelse([$2], , :, [$2])
276
if test "$GTK_CONFIG" = "no" ; then
277
echo "*** The gtk-config script installed by GTK could not be found"
278
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
279
echo "*** your path, or set the GTK_CONFIG environment variable to the"
280
echo "*** full path to gtk-config."
282
if test -f conf.gtktest ; then
285
echo "*** Could not run GTK test program, checking why..."
286
CFLAGS="$CFLAGS $GTK_CFLAGS"
287
LIBS="$LIBS $GTK_LIBS"
291
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
292
[ echo "*** The test program compiled, but did not run. This usually means"
293
echo "*** that the run-time linker is not finding GTK or finding the wrong"
294
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
295
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
296
echo "*** to the installed location Also, make sure you have run ldconfig if that"
297
echo "*** is required on your system"
299
echo "*** If you have an old version installed, it is best to remove it, although"
300
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
302
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
303
echo "*** came with the system with the command"
305
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
306
[ echo "*** The test program failed to compile or link. See the file config.log for the"
307
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
308
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
309
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
310
CFLAGS="$ac_save_CFLAGS"
316
ifelse([$3], , :, [$3])
2658
sigfpe_handler (int sig)
2660
sigfpe_handler (sig) int sig;
2663
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
2664
exit (sig != SIGFPE);
2674
signal (SIGFPE, sigfpe_handler);
2675
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
2676
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
2677
signal (SIGTRAP, sigfpe_handler);
2679
/* Linux/SPARC yields signal SIGILL. */
2680
#if defined (__sparc__) && defined (__linux__)
2681
signal (SIGILL, sigfpe_handler);
2688
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
2690
# Guess based on the CPU.
2692
alpha* | i[34567]86 | m68k | s390*)
2693
gt_cv_int_divbyzero_sigfpe="guessing yes";;
2695
gt_cv_int_divbyzero_sigfpe="guessing no";;
2699
case "$gt_cv_int_divbyzero_sigfpe" in
2703
AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
2704
[Define if integer division by zero raises signal SIGFPE.])
2707
# uintmax_t.m4 serial 7 (gettext-0.12)
2708
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2709
dnl This file is free software, distributed under the terms of the GNU
2710
dnl General Public License. As a special exception to the GNU General
2711
dnl Public License, this file may be distributed as part of a program
2712
dnl that contains a configuration script generated by Autoconf, under
2713
dnl the same distribution terms as the rest of that program.
2715
dnl From Paul Eggert.
2719
# Define uintmax_t to 'unsigned long' or 'unsigned long long'
2720
# if it is not already defined in <stdint.h> or <inttypes.h>.
2722
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
2724
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
2725
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
2726
if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
2727
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
2728
test $ac_cv_type_unsigned_long_long = yes \
2729
&& ac_type='unsigned long long' \
2730
|| ac_type='unsigned long'
2731
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
2732
[Define to unsigned long or unsigned long long
2733
if <stdint.h> and <inttypes.h> don't define.])
2735
AC_DEFINE(HAVE_UINTMAX_T, 1,
2736
[Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
2740
# inttypes_h.m4 serial 5 (gettext-0.12)
2741
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2742
dnl This file is free software, distributed under the terms of the GNU
2743
dnl General Public License. As a special exception to the GNU General
2744
dnl Public License, this file may be distributed as part of a program
2745
dnl that contains a configuration script generated by Autoconf, under
2746
dnl the same distribution terms as the rest of that program.
2748
dnl From Paul Eggert.
2750
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
2751
# doesn't clash with <sys/types.h>, and declares uintmax_t.
2753
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
2755
AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
2757
[#include <sys/types.h>
2758
#include <inttypes.h>],
2759
[uintmax_t i = (uintmax_t) -1;],
2760
jm_ac_cv_header_inttypes_h=yes,
2761
jm_ac_cv_header_inttypes_h=no)])
2762
if test $jm_ac_cv_header_inttypes_h = yes; then
2763
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
2764
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
2765
and declares uintmax_t. ])
2769
# stdint_h.m4 serial 3 (gettext-0.12)
2770
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2771
dnl This file is free software, distributed under the terms of the GNU
2772
dnl General Public License. As a special exception to the GNU General
2773
dnl Public License, this file may be distributed as part of a program
2774
dnl that contains a configuration script generated by Autoconf, under
2775
dnl the same distribution terms as the rest of that program.
2777
dnl From Paul Eggert.
2779
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
2780
# doesn't clash with <sys/types.h>, and declares uintmax_t.
2782
AC_DEFUN([jm_AC_HEADER_STDINT_H],
2784
AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
2786
[#include <sys/types.h>
2787
#include <stdint.h>],
2788
[uintmax_t i = (uintmax_t) -1;],
2789
jm_ac_cv_header_stdint_h=yes,
2790
jm_ac_cv_header_stdint_h=no)])
2791
if test $jm_ac_cv_header_stdint_h = yes; then
2792
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
2793
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
2794
and declares uintmax_t. ])
2798
# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
2799
dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
2800
dnl This file is free software, distributed under the terms of the GNU
2801
dnl General Public License. As a special exception to the GNU General
2802
dnl Public License, this file may be distributed as part of a program
2803
dnl that contains a configuration script generated by Autoconf, under
2804
dnl the same distribution terms as the rest of that program.
2806
dnl From Paul Eggert.
2808
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
2810
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
2811
[AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
2812
[unsigned long long ullmax = (unsigned long long) -1;
2813
return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
2814
ac_cv_type_unsigned_long_long=yes,
2815
ac_cv_type_unsigned_long_long=no)])
2816
if test $ac_cv_type_unsigned_long_long = yes; then
2817
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
2818
[Define if you have the unsigned long long type.])
2822
# inttypes.m4 serial 1 (gettext-0.11.4)
2823
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2824
dnl This file is free software, distributed under the terms of the GNU
2825
dnl General Public License. As a special exception to the GNU General
2826
dnl Public License, this file may be distributed as part of a program
2827
dnl that contains a configuration script generated by Autoconf, under
2828
dnl the same distribution terms as the rest of that program.
2830
dnl From Paul Eggert.
2832
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
2835
AC_DEFUN([gt_HEADER_INTTYPES_H],
2837
AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
2840
[#include <sys/types.h>
2841
#include <inttypes.h>],
2842
[], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
2844
if test $gt_cv_header_inttypes_h = yes; then
2845
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
2846
[Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
2850
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
2851
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2852
dnl This file is free software, distributed under the terms of the GNU
2853
dnl General Public License. As a special exception to the GNU General
2854
dnl Public License, this file may be distributed as part of a program
2855
dnl that contains a configuration script generated by Autoconf, under
2856
dnl the same distribution terms as the rest of that program.
2858
dnl From Bruno Haible.
2860
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
2861
# macros to non-string values. This is the case on AIX 4.3.3.
2863
AC_DEFUN([gt_INTTYPES_PRI],
2865
AC_REQUIRE([gt_HEADER_INTTYPES_H])
2866
if test $gt_cv_header_inttypes_h = yes; then
2867
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
2868
gt_cv_inttypes_pri_broken,
2870
AC_TRY_COMPILE([#include <inttypes.h>
2874
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
2877
if test "$gt_cv_inttypes_pri_broken" = yes; then
2878
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
2879
[Define if <inttypes.h> exists and defines unusable PRI* macros.])
2883
# codeset.m4 serial AM1 (gettext-0.10.40)
2884
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2885
dnl This file is free software, distributed under the terms of the GNU
2886
dnl General Public License. As a special exception to the GNU General
2887
dnl Public License, this file may be distributed as part of a program
2888
dnl that contains a configuration script generated by Autoconf, under
2889
dnl the same distribution terms as the rest of that program.
2891
dnl From Bruno Haible.
2893
AC_DEFUN([AM_LANGINFO_CODESET],
2895
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
2896
[AC_TRY_LINK([#include <langinfo.h>],
2897
[char* cs = nl_langinfo(CODESET);],
2898
am_cv_langinfo_codeset=yes,
2899
am_cv_langinfo_codeset=no)
2901
if test $am_cv_langinfo_codeset = yes; then
2902
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
2903
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
2907
# lcmessage.m4 serial 3 (gettext-0.11.3)
2908
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2909
dnl This file is free software, distributed under the terms of the GNU
2910
dnl General Public License. As a special exception to the GNU General
2911
dnl Public License, this file may be distributed as part of a program
2912
dnl that contains a configuration script generated by Autoconf, under
2913
dnl the same distribution terms as the rest of that program.
2915
dnl This file can can be used in projects which are not available under
2916
dnl the GNU General Public License or the GNU Library General Public
2917
dnl License but which still want to provide support for the GNU gettext
2919
dnl Please note that the actual code of the GNU gettext library is covered
2920
dnl by the GNU Library General Public License, and the rest of the GNU
2921
dnl gettext package package is covered by the GNU General Public License.
2922
dnl They are *not* in the public domain.
2925
dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
2927
# Check whether LC_MESSAGES is available in <locale.h>.
2929
AC_DEFUN([AM_LC_MESSAGES],
2931
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2932
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2933
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
2934
if test $am_cv_val_LC_MESSAGES = yes; then
2935
AC_DEFINE(HAVE_LC_MESSAGES, 1,
2936
[Define if your <locale.h> file defines LC_MESSAGES.])