1 |
dnl aclocal.m4 generated automatically by aclocal 1.4-p5 |
# generated automatically by aclocal 1.7.2 -*- Autoconf -*- |
2 |
|
|
3 |
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 |
4 |
dnl This file is free software; the Free Software Foundation |
# Free Software Foundation, Inc. |
5 |
dnl gives unlimited permission to copy and/or distribute it, |
# This file is free software; the Free Software Foundation |
6 |
dnl with or without modifications, as long as this notice is preserved. |
# gives unlimited permission to copy and/or distribute it, |
7 |
|
# with or without modifications, as long as this notice is preserved. |
8 |
dnl This program is distributed in the hope that it will be useful, |
|
9 |
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
# This program is distributed in the hope that it will be useful, |
10 |
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
11 |
dnl PARTICULAR PURPOSE. |
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
12 |
|
# PARTICULAR PURPOSE. |
13 |
# Like AC_CONFIG_HEADER, but automatically create stamp file. |
|
14 |
|
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- |
15 |
AC_DEFUN([AM_CONFIG_HEADER], |
|
16 |
[AC_PREREQ([2.12]) |
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. |
17 |
AC_CONFIG_HEADER([$1]) |
|
18 |
dnl When config.status generates a header, we must update the stamp-h file. |
# This program is free software; you can redistribute it and/or modify |
19 |
dnl This file resides in the same directory as the config header |
# it under the terms of the GNU General Public License as published by |
20 |
dnl that is generated. We must strip everything past the first ":", |
# the Free Software Foundation; either version 2, or (at your option) |
21 |
dnl and everything past the last "/". |
# any later version. |
22 |
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
|
23 |
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
# This program is distributed in the hope that it will be useful, |
24 |
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
25 |
<<am_indx=1 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
26 |
for am_file in <<$1>>; do |
# GNU General Public License for more details. |
27 |
case " <<$>>CONFIG_HEADERS " in |
|
28 |
*" <<$>>am_file "*<<)>> |
# You should have received a copy of the GNU General Public License |
29 |
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx |
# along with this program; if not, write to the Free Software |
30 |
;; |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
31 |
esac |
# 02111-1307, USA. |
32 |
am_indx=`expr "<<$>>am_indx" + 1` |
|
33 |
done<<>>dnl>>) |
AC_PREREQ([2.52]) |
34 |
changequote([,]))]) |
|
35 |
|
# serial 6 |
36 |
# Do all the work for Automake. This macro actually does too much -- |
|
37 |
# some checks are only needed if your package does certain things. |
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. |
38 |
# But this isn't really a big deal. |
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) |
39 |
|
|
40 |
# serial 1 |
# Do all the work for Automake. -*- Autoconf -*- |
41 |
|
|
42 |
dnl Usage: |
# This macro actually does too much some checks are only needed if |
43 |
dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
# your package does certain things. But this isn't really a big deal. |
44 |
|
|
45 |
|
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 |
46 |
|
# Free Software Foundation, Inc. |
47 |
|
|
48 |
|
# This program is free software; you can redistribute it and/or modify |
49 |
|
# it under the terms of the GNU General Public License as published by |
50 |
|
# the Free Software Foundation; either version 2, or (at your option) |
51 |
|
# any later version. |
52 |
|
|
53 |
|
# This program is distributed in the hope that it will be useful, |
54 |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
55 |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
56 |
|
# GNU General Public License for more details. |
57 |
|
|
58 |
|
# You should have received a copy of the GNU General Public License |
59 |
|
# along with this program; if not, write to the Free Software |
60 |
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
61 |
|
# 02111-1307, USA. |
62 |
|
|
63 |
|
# serial 8 |
64 |
|
|
65 |
|
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
66 |
|
# written in clear, in which case automake, when reading aclocal.m4, |
67 |
|
# will think it sees a *use*, and therefore will trigger all it's |
68 |
|
# C support machinery. Also note that it means that autoscan, seeing |
69 |
|
# CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
70 |
|
|
71 |
|
|
72 |
|
AC_PREREQ([2.54]) |
73 |
|
|
74 |
|
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow |
75 |
|
# the ones we care about. |
76 |
|
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
77 |
|
|
78 |
|
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
79 |
|
# AM_INIT_AUTOMAKE([OPTIONS]) |
80 |
|
# ----------------------------------------------- |
81 |
|
# The call with PACKAGE and VERSION arguments is the old style |
82 |
|
# call (pre autoconf-2.50), which is being phased out. PACKAGE |
83 |
|
# and VERSION should now be passed to AC_INIT and removed from |
84 |
|
# the call to AM_INIT_AUTOMAKE. |
85 |
|
# We support both call styles for the transition. After |
86 |
|
# the next Automake release, Autoconf can make the AC_INIT |
87 |
|
# arguments mandatory, and then we can depend on a new Autoconf |
88 |
|
# release and drop the old call support. |
89 |
AC_DEFUN([AM_INIT_AUTOMAKE], |
AC_DEFUN([AM_INIT_AUTOMAKE], |
90 |
[AC_REQUIRE([AC_PROG_INSTALL]) |
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
91 |
PACKAGE=[$1] |
AC_REQUIRE([AC_PROG_INSTALL])dnl |
92 |
AC_SUBST(PACKAGE) |
# test to see if srcdir already configured |
93 |
VERSION=[$2] |
if test "`cd $srcdir && pwd`" != "`pwd`" && |
94 |
AC_SUBST(VERSION) |
test -f $srcdir/config.status; then |
|
dnl test to see if srcdir already configured |
|
|
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
|
95 |
AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
96 |
fi |
fi |
97 |
ifelse([$3],, |
|
98 |
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
# test whether we have cygpath |
99 |
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
if test -z "$CYGPATH_W"; then |
100 |
AC_REQUIRE([AM_SANITY_CHECK]) |
if (cygpath --version) >/dev/null 2>/dev/null; then |
101 |
AC_REQUIRE([AC_ARG_PROGRAM]) |
CYGPATH_W='cygpath -w' |
102 |
dnl FIXME This is truly gross. |
else |
103 |
missing_dir=`cd $ac_aux_dir && pwd` |
CYGPATH_W=echo |
104 |
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
fi |
105 |
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
fi |
106 |
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
AC_SUBST([CYGPATH_W]) |
107 |
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
|
108 |
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
# Define the identity of the package. |
109 |
AC_REQUIRE([AC_PROG_MAKE_SET])]) |
dnl Distinguish between old-style and new-style calls. |
110 |
|
m4_ifval([$2], |
111 |
|
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
112 |
|
AC_SUBST([PACKAGE], [$1])dnl |
113 |
|
AC_SUBST([VERSION], [$2])], |
114 |
|
[_AM_SET_OPTIONS([$1])dnl |
115 |
|
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl |
116 |
|
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl |
117 |
|
|
118 |
|
_AM_IF_OPTION([no-define],, |
119 |
|
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
120 |
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl |
121 |
|
|
122 |
|
# Some tools Automake needs. |
123 |
|
AC_REQUIRE([AM_SANITY_CHECK])dnl |
124 |
|
AC_REQUIRE([AC_ARG_PROGRAM])dnl |
125 |
|
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) |
126 |
|
AM_MISSING_PROG(AUTOCONF, autoconf) |
127 |
|
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) |
128 |
|
AM_MISSING_PROG(AUTOHEADER, autoheader) |
129 |
|
AM_MISSING_PROG(MAKEINFO, makeinfo) |
130 |
|
AM_MISSING_PROG(AMTAR, tar) |
131 |
|
AM_PROG_INSTALL_SH |
132 |
|
AM_PROG_INSTALL_STRIP |
133 |
|
# We need awk for the "check" target. The system "awk" is bad on |
134 |
|
# some platforms. |
135 |
|
AC_REQUIRE([AC_PROG_AWK])dnl |
136 |
|
AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
137 |
|
|
138 |
|
_AM_IF_OPTION([no-dependencies],, |
139 |
|
[AC_PROVIDE_IFELSE([AC_PROG_CC], |
140 |
|
[_AM_DEPENDENCIES(CC)], |
141 |
|
[define([AC_PROG_CC], |
142 |
|
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl |
143 |
|
AC_PROVIDE_IFELSE([AC_PROG_CXX], |
144 |
|
[_AM_DEPENDENCIES(CXX)], |
145 |
|
[define([AC_PROG_CXX], |
146 |
|
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl |
147 |
|
]) |
148 |
|
]) |
149 |
|
|
150 |
|
|
151 |
|
# When config.status generates a header, we must update the stamp-h file. |
152 |
|
# This file resides in the same directory as the config header |
153 |
|
# that is generated. The stamp files are numbered to have different names. |
154 |
|
|
155 |
|
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
156 |
|
# loop where config.status creates the headers, so we can generate |
157 |
|
# our stamp files there. |
158 |
|
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
159 |
|
[_am_stamp_count=`expr ${_am_stamp_count-0} + 1` |
160 |
|
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) |
161 |
|
|
162 |
|
# Copyright 2002 Free Software Foundation, Inc. |
163 |
|
|
164 |
|
# This program is free software; you can redistribute it and/or modify |
165 |
|
# it under the terms of the GNU General Public License as published by |
166 |
|
# the Free Software Foundation; either version 2, or (at your option) |
167 |
|
# any later version. |
168 |
|
|
169 |
|
# This program is distributed in the hope that it will be useful, |
170 |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
171 |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
172 |
|
# GNU General Public License for more details. |
173 |
|
|
174 |
|
# You should have received a copy of the GNU General Public License |
175 |
|
# along with this program; if not, write to the Free Software |
176 |
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
177 |
|
|
178 |
|
# AM_AUTOMAKE_VERSION(VERSION) |
179 |
|
# ---------------------------- |
180 |
|
# Automake X.Y traces this macro to ensure aclocal.m4 has been |
181 |
|
# generated from the m4 files accompanying Automake X.Y. |
182 |
|
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) |
183 |
|
|
184 |
|
# AM_SET_CURRENT_AUTOMAKE_VERSION |
185 |
|
# ------------------------------- |
186 |
|
# Call AM_AUTOMAKE_VERSION so it can be traced. |
187 |
|
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
188 |
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
189 |
|
[AM_AUTOMAKE_VERSION([1.7.2])]) |
190 |
|
|
191 |
|
# Helper functions for option handling. -*- Autoconf -*- |
192 |
|
|
193 |
|
# Copyright 2001, 2002 Free Software Foundation, Inc. |
194 |
|
|
195 |
|
# This program is free software; you can redistribute it and/or modify |
196 |
|
# it under the terms of the GNU General Public License as published by |
197 |
|
# the Free Software Foundation; either version 2, or (at your option) |
198 |
|
# any later version. |
199 |
|
|
200 |
|
# This program is distributed in the hope that it will be useful, |
201 |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
202 |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
203 |
|
# GNU General Public License for more details. |
204 |
|
|
205 |
|
# You should have received a copy of the GNU General Public License |
206 |
|
# along with this program; if not, write to the Free Software |
207 |
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
208 |
|
# 02111-1307, USA. |
209 |
|
|
210 |
|
# serial 2 |
211 |
|
|
212 |
|
# _AM_MANGLE_OPTION(NAME) |
213 |
|
# ----------------------- |
214 |
|
AC_DEFUN([_AM_MANGLE_OPTION], |
215 |
|
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
216 |
|
|
217 |
|
# _AM_SET_OPTION(NAME) |
218 |
|
# ------------------------------ |
219 |
|
# Set option NAME. Presently that only means defining a flag for this option. |
220 |
|
AC_DEFUN([_AM_SET_OPTION], |
221 |
|
[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) |
222 |
|
|
223 |
|
# _AM_SET_OPTIONS(OPTIONS) |
224 |
|
# ---------------------------------- |
225 |
|
# OPTIONS is a space-separated list of Automake options. |
226 |
|
AC_DEFUN([_AM_SET_OPTIONS], |
227 |
|
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
228 |
|
|
229 |
|
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
230 |
|
# ------------------------------------------- |
231 |
|
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
232 |
|
AC_DEFUN([_AM_IF_OPTION], |
233 |
|
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
234 |
|
|
235 |
# |
# |
236 |
# Check to make sure that the build environment is sane. |
# Check to make sure that the build environment is sane. |
237 |
# |
# |
238 |
|
|
239 |
|
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. |
240 |
|
|
241 |
|
# This program is free software; you can redistribute it and/or modify |
242 |
|
# it under the terms of the GNU General Public License as published by |
243 |
|
# the Free Software Foundation; either version 2, or (at your option) |
244 |
|
# any later version. |
245 |
|
|
246 |
|
# This program is distributed in the hope that it will be useful, |
247 |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
248 |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
249 |
|
# GNU General Public License for more details. |
250 |
|
|
251 |
|
# You should have received a copy of the GNU General Public License |
252 |
|
# along with this program; if not, write to the Free Software |
253 |
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
254 |
|
# 02111-1307, USA. |
255 |
|
|
256 |
|
# serial 3 |
257 |
|
|
258 |
|
# AM_SANITY_CHECK |
259 |
|
# --------------- |
260 |
AC_DEFUN([AM_SANITY_CHECK], |
AC_DEFUN([AM_SANITY_CHECK], |
261 |
[AC_MSG_CHECKING([whether build environment is sane]) |
[AC_MSG_CHECKING([whether build environment is sane]) |
262 |
# Just in case |
# Just in case |
263 |
sleep 1 |
sleep 1 |
264 |
echo timestamp > conftestfile |
echo timestamp > conftest.file |
265 |
# Do `set' in a subshell so we don't clobber the current shell's |
# Do `set' in a subshell so we don't clobber the current shell's |
266 |
# arguments. Must try -L first in case configure is actually a |
# arguments. Must try -L first in case configure is actually a |
267 |
# symlink; some systems play weird games with the mod time of symlinks |
# symlink; some systems play weird games with the mod time of symlinks |
268 |
# (eg FreeBSD returns the mod time of the symlink's containing |
# (eg FreeBSD returns the mod time of the symlink's containing |
269 |
# directory). |
# directory). |
270 |
if ( |
if ( |
271 |
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` |
272 |
if test "[$]*" = "X"; then |
if test "$[*]" = "X"; then |
273 |
# -L didn't work. |
# -L didn't work. |
274 |
set X `ls -t $srcdir/configure conftestfile` |
set X `ls -t $srcdir/configure conftest.file` |
275 |
fi |
fi |
276 |
if test "[$]*" != "X $srcdir/configure conftestfile" \ |
rm -f conftest.file |
277 |
&& test "[$]*" != "X conftestfile $srcdir/configure"; then |
if test "$[*]" != "X $srcdir/configure conftest.file" \ |
278 |
|
&& test "$[*]" != "X conftest.file $srcdir/configure"; then |
279 |
|
|
280 |
# If neither matched, then we have a broken ls. This can happen |
# If neither matched, then we have a broken ls. This can happen |
281 |
# if, for instance, CONFIG_SHELL is bash and it inherits a |
# if, for instance, CONFIG_SHELL is bash and it inherits a |
285 |
alias in your environment]) |
alias in your environment]) |
286 |
fi |
fi |
287 |
|
|
288 |
test "[$]2" = conftestfile |
test "$[2]" = conftest.file |
289 |
) |
) |
290 |
then |
then |
291 |
# Ok. |
# Ok. |
294 |
AC_MSG_ERROR([newly created file is older than distributed files! |
AC_MSG_ERROR([newly created file is older than distributed files! |
295 |
Check your system clock]) |
Check your system clock]) |
296 |
fi |
fi |
|
rm -f conftest* |
|
297 |
AC_MSG_RESULT(yes)]) |
AC_MSG_RESULT(yes)]) |
298 |
|
|
299 |
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
# -*- Autoconf -*- |
|
dnl The program must properly implement --version. |
|
|
AC_DEFUN([AM_MISSING_PROG], |
|
|
[AC_MSG_CHECKING(for working $2) |
|
|
# Run test in a subshell; some versions of sh will print an error if |
|
|
# an executable is not found, even if stderr is redirected. |
|
|
# Redirect stdin to placate older versions of autoconf. Sigh. |
|
|
if ($2 --version) < /dev/null > /dev/null 2>&1; then |
|
|
$1=$2 |
|
|
AC_MSG_RESULT(found) |
|
|
else |
|
|
$1="$3/missing $2" |
|
|
AC_MSG_RESULT(missing) |
|
|
fi |
|
|
AC_SUBST($1)]) |
|
|
|
|
|
# Add --enable-maintainer-mode option to configure. |
|
|
# From Jim Meyering |
|
|
|
|
|
# serial 1 |
|
|
|
|
|
AC_DEFUN([AM_MAINTAINER_MODE], |
|
|
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
|
|
dnl maintainer-mode is disabled by default |
|
|
AC_ARG_ENABLE(maintainer-mode, |
|
|
[ --enable-maintainer-mode enable make rules and dependencies not useful |
|
|
(and sometimes confusing) to the casual installer], |
|
|
USE_MAINTAINER_MODE=$enableval, |
|
|
USE_MAINTAINER_MODE=no) |
|
|
AC_MSG_RESULT($USE_MAINTAINER_MODE) |
|
|
AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
|
|
MAINT=$MAINTAINER_MODE_TRUE |
|
|
AC_SUBST(MAINT)dnl |
|
|
] |
|
|
) |
|
|
|
|
|
# Define a conditional. |
|
|
|
|
|
AC_DEFUN([AM_CONDITIONAL], |
|
|
[AC_SUBST($1_TRUE) |
|
|
AC_SUBST($1_FALSE) |
|
|
if $2; then |
|
|
$1_TRUE= |
|
|
$1_FALSE='#' |
|
|
else |
|
|
$1_TRUE='#' |
|
|
$1_FALSE= |
|
|
fi]) |
|
|
|
|
|
# aclocal-include.m4 |
|
|
# |
|
|
# This macro adds the name macrodir to the set of directories |
|
|
# that `aclocal' searches for macros. |
|
300 |
|
|
|
# serial 1 |
|
|
|
|
|
dnl AM_ACLOCAL_INCLUDE(macrodir) |
|
|
AC_DEFUN([AM_ACLOCAL_INCLUDE], |
|
|
[ |
|
|
AM_CONDITIONAL(INSIDE_GNOME_COMMON, false) |
|
301 |
|
|
302 |
test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" |
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. |
303 |
|
|
304 |
for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done |
# This program is free software; you can redistribute it and/or modify |
305 |
]) |
# it under the terms of the GNU General Public License as published by |
306 |
|
# the Free Software Foundation; either version 2, or (at your option) |
307 |
dnl |
# any later version. |
|
dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits]) |
|
|
dnl |
|
|
dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh |
|
|
dnl is not found. |
|
|
dnl |
|
|
|
|
|
AC_DEFUN([GNOME_INIT_HOOK],[ |
|
|
AC_SUBST(GNOME_LIBS) |
|
|
AC_SUBST(GNOMEUI_LIBS) |
|
|
AC_SUBST(GNOMEGNORBA_LIBS) |
|
|
AC_SUBST(GTKXMHTML_LIBS) |
|
|
AC_SUBST(ZVT_LIBS) |
|
|
AC_SUBST(GNOME_LIBDIR) |
|
|
AC_SUBST(GNOME_INCLUDEDIR) |
|
|
|
|
|
AC_ARG_WITH(gnome-includes, |
|
|
[ --with-gnome-includes Specify location of GNOME headers],[ |
|
|
CFLAGS="$CFLAGS -I$withval" |
|
|
]) |
|
|
|
|
|
AC_ARG_WITH(gnome-libs, |
|
|
[ --with-gnome-libs Specify location of GNOME libs],[ |
|
|
LDFLAGS="$LDFLAGS -L$withval" |
|
|
gnome_prefix=$withval |
|
|
]) |
|
|
|
|
|
AC_ARG_WITH(gnome, |
|
|
[ --with-gnome Specify prefix for GNOME files], |
|
|
if test x$withval = xyes; then |
|
|
want_gnome=yes |
|
|
dnl Note that an empty true branch is not |
|
|
dnl valid sh syntax. |
|
|
ifelse([$1], [], :, [$1]) |
|
|
else |
|
|
if test "x$withval" = xno; then |
|
|
want_gnome=no |
|
|
else |
|
|
want_gnome=yes |
|
|
LDFLAGS="$LDFLAGS -L$withval/lib" |
|
|
CFLAGS="$CFLAGS -I$withval/include" |
|
|
gnome_prefix=$withval/lib |
|
|
fi |
|
|
fi, |
|
|
want_gnome=yes) |
|
|
|
|
|
if test "x$want_gnome" = xyes; then |
|
|
|
|
|
AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) |
|
|
if test "$GNOME_CONFIG" = "no"; then |
|
|
no_gnome_config="yes" |
|
|
else |
|
|
AC_MSG_CHECKING(if $GNOME_CONFIG works) |
|
|
if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then |
|
|
AC_MSG_RESULT(yes) |
|
|
GNOME_GNORBA_HOOK([],$2) |
|
|
GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`" |
|
|
GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`" |
|
|
GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`" |
|
|
GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`" |
|
|
ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`" |
|
|
GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" |
|
|
GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" |
|
|
$1 |
|
|
else |
|
|
AC_MSG_RESULT(no) |
|
|
no_gnome_config="yes" |
|
|
fi |
|
|
fi |
|
|
|
|
|
if test x$exec_prefix = xNONE; then |
|
|
if test x$prefix = xNONE; then |
|
|
gnome_prefix=$ac_default_prefix/lib |
|
|
else |
|
|
gnome_prefix=$prefix/lib |
|
|
fi |
|
|
else |
|
|
gnome_prefix=`eval echo \`echo $libdir\`` |
|
|
fi |
|
|
|
|
|
if test "$no_gnome_config" = "yes"; then |
|
|
AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix) |
|
|
if test -f $gnome_prefix/gnomeConf.sh; then |
|
|
AC_MSG_RESULT(found) |
|
|
echo "loading gnome configuration from" \ |
|
|
"$gnome_prefix/gnomeConf.sh" |
|
|
. $gnome_prefix/gnomeConf.sh |
|
|
$1 |
|
|
else |
|
|
AC_MSG_RESULT(not found) |
|
|
if test x$2 = xfail; then |
|
|
AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install) |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
if test -n "$3"; then |
|
|
n="$3" |
|
|
for i in $n; do |
|
|
AC_MSG_CHECKING(extra library \"$i\") |
|
|
case $i in |
|
|
applets) |
|
|
AC_SUBST(GNOME_APPLETS_LIBS) |
|
|
GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets` |
|
|
AC_MSG_RESULT($GNOME_APPLETS_LIBS);; |
|
|
docklets) |
|
|
AC_SUBST(GNOME_DOCKLETS_LIBS) |
|
|
GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets` |
|
|
AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);; |
|
|
capplet) |
|
|
AC_SUBST(GNOME_CAPPLET_LIBS) |
|
|
GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet` |
|
|
AC_MSG_RESULT($GNOME_CAPPLET_LIBS);; |
|
|
*) |
|
|
AC_MSG_RESULT(unknown library) |
|
|
esac |
|
|
EXTRA_INCLUDEDIR=`$GNOME_CONFIG --cflags $i` |
|
|
GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR $EXTRA_INCLUDEDIR" |
|
|
done |
|
|
fi |
|
|
]) |
|
|
|
|
|
dnl |
|
|
dnl GNOME_INIT ([additional-inits]) |
|
|
dnl |
|
|
|
|
|
AC_DEFUN([GNOME_INIT],[ |
|
|
GNOME_INIT_HOOK([],fail,$1) |
|
|
]) |
|
308 |
|
|
309 |
dnl |
# This program is distributed in the hope that it will be useful, |
310 |
dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag) |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
311 |
dnl |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
312 |
dnl if failflag is "failure" it aborts if gnorba is not found. |
# GNU General Public License for more details. |
|
dnl |
|
313 |
|
|
314 |
AC_DEFUN([GNOME_GNORBA_HOOK],[ |
# You should have received a copy of the GNU General Public License |
315 |
GNOME_ORBIT_HOOK([],$2) |
# along with this program; if not, write to the Free Software |
316 |
AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[ |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
317 |
gnome_cv_gnorba_found=no |
# 02111-1307, USA. |
|
if test x$gnome_cv_orbit_found = xyes; then |
|
|
GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" |
|
|
GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" |
|
|
if test -n "$GNORBA_LIBS"; then |
|
|
gnome_cv_gnorba_found=yes |
|
|
fi |
|
|
fi |
|
|
]) |
|
|
AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes) |
|
|
if test x$gnome_cv_orbit_found = xyes; then |
|
|
$1 |
|
|
GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" |
|
|
GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" |
|
|
AC_SUBST(GNORBA_CFLAGS) |
|
|
AC_SUBST(GNORBA_LIBS) |
|
|
else |
|
|
if test x$2 = xfailure; then |
|
|
AC_MSG_ERROR(gnorba library not installed or installation problem) |
|
|
fi |
|
|
fi |
|
|
]) |
|
318 |
|
|
319 |
AC_DEFUN([GNOME_GNORBA_CHECK], [ |
# serial 3 |
|
GNOME_GNORBA_HOOK([],failure) |
|
|
]) |
|
320 |
|
|
321 |
dnl |
# AM_MISSING_PROG(NAME, PROGRAM) |
322 |
dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag) |
# ------------------------------ |
323 |
dnl |
AC_DEFUN([AM_MISSING_PROG], |
324 |
dnl if failflag is "failure" it aborts if orbit is not found. |
[AC_REQUIRE([AM_MISSING_HAS_RUN]) |
325 |
dnl |
$1=${$1-"${am_missing_run}$2"} |
326 |
|
AC_SUBST($1)]) |
327 |
|
|
|
AC_DEFUN([GNOME_ORBIT_HOOK],[ |
|
|
AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no) |
|
|
AC_PATH_PROG(ORBIT_IDL,orbit-idl,no) |
|
|
AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[ |
|
|
if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then |
|
|
gnome_cv_orbit_found=no |
|
|
else |
|
|
gnome_cv_orbit_found=yes |
|
|
fi |
|
|
]) |
|
|
AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes) |
|
|
if test x$gnome_cv_orbit_found = xyes; then |
|
|
$1 |
|
|
ORBIT_CFLAGS=`orbit-config --cflags client server` |
|
|
ORBIT_LIBS=`orbit-config --use-service=name --libs client server` |
|
|
AC_SUBST(ORBIT_CFLAGS) |
|
|
AC_SUBST(ORBIT_LIBS) |
|
|
else |
|
|
if test x$2 = xfailure; then |
|
|
AC_MSG_ERROR(ORBit not installed or installation problem) |
|
|
fi |
|
|
fi |
|
|
]) |
|
328 |
|
|
329 |
AC_DEFUN([GNOME_ORBIT_CHECK], [ |
# AM_MISSING_HAS_RUN |
330 |
GNOME_ORBIT_HOOK([],failure) |
# ------------------ |
331 |
|
# Define MISSING if not defined so far and test if it supports --run. |
332 |
|
# If it does, set am_missing_run to use it, otherwise, to nothing. |
333 |
|
AC_DEFUN([AM_MISSING_HAS_RUN], |
334 |
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
335 |
|
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" |
336 |
|
# Use eval to expand $SHELL |
337 |
|
if eval "$MISSING --run true"; then |
338 |
|
am_missing_run="$MISSING --run " |
339 |
|
else |
340 |
|
am_missing_run= |
341 |
|
AC_MSG_WARN([`missing' script is too old or missing]) |
342 |
|
fi |
343 |
]) |
]) |
344 |
|
|
345 |
|
# AM_AUX_DIR_EXPAND |
346 |
|
|
347 |
dnl AM_PROG_LEX |
# Copyright 2001 Free Software Foundation, Inc. |
|
dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT |
|
|
AC_DEFUN([AM_PROG_LEX], |
|
|
[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) |
|
|
AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") |
|
|
AC_PROG_LEX |
|
|
AC_DECL_YYTEXT]) |
|
|
|
|
|
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- |
|
|
|
|
|
# serial 46 AC_PROG_LIBTOOL |
|
|
|
|
|
AC_DEFUN([AC_PROG_LIBTOOL], |
|
|
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
|
|
|
|
|
# This can be used to rebuild libtool when needed |
|
|
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" |
|
348 |
|
|
349 |
# Always use our own libtool. |
# This program is free software; you can redistribute it and/or modify |
350 |
LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
# it under the terms of the GNU General Public License as published by |
351 |
AC_SUBST(LIBTOOL)dnl |
# the Free Software Foundation; either version 2, or (at your option) |
352 |
|
# any later version. |
353 |
|
|
354 |
# Prevent multiple expansion |
# This program is distributed in the hope that it will be useful, |
355 |
define([AC_PROG_LIBTOOL], []) |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
356 |
]) |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
357 |
|
# GNU General Public License for more details. |
358 |
|
|
359 |
AC_DEFUN([AC_LIBTOOL_SETUP], |
# You should have received a copy of the GNU General Public License |
360 |
[AC_PREREQ(2.13)dnl |
# along with this program; if not, write to the Free Software |
361 |
AC_REQUIRE([AC_ENABLE_SHARED])dnl |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
362 |
AC_REQUIRE([AC_ENABLE_STATIC])dnl |
# 02111-1307, USA. |
|
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
|
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
|
|
AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
|
|
AC_REQUIRE([AC_PROG_CC])dnl |
|
|
AC_REQUIRE([AC_PROG_LD])dnl |
|
|
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl |
|
|
AC_REQUIRE([AC_PROG_NM])dnl |
|
|
AC_REQUIRE([AC_PROG_LN_S])dnl |
|
|
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl |
|
|
AC_REQUIRE([AC_OBJEXT])dnl |
|
|
AC_REQUIRE([AC_EXEEXT])dnl |
|
|
dnl |
|
363 |
|
|
364 |
_LT_AC_PROG_ECHO_BACKSLASH |
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
365 |
# Only perform the check for file, if the check method requires it |
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
366 |
case $deplibs_check_method in |
# `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
367 |
file_magic*) |
# |
368 |
if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
# Of course, Automake must honor this variable whenever it calls a |
369 |
AC_PATH_MAGIC |
# tool from the auxiliary directory. The problem is that $srcdir (and |
370 |
fi |
# therefore $ac_aux_dir as well) can be either absolute or relative, |
371 |
;; |
# depending on how configure is run. This is pretty annoying, since |
372 |
esac |
# it makes $ac_aux_dir quite unusable in subdirectories: in the top |
373 |
|
# source directory, any form will work fine, but in subdirectories a |
374 |
|
# relative path needs to be adjusted first. |
375 |
|
# |
376 |
|
# $ac_aux_dir/missing |
377 |
|
# fails when called from a subdirectory if $ac_aux_dir is relative |
378 |
|
# $top_srcdir/$ac_aux_dir/missing |
379 |
|
# fails if $ac_aux_dir is absolute, |
380 |
|
# fails when called from a subdirectory in a VPATH build with |
381 |
|
# a relative $ac_aux_dir |
382 |
|
# |
383 |
|
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
384 |
|
# are both prefixed by $srcdir. In an in-source build this is usually |
385 |
|
# harmless because $srcdir is `.', but things will broke when you |
386 |
|
# start a VPATH build or use an absolute $srcdir. |
387 |
|
# |
388 |
|
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
389 |
|
# iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
390 |
|
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
391 |
|
# and then we would define $MISSING as |
392 |
|
# MISSING="\${SHELL} $am_aux_dir/missing" |
393 |
|
# This will work as long as MISSING is not called from configure, because |
394 |
|
# unfortunately $(top_srcdir) has no meaning in configure. |
395 |
|
# However there are other variables, like CC, which are often used in |
396 |
|
# configure, and could therefore not use this "fixed" $ac_aux_dir. |
397 |
|
# |
398 |
|
# Another solution, used here, is to always expand $ac_aux_dir to an |
399 |
|
# absolute PATH. The drawback is that using absolute paths prevent a |
400 |
|
# configured tree to be moved without reconfiguration. |
401 |
|
|
402 |
|
# Rely on autoconf to set up CDPATH properly. |
403 |
|
AC_PREREQ([2.50]) |
404 |
|
|
405 |
|
AC_DEFUN([AM_AUX_DIR_EXPAND], [ |
406 |
|
# expand $ac_aux_dir to an absolute path |
407 |
|
am_aux_dir=`cd $ac_aux_dir && pwd` |
408 |
|
]) |
409 |
|
|
410 |
|
# AM_PROG_INSTALL_SH |
411 |
|
# ------------------ |
412 |
|
# Define $install_sh. |
413 |
|
|
414 |
AC_CHECK_TOOL(RANLIB, ranlib, :) |
# Copyright 2001 Free Software Foundation, Inc. |
|
AC_CHECK_TOOL(STRIP, strip, :) |
|
415 |
|
|
416 |
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) |
# This program is free software; you can redistribute it and/or modify |
417 |
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
# it under the terms of the GNU General Public License as published by |
418 |
enable_win32_dll=yes, enable_win32_dll=no) |
# the Free Software Foundation; either version 2, or (at your option) |
419 |
|
# any later version. |
|
AC_ARG_ENABLE(libtool-lock, |
|
|
[ --disable-libtool-lock avoid locking (might break parallel builds)]) |
|
|
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
|
|
|
|
|
# Some flags need to be propagated to the compiler or linker for good |
|
|
# libtool support. |
|
|
case $host in |
|
|
*-*-irix6*) |
|
|
# Find out which ABI we are using. |
|
|
echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
|
|
if AC_TRY_EVAL(ac_compile); then |
|
|
case `/usr/bin/file conftest.$ac_objext` in |
|
|
*32-bit*) |
|
|
LD="${LD-ld} -32" |
|
|
;; |
|
|
*N32*) |
|
|
LD="${LD-ld} -n32" |
|
|
;; |
|
|
*64-bit*) |
|
|
LD="${LD-ld} -64" |
|
|
;; |
|
|
esac |
|
|
fi |
|
|
rm -rf conftest* |
|
|
;; |
|
420 |
|
|
421 |
*-*-sco3.2v5*) |
# This program is distributed in the hope that it will be useful, |
422 |
# On SCO OpenServer 5, we need -belf to get full-featured binaries. |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
423 |
SAVE_CFLAGS="$CFLAGS" |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
424 |
CFLAGS="$CFLAGS -belf" |
# GNU General Public License for more details. |
|
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
|
|
[AC_LANG_SAVE |
|
|
AC_LANG_C |
|
|
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
|
|
AC_LANG_RESTORE]) |
|
|
if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
|
|
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
|
|
CFLAGS="$SAVE_CFLAGS" |
|
|
fi |
|
|
;; |
|
425 |
|
|
426 |
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
# You should have received a copy of the GNU General Public License |
427 |
[*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
# along with this program; if not, write to the Free Software |
428 |
AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
429 |
AC_CHECK_TOOL(AS, as, false) |
# 02111-1307, USA. |
|
AC_CHECK_TOOL(OBJDUMP, objdump, false) |
|
|
|
|
|
# recent cygwin and mingw systems supply a stub DllMain which the user |
|
|
# can override, but on older systems we have to supply one |
|
|
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, |
|
|
[AC_TRY_LINK([], |
|
|
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); |
|
|
DllMain (0, 0, 0);], |
|
|
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) |
|
|
|
|
|
case $host/$CC in |
|
|
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) |
|
|
# old mingw systems require "-dll" to link a DLL, while more recent ones |
|
|
# require "-mdll" |
|
|
SAVE_CFLAGS="$CFLAGS" |
|
|
CFLAGS="$CFLAGS -mdll" |
|
|
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, |
|
|
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) |
|
|
CFLAGS="$SAVE_CFLAGS" ;; |
|
|
*-*-cygwin* | *-*-pw32*) |
|
|
# cygwin systems need to pass --dll to the linker, and not link |
|
|
# crt.o which will require a WinMain@16 definition. |
|
|
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; |
|
|
esac |
|
|
;; |
|
|
]) |
|
|
esac |
|
430 |
|
|
431 |
_LT_AC_LTCONFIG_HACK |
AC_DEFUN([AM_PROG_INSTALL_SH], |
432 |
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
433 |
|
install_sh=${install_sh-"$am_aux_dir/install-sh"} |
434 |
|
AC_SUBST(install_sh)]) |
435 |
|
|
436 |
]) |
# AM_PROG_INSTALL_STRIP |
437 |
|
|
438 |
# AC_LIBTOOL_HEADER_ASSERT |
# Copyright 2001 Free Software Foundation, Inc. |
|
# ------------------------ |
|
|
AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], |
|
|
[AC_CACHE_CHECK([whether $CC supports assert without backlinking], |
|
|
[lt_cv_func_assert_works], |
|
|
[case $host in |
|
|
*-*-solaris*) |
|
|
if test "$GCC" = yes && test "$with_gnu_ld" != yes; then |
|
|
case `$CC --version 2>/dev/null` in |
|
|
[[12]].*) lt_cv_func_assert_works=no ;; |
|
|
*) lt_cv_func_assert_works=yes ;; |
|
|
esac |
|
|
fi |
|
|
;; |
|
|
esac]) |
|
439 |
|
|
440 |
if test "x$lt_cv_func_assert_works" = xyes; then |
# This program is free software; you can redistribute it and/or modify |
441 |
AC_CHECK_HEADERS(assert.h) |
# it under the terms of the GNU General Public License as published by |
442 |
fi |
# the Free Software Foundation; either version 2, or (at your option) |
443 |
])# AC_LIBTOOL_HEADER_ASSERT |
# any later version. |
444 |
|
|
445 |
# _LT_AC_CHECK_DLFCN |
# This program is distributed in the hope that it will be useful, |
446 |
# -------------------- |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
447 |
AC_DEFUN([_LT_AC_CHECK_DLFCN], |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
448 |
[AC_CHECK_HEADERS(dlfcn.h) |
# GNU General Public License for more details. |
|
])# _LT_AC_CHECK_DLFCN |
|
|
|
|
|
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
|
|
# --------------------------------- |
|
|
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
|
|
[AC_REQUIRE([AC_CANONICAL_HOST]) |
|
|
AC_REQUIRE([AC_PROG_NM]) |
|
|
AC_REQUIRE([AC_OBJEXT]) |
|
|
# Check for command to grab the raw symbol name followed by C symbol from nm. |
|
|
AC_MSG_CHECKING([command to parse $NM output]) |
|
|
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl |
|
|
|
|
|
# These are sane defaults that work on at least a few old systems. |
|
|
# [They come from Ultrix. What could be older than Ultrix?!! ;)] |
|
|
|
|
|
# Character class describing NM global symbol codes. |
|
|
symcode='[[BCDEGRST]]' |
|
|
|
|
|
# Regexp to match symbols that can be accessed directly from C. |
|
|
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
|
|
|
|
|
# Transform the above into a raw symbol and a C symbol. |
|
|
symxfrm='\1 \2\3 \3' |
|
|
|
|
|
# Transform an extracted symbol line into a proper C declaration |
|
|
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" |
|
|
|
|
|
# Transform an extracted symbol line into symbol name and symbol address |
|
|
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
|
|
|
|
|
# Define system-specific variables. |
|
|
case $host_os in |
|
|
aix*) |
|
|
symcode='[[BCDT]]' |
|
|
;; |
|
|
cygwin* | mingw* | pw32*) |
|
|
symcode='[[ABCDGISTW]]' |
|
|
;; |
|
|
hpux*) # Its linker distinguishes data from code symbols |
|
|
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
|
|
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
|
|
;; |
|
|
irix*) |
|
|
symcode='[[BCDEGRST]]' |
|
|
;; |
|
|
solaris* | sysv5*) |
|
|
symcode='[[BDT]]' |
|
|
;; |
|
|
sysv4) |
|
|
symcode='[[DFNSTU]]' |
|
|
;; |
|
|
esac |
|
449 |
|
|
450 |
# Handle CRLF in mingw tool chain |
# You should have received a copy of the GNU General Public License |
451 |
opt_cr= |
# along with this program; if not, write to the Free Software |
452 |
case $host_os in |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
453 |
mingw*) |
# 02111-1307, USA. |
|
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
|
|
;; |
|
|
esac |
|
454 |
|
|
455 |
# If we're using GNU nm, then use its standard symbol codes. |
# One issue with vendor `install' (even GNU) is that you can't |
456 |
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
# specify the program used to strip binaries. This is especially |
457 |
symcode='[[ABCDGISTW]]' |
# annoying in cross-compiling environments, where the build's strip |
458 |
|
# is unlikely to handle the host's binaries. |
459 |
|
# Fortunately install-sh will honor a STRIPPROG variable, so we |
460 |
|
# always use install-sh in `make install-strip', and initialize |
461 |
|
# STRIPPROG with the value of the STRIP variable (set by the user). |
462 |
|
AC_DEFUN([AM_PROG_INSTALL_STRIP], |
463 |
|
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
464 |
|
# Installed binaries are usually stripped using `strip' when the user |
465 |
|
# run `make install-strip'. However `strip' might not be the right |
466 |
|
# tool to use in cross-compilation environments, therefore Automake |
467 |
|
# will honor the `STRIP' environment variable to overrule this program. |
468 |
|
dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
469 |
|
if test "$cross_compiling" != no; then |
470 |
|
AC_CHECK_TOOL([STRIP], [strip], :) |
471 |
fi |
fi |
472 |
|
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" |
473 |
|
AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
474 |
|
|
475 |
# Try without a prefix undercore, then with it. |
# serial 4 -*- Autoconf -*- |
|
for ac_symprfx in "" "_"; do |
|
476 |
|
|
477 |
# Write the raw and C identifiers. |
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc. |
|
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" |
|
478 |
|
|
479 |
# Check to see that the pipe works correctly. |
# This program is free software; you can redistribute it and/or modify |
480 |
pipe_works=no |
# it under the terms of the GNU General Public License as published by |
481 |
rm -f conftest* |
# the Free Software Foundation; either version 2, or (at your option) |
482 |
cat > conftest.$ac_ext <<EOF |
# any later version. |
|
#ifdef __cplusplus |
|
|
extern "C" { |
|
|
#endif |
|
|
char nm_test_var; |
|
|
void nm_test_func(){} |
|
|
#ifdef __cplusplus |
|
|
} |
|
|
#endif |
|
|
int main(){nm_test_var='a';nm_test_func();return(0);} |
|
|
EOF |
|
|
|
|
|
if AC_TRY_EVAL(ac_compile); then |
|
|
# Now try to grab the symbols. |
|
|
nlist=conftest.nm |
|
|
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
|
|
# Try sorting and uniquifying the output. |
|
|
if sort "$nlist" | uniq > "$nlist"T; then |
|
|
mv -f "$nlist"T "$nlist" |
|
|
else |
|
|
rm -f "$nlist"T |
|
|
fi |
|
483 |
|
|
484 |
# Make sure that we snagged all the symbols we need. |
# This program is distributed in the hope that it will be useful, |
485 |
if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
486 |
if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
487 |
cat <<EOF > conftest.$ac_ext |
# GNU General Public License for more details. |
|
#ifdef __cplusplus |
|
|
extern "C" { |
|
|
#endif |
|
488 |
|
|
489 |
EOF |
# You should have received a copy of the GNU General Public License |
490 |
# Now generate the symbol file. |
# along with this program; if not, write to the Free Software |
491 |
eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
492 |
|
# 02111-1307, USA. |
|
cat <<EOF >> conftest.$ac_ext |
|
|
#if defined (__STDC__) && __STDC__ |
|
|
# define lt_ptr void * |
|
|
#else |
|
|
# define lt_ptr char * |
|
|
# define const |
|
|
#endif |
|
493 |
|
|
|
/* The mapping between symbol names and symbols. */ |
|
|
const struct { |
|
|
const char *name; |
|
|
lt_ptr address; |
|
|
} |
|
|
lt_preloaded_symbols[[]] = |
|
|
{ |
|
|
EOF |
|
|
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext |
|
|
cat <<\EOF >> conftest.$ac_ext |
|
|
{0, (lt_ptr) 0} |
|
|
}; |
|
494 |
|
|
495 |
#ifdef __cplusplus |
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
496 |
} |
# written in clear, in which case automake, when reading aclocal.m4, |
497 |
#endif |
# will think it sees a *use*, and therefore will trigger all it's |
498 |
EOF |
# C support machinery. Also note that it means that autoscan, seeing |
499 |
# Now try linking the two files. |
# CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
500 |
mv conftest.$ac_objext conftstm.$ac_objext |
|
501 |
save_LIBS="$LIBS" |
|
502 |
save_CFLAGS="$CFLAGS" |
|
503 |
LIBS="conftstm.$ac_objext" |
# _AM_DEPENDENCIES(NAME) |
504 |
CFLAGS="$CFLAGS$no_builtin_flag" |
# ---------------------- |
505 |
if AC_TRY_EVAL(ac_link) && test -s conftest; then |
# See how the compiler implements dependency checking. |
506 |
pipe_works=yes |
# NAME is "CC", "CXX", "GCJ", or "OBJC". |
507 |
fi |
# We try a few techniques and use that to set a single cache variable. |
508 |
LIBS="$save_LIBS" |
# |
509 |
CFLAGS="$save_CFLAGS" |
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
510 |
else |
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
511 |
echo "cannot find nm_test_func in $nlist" >&AC_FD_CC |
# dependency, and given that the user is not expected to run this macro, |
512 |
fi |
# just rely on AC_PROG_CC. |
513 |
|
AC_DEFUN([_AM_DEPENDENCIES], |
514 |
|
[AC_REQUIRE([AM_SET_DEPDIR])dnl |
515 |
|
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
516 |
|
AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
517 |
|
AC_REQUIRE([AM_DEP_TRACK])dnl |
518 |
|
|
519 |
|
ifelse([$1], CC, [depcc="$CC" am_compiler_list=], |
520 |
|
[$1], CXX, [depcc="$CXX" am_compiler_list=], |
521 |
|
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
522 |
|
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
523 |
|
[depcc="$$1" am_compiler_list=]) |
524 |
|
|
525 |
|
AC_CACHE_CHECK([dependency style of $depcc], |
526 |
|
[am_cv_$1_dependencies_compiler_type], |
527 |
|
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
528 |
|
# We make a subdir and do the tests there. Otherwise we can end up |
529 |
|
# making bogus files that we don't know about and never remove. For |
530 |
|
# instance it was reported that on HP-UX the gcc test will end up |
531 |
|
# making a dummy file named `D' -- because `-MD' means `put the output |
532 |
|
# in D'. |
533 |
|
mkdir conftest.dir |
534 |
|
# Copy depcomp to subdir because otherwise we won't find it if we're |
535 |
|
# using a relative directory. |
536 |
|
cp "$am_depcomp" conftest.dir |
537 |
|
cd conftest.dir |
538 |
|
|
539 |
|
am_cv_$1_dependencies_compiler_type=none |
540 |
|
if test "$am_compiler_list" = ""; then |
541 |
|
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
542 |
|
fi |
543 |
|
for depmode in $am_compiler_list; do |
544 |
|
# We need to recreate these files for each test, as the compiler may |
545 |
|
# overwrite some of them when testing with obscure command lines. |
546 |
|
# This happens at least with the AIX C compiler. |
547 |
|
echo '#include "conftest.h"' > conftest.c |
548 |
|
echo 'int i;' > conftest.h |
549 |
|
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf |
550 |
|
|
551 |
|
case $depmode in |
552 |
|
nosideeffect) |
553 |
|
# after this tag, mechanisms are not by side-effect, so they'll |
554 |
|
# only be used when explicitly requested |
555 |
|
if test "x$enable_dependency_tracking" = xyes; then |
556 |
|
continue |
557 |
else |
else |
558 |
echo "cannot find nm_test_var in $nlist" >&AC_FD_CC |
break |
559 |
fi |
fi |
560 |
else |
;; |
561 |
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC |
none) break ;; |
562 |
fi |
esac |
563 |
else |
# We check with `-c' and `-o' for the sake of the "dashmstdout" |
564 |
echo "$progname: failed program was:" >&AC_FD_CC |
# mode. It turns out that the SunPro C++ compiler does not properly |
565 |
cat conftest.$ac_ext >&5 |
# handle `-M -o', and we need to detect this. |
566 |
fi |
if depmode=$depmode \ |
567 |
rm -f conftest* conftst* |
source=conftest.c object=conftest.o \ |
568 |
|
depfile=conftest.Po tmpdepfile=conftest.TPo \ |
569 |
# Do not use the global_symbol_pipe unless it works. |
$SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && |
570 |
if test "$pipe_works" = yes; then |
grep conftest.h conftest.Po > /dev/null 2>&1 && |
571 |
break |
${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
572 |
else |
am_cv_$1_dependencies_compiler_type=$depmode |
|
lt_cv_sys_global_symbol_pipe= |
|
|
fi |
|
|
done |
|
|
]) |
|
|
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" |
|
|
if test -z "$lt_cv_sys_global_symbol_pipe"; then |
|
|
global_symbol_to_cdecl= |
|
|
global_symbol_to_c_name_address= |
|
|
else |
|
|
global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" |
|
|
global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" |
|
|
fi |
|
|
if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; |
|
|
then |
|
|
AC_MSG_RESULT(failed) |
|
|
else |
|
|
AC_MSG_RESULT(ok) |
|
|
fi |
|
|
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
|
|
|
|
|
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
|
|
# --------------------------------- |
|
|
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], |
|
|
[# Find the correct PATH separator. Usually this is `:', but |
|
|
# DJGPP uses `;' like DOS. |
|
|
if test "X${PATH_SEPARATOR+set}" != Xset; then |
|
|
UNAME=${UNAME-`uname 2>/dev/null`} |
|
|
case X$UNAME in |
|
|
*-DOS) lt_cv_sys_path_separator=';' ;; |
|
|
*) lt_cv_sys_path_separator=':' ;; |
|
|
esac |
|
|
PATH_SEPARATOR=$lt_cv_sys_path_separator |
|
|
fi |
|
|
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
|
|
|
|
|
# _LT_AC_PROG_ECHO_BACKSLASH |
|
|
# -------------------------- |
|
|
# Add some code to the start of the generated configure script which |
|
|
# will find an echo command which doesn't interpret backslashes. |
|
|
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], |
|
|
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
|
|
[AC_DIVERT_PUSH(NOTICE)]) |
|
|
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
|
|
|
|
|
# Check that we are running under the correct shell. |
|
|
SHELL=${CONFIG_SHELL-/bin/sh} |
|
|
|
|
|
case X$ECHO in |
|
|
X*--fallback-echo) |
|
|
# Remove one level of quotation (which was required for Make). |
|
|
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` |
|
|
;; |
|
|
esac |
|
|
|
|
|
echo=${ECHO-echo} |
|
|
if test "X[$]1" = X--no-reexec; then |
|
|
# Discard the --no-reexec flag, and continue. |
|
|
shift |
|
|
elif test "X[$]1" = X--fallback-echo; then |
|
|
# Avoid inline document here, it may be left over |
|
|
: |
|
|
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then |
|
|
# Yippee, $echo works! |
|
|
: |
|
|
else |
|
|
# Restart under the correct shell. |
|
|
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} |
|
|
fi |
|
|
|
|
|
if test "X[$]1" = X--fallback-echo; then |
|
|
# used as fallback echo |
|
|
shift |
|
|
cat <<EOF |
|
|
$* |
|
|
EOF |
|
|
exit 0 |
|
|
fi |
|
|
|
|
|
# The HP-UX ksh and POSIX shell print the target directory to stdout |
|
|
# if CDPATH is set. |
|
|
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
|
|
|
|
|
if test -z "$ECHO"; then |
|
|
if test "X${echo_test_string+set}" != Xset; then |
|
|
# find a string as large as possible, as long as the shell can cope with it |
|
|
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do |
|
|
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
|
|
if (echo_test_string="`eval $cmd`") 2>/dev/null && |
|
|
echo_test_string="`eval $cmd`" && |
|
|
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null |
|
|
then |
|
573 |
break |
break |
574 |
fi |
fi |
575 |
done |
done |
|
fi |
|
576 |
|
|
577 |
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
cd .. |
578 |
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
rm -rf conftest.dir |
|
test "X$echo_testing_string" = "X$echo_test_string"; then |
|
|
: |
|
579 |
else |
else |
580 |
# The Solaris, AIX, and Digital Unix default echo programs unquote |
am_cv_$1_dependencies_compiler_type=none |
|
# backslashes. This makes it impossible to quote backslashes using |
|
|
# echo "$something" | sed 's/\\/\\\\/g' |
|
|
# |
|
|
# So, first we look for a working echo in the user's PATH. |
|
|
|
|
|
IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
|
|
for dir in $PATH /usr/ucb; do |
|
|
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
|
|
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
|
|
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && |
|
|
test "X$echo_testing_string" = "X$echo_test_string"; then |
|
|
echo="$dir/echo" |
|
|
break |
|
|
fi |
|
|
done |
|
|
IFS="$save_ifs" |
|
|
|
|
|
if test "X$echo" = Xecho; then |
|
|
# We didn't find a better echo, so look for alternatives. |
|
|
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
|
|
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && |
|
|
test "X$echo_testing_string" = "X$echo_test_string"; then |
|
|
# This shell has a builtin print -r that does the trick. |
|
|
echo='print -r' |
|
|
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
|
|
test "X$CONFIG_SHELL" != X/bin/ksh; then |
|
|
# If we have ksh, try running configure again with it. |
|
|
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
|
|
export ORIGINAL_CONFIG_SHELL |
|
|
CONFIG_SHELL=/bin/ksh |
|
|
export CONFIG_SHELL |
|
|
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} |
|
|
else |
|
|
# Try using printf. |
|
|
echo='printf %s\n' |
|
|
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
|
|
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
|
|
test "X$echo_testing_string" = "X$echo_test_string"; then |
|
|
# Cool, printf works |
|
|
: |
|
|
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
|
|
test "X$echo_testing_string" = 'X\t' && |
|
|
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
|
|
test "X$echo_testing_string" = "X$echo_test_string"; then |
|
|
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL |
|
|
export CONFIG_SHELL |
|
|
SHELL="$CONFIG_SHELL" |
|
|
export SHELL |
|
|
echo="$CONFIG_SHELL [$]0 --fallback-echo" |
|
|
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
|
|
test "X$echo_testing_string" = 'X\t' && |
|
|
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
|
|
test "X$echo_testing_string" = "X$echo_test_string"; then |
|
|
echo="$CONFIG_SHELL [$]0 --fallback-echo" |
|
|
else |
|
|
# maybe with a smaller string... |
|
|
prev=: |
|
|
|
|
|
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do |
|
|
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null |
|
|
then |
|
|
break |
|
|
fi |
|
|
prev="$cmd" |
|
|
done |
|
|
|
|
|
if test "$prev" != 'sed 50q "[$]0"'; then |
|
|
echo_test_string=`eval $prev` |
|
|
export echo_test_string |
|
|
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} |
|
|
else |
|
|
# Oops. We lost completely, so just stick with echo. |
|
|
echo=echo |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
581 |
fi |
fi |
582 |
|
]) |
583 |
|
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
584 |
|
AM_CONDITIONAL([am__fastdep$1], [ |
585 |
|
test "x$enable_dependency_tracking" != xno \ |
586 |
|
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
587 |
|
]) |
588 |
|
|
|
# Copy echo and quote the copy suitably for passing to libtool from |
|
|
# the Makefile, instead of quoting the original, which is used later. |
|
|
ECHO=$echo |
|
|
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then |
|
|
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" |
|
|
fi |
|
589 |
|
|
590 |
AC_SUBST(ECHO) |
# AM_SET_DEPDIR |
591 |
AC_DIVERT_POP |
# ------------- |
592 |
])# _LT_AC_PROG_ECHO_BACKSLASH |
# Choose a directory name for dependency files. |
593 |
|
# This macro is AC_REQUIREd in _AM_DEPENDENCIES |
594 |
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
AC_DEFUN([AM_SET_DEPDIR], |
595 |
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
[rm -f .deps 2>/dev/null |
596 |
# ------------------------------------------------------------------ |
mkdir .deps 2>/dev/null |
597 |
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], |
if test -d .deps; then |
598 |
[if test "$cross_compiling" = yes; then : |
DEPDIR=.deps |
|
[$4] |
|
599 |
else |
else |
600 |
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
# MS-DOS does not allow filenames that begin with a dot. |
601 |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
DEPDIR=_deps |
602 |
lt_status=$lt_dlunknown |
fi |
603 |
cat > conftest.$ac_ext <<EOF |
rmdir .deps 2>/dev/null |
604 |
[#line __oline__ "configure" |
AC_SUBST([DEPDIR]) |
605 |
#include "confdefs.h" |
]) |
|
|
|
|
#if HAVE_DLFCN_H |
|
|
#include <dlfcn.h> |
|
|
#endif |
|
|
|
|
|
#include <stdio.h> |
|
|
|
|
|
#ifdef RTLD_GLOBAL |
|
|
# define LT_DLGLOBAL RTLD_GLOBAL |
|
|
#else |
|
|
# ifdef DL_GLOBAL |
|
|
# define LT_DLGLOBAL DL_GLOBAL |
|
|
# else |
|
|
# define LT_DLGLOBAL 0 |
|
|
# endif |
|
|
#endif |
|
|
|
|
|
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
|
|
find out it does not work in some platform. */ |
|
|
#ifndef LT_DLLAZY_OR_NOW |
|
|
# ifdef RTLD_LAZY |
|
|
# define LT_DLLAZY_OR_NOW RTLD_LAZY |
|
|
# else |
|
|
# ifdef DL_LAZY |
|
|
# define LT_DLLAZY_OR_NOW DL_LAZY |
|
|
# else |
|
|
# ifdef RTLD_NOW |
|
|
# define LT_DLLAZY_OR_NOW RTLD_NOW |
|
|
# else |
|
|
# ifdef DL_NOW |
|
|
# define LT_DLLAZY_OR_NOW DL_NOW |
|
|
# else |
|
|
# define LT_DLLAZY_OR_NOW 0 |
|
|
# endif |
|
|
# endif |
|
|
# endif |
|
|
# endif |
|
|
#endif |
|
606 |
|
|
|
#ifdef __cplusplus |
|
|
extern "C" void exit (int); |
|
|
#endif |
|
607 |
|
|
608 |
void fnord() { int i=42;} |
# AM_DEP_TRACK |
609 |
int main () |
# ------------ |
610 |
{ |
AC_DEFUN([AM_DEP_TRACK], |
611 |
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
[AC_ARG_ENABLE(dependency-tracking, |
612 |
int status = $lt_dlunknown; |
[ --disable-dependency-tracking Speeds up one-time builds |
613 |
|
--enable-dependency-tracking Do not reject slow dependency extractors]) |
614 |
|
if test "x$enable_dependency_tracking" != xno; then |
615 |
|
am_depcomp="$ac_aux_dir/depcomp" |
616 |
|
AMDEPBACKSLASH='\' |
617 |
|
fi |
618 |
|
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
619 |
|
AC_SUBST([AMDEPBACKSLASH]) |
620 |
|
]) |
621 |
|
|
622 |
if (self) |
# Generate code to set up dependency tracking. -*- Autoconf -*- |
|
{ |
|
|
if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
|
|
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
|
|
/* dlclose (self); */ |
|
|
} |
|
623 |
|
|
624 |
exit (status); |
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
|
}] |
|
|
EOF |
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
|
|
(./conftest; exit; ) 2>/dev/null |
|
|
lt_status=$? |
|
|
case x$lt_status in |
|
|
x$lt_dlno_uscore) $1 ;; |
|
|
x$lt_dlneed_uscore) $2 ;; |
|
|
x$lt_unknown|x*) $3 ;; |
|
|
esac |
|
|
else : |
|
|
# compilation failed |
|
|
$3 |
|
|
fi |
|
|
fi |
|
|
rm -fr conftest* |
|
|
])# _LT_AC_TRY_DLOPEN_SELF |
|
625 |
|
|
626 |
# AC_LIBTOOL_DLOPEN_SELF |
# This program is free software; you can redistribute it and/or modify |
627 |
# ------------------- |
# it under the terms of the GNU General Public License as published by |
628 |
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], |
# the Free Software Foundation; either version 2, or (at your option) |
629 |
[if test "x$enable_dlopen" != xyes; then |
# any later version. |
|
enable_dlopen=unknown |
|
|
enable_dlopen_self=unknown |
|
|
enable_dlopen_self_static=unknown |
|
|
else |
|
|
lt_cv_dlopen=no |
|
|
lt_cv_dlopen_libs= |
|
630 |
|
|
631 |
case $host_os in |
# This program is distributed in the hope that it will be useful, |
632 |
beos*) |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
633 |
lt_cv_dlopen="load_add_on" |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
634 |
lt_cv_dlopen_libs= |
# GNU General Public License for more details. |
|
lt_cv_dlopen_self=yes |
|
|
;; |
|
635 |
|
|
636 |
cygwin* | mingw* | pw32*) |
# You should have received a copy of the GNU General Public License |
637 |
lt_cv_dlopen="LoadLibrary" |
# along with this program; if not, write to the Free Software |
638 |
lt_cv_dlopen_libs= |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
639 |
;; |
# 02111-1307, USA. |
640 |
|
|
641 |
*) |
#serial 2 |
|
AC_CHECK_FUNC([shl_load], |
|
|
[lt_cv_dlopen="shl_load"], |
|
|
[AC_CHECK_LIB([dld], [shl_load], |
|
|
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], |
|
|
[AC_CHECK_FUNC([dlopen], |
|
|
[lt_cv_dlopen="dlopen"], |
|
|
[AC_CHECK_LIB([dl], [dlopen], |
|
|
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], |
|
|
[AC_CHECK_LIB([svld], [dlopen], |
|
|
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], |
|
|
[AC_CHECK_LIB([dld], [dld_link], |
|
|
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) |
|
|
]) |
|
|
]) |
|
|
]) |
|
|
]) |
|
|
]) |
|
|
;; |
|
|
esac |
|
642 |
|
|
643 |
if test "x$lt_cv_dlopen" != xno; then |
# _AM_OUTPUT_DEPENDENCY_COMMANDS |
644 |
enable_dlopen=yes |
# ------------------------------ |
645 |
|
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
646 |
|
[for mf in $CONFIG_FILES; do |
647 |
|
# Strip MF so we end up with the name of the file. |
648 |
|
mf=`echo "$mf" | sed -e 's/:.*$//'` |
649 |
|
# Check whether this is an Automake generated Makefile or not. |
650 |
|
# We used to match only the files named `Makefile.in', but |
651 |
|
# some people rename them; so instead we look at the file content. |
652 |
|
# Grep'ing the first line is not enough: some people post-process |
653 |
|
# each Makefile.in and add a new line on top of each file to say so. |
654 |
|
# So let's grep whole file. |
655 |
|
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then |
656 |
|
dirpart=`AS_DIRNAME("$mf")` |
657 |
else |
else |
658 |
enable_dlopen=no |
continue |
659 |
fi |
fi |
660 |
|
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue |
661 |
|
# Extract the definition of DEP_FILES from the Makefile without |
662 |
|
# running `make'. |
663 |
|
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` |
664 |
|
test -z "$DEPDIR" && continue |
665 |
|
# When using ansi2knr, U may be empty or an underscore; expand it |
666 |
|
U=`sed -n -e '/^U = / s///p' < "$mf"` |
667 |
|
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" |
668 |
|
# We invoke sed twice because it is the simplest approach to |
669 |
|
# changing $(DEPDIR) to its actual value in the expansion. |
670 |
|
for file in `sed -n -e ' |
671 |
|
/^DEP_FILES = .*\\\\$/ { |
672 |
|
s/^DEP_FILES = // |
673 |
|
:loop |
674 |
|
s/\\\\$// |
675 |
|
p |
676 |
|
n |
677 |
|
/\\\\$/ b loop |
678 |
|
p |
679 |
|
} |
680 |
|
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ |
681 |
|
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do |
682 |
|
# Make sure the directory exists. |
683 |
|
test -f "$dirpart/$file" && continue |
684 |
|
fdir=`AS_DIRNAME(["$file"])` |
685 |
|
AS_MKDIR_P([$dirpart/$fdir]) |
686 |
|
# echo "creating $dirpart/$file" |
687 |
|
echo '# dummy' > "$dirpart/$file" |
688 |
|
done |
689 |
|
done |
690 |
|
])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
691 |
|
|
|
case $lt_cv_dlopen in |
|
|
dlopen) |
|
|
save_CPPFLAGS="$CPPFLAGS" |
|
|
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
|
|
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
|
|
|
|
|
save_LDFLAGS="$LDFLAGS" |
|
|
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
|
|
|
|
|
save_LIBS="$LIBS" |
|
|
LIBS="$lt_cv_dlopen_libs $LIBS" |
|
|
|
|
|
AC_CACHE_CHECK([whether a program can dlopen itself], |
|
|
lt_cv_dlopen_self, [dnl |
|
|
_LT_AC_TRY_DLOPEN_SELF( |
|
|
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
|
|
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
|
|
]) |
|
692 |
|
|
693 |
if test "x$lt_cv_dlopen_self" = xyes; then |
# AM_OUTPUT_DEPENDENCY_COMMANDS |
694 |
LDFLAGS="$LDFLAGS $link_static_flag" |
# ----------------------------- |
695 |
AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
# This macro should only be invoked once -- use via AC_REQUIRE. |
696 |
lt_cv_dlopen_self_static, [dnl |
# |
697 |
_LT_AC_TRY_DLOPEN_SELF( |
# This code is only required when automatic dependency tracking |
698 |
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
# is enabled. FIXME. This creates each `.P' file that we will |
699 |
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
# need in order to bootstrap the dependency handling code. |
700 |
]) |
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
701 |
fi |
[AC_CONFIG_COMMANDS([depfiles], |
702 |
|
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
703 |
CPPFLAGS="$save_CPPFLAGS" |
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) |
704 |
LDFLAGS="$save_LDFLAGS" |
]) |
|
LIBS="$save_LIBS" |
|
|
;; |
|
|
esac |
|
705 |
|
|
706 |
case $lt_cv_dlopen_self in |
# Check to see how 'make' treats includes. -*- Autoconf -*- |
|
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
|
|
*) enable_dlopen_self=unknown ;; |
|
|
esac |
|
707 |
|
|
708 |
case $lt_cv_dlopen_self_static in |
# Copyright (C) 2001, 2002 Free Software Foundation, Inc. |
|
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
|
|
*) enable_dlopen_self_static=unknown ;; |
|
|
esac |
|
|
fi |
|
|
])# AC_LIBTOOL_DLOPEN_SELF |
|
709 |
|
|
710 |
AC_DEFUN([_LT_AC_LTCONFIG_HACK], |
# This program is free software; you can redistribute it and/or modify |
711 |
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl |
# it under the terms of the GNU General Public License as published by |
712 |
# Sed substitution that helps us do robust quoting. It backslashifies |
# the Free Software Foundation; either version 2, or (at your option) |
713 |
# metacharacters that are still active within double-quoted strings. |
# any later version. |
|
Xsed='sed -e s/^X//' |
|
|
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' |
|
|
|
|
|
# Same as above, but do not quote variable references. |
|
|
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' |
|
|
|
|
|
# Sed substitution to delay expansion of an escaped shell variable in a |
|
|
# double_quote_subst'ed string. |
|
|
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
|
|
|
|
|
# Constants: |
|
|
rm="rm -f" |
|
|
|
|
|
# Global variables: |
|
|
default_ofile=libtool |
|
|
can_build_shared=yes |
|
|
|
|
|
# All known linkers require a `.a' archive for static linking (except M$VC, |
|
|
# which needs '.lib'). |
|
|
libext=a |
|
|
ltmain="$ac_aux_dir/ltmain.sh" |
|
|
ofile="$default_ofile" |
|
|
with_gnu_ld="$lt_cv_prog_gnu_ld" |
|
|
need_locks="$enable_libtool_lock" |
|
|
|
|
|
old_CC="$CC" |
|
|
old_CFLAGS="$CFLAGS" |
|
|
|
|
|
# Set sane defaults for various variables |
|
|
test -z "$AR" && AR=ar |
|
|
test -z "$AR_FLAGS" && AR_FLAGS=cru |
|
|
test -z "$AS" && AS=as |
|
|
test -z "$CC" && CC=cc |
|
|
test -z "$DLLTOOL" && DLLTOOL=dlltool |
|
|
test -z "$LD" && LD=ld |
|
|
test -z "$LN_S" && LN_S="ln -s" |
|
|
test -z "$MAGIC_CMD" && MAGIC_CMD=file |
|
|
test -z "$NM" && NM=nm |
|
|
test -z "$OBJDUMP" && OBJDUMP=objdump |
|
|
test -z "$RANLIB" && RANLIB=: |
|
|
test -z "$STRIP" && STRIP=: |
|
|
test -z "$ac_objext" && ac_objext=o |
|
714 |
|
|
715 |
if test x"$host" != x"$build"; then |
# This program is distributed in the hope that it will be useful, |
716 |
ac_tool_prefix=${host_alias}- |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
717 |
else |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
718 |
ac_tool_prefix= |
# GNU General Public License for more details. |
|
fi |
|
719 |
|
|
720 |
# Transform linux* to *-*-linux-gnu*, to support old configure scripts. |
# You should have received a copy of the GNU General Public License |
721 |
case $host_os in |
# along with this program; if not, write to the Free Software |
722 |
linux-gnu*) ;; |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
723 |
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` |
# 02111-1307, USA. |
|
esac |
|
|
|
|
|
case $host_os in |
|
|
aix3*) |
|
|
# AIX sometimes has problems with the GCC collect2 program. For some |
|
|
# reason, if we set the COLLECT_NAMES environment variable, the problems |
|
|
# vanish in a puff of smoke. |
|
|
if test "X${COLLECT_NAMES+set}" != Xset; then |
|
|
COLLECT_NAMES= |
|
|
export COLLECT_NAMES |
|
|
fi |
|
|
;; |
|
|
esac |
|
724 |
|
|
725 |
# Determine commands to create old-style static archives. |
# serial 2 |
|
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' |
|
|
old_postinstall_cmds='chmod 644 $oldlib' |
|
|
old_postuninstall_cmds= |
|
|
|
|
|
if test -n "$RANLIB"; then |
|
|
case $host_os in |
|
|
openbsd*) |
|
|
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" |
|
|
;; |
|
|
*) |
|
|
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" |
|
|
;; |
|
|
esac |
|
|
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
|
|
fi |
|
726 |
|
|
727 |
# Allow CC to be a program name with arguments. |
# AM_MAKE_INCLUDE() |
728 |
set dummy $CC |
# ----------------- |
729 |
compiler="[$]2" |
# Check to see how make treats includes. |
730 |
|
AC_DEFUN([AM_MAKE_INCLUDE], |
731 |
AC_MSG_CHECKING([for objdir]) |
[am_make=${MAKE-make} |
732 |
rm -f .libs 2>/dev/null |
cat > confinc << 'END' |
733 |
mkdir .libs 2>/dev/null |
doit: |
734 |
if test -d .libs; then |
@echo done |
735 |
objdir=.libs |
END |
736 |
else |
# If we don't find an include directive, just comment out the code. |
737 |
# MS-DOS does not allow filenames that begin with a dot. |
AC_MSG_CHECKING([for style of include used by $am_make]) |
738 |
objdir=_libs |
am__include="#" |
739 |
|
am__quote= |
740 |
|
_am_result=none |
741 |
|
# First try GNU make style include. |
742 |
|
echo "include confinc" > confmf |
743 |
|
# We grep out `Entering directory' and `Leaving directory' |
744 |
|
# messages which can occur if `w' ends up in MAKEFLAGS. |
745 |
|
# In particular we don't look at `^make:' because GNU make might |
746 |
|
# be invoked under some other name (usually "gmake"), in which |
747 |
|
# case it prints its new name instead of `make'. |
748 |
|
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then |
749 |
|
am__include=include |
750 |
|
am__quote= |
751 |
|
_am_result=GNU |
752 |
|
fi |
753 |
|
# Now try BSD make style include. |
754 |
|
if test "$am__include" = "#"; then |
755 |
|
echo '.include "confinc"' > confmf |
756 |
|
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then |
757 |
|
am__include=.include |
758 |
|
am__quote="\"" |
759 |
|
_am_result=BSD |
760 |
|
fi |
761 |
fi |
fi |
762 |
rmdir .libs 2>/dev/null |
AC_SUBST(am__include) |
763 |
AC_MSG_RESULT($objdir) |
AC_SUBST(am__quote) |
764 |
|
AC_MSG_RESULT($_am_result) |
765 |
|
rm -f confinc confmf |
766 |
AC_ARG_WITH(pic, |
]) |
|
[ --with-pic try to use only PIC/non-PIC objects [default=use both]], |
|
|
pic_mode="$withval", pic_mode=default) |
|
|
test -z "$pic_mode" && pic_mode=default |
|
|
|
|
|
# We assume here that the value for lt_cv_prog_cc_pic will not be cached |
|
|
# in isolation, and that seeing it set (from the cache) indicates that |
|
|
# the associated values are set (in the cache) correctly too. |
|
|
AC_MSG_CHECKING([for $compiler option to produce PIC]) |
|
|
AC_CACHE_VAL(lt_cv_prog_cc_pic, |
|
|
[ lt_cv_prog_cc_pic= |
|
|
lt_cv_prog_cc_shlib= |
|
|
lt_cv_prog_cc_wl= |
|
|
lt_cv_prog_cc_static= |
|
|
lt_cv_prog_cc_no_builtin= |
|
|
lt_cv_prog_cc_can_build_shared=$can_build_shared |
|
|
|
|
|
if test "$GCC" = yes; then |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
lt_cv_prog_cc_static='-static' |
|
|
|
|
|
case $host_os in |
|
|
aix*) |
|
|
# Below there is a dirty hack to force normal static linking with -ldl |
|
|
# The problem is because libdl dynamically linked with both libc and |
|
|
# libC (AIX C++ library), which obviously doesn't included in libraries |
|
|
# list by gcc. This cause undefined symbols with -static flags. |
|
|
# This hack allows C programs to be linked with "-static -ldl", but |
|
|
# not sure about C++ programs. |
|
|
lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" |
|
|
;; |
|
|
amigaos*) |
|
|
# FIXME: we need at least 68020 code to build shared libraries, but |
|
|
# adding the `-m68020' flag to GCC prevents building anything better, |
|
|
# like `-m68040'. |
|
|
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' |
|
|
;; |
|
|
beos* | irix5* | irix6* | osf3* | osf4* | osf5*) |
|
|
# PIC is the default for these OSes. |
|
|
;; |
|
|
darwin* | rhapsody*) |
|
|
# PIC is the default on this platform |
|
|
# Common symbols not allowed in MH_DYLIB files |
|
|
lt_cv_prog_cc_pic='-fno-common' |
|
|
;; |
|
|
cygwin* | mingw* | pw32* | os2*) |
|
|
# This hack is so that the source file can tell whether it is being |
|
|
# built for inclusion in a dll (and should export symbols for example). |
|
|
lt_cv_prog_cc_pic='-DDLL_EXPORT' |
|
|
;; |
|
|
sysv4*MP*) |
|
|
if test -d /usr/nec; then |
|
|
lt_cv_prog_cc_pic=-Kconform_pic |
|
|
fi |
|
|
;; |
|
|
*) |
|
|
lt_cv_prog_cc_pic='-fPIC' |
|
|
;; |
|
|
esac |
|
|
else |
|
|
# PORTME Check for PIC flags for the system compiler. |
|
|
case $host_os in |
|
|
aix3* | aix4* | aix5*) |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
# All AIX code is PIC. |
|
|
if test "$host_cpu" = ia64; then |
|
|
# AIX 5 now supports IA64 processor |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
else |
|
|
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' |
|
|
fi |
|
|
;; |
|
|
|
|
|
hpux9* | hpux10* | hpux11*) |
|
|
# Is there a better lt_cv_prog_cc_static that works with the bundled CC? |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" |
|
|
lt_cv_prog_cc_pic='+Z' |
|
|
;; |
|
|
|
|
|
irix5* | irix6*) |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
lt_cv_prog_cc_static='-non_shared' |
|
|
# PIC (with -KPIC) is the default. |
|
|
;; |
|
|
|
|
|
cygwin* | mingw* | pw32* | os2*) |
|
|
# This hack is so that the source file can tell whether it is being |
|
|
# built for inclusion in a dll (and should export symbols for example). |
|
|
lt_cv_prog_cc_pic='-DDLL_EXPORT' |
|
|
;; |
|
767 |
|
|
768 |
newsos6) |
# AM_CONDITIONAL -*- Autoconf -*- |
|
lt_cv_prog_cc_pic='-KPIC' |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
;; |
|
769 |
|
|
770 |
osf3* | osf4* | osf5*) |
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. |
|
# All OSF/1 code is PIC. |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
lt_cv_prog_cc_static='-non_shared' |
|
|
;; |
|
|
|
|
|
sco3.2v5*) |
|
|
lt_cv_prog_cc_pic='-Kpic' |
|
|
lt_cv_prog_cc_static='-dn' |
|
|
lt_cv_prog_cc_shlib='-belf' |
|
|
;; |
|
771 |
|
|
772 |
solaris*) |
# This program is free software; you can redistribute it and/or modify |
773 |
lt_cv_prog_cc_pic='-KPIC' |
# it under the terms of the GNU General Public License as published by |
774 |
lt_cv_prog_cc_static='-Bstatic' |
# the Free Software Foundation; either version 2, or (at your option) |
775 |
lt_cv_prog_cc_wl='-Wl,' |
# any later version. |
|
;; |
|
776 |
|
|
777 |
sunos4*) |
# This program is distributed in the hope that it will be useful, |
778 |
lt_cv_prog_cc_pic='-PIC' |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
779 |
lt_cv_prog_cc_static='-Bstatic' |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
780 |
lt_cv_prog_cc_wl='-Qoption ld ' |
# GNU General Public License for more details. |
|
;; |
|
781 |
|
|
782 |
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
# You should have received a copy of the GNU General Public License |
783 |
lt_cv_prog_cc_pic='-KPIC' |
# along with this program; if not, write to the Free Software |
784 |
lt_cv_prog_cc_static='-Bstatic' |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
785 |
if test "x$host_vendor" = xsni; then |
# 02111-1307, USA. |
|
lt_cv_prog_cc_wl='-LD' |
|
|
else |
|
|
lt_cv_prog_cc_wl='-Wl,' |
|
|
fi |
|
|
;; |
|
786 |
|
|
787 |
uts4*) |
# serial 5 |
|
lt_cv_prog_cc_pic='-pic' |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
;; |
|
788 |
|
|
789 |
sysv4*MP*) |
AC_PREREQ(2.52) |
|
if test -d /usr/nec ;then |
|
|
lt_cv_prog_cc_pic='-Kconform_pic' |
|
|
lt_cv_prog_cc_static='-Bstatic' |
|
|
fi |
|
|
;; |
|
790 |
|
|
791 |
*) |
# AM_CONDITIONAL(NAME, SHELL-CONDITION) |
792 |
lt_cv_prog_cc_can_build_shared=no |
# ------------------------------------- |
793 |
;; |
# Define a conditional. |
794 |
esac |
AC_DEFUN([AM_CONDITIONAL], |
795 |
fi |
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
796 |
]) |
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
797 |
if test -z "$lt_cv_prog_cc_pic"; then |
AC_SUBST([$1_TRUE]) |
798 |
AC_MSG_RESULT([none]) |
AC_SUBST([$1_FALSE]) |
799 |
|
if $2; then |
800 |
|
$1_TRUE= |
801 |
|
$1_FALSE='#' |
802 |
else |
else |
803 |
AC_MSG_RESULT([$lt_cv_prog_cc_pic]) |
$1_TRUE='#' |
804 |
|
$1_FALSE= |
805 |
|
fi |
806 |
|
AC_CONFIG_COMMANDS_PRE( |
807 |
|
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
808 |
|
AC_MSG_ERROR([conditional "$1" was never defined. |
809 |
|
Usually this means the macro was only invoked conditionally.]) |
810 |
|
fi])]) |
811 |
|
|
|
# Check to make sure the pic_flag actually works. |
|
|
AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) |
|
|
AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl |
|
|
save_CFLAGS="$CFLAGS" |
|
|
CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" |
|
|
AC_TRY_COMPILE([], [], [dnl |
|
|
case $host_os in |
|
|
hpux9* | hpux10* | hpux11*) |
|
|
# On HP-UX, both CC and GCC only warn that PIC is supported... then |
|
|
# they create non-PIC objects. So, if there were any warnings, we |
|
|
# assume that PIC is not supported. |
|
|
if test -s conftest.err; then |
|
|
lt_cv_prog_cc_pic_works=no |
|
|
else |
|
|
lt_cv_prog_cc_pic_works=yes |
|
|
fi |
|
|
;; |
|
|
*) |
|
|
lt_cv_prog_cc_pic_works=yes |
|
|
;; |
|
|
esac |
|
|
], [dnl |
|
|
lt_cv_prog_cc_pic_works=no |
|
|
]) |
|
|
CFLAGS="$save_CFLAGS" |
|
|
]) |
|
812 |
|
|
813 |
if test "X$lt_cv_prog_cc_pic_works" = Xno; then |
# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
|
lt_cv_prog_cc_pic= |
|
|
lt_cv_prog_cc_can_build_shared=no |
|
|
else |
|
|
lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" |
|
|
fi |
|
814 |
|
|
815 |
AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) |
# This program is free software; you can redistribute it and/or modify |
816 |
fi |
# it under the terms of the GNU General Public License as published by |
817 |
|
# the Free Software Foundation; either version 2, or (at your option) |
818 |
|
# any later version. |
819 |
|
|
820 |
# Check for any special shared library compilation flags. |
# This program is distributed in the hope that it will be useful, |
821 |
if test -n "$lt_cv_prog_cc_shlib"; then |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
822 |
AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
823 |
if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : |
# GNU General Public License for more details. |
|
else |
|
|
AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) |
|
|
lt_cv_prog_cc_can_build_shared=no |
|
|
fi |
|
|
fi |
|
824 |
|
|
825 |
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) |
# You should have received a copy of the GNU General Public License |
826 |
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl |
# along with this program; if not, write to the Free Software |
827 |
lt_cv_prog_cc_static_works=no |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
828 |
save_LDFLAGS="$LDFLAGS" |
# 02111-1307, USA. |
|
LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" |
|
|
AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) |
|
|
LDFLAGS="$save_LDFLAGS" |
|
|
]) |
|
829 |
|
|
830 |
# Belt *and* braces to stop my trousers falling down: |
# serial 3 |
|
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= |
|
|
AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) |
|
|
|
|
|
pic_flag="$lt_cv_prog_cc_pic" |
|
|
special_shlib_compile_flags="$lt_cv_prog_cc_shlib" |
|
|
wl="$lt_cv_prog_cc_wl" |
|
|
link_static_flag="$lt_cv_prog_cc_static" |
|
|
no_builtin_flag="$lt_cv_prog_cc_no_builtin" |
|
|
can_build_shared="$lt_cv_prog_cc_can_build_shared" |
|
|
|
|
|
|
|
|
# Check to see if options -o and -c are simultaneously supported by compiler |
|
|
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) |
|
|
AC_CACHE_VAL([lt_cv_compiler_c_o], [ |
|
|
$rm -r conftest 2>/dev/null |
|
|
mkdir conftest |
|
|
cd conftest |
|
|
echo "int some_variable = 0;" > conftest.$ac_ext |
|
|
mkdir out |
|
|
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers |
|
|
# that will create temporary files in the current directory regardless of |
|
|
# the output directory. Thus, making CWD read-only will cause this test |
|
|
# to fail, enabling locking or at least warning the user not to do parallel |
|
|
# builds. |
|
|
chmod -w . |
|
|
save_CFLAGS="$CFLAGS" |
|
|
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" |
|
|
compiler_c_o=no |
|
|
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then |
|
|
# The compiler can only warn and ignore the option if not recognized |
|
|
# So say no if there are warnings |
|
|
if test -s out/conftest.err; then |
|
|
lt_cv_compiler_c_o=no |
|
|
else |
|
|
lt_cv_compiler_c_o=yes |
|
|
fi |
|
|
else |
|
|
# Append any errors to the config.log. |
|
|
cat out/conftest.err 1>&AC_FD_CC |
|
|
lt_cv_compiler_c_o=no |
|
|
fi |
|
|
CFLAGS="$save_CFLAGS" |
|
|
chmod u+w . |
|
|
$rm conftest* out/* |
|
|
rmdir out |
|
|
cd .. |
|
|
rmdir conftest |
|
|
$rm -r conftest 2>/dev/null |
|
|
]) |
|
|
compiler_c_o=$lt_cv_compiler_c_o |
|
|
AC_MSG_RESULT([$compiler_c_o]) |
|
831 |
|
|
832 |
if test x"$compiler_c_o" = x"yes"; then |
AC_PREREQ(2.50) |
|
# Check to see if we can write to a .lo |
|
|
AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) |
|
|
AC_CACHE_VAL([lt_cv_compiler_o_lo], [ |
|
|
lt_cv_compiler_o_lo=no |
|
|
save_CFLAGS="$CFLAGS" |
|
|
CFLAGS="$CFLAGS -c -o conftest.lo" |
|
|
save_objext="$ac_objext" |
|
|
ac_objext=lo |
|
|
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
|
|
# The compiler can only warn and ignore the option if not recognized |
|
|
# So say no if there are warnings |
|
|
if test -s conftest.err; then |
|
|
lt_cv_compiler_o_lo=no |
|
|
else |
|
|
lt_cv_compiler_o_lo=yes |
|
|
fi |
|
|
]) |
|
|
ac_objext="$save_objext" |
|
|
CFLAGS="$save_CFLAGS" |
|
|
]) |
|
|
compiler_o_lo=$lt_cv_compiler_o_lo |
|
|
AC_MSG_RESULT([$compiler_o_lo]) |
|
|
else |
|
|
compiler_o_lo=no |
|
|
fi |
|
833 |
|
|
834 |
# Check to see if we can do hard links to lock some files if needed |
# AM_PROG_LEX |
835 |
hard_links="nottested" |
# ----------- |
836 |
if test "$compiler_c_o" = no && test "$need_locks" != no; then |
# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a |
837 |
# do not overwrite the value of need_locks provided by the user |
# "missing" invocation, for better error output. |
838 |
AC_MSG_CHECKING([if we can lock with hard links]) |
AC_DEFUN([AM_PROG_LEX], |
839 |
hard_links=yes |
[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl |
840 |
$rm conftest* |
AC_REQUIRE([AC_PROG_LEX])dnl |
841 |
ln conftest.a conftest.b 2>/dev/null && hard_links=no |
if test "$LEX" = :; then |
842 |
touch conftest.a |
LEX=${am_missing_run}flex |
843 |
ln conftest.a conftest.b 2>&5 || hard_links=no |
fi]) |
|
ln conftest.a conftest.b 2>/dev/null && hard_links=no |
|
|
AC_MSG_RESULT([$hard_links]) |
|
|
if test "$hard_links" = no; then |
|
|
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) |
|
|
need_locks=warn |
|
|
fi |
|
|
else |
|
|
need_locks=no |
|
|
fi |
|
844 |
|
|
845 |
if test "$GCC" = yes; then |
# gettext.m4 serial 17 (gettext-0.11.5) |
846 |
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler |
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. |
847 |
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) |
dnl This file is free software, distributed under the terms of the GNU |
848 |
echo "int some_variable = 0;" > conftest.$ac_ext |
dnl General Public License. As a special exception to the GNU General |
849 |
save_CFLAGS="$CFLAGS" |
dnl Public License, this file may be distributed as part of a program |
850 |
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" |
dnl that contains a configuration script generated by Autoconf, under |
851 |
compiler_rtti_exceptions=no |
dnl the same distribution terms as the rest of that program. |
852 |
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
dnl |
853 |
# The compiler can only warn and ignore the option if not recognized |
dnl This file can can be used in projects which are not available under |
854 |
# So say no if there are warnings |
dnl the GNU General Public License or the GNU Library General Public |
855 |
if test -s conftest.err; then |
dnl License but which still want to provide support for the GNU gettext |
856 |
compiler_rtti_exceptions=no |
dnl functionality. |
857 |
else |
dnl Please note that the actual code of the GNU gettext library is covered |
858 |
compiler_rtti_exceptions=yes |
dnl by the GNU Library General Public License, and the rest of the GNU |
859 |
fi |
dnl gettext package package is covered by the GNU General Public License. |
860 |
|
dnl They are *not* in the public domain. |
861 |
|
|
862 |
|
dnl Authors: |
863 |
|
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
864 |
|
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002. |
865 |
|
|
866 |
|
dnl Macro to add for using GNU gettext. |
867 |
|
|
868 |
|
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). |
869 |
|
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The |
870 |
|
dnl default (if it is not specified or empty) is 'no-libtool'. |
871 |
|
dnl INTLSYMBOL should be 'external' for packages with no intl directory, |
872 |
|
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. |
873 |
|
dnl If INTLSYMBOL is 'use-libtool', then a libtool library |
874 |
|
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, |
875 |
|
dnl depending on --{enable,disable}-{shared,static} and on the presence of |
876 |
|
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library |
877 |
|
dnl $(top_builddir)/intl/libintl.a will be created. |
878 |
|
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext |
879 |
|
dnl implementations (in libc or libintl) without the ngettext() function |
880 |
|
dnl will be ignored. If NEEDSYMBOL is specified and is |
881 |
|
dnl 'need-formatstring-macros', then GNU gettext implementations that don't |
882 |
|
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. |
883 |
|
dnl INTLDIR is used to find the intl libraries. If empty, |
884 |
|
dnl the value `$(top_builddir)/intl/' is used. |
885 |
|
dnl |
886 |
|
dnl The result of the configuration is one of three cases: |
887 |
|
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled |
888 |
|
dnl and used. |
889 |
|
dnl Catalog format: GNU --> install in $(datadir) |
890 |
|
dnl Catalog extension: .mo after installation, .gmo in source tree |
891 |
|
dnl 2) GNU gettext has been found in the system's C library. |
892 |
|
dnl Catalog format: GNU --> install in $(datadir) |
893 |
|
dnl Catalog extension: .mo after installation, .gmo in source tree |
894 |
|
dnl 3) No internationalization, always use English msgid. |
895 |
|
dnl Catalog format: none |
896 |
|
dnl Catalog extension: none |
897 |
|
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. |
898 |
|
dnl The use of .gmo is historical (it was needed to avoid overwriting the |
899 |
|
dnl GNU format catalogs when building on a platform with an X/Open gettext), |
900 |
|
dnl but we keep it in order not to force irrelevant filename changes on the |
901 |
|
dnl maintainers. |
902 |
|
dnl |
903 |
|
AC_DEFUN([AM_GNU_GETTEXT], |
904 |
|
[ |
905 |
|
dnl Argument checking. |
906 |
|
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , |
907 |
|
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT |
908 |
|
])])])])]) |
909 |
|
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , |
910 |
|
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT |
911 |
|
])])])]) |
912 |
|
define(gt_included_intl, ifelse([$1], [external], [no], [yes])) |
913 |
|
define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) |
914 |
|
|
915 |
|
AC_REQUIRE([AM_PO_SUBDIRS])dnl |
916 |
|
ifelse(gt_included_intl, yes, [ |
917 |
|
AC_REQUIRE([AM_INTL_SUBDIR])dnl |
918 |
]) |
]) |
|
CFLAGS="$save_CFLAGS" |
|
|
AC_MSG_RESULT([$compiler_rtti_exceptions]) |
|
|
|
|
|
if test "$compiler_rtti_exceptions" = "yes"; then |
|
|
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' |
|
|
else |
|
|
no_builtin_flag=' -fno-builtin' |
|
|
fi |
|
|
fi |
|
|
|
|
|
# See if the linker supports building shared libraries. |
|
|
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) |
|
919 |
|
|
920 |
allow_undefined_flag= |
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. |
921 |
no_undefined_flag= |
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
922 |
need_lib_prefix=unknown |
AC_REQUIRE([AC_LIB_RPATH]) |
923 |
need_version=unknown |
|
924 |
# when you set need_version to no, make sure it does not cause -set_version |
dnl Sometimes libintl requires libiconv, so first search for libiconv. |
925 |
# flags to be left without arguments |
dnl Ideally we would do this search only after the |
926 |
archive_cmds= |
dnl if test "$USE_NLS" = "yes"; then |
927 |
archive_expsym_cmds= |
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then |
928 |
old_archive_from_new_cmds= |
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT |
929 |
old_archive_from_expsyms_cmds= |
dnl the configure script would need to contain the same shell code |
930 |
export_dynamic_flag_spec= |
dnl again, outside any 'if'. There are two solutions: |
931 |
whole_archive_flag_spec= |
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. |
932 |
thread_safe_flag_spec= |
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. |
933 |
hardcode_into_libs=no |
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not |
934 |
hardcode_libdir_flag_spec= |
dnl documented, we avoid it. |
935 |
hardcode_libdir_separator= |
ifelse(gt_included_intl, yes, , [ |
936 |
hardcode_direct=no |
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) |
937 |
hardcode_minus_L=no |
]) |
|
hardcode_shlibpath_var=unsupported |
|
|
runpath_var= |
|
|
link_all_deplibs=unknown |
|
|
always_export_symbols=no |
|
|
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
|
|
# include_expsyms should be a list of space-separated symbols to be *always* |
|
|
# included in the symbol list |
|
|
include_expsyms= |
|
|
# exclude_expsyms can be an egrep regular expression of symbols to exclude |
|
|
# it will be wrapped by ` (' and `)$', so one must not match beginning or |
|
|
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
|
|
# as well as any symbol that contains `d'. |
|
|
exclude_expsyms="_GLOBAL_OFFSET_TABLE_" |
|
|
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
|
|
# platforms (ab)use it in PIC code, but their linkers get confused if |
|
|
# the symbol is explicitly referenced. Since portable code cannot |
|
|
# rely on this symbol name, it's probably fine to never include it in |
|
|
# preloaded symbol tables. |
|
|
extract_expsyms_cmds= |
|
|
|
|
|
case $host_os in |
|
|
cygwin* | mingw* | pw32*) |
|
|
# FIXME: the MSVC++ port hasn't been tested in a loooong time |
|
|
# When not using gcc, we currently assume that we are using |
|
|
# Microsoft Visual C++. |
|
|
if test "$GCC" != yes; then |
|
|
with_gnu_ld=no |
|
|
fi |
|
|
;; |
|
|
openbsd*) |
|
|
with_gnu_ld=no |
|
|
;; |
|
|
esac |
|
938 |
|
|
939 |
ld_shlibs=yes |
AC_MSG_CHECKING([whether NLS is requested]) |
940 |
if test "$with_gnu_ld" = yes; then |
dnl Default is enabled NLS |
941 |
# If archive_cmds runs LD, not CC, wlarc should be empty |
AC_ARG_ENABLE(nls, |
942 |
wlarc='${wl}' |
[ --disable-nls do not use Native Language Support], |
943 |
|
USE_NLS=$enableval, USE_NLS=yes) |
944 |
# See if GNU ld supports shared libraries. |
AC_MSG_RESULT($USE_NLS) |
945 |
case $host_os in |
AC_SUBST(USE_NLS) |
|
aix3* | aix4* | aix5*) |
|
|
# On AIX, the GNU linker is very broken |
|
|
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. |
|
|
ld_shlibs=no |
|
|
cat <<EOF 1>&2 |
|
|
|
|
|
*** Warning: the GNU linker, at least up to release 2.9.1, is reported |
|
|
*** to be unable to reliably create shared libraries on AIX. |
|
|
*** Therefore, libtool is disabling shared libraries support. If you |
|
|
*** really care for shared libraries, you may want to modify your PATH |
|
|
*** so that a non-GNU linker is found, and then restart. |
|
946 |
|
|
947 |
EOF |
ifelse(gt_included_intl, yes, [ |
948 |
;; |
BUILD_INCLUDED_LIBINTL=no |
949 |
|
USE_INCLUDED_LIBINTL=no |
950 |
|
]) |
951 |
|
LIBINTL= |
952 |
|
LTLIBINTL= |
953 |
|
POSUB= |
954 |
|
|
955 |
|
dnl If we use NLS figure out what method |
956 |
|
if test "$USE_NLS" = "yes"; then |
957 |
|
gt_use_preinstalled_gnugettext=no |
958 |
|
ifelse(gt_included_intl, yes, [ |
959 |
|
AC_MSG_CHECKING([whether included gettext is requested]) |
960 |
|
AC_ARG_WITH(included-gettext, |
961 |
|
[ --with-included-gettext use the GNU gettext library included here], |
962 |
|
nls_cv_force_use_gnu_gettext=$withval, |
963 |
|
nls_cv_force_use_gnu_gettext=no) |
964 |
|
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) |
965 |
|
|
966 |
amigaos*) |
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" |
967 |
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then |
968 |
hardcode_libdir_flag_spec='-L$libdir' |
]) |
969 |
hardcode_minus_L=yes |
dnl User does not insist on using GNU NLS library. Figure out what |
970 |
|
dnl to use. If GNU gettext is available we use this. Else we have |
971 |
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
dnl to fall back to GNU NLS library. |
|
# that the semantics of dynamic libraries on AmigaOS, at least up |
|
|
# to version 4, is to share data among multiple programs linked |
|
|
# with the same dynamic library. Since this doesn't match the |
|
|
# behavior of shared libraries on other platforms, we can use |
|
|
# them. |
|
|
ld_shlibs=no |
|
|
;; |
|
972 |
|
|
973 |
beos*) |
dnl Add a version number to the cache macros. |
974 |
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) |
975 |
allow_undefined_flag=unsupported |
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) |
976 |
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) |
977 |
# support --undefined. This deserves some investigation. FIXME |
|
978 |
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, |
979 |
else |
[AC_TRY_LINK([#include <libintl.h> |
980 |
ld_shlibs=no |
]ifelse([$2], [need-formatstring-macros], |
981 |
fi |
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION |
982 |
;; |
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) |
983 |
|
#endif |
984 |
|
changequote(,)dnl |
985 |
|
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; |
986 |
|
changequote([,])dnl |
987 |
|
], [])[extern int _nl_msg_cat_cntr; |
988 |
|
extern int *_nl_domain_bindings;], |
989 |
|
[bindtextdomain ("", ""); |
990 |
|
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], |
991 |
|
gt_cv_func_gnugettext_libc=yes, |
992 |
|
gt_cv_func_gnugettext_libc=no)]) |
993 |
|
|
994 |
|
if test "$gt_cv_func_gnugettext_libc" != "yes"; then |
995 |
|
dnl Sometimes libintl requires libiconv, so first search for libiconv. |
996 |
|
ifelse(gt_included_intl, yes, , [ |
997 |
|
AM_ICONV_LINK |
998 |
|
]) |
999 |
|
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL |
1000 |
|
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) |
1001 |
|
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL |
1002 |
|
dnl even if libiconv doesn't exist. |
1003 |
|
AC_LIB_LINKFLAGS_BODY([intl]) |
1004 |
|
AC_CACHE_CHECK([for GNU gettext in libintl], |
1005 |
|
gt_cv_func_gnugettext_libintl, |
1006 |
|
[gt_save_CPPFLAGS="$CPPFLAGS" |
1007 |
|
CPPFLAGS="$CPPFLAGS $INCINTL" |
1008 |
|
gt_save_LIBS="$LIBS" |
1009 |
|
LIBS="$LIBS $LIBINTL" |
1010 |
|
dnl Now see whether libintl exists and does not depend on libiconv. |
1011 |
|
AC_TRY_LINK([#include <libintl.h> |
1012 |
|
]ifelse([$2], [need-formatstring-macros], |
1013 |
|
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION |
1014 |
|
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) |
1015 |
|
#endif |
1016 |
|
changequote(,)dnl |
1017 |
|
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; |
1018 |
|
changequote([,])dnl |
1019 |
|
], [])[extern int _nl_msg_cat_cntr; |
1020 |
|
extern |
1021 |
|
#ifdef __cplusplus |
1022 |
|
"C" |
1023 |
|
#endif |
1024 |
|
const char *_nl_expand_alias ();], |
1025 |
|
[bindtextdomain ("", ""); |
1026 |
|
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], |
1027 |
|
gt_cv_func_gnugettext_libintl=yes, |
1028 |
|
gt_cv_func_gnugettext_libintl=no) |
1029 |
|
dnl Now see whether libintl exists and depends on libiconv. |
1030 |
|
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then |
1031 |
|
LIBS="$LIBS $LIBICONV" |
1032 |
|
AC_TRY_LINK([#include <libintl.h> |
1033 |
|
]ifelse([$2], [need-formatstring-macros], |
1034 |
|
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION |
1035 |
|
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) |
1036 |
|
#endif |
1037 |
|
changequote(,)dnl |
1038 |
|
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; |
1039 |
|
changequote([,])dnl |
1040 |
|
], [])[extern int _nl_msg_cat_cntr; |
1041 |
|
extern |
1042 |
|
#ifdef __cplusplus |
1043 |
|
"C" |
1044 |
|
#endif |
1045 |
|
const char *_nl_expand_alias ();], |
1046 |
|
[bindtextdomain ("", ""); |
1047 |
|
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], |
1048 |
|
[LIBINTL="$LIBINTL $LIBICONV" |
1049 |
|
LTLIBINTL="$LTLIBINTL $LTLIBICONV" |
1050 |
|
gt_cv_func_gnugettext_libintl=yes |
1051 |
|
]) |
1052 |
|
fi |
1053 |
|
CPPFLAGS="$gt_save_CPPFLAGS" |
1054 |
|
LIBS="$gt_save_LIBS"]) |
1055 |
|
fi |
1056 |
|
|
1057 |
cygwin* | mingw* | pw32*) |
dnl If an already present or preinstalled GNU gettext() is found, |
1058 |
# hardcode_libdir_flag_spec is actually meaningless, as there is |
dnl use it. But if this macro is used in GNU gettext, and GNU |
1059 |
# no search path for DLLs. |
dnl gettext is already preinstalled in libintl, we update this |
1060 |
hardcode_libdir_flag_spec='-L$libdir' |
dnl libintl. (Cf. the install rule in intl/Makefile.in.) |
1061 |
allow_undefined_flag=unsupported |
if test "$gt_cv_func_gnugettext_libc" = "yes" \ |
1062 |
always_export_symbols=yes |
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \ |
1063 |
|
&& test "$PACKAGE" != gettext; }; then |
1064 |
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ |
gt_use_preinstalled_gnugettext=yes |
1065 |
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ |
else |
1066 |
test -f $output_objdir/impgen.exe || (cd $output_objdir && \ |
dnl Reset the values set by searching for libintl. |
1067 |
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ |
LIBINTL= |
1068 |
else $CC -o impgen impgen.c ; fi)~ |
LTLIBINTL= |
1069 |
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' |
INCINTL= |
1070 |
|
fi |
|
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' |
|
|
|
|
|
# cygwin and mingw dlls have different entry points and sets of symbols |
|
|
# to exclude. |
|
|
# FIXME: what about values for MSVC? |
|
|
dll_entry=__cygwin_dll_entry@12 |
|
|
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ |
|
|
case $host_os in |
|
|
mingw*) |
|
|
# mingw values |
|
|
dll_entry=_DllMainCRTStartup@12 |
|
|
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ |
|
|
;; |
|
|
esac |
|
1071 |
|
|
1072 |
# mingw and cygwin differ, and it's simplest to just exclude the union |
ifelse(gt_included_intl, yes, [ |
1073 |
# of the two symbol sets. |
if test "$gt_use_preinstalled_gnugettext" != "yes"; then |
1074 |
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 |
dnl GNU gettext is not found in the C library. |
1075 |
|
dnl Fall back on included GNU gettext library. |
1076 |
# recent cygwin and mingw systems supply a stub DllMain which the user |
nls_cv_use_gnu_gettext=yes |
1077 |
# can override, but on older systems we have to supply one (in ltdll.c) |
fi |
|
if test "x$lt_cv_need_dllmain" = "xyes"; then |
|
|
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " |
|
|
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ |
|
|
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' |
|
|
else |
|
|
ltdll_obj= |
|
|
ltdll_cmds= |
|
1078 |
fi |
fi |
1079 |
|
|
1080 |
# Extract the symbol export list from an `--export-all' def file, |
if test "$nls_cv_use_gnu_gettext" = "yes"; then |
1081 |
# then regenerate the def file from the symbol export list, so that |
dnl Mark actions used to generate GNU NLS library. |
1082 |
# the compiled dll only exports the symbol export list. |
INTLOBJS="\$(GETTOBJS)" |
1083 |
# Be careful not to strip the DATA tag left be newer dlltools. |
BUILD_INCLUDED_LIBINTL=yes |
1084 |
export_symbols_cmds="$ltdll_cmds"' |
USE_INCLUDED_LIBINTL=yes |
1085 |
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ |
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" |
1086 |
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' |
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" |
1087 |
|
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
1088 |
# If the export-symbols file already is a .def file (1st line |
fi |
|
# is EXPORTS), use it as is. |
|
|
# If DATA tags from a recent dlltool are present, honour them! |
|
|
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then |
|
|
cp $export_symbols $output_objdir/$soname-def; |
|
|
else |
|
|
echo EXPORTS > $output_objdir/$soname-def; |
|
|
_lt_hint=1; |
|
|
cat $export_symbols | while read symbol; do |
|
|
set dummy \$symbol; |
|
|
case \[$]# in |
|
|
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; |
|
|
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; |
|
|
esac; |
|
|
_lt_hint=`expr 1 + \$_lt_hint`; |
|
|
done; |
|
|
fi~ |
|
|
'"$ltdll_cmds"' |
|
|
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
|
|
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ |
|
|
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
|
|
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ |
|
|
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' |
|
|
;; |
|
|
|
|
|
netbsd*) |
|
|
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
|
|
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
|
|
wlarc= |
|
|
else |
|
|
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
|
|
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
|
|
fi |
|
|
;; |
|
|
|
|
|
solaris* | sysv5*) |
|
|
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
|
|
ld_shlibs=no |
|
|
cat <<EOF 1>&2 |
|
|
|
|
|
*** Warning: The releases 2.8.* of the GNU linker cannot reliably |
|
|
*** create shared libraries on Solaris systems. Therefore, libtool |
|
|
*** is disabling shared libraries support. We urge you to upgrade GNU |
|
|
*** binutils to release 2.9.1 or newer. Another option is to modify |
|
|
*** your PATH or compiler configuration so that the native linker is |
|
|
*** used, and then restart. |
|
|
|
|
|
EOF |
|
|
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
|
|
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
|
|
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
|
|
else |
|
|
ld_shlibs=no |
|
|
fi |
|
|
;; |
|
|
|
|
|
sunos4*) |
|
|
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
|
|
wlarc= |
|
|
hardcode_direct=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
*) |
|
|
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
|
|
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
|
|
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
|
|
else |
|
|
ld_shlibs=no |
|
|
fi |
|
|
;; |
|
|
esac |
|
1089 |
|
|
1090 |
if test "$ld_shlibs" = yes; then |
if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
1091 |
runpath_var=LD_RUN_PATH |
|| test "$nls_cv_use_gnu_gettext" = "yes"; then |
1092 |
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' |
dnl Mark actions to use GNU gettext tools. |
1093 |
export_dynamic_flag_spec='${wl}--export-dynamic' |
CATOBJEXT=.gmo |
|
case $host_os in |
|
|
cygwin* | mingw* | pw32*) |
|
|
# dlltool doesn't understand --whole-archive et. al. |
|
|
whole_archive_flag_spec= |
|
|
;; |
|
|
*) |
|
|
# ancient GNU ld didn't support --whole-archive et. al. |
|
|
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
|
|
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
|
|
else |
|
|
whole_archive_flag_spec= |
|
1094 |
fi |
fi |
1095 |
;; |
]) |
|
esac |
|
|
fi |
|
|
else |
|
|
# PORTME fill in a description of your system's linker (not GNU ld) |
|
|
case $host_os in |
|
|
aix3*) |
|
|
allow_undefined_flag=unsupported |
|
|
always_export_symbols=yes |
|
|
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' |
|
|
# Note: this linker hardcodes the directories in LIBPATH if there |
|
|
# are no directories specified by -L. |
|
|
hardcode_minus_L=yes |
|
|
if test "$GCC" = yes && test -z "$link_static_flag"; then |
|
|
# Neither direct hardcoding nor static linking is supported with a |
|
|
# broken collect2. |
|
|
hardcode_direct=unsupported |
|
|
fi |
|
|
;; |
|
1096 |
|
|
1097 |
aix4* | aix5*) |
if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
1098 |
if test "$host_cpu" = ia64; then |
|| test "$nls_cv_use_gnu_gettext" = "yes"; then |
1099 |
# On IA64, the linker does run time linking by default, so we don't |
AC_DEFINE(ENABLE_NLS, 1, |
1100 |
# have to do anything special. |
[Define to 1 if translation of program messages to the user's native language |
1101 |
aix_use_runtimelinking=no |
is requested.]) |
|
exp_sym_flag='-Bexport' |
|
|
no_entry_flag="" |
|
1102 |
else |
else |
1103 |
aix_use_runtimelinking=no |
USE_NLS=no |
|
|
|
|
# Test if we are trying to use run time linking or normal |
|
|
# AIX style linking. If -brtl is somewhere in LDFLAGS, we |
|
|
# need to do runtime linking. |
|
|
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
|
|
for ld_flag in $LDFLAGS; do |
|
|
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
|
|
aix_use_runtimelinking=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
esac |
|
|
|
|
|
exp_sym_flag='-bexport' |
|
|
no_entry_flag='-bnoentry' |
|
1104 |
fi |
fi |
1105 |
|
fi |
1106 |
|
|
1107 |
# When large executables or shared objects are built, AIX ld can |
if test "$USE_NLS" = "yes"; then |
|
# have problems creating the table of contents. If linking a library |
|
|
# or program results in "error TOC overflow" add -mminimal-toc to |
|
|
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
|
|
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
|
|
|
|
|
hardcode_direct=yes |
|
|
archive_cmds='' |
|
|
hardcode_libdir_separator=':' |
|
|
if test "$GCC" = yes; then |
|
|
case $host_os in aix4.[[012]]|aix4.[[012]].*) |
|
|
collect2name=`${CC} -print-prog-name=collect2` |
|
|
if test -f "$collect2name" && \ |
|
|
strings "$collect2name" | grep resolve_lib_name >/dev/null |
|
|
then |
|
|
# We have reworked collect2 |
|
|
hardcode_direct=yes |
|
|
else |
|
|
# We have old collect2 |
|
|
hardcode_direct=unsupported |
|
|
# It fails to find uninstalled libraries when the uninstalled |
|
|
# path is not listed in the libpath. Setting hardcode_minus_L |
|
|
# to unsupported forces relinking |
|
|
hardcode_minus_L=yes |
|
|
hardcode_libdir_flag_spec='-L$libdir' |
|
|
hardcode_libdir_separator= |
|
|
fi |
|
|
esac |
|
1108 |
|
|
1109 |
shared_flag='-shared' |
if test "$gt_use_preinstalled_gnugettext" = "yes"; then |
1110 |
else |
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then |
1111 |
# not using gcc |
AC_MSG_CHECKING([how to link with libintl]) |
1112 |
if test "$host_cpu" = ia64; then |
AC_MSG_RESULT([$LIBINTL]) |
1113 |
shared_flag='${wl}-G' |
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) |
|
else |
|
|
if test "$aix_use_runtimelinking" = yes; then |
|
|
shared_flag='${wl}-G' |
|
|
else |
|
|
shared_flag='${wl}-bM:SRE' |
|
|
fi |
|
1114 |
fi |
fi |
|
fi |
|
1115 |
|
|
1116 |
# It seems that -bexpall can do strange things, so it is better to |
dnl For backward compatibility. Some packages may be using this. |
1117 |
# generate a list of symbols to export. |
AC_DEFINE(HAVE_GETTEXT, 1, |
1118 |
always_export_symbols=yes |
[Define if the GNU gettext() function is already present or preinstalled.]) |
1119 |
if test "$aix_use_runtimelinking" = yes; then |
AC_DEFINE(HAVE_DCGETTEXT, 1, |
1120 |
# Warning - without using the other runtime loading flags (-brtl), |
[Define if the GNU dcgettext() function is already present or preinstalled.]) |
1121 |
# -berok will link without error, but may produce a broken library. |
fi |
1122 |
allow_undefined_flag='-berok' |
|
1123 |
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' |
dnl We need to process the po/ directory. |
1124 |
archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
POSUB=po |
1125 |
else |
fi |
1126 |
if test "$host_cpu" = ia64; then |
|
1127 |
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
ifelse(gt_included_intl, yes, [ |
1128 |
allow_undefined_flag="-z nodefs" |
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL |
1129 |
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
dnl to 'yes' because some of the testsuite requires it. |
1130 |
else |
if test "$PACKAGE" = gettext; then |
1131 |
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' |
BUILD_INCLUDED_LIBINTL=yes |
|
# Warning - without using the other run time loading flags, |
|
|
# -berok will link without error, but may produce a broken library. |
|
|
allow_undefined_flag='${wl}-berok' |
|
|
# This is a bit strange, but is similar to how AIX traditionally builds |
|
|
# it's shared libraries. |
|
|
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' |
|
|
fi |
|
1132 |
fi |
fi |
|
;; |
|
|
|
|
|
amigaos*) |
|
|
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
|
|
hardcode_libdir_flag_spec='-L$libdir' |
|
|
hardcode_minus_L=yes |
|
|
# see comment about different semantics on the GNU ld section |
|
|
ld_shlibs=no |
|
|
;; |
|
|
|
|
|
cygwin* | mingw* | pw32*) |
|
|
# When not using gcc, we currently assume that we are using |
|
|
# Microsoft Visual C++. |
|
|
# hardcode_libdir_flag_spec is actually meaningless, as there is |
|
|
# no search path for DLLs. |
|
|
hardcode_libdir_flag_spec=' ' |
|
|
allow_undefined_flag=unsupported |
|
|
# Tell ltmain to make .lib files, not .a files. |
|
|
libext=lib |
|
|
# FIXME: Setting linknames here is a bad hack. |
|
|
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
|
|
# The linker will automatically build a .lib file if we build a DLL. |
|
|
old_archive_from_new_cmds='true' |
|
|
# FIXME: Should let the user specify the lib program. |
|
|
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' |
|
|
fix_srcfile_path='`cygpath -w "$srcfile"`' |
|
|
;; |
|
|
|
|
|
darwin* | rhapsody*) |
|
|
case "$host_os" in |
|
|
rhapsody* | darwin1.[[012]]) |
|
|
allow_undefined_flag='-undefined suppress' |
|
|
;; |
|
|
*) # Darwin 1.3 on |
|
|
allow_undefined_flag='-flat_namespace -undefined suppress' |
|
|
;; |
|
|
esac |
|
|
# FIXME: Relying on posixy $() will cause problems for |
|
|
# cross-compilation, but unfortunately the echo tests do not |
|
|
# yet detect zsh echo's removal of \ escapes. |
|
|
archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' |
|
|
# We need to add '_' to the symbols in $export_symbols first |
|
|
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' |
|
|
hardcode_direct=yes |
|
|
hardcode_shlibpath_var=no |
|
|
whole_archive_flag_spec='-all_load $convenience' |
|
|
;; |
|
1133 |
|
|
1134 |
freebsd1*) |
dnl Make all variables we use known to autoconf. |
1135 |
ld_shlibs=no |
AC_SUBST(BUILD_INCLUDED_LIBINTL) |
1136 |
;; |
AC_SUBST(USE_INCLUDED_LIBINTL) |
1137 |
|
AC_SUBST(CATOBJEXT) |
1138 |
|
AC_SUBST(INTLOBJS) |
1139 |
|
|
1140 |
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
dnl For backward compatibility. Some configure.ins may be using this. |
1141 |
# support. Future versions do this automatically, but an explicit c++rt0.o |
nls_cv_header_intl= |
1142 |
# does not break anything, and helps significantly (at the cost of a little |
nls_cv_header_libgt= |
|
# extra space). |
|
|
freebsd2.2*) |
|
|
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
|
|
hardcode_libdir_flag_spec='-R$libdir' |
|
|
hardcode_direct=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
1143 |
|
|
1144 |
# Unfortunately, older versions of FreeBSD 2 do not have this feature. |
dnl For backward compatibility. Some Makefiles may be using this. |
1145 |
freebsd2*) |
DATADIRNAME=share |
1146 |
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
AC_SUBST(DATADIRNAME) |
|
hardcode_direct=yes |
|
|
hardcode_minus_L=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
1147 |
|
|
1148 |
# FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
dnl For backward compatibility. Some Makefiles may be using this. |
1149 |
freebsd*) |
INSTOBJEXT=.mo |
1150 |
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
AC_SUBST(INSTOBJEXT) |
|
hardcode_libdir_flag_spec='-R$libdir' |
|
|
hardcode_direct=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
1151 |
|
|
1152 |
hpux9* | hpux10* | hpux11*) |
dnl For backward compatibility. Some Makefiles may be using this. |
1153 |
case $host_os in |
GENCAT=gencat |
1154 |
hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; |
AC_SUBST(GENCAT) |
1155 |
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; |
|
1156 |
esac |
dnl Enable libtool support if the surrounding package wishes it. |
1157 |
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix |
1158 |
hardcode_libdir_separator=: |
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) |
1159 |
hardcode_direct=yes |
]) |
|
hardcode_minus_L=yes # Not in the search PATH, but as the default |
|
|
# location of the library. |
|
|
export_dynamic_flag_spec='${wl}-E' |
|
|
;; |
|
1160 |
|
|
1161 |
irix5* | irix6*) |
dnl For backward compatibility. Some Makefiles may be using this. |
1162 |
if test "$GCC" = yes; then |
INTLLIBS="$LIBINTL" |
1163 |
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
AC_SUBST(INTLLIBS) |
|
else |
|
|
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
|
|
fi |
|
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|
|
hardcode_libdir_separator=: |
|
|
link_all_deplibs=yes |
|
|
;; |
|
1164 |
|
|
1165 |
netbsd*) |
dnl Make all documented variables known to autoconf. |
1166 |
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
AC_SUBST(LIBINTL) |
1167 |
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
AC_SUBST(LTLIBINTL) |
1168 |
else |
AC_SUBST(POSUB) |
1169 |
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
]) |
|
fi |
|
|
hardcode_libdir_flag_spec='-R$libdir' |
|
|
hardcode_direct=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
1170 |
|
|
|
newsos6) |
|
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_direct=yes |
|
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|
|
hardcode_libdir_separator=: |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
1171 |
|
|
1172 |
openbsd*) |
dnl Checks for all prerequisites of the po subdirectory, |
1173 |
hardcode_direct=yes |
dnl except for USE_NLS. |
1174 |
hardcode_shlibpath_var=no |
AC_DEFUN([AM_PO_SUBDIRS], |
1175 |
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
[ |
1176 |
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
1177 |
hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
AC_REQUIRE([AC_PROG_INSTALL])dnl |
1178 |
export_dynamic_flag_spec='${wl}-E' |
AC_REQUIRE([AM_MKINSTALLDIRS])dnl |
1179 |
else |
|
1180 |
case "$host_os" in |
dnl Perform the following tests also if --disable-nls has been given, |
1181 |
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) |
dnl because they are needed for "make dist" to work. |
1182 |
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
|
1183 |
hardcode_libdir_flag_spec='-R$libdir' |
dnl Search for GNU msgfmt in the PATH. |
1184 |
;; |
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. |
1185 |
*) |
dnl The second test excludes FreeBSD msgfmt. |
1186 |
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
1187 |
hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && |
1188 |
|
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], |
1189 |
|
:) |
1190 |
|
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
1191 |
|
|
1192 |
|
dnl Search for GNU xgettext 0.11 or newer in the PATH. |
1193 |
|
dnl The first test excludes Solaris xgettext and early GNU xgettext versions. |
1194 |
|
dnl The second test excludes FreeBSD xgettext. |
1195 |
|
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
1196 |
|
[$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && |
1197 |
|
(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)], |
1198 |
|
:) |
1199 |
|
dnl Remove leftover from FreeBSD xgettext call. |
1200 |
|
rm -f messages.po |
1201 |
|
|
1202 |
|
dnl Search for GNU msgmerge 0.11 or newer in the PATH. |
1203 |
|
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, |
1204 |
|
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) |
1205 |
|
|
1206 |
|
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. |
1207 |
|
dnl Test whether we really found GNU msgfmt. |
1208 |
|
if test "$GMSGFMT" != ":"; then |
1209 |
|
dnl If it is no GNU msgfmt we define it as : so that the |
1210 |
|
dnl Makefiles still can work. |
1211 |
|
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && |
1212 |
|
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then |
1213 |
|
: ; |
1214 |
|
else |
1215 |
|
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` |
1216 |
|
AC_MSG_RESULT( |
1217 |
|
[found $GMSGFMT program is not GNU msgfmt; ignore it]) |
1218 |
|
GMSGFMT=":" |
1219 |
|
fi |
1220 |
|
fi |
1221 |
|
|
1222 |
|
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. |
1223 |
|
dnl Test whether we really found GNU xgettext. |
1224 |
|
if test "$XGETTEXT" != ":"; then |
1225 |
|
dnl If it is no GNU xgettext we define it as : so that the |
1226 |
|
dnl Makefiles still can work. |
1227 |
|
if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && |
1228 |
|
(if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then |
1229 |
|
: ; |
1230 |
|
else |
1231 |
|
AC_MSG_RESULT( |
1232 |
|
[found xgettext program is not GNU xgettext; ignore it]) |
1233 |
|
XGETTEXT=":" |
1234 |
|
fi |
1235 |
|
dnl Remove leftover from FreeBSD xgettext call. |
1236 |
|
rm -f messages.po |
1237 |
|
fi |
1238 |
|
|
1239 |
|
AC_OUTPUT_COMMANDS([ |
1240 |
|
for ac_file in $CONFIG_FILES; do |
1241 |
|
# Support "outfile[:infile[:infile...]]" |
1242 |
|
case "$ac_file" in |
1243 |
|
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
1244 |
|
esac |
1245 |
|
# PO directories have a Makefile.in generated from Makefile.in.in. |
1246 |
|
case "$ac_file" in */Makefile.in) |
1247 |
|
# Adjust a relative srcdir. |
1248 |
|
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` |
1249 |
|
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" |
1250 |
|
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` |
1251 |
|
# In autoconf-2.13 it is called $ac_given_srcdir. |
1252 |
|
# In autoconf-2.50 it is called $srcdir. |
1253 |
|
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" |
1254 |
|
case "$ac_given_srcdir" in |
1255 |
|
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; |
1256 |
|
/*) top_srcdir="$ac_given_srcdir" ;; |
1257 |
|
*) top_srcdir="$ac_dots$ac_given_srcdir" ;; |
1258 |
|
esac |
1259 |
|
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then |
1260 |
|
rm -f "$ac_dir/POTFILES" |
1261 |
|
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" |
1262 |
|
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" |
1263 |
|
# ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend |
1264 |
|
# on $ac_dir but don't depend on user-specified configuration |
1265 |
|
# parameters. |
1266 |
|
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then |
1267 |
|
# The LINGUAS file contains the set of available languages. |
1268 |
|
if test -n "$ALL_LINGUAS"; then |
1269 |
|
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" |
1270 |
|
fi |
1271 |
|
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` |
1272 |
|
# Hide the ALL_LINGUAS assigment from automake. |
1273 |
|
eval 'ALL_LINGUAS''=$ALL_LINGUAS_' |
1274 |
|
fi |
1275 |
|
case "$ac_given_srcdir" in |
1276 |
|
.) srcdirpre= ;; |
1277 |
|
*) srcdirpre='$(srcdir)/' ;; |
1278 |
|
esac |
1279 |
|
POFILES= |
1280 |
|
GMOFILES= |
1281 |
|
UPDATEPOFILES= |
1282 |
|
DUMMYPOFILES= |
1283 |
|
for lang in $ALL_LINGUAS; do |
1284 |
|
POFILES="$POFILES $srcdirpre$lang.po" |
1285 |
|
GMOFILES="$GMOFILES $srcdirpre$lang.gmo" |
1286 |
|
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" |
1287 |
|
DUMMYPOFILES="$DUMMYPOFILES $lang.nop" |
1288 |
|
done |
1289 |
|
# CATALOGS depends on both $ac_dir and the user's LINGUAS |
1290 |
|
# environment variable. |
1291 |
|
INST_LINGUAS= |
1292 |
|
if test -n "$ALL_LINGUAS"; then |
1293 |
|
for presentlang in $ALL_LINGUAS; do |
1294 |
|
useit=no |
1295 |
|
if test "%UNSET%" != "$LINGUAS"; then |
1296 |
|
desiredlanguages="$LINGUAS" |
1297 |
|
else |
1298 |
|
desiredlanguages="$ALL_LINGUAS" |
1299 |
|
fi |
1300 |
|
for desiredlang in $desiredlanguages; do |
1301 |
|
# Use the presentlang catalog if desiredlang is |
1302 |
|
# a. equal to presentlang, or |
1303 |
|
# b. a variant of presentlang (because in this case, |
1304 |
|
# presentlang can be used as a fallback for messages |
1305 |
|
# which are not translated in the desiredlang catalog). |
1306 |
|
case "$desiredlang" in |
1307 |
|
"$presentlang"*) useit=yes;; |
1308 |
|
esac |
1309 |
|
done |
1310 |
|
if test $useit = yes; then |
1311 |
|
INST_LINGUAS="$INST_LINGUAS $presentlang" |
1312 |
|
fi |
1313 |
|
done |
1314 |
|
fi |
1315 |
|
CATALOGS= |
1316 |
|
if test -n "$INST_LINGUAS"; then |
1317 |
|
for lang in $INST_LINGUAS; do |
1318 |
|
CATALOGS="$CATALOGS $lang.gmo" |
1319 |
|
done |
1320 |
|
fi |
1321 |
|
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" |
1322 |
|
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" |
1323 |
|
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do |
1324 |
|
if test -f "$f"; then |
1325 |
|
case "$f" in |
1326 |
|
*.orig | *.bak | *~) ;; |
1327 |
|
*) cat "$f" >> "$ac_dir/Makefile" ;; |
1328 |
|
esac |
1329 |
|
fi |
1330 |
|
done |
1331 |
|
fi |
1332 |
;; |
;; |
1333 |
esac |
esac |
1334 |
fi |
done], |
1335 |
;; |
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute |
1336 |
|
# POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it |
1337 |
os2*) |
# from automake. |
1338 |
hardcode_libdir_flag_spec='-L$libdir' |
eval 'ALL_LINGUAS''="$ALL_LINGUAS"' |
1339 |
hardcode_minus_L=yes |
# Capture the value of LINGUAS because we need it to compute CATALOGS. |
1340 |
allow_undefined_flag=unsupported |
LINGUAS="${LINGUAS-%UNSET%}" |
1341 |
archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' |
]) |
1342 |
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
]) |
|
;; |
|
|
|
|
|
osf3*) |
|
|
if test "$GCC" = yes; then |
|
|
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
|
|
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
|
|
else |
|
|
allow_undefined_flag=' -expect_unresolved \*' |
|
|
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
|
|
fi |
|
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|
|
hardcode_libdir_separator=: |
|
|
;; |
|
1343 |
|
|
|
osf4* | osf5*) # as osf3* with the addition of -msym flag |
|
|
if test "$GCC" = yes; then |
|
|
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
|
|
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
|
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|
|
else |
|
|
allow_undefined_flag=' -expect_unresolved \*' |
|
|
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
|
|
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
|
|
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' |
|
1344 |
|
|
1345 |
#Both c and cxx compiler support -rpath directly |
dnl Checks for all prerequisites of the intl subdirectory, |
1346 |
hardcode_libdir_flag_spec='-rpath $libdir' |
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, |
1347 |
fi |
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. |
1348 |
hardcode_libdir_separator=: |
AC_DEFUN([AM_INTL_SUBDIR], |
1349 |
;; |
[ |
1350 |
|
AC_REQUIRE([AC_PROG_INSTALL])dnl |
1351 |
|
AC_REQUIRE([AM_MKINSTALLDIRS])dnl |
1352 |
|
AC_REQUIRE([AC_PROG_CC])dnl |
1353 |
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
1354 |
|
AC_REQUIRE([AC_PROG_RANLIB])dnl |
1355 |
|
AC_REQUIRE([AC_ISC_POSIX])dnl |
1356 |
|
AC_REQUIRE([AC_HEADER_STDC])dnl |
1357 |
|
AC_REQUIRE([AC_C_CONST])dnl |
1358 |
|
AC_REQUIRE([AC_C_INLINE])dnl |
1359 |
|
AC_REQUIRE([AC_TYPE_OFF_T])dnl |
1360 |
|
AC_REQUIRE([AC_TYPE_SIZE_T])dnl |
1361 |
|
AC_REQUIRE([AC_FUNC_ALLOCA])dnl |
1362 |
|
AC_REQUIRE([AC_FUNC_MMAP])dnl |
1363 |
|
AC_REQUIRE([jm_GLIBC21])dnl |
1364 |
|
AC_REQUIRE([gt_INTDIV0])dnl |
1365 |
|
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl |
1366 |
|
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl |
1367 |
|
AC_REQUIRE([gt_INTTYPES_PRI])dnl |
1368 |
|
|
1369 |
|
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ |
1370 |
|
stdlib.h string.h unistd.h sys/param.h]) |
1371 |
|
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ |
1372 |
|
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ |
1373 |
|
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) |
1374 |
|
|
1375 |
|
AM_ICONV |
1376 |
|
AM_LANGINFO_CODESET |
1377 |
|
if test $ac_cv_header_locale_h = yes; then |
1378 |
|
AM_LC_MESSAGES |
1379 |
|
fi |
1380 |
|
|
1381 |
|
dnl intl/plural.c is generated from intl/plural.y. It requires bison, |
1382 |
|
dnl because plural.y uses bison specific features. It requires at least |
1383 |
|
dnl bison-1.26 because earlier versions generate a plural.c that doesn't |
1384 |
|
dnl compile. |
1385 |
|
dnl bison is only needed for the maintainer (who touches plural.y). But in |
1386 |
|
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put |
1387 |
|
dnl the rule in general Makefile. Now, some people carelessly touch the |
1388 |
|
dnl files or have a broken "make" program, hence the plural.c rule will |
1389 |
|
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not |
1390 |
|
dnl present or too old. |
1391 |
|
AC_CHECK_PROGS([INTLBISON], [bison]) |
1392 |
|
if test -z "$INTLBISON"; then |
1393 |
|
ac_verc_fail=yes |
1394 |
|
else |
1395 |
|
dnl Found it, now check the version. |
1396 |
|
AC_MSG_CHECKING([version of bison]) |
1397 |
|
changequote(<<,>>)dnl |
1398 |
|
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
1399 |
|
case $ac_prog_version in |
1400 |
|
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; |
1401 |
|
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) |
1402 |
|
changequote([,])dnl |
1403 |
|
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; |
1404 |
|
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; |
1405 |
|
esac |
1406 |
|
AC_MSG_RESULT([$ac_prog_version]) |
1407 |
|
fi |
1408 |
|
if test $ac_verc_fail = yes; then |
1409 |
|
INTLBISON=: |
1410 |
|
fi |
1411 |
|
]) |
1412 |
|
|
|
sco3.2v5*) |
|
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_shlibpath_var=no |
|
|
runpath_var=LD_RUN_PATH |
|
|
hardcode_runpath_var=yes |
|
|
export_dynamic_flag_spec='${wl}-Bexport' |
|
|
;; |
|
1413 |
|
|
1414 |
solaris*) |
AC_DEFUN([AM_MKINSTALLDIRS], |
1415 |
# gcc --version < 3.0 without binutils cannot create self contained |
[ |
1416 |
# shared libraries reliably, requiring libgcc.a to resolve some of |
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
1417 |
# the object symbols generated in some cases. Libraries that use |
dnl find the mkinstalldirs script in another subdir but $(top_srcdir). |
1418 |
# assert need libgcc.a to resolve __eprintf, for example. Linking |
dnl Try to locate is. |
1419 |
# a copy of libgcc.a into every shared library to guarantee resolving |
MKINSTALLDIRS= |
1420 |
# such symbols causes other problems: According to Tim Van Holder |
if test -n "$ac_aux_dir"; then |
1421 |
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate |
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
1422 |
# (to the application) exception stack for one thing. |
fi |
1423 |
no_undefined_flag=' -z defs' |
if test -z "$MKINSTALLDIRS"; then |
1424 |
if test "$GCC" = yes; then |
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
1425 |
case `$CC --version 2>/dev/null` in |
fi |
1426 |
[[12]].*) |
AC_SUBST(MKINSTALLDIRS) |
1427 |
cat <<EOF 1>&2 |
]) |
|
|
|
|
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably |
|
|
*** create self contained shared libraries on Solaris systems, without |
|
|
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling |
|
|
*** -no-undefined support, which will at least allow you to build shared |
|
|
*** libraries. However, you may find that when you link such libraries |
|
|
*** into an application without using GCC, you have to manually add |
|
|
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to |
|
|
*** upgrade to a newer version of GCC. Another option is to rebuild your |
|
|
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. |
|
|
|
|
|
EOF |
|
|
no_undefined_flag= |
|
|
;; |
|
|
esac |
|
|
fi |
|
|
# $CC -shared without GNU ld will not create a library from C++ |
|
|
# object files and a static libstdc++, better avoid it by now |
|
|
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
|
|
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
|
|
hardcode_libdir_flag_spec='-R$libdir' |
|
|
hardcode_shlibpath_var=no |
|
|
case $host_os in |
|
|
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
|
|
*) # Supported since Solaris 2.6 (maybe 2.5.1?) |
|
|
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; |
|
|
esac |
|
|
link_all_deplibs=yes |
|
|
;; |
|
1428 |
|
|
|
sunos4*) |
|
|
if test "x$host_vendor" = xsequent; then |
|
|
# Use $CC to link under sequent, because it throws in some extra .o |
|
|
# files that make .init and .fini sections work. |
|
|
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
|
|
else |
|
|
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
|
|
fi |
|
|
hardcode_libdir_flag_spec='-L$libdir' |
|
|
hardcode_direct=yes |
|
|
hardcode_minus_L=yes |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
1429 |
|
|
1430 |
sysv4) |
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) |
1431 |
if test "x$host_vendor" = xsno; then |
AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) |
1432 |
archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
1433 |
hardcode_direct=yes # is this really true??? |
# lib-prefix.m4 serial 1 (gettext-0.11) |
1434 |
|
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. |
1435 |
|
dnl This file is free software, distributed under the terms of the GNU |
1436 |
|
dnl General Public License. As a special exception to the GNU General |
1437 |
|
dnl Public License, this file may be distributed as part of a program |
1438 |
|
dnl that contains a configuration script generated by Autoconf, under |
1439 |
|
dnl the same distribution terms as the rest of that program. |
1440 |
|
|
1441 |
|
dnl From Bruno Haible. |
1442 |
|
|
1443 |
|
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed |
1444 |
|
dnl to access previously installed libraries. The basic assumption is that |
1445 |
|
dnl a user will want packages to use other packages he previously installed |
1446 |
|
dnl with the same --prefix option. |
1447 |
|
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate |
1448 |
|
dnl libraries, but is otherwise very convenient. |
1449 |
|
AC_DEFUN([AC_LIB_PREFIX], |
1450 |
|
[ |
1451 |
|
AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) |
1452 |
|
AC_REQUIRE([AC_PROG_CC]) |
1453 |
|
AC_REQUIRE([AC_CANONICAL_HOST]) |
1454 |
|
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
1455 |
|
dnl By default, look in $includedir and $libdir. |
1456 |
|
use_additional=yes |
1457 |
|
AC_LIB_WITH_FINAL_PREFIX([ |
1458 |
|
eval additional_includedir=\"$includedir\" |
1459 |
|
eval additional_libdir=\"$libdir\" |
1460 |
|
]) |
1461 |
|
AC_ARG_WITH([lib-prefix], |
1462 |
|
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib |
1463 |
|
--without-lib-prefix don't search for libraries in includedir and libdir], |
1464 |
|
[ |
1465 |
|
if test "X$withval" = "Xno"; then |
1466 |
|
use_additional=no |
1467 |
else |
else |
1468 |
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
if test "X$withval" = "X"; then |
1469 |
hardcode_direct=no #Motorola manual says yes, but my tests say they lie |
AC_LIB_WITH_FINAL_PREFIX([ |
1470 |
|
eval additional_includedir=\"$includedir\" |
1471 |
|
eval additional_libdir=\"$libdir\" |
1472 |
|
]) |
1473 |
|
else |
1474 |
|
additional_includedir="$withval/include" |
1475 |
|
additional_libdir="$withval/lib" |
1476 |
|
fi |
1477 |
fi |
fi |
1478 |
runpath_var='LD_RUN_PATH' |
]) |
1479 |
hardcode_shlibpath_var=no |
if test $use_additional = yes; then |
1480 |
;; |
dnl Potentially add $additional_includedir to $CPPFLAGS. |
1481 |
|
dnl But don't add it |
1482 |
sysv4.3*) |
dnl 1. if it's the standard /usr/include, |
1483 |
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
dnl 2. if it's already present in $CPPFLAGS, |
1484 |
hardcode_shlibpath_var=no |
dnl 3. if it's /usr/local/include and we are using GCC on Linux, |
1485 |
export_dynamic_flag_spec='-Bexport' |
dnl 4. if it doesn't exist as a directory. |
1486 |
;; |
if test "X$additional_includedir" != "X/usr/include"; then |
1487 |
|
haveit= |
1488 |
sysv5*) |
for x in $CPPFLAGS; do |
1489 |
no_undefined_flag=' -z text' |
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
1490 |
# $CC -shared without GNU ld will not create a library from C++ |
if test "X$x" = "X-I$additional_includedir"; then |
1491 |
# object files and a static libstdc++, better avoid it by now |
haveit=yes |
1492 |
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
break |
1493 |
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
fi |
1494 |
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
done |
1495 |
hardcode_libdir_flag_spec= |
if test -z "$haveit"; then |
1496 |
hardcode_shlibpath_var=no |
if test "X$additional_includedir" = "X/usr/local/include"; then |
1497 |
runpath_var='LD_RUN_PATH' |
if test -n "$GCC"; then |
1498 |
;; |
case $host_os in |
1499 |
|
linux*) haveit=yes;; |
1500 |
uts4*) |
esac |
1501 |
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
fi |
1502 |
hardcode_libdir_flag_spec='-L$libdir' |
fi |
1503 |
hardcode_shlibpath_var=no |
if test -z "$haveit"; then |
1504 |
;; |
if test -d "$additional_includedir"; then |
1505 |
|
dnl Really add $additional_includedir to $CPPFLAGS. |
1506 |
dgux*) |
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" |
1507 |
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
fi |
1508 |
hardcode_libdir_flag_spec='-L$libdir' |
fi |
1509 |
hardcode_shlibpath_var=no |
fi |
|
;; |
|
|
|
|
|
sysv4*MP*) |
|
|
if test -d /usr/nec; then |
|
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
|
|
hardcode_shlibpath_var=no |
|
|
runpath_var=LD_RUN_PATH |
|
|
hardcode_runpath_var=yes |
|
|
ld_shlibs=yes |
|
1510 |
fi |
fi |
1511 |
;; |
dnl Potentially add $additional_libdir to $LDFLAGS. |
1512 |
|
dnl But don't add it |
1513 |
sysv4.2uw2*) |
dnl 1. if it's the standard /usr/lib, |
1514 |
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
dnl 2. if it's already present in $LDFLAGS, |
1515 |
hardcode_direct=yes |
dnl 3. if it's /usr/local/lib and we are using GCC on Linux, |
1516 |
hardcode_minus_L=no |
dnl 4. if it doesn't exist as a directory. |
1517 |
hardcode_shlibpath_var=no |
if test "X$additional_libdir" != "X/usr/lib"; then |
1518 |
hardcode_runpath_var=yes |
haveit= |
1519 |
runpath_var=LD_RUN_PATH |
for x in $LDFLAGS; do |
1520 |
;; |
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
1521 |
|
if test "X$x" = "X-L$additional_libdir"; then |
1522 |
sysv5uw7* | unixware7*) |
haveit=yes |
1523 |
no_undefined_flag='${wl}-z ${wl}text' |
break |
1524 |
if test "$GCC" = yes; then |
fi |
1525 |
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
done |
1526 |
else |
if test -z "$haveit"; then |
1527 |
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
if test "X$additional_libdir" = "X/usr/local/lib"; then |
1528 |
|
if test -n "$GCC"; then |
1529 |
|
case $host_os in |
1530 |
|
linux*) haveit=yes;; |
1531 |
|
esac |
1532 |
|
fi |
1533 |
|
fi |
1534 |
|
if test -z "$haveit"; then |
1535 |
|
if test -d "$additional_libdir"; then |
1536 |
|
dnl Really add $additional_libdir to $LDFLAGS. |
1537 |
|
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" |
1538 |
|
fi |
1539 |
|
fi |
1540 |
|
fi |
1541 |
fi |
fi |
|
runpath_var='LD_RUN_PATH' |
|
|
hardcode_shlibpath_var=no |
|
|
;; |
|
|
|
|
|
*) |
|
|
ld_shlibs=no |
|
|
;; |
|
|
esac |
|
|
fi |
|
|
AC_MSG_RESULT([$ld_shlibs]) |
|
|
test "$ld_shlibs" = no && can_build_shared=no |
|
|
|
|
|
# Check hardcoding attributes. |
|
|
AC_MSG_CHECKING([how to hardcode library paths into programs]) |
|
|
hardcode_action= |
|
|
if test -n "$hardcode_libdir_flag_spec" || \ |
|
|
test -n "$runpath_var"; then |
|
|
|
|
|
# We can hardcode non-existant directories. |
|
|
if test "$hardcode_direct" != no && |
|
|
# If the only mechanism to avoid hardcoding is shlibpath_var, we |
|
|
# have to relink, otherwise we might link with an installed library |
|
|
# when we should be linking with a yet-to-be-installed one |
|
|
## test "$hardcode_shlibpath_var" != no && |
|
|
test "$hardcode_minus_L" != no; then |
|
|
# Linking always hardcodes the temporary library directory. |
|
|
hardcode_action=relink |
|
|
else |
|
|
# We can link without hardcoding, and we can hardcode nonexisting dirs. |
|
|
hardcode_action=immediate |
|
1542 |
fi |
fi |
1543 |
else |
]) |
|
# We cannot hardcode anything, or else we can only hardcode existing |
|
|
# directories. |
|
|
hardcode_action=unsupported |
|
|
fi |
|
|
AC_MSG_RESULT([$hardcode_action]) |
|
|
|
|
|
striplib= |
|
|
old_striplib= |
|
|
AC_MSG_CHECKING([whether stripping libraries is possible]) |
|
|
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then |
|
|
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" |
|
|
test -z "$striplib" && striplib="$STRIP --strip-unneeded" |
|
|
AC_MSG_RESULT([yes]) |
|
|
else |
|
|
AC_MSG_RESULT([no]) |
|
|
fi |
|
|
|
|
|
reload_cmds='$LD$reload_flag -o $output$reload_objs' |
|
|
test -z "$deplibs_check_method" && deplibs_check_method=unknown |
|
|
|
|
|
# PORTME Fill in your ld.so characteristics |
|
|
AC_MSG_CHECKING([dynamic linker characteristics]) |
|
|
library_names_spec= |
|
|
libname_spec='lib$name' |
|
|
soname_spec= |
|
|
postinstall_cmds= |
|
|
postuninstall_cmds= |
|
|
finish_cmds= |
|
|
finish_eval= |
|
|
shlibpath_var= |
|
|
shlibpath_overrides_runpath=unknown |
|
|
version_type=none |
|
|
dynamic_linker="$host_os ld.so" |
|
|
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib" |
|
|
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib /usr/X11R6/lib" |
|
|
|
|
|
case $host_os in |
|
|
aix3*) |
|
|
version_type=linux |
|
|
library_names_spec='${libname}${release}.so$versuffix $libname.a' |
|
|
shlibpath_var=LIBPATH |
|
|
|
|
|
# AIX has no versioning support, so we append a major version to the name. |
|
|
soname_spec='${libname}${release}.so$major' |
|
|
;; |
|
1544 |
|
|
1545 |
aix4* | aix5*) |
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, |
1546 |
version_type=linux |
dnl acl_final_exec_prefix, containing the values to which $prefix and |
1547 |
if test "$host_cpu" = ia64; then |
dnl $exec_prefix will expand at the end of the configure script. |
1548 |
# AIX 5 supports IA64 |
AC_DEFUN([AC_LIB_PREPARE_PREFIX], |
1549 |
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' |
[ |
1550 |
shlibpath_var=LD_LIBRARY_PATH |
dnl Unfortunately, prefix and exec_prefix get only finally determined |
1551 |
|
dnl at the end of configure. |
1552 |
|
if test "X$prefix" = "XNONE"; then |
1553 |
|
acl_final_prefix="$ac_default_prefix" |
1554 |
else |
else |
1555 |
# With GCC up to 2.95.x, collect2 would create an import file |
acl_final_prefix="$prefix" |
|
# for dependence libraries. The import file would start with |
|
|
# the line `#! .'. This would cause the generated library to |
|
|
# depend on `.', always an invalid library. This was fixed in |
|
|
# development snapshots of GCC prior to 3.0. |
|
|
case $host_os in |
|
|
aix4 | aix4.[[01]] | aix4.[[01]].*) |
|
|
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
|
|
echo ' yes ' |
|
|
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then |
|
|
: |
|
|
else |
|
|
can_build_shared=no |
|
|
fi |
|
|
;; |
|
|
esac |
|
|
# AIX (on Power*) has no versioning support, so currently we can |
|
|
# not hardcode correct soname into executable. Probably we can |
|
|
# add versioning support to collect2, so additional links can |
|
|
# be useful in future. |
|
|
if test "$aix_use_runtimelinking" = yes; then |
|
|
# If using run time linking (on AIX 4.2 or later) use lib<name>.so |
|
|
# instead of lib<name>.a to let people know that these are not |
|
|
# typical AIX shared libraries. |
|
|
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
|
|
else |
|
|
# We preserve .a as extension for shared libraries through AIX4.2 |
|
|
# and later when we are not doing run time linking. |
|
|
library_names_spec='${libname}${release}.a $libname.a' |
|
|
soname_spec='${libname}${release}.so$major' |
|
|
fi |
|
|
shlibpath_var=LIBPATH |
|
1556 |
fi |
fi |
1557 |
;; |
if test "X$exec_prefix" = "XNONE"; then |
1558 |
|
acl_final_exec_prefix='${prefix}' |
|
amigaos*) |
|
|
library_names_spec='$libname.ixlibrary $libname.a' |
|
|
# Create ${libname}_ixlibrary.a entries in /sys/libs. |
|
|
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' |
|
|
;; |
|
|
|
|
|
beos*) |
|
|
library_names_spec='${libname}.so' |
|
|
dynamic_linker="$host_os ld.so" |
|
|
shlibpath_var=LIBRARY_PATH |
|
|
;; |
|
|
|
|
|
bsdi4*) |
|
|
version_type=linux |
|
|
need_version=no |
|
|
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
|
|
soname_spec='${libname}${release}.so$major' |
|
|
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
|
|
shlibpath_var=LD_LIBRARY_PATH |
|
|
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
|
|
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
|
|
export_dynamic_flag_spec=-rdynamic |
|
|
# the default ld.so.conf also contains /usr/contrib/lib and |
|
|
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
|
|
# libtool to hard-code these into programs |
|
|
;; |
|
|
|
|
|
cygwin* | mingw* | pw32*) |
|
|
version_type=windows |
|
|
need_version=no |
|
|
need_lib_prefix=no |
|
|
case $GCC,$host_os in |
|
|
yes,cygwin*) |
|
|
library_names_spec='$libname.dll.a' |
|
|
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
|
|
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ |
|
|
dldir=$destdir/`dirname \$dlpath`~ |
|
|
test -d \$dldir || mkdir -p \$dldir~ |
|
|
$install_prog .libs/$dlname \$dldir/$dlname' |
|
|
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
|
|
dlpath=$dir/\$dldll~ |
|
|
$rm \$dlpath' |
|
|
;; |
|
|
yes,mingw*) |
|
|
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
|
|
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` |
|
|
;; |
|
|
yes,pw32*) |
|
|
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' |
|
|
;; |
|
|
*) |
|
|
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' |
|
|
;; |
|
|
esac |
|
|
dynamic_linker='Win32 ld.exe' |
|
|
# FIXME: first we should search . and the directory the executable is in |
|
|
shlibpath_var=PATH |
|
|
;; |
|
|
|
|
|
darwin* | rhapsody*) |
|
|
dynamic_linker="$host_os dyld" |
|
|
version_type=darwin |
|
|
need_lib_prefix=no |
|
|
need_version=no |
|
|
# FIXME: Relying on posixy $() will cause problems for |
|
|
# cross-compilation, but unfortunately the echo tests do not |
|
|
# yet detect zsh echo's removal of \ escapes. |
|
|
library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' |
|
|
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' |
|
|
shlibpath_overrides_runpath=yes |
|
|
shlibpath_var=DYLD_LIBRARY_PATH |
|
|
;; |
|
|
|
|
|
freebsd1*) |
|
|
dynamic_linker=no |
|
|
;; |
|
|
|
|
|
freebsd*) |
|
|
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` |
|
|
version_type=freebsd-$objformat |
|
|
case $version_type in |
|
|
freebsd-elf*) |
|
|
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
|
|
need_version=no |
|
|
need_lib_prefix=no |
|
|
;; |
|
|
freebsd-*) |
|
|
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' |
|
|
need_version=yes |
|
|
;; |
|
|
esac |
|
|
shlibpath_var=LD_LIBRARY_PATH |
|
|
case $host_os in |
|
|
freebsd2*) |
|
|
shlibpath_overrides_runpath=yes |
|
|
;; |
|
|
*) |
|
|
shlibpath_overrides_runpath=no |
|
|
hardcode_into_libs=yes |
|
|
;; |
|
|
esac |
|
|
;; |
|
|
|
|
|
gnu*) |
|
|
version_type=linux |
|
|
need_lib_prefix=no |
|
|
need_version=no |
|
|
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' |
|
|
soname_spec='${libname}${release}.so$major' |
|
|
shlibpath_var=LD_LIBRARY_PATH |
|
|
hardcode_into_libs=yes |
|
|
;; |
|
|
|
|
|
hpux9* | hpux10* | hpux11*) |
|
|
# Give a soname corresponding to the major version so that dld.sl refuses to |
|
|
# link against other versions. |
|
|
dynamic_linker="$host_os dld.sl" |
|
|
version_type=sunos |
|
|
need_lib_prefix=no |
|
|
need_version=no |
|
|
shlibpath_var=SHLIB_PATH |
|
|
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
|
|
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' |
|
|
soname_spec='${libname}${release}.sl$major' |
|
|
# HP-UX runs *really* slowly unless shared libraries are mode 555. |
|
|
postinstall_cmds='chmod 555 $lib' |
|
|
;; |
|
|
|
|
|
irix5* | irix6*) |
|
|
version_type=irix |
|
|
need_lib_prefix=no |
|
|
need_version=no |
|
|
soname_spec='${libname}${release}.so$major' |
|
|
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' |
|
|
case $host_os in |
|
|
irix5*) |
|
|
libsuff= shlibsuff= |
|
|
;; |
|
|
*) |
|
|
case $LD in # libtool.m4 will add one of these switches to LD |
|
|
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; |
|
|
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; |
|
|
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; |
|
|
*) libsuff= shlibsuff= libmagic=never-match;; |
|
|
esac |
|
|
;; |
|
|
esac |
|
|
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
|
|
shlibpath_overrides_runpath=no |
|
|
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
|
|
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
|
|
;; |
|
|
|
|
|
# No shared lib support for Linux oldld, aout, or coff. |
|
|
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) |
|
|
dynamic_linker=no |
|
|
;; |
|
|
|
|
|
# This must be Linux ELF. |
|
|
linux-gnu*) |
|
|
version_type=linux |
|
|
need_lib_prefix=no |
|
|
need_version=no |
|
|
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
|
|
soname_spec='${libname}${release}.so$major' |
|
|
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
|
|
shlibpath_var=LD_LIBRARY_PATH |
|
|
shlibpath_overrides_runpath=no |
|
|
# This implies no fast_install, which is unacceptable. |
|
|
# Some rework will be needed to allow for fast_install |
|
|
# before this can be enabled. |
|
|
hardcode_into_libs=yes |
|
|
|
|
|
# We used to test for /lib/ld.so.1 and disable shared libraries on |
|
|
# powerpc, because MkLinux only supported shared libraries with the |
|
|
# GNU dynamic linker. Since this was broken with cross compilers, |
|
|
# most powerpc-linux boxes support dynamic linking these days and |
|
|
# people can always --disable-shared, the test was removed, and we |
|
|
# assume the GNU/Linux dynamic linker is in use. |
|
|
dynamic_linker='GNU/Linux ld.so' |
|
|
;; |
|
|
|
|
|
netbsd*) |
|
|
version_type=sunos |
|
|
need_lib_prefix=no |
|
|
need_version=no |
|
|
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
|
|
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
|
|
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
|
|
dynamic_linker='NetBSD (a.out) ld.so' |
|
1559 |
else |
else |
1560 |
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' |
acl_final_exec_prefix="$exec_prefix" |
|
soname_spec='${libname}${release}.so$major' |
|
|
dynamic_linker='NetBSD ld.elf_so' |
|
1561 |
fi |
fi |
1562 |
shlibpath_var=LD_LIBRARY_PATH |
acl_save_prefix="$prefix" |
1563 |
shlibpath_overrides_runpath=yes |
prefix="$acl_final_prefix" |
1564 |
hardcode_into_libs=yes |
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" |
1565 |
;; |
prefix="$acl_save_prefix" |
1566 |
|
]) |
|
newsos6) |
|
|
version_type=linux |
|
|
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
|
|
shlibpath_var=LD_LIBRARY_PATH |
|
|
shlibpath_overrides_runpath=yes |
|
|
;; |
|
1567 |
|
|
1568 |
openbsd*) |
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the |
1569 |
version_type=sunos |
dnl variables prefix and exec_prefix bound to the values they will have |
1570 |
need_lib_prefix=no |
dnl at the end of the configure script. |
1571 |
need_version=no |
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], |
1572 |
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
[ |
1573 |
case "$host_os" in |
acl_save_prefix="$prefix" |
1574 |
openbsd2.[[89]] | openbsd2.[[89]].*) |
prefix="$acl_final_prefix" |
1575 |
shlibpath_overrides_runpath=no |
acl_save_exec_prefix="$exec_prefix" |
1576 |
;; |
exec_prefix="$acl_final_exec_prefix" |
1577 |
*) |
$1 |
1578 |
shlibpath_overrides_runpath=yes |
exec_prefix="$acl_save_exec_prefix" |
1579 |
;; |
prefix="$acl_save_prefix" |
1580 |
esac |
]) |
1581 |
|
|
1582 |
|
# lib-link.m4 serial 3 (gettext-0.11.3) |
1583 |
|
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. |
1584 |
|
dnl This file is free software, distributed under the terms of the GNU |
1585 |
|
dnl General Public License. As a special exception to the GNU General |
1586 |
|
dnl Public License, this file may be distributed as part of a program |
1587 |
|
dnl that contains a configuration script generated by Autoconf, under |
1588 |
|
dnl the same distribution terms as the rest of that program. |
1589 |
|
|
1590 |
|
dnl From Bruno Haible. |
1591 |
|
|
1592 |
|
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and |
1593 |
|
dnl the libraries corresponding to explicit and implicit dependencies. |
1594 |
|
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and |
1595 |
|
dnl augments the CPPFLAGS variable. |
1596 |
|
AC_DEFUN([AC_LIB_LINKFLAGS], |
1597 |
|
[ |
1598 |
|
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
1599 |
|
AC_REQUIRE([AC_LIB_RPATH]) |
1600 |
|
define([Name],[translit([$1],[./-], [___])]) |
1601 |
|
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
1602 |
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
1603 |
|
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
1604 |
|
AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
1605 |
|
ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
1606 |
|
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" |
1607 |
|
ac_cv_lib[]Name[]_cppflags="$INC[]NAME" |
1608 |
|
]) |
1609 |
|
LIB[]NAME="$ac_cv_lib[]Name[]_libs" |
1610 |
|
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" |
1611 |
|
INC[]NAME="$ac_cv_lib[]Name[]_cppflags" |
1612 |
|
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
1613 |
|
AC_SUBST([LIB]NAME) |
1614 |
|
AC_SUBST([LTLIB]NAME) |
1615 |
|
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the |
1616 |
|
dnl results of this search when this library appears as a dependency. |
1617 |
|
HAVE_LIB[]NAME=yes |
1618 |
|
undefine([Name]) |
1619 |
|
undefine([NAME]) |
1620 |
|
]) |
1621 |
|
|
1622 |
|
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) |
1623 |
|
dnl searches for libname and the libraries corresponding to explicit and |
1624 |
|
dnl implicit dependencies, together with the specified include files and |
1625 |
|
dnl the ability to compile and link the specified testcode. If found, it |
1626 |
|
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and |
1627 |
|
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and |
1628 |
|
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs |
1629 |
|
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. |
1630 |
|
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], |
1631 |
|
[ |
1632 |
|
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
1633 |
|
AC_REQUIRE([AC_LIB_RPATH]) |
1634 |
|
define([Name],[translit([$1],[./-], [___])]) |
1635 |
|
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
1636 |
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
1637 |
|
|
1638 |
|
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME |
1639 |
|
dnl accordingly. |
1640 |
|
AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
1641 |
|
|
1642 |
|
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, |
1643 |
|
dnl because if the user has installed lib[]Name and not disabled its use |
1644 |
|
dnl via --without-lib[]Name-prefix, he wants to use it. |
1645 |
|
ac_save_CPPFLAGS="$CPPFLAGS" |
1646 |
|
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
1647 |
|
|
1648 |
|
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
1649 |
|
ac_save_LIBS="$LIBS" |
1650 |
|
LIBS="$LIBS $LIB[]NAME" |
1651 |
|
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) |
1652 |
|
LIBS="$ac_save_LIBS" |
1653 |
|
]) |
1654 |
|
if test "$ac_cv_lib[]Name" = yes; then |
1655 |
|
HAVE_LIB[]NAME=yes |
1656 |
|
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) |
1657 |
|
AC_MSG_CHECKING([how to link with lib[]$1]) |
1658 |
|
AC_MSG_RESULT([$LIB[]NAME]) |
1659 |
else |
else |
1660 |
shlibpath_overrides_runpath=yes |
HAVE_LIB[]NAME=no |
1661 |
fi |
dnl If $LIB[]NAME didn't lead to a usable library, we don't need |
1662 |
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
dnl $INC[]NAME either. |
1663 |
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
CPPFLAGS="$ac_save_CPPFLAGS" |
1664 |
shlibpath_var=LD_LIBRARY_PATH |
LIB[]NAME= |
1665 |
;; |
LTLIB[]NAME= |
1666 |
|
fi |
1667 |
os2*) |
AC_SUBST([HAVE_LIB]NAME) |
1668 |
libname_spec='$name' |
AC_SUBST([LIB]NAME) |
1669 |
need_lib_prefix=no |
AC_SUBST([LTLIB]NAME) |
1670 |
library_names_spec='$libname.dll $libname.a' |
undefine([Name]) |
1671 |
dynamic_linker='OS/2 ld.exe' |
undefine([NAME]) |
1672 |
shlibpath_var=LIBPATH |
]) |
1673 |
;; |
|
1674 |
|
dnl Determine the platform dependent parameters needed to use rpath: |
1675 |
osf3* | osf4* | osf5*) |
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, |
1676 |
version_type=osf |
dnl hardcode_direct, hardcode_minus_L, |
1677 |
need_version=no |
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec. |
1678 |
soname_spec='${libname}${release}.so' |
AC_DEFUN([AC_LIB_RPATH], |
1679 |
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
[ |
1680 |
shlibpath_var=LD_LIBRARY_PATH |
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS |
1681 |
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld |
1682 |
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host |
1683 |
;; |
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir |
1684 |
|
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ |
1685 |
sco3.2v5*) |
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
1686 |
version_type=osf |
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
1687 |
soname_spec='${libname}${release}.so$major' |
. ./conftest.sh |
1688 |
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
rm -f ./conftest.sh |
1689 |
shlibpath_var=LD_LIBRARY_PATH |
acl_cv_rpath=done |
1690 |
;; |
]) |
1691 |
|
wl="$acl_cv_wl" |
1692 |
solaris*) |
libext="$acl_cv_libext" |
1693 |
version_type=linux |
shlibext="$acl_cv_shlibext" |
1694 |
need_lib_prefix=no |
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
1695 |
need_version=no |
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
1696 |
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
hardcode_direct="$acl_cv_hardcode_direct" |
1697 |
soname_spec='${libname}${release}.so$major' |
hardcode_minus_L="$acl_cv_hardcode_minus_L" |
1698 |
shlibpath_var=LD_LIBRARY_PATH |
sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" |
1699 |
shlibpath_overrides_runpath=yes |
sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" |
1700 |
hardcode_into_libs=yes |
dnl Determine whether the user wants rpath handling at all. |
1701 |
# ldd complains unless libraries are executable |
AC_ARG_ENABLE(rpath, |
1702 |
postinstall_cmds='chmod +x $lib' |
[ --disable-rpath do not hardcode runtime library paths], |
1703 |
;; |
:, enable_rpath=yes) |
1704 |
|
]) |
1705 |
sunos4*) |
|
1706 |
version_type=sunos |
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and |
1707 |
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
dnl the libraries corresponding to explicit and implicit dependencies. |
1708 |
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. |
1709 |
shlibpath_var=LD_LIBRARY_PATH |
AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
1710 |
shlibpath_overrides_runpath=yes |
[ |
1711 |
if test "$with_gnu_ld" = yes; then |
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
1712 |
need_lib_prefix=no |
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
1713 |
fi |
dnl By default, look in $includedir and $libdir. |
1714 |
need_version=yes |
use_additional=yes |
1715 |
;; |
AC_LIB_WITH_FINAL_PREFIX([ |
1716 |
|
eval additional_includedir=\"$includedir\" |
1717 |
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
eval additional_libdir=\"$libdir\" |
1718 |
version_type=linux |
]) |
1719 |
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
AC_ARG_WITH([lib$1-prefix], |
1720 |
soname_spec='${libname}${release}.so$major' |
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib |
1721 |
shlibpath_var=LD_LIBRARY_PATH |
--without-lib$1-prefix don't search for lib$1 in includedir and libdir], |
1722 |
case $host_vendor in |
[ |
1723 |
sni) |
if test "X$withval" = "Xno"; then |
1724 |
shlibpath_overrides_runpath=no |
use_additional=no |
1725 |
;; |
else |
1726 |
motorola) |
if test "X$withval" = "X"; then |
1727 |
need_lib_prefix=no |
AC_LIB_WITH_FINAL_PREFIX([ |
1728 |
need_version=no |
eval additional_includedir=\"$includedir\" |
1729 |
shlibpath_overrides_runpath=no |
eval additional_libdir=\"$libdir\" |
1730 |
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
]) |
|
;; |
|
|
esac |
|
|
;; |
|
|
|
|
|
uts4*) |
|
|
version_type=linux |
|
|
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
|
|
soname_spec='${libname}${release}.so$major' |
|
|
shlibpath_var=LD_LIBRARY_PATH |
|
|
;; |
|
|
|
|
|
dgux*) |
|
|
version_type=linux |
|
|
need_lib_prefix=no |
|
|
need_version=no |
|
|
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
|
|
soname_spec='${libname}${release}.so$major' |
|
|
shlibpath_var=LD_LIBRARY_PATH |
|
|
;; |
|
|
|
|
|
sysv4*MP*) |
|
|
if test -d /usr/nec ;then |
|
|
version_type=linux |
|
|
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' |
|
|
soname_spec='$libname.so.$major' |
|
|
shlibpath_var=LD_LIBRARY_PATH |
|
|
fi |
|
|
;; |
|
|
|
|
|
*) |
|
|
dynamic_linker=no |
|
|
;; |
|
|
esac |
|
|
AC_MSG_RESULT([$dynamic_linker]) |
|
|
test "$dynamic_linker" = no && can_build_shared=no |
|
|
|
|
|
# Report the final consequences. |
|
|
AC_MSG_CHECKING([if libtool supports shared libraries]) |
|
|
AC_MSG_RESULT([$can_build_shared]) |
|
|
|
|
|
AC_MSG_CHECKING([whether to build shared libraries]) |
|
|
test "$can_build_shared" = "no" && enable_shared=no |
|
|
|
|
|
# On AIX, shared libraries and static libraries use the same namespace, and |
|
|
# are all built from PIC. |
|
|
case "$host_os" in |
|
|
aix3*) |
|
|
test "$enable_shared" = yes && enable_static=no |
|
|
if test -n "$RANLIB"; then |
|
|
archive_cmds="$archive_cmds~\$RANLIB \$lib" |
|
|
postinstall_cmds='$RANLIB $lib' |
|
|
fi |
|
|
;; |
|
|
|
|
|
aix4*) |
|
|
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then |
|
|
test "$enable_shared" = yes && enable_static=no |
|
|
fi |
|
|
;; |
|
|
esac |
|
|
AC_MSG_RESULT([$enable_shared]) |
|
|
|
|
|
AC_MSG_CHECKING([whether to build static libraries]) |
|
|
# Make sure either enable_shared or enable_static is yes. |
|
|
test "$enable_shared" = yes || enable_static=yes |
|
|
AC_MSG_RESULT([$enable_static]) |
|
|
|
|
|
if test "$hardcode_action" = relink; then |
|
|
# Fast installation is not supported |
|
|
enable_fast_install=no |
|
|
elif test "$shlibpath_overrides_runpath" = yes || |
|
|
test "$enable_shared" = no; then |
|
|
# Fast installation is not necessary |
|
|
enable_fast_install=needless |
|
|
fi |
|
|
|
|
|
variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
|
|
if test "$GCC" = yes; then |
|
|
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
|
|
fi |
|
|
|
|
|
AC_LIBTOOL_DLOPEN_SELF |
|
|
|
|
|
if test "$enable_shared" = yes && test "$GCC" = yes; then |
|
|
case $archive_cmds in |
|
|
*'~'*) |
|
|
# FIXME: we may have to deal with multi-command sequences. |
|
|
;; |
|
|
'$CC '*) |
|
|
# Test whether the compiler implicitly links with -lc since on some |
|
|
# systems, -lgcc has to come before -lc. If gcc already passes -lc |
|
|
# to ld, don't add -lc before -lgcc. |
|
|
AC_MSG_CHECKING([whether -lc should be explicitly linked in]) |
|
|
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], |
|
|
[$rm conftest* |
|
|
echo 'static int dummy;' > conftest.$ac_ext |
|
|
|
|
|
if AC_TRY_EVAL(ac_compile); then |
|
|
soname=conftest |
|
|
lib=conftest |
|
|
libobjs=conftest.$ac_objext |
|
|
deplibs= |
|
|
wl=$lt_cv_prog_cc_wl |
|
|
compiler_flags=-v |
|
|
linker_flags=-v |
|
|
verstring= |
|
|
output_objdir=. |
|
|
libname=conftest |
|
|
save_allow_undefined_flag=$allow_undefined_flag |
|
|
allow_undefined_flag= |
|
|
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
|
|
then |
|
|
lt_cv_archive_cmds_need_lc=no |
|
1731 |
else |
else |
1732 |
lt_cv_archive_cmds_need_lc=yes |
additional_includedir="$withval/include" |
1733 |
|
additional_libdir="$withval/lib" |
1734 |
fi |
fi |
|
allow_undefined_flag=$save_allow_undefined_flag |
|
|
else |
|
|
cat conftest.err 1>&5 |
|
|
fi]) |
|
|
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) |
|
|
;; |
|
|
esac |
|
|
fi |
|
|
need_lc=${lt_cv_archive_cmds_need_lc-yes} |
|
|
|
|
|
# The second clause should only fire when bootstrapping the |
|
|
# libtool distribution, otherwise you forgot to ship ltmain.sh |
|
|
# with your package, and you will get complaints that there are |
|
|
# no rules to generate ltmain.sh. |
|
|
if test -f "$ltmain"; then |
|
|
: |
|
|
else |
|
|
# If there is no Makefile yet, we rely on a make rule to execute |
|
|
# `config.status --recheck' to rerun these tests and create the |
|
|
# libtool script then. |
|
|
test -f Makefile && make "$ltmain" |
|
|
fi |
|
|
|
|
|
if test -f "$ltmain"; then |
|
|
trap "$rm \"${ofile}T\"; exit 1" 1 2 15 |
|
|
$rm -f "${ofile}T" |
|
|
|
|
|
echo creating $ofile |
|
|
|
|
|
# Now quote all the things that may contain metacharacters while being |
|
|
# careful not to overquote the AC_SUBSTed values. We take copies of the |
|
|
# variables and quote the copies for generation of the libtool script. |
|
|
for var in echo old_CC old_CFLAGS \ |
|
|
AR AR_FLAGS CC LD LN_S NM SHELL \ |
|
|
reload_flag reload_cmds wl \ |
|
|
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ |
|
|
thread_safe_flag_spec whole_archive_flag_spec libname_spec \ |
|
|
library_names_spec soname_spec \ |
|
|
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ |
|
|
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ |
|
|
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ |
|
|
old_striplib striplib file_magic_cmd export_symbols_cmds \ |
|
|
deplibs_check_method allow_undefined_flag no_undefined_flag \ |
|
|
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ |
|
|
global_symbol_to_c_name_address \ |
|
|
hardcode_libdir_flag_spec hardcode_libdir_separator \ |
|
|
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
|
|
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do |
|
|
|
|
|
case $var in |
|
|
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ |
|
|
old_postinstall_cmds | old_postuninstall_cmds | \ |
|
|
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ |
|
|
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ |
|
|
postinstall_cmds | postuninstall_cmds | \ |
|
|
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
|
|
# Double-quote double-evaled strings. |
|
|
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
|
|
;; |
|
|
*) |
|
|
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
|
|
;; |
|
|
esac |
|
|
done |
|
|
|
|
|
cat <<__EOF__ > "${ofile}T" |
|
|
#! $SHELL |
|
|
|
|
|
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
|
|
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
|
|
# NOTE: Changes made to this file will be lost: look at ltmain.sh. |
|
|
# |
|
|
# Copyright (C) 1996-2000 Free Software Foundation, Inc. |
|
|
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
|
|
# |
|
|
# This program is free software; you can redistribute it and/or modify |
|
|
# it under the terms of the GNU General Public License as published by |
|
|
# the Free Software Foundation; either version 2 of the License, or |
|
|
# (at your option) any later version. |
|
|
# |
|
|
# This program is distributed in the hope that it will be useful, but |
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
|
# General Public License for more details. |
|
|
# |
|
|
# You should have received a copy of the GNU General Public License |
|
|
# along with this program; if not, write to the Free Software |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
|
# |
|
|
# As a special exception to the GNU General Public License, if you |
|
|
# distribute this file as part of a program that contains a |
|
|
# configuration script generated by Autoconf, you may include it under |
|
|
# the same distribution terms that you use for the rest of that program. |
|
|
|
|
|
# Sed that helps us avoid accidentally triggering echo(1) options like -n. |
|
|
Xsed="sed -e s/^X//" |
|
|
|
|
|
# The HP-UX ksh and POSIX shell print the target directory to stdout |
|
|
# if CDPATH is set. |
|
|
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
|
|
|
|
|
# ### BEGIN LIBTOOL CONFIG |
|
|
|
|
|
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
|
|
|
|
|
# Shell to use when invoking shell scripts. |
|
|
SHELL=$lt_SHELL |
|
|
|
|
|
# Whether or not to build shared libraries. |
|
|
build_libtool_libs=$enable_shared |
|
|
|
|
|
# Whether or not to build static libraries. |
|
|
build_old_libs=$enable_static |
|
|
|
|
|
# Whether or not to add -lc for building shared libraries. |
|
|
build_libtool_need_lc=$need_lc |
|
|
|
|
|
# Whether or not to optimize for fast installation. |
|
|
fast_install=$enable_fast_install |
|
|
|
|
|
# The host system. |
|
|
host_alias=$host_alias |
|
|
host=$host |
|
|
|
|
|
# An echo program that does not interpret backslashes. |
|
|
echo=$lt_echo |
|
|
|
|
|
# The archiver. |
|
|
AR=$lt_AR |
|
|
AR_FLAGS=$lt_AR_FLAGS |
|
|
|
|
|
# The default C compiler. |
|
|
CC=$lt_CC |
|
|
|
|
|
# Is the compiler the GNU C compiler? |
|
|
with_gcc=$GCC |
|
|
|
|
|
# The linker used to build libraries. |
|
|
LD=$lt_LD |
|
|
|
|
|
# Whether we need hard or soft links. |
|
|
LN_S=$lt_LN_S |
|
|
|
|
|
# A BSD-compatible nm program. |
|
|
NM=$lt_NM |
|
|
|
|
|
# A symbol stripping program |
|
|
STRIP=$STRIP |
|
|
|
|
|
# Used to examine libraries when file_magic_cmd begins "file" |
|
|
MAGIC_CMD=$MAGIC_CMD |
|
|
|
|
|
# Used on cygwin: DLL creation program. |
|
|
DLLTOOL="$DLLTOOL" |
|
|
|
|
|
# Used on cygwin: object dumper. |
|
|
OBJDUMP="$OBJDUMP" |
|
|
|
|
|
# Used on cygwin: assembler. |
|
|
AS="$AS" |
|
|
|
|
|
# The name of the directory that contains temporary libtool files. |
|
|
objdir=$objdir |
|
|
|
|
|
# How to create reloadable object files. |
|
|
reload_flag=$lt_reload_flag |
|
|
reload_cmds=$lt_reload_cmds |
|
|
|
|
|
# How to pass a linker flag through the compiler. |
|
|
wl=$lt_wl |
|
|
|
|
|
# Object file suffix (normally "o"). |
|
|
objext="$ac_objext" |
|
|
|
|
|
# Old archive suffix (normally "a"). |
|
|
libext="$libext" |
|
|
|
|
|
# Executable file suffix (normally ""). |
|
|
exeext="$exeext" |
|
|
|
|
|
# Additional compiler flags for building library objects. |
|
|
pic_flag=$lt_pic_flag |
|
|
pic_mode=$pic_mode |
|
|
|
|
|
# Does compiler simultaneously support -c and -o options? |
|
|
compiler_c_o=$lt_compiler_c_o |
|
|
|
|
|
# Can we write directly to a .lo ? |
|
|
compiler_o_lo=$lt_compiler_o_lo |
|
|
|
|
|
# Must we lock files when doing compilation ? |
|
|
need_locks=$lt_need_locks |
|
|
|
|
|
# Do we need the lib prefix for modules? |
|
|
need_lib_prefix=$need_lib_prefix |
|
|
|
|
|
# Do we need a version for libraries? |
|
|
need_version=$need_version |
|
|
|
|
|
# Whether dlopen is supported. |
|
|
dlopen_support=$enable_dlopen |
|
|
|
|
|
# Whether dlopen of programs is supported. |
|
|
dlopen_self=$enable_dlopen_self |
|
|
|
|
|
# Whether dlopen of statically linked programs is supported. |
|
|
dlopen_self_static=$enable_dlopen_self_static |
|
|
|
|
|
# Compiler flag to prevent dynamic linking. |
|
|
link_static_flag=$lt_link_static_flag |
|
|
|
|
|
# Compiler flag to turn off builtin functions. |
|
|
no_builtin_flag=$lt_no_builtin_flag |
|
|
|
|
|
# Compiler flag to allow reflexive dlopens. |
|
|
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec |
|
|
|
|
|
# Compiler flag to generate shared objects directly from archives. |
|
|
whole_archive_flag_spec=$lt_whole_archive_flag_spec |
|
|
|
|
|
# Compiler flag to generate thread-safe objects. |
|
|
thread_safe_flag_spec=$lt_thread_safe_flag_spec |
|
|
|
|
|
# Library versioning type. |
|
|
version_type=$version_type |
|
|
|
|
|
# Format of library name prefix. |
|
|
libname_spec=$lt_libname_spec |
|
|
|
|
|
# List of archive names. First name is the real one, the rest are links. |
|
|
# The last name is the one that the linker finds with -lNAME. |
|
|
library_names_spec=$lt_library_names_spec |
|
|
|
|
|
# The coded name of the library, if different from the real name. |
|
|
soname_spec=$lt_soname_spec |
|
|
|
|
|
# Commands used to build and install an old-style archive. |
|
|
RANLIB=$lt_RANLIB |
|
|
old_archive_cmds=$lt_old_archive_cmds |
|
|
old_postinstall_cmds=$lt_old_postinstall_cmds |
|
|
old_postuninstall_cmds=$lt_old_postuninstall_cmds |
|
|
|
|
|
# Create an old-style archive from a shared archive. |
|
|
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds |
|
|
|
|
|
# Create a temporary old-style archive to link instead of a shared archive. |
|
|
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds |
|
|
|
|
|
# Commands used to build and install a shared archive. |
|
|
archive_cmds=$lt_archive_cmds |
|
|
archive_expsym_cmds=$lt_archive_expsym_cmds |
|
|
postinstall_cmds=$lt_postinstall_cmds |
|
|
postuninstall_cmds=$lt_postuninstall_cmds |
|
|
|
|
|
# Commands to strip libraries. |
|
|
old_striplib=$lt_old_striplib |
|
|
striplib=$lt_striplib |
|
|
|
|
|
# Method to check whether dependent libraries are shared objects. |
|
|
deplibs_check_method=$lt_deplibs_check_method |
|
|
|
|
|
# Command to use when deplibs_check_method == file_magic. |
|
|
file_magic_cmd=$lt_file_magic_cmd |
|
|
|
|
|
# Flag that allows shared libraries with undefined symbols to be built. |
|
|
allow_undefined_flag=$lt_allow_undefined_flag |
|
|
|
|
|
# Flag that forces no undefined symbols. |
|
|
no_undefined_flag=$lt_no_undefined_flag |
|
|
|
|
|
# Commands used to finish a libtool library installation in a directory. |
|
|
finish_cmds=$lt_finish_cmds |
|
|
|
|
|
# Same as above, but a single script fragment to be evaled but not shown. |
|
|
finish_eval=$lt_finish_eval |
|
|
|
|
|
# Take the output of nm and produce a listing of raw symbols and C names. |
|
|
global_symbol_pipe=$lt_global_symbol_pipe |
|
|
|
|
|
# Transform the output of nm in a proper C declaration |
|
|
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl |
|
|
|
|
|
# Transform the output of nm in a C name address pair |
|
|
global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address |
|
|
|
|
|
# This is the shared library runtime path variable. |
|
|
runpath_var=$runpath_var |
|
|
|
|
|
# This is the shared library path variable. |
|
|
shlibpath_var=$shlibpath_var |
|
|
|
|
|
# Is shlibpath searched before the hard-coded library search path? |
|
|
shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
|
|
|
|
|
# How to hardcode a shared library path into an executable. |
|
|
hardcode_action=$hardcode_action |
|
|
|
|
|
# Whether we should hardcode library paths into libraries. |
|
|
hardcode_into_libs=$hardcode_into_libs |
|
|
|
|
|
# Flag to hardcode \$libdir into a binary during linking. |
|
|
# This must work even if \$libdir does not exist. |
|
|
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec |
|
|
|
|
|
# Whether we need a single -rpath flag with a separated argument. |
|
|
hardcode_libdir_separator=$lt_hardcode_libdir_separator |
|
|
|
|
|
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
|
|
# resulting binary. |
|
|
hardcode_direct=$hardcode_direct |
|
|
|
|
|
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
|
|
# resulting binary. |
|
|
hardcode_minus_L=$hardcode_minus_L |
|
|
|
|
|
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
|
|
# the resulting binary. |
|
|
hardcode_shlibpath_var=$hardcode_shlibpath_var |
|
|
|
|
|
# Variables whose values should be saved in libtool wrapper scripts and |
|
|
# restored at relink time. |
|
|
variables_saved_for_relink="$variables_saved_for_relink" |
|
|
|
|
|
# Whether libtool must link a program against all its dependency libraries. |
|
|
link_all_deplibs=$link_all_deplibs |
|
|
|
|
|
# Compile-time system search path for libraries |
|
|
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
|
|
|
|
|
# Run-time system search path for libraries |
|
|
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
|
|
|
|
|
# Fix the shell variable \$srcfile for the compiler. |
|
|
fix_srcfile_path="$fix_srcfile_path" |
|
|
|
|
|
# Set to yes if exported symbols are required. |
|
|
always_export_symbols=$always_export_symbols |
|
|
|
|
|
# The commands to list exported symbols. |
|
|
export_symbols_cmds=$lt_export_symbols_cmds |
|
|
|
|
|
# The commands to extract the exported symbol list from a shared archive. |
|
|
extract_expsyms_cmds=$lt_extract_expsyms_cmds |
|
|
|
|
|
# Symbols that should not be listed in the preloaded symbols. |
|
|
exclude_expsyms=$lt_exclude_expsyms |
|
|
|
|
|
# Symbols that must always be exported. |
|
|
include_expsyms=$lt_include_expsyms |
|
|
|
|
|
# ### END LIBTOOL CONFIG |
|
|
|
|
|
__EOF__ |
|
|
|
|
|
case $host_os in |
|
|
aix3*) |
|
|
cat <<\EOF >> "${ofile}T" |
|
|
|
|
|
# AIX sometimes has problems with the GCC collect2 program. For some |
|
|
# reason, if we set the COLLECT_NAMES environment variable, the problems |
|
|
# vanish in a puff of smoke. |
|
|
if test "X${COLLECT_NAMES+set}" != Xset; then |
|
|
COLLECT_NAMES= |
|
|
export COLLECT_NAMES |
|
|
fi |
|
|
EOF |
|
|
;; |
|
|
esac |
|
|
|
|
|
case $host_os in |
|
|
cygwin* | mingw* | pw32* | os2*) |
|
|
cat <<'EOF' >> "${ofile}T" |
|
|
# This is a source program that is used to create dlls on Windows |
|
|
# Don't remove nor modify the starting and closing comments |
|
|
# /* ltdll.c starts here */ |
|
|
# #define WIN32_LEAN_AND_MEAN |
|
|
# #include <windows.h> |
|
|
# #undef WIN32_LEAN_AND_MEAN |
|
|
# #include <stdio.h> |
|
|
# |
|
|
# #ifndef __CYGWIN__ |
|
|
# # ifdef __CYGWIN32__ |
|
|
# # define __CYGWIN__ __CYGWIN32__ |
|
|
# # endif |
|
|
# #endif |
|
|
# |
|
|
# #ifdef __cplusplus |
|
|
# extern "C" { |
|
|
# #endif |
|
|
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
|
|
# #ifdef __cplusplus |
|
|
# } |
|
|
# #endif |
|
|
# |
|
|
# #ifdef __CYGWIN__ |
|
|
# #include <cygwin/cygwin_dll.h> |
|
|
# DECLARE_CYGWIN_DLL( DllMain ); |
|
|
# #endif |
|
|
# HINSTANCE __hDllInstance_base; |
|
|
# |
|
|
# BOOL APIENTRY |
|
|
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
|
|
# { |
|
|
# __hDllInstance_base = hInst; |
|
|
# return TRUE; |
|
|
# } |
|
|
# /* ltdll.c ends here */ |
|
|
# This is a source program that is used to create import libraries |
|
|
# on Windows for dlls which lack them. Don't remove nor modify the |
|
|
# starting and closing comments |
|
|
# /* impgen.c starts here */ |
|
|
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. |
|
|
# |
|
|
# This file is part of GNU libtool. |
|
|
# |
|
|
# This program is free software; you can redistribute it and/or modify |
|
|
# it under the terms of the GNU General Public License as published by |
|
|
# the Free Software Foundation; either version 2 of the License, or |
|
|
# (at your option) any later version. |
|
|
# |
|
|
# This program is distributed in the hope that it will be useful, |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
# GNU General Public License for more details. |
|
|
# |
|
|
# You should have received a copy of the GNU General Public License |
|
|
# along with this program; if not, write to the Free Software |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
|
# */ |
|
|
# |
|
|
# #include <stdio.h> /* for printf() */ |
|
|
# #include <unistd.h> /* for open(), lseek(), read() */ |
|
|
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */ |
|
|
# #include <string.h> /* for strdup() */ |
|
|
# |
|
|
# /* O_BINARY isn't required (or even defined sometimes) under Unix */ |
|
|
# #ifndef O_BINARY |
|
|
# #define O_BINARY 0 |
|
|
# #endif |
|
|
# |
|
|
# static unsigned int |
|
|
# pe_get16 (fd, offset) |
|
|
# int fd; |
|
|
# int offset; |
|
|
# { |
|
|
# unsigned char b[2]; |
|
|
# lseek (fd, offset, SEEK_SET); |
|
|
# read (fd, b, 2); |
|
|
# return b[0] + (b[1]<<8); |
|
|
# } |
|
|
# |
|
|
# static unsigned int |
|
|
# pe_get32 (fd, offset) |
|
|
# int fd; |
|
|
# int offset; |
|
|
# { |
|
|
# unsigned char b[4]; |
|
|
# lseek (fd, offset, SEEK_SET); |
|
|
# read (fd, b, 4); |
|
|
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
|
|
# } |
|
|
# |
|
|
# static unsigned int |
|
|
# pe_as32 (ptr) |
|
|
# void *ptr; |
|
|
# { |
|
|
# unsigned char *b = ptr; |
|
|
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
|
|
# } |
|
|
# |
|
|
# int |
|
|
# main (argc, argv) |
|
|
# int argc; |
|
|
# char *argv[]; |
|
|
# { |
|
|
# int dll; |
|
|
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; |
|
|
# unsigned long export_rva, export_size, nsections, secptr, expptr; |
|
|
# unsigned long name_rvas, nexp; |
|
|
# unsigned char *expdata, *erva; |
|
|
# char *filename, *dll_name; |
|
|
# |
|
|
# filename = argv[1]; |
|
|
# |
|
|
# dll = open(filename, O_RDONLY|O_BINARY); |
|
|
# if (dll < 1) |
|
|
# return 1; |
|
|
# |
|
|
# dll_name = filename; |
|
|
# |
|
|
# for (i=0; filename[i]; i++) |
|
|
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') |
|
|
# dll_name = filename + i +1; |
|
|
# |
|
|
# pe_header_offset = pe_get32 (dll, 0x3c); |
|
|
# opthdr_ofs = pe_header_offset + 4 + 20; |
|
|
# num_entries = pe_get32 (dll, opthdr_ofs + 92); |
|
|
# |
|
|
# if (num_entries < 1) /* no exports */ |
|
|
# return 1; |
|
|
# |
|
|
# export_rva = pe_get32 (dll, opthdr_ofs + 96); |
|
|
# export_size = pe_get32 (dll, opthdr_ofs + 100); |
|
|
# nsections = pe_get16 (dll, pe_header_offset + 4 +2); |
|
|
# secptr = (pe_header_offset + 4 + 20 + |
|
|
# pe_get16 (dll, pe_header_offset + 4 + 16)); |
|
|
# |
|
|
# expptr = 0; |
|
|
# for (i = 0; i < nsections; i++) |
|
|
# { |
|
|
# char sname[8]; |
|
|
# unsigned long secptr1 = secptr + 40 * i; |
|
|
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); |
|
|
# unsigned long vsize = pe_get32 (dll, secptr1 + 16); |
|
|
# unsigned long fptr = pe_get32 (dll, secptr1 + 20); |
|
|
# lseek(dll, secptr1, SEEK_SET); |
|
|
# read(dll, sname, 8); |
|
|
# if (vaddr <= export_rva && vaddr+vsize > export_rva) |
|
|
# { |
|
|
# expptr = fptr + (export_rva - vaddr); |
|
|
# if (export_rva + export_size > vaddr + vsize) |
|
|
# export_size = vsize - (export_rva - vaddr); |
|
|
# break; |
|
|
# } |
|
|
# } |
|
|
# |
|
|
# expdata = (unsigned char*)malloc(export_size); |
|
|
# lseek (dll, expptr, SEEK_SET); |
|
|
# read (dll, expdata, export_size); |
|
|
# erva = expdata - export_rva; |
|
|
# |
|
|
# nexp = pe_as32 (expdata+24); |
|
|
# name_rvas = pe_as32 (expdata+32); |
|
|
# |
|
|
# printf ("EXPORTS\n"); |
|
|
# for (i = 0; i<nexp; i++) |
|
|
# { |
|
|
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); |
|
|
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); |
|
|
# } |
|
|
# |
|
|
# return 0; |
|
|
# } |
|
|
# /* impgen.c ends here */ |
|
|
|
|
|
EOF |
|
|
;; |
|
|
esac |
|
|
|
|
|
# We use sed instead of cat because bash on DJGPP gets confused if |
|
|
# if finds mixed CR/LF and LF-only lines. Since sed operates in |
|
|
# text mode, it properly converts lines to CR/LF. This bash problem |
|
|
# is reportedly fixed, but why not run on old versions too? |
|
|
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) |
|
|
|
|
|
mv -f "${ofile}T" "$ofile" || \ |
|
|
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") |
|
|
chmod +x "$ofile" |
|
|
fi |
|
|
|
|
|
])# _LT_AC_LTCONFIG_HACK |
|
|
|
|
|
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support |
|
|
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) |
|
|
|
|
|
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's |
|
|
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) |
|
|
|
|
|
# AC_ENABLE_SHARED - implement the --enable-shared flag |
|
|
# Usage: AC_ENABLE_SHARED[(DEFAULT)] |
|
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
|
|
# `yes'. |
|
|
AC_DEFUN([AC_ENABLE_SHARED], |
|
|
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
|
|
AC_ARG_ENABLE(shared, |
|
|
changequote(<<, >>)dnl |
|
|
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], |
|
|
changequote([, ])dnl |
|
|
[p=${PACKAGE-default} |
|
|
case $enableval in |
|
|
yes) enable_shared=yes ;; |
|
|
no) enable_shared=no ;; |
|
|
*) |
|
|
enable_shared=no |
|
|
# Look at the argument we got. We use all the common list separators. |
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
|
|
for pkg in $enableval; do |
|
|
if test "X$pkg" = "X$p"; then |
|
|
enable_shared=yes |
|
|
fi |
|
|
done |
|
|
IFS="$ac_save_ifs" |
|
|
;; |
|
|
esac], |
|
|
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
|
|
]) |
|
|
|
|
|
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared |
|
|
AC_DEFUN([AC_DISABLE_SHARED], |
|
|
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
|
|
AC_ENABLE_SHARED(no)]) |
|
|
|
|
|
# AC_ENABLE_STATIC - implement the --enable-static flag |
|
|
# Usage: AC_ENABLE_STATIC[(DEFAULT)] |
|
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
|
|
# `yes'. |
|
|
AC_DEFUN([AC_ENABLE_STATIC], |
|
|
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
|
|
AC_ARG_ENABLE(static, |
|
|
changequote(<<, >>)dnl |
|
|
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], |
|
|
changequote([, ])dnl |
|
|
[p=${PACKAGE-default} |
|
|
case $enableval in |
|
|
yes) enable_static=yes ;; |
|
|
no) enable_static=no ;; |
|
|
*) |
|
|
enable_static=no |
|
|
# Look at the argument we got. We use all the common list separators. |
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
|
|
for pkg in $enableval; do |
|
|
if test "X$pkg" = "X$p"; then |
|
|
enable_static=yes |
|
1735 |
fi |
fi |
|
done |
|
|
IFS="$ac_save_ifs" |
|
|
;; |
|
|
esac], |
|
|
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
|
1736 |
]) |
]) |
1737 |
|
dnl Search the library and its dependencies in $additional_libdir and |
1738 |
# AC_DISABLE_STATIC - set the default static flag to --disable-static |
dnl $LDFLAGS. Using breadth-first-seach. |
1739 |
AC_DEFUN([AC_DISABLE_STATIC], |
LIB[]NAME= |
1740 |
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
LTLIB[]NAME= |
1741 |
AC_ENABLE_STATIC(no)]) |
INC[]NAME= |
1742 |
|
rpathdirs= |
1743 |
|
ltrpathdirs= |
1744 |
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag |
names_already_handled= |
1745 |
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] |
names_next_round='$1 $2' |
1746 |
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
while test -n "$names_next_round"; do |
1747 |
# `yes'. |
names_this_round="$names_next_round" |
1748 |
AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
names_next_round= |
1749 |
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
for name in $names_this_round; do |
1750 |
AC_ARG_ENABLE(fast-install, |
already_handled= |
1751 |
changequote(<<, >>)dnl |
for n in $names_already_handled; do |
1752 |
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], |
if test "$n" = "$name"; then |
1753 |
changequote([, ])dnl |
already_handled=yes |
1754 |
[p=${PACKAGE-default} |
break |
1755 |
case $enableval in |
fi |
1756 |
yes) enable_fast_install=yes ;; |
done |
1757 |
no) enable_fast_install=no ;; |
if test -z "$already_handled"; then |
1758 |
*) |
names_already_handled="$names_already_handled $name" |
1759 |
enable_fast_install=no |
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS |
1760 |
# Look at the argument we got. We use all the common list separators. |
dnl or AC_LIB_HAVE_LINKFLAGS call. |
1761 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
1762 |
for pkg in $enableval; do |
eval value=\"\$HAVE_LIB$uppername\" |
1763 |
if test "X$pkg" = "X$p"; then |
if test -n "$value"; then |
1764 |
enable_fast_install=yes |
if test "$value" = yes; then |
1765 |
fi |
eval value=\"\$LIB$uppername\" |
1766 |
|
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" |
1767 |
|
eval value=\"\$LTLIB$uppername\" |
1768 |
|
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" |
1769 |
|
else |
1770 |
|
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined |
1771 |
|
dnl that this library doesn't exist. So just drop it. |
1772 |
|
: |
1773 |
|
fi |
1774 |
|
else |
1775 |
|
dnl Search the library lib$name in $additional_libdir and $LDFLAGS |
1776 |
|
dnl and the already constructed $LIBNAME/$LTLIBNAME. |
1777 |
|
found_dir= |
1778 |
|
found_la= |
1779 |
|
found_so= |
1780 |
|
found_a= |
1781 |
|
if test $use_additional = yes; then |
1782 |
|
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then |
1783 |
|
found_dir="$additional_libdir" |
1784 |
|
found_so="$additional_libdir/lib$name.$shlibext" |
1785 |
|
if test -f "$additional_libdir/lib$name.la"; then |
1786 |
|
found_la="$additional_libdir/lib$name.la" |
1787 |
|
fi |
1788 |
|
else |
1789 |
|
if test -f "$additional_libdir/lib$name.$libext"; then |
1790 |
|
found_dir="$additional_libdir" |
1791 |
|
found_a="$additional_libdir/lib$name.$libext" |
1792 |
|
if test -f "$additional_libdir/lib$name.la"; then |
1793 |
|
found_la="$additional_libdir/lib$name.la" |
1794 |
|
fi |
1795 |
|
fi |
1796 |
|
fi |
1797 |
|
fi |
1798 |
|
if test "X$found_dir" = "X"; then |
1799 |
|
for x in $LDFLAGS $LTLIB[]NAME; do |
1800 |
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
1801 |
|
case "$x" in |
1802 |
|
-L*) |
1803 |
|
dir=`echo "X$x" | sed -e 's/^X-L//'` |
1804 |
|
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then |
1805 |
|
found_dir="$dir" |
1806 |
|
found_so="$dir/lib$name.$shlibext" |
1807 |
|
if test -f "$dir/lib$name.la"; then |
1808 |
|
found_la="$dir/lib$name.la" |
1809 |
|
fi |
1810 |
|
else |
1811 |
|
if test -f "$dir/lib$name.$libext"; then |
1812 |
|
found_dir="$dir" |
1813 |
|
found_a="$dir/lib$name.$libext" |
1814 |
|
if test -f "$dir/lib$name.la"; then |
1815 |
|
found_la="$dir/lib$name.la" |
1816 |
|
fi |
1817 |
|
fi |
1818 |
|
fi |
1819 |
|
;; |
1820 |
|
esac |
1821 |
|
if test "X$found_dir" != "X"; then |
1822 |
|
break |
1823 |
|
fi |
1824 |
|
done |
1825 |
|
fi |
1826 |
|
if test "X$found_dir" != "X"; then |
1827 |
|
dnl Found the library. |
1828 |
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" |
1829 |
|
if test "X$found_so" != "X"; then |
1830 |
|
dnl Linking with a shared library. We attempt to hardcode its |
1831 |
|
dnl directory into the executable's runpath, unless it's the |
1832 |
|
dnl standard /usr/lib. |
1833 |
|
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
1834 |
|
dnl No hardcoding is needed. |
1835 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
1836 |
|
else |
1837 |
|
dnl Use an explicit option to hardcode DIR into the resulting |
1838 |
|
dnl binary. |
1839 |
|
dnl Potentially add DIR to ltrpathdirs. |
1840 |
|
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
1841 |
|
haveit= |
1842 |
|
for x in $ltrpathdirs; do |
1843 |
|
if test "X$x" = "X$found_dir"; then |
1844 |
|
haveit=yes |
1845 |
|
break |
1846 |
|
fi |
1847 |
|
done |
1848 |
|
if test -z "$haveit"; then |
1849 |
|
ltrpathdirs="$ltrpathdirs $found_dir" |
1850 |
|
fi |
1851 |
|
dnl The hardcoding into $LIBNAME is system dependent. |
1852 |
|
if test "$hardcode_direct" = yes; then |
1853 |
|
dnl Using DIR/libNAME.so during linking hardcodes DIR into the |
1854 |
|
dnl resulting binary. |
1855 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
1856 |
|
else |
1857 |
|
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
1858 |
|
dnl Use an explicit option to hardcode DIR into the resulting |
1859 |
|
dnl binary. |
1860 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
1861 |
|
dnl Potentially add DIR to rpathdirs. |
1862 |
|
dnl The rpathdirs will be appended to $LIBNAME at the end. |
1863 |
|
haveit= |
1864 |
|
for x in $rpathdirs; do |
1865 |
|
if test "X$x" = "X$found_dir"; then |
1866 |
|
haveit=yes |
1867 |
|
break |
1868 |
|
fi |
1869 |
|
done |
1870 |
|
if test -z "$haveit"; then |
1871 |
|
rpathdirs="$rpathdirs $found_dir" |
1872 |
|
fi |
1873 |
|
else |
1874 |
|
dnl Rely on "-L$found_dir". |
1875 |
|
dnl But don't add it if it's already contained in the LDFLAGS |
1876 |
|
dnl or the already constructed $LIBNAME |
1877 |
|
haveit= |
1878 |
|
for x in $LDFLAGS $LIB[]NAME; do |
1879 |
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
1880 |
|
if test "X$x" = "X-L$found_dir"; then |
1881 |
|
haveit=yes |
1882 |
|
break |
1883 |
|
fi |
1884 |
|
done |
1885 |
|
if test -z "$haveit"; then |
1886 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" |
1887 |
|
fi |
1888 |
|
if test "$hardcode_minus_L" != no; then |
1889 |
|
dnl FIXME: Not sure whether we should use |
1890 |
|
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
1891 |
|
dnl here. |
1892 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
1893 |
|
else |
1894 |
|
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH |
1895 |
|
dnl here, because this doesn't fit in flags passed to the |
1896 |
|
dnl compiler. So give up. No hardcoding. This affects only |
1897 |
|
dnl very old systems. |
1898 |
|
dnl FIXME: Not sure whether we should use |
1899 |
|
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
1900 |
|
dnl here. |
1901 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
1902 |
|
fi |
1903 |
|
fi |
1904 |
|
fi |
1905 |
|
fi |
1906 |
|
else |
1907 |
|
if test "X$found_a" != "X"; then |
1908 |
|
dnl Linking with a static library. |
1909 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" |
1910 |
|
else |
1911 |
|
dnl We shouldn't come here, but anyway it's good to have a |
1912 |
|
dnl fallback. |
1913 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" |
1914 |
|
fi |
1915 |
|
fi |
1916 |
|
dnl Assume the include files are nearby. |
1917 |
|
additional_includedir= |
1918 |
|
case "$found_dir" in |
1919 |
|
*/lib | */lib/) |
1920 |
|
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
1921 |
|
additional_includedir="$basedir/include" |
1922 |
|
;; |
1923 |
|
esac |
1924 |
|
if test "X$additional_includedir" != "X"; then |
1925 |
|
dnl Potentially add $additional_includedir to $INCNAME. |
1926 |
|
dnl But don't add it |
1927 |
|
dnl 1. if it's the standard /usr/include, |
1928 |
|
dnl 2. if it's /usr/local/include and we are using GCC on Linux, |
1929 |
|
dnl 3. if it's already present in $CPPFLAGS or the already |
1930 |
|
dnl constructed $INCNAME, |
1931 |
|
dnl 4. if it doesn't exist as a directory. |
1932 |
|
if test "X$additional_includedir" != "X/usr/include"; then |
1933 |
|
haveit= |
1934 |
|
if test "X$additional_includedir" = "X/usr/local/include"; then |
1935 |
|
if test -n "$GCC"; then |
1936 |
|
case $host_os in |
1937 |
|
linux*) haveit=yes;; |
1938 |
|
esac |
1939 |
|
fi |
1940 |
|
fi |
1941 |
|
if test -z "$haveit"; then |
1942 |
|
for x in $CPPFLAGS $INC[]NAME; do |
1943 |
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
1944 |
|
if test "X$x" = "X-I$additional_includedir"; then |
1945 |
|
haveit=yes |
1946 |
|
break |
1947 |
|
fi |
1948 |
|
done |
1949 |
|
if test -z "$haveit"; then |
1950 |
|
if test -d "$additional_includedir"; then |
1951 |
|
dnl Really add $additional_includedir to $INCNAME. |
1952 |
|
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" |
1953 |
|
fi |
1954 |
|
fi |
1955 |
|
fi |
1956 |
|
fi |
1957 |
|
fi |
1958 |
|
dnl Look for dependencies. |
1959 |
|
if test -n "$found_la"; then |
1960 |
|
dnl Read the .la file. It defines the variables |
1961 |
|
dnl dlname, library_names, old_library, dependency_libs, current, |
1962 |
|
dnl age, revision, installed, dlopen, dlpreopen, libdir. |
1963 |
|
save_libdir="$libdir" |
1964 |
|
case "$found_la" in |
1965 |
|
*/* | *\\*) . "$found_la" ;; |
1966 |
|
*) . "./$found_la" ;; |
1967 |
|
esac |
1968 |
|
libdir="$save_libdir" |
1969 |
|
dnl We use only dependency_libs. |
1970 |
|
for dep in $dependency_libs; do |
1971 |
|
case "$dep" in |
1972 |
|
-L*) |
1973 |
|
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
1974 |
|
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. |
1975 |
|
dnl But don't add it |
1976 |
|
dnl 1. if it's the standard /usr/lib, |
1977 |
|
dnl 2. if it's /usr/local/lib and we are using GCC on Linux, |
1978 |
|
dnl 3. if it's already present in $LDFLAGS or the already |
1979 |
|
dnl constructed $LIBNAME, |
1980 |
|
dnl 4. if it doesn't exist as a directory. |
1981 |
|
if test "X$additional_libdir" != "X/usr/lib"; then |
1982 |
|
haveit= |
1983 |
|
if test "X$additional_libdir" = "X/usr/local/lib"; then |
1984 |
|
if test -n "$GCC"; then |
1985 |
|
case $host_os in |
1986 |
|
linux*) haveit=yes;; |
1987 |
|
esac |
1988 |
|
fi |
1989 |
|
fi |
1990 |
|
if test -z "$haveit"; then |
1991 |
|
haveit= |
1992 |
|
for x in $LDFLAGS $LIB[]NAME; do |
1993 |
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
1994 |
|
if test "X$x" = "X-L$additional_libdir"; then |
1995 |
|
haveit=yes |
1996 |
|
break |
1997 |
|
fi |
1998 |
|
done |
1999 |
|
if test -z "$haveit"; then |
2000 |
|
if test -d "$additional_libdir"; then |
2001 |
|
dnl Really add $additional_libdir to $LIBNAME. |
2002 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" |
2003 |
|
fi |
2004 |
|
fi |
2005 |
|
haveit= |
2006 |
|
for x in $LDFLAGS $LTLIB[]NAME; do |
2007 |
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
2008 |
|
if test "X$x" = "X-L$additional_libdir"; then |
2009 |
|
haveit=yes |
2010 |
|
break |
2011 |
|
fi |
2012 |
|
done |
2013 |
|
if test -z "$haveit"; then |
2014 |
|
if test -d "$additional_libdir"; then |
2015 |
|
dnl Really add $additional_libdir to $LTLIBNAME. |
2016 |
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" |
2017 |
|
fi |
2018 |
|
fi |
2019 |
|
fi |
2020 |
|
fi |
2021 |
|
;; |
2022 |
|
-R*) |
2023 |
|
dir=`echo "X$dep" | sed -e 's/^X-R//'` |
2024 |
|
if test "$enable_rpath" != no; then |
2025 |
|
dnl Potentially add DIR to rpathdirs. |
2026 |
|
dnl The rpathdirs will be appended to $LIBNAME at the end. |
2027 |
|
haveit= |
2028 |
|
for x in $rpathdirs; do |
2029 |
|
if test "X$x" = "X$dir"; then |
2030 |
|
haveit=yes |
2031 |
|
break |
2032 |
|
fi |
2033 |
|
done |
2034 |
|
if test -z "$haveit"; then |
2035 |
|
rpathdirs="$rpathdirs $dir" |
2036 |
|
fi |
2037 |
|
dnl Potentially add DIR to ltrpathdirs. |
2038 |
|
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
2039 |
|
haveit= |
2040 |
|
for x in $ltrpathdirs; do |
2041 |
|
if test "X$x" = "X$dir"; then |
2042 |
|
haveit=yes |
2043 |
|
break |
2044 |
|
fi |
2045 |
|
done |
2046 |
|
if test -z "$haveit"; then |
2047 |
|
ltrpathdirs="$ltrpathdirs $dir" |
2048 |
|
fi |
2049 |
|
fi |
2050 |
|
;; |
2051 |
|
-l*) |
2052 |
|
dnl Handle this in the next round. |
2053 |
|
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
2054 |
|
;; |
2055 |
|
*.la) |
2056 |
|
dnl Handle this in the next round. Throw away the .la's |
2057 |
|
dnl directory; it is already contained in a preceding -L |
2058 |
|
dnl option. |
2059 |
|
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
2060 |
|
;; |
2061 |
|
*) |
2062 |
|
dnl Most likely an immediate library name. |
2063 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" |
2064 |
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" |
2065 |
|
;; |
2066 |
|
esac |
2067 |
|
done |
2068 |
|
fi |
2069 |
|
else |
2070 |
|
dnl Didn't find the library; assume it is in the system directories |
2071 |
|
dnl known to the linker and runtime loader. (All the system |
2072 |
|
dnl directories known to the linker should also be known to the |
2073 |
|
dnl runtime loader, otherwise the system is severely misconfigured.) |
2074 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
2075 |
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" |
2076 |
|
fi |
2077 |
|
fi |
2078 |
|
fi |
2079 |
|
done |
2080 |
done |
done |
2081 |
IFS="$ac_save_ifs" |
if test "X$rpathdirs" != "X"; then |
2082 |
;; |
if test -n "$hardcode_libdir_separator"; then |
2083 |
esac], |
dnl Weird platform: only the last -rpath option counts, the user must |
2084 |
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl |
dnl pass all path elements in one option. We can arrange that for a |
2085 |
|
dnl single library, but not when more than one $LIBNAMEs are used. |
2086 |
|
alldirs= |
2087 |
|
for found_dir in $rpathdirs; do |
2088 |
|
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
2089 |
|
done |
2090 |
|
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. |
2091 |
|
acl_save_libdir="$libdir" |
2092 |
|
libdir="$alldirs" |
2093 |
|
eval flag=\"$hardcode_libdir_flag_spec\" |
2094 |
|
libdir="$acl_save_libdir" |
2095 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
2096 |
|
else |
2097 |
|
dnl The -rpath options are cumulative. |
2098 |
|
for found_dir in $rpathdirs; do |
2099 |
|
acl_save_libdir="$libdir" |
2100 |
|
libdir="$found_dir" |
2101 |
|
eval flag=\"$hardcode_libdir_flag_spec\" |
2102 |
|
libdir="$acl_save_libdir" |
2103 |
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
2104 |
|
done |
2105 |
|
fi |
2106 |
|
fi |
2107 |
|
if test "X$ltrpathdirs" != "X"; then |
2108 |
|
dnl When using libtool, the option that works for both libraries and |
2109 |
|
dnl executables is -R. The -R options are cumulative. |
2110 |
|
for found_dir in $ltrpathdirs; do |
2111 |
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
2112 |
|
done |
2113 |
|
fi |
2114 |
]) |
]) |
2115 |
|
|
2116 |
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install |
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, |
2117 |
AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
dnl unless already present in VAR. |
2118 |
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes |
2119 |
AC_ENABLE_FAST_INSTALL(no)]) |
dnl contains two or three consecutive elements that belong together. |
2120 |
|
AC_DEFUN([AC_LIB_APPENDTOVAR], |
2121 |
# AC_LIBTOOL_PICMODE - implement the --with-pic flag |
[ |
2122 |
# Usage: AC_LIBTOOL_PICMODE[(MODE)] |
for element in [$2]; do |
2123 |
# Where MODE is either `yes' or `no'. If omitted, it defaults to |
haveit= |
2124 |
# `both'. |
for x in $[$1]; do |
2125 |
AC_DEFUN([AC_LIBTOOL_PICMODE], |
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
2126 |
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
if test "X$x" = "X$element"; then |
2127 |
pic_mode=ifelse($#,1,$1,default)]) |
haveit=yes |
2128 |
|
break |
|
|
|
|
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library |
|
|
AC_DEFUN([AC_PATH_TOOL_PREFIX], |
|
|
[AC_MSG_CHECKING([for $1]) |
|
|
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
|
|
[case $MAGIC_CMD in |
|
|
/*) |
|
|
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
|
|
;; |
|
|
?:/*) |
|
|
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. |
|
|
;; |
|
|
*) |
|
|
ac_save_MAGIC_CMD="$MAGIC_CMD" |
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
|
|
dnl $ac_dummy forces splitting on constant user-supplied paths. |
|
|
dnl POSIX.2 word splitting is done only on the output of word expansions, |
|
|
dnl not every word. This closes a longstanding sh security hole. |
|
|
ac_dummy="ifelse([$2], , $PATH, [$2])" |
|
|
for ac_dir in $ac_dummy; do |
|
|
test -z "$ac_dir" && ac_dir=. |
|
|
if test -f $ac_dir/$1; then |
|
|
lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
|
|
if test -n "$file_magic_test_file"; then |
|
|
case $deplibs_check_method in |
|
|
"file_magic "*) |
|
|
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
|
|
MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
|
|
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
|
|
egrep "$file_magic_regex" > /dev/null; then |
|
|
: |
|
|
else |
|
|
cat <<EOF 1>&2 |
|
|
|
|
|
*** Warning: the command libtool uses to detect shared libraries, |
|
|
*** $file_magic_cmd, produces output that libtool cannot recognize. |
|
|
*** The result is that libtool may fail to recognize shared libraries |
|
|
*** as such. This will affect the creation of libtool libraries that |
|
|
*** depend on shared libraries, but programs linked with such libtool |
|
|
*** libraries will work regardless of this problem. Nevertheless, you |
|
|
*** may want to report the problem to your system manager and/or to |
|
|
*** bug-libtool@gnu.org |
|
|
|
|
|
EOF |
|
|
fi ;; |
|
|
esac |
|
2129 |
fi |
fi |
2130 |
break |
done |
2131 |
|
if test -z "$haveit"; then |
2132 |
|
[$1]="${[$1]}${[$1]:+ }$element" |
2133 |
fi |
fi |
2134 |
done |
done |
|
IFS="$ac_save_ifs" |
|
|
MAGIC_CMD="$ac_save_MAGIC_CMD" |
|
|
;; |
|
|
esac]) |
|
|
MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
|
|
if test -n "$MAGIC_CMD"; then |
|
|
AC_MSG_RESULT($MAGIC_CMD) |
|
|
else |
|
|
AC_MSG_RESULT(no) |
|
|
fi |
|
2135 |
]) |
]) |
2136 |
|
|
2137 |
|
# lib-ld.m4 serial 1 (gettext-0.11) |
2138 |
# AC_PATH_MAGIC - find a file program which can recognise a shared library |
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. |
2139 |
AC_DEFUN([AC_PATH_MAGIC], |
dnl This file is free software, distributed under the terms of the GNU |
2140 |
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl |
dnl General Public License. As a special exception to the GNU General |
2141 |
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) |
dnl Public License, this file may be distributed as part of a program |
2142 |
if test -z "$lt_cv_path_MAGIC_CMD"; then |
dnl that contains a configuration script generated by Autoconf, under |
2143 |
if test -n "$ac_tool_prefix"; then |
dnl the same distribution terms as the rest of that program. |
2144 |
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) |
|
2145 |
else |
dnl Subroutines of libtool.m4, |
2146 |
MAGIC_CMD=: |
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision |
2147 |
fi |
dnl with libtool.m4. |
2148 |
fi |
|
2149 |
|
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. |
2150 |
|
AC_DEFUN([AC_LIB_PROG_LD_GNU], |
2151 |
|
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, |
2152 |
|
[# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
2153 |
|
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
2154 |
|
acl_cv_prog_gnu_ld=yes |
2155 |
|
else |
2156 |
|
acl_cv_prog_gnu_ld=no |
2157 |
|
fi]) |
2158 |
|
with_gnu_ld=$acl_cv_prog_gnu_ld |
2159 |
]) |
]) |
2160 |
|
|
2161 |
|
dnl From libtool-1.4. Sets the variable LD. |
2162 |
# AC_PROG_LD - find the path to the GNU or non-GNU linker |
AC_DEFUN([AC_LIB_PROG_LD], |
|
AC_DEFUN([AC_PROG_LD], |
|
2163 |
[AC_ARG_WITH(gnu-ld, |
[AC_ARG_WITH(gnu-ld, |
2164 |
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
2165 |
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
2166 |
AC_REQUIRE([AC_PROG_CC])dnl |
AC_REQUIRE([AC_PROG_CC])dnl |
2167 |
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
|
AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
|
|
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
|
2168 |
ac_prog=ld |
ac_prog=ld |
2169 |
if test "$GCC" = yes; then |
if test "$GCC" = yes; then |
2170 |
# Check if gcc -print-prog-name=ld gives a path. |
# Check if gcc -print-prog-name=ld gives a path. |
2178 |
esac |
esac |
2179 |
case $ac_prog in |
case $ac_prog in |
2180 |
# Accept absolute paths. |
# Accept absolute paths. |
2181 |
[[\\/]]* | [[A-Za-z]]:[[\\/]]*) |
[[\\/]* | [A-Za-z]:[\\/]*)] |
2182 |
re_direlt='/[[^/]][[^/]]*/\.\./' |
[re_direlt='/[^/][^/]*/\.\./'] |
2183 |
# Canonicalize the path of ld |
# Canonicalize the path of ld |
2184 |
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
2185 |
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
2201 |
else |
else |
2202 |
AC_MSG_CHECKING([for non-GNU ld]) |
AC_MSG_CHECKING([for non-GNU ld]) |
2203 |
fi |
fi |
2204 |
AC_CACHE_VAL(lt_cv_path_LD, |
AC_CACHE_VAL(acl_cv_path_LD, |
2205 |
[if test -z "$LD"; then |
[if test -z "$LD"; then |
2206 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
2207 |
for ac_dir in $PATH; do |
for ac_dir in $PATH; do |
2208 |
test -z "$ac_dir" && ac_dir=. |
test -z "$ac_dir" && ac_dir=. |
2209 |
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
2210 |
lt_cv_path_LD="$ac_dir/$ac_prog" |
acl_cv_path_LD="$ac_dir/$ac_prog" |
2211 |
# Check to see if the program is GNU ld. I'd rather use --version, |
# Check to see if the program is GNU ld. I'd rather use --version, |
2212 |
# but apparently some GNU ld's only accept -v. |
# but apparently some GNU ld's only accept -v. |
2213 |
# Break only if it was the GNU/non-GNU ld that we prefer. |
# Break only if it was the GNU/non-GNU ld that we prefer. |
2214 |
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
2215 |
test "$with_gnu_ld" != no && break |
test "$with_gnu_ld" != no && break |
2216 |
else |
else |
2217 |
test "$with_gnu_ld" != yes && break |
test "$with_gnu_ld" != yes && break |
2220 |
done |
done |
2221 |
IFS="$ac_save_ifs" |
IFS="$ac_save_ifs" |
2222 |
else |
else |
2223 |
lt_cv_path_LD="$LD" # Let the user override the test with a path. |
acl_cv_path_LD="$LD" # Let the user override the test with a path. |
2224 |
fi]) |
fi]) |
2225 |
LD="$lt_cv_path_LD" |
LD="$acl_cv_path_LD" |
2226 |
if test -n "$LD"; then |
if test -n "$LD"; then |
2227 |
AC_MSG_RESULT($LD) |
AC_MSG_RESULT($LD) |
2228 |
else |
else |
2229 |
AC_MSG_RESULT(no) |
AC_MSG_RESULT(no) |
2230 |
fi |
fi |
2231 |
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
2232 |
AC_PROG_LD_GNU |
AC_LIB_PROG_LD_GNU |
2233 |
]) |
]) |
2234 |
|
|
2235 |
# AC_PROG_LD_GNU - |
# iconv.m4 serial AM4 (gettext-0.11.3) |
2236 |
AC_DEFUN([AC_PROG_LD_GNU], |
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. |
2237 |
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
dnl This file is free software, distributed under the terms of the GNU |
2238 |
[# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
dnl General Public License. As a special exception to the GNU General |
2239 |
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
dnl Public License, this file may be distributed as part of a program |
2240 |
lt_cv_prog_gnu_ld=yes |
dnl that contains a configuration script generated by Autoconf, under |
2241 |
else |
dnl the same distribution terms as the rest of that program. |
|
lt_cv_prog_gnu_ld=no |
|
|
fi]) |
|
|
with_gnu_ld=$lt_cv_prog_gnu_ld |
|
|
]) |
|
2242 |
|
|
2243 |
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker |
dnl From Bruno Haible. |
|
# -- PORTME Some linkers may need a different reload flag. |
|
|
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], |
|
|
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, |
|
|
[lt_cv_ld_reload_flag='-r']) |
|
|
reload_flag=$lt_cv_ld_reload_flag |
|
|
test -n "$reload_flag" && reload_flag=" $reload_flag" |
|
|
]) |
|
|
|
|
|
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies |
|
|
# -- PORTME fill in with the dynamic library characteristics |
|
|
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], |
|
|
[AC_CACHE_CHECK([how to recognise dependant libraries], |
|
|
lt_cv_deplibs_check_method, |
|
|
[lt_cv_file_magic_cmd='$MAGIC_CMD' |
|
|
lt_cv_file_magic_test_file= |
|
|
lt_cv_deplibs_check_method='unknown' |
|
|
# Need to set the preceding variable on all platforms that support |
|
|
# interlibrary dependencies. |
|
|
# 'none' -- dependencies not supported. |
|
|
# `unknown' -- same as none, but documents that we really don't know. |
|
|
# 'pass_all' -- all dependencies passed with no checks. |
|
|
# 'test_compile' -- check by making test program. |
|
|
# 'file_magic [[regex]]' -- check by looking for files in library path |
|
|
# which responds to the $file_magic_cmd with a given egrep regex. |
|
|
# If you have `file' or equivalent on your system and you're not sure |
|
|
# whether `pass_all' will *always* work, you probably want this one. |
|
|
|
|
|
case $host_os in |
|
|
aix4* | aix5*) |
|
|
lt_cv_deplibs_check_method=pass_all |
|
|
;; |
|
2244 |
|
|
2245 |
beos*) |
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], |
2246 |
lt_cv_deplibs_check_method=pass_all |
[ |
2247 |
;; |
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. |
2248 |
|
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
2249 |
bsdi4*) |
AC_REQUIRE([AC_LIB_RPATH]) |
|
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
|
|
lt_cv_file_magic_cmd='/usr/bin/file -L' |
|
|
lt_cv_file_magic_test_file=/shlib/libc.so |
|
|
;; |
|
2250 |
|
|
2251 |
cygwin* | mingw* | pw32*) |
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV |
2252 |
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
dnl accordingly. |
2253 |
lt_cv_file_magic_cmd='$OBJDUMP -f' |
AC_LIB_LINKFLAGS_BODY([iconv]) |
2254 |
;; |
]) |
2255 |
|
|
2256 |
darwin* | rhapsody*) |
AC_DEFUN([AM_ICONV_LINK], |
2257 |
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' |
[ |
2258 |
lt_cv_file_magic_cmd='/usr/bin/file -L' |
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and |
2259 |
case "$host_os" in |
dnl those with the standalone portable GNU libiconv installed). |
|
rhapsody* | darwin1.[[012]]) |
|
|
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` |
|
|
;; |
|
|
*) # Darwin 1.3 on |
|
|
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' |
|
|
;; |
|
|
esac |
|
|
;; |
|
2260 |
|
|
2261 |
freebsd*) |
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV |
2262 |
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
dnl accordingly. |
2263 |
case $host_cpu in |
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) |
2264 |
i*86 ) |
|
2265 |
# Not sure whether the presence of OpenBSD here was a mistake. |
dnl Add $INCICONV to CPPFLAGS before performing the following checks, |
2266 |
# Let's accept both of them until this is cleared up. |
dnl because if the user has installed libiconv and not disabled its use |
2267 |
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' |
dnl via --without-libiconv-prefix, he wants to use it. The first |
2268 |
lt_cv_file_magic_cmd=/usr/bin/file |
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. |
2269 |
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
am_save_CPPFLAGS="$CPPFLAGS" |
2270 |
;; |
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) |
2271 |
esac |
|
2272 |
else |
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ |
2273 |
lt_cv_deplibs_check_method=pass_all |
am_cv_func_iconv="no, consider installing GNU libiconv" |
2274 |
|
am_cv_lib_iconv=no |
2275 |
|
AC_TRY_LINK([#include <stdlib.h> |
2276 |
|
#include <iconv.h>], |
2277 |
|
[iconv_t cd = iconv_open("",""); |
2278 |
|
iconv(cd,NULL,NULL,NULL,NULL); |
2279 |
|
iconv_close(cd);], |
2280 |
|
am_cv_func_iconv=yes) |
2281 |
|
if test "$am_cv_func_iconv" != yes; then |
2282 |
|
am_save_LIBS="$LIBS" |
2283 |
|
LIBS="$LIBS $LIBICONV" |
2284 |
|
AC_TRY_LINK([#include <stdlib.h> |
2285 |
|
#include <iconv.h>], |
2286 |
|
[iconv_t cd = iconv_open("",""); |
2287 |
|
iconv(cd,NULL,NULL,NULL,NULL); |
2288 |
|
iconv_close(cd);], |
2289 |
|
am_cv_lib_iconv=yes |
2290 |
|
am_cv_func_iconv=yes) |
2291 |
|
LIBS="$am_save_LIBS" |
2292 |
|
fi |
2293 |
|
]) |
2294 |
|
if test "$am_cv_func_iconv" = yes; then |
2295 |
|
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) |
2296 |
fi |
fi |
2297 |
;; |
if test "$am_cv_lib_iconv" = yes; then |
2298 |
|
AC_MSG_CHECKING([how to link with libiconv]) |
2299 |
gnu*) |
AC_MSG_RESULT([$LIBICONV]) |
|
lt_cv_deplibs_check_method=pass_all |
|
|
;; |
|
|
|
|
|
hpux10.20*|hpux11*) |
|
|
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
|
|
lt_cv_file_magic_cmd=/usr/bin/file |
|
|
lt_cv_file_magic_test_file=/usr/lib/libc.sl |
|
|
;; |
|
|
|
|
|
irix5* | irix6*) |
|
|
case $host_os in |
|
|
irix5*) |
|
|
# this will be overridden with pass_all, but let us keep it just in case |
|
|
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" |
|
|
;; |
|
|
*) |
|
|
case $LD in |
|
|
*-32|*"-32 ") libmagic=32-bit;; |
|
|
*-n32|*"-n32 ") libmagic=N32;; |
|
|
*-64|*"-64 ") libmagic=64-bit;; |
|
|
*) libmagic=never-match;; |
|
|
esac |
|
|
# this will be overridden with pass_all, but let us keep it just in case |
|
|
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" |
|
|
;; |
|
|
esac |
|
|
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` |
|
|
lt_cv_deplibs_check_method=pass_all |
|
|
;; |
|
|
|
|
|
# This must be Linux ELF. |
|
|
linux-gnu*) |
|
|
case $host_cpu in |
|
|
alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) |
|
|
lt_cv_deplibs_check_method=pass_all ;; |
|
|
*) |
|
|
# glibc up to 2.1.1 does not perform some relocations on ARM |
|
|
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; |
|
|
esac |
|
|
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
|
|
;; |
|
|
|
|
|
netbsd*) |
|
|
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
|
|
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' |
|
2300 |
else |
else |
2301 |
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' |
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV |
2302 |
fi |
dnl either. |
2303 |
;; |
CPPFLAGS="$am_save_CPPFLAGS" |
2304 |
|
LIBICONV= |
2305 |
newos6*) |
LTLIBICONV= |
|
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
|
|
lt_cv_file_magic_cmd=/usr/bin/file |
|
|
lt_cv_file_magic_test_file=/usr/lib/libnls.so |
|
|
;; |
|
|
|
|
|
openbsd*) |
|
|
lt_cv_file_magic_cmd=/usr/bin/file |
|
|
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
|
|
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
|
|
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' |
|
|
else |
|
|
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' |
|
|
fi |
|
|
;; |
|
|
|
|
|
osf3* | osf4* | osf5*) |
|
|
# this will be overridden with pass_all, but let us keep it just in case |
|
|
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' |
|
|
lt_cv_file_magic_test_file=/shlib/libc.so |
|
|
lt_cv_deplibs_check_method=pass_all |
|
|
;; |
|
|
|
|
|
sco3.2v5*) |
|
|
lt_cv_deplibs_check_method=pass_all |
|
|
;; |
|
|
|
|
|
solaris*) |
|
|
lt_cv_deplibs_check_method=pass_all |
|
|
lt_cv_file_magic_test_file=/lib/libc.so |
|
|
;; |
|
|
|
|
|
sysv5uw[[78]]* | sysv4*uw2*) |
|
|
lt_cv_deplibs_check_method=pass_all |
|
|
;; |
|
|
|
|
|
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
|
|
case $host_vendor in |
|
|
motorola) |
|
|
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' |
|
|
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
|
|
;; |
|
|
ncr) |
|
|
lt_cv_deplibs_check_method=pass_all |
|
|
;; |
|
|
sequent) |
|
|
lt_cv_file_magic_cmd='/bin/file' |
|
|
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
|
|
;; |
|
|
sni) |
|
|
lt_cv_file_magic_cmd='/bin/file' |
|
|
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
|
|
lt_cv_file_magic_test_file=/lib/libc.so |
|
|
;; |
|
|
esac |
|
|
;; |
|
|
esac |
|
|
]) |
|
|
file_magic_cmd=$lt_cv_file_magic_cmd |
|
|
deplibs_check_method=$lt_cv_deplibs_check_method |
|
|
]) |
|
|
|
|
|
|
|
|
# AC_PROG_NM - find the path to a BSD-compatible name lister |
|
|
AC_DEFUN([AC_PROG_NM], |
|
|
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
|
|
AC_MSG_CHECKING([for BSD-compatible nm]) |
|
|
AC_CACHE_VAL(lt_cv_path_NM, |
|
|
[if test -n "$NM"; then |
|
|
# Let the user override the test. |
|
|
lt_cv_path_NM="$NM" |
|
|
else |
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
|
|
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
|
|
test -z "$ac_dir" && ac_dir=. |
|
|
tmp_nm=$ac_dir/${ac_tool_prefix}nm |
|
|
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then |
|
|
# Check to see if the nm accepts a BSD-compat flag. |
|
|
# Adding the `sed 1q' prevents false positives on HP-UX, which says: |
|
|
# nm: unknown option "B" ignored |
|
|
# Tru64's nm complains that /dev/null is an invalid object file |
|
|
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then |
|
|
lt_cv_path_NM="$tmp_nm -B" |
|
|
break |
|
|
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
|
|
lt_cv_path_NM="$tmp_nm -p" |
|
|
break |
|
|
else |
|
|
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
|
|
continue # so that we can try to find one that supports BSD flags |
|
|
fi |
|
2306 |
fi |
fi |
2307 |
done |
AC_SUBST(LIBICONV) |
2308 |
IFS="$ac_save_ifs" |
AC_SUBST(LTLIBICONV) |
|
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
|
|
fi]) |
|
|
NM="$lt_cv_path_NM" |
|
|
AC_MSG_RESULT([$NM]) |
|
2309 |
]) |
]) |
2310 |
|
|
2311 |
# AC_CHECK_LIBM - check for math library |
AC_DEFUN([AM_ICONV], |
2312 |
AC_DEFUN([AC_CHECK_LIBM], |
[ |
2313 |
[AC_REQUIRE([AC_CANONICAL_HOST])dnl |
AM_ICONV_LINK |
2314 |
LIBM= |
if test "$am_cv_func_iconv" = yes; then |
2315 |
case $host in |
AC_MSG_CHECKING([for iconv declaration]) |
2316 |
*-*-beos* | *-*-cygwin* | *-*-pw32*) |
AC_CACHE_VAL(am_cv_proto_iconv, [ |
2317 |
# These system don't have libm |
AC_TRY_COMPILE([ |
2318 |
;; |
#include <stdlib.h> |
2319 |
*-ncr-sysv4.3*) |
#include <iconv.h> |
2320 |
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
extern |
2321 |
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") |
#ifdef __cplusplus |
2322 |
;; |
"C" |
2323 |
*) |
#endif |
2324 |
AC_CHECK_LIB(m, main, LIBM="-lm") |
#if defined(__STDC__) || defined(__cplusplus) |
2325 |
;; |
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); |
2326 |
esac |
#else |
2327 |
]) |
size_t iconv(); |
2328 |
|
#endif |
2329 |
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for |
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") |
2330 |
# the libltdl convenience library and INCLTDL to the include flags for |
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);"]) |
2331 |
# the libltdl header and adds --enable-ltdl-convenience to the |
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
2332 |
# configure arguments. Note that LIBLTDL and INCLTDL are not |
AC_MSG_RESULT([$]{ac_t:- |
2333 |
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not |
}[$]am_cv_proto_iconv) |
2334 |
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed |
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, |
2335 |
# with '${top_builddir}/' and INCLTDL will be prefixed with |
[Define as const if the declaration of iconv() needs const.]) |
|
# '${top_srcdir}/' (note the single quotes!). If your package is not |
|
|
# flat and you're not using automake, define top_builddir and |
|
|
# top_srcdir appropriately in the Makefiles. |
|
|
AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
|
|
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
|
|
case $enable_ltdl_convenience in |
|
|
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
|
|
"") enable_ltdl_convenience=yes |
|
|
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
|
|
esac |
|
|
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
|
|
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
|
|
]) |
|
|
|
|
|
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for |
|
|
# the libltdl installable library and INCLTDL to the include flags for |
|
|
# the libltdl header and adds --enable-ltdl-install to the configure |
|
|
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is |
|
|
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed |
|
|
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will |
|
|
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed |
|
|
# with '${top_srcdir}/' (note the single quotes!). If your package is |
|
|
# not flat and you're not using automake, define top_builddir and |
|
|
# top_srcdir appropriately in the Makefiles. |
|
|
# In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
|
|
AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
|
|
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
|
|
AC_CHECK_LIB(ltdl, main, |
|
|
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
|
|
[if test x"$enable_ltdl_install" = xno; then |
|
|
AC_MSG_WARN([libltdl not installed, but installation disabled]) |
|
|
else |
|
|
enable_ltdl_install=yes |
|
|
fi |
|
|
]) |
|
|
if test x"$enable_ltdl_install" = x"yes"; then |
|
|
ac_configure_args="$ac_configure_args --enable-ltdl-install" |
|
|
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
|
|
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
|
|
else |
|
|
ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
|
|
LIBLTDL="-lltdl" |
|
|
INCLTDL= |
|
2336 |
fi |
fi |
2337 |
]) |
]) |
2338 |
|
|
2339 |
# old names |
# progtest.m4 serial 2 (gettext-0.10.40) |
2340 |
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. |
2341 |
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
dnl This file is free software, distributed under the terms of the GNU |
2342 |
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
dnl General Public License. As a special exception to the GNU General |
2343 |
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
dnl Public License, this file may be distributed as part of a program |
2344 |
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
dnl that contains a configuration script generated by Autoconf, under |
2345 |
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) |
dnl the same distribution terms as the rest of that program. |
2346 |
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) |
dnl |
2347 |
|
dnl This file can can be used in projects which are not available under |
2348 |
# This is just to silence aclocal about the macro not being used |
dnl the GNU General Public License or the GNU Library General Public |
2349 |
ifelse([AC_DISABLE_FAST_INSTALL]) |
dnl License but which still want to provide support for the GNU gettext |
2350 |
|
dnl functionality. |
2351 |
# Macro to add for using GNU gettext. |
dnl Please note that the actual code of the GNU gettext library is covered |
2352 |
# Ulrich Drepper <drepper@cygnus.com>, 1995. |
dnl by the GNU Library General Public License, and the rest of the GNU |
2353 |
# |
dnl gettext package package is covered by the GNU General Public License. |
2354 |
# Modified to never use included libintl. |
dnl They are *not* in the public domain. |
|
# Owen Taylor <otaylor@redhat.com>, 12/15/1998 |
|
|
# |
|
|
# |
|
|
# This file can be copied and used freely without restrictions. It can |
|
|
# be used in projects which are not available under the GNU Public License |
|
|
# but which still want to provide support for the GNU gettext functionality. |
|
|
# Please note that the actual code is *not* freely available. |
|
|
|
|
|
# serial 5 |
|
|
|
|
|
AC_DEFUN([AM_GNOME_WITH_NLS], |
|
|
[AC_MSG_CHECKING([whether NLS is requested]) |
|
|
dnl Default is enabled NLS |
|
|
AC_ARG_ENABLE(nls, |
|
|
[ --disable-nls do not use Native Language Support], |
|
|
USE_NLS=$enableval, USE_NLS=yes) |
|
|
AC_MSG_RESULT($USE_NLS) |
|
|
AC_SUBST(USE_NLS) |
|
|
|
|
|
BUILD_INCLUDED_LIBINTL=no |
|
|
USE_INCLUDED_LIBINTL=no |
|
|
|
|
|
dnl If we use NLS figure out what method |
|
|
if test "$USE_NLS" = "yes"; then |
|
|
# AC_DEFINE(ENABLE_NLS) |
|
|
# AC_MSG_CHECKING([whether included gettext is requested]) |
|
|
# AC_ARG_WITH(included-gettext, |
|
|
# [ --with-included-gettext use the GNU gettext library included here], |
|
|
# nls_cv_force_use_gnu_gettext=$withval, |
|
|
# nls_cv_force_use_gnu_gettext=no) |
|
|
# AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) |
|
|
nls_cv_force_use_gnu_gettext="no" |
|
|
|
|
|
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" |
|
|
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then |
|
|
dnl User does not insist on using GNU NLS library. Figure out what |
|
|
dnl to use. If gettext or catgets are available (in this order) we |
|
|
dnl use this. Else we have to fall back to GNU NLS library. |
|
|
dnl catgets is only used if permitted by option --with-catgets. |
|
|
nls_cv_header_intl= |
|
|
nls_cv_header_libgt= |
|
|
CATOBJEXT=NONE |
|
|
|
|
|
AC_CHECK_HEADER(libintl.h, |
|
|
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, |
|
|
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], |
|
|
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) |
|
|
|
|
|
if test "$gt_cv_func_gettext_libc" != "yes"; then |
|
|
AC_CHECK_LIB(intl, bindtextdomain, |
|
|
[AC_CACHE_CHECK([for gettext in libintl], |
|
|
gt_cv_func_gettext_libintl, |
|
|
[AC_CHECK_LIB(intl, gettext, |
|
|
gt_cv_func_gettext_libintl=yes, |
|
|
gt_cv_func_gettext_libintl=no)], |
|
|
gt_cv_func_gettext_libintl=no)]) |
|
|
fi |
|
|
|
|
|
if test "$gt_cv_func_gettext_libc" = "yes" \ |
|
|
|| test "$gt_cv_func_gettext_libintl" = "yes"; then |
|
|
AC_DEFINE(HAVE_GETTEXT) |
|
|
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
|
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl |
|
|
if test "$MSGFMT" != "no"; then |
|
|
AC_CHECK_FUNCS(dcgettext) |
|
|
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
|
|
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
|
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
|
|
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; |
|
|
return _nl_msg_cat_cntr], |
|
|
[CATOBJEXT=.gmo |
|
|
DATADIRNAME=share], |
|
|
[CATOBJEXT=.mo |
|
|
DATADIRNAME=lib]) |
|
|
INSTOBJEXT=.mo |
|
|
fi |
|
|
fi |
|
|
|
|
|
# Added by Martin Baulig 12/15/98 for libc5 systems |
|
|
if test "$gt_cv_func_gettext_libc" != "yes" \ |
|
|
&& test "$gt_cv_func_gettext_libintl" = "yes"; then |
|
|
INTLLIBS=-lintl |
|
|
LIBS=`echo $LIBS | sed -e 's/-lintl//'` |
|
|
fi |
|
|
]) |
|
|
|
|
|
if test "$CATOBJEXT" = "NONE"; then |
|
|
AC_MSG_CHECKING([whether catgets can be used]) |
|
|
AC_ARG_WITH(catgets, |
|
|
[ --with-catgets use catgets functions if available], |
|
|
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) |
|
|
AC_MSG_RESULT($nls_cv_use_catgets) |
|
|
|
|
|
if test "$nls_cv_use_catgets" = "yes"; then |
|
|
dnl No gettext in C library. Try catgets next. |
|
|
AC_CHECK_LIB(i, main) |
|
|
AC_CHECK_FUNC(catgets, |
|
|
[AC_DEFINE(HAVE_CATGETS) |
|
|
INTLOBJS="\$(CATOBJS)" |
|
|
AC_PATH_PROG(GENCAT, gencat, no)dnl |
|
|
# if test "$GENCAT" != "no"; then |
|
|
# AC_PATH_PROG(GMSGFMT, gmsgfmt, no) |
|
|
# if test "$GMSGFMT" = "no"; then |
|
|
# AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, |
|
|
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) |
|
|
# fi |
|
|
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
|
|
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
|
|
# USE_INCLUDED_LIBINTL=yes |
|
|
# CATOBJEXT=.cat |
|
|
# INSTOBJEXT=.cat |
|
|
# DATADIRNAME=lib |
|
|
# INTLDEPS='$(top_builddir)/intl/libintl.a' |
|
|
# INTLLIBS=$INTLDEPS |
|
|
# LIBS=`echo $LIBS | sed -e 's/-lintl//'` |
|
|
# nls_cv_header_intl=intl/libintl.h |
|
|
# nls_cv_header_libgt=intl/libgettext.h |
|
|
# fi |
|
|
]) |
|
|
fi |
|
|
fi |
|
|
|
|
|
if test "$CATOBJEXT" = "NONE"; then |
|
|
dnl Neither gettext nor catgets in included in the C library. |
|
|
dnl Fall back on GNU gettext library. |
|
|
nls_cv_use_gnu_gettext=yes |
|
|
fi |
|
|
fi |
|
|
|
|
|
if test "$nls_cv_use_gnu_gettext" != "yes"; then |
|
|
AC_DEFINE(ENABLE_NLS) |
|
|
else |
|
|
# Unset this variable since we use the non-zero value as a flag. |
|
|
CATOBJEXT= |
|
|
# dnl Mark actions used to generate GNU NLS library. |
|
|
# INTLOBJS="\$(GETTOBJS)" |
|
|
# AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
|
|
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) |
|
|
# AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
|
|
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
|
|
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
|
|
# AC_SUBST(MSGFMT) |
|
|
# USE_INCLUDED_LIBINTL=yes |
|
|
# CATOBJEXT=.gmo |
|
|
# INSTOBJEXT=.mo |
|
|
# DATADIRNAME=share |
|
|
# INTLDEPS='$(top_builddir)/intl/libintl.a' |
|
|
# INTLLIBS=$INTLDEPS |
|
|
# LIBS=`echo $LIBS | sed -e 's/-lintl//'` |
|
|
# nls_cv_header_intl=intl/libintl.h |
|
|
# nls_cv_header_libgt=intl/libgettext.h |
|
|
fi |
|
|
|
|
|
dnl Test whether we really found GNU xgettext. |
|
|
if test "$XGETTEXT" != ":"; then |
|
|
dnl If it is no GNU xgettext we define it as : so that the |
|
|
dnl Makefiles still can work. |
|
|
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
|
|
: ; |
|
|
else |
|
|
AC_MSG_RESULT( |
|
|
[found xgettext program is not GNU xgettext; ignore it]) |
|
|
XGETTEXT=":" |
|
|
fi |
|
|
fi |
|
|
|
|
|
# We need to process the po/ directory. |
|
|
POSUB=po |
|
|
else |
|
|
DATADIRNAME=share |
|
|
nls_cv_header_intl=intl/libintl.h |
|
|
nls_cv_header_libgt=intl/libgettext.h |
|
|
fi |
|
|
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) |
|
|
AC_OUTPUT_COMMANDS( |
|
|
[case "$CONFIG_FILES" in *po/Makefile.in*) |
|
|
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile |
|
|
esac]) |
|
|
|
|
|
|
|
|
# # If this is used in GNU gettext we have to set USE_NLS to `yes' |
|
|
# # because some of the sources are only built for this goal. |
|
|
# if test "$PACKAGE" = gettext; then |
|
|
# USE_NLS=yes |
|
|
# USE_INCLUDED_LIBINTL=yes |
|
|
# fi |
|
|
|
|
|
dnl These rules are solely for the distribution goal. While doing this |
|
|
dnl we only have to keep exactly one list of the available catalogs |
|
|
dnl in configure.in. |
|
|
for lang in $ALL_LINGUAS; do |
|
|
GMOFILES="$GMOFILES $lang.gmo" |
|
|
POFILES="$POFILES $lang.po" |
|
|
done |
|
|
|
|
|
dnl Make all variables we use known to autoconf. |
|
|
AC_SUBST(BUILD_INCLUDED_LIBINTL) |
|
|
AC_SUBST(USE_INCLUDED_LIBINTL) |
|
|
AC_SUBST(CATALOGS) |
|
|
AC_SUBST(CATOBJEXT) |
|
|
AC_SUBST(DATADIRNAME) |
|
|
AC_SUBST(GMOFILES) |
|
|
AC_SUBST(INSTOBJEXT) |
|
|
AC_SUBST(INTLDEPS) |
|
|
AC_SUBST(INTLLIBS) |
|
|
AC_SUBST(INTLOBJS) |
|
|
AC_SUBST(POFILES) |
|
|
AC_SUBST(POSUB) |
|
|
]) |
|
|
|
|
|
AC_DEFUN([AM_GNOME_GETTEXT], |
|
|
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
|
|
AC_REQUIRE([AC_PROG_CC])dnl |
|
|
AC_REQUIRE([AC_PROG_RANLIB])dnl |
|
|
AC_REQUIRE([AC_ISC_POSIX])dnl |
|
|
AC_REQUIRE([AC_HEADER_STDC])dnl |
|
|
AC_REQUIRE([AC_C_CONST])dnl |
|
|
AC_REQUIRE([AC_C_INLINE])dnl |
|
|
AC_REQUIRE([AC_TYPE_OFF_T])dnl |
|
|
AC_REQUIRE([AC_TYPE_SIZE_T])dnl |
|
|
AC_REQUIRE([AC_FUNC_ALLOCA])dnl |
|
|
AC_REQUIRE([AC_FUNC_MMAP])dnl |
|
|
|
|
|
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ |
|
|
unistd.h sys/param.h]) |
|
|
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ |
|
|
strdup __argz_count __argz_stringify __argz_next]) |
|
|
|
|
|
if test "${ac_cv_func_stpcpy+set}" != "set"; then |
|
|
AC_CHECK_FUNCS(stpcpy) |
|
|
fi |
|
|
if test "${ac_cv_func_stpcpy}" = "yes"; then |
|
|
AC_DEFINE(HAVE_STPCPY) |
|
|
fi |
|
|
|
|
|
AM_LC_MESSAGES |
|
|
AM_GNOME_WITH_NLS |
|
|
|
|
|
if test "x$CATOBJEXT" != "x"; then |
|
|
if test "x$ALL_LINGUAS" = "x"; then |
|
|
LINGUAS= |
|
|
else |
|
|
AC_MSG_CHECKING(for catalogs to be installed) |
|
|
NEW_LINGUAS= |
|
|
if test "x$LINGUAS" = "x"; then |
|
|
LINGUAS=$ALL_LINGUAS |
|
|
fi |
|
|
for lang in $LINGUAS; do |
|
|
case "$ALL_LINGUAS" in |
|
|
*\ $lang\ *|$lang\ *|*\ $lang) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; |
|
|
esac |
|
|
done |
|
|
LINGUAS=$NEW_LINGUAS |
|
|
AC_MSG_RESULT($LINGUAS) |
|
|
fi |
|
|
|
|
|
dnl Construct list of names of catalog files to be constructed. |
|
|
if test -n "$LINGUAS"; then |
|
|
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
|
|
fi |
|
|
fi |
|
|
|
|
|
dnl The reference to <locale.h> in the installed <libintl.h> file |
|
|
dnl must be resolved because we cannot expect the users of this |
|
|
dnl to define HAVE_LOCALE_H. |
|
|
if test $ac_cv_header_locale_h = yes; then |
|
|
INCLUDE_LOCALE_H="#include <locale.h>" |
|
|
else |
|
|
INCLUDE_LOCALE_H="\ |
|
|
/* The system does not provide the header <locale.h>. Take care yourself. */" |
|
|
fi |
|
|
AC_SUBST(INCLUDE_LOCALE_H) |
|
|
|
|
|
dnl Determine which catalog format we have (if any is needed) |
|
|
dnl For now we know about two different formats: |
|
|
dnl Linux libc-5 and the normal X/Open format |
|
|
test -d intl || mkdir intl |
|
|
if test "$CATOBJEXT" = ".cat"; then |
|
|
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) |
|
|
|
|
|
dnl Transform the SED scripts while copying because some dumb SEDs |
|
|
dnl cannot handle comments. |
|
|
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed |
|
|
fi |
|
|
dnl po2tbl.sed is always needed. |
|
|
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ |
|
|
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed |
|
|
|
|
|
dnl In the intl/Makefile.in we have a special dependency which makes |
|
|
dnl only sense for gettext. We comment this out for non-gettext |
|
|
dnl packages. |
|
|
if test "$PACKAGE" = "gettext"; then |
|
|
GT_NO="#NO#" |
|
|
GT_YES= |
|
|
else |
|
|
GT_NO= |
|
|
GT_YES="#YES#" |
|
|
fi |
|
|
AC_SUBST(GT_NO) |
|
|
AC_SUBST(GT_YES) |
|
|
|
|
|
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
|
|
dnl find the mkinstalldirs script in another subdir but ($top_srcdir). |
|
|
dnl Try to locate is. |
|
|
MKINSTALLDIRS= |
|
|
if test -n "$ac_aux_dir"; then |
|
|
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
|
|
fi |
|
|
if test -z "$MKINSTALLDIRS"; then |
|
|
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
|
|
fi |
|
|
AC_SUBST(MKINSTALLDIRS) |
|
|
|
|
|
dnl *** For now the libtool support in intl/Makefile is not for real. |
|
|
l= |
|
|
AC_SUBST(l) |
|
|
|
|
|
dnl Generate list of files to be processed by xgettext which will |
|
|
dnl be included in po/Makefile. |
|
|
test -d po || mkdir po |
|
|
if test "x$srcdir" != "x."; then |
|
|
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then |
|
|
posrcprefix="$srcdir/" |
|
|
else |
|
|
posrcprefix="../$srcdir/" |
|
|
fi |
|
|
else |
|
|
posrcprefix="../" |
|
|
fi |
|
|
rm -f po/POTFILES |
|
|
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ |
|
|
< $srcdir/po/POTFILES.in > po/POTFILES |
|
|
]) |
|
2355 |
|
|
2356 |
|
dnl Authors: |
2357 |
|
dnl Ulrich Drepper <drepper@cygnus.com>, 1996. |
2358 |
|
|
2359 |
# Search path for a program which passes the given test. |
# Search path for a program which passes the given test. |
|
# Ulrich Drepper <drepper@cygnus.com>, 1996. |
|
|
# |
|
|
# This file can be copied and used freely without restrictions. It can |
|
|
# be used in projects which are not available under the GNU General Public |
|
|
# License or the GNU Library General Public License but which still want |
|
|
# to provide support for the GNU gettext functionality. |
|
|
# Please note that the actual code of the GNU gettext library is covered |
|
|
# by the GNU Library General Public License, and the rest of the GNU |
|
|
# gettext package package is covered by the GNU General Public License. |
|
|
# They are *not* in the public domain. |
|
|
|
|
|
# serial 2 |
|
2360 |
|
|
2361 |
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
2362 |
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
2396 |
AC_SUBST($1)dnl |
AC_SUBST($1)dnl |
2397 |
]) |
]) |
2398 |
|
|
2399 |
#serial 1 |
# isc-posix.m4 serial 2 (gettext-0.11.2) |
2400 |
|
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. |
2401 |
|
dnl This file is free software, distributed under the terms of the GNU |
2402 |
|
dnl General Public License. As a special exception to the GNU General |
2403 |
|
dnl Public License, this file may be distributed as part of a program |
2404 |
|
dnl that contains a configuration script generated by Autoconf, under |
2405 |
|
dnl the same distribution terms as the rest of that program. |
2406 |
|
|
2407 |
|
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. |
2408 |
|
|
2409 |
# This test replaces the one in autoconf. |
# This test replaces the one in autoconf. |
2410 |
# Currently this macro should have the same name as the autoconf macro |
# Currently this macro should have the same name as the autoconf macro |
2411 |
# because gettext's gettext.m4 (distributed in the automake package) |
# because gettext's gettext.m4 (distributed in the automake package) |
2423 |
] |
] |
2424 |
) |
) |
2425 |
|
|
2426 |
# Check whether LC_MESSAGES is available in <locale.h>. |
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) |
2427 |
# Ulrich Drepper <drepper@cygnus.com>, 1995. |
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. |
2428 |
# |
dnl This file is free software, distributed under the terms of the GNU |
2429 |
# This file can be copied and used freely without restrictions. It can |
dnl General Public License. As a special exception to the GNU General |
2430 |
# be used in projects which are not available under the GNU General Public |
dnl Public License, this file may be distributed as part of a program |
2431 |
# License or the GNU Library General Public License but which still want |
dnl that contains a configuration script generated by Autoconf, under |
2432 |
# to provide support for the GNU gettext functionality. |
dnl the same distribution terms as the rest of that program. |
|
# Please note that the actual code of the GNU gettext library is covered |
|
|
# by the GNU Library General Public License, and the rest of the GNU |
|
|
# gettext package package is covered by the GNU General Public License. |
|
|
# They are *not* in the public domain. |
|
2433 |
|
|
2434 |
# serial 2 |
# Test for the GNU C Library, version 2.1 or newer. |
2435 |
|
# From Bruno Haible. |
2436 |
|
|
2437 |
AC_DEFUN([AM_LC_MESSAGES], |
AC_DEFUN([jm_GLIBC21], |
2438 |
[if test $ac_cv_header_locale_h = yes; then |
[ |
2439 |
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, |
2440 |
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
ac_cv_gnu_library_2_1, |
2441 |
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
[AC_EGREP_CPP([Lucky GNU user], |
2442 |
if test $am_cv_val_LC_MESSAGES = yes; then |
[ |
2443 |
AC_DEFINE(HAVE_LC_MESSAGES, 1, |
#include <features.h> |
2444 |
[Define if your <locale.h> file defines LC_MESSAGES.]) |
#ifdef __GNU_LIBRARY__ |
2445 |
fi |
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) |
2446 |
fi]) |
Lucky GNU user |
2447 |
|
#endif |
2448 |
|
#endif |
2449 |
|
], |
2450 |
|
ac_cv_gnu_library_2_1=yes, |
2451 |
|
ac_cv_gnu_library_2_1=no) |
2452 |
|
] |
2453 |
|
) |
2454 |
|
AC_SUBST(GLIBC21) |
2455 |
|
GLIBC21="$ac_cv_gnu_library_2_1" |
2456 |
|
] |
2457 |
|
) |
2458 |
|
|
2459 |
|
# intdiv0.m4 serial 1 (gettext-0.11.3) |
2460 |
|
dnl Copyright (C) 2002 Free Software Foundation, Inc. |
2461 |
|
dnl This file is free software, distributed under the terms of the GNU |
2462 |
|
dnl General Public License. As a special exception to the GNU General |
2463 |
|
dnl Public License, this file may be distributed as part of a program |
2464 |
|
dnl that contains a configuration script generated by Autoconf, under |
2465 |
|
dnl the same distribution terms as the rest of that program. |
2466 |
|
|
2467 |
|
dnl From Bruno Haible. |
2468 |
|
|
2469 |
|
AC_DEFUN([gt_INTDIV0], |
2470 |
|
[ |
2471 |
|
AC_REQUIRE([AC_PROG_CC])dnl |
2472 |
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
2473 |
|
|
2474 |
|
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], |
2475 |
|
gt_cv_int_divbyzero_sigfpe, |
2476 |
|
[ |
2477 |
|
AC_TRY_RUN([ |
2478 |
|
#include <stdlib.h> |
2479 |
|
#include <signal.h> |
2480 |
|
|
2481 |
|
static void |
2482 |
|
#ifdef __cplusplus |
2483 |
|
sigfpe_handler (int sig) |
2484 |
|
#else |
2485 |
|
sigfpe_handler (sig) int sig; |
2486 |
|
#endif |
2487 |
|
{ |
2488 |
|
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ |
2489 |
|
exit (sig != SIGFPE); |
2490 |
|
} |
2491 |
|
|
2492 |
dnl GNOME_COMPILE_WARNINGS |
int x = 1; |
2493 |
dnl Turn on many useful compiler warnings |
int y = 0; |
2494 |
dnl For now, only works on GCC |
int z; |
2495 |
AC_DEFUN([GNOME_COMPILE_WARNINGS],[ |
int nan; |
2496 |
AC_ARG_ENABLE(compile-warnings, |
|
2497 |
[ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_compile_warnings=minimum) |
int main () |
2498 |
|
{ |
2499 |
AC_MSG_CHECKING(what warning flags to pass to the C compiler) |
signal (SIGFPE, sigfpe_handler); |
2500 |
warnCFLAGS= |
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ |
2501 |
if test "x$GCC" != xyes; then |
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) |
2502 |
enable_compile_warnings=no |
signal (SIGTRAP, sigfpe_handler); |
2503 |
|
#endif |
2504 |
|
/* Linux/SPARC yields signal SIGILL. */ |
2505 |
|
#if defined (__sparc__) && defined (__linux__) |
2506 |
|
signal (SIGILL, sigfpe_handler); |
2507 |
|
#endif |
2508 |
|
|
2509 |
|
z = x / y; |
2510 |
|
nan = y / y; |
2511 |
|
exit (1); |
2512 |
|
} |
2513 |
|
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, |
2514 |
|
[ |
2515 |
|
# Guess based on the CPU. |
2516 |
|
case "$host_cpu" in |
2517 |
|
alpha* | i[34567]86 | m68k | s390*) |
2518 |
|
gt_cv_int_divbyzero_sigfpe="guessing yes";; |
2519 |
|
*) |
2520 |
|
gt_cv_int_divbyzero_sigfpe="guessing no";; |
2521 |
|
esac |
2522 |
|
]) |
2523 |
|
]) |
2524 |
|
case "$gt_cv_int_divbyzero_sigfpe" in |
2525 |
|
*yes) value=1;; |
2526 |
|
*) value=0;; |
2527 |
|
esac |
2528 |
|
AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, |
2529 |
|
[Define if integer division by zero raises signal SIGFPE.]) |
2530 |
|
]) |
2531 |
|
|
2532 |
|
# uintmax_t.m4 serial 6 (gettext-0.11) |
2533 |
|
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. |
2534 |
|
dnl This file is free software, distributed under the terms of the GNU |
2535 |
|
dnl General Public License. As a special exception to the GNU General |
2536 |
|
dnl Public License, this file may be distributed as part of a program |
2537 |
|
dnl that contains a configuration script generated by Autoconf, under |
2538 |
|
dnl the same distribution terms as the rest of that program. |
2539 |
|
|
2540 |
|
dnl From Paul Eggert. |
2541 |
|
|
2542 |
|
AC_PREREQ(2.13) |
2543 |
|
|
2544 |
|
# Define uintmax_t to `unsigned long' or `unsigned long long' |
2545 |
|
# if <inttypes.h> does not exist. |
2546 |
|
|
2547 |
|
AC_DEFUN([jm_AC_TYPE_UINTMAX_T], |
2548 |
|
[ |
2549 |
|
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) |
2550 |
|
AC_REQUIRE([jm_AC_HEADER_STDINT_H]) |
2551 |
|
if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then |
2552 |
|
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) |
2553 |
|
test $ac_cv_type_unsigned_long_long = yes \ |
2554 |
|
&& ac_type='unsigned long long' \ |
2555 |
|
|| ac_type='unsigned long' |
2556 |
|
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, |
2557 |
|
[Define to unsigned long or unsigned long long |
2558 |
|
if <inttypes.h> and <stdint.h> don't define.]) |
2559 |
fi |
fi |
2560 |
|
]) |
2561 |
|
|
2562 |
if test "x$enable_compile_warnings" != "xno"; then |
# inttypes_h.m4 serial 4 (gettext-0.11.4) |
2563 |
if test "x$GCC" = "xyes"; then |
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. |
2564 |
case " $CFLAGS " in |
dnl This file is free software, distributed under the terms of the GNU |
2565 |
*[\ \ ]-Wall[\ \ ]*) ;; |
dnl General Public License. As a special exception to the GNU General |
2566 |
*) warnCFLAGS="-Wall -Wunused" ;; |
dnl Public License, this file may be distributed as part of a program |
2567 |
esac |
dnl that contains a configuration script generated by Autoconf, under |
2568 |
|
dnl the same distribution terms as the rest of that program. |
2569 |
|
|
2570 |
## -W is not all that useful. And it cannot be controlled |
dnl From Paul Eggert. |
2571 |
## with individual -Wno-xxx flags, unlike -Wall |
|
2572 |
if test "x$enable_compile_warnings" = "xyes"; then |
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, |
2573 |
warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations" |
# doesn't clash with <sys/types.h>, and declares uintmax_t. |
2574 |
fi |
|
2575 |
fi |
AC_DEFUN([jm_AC_HEADER_INTTYPES_H], |
2576 |
|
[ |
2577 |
|
AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, |
2578 |
|
[AC_TRY_COMPILE( |
2579 |
|
[#include <sys/types.h> |
2580 |
|
#include <inttypes.h>], |
2581 |
|
[uintmax_t i = (uintmax_t) -1;], |
2582 |
|
jm_ac_cv_header_inttypes_h=yes, |
2583 |
|
jm_ac_cv_header_inttypes_h=no)]) |
2584 |
|
if test $jm_ac_cv_header_inttypes_h = yes; then |
2585 |
|
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, |
2586 |
|
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, |
2587 |
|
and declares uintmax_t. ]) |
2588 |
fi |
fi |
2589 |
AC_MSG_RESULT($warnCFLAGS) |
]) |
2590 |
|
|
2591 |
AC_ARG_ENABLE(iso-c, |
# stdint_h.m4 serial 2 (gettext-0.11.4) |
2592 |
[ --enable-iso-c Try to warn if code is not ISO C ],, |
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. |
2593 |
enable_iso_c=no) |
dnl This file is free software, distributed under the terms of the GNU |
2594 |
|
dnl General Public License. As a special exception to the GNU General |
2595 |
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) |
dnl Public License, this file may be distributed as part of a program |
2596 |
complCFLAGS= |
dnl that contains a configuration script generated by Autoconf, under |
2597 |
if test "x$enable_iso_c" != "xno"; then |
dnl the same distribution terms as the rest of that program. |
|
if test "x$GCC" = "xyes"; then |
|
|
case " $CFLAGS " in |
|
|
*[\ \ ]-ansi[\ \ ]*) ;; |
|
|
*) complCFLAGS="$complCFLAGS -ansi" ;; |
|
|
esac |
|
2598 |
|
|
2599 |
case " $CFLAGS " in |
dnl From Paul Eggert. |
2600 |
*[\ \ ]-pedantic[\ \ ]*) ;; |
|
2601 |
*) complCFLAGS="$complCFLAGS -pedantic" ;; |
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists, |
2602 |
esac |
# doesn't clash with <sys/types.h>, and declares uintmax_t. |
2603 |
fi |
|
2604 |
|
AC_DEFUN([jm_AC_HEADER_STDINT_H], |
2605 |
|
[ |
2606 |
|
AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, |
2607 |
|
[AC_TRY_COMPILE( |
2608 |
|
[#include <sys/types.h> |
2609 |
|
#include <stdint.h>], |
2610 |
|
[uintmax_t i = (uintmax_t) -1;], |
2611 |
|
jm_ac_cv_header_stdint_h=yes, |
2612 |
|
jm_ac_cv_header_stdint_h=no)]) |
2613 |
|
if test $jm_ac_cv_header_stdint_h = yes; then |
2614 |
|
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, |
2615 |
|
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>, |
2616 |
|
and declares uintmax_t. ]) |
2617 |
fi |
fi |
2618 |
AC_MSG_RESULT($complCFLAGS) |
]) |
2619 |
if test "x$cflags_set" != "xyes"; then |
|
2620 |
CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS" |
# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) |
2621 |
cflags_set=yes |
dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. |
2622 |
AC_SUBST(cflags_set) |
dnl This file is free software, distributed under the terms of the GNU |
2623 |
|
dnl General Public License. As a special exception to the GNU General |
2624 |
|
dnl Public License, this file may be distributed as part of a program |
2625 |
|
dnl that contains a configuration script generated by Autoconf, under |
2626 |
|
dnl the same distribution terms as the rest of that program. |
2627 |
|
|
2628 |
|
dnl From Paul Eggert. |
2629 |
|
|
2630 |
|
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], |
2631 |
|
[ |
2632 |
|
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, |
2633 |
|
[AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], |
2634 |
|
[unsigned long long ullmax = (unsigned long long) -1; |
2635 |
|
return ull << i | ull >> i | ullmax / ull | ullmax % ull;], |
2636 |
|
ac_cv_type_unsigned_long_long=yes, |
2637 |
|
ac_cv_type_unsigned_long_long=no)]) |
2638 |
|
if test $ac_cv_type_unsigned_long_long = yes; then |
2639 |
|
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, |
2640 |
|
[Define if you have the unsigned long long type.]) |
2641 |
fi |
fi |
2642 |
]) |
]) |
2643 |
|
|
2644 |
dnl For C++, do basically the same thing. |
# inttypes.m4 serial 1 (gettext-0.11.4) |
2645 |
|
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. |
2646 |
|
dnl This file is free software, distributed under the terms of the GNU |
2647 |
|
dnl General Public License. As a special exception to the GNU General |
2648 |
|
dnl Public License, this file may be distributed as part of a program |
2649 |
|
dnl that contains a configuration script generated by Autoconf, under |
2650 |
|
dnl the same distribution terms as the rest of that program. |
2651 |
|
|
2652 |
AC_DEFUN([GNOME_CXX_WARNINGS],[ |
dnl From Paul Eggert. |
2653 |
AC_ARG_ENABLE(cxx-warnings, |
|
2654 |
[ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum) |
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with |
2655 |
|
# <sys/types.h>. |
2656 |
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler) |
|
2657 |
warnCXXFLAGS= |
AC_DEFUN([gt_HEADER_INTTYPES_H], |
2658 |
if test "x$GCC" != xyes; then |
[ |
2659 |
enable_compile_warnings=no |
AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, |
2660 |
|
[ |
2661 |
|
AC_TRY_COMPILE( |
2662 |
|
[#include <sys/types.h> |
2663 |
|
#include <inttypes.h>], |
2664 |
|
[], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) |
2665 |
|
]) |
2666 |
|
if test $gt_cv_header_inttypes_h = yes; then |
2667 |
|
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, |
2668 |
|
[Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.]) |
2669 |
fi |
fi |
2670 |
if test "x$enable_cxx_warnings" != "xno"; then |
]) |
|
if test "x$GCC" = "xyes"; then |
|
|
case " $CXXFLAGS " in |
|
|
*[\ \ ]-Wall[\ \ ]*) ;; |
|
|
*) warnCXXFLAGS="-Wall -Wno-unused" ;; |
|
|
esac |
|
2671 |
|
|
2672 |
## -W is not all that useful. And it cannot be controlled |
# inttypes-pri.m4 serial 1 (gettext-0.11.4) |
2673 |
## with individual -Wno-xxx flags, unlike -Wall |
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. |
2674 |
if test "x$enable_cxx_warnings" = "xyes"; then |
dnl This file is free software, distributed under the terms of the GNU |
2675 |
warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wshadow -Woverloaded-virtual" |
dnl General Public License. As a special exception to the GNU General |
2676 |
fi |
dnl Public License, this file may be distributed as part of a program |
2677 |
fi |
dnl that contains a configuration script generated by Autoconf, under |
2678 |
|
dnl the same distribution terms as the rest of that program. |
2679 |
|
|
2680 |
|
dnl From Bruno Haible. |
2681 |
|
|
2682 |
|
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* |
2683 |
|
# macros to non-string values. This is the case on AIX 4.3.3. |
2684 |
|
|
2685 |
|
AC_DEFUN([gt_INTTYPES_PRI], |
2686 |
|
[ |
2687 |
|
AC_REQUIRE([gt_HEADER_INTTYPES_H]) |
2688 |
|
if test $gt_cv_header_inttypes_h = yes; then |
2689 |
|
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], |
2690 |
|
gt_cv_inttypes_pri_broken, |
2691 |
|
[ |
2692 |
|
AC_TRY_COMPILE([#include <inttypes.h> |
2693 |
|
#ifdef PRId32 |
2694 |
|
char *p = PRId32; |
2695 |
|
#endif |
2696 |
|
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) |
2697 |
|
]) |
2698 |
|
fi |
2699 |
|
if test "$gt_cv_inttypes_pri_broken" = yes; then |
2700 |
|
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, |
2701 |
|
[Define if <inttypes.h> exists and defines unusable PRI* macros.]) |
2702 |
|
fi |
2703 |
|
]) |
2704 |
|
|
2705 |
|
# codeset.m4 serial AM1 (gettext-0.10.40) |
2706 |
|
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. |
2707 |
|
dnl This file is free software, distributed under the terms of the GNU |
2708 |
|
dnl General Public License. As a special exception to the GNU General |
2709 |
|
dnl Public License, this file may be distributed as part of a program |
2710 |
|
dnl that contains a configuration script generated by Autoconf, under |
2711 |
|
dnl the same distribution terms as the rest of that program. |
2712 |
|
|
2713 |
|
dnl From Bruno Haible. |
2714 |
|
|
2715 |
|
AC_DEFUN([AM_LANGINFO_CODESET], |
2716 |
|
[ |
2717 |
|
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, |
2718 |
|
[AC_TRY_LINK([#include <langinfo.h>], |
2719 |
|
[char* cs = nl_langinfo(CODESET);], |
2720 |
|
am_cv_langinfo_codeset=yes, |
2721 |
|
am_cv_langinfo_codeset=no) |
2722 |
|
]) |
2723 |
|
if test $am_cv_langinfo_codeset = yes; then |
2724 |
|
AC_DEFINE(HAVE_LANGINFO_CODESET, 1, |
2725 |
|
[Define if you have <langinfo.h> and nl_langinfo(CODESET).]) |
2726 |
fi |
fi |
2727 |
AC_MSG_RESULT($warnCXXFLAGS) |
]) |
2728 |
|
|
2729 |
AC_ARG_ENABLE(iso-cxx, |
# lcmessage.m4 serial 3 (gettext-0.11.3) |
2730 |
[ --enable-iso-cxx Try to warn if code is not ISO C++ ],, |
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. |
2731 |
enable_iso_cxx=no) |
dnl This file is free software, distributed under the terms of the GNU |
2732 |
|
dnl General Public License. As a special exception to the GNU General |
2733 |
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) |
dnl Public License, this file may be distributed as part of a program |
2734 |
complCXXFLAGS= |
dnl that contains a configuration script generated by Autoconf, under |
2735 |
if test "x$enable_iso_cxx" != "xno"; then |
dnl the same distribution terms as the rest of that program. |
2736 |
if test "x$GCC" = "xyes"; then |
dnl |
2737 |
case " $CXXFLAGS " in |
dnl This file can can be used in projects which are not available under |
2738 |
*[\ \ ]-ansi[\ \ ]*) ;; |
dnl the GNU General Public License or the GNU Library General Public |
2739 |
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;; |
dnl License but which still want to provide support for the GNU gettext |
2740 |
esac |
dnl functionality. |
2741 |
|
dnl Please note that the actual code of the GNU gettext library is covered |
2742 |
|
dnl by the GNU Library General Public License, and the rest of the GNU |
2743 |
|
dnl gettext package package is covered by the GNU General Public License. |
2744 |
|
dnl They are *not* in the public domain. |
2745 |
|
|
2746 |
case " $CXXFLAGS " in |
dnl Authors: |
2747 |
*[\ \ ]-pedantic[\ \ ]*) ;; |
dnl Ulrich Drepper <drepper@cygnus.com>, 1995. |
2748 |
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; |
|
2749 |
esac |
# Check whether LC_MESSAGES is available in <locale.h>. |
2750 |
fi |
|
2751 |
fi |
AC_DEFUN([AM_LC_MESSAGES], |
2752 |
AC_MSG_RESULT($complCXXFLAGS) |
[ |
2753 |
if test "x$cxxflags_set" != "xyes"; then |
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
2754 |
CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" |
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
2755 |
cxxflags_set=yes |
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
2756 |
AC_SUBST(cxxflags_set) |
if test $am_cv_val_LC_MESSAGES = yes; then |
2757 |
|
AC_DEFINE(HAVE_LC_MESSAGES, 1, |
2758 |
|
[Define if your <locale.h> file defines LC_MESSAGES.]) |
2759 |
fi |
fi |
2760 |
]) |
]) |
2761 |
|
|