0 | |
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
|
1 | |
#
|
2 | |
# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
|
3 | |
# Written by Gordon Matzigkeit, 1996
|
4 | |
#
|
5 | |
# This file is free software; the Free Software Foundation gives
|
6 | |
# unlimited permission to copy and/or distribute it, with or without
|
7 | |
# modifications, as long as this notice is preserved.
|
8 | |
|
9 | |
m4_define([_LT_COPYING], [dnl
|
10 | |
# Copyright (C) 2014 Free Software Foundation, Inc.
|
11 | |
# This is free software; see the source for copying conditions. There is NO
|
12 | |
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
13 | |
|
14 | |
# GNU Libtool is free software; you can redistribute it and/or modify
|
15 | |
# it under the terms of the GNU General Public License as published by
|
16 | |
# the Free Software Foundation; either version 2 of of the License, or
|
17 | |
# (at your option) any later version.
|
18 | |
#
|
19 | |
# As a special exception to the GNU General Public License, if you
|
20 | |
# distribute this file as part of a program or library that is built
|
21 | |
# using GNU Libtool, you may include this file under the same
|
22 | |
# distribution terms that you use for the rest of that program.
|
23 | |
#
|
24 | |
# GNU Libtool is distributed in the hope that it will be useful, but
|
25 | |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
26 | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
27 | |
# GNU General Public License for more details.
|
28 | |
#
|
29 | |
# You should have received a copy of the GNU General Public License
|
30 | |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
31 | |
])
|
32 | |
|
33 | |
# serial 58 LT_INIT
|
34 | |
|
35 | |
|
36 | |
# LT_PREREQ(VERSION)
|
37 | |
# ------------------
|
38 | |
# Complain and exit if this libtool version is less that VERSION.
|
39 | |
m4_defun([LT_PREREQ],
|
40 | |
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
|
41 | |
[m4_default([$3],
|
42 | |
[m4_fatal([Libtool version $1 or higher is required],
|
43 | |
63)])],
|
44 | |
[$2])])
|
45 | |
|
46 | |
|
47 | |
# _LT_CHECK_BUILDDIR
|
48 | |
# ------------------
|
49 | |
# Complain if the absolute build directory name contains unusual characters
|
50 | |
m4_defun([_LT_CHECK_BUILDDIR],
|
51 | |
[case `pwd` in
|
52 | |
*\ * | *\ *)
|
53 | |
AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
|
54 | |
esac
|
55 | |
])
|
56 | |
|
57 | |
|
58 | |
# LT_INIT([OPTIONS])
|
59 | |
# ------------------
|
60 | |
AC_DEFUN([LT_INIT],
|
61 | |
[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
|
62 | |
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
63 | |
AC_BEFORE([$0], [LT_LANG])dnl
|
64 | |
AC_BEFORE([$0], [LT_OUTPUT])dnl
|
65 | |
AC_BEFORE([$0], [LTDL_INIT])dnl
|
66 | |
m4_require([_LT_CHECK_BUILDDIR])dnl
|
67 | |
|
68 | |
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
|
69 | |
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
|
70 | |
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
|
71 | |
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
|
72 | |
dnl unless we require an AC_DEFUNed macro:
|
73 | |
AC_REQUIRE([LTOPTIONS_VERSION])dnl
|
74 | |
AC_REQUIRE([LTSUGAR_VERSION])dnl
|
75 | |
AC_REQUIRE([LTVERSION_VERSION])dnl
|
76 | |
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
|
77 | |
m4_require([_LT_PROG_LTMAIN])dnl
|
78 | |
|
79 | |
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
|
80 | |
|
81 | |
dnl Parse OPTIONS
|
82 | |
_LT_SET_OPTIONS([$0], [$1])
|
83 | |
|
84 | |
# This can be used to rebuild libtool when needed
|
85 | |
LIBTOOL_DEPS=$ltmain
|
86 | |
|
87 | |
# Always use our own libtool.
|
88 | |
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
89 | |
AC_SUBST(LIBTOOL)dnl
|
90 | |
|
91 | |
_LT_SETUP
|
92 | |
|
93 | |
# Only expand once:
|
94 | |
m4_define([LT_INIT])
|
95 | |
])# LT_INIT
|
96 | |
|
97 | |
# Old names:
|
98 | |
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
|
99 | |
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
|
100 | |
dnl aclocal-1.4 backwards compatibility:
|
101 | |
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
|
102 | |
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
|
103 | |
|
104 | |
|
105 | |
# _LT_PREPARE_CC_BASENAME
|
106 | |
# -----------------------
|
107 | |
m4_defun([_LT_PREPARE_CC_BASENAME], [
|
108 | |
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
|
109 | |
func_cc_basename ()
|
110 | |
{
|
111 | |
for cc_temp in @S|@*""; do
|
112 | |
case $cc_temp in
|
113 | |
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
|
114 | |
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
|
115 | |
\-*) ;;
|
116 | |
*) break;;
|
117 | |
esac
|
118 | |
done
|
119 | |
func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
|
120 | |
}
|
121 | |
])# _LT_PREPARE_CC_BASENAME
|
122 | |
|
123 | |
|
124 | |
# _LT_CC_BASENAME(CC)
|
125 | |
# -------------------
|
126 | |
# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
|
127 | |
# but that macro is also expanded into generated libtool script, which
|
128 | |
# arranges for $SED and $ECHO to be set by different means.
|
129 | |
m4_defun([_LT_CC_BASENAME],
|
130 | |
[m4_require([_LT_PREPARE_CC_BASENAME])dnl
|
131 | |
AC_REQUIRE([_LT_DECL_SED])dnl
|
132 | |
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
|
133 | |
func_cc_basename $1
|
134 | |
cc_basename=$func_cc_basename_result
|
135 | |
])
|
136 | |
|
137 | |
|
138 | |
# _LT_FILEUTILS_DEFAULTS
|
139 | |
# ----------------------
|
140 | |
# It is okay to use these file commands and assume they have been set
|
141 | |
# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
|
142 | |
m4_defun([_LT_FILEUTILS_DEFAULTS],
|
143 | |
[: ${CP="cp -f"}
|
144 | |
: ${MV="mv -f"}
|
145 | |
: ${RM="rm -f"}
|
146 | |
])# _LT_FILEUTILS_DEFAULTS
|
147 | |
|
148 | |
|
149 | |
# _LT_SETUP
|
150 | |
# ---------
|
151 | |
m4_defun([_LT_SETUP],
|
152 | |
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
153 | |
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
154 | |
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
|
155 | |
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
|
156 | |
|
157 | |
_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
|
158 | |
dnl
|
159 | |
_LT_DECL([], [host_alias], [0], [The host system])dnl
|
160 | |
_LT_DECL([], [host], [0])dnl
|
161 | |
_LT_DECL([], [host_os], [0])dnl
|
162 | |
dnl
|
163 | |
_LT_DECL([], [build_alias], [0], [The build system])dnl
|
164 | |
_LT_DECL([], [build], [0])dnl
|
165 | |
_LT_DECL([], [build_os], [0])dnl
|
166 | |
dnl
|
167 | |
AC_REQUIRE([AC_PROG_CC])dnl
|
168 | |
AC_REQUIRE([LT_PATH_LD])dnl
|
169 | |
AC_REQUIRE([LT_PATH_NM])dnl
|
170 | |
dnl
|
171 | |
AC_REQUIRE([AC_PROG_LN_S])dnl
|
172 | |
test -z "$LN_S" && LN_S="ln -s"
|
173 | |
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
|
174 | |
dnl
|
175 | |
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
|
176 | |
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
|
177 | |
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
|
178 | |
dnl
|
179 | |
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
|
180 | |
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
|
181 | |
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
|
182 | |
m4_require([_LT_CMD_RELOAD])dnl
|
183 | |
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
|
184 | |
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
|
185 | |
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
|
186 | |
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
|
187 | |
m4_require([_LT_WITH_SYSROOT])dnl
|
188 | |
m4_require([_LT_CMD_TRUNCATE])dnl
|
189 | |
|
190 | |
_LT_CONFIG_LIBTOOL_INIT([
|
191 | |
# See if we are running on zsh, and set the options that allow our
|
192 | |
# commands through without removal of \ escapes INIT.
|
193 | |
if test -n "\${ZSH_VERSION+set}"; then
|
194 | |
setopt NO_GLOB_SUBST
|
195 | |
fi
|
196 | |
])
|
197 | |
if test -n "${ZSH_VERSION+set}"; then
|
198 | |
setopt NO_GLOB_SUBST
|
199 | |
fi
|
200 | |
|
201 | |
_LT_CHECK_OBJDIR
|
202 | |
|
203 | |
m4_require([_LT_TAG_COMPILER])dnl
|
204 | |
|
205 | |
case $host_os in
|
206 | |
aix3*)
|
207 | |
# AIX sometimes has problems with the GCC collect2 program. For some
|
208 | |
# reason, if we set the COLLECT_NAMES environment variable, the problems
|
209 | |
# vanish in a puff of smoke.
|
210 | |
if test set != "${COLLECT_NAMES+set}"; then
|
211 | |
COLLECT_NAMES=
|
212 | |
export COLLECT_NAMES
|
213 | |
fi
|
214 | |
;;
|
215 | |
esac
|
216 | |
|
217 | |
# Global variables:
|
218 | |
ofile=libtool
|
219 | |
can_build_shared=yes
|
220 | |
|
221 | |
# All known linkers require a '.a' archive for static linking (except MSVC,
|
222 | |
# which needs '.lib').
|
223 | |
libext=a
|
224 | |
|
225 | |
with_gnu_ld=$lt_cv_prog_gnu_ld
|
226 | |
|
227 | |
old_CC=$CC
|
228 | |
old_CFLAGS=$CFLAGS
|
229 | |
|
230 | |
# Set sane defaults for various variables
|
231 | |
test -z "$CC" && CC=cc
|
232 | |
test -z "$LTCC" && LTCC=$CC
|
233 | |
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
|
234 | |
test -z "$LD" && LD=ld
|
235 | |
test -z "$ac_objext" && ac_objext=o
|
236 | |
|
237 | |
_LT_CC_BASENAME([$compiler])
|
238 | |
|
239 | |
# Only perform the check for file, if the check method requires it
|
240 | |
test -z "$MAGIC_CMD" && MAGIC_CMD=file
|
241 | |
case $deplibs_check_method in
|
242 | |
file_magic*)
|
243 | |
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
|
244 | |
_LT_PATH_MAGIC
|
245 | |
fi
|
246 | |
;;
|
247 | |
esac
|
248 | |
|
249 | |
# Use C for the default configuration in the libtool script
|
250 | |
LT_SUPPORTED_TAG([CC])
|
251 | |
_LT_LANG_C_CONFIG
|
252 | |
_LT_LANG_DEFAULT_CONFIG
|
253 | |
_LT_CONFIG_COMMANDS
|
254 | |
])# _LT_SETUP
|
255 | |
|
256 | |
|
257 | |
# _LT_PREPARE_SED_QUOTE_VARS
|
258 | |
# --------------------------
|
259 | |
# Define a few sed substitution that help us do robust quoting.
|
260 | |
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
|
261 | |
[# Backslashify metacharacters that are still active within
|
262 | |
# double-quoted strings.
|
263 | |
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
|
264 | |
|
265 | |
# Same as above, but do not quote variable references.
|
266 | |
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
|
267 | |
|
268 | |
# Sed substitution to delay expansion of an escaped shell variable in a
|
269 | |
# double_quote_subst'ed string.
|
270 | |
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
|
271 | |
|
272 | |
# Sed substitution to delay expansion of an escaped single quote.
|
273 | |
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
|
274 | |
|
275 | |
# Sed substitution to avoid accidental globbing in evaled expressions
|
276 | |
no_glob_subst='s/\*/\\\*/g'
|
277 | |
])
|
278 | |
|
279 | |
# _LT_PROG_LTMAIN
|
280 | |
# ---------------
|
281 | |
# Note that this code is called both from 'configure', and 'config.status'
|
282 | |
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
|
283 | |
# 'config.status' has no value for ac_aux_dir unless we are using Automake,
|
284 | |
# so we pass a copy along to make sure it has a sensible value anyway.
|
285 | |
m4_defun([_LT_PROG_LTMAIN],
|
286 | |
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
|
287 | |
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
|
288 | |
ltmain=$ac_aux_dir/ltmain.sh
|
289 | |
])# _LT_PROG_LTMAIN
|
290 | |
|
291 | |
|
292 | |
## ------------------------------------- ##
|
293 | |
## Accumulate code for creating libtool. ##
|
294 | |
## ------------------------------------- ##
|
295 | |
|
296 | |
# So that we can recreate a full libtool script including additional
|
297 | |
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
|
298 | |
# in macros and then make a single call at the end using the 'libtool'
|
299 | |
# label.
|
300 | |
|
301 | |
|
302 | |
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
|
303 | |
# ----------------------------------------
|
304 | |
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
|
305 | |
m4_define([_LT_CONFIG_LIBTOOL_INIT],
|
306 | |
[m4_ifval([$1],
|
307 | |
[m4_append([_LT_OUTPUT_LIBTOOL_INIT],
|
308 | |
[$1
|
309 | |
])])])
|
310 | |
|
311 | |
# Initialize.
|
312 | |
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
|
313 | |
|
314 | |
|
315 | |
# _LT_CONFIG_LIBTOOL([COMMANDS])
|
316 | |
# ------------------------------
|
317 | |
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
|
318 | |
m4_define([_LT_CONFIG_LIBTOOL],
|
319 | |
[m4_ifval([$1],
|
320 | |
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
|
321 | |
[$1
|
322 | |
])])])
|
323 | |
|
324 | |
# Initialize.
|
325 | |
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
|
326 | |
|
327 | |
|
328 | |
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
|
329 | |
# -----------------------------------------------------
|
330 | |
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
|
331 | |
[_LT_CONFIG_LIBTOOL([$1])
|
332 | |
_LT_CONFIG_LIBTOOL_INIT([$2])
|
333 | |
])
|
334 | |
|
335 | |
|
336 | |
# _LT_FORMAT_COMMENT([COMMENT])
|
337 | |
# -----------------------------
|
338 | |
# Add leading comment marks to the start of each line, and a trailing
|
339 | |
# full-stop to the whole comment if one is not present already.
|
340 | |
m4_define([_LT_FORMAT_COMMENT],
|
341 | |
[m4_ifval([$1], [
|
342 | |
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
|
343 | |
[['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
|
344 | |
)])
|
345 | |
|
346 | |
|
347 | |
|
348 | |
## ------------------------ ##
|
349 | |
## FIXME: Eliminate VARNAME ##
|
350 | |
## ------------------------ ##
|
351 | |
|
352 | |
|
353 | |
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
|
354 | |
# -------------------------------------------------------------------
|
355 | |
# CONFIGNAME is the name given to the value in the libtool script.
|
356 | |
# VARNAME is the (base) name used in the configure script.
|
357 | |
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
|
358 | |
# VARNAME. Any other value will be used directly.
|
359 | |
m4_define([_LT_DECL],
|
360 | |
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
|
361 | |
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
|
362 | |
[m4_ifval([$1], [$1], [$2])])
|
363 | |
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
|
364 | |
m4_ifval([$4],
|
365 | |
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
|
366 | |
lt_dict_add_subkey([lt_decl_dict], [$2],
|
367 | |
[tagged?], [m4_ifval([$5], [yes], [no])])])
|
368 | |
])
|
369 | |
|
370 | |
|
371 | |
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
|
372 | |
# --------------------------------------------------------
|
373 | |
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
|
374 | |
|
375 | |
|
376 | |
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
|
377 | |
# ------------------------------------------------
|
378 | |
m4_define([lt_decl_tag_varnames],
|
379 | |
[_lt_decl_filter([tagged?], [yes], $@)])
|
380 | |
|
381 | |
|
382 | |
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
|
383 | |
# ---------------------------------------------------------
|
384 | |
m4_define([_lt_decl_filter],
|
385 | |
[m4_case([$#],
|
386 | |
[0], [m4_fatal([$0: too few arguments: $#])],
|
387 | |
[1], [m4_fatal([$0: too few arguments: $#: $1])],
|
388 | |
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
|
389 | |
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
|
390 | |
[lt_dict_filter([lt_decl_dict], $@)])[]dnl
|
391 | |
])
|
392 | |
|
393 | |
|
394 | |
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
|
395 | |
# --------------------------------------------------
|
396 | |
m4_define([lt_decl_quote_varnames],
|
397 | |
[_lt_decl_filter([value], [1], $@)])
|
398 | |
|
399 | |
|
400 | |
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
|
401 | |
# ---------------------------------------------------
|
402 | |
m4_define([lt_decl_dquote_varnames],
|
403 | |
[_lt_decl_filter([value], [2], $@)])
|
404 | |
|
405 | |
|
406 | |
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
|
407 | |
# ---------------------------------------------------
|
408 | |
m4_define([lt_decl_varnames_tagged],
|
409 | |
[m4_assert([$# <= 2])dnl
|
410 | |
_$0(m4_quote(m4_default([$1], [[, ]])),
|
411 | |
m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
|
412 | |
m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
|
413 | |
m4_define([_lt_decl_varnames_tagged],
|
414 | |
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
|
415 | |
|
416 | |
|
417 | |
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
|
418 | |
# ------------------------------------------------
|
419 | |
m4_define([lt_decl_all_varnames],
|
420 | |
[_$0(m4_quote(m4_default([$1], [[, ]])),
|
421 | |
m4_if([$2], [],
|
422 | |
m4_quote(lt_decl_varnames),
|
423 | |
m4_quote(m4_shift($@))))[]dnl
|
424 | |
])
|
425 | |
m4_define([_lt_decl_all_varnames],
|
426 | |
[lt_join($@, lt_decl_varnames_tagged([$1],
|
427 | |
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
|
428 | |
])
|
429 | |
|
430 | |
|
431 | |
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
|
432 | |
# ------------------------------------
|
433 | |
# Quote a variable value, and forward it to 'config.status' so that its
|
434 | |
# declaration there will have the same value as in 'configure'. VARNAME
|
435 | |
# must have a single quote delimited value for this to work.
|
436 | |
m4_define([_LT_CONFIG_STATUS_DECLARE],
|
437 | |
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
|
438 | |
|
439 | |
|
440 | |
# _LT_CONFIG_STATUS_DECLARATIONS
|
441 | |
# ------------------------------
|
442 | |
# We delimit libtool config variables with single quotes, so when
|
443 | |
# we write them to config.status, we have to be sure to quote all
|
444 | |
# embedded single quotes properly. In configure, this macro expands
|
445 | |
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
|
446 | |
#
|
447 | |
# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
|
448 | |
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
|
449 | |
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
|
450 | |
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
|
451 | |
|
452 | |
|
453 | |
# _LT_LIBTOOL_TAGS
|
454 | |
# ----------------
|
455 | |
# Output comment and list of tags supported by the script
|
456 | |
m4_defun([_LT_LIBTOOL_TAGS],
|
457 | |
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
|
458 | |
available_tags='_LT_TAGS'dnl
|
459 | |
])
|
460 | |
|
461 | |
|
462 | |
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
|
463 | |
# -----------------------------------
|
464 | |
# Extract the dictionary values for VARNAME (optionally with TAG) and
|
465 | |
# expand to a commented shell variable setting:
|
466 | |
#
|
467 | |
# # Some comment about what VAR is for.
|
468 | |
# visible_name=$lt_internal_name
|
469 | |
m4_define([_LT_LIBTOOL_DECLARE],
|
470 | |
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
|
471 | |
[description])))[]dnl
|
472 | |
m4_pushdef([_libtool_name],
|
473 | |
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
|
474 | |
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
|
475 | |
[0], [_libtool_name=[$]$1],
|
476 | |
[1], [_libtool_name=$lt_[]$1],
|
477 | |
[2], [_libtool_name=$lt_[]$1],
|
478 | |
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
|
479 | |
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
|
480 | |
])
|
481 | |
|
482 | |
|
483 | |
# _LT_LIBTOOL_CONFIG_VARS
|
484 | |
# -----------------------
|
485 | |
# Produce commented declarations of non-tagged libtool config variables
|
486 | |
# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
|
487 | |
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
|
488 | |
# section) are produced by _LT_LIBTOOL_TAG_VARS.
|
489 | |
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
|
490 | |
[m4_foreach([_lt_var],
|
491 | |
m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
|
492 | |
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
|
493 | |
|
494 | |
|
495 | |
# _LT_LIBTOOL_TAG_VARS(TAG)
|
496 | |
# -------------------------
|
497 | |
m4_define([_LT_LIBTOOL_TAG_VARS],
|
498 | |
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
|
499 | |
[m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
|
500 | |
|
501 | |
|
502 | |
# _LT_TAGVAR(VARNAME, [TAGNAME])
|
503 | |
# ------------------------------
|
504 | |
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
|
505 | |
|
506 | |
|
507 | |
# _LT_CONFIG_COMMANDS
|
508 | |
# -------------------
|
509 | |
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
|
510 | |
# variables for single and double quote escaping we saved from calls
|
511 | |
# to _LT_DECL, we can put quote escaped variables declarations
|
512 | |
# into 'config.status', and then the shell code to quote escape them in
|
513 | |
# for loops in 'config.status'. Finally, any additional code accumulated
|
514 | |
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
|
515 | |
m4_defun([_LT_CONFIG_COMMANDS],
|
516 | |
[AC_PROVIDE_IFELSE([LT_OUTPUT],
|
517 | |
dnl If the libtool generation code has been placed in $CONFIG_LT,
|
518 | |
dnl instead of duplicating it all over again into config.status,
|
519 | |
dnl then we will have config.status run $CONFIG_LT later, so it
|
520 | |
dnl needs to know what name is stored there:
|
521 | |
[AC_CONFIG_COMMANDS([libtool],
|
522 | |
[$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
|
523 | |
dnl If the libtool generation code is destined for config.status,
|
524 | |
dnl expand the accumulated commands and init code now:
|
525 | |
[AC_CONFIG_COMMANDS([libtool],
|
526 | |
[_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
|
527 | |
])#_LT_CONFIG_COMMANDS
|
528 | |
|
529 | |
|
530 | |
# Initialize.
|
531 | |
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
|
532 | |
[
|
533 | |
|
534 | |
# The HP-UX ksh and POSIX shell print the target directory to stdout
|
535 | |
# if CDPATH is set.
|
536 | |
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
537 | |
|
538 | |
sed_quote_subst='$sed_quote_subst'
|
539 | |
double_quote_subst='$double_quote_subst'
|
540 | |
delay_variable_subst='$delay_variable_subst'
|
541 | |
_LT_CONFIG_STATUS_DECLARATIONS
|
542 | |
LTCC='$LTCC'
|
543 | |
LTCFLAGS='$LTCFLAGS'
|
544 | |
compiler='$compiler_DEFAULT'
|
545 | |
|
546 | |
# A function that is used when there is no print builtin or printf.
|
547 | |
func_fallback_echo ()
|
548 | |
{
|
549 | |
eval 'cat <<_LTECHO_EOF
|
550 | |
\$[]1
|
551 | |
_LTECHO_EOF'
|
552 | |
}
|
553 | |
|
554 | |
# Quote evaled strings.
|
555 | |
for var in lt_decl_all_varnames([[ \
|
556 | |
]], lt_decl_quote_varnames); do
|
557 | |
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
|
558 | |
*[[\\\\\\\`\\"\\\$]]*)
|
559 | |
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
|
560 | |
;;
|
561 | |
*)
|
562 | |
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
|
563 | |
;;
|
564 | |
esac
|
565 | |
done
|
566 | |
|
567 | |
# Double-quote double-evaled strings.
|
568 | |
for var in lt_decl_all_varnames([[ \
|
569 | |
]], lt_decl_dquote_varnames); do
|
570 | |
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
|
571 | |
*[[\\\\\\\`\\"\\\$]]*)
|
572 | |
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
|
573 | |
;;
|
574 | |
*)
|
575 | |
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
|
576 | |
;;
|
577 | |
esac
|
578 | |
done
|
579 | |
|
580 | |
_LT_OUTPUT_LIBTOOL_INIT
|
581 | |
])
|
582 | |
|
583 | |
# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
|
584 | |
# ------------------------------------
|
585 | |
# Generate a child script FILE with all initialization necessary to
|
586 | |
# reuse the environment learned by the parent script, and make the
|
587 | |
# file executable. If COMMENT is supplied, it is inserted after the
|
588 | |
# '#!' sequence but before initialization text begins. After this
|
589 | |
# macro, additional text can be appended to FILE to form the body of
|
590 | |
# the child script. The macro ends with non-zero status if the
|
591 | |
# file could not be fully written (such as if the disk is full).
|
592 | |
m4_ifdef([AS_INIT_GENERATED],
|
593 | |
[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
|
594 | |
[m4_defun([_LT_GENERATED_FILE_INIT],
|
595 | |
[m4_require([AS_PREPARE])]dnl
|
596 | |
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
|
597 | |
[lt_write_fail=0
|
598 | |
cat >$1 <<_ASEOF || lt_write_fail=1
|
599 | |
#! $SHELL
|
600 | |
# Generated by $as_me.
|
601 | |
$2
|
602 | |
SHELL=\${CONFIG_SHELL-$SHELL}
|
603 | |
export SHELL
|
604 | |
_ASEOF
|
605 | |
cat >>$1 <<\_ASEOF || lt_write_fail=1
|
606 | |
AS_SHELL_SANITIZE
|
607 | |
_AS_PREPARE
|
608 | |
exec AS_MESSAGE_FD>&1
|
609 | |
_ASEOF
|
610 | |
test 0 = "$lt_write_fail" && chmod +x $1[]dnl
|
611 | |
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
|
612 | |
|
613 | |
# LT_OUTPUT
|
614 | |
# ---------
|
615 | |
# This macro allows early generation of the libtool script (before
|
616 | |
# AC_OUTPUT is called), incase it is used in configure for compilation
|
617 | |
# tests.
|
618 | |
AC_DEFUN([LT_OUTPUT],
|
619 | |
[: ${CONFIG_LT=./config.lt}
|
620 | |
AC_MSG_NOTICE([creating $CONFIG_LT])
|
621 | |
_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
|
622 | |
[# Run this file to recreate a libtool stub with the current configuration.])
|
623 | |
|
624 | |
cat >>"$CONFIG_LT" <<\_LTEOF
|
625 | |
lt_cl_silent=false
|
626 | |
exec AS_MESSAGE_LOG_FD>>config.log
|
627 | |
{
|
628 | |
echo
|
629 | |
AS_BOX([Running $as_me.])
|
630 | |
} >&AS_MESSAGE_LOG_FD
|
631 | |
|
632 | |
lt_cl_help="\
|
633 | |
'$as_me' creates a local libtool stub from the current configuration,
|
634 | |
for use in further configure time tests before the real libtool is
|
635 | |
generated.
|
636 | |
|
637 | |
Usage: $[0] [[OPTIONS]]
|
638 | |
|
639 | |
-h, --help print this help, then exit
|
640 | |
-V, --version print version number, then exit
|
641 | |
-q, --quiet do not print progress messages
|
642 | |
-d, --debug don't remove temporary files
|
643 | |
|
644 | |
Report bugs to <bug-libtool@gnu.org>."
|
645 | |
|
646 | |
lt_cl_version="\
|
647 | |
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
|
648 | |
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
|
649 | |
configured by $[0], generated by m4_PACKAGE_STRING.
|
650 | |
|
651 | |
Copyright (C) 2011 Free Software Foundation, Inc.
|
652 | |
This config.lt script is free software; the Free Software Foundation
|
653 | |
gives unlimited permision to copy, distribute and modify it."
|
654 | |
|
655 | |
while test 0 != $[#]
|
656 | |
do
|
657 | |
case $[1] in
|
658 | |
--version | --v* | -V )
|
659 | |
echo "$lt_cl_version"; exit 0 ;;
|
660 | |
--help | --h* | -h )
|
661 | |
echo "$lt_cl_help"; exit 0 ;;
|
662 | |
--debug | --d* | -d )
|
663 | |
debug=: ;;
|
664 | |
--quiet | --q* | --silent | --s* | -q )
|
665 | |
lt_cl_silent=: ;;
|
666 | |
|
667 | |
-*) AC_MSG_ERROR([unrecognized option: $[1]
|
668 | |
Try '$[0] --help' for more information.]) ;;
|
669 | |
|
670 | |
*) AC_MSG_ERROR([unrecognized argument: $[1]
|
671 | |
Try '$[0] --help' for more information.]) ;;
|
672 | |
esac
|
673 | |
shift
|
674 | |
done
|
675 | |
|
676 | |
if $lt_cl_silent; then
|
677 | |
exec AS_MESSAGE_FD>/dev/null
|
678 | |
fi
|
679 | |
_LTEOF
|
680 | |
|
681 | |
cat >>"$CONFIG_LT" <<_LTEOF
|
682 | |
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
|
683 | |
_LTEOF
|
684 | |
|
685 | |
cat >>"$CONFIG_LT" <<\_LTEOF
|
686 | |
AC_MSG_NOTICE([creating $ofile])
|
687 | |
_LT_OUTPUT_LIBTOOL_COMMANDS
|
688 | |
AS_EXIT(0)
|
689 | |
_LTEOF
|
690 | |
chmod +x "$CONFIG_LT"
|
691 | |
|
692 | |
# configure is writing to config.log, but config.lt does its own redirection,
|
693 | |
# appending to config.log, which fails on DOS, as config.log is still kept
|
694 | |
# open by configure. Here we exec the FD to /dev/null, effectively closing
|
695 | |
# config.log, so it can be properly (re)opened and appended to by config.lt.
|
696 | |
lt_cl_success=:
|
697 | |
test yes = "$silent" &&
|
698 | |
lt_config_lt_args="$lt_config_lt_args --quiet"
|
699 | |
exec AS_MESSAGE_LOG_FD>/dev/null
|
700 | |
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
|
701 | |
exec AS_MESSAGE_LOG_FD>>config.log
|
702 | |
$lt_cl_success || AS_EXIT(1)
|
703 | |
])# LT_OUTPUT
|
704 | |
|
705 | |
|
706 | |
# _LT_CONFIG(TAG)
|
707 | |
# ---------------
|
708 | |
# If TAG is the built-in tag, create an initial libtool script with a
|
709 | |
# default configuration from the untagged config vars. Otherwise add code
|
710 | |
# to config.status for appending the configuration named by TAG from the
|
711 | |
# matching tagged config vars.
|
712 | |
m4_defun([_LT_CONFIG],
|
713 | |
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
|
714 | |
_LT_CONFIG_SAVE_COMMANDS([
|
715 | |
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
|
716 | |
m4_if(_LT_TAG, [C], [
|
717 | |
# See if we are running on zsh, and set the options that allow our
|
718 | |
# commands through without removal of \ escapes.
|
719 | |
if test -n "${ZSH_VERSION+set}"; then
|
720 | |
setopt NO_GLOB_SUBST
|
721 | |
fi
|
722 | |
|
723 | |
cfgfile=${ofile}T
|
724 | |
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
|
725 | |
$RM "$cfgfile"
|
726 | |
|
727 | |
cat <<_LT_EOF >> "$cfgfile"
|
728 | |
#! $SHELL
|
729 | |
# Generated automatically by $as_me ($PACKAGE) $VERSION
|
730 | |
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
|
731 | |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
732 | |
|
733 | |
# Provide generalized library-building support services.
|
734 | |
# Written by Gordon Matzigkeit, 1996
|
735 | |
|
736 | |
_LT_COPYING
|
737 | |
_LT_LIBTOOL_TAGS
|
738 | |
|
739 | |
# Configured defaults for sys_lib_dlsearch_path munging.
|
740 | |
: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
|
741 | |
|
742 | |
# ### BEGIN LIBTOOL CONFIG
|
743 | |
_LT_LIBTOOL_CONFIG_VARS
|
744 | |
_LT_LIBTOOL_TAG_VARS
|
745 | |
# ### END LIBTOOL CONFIG
|
746 | |
|
747 | |
_LT_EOF
|
748 | |
|
749 | |
cat <<'_LT_EOF' >> "$cfgfile"
|
750 | |
|
751 | |
# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
|
752 | |
|
753 | |
_LT_PREPARE_MUNGE_PATH_LIST
|
754 | |
_LT_PREPARE_CC_BASENAME
|
755 | |
|
756 | |
# ### END FUNCTIONS SHARED WITH CONFIGURE
|
757 | |
|
758 | |
_LT_EOF
|
759 | |
|
760 | |
case $host_os in
|
761 | |
aix3*)
|
762 | |
cat <<\_LT_EOF >> "$cfgfile"
|
763 | |
# AIX sometimes has problems with the GCC collect2 program. For some
|
764 | |
# reason, if we set the COLLECT_NAMES environment variable, the problems
|
765 | |
# vanish in a puff of smoke.
|
766 | |
if test set != "${COLLECT_NAMES+set}"; then
|
767 | |
COLLECT_NAMES=
|
768 | |
export COLLECT_NAMES
|
769 | |
fi
|
770 | |
_LT_EOF
|
771 | |
;;
|
772 | |
esac
|
773 | |
|
774 | |
_LT_PROG_LTMAIN
|
775 | |
|
776 | |
# We use sed instead of cat because bash on DJGPP gets confused if
|
777 | |
# if finds mixed CR/LF and LF-only lines. Since sed operates in
|
778 | |
# text mode, it properly converts lines to CR/LF. This bash problem
|
779 | |
# is reportedly fixed, but why not run on old versions too?
|
780 | |
sed '$q' "$ltmain" >> "$cfgfile" \
|
781 | |
|| (rm -f "$cfgfile"; exit 1)
|
782 | |
|
783 | |
mv -f "$cfgfile" "$ofile" ||
|
784 | |
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
|
785 | |
chmod +x "$ofile"
|
786 | |
],
|
787 | |
[cat <<_LT_EOF >> "$ofile"
|
788 | |
|
789 | |
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
|
790 | |
dnl in a comment (ie after a #).
|
791 | |
# ### BEGIN LIBTOOL TAG CONFIG: $1
|
792 | |
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
|
793 | |
# ### END LIBTOOL TAG CONFIG: $1
|
794 | |
_LT_EOF
|
795 | |
])dnl /m4_if
|
796 | |
],
|
797 | |
[m4_if([$1], [], [
|
798 | |
PACKAGE='$PACKAGE'
|
799 | |
VERSION='$VERSION'
|
800 | |
RM='$RM'
|
801 | |
ofile='$ofile'], [])
|
802 | |
])dnl /_LT_CONFIG_SAVE_COMMANDS
|
803 | |
])# _LT_CONFIG
|
804 | |
|
805 | |
|
806 | |
# LT_SUPPORTED_TAG(TAG)
|
807 | |
# ---------------------
|
808 | |
# Trace this macro to discover what tags are supported by the libtool
|
809 | |
# --tag option, using:
|
810 | |
# autoconf --trace 'LT_SUPPORTED_TAG:$1'
|
811 | |
AC_DEFUN([LT_SUPPORTED_TAG], [])
|
812 | |
|
813 | |
|
814 | |
# C support is built-in for now
|
815 | |
m4_define([_LT_LANG_C_enabled], [])
|
816 | |
m4_define([_LT_TAGS], [])
|
817 | |
|
818 | |
|
819 | |
# LT_LANG(LANG)
|
820 | |
# -------------
|
821 | |
# Enable libtool support for the given language if not already enabled.
|
822 | |
AC_DEFUN([LT_LANG],
|
823 | |
[AC_BEFORE([$0], [LT_OUTPUT])dnl
|
824 | |
m4_case([$1],
|
825 | |
[C], [_LT_LANG(C)],
|
826 | |
[C++], [_LT_LANG(CXX)],
|
827 | |
[Go], [_LT_LANG(GO)],
|
828 | |
[Java], [_LT_LANG(GCJ)],
|
829 | |
[Fortran 77], [_LT_LANG(F77)],
|
830 | |
[Fortran], [_LT_LANG(FC)],
|
831 | |
[Windows Resource], [_LT_LANG(RC)],
|
832 | |
[m4_ifdef([_LT_LANG_]$1[_CONFIG],
|
833 | |
[_LT_LANG($1)],
|
834 | |
[m4_fatal([$0: unsupported language: "$1"])])])dnl
|
835 | |
])# LT_LANG
|
836 | |
|
837 | |
|
838 | |
# _LT_LANG(LANGNAME)
|
839 | |
# ------------------
|
840 | |
m4_defun([_LT_LANG],
|
841 | |
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
|
842 | |
[LT_SUPPORTED_TAG([$1])dnl
|
843 | |
m4_append([_LT_TAGS], [$1 ])dnl
|
844 | |
m4_define([_LT_LANG_]$1[_enabled], [])dnl
|
845 | |
_LT_LANG_$1_CONFIG($1)])dnl
|
846 | |
])# _LT_LANG
|
847 | |
|
848 | |
|
849 | |
m4_ifndef([AC_PROG_GO], [
|
850 | |
############################################################
|
851 | |
# NOTE: This macro has been submitted for inclusion into #
|
852 | |
# GNU Autoconf as AC_PROG_GO. When it is available in #
|
853 | |
# a released version of Autoconf we should remove this #
|
854 | |
# macro and use it instead. #
|
855 | |
############################################################
|
856 | |
m4_defun([AC_PROG_GO],
|
857 | |
[AC_LANG_PUSH(Go)dnl
|
858 | |
AC_ARG_VAR([GOC], [Go compiler command])dnl
|
859 | |
AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
|
860 | |
_AC_ARG_VAR_LDFLAGS()dnl
|
861 | |
AC_CHECK_TOOL(GOC, gccgo)
|
862 | |
if test -z "$GOC"; then
|
863 | |
if test -n "$ac_tool_prefix"; then
|
864 | |
AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
|
865 | |
fi
|
866 | |
fi
|
867 | |
if test -z "$GOC"; then
|
868 | |
AC_CHECK_PROG(GOC, gccgo, gccgo, false)
|
869 | |
fi
|
870 | |
])#m4_defun
|
871 | |
])#m4_ifndef
|
872 | |
|
873 | |
|
874 | |
# _LT_LANG_DEFAULT_CONFIG
|
875 | |
# -----------------------
|
876 | |
m4_defun([_LT_LANG_DEFAULT_CONFIG],
|
877 | |
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
878 | |
[LT_LANG(CXX)],
|
879 | |
[m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
|
880 | |
|
881 | |
AC_PROVIDE_IFELSE([AC_PROG_F77],
|
882 | |
[LT_LANG(F77)],
|
883 | |
[m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
|
884 | |
|
885 | |
AC_PROVIDE_IFELSE([AC_PROG_FC],
|
886 | |
[LT_LANG(FC)],
|
887 | |
[m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
|
888 | |
|
889 | |
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
|
890 | |
dnl pulling things in needlessly.
|
891 | |
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
|
892 | |
[LT_LANG(GCJ)],
|
893 | |
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
|
894 | |
[LT_LANG(GCJ)],
|
895 | |
[AC_PROVIDE_IFELSE([LT_PROG_GCJ],
|
896 | |
[LT_LANG(GCJ)],
|
897 | |
[m4_ifdef([AC_PROG_GCJ],
|
898 | |
[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
|
899 | |
m4_ifdef([A][M_PROG_GCJ],
|
900 | |
[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
|
901 | |
m4_ifdef([LT_PROG_GCJ],
|
902 | |
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
|
903 | |
|
904 | |
AC_PROVIDE_IFELSE([AC_PROG_GO],
|
905 | |
[LT_LANG(GO)],
|
906 | |
[m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
|
907 | |
|
908 | |
AC_PROVIDE_IFELSE([LT_PROG_RC],
|
909 | |
[LT_LANG(RC)],
|
910 | |
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
|
911 | |
])# _LT_LANG_DEFAULT_CONFIG
|
912 | |
|
913 | |
# Obsolete macros:
|
914 | |
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
|
915 | |
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
|
916 | |
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
|
917 | |
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
|
918 | |
AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
|
919 | |
dnl aclocal-1.4 backwards compatibility:
|
920 | |
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
|
921 | |
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
|
922 | |
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
|
923 | |
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
|
924 | |
dnl AC_DEFUN([AC_LIBTOOL_RC], [])
|
925 | |
|
926 | |
|
927 | |
# _LT_TAG_COMPILER
|
928 | |
# ----------------
|
929 | |
m4_defun([_LT_TAG_COMPILER],
|
930 | |
[AC_REQUIRE([AC_PROG_CC])dnl
|
931 | |
|
932 | |
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
|
933 | |
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
|
934 | |
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
|
935 | |
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
|
936 | |
|
937 | |
# If no C compiler was specified, use CC.
|
938 | |
LTCC=${LTCC-"$CC"}
|
939 | |
|
940 | |
# If no C compiler flags were specified, use CFLAGS.
|
941 | |
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
|
942 | |
|
943 | |
# Allow CC to be a program name with arguments.
|
944 | |
compiler=$CC
|
945 | |
])# _LT_TAG_COMPILER
|
946 | |
|
947 | |
|
948 | |
# _LT_COMPILER_BOILERPLATE
|
949 | |
# ------------------------
|
950 | |
# Check for compiler boilerplate output or warnings with
|
951 | |
# the simple compiler test code.
|
952 | |
m4_defun([_LT_COMPILER_BOILERPLATE],
|
953 | |
[m4_require([_LT_DECL_SED])dnl
|
954 | |
ac_outfile=conftest.$ac_objext
|
955 | |
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
|
956 | |
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
|
957 | |
_lt_compiler_boilerplate=`cat conftest.err`
|
958 | |
$RM conftest*
|
959 | |
])# _LT_COMPILER_BOILERPLATE
|
960 | |
|
961 | |
|
962 | |
# _LT_LINKER_BOILERPLATE
|
963 | |
# ----------------------
|
964 | |
# Check for linker boilerplate output or warnings with
|
965 | |
# the simple link test code.
|
966 | |
m4_defun([_LT_LINKER_BOILERPLATE],
|
967 | |
[m4_require([_LT_DECL_SED])dnl
|
968 | |
ac_outfile=conftest.$ac_objext
|
969 | |
echo "$lt_simple_link_test_code" >conftest.$ac_ext
|
970 | |
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
|
971 | |
_lt_linker_boilerplate=`cat conftest.err`
|
972 | |
$RM -r conftest*
|
973 | |
])# _LT_LINKER_BOILERPLATE
|
974 | |
|
975 | |
# _LT_REQUIRED_DARWIN_CHECKS
|
976 | |
# -------------------------
|
977 | |
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
|
978 | |
case $host_os in
|
979 | |
rhapsody* | darwin*)
|
980 | |
AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
|
981 | |
AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
|
982 | |
AC_CHECK_TOOL([LIPO], [lipo], [:])
|
983 | |
AC_CHECK_TOOL([OTOOL], [otool], [:])
|
984 | |
AC_CHECK_TOOL([OTOOL64], [otool64], [:])
|
985 | |
_LT_DECL([], [DSYMUTIL], [1],
|
986 | |
[Tool to manipulate archived DWARF debug symbol files on Mac OS X])
|
987 | |
_LT_DECL([], [NMEDIT], [1],
|
988 | |
[Tool to change global to local symbols on Mac OS X])
|
989 | |
_LT_DECL([], [LIPO], [1],
|
990 | |
[Tool to manipulate fat objects and archives on Mac OS X])
|
991 | |
_LT_DECL([], [OTOOL], [1],
|
992 | |
[ldd/readelf like tool for Mach-O binaries on Mac OS X])
|
993 | |
_LT_DECL([], [OTOOL64], [1],
|
994 | |
[ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
|
995 | |
|
996 | |
AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
|
997 | |
[lt_cv_apple_cc_single_mod=no
|
998 | |
if test -z "$LT_MULTI_MODULE"; then
|
999 | |
# By default we will add the -single_module flag. You can override
|
1000 | |
# by either setting the environment variable LT_MULTI_MODULE
|
1001 | |
# non-empty at configure time, or by adding -multi_module to the
|
1002 | |
# link flags.
|
1003 | |
rm -rf libconftest.dylib*
|
1004 | |
echo "int foo(void){return 1;}" > conftest.c
|
1005 | |
echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
|
1006 | |
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
|
1007 | |
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
|
1008 | |
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
|
1009 | |
_lt_result=$?
|
1010 | |
# If there is a non-empty error log, and "single_module"
|
1011 | |
# appears in it, assume the flag caused a linker warning
|
1012 | |
if test -s conftest.err && $GREP single_module conftest.err; then
|
1013 | |
cat conftest.err >&AS_MESSAGE_LOG_FD
|
1014 | |
# Otherwise, if the output was created with a 0 exit code from
|
1015 | |
# the compiler, it worked.
|
1016 | |
elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
|
1017 | |
lt_cv_apple_cc_single_mod=yes
|
1018 | |
else
|
1019 | |
cat conftest.err >&AS_MESSAGE_LOG_FD
|
1020 | |
fi
|
1021 | |
rm -rf libconftest.dylib*
|
1022 | |
rm -f conftest.*
|
1023 | |
fi])
|
1024 | |
|
1025 | |
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
|
1026 | |
[lt_cv_ld_exported_symbols_list],
|
1027 | |
[lt_cv_ld_exported_symbols_list=no
|
1028 | |
save_LDFLAGS=$LDFLAGS
|
1029 | |
echo "_main" > conftest.sym
|
1030 | |
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
|
1031 | |
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
|
1032 | |
[lt_cv_ld_exported_symbols_list=yes],
|
1033 | |
[lt_cv_ld_exported_symbols_list=no])
|
1034 | |
LDFLAGS=$save_LDFLAGS
|
1035 | |
])
|
1036 | |
|
1037 | |
AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
|
1038 | |
[lt_cv_ld_force_load=no
|
1039 | |
cat > conftest.c << _LT_EOF
|
1040 | |
int forced_loaded() { return 2;}
|
1041 | |
_LT_EOF
|
1042 | |
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
|
1043 | |
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
|
1044 | |
echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
|
1045 | |
$AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
|
1046 | |
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
|
1047 | |
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
|
1048 | |
cat > conftest.c << _LT_EOF
|
1049 | |
int main() { return 0;}
|
1050 | |
_LT_EOF
|
1051 | |
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
|
1052 | |
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
|
1053 | |
_lt_result=$?
|
1054 | |
if test -s conftest.err && $GREP force_load conftest.err; then
|
1055 | |
cat conftest.err >&AS_MESSAGE_LOG_FD
|
1056 | |
elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
|
1057 | |
lt_cv_ld_force_load=yes
|
1058 | |
else
|
1059 | |
cat conftest.err >&AS_MESSAGE_LOG_FD
|
1060 | |
fi
|
1061 | |
rm -f conftest.err libconftest.a conftest conftest.c
|
1062 | |
rm -rf conftest.dSYM
|
1063 | |
])
|
1064 | |
case $host_os in
|
1065 | |
rhapsody* | darwin1.[[012]])
|
1066 | |
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
|
1067 | |
darwin1.*)
|
1068 | |
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
1069 | |
darwin*) # darwin 5.x on
|
1070 | |
# if running on 10.5 or later, the deployment target defaults
|
1071 | |
# to the OS version, if on x86, and 10.4, the deployment
|
1072 | |
# target defaults to 10.4. Don't you love it?
|
1073 | |
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
|
1074 | |
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
|
1075 | |
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
1076 | |
10.[[012]][[,.]]*)
|
1077 | |
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
1078 | |
10.*)
|
1079 | |
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
1080 | |
esac
|
1081 | |
;;
|
1082 | |
esac
|
1083 | |
if test yes = "$lt_cv_apple_cc_single_mod"; then
|
1084 | |
_lt_dar_single_mod='$single_module'
|
1085 | |
fi
|
1086 | |
if test yes = "$lt_cv_ld_exported_symbols_list"; then
|
1087 | |
_lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
|
1088 | |
else
|
1089 | |
_lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
|
1090 | |
fi
|
1091 | |
if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
|
1092 | |
_lt_dsymutil='~$DSYMUTIL $lib || :'
|
1093 | |
else
|
1094 | |
_lt_dsymutil=
|
1095 | |
fi
|
1096 | |
;;
|
1097 | |
esac
|
1098 | |
])
|
1099 | |
|
1100 | |
|
1101 | |
# _LT_DARWIN_LINKER_FEATURES([TAG])
|
1102 | |
# ---------------------------------
|
1103 | |
# Checks for linker and compiler features on darwin
|
1104 | |
m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
1105 | |
[
|
1106 | |
m4_require([_LT_REQUIRED_DARWIN_CHECKS])
|
1107 | |
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
|
1108 | |
_LT_TAGVAR(hardcode_direct, $1)=no
|
1109 | |
_LT_TAGVAR(hardcode_automatic, $1)=yes
|
1110 | |
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
1111 | |
if test yes = "$lt_cv_ld_force_load"; then
|
1112 | |
_LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
|
1113 | |
m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
|
1114 | |
[FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
|
1115 | |
else
|
1116 | |
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
|
1117 | |
fi
|
1118 | |
_LT_TAGVAR(link_all_deplibs, $1)=yes
|
1119 | |
_LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
|
1120 | |
case $cc_basename in
|
1121 | |
ifort*|nagfor*) _lt_dar_can_shared=yes ;;
|
1122 | |
*) _lt_dar_can_shared=$GCC ;;
|
1123 | |
esac
|
1124 | |
if test yes = "$_lt_dar_can_shared"; then
|
1125 | |
output_verbose_link_cmd=func_echo_all
|
1126 | |
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
|
1127 | |
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
|
1128 | |
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
|
1129 | |
_LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
|
1130 | |
m4_if([$1], [CXX],
|
1131 | |
[ if test yes != "$lt_cv_apple_cc_single_mod"; then
|
1132 | |
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
|
1133 | |
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
|
1134 | |
fi
|
1135 | |
],[])
|
1136 | |
else
|
1137 | |
_LT_TAGVAR(ld_shlibs, $1)=no
|
1138 | |
fi
|
1139 | |
])
|
1140 | |
|
1141 | |
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
|
1142 | |
# ----------------------------------
|
1143 | |
# Links a minimal program and checks the executable
|
1144 | |
# for the system default hardcoded library path. In most cases,
|
1145 | |
# this is /usr/lib:/lib, but when the MPI compilers are used
|
1146 | |
# the location of the communication and MPI libs are included too.
|
1147 | |
# If we don't find anything, use the default library path according
|
1148 | |
# to the aix ld manual.
|
1149 | |
# Store the results from the different compilers for each TAGNAME.
|
1150 | |
# Allow to override them for all tags through lt_cv_aix_libpath.
|
1151 | |
m4_defun([_LT_SYS_MODULE_PATH_AIX],
|
1152 | |
[m4_require([_LT_DECL_SED])dnl
|
1153 | |
if test set = "${lt_cv_aix_libpath+set}"; then
|
1154 | |
aix_libpath=$lt_cv_aix_libpath
|
1155 | |
else
|
1156 | |
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
|
1157 | |
[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
|
1158 | |
lt_aix_libpath_sed='[
|
1159 | |
/Import File Strings/,/^$/ {
|
1160 | |
/^0/ {
|
1161 | |
s/^0 *\([^ ]*\) *$/\1/
|
1162 | |
p
|
1163 | |
}
|
1164 | |
}]'
|
1165 | |
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
|
1166 | |
# Check for a 64-bit object if we didn't find anything.
|
1167 | |
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
|
1168 | |
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
|
1169 | |
fi],[])
|
1170 | |
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
|
1171 | |
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
|
1172 | |
fi
|
1173 | |
])
|
1174 | |
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
|
1175 | |
fi
|
1176 | |
])# _LT_SYS_MODULE_PATH_AIX
|
1177 | |
|
1178 | |
|
1179 | |
# _LT_SHELL_INIT(ARG)
|
1180 | |
# -------------------
|
1181 | |
m4_define([_LT_SHELL_INIT],
|
1182 | |
[m4_divert_text([M4SH-INIT], [$1
|
1183 | |
])])# _LT_SHELL_INIT
|
1184 | |
|
1185 | |
|
1186 | |
|
1187 | |
# _LT_PROG_ECHO_BACKSLASH
|
1188 | |
# -----------------------
|
1189 | |
# Find how we can fake an echo command that does not interpret backslash.
|
1190 | |
# In particular, with Autoconf 2.60 or later we add some code to the start
|
1191 | |
# of the generated configure script that will find a shell with a builtin
|
1192 | |
# printf (that we can use as an echo command).
|
1193 | |
m4_defun([_LT_PROG_ECHO_BACKSLASH],
|
1194 | |
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
|
1195 | |
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
|
1196 | |
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
|
1197 | |
|
1198 | |
AC_MSG_CHECKING([how to print strings])
|
1199 | |
# Test print first, because it will be a builtin if present.
|
1200 | |
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
|
1201 | |
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
|
1202 | |
ECHO='print -r --'
|
1203 | |
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
|
1204 | |
ECHO='printf %s\n'
|
1205 | |
else
|
1206 | |
# Use this function as a fallback that always works.
|
1207 | |
func_fallback_echo ()
|
1208 | |
{
|
1209 | |
eval 'cat <<_LTECHO_EOF
|
1210 | |
$[]1
|
1211 | |
_LTECHO_EOF'
|
1212 | |
}
|
1213 | |
ECHO='func_fallback_echo'
|
1214 | |
fi
|
1215 | |
|
1216 | |
# func_echo_all arg...
|
1217 | |
# Invoke $ECHO with all args, space-separated.
|
1218 | |
func_echo_all ()
|
1219 | |
{
|
1220 | |
$ECHO "$*"
|
1221 | |
}
|
1222 | |
|
1223 | |
case $ECHO in
|
1224 | |
printf*) AC_MSG_RESULT([printf]) ;;
|
1225 | |
print*) AC_MSG_RESULT([print -r]) ;;
|
1226 | |
*) AC_MSG_RESULT([cat]) ;;
|
1227 | |
esac
|
1228 | |
|
1229 | |
m4_ifdef([_AS_DETECT_SUGGESTED],
|
1230 | |
[_AS_DETECT_SUGGESTED([
|
1231 | |
test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
|
1232 | |
ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
|
1233 | |
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
|
1234 | |
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
|
1235 | |
PATH=/empty FPATH=/empty; export PATH FPATH
|
1236 | |
test "X`printf %s $ECHO`" = "X$ECHO" \
|
1237 | |
|| test "X`print -r -- $ECHO`" = "X$ECHO" )])])
|
1238 | |
|
1239 | |
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
|
1240 | |
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
|
1241 | |
])# _LT_PROG_ECHO_BACKSLASH
|
1242 | |
|
1243 | |
|
1244 | |
# _LT_WITH_SYSROOT
|
1245 | |
# ----------------
|
1246 | |
AC_DEFUN([_LT_WITH_SYSROOT],
|
1247 | |
[AC_MSG_CHECKING([for sysroot])
|
1248 | |
AC_ARG_WITH([sysroot],
|
1249 | |
[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
|
1250 | |
[Search for dependent libraries within DIR (or the compiler's sysroot
|
1251 | |
if not specified).])],
|
1252 | |
[], [with_sysroot=no])
|
1253 | |
|
1254 | |
dnl lt_sysroot will always be passed unquoted. We quote it here
|
1255 | |
dnl in case the user passed a directory name.
|
1256 | |
lt_sysroot=
|
1257 | |
case $with_sysroot in #(
|
1258 | |
yes)
|
1259 | |
if test yes = "$GCC"; then
|
1260 | |
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
|
1261 | |
fi
|
1262 | |
;; #(
|
1263 | |
/*)
|
1264 | |
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
|
1265 | |
;; #(
|
1266 | |
no|'')
|
1267 | |
;; #(
|
1268 | |
*)
|
1269 | |
AC_MSG_RESULT([$with_sysroot])
|
1270 | |
AC_MSG_ERROR([The sysroot must be an absolute path.])
|
1271 | |
;;
|
1272 | |
esac
|
1273 | |
|
1274 | |
AC_MSG_RESULT([${lt_sysroot:-no}])
|
1275 | |
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
|
1276 | |
[dependent libraries, and where our libraries should be installed.])])
|
1277 | |
|
1278 | |
# _LT_ENABLE_LOCK
|
1279 | |
# ---------------
|
1280 | |
m4_defun([_LT_ENABLE_LOCK],
|
1281 | |
[AC_ARG_ENABLE([libtool-lock],
|
1282 | |
[AS_HELP_STRING([--disable-libtool-lock],
|
1283 | |
[avoid locking (might break parallel builds)])])
|
1284 | |
test no = "$enable_libtool_lock" || enable_libtool_lock=yes
|
1285 | |
|
1286 | |
# Some flags need to be propagated to the compiler or linker for good
|
1287 | |
# libtool support.
|
1288 | |
case $host in
|
1289 | |
ia64-*-hpux*)
|
1290 | |
# Find out what ABI is being produced by ac_compile, and set mode
|
1291 | |
# options accordingly.
|
1292 | |
echo 'int i;' > conftest.$ac_ext
|
1293 | |
if AC_TRY_EVAL(ac_compile); then
|
1294 | |
case `/usr/bin/file conftest.$ac_objext` in
|
1295 | |
*ELF-32*)
|
1296 | |
HPUX_IA64_MODE=32
|
1297 | |
;;
|
1298 | |
*ELF-64*)
|
1299 | |
HPUX_IA64_MODE=64
|
1300 | |
;;
|
1301 | |
esac
|
1302 | |
fi
|
1303 | |
rm -rf conftest*
|
1304 | |
;;
|
1305 | |
*-*-irix6*)
|
1306 | |
# Find out what ABI is being produced by ac_compile, and set linker
|
1307 | |
# options accordingly.
|
1308 | |
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
|
1309 | |
if AC_TRY_EVAL(ac_compile); then
|
1310 | |
if test yes = "$lt_cv_prog_gnu_ld"; then
|
1311 | |
case `/usr/bin/file conftest.$ac_objext` in
|
1312 | |
*32-bit*)
|
1313 | |
LD="${LD-ld} -melf32bsmip"
|
1314 | |
;;
|
1315 | |
*N32*)
|
1316 | |
LD="${LD-ld} -melf32bmipn32"
|
1317 | |
;;
|
1318 | |
*64-bit*)
|
1319 | |
LD="${LD-ld} -melf64bmip"
|
1320 | |
;;
|
1321 | |
esac
|
1322 | |
else
|
1323 | |
case `/usr/bin/file conftest.$ac_objext` in
|
1324 | |
*32-bit*)
|
1325 | |
LD="${LD-ld} -32"
|
1326 | |
;;
|
1327 | |
*N32*)
|
1328 | |
LD="${LD-ld} -n32"
|
1329 | |
;;
|
1330 | |
*64-bit*)
|
1331 | |
LD="${LD-ld} -64"
|
1332 | |
;;
|
1333 | |
esac
|
1334 | |
fi
|
1335 | |
fi
|
1336 | |
rm -rf conftest*
|
1337 | |
;;
|
1338 | |
|
1339 | |
mips64*-*linux*)
|
1340 | |
# Find out what ABI is being produced by ac_compile, and set linker
|
1341 | |
# options accordingly.
|
1342 | |
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
|
1343 | |
if AC_TRY_EVAL(ac_compile); then
|
1344 | |
emul=elf
|
1345 | |
case `/usr/bin/file conftest.$ac_objext` in
|
1346 | |
*32-bit*)
|
1347 | |
emul="${emul}32"
|
1348 | |
;;
|
1349 | |
*64-bit*)
|
1350 | |
emul="${emul}64"
|
1351 | |
;;
|
1352 | |
esac
|
1353 | |
case `/usr/bin/file conftest.$ac_objext` in
|
1354 | |
*MSB*)
|
1355 | |
emul="${emul}btsmip"
|
1356 | |
;;
|
1357 | |
*LSB*)
|
1358 | |
emul="${emul}ltsmip"
|
1359 | |
;;
|
1360 | |
esac
|
1361 | |
case `/usr/bin/file conftest.$ac_objext` in
|
1362 | |
*N32*)
|
1363 | |
emul="${emul}n32"
|
1364 | |
;;
|
1365 | |
esac
|
1366 | |
LD="${LD-ld} -m $emul"
|
1367 | |
fi
|
1368 | |
rm -rf conftest*
|
1369 | |
;;
|
1370 | |
|
1371 | |
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
1372 | |
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
1373 | |
# Find out what ABI is being produced by ac_compile, and set linker
|
1374 | |
# options accordingly. Note that the listed cases only cover the
|
1375 | |
# situations where additional linker options are needed (such as when
|
1376 | |
# doing 32-bit compilation for a host where ld defaults to 64-bit, or
|
1377 | |
# vice versa); the common cases where no linker options are needed do
|
1378 | |
# not appear in the list.
|
1379 | |
echo 'int i;' > conftest.$ac_ext
|
1380 | |
if AC_TRY_EVAL(ac_compile); then
|
1381 | |
case `/usr/bin/file conftest.o` in
|
1382 | |
*32-bit*)
|
1383 | |
case $host in
|
1384 | |
x86_64-*kfreebsd*-gnu)
|
1385 | |
LD="${LD-ld} -m elf_i386_fbsd"
|
1386 | |
;;
|
1387 | |
x86_64-*linux*)
|
1388 | |
case `/usr/bin/file conftest.o` in
|
1389 | |
*x86-64*)
|
1390 | |
LD="${LD-ld} -m elf32_x86_64"
|
1391 | |
;;
|
1392 | |
*)
|
1393 | |
LD="${LD-ld} -m elf_i386"
|
1394 | |
;;
|
1395 | |
esac
|
1396 | |
;;
|
1397 | |
powerpc64le-*linux*)
|
1398 | |
LD="${LD-ld} -m elf32lppclinux"
|
1399 | |
;;
|
1400 | |
powerpc64-*linux*)
|
1401 | |
LD="${LD-ld} -m elf32ppclinux"
|
1402 | |
;;
|
1403 | |
s390x-*linux*)
|
1404 | |
LD="${LD-ld} -m elf_s390"
|
1405 | |
;;
|
1406 | |
sparc64-*linux*)
|
1407 | |
LD="${LD-ld} -m elf32_sparc"
|
1408 | |
;;
|
1409 | |
esac
|
1410 | |
;;
|
1411 | |
*64-bit*)
|
1412 | |
case $host in
|
1413 | |
x86_64-*kfreebsd*-gnu)
|
1414 | |
LD="${LD-ld} -m elf_x86_64_fbsd"
|
1415 | |
;;
|
1416 | |
x86_64-*linux*)
|
1417 | |
LD="${LD-ld} -m elf_x86_64"
|
1418 | |
;;
|
1419 | |
powerpcle-*linux*)
|
1420 | |
LD="${LD-ld} -m elf64lppc"
|
1421 | |
;;
|
1422 | |
powerpc-*linux*)
|
1423 | |
LD="${LD-ld} -m elf64ppc"
|
1424 | |
;;
|
1425 | |
s390*-*linux*|s390*-*tpf*)
|
1426 | |
LD="${LD-ld} -m elf64_s390"
|
1427 | |
;;
|
1428 | |
sparc*-*linux*)
|
1429 | |
LD="${LD-ld} -m elf64_sparc"
|
1430 | |
;;
|
1431 | |
esac
|
1432 | |
;;
|
1433 | |
esac
|
1434 | |
fi
|
1435 | |
rm -rf conftest*
|
1436 | |
;;
|
1437 | |
|
1438 | |
*-*-sco3.2v5*)
|
1439 | |
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
1440 | |
SAVE_CFLAGS=$CFLAGS
|
1441 | |
CFLAGS="$CFLAGS -belf"
|
1442 | |
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
1443 | |
[AC_LANG_PUSH(C)
|
1444 | |
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
|
1445 | |
AC_LANG_POP])
|
1446 | |
if test yes != "$lt_cv_cc_needs_belf"; then
|
1447 | |
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
1448 | |
CFLAGS=$SAVE_CFLAGS
|
1449 | |
fi
|
1450 | |
;;
|
1451 | |
*-*solaris*)
|
1452 | |
# Find out what ABI is being produced by ac_compile, and set linker
|
1453 | |
# options accordingly.
|
1454 | |
echo 'int i;' > conftest.$ac_ext
|
1455 | |
if AC_TRY_EVAL(ac_compile); then
|
1456 | |
case `/usr/bin/file conftest.o` in
|
1457 | |
*64-bit*)
|
1458 | |
case $lt_cv_prog_gnu_ld in
|
1459 | |
yes*)
|
1460 | |
case $host in
|
1461 | |
i?86-*-solaris*|x86_64-*-solaris*)
|
1462 | |
LD="${LD-ld} -m elf_x86_64"
|
1463 | |
;;
|
1464 | |
sparc*-*-solaris*)
|
1465 | |
LD="${LD-ld} -m elf64_sparc"
|
1466 | |
;;
|
1467 | |
esac
|
1468 | |
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
|
1469 | |
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
|
1470 | |
LD=${LD-ld}_sol2
|
1471 | |
fi
|
1472 | |
;;
|
1473 | |
*)
|
1474 | |
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
|
1475 | |
LD="${LD-ld} -64"
|
1476 | |
fi
|
1477 | |
;;
|
1478 | |
esac
|
1479 | |
;;
|
1480 | |
esac
|
1481 | |
fi
|
1482 | |
rm -rf conftest*
|
1483 | |
;;
|
1484 | |
esac
|
1485 | |
|
1486 | |
need_locks=$enable_libtool_lock
|
1487 | |
])# _LT_ENABLE_LOCK
|
1488 | |
|
1489 | |
|
1490 | |
# _LT_PROG_AR
|
1491 | |
# -----------
|
1492 | |
m4_defun([_LT_PROG_AR],
|
1493 | |
[AC_CHECK_TOOLS(AR, [ar], false)
|
1494 | |
: ${AR=ar}
|
1495 | |
: ${AR_FLAGS=cru}
|
1496 | |
_LT_DECL([], [AR], [1], [The archiver])
|
1497 | |
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
|
1498 | |
|
1499 | |
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
|
1500 | |
[lt_cv_ar_at_file=no
|
1501 | |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
|
1502 | |
[echo conftest.$ac_objext > conftest.lst
|
1503 | |
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
|
1504 | |
AC_TRY_EVAL([lt_ar_try])
|
1505 | |
if test 0 -eq "$ac_status"; then
|
1506 | |
# Ensure the archiver fails upon bogus file names.
|
1507 | |
rm -f conftest.$ac_objext libconftest.a
|
1508 | |
AC_TRY_EVAL([lt_ar_try])
|
1509 | |
if test 0 -ne "$ac_status"; then
|
1510 | |
lt_cv_ar_at_file=@
|
1511 | |
fi
|
1512 | |
fi
|
1513 | |
rm -f conftest.* libconftest.a
|
1514 | |
])
|
1515 | |
])
|
1516 | |
|
1517 | |
if test no = "$lt_cv_ar_at_file"; then
|
1518 | |
archiver_list_spec=
|
1519 | |
else
|
1520 | |
archiver_list_spec=$lt_cv_ar_at_file
|
1521 | |
fi
|
1522 | |
_LT_DECL([], [archiver_list_spec], [1],
|
1523 | |
[How to feed a file listing to the archiver])
|
1524 | |
])# _LT_PROG_AR
|
1525 | |
|
1526 | |
|
1527 | |
# _LT_CMD_OLD_ARCHIVE
|
1528 | |
# -------------------
|
1529 | |
m4_defun([_LT_CMD_OLD_ARCHIVE],
|
1530 | |
[_LT_PROG_AR
|
1531 | |
|
1532 | |
AC_CHECK_TOOL(STRIP, strip, :)
|
1533 | |
test -z "$STRIP" && STRIP=:
|
1534 | |
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
|
1535 | |
|
1536 | |
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
1537 | |
test -z "$RANLIB" && RANLIB=:
|
1538 | |
_LT_DECL([], [RANLIB], [1],
|
1539 | |
[Commands used to install an old-style archive])
|
1540 | |
|
1541 | |
# Determine commands to create old-style static archives.
|
1542 | |
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
|
1543 | |
old_postinstall_cmds='chmod 644 $oldlib'
|
1544 | |
old_postuninstall_cmds=
|
1545 | |
|
1546 | |
if test -n "$RANLIB"; then
|
1547 | |
case $host_os in
|
1548 | |
bitrig* | openbsd*)
|
1549 | |
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
|
1550 | |
;;
|
1551 | |
*)
|
1552 | |
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
1553 | |
;;
|
1554 | |
esac
|
1555 | |
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
1556 | |
fi
|
1557 | |
|
1558 | |
case $host_os in
|
1559 | |
darwin*)
|
1560 | |
lock_old_archive_extraction=yes ;;
|
1561 | |
*)
|
1562 | |
lock_old_archive_extraction=no ;;
|
1563 | |
esac
|
1564 | |
_LT_DECL([], [old_postinstall_cmds], [2])
|
1565 | |
_LT_DECL([], [old_postuninstall_cmds], [2])
|
1566 | |
_LT_TAGDECL([], [old_archive_cmds], [2],
|
1567 | |
[Commands used to build an old-style archive])
|
1568 | |
_LT_DECL([], [lock_old_archive_extraction], [0],
|
1569 | |
[Whether to use a lock for old archive extraction])
|
1570 | |
])# _LT_CMD_OLD_ARCHIVE
|
1571 | |
|
1572 | |
|
1573 | |
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
|
1574 | |
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
|
1575 | |
# ----------------------------------------------------------------
|
1576 | |
# Check whether the given compiler option works
|
1577 | |
AC_DEFUN([_LT_COMPILER_OPTION],
|
1578 | |
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
|
1579 | |
m4_require([_LT_DECL_SED])dnl
|
1580 | |
AC_CACHE_CHECK([$1], [$2],
|
1581 | |
[$2=no
|
1582 | |
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
|
1583 | |
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
|
1584 | |
lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
|
1585 | |
# Insert the option either (1) after the last *FLAGS variable, or
|
1586 | |
# (2) before a word containing "conftest.", or (3) at the end.
|
1587 | |
# Note that $ac_compile itself does not contain backslashes and begins
|
1588 | |
# with a dollar sign (not a hyphen), so the echo should work correctly.
|
1589 | |
# The option is referenced via a variable to avoid confusing sed.
|
1590 | |
lt_compile=`echo "$ac_compile" | $SED \
|
1591 | |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
1592 | |
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
|
1593 | |
-e 's:$: $lt_compiler_flag:'`
|
1594 | |
(eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
|
1595 | |
(eval "$lt_compile" 2>conftest.err)
|
1596 | |
ac_status=$?
|
1597 | |
cat conftest.err >&AS_MESSAGE_LOG_FD
|
1598 | |
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
1599 | |
if (exit $ac_status) && test -s "$ac_outfile"; then
|
1600 | |
# The compiler can only warn and ignore the option if not recognized
|
1601 | |
# So say no if there are warnings other than the usual output.
|
1602 | |
$ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
|
1603 | |
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
|
1604 | |
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
|
1605 | |
$2=yes
|
1606 | |
fi
|
1607 | |
fi
|
1608 | |
$RM conftest*
|
1609 | |
])
|
1610 | |
|
1611 | |
if test yes = "[$]$2"; then
|
1612 | |
m4_if([$5], , :, [$5])
|
1613 | |
else
|
1614 | |
m4_if([$6], , :, [$6])
|
1615 | |
fi
|
1616 | |
])# _LT_COMPILER_OPTION
|
1617 | |
|
1618 | |
# Old name:
|
1619 | |
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
|
1620 | |
dnl aclocal-1.4 backwards compatibility:
|
1621 | |
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
|
1622 | |
|
1623 | |
|
1624 | |
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
|
1625 | |
# [ACTION-SUCCESS], [ACTION-FAILURE])
|
1626 | |
# ----------------------------------------------------
|
1627 | |
# Check whether the given linker option works
|
1628 | |
AC_DEFUN([_LT_LINKER_OPTION],
|
1629 | |
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
|
1630 | |
m4_require([_LT_DECL_SED])dnl
|
1631 | |
AC_CACHE_CHECK([$1], [$2],
|
1632 | |
[$2=no
|
1633 | |
save_LDFLAGS=$LDFLAGS
|
1634 | |
LDFLAGS="$LDFLAGS $3"
|
1635 | |
echo "$lt_simple_link_test_code" > conftest.$ac_ext
|
1636 | |
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
|
1637 | |
# The linker can only warn and ignore the option if not recognized
|
1638 | |
# So say no if there are warnings
|
1639 | |
if test -s conftest.err; then
|
1640 | |
# Append any errors to the config.log.
|
1641 | |
cat conftest.err 1>&AS_MESSAGE_LOG_FD
|
1642 | |
$ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
|
1643 | |
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
|
1644 | |
if diff conftest.exp conftest.er2 >/dev/null; then
|
1645 | |
$2=yes
|
1646 | |
fi
|
1647 | |
else
|
1648 | |
$2=yes
|
1649 | |
fi
|
1650 | |
fi
|
1651 | |
$RM -r conftest*
|
1652 | |
LDFLAGS=$save_LDFLAGS
|
1653 | |
])
|
1654 | |
|
1655 | |
if test yes = "[$]$2"; then
|
1656 | |
m4_if([$4], , :, [$4])
|
1657 | |
else
|
1658 | |
m4_if([$5], , :, [$5])
|
1659 | |
fi
|
1660 | |
])# _LT_LINKER_OPTION
|
1661 | |
|
1662 | |
# Old name:
|
1663 | |
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
|
1664 | |
dnl aclocal-1.4 backwards compatibility:
|
1665 | |
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
|
1666 | |
|
1667 | |
|
1668 | |
# LT_CMD_MAX_LEN
|
1669 | |
#---------------
|
1670 | |
AC_DEFUN([LT_CMD_MAX_LEN],
|
1671 | |
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
1672 | |
# find the maximum length of command line arguments
|
1673 | |
AC_MSG_CHECKING([the maximum length of command line arguments])
|
1674 | |
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
1675 | |
i=0
|
1676 | |
teststring=ABCD
|
1677 | |
|
1678 | |
case $build_os in
|
1679 | |
msdosdjgpp*)
|
1680 | |
# On DJGPP, this test can blow up pretty badly due to problems in libc
|
1681 | |
# (any single argument exceeding 2000 bytes causes a buffer overrun
|
1682 | |
# during glob expansion). Even if it were fixed, the result of this
|
1683 | |
# check would be larger than it should be.
|
1684 | |
lt_cv_sys_max_cmd_len=12288; # 12K is about right
|
1685 | |
;;
|
1686 | |
|
1687 | |
gnu*)
|
1688 | |
# Under GNU Hurd, this test is not required because there is
|
1689 | |
# no limit to the length of command line arguments.
|
1690 | |
# Libtool will interpret -1 as no limit whatsoever
|
1691 | |
lt_cv_sys_max_cmd_len=-1;
|
1692 | |
;;
|
1693 | |
|
1694 | |
cygwin* | mingw* | cegcc*)
|
1695 | |
# On Win9x/ME, this test blows up -- it succeeds, but takes
|
1696 | |
# about 5 minutes as the teststring grows exponentially.
|
1697 | |
# Worse, since 9x/ME are not pre-emptively multitasking,
|
1698 | |
# you end up with a "frozen" computer, even though with patience
|
1699 | |
# the test eventually succeeds (with a max line length of 256k).
|
1700 | |
# Instead, let's just punt: use the minimum linelength reported by
|
1701 | |
# all of the supported platforms: 8192 (on NT/2K/XP).
|
1702 | |
lt_cv_sys_max_cmd_len=8192;
|
1703 | |
;;
|
1704 | |
|
1705 | |
mint*)
|
1706 | |
# On MiNT this can take a long time and run out of memory.
|
1707 | |
lt_cv_sys_max_cmd_len=8192;
|
1708 | |
;;
|
1709 | |
|
1710 | |
amigaos*)
|
1711 | |
# On AmigaOS with pdksh, this test takes hours, literally.
|
1712 | |
# So we just punt and use a minimum line length of 8192.
|
1713 | |
lt_cv_sys_max_cmd_len=8192;
|
1714 | |
;;
|
1715 | |
|
1716 | |
bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
|
1717 | |
# This has been around since 386BSD, at least. Likely further.
|
1718 | |
if test -x /sbin/sysctl; then
|
1719 | |
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
|
1720 | |
elif test -x /usr/sbin/sysctl; then
|
1721 | |
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
|
1722 | |
else
|
1723 | |
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
|
1724 | |
fi
|
1725 | |
# And add a safety zone
|
1726 | |
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
|
1727 | |
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
|
1728 | |
;;
|
1729 | |
|
1730 | |
interix*)
|
1731 | |
# We know the value 262144 and hardcode it with a safety zone (like BSD)
|
1732 | |
lt_cv_sys_max_cmd_len=196608
|
1733 | |
;;
|
1734 | |
|
1735 | |
os2*)
|
1736 | |
# The test takes a long time on OS/2.
|
1737 | |
lt_cv_sys_max_cmd_len=8192
|
1738 | |
;;
|
1739 | |
|
1740 | |
osf*)
|
1741 | |
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
|
1742 | |
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
|
1743 | |
# nice to cause kernel panics so lets avoid the loop below.
|
1744 | |
# First set a reasonable default.
|
1745 | |
lt_cv_sys_max_cmd_len=16384
|
1746 | |
#
|
1747 | |
if test -x /sbin/sysconfig; then
|
1748 | |
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
|
1749 | |
*1*) lt_cv_sys_max_cmd_len=-1 ;;
|
1750 | |
esac
|
1751 | |
fi
|
1752 | |
;;
|
1753 | |
sco3.2v5*)
|
1754 | |
lt_cv_sys_max_cmd_len=102400
|
1755 | |
;;
|
1756 | |
sysv5* | sco5v6* | sysv4.2uw2*)
|
1757 | |
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
|
1758 | |
if test -n "$kargmax"; then
|
1759 | |
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
|
1760 | |
else
|
1761 | |
lt_cv_sys_max_cmd_len=32768
|
1762 | |
fi
|
1763 | |
;;
|
1764 | |
*)
|
1765 | |
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
|
1766 | |
if test -n "$lt_cv_sys_max_cmd_len" && \
|
1767 | |
test undefined != "$lt_cv_sys_max_cmd_len"; then
|
1768 | |
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
|
1769 | |
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
|
1770 | |
else
|
1771 | |
# Make teststring a little bigger before we do anything with it.
|
1772 | |
# a 1K string should be a reasonable start.
|
1773 | |
for i in 1 2 3 4 5 6 7 8; do
|
1774 | |
teststring=$teststring$teststring
|
1775 | |
done
|
1776 | |
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
|
1777 | |
# If test is not a shell built-in, we'll probably end up computing a
|
1778 | |
# maximum length that is only half of the actual maximum length, but
|
1779 | |
# we can't tell.
|
1780 | |
while { test X`env echo "$teststring$teststring" 2>/dev/null` \
|
1781 | |
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
|
1782 | |
test 17 != "$i" # 1/2 MB should be enough
|
1783 | |
do
|
1784 | |
i=`expr $i + 1`
|
1785 | |
teststring=$teststring$teststring
|
1786 | |
done
|
1787 | |
# Only check the string length outside the loop.
|
1788 | |
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
|
1789 | |
teststring=
|
1790 | |
# Add a significant safety factor because C++ compilers can tack on
|
1791 | |
# massive amounts of additional arguments before passing them to the
|
1792 | |
# linker. It appears as though 1/2 is a usable value.
|
1793 | |
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
|
1794 | |
fi
|
1795 | |
;;
|
1796 | |
esac
|
1797 | |
])
|
1798 | |
if test -n "$lt_cv_sys_max_cmd_len"; then
|
1799 | |
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
|
1800 | |
else
|
1801 | |
AC_MSG_RESULT(none)
|
1802 | |
fi
|
1803 | |
max_cmd_len=$lt_cv_sys_max_cmd_len
|
1804 | |
_LT_DECL([], [max_cmd_len], [0],
|
1805 | |
[What is the maximum length of a command?])
|
1806 | |
])# LT_CMD_MAX_LEN
|
1807 | |
|
1808 | |
# Old name:
|
1809 | |
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
|
1810 | |
dnl aclocal-1.4 backwards compatibility:
|
1811 | |
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
|
1812 | |
|
1813 | |
|
1814 | |
# _LT_HEADER_DLFCN
|
1815 | |
# ----------------
|
1816 | |
m4_defun([_LT_HEADER_DLFCN],
|
1817 | |
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
|
1818 | |
])# _LT_HEADER_DLFCN
|
1819 | |
|
1820 | |
|
1821 | |
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
|
1822 | |
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
|
1823 | |
# ----------------------------------------------------------------
|
1824 | |
m4_defun([_LT_TRY_DLOPEN_SELF],
|
1825 | |
[m4_require([_LT_HEADER_DLFCN])dnl
|
1826 | |
if test yes = "$cross_compiling"; then :
|
1827 | |
[$4]
|
1828 | |
else
|
1829 | |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
1830 | |
lt_status=$lt_dlunknown
|
1831 | |
cat > conftest.$ac_ext <<_LT_EOF
|
1832 | |
[#line $LINENO "configure"
|
1833 | |
#include "confdefs.h"
|
1834 | |
|
1835 | |
#if HAVE_DLFCN_H
|
1836 | |
#include <dlfcn.h>
|
1837 | |
#endif
|
1838 | |
|
1839 | |
#include <stdio.h>
|
1840 | |
|
1841 | |
#ifdef RTLD_GLOBAL
|
1842 | |
# define LT_DLGLOBAL RTLD_GLOBAL
|
1843 | |
#else
|
1844 | |
# ifdef DL_GLOBAL
|
1845 | |
# define LT_DLGLOBAL DL_GLOBAL
|
1846 | |
# else
|
1847 | |
# define LT_DLGLOBAL 0
|
1848 | |
# endif
|
1849 | |
#endif
|
1850 | |
|
1851 | |
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
|
1852 | |
find out it does not work in some platform. */
|
1853 | |
#ifndef LT_DLLAZY_OR_NOW
|
1854 | |
# ifdef RTLD_LAZY
|
1855 | |
# define LT_DLLAZY_OR_NOW RTLD_LAZY
|
1856 | |
# else
|
1857 | |
# ifdef DL_LAZY
|
1858 | |
# define LT_DLLAZY_OR_NOW DL_LAZY
|
1859 | |
# else
|
1860 | |
# ifdef RTLD_NOW
|
1861 | |
# define LT_DLLAZY_OR_NOW RTLD_NOW
|
1862 | |
# else
|
1863 | |
# ifdef DL_NOW
|
1864 | |
# define LT_DLLAZY_OR_NOW DL_NOW
|
1865 | |
# else
|
1866 | |
# define LT_DLLAZY_OR_NOW 0
|
1867 | |
# endif
|
1868 | |
# endif
|
1869 | |
# endif
|
1870 | |
# endif
|
1871 | |
#endif
|
1872 | |
|
1873 | |
/* When -fvisibility=hidden is used, assume the code has been annotated
|
1874 | |
correspondingly for the symbols needed. */
|
1875 | |
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
|
1876 | |
int fnord () __attribute__((visibility("default")));
|
1877 | |
#endif
|
1878 | |
|
1879 | |
int fnord () { return 42; }
|
1880 | |
int main ()
|
1881 | |
{
|
1882 | |
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
|
1883 | |
int status = $lt_dlunknown;
|
1884 | |
|
1885 | |
if (self)
|
1886 | |
{
|
1887 | |
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
|
1888 | |
else
|
1889 | |
{
|
1890 | |
if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
|
1891 | |
else puts (dlerror ());
|
1892 | |
}
|
1893 | |
/* dlclose (self); */
|
1894 | |
}
|
1895 | |
else
|
1896 | |
puts (dlerror ());
|
1897 | |
|
1898 | |
return status;
|
1899 | |
}]
|
1900 | |
_LT_EOF
|
1901 | |
if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
|
1902 | |
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
|
1903 | |
lt_status=$?
|
1904 | |
case x$lt_status in
|
1905 | |
x$lt_dlno_uscore) $1 ;;
|
1906 | |
x$lt_dlneed_uscore) $2 ;;
|
1907 | |
x$lt_dlunknown|x*) $3 ;;
|
1908 | |
esac
|
1909 | |
else :
|
1910 | |
# compilation failed
|
1911 | |
$3
|
1912 | |
fi
|
1913 | |
fi
|
1914 | |
rm -fr conftest*
|
1915 | |
])# _LT_TRY_DLOPEN_SELF
|
1916 | |
|
1917 | |
|
1918 | |
# LT_SYS_DLOPEN_SELF
|
1919 | |
# ------------------
|
1920 | |
AC_DEFUN([LT_SYS_DLOPEN_SELF],
|
1921 | |
[m4_require([_LT_HEADER_DLFCN])dnl
|
1922 | |
if test yes != "$enable_dlopen"; then
|
1923 | |
enable_dlopen=unknown
|
1924 | |
enable_dlopen_self=unknown
|
1925 | |
enable_dlopen_self_static=unknown
|
1926 | |
else
|
1927 | |
lt_cv_dlopen=no
|
1928 | |
lt_cv_dlopen_libs=
|
1929 | |
|
1930 | |
case $host_os in
|
1931 | |
beos*)
|
1932 | |
lt_cv_dlopen=load_add_on
|
1933 | |
lt_cv_dlopen_libs=
|
1934 | |
lt_cv_dlopen_self=yes
|
1935 | |
;;
|
1936 | |
|
1937 | |
mingw* | pw32* | cegcc*)
|
1938 | |
lt_cv_dlopen=LoadLibrary
|
1939 | |
lt_cv_dlopen_libs=
|
1940 | |
;;
|
1941 | |
|
1942 | |
cygwin*)
|
1943 | |
lt_cv_dlopen=dlopen
|
1944 | |
lt_cv_dlopen_libs=
|
1945 | |
;;
|
1946 | |
|
1947 | |
darwin*)
|
1948 | |
# if libdl is installed we need to link against it
|
1949 | |
AC_CHECK_LIB([dl], [dlopen],
|
1950 | |
[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
|
1951 | |
lt_cv_dlopen=dyld
|
1952 | |
lt_cv_dlopen_libs=
|
1953 | |
lt_cv_dlopen_self=yes
|
1954 | |
])
|
1955 | |
;;
|
1956 | |
|
1957 | |
tpf*)
|
1958 | |
# Don't try to run any link tests for TPF. We know it's impossible
|
1959 | |
# because TPF is a cross-compiler, and we know how we open DSOs.
|
1960 | |
lt_cv_dlopen=dlopen
|
1961 | |
lt_cv_dlopen_libs=
|
1962 | |
lt_cv_dlopen_self=no
|
1963 | |
;;
|
1964 | |
|
1965 | |
*)
|
1966 | |
AC_CHECK_FUNC([shl_load],
|
1967 | |
[lt_cv_dlopen=shl_load],
|
1968 | |
[AC_CHECK_LIB([dld], [shl_load],
|
1969 | |
[lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
|
1970 | |
[AC_CHECK_FUNC([dlopen],
|
1971 | |
[lt_cv_dlopen=dlopen],
|
1972 | |
[AC_CHECK_LIB([dl], [dlopen],
|
1973 | |
[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
|
1974 | |
[AC_CHECK_LIB([svld], [dlopen],
|
1975 | |
[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
|
1976 | |
[AC_CHECK_LIB([dld], [dld_link],
|
1977 | |
[lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
|
1978 | |
])
|
1979 | |
])
|
1980 | |
])
|
1981 | |
])
|
1982 | |
])
|
1983 | |
;;
|
1984 | |
esac
|
1985 | |
|
1986 | |
if test no = "$lt_cv_dlopen"; then
|
1987 | |
enable_dlopen=no
|
1988 | |
else
|
1989 | |
enable_dlopen=yes
|
1990 | |
fi
|
1991 | |
|
1992 | |
case $lt_cv_dlopen in
|
1993 | |
dlopen)
|
1994 | |
save_CPPFLAGS=$CPPFLAGS
|
1995 | |
test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
|
1996 | |
|
1997 | |
save_LDFLAGS=$LDFLAGS
|
1998 | |
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
|
1999 | |
|
2000 | |
save_LIBS=$LIBS
|
2001 | |
LIBS="$lt_cv_dlopen_libs $LIBS"
|
2002 | |
|
2003 | |
AC_CACHE_CHECK([whether a program can dlopen itself],
|
2004 | |
lt_cv_dlopen_self, [dnl
|
2005 | |
_LT_TRY_DLOPEN_SELF(
|
2006 | |
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
|
2007 | |
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
|
2008 | |
])
|
2009 | |
|
2010 | |
if test yes = "$lt_cv_dlopen_self"; then
|
2011 | |
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
|
2012 | |
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
|
2013 | |
lt_cv_dlopen_self_static, [dnl
|
2014 | |
_LT_TRY_DLOPEN_SELF(
|
2015 | |
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
|
2016 | |
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
|
2017 | |
])
|
2018 | |
fi
|
2019 | |
|
2020 | |
CPPFLAGS=$save_CPPFLAGS
|
2021 | |
LDFLAGS=$save_LDFLAGS
|
2022 | |
LIBS=$save_LIBS
|
2023 | |
;;
|
2024 | |
esac
|
2025 | |
|
2026 | |
case $lt_cv_dlopen_self in
|
2027 | |
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
|
2028 | |
*) enable_dlopen_self=unknown ;;
|
2029 | |
esac
|
2030 | |
|
2031 | |
case $lt_cv_dlopen_self_static in
|
2032 | |
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
|
2033 | |
*) enable_dlopen_self_static=unknown ;;
|
2034 | |
esac
|
2035 | |
fi
|
2036 | |
_LT_DECL([dlopen_support], [enable_dlopen], [0],
|
2037 | |
[Whether dlopen is supported])
|
2038 | |
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
|
2039 | |
[Whether dlopen of programs is supported])
|
2040 | |
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
|
2041 | |
[Whether dlopen of statically linked programs is supported])
|
2042 | |
])# LT_SYS_DLOPEN_SELF
|
2043 | |
|
2044 | |
# Old name:
|
2045 | |
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
|
2046 | |
dnl aclocal-1.4 backwards compatibility:
|
2047 | |
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
|
2048 | |
|
2049 | |
|
2050 | |
# _LT_COMPILER_C_O([TAGNAME])
|
2051 | |
# ---------------------------
|
2052 | |
# Check to see if options -c and -o are simultaneously supported by compiler.
|
2053 | |
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
|
2054 | |
m4_defun([_LT_COMPILER_C_O],
|
2055 | |
[m4_require([_LT_DECL_SED])dnl
|
2056 | |
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
|
2057 | |
m4_require([_LT_TAG_COMPILER])dnl
|
2058 | |
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
|
2059 | |
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
|
2060 | |
[_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
|
2061 | |
$RM -r conftest 2>/dev/null
|
2062 | |
mkdir conftest
|
2063 | |
cd conftest
|
2064 | |
mkdir out
|
2065 | |
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
|
2066 | |
|
2067 | |
lt_compiler_flag="-o out/conftest2.$ac_objext"
|
2068 | |
# Insert the option either (1) after the last *FLAGS variable, or
|
2069 | |
# (2) before a word containing "conftest.", or (3) at the end.
|
2070 | |
# Note that $ac_compile itself does not contain backslashes and begins
|
2071 | |
# with a dollar sign (not a hyphen), so the echo should work correctly.
|
2072 | |
lt_compile=`echo "$ac_compile" | $SED \
|
2073 | |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
2074 | |
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
|
2075 | |
-e 's:$: $lt_compiler_flag:'`
|
2076 | |
(eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
|
2077 | |
(eval "$lt_compile" 2>out/conftest.err)
|
2078 | |
ac_status=$?
|
2079 | |
cat out/conftest.err >&AS_MESSAGE_LOG_FD
|
2080 | |
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
2081 | |
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
2082 | |
then
|
2083 | |
# The compiler can only warn and ignore the option if not recognized
|
2084 | |
# So say no if there are warnings
|
2085 | |
$ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
|
2086 | |
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
|
2087 | |
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
|
2088 | |
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
|
2089 | |
fi
|
2090 | |
fi
|
2091 | |
chmod u+w . 2>&AS_MESSAGE_LOG_FD
|
2092 | |
$RM conftest*
|
2093 | |
# SGI C++ compiler will create directory out/ii_files/ for
|
2094 | |
# template instantiation
|
2095 | |
test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
|
2096 | |
$RM out/* && rmdir out
|
2097 | |
cd ..
|
2098 | |
$RM -r conftest
|
2099 | |
$RM conftest*
|
2100 | |
])
|
2101 | |
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
|
2102 | |
[Does compiler simultaneously support -c and -o options?])
|
2103 | |
])# _LT_COMPILER_C_O
|
2104 | |
|
2105 | |
|
2106 | |
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
|
2107 | |
# ----------------------------------
|
2108 | |
# Check to see if we can do hard links to lock some files if needed
|
2109 | |
m4_defun([_LT_COMPILER_FILE_LOCKS],
|
2110 | |
[m4_require([_LT_ENABLE_LOCK])dnl
|
2111 | |
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
|
2112 | |
_LT_COMPILER_C_O([$1])
|
2113 | |
|
2114 | |
hard_links=nottested
|
2115 | |
if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
|
2116 | |
# do not overwrite the value of need_locks provided by the user
|
2117 | |
AC_MSG_CHECKING([if we can lock with hard links])
|
2118 | |
hard_links=yes
|
2119 | |
$RM conftest*
|
2120 | |
ln conftest.a conftest.b 2>/dev/null && hard_links=no
|
2121 | |
touch conftest.a
|
2122 | |
ln conftest.a conftest.b 2>&5 || hard_links=no
|
2123 | |
ln conftest.a conftest.b 2>/dev/null && hard_links=no
|
2124 | |
AC_MSG_RESULT([$hard_links])
|
2125 | |
if test no = "$hard_links"; then
|
2126 | |
AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
|
2127 | |
need_locks=warn
|
2128 | |
fi
|
2129 | |
else
|
2130 | |
need_locks=no
|
2131 | |
fi
|
2132 | |
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
|
2133 | |
])# _LT_COMPILER_FILE_LOCKS
|
2134 | |
|
2135 | |
|
2136 | |
# _LT_CHECK_OBJDIR
|
2137 | |
# ----------------
|
2138 | |
m4_defun([_LT_CHECK_OBJDIR],
|
2139 | |
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
|
2140 | |
[rm -f .libs 2>/dev/null
|
2141 | |
mkdir .libs 2>/dev/null
|
2142 | |
if test -d .libs; then
|
2143 | |
lt_cv_objdir=.libs
|
2144 | |
else
|
2145 | |
# MS-DOS does not allow filenames that begin with a dot.
|
2146 | |
lt_cv_objdir=_libs
|
2147 | |
fi
|
2148 | |
rmdir .libs 2>/dev/null])
|
2149 | |
objdir=$lt_cv_objdir
|
2150 | |
_LT_DECL([], [objdir], [0],
|
2151 | |
[The name of the directory that contains temporary libtool files])dnl
|
2152 | |
m4_pattern_allow([LT_OBJDIR])dnl
|
2153 | |
AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
|
2154 | |
[Define to the sub-directory where libtool stores uninstalled libraries.])
|
2155 | |
])# _LT_CHECK_OBJDIR
|
2156 | |
|
2157 | |
|
2158 | |
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
|
2159 | |
# --------------------------------------
|
2160 | |
# Check hardcoding attributes.
|
2161 | |
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
|
2162 | |
[AC_MSG_CHECKING([how to hardcode library paths into programs])
|
2163 | |
_LT_TAGVAR(hardcode_action, $1)=
|
2164 | |
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
|
2165 | |
test -n "$_LT_TAGVAR(runpath_var, $1)" ||
|
2166 | |
test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
|
2167 | |
|
2168 | |
# We can hardcode non-existent directories.
|
2169 | |
if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
|
2170 | |
# If the only mechanism to avoid hardcoding is shlibpath_var, we
|
2171 | |
# have to relink, otherwise we might link with an installed library
|
2172 | |
# when we should be linking with a yet-to-be-installed one
|
2173 | |
## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
|
2174 | |
test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
|
2175 | |
# Linking always hardcodes the temporary library directory.
|
2176 | |
_LT_TAGVAR(hardcode_action, $1)=relink
|
2177 | |
else
|
2178 | |
# We can link without hardcoding, and we can hardcode nonexisting dirs.
|
2179 | |
_LT_TAGVAR(hardcode_action, $1)=immediate
|
2180 | |
fi
|
2181 | |
else
|
2182 | |
# We cannot hardcode anything, or else we can only hardcode existing
|
2183 | |
# directories.
|
2184 | |
_LT_TAGVAR(hardcode_action, $1)=unsupported
|
2185 | |
fi
|
2186 | |
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
|
2187 | |
|
2188 | |
if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
|
2189 | |
test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
|
2190 | |
# Fast installation is not supported
|
2191 | |
enable_fast_install=no
|
2192 | |
elif test yes = "$shlibpath_overrides_runpath" ||
|
2193 | |
test no = "$enable_shared"; then
|
2194 | |
# Fast installation is not necessary
|
2195 | |
enable_fast_install=needless
|
2196 | |
fi
|
2197 | |
_LT_TAGDECL([], [hardcode_action], [0],
|
2198 | |
[How to hardcode a shared library path into an executable])
|
2199 | |
])# _LT_LINKER_HARDCODE_LIBPATH
|
2200 | |
|
2201 | |
|
2202 | |
# _LT_CMD_STRIPLIB
|
2203 | |
# ----------------
|
2204 | |
m4_defun([_LT_CMD_STRIPLIB],
|
2205 | |
[m4_require([_LT_DECL_EGREP])
|
2206 | |
striplib=
|
2207 | |
old_striplib=
|
2208 | |
AC_MSG_CHECKING([whether stripping libraries is possible])
|
2209 | |
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
|
2210 | |
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
|
2211 | |
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
|
2212 | |
AC_MSG_RESULT([yes])
|
2213 | |
else
|
2214 | |
# FIXME - insert some real tests, host_os isn't really good enough
|
2215 | |
case $host_os in
|
2216 | |
darwin*)
|
2217 | |
if test -n "$STRIP"; then
|
2218 | |
striplib="$STRIP -x"
|
2219 | |
old_striplib="$STRIP -S"
|
2220 | |
AC_MSG_RESULT([yes])
|
2221 | |
else
|
2222 | |
AC_MSG_RESULT([no])
|
2223 | |
fi
|
2224 | |
;;
|
2225 | |
*)
|
2226 | |
AC_MSG_RESULT([no])
|
2227 | |
;;
|
2228 | |
esac
|
2229 | |
fi
|
2230 | |
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
|
2231 | |
_LT_DECL([], [striplib], [1])
|
2232 | |
])# _LT_CMD_STRIPLIB
|
2233 | |
|
2234 | |
|
2235 | |
# _LT_PREPARE_MUNGE_PATH_LIST
|
2236 | |
# ---------------------------
|
2237 | |
# Make sure func_munge_path_list() is defined correctly.
|
2238 | |
m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
|
2239 | |
[[# func_munge_path_list VARIABLE PATH
|
2240 | |
# -----------------------------------
|
2241 | |
# VARIABLE is name of variable containing _space_ separated list of
|
2242 | |
# directories to be munged by the contents of PATH, which is string
|
2243 | |
# having a format:
|
2244 | |
# "DIR[:DIR]:"
|
2245 | |
# string "DIR[ DIR]" will be prepended to VARIABLE
|
2246 | |
# ":DIR[:DIR]"
|
2247 | |
# string "DIR[ DIR]" will be appended to VARIABLE
|
2248 | |
# "DIRP[:DIRP]::[DIRA:]DIRA"
|
2249 | |
# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
|
2250 | |
# "DIRA[ DIRA]" will be appended to VARIABLE
|
2251 | |
# "DIR[:DIR]"
|
2252 | |
# VARIABLE will be replaced by "DIR[ DIR]"
|
2253 | |
func_munge_path_list ()
|
2254 | |
{
|
2255 | |
case x@S|@2 in
|
2256 | |
x)
|
2257 | |
;;
|
2258 | |
*:)
|
2259 | |
eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
|
2260 | |
;;
|
2261 | |
x:*)
|
2262 | |
eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
|
2263 | |
;;
|
2264 | |
*::*)
|
2265 | |
eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
|
2266 | |
eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
|
2267 | |
;;
|
2268 | |
*)
|
2269 | |
eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
|
2270 | |
;;
|
2271 | |
esac
|
2272 | |
}
|
2273 | |
]])# _LT_PREPARE_PATH_LIST
|
2274 | |
|
2275 | |
|
2276 | |
# _LT_SYS_DYNAMIC_LINKER([TAG])
|
2277 | |
# -----------------------------
|
2278 | |
# PORTME Fill in your ld.so characteristics
|
2279 | |
m4_defun([_LT_SYS_DYNAMIC_LINKER],
|
2280 | |
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
2281 | |
m4_require([_LT_DECL_EGREP])dnl
|
2282 | |
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
|
2283 | |
m4_require([_LT_DECL_OBJDUMP])dnl
|
2284 | |
m4_require([_LT_DECL_SED])dnl
|
2285 | |
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
|
2286 | |
m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
|
2287 | |
AC_MSG_CHECKING([dynamic linker characteristics])
|
2288 | |
m4_if([$1],
|
2289 | |
[], [
|
2290 | |
if test yes = "$GCC"; then
|
2291 | |
case $host_os in
|
2292 | |
darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
|
2293 | |
*) lt_awk_arg='/^libraries:/' ;;
|
2294 | |
esac
|
2295 | |
case $host_os in
|
2296 | |
mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
|
2297 | |
*) lt_sed_strip_eq='s|=/|/|g' ;;
|
2298 | |
esac
|
2299 | |
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
|
2300 | |
case $lt_search_path_spec in
|
2301 | |
*\;*)
|
2302 | |
# if the path contains ";" then we assume it to be the separator
|
2303 | |
# otherwise default to the standard path separator (i.e. ":") - it is
|
2304 | |
# assumed that no part of a normal pathname contains ";" but that should
|
2305 | |
# okay in the real world where ";" in dirpaths is itself problematic.
|
2306 | |
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
|
2307 | |
;;
|
2308 | |
*)
|
2309 | |
lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
|
2310 | |
;;
|
2311 | |
esac
|
2312 | |
# Ok, now we have the path, separated by spaces, we can step through it
|
2313 | |
# and add multilib dir if necessary...
|
2314 | |
lt_tmp_lt_sear |