789
582
rm -f confinc confmf
792
# AM_CONDITIONAL -*- Autoconf -*-
794
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
796
# This program is free software; you can redistribute it and/or modify
797
# it under the terms of the GNU General Public License as published by
798
# the Free Software Foundation; either version 2, or (at your option)
801
# This program is distributed in the hope that it will be useful,
802
# but WITHOUT ANY WARRANTY; without even the implied warranty of
803
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
804
# GNU General Public License for more details.
806
# You should have received a copy of the GNU General Public License
807
# along with this program; if not, write to the Free Software
808
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
815
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
816
# -------------------------------------
817
# Define a conditional.
818
AC_DEFUN([AM_CONDITIONAL],
819
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
820
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
830
AC_CONFIG_COMMANDS_PRE(
831
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832
AC_MSG_ERROR([conditional "$1" was never defined.
833
Usually this means the macro was only invoked conditionally.])
836
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
838
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
840
# This program is free software; you can redistribute it and/or modify
841
# it under the terms of the GNU General Public License as published by
842
# the Free Software Foundation; either version 2, or (at your option)
845
# This program is distributed in the hope that it will be useful,
846
# but WITHOUT ANY WARRANTY; without even the implied warranty of
847
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
848
# GNU General Public License for more details.
850
# You should have received a copy of the GNU General Public License
851
# along with this program; if not, write to the Free Software
852
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
859
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
860
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
862
# gettext.m4 serial 17 (gettext-0.11.5)
863
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
864
dnl This file is free software, distributed under the terms of the GNU
865
dnl General Public License. As a special exception to the GNU General
866
dnl Public License, this file may be distributed as part of a program
867
dnl that contains a configuration script generated by Autoconf, under
868
dnl the same distribution terms as the rest of that program.
870
dnl This file can can be used in projects which are not available under
871
dnl the GNU General Public License or the GNU Library General Public
872
dnl License but which still want to provide support for the GNU gettext
874
dnl Please note that the actual code of the GNU gettext library is covered
875
dnl by the GNU Library General Public License, and the rest of the GNU
876
dnl gettext package package is covered by the GNU General Public License.
877
dnl They are *not* in the public domain.
880
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
881
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
883
dnl Macro to add for using GNU gettext.
885
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
886
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
887
dnl default (if it is not specified or empty) is 'no-libtool'.
888
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
889
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
890
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
891
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
892
dnl depending on --{enable,disable}-{shared,static} and on the presence of
893
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
894
dnl $(top_builddir)/intl/libintl.a will be created.
895
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
896
dnl implementations (in libc or libintl) without the ngettext() function
897
dnl will be ignored. If NEEDSYMBOL is specified and is
898
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
899
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
900
dnl INTLDIR is used to find the intl libraries. If empty,
901
dnl the value `$(top_builddir)/intl/' is used.
903
dnl The result of the configuration is one of three cases:
904
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
906
dnl Catalog format: GNU --> install in $(datadir)
907
dnl Catalog extension: .mo after installation, .gmo in source tree
908
dnl 2) GNU gettext has been found in the system's C library.
909
dnl Catalog format: GNU --> install in $(datadir)
910
dnl Catalog extension: .mo after installation, .gmo in source tree
911
dnl 3) No internationalization, always use English msgid.
912
dnl Catalog format: none
913
dnl Catalog extension: none
914
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
915
dnl The use of .gmo is historical (it was needed to avoid overwriting the
916
dnl GNU format catalogs when building on a platform with an X/Open gettext),
917
dnl but we keep it in order not to force irrelevant filename changes on the
920
AC_DEFUN([AM_GNU_GETTEXT],
922
dnl Argument checking.
923
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
924
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
926
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
927
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
929
define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
930
define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
932
AC_REQUIRE([AM_PO_SUBDIRS])dnl
933
ifelse(gt_included_intl, yes, [
934
AC_REQUIRE([AM_INTL_SUBDIR])dnl
937
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
938
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
939
AC_REQUIRE([AC_LIB_RPATH])
941
dnl Sometimes libintl requires libiconv, so first search for libiconv.
942
dnl Ideally we would do this search only after the
943
dnl if test "$USE_NLS" = "yes"; then
944
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
945
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
946
dnl the configure script would need to contain the same shell code
947
dnl again, outside any 'if'. There are two solutions:
948
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
949
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
950
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
951
dnl documented, we avoid it.
952
ifelse(gt_included_intl, yes, , [
953
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
956
AC_MSG_CHECKING([whether NLS is requested])
957
dnl Default is enabled NLS
959
[ --disable-nls do not use Native Language Support],
960
USE_NLS=$enableval, USE_NLS=yes)
961
AC_MSG_RESULT($USE_NLS)
964
ifelse(gt_included_intl, yes, [
965
BUILD_INCLUDED_LIBINTL=no
966
USE_INCLUDED_LIBINTL=no
972
dnl If we use NLS figure out what method
973
if test "$USE_NLS" = "yes"; then
974
gt_use_preinstalled_gnugettext=no
975
ifelse(gt_included_intl, yes, [
976
AC_MSG_CHECKING([whether included gettext is requested])
977
AC_ARG_WITH(included-gettext,
978
[ --with-included-gettext use the GNU gettext library included here],
979
nls_cv_force_use_gnu_gettext=$withval,
980
nls_cv_force_use_gnu_gettext=no)
981
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
983
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
984
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
986
dnl User does not insist on using GNU NLS library. Figure out what
987
dnl to use. If GNU gettext is available we use this. Else we have
988
dnl to fall back to GNU NLS library.
990
dnl Add a version number to the cache macros.
991
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
992
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
993
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
995
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
996
[AC_TRY_LINK([#include <libintl.h>
997
]ifelse([$2], [need-formatstring-macros],
998
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
999
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1002
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1004
], [])[extern int _nl_msg_cat_cntr;
1005
extern int *_nl_domain_bindings;],
1006
[bindtextdomain ("", "");
1007
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
1008
gt_cv_func_gnugettext_libc=yes,
1009
gt_cv_func_gnugettext_libc=no)])
1011
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1012
dnl Sometimes libintl requires libiconv, so first search for libiconv.
1013
ifelse(gt_included_intl, yes, , [
1016
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
1017
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
1018
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
1019
dnl even if libiconv doesn't exist.
1020
AC_LIB_LINKFLAGS_BODY([intl])
1021
AC_CACHE_CHECK([for GNU gettext in libintl],
1022
gt_cv_func_gnugettext_libintl,
1023
[gt_save_CPPFLAGS="$CPPFLAGS"
1024
CPPFLAGS="$CPPFLAGS $INCINTL"
1025
gt_save_LIBS="$LIBS"
1026
LIBS="$LIBS $LIBINTL"
1027
dnl Now see whether libintl exists and does not depend on libiconv.
1028
AC_TRY_LINK([#include <libintl.h>
1029
]ifelse([$2], [need-formatstring-macros],
1030
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1031
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1034
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1036
], [])[extern int _nl_msg_cat_cntr;
1041
const char *_nl_expand_alias ();],
1042
[bindtextdomain ("", "");
1043
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1044
gt_cv_func_gnugettext_libintl=yes,
1045
gt_cv_func_gnugettext_libintl=no)
1046
dnl Now see whether libintl exists and depends on libiconv.
1047
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
1048
LIBS="$LIBS $LIBICONV"
1049
AC_TRY_LINK([#include <libintl.h>
1050
]ifelse([$2], [need-formatstring-macros],
1051
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1052
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1055
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1057
], [])[extern int _nl_msg_cat_cntr;
1062
const char *_nl_expand_alias ();],
1063
[bindtextdomain ("", "");
1064
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1065
[LIBINTL="$LIBINTL $LIBICONV"
1066
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1067
gt_cv_func_gnugettext_libintl=yes
1070
CPPFLAGS="$gt_save_CPPFLAGS"
1071
LIBS="$gt_save_LIBS"])
1074
dnl If an already present or preinstalled GNU gettext() is found,
1075
dnl use it. But if this macro is used in GNU gettext, and GNU
1076
dnl gettext is already preinstalled in libintl, we update this
1077
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
1078
if test "$gt_cv_func_gnugettext_libc" = "yes" \
1079
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
1080
&& test "$PACKAGE" != gettext; }; then
1081
gt_use_preinstalled_gnugettext=yes
1083
dnl Reset the values set by searching for libintl.
1089
ifelse(gt_included_intl, yes, [
1090
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1091
dnl GNU gettext is not found in the C library.
1092
dnl Fall back on included GNU gettext library.
1093
nls_cv_use_gnu_gettext=yes
1097
if test "$nls_cv_use_gnu_gettext" = "yes"; then
1098
dnl Mark actions used to generate GNU NLS library.
1099
INTLOBJS="\$(GETTOBJS)"
1100
BUILD_INCLUDED_LIBINTL=yes
1101
USE_INCLUDED_LIBINTL=yes
1102
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
1103
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
1104
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1107
if test "$gt_use_preinstalled_gnugettext" = "yes" \
1108
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
1109
dnl Mark actions to use GNU gettext tools.
1114
if test "$gt_use_preinstalled_gnugettext" = "yes" \
1115
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
1116
AC_DEFINE(ENABLE_NLS, 1,
1117
[Define to 1 if translation of program messages to the user's native language
1124
if test "$USE_NLS" = "yes"; then
1126
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1127
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1128
AC_MSG_CHECKING([how to link with libintl])
1129
AC_MSG_RESULT([$LIBINTL])
1130
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1133
dnl For backward compatibility. Some packages may be using this.
1134
AC_DEFINE(HAVE_GETTEXT, 1,
1135
[Define if the GNU gettext() function is already present or preinstalled.])
1136
AC_DEFINE(HAVE_DCGETTEXT, 1,
1137
[Define if the GNU dcgettext() function is already present or preinstalled.])
1140
dnl We need to process the po/ directory.
1144
ifelse(gt_included_intl, yes, [
1145
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1146
dnl to 'yes' because some of the testsuite requires it.
1147
if test "$PACKAGE" = gettext; then
1148
BUILD_INCLUDED_LIBINTL=yes
1151
dnl Make all variables we use known to autoconf.
1152
AC_SUBST(BUILD_INCLUDED_LIBINTL)
1153
AC_SUBST(USE_INCLUDED_LIBINTL)
1157
dnl For backward compatibility. Some configure.ins may be using this.
1159
nls_cv_header_libgt=
1161
dnl For backward compatibility. Some Makefiles may be using this.
1163
AC_SUBST(DATADIRNAME)
1165
dnl For backward compatibility. Some Makefiles may be using this.
1167
AC_SUBST(INSTOBJEXT)
1169
dnl For backward compatibility. Some Makefiles may be using this.
1173
dnl Enable libtool support if the surrounding package wishes it.
1174
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1175
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
1178
dnl For backward compatibility. Some Makefiles may be using this.
1182
dnl Make all documented variables known to autoconf.
1189
dnl Checks for all prerequisites of the po subdirectory,
1190
dnl except for USE_NLS.
1191
AC_DEFUN([AM_PO_SUBDIRS],
1193
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1194
AC_REQUIRE([AC_PROG_INSTALL])dnl
1195
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1197
dnl Perform the following tests also if --disable-nls has been given,
1198
dnl because they are needed for "make dist" to work.
1200
dnl Search for GNU msgfmt in the PATH.
1201
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1202
dnl The second test excludes FreeBSD msgfmt.
1203
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1204
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1205
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1207
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1209
dnl Search for GNU xgettext 0.11 or newer in the PATH.
1210
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1211
dnl The second test excludes FreeBSD xgettext.
1212
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1213
[$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1214
(if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1216
dnl Remove leftover from FreeBSD xgettext call.
1219
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1220
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1221
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1223
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1224
dnl Test whether we really found GNU msgfmt.
1225
if test "$GMSGFMT" != ":"; then
1226
dnl If it is no GNU msgfmt we define it as : so that the
1227
dnl Makefiles still can work.
1228
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1229
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1232
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1234
[found $GMSGFMT program is not GNU msgfmt; ignore it])
1239
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1240
dnl Test whether we really found GNU xgettext.
1241
if test "$XGETTEXT" != ":"; then
1242
dnl If it is no GNU xgettext we define it as : so that the
1243
dnl Makefiles still can work.
1244
if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1245
(if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1249
[found xgettext program is not GNU xgettext; ignore it])
1252
dnl Remove leftover from FreeBSD xgettext call.
1256
AC_OUTPUT_COMMANDS([
1257
for ac_file in $CONFIG_FILES; do
1258
# Support "outfile[:infile[:infile...]]"
1260
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1262
# PO directories have a Makefile.in generated from Makefile.in.in.
1263
case "$ac_file" in */Makefile.in)
1264
# Adjust a relative srcdir.
1265
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1266
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1267
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1268
# In autoconf-2.13 it is called $ac_given_srcdir.
1269
# In autoconf-2.50 it is called $srcdir.
1270
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1271
case "$ac_given_srcdir" in
1272
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1273
/*) top_srcdir="$ac_given_srcdir" ;;
1274
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1276
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1277
rm -f "$ac_dir/POTFILES"
1278
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1279
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1280
# ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
1281
# on $ac_dir but don't depend on user-specified configuration
1283
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1284
# The LINGUAS file contains the set of available languages.
1285
if test -n "$ALL_LINGUAS"; then
1286
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1288
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1289
# Hide the ALL_LINGUAS assigment from automake.
1290
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1292
case "$ac_given_srcdir" in
1294
*) srcdirpre='$(srcdir)/' ;;
1300
for lang in $ALL_LINGUAS; do
1301
POFILES="$POFILES $srcdirpre$lang.po"
1302
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1303
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1304
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1306
# CATALOGS depends on both $ac_dir and the user's LINGUAS
1307
# environment variable.
1309
if test -n "$ALL_LINGUAS"; then
1310
for presentlang in $ALL_LINGUAS; do
1312
if test "%UNSET%" != "$LINGUAS"; then
1313
desiredlanguages="$LINGUAS"
1315
desiredlanguages="$ALL_LINGUAS"
1317
for desiredlang in $desiredlanguages; do
1318
# Use the presentlang catalog if desiredlang is
1319
# a. equal to presentlang, or
1320
# b. a variant of presentlang (because in this case,
1321
# presentlang can be used as a fallback for messages
1322
# which are not translated in the desiredlang catalog).
1323
case "$desiredlang" in
1324
"$presentlang"*) useit=yes;;
1327
if test $useit = yes; then
1328
INST_LINGUAS="$INST_LINGUAS $presentlang"
1333
if test -n "$INST_LINGUAS"; then
1334
for lang in $INST_LINGUAS; do
1335
CATALOGS="$CATALOGS $lang.gmo"
1338
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1339
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" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
1340
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1341
if test -f "$f"; then
1343
*.orig | *.bak | *~) ;;
1344
*) cat "$f" >> "$ac_dir/Makefile" ;;
1352
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
1353
# POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
1355
eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
1356
# Capture the value of LINGUAS because we need it to compute CATALOGS.
1357
LINGUAS="${LINGUAS-%UNSET%}"
1362
dnl Checks for all prerequisites of the intl subdirectory,
1363
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
1364
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1365
AC_DEFUN([AM_INTL_SUBDIR],
1367
AC_REQUIRE([AC_PROG_INSTALL])dnl
1368
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1369
AC_REQUIRE([AC_PROG_CC])dnl
1370
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1371
AC_REQUIRE([AC_PROG_RANLIB])dnl
1372
AC_REQUIRE([AC_ISC_POSIX])dnl
1373
AC_REQUIRE([AC_HEADER_STDC])dnl
1374
AC_REQUIRE([AC_C_CONST])dnl
1375
AC_REQUIRE([AC_C_INLINE])dnl
1376
AC_REQUIRE([AC_TYPE_OFF_T])dnl
1377
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1378
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1379
AC_REQUIRE([AC_FUNC_MMAP])dnl
1380
AC_REQUIRE([jm_GLIBC21])dnl
1381
AC_REQUIRE([gt_INTDIV0])dnl
1382
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
1383
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
1384
AC_REQUIRE([gt_INTTYPES_PRI])dnl
1386
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1387
stdlib.h string.h unistd.h sys/param.h])
1388
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
1389
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
1390
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
1394
if test $ac_cv_header_locale_h = yes; then
1398
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
1399
dnl because plural.y uses bison specific features. It requires at least
1400
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
1402
dnl bison is only needed for the maintainer (who touches plural.y). But in
1403
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
1404
dnl the rule in general Makefile. Now, some people carelessly touch the
1405
dnl files or have a broken "make" program, hence the plural.c rule will
1406
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
1407
dnl present or too old.
1408
AC_CHECK_PROGS([INTLBISON], [bison])
1409
if test -z "$INTLBISON"; then
1412
dnl Found it, now check the version.
1413
AC_MSG_CHECKING([version of bison])
1414
changequote(<<,>>)dnl
1415
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
1416
case $ac_prog_version in
1417
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1418
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
1420
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1421
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1423
AC_MSG_RESULT([$ac_prog_version])
1425
if test $ac_verc_fail = yes; then
1431
AC_DEFUN([AM_MKINSTALLDIRS],
1433
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1434
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1435
dnl Try to locate is.
1437
if test -n "$ac_aux_dir"; then
1438
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1440
if test -z "$MKINSTALLDIRS"; then
1441
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1443
AC_SUBST(MKINSTALLDIRS)
1447
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
1448
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
1450
# lib-prefix.m4 serial 1 (gettext-0.11)
1451
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1452
dnl This file is free software, distributed under the terms of the GNU
1453
dnl General Public License. As a special exception to the GNU General
1454
dnl Public License, this file may be distributed as part of a program
1455
dnl that contains a configuration script generated by Autoconf, under
1456
dnl the same distribution terms as the rest of that program.
1458
dnl From Bruno Haible.
1460
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1461
dnl to access previously installed libraries. The basic assumption is that
1462
dnl a user will want packages to use other packages he previously installed
1463
dnl with the same --prefix option.
1464
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1465
dnl libraries, but is otherwise very convenient.
1466
AC_DEFUN([AC_LIB_PREFIX],
1468
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1469
AC_REQUIRE([AC_PROG_CC])
1470
AC_REQUIRE([AC_CANONICAL_HOST])
1471
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1472
dnl By default, look in $includedir and $libdir.
1474
AC_LIB_WITH_FINAL_PREFIX([
1475
eval additional_includedir=\"$includedir\"
1476
eval additional_libdir=\"$libdir\"
1478
AC_ARG_WITH([lib-prefix],
1479
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1480
--without-lib-prefix don't search for libraries in includedir and libdir],
1482
if test "X$withval" = "Xno"; then
1485
if test "X$withval" = "X"; then
1486
AC_LIB_WITH_FINAL_PREFIX([
1487
eval additional_includedir=\"$includedir\"
1488
eval additional_libdir=\"$libdir\"
1491
additional_includedir="$withval/include"
1492
additional_libdir="$withval/lib"
1496
if test $use_additional = yes; then
1497
dnl Potentially add $additional_includedir to $CPPFLAGS.
1498
dnl But don't add it
1499
dnl 1. if it's the standard /usr/include,
1500
dnl 2. if it's already present in $CPPFLAGS,
1501
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1502
dnl 4. if it doesn't exist as a directory.
1503
if test "X$additional_includedir" != "X/usr/include"; then
1505
for x in $CPPFLAGS; do
1506
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1507
if test "X$x" = "X-I$additional_includedir"; then
1512
if test -z "$haveit"; then
1513
if test "X$additional_includedir" = "X/usr/local/include"; then
1514
if test -n "$GCC"; then
1516
linux*) haveit=yes;;
1520
if test -z "$haveit"; then
1521
if test -d "$additional_includedir"; then
1522
dnl Really add $additional_includedir to $CPPFLAGS.
1523
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1528
dnl Potentially add $additional_libdir to $LDFLAGS.
1529
dnl But don't add it
1530
dnl 1. if it's the standard /usr/lib,
1531
dnl 2. if it's already present in $LDFLAGS,
1532
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1533
dnl 4. if it doesn't exist as a directory.
1534
if test "X$additional_libdir" != "X/usr/lib"; then
1536
for x in $LDFLAGS; do
1537
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1538
if test "X$x" = "X-L$additional_libdir"; then
1543
if test -z "$haveit"; then
1544
if test "X$additional_libdir" = "X/usr/local/lib"; then
1545
if test -n "$GCC"; then
1547
linux*) haveit=yes;;
1551
if test -z "$haveit"; then
1552
if test -d "$additional_libdir"; then
1553
dnl Really add $additional_libdir to $LDFLAGS.
1554
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1562
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1563
dnl acl_final_exec_prefix, containing the values to which $prefix and
1564
dnl $exec_prefix will expand at the end of the configure script.
1565
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1567
dnl Unfortunately, prefix and exec_prefix get only finally determined
1568
dnl at the end of configure.
1569
if test "X$prefix" = "XNONE"; then
1570
acl_final_prefix="$ac_default_prefix"
1572
acl_final_prefix="$prefix"
1574
if test "X$exec_prefix" = "XNONE"; then
1575
acl_final_exec_prefix='${prefix}'
1577
acl_final_exec_prefix="$exec_prefix"
1579
acl_save_prefix="$prefix"
1580
prefix="$acl_final_prefix"
1581
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1582
prefix="$acl_save_prefix"
1585
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1586
dnl variables prefix and exec_prefix bound to the values they will have
1587
dnl at the end of the configure script.
1588
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1590
acl_save_prefix="$prefix"
1591
prefix="$acl_final_prefix"
1592
acl_save_exec_prefix="$exec_prefix"
1593
exec_prefix="$acl_final_exec_prefix"
1595
exec_prefix="$acl_save_exec_prefix"
1596
prefix="$acl_save_prefix"
1599
# lib-link.m4 serial 3 (gettext-0.11.3)
1600
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1601
dnl This file is free software, distributed under the terms of the GNU
1602
dnl General Public License. As a special exception to the GNU General
1603
dnl Public License, this file may be distributed as part of a program
1604
dnl that contains a configuration script generated by Autoconf, under
1605
dnl the same distribution terms as the rest of that program.
1607
dnl From Bruno Haible.
1609
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1610
dnl the libraries corresponding to explicit and implicit dependencies.
1611
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1612
dnl augments the CPPFLAGS variable.
1613
AC_DEFUN([AC_LIB_LINKFLAGS],
1615
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1616
AC_REQUIRE([AC_LIB_RPATH])
1617
define([Name],[translit([$1],[./-], [___])])
1618
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1619
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1620
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1621
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1622
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1623
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1624
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1626
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1627
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1628
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1629
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1631
AC_SUBST([LTLIB]NAME)
1632
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1633
dnl results of this search when this library appears as a dependency.
1639
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1640
dnl searches for libname and the libraries corresponding to explicit and
1641
dnl implicit dependencies, together with the specified include files and
1642
dnl the ability to compile and link the specified testcode. If found, it
1643
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1644
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1645
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1646
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1647
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1649
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1650
AC_REQUIRE([AC_LIB_RPATH])
1651
define([Name],[translit([$1],[./-], [___])])
1652
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1653
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1655
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1657
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1659
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1660
dnl because if the user has installed lib[]Name and not disabled its use
1661
dnl via --without-lib[]Name-prefix, he wants to use it.
1662
ac_save_CPPFLAGS="$CPPFLAGS"
1663
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1665
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1666
ac_save_LIBS="$LIBS"
1667
LIBS="$LIBS $LIB[]NAME"
1668
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1669
LIBS="$ac_save_LIBS"
1671
if test "$ac_cv_lib[]Name" = yes; then
1673
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1674
AC_MSG_CHECKING([how to link with lib[]$1])
1675
AC_MSG_RESULT([$LIB[]NAME])
1678
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1679
dnl $INC[]NAME either.
1680
CPPFLAGS="$ac_save_CPPFLAGS"
1684
AC_SUBST([HAVE_LIB]NAME)
1686
AC_SUBST([LTLIB]NAME)
1691
dnl Determine the platform dependent parameters needed to use rpath:
1692
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1693
dnl hardcode_direct, hardcode_minus_L,
1694
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
1695
AC_DEFUN([AC_LIB_RPATH],
1697
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1698
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1699
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1700
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1701
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1702
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1703
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1709
libext="$acl_cv_libext"
1710
shlibext="$acl_cv_shlibext"
1711
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1712
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1713
hardcode_direct="$acl_cv_hardcode_direct"
1714
hardcode_minus_L="$acl_cv_hardcode_minus_L"
1715
sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
1716
sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
1717
dnl Determine whether the user wants rpath handling at all.
1718
AC_ARG_ENABLE(rpath,
1719
[ --disable-rpath do not hardcode runtime library paths],
1720
:, enable_rpath=yes)
1723
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1724
dnl the libraries corresponding to explicit and implicit dependencies.
1725
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1726
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1728
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1729
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1730
dnl By default, look in $includedir and $libdir.
1732
AC_LIB_WITH_FINAL_PREFIX([
1733
eval additional_includedir=\"$includedir\"
1734
eval additional_libdir=\"$libdir\"
1736
AC_ARG_WITH([lib$1-prefix],
1737
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
1738
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
1740
if test "X$withval" = "Xno"; then
1743
if test "X$withval" = "X"; then
1744
AC_LIB_WITH_FINAL_PREFIX([
1745
eval additional_includedir=\"$includedir\"
1746
eval additional_libdir=\"$libdir\"
1749
additional_includedir="$withval/include"
1750
additional_libdir="$withval/lib"
1754
dnl Search the library and its dependencies in $additional_libdir and
1755
dnl $LDFLAGS. Using breadth-first-seach.
1761
names_already_handled=
1762
names_next_round='$1 $2'
1763
while test -n "$names_next_round"; do
1764
names_this_round="$names_next_round"
1766
for name in $names_this_round; do
1768
for n in $names_already_handled; do
1769
if test "$n" = "$name"; then
1774
if test -z "$already_handled"; then
1775
names_already_handled="$names_already_handled $name"
1776
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1777
dnl or AC_LIB_HAVE_LINKFLAGS call.
1778
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1779
eval value=\"\$HAVE_LIB$uppername\"
1780
if test -n "$value"; then
1781
if test "$value" = yes; then
1782
eval value=\"\$LIB$uppername\"
1783
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1784
eval value=\"\$LTLIB$uppername\"
1785
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1787
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1788
dnl that this library doesn't exist. So just drop it.
1792
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1793
dnl and the already constructed $LIBNAME/$LTLIBNAME.
1798
if test $use_additional = yes; then
1799
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1800
found_dir="$additional_libdir"
1801
found_so="$additional_libdir/lib$name.$shlibext"
1802
if test -f "$additional_libdir/lib$name.la"; then
1803
found_la="$additional_libdir/lib$name.la"
1806
if test -f "$additional_libdir/lib$name.$libext"; then
1807
found_dir="$additional_libdir"
1808
found_a="$additional_libdir/lib$name.$libext"
1809
if test -f "$additional_libdir/lib$name.la"; then
1810
found_la="$additional_libdir/lib$name.la"
1815
if test "X$found_dir" = "X"; then
1816
for x in $LDFLAGS $LTLIB[]NAME; do
1817
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1820
dir=`echo "X$x" | sed -e 's/^X-L//'`
1821
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1823
found_so="$dir/lib$name.$shlibext"
1824
if test -f "$dir/lib$name.la"; then
1825
found_la="$dir/lib$name.la"
1828
if test -f "$dir/lib$name.$libext"; then
1830
found_a="$dir/lib$name.$libext"
1831
if test -f "$dir/lib$name.la"; then
1832
found_la="$dir/lib$name.la"
1838
if test "X$found_dir" != "X"; then
1843
if test "X$found_dir" != "X"; then
1844
dnl Found the library.
1845
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1846
if test "X$found_so" != "X"; then
1847
dnl Linking with a shared library. We attempt to hardcode its
1848
dnl directory into the executable's runpath, unless it's the
1849
dnl standard /usr/lib.
1850
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
1851
dnl No hardcoding is needed.
1852
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1854
dnl Use an explicit option to hardcode DIR into the resulting
1856
dnl Potentially add DIR to ltrpathdirs.
1857
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1859
for x in $ltrpathdirs; do
1860
if test "X$x" = "X$found_dir"; then
1865
if test -z "$haveit"; then
1866
ltrpathdirs="$ltrpathdirs $found_dir"
1868
dnl The hardcoding into $LIBNAME is system dependent.
1869
if test "$hardcode_direct" = yes; then
1870
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1871
dnl resulting binary.
1872
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1874
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1875
dnl Use an explicit option to hardcode DIR into the resulting
1877
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1878
dnl Potentially add DIR to rpathdirs.
1879
dnl The rpathdirs will be appended to $LIBNAME at the end.
1881
for x in $rpathdirs; do
1882
if test "X$x" = "X$found_dir"; then
1887
if test -z "$haveit"; then
1888
rpathdirs="$rpathdirs $found_dir"
1891
dnl Rely on "-L$found_dir".
1892
dnl But don't add it if it's already contained in the LDFLAGS
1893
dnl or the already constructed $LIBNAME
1895
for x in $LDFLAGS $LIB[]NAME; do
1896
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1897
if test "X$x" = "X-L$found_dir"; then
1902
if test -z "$haveit"; then
1903
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1905
if test "$hardcode_minus_L" != no; then
1906
dnl FIXME: Not sure whether we should use
1907
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1909
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1911
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1912
dnl here, because this doesn't fit in flags passed to the
1913
dnl compiler. So give up. No hardcoding. This affects only
1914
dnl very old systems.
1915
dnl FIXME: Not sure whether we should use
1916
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1918
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1924
if test "X$found_a" != "X"; then
1925
dnl Linking with a static library.
1926
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1928
dnl We shouldn't come here, but anyway it's good to have a
1930
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1933
dnl Assume the include files are nearby.
1934
additional_includedir=
1935
case "$found_dir" in
1937
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1938
additional_includedir="$basedir/include"
1941
if test "X$additional_includedir" != "X"; then
1942
dnl Potentially add $additional_includedir to $INCNAME.
1943
dnl But don't add it
1944
dnl 1. if it's the standard /usr/include,
1945
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1946
dnl 3. if it's already present in $CPPFLAGS or the already
1947
dnl constructed $INCNAME,
1948
dnl 4. if it doesn't exist as a directory.
1949
if test "X$additional_includedir" != "X/usr/include"; then
1951
if test "X$additional_includedir" = "X/usr/local/include"; then
1952
if test -n "$GCC"; then
1954
linux*) haveit=yes;;
1958
if test -z "$haveit"; then
1959
for x in $CPPFLAGS $INC[]NAME; do
1960
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1961
if test "X$x" = "X-I$additional_includedir"; then
1966
if test -z "$haveit"; then
1967
if test -d "$additional_includedir"; then
1968
dnl Really add $additional_includedir to $INCNAME.
1969
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1975
dnl Look for dependencies.
1976
if test -n "$found_la"; then
1977
dnl Read the .la file. It defines the variables
1978
dnl dlname, library_names, old_library, dependency_libs, current,
1979
dnl age, revision, installed, dlopen, dlpreopen, libdir.
1980
save_libdir="$libdir"
1982
*/* | *\\*) . "$found_la" ;;
1983
*) . "./$found_la" ;;
1985
libdir="$save_libdir"
1986
dnl We use only dependency_libs.
1987
for dep in $dependency_libs; do
1990
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1991
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1992
dnl But don't add it
1993
dnl 1. if it's the standard /usr/lib,
1994
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1995
dnl 3. if it's already present in $LDFLAGS or the already
1996
dnl constructed $LIBNAME,
1997
dnl 4. if it doesn't exist as a directory.
1998
if test "X$additional_libdir" != "X/usr/lib"; then
2000
if test "X$additional_libdir" = "X/usr/local/lib"; then
2001
if test -n "$GCC"; then
2003
linux*) haveit=yes;;
2007
if test -z "$haveit"; then
2009
for x in $LDFLAGS $LIB[]NAME; do
2010
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2011
if test "X$x" = "X-L$additional_libdir"; then
2016
if test -z "$haveit"; then
2017
if test -d "$additional_libdir"; then
2018
dnl Really add $additional_libdir to $LIBNAME.
2019
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2023
for x in $LDFLAGS $LTLIB[]NAME; do
2024
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2025
if test "X$x" = "X-L$additional_libdir"; then
2030
if test -z "$haveit"; then
2031
if test -d "$additional_libdir"; then
2032
dnl Really add $additional_libdir to $LTLIBNAME.
2033
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2040
dir=`echo "X$dep" | sed -e 's/^X-R//'`
2041
if test "$enable_rpath" != no; then
2042
dnl Potentially add DIR to rpathdirs.
2043
dnl The rpathdirs will be appended to $LIBNAME at the end.
2045
for x in $rpathdirs; do
2046
if test "X$x" = "X$dir"; then
2051
if test -z "$haveit"; then
2052
rpathdirs="$rpathdirs $dir"
2054
dnl Potentially add DIR to ltrpathdirs.
2055
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2057
for x in $ltrpathdirs; do
2058
if test "X$x" = "X$dir"; then
2063
if test -z "$haveit"; then
2064
ltrpathdirs="$ltrpathdirs $dir"
2069
dnl Handle this in the next round.
2070
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2073
dnl Handle this in the next round. Throw away the .la's
2074
dnl directory; it is already contained in a preceding -L
2076
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2079
dnl Most likely an immediate library name.
2080
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2081
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2087
dnl Didn't find the library; assume it is in the system directories
2088
dnl known to the linker and runtime loader. (All the system
2089
dnl directories known to the linker should also be known to the
2090
dnl runtime loader, otherwise the system is severely misconfigured.)
2091
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2092
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2098
if test "X$rpathdirs" != "X"; then
2099
if test -n "$hardcode_libdir_separator"; then
2100
dnl Weird platform: only the last -rpath option counts, the user must
2101
dnl pass all path elements in one option. We can arrange that for a
2102
dnl single library, but not when more than one $LIBNAMEs are used.
2104
for found_dir in $rpathdirs; do
2105
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
2107
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
2108
acl_save_libdir="$libdir"
2110
eval flag=\"$hardcode_libdir_flag_spec\"
2111
libdir="$acl_save_libdir"
2112
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2114
dnl The -rpath options are cumulative.
2115
for found_dir in $rpathdirs; do
2116
acl_save_libdir="$libdir"
2118
eval flag=\"$hardcode_libdir_flag_spec\"
2119
libdir="$acl_save_libdir"
2120
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2124
if test "X$ltrpathdirs" != "X"; then
2125
dnl When using libtool, the option that works for both libraries and
2126
dnl executables is -R. The -R options are cumulative.
2127
for found_dir in $ltrpathdirs; do
2128
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2133
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2134
dnl unless already present in VAR.
2135
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2136
dnl contains two or three consecutive elements that belong together.
2137
AC_DEFUN([AC_LIB_APPENDTOVAR],
2139
for element in [$2]; do
2142
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2143
if test "X$x" = "X$element"; then
2148
if test -z "$haveit"; then
2149
[$1]="${[$1]}${[$1]:+ }$element"
2154
# lib-ld.m4 serial 1 (gettext-0.11)
2155
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2156
dnl This file is free software, distributed under the terms of the GNU
2157
dnl General Public License. As a special exception to the GNU General
2158
dnl Public License, this file may be distributed as part of a program
2159
dnl that contains a configuration script generated by Autoconf, under
2160
dnl the same distribution terms as the rest of that program.
2162
dnl Subroutines of libtool.m4,
2163
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
2164
dnl with libtool.m4.
2166
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
2167
AC_DEFUN([AC_LIB_PROG_LD_GNU],
2168
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
2169
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2170
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2171
acl_cv_prog_gnu_ld=yes
2173
acl_cv_prog_gnu_ld=no
2175
with_gnu_ld=$acl_cv_prog_gnu_ld
2178
dnl From libtool-1.4. Sets the variable LD.
2179
AC_DEFUN([AC_LIB_PROG_LD],
2180
[AC_ARG_WITH(gnu-ld,
2181
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2182
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2183
AC_REQUIRE([AC_PROG_CC])dnl
2184
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2186
if test "$GCC" = yes; then
2187
# Check if gcc -print-prog-name=ld gives a path.
2188
AC_MSG_CHECKING([for ld used by GCC])
2191
# gcc leaves a trailing carriage return which upsets mingw
2192
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2194
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2197
# Accept absolute paths.
2198
[[\\/]* | [A-Za-z]:[\\/]*)]
2199
[re_direlt='/[^/][^/]*/\.\./']
2200
# Canonicalize the path of ld
2201
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2202
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2203
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2205
test -z "$LD" && LD="$ac_prog"
2208
# If it fails, then pretend we aren't using GCC.
2212
# If it is relative, then search for the first ld in PATH.
2216
elif test "$with_gnu_ld" = yes; then
2217
AC_MSG_CHECKING([for GNU ld])
2219
AC_MSG_CHECKING([for non-GNU ld])
2221
AC_CACHE_VAL(acl_cv_path_LD,
2222
[if test -z "$LD"; then
2223
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2224
for ac_dir in $PATH; do
2225
test -z "$ac_dir" && ac_dir=.
2226
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2227
acl_cv_path_LD="$ac_dir/$ac_prog"
2228
# Check to see if the program is GNU ld. I'd rather use --version,
2229
# but apparently some GNU ld's only accept -v.
2230
# Break only if it was the GNU/non-GNU ld that we prefer.
2231
if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2232
test "$with_gnu_ld" != no && break
2234
test "$with_gnu_ld" != yes && break
2240
acl_cv_path_LD="$LD" # Let the user override the test with a path.
2242
LD="$acl_cv_path_LD"
2243
if test -n "$LD"; then
2248
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2252
# iconv.m4 serial AM4 (gettext-0.11.3)
2253
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2254
dnl This file is free software, distributed under the terms of the GNU
2255
dnl General Public License. As a special exception to the GNU General
2256
dnl Public License, this file may be distributed as part of a program
2257
dnl that contains a configuration script generated by Autoconf, under
2258
dnl the same distribution terms as the rest of that program.
2260
dnl From Bruno Haible.
2262
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
2264
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2265
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2266
AC_REQUIRE([AC_LIB_RPATH])
2268
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2270
AC_LIB_LINKFLAGS_BODY([iconv])
2273
AC_DEFUN([AM_ICONV_LINK],
2275
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2276
dnl those with the standalone portable GNU libiconv installed).
2278
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2280
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
2282
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2283
dnl because if the user has installed libiconv and not disabled its use
2284
dnl via --without-libiconv-prefix, he wants to use it. The first
2285
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2286
am_save_CPPFLAGS="$CPPFLAGS"
2287
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2289
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2290
am_cv_func_iconv="no, consider installing GNU libiconv"
2292
AC_TRY_LINK([#include <stdlib.h>
2293
#include <iconv.h>],
2294
[iconv_t cd = iconv_open("","");
2295
iconv(cd,NULL,NULL,NULL,NULL);
2297
am_cv_func_iconv=yes)
2298
if test "$am_cv_func_iconv" != yes; then
2299
am_save_LIBS="$LIBS"
2300
LIBS="$LIBS $LIBICONV"
2301
AC_TRY_LINK([#include <stdlib.h>
2302
#include <iconv.h>],
2303
[iconv_t cd = iconv_open("","");
2304
iconv(cd,NULL,NULL,NULL,NULL);
2307
am_cv_func_iconv=yes)
2308
LIBS="$am_save_LIBS"
2311
if test "$am_cv_func_iconv" = yes; then
2312
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2314
if test "$am_cv_lib_iconv" = yes; then
2315
AC_MSG_CHECKING([how to link with libiconv])
2316
AC_MSG_RESULT([$LIBICONV])
2318
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2320
CPPFLAGS="$am_save_CPPFLAGS"
2325
AC_SUBST(LTLIBICONV)
2328
AC_DEFUN([AM_ICONV],
2331
if test "$am_cv_func_iconv" = yes; then
2332
AC_MSG_CHECKING([for iconv declaration])
2333
AC_CACHE_VAL(am_cv_proto_iconv, [
2341
#if defined(__STDC__) || defined(__cplusplus)
2342
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2346
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2347
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);"])
2348
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2349
AC_MSG_RESULT([$]{ac_t:-
2350
}[$]am_cv_proto_iconv)
2351
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2352
[Define as const if the declaration of iconv() needs const.])
2356
# progtest.m4 serial 2 (gettext-0.10.40)
2357
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2358
dnl This file is free software, distributed under the terms of the GNU
2359
dnl General Public License. As a special exception to the GNU General
2360
dnl Public License, this file may be distributed as part of a program
2361
dnl that contains a configuration script generated by Autoconf, under
2362
dnl the same distribution terms as the rest of that program.
2364
dnl This file can can be used in projects which are not available under
2365
dnl the GNU General Public License or the GNU Library General Public
2366
dnl License but which still want to provide support for the GNU gettext
2368
dnl Please note that the actual code of the GNU gettext library is covered
2369
dnl by the GNU Library General Public License, and the rest of the GNU
2370
dnl gettext package package is covered by the GNU General Public License.
2371
dnl They are *not* in the public domain.
2374
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2376
# Search path for a program which passes the given test.
2378
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2379
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2380
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2381
[# Extract the first word of "$2", so it can be a program name with args.
2382
set dummy $2; ac_word=[$]2
2383
AC_MSG_CHECKING([for $ac_word])
2384
AC_CACHE_VAL(ac_cv_path_$1,
2387
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2390
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2391
for ac_dir in ifelse([$5], , $PATH, [$5]); do
2392
test -z "$ac_dir" && ac_dir=.
2393
if test -f $ac_dir/$ac_word; then
2395
ac_cv_path_$1="$ac_dir/$ac_word"
2401
dnl If no 4th arg is given, leave the cache variable unset,
2402
dnl so AC_PATH_PROGS will keep looking.
2403
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2408
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2409
AC_MSG_RESULT([$]$1)
2416
# isc-posix.m4 serial 2 (gettext-0.11.2)
2417
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2418
dnl This file is free software, distributed under the terms of the GNU
2419
dnl General Public License. As a special exception to the GNU General
2420
dnl Public License, this file may be distributed as part of a program
2421
dnl that contains a configuration script generated by Autoconf, under
2422
dnl the same distribution terms as the rest of that program.
2424
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
2426
# This test replaces the one in autoconf.
2427
# Currently this macro should have the same name as the autoconf macro
2428
# because gettext's gettext.m4 (distributed in the automake package)
2429
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
2430
# give these diagnostics:
2431
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
2432
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
2434
undefine([AC_ISC_POSIX])
2436
AC_DEFUN([AC_ISC_POSIX],
2438
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
2439
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
2443
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
2444
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2445
dnl This file is free software, distributed under the terms of the GNU
2446
dnl General Public License. As a special exception to the GNU General
2447
dnl Public License, this file may be distributed as part of a program
2448
dnl that contains a configuration script generated by Autoconf, under
2449
dnl the same distribution terms as the rest of that program.
2451
# Test for the GNU C Library, version 2.1 or newer.
2452
# From Bruno Haible.
2454
AC_DEFUN([jm_GLIBC21],
2456
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
2457
ac_cv_gnu_library_2_1,
2458
[AC_EGREP_CPP([Lucky GNU user],
2460
#include <features.h>
2461
#ifdef __GNU_LIBRARY__
2462
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
2467
ac_cv_gnu_library_2_1=yes,
2468
ac_cv_gnu_library_2_1=no)
2472
GLIBC21="$ac_cv_gnu_library_2_1"
2476
# intdiv0.m4 serial 1 (gettext-0.11.3)
2477
dnl Copyright (C) 2002 Free Software Foundation, Inc.
2478
dnl This file is free software, distributed under the terms of the GNU
2479
dnl General Public License. As a special exception to the GNU General
2480
dnl Public License, this file may be distributed as part of a program
2481
dnl that contains a configuration script generated by Autoconf, under
2482
dnl the same distribution terms as the rest of that program.
2484
dnl From Bruno Haible.
2486
AC_DEFUN([gt_INTDIV0],
2488
AC_REQUIRE([AC_PROG_CC])dnl
2489
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2491
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
2492
gt_cv_int_divbyzero_sigfpe,
2500
sigfpe_handler (int sig)
2502
sigfpe_handler (sig) int sig;
2505
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
2506
exit (sig != SIGFPE);
2516
signal (SIGFPE, sigfpe_handler);
2517
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
2518
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
2519
signal (SIGTRAP, sigfpe_handler);
2521
/* Linux/SPARC yields signal SIGILL. */
2522
#if defined (__sparc__) && defined (__linux__)
2523
signal (SIGILL, sigfpe_handler);
2530
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
2532
# Guess based on the CPU.
2534
alpha* | i[34567]86 | m68k | s390*)
2535
gt_cv_int_divbyzero_sigfpe="guessing yes";;
2537
gt_cv_int_divbyzero_sigfpe="guessing no";;
2541
case "$gt_cv_int_divbyzero_sigfpe" in
2545
AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
2546
[Define if integer division by zero raises signal SIGFPE.])
2549
# uintmax_t.m4 serial 6 (gettext-0.11)
2550
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2551
dnl This file is free software, distributed under the terms of the GNU
2552
dnl General Public License. As a special exception to the GNU General
2553
dnl Public License, this file may be distributed as part of a program
2554
dnl that contains a configuration script generated by Autoconf, under
2555
dnl the same distribution terms as the rest of that program.
2557
dnl From Paul Eggert.
2561
# Define uintmax_t to `unsigned long' or `unsigned long long'
2562
# if <inttypes.h> does not exist.
2564
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
2566
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
2567
AC_REQUIRE([jm_AC_HEADER_STDINT_H])
2568
if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
2569
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
2570
test $ac_cv_type_unsigned_long_long = yes \
2571
&& ac_type='unsigned long long' \
2572
|| ac_type='unsigned long'
2573
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
2574
[Define to unsigned long or unsigned long long
2575
if <inttypes.h> and <stdint.h> don't define.])
2579
# inttypes_h.m4 serial 4 (gettext-0.11.4)
2580
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2581
dnl This file is free software, distributed under the terms of the GNU
2582
dnl General Public License. As a special exception to the GNU General
2583
dnl Public License, this file may be distributed as part of a program
2584
dnl that contains a configuration script generated by Autoconf, under
2585
dnl the same distribution terms as the rest of that program.
2587
dnl From Paul Eggert.
2589
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
2590
# doesn't clash with <sys/types.h>, and declares uintmax_t.
2592
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
2594
AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
2596
[#include <sys/types.h>
2597
#include <inttypes.h>],
2598
[uintmax_t i = (uintmax_t) -1;],
2599
jm_ac_cv_header_inttypes_h=yes,
2600
jm_ac_cv_header_inttypes_h=no)])
2601
if test $jm_ac_cv_header_inttypes_h = yes; then
2602
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
2603
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
2604
and declares uintmax_t. ])
2608
# stdint_h.m4 serial 2 (gettext-0.11.4)
2609
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2610
dnl This file is free software, distributed under the terms of the GNU
2611
dnl General Public License. As a special exception to the GNU General
2612
dnl Public License, this file may be distributed as part of a program
2613
dnl that contains a configuration script generated by Autoconf, under
2614
dnl the same distribution terms as the rest of that program.
2616
dnl From Paul Eggert.
2618
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
2619
# doesn't clash with <sys/types.h>, and declares uintmax_t.
2621
AC_DEFUN([jm_AC_HEADER_STDINT_H],
2623
AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
2625
[#include <sys/types.h>
2626
#include <stdint.h>],
2627
[uintmax_t i = (uintmax_t) -1;],
2628
jm_ac_cv_header_stdint_h=yes,
2629
jm_ac_cv_header_stdint_h=no)])
2630
if test $jm_ac_cv_header_stdint_h = yes; then
2631
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
2632
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
2633
and declares uintmax_t. ])
2637
# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
2638
dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
2639
dnl This file is free software, distributed under the terms of the GNU
2640
dnl General Public License. As a special exception to the GNU General
2641
dnl Public License, this file may be distributed as part of a program
2642
dnl that contains a configuration script generated by Autoconf, under
2643
dnl the same distribution terms as the rest of that program.
2645
dnl From Paul Eggert.
2647
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
2649
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
2650
[AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
2651
[unsigned long long ullmax = (unsigned long long) -1;
2652
return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
2653
ac_cv_type_unsigned_long_long=yes,
2654
ac_cv_type_unsigned_long_long=no)])
2655
if test $ac_cv_type_unsigned_long_long = yes; then
2656
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
2657
[Define if you have the unsigned long long type.])
2661
# inttypes.m4 serial 1 (gettext-0.11.4)
2662
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2663
dnl This file is free software, distributed under the terms of the GNU
2664
dnl General Public License. As a special exception to the GNU General
2665
dnl Public License, this file may be distributed as part of a program
2666
dnl that contains a configuration script generated by Autoconf, under
2667
dnl the same distribution terms as the rest of that program.
2669
dnl From Paul Eggert.
2671
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
2674
AC_DEFUN([gt_HEADER_INTTYPES_H],
2676
AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
2679
[#include <sys/types.h>
2680
#include <inttypes.h>],
2681
[], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
2683
if test $gt_cv_header_inttypes_h = yes; then
2684
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
2685
[Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
2689
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
2690
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2691
dnl This file is free software, distributed under the terms of the GNU
2692
dnl General Public License. As a special exception to the GNU General
2693
dnl Public License, this file may be distributed as part of a program
2694
dnl that contains a configuration script generated by Autoconf, under
2695
dnl the same distribution terms as the rest of that program.
2697
dnl From Bruno Haible.
2699
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
2700
# macros to non-string values. This is the case on AIX 4.3.3.
2702
AC_DEFUN([gt_INTTYPES_PRI],
2704
AC_REQUIRE([gt_HEADER_INTTYPES_H])
2705
if test $gt_cv_header_inttypes_h = yes; then
2706
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
2707
gt_cv_inttypes_pri_broken,
2709
AC_TRY_COMPILE([#include <inttypes.h>
2713
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
2716
if test "$gt_cv_inttypes_pri_broken" = yes; then
2717
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
2718
[Define if <inttypes.h> exists and defines unusable PRI* macros.])
2722
# codeset.m4 serial AM1 (gettext-0.10.40)
2723
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2724
dnl This file is free software, distributed under the terms of the GNU
2725
dnl General Public License. As a special exception to the GNU General
2726
dnl Public License, this file may be distributed as part of a program
2727
dnl that contains a configuration script generated by Autoconf, under
2728
dnl the same distribution terms as the rest of that program.
2730
dnl From Bruno Haible.
2732
AC_DEFUN([AM_LANGINFO_CODESET],
2734
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
2735
[AC_TRY_LINK([#include <langinfo.h>],
2736
[char* cs = nl_langinfo(CODESET);],
2737
am_cv_langinfo_codeset=yes,
2738
am_cv_langinfo_codeset=no)
2740
if test $am_cv_langinfo_codeset = yes; then
2741
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
2742
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
2746
# lcmessage.m4 serial 3 (gettext-0.11.3)
2747
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2748
dnl This file is free software, distributed under the terms of the GNU
2749
dnl General Public License. As a special exception to the GNU General
2750
dnl Public License, this file may be distributed as part of a program
2751
dnl that contains a configuration script generated by Autoconf, under
2752
dnl the same distribution terms as the rest of that program.
2754
dnl This file can can be used in projects which are not available under
2755
dnl the GNU General Public License or the GNU Library General Public
2756
dnl License but which still want to provide support for the GNU gettext
2758
dnl Please note that the actual code of the GNU gettext library is covered
2759
dnl by the GNU Library General Public License, and the rest of the GNU
2760
dnl gettext package package is covered by the GNU General Public License.
2761
dnl They are *not* in the public domain.
2764
dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
2766
# Check whether LC_MESSAGES is available in <locale.h>.
2768
AC_DEFUN([AM_LC_MESSAGES],
2770
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2771
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2772
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
2773
if test $am_cv_val_LC_MESSAGES = yes; then
2774
AC_DEFINE(HAVE_LC_MESSAGES, 1,
2775
[Define if your <locale.h> file defines LC_MESSAGES.])
2780
dnl Contains the following macros
2781
dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
2784
dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
2785
AC_DEFUN(JAPHAR_GREP_CFLAGS,
2787
"$1" | "$1 "* | *" $1" | *" $1 "* )
2788
ifelse($#, 3, [$3], [:])
585
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
587
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
588
# Free Software Foundation, Inc.
590
# This file is free software; the Free Software Foundation
591
# gives unlimited permission to copy and/or distribute it,
592
# with or without modifications, as long as this notice is preserved.
596
# AM_MISSING_PROG(NAME, PROGRAM)
597
# ------------------------------
598
AC_DEFUN([AM_MISSING_PROG],
599
[AC_REQUIRE([AM_MISSING_HAS_RUN])
600
$1=${$1-"${am_missing_run}$2"}
606
# Define MISSING if not defined so far and test if it supports --run.
607
# If it does, set am_missing_run to use it, otherwise, to nothing.
608
AC_DEFUN([AM_MISSING_HAS_RUN],
609
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
610
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
611
# Use eval to expand $SHELL
612
if eval "$MISSING --run true"; then
613
am_missing_run="$MISSING --run "
616
AC_MSG_WARN([`missing' script is too old or missing])
620
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
622
# This file is free software; the Free Software Foundation
623
# gives unlimited permission to copy and/or distribute it,
624
# with or without modifications, as long as this notice is preserved.
628
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
630
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
631
# created by `make install' are always world readable, even if the
632
# installer happens to have an overly restrictive umask (e.g. 077).
633
# This was a mistake. There are at least two reasons why we must not
635
# - it causes special bits like SGID to be ignored,
636
# - it may be too restrictive (some setups expect 775 directories).
638
# Do not use -m 0755 and let people choose whatever they expect by
641
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
642
# Some implementations (such as Solaris 8's) are not thread-safe: if a
643
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
644
# concurrently, both version can detect that a/ is missing, but only
645
# one can create it and the other will error out. Consequently we
646
# restrict ourselves to GNU make (using the --version option ensures
648
AC_DEFUN([AM_PROG_MKDIR_P],
649
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
650
# We used to keeping the `.' as first argument, in order to
651
# allow $(mkdir_p) to be used without argument. As in
652
# $(mkdir_p) $(somedir)
653
# where $(somedir) is conditionally defined. However this is wrong
655
# 1. if the package is installed by a user who cannot write `.'
656
# make install will fail,
657
# 2. the above comment should most certainly read
658
# $(mkdir_p) $(DESTDIR)$(somedir)
659
# so it does not work when $(somedir) is undefined and
661
# To support the latter case, we have to write
662
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
663
# so the `.' trick is pointless.
664
mkdir_p='mkdir -p --'
666
# On NextStep and OpenStep, the `mkdir' command does not
667
# recognize any option. It will interpret all options as
668
# directories to create, and then abort because `.' already
670
for d in ./-p ./--version;
672
test -d $d && rmdir $d
674
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
675
if test -f "$ac_aux_dir/mkinstalldirs"; then
676
mkdir_p='$(mkinstalldirs)'
678
mkdir_p='$(install_sh) -d'
681
AC_SUBST([mkdir_p])])
683
# Helper functions for option handling. -*- Autoconf -*-
685
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
687
# This file is free software; the Free Software Foundation
688
# gives unlimited permission to copy and/or distribute it,
689
# with or without modifications, as long as this notice is preserved.
693
# _AM_MANGLE_OPTION(NAME)
694
# -----------------------
695
AC_DEFUN([_AM_MANGLE_OPTION],
696
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
698
# _AM_SET_OPTION(NAME)
699
# ------------------------------
700
# Set option NAME. Presently that only means defining a flag for this option.
701
AC_DEFUN([_AM_SET_OPTION],
702
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
704
# _AM_SET_OPTIONS(OPTIONS)
705
# ----------------------------------
706
# OPTIONS is a space-separated list of Automake options.
707
AC_DEFUN([_AM_SET_OPTIONS],
708
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
710
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
711
# -------------------------------------------
712
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
713
AC_DEFUN([_AM_IF_OPTION],
714
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
716
# Check to make sure that the build environment is sane. -*- Autoconf -*-
718
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
719
# Free Software Foundation, Inc.
721
# This file is free software; the Free Software Foundation
722
# gives unlimited permission to copy and/or distribute it,
723
# with or without modifications, as long as this notice is preserved.
729
AC_DEFUN([AM_SANITY_CHECK],
730
[AC_MSG_CHECKING([whether build environment is sane])
733
echo timestamp > conftest.file
734
# Do `set' in a subshell so we don't clobber the current shell's
735
# arguments. Must try -L first in case configure is actually a
736
# symlink; some systems play weird games with the mod time of symlinks
737
# (eg FreeBSD returns the mod time of the symlink's containing
740
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
741
if test "$[*]" = "X"; then
743
set X `ls -t $srcdir/configure conftest.file`
746
if test "$[*]" != "X $srcdir/configure conftest.file" \
747
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
749
# If neither matched, then we have a broken ls. This can happen
750
# if, for instance, CONFIG_SHELL is bash and it inherits a
751
# broken ls alias from the environment. This has actually
752
# happened. Such a system could not be considered "sane".
753
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
754
alias in your environment])
757
test "$[2]" = conftest.file
763
AC_MSG_ERROR([newly created file is older than distributed files!
764
Check your system clock])
768
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
770
# This file is free software; the Free Software Foundation
771
# gives unlimited permission to copy and/or distribute it,
772
# with or without modifications, as long as this notice is preserved.
774
# AM_PROG_INSTALL_STRIP
775
# ---------------------
776
# One issue with vendor `install' (even GNU) is that you can't
777
# specify the program used to strip binaries. This is especially
778
# annoying in cross-compiling environments, where the build's strip
779
# is unlikely to handle the host's binaries.
780
# Fortunately install-sh will honor a STRIPPROG variable, so we
781
# always use install-sh in `make install-strip', and initialize
782
# STRIPPROG with the value of the STRIP variable (set by the user).
783
AC_DEFUN([AM_PROG_INSTALL_STRIP],
784
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
785
# Installed binaries are usually stripped using `strip' when the user
786
# run `make install-strip'. However `strip' might not be the right
787
# tool to use in cross-compilation environments, therefore Automake
788
# will honor the `STRIP' environment variable to overrule this program.
789
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
790
if test "$cross_compiling" != no; then
791
AC_CHECK_TOOL([STRIP], [strip], :)
793
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
794
AC_SUBST([INSTALL_STRIP_PROGRAM])])
796
# Check how to create a tarball. -*- Autoconf -*-
798
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
800
# This file is free software; the Free Software Foundation
801
# gives unlimited permission to copy and/or distribute it,
802
# with or without modifications, as long as this notice is preserved.
806
# _AM_PROG_TAR(FORMAT)
807
# --------------------
808
# Check how to create a tarball in format FORMAT.
809
# FORMAT should be one of `v7', `ustar', or `pax'.
811
# Substitute a variable $(am__tar) that is a command
812
# writing to stdout a FORMAT-tarball containing the directory
814
# tardir=directory && $(am__tar) > result.tar
816
# Substitute a variable $(am__untar) that extract such
817
# a tarball read from stdin.
818
# $(am__untar) < result.tar
819
AC_DEFUN([_AM_PROG_TAR],
820
[# Always define AMTAR for backward compatibility.
821
AM_MISSING_PROG([AMTAR], [tar])
823
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
824
[m4_case([$1], [ustar],, [pax],,
825
[m4_fatal([Unknown tar format])])
826
AC_MSG_CHECKING([how to create a $1 tar archive])
827
# Loop over all known methods to create a tar archive until one works.
828
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
829
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
830
# Do not fold the above two line into one, because Tru64 sh and
831
# Solaris sh will not grok spaces in the rhs of `-'.
832
for _am_tool in $_am_tools
836
for _am_tar in tar gnutar gtar;
838
AM_RUN_LOG([$_am_tar --version]) && break
840
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
841
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
842
am__untar="$_am_tar -xf -"
845
# Must skip GNU tar: if it does not support --format= it doesn't create
846
# ustar tarball either.
847
(tar --version) >/dev/null 2>&1 && continue
848
am__tar='tar chf - "$$tardir"'
849
am__tar_='tar chf - "$tardir"'
853
am__tar='pax -L -x $1 -w "$$tardir"'
854
am__tar_='pax -L -x $1 -w "$tardir"'
858
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
859
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
860
am__untar='cpio -i -H $1 -d'
869
# If the value was cached, stop now. We just wanted to have am__tar
871
test -n "${am_cv_prog_tar_$1}" && break
873
# tar/untar a dummy directory, and stop if the command works
876
echo GrepMe > conftest.dir/file
877
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
879
if test -s conftest.tar; then
880
AM_RUN_LOG([$am__untar <conftest.tar])
881
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
886
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
887
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
889
AC_SUBST([am__untar])
892
m4_include([build/gettext/codeset.m4])
893
m4_include([build/gettext/gettext.m4])
894
m4_include([build/gettext/glibc21.m4])
895
m4_include([build/gettext/iconv.m4])
896
m4_include([build/gettext/intdiv0.m4])
897
m4_include([build/gettext/inttypes-pri.m4])
898
m4_include([build/gettext/inttypes.m4])
899
m4_include([build/gettext/inttypes_h.m4])
900
m4_include([build/gettext/lcmessage.m4])
901
m4_include([build/gettext/lib-ld.m4])
902
m4_include([build/gettext/lib-link.m4])
903
m4_include([build/gettext/lib-prefix.m4])
904
m4_include([build/gettext/progtest.m4])
905
m4_include([build/gettext/stdint_h.m4])
906
m4_include([build/gettext/uintmax_t.m4])
907
m4_include([build/gettext/ulonglong.m4])
908
m4_include([build/autotools/acinclude.m4])