Commit | Line | Data |
---|---|---|
8d138742 | 1 | # generated automatically by aclocal 1.11 -*- Autoconf -*- |
d9898ee8 | 2 | |
3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | |
8d138742 | 4 | # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
d9898ee8 | 5 | # This file is free software; the Free Software Foundation |
6 | # gives unlimited permission to copy and/or distribute it, | |
7 | # with or without modifications, as long as this notice is preserved. | |
8 | ||
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
12 | # PARTICULAR PURPOSE. | |
13 | ||
ac40fd9e | 14 | m4_ifndef([AC_AUTOCONF_VERSION], |
15 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | |
8d138742 CE |
16 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, |
17 | [m4_warning([this file was generated for autoconf 2.63. | |
ac40fd9e | 18 | You have another version of autoconf. It may work, but is not guaranteed to. |
19 | If you have problems, you may need to regenerate the build system entirely. | |
20 | To do so, use the procedure documented by the package, typically `autoreconf'.])]) | |
dd184caf | 21 | |
8d138742 CE |
22 | # Portability macros for glibc argz. -*- Autoconf -*- |
23 | # | |
24 | # Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. | |
25 | # Written by Gary V. Vaughan <gary@gnu.org> | |
26 | # | |
27 | # This file is free software; the Free Software Foundation gives | |
28 | # unlimited permission to copy and/or distribute it, with or without | |
29 | # modifications, as long as this notice is preserved. | |
30 | ||
31 | # serial 5 argz.m4 | |
32 | ||
33 | AC_DEFUN([gl_FUNC_ARGZ], | |
34 | [gl_PREREQ_ARGZ | |
35 | ||
36 | AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT]) | |
37 | ||
38 | AC_CHECK_TYPES([error_t], | |
39 | [], | |
40 | [AC_DEFINE([error_t], [int], | |
41 | [Define to a type to use for `error_t' if it is not otherwise available.]) | |
42 | AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h | |
43 | does not typedef error_t.])], | |
44 | [#if defined(HAVE_ARGZ_H) | |
45 | # include <argz.h> | |
46 | #endif]) | |
47 | ||
48 | ARGZ_H= | |
49 | AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \ | |
50 | argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])]) | |
51 | ||
52 | dnl if have system argz functions, allow forced use of | |
53 | dnl libltdl-supplied implementation (and default to do so | |
54 | dnl on "known bad" systems). Could use a runtime check, but | |
55 | dnl (a) detecting malloc issues is notoriously unreliable | |
56 | dnl (b) only known system that declares argz functions, | |
57 | dnl provides them, yet they are broken, is cygwin | |
58 | dnl releases prior to 16-Mar-2007 (1.5.24 and earlier) | |
59 | dnl So, it's more straightforward simply to special case | |
60 | dnl this for known bad systems. | |
61 | AS_IF([test -z "$ARGZ_H"], | |
62 | [AC_CACHE_CHECK( | |
63 | [if argz actually works], | |
64 | [lt_cv_sys_argz_works], | |
65 | [[case $host_os in #( | |
66 | *cygwin*) | |
67 | lt_cv_sys_argz_works=no | |
68 | if test "$cross_compiling" != no; then | |
69 | lt_cv_sys_argz_works="guessing no" | |
70 | else | |
71 | lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/' | |
72 | save_IFS=$IFS | |
73 | IFS=-. | |
74 | set x `uname -r | sed -e "$lt_sed_extract_leading_digits"` | |
75 | IFS=$save_IFS | |
76 | lt_os_major=${2-0} | |
77 | lt_os_minor=${3-0} | |
78 | lt_os_micro=${4-0} | |
79 | if test "$lt_os_major" -gt 1 \ | |
80 | || { test "$lt_os_major" -eq 1 \ | |
81 | && { test "$lt_os_minor" -gt 5 \ | |
82 | || { test "$lt_os_minor" -eq 5 \ | |
83 | && test "$lt_os_micro" -gt 24; }; }; }; then | |
84 | lt_cv_sys_argz_works=yes | |
85 | fi | |
86 | fi | |
87 | ;; #( | |
88 | *) lt_cv_sys_argz_works=yes ;; | |
89 | esac]]) | |
90 | AS_IF([test $lt_cv_sys_argz_works = yes], | |
91 | [AC_DEFINE([HAVE_WORKING_ARGZ], 1, | |
92 | [This value is set to 1 to indicate that the system argz facility works])], | |
93 | [ARGZ_H=argz.h | |
94 | AC_LIBOBJ([argz])])]) | |
95 | ||
96 | AC_SUBST([ARGZ_H]) | |
97 | ]) | |
98 | ||
99 | # Prerequisites of lib/argz.c. | |
100 | AC_DEFUN([gl_PREREQ_ARGZ], [:]) | |
101 | ||
d9898ee8 | 102 | # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- |
8d138742 CE |
103 | # |
104 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | |
105 | # 2006, 2007, 2008 Free Software Foundation, Inc. | |
106 | # Written by Gordon Matzigkeit, 1996 | |
107 | # | |
108 | # This file is free software; the Free Software Foundation gives | |
109 | # unlimited permission to copy and/or distribute it, with or without | |
110 | # modifications, as long as this notice is preserved. | |
111 | ||
112 | m4_define([_LT_COPYING], [dnl | |
113 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | |
114 | # 2006, 2007, 2008 Free Software Foundation, Inc. | |
115 | # Written by Gordon Matzigkeit, 1996 | |
116 | # | |
117 | # This file is part of GNU Libtool. | |
118 | # | |
119 | # GNU Libtool is free software; you can redistribute it and/or | |
120 | # modify it under the terms of the GNU General Public License as | |
121 | # published by the Free Software Foundation; either version 2 of | |
122 | # the License, or (at your option) any later version. | |
123 | # | |
124 | # As a special exception to the GNU General Public License, | |
125 | # if you distribute this file as part of a program or library that | |
126 | # is built using GNU Libtool, you may include this file under the | |
127 | # same distribution terms that you use for the rest of that program. | |
128 | # | |
129 | # GNU Libtool is distributed in the hope that it will be useful, | |
130 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
131 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
132 | # GNU General Public License for more details. | |
133 | # | |
134 | # You should have received a copy of the GNU General Public License | |
135 | # along with GNU Libtool; see the file COPYING. If not, a copy | |
136 | # can be downloaded from http://www.gnu.org/licenses/gpl.html, or | |
137 | # obtained by writing to the Free Software Foundation, Inc., | |
138 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
139 | ]) | |
d9898ee8 | 140 | |
8d138742 | 141 | # serial 56 LT_INIT |
d9898ee8 | 142 | |
143 | ||
8d138742 CE |
144 | # LT_PREREQ(VERSION) |
145 | # ------------------ | |
146 | # Complain and exit if this libtool version is less that VERSION. | |
147 | m4_defun([LT_PREREQ], | |
148 | [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, | |
149 | [m4_default([$3], | |
150 | [m4_fatal([Libtool version $1 or higher is required], | |
151 | 63)])], | |
152 | [$2])]) | |
d9898ee8 | 153 | |
154 | ||
8d138742 CE |
155 | # _LT_CHECK_BUILDDIR |
156 | # ------------------ | |
157 | # Complain if the absolute build directory name contains unusual characters | |
158 | m4_defun([_LT_CHECK_BUILDDIR], | |
159 | [case `pwd` in | |
160 | *\ * | *\ *) | |
161 | AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; | |
162 | esac | |
163 | ]) | |
164 | ||
165 | ||
166 | # LT_INIT([OPTIONS]) | |
167 | # ------------------ | |
168 | AC_DEFUN([LT_INIT], | |
169 | [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT | |
170 | AC_BEFORE([$0], [LT_LANG])dnl | |
171 | AC_BEFORE([$0], [LT_OUTPUT])dnl | |
172 | AC_BEFORE([$0], [LTDL_INIT])dnl | |
173 | m4_require([_LT_CHECK_BUILDDIR])dnl | |
174 | ||
175 | dnl Autoconf doesn't catch unexpanded LT_ macros by default: | |
176 | m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl | |
177 | m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl | |
178 | dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 | |
179 | dnl unless we require an AC_DEFUNed macro: | |
180 | AC_REQUIRE([LTOPTIONS_VERSION])dnl | |
181 | AC_REQUIRE([LTSUGAR_VERSION])dnl | |
182 | AC_REQUIRE([LTVERSION_VERSION])dnl | |
183 | AC_REQUIRE([LTOBSOLETE_VERSION])dnl | |
184 | m4_require([_LT_PROG_LTMAIN])dnl | |
185 | ||
186 | dnl Parse OPTIONS | |
187 | _LT_SET_OPTIONS([$0], [$1]) | |
d9898ee8 | 188 | |
189 | # This can be used to rebuild libtool when needed | |
8d138742 | 190 | LIBTOOL_DEPS="$ltmain" |
d9898ee8 | 191 | |
192 | # Always use our own libtool. | |
193 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
194 | AC_SUBST(LIBTOOL)dnl | |
195 | ||
8d138742 | 196 | _LT_SETUP |
d9898ee8 | 197 | |
8d138742 CE |
198 | # Only expand once: |
199 | m4_define([LT_INIT]) | |
200 | ])# LT_INIT | |
d9898ee8 | 201 | |
8d138742 CE |
202 | # Old names: |
203 | AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) | |
204 | AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) | |
205 | dnl aclocal-1.4 backwards compatibility: | |
206 | dnl AC_DEFUN([AC_PROG_LIBTOOL], []) | |
207 | dnl AC_DEFUN([AM_PROG_LIBTOOL], []) | |
208 | ||
209 | ||
210 | # _LT_CC_BASENAME(CC) | |
211 | # ------------------- | |
212 | # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. | |
213 | m4_defun([_LT_CC_BASENAME], | |
214 | [for cc_temp in $1""; do | |
215 | case $cc_temp in | |
216 | compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; | |
217 | distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; | |
218 | \-*) ;; | |
219 | *) break;; | |
220 | esac | |
221 | done | |
222 | cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` | |
223 | ]) | |
224 | ||
225 | ||
226 | # _LT_FILEUTILS_DEFAULTS | |
227 | # ---------------------- | |
228 | # It is okay to use these file commands and assume they have been set | |
229 | # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. | |
230 | m4_defun([_LT_FILEUTILS_DEFAULTS], | |
231 | [: ${CP="cp -f"} | |
232 | : ${MV="mv -f"} | |
233 | : ${RM="rm -f"} | |
234 | ])# _LT_FILEUTILS_DEFAULTS | |
235 | ||
236 | ||
237 | # _LT_SETUP | |
238 | # --------- | |
239 | m4_defun([_LT_SETUP], | |
240 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
d9898ee8 | 241 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
8d138742 CE |
242 | _LT_DECL([], [host_alias], [0], [The host system])dnl |
243 | _LT_DECL([], [host], [0])dnl | |
244 | _LT_DECL([], [host_os], [0])dnl | |
245 | dnl | |
246 | _LT_DECL([], [build_alias], [0], [The build system])dnl | |
247 | _LT_DECL([], [build], [0])dnl | |
248 | _LT_DECL([], [build_os], [0])dnl | |
249 | dnl | |
d9898ee8 | 250 | AC_REQUIRE([AC_PROG_CC])dnl |
8d138742 CE |
251 | AC_REQUIRE([LT_PATH_LD])dnl |
252 | AC_REQUIRE([LT_PATH_NM])dnl | |
253 | dnl | |
d9898ee8 | 254 | AC_REQUIRE([AC_PROG_LN_S])dnl |
8d138742 CE |
255 | test -z "$LN_S" && LN_S="ln -s" |
256 | _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl | |
257 | dnl | |
258 | AC_REQUIRE([LT_CMD_MAX_LEN])dnl | |
259 | _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl | |
260 | _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl | |
d9898ee8 | 261 | dnl |
8d138742 CE |
262 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
263 | m4_require([_LT_CHECK_SHELL_FEATURES])dnl | |
264 | m4_require([_LT_CMD_RELOAD])dnl | |
265 | m4_require([_LT_CHECK_MAGIC_METHOD])dnl | |
266 | m4_require([_LT_CMD_OLD_ARCHIVE])dnl | |
267 | m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl | |
268 | ||
269 | _LT_CONFIG_LIBTOOL_INIT([ | |
270 | # See if we are running on zsh, and set the options which allow our | |
271 | # commands through without removal of \ escapes INIT. | |
272 | if test -n "\${ZSH_VERSION+set}" ; then | |
273 | setopt NO_GLOB_SUBST | |
274 | fi | |
275 | ]) | |
276 | if test -n "${ZSH_VERSION+set}" ; then | |
277 | setopt NO_GLOB_SUBST | |
278 | fi | |
d9898ee8 | 279 | |
8d138742 | 280 | _LT_CHECK_OBJDIR |
d9898ee8 | 281 | |
8d138742 CE |
282 | m4_require([_LT_TAG_COMPILER])dnl |
283 | _LT_PROG_ECHO_BACKSLASH | |
d9898ee8 | 284 | |
285 | case $host_os in | |
286 | aix3*) | |
287 | # AIX sometimes has problems with the GCC collect2 program. For some | |
288 | # reason, if we set the COLLECT_NAMES environment variable, the problems | |
289 | # vanish in a puff of smoke. | |
290 | if test "X${COLLECT_NAMES+set}" != Xset; then | |
291 | COLLECT_NAMES= | |
292 | export COLLECT_NAMES | |
293 | fi | |
294 | ;; | |
295 | esac | |
296 | ||
297 | # Sed substitution that helps us do robust quoting. It backslashifies | |
298 | # metacharacters that are still active within double-quoted strings. | |
8d138742 | 299 | sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' |
d9898ee8 | 300 | |
301 | # Same as above, but do not quote variable references. | |
8d138742 | 302 | double_quote_subst='s/\([["`\\]]\)/\\\1/g' |
d9898ee8 | 303 | |
304 | # Sed substitution to delay expansion of an escaped shell variable in a | |
305 | # double_quote_subst'ed string. | |
306 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | |
307 | ||
8d138742 CE |
308 | # Sed substitution to delay expansion of an escaped single quote. |
309 | delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' | |
310 | ||
d9898ee8 | 311 | # Sed substitution to avoid accidental globbing in evaled expressions |
312 | no_glob_subst='s/\*/\\\*/g' | |
313 | ||
d9898ee8 | 314 | # Global variables: |
8d138742 | 315 | ofile=libtool |
d9898ee8 | 316 | can_build_shared=yes |
317 | ||
318 | # All known linkers require a `.a' archive for static linking (except MSVC, | |
319 | # which needs '.lib'). | |
320 | libext=a | |
d9898ee8 | 321 | |
8d138742 | 322 | with_gnu_ld="$lt_cv_prog_gnu_ld" |
d9898ee8 | 323 | |
324 | old_CC="$CC" | |
325 | old_CFLAGS="$CFLAGS" | |
326 | ||
327 | # Set sane defaults for various variables | |
d9898ee8 | 328 | test -z "$CC" && CC=cc |
329 | test -z "$LTCC" && LTCC=$CC | |
330 | test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS | |
d9898ee8 | 331 | test -z "$LD" && LD=ld |
d9898ee8 | 332 | test -z "$ac_objext" && ac_objext=o |
333 | ||
d9898ee8 | 334 | _LT_CC_BASENAME([$compiler]) |
335 | ||
336 | # Only perform the check for file, if the check method requires it | |
8d138742 | 337 | test -z "$MAGIC_CMD" && MAGIC_CMD=file |
d9898ee8 | 338 | case $deplibs_check_method in |
339 | file_magic*) | |
340 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then | |
8d138742 | 341 | _LT_PATH_MAGIC |
d9898ee8 | 342 | fi |
343 | ;; | |
344 | esac | |
345 | ||
8d138742 CE |
346 | # Use C for the default configuration in the libtool script |
347 | LT_SUPPORTED_TAG([CC]) | |
348 | _LT_LANG_C_CONFIG | |
349 | _LT_LANG_DEFAULT_CONFIG | |
350 | _LT_CONFIG_COMMANDS | |
351 | ])# _LT_SETUP | |
d9898ee8 | 352 | |
d9898ee8 | 353 | |
8d138742 CE |
354 | # _LT_PROG_LTMAIN |
355 | # --------------- | |
356 | # Note that this code is called both from `configure', and `config.status' | |
357 | # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, | |
358 | # `config.status' has no value for ac_aux_dir unless we are using Automake, | |
359 | # so we pass a copy along to make sure it has a sensible value anyway. | |
360 | m4_defun([_LT_PROG_LTMAIN], | |
361 | [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl | |
362 | _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) | |
363 | ltmain="$ac_aux_dir/ltmain.sh" | |
364 | ])# _LT_PROG_LTMAIN | |
d9898ee8 | 365 | |
d9898ee8 | 366 | |
367 | ||
8d138742 CE |
368 | # So that we can recreate a full libtool script including additional |
369 | # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS | |
370 | # in macros and then make a single call at the end using the `libtool' | |
371 | # label. | |
d9898ee8 | 372 | |
d9898ee8 | 373 | |
8d138742 CE |
374 | # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) |
375 | # ---------------------------------------- | |
376 | # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. | |
377 | m4_define([_LT_CONFIG_LIBTOOL_INIT], | |
378 | [m4_ifval([$1], | |
379 | [m4_append([_LT_OUTPUT_LIBTOOL_INIT], | |
380 | [$1 | |
381 | ])])]) | |
d9898ee8 | 382 | |
8d138742 CE |
383 | # Initialize. |
384 | m4_define([_LT_OUTPUT_LIBTOOL_INIT]) | |
d9898ee8 | 385 | |
386 | ||
8d138742 CE |
387 | # _LT_CONFIG_LIBTOOL([COMMANDS]) |
388 | # ------------------------------ | |
389 | # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. | |
390 | m4_define([_LT_CONFIG_LIBTOOL], | |
391 | [m4_ifval([$1], | |
392 | [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], | |
393 | [$1 | |
394 | ])])]) | |
395 | ||
396 | # Initialize. | |
397 | m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) | |
398 | ||
399 | ||
400 | # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) | |
401 | # ----------------------------------------------------- | |
402 | m4_defun([_LT_CONFIG_SAVE_COMMANDS], | |
403 | [_LT_CONFIG_LIBTOOL([$1]) | |
404 | _LT_CONFIG_LIBTOOL_INIT([$2]) | |
d9898ee8 | 405 | ]) |
406 | ||
407 | ||
8d138742 CE |
408 | # _LT_FORMAT_COMMENT([COMMENT]) |
409 | # ----------------------------- | |
410 | # Add leading comment marks to the start of each line, and a trailing | |
411 | # full-stop to the whole comment if one is not present already. | |
412 | m4_define([_LT_FORMAT_COMMENT], | |
413 | [m4_ifval([$1], [ | |
414 | m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], | |
415 | [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) | |
416 | )]) | |
417 | ||
418 | ||
419 | ||
420 | ||
421 | ||
422 | # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) | |
423 | # ------------------------------------------------------------------- | |
424 | # CONFIGNAME is the name given to the value in the libtool script. | |
425 | # VARNAME is the (base) name used in the configure script. | |
426 | # VALUE may be 0, 1 or 2 for a computed quote escaped value based on | |
427 | # VARNAME. Any other value will be used directly. | |
428 | m4_define([_LT_DECL], | |
429 | [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], | |
430 | [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], | |
431 | [m4_ifval([$1], [$1], [$2])]) | |
432 | lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) | |
433 | m4_ifval([$4], | |
434 | [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) | |
435 | lt_dict_add_subkey([lt_decl_dict], [$2], | |
436 | [tagged?], [m4_ifval([$5], [yes], [no])])]) | |
437 | ]) | |
d9898ee8 | 438 | |
439 | ||
8d138742 CE |
440 | # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) |
441 | # -------------------------------------------------------- | |
442 | m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) | |
d9898ee8 | 443 | |
444 | ||
8d138742 CE |
445 | # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) |
446 | # ------------------------------------------------ | |
447 | m4_define([lt_decl_tag_varnames], | |
448 | [_lt_decl_filter([tagged?], [yes], $@)]) | |
d9898ee8 | 449 | |
450 | ||
8d138742 CE |
451 | # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) |
452 | # --------------------------------------------------------- | |
453 | m4_define([_lt_decl_filter], | |
454 | [m4_case([$#], | |
455 | [0], [m4_fatal([$0: too few arguments: $#])], | |
456 | [1], [m4_fatal([$0: too few arguments: $#: $1])], | |
457 | [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], | |
458 | [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], | |
459 | [lt_dict_filter([lt_decl_dict], $@)])[]dnl | |
460 | ]) | |
d9898ee8 | 461 | |
462 | ||
8d138742 CE |
463 | # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) |
464 | # -------------------------------------------------- | |
465 | m4_define([lt_decl_quote_varnames], | |
466 | [_lt_decl_filter([value], [1], $@)]) | |
d9898ee8 | 467 | |
d9898ee8 | 468 | |
8d138742 CE |
469 | # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) |
470 | # --------------------------------------------------- | |
471 | m4_define([lt_decl_dquote_varnames], | |
472 | [_lt_decl_filter([value], [2], $@)]) | |
d9898ee8 | 473 | |
d9898ee8 | 474 | |
8d138742 CE |
475 | # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) |
476 | # --------------------------------------------------- | |
477 | m4_define([lt_decl_varnames_tagged], | |
478 | [m4_assert([$# <= 2])dnl | |
479 | _$0(m4_quote(m4_default([$1], [[, ]])), | |
480 | m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), | |
481 | m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) | |
482 | m4_define([_lt_decl_varnames_tagged], | |
483 | [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) | |
d9898ee8 | 484 | |
d9898ee8 | 485 | |
8d138742 CE |
486 | # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) |
487 | # ------------------------------------------------ | |
488 | m4_define([lt_decl_all_varnames], | |
489 | [_$0(m4_quote(m4_default([$1], [[, ]])), | |
490 | m4_if([$2], [], | |
491 | m4_quote(lt_decl_varnames), | |
492 | m4_quote(m4_shift($@))))[]dnl | |
493 | ]) | |
494 | m4_define([_lt_decl_all_varnames], | |
495 | [lt_join($@, lt_decl_varnames_tagged([$1], | |
496 | lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl | |
497 | ]) | |
d9898ee8 | 498 | |
d9898ee8 | 499 | |
8d138742 CE |
500 | # _LT_CONFIG_STATUS_DECLARE([VARNAME]) |
501 | # ------------------------------------ | |
502 | # Quote a variable value, and forward it to `config.status' so that its | |
503 | # declaration there will have the same value as in `configure'. VARNAME | |
504 | # must have a single quote delimited value for this to work. | |
505 | m4_define([_LT_CONFIG_STATUS_DECLARE], | |
506 | [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) | |
d9898ee8 | 507 | |
d9898ee8 | 508 | |
8d138742 CE |
509 | # _LT_CONFIG_STATUS_DECLARATIONS |
510 | # ------------------------------ | |
511 | # We delimit libtool config variables with single quotes, so when | |
512 | # we write them to config.status, we have to be sure to quote all | |
513 | # embedded single quotes properly. In configure, this macro expands | |
514 | # each variable declared with _LT_DECL (and _LT_TAGDECL) into: | |
515 | # | |
516 | # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' | |
517 | m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], | |
518 | [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), | |
519 | [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) | |
d9898ee8 | 520 | |
d9898ee8 | 521 | |
8d138742 CE |
522 | # _LT_LIBTOOL_TAGS |
523 | # ---------------- | |
524 | # Output comment and list of tags supported by the script | |
525 | m4_defun([_LT_LIBTOOL_TAGS], | |
526 | [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl | |
527 | available_tags="_LT_TAGS"dnl | |
528 | ]) | |
d9898ee8 | 529 | |
530 | ||
8d138742 CE |
531 | # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) |
532 | # ----------------------------------- | |
533 | # Extract the dictionary values for VARNAME (optionally with TAG) and | |
534 | # expand to a commented shell variable setting: | |
535 | # | |
536 | # # Some comment about what VAR is for. | |
537 | # visible_name=$lt_internal_name | |
538 | m4_define([_LT_LIBTOOL_DECLARE], | |
539 | [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], | |
540 | [description])))[]dnl | |
541 | m4_pushdef([_libtool_name], | |
542 | m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl | |
543 | m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), | |
544 | [0], [_libtool_name=[$]$1], | |
545 | [1], [_libtool_name=$lt_[]$1], | |
546 | [2], [_libtool_name=$lt_[]$1], | |
547 | [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl | |
548 | m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl | |
549 | ]) | |
d9898ee8 | 550 | |
d9898ee8 | 551 | |
8d138742 CE |
552 | # _LT_LIBTOOL_CONFIG_VARS |
553 | # ----------------------- | |
554 | # Produce commented declarations of non-tagged libtool config variables | |
555 | # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' | |
556 | # script. Tagged libtool config variables (even for the LIBTOOL CONFIG | |
557 | # section) are produced by _LT_LIBTOOL_TAG_VARS. | |
558 | m4_defun([_LT_LIBTOOL_CONFIG_VARS], | |
559 | [m4_foreach([_lt_var], | |
560 | m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), | |
561 | [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) | |
562 | ||
563 | ||
564 | # _LT_LIBTOOL_TAG_VARS(TAG) | |
565 | # ------------------------- | |
566 | m4_define([_LT_LIBTOOL_TAG_VARS], | |
567 | [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), | |
568 | [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) | |
569 | ||
570 | ||
571 | # _LT_TAGVAR(VARNAME, [TAGNAME]) | |
572 | # ------------------------------ | |
573 | m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) | |
574 | ||
575 | ||
576 | # _LT_CONFIG_COMMANDS | |
577 | # ------------------- | |
578 | # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of | |
579 | # variables for single and double quote escaping we saved from calls | |
580 | # to _LT_DECL, we can put quote escaped variables declarations | |
581 | # into `config.status', and then the shell code to quote escape them in | |
582 | # for loops in `config.status'. Finally, any additional code accumulated | |
583 | # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. | |
584 | m4_defun([_LT_CONFIG_COMMANDS], | |
585 | [AC_PROVIDE_IFELSE([LT_OUTPUT], | |
586 | dnl If the libtool generation code has been placed in $CONFIG_LT, | |
587 | dnl instead of duplicating it all over again into config.status, | |
588 | dnl then we will have config.status run $CONFIG_LT later, so it | |
589 | dnl needs to know what name is stored there: | |
590 | [AC_CONFIG_COMMANDS([libtool], | |
591 | [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], | |
592 | dnl If the libtool generation code is destined for config.status, | |
593 | dnl expand the accumulated commands and init code now: | |
594 | [AC_CONFIG_COMMANDS([libtool], | |
595 | [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) | |
596 | ])#_LT_CONFIG_COMMANDS | |
597 | ||
598 | ||
599 | # Initialize. | |
600 | m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], | |
601 | [ | |
602 | ||
603 | # The HP-UX ksh and POSIX shell print the target directory to stdout | |
604 | # if CDPATH is set. | |
605 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
606 | ||
607 | sed_quote_subst='$sed_quote_subst' | |
608 | double_quote_subst='$double_quote_subst' | |
609 | delay_variable_subst='$delay_variable_subst' | |
610 | _LT_CONFIG_STATUS_DECLARATIONS | |
611 | LTCC='$LTCC' | |
612 | LTCFLAGS='$LTCFLAGS' | |
613 | compiler='$compiler_DEFAULT' | |
614 | ||
615 | # Quote evaled strings. | |
616 | for var in lt_decl_all_varnames([[ \ | |
617 | ]], lt_decl_quote_varnames); do | |
618 | case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in | |
619 | *[[\\\\\\\`\\"\\\$]]*) | |
620 | eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" | |
d9898ee8 | 621 | ;; |
8d138742 CE |
622 | *) |
623 | eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" | |
d9898ee8 | 624 | ;; |
625 | esac | |
8d138742 | 626 | done |
d9898ee8 | 627 | |
8d138742 CE |
628 | # Double-quote double-evaled strings. |
629 | for var in lt_decl_all_varnames([[ \ | |
630 | ]], lt_decl_dquote_varnames); do | |
631 | case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in | |
632 | *[[\\\\\\\`\\"\\\$]]*) | |
633 | eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" | |
634 | ;; | |
635 | *) | |
636 | eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" | |
d9898ee8 | 637 | ;; |
638 | esac | |
8d138742 | 639 | done |
d9898ee8 | 640 | |
8d138742 CE |
641 | # Fix-up fallback echo if it was mangled by the above quoting rules. |
642 | case \$lt_ECHO in | |
643 | *'\\\[$]0 --fallback-echo"')dnl " | |
644 | lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` | |
d9898ee8 | 645 | ;; |
d9898ee8 | 646 | esac |
647 | ||
8d138742 | 648 | _LT_OUTPUT_LIBTOOL_INIT |
d9898ee8 | 649 | ]) |
650 | ||
d9898ee8 | 651 | |
8d138742 CE |
652 | # LT_OUTPUT |
653 | # --------- | |
654 | # This macro allows early generation of the libtool script (before | |
655 | # AC_OUTPUT is called), incase it is used in configure for compilation | |
656 | # tests. | |
657 | AC_DEFUN([LT_OUTPUT], | |
658 | [: ${CONFIG_LT=./config.lt} | |
659 | AC_MSG_NOTICE([creating $CONFIG_LT]) | |
660 | cat >"$CONFIG_LT" <<_LTEOF | |
661 | #! $SHELL | |
662 | # Generated by $as_me. | |
663 | # Run this file to recreate a libtool stub with the current configuration. | |
664 | ||
665 | lt_cl_silent=false | |
666 | SHELL=\${CONFIG_SHELL-$SHELL} | |
667 | _LTEOF | |
668 | ||
669 | cat >>"$CONFIG_LT" <<\_LTEOF | |
670 | AS_SHELL_SANITIZE | |
671 | _AS_PREPARE | |
672 | ||
673 | exec AS_MESSAGE_FD>&1 | |
674 | exec AS_MESSAGE_LOG_FD>>config.log | |
675 | { | |
676 | echo | |
677 | AS_BOX([Running $as_me.]) | |
678 | } >&AS_MESSAGE_LOG_FD | |
d9898ee8 | 679 | |
8d138742 CE |
680 | lt_cl_help="\ |
681 | \`$as_me' creates a local libtool stub from the current configuration, | |
682 | for use in further configure time tests before the real libtool is | |
683 | generated. | |
d9898ee8 | 684 | |
8d138742 | 685 | Usage: $[0] [[OPTIONS]] |
d9898ee8 | 686 | |
8d138742 CE |
687 | -h, --help print this help, then exit |
688 | -V, --version print version number, then exit | |
689 | -q, --quiet do not print progress messages | |
690 | -d, --debug don't remove temporary files | |
d9898ee8 | 691 | |
8d138742 | 692 | Report bugs to <bug-libtool@gnu.org>." |
d9898ee8 | 693 | |
8d138742 CE |
694 | lt_cl_version="\ |
695 | m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl | |
696 | m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) | |
697 | configured by $[0], generated by m4_PACKAGE_STRING. | |
d9898ee8 | 698 | |
8d138742 CE |
699 | Copyright (C) 2008 Free Software Foundation, Inc. |
700 | This config.lt script is free software; the Free Software Foundation | |
701 | gives unlimited permision to copy, distribute and modify it." | |
d9898ee8 | 702 | |
8d138742 CE |
703 | while test $[#] != 0 |
704 | do | |
705 | case $[1] in | |
706 | --version | --v* | -V ) | |
707 | echo "$lt_cl_version"; exit 0 ;; | |
708 | --help | --h* | -h ) | |
709 | echo "$lt_cl_help"; exit 0 ;; | |
710 | --debug | --d* | -d ) | |
711 | debug=: ;; | |
712 | --quiet | --q* | --silent | --s* | -q ) | |
713 | lt_cl_silent=: ;; | |
714 | ||
715 | -*) AC_MSG_ERROR([unrecognized option: $[1] | |
716 | Try \`$[0] --help' for more information.]) ;; | |
717 | ||
718 | *) AC_MSG_ERROR([unrecognized argument: $[1] | |
719 | Try \`$[0] --help' for more information.]) ;; | |
720 | esac | |
721 | shift | |
722 | done | |
d9898ee8 | 723 | |
8d138742 CE |
724 | if $lt_cl_silent; then |
725 | exec AS_MESSAGE_FD>/dev/null | |
726 | fi | |
727 | _LTEOF | |
728 | ||
729 | cat >>"$CONFIG_LT" <<_LTEOF | |
730 | _LT_OUTPUT_LIBTOOL_COMMANDS_INIT | |
731 | _LTEOF | |
732 | ||
733 | cat >>"$CONFIG_LT" <<\_LTEOF | |
734 | AC_MSG_NOTICE([creating $ofile]) | |
735 | _LT_OUTPUT_LIBTOOL_COMMANDS | |
736 | AS_EXIT(0) | |
737 | _LTEOF | |
738 | chmod +x "$CONFIG_LT" | |
739 | ||
740 | # configure is writing to config.log, but config.lt does its own redirection, | |
741 | # appending to config.log, which fails on DOS, as config.log is still kept | |
742 | # open by configure. Here we exec the FD to /dev/null, effectively closing | |
743 | # config.log, so it can be properly (re)opened and appended to by config.lt. | |
744 | if test "$no_create" != yes; then | |
745 | lt_cl_success=: | |
746 | test "$silent" = yes && | |
747 | lt_config_lt_args="$lt_config_lt_args --quiet" | |
748 | exec AS_MESSAGE_LOG_FD>/dev/null | |
749 | $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false | |
750 | exec AS_MESSAGE_LOG_FD>>config.log | |
751 | $lt_cl_success || AS_EXIT(1) | |
752 | fi | |
753 | ])# LT_OUTPUT | |
d9898ee8 | 754 | |
8d138742 CE |
755 | |
756 | # _LT_CONFIG(TAG) | |
757 | # --------------- | |
758 | # If TAG is the built-in tag, create an initial libtool script with a | |
759 | # default configuration from the untagged config vars. Otherwise add code | |
760 | # to config.status for appending the configuration named by TAG from the | |
761 | # matching tagged config vars. | |
762 | m4_defun([_LT_CONFIG], | |
763 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
764 | _LT_CONFIG_SAVE_COMMANDS([ | |
765 | m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl | |
766 | m4_if(_LT_TAG, [C], [ | |
767 | # See if we are running on zsh, and set the options which allow our | |
768 | # commands through without removal of \ escapes. | |
769 | if test -n "${ZSH_VERSION+set}" ; then | |
770 | setopt NO_GLOB_SUBST | |
d9898ee8 | 771 | fi |
d9898ee8 | 772 | |
8d138742 CE |
773 | cfgfile="${ofile}T" |
774 | trap "$RM \"$cfgfile\"; exit 1" 1 2 15 | |
775 | $RM "$cfgfile" | |
d9898ee8 | 776 | |
8d138742 CE |
777 | cat <<_LT_EOF >> "$cfgfile" |
778 | #! $SHELL | |
d9898ee8 | 779 | |
8d138742 CE |
780 | # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
781 | # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION | |
782 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
783 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | |
784 | # | |
785 | _LT_COPYING | |
786 | _LT_LIBTOOL_TAGS | |
d9898ee8 | 787 | |
8d138742 CE |
788 | # ### BEGIN LIBTOOL CONFIG |
789 | _LT_LIBTOOL_CONFIG_VARS | |
790 | _LT_LIBTOOL_TAG_VARS | |
791 | # ### END LIBTOOL CONFIG | |
d9898ee8 | 792 | |
8d138742 | 793 | _LT_EOF |
d9898ee8 | 794 | |
8d138742 CE |
795 | case $host_os in |
796 | aix3*) | |
797 | cat <<\_LT_EOF >> "$cfgfile" | |
798 | # AIX sometimes has problems with the GCC collect2 program. For some | |
799 | # reason, if we set the COLLECT_NAMES environment variable, the problems | |
800 | # vanish in a puff of smoke. | |
801 | if test "X${COLLECT_NAMES+set}" != Xset; then | |
802 | COLLECT_NAMES= | |
803 | export COLLECT_NAMES | |
804 | fi | |
805 | _LT_EOF | |
806 | ;; | |
807 | esac | |
d9898ee8 | 808 | |
8d138742 | 809 | _LT_PROG_LTMAIN |
d9898ee8 | 810 | |
8d138742 CE |
811 | # We use sed instead of cat because bash on DJGPP gets confused if |
812 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | |
813 | # text mode, it properly converts lines to CR/LF. This bash problem | |
814 | # is reportedly fixed, but why not run on old versions too? | |
815 | sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ | |
816 | || (rm -f "$cfgfile"; exit 1) | |
d9898ee8 | 817 | |
8d138742 | 818 | _LT_PROG_XSI_SHELLFNS |
d9898ee8 | 819 | |
8d138742 CE |
820 | sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ |
821 | || (rm -f "$cfgfile"; exit 1) | |
d9898ee8 | 822 | |
8d138742 CE |
823 | mv -f "$cfgfile" "$ofile" || |
824 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | |
825 | chmod +x "$ofile" | |
826 | ], | |
827 | [cat <<_LT_EOF >> "$ofile" | |
d9898ee8 | 828 | |
8d138742 CE |
829 | dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded |
830 | dnl in a comment (ie after a #). | |
831 | # ### BEGIN LIBTOOL TAG CONFIG: $1 | |
832 | _LT_LIBTOOL_TAG_VARS(_LT_TAG) | |
833 | # ### END LIBTOOL TAG CONFIG: $1 | |
834 | _LT_EOF | |
835 | ])dnl /m4_if | |
836 | ], | |
837 | [m4_if([$1], [], [ | |
838 | PACKAGE='$PACKAGE' | |
839 | VERSION='$VERSION' | |
840 | TIMESTAMP='$TIMESTAMP' | |
841 | RM='$RM' | |
842 | ofile='$ofile'], []) | |
843 | ])dnl /_LT_CONFIG_SAVE_COMMANDS | |
844 | ])# _LT_CONFIG | |
d9898ee8 | 845 | |
d9898ee8 | 846 | |
8d138742 CE |
847 | # LT_SUPPORTED_TAG(TAG) |
848 | # --------------------- | |
849 | # Trace this macro to discover what tags are supported by the libtool | |
850 | # --tag option, using: | |
851 | # autoconf --trace 'LT_SUPPORTED_TAG:$1' | |
852 | AC_DEFUN([LT_SUPPORTED_TAG], []) | |
d9898ee8 | 853 | |
854 | ||
8d138742 CE |
855 | # C support is built-in for now |
856 | m4_define([_LT_LANG_C_enabled], []) | |
857 | m4_define([_LT_TAGS], []) | |
d9898ee8 | 858 | |
d9898ee8 | 859 | |
8d138742 CE |
860 | # LT_LANG(LANG) |
861 | # ------------- | |
862 | # Enable libtool support for the given language if not already enabled. | |
863 | AC_DEFUN([LT_LANG], | |
864 | [AC_BEFORE([$0], [LT_OUTPUT])dnl | |
865 | m4_case([$1], | |
866 | [C], [_LT_LANG(C)], | |
867 | [C++], [_LT_LANG(CXX)], | |
868 | [Java], [_LT_LANG(GCJ)], | |
869 | [Fortran 77], [_LT_LANG(F77)], | |
870 | [Fortran], [_LT_LANG(FC)], | |
871 | [Windows Resource], [_LT_LANG(RC)], | |
872 | [m4_ifdef([_LT_LANG_]$1[_CONFIG], | |
873 | [_LT_LANG($1)], | |
874 | [m4_fatal([$0: unsupported language: "$1"])])])dnl | |
875 | ])# LT_LANG | |
876 | ||
877 | ||
878 | # _LT_LANG(LANGNAME) | |
879 | # ------------------ | |
880 | m4_defun([_LT_LANG], | |
881 | [m4_ifdef([_LT_LANG_]$1[_enabled], [], | |
882 | [LT_SUPPORTED_TAG([$1])dnl | |
883 | m4_append([_LT_TAGS], [$1 ])dnl | |
884 | m4_define([_LT_LANG_]$1[_enabled], [])dnl | |
885 | _LT_LANG_$1_CONFIG($1)])dnl | |
886 | ])# _LT_LANG | |
d9898ee8 | 887 | |
d9898ee8 | 888 | |
8d138742 CE |
889 | # _LT_LANG_DEFAULT_CONFIG |
890 | # ----------------------- | |
891 | m4_defun([_LT_LANG_DEFAULT_CONFIG], | |
892 | [AC_PROVIDE_IFELSE([AC_PROG_CXX], | |
893 | [LT_LANG(CXX)], | |
894 | [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) | |
895 | ||
896 | AC_PROVIDE_IFELSE([AC_PROG_F77], | |
897 | [LT_LANG(F77)], | |
898 | [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) | |
899 | ||
900 | AC_PROVIDE_IFELSE([AC_PROG_FC], | |
901 | [LT_LANG(FC)], | |
902 | [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) | |
903 | ||
904 | dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal | |
905 | dnl pulling things in needlessly. | |
906 | AC_PROVIDE_IFELSE([AC_PROG_GCJ], | |
907 | [LT_LANG(GCJ)], | |
908 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], | |
909 | [LT_LANG(GCJ)], | |
910 | [AC_PROVIDE_IFELSE([LT_PROG_GCJ], | |
911 | [LT_LANG(GCJ)], | |
912 | [m4_ifdef([AC_PROG_GCJ], | |
913 | [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) | |
914 | m4_ifdef([A][M_PROG_GCJ], | |
915 | [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) | |
916 | m4_ifdef([LT_PROG_GCJ], | |
917 | [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) | |
918 | ||
919 | AC_PROVIDE_IFELSE([LT_PROG_RC], | |
920 | [LT_LANG(RC)], | |
921 | [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) | |
922 | ])# _LT_LANG_DEFAULT_CONFIG | |
923 | ||
924 | # Obsolete macros: | |
925 | AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) | |
926 | AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) | |
927 | AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) | |
928 | AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) | |
929 | dnl aclocal-1.4 backwards compatibility: | |
930 | dnl AC_DEFUN([AC_LIBTOOL_CXX], []) | |
931 | dnl AC_DEFUN([AC_LIBTOOL_F77], []) | |
932 | dnl AC_DEFUN([AC_LIBTOOL_FC], []) | |
933 | dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) | |
934 | ||
935 | ||
936 | # _LT_TAG_COMPILER | |
937 | # ---------------- | |
938 | m4_defun([_LT_TAG_COMPILER], | |
939 | [AC_REQUIRE([AC_PROG_CC])dnl | |
d9898ee8 | 940 | |
8d138742 CE |
941 | _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl |
942 | _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl | |
943 | _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl | |
944 | _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl | |
d9898ee8 | 945 | |
8d138742 CE |
946 | # If no C compiler was specified, use CC. |
947 | LTCC=${LTCC-"$CC"} | |
d9898ee8 | 948 | |
8d138742 CE |
949 | # If no C compiler flags were specified, use CFLAGS. |
950 | LTCFLAGS=${LTCFLAGS-"$CFLAGS"} | |
d9898ee8 | 951 | |
8d138742 CE |
952 | # Allow CC to be a program name with arguments. |
953 | compiler=$CC | |
954 | ])# _LT_TAG_COMPILER | |
d9898ee8 | 955 | |
d9898ee8 | 956 | |
8d138742 CE |
957 | # _LT_COMPILER_BOILERPLATE |
958 | # ------------------------ | |
959 | # Check for compiler boilerplate output or warnings with | |
960 | # the simple compiler test code. | |
961 | m4_defun([_LT_COMPILER_BOILERPLATE], | |
962 | [m4_require([_LT_DECL_SED])dnl | |
963 | ac_outfile=conftest.$ac_objext | |
964 | echo "$lt_simple_compile_test_code" >conftest.$ac_ext | |
965 | eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
966 | _lt_compiler_boilerplate=`cat conftest.err` | |
967 | $RM conftest* | |
968 | ])# _LT_COMPILER_BOILERPLATE | |
d9898ee8 | 969 | |
d9898ee8 | 970 | |
8d138742 CE |
971 | # _LT_LINKER_BOILERPLATE |
972 | # ---------------------- | |
973 | # Check for linker boilerplate output or warnings with | |
974 | # the simple link test code. | |
975 | m4_defun([_LT_LINKER_BOILERPLATE], | |
976 | [m4_require([_LT_DECL_SED])dnl | |
977 | ac_outfile=conftest.$ac_objext | |
978 | echo "$lt_simple_link_test_code" >conftest.$ac_ext | |
979 | eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
980 | _lt_linker_boilerplate=`cat conftest.err` | |
981 | $RM -r conftest* | |
982 | ])# _LT_LINKER_BOILERPLATE | |
983 | ||
984 | # _LT_REQUIRED_DARWIN_CHECKS | |
985 | # ------------------------- | |
986 | m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ | |
987 | case $host_os in | |
988 | rhapsody* | darwin*) | |
989 | AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) | |
990 | AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) | |
991 | AC_CHECK_TOOL([LIPO], [lipo], [:]) | |
992 | AC_CHECK_TOOL([OTOOL], [otool], [:]) | |
993 | AC_CHECK_TOOL([OTOOL64], [otool64], [:]) | |
994 | _LT_DECL([], [DSYMUTIL], [1], | |
995 | [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) | |
996 | _LT_DECL([], [NMEDIT], [1], | |
997 | [Tool to change global to local symbols on Mac OS X]) | |
998 | _LT_DECL([], [LIPO], [1], | |
999 | [Tool to manipulate fat objects and archives on Mac OS X]) | |
1000 | _LT_DECL([], [OTOOL], [1], | |
1001 | [ldd/readelf like tool for Mach-O binaries on Mac OS X]) | |
1002 | _LT_DECL([], [OTOOL64], [1], | |
1003 | [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) | |
1004 | ||
1005 | AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], | |
1006 | [lt_cv_apple_cc_single_mod=no | |
1007 | if test -z "${LT_MULTI_MODULE}"; then | |
1008 | # By default we will add the -single_module flag. You can override | |
1009 | # by either setting the environment variable LT_MULTI_MODULE | |
1010 | # non-empty at configure time, or by adding -multi_module to the | |
1011 | # link flags. | |
1012 | rm -rf libconftest.dylib* | |
1013 | echo "int foo(void){return 1;}" > conftest.c | |
1014 | echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | |
1015 | -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD | |
1016 | $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | |
1017 | -dynamiclib -Wl,-single_module conftest.c 2>conftest.err | |
1018 | _lt_result=$? | |
1019 | if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then | |
1020 | lt_cv_apple_cc_single_mod=yes | |
1021 | else | |
1022 | cat conftest.err >&AS_MESSAGE_LOG_FD | |
1023 | fi | |
1024 | rm -rf libconftest.dylib* | |
1025 | rm -f conftest.* | |
1026 | fi]) | |
1027 | AC_CACHE_CHECK([for -exported_symbols_list linker flag], | |
1028 | [lt_cv_ld_exported_symbols_list], | |
1029 | [lt_cv_ld_exported_symbols_list=no | |
1030 | save_LDFLAGS=$LDFLAGS | |
1031 | echo "_main" > conftest.sym | |
1032 | LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" | |
1033 | AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], | |
1034 | [lt_cv_ld_exported_symbols_list=yes], | |
1035 | [lt_cv_ld_exported_symbols_list=no]) | |
1036 | LDFLAGS="$save_LDFLAGS" | |
1037 | ]) | |
1038 | case $host_os in | |
1039 | rhapsody* | darwin1.[[012]]) | |
1040 | _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; | |
1041 | darwin1.*) | |
1042 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | |
1043 | darwin*) # darwin 5.x on | |
1044 | # if running on 10.5 or later, the deployment target defaults | |
1045 | # to the OS version, if on x86, and 10.4, the deployment | |
1046 | # target defaults to 10.4. Don't you love it? | |
1047 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | |
1048 | 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) | |
1049 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | |
1050 | 10.[[012]]*) | |
1051 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | |
1052 | 10.*) | |
1053 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | |
1054 | esac | |
d9898ee8 | 1055 | ;; |
1056 | esac | |
8d138742 CE |
1057 | if test "$lt_cv_apple_cc_single_mod" = "yes"; then |
1058 | _lt_dar_single_mod='$single_module' | |
1059 | fi | |
1060 | if test "$lt_cv_ld_exported_symbols_list" = "yes"; then | |
1061 | _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' | |
1062 | else | |
1063 | _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' | |
1064 | fi | |
1065 | if test "$DSYMUTIL" != ":"; then | |
1066 | _lt_dsymutil='~$DSYMUTIL $lib || :' | |
1067 | else | |
1068 | _lt_dsymutil= | |
1069 | fi | |
1070 | ;; | |
d9898ee8 | 1071 | esac |
8d138742 | 1072 | ]) |
d9898ee8 | 1073 | |
8d138742 CE |
1074 | |
1075 | # _LT_DARWIN_LINKER_FEATURES | |
1076 | # -------------------------- | |
1077 | # Checks for linker and compiler features on darwin | |
1078 | m4_defun([_LT_DARWIN_LINKER_FEATURES], | |
1079 | [ | |
1080 | m4_require([_LT_REQUIRED_DARWIN_CHECKS]) | |
1081 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
1082 | _LT_TAGVAR(hardcode_direct, $1)=no | |
1083 | _LT_TAGVAR(hardcode_automatic, $1)=yes | |
1084 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | |
1085 | _LT_TAGVAR(whole_archive_flag_spec, $1)='' | |
1086 | _LT_TAGVAR(link_all_deplibs, $1)=yes | |
1087 | _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" | |
1088 | case $cc_basename in | |
1089 | ifort*) _lt_dar_can_shared=yes ;; | |
1090 | *) _lt_dar_can_shared=$GCC ;; | |
d9898ee8 | 1091 | esac |
8d138742 CE |
1092 | if test "$_lt_dar_can_shared" = "yes"; then |
1093 | output_verbose_link_cmd=echo | |
1094 | _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}" | |
1095 | _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" | |
1096 | _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}" | |
1097 | _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}" | |
1098 | m4_if([$1], [CXX], | |
1099 | [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then | |
1100 | _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}" | |
1101 | _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}" | |
1102 | fi | |
1103 | ],[]) | |
1104 | else | |
1105 | _LT_TAGVAR(ld_shlibs, $1)=no | |
1106 | fi | |
1107 | ]) | |
d9898ee8 | 1108 | |
8d138742 CE |
1109 | # _LT_SYS_MODULE_PATH_AIX |
1110 | # ----------------------- | |
1111 | # Links a minimal program and checks the executable | |
1112 | # for the system default hardcoded library path. In most cases, | |
1113 | # this is /usr/lib:/lib, but when the MPI compilers are used | |
1114 | # the location of the communication and MPI libs are included too. | |
1115 | # If we don't find anything, use the default library path according | |
1116 | # to the aix ld manual. | |
1117 | m4_defun([_LT_SYS_MODULE_PATH_AIX], | |
1118 | [m4_require([_LT_DECL_SED])dnl | |
1119 | AC_LINK_IFELSE(AC_LANG_PROGRAM,[ | |
1120 | lt_aix_libpath_sed=' | |
1121 | /Import File Strings/,/^$/ { | |
1122 | /^0/ { | |
1123 | s/^0 *\(.*\)$/\1/ | |
1124 | p | |
1125 | } | |
1126 | }' | |
1127 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
1128 | # Check for a 64-bit object if we didn't find anything. | |
1129 | if test -z "$aix_libpath"; then | |
1130 | aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
1131 | fi],[]) | |
1132 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | |
1133 | ])# _LT_SYS_MODULE_PATH_AIX | |
d9898ee8 | 1134 | |
d9898ee8 | 1135 | |
8d138742 CE |
1136 | # _LT_SHELL_INIT(ARG) |
1137 | # ------------------- | |
1138 | m4_define([_LT_SHELL_INIT], | |
1139 | [ifdef([AC_DIVERSION_NOTICE], | |
1140 | [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], | |
1141 | [AC_DIVERT_PUSH(NOTICE)]) | |
1142 | $1 | |
1143 | AC_DIVERT_POP | |
1144 | ])# _LT_SHELL_INIT | |
d9898ee8 | 1145 | |
1146 | ||
8d138742 CE |
1147 | # _LT_PROG_ECHO_BACKSLASH |
1148 | # ----------------------- | |
1149 | # Add some code to the start of the generated configure script which | |
1150 | # will find an echo command which doesn't interpret backslashes. | |
1151 | m4_defun([_LT_PROG_ECHO_BACKSLASH], | |
1152 | [_LT_SHELL_INIT([ | |
1153 | # Check that we are running under the correct shell. | |
1154 | SHELL=${CONFIG_SHELL-/bin/sh} | |
d9898ee8 | 1155 | |
8d138742 CE |
1156 | case X$lt_ECHO in |
1157 | X*--fallback-echo) | |
1158 | # Remove one level of quotation (which was required for Make). | |
1159 | ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` | |
1160 | ;; | |
1161 | esac | |
1162 | ||
1163 | ECHO=${lt_ECHO-echo} | |
1164 | if test "X[$]1" = X--no-reexec; then | |
1165 | # Discard the --no-reexec flag, and continue. | |
1166 | shift | |
1167 | elif test "X[$]1" = X--fallback-echo; then | |
1168 | # Avoid inline document here, it may be left over | |
1169 | : | |
1170 | elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then | |
1171 | # Yippee, $ECHO works! | |
1172 | : | |
d9898ee8 | 1173 | else |
8d138742 CE |
1174 | # Restart under the correct shell. |
1175 | exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} | |
d9898ee8 | 1176 | fi |
d9898ee8 | 1177 | |
8d138742 CE |
1178 | if test "X[$]1" = X--fallback-echo; then |
1179 | # used as fallback echo | |
1180 | shift | |
1181 | cat <<_LT_EOF | |
1182 | [$]* | |
1183 | _LT_EOF | |
1184 | exit 0 | |
d9898ee8 | 1185 | fi |
d9898ee8 | 1186 | |
8d138742 CE |
1187 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
1188 | # if CDPATH is set. | |
1189 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
d9898ee8 | 1190 | |
8d138742 CE |
1191 | if test -z "$lt_ECHO"; then |
1192 | if test "X${echo_test_string+set}" != Xset; then | |
1193 | # find a string as large as possible, as long as the shell can cope with it | |
1194 | for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do | |
1195 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... | |
1196 | if { echo_test_string=`eval $cmd`; } 2>/dev/null && | |
1197 | { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null | |
1198 | then | |
1199 | break | |
1200 | fi | |
1201 | done | |
1202 | fi | |
d9898ee8 | 1203 | |
8d138742 CE |
1204 | if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && |
1205 | echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && | |
1206 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1207 | : | |
d9898ee8 | 1208 | else |
8d138742 CE |
1209 | # The Solaris, AIX, and Digital Unix default echo programs unquote |
1210 | # backslashes. This makes it impossible to quote backslashes using | |
1211 | # echo "$something" | sed 's/\\/\\\\/g' | |
1212 | # | |
1213 | # So, first we look for a working echo in the user's PATH. | |
1214 | ||
1215 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
1216 | for dir in $PATH /usr/ucb; do | |
1217 | IFS="$lt_save_ifs" | |
1218 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && | |
1219 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && | |
1220 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && | |
1221 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1222 | ECHO="$dir/echo" | |
1223 | break | |
1224 | fi | |
1225 | done | |
1226 | IFS="$lt_save_ifs" | |
1227 | ||
1228 | if test "X$ECHO" = Xecho; then | |
1229 | # We didn't find a better echo, so look for alternatives. | |
1230 | if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && | |
1231 | echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && | |
1232 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1233 | # This shell has a builtin print -r that does the trick. | |
1234 | ECHO='print -r' | |
1235 | elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && | |
1236 | test "X$CONFIG_SHELL" != X/bin/ksh; then | |
1237 | # If we have ksh, try running configure again with it. | |
1238 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
1239 | export ORIGINAL_CONFIG_SHELL | |
1240 | CONFIG_SHELL=/bin/ksh | |
1241 | export CONFIG_SHELL | |
1242 | exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} | |
1243 | else | |
1244 | # Try using printf. | |
1245 | ECHO='printf %s\n' | |
1246 | if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && | |
1247 | echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && | |
1248 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1249 | # Cool, printf works | |
1250 | : | |
1251 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | |
1252 | test "X$echo_testing_string" = 'X\t' && | |
1253 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
1254 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1255 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL | |
1256 | export CONFIG_SHELL | |
1257 | SHELL="$CONFIG_SHELL" | |
1258 | export SHELL | |
1259 | ECHO="$CONFIG_SHELL [$]0 --fallback-echo" | |
1260 | elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | |
1261 | test "X$echo_testing_string" = 'X\t' && | |
1262 | echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
1263 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
1264 | ECHO="$CONFIG_SHELL [$]0 --fallback-echo" | |
1265 | else | |
1266 | # maybe with a smaller string... | |
1267 | prev=: | |
1268 | ||
1269 | for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do | |
1270 | if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null | |
1271 | then | |
1272 | break | |
1273 | fi | |
1274 | prev="$cmd" | |
1275 | done | |
1276 | ||
1277 | if test "$prev" != 'sed 50q "[$]0"'; then | |
1278 | echo_test_string=`eval $prev` | |
1279 | export echo_test_string | |
1280 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} | |
1281 | else | |
1282 | # Oops. We lost completely, so just stick with echo. | |
1283 | ECHO=echo | |
1284 | fi | |
1285 | fi | |
1286 | fi | |
1287 | fi | |
d9898ee8 | 1288 | fi |
d9898ee8 | 1289 | fi |
d9898ee8 | 1290 | |
8d138742 CE |
1291 | # Copy echo and quote the copy suitably for passing to libtool from |
1292 | # the Makefile, instead of quoting the original, which is used later. | |
1293 | lt_ECHO=$ECHO | |
1294 | if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then | |
1295 | lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" | |
d9898ee8 | 1296 | fi |
d9898ee8 | 1297 | |
8d138742 CE |
1298 | AC_SUBST(lt_ECHO) |
1299 | ]) | |
1300 | _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) | |
1301 | _LT_DECL([], [ECHO], [1], | |
1302 | [An echo program that does not interpret backslashes]) | |
1303 | ])# _LT_PROG_ECHO_BACKSLASH | |
d9898ee8 | 1304 | |
d9898ee8 | 1305 | |
8d138742 CE |
1306 | # _LT_ENABLE_LOCK |
1307 | # --------------- | |
1308 | m4_defun([_LT_ENABLE_LOCK], | |
1309 | [AC_ARG_ENABLE([libtool-lock], | |
1310 | [AS_HELP_STRING([--disable-libtool-lock], | |
1311 | [avoid locking (might break parallel builds)])]) | |
1312 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | |
d9898ee8 | 1313 | |
8d138742 CE |
1314 | # Some flags need to be propagated to the compiler or linker for good |
1315 | # libtool support. | |
1316 | case $host in | |
1317 | ia64-*-hpux*) | |
1318 | # Find out which ABI we are using. | |
1319 | echo 'int i;' > conftest.$ac_ext | |
1320 | if AC_TRY_EVAL(ac_compile); then | |
1321 | case `/usr/bin/file conftest.$ac_objext` in | |
1322 | *ELF-32*) | |
1323 | HPUX_IA64_MODE="32" | |
1324 | ;; | |
1325 | *ELF-64*) | |
1326 | HPUX_IA64_MODE="64" | |
1327 | ;; | |
1328 | esac | |
d9898ee8 | 1329 | fi |
8d138742 CE |
1330 | rm -rf conftest* |
1331 | ;; | |
1332 | *-*-irix6*) | |
1333 | # Find out which ABI we are using. | |
1334 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext | |
1335 | if AC_TRY_EVAL(ac_compile); then | |
1336 | if test "$lt_cv_prog_gnu_ld" = yes; then | |
1337 | case `/usr/bin/file conftest.$ac_objext` in | |
1338 | *32-bit*) | |
1339 | LD="${LD-ld} -melf32bsmip" | |
1340 | ;; | |
1341 | *N32*) | |
1342 | LD="${LD-ld} -melf32bmipn32" | |
1343 | ;; | |
1344 | *64-bit*) | |
1345 | LD="${LD-ld} -melf64bmip" | |
1346 | ;; | |
1347 | esac | |
ac40fd9e | 1348 | else |
8d138742 CE |
1349 | case `/usr/bin/file conftest.$ac_objext` in |
1350 | *32-bit*) | |
1351 | LD="${LD-ld} -32" | |
1352 | ;; | |
1353 | *N32*) | |
1354 | LD="${LD-ld} -n32" | |
1355 | ;; | |
1356 | *64-bit*) | |
1357 | LD="${LD-ld} -64" | |
1358 | ;; | |
1359 | esac | |
ac40fd9e | 1360 | fi |
8d138742 CE |
1361 | fi |
1362 | rm -rf conftest* | |
d9898ee8 | 1363 | ;; |
1364 | ||
8d138742 CE |
1365 | x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ |
1366 | s390*-*linux*|s390*-*tpf*|sparc*-*linux*) | |
1367 | # Find out which ABI we are using. | |
1368 | echo 'int i;' > conftest.$ac_ext | |
1369 | if AC_TRY_EVAL(ac_compile); then | |
1370 | case `/usr/bin/file conftest.o` in | |
1371 | *32-bit*) | |
1372 | case $host in | |
1373 | x86_64-*kfreebsd*-gnu) | |
1374 | LD="${LD-ld} -m elf_i386_fbsd" | |
1375 | ;; | |
1376 | x86_64-*linux*) | |
1377 | LD="${LD-ld} -m elf_i386" | |
1378 | ;; | |
1379 | ppc64-*linux*|powerpc64-*linux*) | |
1380 | LD="${LD-ld} -m elf32ppclinux" | |
1381 | ;; | |
1382 | s390x-*linux*) | |
1383 | LD="${LD-ld} -m elf_s390" | |
1384 | ;; | |
1385 | sparc64-*linux*) | |
1386 | LD="${LD-ld} -m elf32_sparc" | |
1387 | ;; | |
1388 | esac | |
1389 | ;; | |
1390 | *64-bit*) | |
1391 | case $host in | |
1392 | x86_64-*kfreebsd*-gnu) | |
1393 | LD="${LD-ld} -m elf_x86_64_fbsd" | |
1394 | ;; | |
1395 | x86_64-*linux*) | |
1396 | LD="${LD-ld} -m elf_x86_64" | |
1397 | ;; | |
1398 | ppc*-*linux*|powerpc*-*linux*) | |
1399 | LD="${LD-ld} -m elf64ppc" | |
1400 | ;; | |
1401 | s390*-*linux*|s390*-*tpf*) | |
1402 | LD="${LD-ld} -m elf64_s390" | |
1403 | ;; | |
1404 | sparc*-*linux*) | |
1405 | LD="${LD-ld} -m elf64_sparc" | |
1406 | ;; | |
1407 | esac | |
1408 | ;; | |
d9898ee8 | 1409 | esac |
d9898ee8 | 1410 | fi |
8d138742 | 1411 | rm -rf conftest* |
d9898ee8 | 1412 | ;; |
1413 | ||
8d138742 CE |
1414 | *-*-sco3.2v5*) |
1415 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
1416 | SAVE_CFLAGS="$CFLAGS" | |
1417 | CFLAGS="$CFLAGS -belf" | |
1418 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, | |
1419 | [AC_LANG_PUSH(C) | |
1420 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) | |
1421 | AC_LANG_POP]) | |
1422 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then | |
1423 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
1424 | CFLAGS="$SAVE_CFLAGS" | |
1425 | fi | |
d9898ee8 | 1426 | ;; |
8d138742 CE |
1427 | sparc*-*solaris*) |
1428 | # Find out which ABI we are using. | |
1429 | echo 'int i;' > conftest.$ac_ext | |
1430 | if AC_TRY_EVAL(ac_compile); then | |
1431 | case `/usr/bin/file conftest.o` in | |
1432 | *64-bit*) | |
1433 | case $lt_cv_prog_gnu_ld in | |
1434 | yes*) LD="${LD-ld} -m elf64_sparc" ;; | |
1435 | *) | |
1436 | if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then | |
1437 | LD="${LD-ld} -64" | |
1438 | fi | |
1439 | ;; | |
1440 | esac | |
1441 | ;; | |
1442 | esac | |
1443 | fi | |
1444 | rm -rf conftest* | |
d9898ee8 | 1445 | ;; |
8d138742 | 1446 | esac |
d9898ee8 | 1447 | |
8d138742 CE |
1448 | need_locks="$enable_libtool_lock" |
1449 | ])# _LT_ENABLE_LOCK | |
d9898ee8 | 1450 | |
d9898ee8 | 1451 | |
8d138742 CE |
1452 | # _LT_CMD_OLD_ARCHIVE |
1453 | # ------------------- | |
1454 | m4_defun([_LT_CMD_OLD_ARCHIVE], | |
1455 | [AC_CHECK_TOOL(AR, ar, false) | |
1456 | test -z "$AR" && AR=ar | |
1457 | test -z "$AR_FLAGS" && AR_FLAGS=cru | |
1458 | _LT_DECL([], [AR], [1], [The archiver]) | |
1459 | _LT_DECL([], [AR_FLAGS], [1]) | |
d9898ee8 | 1460 | |
8d138742 CE |
1461 | AC_CHECK_TOOL(STRIP, strip, :) |
1462 | test -z "$STRIP" && STRIP=: | |
1463 | _LT_DECL([], [STRIP], [1], [A symbol stripping program]) | |
d9898ee8 | 1464 | |
8d138742 CE |
1465 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
1466 | test -z "$RANLIB" && RANLIB=: | |
1467 | _LT_DECL([], [RANLIB], [1], | |
1468 | [Commands used to install an old-style archive]) | |
d9898ee8 | 1469 | |
8d138742 CE |
1470 | # Determine commands to create old-style static archives. |
1471 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' | |
1472 | old_postinstall_cmds='chmod 644 $oldlib' | |
1473 | old_postuninstall_cmds= | |
d9898ee8 | 1474 | |
8d138742 | 1475 | if test -n "$RANLIB"; then |
d9898ee8 | 1476 | case $host_os in |
8d138742 CE |
1477 | openbsd*) |
1478 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" | |
d9898ee8 | 1479 | ;; |
8d138742 CE |
1480 | *) |
1481 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" | |
d9898ee8 | 1482 | ;; |
1483 | esac | |
8d138742 CE |
1484 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
1485 | fi | |
1486 | _LT_DECL([], [old_postinstall_cmds], [2]) | |
1487 | _LT_DECL([], [old_postuninstall_cmds], [2]) | |
1488 | _LT_TAGDECL([], [old_archive_cmds], [2], | |
1489 | [Commands used to build an old-style archive]) | |
1490 | ])# _LT_CMD_OLD_ARCHIVE | |
d9898ee8 | 1491 | |
d9898ee8 | 1492 | |
8d138742 CE |
1493 | # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
1494 | # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) | |
1495 | # ---------------------------------------------------------------- | |
1496 | # Check whether the given compiler option works | |
1497 | AC_DEFUN([_LT_COMPILER_OPTION], | |
1498 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
1499 | m4_require([_LT_DECL_SED])dnl | |
1500 | AC_CACHE_CHECK([$1], [$2], | |
1501 | [$2=no | |
1502 | m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) | |
1503 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
1504 | lt_compiler_flag="$3" | |
1505 | # Insert the option either (1) after the last *FLAGS variable, or | |
1506 | # (2) before a word containing "conftest.", or (3) at the end. | |
1507 | # Note that $ac_compile itself does not contain backslashes and begins | |
1508 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
1509 | # The option is referenced via a variable to avoid confusing sed. | |
1510 | lt_compile=`echo "$ac_compile" | $SED \ | |
1511 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
1512 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | |
1513 | -e 's:$: $lt_compiler_flag:'` | |
1514 | (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | |
1515 | (eval "$lt_compile" 2>conftest.err) | |
1516 | ac_status=$? | |
1517 | cat conftest.err >&AS_MESSAGE_LOG_FD | |
1518 | echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | |
1519 | if (exit $ac_status) && test -s "$ac_outfile"; then | |
1520 | # The compiler can only warn and ignore the option if not recognized | |
1521 | # So say no if there are warnings other than the usual output. | |
1522 | $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp | |
1523 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | |
1524 | if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then | |
1525 | $2=yes | |
1526 | fi | |
1527 | fi | |
1528 | $RM conftest* | |
1529 | ]) | |
d9898ee8 | 1530 | |
8d138742 CE |
1531 | if test x"[$]$2" = xyes; then |
1532 | m4_if([$5], , :, [$5]) | |
1533 | else | |
1534 | m4_if([$6], , :, [$6]) | |
1535 | fi | |
1536 | ])# _LT_COMPILER_OPTION | |
d9898ee8 | 1537 | |
8d138742 CE |
1538 | # Old name: |
1539 | AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) | |
1540 | dnl aclocal-1.4 backwards compatibility: | |
1541 | dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) | |
d9898ee8 | 1542 | |
d9898ee8 | 1543 | |
8d138742 CE |
1544 | # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
1545 | # [ACTION-SUCCESS], [ACTION-FAILURE]) | |
1546 | # ---------------------------------------------------- | |
1547 | # Check whether the given linker option works | |
1548 | AC_DEFUN([_LT_LINKER_OPTION], | |
1549 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
1550 | m4_require([_LT_DECL_SED])dnl | |
1551 | AC_CACHE_CHECK([$1], [$2], | |
1552 | [$2=no | |
1553 | save_LDFLAGS="$LDFLAGS" | |
1554 | LDFLAGS="$LDFLAGS $3" | |
1555 | echo "$lt_simple_link_test_code" > conftest.$ac_ext | |
1556 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | |
1557 | # The linker can only warn and ignore the option if not recognized | |
1558 | # So say no if there are warnings | |
1559 | if test -s conftest.err; then | |
1560 | # Append any errors to the config.log. | |
1561 | cat conftest.err 1>&AS_MESSAGE_LOG_FD | |
1562 | $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp | |
1563 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | |
1564 | if diff conftest.exp conftest.er2 >/dev/null; then | |
1565 | $2=yes | |
1566 | fi | |
1567 | else | |
1568 | $2=yes | |
1569 | fi | |
1570 | fi | |
1571 | $RM -r conftest* | |
1572 | LDFLAGS="$save_LDFLAGS" | |
1573 | ]) | |
d9898ee8 | 1574 | |
8d138742 CE |
1575 | if test x"[$]$2" = xyes; then |
1576 | m4_if([$4], , :, [$4]) | |
1577 | else | |
1578 | m4_if([$5], , :, [$5]) | |
1579 | fi | |
1580 | ])# _LT_LINKER_OPTION | |
d9898ee8 | 1581 | |
8d138742 CE |
1582 | # Old name: |
1583 | AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) | |
1584 | dnl aclocal-1.4 backwards compatibility: | |
1585 | dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) | |
d9898ee8 | 1586 | |
d9898ee8 | 1587 | |
8d138742 CE |
1588 | # LT_CMD_MAX_LEN |
1589 | #--------------- | |
1590 | AC_DEFUN([LT_CMD_MAX_LEN], | |
1591 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
1592 | # find the maximum length of command line arguments | |
1593 | AC_MSG_CHECKING([the maximum length of command line arguments]) | |
1594 | AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl | |
1595 | i=0 | |
1596 | teststring="ABCD" | |
d9898ee8 | 1597 | |
8d138742 CE |
1598 | case $build_os in |
1599 | msdosdjgpp*) | |
1600 | # On DJGPP, this test can blow up pretty badly due to problems in libc | |
1601 | # (any single argument exceeding 2000 bytes causes a buffer overrun | |
1602 | # during glob expansion). Even if it were fixed, the result of this | |
1603 | # check would be larger than it should be. | |
1604 | lt_cv_sys_max_cmd_len=12288; # 12K is about right | |
1605 | ;; | |
d9898ee8 | 1606 | |
8d138742 CE |
1607 | gnu*) |
1608 | # Under GNU Hurd, this test is not required because there is | |
1609 | # no limit to the length of command line arguments. | |
1610 | # Libtool will interpret -1 as no limit whatsoever | |
1611 | lt_cv_sys_max_cmd_len=-1; | |
1612 | ;; | |
d9898ee8 | 1613 | |
8d138742 CE |
1614 | cygwin* | mingw* | cegcc*) |
1615 | # On Win9x/ME, this test blows up -- it succeeds, but takes | |
1616 | # about 5 minutes as the teststring grows exponentially. | |
1617 | # Worse, since 9x/ME are not pre-emptively multitasking, | |
1618 | # you end up with a "frozen" computer, even though with patience | |
1619 | # the test eventually succeeds (with a max line length of 256k). | |
1620 | # Instead, let's just punt: use the minimum linelength reported by | |
1621 | # all of the supported platforms: 8192 (on NT/2K/XP). | |
1622 | lt_cv_sys_max_cmd_len=8192; | |
1623 | ;; | |
d9898ee8 | 1624 | |
8d138742 CE |
1625 | amigaos*) |
1626 | # On AmigaOS with pdksh, this test takes hours, literally. | |
1627 | # So we just punt and use a minimum line length of 8192. | |
1628 | lt_cv_sys_max_cmd_len=8192; | |
1629 | ;; | |
d9898ee8 | 1630 | |
8d138742 CE |
1631 | netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) |
1632 | # This has been around since 386BSD, at least. Likely further. | |
1633 | if test -x /sbin/sysctl; then | |
1634 | lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` | |
1635 | elif test -x /usr/sbin/sysctl; then | |
1636 | lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` | |
1637 | else | |
1638 | lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs | |
1639 | fi | |
1640 | # And add a safety zone | |
1641 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | |
1642 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | |
1643 | ;; | |
d9898ee8 | 1644 | |
8d138742 CE |
1645 | interix*) |
1646 | # We know the value 262144 and hardcode it with a safety zone (like BSD) | |
1647 | lt_cv_sys_max_cmd_len=196608 | |
1648 | ;; | |
d9898ee8 | 1649 | |
8d138742 CE |
1650 | osf*) |
1651 | # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure | |
1652 | # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not | |
1653 | # nice to cause kernel panics so lets avoid the loop below. | |
1654 | # First set a reasonable default. | |
1655 | lt_cv_sys_max_cmd_len=16384 | |
1656 | # | |
1657 | if test -x /sbin/sysconfig; then | |
1658 | case `/sbin/sysconfig -q proc exec_disable_arg_limit` in | |
1659 | *1*) lt_cv_sys_max_cmd_len=-1 ;; | |
1660 | esac | |
1661 | fi | |
1662 | ;; | |
1663 | sco3.2v5*) | |
1664 | lt_cv_sys_max_cmd_len=102400 | |
1665 | ;; | |
1666 | sysv5* | sco5v6* | sysv4.2uw2*) | |
1667 | kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` | |
1668 | if test -n "$kargmax"; then | |
1669 | lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` | |
d9898ee8 | 1670 | else |
8d138742 | 1671 | lt_cv_sys_max_cmd_len=32768 |
d9898ee8 | 1672 | fi |
8d138742 CE |
1673 | ;; |
1674 | *) | |
1675 | lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` | |
1676 | if test -n "$lt_cv_sys_max_cmd_len"; then | |
1677 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | |
1678 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | |
1679 | else | |
1680 | # Make teststring a little bigger before we do anything with it. | |
1681 | # a 1K string should be a reasonable start. | |
1682 | for i in 1 2 3 4 5 6 7 8 ; do | |
1683 | teststring=$teststring$teststring | |
1684 | done | |
1685 | SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} | |
1686 | # If test is not a shell built-in, we'll probably end up computing a | |
1687 | # maximum length that is only half of the actual maximum length, but | |
1688 | # we can't tell. | |
1689 | while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ | |
1690 | = "XX$teststring$teststring"; } >/dev/null 2>&1 && | |
1691 | test $i != 17 # 1/2 MB should be enough | |
1692 | do | |
1693 | i=`expr $i + 1` | |
1694 | teststring=$teststring$teststring | |
1695 | done | |
1696 | # Only check the string length outside the loop. | |
1697 | lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` | |
1698 | teststring= | |
1699 | # Add a significant safety factor because C++ compilers can tack on | |
1700 | # massive amounts of additional arguments before passing them to the | |
1701 | # linker. It appears as though 1/2 is a usable value. | |
1702 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` | |
1703 | fi | |
1704 | ;; | |
1705 | esac | |
1706 | ]) | |
1707 | if test -n $lt_cv_sys_max_cmd_len ; then | |
1708 | AC_MSG_RESULT($lt_cv_sys_max_cmd_len) | |
1709 | else | |
1710 | AC_MSG_RESULT(none) | |
1711 | fi | |
1712 | max_cmd_len=$lt_cv_sys_max_cmd_len | |
1713 | _LT_DECL([], [max_cmd_len], [0], | |
1714 | [What is the maximum length of a command?]) | |
1715 | ])# LT_CMD_MAX_LEN | |
d9898ee8 | 1716 | |
8d138742 CE |
1717 | # Old name: |
1718 | AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) | |
1719 | dnl aclocal-1.4 backwards compatibility: | |
1720 | dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) | |
d9898ee8 | 1721 | |
d9898ee8 | 1722 | |
8d138742 CE |
1723 | # _LT_HEADER_DLFCN |
1724 | # ---------------- | |
1725 | m4_defun([_LT_HEADER_DLFCN], | |
1726 | [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl | |
1727 | ])# _LT_HEADER_DLFCN | |
d9898ee8 | 1728 | |
d9898ee8 | 1729 | |
8d138742 CE |
1730 | # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
1731 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) | |
1732 | # ---------------------------------------------------------------- | |
1733 | m4_defun([_LT_TRY_DLOPEN_SELF], | |
1734 | [m4_require([_LT_HEADER_DLFCN])dnl | |
1735 | if test "$cross_compiling" = yes; then : | |
1736 | [$4] | |
1737 | else | |
1738 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | |
1739 | lt_status=$lt_dlunknown | |
1740 | cat > conftest.$ac_ext <<_LT_EOF | |
1741 | [#line __oline__ "configure" | |
1742 | #include "confdefs.h" | |
d9898ee8 | 1743 | |
8d138742 CE |
1744 | #if HAVE_DLFCN_H |
1745 | #include <dlfcn.h> | |
1746 | #endif | |
d9898ee8 | 1747 | |
8d138742 | 1748 | #include <stdio.h> |
d9898ee8 | 1749 | |
8d138742 CE |
1750 | #ifdef RTLD_GLOBAL |
1751 | # define LT_DLGLOBAL RTLD_GLOBAL | |
1752 | #else | |
1753 | # ifdef DL_GLOBAL | |
1754 | # define LT_DLGLOBAL DL_GLOBAL | |
1755 | # else | |
1756 | # define LT_DLGLOBAL 0 | |
1757 | # endif | |
1758 | #endif | |
d9898ee8 | 1759 | |
8d138742 CE |
1760 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
1761 | find out it does not work in some platform. */ | |
1762 | #ifndef LT_DLLAZY_OR_NOW | |
1763 | # ifdef RTLD_LAZY | |
1764 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | |
1765 | # else | |
1766 | # ifdef DL_LAZY | |
1767 | # define LT_DLLAZY_OR_NOW DL_LAZY | |
1768 | # else | |
1769 | # ifdef RTLD_NOW | |
1770 | # define LT_DLLAZY_OR_NOW RTLD_NOW | |
1771 | # else | |
1772 | # ifdef DL_NOW | |
1773 | # define LT_DLLAZY_OR_NOW DL_NOW | |
1774 | # else | |
1775 | # define LT_DLLAZY_OR_NOW 0 | |
1776 | # endif | |
1777 | # endif | |
1778 | # endif | |
1779 | # endif | |
1780 | #endif | |
d9898ee8 | 1781 | |
8d138742 CE |
1782 | void fnord() { int i=42;} |
1783 | int main () | |
1784 | { | |
1785 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | |
1786 | int status = $lt_dlunknown; | |
d9898ee8 | 1787 | |
8d138742 CE |
1788 | if (self) |
1789 | { | |
1790 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | |
1791 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | |
1792 | /* dlclose (self); */ | |
1793 | } | |
d9898ee8 | 1794 | else |
8d138742 CE |
1795 | puts (dlerror ()); |
1796 | ||
1797 | return status; | |
1798 | }] | |
1799 | _LT_EOF | |
1800 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then | |
1801 | (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null | |
1802 | lt_status=$? | |
1803 | case x$lt_status in | |
1804 | x$lt_dlno_uscore) $1 ;; | |
1805 | x$lt_dlneed_uscore) $2 ;; | |
1806 | x$lt_dlunknown|x*) $3 ;; | |
1807 | esac | |
1808 | else : | |
1809 | # compilation failed | |
1810 | $3 | |
d9898ee8 | 1811 | fi |
1812 | fi | |
8d138742 CE |
1813 | rm -fr conftest* |
1814 | ])# _LT_TRY_DLOPEN_SELF | |
d9898ee8 | 1815 | |
d9898ee8 | 1816 | |
8d138742 CE |
1817 | # LT_SYS_DLOPEN_SELF |
1818 | # ------------------ | |
1819 | AC_DEFUN([LT_SYS_DLOPEN_SELF], | |
1820 | [m4_require([_LT_HEADER_DLFCN])dnl | |
1821 | if test "x$enable_dlopen" != xyes; then | |
1822 | enable_dlopen=unknown | |
1823 | enable_dlopen_self=unknown | |
1824 | enable_dlopen_self_static=unknown | |
1825 | else | |
1826 | lt_cv_dlopen=no | |
1827 | lt_cv_dlopen_libs= | |
d9898ee8 | 1828 | |
8d138742 CE |
1829 | case $host_os in |
1830 | beos*) | |
1831 | lt_cv_dlopen="load_add_on" | |
1832 | lt_cv_dlopen_libs= | |
1833 | lt_cv_dlopen_self=yes | |
1834 | ;; | |
d9898ee8 | 1835 | |
8d138742 CE |
1836 | mingw* | pw32* | cegcc*) |
1837 | lt_cv_dlopen="LoadLibrary" | |
1838 | lt_cv_dlopen_libs= | |
1839 | ;; | |
d9898ee8 | 1840 | |
8d138742 CE |
1841 | cygwin*) |
1842 | lt_cv_dlopen="dlopen" | |
1843 | lt_cv_dlopen_libs= | |
1844 | ;; | |
d9898ee8 | 1845 | |
8d138742 CE |
1846 | darwin*) |
1847 | # if libdl is installed we need to link against it | |
1848 | AC_CHECK_LIB([dl], [dlopen], | |
1849 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ | |
1850 | lt_cv_dlopen="dyld" | |
1851 | lt_cv_dlopen_libs= | |
1852 | lt_cv_dlopen_self=yes | |
1853 | ]) | |
1854 | ;; | |
d9898ee8 | 1855 | |
8d138742 CE |
1856 | *) |
1857 | AC_CHECK_FUNC([shl_load], | |
1858 | [lt_cv_dlopen="shl_load"], | |
1859 | [AC_CHECK_LIB([dld], [shl_load], | |
1860 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], | |
1861 | [AC_CHECK_FUNC([dlopen], | |
1862 | [lt_cv_dlopen="dlopen"], | |
1863 | [AC_CHECK_LIB([dl], [dlopen], | |
1864 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], | |
1865 | [AC_CHECK_LIB([svld], [dlopen], | |
1866 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], | |
1867 | [AC_CHECK_LIB([dld], [dld_link], | |
1868 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) | |
1869 | ]) | |
1870 | ]) | |
1871 | ]) | |
1872 | ]) | |
1873 | ]) | |
1874 | ;; | |
1875 | esac | |
d9898ee8 | 1876 | |
8d138742 CE |
1877 | if test "x$lt_cv_dlopen" != xno; then |
1878 | enable_dlopen=yes | |
1879 | else | |
1880 | enable_dlopen=no | |
1881 | fi | |
d9898ee8 | 1882 | |
8d138742 CE |
1883 | case $lt_cv_dlopen in |
1884 | dlopen) | |
1885 | save_CPPFLAGS="$CPPFLAGS" | |
1886 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | |
d9898ee8 | 1887 | |
8d138742 CE |
1888 | save_LDFLAGS="$LDFLAGS" |
1889 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | |
d9898ee8 | 1890 | |
8d138742 CE |
1891 | save_LIBS="$LIBS" |
1892 | LIBS="$lt_cv_dlopen_libs $LIBS" | |
d9898ee8 | 1893 | |
8d138742 CE |
1894 | AC_CACHE_CHECK([whether a program can dlopen itself], |
1895 | lt_cv_dlopen_self, [dnl | |
1896 | _LT_TRY_DLOPEN_SELF( | |
1897 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, | |
1898 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) | |
1899 | ]) | |
d9898ee8 | 1900 | |
8d138742 CE |
1901 | if test "x$lt_cv_dlopen_self" = xyes; then |
1902 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" | |
1903 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], | |
1904 | lt_cv_dlopen_self_static, [dnl | |
1905 | _LT_TRY_DLOPEN_SELF( | |
1906 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, | |
1907 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) | |
1908 | ]) | |
1909 | fi | |
d9898ee8 | 1910 | |
8d138742 CE |
1911 | CPPFLAGS="$save_CPPFLAGS" |
1912 | LDFLAGS="$save_LDFLAGS" | |
1913 | LIBS="$save_LIBS" | |
1914 | ;; | |
1915 | esac | |
d9898ee8 | 1916 | |
8d138742 CE |
1917 | case $lt_cv_dlopen_self in |
1918 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | |
1919 | *) enable_dlopen_self=unknown ;; | |
1920 | esac | |
d9898ee8 | 1921 | |
8d138742 CE |
1922 | case $lt_cv_dlopen_self_static in |
1923 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | |
1924 | *) enable_dlopen_self_static=unknown ;; | |
1925 | esac | |
1926 | fi | |
1927 | _LT_DECL([dlopen_support], [enable_dlopen], [0], | |
1928 | [Whether dlopen is supported]) | |
1929 | _LT_DECL([dlopen_self], [enable_dlopen_self], [0], | |
1930 | [Whether dlopen of programs is supported]) | |
1931 | _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], | |
1932 | [Whether dlopen of statically linked programs is supported]) | |
1933 | ])# LT_SYS_DLOPEN_SELF | |
d9898ee8 | 1934 | |
8d138742 CE |
1935 | # Old name: |
1936 | AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) | |
1937 | dnl aclocal-1.4 backwards compatibility: | |
1938 | dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) | |
d9898ee8 | 1939 | |
1940 | ||
8d138742 CE |
1941 | # _LT_COMPILER_C_O([TAGNAME]) |
1942 | # --------------------------- | |
1943 | # Check to see if options -c and -o are simultaneously supported by compiler. | |
1944 | # This macro does not hard code the compiler like AC_PROG_CC_C_O. | |
1945 | m4_defun([_LT_COMPILER_C_O], | |
1946 | [m4_require([_LT_DECL_SED])dnl | |
1947 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
1948 | m4_require([_LT_TAG_COMPILER])dnl | |
1949 | AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], | |
1950 | [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], | |
1951 | [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no | |
1952 | $RM -r conftest 2>/dev/null | |
1953 | mkdir conftest | |
1954 | cd conftest | |
1955 | mkdir out | |
1956 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
d9898ee8 | 1957 | |
8d138742 CE |
1958 | lt_compiler_flag="-o out/conftest2.$ac_objext" |
1959 | # Insert the option either (1) after the last *FLAGS variable, or | |
1960 | # (2) before a word containing "conftest.", or (3) at the end. | |
1961 | # Note that $ac_compile itself does not contain backslashes and begins | |
1962 | # with a dollar sign (not a hyphen), so the echo should work correctly. | |
1963 | lt_compile=`echo "$ac_compile" | $SED \ | |
1964 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
1965 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | |
1966 | -e 's:$: $lt_compiler_flag:'` | |
1967 | (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | |
1968 | (eval "$lt_compile" 2>out/conftest.err) | |
1969 | ac_status=$? | |
1970 | cat out/conftest.err >&AS_MESSAGE_LOG_FD | |
1971 | echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | |
1972 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | |
1973 | then | |
1974 | # The compiler can only warn and ignore the option if not recognized | |
1975 | # So say no if there are warnings | |
1976 | $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp | |
1977 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 | |
1978 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | |
1979 | _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | |
1980 | fi | |
1981 | fi | |
1982 | chmod u+w . 2>&AS_MESSAGE_LOG_FD | |
1983 | $RM conftest* | |
1984 | # SGI C++ compiler will create directory out/ii_files/ for | |
1985 | # template instantiation | |
1986 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | |
1987 | $RM out/* && rmdir out | |
1988 | cd .. | |
1989 | $RM -r conftest | |
1990 | $RM conftest* | |
1991 | ]) | |
1992 | _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], | |
1993 | [Does compiler simultaneously support -c and -o options?]) | |
1994 | ])# _LT_COMPILER_C_O | |
d9898ee8 | 1995 | |
d9898ee8 | 1996 | |
8d138742 CE |
1997 | # _LT_COMPILER_FILE_LOCKS([TAGNAME]) |
1998 | # ---------------------------------- | |
1999 | # Check to see if we can do hard links to lock some files if needed | |
2000 | m4_defun([_LT_COMPILER_FILE_LOCKS], | |
2001 | [m4_require([_LT_ENABLE_LOCK])dnl | |
2002 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
2003 | _LT_COMPILER_C_O([$1]) | |
d9898ee8 | 2004 | |
8d138742 CE |
2005 | hard_links="nottested" |
2006 | if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then | |
2007 | # do not overwrite the value of need_locks provided by the user | |
2008 | AC_MSG_CHECKING([if we can lock with hard links]) | |
2009 | hard_links=yes | |
2010 | $RM conftest* | |
2011 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
2012 | touch conftest.a | |
2013 | ln conftest.a conftest.b 2>&5 || hard_links=no | |
2014 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
2015 | AC_MSG_RESULT([$hard_links]) | |
2016 | if test "$hard_links" = no; then | |
2017 | AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) | |
2018 | need_locks=warn | |
2019 | fi | |
2020 | else | |
2021 | need_locks=no | |
d9898ee8 | 2022 | fi |
8d138742 CE |
2023 | _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) |
2024 | ])# _LT_COMPILER_FILE_LOCKS | |
d9898ee8 | 2025 | |
2026 | ||
8d138742 CE |
2027 | # _LT_CHECK_OBJDIR |
2028 | # ---------------- | |
2029 | m4_defun([_LT_CHECK_OBJDIR], | |
2030 | [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], | |
2031 | [rm -f .libs 2>/dev/null | |
2032 | mkdir .libs 2>/dev/null | |
2033 | if test -d .libs; then | |
2034 | lt_cv_objdir=.libs | |
d9898ee8 | 2035 | else |
8d138742 CE |
2036 | # MS-DOS does not allow filenames that begin with a dot. |
2037 | lt_cv_objdir=_libs | |
d9898ee8 | 2038 | fi |
8d138742 CE |
2039 | rmdir .libs 2>/dev/null]) |
2040 | objdir=$lt_cv_objdir | |
2041 | _LT_DECL([], [objdir], [0], | |
2042 | [The name of the directory that contains temporary libtool files])dnl | |
2043 | m4_pattern_allow([LT_OBJDIR])dnl | |
2044 | AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", | |
2045 | [Define to the sub-directory in which libtool stores uninstalled libraries.]) | |
2046 | ])# _LT_CHECK_OBJDIR | |
2047 | ||
2048 | ||
2049 | # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) | |
2050 | # -------------------------------------- | |
2051 | # Check hardcoding attributes. | |
2052 | m4_defun([_LT_LINKER_HARDCODE_LIBPATH], | |
2053 | [AC_MSG_CHECKING([how to hardcode library paths into programs]) | |
2054 | _LT_TAGVAR(hardcode_action, $1)= | |
2055 | if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || | |
2056 | test -n "$_LT_TAGVAR(runpath_var, $1)" || | |
2057 | test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then | |
2058 | ||
2059 | # We can hardcode non-existent directories. | |
2060 | if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && | |
2061 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | |
2062 | # have to relink, otherwise we might link with an installed library | |
2063 | # when we should be linking with a yet-to-be-installed one | |
2064 | ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && | |
2065 | test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then | |
2066 | # Linking always hardcodes the temporary library directory. | |
2067 | _LT_TAGVAR(hardcode_action, $1)=relink | |
2068 | else | |
2069 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | |
2070 | _LT_TAGVAR(hardcode_action, $1)=immediate | |
2071 | fi | |
d9898ee8 | 2072 | else |
8d138742 CE |
2073 | # We cannot hardcode anything, or else we can only hardcode existing |
2074 | # directories. | |
2075 | _LT_TAGVAR(hardcode_action, $1)=unsupported | |
d9898ee8 | 2076 | fi |
8d138742 | 2077 | AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) |
d9898ee8 | 2078 | |
8d138742 CE |
2079 | if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || |
2080 | test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then | |
2081 | # Fast installation is not supported | |
2082 | enable_fast_install=no | |
2083 | elif test "$shlibpath_overrides_runpath" = yes || | |
2084 | test "$enable_shared" = no; then | |
2085 | # Fast installation is not necessary | |
2086 | enable_fast_install=needless | |
2087 | fi | |
2088 | _LT_TAGDECL([], [hardcode_action], [0], | |
2089 | [How to hardcode a shared library path into an executable]) | |
2090 | ])# _LT_LINKER_HARDCODE_LIBPATH | |
d9898ee8 | 2091 | |
2092 | ||
8d138742 CE |
2093 | # _LT_CMD_STRIPLIB |
2094 | # ---------------- | |
2095 | m4_defun([_LT_CMD_STRIPLIB], | |
2096 | [m4_require([_LT_DECL_EGREP]) | |
2097 | striplib= | |
2098 | old_striplib= | |
2099 | AC_MSG_CHECKING([whether stripping libraries is possible]) | |
2100 | if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then | |
2101 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | |
2102 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | |
2103 | AC_MSG_RESULT([yes]) | |
2104 | else | |
2105 | # FIXME - insert some real tests, host_os isn't really good enough | |
2106 | case $host_os in | |
d9898ee8 | 2107 | darwin*) |
8d138742 CE |
2108 | if test -n "$STRIP" ; then |
2109 | striplib="$STRIP -x" | |
2110 | old_striplib="$STRIP -S" | |
2111 | AC_MSG_RESULT([yes]) | |
d9898ee8 | 2112 | else |
8d138742 | 2113 | AC_MSG_RESULT([no]) |
d9898ee8 | 2114 | fi |
2115 | ;; | |
8d138742 CE |
2116 | *) |
2117 | AC_MSG_RESULT([no]) | |
2118 | ;; | |
2119 | esac | |
2120 | fi | |
2121 | _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) | |
2122 | _LT_DECL([], [striplib], [1]) | |
2123 | ])# _LT_CMD_STRIPLIB | |
d9898ee8 | 2124 | |
2125 | ||
8d138742 CE |
2126 | # _LT_SYS_DYNAMIC_LINKER([TAG]) |
2127 | # ----------------------------- | |
2128 | # PORTME Fill in your ld.so characteristics | |
2129 | m4_defun([_LT_SYS_DYNAMIC_LINKER], | |
2130 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
2131 | m4_require([_LT_DECL_EGREP])dnl | |
2132 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
2133 | m4_require([_LT_DECL_OBJDUMP])dnl | |
2134 | m4_require([_LT_DECL_SED])dnl | |
2135 | AC_MSG_CHECKING([dynamic linker characteristics]) | |
2136 | m4_if([$1], | |
2137 | [], [ | |
2138 | if test "$GCC" = yes; then | |
2139 | case $host_os in | |
2140 | darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; | |
2141 | *) lt_awk_arg="/^libraries:/" ;; | |
2142 | esac | |
2143 | lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` | |
2144 | if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then | |
2145 | # if the path contains ";" then we assume it to be the separator | |
2146 | # otherwise default to the standard path separator (i.e. ":") - it is | |
2147 | # assumed that no part of a normal pathname contains ";" but that should | |
2148 | # okay in the real world where ";" in dirpaths is itself problematic. | |
2149 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` | |
2150 | else | |
2151 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | |
2152 | fi | |
2153 | # Ok, now we have the path, separated by spaces, we can step through it | |
2154 | # and add multilib dir if necessary. | |
2155 | lt_tmp_lt_search_path_spec= | |
2156 | lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` | |
2157 | for lt_sys_path in $lt_search_path_spec; do | |
2158 | if test -d "$lt_sys_path/$lt_multi_os_dir"; then | |
2159 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" | |
2160 | else | |
2161 | test -d "$lt_sys_path" && \ | |
2162 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" | |
2163 | fi | |
2164 | done | |
2165 | lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' | |
2166 | BEGIN {RS=" "; FS="/|\n";} { | |
2167 | lt_foo=""; | |
2168 | lt_count=0; | |
2169 | for (lt_i = NF; lt_i > 0; lt_i--) { | |
2170 | if ($lt_i != "" && $lt_i != ".") { | |
2171 | if ($lt_i == "..") { | |
2172 | lt_count++; | |
2173 | } else { | |
2174 | if (lt_count == 0) { | |
2175 | lt_foo="/" $lt_i lt_foo; | |
2176 | } else { | |
2177 | lt_count--; | |
2178 | } | |
2179 | } | |
2180 | } | |
2181 | } | |
2182 | if (lt_foo != "") { lt_freq[[lt_foo]]++; } | |
2183 | if (lt_freq[[lt_foo]] == 1) { print lt_foo; } | |
2184 | }'` | |
2185 | sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` | |
2186 | else | |
2187 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | |
2188 | fi]) | |
2189 | library_names_spec= | |
2190 | libname_spec='lib$name' | |
2191 | soname_spec= | |
2192 | shrext_cmds=".so" | |
2193 | postinstall_cmds= | |
2194 | postuninstall_cmds= | |
2195 | finish_cmds= | |
2196 | finish_eval= | |
2197 | shlibpath_var= | |
2198 | shlibpath_overrides_runpath=unknown | |
2199 | version_type=none | |
2200 | dynamic_linker="$host_os ld.so" | |
2201 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | |
2202 | need_lib_prefix=unknown | |
2203 | hardcode_into_libs=no | |
2204 | ||
2205 | # when you set need_version to no, make sure it does not cause -set_version | |
2206 | # flags to be left without arguments | |
2207 | need_version=unknown | |
d9898ee8 | 2208 | |
2209 | case $host_os in | |
8d138742 CE |
2210 | aix3*) |
2211 | version_type=linux | |
2212 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | |
2213 | shlibpath_var=LIBPATH | |
d9898ee8 | 2214 | |
8d138742 CE |
2215 | # AIX 3 has no versioning support, so we append a major version to the name. |
2216 | soname_spec='${libname}${release}${shared_ext}$major' | |
d9898ee8 | 2217 | ;; |
2218 | ||
8d138742 CE |
2219 | aix[[4-9]]*) |
2220 | version_type=linux | |
2221 | need_lib_prefix=no | |
2222 | need_version=no | |
2223 | hardcode_into_libs=yes | |
2224 | if test "$host_cpu" = ia64; then | |
2225 | # AIX 5 supports IA64 | |
2226 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | |
2227 | shlibpath_var=LD_LIBRARY_PATH | |
ac40fd9e | 2228 | else |
8d138742 CE |
2229 | # With GCC up to 2.95.x, collect2 would create an import file |
2230 | # for dependence libraries. The import file would start with | |
2231 | # the line `#! .'. This would cause the generated library to | |
2232 | # depend on `.', always an invalid library. This was fixed in | |
2233 | # development snapshots of GCC prior to 3.0. | |
2234 | case $host_os in | |
2235 | aix4 | aix4.[[01]] | aix4.[[01]].*) | |
2236 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | |
2237 | echo ' yes ' | |
2238 | echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then | |
2239 | : | |
2240 | else | |
2241 | can_build_shared=no | |
2242 | fi | |
d9898ee8 | 2243 | ;; |
2244 | esac | |
8d138742 CE |
2245 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct |
2246 | # soname into executable. Probably we can add versioning support to | |
2247 | # collect2, so additional links can be useful in future. | |
2248 | if test "$aix_use_runtimelinking" = yes; then | |
2249 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | |
2250 | # instead of lib<name>.a to let people know that these are not | |
2251 | # typical AIX shared libraries. | |
2252 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2253 | else | |
2254 | # We preserve .a as extension for shared libraries through AIX4.2 | |
2255 | # and later when we are not doing run time linking. | |
2256 | library_names_spec='${libname}${release}.a $libname.a' | |
2257 | soname_spec='${libname}${release}${shared_ext}$major' | |
2258 | fi | |
2259 | shlibpath_var=LIBPATH | |
d9898ee8 | 2260 | fi |
2261 | ;; | |
2262 | ||
8d138742 | 2263 | amigaos*) |
d9898ee8 | 2264 | case $host_cpu in |
8d138742 CE |
2265 | powerpc) |
2266 | # Since July 2007 AmigaOS4 officially supports .so libraries. | |
2267 | # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. | |
2268 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
d9898ee8 | 2269 | ;; |
8d138742 CE |
2270 | m68k) |
2271 | library_names_spec='$libname.ixlibrary $libname.a' | |
2272 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | |
2273 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' | |
d9898ee8 | 2274 | ;; |
2275 | esac | |
2276 | ;; | |
2277 | ||
8d138742 CE |
2278 | beos*) |
2279 | library_names_spec='${libname}${shared_ext}' | |
2280 | dynamic_linker="$host_os ld.so" | |
2281 | shlibpath_var=LIBRARY_PATH | |
d9898ee8 | 2282 | ;; |
2283 | ||
8d138742 CE |
2284 | bsdi[[45]]*) |
2285 | version_type=linux | |
2286 | need_version=no | |
2287 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2288 | soname_spec='${libname}${release}${shared_ext}$major' | |
2289 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | |
2290 | shlibpath_var=LD_LIBRARY_PATH | |
2291 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | |
2292 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | |
2293 | # the default ld.so.conf also contains /usr/contrib/lib and | |
2294 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | |
2295 | # libtool to hard-code these into programs | |
d9898ee8 | 2296 | ;; |
2297 | ||
8d138742 CE |
2298 | cygwin* | mingw* | pw32* | cegcc*) |
2299 | version_type=windows | |
2300 | shrext_cmds=".dll" | |
2301 | need_version=no | |
2302 | need_lib_prefix=no | |
d9898ee8 | 2303 | |
8d138742 CE |
2304 | case $GCC,$host_os in |
2305 | yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) | |
2306 | library_names_spec='$libname.dll.a' | |
2307 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | |
2308 | postinstall_cmds='base_file=`basename \${file}`~ | |
2309 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | |
2310 | dldir=$destdir/`dirname \$dlpath`~ | |
2311 | test -d \$dldir || mkdir -p \$dldir~ | |
2312 | $install_prog $dir/$dlname \$dldir/$dlname~ | |
2313 | chmod a+x \$dldir/$dlname~ | |
2314 | if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then | |
2315 | eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; | |
2316 | fi' | |
2317 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | |
2318 | dlpath=$dir/\$dldll~ | |
2319 | $RM \$dlpath' | |
2320 | shlibpath_overrides_runpath=yes | |
d9898ee8 | 2321 | |
8d138742 CE |
2322 | case $host_os in |
2323 | cygwin*) | |
2324 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | |
2325 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | |
2326 | sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" | |
2327 | ;; | |
2328 | mingw* | cegcc*) | |
2329 | # MinGW DLLs use traditional 'lib' prefix | |
2330 | soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | |
2331 | sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | |
2332 | if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then | |
2333 | # It is most probably a Windows format PATH printed by | |
2334 | # mingw gcc, but we are running on Cygwin. Gcc prints its search | |
2335 | # path with ; separators, and with drive letters. We can handle the | |
2336 | # drive letters (cygwin fileutils understands them), so leave them, | |
2337 | # especially as we might pass files found there to a mingw objdump, | |
2338 | # which wouldn't understand a cygwinified path. Ahh. | |
2339 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | |
2340 | else | |
2341 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | |
2342 | fi | |
2343 | ;; | |
2344 | pw32*) | |
2345 | # pw32 DLLs use 'pw' prefix rather than 'lib' | |
2346 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | |
2347 | ;; | |
2348 | esac | |
2349 | ;; | |
d9898ee8 | 2350 | |
8d138742 CE |
2351 | *) |
2352 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' | |
2353 | ;; | |
2354 | esac | |
2355 | dynamic_linker='Win32 ld.exe' | |
2356 | # FIXME: first we should search . and the directory the executable is in | |
2357 | shlibpath_var=PATH | |
d9898ee8 | 2358 | ;; |
2359 | ||
8d138742 CE |
2360 | darwin* | rhapsody*) |
2361 | dynamic_linker="$host_os dyld" | |
2362 | version_type=darwin | |
2363 | need_lib_prefix=no | |
2364 | need_version=no | |
2365 | library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' | |
2366 | soname_spec='${libname}${release}${major}$shared_ext' | |
2367 | shlibpath_overrides_runpath=yes | |
2368 | shlibpath_var=DYLD_LIBRARY_PATH | |
2369 | shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' | |
2370 | m4_if([$1], [],[ | |
2371 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) | |
2372 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | |
d9898ee8 | 2373 | ;; |
2374 | ||
8d138742 CE |
2375 | dgux*) |
2376 | version_type=linux | |
2377 | need_lib_prefix=no | |
2378 | need_version=no | |
2379 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | |
2380 | soname_spec='${libname}${release}${shared_ext}$major' | |
2381 | shlibpath_var=LD_LIBRARY_PATH | |
ac40fd9e | 2382 | ;; |
2383 | ||
8d138742 CE |
2384 | freebsd1*) |
2385 | dynamic_linker=no | |
d9898ee8 | 2386 | ;; |
2387 | ||
8d138742 CE |
2388 | freebsd* | dragonfly*) |
2389 | # DragonFly does not have aout. When/if they implement a new | |
2390 | # versioning mechanism, adjust this. | |
2391 | if test -x /usr/bin/objformat; then | |
2392 | objformat=`/usr/bin/objformat` | |
2393 | else | |
2394 | case $host_os in | |
2395 | freebsd[[123]]*) objformat=aout ;; | |
2396 | *) objformat=elf ;; | |
2397 | esac | |
2398 | fi | |
2399 | version_type=freebsd-$objformat | |
2400 | case $version_type in | |
2401 | freebsd-elf*) | |
2402 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
2403 | need_version=no | |
2404 | need_lib_prefix=no | |
2405 | ;; | |
2406 | freebsd-*) | |
2407 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | |
2408 | need_version=yes | |
2409 | ;; | |
2410 | esac | |
2411 | shlibpath_var=LD_LIBRARY_PATH | |
2412 | case $host_os in | |
2413 | freebsd2*) | |
2414 | shlibpath_overrides_runpath=yes | |
d9898ee8 | 2415 | ;; |
8d138742 CE |
2416 | freebsd3.[[01]]* | freebsdelf3.[[01]]*) |
2417 | shlibpath_overrides_runpath=yes | |
2418 | hardcode_into_libs=yes | |
d9898ee8 | 2419 | ;; |
8d138742 CE |
2420 | freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ |
2421 | freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) | |
2422 | shlibpath_overrides_runpath=no | |
2423 | hardcode_into_libs=yes | |
d9898ee8 | 2424 | ;; |
8d138742 CE |
2425 | *) # from 4.6 on, and DragonFly |
2426 | shlibpath_overrides_runpath=yes | |
2427 | hardcode_into_libs=yes | |
d9898ee8 | 2428 | ;; |
2429 | esac | |
2430 | ;; | |
2431 | ||
8d138742 CE |
2432 | gnu*) |
2433 | version_type=linux | |
2434 | need_lib_prefix=no | |
2435 | need_version=no | |
2436 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | |
2437 | soname_spec='${libname}${release}${shared_ext}$major' | |
2438 | shlibpath_var=LD_LIBRARY_PATH | |
2439 | hardcode_into_libs=yes | |
d9898ee8 | 2440 | ;; |
d9898ee8 | 2441 | |
8d138742 CE |
2442 | hpux9* | hpux10* | hpux11*) |
2443 | # Give a soname corresponding to the major version so that dld.sl refuses to | |
2444 | # link against other versions. | |
2445 | version_type=sunos | |
2446 | need_lib_prefix=no | |
2447 | need_version=no | |
2448 | case $host_cpu in | |
2449 | ia64*) | |
2450 | shrext_cmds='.so' | |
2451 | hardcode_into_libs=yes | |
2452 | dynamic_linker="$host_os dld.so" | |
2453 | shlibpath_var=LD_LIBRARY_PATH | |
2454 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
2455 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2456 | soname_spec='${libname}${release}${shared_ext}$major' | |
2457 | if test "X$HPUX_IA64_MODE" = X32; then | |
2458 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | |
2459 | else | |
2460 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | |
2461 | fi | |
2462 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
2463 | ;; | |
2464 | hppa*64*) | |
2465 | shrext_cmds='.sl' | |
2466 | hardcode_into_libs=yes | |
2467 | dynamic_linker="$host_os dld.sl" | |
2468 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | |
2469 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
2470 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2471 | soname_spec='${libname}${release}${shared_ext}$major' | |
2472 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | |
2473 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
2474 | ;; | |
2475 | *) | |
2476 | shrext_cmds='.sl' | |
2477 | dynamic_linker="$host_os dld.sl" | |
2478 | shlibpath_var=SHLIB_PATH | |
2479 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | |
2480 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2481 | soname_spec='${libname}${release}${shared_ext}$major' | |
2482 | ;; | |
2483 | esac | |
2484 | # HP-UX runs *really* slowly unless shared libraries are mode 555. | |
2485 | postinstall_cmds='chmod 555 $lib' | |
d9898ee8 | 2486 | ;; |
d9898ee8 | 2487 | |
8d138742 CE |
2488 | interix[[3-9]]*) |
2489 | version_type=linux | |
2490 | need_lib_prefix=no | |
2491 | need_version=no | |
2492 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
2493 | soname_spec='${libname}${release}${shared_ext}$major' | |
2494 | dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' | |
2495 | shlibpath_var=LD_LIBRARY_PATH | |
2496 | shlibpath_overrides_runpath=no | |
2497 | hardcode_into_libs=yes | |
2498 | ;; | |
d9898ee8 | 2499 | |
8d138742 CE |
2500 | irix5* | irix6* | nonstopux*) |
2501 | case $host_os in | |
2502 | nonstopux*) version_type=nonstopux ;; | |
2503 | *) | |
2504 | if test "$lt_cv_prog_gnu_ld" = yes; then | |
2505 | version_type=linux | |
2506 | else | |
2507 | version_type=irix | |
2508 | fi ;; | |
2509 | esac | |
2510 | need_lib_prefix=no | |
2511 | need_version=no | |
2512 | soname_spec='${libname}${release}${shared_ext}$major' | |
2513 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | |
2514 | case $host_os in | |
2515 | irix5* | nonstopux*) | |
2516 | libsuff= shlibsuff= | |
2517 | ;; | |
2518 | *) | |
2519 | case $LD in # libtool.m4 will add one of these switches to LD | |
2520 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | |
2521 | libsuff= shlibsuff= libmagic=32-bit;; | |
2522 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | |
2523 | libsuff=32 shlibsuff=N32 libmagic=N32;; | |
2524 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | |
2525 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | |
2526 | *) libsuff= shlibsuff= libmagic=never-match;; | |
2527 | esac | |
2528 | ;; | |
d9898ee8 | 2529 | esac |
8d138742 CE |
2530 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
2531 | shlibpath_overrides_runpath=no | |
2532 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | |
2533 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | |
2534 | hardcode_into_libs=yes | |
2535 | ;; | |
d9898ee8 | 2536 | |
8d138742 CE |
2537 | # No shared lib support for Linux oldld, aout, or coff. |
2538 | linux*oldld* | linux*aout* | linux*coff*) | |
2539 | dynamic_linker=no | |
2540 | ;; | |
d9898ee8 | 2541 | |
8d138742 CE |
2542 | # This must be Linux ELF. |
2543 | linux* | k*bsd*-gnu) | |
2544 | version_type=linux | |
2545 | need_lib_prefix=no | |
2546 | need_version=no | |
2547 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2548 | soname_spec='${libname}${release}${shared_ext}$major' | |
2549 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | |
2550 | shlibpath_var=LD_LIBRARY_PATH | |
2551 | shlibpath_overrides_runpath=no | |
2552 | # Some binutils ld are patched to set DT_RUNPATH | |
2553 | save_LDFLAGS=$LDFLAGS | |
2554 | save_libdir=$libdir | |
2555 | eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ | |
2556 | LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" | |
2557 | AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], | |
2558 | [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], | |
2559 | [shlibpath_overrides_runpath=yes])]) | |
2560 | LDFLAGS=$save_LDFLAGS | |
2561 | libdir=$save_libdir | |
d9898ee8 | 2562 | |
8d138742 CE |
2563 | # This implies no fast_install, which is unacceptable. |
2564 | # Some rework will be needed to allow for fast_install | |
2565 | # before this can be enabled. | |
2566 | hardcode_into_libs=yes | |
d9898ee8 | 2567 | |
8d138742 CE |
2568 | # Add ABI-specific directories to the system library path. |
2569 | sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" | |
d9898ee8 | 2570 | |
8d138742 CE |
2571 | # Append ld.so.conf contents to the search path |
2572 | if test -f /etc/ld.so.conf; then | |
2573 | lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` | |
2574 | sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" | |
2575 | fi | |
d9898ee8 | 2576 | |
8d138742 CE |
2577 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
2578 | # powerpc, because MkLinux only supported shared libraries with the | |
2579 | # GNU dynamic linker. Since this was broken with cross compilers, | |
2580 | # most powerpc-linux boxes support dynamic linking these days and | |
2581 | # people can always --disable-shared, the test was removed, and we | |
2582 | # assume the GNU/Linux dynamic linker is in use. | |
2583 | dynamic_linker='GNU/Linux ld.so' | |
2584 | ;; | |
d9898ee8 | 2585 | |
8d138742 CE |
2586 | netbsd*) |
2587 | version_type=sunos | |
2588 | need_lib_prefix=no | |
2589 | need_version=no | |
2590 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
2591 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
2592 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
2593 | dynamic_linker='NetBSD (a.out) ld.so' | |
2594 | else | |
2595 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
2596 | soname_spec='${libname}${release}${shared_ext}$major' | |
2597 | dynamic_linker='NetBSD ld.elf_so' | |
2598 | fi | |
2599 | shlibpath_var=LD_LIBRARY_PATH | |
2600 | shlibpath_overrides_runpath=yes | |
2601 | hardcode_into_libs=yes | |
2602 | ;; | |
d9898ee8 | 2603 | |
8d138742 CE |
2604 | newsos6) |
2605 | version_type=linux | |
2606 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2607 | shlibpath_var=LD_LIBRARY_PATH | |
2608 | shlibpath_overrides_runpath=yes | |
2609 | ;; | |
d9898ee8 | 2610 | |
8d138742 CE |
2611 | *nto* | *qnx*) |
2612 | version_type=qnx | |
2613 | need_lib_prefix=no | |
2614 | need_version=no | |
2615 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2616 | soname_spec='${libname}${release}${shared_ext}$major' | |
2617 | shlibpath_var=LD_LIBRARY_PATH | |
2618 | shlibpath_overrides_runpath=no | |
2619 | hardcode_into_libs=yes | |
2620 | dynamic_linker='ldqnx.so' | |
2621 | ;; | |
d9898ee8 | 2622 | |
8d138742 CE |
2623 | openbsd*) |
2624 | version_type=sunos | |
2625 | sys_lib_dlsearch_path_spec="/usr/lib" | |
2626 | need_lib_prefix=no | |
2627 | # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. | |
2628 | case $host_os in | |
2629 | openbsd3.3 | openbsd3.3.*) need_version=yes ;; | |
2630 | *) need_version=no ;; | |
2631 | esac | |
2632 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
2633 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
2634 | shlibpath_var=LD_LIBRARY_PATH | |
2635 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
2636 | case $host_os in | |
2637 | openbsd2.[[89]] | openbsd2.[[89]].*) | |
2638 | shlibpath_overrides_runpath=no | |
2639 | ;; | |
2640 | *) | |
2641 | shlibpath_overrides_runpath=yes | |
2642 | ;; | |
2643 | esac | |
2644 | else | |
2645 | shlibpath_overrides_runpath=yes | |
2646 | fi | |
2647 | ;; | |
d9898ee8 | 2648 | |
8d138742 CE |
2649 | os2*) |
2650 | libname_spec='$name' | |
2651 | shrext_cmds=".dll" | |
2652 | need_lib_prefix=no | |
2653 | library_names_spec='$libname${shared_ext} $libname.a' | |
2654 | dynamic_linker='OS/2 ld.exe' | |
2655 | shlibpath_var=LIBPATH | |
2656 | ;; | |
d9898ee8 | 2657 | |
8d138742 CE |
2658 | osf3* | osf4* | osf5*) |
2659 | version_type=osf | |
2660 | need_lib_prefix=no | |
2661 | need_version=no | |
2662 | soname_spec='${libname}${release}${shared_ext}$major' | |
2663 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2664 | shlibpath_var=LD_LIBRARY_PATH | |
2665 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | |
2666 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | |
2667 | ;; | |
d9898ee8 | 2668 | |
8d138742 CE |
2669 | rdos*) |
2670 | dynamic_linker=no | |
2671 | ;; | |
d9898ee8 | 2672 | |
8d138742 CE |
2673 | solaris*) |
2674 | version_type=linux | |
2675 | need_lib_prefix=no | |
2676 | need_version=no | |
2677 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2678 | soname_spec='${libname}${release}${shared_ext}$major' | |
2679 | shlibpath_var=LD_LIBRARY_PATH | |
2680 | shlibpath_overrides_runpath=yes | |
2681 | hardcode_into_libs=yes | |
2682 | # ldd complains unless libraries are executable | |
2683 | postinstall_cmds='chmod +x $lib' | |
2684 | ;; | |
d9898ee8 | 2685 | |
8d138742 CE |
2686 | sunos4*) |
2687 | version_type=sunos | |
2688 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
2689 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | |
2690 | shlibpath_var=LD_LIBRARY_PATH | |
2691 | shlibpath_overrides_runpath=yes | |
2692 | if test "$with_gnu_ld" = yes; then | |
2693 | need_lib_prefix=no | |
2694 | fi | |
2695 | need_version=yes | |
2696 | ;; | |
d9898ee8 | 2697 | |
8d138742 CE |
2698 | sysv4 | sysv4.3*) |
2699 | version_type=linux | |
2700 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2701 | soname_spec='${libname}${release}${shared_ext}$major' | |
2702 | shlibpath_var=LD_LIBRARY_PATH | |
2703 | case $host_vendor in | |
2704 | sni) | |
2705 | shlibpath_overrides_runpath=no | |
2706 | need_lib_prefix=no | |
2707 | runpath_var=LD_RUN_PATH | |
2708 | ;; | |
2709 | siemens) | |
2710 | need_lib_prefix=no | |
2711 | ;; | |
2712 | motorola) | |
2713 | need_lib_prefix=no | |
2714 | need_version=no | |
2715 | shlibpath_overrides_runpath=no | |
2716 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | |
2717 | ;; | |
2718 | esac | |
2719 | ;; | |
d9898ee8 | 2720 | |
8d138742 CE |
2721 | sysv4*MP*) |
2722 | if test -d /usr/nec ;then | |
2723 | version_type=linux | |
2724 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | |
2725 | soname_spec='$libname${shared_ext}.$major' | |
2726 | shlibpath_var=LD_LIBRARY_PATH | |
d9898ee8 | 2727 | fi |
2728 | ;; | |
2729 | ||
8d138742 CE |
2730 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
2731 | version_type=freebsd-elf | |
2732 | need_lib_prefix=no | |
2733 | need_version=no | |
2734 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
2735 | soname_spec='${libname}${release}${shared_ext}$major' | |
2736 | shlibpath_var=LD_LIBRARY_PATH | |
2737 | shlibpath_overrides_runpath=yes | |
2738 | hardcode_into_libs=yes | |
2739 | if test "$with_gnu_ld" = yes; then | |
2740 | sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' | |
2741 | else | |
2742 | sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' | |
2743 | case $host_os in | |
2744 | sco3.2v5*) | |
2745 | sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" | |
2746 | ;; | |
2747 | esac | |
d9898ee8 | 2748 | fi |
8d138742 CE |
2749 | sys_lib_dlsearch_path_spec='/usr/lib' |
2750 | ;; | |
d9898ee8 | 2751 | |
8d138742 CE |
2752 | tpf*) |
2753 | # TPF is a cross-target only. Preferred cross-host = GNU/Linux. | |
2754 | version_type=linux | |
2755 | need_lib_prefix=no | |
2756 | need_version=no | |
2757 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2758 | shlibpath_var=LD_LIBRARY_PATH | |
2759 | shlibpath_overrides_runpath=no | |
2760 | hardcode_into_libs=yes | |
2761 | ;; | |
d9898ee8 | 2762 | |
8d138742 CE |
2763 | uts4*) |
2764 | version_type=linux | |
2765 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2766 | soname_spec='${libname}${release}${shared_ext}$major' | |
2767 | shlibpath_var=LD_LIBRARY_PATH | |
2768 | ;; | |
d9898ee8 | 2769 | |
8d138742 CE |
2770 | *) |
2771 | dynamic_linker=no | |
2772 | ;; | |
2773 | esac | |
2774 | AC_MSG_RESULT([$dynamic_linker]) | |
2775 | test "$dynamic_linker" = no && can_build_shared=no | |
d9898ee8 | 2776 | |
8d138742 CE |
2777 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
2778 | if test "$GCC" = yes; then | |
2779 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | |
2780 | fi | |
d9898ee8 | 2781 | |
8d138742 CE |
2782 | if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then |
2783 | sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" | |
2784 | fi | |
2785 | if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then | |
2786 | sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" | |
2787 | fi | |
d9898ee8 | 2788 | |
8d138742 CE |
2789 | _LT_DECL([], [variables_saved_for_relink], [1], |
2790 | [Variables whose values should be saved in libtool wrapper scripts and | |
2791 | restored at link time]) | |
2792 | _LT_DECL([], [need_lib_prefix], [0], | |
2793 | [Do we need the "lib" prefix for modules?]) | |
2794 | _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) | |
2795 | _LT_DECL([], [version_type], [0], [Library versioning type]) | |
2796 | _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) | |
2797 | _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) | |
2798 | _LT_DECL([], [shlibpath_overrides_runpath], [0], | |
2799 | [Is shlibpath searched before the hard-coded library search path?]) | |
2800 | _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) | |
2801 | _LT_DECL([], [library_names_spec], [1], | |
2802 | [[List of archive names. First name is the real one, the rest are links. | |
2803 | The last name is the one that the linker finds with -lNAME]]) | |
2804 | _LT_DECL([], [soname_spec], [1], | |
2805 | [[The coded name of the library, if different from the real name]]) | |
2806 | _LT_DECL([], [postinstall_cmds], [2], | |
2807 | [Command to use after installation of a shared archive]) | |
2808 | _LT_DECL([], [postuninstall_cmds], [2], | |
2809 | [Command to use after uninstallation of a shared archive]) | |
2810 | _LT_DECL([], [finish_cmds], [2], | |
2811 | [Commands used to finish a libtool library installation in a directory]) | |
2812 | _LT_DECL([], [finish_eval], [1], | |
2813 | [[As "finish_cmds", except a single script fragment to be evaled but | |
2814 | not shown]]) | |
2815 | _LT_DECL([], [hardcode_into_libs], [0], | |
2816 | [Whether we should hardcode library paths into libraries]) | |
2817 | _LT_DECL([], [sys_lib_search_path_spec], [2], | |
2818 | [Compile-time system search path for libraries]) | |
2819 | _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], | |
2820 | [Run-time system search path for libraries]) | |
2821 | ])# _LT_SYS_DYNAMIC_LINKER | |
2822 | ||
2823 | ||
2824 | # _LT_PATH_TOOL_PREFIX(TOOL) | |
2825 | # -------------------------- | |
2826 | # find a file program which can recognize shared library | |
2827 | AC_DEFUN([_LT_PATH_TOOL_PREFIX], | |
2828 | [m4_require([_LT_DECL_EGREP])dnl | |
2829 | AC_MSG_CHECKING([for $1]) | |
2830 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, | |
2831 | [case $MAGIC_CMD in | |
2832 | [[\\/*] | ?:[\\/]*]) | |
2833 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | |
2834 | ;; | |
2835 | *) | |
2836 | lt_save_MAGIC_CMD="$MAGIC_CMD" | |
2837 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
2838 | dnl $ac_dummy forces splitting on constant user-supplied paths. | |
2839 | dnl POSIX.2 word splitting is done only on the output of word expansions, | |
2840 | dnl not every word. This closes a longstanding sh security hole. | |
2841 | ac_dummy="m4_if([$2], , $PATH, [$2])" | |
2842 | for ac_dir in $ac_dummy; do | |
2843 | IFS="$lt_save_ifs" | |
2844 | test -z "$ac_dir" && ac_dir=. | |
2845 | if test -f $ac_dir/$1; then | |
2846 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" | |
2847 | if test -n "$file_magic_test_file"; then | |
2848 | case $deplibs_check_method in | |
2849 | "file_magic "*) | |
2850 | file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` | |
2851 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
2852 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | |
2853 | $EGREP "$file_magic_regex" > /dev/null; then | |
2854 | : | |
2855 | else | |
2856 | cat <<_LT_EOF 1>&2 | |
d9898ee8 | 2857 | |
8d138742 CE |
2858 | *** Warning: the command libtool uses to detect shared libraries, |
2859 | *** $file_magic_cmd, produces output that libtool cannot recognize. | |
2860 | *** The result is that libtool may fail to recognize shared libraries | |
2861 | *** as such. This will affect the creation of libtool libraries that | |
2862 | *** depend on shared libraries, but programs linked with such libtool | |
2863 | *** libraries will work regardless of this problem. Nevertheless, you | |
2864 | *** may want to report the problem to your system manager and/or to | |
2865 | *** bug-libtool@gnu.org | |
d9898ee8 | 2866 | |
8d138742 CE |
2867 | _LT_EOF |
2868 | fi ;; | |
2869 | esac | |
2870 | fi | |
2871 | break | |
2872 | fi | |
2873 | done | |
2874 | IFS="$lt_save_ifs" | |
2875 | MAGIC_CMD="$lt_save_MAGIC_CMD" | |
2876 | ;; | |
2877 | esac]) | |
2878 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
2879 | if test -n "$MAGIC_CMD"; then | |
2880 | AC_MSG_RESULT($MAGIC_CMD) | |
d9898ee8 | 2881 | else |
8d138742 | 2882 | AC_MSG_RESULT(no) |
d9898ee8 | 2883 | fi |
8d138742 CE |
2884 | _LT_DECL([], [MAGIC_CMD], [0], |
2885 | [Used to examine libraries when file_magic_cmd begins with "file"])dnl | |
2886 | ])# _LT_PATH_TOOL_PREFIX | |
d9898ee8 | 2887 | |
8d138742 CE |
2888 | # Old name: |
2889 | AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) | |
2890 | dnl aclocal-1.4 backwards compatibility: | |
2891 | dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) | |
d9898ee8 | 2892 | |
d9898ee8 | 2893 | |
8d138742 CE |
2894 | # _LT_PATH_MAGIC |
2895 | # -------------- | |
2896 | # find a file program which can recognize a shared library | |
2897 | m4_defun([_LT_PATH_MAGIC], | |
2898 | [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) | |
2899 | if test -z "$lt_cv_path_MAGIC_CMD"; then | |
2900 | if test -n "$ac_tool_prefix"; then | |
2901 | _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) | |
2902 | else | |
2903 | MAGIC_CMD=: | |
2904 | fi | |
2905 | fi | |
2906 | ])# _LT_PATH_MAGIC | |
d9898ee8 | 2907 | |
d9898ee8 | 2908 | |
8d138742 CE |
2909 | # LT_PATH_LD |
2910 | # ---------- | |
2911 | # find the pathname to the GNU or non-GNU linker | |
2912 | AC_DEFUN([LT_PATH_LD], | |
2913 | [AC_REQUIRE([AC_PROG_CC])dnl | |
2914 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
2915 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
2916 | m4_require([_LT_DECL_SED])dnl | |
2917 | m4_require([_LT_DECL_EGREP])dnl | |
d9898ee8 | 2918 | |
8d138742 CE |
2919 | AC_ARG_WITH([gnu-ld], |
2920 | [AS_HELP_STRING([--with-gnu-ld], | |
2921 | [assume the C compiler uses GNU ld @<:@default=no@:>@])], | |
2922 | [test "$withval" = no || with_gnu_ld=yes], | |
2923 | [with_gnu_ld=no])dnl | |
d9898ee8 | 2924 | |
8d138742 CE |
2925 | ac_prog=ld |
2926 | if test "$GCC" = yes; then | |
2927 | # Check if gcc -print-prog-name=ld gives a path. | |
2928 | AC_MSG_CHECKING([for ld used by $CC]) | |
2929 | case $host in | |
2930 | *-*-mingw*) | |
2931 | # gcc leaves a trailing carriage return which upsets mingw | |
2932 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
2933 | *) | |
2934 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
2935 | esac | |
2936 | case $ac_prog in | |
2937 | # Accept absolute paths. | |
2938 | [[\\/]]* | ?:[[\\/]]*) | |
2939 | re_direlt='/[[^/]][[^/]]*/\.\./' | |
2940 | # Canonicalize the pathname of ld | |
2941 | ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` | |
2942 | while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do | |
2943 | ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` | |
2944 | done | |
2945 | test -z "$LD" && LD="$ac_prog" | |
2946 | ;; | |
2947 | "") | |
2948 | # If it fails, then pretend we aren't using GCC. | |
2949 | ac_prog=ld | |
2950 | ;; | |
2951 | *) | |
2952 | # If it is relative, then search for the first ld in PATH. | |
2953 | with_gnu_ld=unknown | |
2954 | ;; | |
2955 | esac | |
2956 | elif test "$with_gnu_ld" = yes; then | |
2957 | AC_MSG_CHECKING([for GNU ld]) | |
d9898ee8 | 2958 | else |
8d138742 | 2959 | AC_MSG_CHECKING([for non-GNU ld]) |
d9898ee8 | 2960 | fi |
8d138742 CE |
2961 | AC_CACHE_VAL(lt_cv_path_LD, |
2962 | [if test -z "$LD"; then | |
2963 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
2964 | for ac_dir in $PATH; do | |
2965 | IFS="$lt_save_ifs" | |
2966 | test -z "$ac_dir" && ac_dir=. | |
2967 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
2968 | lt_cv_path_LD="$ac_dir/$ac_prog" | |
2969 | # Check to see if the program is GNU ld. I'd rather use --version, | |
2970 | # but apparently some variants of GNU ld only accept -v. | |
2971 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
2972 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | |
2973 | *GNU* | *'with BFD'*) | |
2974 | test "$with_gnu_ld" != no && break | |
2975 | ;; | |
2976 | *) | |
2977 | test "$with_gnu_ld" != yes && break | |
d9898ee8 | 2978 | ;; |
2979 | esac | |
d9898ee8 | 2980 | fi |
8d138742 CE |
2981 | done |
2982 | IFS="$lt_save_ifs" | |
2983 | else | |
2984 | lt_cv_path_LD="$LD" # Let the user override the test with a path. | |
2985 | fi]) | |
2986 | LD="$lt_cv_path_LD" | |
2987 | if test -n "$LD"; then | |
2988 | AC_MSG_RESULT($LD) | |
2989 | else | |
2990 | AC_MSG_RESULT(no) | |
2991 | fi | |
2992 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
2993 | _LT_PATH_LD_GNU | |
2994 | AC_SUBST([LD]) | |
d9898ee8 | 2995 | |
8d138742 CE |
2996 | _LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) |
2997 | ])# LT_PATH_LD | |
d9898ee8 | 2998 | |
8d138742 CE |
2999 | # Old names: |
3000 | AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) | |
3001 | AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) | |
3002 | dnl aclocal-1.4 backwards compatibility: | |
3003 | dnl AC_DEFUN([AM_PROG_LD], []) | |
3004 | dnl AC_DEFUN([AC_PROG_LD], []) | |
d9898ee8 | 3005 | |
d9898ee8 | 3006 | |
8d138742 CE |
3007 | # _LT_PATH_LD_GNU |
3008 | #- -------------- | |
3009 | m4_defun([_LT_PATH_LD_GNU], | |
3010 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, | |
3011 | [# I'd rather use --version here, but apparently some GNU lds only accept -v. | |
3012 | case `$LD -v 2>&1 </dev/null` in | |
3013 | *GNU* | *'with BFD'*) | |
3014 | lt_cv_prog_gnu_ld=yes | |
3015 | ;; | |
3016 | *) | |
3017 | lt_cv_prog_gnu_ld=no | |
3018 | ;; | |
3019 | esac]) | |
3020 | with_gnu_ld=$lt_cv_prog_gnu_ld | |
3021 | ])# _LT_PATH_LD_GNU | |
d9898ee8 | 3022 | |
8d138742 CE |
3023 | |
3024 | # _LT_CMD_RELOAD | |
3025 | # -------------- | |
3026 | # find reload flag for linker | |
3027 | # -- PORTME Some linkers may need a different reload flag. | |
3028 | m4_defun([_LT_CMD_RELOAD], | |
3029 | [AC_CACHE_CHECK([for $LD option to reload object files], | |
3030 | lt_cv_ld_reload_flag, | |
3031 | [lt_cv_ld_reload_flag='-r']) | |
3032 | reload_flag=$lt_cv_ld_reload_flag | |
3033 | case $reload_flag in | |
3034 | "" | " "*) ;; | |
3035 | *) reload_flag=" $reload_flag" ;; | |
3036 | esac | |
3037 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
3038 | case $host_os in | |
3039 | darwin*) | |
3040 | if test "$GCC" = yes; then | |
3041 | reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | |
d9898ee8 | 3042 | else |
8d138742 | 3043 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
d9898ee8 | 3044 | fi |
3045 | ;; | |
8d138742 CE |
3046 | esac |
3047 | _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl | |
3048 | _LT_DECL([], [reload_cmds], [2])dnl | |
3049 | ])# _LT_CMD_RELOAD | |
d9898ee8 | 3050 | |
d9898ee8 | 3051 | |
8d138742 CE |
3052 | # _LT_CHECK_MAGIC_METHOD |
3053 | # ---------------------- | |
3054 | # how to check for library dependencies | |
3055 | # -- PORTME fill in with the dynamic library characteristics | |
3056 | m4_defun([_LT_CHECK_MAGIC_METHOD], | |
3057 | [m4_require([_LT_DECL_EGREP]) | |
3058 | m4_require([_LT_DECL_OBJDUMP]) | |
3059 | AC_CACHE_CHECK([how to recognize dependent libraries], | |
3060 | lt_cv_deplibs_check_method, | |
3061 | [lt_cv_file_magic_cmd='$MAGIC_CMD' | |
3062 | lt_cv_file_magic_test_file= | |
3063 | lt_cv_deplibs_check_method='unknown' | |
3064 | # Need to set the preceding variable on all platforms that support | |
3065 | # interlibrary dependencies. | |
3066 | # 'none' -- dependencies not supported. | |
3067 | # `unknown' -- same as none, but documents that we really don't know. | |
3068 | # 'pass_all' -- all dependencies passed with no checks. | |
3069 | # 'test_compile' -- check by making test program. | |
3070 | # 'file_magic [[regex]]' -- check by looking for files in library path | |
3071 | # which responds to the $file_magic_cmd with a given extended regex. | |
3072 | # If you have `file' or equivalent on your system and you're not sure | |
3073 | # whether `pass_all' will *always* work, you probably want this one. | |
3074 | ||
3075 | case $host_os in | |
3076 | aix[[4-9]]*) | |
3077 | lt_cv_deplibs_check_method=pass_all | |
d9898ee8 | 3078 | ;; |
d9898ee8 | 3079 | |
8d138742 CE |
3080 | beos*) |
3081 | lt_cv_deplibs_check_method=pass_all | |
3082 | ;; | |
3083 | ||
3084 | bsdi[[45]]*) | |
3085 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' | |
3086 | lt_cv_file_magic_cmd='/usr/bin/file -L' | |
3087 | lt_cv_file_magic_test_file=/shlib/libc.so | |
3088 | ;; | |
3089 | ||
3090 | cygwin*) | |
3091 | # func_win32_libid is a shell function defined in ltmain.sh | |
3092 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | |
3093 | lt_cv_file_magic_cmd='func_win32_libid' | |
3094 | ;; | |
3095 | ||
3096 | mingw* | pw32*) | |
3097 | # Base MSYS/MinGW do not provide the 'file' command needed by | |
3098 | # func_win32_libid shell function, so use a weaker test based on 'objdump', | |
3099 | # unless we find 'file', for example because we are cross-compiling. | |
3100 | if ( file / ) >/dev/null 2>&1; then | |
3101 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | |
3102 | lt_cv_file_magic_cmd='func_win32_libid' | |
3103 | else | |
3104 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | |
3105 | lt_cv_file_magic_cmd='$OBJDUMP -f' | |
3106 | fi | |
3107 | ;; | |
3108 | ||
3109 | cegcc) | |
3110 | # use the weaker test based on 'objdump'. See mingw*. | |
3111 | lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' | |
3112 | lt_cv_file_magic_cmd='$OBJDUMP -f' | |
3113 | ;; | |
3114 | ||
3115 | darwin* | rhapsody*) | |
3116 | lt_cv_deplibs_check_method=pass_all | |
3117 | ;; | |
3118 | ||
3119 | freebsd* | dragonfly*) | |
3120 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | |
3121 | case $host_cpu in | |
3122 | i*86 ) | |
3123 | # Not sure whether the presence of OpenBSD here was a mistake. | |
3124 | # Let's accept both of them until this is cleared up. | |
3125 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' | |
3126 | lt_cv_file_magic_cmd=/usr/bin/file | |
3127 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | |
3128 | ;; | |
d9898ee8 | 3129 | esac |
8d138742 CE |
3130 | else |
3131 | lt_cv_deplibs_check_method=pass_all | |
3132 | fi | |
3133 | ;; | |
3134 | ||
3135 | gnu*) | |
3136 | lt_cv_deplibs_check_method=pass_all | |
3137 | ;; | |
3138 | ||
3139 | hpux10.20* | hpux11*) | |
3140 | lt_cv_file_magic_cmd=/usr/bin/file | |
3141 | case $host_cpu in | |
3142 | ia64*) | |
3143 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' | |
3144 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | |
d9898ee8 | 3145 | ;; |
8d138742 CE |
3146 | hppa*64*) |
3147 | [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] | |
3148 | lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl | |
d9898ee8 | 3149 | ;; |
8d138742 CE |
3150 | *) |
3151 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' | |
3152 | lt_cv_file_magic_test_file=/usr/lib/libc.sl | |
d9898ee8 | 3153 | ;; |
8d138742 CE |
3154 | esac |
3155 | ;; | |
d9898ee8 | 3156 | |
8d138742 CE |
3157 | interix[[3-9]]*) |
3158 | # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here | |
3159 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' | |
3160 | ;; | |
d9898ee8 | 3161 | |
8d138742 CE |
3162 | irix5* | irix6* | nonstopux*) |
3163 | case $LD in | |
3164 | *-32|*"-32 ") libmagic=32-bit;; | |
3165 | *-n32|*"-n32 ") libmagic=N32;; | |
3166 | *-64|*"-64 ") libmagic=64-bit;; | |
3167 | *) libmagic=never-match;; | |
3168 | esac | |
3169 | lt_cv_deplibs_check_method=pass_all | |
3170 | ;; | |
d9898ee8 | 3171 | |
8d138742 CE |
3172 | # This must be Linux ELF. |
3173 | linux* | k*bsd*-gnu) | |
3174 | lt_cv_deplibs_check_method=pass_all | |
3175 | ;; | |
d9898ee8 | 3176 | |
8d138742 CE |
3177 | netbsd*) |
3178 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | |
3179 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' | |
3180 | else | |
3181 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' | |
3182 | fi | |
3183 | ;; | |
d9898ee8 | 3184 | |
8d138742 CE |
3185 | newos6*) |
3186 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' | |
3187 | lt_cv_file_magic_cmd=/usr/bin/file | |
3188 | lt_cv_file_magic_test_file=/usr/lib/libnls.so | |
3189 | ;; | |
d9898ee8 | 3190 | |
8d138742 CE |
3191 | *nto* | *qnx*) |
3192 | lt_cv_deplibs_check_method=pass_all | |
3193 | ;; | |
d9898ee8 | 3194 | |
8d138742 CE |
3195 | openbsd*) |
3196 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
3197 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' | |
3198 | else | |
3199 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' | |
3200 | fi | |
3201 | ;; | |
d9898ee8 | 3202 | |
8d138742 CE |
3203 | osf3* | osf4* | osf5*) |
3204 | lt_cv_deplibs_check_method=pass_all | |
3205 | ;; | |
d9898ee8 | 3206 | |
8d138742 CE |
3207 | rdos*) |
3208 | lt_cv_deplibs_check_method=pass_all | |
3209 | ;; | |
d9898ee8 | 3210 | |
8d138742 CE |
3211 | solaris*) |
3212 | lt_cv_deplibs_check_method=pass_all | |
3213 | ;; | |
d9898ee8 | 3214 | |
8d138742 CE |
3215 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
3216 | lt_cv_deplibs_check_method=pass_all | |
3217 | ;; | |
d9898ee8 | 3218 | |
8d138742 CE |
3219 | sysv4 | sysv4.3*) |
3220 | case $host_vendor in | |
3221 | motorola) | |
3222 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' | |
3223 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | |
d9898ee8 | 3224 | ;; |
8d138742 CE |
3225 | ncr) |
3226 | lt_cv_deplibs_check_method=pass_all | |
d9898ee8 | 3227 | ;; |
8d138742 CE |
3228 | sequent) |
3229 | lt_cv_file_magic_cmd='/bin/file' | |
3230 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' | |
d9898ee8 | 3231 | ;; |
8d138742 CE |
3232 | sni) |
3233 | lt_cv_file_magic_cmd='/bin/file' | |
3234 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" | |
3235 | lt_cv_file_magic_test_file=/lib/libc.so | |
d9898ee8 | 3236 | ;; |
8d138742 CE |
3237 | siemens) |
3238 | lt_cv_deplibs_check_method=pass_all | |
d9898ee8 | 3239 | ;; |
8d138742 CE |
3240 | pc) |
3241 | lt_cv_deplibs_check_method=pass_all | |
d9898ee8 | 3242 | ;; |
8d138742 CE |
3243 | esac |
3244 | ;; | |
d9898ee8 | 3245 | |
8d138742 CE |
3246 | tpf*) |
3247 | lt_cv_deplibs_check_method=pass_all | |
3248 | ;; | |
3249 | esac | |
3250 | ]) | |
3251 | file_magic_cmd=$lt_cv_file_magic_cmd | |
3252 | deplibs_check_method=$lt_cv_deplibs_check_method | |
3253 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | |
d9898ee8 | 3254 | |
8d138742 CE |
3255 | _LT_DECL([], [deplibs_check_method], [1], |
3256 | [Method to check whether dependent libraries are shared objects]) | |
3257 | _LT_DECL([], [file_magic_cmd], [1], | |
3258 | [Command to use when deplibs_check_method == "file_magic"]) | |
3259 | ])# _LT_CHECK_MAGIC_METHOD | |
d9898ee8 | 3260 | |
d9898ee8 | 3261 | |
8d138742 CE |
3262 | # LT_PATH_NM |
3263 | # ---------- | |
3264 | # find the pathname to a BSD- or MS-compatible name lister | |
3265 | AC_DEFUN([LT_PATH_NM], | |
3266 | [AC_REQUIRE([AC_PROG_CC])dnl | |
3267 | AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, | |
3268 | [if test -n "$NM"; then | |
3269 | # Let the user override the test. | |
3270 | lt_cv_path_NM="$NM" | |
3271 | else | |
3272 | lt_nm_to_check="${ac_tool_prefix}nm" | |
3273 | if test -n "$ac_tool_prefix" && test "$build" = "$host"; then | |
3274 | lt_nm_to_check="$lt_nm_to_check nm" | |
3275 | fi | |
3276 | for lt_tmp_nm in $lt_nm_to_check; do | |
3277 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
3278 | for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do | |
3279 | IFS="$lt_save_ifs" | |
3280 | test -z "$ac_dir" && ac_dir=. | |
3281 | tmp_nm="$ac_dir/$lt_tmp_nm" | |
3282 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then | |
3283 | # Check to see if the nm accepts a BSD-compat flag. | |
3284 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
3285 | # nm: unknown option "B" ignored | |
3286 | # Tru64's nm complains that /dev/null is an invalid object file | |
3287 | case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in | |
3288 | */dev/null* | *'Invalid file or object type'*) | |
3289 | lt_cv_path_NM="$tmp_nm -B" | |
3290 | break | |
3291 | ;; | |
3292 | *) | |
3293 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | |
3294 | */dev/null*) | |
3295 | lt_cv_path_NM="$tmp_nm -p" | |
3296 | break | |
3297 | ;; | |
3298 | *) | |
3299 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but | |
3300 | continue # so that we can try to find one that supports BSD flags | |
3301 | ;; | |
3302 | esac | |
3303 | ;; | |
3304 | esac | |
3305 | fi | |
3306 | done | |
3307 | IFS="$lt_save_ifs" | |
d9898ee8 | 3308 | done |
8d138742 CE |
3309 | : ${lt_cv_path_NM=no} |
3310 | fi]) | |
3311 | if test "$lt_cv_path_NM" != "no"; then | |
3312 | NM="$lt_cv_path_NM" | |
d9898ee8 | 3313 | else |
8d138742 CE |
3314 | # Didn't find any BSD compatible name lister, look for dumpbin. |
3315 | AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) | |
3316 | AC_SUBST([DUMPBIN]) | |
3317 | if test "$DUMPBIN" != ":"; then | |
3318 | NM="$DUMPBIN" | |
3319 | fi | |
d9898ee8 | 3320 | fi |
8d138742 CE |
3321 | test -z "$NM" && NM=nm |
3322 | AC_SUBST([NM]) | |
3323 | _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl | |
3324 | ||
3325 | AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], | |
3326 | [lt_cv_nm_interface="BSD nm" | |
3327 | echo "int some_variable = 0;" > conftest.$ac_ext | |
3328 | (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) | |
3329 | (eval "$ac_compile" 2>conftest.err) | |
3330 | cat conftest.err >&AS_MESSAGE_LOG_FD | |
3331 | (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) | |
3332 | (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) | |
3333 | cat conftest.err >&AS_MESSAGE_LOG_FD | |
3334 | (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) | |
3335 | cat conftest.out >&AS_MESSAGE_LOG_FD | |
3336 | if $GREP 'External.*some_variable' conftest.out > /dev/null; then | |
3337 | lt_cv_nm_interface="MS dumpbin" | |
3338 | fi | |
3339 | rm -f conftest*]) | |
3340 | ])# LT_PATH_NM | |
d9898ee8 | 3341 | |
8d138742 CE |
3342 | # Old names: |
3343 | AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) | |
3344 | AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) | |
3345 | dnl aclocal-1.4 backwards compatibility: | |
3346 | dnl AC_DEFUN([AM_PROG_NM], []) | |
3347 | dnl AC_DEFUN([AC_PROG_NM], []) | |
d9898ee8 | 3348 | |
d9898ee8 | 3349 | |
8d138742 CE |
3350 | # LT_LIB_M |
3351 | # -------- | |
3352 | # check for math library | |
3353 | AC_DEFUN([LT_LIB_M], | |
3354 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
3355 | LIBM= | |
3356 | case $host in | |
3357 | *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) | |
3358 | # These system don't have libm, or don't need it | |
ac40fd9e | 3359 | ;; |
8d138742 CE |
3360 | *-ncr-sysv4.3*) |
3361 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") | |
3362 | AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") | |
3363 | ;; | |
3364 | *) | |
3365 | AC_CHECK_LIB(m, cos, LIBM="-lm") | |
d9898ee8 | 3366 | ;; |
3367 | esac | |
8d138742 CE |
3368 | AC_SUBST([LIBM]) |
3369 | ])# LT_LIB_M | |
d9898ee8 | 3370 | |
8d138742 CE |
3371 | # Old name: |
3372 | AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) | |
3373 | dnl aclocal-1.4 backwards compatibility: | |
3374 | dnl AC_DEFUN([AC_CHECK_LIBM], []) | |
d9898ee8 | 3375 | |
d9898ee8 | 3376 | |
8d138742 CE |
3377 | # _LT_COMPILER_NO_RTTI([TAGNAME]) |
3378 | # ------------------------------- | |
3379 | m4_defun([_LT_COMPILER_NO_RTTI], | |
3380 | [m4_require([_LT_TAG_COMPILER])dnl | |
d9898ee8 | 3381 | |
8d138742 | 3382 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
d9898ee8 | 3383 | |
8d138742 CE |
3384 | if test "$GCC" = yes; then |
3385 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' | |
d9898ee8 | 3386 | |
8d138742 CE |
3387 | _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], |
3388 | lt_cv_prog_compiler_rtti_exceptions, | |
3389 | [-fno-rtti -fno-exceptions], [], | |
3390 | [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) | |
3391 | fi | |
3392 | _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], | |
3393 | [Compiler flag to turn off builtin functions]) | |
3394 | ])# _LT_COMPILER_NO_RTTI | |
d9898ee8 | 3395 | |
d9898ee8 | 3396 | |
8d138742 CE |
3397 | # _LT_CMD_GLOBAL_SYMBOLS |
3398 | # ---------------------- | |
3399 | m4_defun([_LT_CMD_GLOBAL_SYMBOLS], | |
3400 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
3401 | AC_REQUIRE([AC_PROG_CC])dnl | |
3402 | AC_REQUIRE([LT_PATH_NM])dnl | |
3403 | AC_REQUIRE([LT_PATH_LD])dnl | |
3404 | m4_require([_LT_DECL_SED])dnl | |
3405 | m4_require([_LT_DECL_EGREP])dnl | |
3406 | m4_require([_LT_TAG_COMPILER])dnl | |
d9898ee8 | 3407 | |
8d138742 CE |
3408 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
3409 | AC_MSG_CHECKING([command to parse $NM output from $compiler object]) | |
3410 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], | |
3411 | [ | |
3412 | # These are sane defaults that work on at least a few old systems. | |
3413 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] | |
d9898ee8 | 3414 | |
8d138742 CE |
3415 | # Character class describing NM global symbol codes. |
3416 | symcode='[[BCDEGRST]]' | |
d9898ee8 | 3417 | |
8d138742 CE |
3418 | # Regexp to match symbols that can be accessed directly from C. |
3419 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' | |
d9898ee8 | 3420 | |
8d138742 | 3421 | # Define system-specific variables. |
d9898ee8 | 3422 | case $host_os in |
8d138742 CE |
3423 | aix*) |
3424 | symcode='[[BCDT]]' | |
d9898ee8 | 3425 | ;; |
8d138742 CE |
3426 | cygwin* | mingw* | pw32* | cegcc*) |
3427 | symcode='[[ABCDGISTW]]' | |
3428 | ;; | |
3429 | hpux*) | |
3430 | if test "$host_cpu" = ia64; then | |
3431 | symcode='[[ABCDEGRST]]' | |
d9898ee8 | 3432 | fi |
3433 | ;; | |
8d138742 CE |
3434 | irix* | nonstopux*) |
3435 | symcode='[[BCDEGRST]]' | |
3436 | ;; | |
3437 | osf*) | |
3438 | symcode='[[BCDEGQRST]]' | |
3439 | ;; | |
3440 | solaris*) | |
3441 | symcode='[[BDRT]]' | |
3442 | ;; | |
3443 | sco3.2v5*) | |
3444 | symcode='[[DT]]' | |
3445 | ;; | |
3446 | sysv4.2uw2*) | |
3447 | symcode='[[DT]]' | |
3448 | ;; | |
3449 | sysv5* | sco5v6* | unixware* | OpenUNIX*) | |
3450 | symcode='[[ABDT]]' | |
3451 | ;; | |
3452 | sysv4) | |
3453 | symcode='[[DFNSTU]]' | |
3454 | ;; | |
3455 | esac | |
d9898ee8 | 3456 | |
8d138742 CE |
3457 | # If we're using GNU nm, then use its standard symbol codes. |
3458 | case `$NM -V 2>&1` in | |
3459 | *GNU* | *'with BFD'*) | |
3460 | symcode='[[ABCDGIRSTW]]' ;; | |
3461 | esac | |
d9898ee8 | 3462 | |
8d138742 CE |
3463 | # Transform an extracted symbol line into a proper C declaration. |
3464 | # Some systems (esp. on ia64) link data and code symbols differently, | |
3465 | # so use this general approach. | |
3466 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | |
d9898ee8 | 3467 | |
8d138742 CE |
3468 | # Transform an extracted symbol line into symbol name and symbol address |
3469 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" | |
3470 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" | |
d9898ee8 | 3471 | |
8d138742 CE |
3472 | # Handle CRLF in mingw tool chain |
3473 | opt_cr= | |
3474 | case $build_os in | |
3475 | mingw*) | |
3476 | opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp | |
3477 | ;; | |
3478 | esac | |
d9898ee8 | 3479 | |
8d138742 CE |
3480 | # Try without a prefix underscore, then with it. |
3481 | for ac_symprfx in "" "_"; do | |
d9898ee8 | 3482 | |
8d138742 CE |
3483 | # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. |
3484 | symxfrm="\\1 $ac_symprfx\\2 \\2" | |
d9898ee8 | 3485 | |
8d138742 CE |
3486 | # Write the raw and C identifiers. |
3487 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then | |
3488 | # Fake it for dumpbin and say T for any non-static function | |
3489 | # and D for any global variable. | |
3490 | # Also find C++ and __fastcall symbols from MSVC++, | |
3491 | # which start with @ or ?. | |
3492 | lt_cv_sys_global_symbol_pipe="$AWK ['"\ | |
3493 | " {last_section=section; section=\$ 3};"\ | |
3494 | " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ | |
3495 | " \$ 0!~/External *\|/{next};"\ | |
3496 | " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ | |
3497 | " {if(hide[section]) next};"\ | |
3498 | " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ | |
3499 | " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ | |
3500 | " s[1]~/^[@?]/{print s[1], s[1]; next};"\ | |
3501 | " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ | |
3502 | " ' prfx=^$ac_symprfx]" | |
3503 | else | |
3504 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | |
3505 | fi | |
d9898ee8 | 3506 | |
8d138742 CE |
3507 | # Check to see that the pipe works correctly. |
3508 | pipe_works=no | |
d9898ee8 | 3509 | |
8d138742 CE |
3510 | rm -f conftest* |
3511 | cat > conftest.$ac_ext <<_LT_EOF | |
3512 | #ifdef __cplusplus | |
3513 | extern "C" { | |
3514 | #endif | |
3515 | char nm_test_var; | |
3516 | void nm_test_func(void); | |
3517 | void nm_test_func(void){} | |
3518 | #ifdef __cplusplus | |
3519 | } | |
3520 | #endif | |
3521 | int main(){nm_test_var='a';nm_test_func();return(0);} | |
3522 | _LT_EOF | |
d9898ee8 | 3523 | |
8d138742 CE |
3524 | if AC_TRY_EVAL(ac_compile); then |
3525 | # Now try to grab the symbols. | |
3526 | nlist=conftest.nm | |
3527 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then | |
3528 | # Try sorting and uniquifying the output. | |
3529 | if sort "$nlist" | uniq > "$nlist"T; then | |
3530 | mv -f "$nlist"T "$nlist" | |
3531 | else | |
3532 | rm -f "$nlist"T | |
3533 | fi | |
d9898ee8 | 3534 | |
8d138742 CE |
3535 | # Make sure that we snagged all the symbols we need. |
3536 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | |
3537 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | |
3538 | cat <<_LT_EOF > conftest.$ac_ext | |
3539 | #ifdef __cplusplus | |
3540 | extern "C" { | |
3541 | #endif | |
d9898ee8 | 3542 | |
8d138742 CE |
3543 | _LT_EOF |
3544 | # Now generate the symbol file. | |
3545 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' | |
d9898ee8 | 3546 | |
8d138742 | 3547 | cat <<_LT_EOF >> conftest.$ac_ext |
d9898ee8 | 3548 | |
8d138742 CE |
3549 | /* The mapping between symbol names and symbols. */ |
3550 | const struct { | |
3551 | const char *name; | |
3552 | void *address; | |
3553 | } | |
3554 | lt__PROGRAM__LTX_preloaded_symbols[[]] = | |
3555 | { | |
3556 | { "@PROGRAM@", (void *) 0 }, | |
3557 | _LT_EOF | |
3558 | $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext | |
3559 | cat <<\_LT_EOF >> conftest.$ac_ext | |
3560 | {0, (void *) 0} | |
3561 | }; | |
d9898ee8 | 3562 | |
8d138742 CE |
3563 | /* This works around a problem in FreeBSD linker */ |
3564 | #ifdef FREEBSD_WORKAROUND | |
3565 | static const void *lt_preloaded_setup() { | |
3566 | return lt__PROGRAM__LTX_preloaded_symbols; | |
3567 | } | |
3568 | #endif | |
d9898ee8 | 3569 | |
8d138742 CE |
3570 | #ifdef __cplusplus |
3571 | } | |
3572 | #endif | |
3573 | _LT_EOF | |
3574 | # Now try linking the two files. | |
3575 | mv conftest.$ac_objext conftstm.$ac_objext | |
3576 | lt_save_LIBS="$LIBS" | |
3577 | lt_save_CFLAGS="$CFLAGS" | |
3578 | LIBS="conftstm.$ac_objext" | |
3579 | CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" | |
3580 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then | |
3581 | pipe_works=yes | |
3582 | fi | |
3583 | LIBS="$lt_save_LIBS" | |
3584 | CFLAGS="$lt_save_CFLAGS" | |
3585 | else | |
3586 | echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD | |
3587 | fi | |
3588 | else | |
3589 | echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD | |
3590 | fi | |
3591 | else | |
3592 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD | |
3593 | fi | |
3594 | else | |
3595 | echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD | |
3596 | cat conftest.$ac_ext >&5 | |
3597 | fi | |
3598 | rm -rf conftest* conftst* | |
d9898ee8 | 3599 | |
8d138742 CE |
3600 | # Do not use the global_symbol_pipe unless it works. |
3601 | if test "$pipe_works" = yes; then | |
3602 | break | |
3603 | else | |
3604 | lt_cv_sys_global_symbol_pipe= | |
3605 | fi | |
3606 | done | |
3607 | ]) | |
3608 | if test -z "$lt_cv_sys_global_symbol_pipe"; then | |
3609 | lt_cv_sys_global_symbol_to_cdecl= | |
3610 | fi | |
3611 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then | |
3612 | AC_MSG_RESULT(failed) | |
3613 | else | |
3614 | AC_MSG_RESULT(ok) | |
3615 | fi | |
d9898ee8 | 3616 | |
8d138742 CE |
3617 | _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], |
3618 | [Take the output of nm and produce a listing of raw symbols and C names]) | |
3619 | _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], | |
3620 | [Transform the output of nm in a proper C declaration]) | |
3621 | _LT_DECL([global_symbol_to_c_name_address], | |
3622 | [lt_cv_sys_global_symbol_to_c_name_address], [1], | |
3623 | [Transform the output of nm in a C name address pair]) | |
3624 | _LT_DECL([global_symbol_to_c_name_address_lib_prefix], | |
3625 | [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], | |
3626 | [Transform the output of nm in a C name address pair when lib prefix is needed]) | |
3627 | ]) # _LT_CMD_GLOBAL_SYMBOLS | |
d9898ee8 | 3628 | |
d9898ee8 | 3629 | |
8d138742 CE |
3630 | # _LT_COMPILER_PIC([TAGNAME]) |
3631 | # --------------------------- | |
3632 | m4_defun([_LT_COMPILER_PIC], | |
3633 | [m4_require([_LT_TAG_COMPILER])dnl | |
3634 | _LT_TAGVAR(lt_prog_compiler_wl, $1)= | |
3635 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
3636 | _LT_TAGVAR(lt_prog_compiler_static, $1)= | |
d9898ee8 | 3637 | |
8d138742 CE |
3638 | AC_MSG_CHECKING([for $compiler option to produce PIC]) |
3639 | m4_if([$1], [CXX], [ | |
3640 | # C++ specific cases for pic, static, wl, etc. | |
3641 | if test "$GXX" = yes; then | |
3642 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3643 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
d9898ee8 | 3644 | |
8d138742 CE |
3645 | case $host_os in |
3646 | aix*) | |
3647 | # All AIX code is PIC. | |
3648 | if test "$host_cpu" = ia64; then | |
3649 | # AIX 5 now supports IA64 processor | |
3650 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
3651 | fi | |
3652 | ;; | |
d9898ee8 | 3653 | |
8d138742 CE |
3654 | amigaos*) |
3655 | case $host_cpu in | |
3656 | powerpc) | |
3657 | # see comment about AmigaOS4 .so support | |
3658 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
3659 | ;; | |
3660 | m68k) | |
3661 | # FIXME: we need at least 68020 code to build shared libraries, but | |
3662 | # adding the `-m68020' flag to GCC prevents building anything better, | |
3663 | # like `-m68040'. | |
3664 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | |
3665 | ;; | |
3666 | esac | |
3667 | ;; | |
d9898ee8 | 3668 | |
8d138742 CE |
3669 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
3670 | # PIC is the default for these OSes. | |
3671 | ;; | |
3672 | mingw* | cygwin* | os2* | pw32* | cegcc*) | |
3673 | # This hack is so that the source file can tell whether it is being | |
3674 | # built for inclusion in a dll (and should export symbols for example). | |
3675 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | |
3676 | # (--disable-auto-import) libraries | |
3677 | m4_if([$1], [GCJ], [], | |
3678 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | |
3679 | ;; | |
3680 | darwin* | rhapsody*) | |
3681 | # PIC is the default on this platform | |
3682 | # Common symbols not allowed in MH_DYLIB files | |
3683 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | |
3684 | ;; | |
3685 | *djgpp*) | |
3686 | # DJGPP does not support shared libraries at all | |
3687 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
3688 | ;; | |
3689 | interix[[3-9]]*) | |
3690 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. | |
3691 | # Instead, we relocate shared libraries at runtime. | |
3692 | ;; | |
3693 | sysv4*MP*) | |
3694 | if test -d /usr/nec; then | |
3695 | _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | |
3696 | fi | |
3697 | ;; | |
3698 | hpux*) | |
3699 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | |
3700 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | |
3701 | # sets the default TLS model and affects inlining. | |
3702 | case $host_cpu in | |
3703 | hppa*64*) | |
3704 | ;; | |
3705 | *) | |
3706 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
3707 | ;; | |
3708 | esac | |
3709 | ;; | |
3710 | *qnx* | *nto*) | |
3711 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
3712 | # it will coredump. | |
3713 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | |
d9898ee8 | 3714 | ;; |
3715 | *) | |
8d138742 | 3716 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
d9898ee8 | 3717 | ;; |
3718 | esac | |
8d138742 CE |
3719 | else |
3720 | case $host_os in | |
3721 | aix[[4-9]]*) | |
3722 | # All AIX code is PIC. | |
3723 | if test "$host_cpu" = ia64; then | |
3724 | # AIX 5 now supports IA64 processor | |
3725 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
3726 | else | |
3727 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | |
3728 | fi | |
3729 | ;; | |
3730 | chorus*) | |
3731 | case $cc_basename in | |
3732 | cxch68*) | |
3733 | # Green Hills C++ Compiler | |
3734 | # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" | |
3735 | ;; | |
3736 | esac | |
3737 | ;; | |
3738 | dgux*) | |
3739 | case $cc_basename in | |
3740 | ec++*) | |
3741 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
3742 | ;; | |
3743 | ghcx*) | |
3744 | # Green Hills C++ Compiler | |
3745 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
3746 | ;; | |
3747 | *) | |
3748 | ;; | |
3749 | esac | |
3750 | ;; | |
3751 | freebsd* | dragonfly*) | |
3752 | # FreeBSD uses GNU C++ | |
3753 | ;; | |
3754 | hpux9* | hpux10* | hpux11*) | |
3755 | case $cc_basename in | |
3756 | CC*) | |
3757 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3758 | _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | |
3759 | if test "$host_cpu" != ia64; then | |
3760 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
3761 | fi | |
3762 | ;; | |
3763 | aCC*) | |
3764 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3765 | _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | |
3766 | case $host_cpu in | |
3767 | hppa*64*|ia64*) | |
3768 | # +Z the default | |
3769 | ;; | |
3770 | *) | |
3771 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
3772 | ;; | |
3773 | esac | |
3774 | ;; | |
3775 | *) | |
3776 | ;; | |
3777 | esac | |
3778 | ;; | |
3779 | interix*) | |
3780 | # This is c89, which is MS Visual C++ (no shared libs) | |
3781 | # Anyone wants to do a port? | |
3782 | ;; | |
3783 | irix5* | irix6* | nonstopux*) | |
3784 | case $cc_basename in | |
3785 | CC*) | |
3786 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3787 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
3788 | # CC pic flag -KPIC is the default. | |
3789 | ;; | |
3790 | *) | |
3791 | ;; | |
3792 | esac | |
3793 | ;; | |
3794 | linux* | k*bsd*-gnu) | |
3795 | case $cc_basename in | |
3796 | KCC*) | |
3797 | # KAI C++ Compiler | |
3798 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | |
3799 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
3800 | ;; | |
3801 | ecpc* ) | |
3802 | # old Intel C++ for x86_64 which still supported -KPIC. | |
3803 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3804 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
3805 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
3806 | ;; | |
3807 | icpc* ) | |
3808 | # Intel C++, used to be incompatible with GCC. | |
3809 | # ICC 10 doesn't accept -KPIC any more. | |
3810 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3811 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
3812 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
3813 | ;; | |
3814 | pgCC* | pgcpp*) | |
3815 | # Portland Group C++ compiler | |
3816 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3817 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | |
3818 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
3819 | ;; | |
3820 | cxx*) | |
3821 | # Compaq C++ | |
3822 | # Make sure the PIC flag is empty. It appears that all Alpha | |
3823 | # Linux and Compaq Tru64 Unix objects are PIC. | |
3824 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
3825 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
3826 | ;; | |
3827 | xlc* | xlC*) | |
3828 | # IBM XL 8.0 on PPC | |
3829 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3830 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' | |
3831 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' | |
3832 | ;; | |
3833 | *) | |
3834 | case `$CC -V 2>&1 | sed 5q` in | |
3835 | *Sun\ C*) | |
3836 | # Sun C++ 5.9 | |
3837 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
3838 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
3839 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
3840 | ;; | |
3841 | esac | |
3842 | ;; | |
3843 | esac | |
3844 | ;; | |
3845 | lynxos*) | |
3846 | ;; | |
3847 | m88k*) | |
3848 | ;; | |
3849 | mvs*) | |
3850 | case $cc_basename in | |
3851 | cxx*) | |
3852 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' | |
3853 | ;; | |
3854 | *) | |
3855 | ;; | |
3856 | esac | |
3857 | ;; | |
3858 | netbsd*) | |
3859 | ;; | |
3860 | *qnx* | *nto*) | |
3861 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
3862 | # it will coredump. | |
3863 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | |
3864 | ;; | |
3865 | osf3* | osf4* | osf5*) | |
3866 | case $cc_basename in | |
3867 | KCC*) | |
3868 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | |
3869 | ;; | |
3870 | RCC*) | |
3871 | # Rational C++ 2.4.1 | |
3872 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
3873 | ;; | |
3874 | cxx*) | |
3875 | # Digital/Compaq C++ | |
3876 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3877 | # Make sure the PIC flag is empty. It appears that all Alpha | |
3878 | # Linux and Compaq Tru64 Unix objects are PIC. | |
3879 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
3880 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
3881 | ;; | |
3882 | *) | |
3883 | ;; | |
3884 | esac | |
3885 | ;; | |
3886 | psos*) | |
3887 | ;; | |
3888 | solaris*) | |
3889 | case $cc_basename in | |
3890 | CC*) | |
3891 | # Sun C++ 4.2, 5.x and Centerline C++ | |
3892 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
3893 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
3894 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
3895 | ;; | |
3896 | gcx*) | |
3897 | # Green Hills C++ Compiler | |
3898 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | |
3899 | ;; | |
3900 | *) | |
3901 | ;; | |
3902 | esac | |
3903 | ;; | |
3904 | sunos4*) | |
3905 | case $cc_basename in | |
3906 | CC*) | |
3907 | # Sun C++ 4.x | |
3908 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
3909 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
3910 | ;; | |
3911 | lcc*) | |
3912 | # Lucid | |
3913 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
3914 | ;; | |
3915 | *) | |
3916 | ;; | |
3917 | esac | |
3918 | ;; | |
3919 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) | |
3920 | case $cc_basename in | |
3921 | CC*) | |
3922 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3923 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
3924 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
3925 | ;; | |
3926 | esac | |
3927 | ;; | |
3928 | tandem*) | |
3929 | case $cc_basename in | |
3930 | NCC*) | |
3931 | # NonStop-UX NCC 3.20 | |
3932 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
3933 | ;; | |
3934 | *) | |
3935 | ;; | |
3936 | esac | |
3937 | ;; | |
3938 | vxworks*) | |
3939 | ;; | |
3940 | *) | |
3941 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
3942 | ;; | |
3943 | esac | |
3944 | fi | |
3945 | ], | |
3946 | [ | |
3947 | if test "$GCC" = yes; then | |
3948 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3949 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
d9898ee8 | 3950 | |
8d138742 CE |
3951 | case $host_os in |
3952 | aix*) | |
3953 | # All AIX code is PIC. | |
3954 | if test "$host_cpu" = ia64; then | |
3955 | # AIX 5 now supports IA64 processor | |
3956 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
3957 | fi | |
3958 | ;; | |
d9898ee8 | 3959 | |
8d138742 CE |
3960 | amigaos*) |
3961 | case $host_cpu in | |
3962 | powerpc) | |
3963 | # see comment about AmigaOS4 .so support | |
3964 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
3965 | ;; | |
3966 | m68k) | |
3967 | # FIXME: we need at least 68020 code to build shared libraries, but | |
3968 | # adding the `-m68020' flag to GCC prevents building anything better, | |
3969 | # like `-m68040'. | |
3970 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | |
3971 | ;; | |
3972 | esac | |
3973 | ;; | |
d9898ee8 | 3974 | |
8d138742 CE |
3975 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
3976 | # PIC is the default for these OSes. | |
3977 | ;; | |
d9898ee8 | 3978 | |
8d138742 CE |
3979 | mingw* | cygwin* | pw32* | os2* | cegcc*) |
3980 | # This hack is so that the source file can tell whether it is being | |
3981 | # built for inclusion in a dll (and should export symbols for example). | |
3982 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | |
3983 | # (--disable-auto-import) libraries | |
3984 | m4_if([$1], [GCJ], [], | |
3985 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | |
3986 | ;; | |
d9898ee8 | 3987 | |
8d138742 CE |
3988 | darwin* | rhapsody*) |
3989 | # PIC is the default on this platform | |
3990 | # Common symbols not allowed in MH_DYLIB files | |
3991 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | |
3992 | ;; | |
d9898ee8 | 3993 | |
8d138742 CE |
3994 | hpux*) |
3995 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | |
3996 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | |
3997 | # sets the default TLS model and affects inlining. | |
3998 | case $host_cpu in | |
3999 | hppa*64*) | |
4000 | # +Z the default | |
4001 | ;; | |
4002 | *) | |
4003 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4004 | ;; | |
4005 | esac | |
4006 | ;; | |
d9898ee8 | 4007 | |
8d138742 CE |
4008 | interix[[3-9]]*) |
4009 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. | |
4010 | # Instead, we relocate shared libraries at runtime. | |
4011 | ;; | |
d9898ee8 | 4012 | |
8d138742 CE |
4013 | msdosdjgpp*) |
4014 | # Just because we use GCC doesn't mean we suddenly get shared libraries | |
4015 | # on systems that don't support them. | |
4016 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
4017 | enable_shared=no | |
4018 | ;; | |
d9898ee8 | 4019 | |
8d138742 CE |
4020 | *nto* | *qnx*) |
4021 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
4022 | # it will coredump. | |
4023 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | |
4024 | ;; | |
d9898ee8 | 4025 | |
8d138742 CE |
4026 | sysv4*MP*) |
4027 | if test -d /usr/nec; then | |
4028 | _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | |
4029 | fi | |
4030 | ;; | |
d9898ee8 | 4031 | |
8d138742 CE |
4032 | *) |
4033 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4034 | ;; | |
4035 | esac | |
4036 | else | |
4037 | # PORTME Check for flag to pass linker flags through the system compiler. | |
4038 | case $host_os in | |
4039 | aix*) | |
4040 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4041 | if test "$host_cpu" = ia64; then | |
4042 | # AIX 5 now supports IA64 processor | |
4043 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4044 | else | |
4045 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | |
4046 | fi | |
4047 | ;; | |
d9898ee8 | 4048 | |
8d138742 CE |
4049 | mingw* | cygwin* | pw32* | os2* | cegcc*) |
4050 | # This hack is so that the source file can tell whether it is being | |
4051 | # built for inclusion in a dll (and should export symbols for example). | |
4052 | m4_if([$1], [GCJ], [], | |
4053 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | |
4054 | ;; | |
d9898ee8 | 4055 | |
8d138742 CE |
4056 | hpux9* | hpux10* | hpux11*) |
4057 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4058 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | |
4059 | # not for PA HP-UX. | |
4060 | case $host_cpu in | |
4061 | hppa*64*|ia64*) | |
4062 | # +Z the default | |
4063 | ;; | |
4064 | *) | |
4065 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
4066 | ;; | |
4067 | esac | |
4068 | # Is there a better lt_prog_compiler_static that works with the bundled CC? | |
4069 | _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | |
4070 | ;; | |
d9898ee8 | 4071 | |
8d138742 CE |
4072 | irix5* | irix6* | nonstopux*) |
4073 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4074 | # PIC (with -KPIC) is the default. | |
4075 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4076 | ;; | |
d9898ee8 | 4077 | |
8d138742 CE |
4078 | linux* | k*bsd*-gnu) |
4079 | case $cc_basename in | |
4080 | # old Intel for x86_64 which still supported -KPIC. | |
4081 | ecc*) | |
4082 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4083 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4084 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
4085 | ;; | |
4086 | # icc used to be incompatible with GCC. | |
4087 | # ICC 10 doesn't accept -KPIC any more. | |
4088 | icc* | ifort*) | |
4089 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4090 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4091 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
4092 | ;; | |
4093 | # Lahey Fortran 8.1. | |
4094 | lf95*) | |
4095 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4096 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' | |
4097 | _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' | |
4098 | ;; | |
4099 | pgcc* | pgf77* | pgf90* | pgf95*) | |
4100 | # Portland Group compilers (*not* the Pentium gcc compiler, | |
4101 | # which looks to be a dead project) | |
4102 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4103 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | |
4104 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4105 | ;; | |
4106 | ccc*) | |
4107 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4108 | # All Alpha code is PIC. | |
4109 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4110 | ;; | |
4111 | xl*) | |
4112 | # IBM XL C 8.0/Fortran 10.1 on PPC | |
4113 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4114 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' | |
4115 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' | |
4116 | ;; | |
4117 | *) | |
4118 | case `$CC -V 2>&1 | sed 5q` in | |
4119 | *Sun\ C*) | |
4120 | # Sun C 5.9 | |
4121 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4122 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4123 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4124 | ;; | |
4125 | *Sun\ F*) | |
4126 | # Sun Fortran 8.3 passes all unrecognized flags to the linker | |
4127 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4128 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4129 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='' | |
4130 | ;; | |
4131 | esac | |
4132 | ;; | |
4133 | esac | |
4134 | ;; | |
d9898ee8 | 4135 | |
8d138742 CE |
4136 | newsos6) |
4137 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4138 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4139 | ;; | |
d9898ee8 | 4140 | |
8d138742 CE |
4141 | *nto* | *qnx*) |
4142 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
4143 | # it will coredump. | |
4144 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | |
4145 | ;; | |
d9898ee8 | 4146 | |
8d138742 CE |
4147 | osf3* | osf4* | osf5*) |
4148 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4149 | # All OSF/1 code is PIC. | |
4150 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4151 | ;; | |
d9898ee8 | 4152 | |
8d138742 CE |
4153 | rdos*) |
4154 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4155 | ;; | |
d9898ee8 | 4156 | |
8d138742 CE |
4157 | solaris*) |
4158 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4159 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4160 | case $cc_basename in | |
4161 | f77* | f90* | f95*) | |
4162 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; | |
4163 | *) | |
4164 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; | |
4165 | esac | |
4166 | ;; | |
d9898ee8 | 4167 | |
8d138742 CE |
4168 | sunos4*) |
4169 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
4170 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | |
4171 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4172 | ;; | |
d9898ee8 | 4173 | |
8d138742 CE |
4174 | sysv4 | sysv4.2uw2* | sysv4.3*) |
4175 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4176 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4177 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4178 | ;; | |
d9898ee8 | 4179 | |
8d138742 CE |
4180 | sysv4*MP*) |
4181 | if test -d /usr/nec ;then | |
4182 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' | |
4183 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4184 | fi | |
4185 | ;; | |
d9898ee8 | 4186 | |
8d138742 CE |
4187 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) |
4188 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4189 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4190 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4191 | ;; | |
d9898ee8 | 4192 | |
8d138742 CE |
4193 | unicos*) |
4194 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4195 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
4196 | ;; | |
d9898ee8 | 4197 | |
8d138742 CE |
4198 | uts4*) |
4199 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
4200 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4201 | ;; | |
d9898ee8 | 4202 | |
8d138742 CE |
4203 | *) |
4204 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
4205 | ;; | |
4206 | esac | |
4207 | fi | |
4208 | ]) | |
4209 | case $host_os in | |
4210 | # For platforms which do not support PIC, -DPIC is meaningless: | |
4211 | *djgpp*) | |
4212 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
4213 | ;; | |
4214 | *) | |
4215 | _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" | |
4216 | ;; | |
4217 | esac | |
4218 | AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) | |
4219 | _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], | |
4220 | [How to pass a linker flag through the compiler]) | |
d9898ee8 | 4221 | |
8d138742 CE |
4222 | # |
4223 | # Check to make sure the PIC flag actually works. | |
4224 | # | |
4225 | if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then | |
4226 | _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], | |
4227 | [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], | |
4228 | [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], | |
4229 | [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in | |
4230 | "" | " "*) ;; | |
4231 | *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; | |
4232 | esac], | |
4233 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
4234 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) | |
4235 | fi | |
4236 | _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], | |
4237 | [Additional compiler flags for building library objects]) | |
d9898ee8 | 4238 | |
8d138742 CE |
4239 | # |
4240 | # Check to make sure the static flag actually works. | |
4241 | # | |
4242 | wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" | |
4243 | _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], | |
4244 | _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), | |
4245 | $lt_tmp_static_flag, | |
4246 | [], | |
4247 | [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) | |
4248 | _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], | |
4249 | [Compiler flag to prevent dynamic linking]) | |
4250 | ])# _LT_COMPILER_PIC | |
d9898ee8 | 4251 | |
d9898ee8 | 4252 | |
8d138742 CE |
4253 | # _LT_LINKER_SHLIBS([TAGNAME]) |
4254 | # ---------------------------- | |
4255 | # See if the linker supports building shared libraries. | |
4256 | m4_defun([_LT_LINKER_SHLIBS], | |
4257 | [AC_REQUIRE([LT_PATH_LD])dnl | |
4258 | AC_REQUIRE([LT_PATH_NM])dnl | |
4259 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
4260 | m4_require([_LT_DECL_EGREP])dnl | |
4261 | m4_require([_LT_DECL_SED])dnl | |
4262 | m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl | |
4263 | m4_require([_LT_TAG_COMPILER])dnl | |
4264 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | |
4265 | m4_if([$1], [CXX], [ | |
4266 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
4267 | case $host_os in | |
4268 | aix[[4-9]]*) | |
4269 | # If we're using GNU nm, then we don't want the "-C" option. | |
4270 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
4271 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then | |
4272 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | |
4273 | else | |
4274 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | |
4275 | fi | |
4276 | ;; | |
4277 | pw32*) | |
4278 | _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" | |
4279 | ;; | |
4280 | cygwin* | mingw* | cegcc*) | |
4281 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' | |
4282 | ;; | |
4283 | *) | |
4284 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
4285 | ;; | |
4286 | esac | |
4287 | _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] | |
4288 | ], [ | |
4289 | runpath_var= | |
4290 | _LT_TAGVAR(allow_undefined_flag, $1)= | |
4291 | _LT_TAGVAR(always_export_symbols, $1)=no | |
4292 | _LT_TAGVAR(archive_cmds, $1)= | |
4293 | _LT_TAGVAR(archive_expsym_cmds, $1)= | |
4294 | _LT_TAGVAR(compiler_needs_object, $1)=no | |
4295 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | |
4296 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | |
4297 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
4298 | _LT_TAGVAR(hardcode_automatic, $1)=no | |
4299 | _LT_TAGVAR(hardcode_direct, $1)=no | |
4300 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | |
4301 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
4302 | _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= | |
4303 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | |
4304 | _LT_TAGVAR(hardcode_minus_L, $1)=no | |
4305 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | |
4306 | _LT_TAGVAR(inherit_rpath, $1)=no | |
4307 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | |
4308 | _LT_TAGVAR(module_cmds, $1)= | |
4309 | _LT_TAGVAR(module_expsym_cmds, $1)= | |
4310 | _LT_TAGVAR(old_archive_from_new_cmds, $1)= | |
4311 | _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= | |
4312 | _LT_TAGVAR(thread_safe_flag_spec, $1)= | |
4313 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
4314 | # include_expsyms should be a list of space-separated symbols to be *always* | |
4315 | # included in the symbol list | |
4316 | _LT_TAGVAR(include_expsyms, $1)= | |
4317 | # exclude_expsyms can be an extended regexp of symbols to exclude | |
4318 | # it will be wrapped by ` (' and `)$', so one must not match beginning or | |
4319 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | |
4320 | # as well as any symbol that contains `d'. | |
4321 | _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] | |
4322 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | |
4323 | # platforms (ab)use it in PIC code, but their linkers get confused if | |
4324 | # the symbol is explicitly referenced. Since portable code cannot | |
4325 | # rely on this symbol name, it's probably fine to never include it in | |
4326 | # preloaded symbol tables. | |
4327 | # Exclude shared library initialization/finalization symbols. | |
4328 | dnl Note also adjust exclude_expsyms for C++ above. | |
4329 | extract_expsyms_cmds= | |
d9898ee8 | 4330 | |
8d138742 CE |
4331 | case $host_os in |
4332 | cygwin* | mingw* | pw32* | cegcc*) | |
4333 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | |
4334 | # When not using gcc, we currently assume that we are using | |
4335 | # Microsoft Visual C++. | |
4336 | if test "$GCC" != yes; then | |
4337 | with_gnu_ld=no | |
4338 | fi | |
4339 | ;; | |
4340 | interix*) | |
4341 | # we just hope/assume this is gcc and not c89 (= MSVC++) | |
4342 | with_gnu_ld=yes | |
4343 | ;; | |
4344 | openbsd*) | |
4345 | with_gnu_ld=no | |
4346 | ;; | |
4347 | esac | |
d9898ee8 | 4348 | |
8d138742 CE |
4349 | _LT_TAGVAR(ld_shlibs, $1)=yes |
4350 | if test "$with_gnu_ld" = yes; then | |
4351 | # If archive_cmds runs LD, not CC, wlarc should be empty | |
4352 | wlarc='${wl}' | |
d9898ee8 | 4353 | |
8d138742 CE |
4354 | # Set some defaults for GNU ld with shared library support. These |
4355 | # are reset later if shared libraries are not supported. Putting them | |
4356 | # here allows them to be overridden if necessary. | |
4357 | runpath_var=LD_RUN_PATH | |
4358 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
4359 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
4360 | # ancient GNU ld didn't support --whole-archive et. al. | |
4361 | if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then | |
4362 | _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
4363 | else | |
4364 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
4365 | fi | |
4366 | supports_anon_versioning=no | |
4367 | case `$LD -v 2>&1` in | |
4368 | *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 | |
4369 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... | |
4370 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... | |
4371 | *\ 2.11.*) ;; # other 2.11 versions | |
4372 | *) supports_anon_versioning=yes ;; | |
4373 | esac | |
d9898ee8 | 4374 | |
8d138742 CE |
4375 | # See if GNU ld supports shared libraries. |
4376 | case $host_os in | |
4377 | aix[[3-9]]*) | |
4378 | # On AIX/PPC, the GNU linker is very broken | |
4379 | if test "$host_cpu" != ia64; then | |
4380 | _LT_TAGVAR(ld_shlibs, $1)=no | |
4381 | cat <<_LT_EOF 1>&2 | |
d9898ee8 | 4382 | |
8d138742 CE |
4383 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported |
4384 | *** to be unable to reliably create shared libraries on AIX. | |
4385 | *** Therefore, libtool is disabling shared libraries support. If you | |
4386 | *** really care for shared libraries, you may want to modify your PATH | |
4387 | *** so that a non-GNU linker is found, and then restart. | |
d9898ee8 | 4388 | |
8d138742 CE |
4389 | _LT_EOF |
4390 | fi | |
4391 | ;; | |
d9898ee8 | 4392 | |
8d138742 CE |
4393 | amigaos*) |
4394 | case $host_cpu in | |
4395 | powerpc) | |
4396 | # see comment about AmigaOS4 .so support | |
4397 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4398 | _LT_TAGVAR(archive_expsym_cmds, $1)='' | |
4399 | ;; | |
4400 | m68k) | |
4401 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
4402 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
4403 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
4404 | ;; | |
4405 | esac | |
4406 | ;; | |
d9898ee8 | 4407 | |
8d138742 CE |
4408 | beos*) |
4409 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
4410 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
4411 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
4412 | # support --undefined. This deserves some investigation. FIXME | |
4413 | _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4414 | else | |
4415 | _LT_TAGVAR(ld_shlibs, $1)=no | |
4416 | fi | |
4417 | ;; | |
d9898ee8 | 4418 | |
8d138742 CE |
4419 | cygwin* | mingw* | pw32* | cegcc*) |
4420 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | |
4421 | # as there is no search path for DLLs. | |
4422 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
4423 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
4424 | _LT_TAGVAR(always_export_symbols, $1)=no | |
4425 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | |
4426 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' | |
4427 | ||
4428 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | |
4429 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
4430 | # If the export-symbols file already is a .def file (1st line | |
4431 | # is EXPORTS), use it as is; otherwise, prepend... | |
4432 | _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
4433 | cp $export_symbols $output_objdir/$soname.def; | |
4434 | else | |
4435 | echo EXPORTS > $output_objdir/$soname.def; | |
4436 | cat $export_symbols >> $output_objdir/$soname.def; | |
4437 | fi~ | |
4438 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
4439 | else | |
4440 | _LT_TAGVAR(ld_shlibs, $1)=no | |
4441 | fi | |
4442 | ;; | |
d9898ee8 | 4443 | |
8d138742 CE |
4444 | interix[[3-9]]*) |
4445 | _LT_TAGVAR(hardcode_direct, $1)=no | |
4446 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4447 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
4448 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
4449 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | |
4450 | # Instead, shared libraries are loaded at an image base (0x10000000 by | |
4451 | # default) and relocated if they conflict, which is a slow very memory | |
4452 | # consuming and fragmenting process. To avoid this, we pick a random, | |
4453 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | |
4454 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. | |
4455 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
4456 | _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
4457 | ;; | |
d9898ee8 | 4458 | |
8d138742 CE |
4459 | gnu* | linux* | tpf* | k*bsd*-gnu) |
4460 | tmp_diet=no | |
4461 | if test "$host_os" = linux-dietlibc; then | |
4462 | case $cc_basename in | |
4463 | diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) | |
4464 | esac | |
4465 | fi | |
4466 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | |
4467 | && test "$tmp_diet" = no | |
4468 | then | |
4469 | tmp_addflag= | |
4470 | tmp_sharedflag='-shared' | |
4471 | case $cc_basename,$host_cpu in | |
4472 | pgcc*) # Portland Group C compiler | |
4473 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' | |
4474 | tmp_addflag=' $pic_flag' | |
4475 | ;; | |
4476 | pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers | |
4477 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' | |
4478 | tmp_addflag=' $pic_flag -Mnomain' ;; | |
4479 | ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 | |
4480 | tmp_addflag=' -i_dynamic' ;; | |
4481 | efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 | |
4482 | tmp_addflag=' -i_dynamic -nofor_main' ;; | |
4483 | ifc* | ifort*) # Intel Fortran compiler | |
4484 | tmp_addflag=' -nofor_main' ;; | |
4485 | lf95*) # Lahey Fortran 8.1 | |
4486 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
4487 | tmp_sharedflag='--shared' ;; | |
4488 | xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) | |
4489 | tmp_sharedflag='-qmkshrobj' | |
4490 | tmp_addflag= ;; | |
4491 | esac | |
4492 | case `$CC -V 2>&1 | sed 5q` in | |
4493 | *Sun\ C*) # Sun C 5.9 | |
4494 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' | |
4495 | _LT_TAGVAR(compiler_needs_object, $1)=yes | |
4496 | tmp_sharedflag='-G' ;; | |
4497 | *Sun\ F*) # Sun Fortran 8.3 | |
4498 | tmp_sharedflag='-G' ;; | |
4499 | esac | |
4500 | _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
d9898ee8 | 4501 | |
8d138742 CE |
4502 | if test "x$supports_anon_versioning" = xyes; then |
4503 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | |
4504 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
4505 | echo "local: *; };" >> $output_objdir/$libname.ver~ | |
4506 | $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | |
4507 | fi | |
d9898ee8 | 4508 | |
8d138742 CE |
4509 | case $cc_basename in |
4510 | xlf*) | |
4511 | # IBM XL Fortran 10.1 on PPC cannot create shared libs itself | |
4512 | _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' | |
4513 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
4514 | _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' | |
4515 | _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' | |
4516 | if test "x$supports_anon_versioning" = xyes; then | |
4517 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | |
4518 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
4519 | echo "local: *; };" >> $output_objdir/$libname.ver~ | |
4520 | $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | |
4521 | fi | |
4522 | ;; | |
4523 | esac | |
4524 | else | |
4525 | _LT_TAGVAR(ld_shlibs, $1)=no | |
4526 | fi | |
4527 | ;; | |
d9898ee8 | 4528 | |
8d138742 CE |
4529 | netbsd*) |
4530 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
4531 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | |
4532 | wlarc= | |
4533 | else | |
4534 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4535 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
4536 | fi | |
4537 | ;; | |
d9898ee8 | 4538 | |
8d138742 CE |
4539 | solaris*) |
4540 | if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then | |
4541 | _LT_TAGVAR(ld_shlibs, $1)=no | |
4542 | cat <<_LT_EOF 1>&2 | |
d9898ee8 | 4543 | |
8d138742 CE |
4544 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
4545 | *** create shared libraries on Solaris systems. Therefore, libtool | |
4546 | *** is disabling shared libraries support. We urge you to upgrade GNU | |
4547 | *** binutils to release 2.9.1 or newer. Another option is to modify | |
4548 | *** your PATH or compiler configuration so that the native linker is | |
4549 | *** used, and then restart. | |
d9898ee8 | 4550 | |
8d138742 CE |
4551 | _LT_EOF |
4552 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
4553 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4554 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
4555 | else | |
4556 | _LT_TAGVAR(ld_shlibs, $1)=no | |
4557 | fi | |
4558 | ;; | |
d9898ee8 | 4559 | |
8d138742 CE |
4560 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) |
4561 | case `$LD -v 2>&1` in | |
4562 | *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) | |
4563 | _LT_TAGVAR(ld_shlibs, $1)=no | |
4564 | cat <<_LT_EOF 1>&2 | |
d9898ee8 | 4565 | |
8d138742 CE |
4566 | *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not |
4567 | *** reliably create shared libraries on SCO systems. Therefore, libtool | |
4568 | *** is disabling shared libraries support. We urge you to upgrade GNU | |
4569 | *** binutils to release 2.16.91.0.3 or newer. Another option is to modify | |
4570 | *** your PATH or compiler configuration so that the native linker is | |
4571 | *** used, and then restart. | |
d9898ee8 | 4572 | |
8d138742 CE |
4573 | _LT_EOF |
4574 | ;; | |
4575 | *) | |
4576 | # For security reasons, it is highly recommended that you always | |
4577 | # use absolute paths for naming shared libraries, and exclude the | |
4578 | # DT_RUNPATH tag from executables and libraries. But doing so | |
4579 | # requires that you compile everything twice, which is a pain. | |
4580 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
4581 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
4582 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4583 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
4584 | else | |
4585 | _LT_TAGVAR(ld_shlibs, $1)=no | |
4586 | fi | |
4587 | ;; | |
4588 | esac | |
4589 | ;; | |
d9898ee8 | 4590 | |
8d138742 CE |
4591 | sunos4*) |
4592 | _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
4593 | wlarc= | |
4594 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
4595 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4596 | ;; | |
d9898ee8 | 4597 | |
8d138742 CE |
4598 | *) |
4599 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
4600 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4601 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
4602 | else | |
4603 | _LT_TAGVAR(ld_shlibs, $1)=no | |
4604 | fi | |
4605 | ;; | |
4606 | esac | |
d9898ee8 | 4607 | |
8d138742 CE |
4608 | if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then |
4609 | runpath_var= | |
4610 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
4611 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | |
4612 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
4613 | fi | |
4614 | else | |
4615 | # PORTME fill in a description of your system's linker (not GNU ld) | |
4616 | case $host_os in | |
4617 | aix3*) | |
4618 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
4619 | _LT_TAGVAR(always_export_symbols, $1)=yes | |
4620 | _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' | |
4621 | # Note: this linker hardcodes the directories in LIBPATH if there | |
4622 | # are no directories specified by -L. | |
4623 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
4624 | if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then | |
4625 | # Neither direct hardcoding nor static linking is supported with a | |
4626 | # broken collect2. | |
4627 | _LT_TAGVAR(hardcode_direct, $1)=unsupported | |
4628 | fi | |
4629 | ;; | |
d9898ee8 | 4630 | |
8d138742 CE |
4631 | aix[[4-9]]*) |
4632 | if test "$host_cpu" = ia64; then | |
4633 | # On IA64, the linker does run time linking by default, so we don't | |
4634 | # have to do anything special. | |
4635 | aix_use_runtimelinking=no | |
4636 | exp_sym_flag='-Bexport' | |
4637 | no_entry_flag="" | |
4638 | else | |
4639 | # If we're using GNU nm, then we don't want the "-C" option. | |
4640 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
4641 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then | |
4642 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | |
4643 | else | |
4644 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | |
4645 | fi | |
4646 | aix_use_runtimelinking=no | |
d9898ee8 | 4647 | |
8d138742 CE |
4648 | # Test if we are trying to use run time linking or normal |
4649 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
4650 | # need to do runtime linking. | |
4651 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) | |
4652 | for ld_flag in $LDFLAGS; do | |
4653 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | |
4654 | aix_use_runtimelinking=yes | |
4655 | break | |
4656 | fi | |
4657 | done | |
4658 | ;; | |
4659 | esac | |
d9898ee8 | 4660 | |
8d138742 CE |
4661 | exp_sym_flag='-bexport' |
4662 | no_entry_flag='-bnoentry' | |
4663 | fi | |
d9898ee8 | 4664 | |
8d138742 CE |
4665 | # When large executables or shared objects are built, AIX ld can |
4666 | # have problems creating the table of contents. If linking a library | |
4667 | # or program results in "error TOC overflow" add -mminimal-toc to | |
4668 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
4669 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
d9898ee8 | 4670 | |
8d138742 CE |
4671 | _LT_TAGVAR(archive_cmds, $1)='' |
4672 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
4673 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
4674 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | |
4675 | _LT_TAGVAR(link_all_deplibs, $1)=yes | |
4676 | _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' | |
d9898ee8 | 4677 | |
8d138742 CE |
4678 | if test "$GCC" = yes; then |
4679 | case $host_os in aix4.[[012]]|aix4.[[012]].*) | |
4680 | # We only want to do this on AIX 4.2 and lower, the check | |
4681 | # below for broken collect2 doesn't work under 4.3+ | |
4682 | collect2name=`${CC} -print-prog-name=collect2` | |
4683 | if test -f "$collect2name" && | |
4684 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null | |
4685 | then | |
4686 | # We have reworked collect2 | |
4687 | : | |
4688 | else | |
4689 | # We have old collect2 | |
4690 | _LT_TAGVAR(hardcode_direct, $1)=unsupported | |
4691 | # It fails to find uninstalled libraries when the uninstalled | |
4692 | # path is not listed in the libpath. Setting hardcode_minus_L | |
4693 | # to unsupported forces relinking | |
4694 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
4695 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
4696 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | |
4697 | fi | |
4698 | ;; | |
4699 | esac | |
4700 | shared_flag='-shared' | |
4701 | if test "$aix_use_runtimelinking" = yes; then | |
4702 | shared_flag="$shared_flag "'${wl}-G' | |
4703 | fi | |
4704 | else | |
4705 | # not using gcc | |
4706 | if test "$host_cpu" = ia64; then | |
4707 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
4708 | # chokes on -Wl,-G. The following line is correct: | |
4709 | shared_flag='-G' | |
4710 | else | |
4711 | if test "$aix_use_runtimelinking" = yes; then | |
4712 | shared_flag='${wl}-G' | |
4713 | else | |
4714 | shared_flag='${wl}-bM:SRE' | |
4715 | fi | |
4716 | fi | |
4717 | fi | |
d9898ee8 | 4718 | |
8d138742 CE |
4719 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' |
4720 | # It seems that -bexpall does not export symbols beginning with | |
4721 | # underscore (_), so it is better to generate a list of symbols to export. | |
4722 | _LT_TAGVAR(always_export_symbols, $1)=yes | |
4723 | if test "$aix_use_runtimelinking" = yes; then | |
4724 | # Warning - without using the other runtime loading flags (-brtl), | |
4725 | # -berok will link without error, but may produce a broken library. | |
4726 | _LT_TAGVAR(allow_undefined_flag, $1)='-berok' | |
4727 | # Determine the default libpath from the value encoded in an | |
4728 | # empty executable. | |
4729 | _LT_SYS_MODULE_PATH_AIX | |
4730 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
4731 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" | |
4732 | else | |
4733 | if test "$host_cpu" = ia64; then | |
4734 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | |
4735 | _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | |
4736 | _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" | |
4737 | else | |
4738 | # Determine the default libpath from the value encoded in an | |
4739 | # empty executable. | |
4740 | _LT_SYS_MODULE_PATH_AIX | |
4741 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
4742 | # Warning - without using the other run time loading flags, | |
4743 | # -berok will link without error, but may produce a broken library. | |
4744 | _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | |
4745 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | |
4746 | # Exported symbols can be pulled into shared objects from archives | |
4747 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' | |
4748 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | |
4749 | # This is similar to how AIX traditionally builds its shared libraries. | |
4750 | _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | |
4751 | fi | |
4752 | fi | |
4753 | ;; | |
d9898ee8 | 4754 | |
8d138742 CE |
4755 | amigaos*) |
4756 | case $host_cpu in | |
4757 | powerpc) | |
4758 | # see comment about AmigaOS4 .so support | |
4759 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4760 | _LT_TAGVAR(archive_expsym_cmds, $1)='' | |
4761 | ;; | |
4762 | m68k) | |
4763 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
4764 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
4765 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
4766 | ;; | |
4767 | esac | |
4768 | ;; | |
d9898ee8 | 4769 | |
8d138742 CE |
4770 | bsdi[[45]]*) |
4771 | _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic | |
4772 | ;; | |
d9898ee8 | 4773 | |
8d138742 CE |
4774 | cygwin* | mingw* | pw32* | cegcc*) |
4775 | # When not using gcc, we currently assume that we are using | |
4776 | # Microsoft Visual C++. | |
4777 | # hardcode_libdir_flag_spec is actually meaningless, as there is | |
4778 | # no search path for DLLs. | |
4779 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | |
4780 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
4781 | # Tell ltmain to make .lib files, not .a files. | |
4782 | libext=lib | |
4783 | # Tell ltmain to make .dll files, not .so files. | |
4784 | shrext_cmds=".dll" | |
4785 | # FIXME: Setting linknames here is a bad hack. | |
4786 | _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' | |
4787 | # The linker will automatically build a .lib file if we build a DLL. | |
4788 | _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' | |
4789 | # FIXME: Should let the user specify the lib program. | |
4790 | _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' | |
4791 | _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' | |
4792 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | |
4793 | ;; | |
d9898ee8 | 4794 | |
8d138742 CE |
4795 | darwin* | rhapsody*) |
4796 | _LT_DARWIN_LINKER_FEATURES($1) | |
4797 | ;; | |
d9898ee8 | 4798 | |
8d138742 CE |
4799 | dgux*) |
4800 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
4801 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
4802 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4803 | ;; | |
d9898ee8 | 4804 | |
8d138742 CE |
4805 | freebsd1*) |
4806 | _LT_TAGVAR(ld_shlibs, $1)=no | |
4807 | ;; | |
d9898ee8 | 4808 | |
8d138742 CE |
4809 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
4810 | # support. Future versions do this automatically, but an explicit c++rt0.o | |
4811 | # does not break anything, and helps significantly (at the cost of a little | |
4812 | # extra space). | |
4813 | freebsd2.2*) | |
4814 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | |
4815 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
4816 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
4817 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4818 | ;; | |
d9898ee8 | 4819 | |
8d138742 CE |
4820 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
4821 | freebsd2*) | |
4822 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
4823 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
4824 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
4825 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4826 | ;; | |
d9898ee8 | 4827 | |
8d138742 CE |
4828 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
4829 | freebsd* | dragonfly*) | |
4830 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | |
4831 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
4832 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
4833 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4834 | ;; | |
d9898ee8 | 4835 | |
8d138742 CE |
4836 | hpux9*) |
4837 | if test "$GCC" = yes; then | |
4838 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
4839 | else | |
4840 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
4841 | fi | |
4842 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
4843 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
4844 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
d9898ee8 | 4845 | |
8d138742 CE |
4846 | # hardcode_minus_L: Not really in the search PATH, |
4847 | # but as the default location of the library. | |
4848 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
4849 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
4850 | ;; | |
d9898ee8 | 4851 | |
8d138742 CE |
4852 | hpux10*) |
4853 | if test "$GCC" = yes -a "$with_gnu_ld" = no; then | |
4854 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
d9898ee8 | 4855 | else |
8d138742 | 4856 | _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' |
d9898ee8 | 4857 | fi |
8d138742 CE |
4858 | if test "$with_gnu_ld" = no; then |
4859 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
4860 | _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' | |
4861 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
4862 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
4863 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
4864 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
4865 | # hardcode_minus_L: Not really in the search PATH, | |
4866 | # but as the default location of the library. | |
4867 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
4868 | fi | |
4869 | ;; | |
d9898ee8 | 4870 | |
8d138742 CE |
4871 | hpux11*) |
4872 | if test "$GCC" = yes -a "$with_gnu_ld" = no; then | |
4873 | case $host_cpu in | |
4874 | hppa*64*) | |
4875 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
4876 | ;; | |
4877 | ia64*) | |
4878 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | |
4879 | ;; | |
4880 | *) | |
4881 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
4882 | ;; | |
4883 | esac | |
4884 | else | |
4885 | case $host_cpu in | |
4886 | hppa*64*) | |
4887 | _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
4888 | ;; | |
4889 | ia64*) | |
4890 | _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | |
4891 | ;; | |
4892 | *) | |
4893 | _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
4894 | ;; | |
4895 | esac | |
4896 | fi | |
4897 | if test "$with_gnu_ld" = no; then | |
4898 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
4899 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
d9898ee8 | 4900 | |
8d138742 CE |
4901 | case $host_cpu in |
4902 | hppa*64*|ia64*) | |
4903 | _LT_TAGVAR(hardcode_direct, $1)=no | |
4904 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4905 | ;; | |
4906 | *) | |
4907 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
4908 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
4909 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
d9898ee8 | 4910 | |
8d138742 CE |
4911 | # hardcode_minus_L: Not really in the search PATH, |
4912 | # but as the default location of the library. | |
4913 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
4914 | ;; | |
4915 | esac | |
4916 | fi | |
4917 | ;; | |
d9898ee8 | 4918 | |
8d138742 CE |
4919 | irix5* | irix6* | nonstopux*) |
4920 | if test "$GCC" = yes; then | |
4921 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
4922 | # Try to use the -exported_symbol ld option, if it does not | |
4923 | # work, assume that -exports_file does not work either and | |
4924 | # implicitly export all symbols. | |
4925 | save_LDFLAGS="$LDFLAGS" | |
4926 | LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | |
4927 | AC_LINK_IFELSE(int foo(void) {}, | |
4928 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' | |
4929 | ) | |
4930 | LDFLAGS="$save_LDFLAGS" | |
4931 | else | |
4932 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' | |
4933 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' | |
4934 | fi | |
4935 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' | |
4936 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
4937 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
4938 | _LT_TAGVAR(inherit_rpath, $1)=yes | |
4939 | _LT_TAGVAR(link_all_deplibs, $1)=yes | |
4940 | ;; | |
d9898ee8 | 4941 | |
8d138742 CE |
4942 | netbsd*) |
4943 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
4944 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | |
d9898ee8 | 4945 | else |
8d138742 | 4946 | _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
d9898ee8 | 4947 | fi |
8d138742 CE |
4948 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
4949 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
4950 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4951 | ;; | |
d9898ee8 | 4952 | |
8d138742 CE |
4953 | newsos6) |
4954 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
4955 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
4956 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
4957 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
4958 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4959 | ;; | |
d9898ee8 | 4960 | |
8d138742 CE |
4961 | *nto* | *qnx*) |
4962 | ;; | |
d9898ee8 | 4963 | |
8d138742 CE |
4964 | openbsd*) |
4965 | if test -f /usr/libexec/ld.so; then | |
4966 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
4967 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4968 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
4969 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
4970 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | |
4971 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' | |
4972 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
4973 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
4974 | else | |
4975 | case $host_os in | |
4976 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) | |
4977 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
4978 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
4979 | ;; | |
4980 | *) | |
4981 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | |
4982 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
4983 | ;; | |
4984 | esac | |
4985 | fi | |
4986 | else | |
4987 | _LT_TAGVAR(ld_shlibs, $1)=no | |
4988 | fi | |
4989 | ;; | |
d9898ee8 | 4990 | |
8d138742 CE |
4991 | os2*) |
4992 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
4993 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
4994 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
4995 | _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' | |
4996 | _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | |
4997 | ;; | |
d9898ee8 | 4998 | |
8d138742 CE |
4999 | osf3*) |
5000 | if test "$GCC" = yes; then | |
5001 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
5002 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
5003 | else | |
5004 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
5005 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' | |
d9898ee8 | 5006 | fi |
8d138742 CE |
5007 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' |
5008 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5009 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
d9898ee8 | 5010 | ;; |
8d138742 CE |
5011 | |
5012 | osf4* | osf5*) # as osf3* with the addition of -msym flag | |
5013 | if test "$GCC" = yes; then | |
5014 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
5015 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
5016 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5017 | else | |
5018 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
5019 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' | |
5020 | _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ | |
5021 | $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' | |
5022 | ||
5023 | # Both c and cxx compiler support -rpath directly | |
5024 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
5025 | fi | |
5026 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' | |
5027 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
d9898ee8 | 5028 | ;; |
8d138742 CE |
5029 | |
5030 | solaris*) | |
5031 | _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' | |
5032 | if test "$GCC" = yes; then | |
5033 | wlarc='${wl}' | |
5034 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5035 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
5036 | $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | |
5037 | else | |
5038 | case `$CC -V 2>&1` in | |
5039 | *"Compilers 5.0"*) | |
5040 | wlarc='' | |
5041 | _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5042 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
5043 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' | |
5044 | ;; | |
5045 | *) | |
5046 | wlarc='${wl}' | |
5047 | _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
5048 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
5049 | $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | |
5050 | ;; | |
5051 | esac | |
5052 | fi | |
5053 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
5054 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5055 | case $host_os in | |
5056 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
5057 | *) | |
5058 | # The compiler driver will combine and reorder linker options, | |
5059 | # but understands `-z linker_flag'. GCC discards it without `$wl', | |
5060 | # but is careful enough not to reorder. | |
5061 | # Supported since Solaris 2.6 (maybe 2.5.1?) | |
5062 | if test "$GCC" = yes; then | |
5063 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | |
5064 | else | |
5065 | _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' | |
5066 | fi | |
5067 | ;; | |
5068 | esac | |
5069 | _LT_TAGVAR(link_all_deplibs, $1)=yes | |
d9898ee8 | 5070 | ;; |
8d138742 CE |
5071 | |
5072 | sunos4*) | |
5073 | if test "x$host_vendor" = xsequent; then | |
5074 | # Use $CC to link under sequent, because it throws in some extra .o | |
5075 | # files that make .init and .fini sections work. | |
5076 | _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
5077 | else | |
5078 | _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | |
5079 | fi | |
5080 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5081 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
5082 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
5083 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
d9898ee8 | 5084 | ;; |
8d138742 CE |
5085 | |
5086 | sysv4) | |
5087 | case $host_vendor in | |
5088 | sni) | |
5089 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5090 | _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? | |
5091 | ;; | |
5092 | siemens) | |
5093 | ## LD is ld it makes a PLAMLIB | |
5094 | ## CC just makes a GrossModule. | |
5095 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' | |
5096 | _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' | |
5097 | _LT_TAGVAR(hardcode_direct, $1)=no | |
5098 | ;; | |
5099 | motorola) | |
5100 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5101 | _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie | |
5102 | ;; | |
5103 | esac | |
5104 | runpath_var='LD_RUN_PATH' | |
5105 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
d9898ee8 | 5106 | ;; |
8d138742 CE |
5107 | |
5108 | sysv4.3*) | |
5109 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5110 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5111 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' | |
d9898ee8 | 5112 | ;; |
8d138742 | 5113 | |
d9898ee8 | 5114 | sysv4*MP*) |
5115 | if test -d /usr/nec; then | |
8d138742 CE |
5116 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
5117 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5118 | runpath_var=LD_RUN_PATH | |
5119 | hardcode_runpath_var=yes | |
5120 | _LT_TAGVAR(ld_shlibs, $1)=yes | |
d9898ee8 | 5121 | fi |
5122 | ;; | |
8d138742 CE |
5123 | |
5124 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) | |
5125 | _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
5126 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
5127 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5128 | runpath_var='LD_RUN_PATH' | |
5129 | ||
5130 | if test "$GCC" = yes; then | |
5131 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5132 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5133 | else | |
5134 | _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5135 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5136 | fi | |
5137 | ;; | |
5138 | ||
5139 | sysv5* | sco3.2v5* | sco5v6*) | |
5140 | # Note: We can NOT use -z defs as we might desire, because we do not | |
5141 | # link with -lc, and that would cause any symbols used from libc to | |
5142 | # always be unresolved, which means just about no library would | |
5143 | # ever link correctly. If we're not using GNU ld we use -z text | |
5144 | # though, which does catch some bad symbols but isn't as heavy-handed | |
5145 | # as -z defs. | |
5146 | _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
5147 | _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' | |
5148 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
5149 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5150 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' | |
5151 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | |
5152 | _LT_TAGVAR(link_all_deplibs, $1)=yes | |
5153 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' | |
5154 | runpath_var='LD_RUN_PATH' | |
5155 | ||
5156 | if test "$GCC" = yes; then | |
5157 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5158 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5159 | else | |
5160 | _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5161 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5162 | fi | |
5163 | ;; | |
5164 | ||
5165 | uts4*) | |
5166 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5167 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5168 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
d9898ee8 | 5169 | ;; |
8d138742 | 5170 | |
d9898ee8 | 5171 | *) |
8d138742 | 5172 | _LT_TAGVAR(ld_shlibs, $1)=no |
d9898ee8 | 5173 | ;; |
5174 | esac | |
8d138742 CE |
5175 | |
5176 | if test x$host_vendor = xsni; then | |
5177 | case $host in | |
5178 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
5179 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' | |
d9898ee8 | 5180 | ;; |
8d138742 CE |
5181 | esac |
5182 | fi | |
5183 | fi | |
5184 | ]) | |
5185 | AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) | |
5186 | test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | |
5187 | ||
5188 | _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld | |
5189 | ||
5190 | _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl | |
5191 | _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl | |
5192 | _LT_DECL([], [extract_expsyms_cmds], [2], | |
5193 | [The commands to extract the exported symbol list from a shared archive]) | |
5194 | ||
5195 | # | |
5196 | # Do we need to explicitly link libc? | |
5197 | # | |
5198 | case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in | |
5199 | x|xyes) | |
5200 | # Assume -lc should be added | |
5201 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | |
5202 | ||
5203 | if test "$enable_shared" = yes && test "$GCC" = yes; then | |
5204 | case $_LT_TAGVAR(archive_cmds, $1) in | |
5205 | *'~'*) | |
5206 | # FIXME: we may have to deal with multi-command sequences. | |
5207 | ;; | |
5208 | '$CC '*) | |
5209 | # Test whether the compiler implicitly links with -lc since on some | |
5210 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | |
5211 | # to ld, don't add -lc before -lgcc. | |
5212 | AC_MSG_CHECKING([whether -lc should be explicitly linked in]) | |
5213 | $RM conftest* | |
5214 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
5215 | ||
5216 | if AC_TRY_EVAL(ac_compile) 2>conftest.err; then | |
5217 | soname=conftest | |
5218 | lib=conftest | |
5219 | libobjs=conftest.$ac_objext | |
5220 | deplibs= | |
5221 | wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) | |
5222 | pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) | |
5223 | compiler_flags=-v | |
5224 | linker_flags=-v | |
5225 | verstring= | |
5226 | output_objdir=. | |
5227 | libname=conftest | |
5228 | lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) | |
5229 | _LT_TAGVAR(allow_undefined_flag, $1)= | |
5230 | if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) | |
5231 | then | |
5232 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
5233 | else | |
5234 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | |
5235 | fi | |
5236 | _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag | |
5237 | else | |
5238 | cat conftest.err 1>&5 | |
5239 | fi | |
5240 | $RM conftest* | |
5241 | AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) | |
5242 | ;; | |
5243 | esac | |
5244 | fi | |
5245 | ;; | |
5246 | esac | |
5247 | ||
5248 | _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], | |
5249 | [Whether or not to add -lc for building shared libraries]) | |
5250 | _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], | |
5251 | [enable_shared_with_static_runtimes], [0], | |
5252 | [Whether or not to disallow shared libs when runtime libs are static]) | |
5253 | _LT_TAGDECL([], [export_dynamic_flag_spec], [1], | |
5254 | [Compiler flag to allow reflexive dlopens]) | |
5255 | _LT_TAGDECL([], [whole_archive_flag_spec], [1], | |
5256 | [Compiler flag to generate shared objects directly from archives]) | |
5257 | _LT_TAGDECL([], [compiler_needs_object], [1], | |
5258 | [Whether the compiler copes with passing no objects directly]) | |
5259 | _LT_TAGDECL([], [old_archive_from_new_cmds], [2], | |
5260 | [Create an old-style archive from a shared archive]) | |
5261 | _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], | |
5262 | [Create a temporary old-style archive to link instead of a shared archive]) | |
5263 | _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) | |
5264 | _LT_TAGDECL([], [archive_expsym_cmds], [2]) | |
5265 | _LT_TAGDECL([], [module_cmds], [2], | |
5266 | [Commands used to build a loadable module if different from building | |
5267 | a shared archive.]) | |
5268 | _LT_TAGDECL([], [module_expsym_cmds], [2]) | |
5269 | _LT_TAGDECL([], [with_gnu_ld], [1], | |
5270 | [Whether we are building with GNU ld or not]) | |
5271 | _LT_TAGDECL([], [allow_undefined_flag], [1], | |
5272 | [Flag that allows shared libraries with undefined symbols to be built]) | |
5273 | _LT_TAGDECL([], [no_undefined_flag], [1], | |
5274 | [Flag that enforces no undefined symbols]) | |
5275 | _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], | |
5276 | [Flag to hardcode $libdir into a binary during linking. | |
5277 | This must work even if $libdir does not exist]) | |
5278 | _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], | |
5279 | [[If ld is used when linking, flag to hardcode $libdir into a binary | |
5280 | during linking. This must work even if $libdir does not exist]]) | |
5281 | _LT_TAGDECL([], [hardcode_libdir_separator], [1], | |
5282 | [Whether we need a single "-rpath" flag with a separated argument]) | |
5283 | _LT_TAGDECL([], [hardcode_direct], [0], | |
5284 | [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes | |
5285 | DIR into the resulting binary]) | |
5286 | _LT_TAGDECL([], [hardcode_direct_absolute], [0], | |
5287 | [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes | |
5288 | DIR into the resulting binary and the resulting library dependency is | |
5289 | "absolute", i.e impossible to change by setting ${shlibpath_var} if the | |
5290 | library is relocated]) | |
5291 | _LT_TAGDECL([], [hardcode_minus_L], [0], | |
5292 | [Set to "yes" if using the -LDIR flag during linking hardcodes DIR | |
5293 | into the resulting binary]) | |
5294 | _LT_TAGDECL([], [hardcode_shlibpath_var], [0], | |
5295 | [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR | |
5296 | into the resulting binary]) | |
5297 | _LT_TAGDECL([], [hardcode_automatic], [0], | |
5298 | [Set to "yes" if building a shared library automatically hardcodes DIR | |
5299 | into the library and all subsequent libraries and executables linked | |
5300 | against it]) | |
5301 | _LT_TAGDECL([], [inherit_rpath], [0], | |
5302 | [Set to yes if linker adds runtime paths of dependent libraries | |
5303 | to runtime path list]) | |
5304 | _LT_TAGDECL([], [link_all_deplibs], [0], | |
5305 | [Whether libtool must link a program against all its dependency libraries]) | |
5306 | _LT_TAGDECL([], [fix_srcfile_path], [1], | |
5307 | [Fix the shell variable $srcfile for the compiler]) | |
5308 | _LT_TAGDECL([], [always_export_symbols], [0], | |
5309 | [Set to "yes" if exported symbols are required]) | |
5310 | _LT_TAGDECL([], [export_symbols_cmds], [2], | |
5311 | [The commands to list exported symbols]) | |
5312 | _LT_TAGDECL([], [exclude_expsyms], [1], | |
5313 | [Symbols that should not be listed in the preloaded symbols]) | |
5314 | _LT_TAGDECL([], [include_expsyms], [1], | |
5315 | [Symbols that must always be exported]) | |
5316 | _LT_TAGDECL([], [prelink_cmds], [2], | |
5317 | [Commands necessary for linking programs (against libraries) with templates]) | |
5318 | _LT_TAGDECL([], [file_list_spec], [1], | |
5319 | [Specify filename containing input files]) | |
5320 | dnl FIXME: Not yet implemented | |
5321 | dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], | |
5322 | dnl [Compiler flag to generate thread safe objects]) | |
5323 | ])# _LT_LINKER_SHLIBS | |
5324 | ||
5325 | ||
5326 | # _LT_LANG_C_CONFIG([TAG]) | |
5327 | # ------------------------ | |
5328 | # Ensure that the configuration variables for a C compiler are suitably | |
5329 | # defined. These variables are subsequently used by _LT_CONFIG to write | |
5330 | # the compiler configuration to `libtool'. | |
5331 | m4_defun([_LT_LANG_C_CONFIG], | |
5332 | [m4_require([_LT_DECL_EGREP])dnl | |
5333 | lt_save_CC="$CC" | |
5334 | AC_LANG_PUSH(C) | |
5335 | ||
5336 | # Source file extension for C test sources. | |
5337 | ac_ext=c | |
5338 | ||
5339 | # Object file extension for compiled C test sources. | |
5340 | objext=o | |
5341 | _LT_TAGVAR(objext, $1)=$objext | |
5342 | ||
5343 | # Code to be used in simple compile tests | |
5344 | lt_simple_compile_test_code="int some_variable = 0;" | |
5345 | ||
5346 | # Code to be used in simple link tests | |
5347 | lt_simple_link_test_code='int main(){return(0);}' | |
5348 | ||
5349 | _LT_TAG_COMPILER | |
5350 | # Save the default compiler, since it gets overwritten when the other | |
5351 | # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. | |
5352 | compiler_DEFAULT=$CC | |
5353 | ||
5354 | # save warnings/boilerplate of simple test code | |
5355 | _LT_COMPILER_BOILERPLATE | |
5356 | _LT_LINKER_BOILERPLATE | |
5357 | ||
5358 | if test -n "$compiler"; then | |
5359 | _LT_COMPILER_NO_RTTI($1) | |
5360 | _LT_COMPILER_PIC($1) | |
5361 | _LT_COMPILER_C_O($1) | |
5362 | _LT_COMPILER_FILE_LOCKS($1) | |
5363 | _LT_LINKER_SHLIBS($1) | |
5364 | _LT_SYS_DYNAMIC_LINKER($1) | |
5365 | _LT_LINKER_HARDCODE_LIBPATH($1) | |
5366 | LT_SYS_DLOPEN_SELF | |
5367 | _LT_CMD_STRIPLIB | |
5368 | ||
5369 | # Report which library types will actually be built | |
5370 | AC_MSG_CHECKING([if libtool supports shared libraries]) | |
5371 | AC_MSG_RESULT([$can_build_shared]) | |
5372 | ||
5373 | AC_MSG_CHECKING([whether to build shared libraries]) | |
5374 | test "$can_build_shared" = "no" && enable_shared=no | |
5375 | ||
5376 | # On AIX, shared libraries and static libraries use the same namespace, and | |
5377 | # are all built from PIC. | |
5378 | case $host_os in | |
5379 | aix3*) | |
5380 | test "$enable_shared" = yes && enable_static=no | |
5381 | if test -n "$RANLIB"; then | |
5382 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
5383 | postinstall_cmds='$RANLIB $lib' | |
5384 | fi | |
5385 | ;; | |
5386 | ||
5387 | aix[[4-9]]*) | |
5388 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
5389 | test "$enable_shared" = yes && enable_static=no | |
5390 | fi | |
5391 | ;; | |
5392 | esac | |
5393 | AC_MSG_RESULT([$enable_shared]) | |
5394 | ||
5395 | AC_MSG_CHECKING([whether to build static libraries]) | |
5396 | # Make sure either enable_shared or enable_static is yes. | |
5397 | test "$enable_shared" = yes || enable_static=yes | |
5398 | AC_MSG_RESULT([$enable_static]) | |
5399 | ||
5400 | _LT_CONFIG($1) | |
5401 | fi | |
5402 | AC_LANG_POP | |
5403 | CC="$lt_save_CC" | |
5404 | ])# _LT_LANG_C_CONFIG | |
5405 | ||
5406 | ||
5407 | # _LT_PROG_CXX | |
5408 | # ------------ | |
5409 | # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ | |
5410 | # compiler, we have our own version here. | |
5411 | m4_defun([_LT_PROG_CXX], | |
5412 | [ | |
5413 | pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) | |
5414 | AC_PROG_CXX | |
5415 | if test -n "$CXX" && ( test "X$CXX" != "Xno" && | |
5416 | ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || | |
5417 | (test "X$CXX" != "Xg++"))) ; then | |
5418 | AC_PROG_CXXCPP | |
5419 | else | |
5420 | _lt_caught_CXX_error=yes | |
5421 | fi | |
5422 | popdef([AC_MSG_ERROR]) | |
5423 | ])# _LT_PROG_CXX | |
5424 | ||
5425 | dnl aclocal-1.4 backwards compatibility: | |
5426 | dnl AC_DEFUN([_LT_PROG_CXX], []) | |
5427 | ||
5428 | ||
5429 | # _LT_LANG_CXX_CONFIG([TAG]) | |
5430 | # -------------------------- | |
5431 | # Ensure that the configuration variables for a C++ compiler are suitably | |
5432 | # defined. These variables are subsequently used by _LT_CONFIG to write | |
5433 | # the compiler configuration to `libtool'. | |
5434 | m4_defun([_LT_LANG_CXX_CONFIG], | |
5435 | [AC_REQUIRE([_LT_PROG_CXX])dnl | |
5436 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
5437 | m4_require([_LT_DECL_EGREP])dnl | |
5438 | ||
5439 | AC_LANG_PUSH(C++) | |
5440 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
5441 | _LT_TAGVAR(allow_undefined_flag, $1)= | |
5442 | _LT_TAGVAR(always_export_symbols, $1)=no | |
5443 | _LT_TAGVAR(archive_expsym_cmds, $1)= | |
5444 | _LT_TAGVAR(compiler_needs_object, $1)=no | |
5445 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | |
5446 | _LT_TAGVAR(hardcode_direct, $1)=no | |
5447 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | |
5448 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
5449 | _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= | |
5450 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | |
5451 | _LT_TAGVAR(hardcode_minus_L, $1)=no | |
5452 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | |
5453 | _LT_TAGVAR(hardcode_automatic, $1)=no | |
5454 | _LT_TAGVAR(inherit_rpath, $1)=no | |
5455 | _LT_TAGVAR(module_cmds, $1)= | |
5456 | _LT_TAGVAR(module_expsym_cmds, $1)= | |
5457 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | |
5458 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
5459 | _LT_TAGVAR(no_undefined_flag, $1)= | |
5460 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
5461 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | |
5462 | ||
5463 | # Source file extension for C++ test sources. | |
5464 | ac_ext=cpp | |
5465 | ||
5466 | # Object file extension for compiled C++ test sources. | |
5467 | objext=o | |
5468 | _LT_TAGVAR(objext, $1)=$objext | |
5469 | ||
5470 | # No sense in running all these tests if we already determined that | |
5471 | # the CXX compiler isn't working. Some variables (like enable_shared) | |
5472 | # are currently assumed to apply to all compilers on this platform, | |
5473 | # and will be corrupted by setting them based on a non-working compiler. | |
5474 | if test "$_lt_caught_CXX_error" != yes; then | |
5475 | # Code to be used in simple compile tests | |
5476 | lt_simple_compile_test_code="int some_variable = 0;" | |
5477 | ||
5478 | # Code to be used in simple link tests | |
5479 | lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' | |
5480 | ||
5481 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
5482 | _LT_TAG_COMPILER | |
5483 | ||
5484 | # save warnings/boilerplate of simple test code | |
5485 | _LT_COMPILER_BOILERPLATE | |
5486 | _LT_LINKER_BOILERPLATE | |
5487 | ||
5488 | # Allow CC to be a program name with arguments. | |
5489 | lt_save_CC=$CC | |
5490 | lt_save_LD=$LD | |
5491 | lt_save_GCC=$GCC | |
5492 | GCC=$GXX | |
5493 | lt_save_with_gnu_ld=$with_gnu_ld | |
5494 | lt_save_path_LD=$lt_cv_path_LD | |
5495 | if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then | |
5496 | lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx | |
5497 | else | |
5498 | $as_unset lt_cv_prog_gnu_ld | |
5499 | fi | |
5500 | if test -n "${lt_cv_path_LDCXX+set}"; then | |
5501 | lt_cv_path_LD=$lt_cv_path_LDCXX | |
5502 | else | |
5503 | $as_unset lt_cv_path_LD | |
5504 | fi | |
5505 | test -z "${LDCXX+set}" || LD=$LDCXX | |
5506 | CC=${CXX-"c++"} | |
5507 | compiler=$CC | |
5508 | _LT_TAGVAR(compiler, $1)=$CC | |
5509 | _LT_CC_BASENAME([$compiler]) | |
5510 | ||
5511 | if test -n "$compiler"; then | |
5512 | # We don't want -fno-exception when compiling C++ code, so set the | |
5513 | # no_builtin_flag separately | |
5514 | if test "$GXX" = yes; then | |
5515 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' | |
5516 | else | |
5517 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | |
5518 | fi | |
5519 | ||
5520 | if test "$GXX" = yes; then | |
5521 | # Set up default GNU C++ configuration | |
5522 | ||
5523 | LT_PATH_LD | |
5524 | ||
5525 | # Check if GNU C++ uses GNU ld as the underlying linker, since the | |
5526 | # archiving commands below assume that GNU ld is being used. | |
5527 | if test "$with_gnu_ld" = yes; then | |
5528 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
5529 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
5530 | ||
5531 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5532 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
5533 | ||
5534 | # If archive_cmds runs LD, not CC, wlarc should be empty | |
5535 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to | |
5536 | # investigate it a little bit more. (MM) | |
5537 | wlarc='${wl}' | |
5538 | ||
5539 | # ancient GNU ld didn't support --whole-archive et. al. | |
5540 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | | |
5541 | $GREP 'no-whole-archive' > /dev/null; then | |
5542 | _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
5543 | else | |
5544 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
5545 | fi | |
5546 | else | |
5547 | with_gnu_ld=no | |
5548 | wlarc= | |
5549 | ||
5550 | # A generic and very simple default shared library creation | |
5551 | # command for GNU C++ for the case where it uses the native | |
5552 | # linker, instead of GNU ld. If possible, this setting should | |
5553 | # overridden to take advantage of the native linker features on | |
5554 | # the platform it is being used on. | |
5555 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | |
5556 | fi | |
5557 | ||
5558 | # Commands to make compiler produce verbose output that lists | |
5559 | # what "hidden" libraries, object files and flags are used when | |
5560 | # linking a shared library. | |
5561 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' | |
5562 | ||
5563 | else | |
5564 | GXX=no | |
5565 | with_gnu_ld=no | |
5566 | wlarc= | |
5567 | fi | |
5568 | ||
5569 | # PORTME: fill in a description of your system's C++ link characteristics | |
5570 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | |
5571 | _LT_TAGVAR(ld_shlibs, $1)=yes | |
5572 | case $host_os in | |
5573 | aix3*) | |
5574 | # FIXME: insert proper C++ library support | |
5575 | _LT_TAGVAR(ld_shlibs, $1)=no | |
5576 | ;; | |
5577 | aix[[4-9]]*) | |
5578 | if test "$host_cpu" = ia64; then | |
5579 | # On IA64, the linker does run time linking by default, so we don't | |
5580 | # have to do anything special. | |
5581 | aix_use_runtimelinking=no | |
5582 | exp_sym_flag='-Bexport' | |
5583 | no_entry_flag="" | |
5584 | else | |
5585 | aix_use_runtimelinking=no | |
5586 | ||
5587 | # Test if we are trying to use run time linking or normal | |
5588 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
5589 | # need to do runtime linking. | |
5590 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) | |
5591 | for ld_flag in $LDFLAGS; do | |
5592 | case $ld_flag in | |
5593 | *-brtl*) | |
5594 | aix_use_runtimelinking=yes | |
5595 | break | |
5596 | ;; | |
5597 | esac | |
5598 | done | |
5599 | ;; | |
5600 | esac | |
5601 | ||
5602 | exp_sym_flag='-bexport' | |
5603 | no_entry_flag='-bnoentry' | |
5604 | fi | |
5605 | ||
5606 | # When large executables or shared objects are built, AIX ld can | |
5607 | # have problems creating the table of contents. If linking a library | |
5608 | # or program results in "error TOC overflow" add -mminimal-toc to | |
5609 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
5610 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
5611 | ||
5612 | _LT_TAGVAR(archive_cmds, $1)='' | |
5613 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
5614 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
5615 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | |
5616 | _LT_TAGVAR(link_all_deplibs, $1)=yes | |
5617 | _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' | |
5618 | ||
5619 | if test "$GXX" = yes; then | |
5620 | case $host_os in aix4.[[012]]|aix4.[[012]].*) | |
5621 | # We only want to do this on AIX 4.2 and lower, the check | |
5622 | # below for broken collect2 doesn't work under 4.3+ | |
5623 | collect2name=`${CC} -print-prog-name=collect2` | |
5624 | if test -f "$collect2name" && | |
5625 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null | |
5626 | then | |
5627 | # We have reworked collect2 | |
5628 | : | |
5629 | else | |
5630 | # We have old collect2 | |
5631 | _LT_TAGVAR(hardcode_direct, $1)=unsupported | |
5632 | # It fails to find uninstalled libraries when the uninstalled | |
5633 | # path is not listed in the libpath. Setting hardcode_minus_L | |
5634 | # to unsupported forces relinking | |
5635 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
5636 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5637 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | |
5638 | fi | |
5639 | esac | |
5640 | shared_flag='-shared' | |
5641 | if test "$aix_use_runtimelinking" = yes; then | |
5642 | shared_flag="$shared_flag "'${wl}-G' | |
5643 | fi | |
5644 | else | |
5645 | # not using gcc | |
5646 | if test "$host_cpu" = ia64; then | |
5647 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
5648 | # chokes on -Wl,-G. The following line is correct: | |
5649 | shared_flag='-G' | |
5650 | else | |
5651 | if test "$aix_use_runtimelinking" = yes; then | |
5652 | shared_flag='${wl}-G' | |
5653 | else | |
5654 | shared_flag='${wl}-bM:SRE' | |
5655 | fi | |
5656 | fi | |
5657 | fi | |
5658 | ||
5659 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' | |
5660 | # It seems that -bexpall does not export symbols beginning with | |
5661 | # underscore (_), so it is better to generate a list of symbols to | |
5662 | # export. | |
5663 | _LT_TAGVAR(always_export_symbols, $1)=yes | |
5664 | if test "$aix_use_runtimelinking" = yes; then | |
5665 | # Warning - without using the other runtime loading flags (-brtl), | |
5666 | # -berok will link without error, but may produce a broken library. | |
5667 | _LT_TAGVAR(allow_undefined_flag, $1)='-berok' | |
5668 | # Determine the default libpath from the value encoded in an empty | |
5669 | # executable. | |
5670 | _LT_SYS_MODULE_PATH_AIX | |
5671 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
5672 | ||
5673 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" | |
5674 | else | |
5675 | if test "$host_cpu" = ia64; then | |
5676 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | |
5677 | _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | |
5678 | _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" | |
5679 | else | |
5680 | # Determine the default libpath from the value encoded in an | |
5681 | # empty executable. | |
5682 | _LT_SYS_MODULE_PATH_AIX | |
5683 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
5684 | # Warning - without using the other run time loading flags, | |
5685 | # -berok will link without error, but may produce a broken library. | |
5686 | _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | |
5687 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | |
5688 | # Exported symbols can be pulled into shared objects from archives | |
5689 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' | |
5690 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | |
5691 | # This is similar to how AIX traditionally builds its shared | |
5692 | # libraries. | |
5693 | _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | |
5694 | fi | |
5695 | fi | |
5696 | ;; | |
5697 | ||
5698 | beos*) | |
5699 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
5700 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
5701 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
5702 | # support --undefined. This deserves some investigation. FIXME | |
5703 | _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
5704 | else | |
5705 | _LT_TAGVAR(ld_shlibs, $1)=no | |
5706 | fi | |
d9898ee8 | 5707 | ;; |
8d138742 CE |
5708 | |
5709 | chorus*) | |
5710 | case $cc_basename in | |
5711 | *) | |
5712 | # FIXME: insert proper C++ library support | |
5713 | _LT_TAGVAR(ld_shlibs, $1)=no | |
5714 | ;; | |
5715 | esac | |
5716 | ;; | |
5717 | ||
5718 | cygwin* | mingw* | pw32* | cegcc*) | |
5719 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | |
5720 | # as there is no search path for DLLs. | |
5721 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5722 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
5723 | _LT_TAGVAR(always_export_symbols, $1)=no | |
5724 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | |
5725 | ||
5726 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | |
5727 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
5728 | # If the export-symbols file already is a .def file (1st line | |
5729 | # is EXPORTS), use it as is; otherwise, prepend... | |
5730 | _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
5731 | cp $export_symbols $output_objdir/$soname.def; | |
5732 | else | |
5733 | echo EXPORTS > $output_objdir/$soname.def; | |
5734 | cat $export_symbols >> $output_objdir/$soname.def; | |
5735 | fi~ | |
5736 | $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
5737 | else | |
5738 | _LT_TAGVAR(ld_shlibs, $1)=no | |
5739 | fi | |
5740 | ;; | |
5741 | darwin* | rhapsody*) | |
5742 | _LT_DARWIN_LINKER_FEATURES($1) | |
d9898ee8 | 5743 | ;; |
8d138742 CE |
5744 | |
5745 | dgux*) | |
5746 | case $cc_basename in | |
5747 | ec++*) | |
5748 | # FIXME: insert proper C++ library support | |
5749 | _LT_TAGVAR(ld_shlibs, $1)=no | |
d9898ee8 | 5750 | ;; |
8d138742 CE |
5751 | ghcx*) |
5752 | # Green Hills C++ Compiler | |
5753 | # FIXME: insert proper C++ library support | |
5754 | _LT_TAGVAR(ld_shlibs, $1)=no | |
5755 | ;; | |
5756 | *) | |
5757 | # FIXME: insert proper C++ library support | |
5758 | _LT_TAGVAR(ld_shlibs, $1)=no | |
5759 | ;; | |
5760 | esac | |
5761 | ;; | |
5762 | ||
5763 | freebsd[[12]]*) | |
5764 | # C++ shared libraries reported to be fairly broken before | |
5765 | # switch to ELF | |
5766 | _LT_TAGVAR(ld_shlibs, $1)=no | |
5767 | ;; | |
5768 | ||
5769 | freebsd-elf*) | |
5770 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
5771 | ;; | |
5772 | ||
5773 | freebsd* | dragonfly*) | |
5774 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF | |
5775 | # conventions | |
5776 | _LT_TAGVAR(ld_shlibs, $1)=yes | |
5777 | ;; | |
5778 | ||
5779 | gnu*) | |
5780 | ;; | |
5781 | ||
5782 | hpux9*) | |
5783 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
5784 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
5785 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
5786 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
5787 | _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | |
5788 | # but as the default | |
5789 | # location of the library. | |
5790 | ||
5791 | case $cc_basename in | |
5792 | CC*) | |
5793 | # FIXME: insert proper C++ library support | |
5794 | _LT_TAGVAR(ld_shlibs, $1)=no | |
5795 | ;; | |
5796 | aCC*) | |
5797 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
5798 | # Commands to make compiler produce verbose output that lists | |
5799 | # what "hidden" libraries, object files and flags are used when | |
5800 | # linking a shared library. | |
5801 | # | |
5802 | # There doesn't appear to be a way to prevent this compiler from | |
5803 | # explicitly linking system object files so we need to strip them | |
5804 | # from the output so that they don't get included in the library | |
5805 | # dependencies. | |
5806 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' | |
5807 | ;; | |
5808 | *) | |
5809 | if test "$GXX" = yes; then | |
5810 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | |
5811 | else | |
5812 | # FIXME: insert proper C++ library support | |
5813 | _LT_TAGVAR(ld_shlibs, $1)=no | |
5814 | fi | |
5815 | ;; | |
5816 | esac | |
5817 | ;; | |
5818 | ||
5819 | hpux10*|hpux11*) | |
5820 | if test $with_gnu_ld = no; then | |
5821 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
5822 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
5823 | ||
5824 | case $host_cpu in | |
5825 | hppa*64*|ia64*) | |
5826 | ;; | |
5827 | *) | |
5828 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
5829 | ;; | |
5830 | esac | |
5831 | fi | |
5832 | case $host_cpu in | |
5833 | hppa*64*|ia64*) | |
5834 | _LT_TAGVAR(hardcode_direct, $1)=no | |
5835 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5836 | ;; | |
5837 | *) | |
5838 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
5839 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
5840 | _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | |
5841 | # but as the default | |
5842 | # location of the library. | |
5843 | ;; | |
5844 | esac | |
5845 | ||
5846 | case $cc_basename in | |
5847 | CC*) | |
5848 | # FIXME: insert proper C++ library support | |
5849 | _LT_TAGVAR(ld_shlibs, $1)=no | |
5850 | ;; | |
5851 | aCC*) | |
d9898ee8 | 5852 | case $host_cpu in |
8d138742 CE |
5853 | hppa*64*) |
5854 | _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
5855 | ;; | |
5856 | ia64*) | |
5857 | _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
5858 | ;; | |
5859 | *) | |
5860 | _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
5861 | ;; | |
d9898ee8 | 5862 | esac |
8d138742 CE |
5863 | # Commands to make compiler produce verbose output that lists |
5864 | # what "hidden" libraries, object files and flags are used when | |
5865 | # linking a shared library. | |
5866 | # | |
5867 | # There doesn't appear to be a way to prevent this compiler from | |
5868 | # explicitly linking system object files so we need to strip them | |
5869 | # from the output so that they don't get included in the library | |
5870 | # dependencies. | |
5871 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' | |
d9898ee8 | 5872 | ;; |
8d138742 CE |
5873 | *) |
5874 | if test "$GXX" = yes; then | |
5875 | if test $with_gnu_ld = no; then | |
5876 | case $host_cpu in | |
5877 | hppa*64*) | |
5878 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
5879 | ;; | |
5880 | ia64*) | |
5881 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
5882 | ;; | |
5883 | *) | |
5884 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
5885 | ;; | |
5886 | esac | |
5887 | fi | |
5888 | else | |
5889 | # FIXME: insert proper C++ library support | |
5890 | _LT_TAGVAR(ld_shlibs, $1)=no | |
5891 | fi | |
d9898ee8 | 5892 | ;; |
8d138742 CE |
5893 | esac |
5894 | ;; | |
5895 | ||
5896 | interix[[3-9]]*) | |
5897 | _LT_TAGVAR(hardcode_direct, $1)=no | |
5898 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5899 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
5900 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
5901 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | |
5902 | # Instead, shared libraries are loaded at an image base (0x10000000 by | |
5903 | # default) and relocated if they conflict, which is a slow very memory | |
5904 | # consuming and fragmenting process. To avoid this, we pick a random, | |
5905 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | |
5906 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. | |
5907 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
5908 | _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | |
d9898ee8 | 5909 | ;; |
8d138742 CE |
5910 | irix5* | irix6*) |
5911 | case $cc_basename in | |
5912 | CC*) | |
5913 | # SGI C++ | |
5914 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' | |
5915 | ||
5916 | # Archives containing C++ object files must be created using | |
5917 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is | |
5918 | # necessary to make sure instantiated templates are included | |
5919 | # in the archive. | |
5920 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' | |
d9898ee8 | 5921 | ;; |
8d138742 CE |
5922 | *) |
5923 | if test "$GXX" = yes; then | |
5924 | if test "$with_gnu_ld" = no; then | |
5925 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
5926 | else | |
5927 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' | |
5928 | fi | |
5929 | fi | |
5930 | _LT_TAGVAR(link_all_deplibs, $1)=yes | |
d9898ee8 | 5931 | ;; |
8d138742 CE |
5932 | esac |
5933 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5934 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
5935 | _LT_TAGVAR(inherit_rpath, $1)=yes | |
5936 | ;; | |
5937 | ||
ac40fd9e | 5938 | linux* | k*bsd*-gnu) |
8d138742 CE |
5939 | case $cc_basename in |
5940 | KCC*) | |
5941 | # Kuck and Associates, Inc. (KAI) C++ Compiler | |
5942 | ||
5943 | # KCC will only create a shared library if the output file | |
5944 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
5945 | # to its proper name (with version) after linking. | |
5946 | _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | |
5947 | _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' | |
5948 | # Commands to make compiler produce verbose output that lists | |
5949 | # what "hidden" libraries, object files and flags are used when | |
5950 | # linking a shared library. | |
5951 | # | |
5952 | # There doesn't appear to be a way to prevent this compiler from | |
5953 | # explicitly linking system object files so we need to strip them | |
5954 | # from the output so that they don't get included in the library | |
5955 | # dependencies. | |
5956 | output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' | |
5957 | ||
5958 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
5959 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
5960 | ||
5961 | # Archives containing C++ object files must be created using | |
5962 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. | |
5963 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' | |
d9898ee8 | 5964 | ;; |
8d138742 | 5965 | icpc* | ecpc* ) |
d9898ee8 | 5966 | # Intel C++ |
8d138742 CE |
5967 | with_gnu_ld=yes |
5968 | # version 8.0 and above of icpc choke on multiply defined symbols | |
5969 | # if we add $predep_objects and $postdep_objects, however 7.1 and | |
5970 | # earlier do not add the objects themselves. | |
5971 | case `$CC -V 2>&1` in | |
5972 | *"Version 7."*) | |
5973 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
5974 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
5975 | ;; | |
5976 | *) # Version 8.0 or newer | |
5977 | tmp_idyn= | |
5978 | case $host_cpu in | |
5979 | ia64*) tmp_idyn=' -i_dynamic';; | |
5980 | esac | |
5981 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
5982 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
5983 | ;; | |
5984 | esac | |
5985 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
5986 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
5987 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
5988 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | |
d9898ee8 | 5989 | ;; |
8d138742 CE |
5990 | pgCC* | pgcpp*) |
5991 | # Portland Group C++ compiler | |
5992 | case `$CC -V` in | |
5993 | *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) | |
5994 | _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ | |
5995 | rm -rf $tpldir~ | |
5996 | $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ | |
5997 | compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' | |
5998 | _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ | |
5999 | rm -rf $tpldir~ | |
6000 | $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ | |
6001 | $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ | |
6002 | $RANLIB $oldlib' | |
6003 | _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ | |
6004 | rm -rf $tpldir~ | |
6005 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | |
6006 | $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | |
6007 | _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ | |
6008 | rm -rf $tpldir~ | |
6009 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | |
6010 | $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' | |
6011 | ;; | |
6012 | *) # Version 6 will use weak symbols | |
6013 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | |
6014 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' | |
6015 | ;; | |
6016 | esac | |
6017 | ||
6018 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' | |
6019 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
6020 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' | |
6021 | ;; | |
d9898ee8 | 6022 | cxx*) |
6023 | # Compaq C++ | |
8d138742 CE |
6024 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
6025 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' | |
6026 | ||
6027 | runpath_var=LD_RUN_PATH | |
6028 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
6029 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
6030 | ||
6031 | # Commands to make compiler produce verbose output that lists | |
6032 | # what "hidden" libraries, object files and flags are used when | |
6033 | # linking a shared library. | |
6034 | # | |
6035 | # There doesn't appear to be a way to prevent this compiler from | |
6036 | # explicitly linking system object files so we need to strip them | |
6037 | # from the output so that they don't get included in the library | |
6038 | # dependencies. | |
6039 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' | |
6040 | ;; | |
6041 | xl*) | |
6042 | # IBM XL 8.0 on PPC, with GNU ld | |
6043 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
6044 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
6045 | _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
6046 | if test "x$supports_anon_versioning" = xyes; then | |
6047 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | |
6048 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
6049 | echo "local: *; };" >> $output_objdir/$libname.ver~ | |
6050 | $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | |
6051 | fi | |
d9898ee8 | 6052 | ;; |
6053 | *) | |
ac40fd9e | 6054 | case `$CC -V 2>&1 | sed 5q` in |
6055 | *Sun\ C*) | |
6056 | # Sun C++ 5.9 | |
8d138742 CE |
6057 | _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' |
6058 | _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
6059 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' | |
6060 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
6061 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' | |
6062 | _LT_TAGVAR(compiler_needs_object, $1)=yes | |
6063 | ||
6064 | # Not sure whether something based on | |
6065 | # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | |
6066 | # would be better. | |
6067 | output_verbose_link_cmd='echo' | |
6068 | ||
6069 | # Archives containing C++ object files must be created using | |
6070 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | |
6071 | # necessary to make sure instantiated templates are included | |
6072 | # in the archive. | |
6073 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | |
ac40fd9e | 6074 | ;; |
6075 | esac | |
d9898ee8 | 6076 | ;; |
6077 | esac | |
6078 | ;; | |
8d138742 | 6079 | |
d9898ee8 | 6080 | lynxos*) |
8d138742 CE |
6081 | # FIXME: insert proper C++ library support |
6082 | _LT_TAGVAR(ld_shlibs, $1)=no | |
d9898ee8 | 6083 | ;; |
8d138742 | 6084 | |
d9898ee8 | 6085 | m88k*) |
8d138742 CE |
6086 | # FIXME: insert proper C++ library support |
6087 | _LT_TAGVAR(ld_shlibs, $1)=no | |
d9898ee8 | 6088 | ;; |
8d138742 | 6089 | |
d9898ee8 | 6090 | mvs*) |
8d138742 CE |
6091 | case $cc_basename in |
6092 | cxx*) | |
6093 | # FIXME: insert proper C++ library support | |
6094 | _LT_TAGVAR(ld_shlibs, $1)=no | |
d9898ee8 | 6095 | ;; |
6096 | *) | |
8d138742 CE |
6097 | # FIXME: insert proper C++ library support |
6098 | _LT_TAGVAR(ld_shlibs, $1)=no | |
d9898ee8 | 6099 | ;; |
6100 | esac | |
6101 | ;; | |
8d138742 | 6102 | |
d9898ee8 | 6103 | netbsd*) |
8d138742 CE |
6104 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then |
6105 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' | |
6106 | wlarc= | |
6107 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
6108 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
6109 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6110 | fi | |
6111 | # Workaround some broken pre-1.5 toolchains | |
6112 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' | |
6113 | ;; | |
6114 | ||
6115 | *nto* | *qnx*) | |
6116 | _LT_TAGVAR(ld_shlibs, $1)=yes | |
6117 | ;; | |
6118 | ||
6119 | openbsd2*) | |
6120 | # C++ shared libraries are fairly broken | |
6121 | _LT_TAGVAR(ld_shlibs, $1)=no | |
6122 | ;; | |
6123 | ||
6124 | openbsd*) | |
6125 | if test -f /usr/libexec/ld.so; then | |
6126 | _LT_TAGVAR(hardcode_direct, $1)=yes | |
6127 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6128 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
6129 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | |
6130 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
6131 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
6132 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' | |
6133 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
6134 | _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
6135 | fi | |
6136 | output_verbose_link_cmd=echo | |
6137 | else | |
6138 | _LT_TAGVAR(ld_shlibs, $1)=no | |
6139 | fi | |
d9898ee8 | 6140 | ;; |
8d138742 | 6141 | |
d9898ee8 | 6142 | osf3* | osf4* | osf5*) |
8d138742 CE |
6143 | case $cc_basename in |
6144 | KCC*) | |
6145 | # Kuck and Associates, Inc. (KAI) C++ Compiler | |
6146 | ||
6147 | # KCC will only create a shared library if the output file | |
6148 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
6149 | # to its proper name (with version) after linking. | |
6150 | _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | |
6151 | ||
6152 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
6153 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
6154 | ||
6155 | # Archives containing C++ object files must be created using | |
6156 | # the KAI C++ compiler. | |
6157 | case $host in | |
6158 | osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; | |
6159 | *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; | |
6160 | esac | |
d9898ee8 | 6161 | ;; |
8d138742 | 6162 | RCC*) |
d9898ee8 | 6163 | # Rational C++ 2.4.1 |
8d138742 CE |
6164 | # FIXME: insert proper C++ library support |
6165 | _LT_TAGVAR(ld_shlibs, $1)=no | |
d9898ee8 | 6166 | ;; |
8d138742 CE |
6167 | cxx*) |
6168 | case $host in | |
6169 | osf3*) | |
6170 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
6171 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' | |
6172 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
6173 | ;; | |
6174 | *) | |
6175 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
6176 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' | |
6177 | _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ | |
6178 | echo "-hidden">> $lib.exp~ | |
6179 | $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ | |
6180 | $RM $lib.exp' | |
6181 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
6182 | ;; | |
6183 | esac | |
6184 | ||
6185 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
6186 | ||
6187 | # Commands to make compiler produce verbose output that lists | |
6188 | # what "hidden" libraries, object files and flags are used when | |
6189 | # linking a shared library. | |
6190 | # | |
6191 | # There doesn't appear to be a way to prevent this compiler from | |
6192 | # explicitly linking system object files so we need to strip them | |
6193 | # from the output so that they don't get included in the library | |
6194 | # dependencies. | |
6195 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' | |
d9898ee8 | 6196 | ;; |
6197 | *) | |
8d138742 CE |
6198 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
6199 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
6200 | case $host in | |
6201 | osf3*) | |
6202 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
6203 | ;; | |
6204 | *) | |
6205 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
6206 | ;; | |
6207 | esac | |
6208 | ||
6209 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
6210 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
6211 | ||
6212 | # Commands to make compiler produce verbose output that lists | |
6213 | # what "hidden" libraries, object files and flags are used when | |
6214 | # linking a shared library. | |
6215 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' | |
6216 | ||
6217 | else | |
6218 | # FIXME: insert proper C++ library support | |
6219 | _LT_TAGVAR(ld_shlibs, $1)=no | |
6220 | fi | |
d9898ee8 | 6221 | ;; |
8d138742 CE |
6222 | esac |
6223 | ;; | |
6224 | ||
d9898ee8 | 6225 | psos*) |
8d138742 CE |
6226 | # FIXME: insert proper C++ library support |
6227 | _LT_TAGVAR(ld_shlibs, $1)=no | |
6228 | ;; | |
6229 | ||
6230 | sunos4*) | |
6231 | case $cc_basename in | |
6232 | CC*) | |
6233 | # Sun C++ 4.x | |
6234 | # FIXME: insert proper C++ library support | |
6235 | _LT_TAGVAR(ld_shlibs, $1)=no | |
6236 | ;; | |
6237 | lcc*) | |
6238 | # Lucid | |
6239 | # FIXME: insert proper C++ library support | |
6240 | _LT_TAGVAR(ld_shlibs, $1)=no | |
6241 | ;; | |
6242 | *) | |
6243 | # FIXME: insert proper C++ library support | |
6244 | _LT_TAGVAR(ld_shlibs, $1)=no | |
6245 | ;; | |
6246 | esac | |
6247 | ;; | |
6248 | ||
d9898ee8 | 6249 | solaris*) |
8d138742 CE |
6250 | case $cc_basename in |
6251 | CC*) | |
d9898ee8 | 6252 | # Sun C++ 4.2, 5.x and Centerline C++ |
8d138742 CE |
6253 | _LT_TAGVAR(archive_cmds_need_lc,$1)=yes |
6254 | _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' | |
6255 | _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
6256 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
6257 | $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | |
6258 | ||
6259 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
6260 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6261 | case $host_os in | |
6262 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
6263 | *) | |
6264 | # The compiler driver will combine and reorder linker options, | |
6265 | # but understands `-z linker_flag'. | |
6266 | # Supported since Solaris 2.6 (maybe 2.5.1?) | |
6267 | _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' | |
6268 | ;; | |
6269 | esac | |
6270 | _LT_TAGVAR(link_all_deplibs, $1)=yes | |
6271 | ||
6272 | output_verbose_link_cmd='echo' | |
6273 | ||
6274 | # Archives containing C++ object files must be created using | |
6275 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | |
6276 | # necessary to make sure instantiated templates are included | |
6277 | # in the archive. | |
6278 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | |
d9898ee8 | 6279 | ;; |
8d138742 | 6280 | gcx*) |
d9898ee8 | 6281 | # Green Hills C++ Compiler |
8d138742 CE |
6282 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
6283 | ||
6284 | # The C++ compiler must be used to create the archive. | |
6285 | _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' | |
d9898ee8 | 6286 | ;; |
8d138742 CE |
6287 | *) |
6288 | # GNU C++ compiler with Solaris linker | |
6289 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
6290 | _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' | |
6291 | if $CC --version | $GREP -v '^2\.7' > /dev/null; then | |
6292 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
6293 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
6294 | $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | |
6295 | ||
6296 | # Commands to make compiler produce verbose output that lists | |
6297 | # what "hidden" libraries, object files and flags are used when | |
6298 | # linking a shared library. | |
6299 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' | |
6300 | else | |
6301 | # g++ 2.7 appears to require `-G' NOT `-shared' on this | |
6302 | # platform. | |
6303 | _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
6304 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
6305 | $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | |
6306 | ||
6307 | # Commands to make compiler produce verbose output that lists | |
6308 | # what "hidden" libraries, object files and flags are used when | |
6309 | # linking a shared library. | |
6310 | output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' | |
6311 | fi | |
6312 | ||
6313 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' | |
6314 | case $host_os in | |
6315 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
6316 | *) | |
6317 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | |
6318 | ;; | |
6319 | esac | |
6320 | fi | |
d9898ee8 | 6321 | ;; |
8d138742 CE |
6322 | esac |
6323 | ;; | |
6324 | ||
6325 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) | |
6326 | _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
6327 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
6328 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6329 | runpath_var='LD_RUN_PATH' | |
6330 | ||
6331 | case $cc_basename in | |
6332 | CC*) | |
6333 | _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6334 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6335 | ;; | |
6336 | *) | |
6337 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6338 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6339 | ;; | |
6340 | esac | |
6341 | ;; | |
6342 | ||
6343 | sysv5* | sco3.2v5* | sco5v6*) | |
6344 | # Note: We can NOT use -z defs as we might desire, because we do not | |
6345 | # link with -lc, and that would cause any symbols used from libc to | |
6346 | # always be unresolved, which means just about no library would | |
6347 | # ever link correctly. If we're not using GNU ld we use -z text | |
6348 | # though, which does catch some bad symbols but isn't as heavy-handed | |
6349 | # as -z defs. | |
6350 | _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
6351 | _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' | |
6352 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
6353 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6354 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' | |
6355 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | |
6356 | _LT_TAGVAR(link_all_deplibs, $1)=yes | |
6357 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' | |
6358 | runpath_var='LD_RUN_PATH' | |
6359 | ||
d9898ee8 | 6360 | case $cc_basename in |
8d138742 CE |
6361 | CC*) |
6362 | _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6363 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
d9898ee8 | 6364 | ;; |
6365 | *) | |
8d138742 CE |
6366 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
6367 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
d9898ee8 | 6368 | ;; |
6369 | esac | |
8d138742 CE |
6370 | ;; |
6371 | ||
d9898ee8 | 6372 | tandem*) |
8d138742 CE |
6373 | case $cc_basename in |
6374 | NCC*) | |
d9898ee8 | 6375 | # NonStop-UX NCC 3.20 |
8d138742 CE |
6376 | # FIXME: insert proper C++ library support |
6377 | _LT_TAGVAR(ld_shlibs, $1)=no | |
d9898ee8 | 6378 | ;; |
8d138742 CE |
6379 | *) |
6380 | # FIXME: insert proper C++ library support | |
6381 | _LT_TAGVAR(ld_shlibs, $1)=no | |
d9898ee8 | 6382 | ;; |
8d138742 CE |
6383 | esac |
6384 | ;; | |
6385 | ||
d9898ee8 | 6386 | vxworks*) |
8d138742 CE |
6387 | # FIXME: insert proper C++ library support |
6388 | _LT_TAGVAR(ld_shlibs, $1)=no | |
6389 | ;; | |
6390 | ||
d9898ee8 | 6391 | *) |
8d138742 CE |
6392 | # FIXME: insert proper C++ library support |
6393 | _LT_TAGVAR(ld_shlibs, $1)=no | |
6394 | ;; | |
6395 | esac | |
6396 | ||
6397 | AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) | |
6398 | test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | |
6399 | ||
6400 | _LT_TAGVAR(GCC, $1)="$GXX" | |
6401 | _LT_TAGVAR(LD, $1)="$LD" | |
6402 | ||
6403 | ## CAVEAT EMPTOR: | |
6404 | ## There is no encapsulation within the following macros, do not change | |
6405 | ## the running order or otherwise move them around unless you know exactly | |
6406 | ## what you are doing... | |
6407 | _LT_SYS_HIDDEN_LIBDEPS($1) | |
6408 | _LT_COMPILER_PIC($1) | |
6409 | _LT_COMPILER_C_O($1) | |
6410 | _LT_COMPILER_FILE_LOCKS($1) | |
6411 | _LT_LINKER_SHLIBS($1) | |
6412 | _LT_SYS_DYNAMIC_LINKER($1) | |
6413 | _LT_LINKER_HARDCODE_LIBPATH($1) | |
6414 | ||
6415 | _LT_CONFIG($1) | |
6416 | fi # test -n "$compiler" | |
6417 | ||
6418 | CC=$lt_save_CC | |
6419 | LDCXX=$LD | |
6420 | LD=$lt_save_LD | |
6421 | GCC=$lt_save_GCC | |
6422 | with_gnu_ld=$lt_save_with_gnu_ld | |
6423 | lt_cv_path_LDCXX=$lt_cv_path_LD | |
6424 | lt_cv_path_LD=$lt_save_path_LD | |
6425 | lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld | |
6426 | lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld | |
6427 | fi # test "$_lt_caught_CXX_error" != yes | |
6428 | ||
6429 | AC_LANG_POP | |
6430 | ])# _LT_LANG_CXX_CONFIG | |
6431 | ||
6432 | ||
6433 | # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) | |
6434 | # --------------------------------- | |
6435 | # Figure out "hidden" library dependencies from verbose | |
6436 | # compiler output when linking a shared library. | |
6437 | # Parse the compiler output and extract the necessary | |
6438 | # objects, libraries and library flags. | |
6439 | m4_defun([_LT_SYS_HIDDEN_LIBDEPS], | |
6440 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
6441 | # Dependencies to place before and after the object being linked: | |
6442 | _LT_TAGVAR(predep_objects, $1)= | |
6443 | _LT_TAGVAR(postdep_objects, $1)= | |
6444 | _LT_TAGVAR(predeps, $1)= | |
6445 | _LT_TAGVAR(postdeps, $1)= | |
6446 | _LT_TAGVAR(compiler_lib_search_path, $1)= | |
6447 | ||
6448 | dnl we can't use the lt_simple_compile_test_code here, | |
6449 | dnl because it contains code intended for an executable, | |
6450 | dnl not a library. It's possible we should let each | |
6451 | dnl tag define a new lt_????_link_test_code variable, | |
6452 | dnl but it's only used here... | |
6453 | m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF | |
6454 | int a; | |
6455 | void foo (void) { a = 0; } | |
6456 | _LT_EOF | |
6457 | ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF | |
6458 | class Foo | |
6459 | { | |
6460 | public: | |
6461 | Foo (void) { a = 0; } | |
6462 | private: | |
6463 | int a; | |
6464 | }; | |
6465 | _LT_EOF | |
6466 | ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF | |
6467 | subroutine foo | |
6468 | implicit none | |
6469 | integer*4 a | |
6470 | a=0 | |
6471 | return | |
6472 | end | |
6473 | _LT_EOF | |
6474 | ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF | |
6475 | subroutine foo | |
6476 | implicit none | |
6477 | integer a | |
6478 | a=0 | |
6479 | return | |
6480 | end | |
6481 | _LT_EOF | |
6482 | ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF | |
6483 | public class foo { | |
6484 | private int a; | |
6485 | public void bar (void) { | |
6486 | a = 0; | |
6487 | } | |
6488 | }; | |
6489 | _LT_EOF | |
6490 | ]) | |
6491 | dnl Parse the compiler output and extract the necessary | |
6492 | dnl objects, libraries and library flags. | |
6493 | if AC_TRY_EVAL(ac_compile); then | |
6494 | # Parse the compiler output and extract the necessary | |
6495 | # objects, libraries and library flags. | |
6496 | ||
6497 | # Sentinel used to keep track of whether or not we are before | |
6498 | # the conftest object file. | |
6499 | pre_test_object_deps_done=no | |
6500 | ||
6501 | for p in `eval "$output_verbose_link_cmd"`; do | |
6502 | case $p in | |
6503 | ||
6504 | -L* | -R* | -l*) | |
6505 | # Some compilers place space between "-{L,R}" and the path. | |
6506 | # Remove the space. | |
6507 | if test $p = "-L" || | |
6508 | test $p = "-R"; then | |
6509 | prev=$p | |
6510 | continue | |
6511 | else | |
6512 | prev= | |
6513 | fi | |
6514 | ||
6515 | if test "$pre_test_object_deps_done" = no; then | |
6516 | case $p in | |
6517 | -L* | -R*) | |
6518 | # Internal compiler library paths should come after those | |
6519 | # provided the user. The postdeps already come after the | |
6520 | # user supplied libs so there is no need to process them. | |
6521 | if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then | |
6522 | _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" | |
6523 | else | |
6524 | _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" | |
6525 | fi | |
6526 | ;; | |
6527 | # The "-l" case would never come before the object being | |
6528 | # linked, so don't bother handling this case. | |
6529 | esac | |
6530 | else | |
6531 | if test -z "$_LT_TAGVAR(postdeps, $1)"; then | |
6532 | _LT_TAGVAR(postdeps, $1)="${prev}${p}" | |
6533 | else | |
6534 | _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" | |
6535 | fi | |
6536 | fi | |
6537 | ;; | |
6538 | ||
6539 | *.$objext) | |
6540 | # This assumes that the test object file only shows up | |
6541 | # once in the compiler output. | |
6542 | if test "$p" = "conftest.$objext"; then | |
6543 | pre_test_object_deps_done=yes | |
6544 | continue | |
6545 | fi | |
6546 | ||
6547 | if test "$pre_test_object_deps_done" = no; then | |
6548 | if test -z "$_LT_TAGVAR(predep_objects, $1)"; then | |
6549 | _LT_TAGVAR(predep_objects, $1)="$p" | |
6550 | else | |
6551 | _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" | |
6552 | fi | |
6553 | else | |
6554 | if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then | |
6555 | _LT_TAGVAR(postdep_objects, $1)="$p" | |
6556 | else | |
6557 | _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" | |
6558 | fi | |
6559 | fi | |
6560 | ;; | |
6561 | ||
6562 | *) ;; # Ignore the rest. | |
6563 | ||
6564 | esac | |
6565 | done | |
6566 | ||
6567 | # Clean up. | |
6568 | rm -f a.out a.exe | |
6569 | else | |
6570 | echo "libtool.m4: error: problem compiling $1 test program" | |
6571 | fi | |
6572 | ||
6573 | $RM -f confest.$objext | |
6574 | ||
6575 | # PORTME: override above test on systems where it is broken | |
6576 | m4_if([$1], [CXX], | |
6577 | [case $host_os in | |
6578 | interix[[3-9]]*) | |
6579 | # Interix 3.5 installs completely hosed .la files for C++, so rather than | |
6580 | # hack all around it, let's just trust "g++" to DTRT. | |
6581 | _LT_TAGVAR(predep_objects,$1)= | |
6582 | _LT_TAGVAR(postdep_objects,$1)= | |
6583 | _LT_TAGVAR(postdeps,$1)= | |
6584 | ;; | |
6585 | ||
6586 | linux*) | |
6587 | case `$CC -V 2>&1 | sed 5q` in | |
6588 | *Sun\ C*) | |
6589 | # Sun C++ 5.9 | |
6590 | ||
6591 | # The more standards-conforming stlport4 library is | |
6592 | # incompatible with the Cstd library. Avoid specifying | |
6593 | # it if it's in CXXFLAGS. Ignore libCrun as | |
6594 | # -library=stlport4 depends on it. | |
6595 | case " $CXX $CXXFLAGS " in | |
6596 | *" -library=stlport4 "*) | |
6597 | solaris_use_stlport4=yes | |
6598 | ;; | |
d9898ee8 | 6599 | esac |
8d138742 CE |
6600 | |
6601 | if test "$solaris_use_stlport4" != yes; then | |
6602 | _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' | |
6603 | fi | |
6604 | ;; | |
6605 | esac | |
6606 | ;; | |
6607 | ||
6608 | solaris*) | |
6609 | case $cc_basename in | |
6610 | CC*) | |
6611 | # The more standards-conforming stlport4 library is | |
6612 | # incompatible with the Cstd library. Avoid specifying | |
6613 | # it if it's in CXXFLAGS. Ignore libCrun as | |
6614 | # -library=stlport4 depends on it. | |
6615 | case " $CXX $CXXFLAGS " in | |
6616 | *" -library=stlport4 "*) | |
6617 | solaris_use_stlport4=yes | |
6618 | ;; | |
6619 | esac | |
6620 | ||
6621 | # Adding this requires a known-good setup of shared libraries for | |
6622 | # Sun compiler versions before 5.6, else PIC objects from an old | |
6623 | # archive will be linked into the output, leading to subtle bugs. | |
6624 | if test "$solaris_use_stlport4" != yes; then | |
6625 | _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' | |
6626 | fi | |
6627 | ;; | |
6628 | esac | |
6629 | ;; | |
6630 | esac | |
6631 | ]) | |
6632 | ||
6633 | case " $_LT_TAGVAR(postdeps, $1) " in | |
6634 | *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; | |
6635 | esac | |
6636 | _LT_TAGVAR(compiler_lib_search_dirs, $1)= | |
6637 | if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then | |
6638 | _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` | |
6639 | fi | |
6640 | _LT_TAGDECL([], [compiler_lib_search_dirs], [1], | |
6641 | [The directories searched by this compiler when creating a shared library]) | |
6642 | _LT_TAGDECL([], [predep_objects], [1], | |
6643 | [Dependencies to place before and after the objects being linked to | |
6644 | create a shared library]) | |
6645 | _LT_TAGDECL([], [postdep_objects], [1]) | |
6646 | _LT_TAGDECL([], [predeps], [1]) | |
6647 | _LT_TAGDECL([], [postdeps], [1]) | |
6648 | _LT_TAGDECL([], [compiler_lib_search_path], [1], | |
6649 | [The library search path used internally by the compiler when linking | |
6650 | a shared library]) | |
6651 | ])# _LT_SYS_HIDDEN_LIBDEPS | |
6652 | ||
6653 | ||
6654 | # _LT_PROG_F77 | |
6655 | # ------------ | |
6656 | # Since AC_PROG_F77 is broken, in that it returns the empty string | |
6657 | # if there is no fortran compiler, we have our own version here. | |
6658 | m4_defun([_LT_PROG_F77], | |
6659 | [ | |
6660 | pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) | |
6661 | AC_PROG_F77 | |
6662 | if test -z "$F77" || test "X$F77" = "Xno"; then | |
6663 | _lt_disable_F77=yes | |
6664 | fi | |
6665 | popdef([AC_MSG_ERROR]) | |
6666 | ])# _LT_PROG_F77 | |
6667 | ||
6668 | dnl aclocal-1.4 backwards compatibility: | |
6669 | dnl AC_DEFUN([_LT_PROG_F77], []) | |
6670 | ||
6671 | ||
6672 | # _LT_LANG_F77_CONFIG([TAG]) | |
6673 | # -------------------------- | |
6674 | # Ensure that the configuration variables for a Fortran 77 compiler are | |
6675 | # suitably defined. These variables are subsequently used by _LT_CONFIG | |
6676 | # to write the compiler configuration to `libtool'. | |
6677 | m4_defun([_LT_LANG_F77_CONFIG], | |
6678 | [AC_REQUIRE([_LT_PROG_F77])dnl | |
6679 | AC_LANG_PUSH(Fortran 77) | |
6680 | ||
6681 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
6682 | _LT_TAGVAR(allow_undefined_flag, $1)= | |
6683 | _LT_TAGVAR(always_export_symbols, $1)=no | |
6684 | _LT_TAGVAR(archive_expsym_cmds, $1)= | |
6685 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | |
6686 | _LT_TAGVAR(hardcode_direct, $1)=no | |
6687 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | |
6688 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
6689 | _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= | |
6690 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | |
6691 | _LT_TAGVAR(hardcode_minus_L, $1)=no | |
6692 | _LT_TAGVAR(hardcode_automatic, $1)=no | |
6693 | _LT_TAGVAR(inherit_rpath, $1)=no | |
6694 | _LT_TAGVAR(module_cmds, $1)= | |
6695 | _LT_TAGVAR(module_expsym_cmds, $1)= | |
6696 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | |
6697 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
6698 | _LT_TAGVAR(no_undefined_flag, $1)= | |
6699 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
6700 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | |
6701 | ||
6702 | # Source file extension for f77 test sources. | |
6703 | ac_ext=f | |
6704 | ||
6705 | # Object file extension for compiled f77 test sources. | |
6706 | objext=o | |
6707 | _LT_TAGVAR(objext, $1)=$objext | |
6708 | ||
6709 | # No sense in running all these tests if we already determined that | |
6710 | # the F77 compiler isn't working. Some variables (like enable_shared) | |
6711 | # are currently assumed to apply to all compilers on this platform, | |
6712 | # and will be corrupted by setting them based on a non-working compiler. | |
6713 | if test "$_lt_disable_F77" != yes; then | |
6714 | # Code to be used in simple compile tests | |
6715 | lt_simple_compile_test_code="\ | |
6716 | subroutine t | |
6717 | return | |
6718 | end | |
6719 | " | |
6720 | ||
6721 | # Code to be used in simple link tests | |
6722 | lt_simple_link_test_code="\ | |
6723 | program t | |
6724 | end | |
6725 | " | |
6726 | ||
6727 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
6728 | _LT_TAG_COMPILER | |
6729 | ||
6730 | # save warnings/boilerplate of simple test code | |
6731 | _LT_COMPILER_BOILERPLATE | |
6732 | _LT_LINKER_BOILERPLATE | |
6733 | ||
6734 | # Allow CC to be a program name with arguments. | |
6735 | lt_save_CC="$CC" | |
6736 | lt_save_GCC=$GCC | |
6737 | CC=${F77-"f77"} | |
6738 | compiler=$CC | |
6739 | _LT_TAGVAR(compiler, $1)=$CC | |
6740 | _LT_CC_BASENAME([$compiler]) | |
6741 | GCC=$G77 | |
6742 | if test -n "$compiler"; then | |
6743 | AC_MSG_CHECKING([if libtool supports shared libraries]) | |
6744 | AC_MSG_RESULT([$can_build_shared]) | |
6745 | ||
6746 | AC_MSG_CHECKING([whether to build shared libraries]) | |
6747 | test "$can_build_shared" = "no" && enable_shared=no | |
6748 | ||
6749 | # On AIX, shared libraries and static libraries use the same namespace, and | |
6750 | # are all built from PIC. | |
6751 | case $host_os in | |
6752 | aix3*) | |
6753 | test "$enable_shared" = yes && enable_static=no | |
6754 | if test -n "$RANLIB"; then | |
6755 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
6756 | postinstall_cmds='$RANLIB $lib' | |
6757 | fi | |
6758 | ;; | |
6759 | aix[[4-9]]*) | |
6760 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
6761 | test "$enable_shared" = yes && enable_static=no | |
6762 | fi | |
6763 | ;; | |
6764 | esac | |
6765 | AC_MSG_RESULT([$enable_shared]) | |
6766 | ||
6767 | AC_MSG_CHECKING([whether to build static libraries]) | |
6768 | # Make sure either enable_shared or enable_static is yes. | |
6769 | test "$enable_shared" = yes || enable_static=yes | |
6770 | AC_MSG_RESULT([$enable_static]) | |
6771 | ||
6772 | _LT_TAGVAR(GCC, $1)="$G77" | |
6773 | _LT_TAGVAR(LD, $1)="$LD" | |
6774 | ||
6775 | ## CAVEAT EMPTOR: | |
6776 | ## There is no encapsulation within the following macros, do not change | |
6777 | ## the running order or otherwise move them around unless you know exactly | |
6778 | ## what you are doing... | |
6779 | _LT_COMPILER_PIC($1) | |
6780 | _LT_COMPILER_C_O($1) | |
6781 | _LT_COMPILER_FILE_LOCKS($1) | |
6782 | _LT_LINKER_SHLIBS($1) | |
6783 | _LT_SYS_DYNAMIC_LINKER($1) | |
6784 | _LT_LINKER_HARDCODE_LIBPATH($1) | |
6785 | ||
6786 | _LT_CONFIG($1) | |
6787 | fi # test -n "$compiler" | |
6788 | ||
6789 | GCC=$lt_save_GCC | |
6790 | CC="$lt_save_CC" | |
6791 | fi # test "$_lt_disable_F77" != yes | |
6792 | ||
6793 | AC_LANG_POP | |
6794 | ])# _LT_LANG_F77_CONFIG | |
6795 | ||
6796 | ||
6797 | # _LT_PROG_FC | |
6798 | # ----------- | |
6799 | # Since AC_PROG_FC is broken, in that it returns the empty string | |
6800 | # if there is no fortran compiler, we have our own version here. | |
6801 | m4_defun([_LT_PROG_FC], | |
6802 | [ | |
6803 | pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) | |
6804 | AC_PROG_FC | |
6805 | if test -z "$FC" || test "X$FC" = "Xno"; then | |
6806 | _lt_disable_FC=yes | |
6807 | fi | |
6808 | popdef([AC_MSG_ERROR]) | |
6809 | ])# _LT_PROG_FC | |
6810 | ||
6811 | dnl aclocal-1.4 backwards compatibility: | |
6812 | dnl AC_DEFUN([_LT_PROG_FC], []) | |
6813 | ||
6814 | ||
6815 | # _LT_LANG_FC_CONFIG([TAG]) | |
6816 | # ------------------------- | |
6817 | # Ensure that the configuration variables for a Fortran compiler are | |
6818 | # suitably defined. These variables are subsequently used by _LT_CONFIG | |
6819 | # to write the compiler configuration to `libtool'. | |
6820 | m4_defun([_LT_LANG_FC_CONFIG], | |
6821 | [AC_REQUIRE([_LT_PROG_FC])dnl | |
6822 | AC_LANG_PUSH(Fortran) | |
6823 | ||
6824 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
6825 | _LT_TAGVAR(allow_undefined_flag, $1)= | |
6826 | _LT_TAGVAR(always_export_symbols, $1)=no | |
6827 | _LT_TAGVAR(archive_expsym_cmds, $1)= | |
6828 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | |
6829 | _LT_TAGVAR(hardcode_direct, $1)=no | |
6830 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | |
6831 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
6832 | _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= | |
6833 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | |
6834 | _LT_TAGVAR(hardcode_minus_L, $1)=no | |
6835 | _LT_TAGVAR(hardcode_automatic, $1)=no | |
6836 | _LT_TAGVAR(inherit_rpath, $1)=no | |
6837 | _LT_TAGVAR(module_cmds, $1)= | |
6838 | _LT_TAGVAR(module_expsym_cmds, $1)= | |
6839 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | |
6840 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
6841 | _LT_TAGVAR(no_undefined_flag, $1)= | |
6842 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
6843 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | |
6844 | ||
6845 | # Source file extension for fc test sources. | |
6846 | ac_ext=${ac_fc_srcext-f} | |
6847 | ||
6848 | # Object file extension for compiled fc test sources. | |
6849 | objext=o | |
6850 | _LT_TAGVAR(objext, $1)=$objext | |
6851 | ||
6852 | # No sense in running all these tests if we already determined that | |
6853 | # the FC compiler isn't working. Some variables (like enable_shared) | |
6854 | # are currently assumed to apply to all compilers on this platform, | |
6855 | # and will be corrupted by setting them based on a non-working compiler. | |
6856 | if test "$_lt_disable_FC" != yes; then | |
6857 | # Code to be used in simple compile tests | |
6858 | lt_simple_compile_test_code="\ | |
6859 | subroutine t | |
6860 | return | |
6861 | end | |
6862 | " | |
6863 | ||
6864 | # Code to be used in simple link tests | |
6865 | lt_simple_link_test_code="\ | |
6866 | program t | |
6867 | end | |
6868 | " | |
6869 | ||
6870 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
6871 | _LT_TAG_COMPILER | |
6872 | ||
6873 | # save warnings/boilerplate of simple test code | |
6874 | _LT_COMPILER_BOILERPLATE | |
6875 | _LT_LINKER_BOILERPLATE | |
6876 | ||
6877 | # Allow CC to be a program name with arguments. | |
6878 | lt_save_CC="$CC" | |
6879 | lt_save_GCC=$GCC | |
6880 | CC=${FC-"f95"} | |
6881 | compiler=$CC | |
6882 | GCC=$ac_cv_fc_compiler_gnu | |
6883 | ||
6884 | _LT_TAGVAR(compiler, $1)=$CC | |
6885 | _LT_CC_BASENAME([$compiler]) | |
6886 | ||
6887 | if test -n "$compiler"; then | |
6888 | AC_MSG_CHECKING([if libtool supports shared libraries]) | |
6889 | AC_MSG_RESULT([$can_build_shared]) | |
6890 | ||
6891 | AC_MSG_CHECKING([whether to build shared libraries]) | |
6892 | test "$can_build_shared" = "no" && enable_shared=no | |
6893 | ||
6894 | # On AIX, shared libraries and static libraries use the same namespace, and | |
6895 | # are all built from PIC. | |
6896 | case $host_os in | |
6897 | aix3*) | |
6898 | test "$enable_shared" = yes && enable_static=no | |
6899 | if test -n "$RANLIB"; then | |
6900 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
6901 | postinstall_cmds='$RANLIB $lib' | |
6902 | fi | |
6903 | ;; | |
6904 | aix[[4-9]]*) | |
6905 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
6906 | test "$enable_shared" = yes && enable_static=no | |
6907 | fi | |
6908 | ;; | |
6909 | esac | |
6910 | AC_MSG_RESULT([$enable_shared]) | |
6911 | ||
6912 | AC_MSG_CHECKING([whether to build static libraries]) | |
6913 | # Make sure either enable_shared or enable_static is yes. | |
6914 | test "$enable_shared" = yes || enable_static=yes | |
6915 | AC_MSG_RESULT([$enable_static]) | |
6916 | ||
6917 | _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" | |
6918 | _LT_TAGVAR(LD, $1)="$LD" | |
6919 | ||
6920 | ## CAVEAT EMPTOR: | |
6921 | ## There is no encapsulation within the following macros, do not change | |
6922 | ## the running order or otherwise move them around unless you know exactly | |
6923 | ## what you are doing... | |
6924 | _LT_SYS_HIDDEN_LIBDEPS($1) | |
6925 | _LT_COMPILER_PIC($1) | |
6926 | _LT_COMPILER_C_O($1) | |
6927 | _LT_COMPILER_FILE_LOCKS($1) | |
6928 | _LT_LINKER_SHLIBS($1) | |
6929 | _LT_SYS_DYNAMIC_LINKER($1) | |
6930 | _LT_LINKER_HARDCODE_LIBPATH($1) | |
6931 | ||
6932 | _LT_CONFIG($1) | |
6933 | fi # test -n "$compiler" | |
6934 | ||
6935 | GCC=$lt_save_GCC | |
6936 | CC="$lt_save_CC" | |
6937 | fi # test "$_lt_disable_FC" != yes | |
6938 | ||
6939 | AC_LANG_POP | |
6940 | ])# _LT_LANG_FC_CONFIG | |
6941 | ||
6942 | ||
6943 | # _LT_LANG_GCJ_CONFIG([TAG]) | |
6944 | # -------------------------- | |
6945 | # Ensure that the configuration variables for the GNU Java Compiler compiler | |
6946 | # are suitably defined. These variables are subsequently used by _LT_CONFIG | |
6947 | # to write the compiler configuration to `libtool'. | |
6948 | m4_defun([_LT_LANG_GCJ_CONFIG], | |
6949 | [AC_REQUIRE([LT_PROG_GCJ])dnl | |
6950 | AC_LANG_SAVE | |
6951 | ||
6952 | # Source file extension for Java test sources. | |
6953 | ac_ext=java | |
6954 | ||
6955 | # Object file extension for compiled Java test sources. | |
6956 | objext=o | |
6957 | _LT_TAGVAR(objext, $1)=$objext | |
6958 | ||
6959 | # Code to be used in simple compile tests | |
6960 | lt_simple_compile_test_code="class foo {}" | |
6961 | ||
6962 | # Code to be used in simple link tests | |
6963 | lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' | |
6964 | ||
6965 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
6966 | _LT_TAG_COMPILER | |
6967 | ||
6968 | # save warnings/boilerplate of simple test code | |
6969 | _LT_COMPILER_BOILERPLATE | |
6970 | _LT_LINKER_BOILERPLATE | |
6971 | ||
6972 | # Allow CC to be a program name with arguments. | |
6973 | lt_save_CC="$CC" | |
6974 | lt_save_GCC=$GCC | |
6975 | GCC=yes | |
6976 | CC=${GCJ-"gcj"} | |
6977 | compiler=$CC | |
6978 | _LT_TAGVAR(compiler, $1)=$CC | |
6979 | _LT_TAGVAR(LD, $1)="$LD" | |
6980 | _LT_CC_BASENAME([$compiler]) | |
6981 | ||
6982 | # GCJ did not exist at the time GCC didn't implicitly link libc in. | |
6983 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
6984 | ||
6985 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
6986 | ||
6987 | if test -n "$compiler"; then | |
6988 | _LT_COMPILER_NO_RTTI($1) | |
6989 | _LT_COMPILER_PIC($1) | |
6990 | _LT_COMPILER_C_O($1) | |
6991 | _LT_COMPILER_FILE_LOCKS($1) | |
6992 | _LT_LINKER_SHLIBS($1) | |
6993 | _LT_LINKER_HARDCODE_LIBPATH($1) | |
6994 | ||
6995 | _LT_CONFIG($1) | |
6996 | fi | |
6997 | ||
6998 | AC_LANG_RESTORE | |
6999 | ||
7000 | GCC=$lt_save_GCC | |
7001 | CC="$lt_save_CC" | |
7002 | ])# _LT_LANG_GCJ_CONFIG | |
7003 | ||
7004 | ||
7005 | # _LT_LANG_RC_CONFIG([TAG]) | |
7006 | # ------------------------- | |
7007 | # Ensure that the configuration variables for the Windows resource compiler | |
7008 | # are suitably defined. These variables are subsequently used by _LT_CONFIG | |
7009 | # to write the compiler configuration to `libtool'. | |
7010 | m4_defun([_LT_LANG_RC_CONFIG], | |
7011 | [AC_REQUIRE([LT_PROG_RC])dnl | |
7012 | AC_LANG_SAVE | |
7013 | ||
7014 | # Source file extension for RC test sources. | |
7015 | ac_ext=rc | |
7016 | ||
7017 | # Object file extension for compiled RC test sources. | |
7018 | objext=o | |
7019 | _LT_TAGVAR(objext, $1)=$objext | |
7020 | ||
7021 | # Code to be used in simple compile tests | |
7022 | lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' | |
7023 | ||
7024 | # Code to be used in simple link tests | |
7025 | lt_simple_link_test_code="$lt_simple_compile_test_code" | |
7026 | ||
7027 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
7028 | _LT_TAG_COMPILER | |
7029 | ||
7030 | # save warnings/boilerplate of simple test code | |
7031 | _LT_COMPILER_BOILERPLATE | |
7032 | _LT_LINKER_BOILERPLATE | |
7033 | ||
7034 | # Allow CC to be a program name with arguments. | |
7035 | lt_save_CC="$CC" | |
7036 | lt_save_GCC=$GCC | |
7037 | GCC= | |
7038 | CC=${RC-"windres"} | |
7039 | compiler=$CC | |
7040 | _LT_TAGVAR(compiler, $1)=$CC | |
7041 | _LT_CC_BASENAME([$compiler]) | |
7042 | _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | |
7043 | ||
7044 | if test -n "$compiler"; then | |
7045 | : | |
7046 | _LT_CONFIG($1) | |
7047 | fi | |
7048 | ||
7049 | GCC=$lt_save_GCC | |
7050 | AC_LANG_RESTORE | |
7051 | CC="$lt_save_CC" | |
7052 | ])# _LT_LANG_RC_CONFIG | |
7053 | ||
7054 | ||
7055 | # LT_PROG_GCJ | |
7056 | # ----------- | |
7057 | AC_DEFUN([LT_PROG_GCJ], | |
7058 | [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], | |
7059 | [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], | |
7060 | [AC_CHECK_TOOL(GCJ, gcj,) | |
7061 | test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" | |
7062 | AC_SUBST(GCJFLAGS)])])[]dnl | |
7063 | ]) | |
7064 | ||
7065 | # Old name: | |
7066 | AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) | |
7067 | dnl aclocal-1.4 backwards compatibility: | |
7068 | dnl AC_DEFUN([LT_AC_PROG_GCJ], []) | |
7069 | ||
7070 | ||
7071 | # LT_PROG_RC | |
7072 | # ---------- | |
7073 | AC_DEFUN([LT_PROG_RC], | |
7074 | [AC_CHECK_TOOL(RC, windres,) | |
7075 | ]) | |
7076 | ||
7077 | # Old name: | |
7078 | AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) | |
7079 | dnl aclocal-1.4 backwards compatibility: | |
7080 | dnl AC_DEFUN([LT_AC_PROG_RC], []) | |
7081 | ||
7082 | ||
7083 | # _LT_DECL_EGREP | |
7084 | # -------------- | |
7085 | # If we don't have a new enough Autoconf to choose the best grep | |
7086 | # available, choose the one first in the user's PATH. | |
7087 | m4_defun([_LT_DECL_EGREP], | |
7088 | [AC_REQUIRE([AC_PROG_EGREP])dnl | |
7089 | AC_REQUIRE([AC_PROG_FGREP])dnl | |
7090 | test -z "$GREP" && GREP=grep | |
7091 | _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) | |
7092 | _LT_DECL([], [EGREP], [1], [An ERE matcher]) | |
7093 | _LT_DECL([], [FGREP], [1], [A literal string matcher]) | |
7094 | dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too | |
7095 | AC_SUBST([GREP]) | |
7096 | ]) | |
7097 | ||
7098 | ||
7099 | # _LT_DECL_OBJDUMP | |
7100 | # -------------- | |
7101 | # If we don't have a new enough Autoconf to choose the best objdump | |
7102 | # available, choose the one first in the user's PATH. | |
7103 | m4_defun([_LT_DECL_OBJDUMP], | |
7104 | [AC_CHECK_TOOL(OBJDUMP, objdump, false) | |
7105 | test -z "$OBJDUMP" && OBJDUMP=objdump | |
7106 | _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) | |
7107 | AC_SUBST([OBJDUMP]) | |
7108 | ]) | |
7109 | ||
7110 | ||
7111 | # _LT_DECL_SED | |
7112 | # ------------ | |
7113 | # Check for a fully-functional sed program, that truncates | |
7114 | # as few characters as possible. Prefer GNU sed if found. | |
7115 | m4_defun([_LT_DECL_SED], | |
7116 | [AC_PROG_SED | |
7117 | test -z "$SED" && SED=sed | |
7118 | Xsed="$SED -e 1s/^X//" | |
7119 | _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) | |
7120 | _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], | |
7121 | [Sed that helps us avoid accidentally triggering echo(1) options like -n]) | |
7122 | ])# _LT_DECL_SED | |
7123 | ||
7124 | m4_ifndef([AC_PROG_SED], [ | |
7125 | # NOTE: This macro has been submitted for inclusion into # | |
7126 | # GNU Autoconf as AC_PROG_SED. When it is available in # | |
7127 | # a released version of Autoconf we should remove this # | |
7128 | # macro and use it instead. # | |
7129 | ||
7130 | m4_defun([AC_PROG_SED], | |
7131 | [AC_MSG_CHECKING([for a sed that does not truncate output]) | |
7132 | AC_CACHE_VAL(lt_cv_path_SED, | |
7133 | [# Loop through the user's path and test for sed and gsed. | |
7134 | # Then use that list of sed's as ones to test for truncation. | |
7135 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7136 | for as_dir in $PATH | |
7137 | do | |
7138 | IFS=$as_save_IFS | |
7139 | test -z "$as_dir" && as_dir=. | |
7140 | for lt_ac_prog in sed gsed; do | |
7141 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7142 | if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then | |
7143 | lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" | |
7144 | fi | |
7145 | done | |
7146 | done | |
7147 | done | |
7148 | IFS=$as_save_IFS | |
7149 | lt_ac_max=0 | |
7150 | lt_ac_count=0 | |
7151 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris | |
7152 | # along with /bin/sed that truncates output. | |
7153 | for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do | |
7154 | test ! -f $lt_ac_sed && continue | |
7155 | cat /dev/null > conftest.in | |
7156 | lt_ac_count=0 | |
7157 | echo $ECHO_N "0123456789$ECHO_C" >conftest.in | |
7158 | # Check for GNU sed and select it if it is found. | |
7159 | if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then | |
7160 | lt_cv_path_SED=$lt_ac_sed | |
7161 | break | |
7162 | fi | |
7163 | while true; do | |
7164 | cat conftest.in conftest.in >conftest.tmp | |
7165 | mv conftest.tmp conftest.in | |
7166 | cp conftest.in conftest.nl | |
7167 | echo >>conftest.nl | |
7168 | $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break | |
7169 | cmp -s conftest.out conftest.nl || break | |
7170 | # 10000 chars as input seems more than enough | |
7171 | test $lt_ac_count -gt 10 && break | |
7172 | lt_ac_count=`expr $lt_ac_count + 1` | |
7173 | if test $lt_ac_count -gt $lt_ac_max; then | |
7174 | lt_ac_max=$lt_ac_count | |
7175 | lt_cv_path_SED=$lt_ac_sed | |
7176 | fi | |
7177 | done | |
7178 | done | |
7179 | ]) | |
7180 | SED=$lt_cv_path_SED | |
7181 | AC_SUBST([SED]) | |
7182 | AC_MSG_RESULT([$SED]) | |
7183 | ])#AC_PROG_SED | |
7184 | ])#m4_ifndef | |
7185 | ||
7186 | # Old name: | |
7187 | AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) | |
7188 | dnl aclocal-1.4 backwards compatibility: | |
7189 | dnl AC_DEFUN([LT_AC_PROG_SED], []) | |
7190 | ||
7191 | ||
7192 | # _LT_CHECK_SHELL_FEATURES | |
7193 | # ------------------------ | |
7194 | # Find out whether the shell is Bourne or XSI compatible, | |
7195 | # or has some other useful features. | |
7196 | m4_defun([_LT_CHECK_SHELL_FEATURES], | |
7197 | [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) | |
7198 | # Try some XSI features | |
7199 | xsi_shell=no | |
7200 | ( _lt_dummy="a/b/c" | |
7201 | test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ | |
7202 | = c,a/b,, \ | |
7203 | && eval 'test $(( 1 + 1 )) -eq 2 \ | |
7204 | && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ | |
7205 | && xsi_shell=yes | |
7206 | AC_MSG_RESULT([$xsi_shell]) | |
7207 | _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) | |
7208 | ||
7209 | AC_MSG_CHECKING([whether the shell understands "+="]) | |
7210 | lt_shell_append=no | |
7211 | ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ | |
7212 | >/dev/null 2>&1 \ | |
7213 | && lt_shell_append=yes | |
7214 | AC_MSG_RESULT([$lt_shell_append]) | |
7215 | _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) | |
7216 | ||
7217 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | |
7218 | lt_unset=unset | |
7219 | else | |
7220 | lt_unset=false | |
7221 | fi | |
7222 | _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl | |
7223 | ||
7224 | # test EBCDIC or ASCII | |
7225 | case `echo X|tr X '\101'` in | |
7226 | A) # ASCII based system | |
7227 | # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr | |
7228 | lt_SP2NL='tr \040 \012' | |
7229 | lt_NL2SP='tr \015\012 \040\040' | |
7230 | ;; | |
7231 | *) # EBCDIC based system | |
7232 | lt_SP2NL='tr \100 \n' | |
7233 | lt_NL2SP='tr \r\n \100\100' | |
7234 | ;; | |
7235 | esac | |
7236 | _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl | |
7237 | _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl | |
7238 | ])# _LT_CHECK_SHELL_FEATURES | |
7239 | ||
7240 | ||
7241 | # _LT_PROG_XSI_SHELLFNS | |
7242 | # --------------------- | |
7243 | # Bourne and XSI compatible variants of some useful shell functions. | |
7244 | m4_defun([_LT_PROG_XSI_SHELLFNS], | |
7245 | [case $xsi_shell in | |
7246 | yes) | |
7247 | cat << \_LT_EOF >> "$cfgfile" | |
7248 | ||
7249 | # func_dirname file append nondir_replacement | |
7250 | # Compute the dirname of FILE. If nonempty, add APPEND to the result, | |
7251 | # otherwise set result to NONDIR_REPLACEMENT. | |
7252 | func_dirname () | |
7253 | { | |
7254 | case ${1} in | |
7255 | */*) func_dirname_result="${1%/*}${2}" ;; | |
7256 | * ) func_dirname_result="${3}" ;; | |
7257 | esac | |
7258 | } | |
7259 | ||
7260 | # func_basename file | |
7261 | func_basename () | |
7262 | { | |
7263 | func_basename_result="${1##*/}" | |
7264 | } | |
7265 | ||
7266 | # func_dirname_and_basename file append nondir_replacement | |
7267 | # perform func_basename and func_dirname in a single function | |
7268 | # call: | |
7269 | # dirname: Compute the dirname of FILE. If nonempty, | |
7270 | # add APPEND to the result, otherwise set result | |
7271 | # to NONDIR_REPLACEMENT. | |
7272 | # value returned in "$func_dirname_result" | |
7273 | # basename: Compute filename of FILE. | |
7274 | # value retuned in "$func_basename_result" | |
7275 | # Implementation must be kept synchronized with func_dirname | |
7276 | # and func_basename. For efficiency, we do not delegate to | |
7277 | # those functions but instead duplicate the functionality here. | |
7278 | func_dirname_and_basename () | |
7279 | { | |
7280 | case ${1} in | |
7281 | */*) func_dirname_result="${1%/*}${2}" ;; | |
7282 | * ) func_dirname_result="${3}" ;; | |
7283 | esac | |
7284 | func_basename_result="${1##*/}" | |
7285 | } | |
7286 | ||
7287 | # func_stripname prefix suffix name | |
7288 | # strip PREFIX and SUFFIX off of NAME. | |
7289 | # PREFIX and SUFFIX must not contain globbing or regex special | |
7290 | # characters, hashes, percent signs, but SUFFIX may contain a leading | |
7291 | # dot (in which case that matches only a dot). | |
7292 | func_stripname () | |
7293 | { | |
7294 | # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are | |
7295 | # positional parameters, so assign one to ordinary parameter first. | |
7296 | func_stripname_result=${3} | |
7297 | func_stripname_result=${func_stripname_result#"${1}"} | |
7298 | func_stripname_result=${func_stripname_result%"${2}"} | |
7299 | } | |
7300 | ||
7301 | # func_opt_split | |
7302 | func_opt_split () | |
7303 | { | |
7304 | func_opt_split_opt=${1%%=*} | |
7305 | func_opt_split_arg=${1#*=} | |
7306 | } | |
7307 | ||
7308 | # func_lo2o object | |
7309 | func_lo2o () | |
7310 | { | |
7311 | case ${1} in | |
7312 | *.lo) func_lo2o_result=${1%.lo}.${objext} ;; | |
7313 | *) func_lo2o_result=${1} ;; | |
7314 | esac | |
7315 | } | |
7316 | ||
7317 | # func_xform libobj-or-source | |
7318 | func_xform () | |
7319 | { | |
7320 | func_xform_result=${1%.*}.lo | |
7321 | } | |
7322 | ||
7323 | # func_arith arithmetic-term... | |
7324 | func_arith () | |
7325 | { | |
7326 | func_arith_result=$(( $[*] )) | |
7327 | } | |
7328 | ||
7329 | # func_len string | |
7330 | # STRING may not start with a hyphen. | |
7331 | func_len () | |
7332 | { | |
7333 | func_len_result=${#1} | |
7334 | } | |
7335 | ||
7336 | _LT_EOF | |
7337 | ;; | |
7338 | *) # Bourne compatible functions. | |
7339 | cat << \_LT_EOF >> "$cfgfile" | |
7340 | ||
7341 | # func_dirname file append nondir_replacement | |
7342 | # Compute the dirname of FILE. If nonempty, add APPEND to the result, | |
7343 | # otherwise set result to NONDIR_REPLACEMENT. | |
7344 | func_dirname () | |
7345 | { | |
7346 | # Extract subdirectory from the argument. | |
7347 | func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` | |
7348 | if test "X$func_dirname_result" = "X${1}"; then | |
7349 | func_dirname_result="${3}" | |
7350 | else | |
7351 | func_dirname_result="$func_dirname_result${2}" | |
7352 | fi | |
7353 | } | |
7354 | ||
7355 | # func_basename file | |
7356 | func_basename () | |
7357 | { | |
7358 | func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` | |
7359 | } | |
7360 | ||
7361 | dnl func_dirname_and_basename | |
7362 | dnl A portable version of this function is already defined in general.m4sh | |
7363 | dnl so there is no need for it here. | |
7364 | ||
7365 | # func_stripname prefix suffix name | |
7366 | # strip PREFIX and SUFFIX off of NAME. | |
7367 | # PREFIX and SUFFIX must not contain globbing or regex special | |
7368 | # characters, hashes, percent signs, but SUFFIX may contain a leading | |
7369 | # dot (in which case that matches only a dot). | |
7370 | # func_strip_suffix prefix name | |
7371 | func_stripname () | |
7372 | { | |
7373 | case ${2} in | |
7374 | .*) func_stripname_result=`$ECHO "X${3}" \ | |
7375 | | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; | |
7376 | *) func_stripname_result=`$ECHO "X${3}" \ | |
7377 | | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; | |
7378 | esac | |
7379 | } | |
7380 | ||
7381 | # sed scripts: | |
7382 | my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' | |
7383 | my_sed_long_arg='1s/^-[[^=]]*=//' | |
7384 | ||
7385 | # func_opt_split | |
7386 | func_opt_split () | |
7387 | { | |
7388 | func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` | |
7389 | func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` | |
7390 | } | |
7391 | ||
7392 | # func_lo2o object | |
7393 | func_lo2o () | |
7394 | { | |
7395 | func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` | |
7396 | } | |
7397 | ||
7398 | # func_xform libobj-or-source | |
7399 | func_xform () | |
7400 | { | |
7401 | func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` | |
7402 | } | |
7403 | ||
7404 | # func_arith arithmetic-term... | |
7405 | func_arith () | |
7406 | { | |
7407 | func_arith_result=`expr "$[@]"` | |
7408 | } | |
7409 | ||
7410 | # func_len string | |
7411 | # STRING may not start with a hyphen. | |
7412 | func_len () | |
7413 | { | |
7414 | func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` | |
7415 | } | |
7416 | ||
7417 | _LT_EOF | |
7418 | esac | |
7419 | ||
7420 | case $lt_shell_append in | |
7421 | yes) | |
7422 | cat << \_LT_EOF >> "$cfgfile" | |
7423 | ||
7424 | # func_append var value | |
7425 | # Append VALUE to the end of shell variable VAR. | |
7426 | func_append () | |
7427 | { | |
7428 | eval "$[1]+=\$[2]" | |
7429 | } | |
7430 | _LT_EOF | |
7431 | ;; | |
7432 | *) | |
7433 | cat << \_LT_EOF >> "$cfgfile" | |
7434 | ||
7435 | # func_append var value | |
7436 | # Append VALUE to the end of shell variable VAR. | |
7437 | func_append () | |
7438 | { | |
7439 | eval "$[1]=\$$[1]\$[2]" | |
7440 | } | |
7441 | ||
7442 | _LT_EOF | |
7443 | ;; | |
7444 | esac | |
7445 | ]) | |
7446 | ||
7447 | # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- | |
7448 | # | |
7449 | # Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc. | |
7450 | # Written by Thomas Tanner, 1999 | |
7451 | # | |
7452 | # This file is free software; the Free Software Foundation gives | |
7453 | # unlimited permission to copy and/or distribute it, with or without | |
7454 | # modifications, as long as this notice is preserved. | |
7455 | ||
7456 | # serial 17 LTDL_INIT | |
7457 | ||
7458 | # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) | |
7459 | # ------------------------------------------ | |
7460 | # DIRECTORY contains the libltdl sources. It is okay to call this | |
7461 | # function multiple times, as long as the same DIRECTORY is always given. | |
7462 | AC_DEFUN([LT_CONFIG_LTDL_DIR], | |
7463 | [AC_BEFORE([$0], [LTDL_INIT]) | |
7464 | _$0($*) | |
7465 | ])# LT_CONFIG_LTDL_DIR | |
7466 | ||
7467 | # We break this out into a separate macro, so that we can call it safely | |
7468 | # internally without being caught accidentally by the sed scan in libtoolize. | |
7469 | m4_defun([_LT_CONFIG_LTDL_DIR], | |
7470 | [dnl remove trailing slashes | |
7471 | m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$])) | |
7472 | m4_case(_LTDL_DIR, | |
7473 | [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.' | |
7474 | m4_if(_ARG_DIR, [.], | |
7475 | [], | |
7476 | [m4_define([_LTDL_DIR], _ARG_DIR) | |
7477 | _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])], | |
7478 | [m4_if(_ARG_DIR, _LTDL_DIR, | |
7479 | [], | |
7480 | [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])]) | |
7481 | m4_popdef([_ARG_DIR]) | |
7482 | ])# _LT_CONFIG_LTDL_DIR | |
7483 | ||
7484 | # Initialise: | |
7485 | m4_define([_LTDL_DIR], []) | |
7486 | ||
7487 | ||
7488 | # _LT_BUILD_PREFIX | |
7489 | # ---------------- | |
7490 | # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise | |
7491 | # to `${top_builddir}/'. | |
7492 | m4_define([_LT_BUILD_PREFIX], | |
7493 | [m4_ifdef([AC_AUTOCONF_VERSION], | |
7494 | [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]), | |
7495 | [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX], | |
7496 | [${top_build_prefix}], | |
7497 | [${top_builddir}/])], | |
7498 | [${top_build_prefix}])], | |
7499 | [${top_builddir}/])[]dnl | |
7500 | ]) | |
7501 | ||
7502 | ||
7503 | # LTDL_CONVENIENCE | |
7504 | # ---------------- | |
7505 | # sets LIBLTDL to the link flags for the libltdl convenience library and | |
7506 | # LTDLINCL to the include flags for the libltdl header and adds | |
7507 | # --enable-ltdl-convenience to the configure arguments. Note that | |
7508 | # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with | |
7509 | # '${top_build_prefix}' if available, otherwise with '${top_builddir}/', | |
7510 | # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single | |
7511 | # quotes!). If your package is not flat and you're not using automake, | |
7512 | # define top_build_prefix, top_builddir, and top_srcdir appropriately | |
7513 | # in your Makefiles. | |
7514 | AC_DEFUN([LTDL_CONVENIENCE], | |
7515 | [AC_BEFORE([$0], [LTDL_INIT])dnl | |
7516 | dnl Although the argument is deprecated and no longer documented, | |
7517 | dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one | |
7518 | dnl here make sure it is the same as any other declaration of libltdl's | |
7519 | dnl location! This also ensures lt_ltdl_dir is set when configure.ac is | |
7520 | dnl not yet using an explicit LT_CONFIG_LTDL_DIR. | |
7521 | m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl | |
7522 | _$0() | |
7523 | ])# LTDL_CONVENIENCE | |
7524 | ||
7525 | # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools, | |
7526 | # now we have LT_CONFIG_LTDL_DIR: | |
7527 | AU_DEFUN([AC_LIBLTDL_CONVENIENCE], | |
7528 | [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) | |
7529 | _LTDL_CONVENIENCE]) | |
7530 | ||
7531 | dnl aclocal-1.4 backwards compatibility: | |
7532 | dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], []) | |
7533 | ||
7534 | ||
7535 | # _LTDL_CONVENIENCE | |
7536 | # ----------------- | |
7537 | # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]). | |
7538 | m4_defun([_LTDL_CONVENIENCE], | |
7539 | [case $enable_ltdl_convenience in | |
7540 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; | |
7541 | "") enable_ltdl_convenience=yes | |
7542 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; | |
7543 | esac | |
7544 | LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la" | |
7545 | LTDLDEPS=$LIBLTDL | |
7546 | LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" | |
7547 | ||
7548 | AC_SUBST([LIBLTDL]) | |
7549 | AC_SUBST([LTDLDEPS]) | |
7550 | AC_SUBST([LTDLINCL]) | |
7551 | ||
7552 | # For backwards non-gettext consistent compatibility... | |
7553 | INCLTDL="$LTDLINCL" | |
7554 | AC_SUBST([INCLTDL]) | |
7555 | ])# _LTDL_CONVENIENCE | |
7556 | ||
7557 | ||
7558 | # LTDL_INSTALLABLE | |
7559 | # ---------------- | |
7560 | # sets LIBLTDL to the link flags for the libltdl installable library | |
7561 | # and LTDLINCL to the include flags for the libltdl header and adds | |
7562 | # --enable-ltdl-install to the configure arguments. Note that | |
7563 | # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl | |
7564 | # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if | |
7565 | # available, otherwise with '${top_builddir}/', and LTDLINCL will be | |
7566 | # prefixed with '${top_srcdir}/' (note the single quotes!). If your | |
7567 | # package is not flat and you're not using automake, define top_build_prefix, | |
7568 | # top_builddir, and top_srcdir appropriately in your Makefiles. | |
7569 | # In the future, this macro may have to be called after LT_INIT. | |
7570 | AC_DEFUN([LTDL_INSTALLABLE], | |
7571 | [AC_BEFORE([$0], [LTDL_INIT])dnl | |
7572 | dnl Although the argument is deprecated and no longer documented, | |
7573 | dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one | |
7574 | dnl here make sure it is the same as any other declaration of libltdl's | |
7575 | dnl location! This also ensures lt_ltdl_dir is set when configure.ac is | |
7576 | dnl not yet using an explicit LT_CONFIG_LTDL_DIR. | |
7577 | m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl | |
7578 | _$0() | |
7579 | ])# LTDL_INSTALLABLE | |
7580 | ||
7581 | # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools, | |
7582 | # now we have LT_CONFIG_LTDL_DIR: | |
7583 | AU_DEFUN([AC_LIBLTDL_INSTALLABLE], | |
7584 | [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) | |
7585 | _LTDL_INSTALLABLE]) | |
7586 | ||
7587 | dnl aclocal-1.4 backwards compatibility: | |
7588 | dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], []) | |
7589 | ||
7590 | ||
7591 | # _LTDL_INSTALLABLE | |
7592 | # ----------------- | |
7593 | # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]). | |
7594 | m4_defun([_LTDL_INSTALLABLE], | |
7595 | [if test -f $prefix/lib/libltdl.la; then | |
7596 | lt_save_LDFLAGS="$LDFLAGS" | |
7597 | LDFLAGS="-L$prefix/lib $LDFLAGS" | |
7598 | AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes]) | |
7599 | LDFLAGS="$lt_save_LDFLAGS" | |
7600 | if test x"${lt_lib_ltdl-no}" = xyes; then | |
7601 | if test x"$enable_ltdl_install" != xyes; then | |
7602 | # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install | |
7603 | AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install']) | |
7604 | enable_ltdl_install=no | |
7605 | fi | |
7606 | elif test x"$enable_ltdl_install" = xno; then | |
7607 | AC_MSG_WARN([libltdl not installed, but installation disabled]) | |
d9898ee8 | 7608 | fi |
8d138742 | 7609 | fi |
d9898ee8 | 7610 | |
8d138742 CE |
7611 | # If configure.ac declared an installable ltdl, and the user didn't override |
7612 | # with --disable-ltdl-install, we will install the shipped libltdl. | |
7613 | case $enable_ltdl_install in | |
7614 | no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no" | |
7615 | LIBLTDL="-lltdl" | |
7616 | LTDLDEPS= | |
7617 | LTDLINCL= | |
d9898ee8 | 7618 | ;; |
8d138742 CE |
7619 | *) enable_ltdl_install=yes |
7620 | ac_configure_args="$ac_configure_args --enable-ltdl-install" | |
7621 | LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la" | |
7622 | LTDLDEPS=$LIBLTDL | |
7623 | LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" | |
d9898ee8 | 7624 | ;; |
8d138742 | 7625 | esac |
d9898ee8 | 7626 | |
8d138742 CE |
7627 | AC_SUBST([LIBLTDL]) |
7628 | AC_SUBST([LTDLDEPS]) | |
7629 | AC_SUBST([LTDLINCL]) | |
d9898ee8 | 7630 | |
8d138742 CE |
7631 | # For backwards non-gettext consistent compatibility... |
7632 | INCLTDL="$LTDLINCL" | |
7633 | AC_SUBST([INCLTDL]) | |
7634 | ])# LTDL_INSTALLABLE | |
d9898ee8 | 7635 | |
d9898ee8 | 7636 | |
8d138742 CE |
7637 | # _LTDL_MODE_DISPATCH |
7638 | # ------------------- | |
7639 | m4_define([_LTDL_MODE_DISPATCH], | |
7640 | [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself: | |
7641 | m4_if(_LTDL_DIR, [], | |
7642 | [], | |
7643 | dnl if _LTDL_MODE was not set already, the default value is `subproject': | |
7644 | [m4_case(m4_default(_LTDL_MODE, [subproject]), | |
7645 | [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR) | |
7646 | _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])], | |
7647 | [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])], | |
7648 | [recursive], [], | |
7649 | [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl | |
7650 | dnl Be careful not to expand twice: | |
7651 | m4_define([$0], []) | |
7652 | ])# _LTDL_MODE_DISPATCH | |
7653 | ||
7654 | ||
7655 | # _LT_LIBOBJ(MODULE_NAME) | |
7656 | # ----------------------- | |
7657 | # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead | |
7658 | # of into LIBOBJS. | |
7659 | AC_DEFUN([_LT_LIBOBJ], [ | |
7660 | m4_pattern_allow([^_LT_LIBOBJS$]) | |
7661 | _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" | |
7662 | ])# _LT_LIBOBJS | |
d9898ee8 | 7663 | |
d9898ee8 | 7664 | |
8d138742 CE |
7665 | # LTDL_INIT([OPTIONS]) |
7666 | # -------------------- | |
7667 | # Clients of libltdl can use this macro to allow the installer to | |
7668 | # choose between a shipped copy of the ltdl sources or a preinstalled | |
7669 | # version of the library. If the shipped ltdl sources are not in a | |
7670 | # subdirectory named libltdl, the directory name must be given by | |
7671 | # LT_CONFIG_LTDL_DIR. | |
7672 | AC_DEFUN([LTDL_INIT], | |
7673 | [dnl Parse OPTIONS | |
7674 | _LT_SET_OPTIONS([$0], [$1]) | |
7675 | ||
7676 | dnl We need to keep our own list of libobjs separate from our parent project, | |
7677 | dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while | |
7678 | dnl we look for our own LIBOBJs. | |
7679 | m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) | |
7680 | m4_pushdef([AC_LIBSOURCES]) | |
7681 | ||
7682 | dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: | |
7683 | m4_if(_LTDL_MODE, [], | |
7684 | [m4_define([_LTDL_MODE], m4_default([$2], [subproject])) | |
7685 | m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])], | |
7686 | [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])]) | |
7687 | ||
7688 | AC_ARG_WITH([included_ltdl], | |
7689 | [AS_HELP_STRING([--with-included-ltdl], | |
7690 | [use the GNU ltdl sources included here])]) | |
7691 | ||
7692 | if test "x$with_included_ltdl" != xyes; then | |
7693 | # We are not being forced to use the included libltdl sources, so | |
7694 | # decide whether there is a useful installed version we can use. | |
7695 | AC_CHECK_HEADER([ltdl.h], | |
7696 | [AC_CHECK_DECL([lt_dlinterface_register], | |
7697 | [AC_CHECK_LIB([ltdl], [lt_dladvise_preload], | |
7698 | [with_included_ltdl=no], | |
7699 | [with_included_ltdl=yes])], | |
7700 | [with_included_ltdl=yes], | |
7701 | [AC_INCLUDES_DEFAULT | |
7702 | #include <ltdl.h>])], | |
7703 | [with_included_ltdl=yes], | |
7704 | [AC_INCLUDES_DEFAULT] | |
7705 | ) | |
7706 | fi | |
d9898ee8 | 7707 | |
8d138742 CE |
7708 | dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE |
7709 | dnl was called yet, then for old times' sake, we assume libltdl is in an | |
7710 | dnl eponymous directory: | |
7711 | AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])]) | |
d9898ee8 | 7712 | |
8d138742 CE |
7713 | AC_ARG_WITH([ltdl_include], |
7714 | [AS_HELP_STRING([--with-ltdl-include=DIR], | |
7715 | [use the ltdl headers installed in DIR])]) | |
7716 | ||
7717 | if test -n "$with_ltdl_include"; then | |
7718 | if test -f "$with_ltdl_include/ltdl.h"; then : | |
d9898ee8 | 7719 | else |
8d138742 CE |
7720 | AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include']) |
7721 | fi | |
7722 | else | |
7723 | with_ltdl_include=no | |
7724 | fi | |
d9898ee8 | 7725 | |
8d138742 CE |
7726 | AC_ARG_WITH([ltdl_lib], |
7727 | [AS_HELP_STRING([--with-ltdl-lib=DIR], | |
7728 | [use the libltdl.la installed in DIR])]) | |
d9898ee8 | 7729 | |
8d138742 CE |
7730 | if test -n "$with_ltdl_lib"; then |
7731 | if test -f "$with_ltdl_lib/libltdl.la"; then : | |
7732 | else | |
7733 | AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib']) | |
7734 | fi | |
7735 | else | |
7736 | with_ltdl_lib=no | |
7737 | fi | |
7738 | ||
7739 | case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in | |
7740 | ,yes,no,no,) | |
7741 | m4_case(m4_default(_LTDL_TYPE, [convenience]), | |
7742 | [convenience], [_LTDL_CONVENIENCE], | |
7743 | [installable], [_LTDL_INSTALLABLE], | |
7744 | [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)]) | |
d9898ee8 | 7745 | ;; |
8d138742 CE |
7746 | ,no,no,no,) |
7747 | # If the included ltdl is not to be used, then use the | |
7748 | # preinstalled libltdl we found. | |
7749 | AC_DEFINE([HAVE_LTDL], [1], | |
7750 | [Define this if a modern libltdl is already installed]) | |
7751 | LIBLTDL=-lltdl | |
7752 | LTDLDEPS= | |
7753 | LTDLINCL= | |
d9898ee8 | 7754 | ;; |
8d138742 CE |
7755 | ,no*,no,*) |
7756 | AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together]) | |
7757 | ;; | |
7758 | *) with_included_ltdl=no | |
7759 | LIBLTDL="-L$with_ltdl_lib -lltdl" | |
7760 | LTDLDEPS= | |
7761 | LTDLINCL="-I$with_ltdl_include" | |
7762 | ;; | |
7763 | esac | |
7764 | INCLTDL="$LTDLINCL" | |
7765 | ||
7766 | # Report our decision... | |
7767 | AC_MSG_CHECKING([where to find libltdl headers]) | |
7768 | AC_MSG_RESULT([$LTDLINCL]) | |
7769 | AC_MSG_CHECKING([where to find libltdl library]) | |
7770 | AC_MSG_RESULT([$LIBLTDL]) | |
7771 | ||
7772 | _LTDL_SETUP | |
7773 | ||
7774 | dnl restore autoconf definition. | |
7775 | m4_popdef([AC_LIBOBJ]) | |
7776 | m4_popdef([AC_LIBSOURCES]) | |
7777 | ||
7778 | AC_CONFIG_COMMANDS_PRE([ | |
7779 | _ltdl_libobjs= | |
7780 | _ltdl_ltlibobjs= | |
7781 | if test -n "$_LT_LIBOBJS"; then | |
7782 | # Remove the extension. | |
7783 | _lt_sed_drop_objext='s/\.o$//;s/\.obj$//' | |
7784 | for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do | |
7785 | _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext" | |
7786 | _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo" | |
7787 | done | |
7788 | fi | |
7789 | AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs]) | |
7790 | AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs]) | |
7791 | ]) | |
d9898ee8 | 7792 | |
8d138742 CE |
7793 | # Only expand once: |
7794 | m4_define([LTDL_INIT]) | |
7795 | ])# LTDL_INIT | |
d9898ee8 | 7796 | |
8d138742 CE |
7797 | # Old names: |
7798 | AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)]) | |
7799 | AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)]) | |
7800 | AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)]) | |
7801 | dnl aclocal-1.4 backwards compatibility: | |
7802 | dnl AC_DEFUN([AC_LIB_LTDL], []) | |
7803 | dnl AC_DEFUN([AC_WITH_LTDL], []) | |
7804 | dnl AC_DEFUN([LT_WITH_LTDL], []) | |
d9898ee8 | 7805 | |
d9898ee8 | 7806 | |
8d138742 CE |
7807 | # _LTDL_SETUP |
7808 | # ----------- | |
7809 | # Perform all the checks necessary for compilation of the ltdl objects | |
7810 | # -- including compiler checks and header checks. This is a public | |
7811 | # interface mainly for the benefit of libltdl's own configure.ac, most | |
7812 | # other users should call LTDL_INIT instead. | |
7813 | AC_DEFUN([_LTDL_SETUP], | |
7814 | [AC_REQUIRE([AC_PROG_CC])dnl | |
7815 | AC_REQUIRE([LT_SYS_MODULE_EXT])dnl | |
7816 | AC_REQUIRE([LT_SYS_MODULE_PATH])dnl | |
7817 | AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl | |
7818 | AC_REQUIRE([LT_LIB_DLLOAD])dnl | |
7819 | AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl | |
7820 | AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl | |
7821 | AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl | |
7822 | AC_REQUIRE([gl_FUNC_ARGZ])dnl | |
7823 | ||
7824 | m4_require([_LT_CHECK_OBJDIR])dnl | |
7825 | m4_require([_LT_HEADER_DLFCN])dnl | |
7826 | m4_require([_LT_CHECK_DLPREOPEN])dnl | |
7827 | m4_require([_LT_DECL_SED])dnl | |
7828 | ||
7829 | dnl Don't require this, or it will be expanded earlier than the code | |
7830 | dnl that sets the variables it relies on: | |
7831 | _LT_ENABLE_INSTALL | |
7832 | ||
7833 | dnl _LTDL_MODE specific code must be called at least once: | |
7834 | _LTDL_MODE_DISPATCH | |
7835 | ||
7836 | # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS | |
7837 | # the user used. This is so that ltdl.h can pick up the parent projects | |
7838 | # config.h file, The first file in AC_CONFIG_HEADERS must contain the | |
7839 | # definitions required by ltdl.c. | |
7840 | # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility). | |
7841 | AC_CONFIG_COMMANDS_PRE([dnl | |
7842 | m4_pattern_allow([^LT_CONFIG_H$])dnl | |
7843 | m4_ifset([AH_HEADER], | |
7844 | [LT_CONFIG_H=AH_HEADER], | |
7845 | [m4_ifset([AC_LIST_HEADERS], | |
7846 | [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`], | |
7847 | [])])]) | |
7848 | AC_SUBST([LT_CONFIG_H]) | |
7849 | ||
7850 | AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h], | |
7851 | [], [], [AC_INCLUDES_DEFAULT]) | |
7852 | ||
7853 | AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) | |
7854 | AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) | |
7855 | ||
7856 | AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) | |
7857 | ||
7858 | name=ltdl | |
7859 | LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` | |
7860 | AC_SUBST([LTDLOPEN]) | |
7861 | ])# _LTDL_SETUP | |
7862 | ||
7863 | ||
7864 | # _LT_ENABLE_INSTALL | |
7865 | # ------------------ | |
7866 | m4_define([_LT_ENABLE_INSTALL], | |
7867 | [AC_ARG_ENABLE([ltdl-install], | |
7868 | [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])]) | |
d9898ee8 | 7869 | |
8d138742 CE |
7870 | case ,${enable_ltdl_install},${enable_ltdl_convenience} in |
7871 | *yes*) ;; | |
7872 | *) enable_ltdl_convenience=yes ;; | |
7873 | esac | |
ac40fd9e | 7874 | |
8d138742 CE |
7875 | m4_ifdef([AM_CONDITIONAL], |
7876 | [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) | |
7877 | AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)]) | |
7878 | ])# _LT_ENABLE_INSTALL | |
d9898ee8 | 7879 | |
d9898ee8 | 7880 | |
8d138742 CE |
7881 | # LT_SYS_DLOPEN_DEPLIBS |
7882 | # --------------------- | |
7883 | AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], | |
7884 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
7885 | AC_CACHE_CHECK([whether deplibs are loaded by dlopen], | |
7886 | [lt_cv_sys_dlopen_deplibs], | |
7887 | [# PORTME does your system automatically load deplibs for dlopen? | |
7888 | # or its logical equivalent (e.g. shl_load for HP-UX < 11) | |
7889 | # For now, we just catch OSes we know something about -- in the | |
7890 | # future, we'll try test this programmatically. | |
7891 | lt_cv_sys_dlopen_deplibs=unknown | |
7892 | case $host_os in | |
7893 | aix3*|aix4.1.*|aix4.2.*) | |
7894 | # Unknown whether this is true for these versions of AIX, but | |
7895 | # we want this `case' here to explicitly catch those versions. | |
7896 | lt_cv_sys_dlopen_deplibs=unknown | |
7897 | ;; | |
7898 | aix[[4-9]]*) | |
7899 | lt_cv_sys_dlopen_deplibs=yes | |
7900 | ;; | |
7901 | amigaos*) | |
7902 | case $host_cpu in | |
7903 | powerpc) | |
7904 | lt_cv_sys_dlopen_deplibs=no | |
d9898ee8 | 7905 | ;; |
8d138742 CE |
7906 | esac |
7907 | ;; | |
7908 | darwin*) | |
7909 | # Assuming the user has installed a libdl from somewhere, this is true | |
7910 | # If you are looking for one http://www.opendarwin.org/projects/dlcompat | |
7911 | lt_cv_sys_dlopen_deplibs=yes | |
7912 | ;; | |
7913 | freebsd* | dragonfly*) | |
7914 | lt_cv_sys_dlopen_deplibs=yes | |
7915 | ;; | |
7916 | gnu* | linux* | k*bsd*-gnu) | |
7917 | # GNU and its variants, using gnu ld.so (Glibc) | |
7918 | lt_cv_sys_dlopen_deplibs=yes | |
7919 | ;; | |
7920 | hpux10*|hpux11*) | |
7921 | lt_cv_sys_dlopen_deplibs=yes | |
7922 | ;; | |
7923 | interix*) | |
7924 | lt_cv_sys_dlopen_deplibs=yes | |
7925 | ;; | |
7926 | irix[[12345]]*|irix6.[[01]]*) | |
7927 | # Catch all versions of IRIX before 6.2, and indicate that we don't | |
7928 | # know how it worked for any of those versions. | |
7929 | lt_cv_sys_dlopen_deplibs=unknown | |
7930 | ;; | |
7931 | irix*) | |
7932 | # The case above catches anything before 6.2, and it's known that | |
7933 | # at 6.2 and later dlopen does load deplibs. | |
7934 | lt_cv_sys_dlopen_deplibs=yes | |
7935 | ;; | |
7936 | netbsd*) | |
7937 | lt_cv_sys_dlopen_deplibs=yes | |
7938 | ;; | |
7939 | openbsd*) | |
7940 | lt_cv_sys_dlopen_deplibs=yes | |
7941 | ;; | |
7942 | osf[[1234]]*) | |
7943 | # dlopen did load deplibs (at least at 4.x), but until the 5.x series, | |
7944 | # it did *not* use an RPATH in a shared library to find objects the | |
7945 | # library depends on, so we explicitly say `no'. | |
7946 | lt_cv_sys_dlopen_deplibs=no | |
7947 | ;; | |
7948 | osf5.0|osf5.0a|osf5.1) | |
7949 | # dlopen *does* load deplibs and with the right loader patch applied | |
7950 | # it even uses RPATH in a shared library to search for shared objects | |
7951 | # that the library depends on, but there's no easy way to know if that | |
7952 | # patch is installed. Since this is the case, all we can really | |
7953 | # say is unknown -- it depends on the patch being installed. If | |
7954 | # it is, this changes to `yes'. Without it, it would be `no'. | |
7955 | lt_cv_sys_dlopen_deplibs=unknown | |
7956 | ;; | |
7957 | osf*) | |
7958 | # the two cases above should catch all versions of osf <= 5.1. Read | |
7959 | # the comments above for what we know about them. | |
7960 | # At > 5.1, deplibs are loaded *and* any RPATH in a shared library | |
7961 | # is used to find them so we can finally say `yes'. | |
7962 | lt_cv_sys_dlopen_deplibs=yes | |
7963 | ;; | |
7964 | qnx*) | |
7965 | lt_cv_sys_dlopen_deplibs=yes | |
7966 | ;; | |
7967 | solaris*) | |
7968 | lt_cv_sys_dlopen_deplibs=yes | |
7969 | ;; | |
7970 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | |
7971 | libltdl_cv_sys_dlopen_deplibs=yes | |
7972 | ;; | |
7973 | esac | |
7974 | ]) | |
7975 | if test "$lt_cv_sys_dlopen_deplibs" != yes; then | |
7976 | AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], | |
7977 | [Define if the OS needs help to load dependent libraries for dlopen().]) | |
7978 | fi | |
7979 | ])# LT_SYS_DLOPEN_DEPLIBS | |
d9898ee8 | 7980 | |
8d138742 CE |
7981 | # Old name: |
7982 | AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS]) | |
7983 | dnl aclocal-1.4 backwards compatibility: | |
7984 | dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], []) | |
d9898ee8 | 7985 | |
d9898ee8 | 7986 | |
8d138742 CE |
7987 | # LT_SYS_MODULE_EXT |
7988 | # ----------------- | |
7989 | AC_DEFUN([LT_SYS_MODULE_EXT], | |
7990 | [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl | |
7991 | AC_CACHE_CHECK([which extension is used for runtime loadable modules], | |
7992 | [libltdl_cv_shlibext], | |
7993 | [ | |
7994 | module=yes | |
7995 | eval libltdl_cv_shlibext=$shrext_cmds | |
7996 | ]) | |
7997 | if test -n "$libltdl_cv_shlibext"; then | |
7998 | m4_pattern_allow([LT_MODULE_EXT])dnl | |
7999 | AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"], | |
8000 | [Define to the extension used for runtime loadable modules, say, ".so".]) | |
8001 | fi | |
8002 | ])# LT_SYS_MODULE_EXT | |
8003 | ||
8004 | # Old name: | |
8005 | AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT]) | |
8006 | dnl aclocal-1.4 backwards compatibility: | |
8007 | dnl AC_DEFUN([AC_LTDL_SHLIBEXT], []) | |
8008 | ||
8009 | ||
8010 | # LT_SYS_MODULE_PATH | |
8011 | # ------------------ | |
8012 | AC_DEFUN([LT_SYS_MODULE_PATH], | |
8013 | [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl | |
8014 | AC_CACHE_CHECK([which variable specifies run-time module search path], | |
8015 | [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"]) | |
8016 | if test -n "$lt_cv_module_path_var"; then | |
8017 | m4_pattern_allow([LT_MODULE_PATH_VAR])dnl | |
8018 | AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"], | |
8019 | [Define to the name of the environment variable that determines the run-time module search path.]) | |
8020 | fi | |
8021 | ])# LT_SYS_MODULE_PATH | |
8022 | ||
8023 | # Old name: | |
8024 | AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH]) | |
8025 | dnl aclocal-1.4 backwards compatibility: | |
8026 | dnl AC_DEFUN([AC_LTDL_SHLIBPATH], []) | |
8027 | ||
8028 | ||
8029 | # LT_SYS_DLSEARCH_PATH | |
8030 | # -------------------- | |
8031 | AC_DEFUN([LT_SYS_DLSEARCH_PATH], | |
8032 | [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl | |
8033 | AC_CACHE_CHECK([for the default library search path], | |
8034 | [lt_cv_sys_dlsearch_path], | |
8035 | [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"]) | |
8036 | if test -n "$lt_cv_sys_dlsearch_path"; then | |
8037 | sys_dlsearch_path= | |
8038 | for dir in $lt_cv_sys_dlsearch_path; do | |
8039 | if test -z "$sys_dlsearch_path"; then | |
8040 | sys_dlsearch_path="$dir" | |
8041 | else | |
8042 | sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir" | |
8043 | fi | |
8044 | done | |
8045 | m4_pattern_allow([LT_DLSEARCH_PATH])dnl | |
8046 | AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"], | |
8047 | [Define to the system default library search path.]) | |
8048 | fi | |
8049 | ])# LT_SYS_DLSEARCH_PATH | |
8050 | ||
8051 | # Old name: | |
8052 | AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH]) | |
8053 | dnl aclocal-1.4 backwards compatibility: | |
8054 | dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], []) | |
d9898ee8 | 8055 | |
d9898ee8 | 8056 | |
8d138742 CE |
8057 | # _LT_CHECK_DLPREOPEN |
8058 | # ------------------- | |
8059 | m4_defun([_LT_CHECK_DLPREOPEN], | |
8060 | [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl | |
8061 | AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], | |
8062 | [libltdl_cv_preloaded_symbols], | |
8063 | [if test -n "$lt_cv_sys_global_symbol_pipe"; then | |
8064 | libltdl_cv_preloaded_symbols=yes | |
8065 | else | |
8066 | libltdl_cv_preloaded_symbols=no | |
d9898ee8 | 8067 | fi |
8d138742 CE |
8068 | ]) |
8069 | if test x"$libltdl_cv_preloaded_symbols" = xyes; then | |
8070 | AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1], | |
8071 | [Define if libtool can extract symbol lists from object files.]) | |
d9898ee8 | 8072 | fi |
8d138742 | 8073 | ])# _LT_CHECK_DLPREOPEN |
d9898ee8 | 8074 | |
d9898ee8 | 8075 | |
8d138742 CE |
8076 | # LT_LIB_DLLOAD |
8077 | # ------------- | |
8078 | AC_DEFUN([LT_LIB_DLLOAD], | |
8079 | [m4_pattern_allow([^LT_DLLOADERS$]) | |
8080 | LT_DLLOADERS= | |
8081 | AC_SUBST([LT_DLLOADERS]) | |
8082 | ||
8083 | AC_LANG_PUSH([C]) | |
8084 | ||
8085 | LIBADD_DLOPEN= | |
8086 | AC_SEARCH_LIBS([dlopen], [dl], | |
8087 | [AC_DEFINE([HAVE_LIBDL], [1], | |
8088 | [Define if you have the libdl library or equivalent.]) | |
8089 | if test "$ac_cv_search_dlopen" != "none required" ; then | |
8090 | LIBADD_DLOPEN="-ldl" | |
8091 | fi | |
8092 | libltdl_cv_lib_dl_dlopen="yes" | |
8093 | LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], | |
8094 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H | |
8095 | # include <dlfcn.h> | |
8096 | #endif | |
8097 | ]], [[dlopen(0, 0);]])], | |
8098 | [AC_DEFINE([HAVE_LIBDL], [1], | |
8099 | [Define if you have the libdl library or equivalent.]) | |
8100 | libltdl_cv_func_dlopen="yes" | |
8101 | LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], | |
8102 | [AC_CHECK_LIB([svld], [dlopen], | |
8103 | [AC_DEFINE([HAVE_LIBDL], [1], | |
8104 | [Define if you have the libdl library or equivalent.]) | |
8105 | LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes" | |
8106 | LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])]) | |
8107 | if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes | |
8108 | then | |
8109 | lt_save_LIBS="$LIBS" | |
8110 | LIBS="$LIBS $LIBADD_DLOPEN" | |
8111 | AC_CHECK_FUNCS([dlerror]) | |
8112 | LIBS="$lt_save_LIBS" | |
8113 | fi | |
8114 | AC_SUBST([LIBADD_DLOPEN]) | |
8115 | ||
8116 | LIBADD_SHL_LOAD= | |
8117 | AC_CHECK_FUNC([shl_load], | |
8118 | [AC_DEFINE([HAVE_SHL_LOAD], [1], | |
8119 | [Define if you have the shl_load function.]) | |
8120 | LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"], | |
8121 | [AC_CHECK_LIB([dld], [shl_load], | |
8122 | [AC_DEFINE([HAVE_SHL_LOAD], [1], | |
8123 | [Define if you have the shl_load function.]) | |
8124 | LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" | |
8125 | LIBADD_SHL_LOAD="-ldld"])]) | |
8126 | AC_SUBST([LIBADD_SHL_LOAD]) | |
d9898ee8 | 8127 | |
8d138742 CE |
8128 | case $host_os in |
8129 | darwin[[1567]].*) | |
8130 | # We only want this for pre-Mac OS X 10.4. | |
8131 | AC_CHECK_FUNC([_dyld_func_lookup], | |
8132 | [AC_DEFINE([HAVE_DYLD], [1], | |
8133 | [Define if you have the _dyld_func_lookup function.]) | |
8134 | LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"]) | |
d9898ee8 | 8135 | ;; |
8d138742 CE |
8136 | beos*) |
8137 | LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" | |
d9898ee8 | 8138 | ;; |
8d138742 CE |
8139 | cygwin* | mingw* | os2* | pw32*) |
8140 | AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]]) | |
8141 | LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" | |
d9898ee8 | 8142 | ;; |
8d138742 | 8143 | esac |
d9898ee8 | 8144 | |
8d138742 CE |
8145 | AC_CHECK_LIB([dld], [dld_link], |
8146 | [AC_DEFINE([HAVE_DLD], [1], | |
8147 | [Define if you have the GNU dld library.]) | |
8148 | LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"]) | |
8149 | AC_SUBST([LIBADD_DLD_LINK]) | |
d9898ee8 | 8150 | |
8d138742 CE |
8151 | m4_pattern_allow([^LT_DLPREOPEN$]) |
8152 | LT_DLPREOPEN= | |
8153 | if test -n "$LT_DLLOADERS" | |
8154 | then | |
8155 | for lt_loader in $LT_DLLOADERS; do | |
8156 | LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader " | |
8157 | done | |
8158 | AC_DEFINE([HAVE_LIBDLLOADER], [1], | |
8159 | [Define if libdlloader will be built on this platform]) | |
8160 | fi | |
8161 | AC_SUBST([LT_DLPREOPEN]) | |
d9898ee8 | 8162 | |
8d138742 CE |
8163 | dnl This isn't used anymore, but set it for backwards compatibility |
8164 | LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD" | |
8165 | AC_SUBST([LIBADD_DL]) | |
d9898ee8 | 8166 | |
8d138742 CE |
8167 | AC_LANG_POP |
8168 | ])# LT_LIB_DLLOAD | |
d9898ee8 | 8169 | |
8d138742 CE |
8170 | # Old name: |
8171 | AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD]) | |
8172 | dnl aclocal-1.4 backwards compatibility: | |
8173 | dnl AC_DEFUN([AC_LTDL_DLLIB], []) | |
d9898ee8 | 8174 | |
d9898ee8 | 8175 | |
8d138742 CE |
8176 | # LT_SYS_SYMBOL_USCORE |
8177 | # -------------------- | |
8178 | # does the compiler prefix global symbols with an underscore? | |
8179 | AC_DEFUN([LT_SYS_SYMBOL_USCORE], | |
8180 | [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl | |
8181 | AC_CACHE_CHECK([for _ prefix in compiled symbols], | |
8182 | [lt_cv_sys_symbol_underscore], | |
8183 | [lt_cv_sys_symbol_underscore=no | |
8184 | cat > conftest.$ac_ext <<_LT_EOF | |
8185 | void nm_test_func(){} | |
8186 | int main(){nm_test_func;return 0;} | |
8187 | _LT_EOF | |
8188 | if AC_TRY_EVAL(ac_compile); then | |
8189 | # Now try to grab the symbols. | |
8190 | ac_nlist=conftest.nm | |
8191 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then | |
8192 | # See whether the symbols have a leading underscore. | |
8193 | if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then | |
8194 | lt_cv_sys_symbol_underscore=yes | |
d9898ee8 | 8195 | else |
8d138742 CE |
8196 | if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then |
8197 | : | |
8198 | else | |
8199 | echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD | |
8200 | fi | |
d9898ee8 | 8201 | fi |
8d138742 CE |
8202 | else |
8203 | echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD | |
8204 | fi | |
8205 | else | |
8206 | echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD | |
8207 | cat conftest.c >&AS_MESSAGE_LOG_FD | |
8208 | fi | |
8209 | rm -rf conftest* | |
8210 | ]) | |
8211 | sys_symbol_underscore=$lt_cv_sys_symbol_underscore | |
8212 | AC_SUBST([sys_symbol_underscore]) | |
8213 | ])# LT_SYS_SYMBOL_USCORE | |
d9898ee8 | 8214 | |
8d138742 CE |
8215 | # Old name: |
8216 | AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE]) | |
8217 | dnl aclocal-1.4 backwards compatibility: | |
8218 | dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], []) | |
d9898ee8 | 8219 | |
d9898ee8 | 8220 | |
8d138742 CE |
8221 | # LT_FUNC_DLSYM_USCORE |
8222 | # -------------------- | |
8223 | AC_DEFUN([LT_FUNC_DLSYM_USCORE], | |
8224 | [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl | |
8225 | if test x"$lt_cv_sys_symbol_underscore" = xyes; then | |
8226 | if test x"$libltdl_cv_func_dlopen" = xyes || | |
8227 | test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then | |
8228 | AC_CACHE_CHECK([whether we have to add an underscore for dlsym], | |
8229 | [libltdl_cv_need_uscore], | |
8230 | [libltdl_cv_need_uscore=unknown | |
8231 | save_LIBS="$LIBS" | |
8232 | LIBS="$LIBS $LIBADD_DLOPEN" | |
8233 | _LT_TRY_DLOPEN_SELF( | |
8234 | [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], | |
8235 | [], [libltdl_cv_need_uscore=cross]) | |
8236 | LIBS="$save_LIBS" | |
8237 | ]) | |
8238 | fi | |
8239 | fi | |
d9898ee8 | 8240 | |
8d138742 CE |
8241 | if test x"$libltdl_cv_need_uscore" = xyes; then |
8242 | AC_DEFINE([NEED_USCORE], [1], | |
8243 | [Define if dlsym() requires a leading underscore in symbol names.]) | |
8244 | fi | |
8245 | ])# LT_FUNC_DLSYM_USCORE | |
d9898ee8 | 8246 | |
8d138742 CE |
8247 | # Old name: |
8248 | AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE]) | |
8249 | dnl aclocal-1.4 backwards compatibility: | |
8250 | dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], []) | |
d9898ee8 | 8251 | |
8d138742 CE |
8252 | # Helper functions for option handling. -*- Autoconf -*- |
8253 | # | |
8254 | # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. | |
8255 | # Written by Gary V. Vaughan, 2004 | |
8256 | # | |
8257 | # This file is free software; the Free Software Foundation gives | |
8258 | # unlimited permission to copy and/or distribute it, with or without | |
8259 | # modifications, as long as this notice is preserved. | |
d9898ee8 | 8260 | |
8d138742 | 8261 | # serial 6 ltoptions.m4 |
d9898ee8 | 8262 | |
8d138742 CE |
8263 | # This is to help aclocal find these macros, as it can't see m4_define. |
8264 | AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) | |
d9898ee8 | 8265 | |
d9898ee8 | 8266 | |
8d138742 CE |
8267 | # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) |
8268 | # ------------------------------------------ | |
8269 | m4_define([_LT_MANGLE_OPTION], | |
8270 | [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) | |
d9898ee8 | 8271 | |
d9898ee8 | 8272 | |
8d138742 CE |
8273 | # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) |
8274 | # --------------------------------------- | |
8275 | # Set option OPTION-NAME for macro MACRO-NAME, and if there is a | |
8276 | # matching handler defined, dispatch to it. Other OPTION-NAMEs are | |
8277 | # saved as a flag. | |
8278 | m4_define([_LT_SET_OPTION], | |
8279 | [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl | |
8280 | m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), | |
8281 | _LT_MANGLE_DEFUN([$1], [$2]), | |
8282 | [m4_warning([Unknown $1 option `$2'])])[]dnl | |
8283 | ]) | |
d9898ee8 | 8284 | |
d9898ee8 | 8285 | |
8d138742 CE |
8286 | # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) |
8287 | # ------------------------------------------------------------ | |
8288 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | |
8289 | m4_define([_LT_IF_OPTION], | |
8290 | [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) | |
8291 | ||
8292 | ||
8293 | # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) | |
8294 | # ------------------------------------------------------- | |
8295 | # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME | |
8296 | # are set. | |
8297 | m4_define([_LT_UNLESS_OPTIONS], | |
8298 | [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), | |
8299 | [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), | |
8300 | [m4_define([$0_found])])])[]dnl | |
8301 | m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 | |
8302 | ])[]dnl | |
8303 | ]) | |
d9898ee8 | 8304 | |
d9898ee8 | 8305 | |
8d138742 CE |
8306 | # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) |
8307 | # ---------------------------------------- | |
8308 | # OPTION-LIST is a space-separated list of Libtool options associated | |
8309 | # with MACRO-NAME. If any OPTION has a matching handler declared with | |
8310 | # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about | |
8311 | # the unknown option and exit. | |
8312 | m4_defun([_LT_SET_OPTIONS], | |
8313 | [# Set options | |
8314 | m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), | |
8315 | [_LT_SET_OPTION([$1], _LT_Option)]) | |
8316 | ||
8317 | m4_if([$1],[LT_INIT],[ | |
8318 | dnl | |
8319 | dnl Simply set some default values (i.e off) if boolean options were not | |
8320 | dnl specified: | |
8321 | _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no | |
8322 | ]) | |
8323 | _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no | |
8324 | ]) | |
8325 | dnl | |
8326 | dnl If no reference was made to various pairs of opposing options, then | |
8327 | dnl we run the default mode handler for the pair. For example, if neither | |
8328 | dnl `shared' nor `disable-shared' was passed, we enable building of shared | |
8329 | dnl archives by default: | |
8330 | _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) | |
8331 | _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) | |
8332 | _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) | |
8333 | _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], | |
8334 | [_LT_ENABLE_FAST_INSTALL]) | |
8335 | ]) | |
8336 | ])# _LT_SET_OPTIONS | |
8337 | ||
d9898ee8 | 8338 | |
d9898ee8 | 8339 | |
8d138742 CE |
8340 | # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) |
8341 | # ----------------------------------------- | |
8342 | m4_define([_LT_MANGLE_DEFUN], | |
8343 | [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) | |
d9898ee8 | 8344 | |
d9898ee8 | 8345 | |
8d138742 CE |
8346 | # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) |
8347 | # ----------------------------------------------- | |
8348 | m4_define([LT_OPTION_DEFINE], | |
8349 | [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl | |
8350 | ])# LT_OPTION_DEFINE | |
d9898ee8 | 8351 | |
d9898ee8 | 8352 | |
8d138742 CE |
8353 | # dlopen |
8354 | # ------ | |
8355 | LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes | |
8356 | ]) | |
d9898ee8 | 8357 | |
8d138742 CE |
8358 | AU_DEFUN([AC_LIBTOOL_DLOPEN], |
8359 | [_LT_SET_OPTION([LT_INIT], [dlopen]) | |
8360 | AC_DIAGNOSE([obsolete], | |
8361 | [$0: Remove this warning and the call to _LT_SET_OPTION when you | |
8362 | put the `dlopen' option into LT_INIT's first parameter.]) | |
8363 | ]) | |
d9898ee8 | 8364 | |
8d138742 CE |
8365 | dnl aclocal-1.4 backwards compatibility: |
8366 | dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) | |
d9898ee8 | 8367 | |
d9898ee8 | 8368 | |
8d138742 CE |
8369 | # win32-dll |
8370 | # --------- | |
8371 | # Declare package support for building win32 dll's. | |
8372 | LT_OPTION_DEFINE([LT_INIT], [win32-dll], | |
8373 | [enable_win32_dll=yes | |
d9898ee8 | 8374 | |
8d138742 CE |
8375 | case $host in |
8376 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) | |
8377 | AC_CHECK_TOOL(AS, as, false) | |
8378 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) | |
8379 | AC_CHECK_TOOL(OBJDUMP, objdump, false) | |
8380 | ;; | |
8381 | esac | |
d9898ee8 | 8382 | |
8d138742 CE |
8383 | test -z "$AS" && AS=as |
8384 | _LT_DECL([], [AS], [0], [Assembler program])dnl | |
d9898ee8 | 8385 | |
8d138742 CE |
8386 | test -z "$DLLTOOL" && DLLTOOL=dlltool |
8387 | _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl | |
d9898ee8 | 8388 | |
8d138742 CE |
8389 | test -z "$OBJDUMP" && OBJDUMP=objdump |
8390 | _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl | |
8391 | ])# win32-dll | |
d9898ee8 | 8392 | |
8d138742 CE |
8393 | AU_DEFUN([AC_LIBTOOL_WIN32_DLL], |
8394 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
8395 | _LT_SET_OPTION([LT_INIT], [win32-dll]) | |
8396 | AC_DIAGNOSE([obsolete], | |
8397 | [$0: Remove this warning and the call to _LT_SET_OPTION when you | |
8398 | put the `win32-dll' option into LT_INIT's first parameter.]) | |
8399 | ]) | |
d9898ee8 | 8400 | |
8d138742 CE |
8401 | dnl aclocal-1.4 backwards compatibility: |
8402 | dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) | |
8403 | ||
8404 | ||
8405 | # _LT_ENABLE_SHARED([DEFAULT]) | |
8406 | # ---------------------------- | |
8407 | # implement the --enable-shared flag, and supports the `shared' and | |
8408 | # `disable-shared' LT_INIT options. | |
8409 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
8410 | m4_define([_LT_ENABLE_SHARED], | |
8411 | [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl | |
8412 | AC_ARG_ENABLE([shared], | |
8413 | [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], | |
8414 | [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], | |
8415 | [p=${PACKAGE-default} | |
8416 | case $enableval in | |
8417 | yes) enable_shared=yes ;; | |
8418 | no) enable_shared=no ;; | |
8419 | *) | |
8420 | enable_shared=no | |
8421 | # Look at the argument we got. We use all the common list separators. | |
8422 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
8423 | for pkg in $enableval; do | |
8424 | IFS="$lt_save_ifs" | |
8425 | if test "X$pkg" = "X$p"; then | |
8426 | enable_shared=yes | |
8427 | fi | |
8428 | done | |
8429 | IFS="$lt_save_ifs" | |
d9898ee8 | 8430 | ;; |
8d138742 CE |
8431 | esac], |
8432 | [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) | |
d9898ee8 | 8433 | |
8d138742 CE |
8434 | _LT_DECL([build_libtool_libs], [enable_shared], [0], |
8435 | [Whether or not to build shared libraries]) | |
8436 | ])# _LT_ENABLE_SHARED | |
d9898ee8 | 8437 | |
8d138742 CE |
8438 | LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) |
8439 | LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) | |
d9898ee8 | 8440 | |
8d138742 CE |
8441 | # Old names: |
8442 | AC_DEFUN([AC_ENABLE_SHARED], | |
8443 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) | |
8444 | ]) | |
d9898ee8 | 8445 | |
8d138742 CE |
8446 | AC_DEFUN([AC_DISABLE_SHARED], |
8447 | [_LT_SET_OPTION([LT_INIT], [disable-shared]) | |
8448 | ]) | |
d9898ee8 | 8449 | |
8d138742 CE |
8450 | AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
8451 | AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) | |
d9898ee8 | 8452 | |
8d138742 CE |
8453 | dnl aclocal-1.4 backwards compatibility: |
8454 | dnl AC_DEFUN([AM_ENABLE_SHARED], []) | |
8455 | dnl AC_DEFUN([AM_DISABLE_SHARED], []) | |
d9898ee8 | 8456 | |
d9898ee8 | 8457 | |
d9898ee8 | 8458 | |
8d138742 CE |
8459 | # _LT_ENABLE_STATIC([DEFAULT]) |
8460 | # ---------------------------- | |
8461 | # implement the --enable-static flag, and support the `static' and | |
8462 | # `disable-static' LT_INIT options. | |
8463 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
8464 | m4_define([_LT_ENABLE_STATIC], | |
8465 | [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl | |
8466 | AC_ARG_ENABLE([static], | |
8467 | [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], | |
8468 | [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], | |
8469 | [p=${PACKAGE-default} | |
8470 | case $enableval in | |
8471 | yes) enable_static=yes ;; | |
8472 | no) enable_static=no ;; | |
8473 | *) | |
8474 | enable_static=no | |
8475 | # Look at the argument we got. We use all the common list separators. | |
8476 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
8477 | for pkg in $enableval; do | |
8478 | IFS="$lt_save_ifs" | |
8479 | if test "X$pkg" = "X$p"; then | |
8480 | enable_static=yes | |
8481 | fi | |
8482 | done | |
8483 | IFS="$lt_save_ifs" | |
d9898ee8 | 8484 | ;; |
8d138742 CE |
8485 | esac], |
8486 | [enable_static=]_LT_ENABLE_STATIC_DEFAULT) | |
d9898ee8 | 8487 | |
8d138742 CE |
8488 | _LT_DECL([build_old_libs], [enable_static], [0], |
8489 | [Whether or not to build static libraries]) | |
8490 | ])# _LT_ENABLE_STATIC | |
d9898ee8 | 8491 | |
8d138742 CE |
8492 | LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) |
8493 | LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) | |
d9898ee8 | 8494 | |
8d138742 CE |
8495 | # Old names: |
8496 | AC_DEFUN([AC_ENABLE_STATIC], | |
8497 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) | |
8498 | ]) | |
d9898ee8 | 8499 | |
8d138742 CE |
8500 | AC_DEFUN([AC_DISABLE_STATIC], |
8501 | [_LT_SET_OPTION([LT_INIT], [disable-static]) | |
8502 | ]) | |
d9898ee8 | 8503 | |
8d138742 CE |
8504 | AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
8505 | AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) | |
d9898ee8 | 8506 | |
8d138742 CE |
8507 | dnl aclocal-1.4 backwards compatibility: |
8508 | dnl AC_DEFUN([AM_ENABLE_STATIC], []) | |
8509 | dnl AC_DEFUN([AM_DISABLE_STATIC], []) | |
8510 | ||
8511 | ||
8512 | ||
8513 | # _LT_ENABLE_FAST_INSTALL([DEFAULT]) | |
8514 | # ---------------------------------- | |
8515 | # implement the --enable-fast-install flag, and support the `fast-install' | |
8516 | # and `disable-fast-install' LT_INIT options. | |
8517 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
8518 | m4_define([_LT_ENABLE_FAST_INSTALL], | |
8519 | [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl | |
8520 | AC_ARG_ENABLE([fast-install], | |
8521 | [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], | |
8522 | [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], | |
8523 | [p=${PACKAGE-default} | |
8524 | case $enableval in | |
8525 | yes) enable_fast_install=yes ;; | |
8526 | no) enable_fast_install=no ;; | |
8527 | *) | |
8528 | enable_fast_install=no | |
8529 | # Look at the argument we got. We use all the common list separators. | |
8530 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
8531 | for pkg in $enableval; do | |
8532 | IFS="$lt_save_ifs" | |
8533 | if test "X$pkg" = "X$p"; then | |
8534 | enable_fast_install=yes | |
ac40fd9e | 8535 | fi |
8d138742 CE |
8536 | done |
8537 | IFS="$lt_save_ifs" | |
d9898ee8 | 8538 | ;; |
8d138742 CE |
8539 | esac], |
8540 | [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) | |
d9898ee8 | 8541 | |
8d138742 CE |
8542 | _LT_DECL([fast_install], [enable_fast_install], [0], |
8543 | [Whether or not to optimize for fast installation])dnl | |
8544 | ])# _LT_ENABLE_FAST_INSTALL | |
d9898ee8 | 8545 | |
8d138742 CE |
8546 | LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) |
8547 | LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) | |
d9898ee8 | 8548 | |
8d138742 CE |
8549 | # Old names: |
8550 | AU_DEFUN([AC_ENABLE_FAST_INSTALL], | |
8551 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) | |
8552 | AC_DIAGNOSE([obsolete], | |
8553 | [$0: Remove this warning and the call to _LT_SET_OPTION when you put | |
8554 | the `fast-install' option into LT_INIT's first parameter.]) | |
8555 | ]) | |
d9898ee8 | 8556 | |
8d138742 CE |
8557 | AU_DEFUN([AC_DISABLE_FAST_INSTALL], |
8558 | [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) | |
8559 | AC_DIAGNOSE([obsolete], | |
8560 | [$0: Remove this warning and the call to _LT_SET_OPTION when you put | |
8561 | the `disable-fast-install' option into LT_INIT's first parameter.]) | |
8562 | ]) | |
d9898ee8 | 8563 | |
8d138742 CE |
8564 | dnl aclocal-1.4 backwards compatibility: |
8565 | dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) | |
8566 | dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) | |
d9898ee8 | 8567 | |
d9898ee8 | 8568 | |
8d138742 CE |
8569 | # _LT_WITH_PIC([MODE]) |
8570 | # -------------------- | |
8571 | # implement the --with-pic flag, and support the `pic-only' and `no-pic' | |
8572 | # LT_INIT options. | |
8573 | # MODE is either `yes' or `no'. If omitted, it defaults to `both'. | |
8574 | m4_define([_LT_WITH_PIC], | |
8575 | [AC_ARG_WITH([pic], | |
8576 | [AS_HELP_STRING([--with-pic], | |
8577 | [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], | |
8578 | [pic_mode="$withval"], | |
8579 | [pic_mode=default]) | |
d9898ee8 | 8580 | |
8d138742 | 8581 | test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) |
d9898ee8 | 8582 | |
8d138742 CE |
8583 | _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl |
8584 | ])# _LT_WITH_PIC | |
d9898ee8 | 8585 | |
8d138742 CE |
8586 | LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) |
8587 | LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) | |
8588 | ||
8589 | # Old name: | |
8590 | AU_DEFUN([AC_LIBTOOL_PICMODE], | |
8591 | [_LT_SET_OPTION([LT_INIT], [pic-only]) | |
8592 | AC_DIAGNOSE([obsolete], | |
8593 | [$0: Remove this warning and the call to _LT_SET_OPTION when you | |
8594 | put the `pic-only' option into LT_INIT's first parameter.]) | |
d9898ee8 | 8595 | ]) |
d9898ee8 | 8596 | |
8d138742 CE |
8597 | dnl aclocal-1.4 backwards compatibility: |
8598 | dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) | |
d9898ee8 | 8599 | |
d9898ee8 | 8600 | |
8d138742 CE |
8601 | m4_define([_LTDL_MODE], []) |
8602 | LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], | |
8603 | [m4_define([_LTDL_MODE], [nonrecursive])]) | |
8604 | LT_OPTION_DEFINE([LTDL_INIT], [recursive], | |
8605 | [m4_define([_LTDL_MODE], [recursive])]) | |
8606 | LT_OPTION_DEFINE([LTDL_INIT], [subproject], | |
8607 | [m4_define([_LTDL_MODE], [subproject])]) | |
d9898ee8 | 8608 | |
8d138742 CE |
8609 | m4_define([_LTDL_TYPE], []) |
8610 | LT_OPTION_DEFINE([LTDL_INIT], [installable], | |
8611 | [m4_define([_LTDL_TYPE], [installable])]) | |
8612 | LT_OPTION_DEFINE([LTDL_INIT], [convenience], | |
8613 | [m4_define([_LTDL_TYPE], [convenience])]) | |
d9898ee8 | 8614 | |
8d138742 | 8615 | # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- |
d9898ee8 | 8616 | # |
8d138742 CE |
8617 | # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. |
8618 | # Written by Gary V. Vaughan, 2004 | |
d9898ee8 | 8619 | # |
8d138742 CE |
8620 | # This file is free software; the Free Software Foundation gives |
8621 | # unlimited permission to copy and/or distribute it, with or without | |
8622 | # modifications, as long as this notice is preserved. | |
d9898ee8 | 8623 | |
8d138742 | 8624 | # serial 6 ltsugar.m4 |
d9898ee8 | 8625 | |
8d138742 CE |
8626 | # This is to help aclocal find these macros, as it can't see m4_define. |
8627 | AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) | |
d9898ee8 | 8628 | |
8629 | ||
8d138742 CE |
8630 | # lt_join(SEP, ARG1, [ARG2...]) |
8631 | # ----------------------------- | |
8632 | # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their | |
8633 | # associated separator. | |
8634 | # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier | |
8635 | # versions in m4sugar had bugs. | |
8636 | m4_define([lt_join], | |
8637 | [m4_if([$#], [1], [], | |
8638 | [$#], [2], [[$2]], | |
8639 | [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) | |
8640 | m4_define([_lt_join], | |
8641 | [m4_if([$#$2], [2], [], | |
8642 | [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) | |
8643 | ||
8644 | ||
8645 | # lt_car(LIST) | |
8646 | # lt_cdr(LIST) | |
8647 | # ------------ | |
8648 | # Manipulate m4 lists. | |
8649 | # These macros are necessary as long as will still need to support | |
8650 | # Autoconf-2.59 which quotes differently. | |
8651 | m4_define([lt_car], [[$1]]) | |
8652 | m4_define([lt_cdr], | |
8653 | [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], | |
8654 | [$#], 1, [], | |
8655 | [m4_dquote(m4_shift($@))])]) | |
8656 | m4_define([lt_unquote], $1) | |
8657 | ||
8658 | ||
8659 | # lt_append(MACRO-NAME, STRING, [SEPARATOR]) | |
8660 | # ------------------------------------------ | |
8661 | # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. | |
8662 | # Note that neither SEPARATOR nor STRING are expanded; they are appended | |
8663 | # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). | |
8664 | # No SEPARATOR is output if MACRO-NAME was previously undefined (different | |
8665 | # than defined and empty). | |
8666 | # | |
8667 | # This macro is needed until we can rely on Autoconf 2.62, since earlier | |
8668 | # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. | |
8669 | m4_define([lt_append], | |
8670 | [m4_define([$1], | |
8671 | m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) | |
8672 | ||
8673 | ||
8674 | ||
8675 | # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) | |
8676 | # ---------------------------------------------------------- | |
8677 | # Produce a SEP delimited list of all paired combinations of elements of | |
8678 | # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list | |
8679 | # has the form PREFIXmINFIXSUFFIXn. | |
8680 | # Needed until we can rely on m4_combine added in Autoconf 2.62. | |
8681 | m4_define([lt_combine], | |
8682 | [m4_if(m4_eval([$# > 3]), [1], | |
8683 | [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl | |
8684 | [[m4_foreach([_Lt_prefix], [$2], | |
8685 | [m4_foreach([_Lt_suffix], | |
8686 | ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, | |
8687 | [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) | |
8688 | ||
8689 | ||
8690 | # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) | |
8691 | # ----------------------------------------------------------------------- | |
8692 | # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited | |
8693 | # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. | |
8694 | m4_define([lt_if_append_uniq], | |
8695 | [m4_ifdef([$1], | |
8696 | [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], | |
8697 | [lt_append([$1], [$2], [$3])$4], | |
8698 | [$5])], | |
8699 | [lt_append([$1], [$2], [$3])$4])]) | |
8700 | ||
8701 | ||
8702 | # lt_dict_add(DICT, KEY, VALUE) | |
8703 | # ----------------------------- | |
8704 | m4_define([lt_dict_add], | |
8705 | [m4_define([$1($2)], [$3])]) | |
d9898ee8 | 8706 | |
d9898ee8 | 8707 | |
8d138742 CE |
8708 | # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) |
8709 | # -------------------------------------------- | |
8710 | m4_define([lt_dict_add_subkey], | |
8711 | [m4_define([$1($2:$3)], [$4])]) | |
d9898ee8 | 8712 | |
8d138742 CE |
8713 | |
8714 | # lt_dict_fetch(DICT, KEY, [SUBKEY]) | |
8715 | # ---------------------------------- | |
8716 | m4_define([lt_dict_fetch], | |
8717 | [m4_ifval([$3], | |
8718 | m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), | |
8719 | m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) | |
8720 | ||
8721 | ||
8722 | # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) | |
8723 | # ----------------------------------------------------------------- | |
8724 | m4_define([lt_if_dict_fetch], | |
8725 | [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], | |
8726 | [$5], | |
8727 | [$6])]) | |
8728 | ||
8729 | ||
8730 | # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) | |
8731 | # -------------------------------------------------------------- | |
8732 | m4_define([lt_dict_filter], | |
8733 | [m4_if([$5], [], [], | |
8734 | [lt_join(m4_quote(m4_default([$4], [[, ]])), | |
8735 | lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), | |
8736 | [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl | |
d9898ee8 | 8737 | ]) |
8738 | ||
8d138742 CE |
8739 | # ltversion.m4 -- version numbers -*- Autoconf -*- |
8740 | # | |
8741 | # Copyright (C) 2004 Free Software Foundation, Inc. | |
8742 | # Written by Scott James Remnant, 2004 | |
8743 | # | |
8744 | # This file is free software; the Free Software Foundation gives | |
8745 | # unlimited permission to copy and/or distribute it, with or without | |
8746 | # modifications, as long as this notice is preserved. | |
ac40fd9e | 8747 | |
8d138742 | 8748 | # Generated from ltversion.in. |
ac40fd9e | 8749 | |
8d138742 CE |
8750 | # serial 3012 ltversion.m4 |
8751 | # This file is part of GNU Libtool | |
ac40fd9e | 8752 | |
8d138742 CE |
8753 | m4_define([LT_PACKAGE_VERSION], [2.2.6]) |
8754 | m4_define([LT_PACKAGE_REVISION], [1.3012]) | |
ac40fd9e | 8755 | |
8d138742 CE |
8756 | AC_DEFUN([LTVERSION_VERSION], |
8757 | [macro_version='2.2.6' | |
8758 | macro_revision='1.3012' | |
8759 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) | |
8760 | _LT_DECL(, macro_revision, 0) | |
d9898ee8 | 8761 | ]) |
8762 | ||
8d138742 CE |
8763 | # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- |
8764 | # | |
8765 | # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. | |
8766 | # Written by Scott James Remnant, 2004. | |
8767 | # | |
8768 | # This file is free software; the Free Software Foundation gives | |
8769 | # unlimited permission to copy and/or distribute it, with or without | |
8770 | # modifications, as long as this notice is preserved. | |
8771 | ||
8772 | # serial 4 lt~obsolete.m4 | |
8773 | ||
8774 | # These exist entirely to fool aclocal when bootstrapping libtool. | |
8775 | # | |
8776 | # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) | |
8777 | # which have later been changed to m4_define as they aren't part of the | |
8778 | # exported API, or moved to Autoconf or Automake where they belong. | |
8779 | # | |
8780 | # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN | |
8781 | # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us | |
8782 | # using a macro with the same name in our local m4/libtool.m4 it'll | |
8783 | # pull the old libtool.m4 in (it doesn't see our shiny new m4_define | |
8784 | # and doesn't know about Autoconf macros at all.) | |
8785 | # | |
8786 | # So we provide this file, which has a silly filename so it's always | |
8787 | # included after everything else. This provides aclocal with the | |
8788 | # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything | |
8789 | # because those macros already exist, or will be overwritten later. | |
8790 | # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. | |
8791 | # | |
8792 | # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. | |
8793 | # Yes, that means every name once taken will need to remain here until | |
8794 | # we give up compatibility with versions before 1.7, at which point | |
8795 | # we need to keep only those names which we still refer to. | |
8796 | ||
8797 | # This is to help aclocal find these macros, as it can't see m4_define. | |
8798 | AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) | |
8799 | ||
8800 | m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) | |
8801 | m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) | |
8802 | m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) | |
8803 | m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) | |
8804 | m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) | |
8805 | m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) | |
8806 | m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) | |
8807 | m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) | |
8808 | m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) | |
8809 | m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) | |
8810 | m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) | |
8811 | m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) | |
8812 | m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) | |
8813 | m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) | |
8814 | m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) | |
8815 | m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) | |
8816 | m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) | |
8817 | m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) | |
8818 | m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) | |
8819 | m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) | |
8820 | m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) | |
8821 | m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) | |
8822 | m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) | |
8823 | m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) | |
8824 | m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) | |
8825 | m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) | |
8826 | m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) | |
8827 | m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) | |
8828 | m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) | |
8829 | m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) | |
8830 | m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) | |
8831 | m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) | |
8832 | m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) | |
8833 | m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) | |
8834 | m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) | |
8835 | m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) | |
8836 | m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) | |
8837 | m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) | |
8838 | m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) | |
8839 | m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) | |
8840 | m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) | |
8841 | m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) | |
8842 | m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) | |
8843 | m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) | |
8844 | m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) | |
8845 | m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) | |
8846 | m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) | |
8847 | m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) | |
8848 | m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) | |
8849 | m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) | |
8850 | m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) | |
8851 | m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) | |
8852 | m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) | |
8853 | m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) | |
8854 | m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) | |
8855 | ||
d9898ee8 | 8856 | # $Id: sysconftool.m4.in,v 1.2 2005/07/16 18:35:25 mrsam Exp $ |
8857 | # Configure sysconftool | |
8858 | # Copyright 2000-2005 Double Precision, Inc. See COPYING for | |
8859 | # distribution information. | |
8860 | # | |
8861 | # AC_PROG_SYSCONFTOOL | |
8862 | ||
8863 | AC_DEFUN([AC_PROG_SYSCONFTOOL], | |
8864 | [ | |
8865 | ||
8866 | AC_PATH_PROGS(SYSCONFTOOL_PERL, perl5 perl, perl) | |
8867 | ||
8868 | if test "$SYSCONFTOOL_PERL" = "perl" | |
8869 | then | |
8870 | AC_ERROR(perl not found - please install perl) | |
8871 | fi | |
8872 | ||
8873 | AC_MSG_CHECKING(for sysconftool...) | |
8874 | SYSCONFTOOL="" | |
8875 | for sysconf_dir in $ac_aux_dir . .. ../.. | |
8876 | do | |
8877 | if test -f $srcdir/$sysconf_dir/sysconftool | |
8878 | then | |
8879 | SYSCONFTOOL=$srcdir/$sysconf_dir/sysconftool | |
8880 | break | |
8881 | fi | |
8882 | done | |
8883 | ||
8884 | if test "$SYSCONFTOOL" = "" | |
8885 | then | |
8886 | AC_ERROR(sysconftool missing - not in the package) | |
8887 | fi | |
8888 | ||
8889 | AC_MSG_RESULT( $SYSCONFTOOL) | |
8890 | SYSCONFTOOL="$SYSCONFTOOL_PERL $SYSCONFTOOL" | |
8891 | AC_SUBST(SYSCONFTOOL) | |
8892 | ] | |
8893 | ) | |
8894 | ||
8d138742 | 8895 | # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
d9898ee8 | 8896 | # |
8897 | # This file is free software; the Free Software Foundation | |
8898 | # gives unlimited permission to copy and/or distribute it, | |
8899 | # with or without modifications, as long as this notice is preserved. | |
8900 | ||
8901 | # AM_AUTOMAKE_VERSION(VERSION) | |
8902 | # ---------------------------- | |
8903 | # Automake X.Y traces this macro to ensure aclocal.m4 has been | |
8904 | # generated from the m4 files accompanying Automake X.Y. | |
dd184caf | 8905 | # (This private macro should not be called outside this file.) |
8906 | AC_DEFUN([AM_AUTOMAKE_VERSION], | |
8d138742 | 8907 | [am__api_version='1.11' |
dd184caf | 8908 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
8909 | dnl require some minimum version. Point them to the right macro. | |
8d138742 | 8910 | m4_if([$1], [1.11], [], |
dd184caf | 8911 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
8912 | ]) | |
8913 | ||
8914 | # _AM_AUTOCONF_VERSION(VERSION) | |
8915 | # ----------------------------- | |
8916 | # aclocal traces this macro to find the Autoconf version. | |
8917 | # This is a private macro too. Using m4_define simplifies | |
8918 | # the logic in aclocal, which can simply ignore this definition. | |
8919 | m4_define([_AM_AUTOCONF_VERSION], []) | |
d9898ee8 | 8920 | |
8921 | # AM_SET_CURRENT_AUTOMAKE_VERSION | |
8922 | # ------------------------------- | |
dd184caf | 8923 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
8d138742 | 8924 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
d9898ee8 | 8925 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
8d138742 | 8926 | [AM_AUTOMAKE_VERSION([1.11])dnl |
ac40fd9e | 8927 | m4_ifndef([AC_AUTOCONF_VERSION], |
8928 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | |
8d138742 | 8929 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
d9898ee8 | 8930 | |
8931 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- | |
8932 | ||
8933 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. | |
8934 | # | |
8935 | # This file is free software; the Free Software Foundation | |
8936 | # gives unlimited permission to copy and/or distribute it, | |
8937 | # with or without modifications, as long as this notice is preserved. | |
8938 | ||
8939 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets | |
8940 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to | |
8941 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. | |
8942 | # | |
8943 | # Of course, Automake must honor this variable whenever it calls a | |
8944 | # tool from the auxiliary directory. The problem is that $srcdir (and | |
8945 | # therefore $ac_aux_dir as well) can be either absolute or relative, | |
8946 | # depending on how configure is run. This is pretty annoying, since | |
8947 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top | |
8948 | # source directory, any form will work fine, but in subdirectories a | |
8949 | # relative path needs to be adjusted first. | |
8950 | # | |
8951 | # $ac_aux_dir/missing | |
8952 | # fails when called from a subdirectory if $ac_aux_dir is relative | |
8953 | # $top_srcdir/$ac_aux_dir/missing | |
8954 | # fails if $ac_aux_dir is absolute, | |
8955 | # fails when called from a subdirectory in a VPATH build with | |
8956 | # a relative $ac_aux_dir | |
8957 | # | |
8958 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir | |
8959 | # are both prefixed by $srcdir. In an in-source build this is usually | |
8960 | # harmless because $srcdir is `.', but things will broke when you | |
8961 | # start a VPATH build or use an absolute $srcdir. | |
8962 | # | |
8963 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, | |
8964 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: | |
8965 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` | |
8966 | # and then we would define $MISSING as | |
8967 | # MISSING="\${SHELL} $am_aux_dir/missing" | |
8968 | # This will work as long as MISSING is not called from configure, because | |
8969 | # unfortunately $(top_srcdir) has no meaning in configure. | |
8970 | # However there are other variables, like CC, which are often used in | |
8971 | # configure, and could therefore not use this "fixed" $ac_aux_dir. | |
8972 | # | |
8973 | # Another solution, used here, is to always expand $ac_aux_dir to an | |
8974 | # absolute PATH. The drawback is that using absolute paths prevent a | |
8975 | # configured tree to be moved without reconfiguration. | |
8976 | ||
8977 | AC_DEFUN([AM_AUX_DIR_EXPAND], | |
8978 | [dnl Rely on autoconf to set up CDPATH properly. | |
8979 | AC_PREREQ([2.50])dnl | |
8980 | # expand $ac_aux_dir to an absolute path | |
8981 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
8982 | ]) | |
8983 | ||
8984 | # AM_CONDITIONAL -*- Autoconf -*- | |
8985 | ||
8d138742 | 8986 | # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 |
d9898ee8 | 8987 | # Free Software Foundation, Inc. |
8988 | # | |
8989 | # This file is free software; the Free Software Foundation | |
8990 | # gives unlimited permission to copy and/or distribute it, | |
8991 | # with or without modifications, as long as this notice is preserved. | |
8992 | ||
8d138742 | 8993 | # serial 9 |
d9898ee8 | 8994 | |
8995 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) | |
8996 | # ------------------------------------- | |
8997 | # Define a conditional. | |
8998 | AC_DEFUN([AM_CONDITIONAL], | |
8999 | [AC_PREREQ(2.52)dnl | |
9000 | ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], | |
9001 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | |
dd184caf | 9002 | AC_SUBST([$1_TRUE])dnl |
9003 | AC_SUBST([$1_FALSE])dnl | |
9004 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl | |
9005 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl | |
8d138742 | 9006 | m4_define([_AM_COND_VALUE_$1], [$2])dnl |
d9898ee8 | 9007 | if $2; then |
9008 | $1_TRUE= | |
9009 | $1_FALSE='#' | |
9010 | else | |
9011 | $1_TRUE='#' | |
9012 | $1_FALSE= | |
9013 | fi | |
9014 | AC_CONFIG_COMMANDS_PRE( | |
9015 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | |
9016 | AC_MSG_ERROR([[conditional "$1" was never defined. | |
9017 | Usually this means the macro was only invoked conditionally.]]) | |
9018 | fi])]) | |
9019 | ||
8d138742 | 9020 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 |
d9898ee8 | 9021 | # Free Software Foundation, Inc. |
9022 | # | |
9023 | # This file is free software; the Free Software Foundation | |
9024 | # gives unlimited permission to copy and/or distribute it, | |
9025 | # with or without modifications, as long as this notice is preserved. | |
9026 | ||
8d138742 | 9027 | # serial 10 |
d9898ee8 | 9028 | |
9029 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be | |
9030 | # written in clear, in which case automake, when reading aclocal.m4, | |
9031 | # will think it sees a *use*, and therefore will trigger all it's | |
9032 | # C support machinery. Also note that it means that autoscan, seeing | |
9033 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... | |
9034 | ||
9035 | ||
9036 | # _AM_DEPENDENCIES(NAME) | |
9037 | # ---------------------- | |
9038 | # See how the compiler implements dependency checking. | |
9039 | # NAME is "CC", "CXX", "GCJ", or "OBJC". | |
9040 | # We try a few techniques and use that to set a single cache variable. | |
9041 | # | |
9042 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was | |
9043 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular | |
9044 | # dependency, and given that the user is not expected to run this macro, | |
9045 | # just rely on AC_PROG_CC. | |
9046 | AC_DEFUN([_AM_DEPENDENCIES], | |
9047 | [AC_REQUIRE([AM_SET_DEPDIR])dnl | |
9048 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl | |
9049 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl | |
9050 | AC_REQUIRE([AM_DEP_TRACK])dnl | |
9051 | ||
9052 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], | |
9053 | [$1], CXX, [depcc="$CXX" am_compiler_list=], | |
9054 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], | |
dd184caf | 9055 | [$1], UPC, [depcc="$UPC" am_compiler_list=], |
d9898ee8 | 9056 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
9057 | [depcc="$$1" am_compiler_list=]) | |
9058 | ||
9059 | AC_CACHE_CHECK([dependency style of $depcc], | |
9060 | [am_cv_$1_dependencies_compiler_type], | |
9061 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
9062 | # We make a subdir and do the tests there. Otherwise we can end up | |
9063 | # making bogus files that we don't know about and never remove. For | |
9064 | # instance it was reported that on HP-UX the gcc test will end up | |
9065 | # making a dummy file named `D' -- because `-MD' means `put the output | |
9066 | # in D'. | |
9067 | mkdir conftest.dir | |
9068 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
9069 | # using a relative directory. | |
9070 | cp "$am_depcomp" conftest.dir | |
9071 | cd conftest.dir | |
9072 | # We will build objects and dependencies in a subdirectory because | |
9073 | # it helps to detect inapplicable dependency modes. For instance | |
9074 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
9075 | # side effect of compilation, but ICC will put the dependencies in | |
9076 | # the current directory while Tru64 will put them in the object | |
9077 | # directory. | |
9078 | mkdir sub | |
9079 | ||
9080 | am_cv_$1_dependencies_compiler_type=none | |
9081 | if test "$am_compiler_list" = ""; then | |
9082 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` | |
9083 | fi | |
8d138742 CE |
9084 | am__universal=false |
9085 | m4_case([$1], [CC], | |
9086 | [case " $depcc " in #( | |
9087 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
9088 | esac], | |
9089 | [CXX], | |
9090 | [case " $depcc " in #( | |
9091 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
9092 | esac]) | |
9093 | ||
d9898ee8 | 9094 | for depmode in $am_compiler_list; do |
9095 | # Setup a source with many dependencies, because some compilers | |
9096 | # like to wrap large dependency lists on column 80 (with \), and | |
9097 | # we should not choose a depcomp mode which is confused by this. | |
9098 | # | |
9099 | # We need to recreate these files for each test, as the compiler may | |
9100 | # overwrite some of them when testing with obscure command lines. | |
9101 | # This happens at least with the AIX C compiler. | |
9102 | : > sub/conftest.c | |
9103 | for i in 1 2 3 4 5 6; do | |
9104 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
9105 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
9106 | # Solaris 8's {/usr,}/bin/sh. | |
9107 | touch sub/conftst$i.h | |
9108 | done | |
9109 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
9110 | ||
8d138742 CE |
9111 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
9112 | # mode. It turns out that the SunPro C++ compiler does not properly | |
9113 | # handle `-M -o', and we need to detect this. Also, some Intel | |
9114 | # versions had trouble with output in subdirs | |
9115 | am__obj=sub/conftest.${OBJEXT-o} | |
9116 | am__minus_obj="-o $am__obj" | |
d9898ee8 | 9117 | case $depmode in |
8d138742 CE |
9118 | gcc) |
9119 | # This depmode causes a compiler race in universal mode. | |
9120 | test "$am__universal" = false || continue | |
9121 | ;; | |
d9898ee8 | 9122 | nosideeffect) |
9123 | # after this tag, mechanisms are not by side-effect, so they'll | |
9124 | # only be used when explicitly requested | |
9125 | if test "x$enable_dependency_tracking" = xyes; then | |
9126 | continue | |
9127 | else | |
9128 | break | |
9129 | fi | |
9130 | ;; | |
8d138742 CE |
9131 | msvisualcpp | msvcmsys) |
9132 | # This compiler won't grok `-c -o', but also, the minuso test has | |
9133 | # not run yet. These depmodes are late enough in the game, and | |
9134 | # so weak that their functioning should not be impacted. | |
9135 | am__obj=conftest.${OBJEXT-o} | |
9136 | am__minus_obj= | |
9137 | ;; | |
d9898ee8 | 9138 | none) break ;; |
9139 | esac | |
d9898ee8 | 9140 | if depmode=$depmode \ |
8d138742 | 9141 | source=sub/conftest.c object=$am__obj \ |
d9898ee8 | 9142 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
8d138742 | 9143 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
d9898ee8 | 9144 | >/dev/null 2>conftest.err && |
dd184caf | 9145 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
d9898ee8 | 9146 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
8d138742 | 9147 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
d9898ee8 | 9148 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
9149 | # icc doesn't choke on unknown options, it will just issue warnings | |
9150 | # or remarks (even with -Werror). So we grep stderr for any message | |
9151 | # that says an option was ignored or not supported. | |
9152 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
9153 | # icc: Command line warning: ignoring option '-M'; no argument required | |
9154 | # The diagnosis changed in icc 8.0: | |
9155 | # icc: Command line remark: option '-MP' not supported | |
9156 | if (grep 'ignoring option' conftest.err || | |
9157 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
9158 | am_cv_$1_dependencies_compiler_type=$depmode | |
9159 | break | |
9160 | fi | |
9161 | fi | |
9162 | done | |
9163 | ||
9164 | cd .. | |
9165 | rm -rf conftest.dir | |
9166 | else | |
9167 | am_cv_$1_dependencies_compiler_type=none | |
9168 | fi | |
9169 | ]) | |
9170 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) | |
9171 | AM_CONDITIONAL([am__fastdep$1], [ | |
9172 | test "x$enable_dependency_tracking" != xno \ | |
9173 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) | |
9174 | ]) | |
9175 | ||
9176 | ||
9177 | # AM_SET_DEPDIR | |
9178 | # ------------- | |
9179 | # Choose a directory name for dependency files. | |
9180 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES | |
9181 | AC_DEFUN([AM_SET_DEPDIR], | |
9182 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl | |
9183 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl | |
9184 | ]) | |
9185 | ||
9186 | ||
9187 | # AM_DEP_TRACK | |
9188 | # ------------ | |
9189 | AC_DEFUN([AM_DEP_TRACK], | |
9190 | [AC_ARG_ENABLE(dependency-tracking, | |
9191 | [ --disable-dependency-tracking speeds up one-time build | |
9192 | --enable-dependency-tracking do not reject slow dependency extractors]) | |
9193 | if test "x$enable_dependency_tracking" != xno; then | |
9194 | am_depcomp="$ac_aux_dir/depcomp" | |
9195 | AMDEPBACKSLASH='\' | |
9196 | fi | |
9197 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) | |
dd184caf | 9198 | AC_SUBST([AMDEPBACKSLASH])dnl |
9199 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl | |
d9898ee8 | 9200 | ]) |
9201 | ||
9202 | # Generate code to set up dependency tracking. -*- Autoconf -*- | |
9203 | ||
8d138742 | 9204 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 |
d9898ee8 | 9205 | # Free Software Foundation, Inc. |
9206 | # | |
9207 | # This file is free software; the Free Software Foundation | |
9208 | # gives unlimited permission to copy and/or distribute it, | |
9209 | # with or without modifications, as long as this notice is preserved. | |
9210 | ||
8d138742 | 9211 | #serial 5 |
d9898ee8 | 9212 | |
9213 | # _AM_OUTPUT_DEPENDENCY_COMMANDS | |
9214 | # ------------------------------ | |
9215 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | |
8d138742 CE |
9216 | [{ |
9217 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
9218 | # are listed without --file. Let's play safe and only enable the eval | |
9219 | # if we detect the quoting. | |
9220 | case $CONFIG_FILES in | |
9221 | *\'*) eval set x "$CONFIG_FILES" ;; | |
9222 | *) set x $CONFIG_FILES ;; | |
9223 | esac | |
9224 | shift | |
9225 | for mf | |
9226 | do | |
9227 | # Strip MF so we end up with the name of the file. | |
9228 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
9229 | # Check whether this is an Automake generated Makefile or not. | |
9230 | # We used to match only the files named `Makefile.in', but | |
9231 | # some people rename them; so instead we look at the file content. | |
9232 | # Grep'ing the first line is not enough: some people post-process | |
9233 | # each Makefile.in and add a new line on top of each file to say so. | |
9234 | # Grep'ing the whole file is not good either: AIX grep has a line | |
9235 | # limit of 2048, but all sed's we know have understand at least 4000. | |
9236 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
9237 | dirpart=`AS_DIRNAME("$mf")` | |
9238 | else | |
9239 | continue | |
9240 | fi | |
9241 | # Extract the definition of DEPDIR, am__include, and am__quote | |
9242 | # from the Makefile without running `make'. | |
9243 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
9244 | test -z "$DEPDIR" && continue | |
9245 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
9246 | test -z "am__include" && continue | |
9247 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
9248 | # When using ansi2knr, U may be empty or an underscore; expand it | |
9249 | U=`sed -n 's/^U = //p' < "$mf"` | |
9250 | # Find all dependency output files, they are included files with | |
9251 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
9252 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
9253 | # expansion. | |
9254 | for file in `sed -n " | |
9255 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
9256 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
9257 | # Make sure the directory exists. | |
9258 | test -f "$dirpart/$file" && continue | |
9259 | fdir=`AS_DIRNAME(["$file"])` | |
9260 | AS_MKDIR_P([$dirpart/$fdir]) | |
9261 | # echo "creating $dirpart/$file" | |
9262 | echo '# dummy' > "$dirpart/$file" | |
9263 | done | |
d9898ee8 | 9264 | done |
8d138742 | 9265 | } |
d9898ee8 | 9266 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
9267 | ||
9268 | ||
9269 | # AM_OUTPUT_DEPENDENCY_COMMANDS | |
9270 | # ----------------------------- | |
9271 | # This macro should only be invoked once -- use via AC_REQUIRE. | |
9272 | # | |
9273 | # This code is only required when automatic dependency tracking | |
9274 | # is enabled. FIXME. This creates each `.P' file that we will | |
9275 | # need in order to bootstrap the dependency handling code. | |
9276 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | |
9277 | [AC_CONFIG_COMMANDS([depfiles], | |
9278 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], | |
9279 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) | |
9280 | ]) | |
9281 | ||
d9898ee8 | 9282 | # Do all the work for Automake. -*- Autoconf -*- |
9283 | ||
dd184caf | 9284 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
8d138742 | 9285 | # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. |
d9898ee8 | 9286 | # |
9287 | # This file is free software; the Free Software Foundation | |
9288 | # gives unlimited permission to copy and/or distribute it, | |
9289 | # with or without modifications, as long as this notice is preserved. | |
9290 | ||
8d138742 | 9291 | # serial 16 |
d9898ee8 | 9292 | |
9293 | # This macro actually does too much. Some checks are only needed if | |
9294 | # your package does certain things. But this isn't really a big deal. | |
9295 | ||
9296 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) | |
9297 | # AM_INIT_AUTOMAKE([OPTIONS]) | |
9298 | # ----------------------------------------------- | |
9299 | # The call with PACKAGE and VERSION arguments is the old style | |
9300 | # call (pre autoconf-2.50), which is being phased out. PACKAGE | |
9301 | # and VERSION should now be passed to AC_INIT and removed from | |
9302 | # the call to AM_INIT_AUTOMAKE. | |
9303 | # We support both call styles for the transition. After | |
9304 | # the next Automake release, Autoconf can make the AC_INIT | |
9305 | # arguments mandatory, and then we can depend on a new Autoconf | |
9306 | # release and drop the old call support. | |
9307 | AC_DEFUN([AM_INIT_AUTOMAKE], | |
8d138742 | 9308 | [AC_PREREQ([2.62])dnl |
d9898ee8 | 9309 | dnl Autoconf wants to disallow AM_ names. We explicitly allow |
9310 | dnl the ones we care about. | |
9311 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl | |
9312 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl | |
9313 | AC_REQUIRE([AC_PROG_INSTALL])dnl | |
dd184caf | 9314 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
9315 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
9316 | # is not polluted with repeated "-I." | |
9317 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl | |
9318 | # test to see if srcdir already configured | |
9319 | if test -f $srcdir/config.status; then | |
9320 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | |
9321 | fi | |
d9898ee8 | 9322 | fi |
9323 | ||
9324 | # test whether we have cygpath | |
9325 | if test -z "$CYGPATH_W"; then | |
9326 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
9327 | CYGPATH_W='cygpath -w' | |
9328 | else | |
9329 | CYGPATH_W=echo | |
9330 | fi | |
9331 | fi | |
9332 | AC_SUBST([CYGPATH_W]) | |
9333 | ||
9334 | # Define the identity of the package. | |
9335 | dnl Distinguish between old-style and new-style calls. | |
9336 | m4_ifval([$2], | |
9337 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl | |
9338 | AC_SUBST([PACKAGE], [$1])dnl | |
9339 | AC_SUBST([VERSION], [$2])], | |
9340 | [_AM_SET_OPTIONS([$1])dnl | |
dd184caf | 9341 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. |
9342 | m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, | |
9343 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl | |
d9898ee8 | 9344 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
9345 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl | |
9346 | ||
9347 | _AM_IF_OPTION([no-define],, | |
9348 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) | |
9349 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl | |
9350 | ||
9351 | # Some tools Automake needs. | |
9352 | AC_REQUIRE([AM_SANITY_CHECK])dnl | |
9353 | AC_REQUIRE([AC_ARG_PROGRAM])dnl | |
9354 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) | |
9355 | AM_MISSING_PROG(AUTOCONF, autoconf) | |
9356 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) | |
9357 | AM_MISSING_PROG(AUTOHEADER, autoheader) | |
9358 | AM_MISSING_PROG(MAKEINFO, makeinfo) | |
8d138742 CE |
9359 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
9360 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl | |
d9898ee8 | 9361 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl |
9362 | # We need awk for the "check" target. The system "awk" is bad on | |
9363 | # some platforms. | |
9364 | AC_REQUIRE([AC_PROG_AWK])dnl | |
9365 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl | |
9366 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl | |
9367 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], | |
8d138742 CE |
9368 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], |
9369 | [_AM_PROG_TAR([v7])])]) | |
d9898ee8 | 9370 | _AM_IF_OPTION([no-dependencies],, |
9371 | [AC_PROVIDE_IFELSE([AC_PROG_CC], | |
8d138742 CE |
9372 | [_AM_DEPENDENCIES(CC)], |
9373 | [define([AC_PROG_CC], | |
9374 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl | |
d9898ee8 | 9375 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
8d138742 CE |
9376 | [_AM_DEPENDENCIES(CXX)], |
9377 | [define([AC_PROG_CXX], | |
9378 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl | |
dd184caf | 9379 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], |
8d138742 CE |
9380 | [_AM_DEPENDENCIES(OBJC)], |
9381 | [define([AC_PROG_OBJC], | |
9382 | defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl | |
d9898ee8 | 9383 | ]) |
8d138742 CE |
9384 | _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl |
9385 | dnl The `parallel-tests' driver may need to know about EXEEXT, so add the | |
9386 | dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro | |
9387 | dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. | |
9388 | AC_CONFIG_COMMANDS_PRE(dnl | |
9389 | [m4_provide_if([_AM_COMPILER_EXEEXT], | |
9390 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl | |
d9898ee8 | 9391 | ]) |
9392 | ||
8d138742 CE |
9393 | dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not |
9394 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further | |
9395 | dnl mangled by Autoconf and run in a shell conditional statement. | |
9396 | m4_define([_AC_COMPILER_EXEEXT], | |
9397 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) | |
9398 | ||
d9898ee8 | 9399 | |
9400 | # When config.status generates a header, we must update the stamp-h file. | |
9401 | # This file resides in the same directory as the config header | |
9402 | # that is generated. The stamp files are numbered to have different names. | |
9403 | ||
9404 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the | |
9405 | # loop where config.status creates the headers, so we can generate | |
9406 | # our stamp files there. | |
9407 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], | |
9408 | [# Compute $1's index in $config_headers. | |
ac40fd9e | 9409 | _am_arg=$1 |
d9898ee8 | 9410 | _am_stamp_count=1 |
9411 | for _am_header in $config_headers :; do | |
9412 | case $_am_header in | |
ac40fd9e | 9413 | $_am_arg | $_am_arg:* ) |
d9898ee8 | 9414 | break ;; |
9415 | * ) | |
9416 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
9417 | esac | |
9418 | done | |
ac40fd9e | 9419 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
d9898ee8 | 9420 | |
8d138742 | 9421 | # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. |
d9898ee8 | 9422 | # |
9423 | # This file is free software; the Free Software Foundation | |
9424 | # gives unlimited permission to copy and/or distribute it, | |
9425 | # with or without modifications, as long as this notice is preserved. | |
9426 | ||
9427 | # AM_PROG_INSTALL_SH | |
9428 | # ------------------ | |
9429 | # Define $install_sh. | |
9430 | AC_DEFUN([AM_PROG_INSTALL_SH], | |
9431 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
8d138742 CE |
9432 | if test x"${install_sh}" != xset; then |
9433 | case $am_aux_dir in | |
9434 | *\ * | *\ *) | |
9435 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
9436 | *) | |
9437 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
9438 | esac | |
9439 | fi | |
d9898ee8 | 9440 | AC_SUBST(install_sh)]) |
9441 | ||
9442 | # Copyright (C) 2003, 2005 Free Software Foundation, Inc. | |
9443 | # | |
9444 | # This file is free software; the Free Software Foundation | |
9445 | # gives unlimited permission to copy and/or distribute it, | |
9446 | # with or without modifications, as long as this notice is preserved. | |
9447 | ||
9448 | # serial 2 | |
9449 | ||
9450 | # Check whether the underlying file-system supports filenames | |
9451 | # with a leading dot. For instance MS-DOS doesn't. | |
9452 | AC_DEFUN([AM_SET_LEADING_DOT], | |
9453 | [rm -rf .tst 2>/dev/null | |
9454 | mkdir .tst 2>/dev/null | |
9455 | if test -d .tst; then | |
9456 | am__leading_dot=. | |
9457 | else | |
9458 | am__leading_dot=_ | |
9459 | fi | |
9460 | rmdir .tst 2>/dev/null | |
9461 | AC_SUBST([am__leading_dot])]) | |
9462 | ||
9463 | # Check to see how 'make' treats includes. -*- Autoconf -*- | |
9464 | ||
8d138742 | 9465 | # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. |
d9898ee8 | 9466 | # |
9467 | # This file is free software; the Free Software Foundation | |
9468 | # gives unlimited permission to copy and/or distribute it, | |
9469 | # with or without modifications, as long as this notice is preserved. | |
9470 | ||
8d138742 | 9471 | # serial 4 |
d9898ee8 | 9472 | |
9473 | # AM_MAKE_INCLUDE() | |
9474 | # ----------------- | |
9475 | # Check to see how make treats includes. | |
9476 | AC_DEFUN([AM_MAKE_INCLUDE], | |
9477 | [am_make=${MAKE-make} | |
9478 | cat > confinc << 'END' | |
9479 | am__doit: | |
8d138742 | 9480 | @echo this is the am__doit target |
d9898ee8 | 9481 | .PHONY: am__doit |
9482 | END | |
9483 | # If we don't find an include directive, just comment out the code. | |
9484 | AC_MSG_CHECKING([for style of include used by $am_make]) | |
9485 | am__include="#" | |
9486 | am__quote= | |
9487 | _am_result=none | |
9488 | # First try GNU make style include. | |
9489 | echo "include confinc" > confmf | |
8d138742 CE |
9490 | # Ignore all kinds of additional output from `make'. |
9491 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
9492 | *the\ am__doit\ target*) | |
9493 | am__include=include | |
9494 | am__quote= | |
9495 | _am_result=GNU | |
9496 | ;; | |
9497 | esac | |
d9898ee8 | 9498 | # Now try BSD make style include. |
9499 | if test "$am__include" = "#"; then | |
9500 | echo '.include "confinc"' > confmf | |
8d138742 CE |
9501 | case `$am_make -s -f confmf 2> /dev/null` in #( |
9502 | *the\ am__doit\ target*) | |
9503 | am__include=.include | |
9504 | am__quote="\"" | |
9505 | _am_result=BSD | |
9506 | ;; | |
9507 | esac | |
d9898ee8 | 9508 | fi |
9509 | AC_SUBST([am__include]) | |
9510 | AC_SUBST([am__quote]) | |
9511 | AC_MSG_RESULT([$_am_result]) | |
9512 | rm -f confinc confmf | |
9513 | ]) | |
9514 | ||
9515 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- | |
9516 | ||
8d138742 | 9517 | # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 |
d9898ee8 | 9518 | # Free Software Foundation, Inc. |
9519 | # | |
9520 | # This file is free software; the Free Software Foundation | |
9521 | # gives unlimited permission to copy and/or distribute it, | |
9522 | # with or without modifications, as long as this notice is preserved. | |
9523 | ||
8d138742 | 9524 | # serial 6 |
d9898ee8 | 9525 | |
9526 | # AM_MISSING_PROG(NAME, PROGRAM) | |
9527 | # ------------------------------ | |
9528 | AC_DEFUN([AM_MISSING_PROG], | |
9529 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) | |
9530 | $1=${$1-"${am_missing_run}$2"} | |
9531 | AC_SUBST($1)]) | |
9532 | ||
9533 | ||
9534 | # AM_MISSING_HAS_RUN | |
9535 | # ------------------ | |
9536 | # Define MISSING if not defined so far and test if it supports --run. | |
9537 | # If it does, set am_missing_run to use it, otherwise, to nothing. | |
9538 | AC_DEFUN([AM_MISSING_HAS_RUN], | |
9539 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
dd184caf | 9540 | AC_REQUIRE_AUX_FILE([missing])dnl |
8d138742 CE |
9541 | if test x"${MISSING+set}" != xset; then |
9542 | case $am_aux_dir in | |
9543 | *\ * | *\ *) | |
9544 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
9545 | *) | |
9546 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
9547 | esac | |
9548 | fi | |
d9898ee8 | 9549 | # Use eval to expand $SHELL |
9550 | if eval "$MISSING --run true"; then | |
9551 | am_missing_run="$MISSING --run " | |
9552 | else | |
9553 | am_missing_run= | |
9554 | AC_MSG_WARN([`missing' script is too old or missing]) | |
9555 | fi | |
9556 | ]) | |
9557 | ||
dd184caf | 9558 | # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
d9898ee8 | 9559 | # |
9560 | # This file is free software; the Free Software Foundation | |
9561 | # gives unlimited permission to copy and/or distribute it, | |
9562 | # with or without modifications, as long as this notice is preserved. | |
9563 | ||
9564 | # AM_PROG_MKDIR_P | |
9565 | # --------------- | |
dd184caf | 9566 | # Check for `mkdir -p'. |
d9898ee8 | 9567 | AC_DEFUN([AM_PROG_MKDIR_P], |
dd184caf | 9568 | [AC_PREREQ([2.60])dnl |
9569 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl | |
9570 | dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, | |
9571 | dnl while keeping a definition of mkdir_p for backward compatibility. | |
9572 | dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. | |
9573 | dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of | |
9574 | dnl Makefile.ins that do not define MKDIR_P, so we do our own | |
9575 | dnl adjustment using top_builddir (which is defined more often than | |
9576 | dnl MKDIR_P). | |
9577 | AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl | |
9578 | case $mkdir_p in | |
9579 | [[\\/$]]* | ?:[[\\/]]*) ;; | |
9580 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
9581 | esac | |
9582 | ]) | |
d9898ee8 | 9583 | |
9584 | # Helper functions for option handling. -*- Autoconf -*- | |
9585 | ||
8d138742 | 9586 | # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. |
d9898ee8 | 9587 | # |
9588 | # This file is free software; the Free Software Foundation | |
9589 | # gives unlimited permission to copy and/or distribute it, | |
9590 | # with or without modifications, as long as this notice is preserved. | |
9591 | ||
8d138742 | 9592 | # serial 4 |
d9898ee8 | 9593 | |
9594 | # _AM_MANGLE_OPTION(NAME) | |
9595 | # ----------------------- | |
9596 | AC_DEFUN([_AM_MANGLE_OPTION], | |
9597 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) | |
9598 | ||
9599 | # _AM_SET_OPTION(NAME) | |
9600 | # ------------------------------ | |
9601 | # Set option NAME. Presently that only means defining a flag for this option. | |
9602 | AC_DEFUN([_AM_SET_OPTION], | |
9603 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) | |
9604 | ||
9605 | # _AM_SET_OPTIONS(OPTIONS) | |
9606 | # ---------------------------------- | |
9607 | # OPTIONS is a space-separated list of Automake options. | |
9608 | AC_DEFUN([_AM_SET_OPTIONS], | |
8d138742 | 9609 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
d9898ee8 | 9610 | |
9611 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) | |
9612 | # ------------------------------------------- | |
9613 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | |
9614 | AC_DEFUN([_AM_IF_OPTION], | |
9615 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | |
9616 | ||
9617 | # Check to make sure that the build environment is sane. -*- Autoconf -*- | |
9618 | ||
8d138742 | 9619 | # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 |
d9898ee8 | 9620 | # Free Software Foundation, Inc. |
9621 | # | |
9622 | # This file is free software; the Free Software Foundation | |
9623 | # gives unlimited permission to copy and/or distribute it, | |
9624 | # with or without modifications, as long as this notice is preserved. | |
9625 | ||
8d138742 | 9626 | # serial 5 |
d9898ee8 | 9627 | |
9628 | # AM_SANITY_CHECK | |
9629 | # --------------- | |
9630 | AC_DEFUN([AM_SANITY_CHECK], | |
9631 | [AC_MSG_CHECKING([whether build environment is sane]) | |
9632 | # Just in case | |
9633 | sleep 1 | |
9634 | echo timestamp > conftest.file | |
8d138742 CE |
9635 | # Reject unsafe characters in $srcdir or the absolute working directory |
9636 | # name. Accept space and tab only in the latter. | |
9637 | am_lf=' | |
9638 | ' | |
9639 | case `pwd` in | |
9640 | *[[\\\"\#\$\&\'\`$am_lf]]*) | |
9641 | AC_MSG_ERROR([unsafe absolute working directory name]);; | |
9642 | esac | |
9643 | case $srcdir in | |
9644 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) | |
9645 | AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; | |
9646 | esac | |
9647 | ||
d9898ee8 | 9648 | # Do `set' in a subshell so we don't clobber the current shell's |
9649 | # arguments. Must try -L first in case configure is actually a | |
9650 | # symlink; some systems play weird games with the mod time of symlinks | |
9651 | # (eg FreeBSD returns the mod time of the symlink's containing | |
9652 | # directory). | |
9653 | if ( | |
8d138742 | 9654 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
d9898ee8 | 9655 | if test "$[*]" = "X"; then |
9656 | # -L didn't work. | |
8d138742 | 9657 | set X `ls -t "$srcdir/configure" conftest.file` |
d9898ee8 | 9658 | fi |
9659 | rm -f conftest.file | |
9660 | if test "$[*]" != "X $srcdir/configure conftest.file" \ | |
9661 | && test "$[*]" != "X conftest.file $srcdir/configure"; then | |
9662 | ||
9663 | # If neither matched, then we have a broken ls. This can happen | |
9664 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
9665 | # broken ls alias from the environment. This has actually | |
9666 | # happened. Such a system could not be considered "sane". | |
9667 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | |
9668 | alias in your environment]) | |
9669 | fi | |
9670 | ||
9671 | test "$[2]" = conftest.file | |
9672 | ) | |
9673 | then | |
9674 | # Ok. | |
9675 | : | |
9676 | else | |
9677 | AC_MSG_ERROR([newly created file is older than distributed files! | |
9678 | Check your system clock]) | |
9679 | fi | |
9680 | AC_MSG_RESULT(yes)]) | |
9681 | ||
9682 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. | |
9683 | # | |
9684 | # This file is free software; the Free Software Foundation | |
9685 | # gives unlimited permission to copy and/or distribute it, | |
9686 | # with or without modifications, as long as this notice is preserved. | |
9687 | ||
9688 | # AM_PROG_INSTALL_STRIP | |
9689 | # --------------------- | |
9690 | # One issue with vendor `install' (even GNU) is that you can't | |
9691 | # specify the program used to strip binaries. This is especially | |
9692 | # annoying in cross-compiling environments, where the build's strip | |
9693 | # is unlikely to handle the host's binaries. | |
9694 | # Fortunately install-sh will honor a STRIPPROG variable, so we | |
9695 | # always use install-sh in `make install-strip', and initialize | |
9696 | # STRIPPROG with the value of the STRIP variable (set by the user). | |
9697 | AC_DEFUN([AM_PROG_INSTALL_STRIP], | |
9698 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | |
9699 | # Installed binaries are usually stripped using `strip' when the user | |
9700 | # run `make install-strip'. However `strip' might not be the right | |
9701 | # tool to use in cross-compilation environments, therefore Automake | |
9702 | # will honor the `STRIP' environment variable to overrule this program. | |
9703 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. | |
9704 | if test "$cross_compiling" != no; then | |
9705 | AC_CHECK_TOOL([STRIP], [strip], :) | |
9706 | fi | |
dd184caf | 9707 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
d9898ee8 | 9708 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
9709 | ||
8d138742 | 9710 | # Copyright (C) 2006, 2008 Free Software Foundation, Inc. |
dd184caf | 9711 | # |
9712 | # This file is free software; the Free Software Foundation | |
9713 | # gives unlimited permission to copy and/or distribute it, | |
9714 | # with or without modifications, as long as this notice is preserved. | |
9715 | ||
8d138742 CE |
9716 | # serial 2 |
9717 | ||
dd184caf | 9718 | # _AM_SUBST_NOTMAKE(VARIABLE) |
9719 | # --------------------------- | |
ac40fd9e | 9720 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. |
dd184caf | 9721 | # This macro is traced by Automake. |
9722 | AC_DEFUN([_AM_SUBST_NOTMAKE]) | |
9723 | ||
8d138742 CE |
9724 | # AM_SUBST_NOTMAKE(VARIABLE) |
9725 | # --------------------------- | |
9726 | # Public sister of _AM_SUBST_NOTMAKE. | |
9727 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | |
9728 | ||
d9898ee8 | 9729 | # Check how to create a tarball. -*- Autoconf -*- |
9730 | ||
9731 | # Copyright (C) 2004, 2005 Free Software Foundation, Inc. | |
9732 | # | |
9733 | # This file is free software; the Free Software Foundation | |
9734 | # gives unlimited permission to copy and/or distribute it, | |
9735 | # with or without modifications, as long as this notice is preserved. | |
9736 | ||
9737 | # serial 2 | |
9738 | ||
9739 | # _AM_PROG_TAR(FORMAT) | |
9740 | # -------------------- | |
9741 | # Check how to create a tarball in format FORMAT. | |
9742 | # FORMAT should be one of `v7', `ustar', or `pax'. | |
9743 | # | |
9744 | # Substitute a variable $(am__tar) that is a command | |
9745 | # writing to stdout a FORMAT-tarball containing the directory | |
9746 | # $tardir. | |
9747 | # tardir=directory && $(am__tar) > result.tar | |
9748 | # | |
9749 | # Substitute a variable $(am__untar) that extract such | |
9750 | # a tarball read from stdin. | |
9751 | # $(am__untar) < result.tar | |
9752 | AC_DEFUN([_AM_PROG_TAR], | |
9753 | [# Always define AMTAR for backward compatibility. | |
9754 | AM_MISSING_PROG([AMTAR], [tar]) | |
9755 | m4_if([$1], [v7], | |
9756 | [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], | |
9757 | [m4_case([$1], [ustar],, [pax],, | |
9758 | [m4_fatal([Unknown tar format])]) | |
9759 | AC_MSG_CHECKING([how to create a $1 tar archive]) | |
9760 | # Loop over all known methods to create a tar archive until one works. | |
9761 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' | |
9762 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} | |
9763 | # Do not fold the above two line into one, because Tru64 sh and | |
9764 | # Solaris sh will not grok spaces in the rhs of `-'. | |
9765 | for _am_tool in $_am_tools | |
9766 | do | |
9767 | case $_am_tool in | |
9768 | gnutar) | |
9769 | for _am_tar in tar gnutar gtar; | |
9770 | do | |
9771 | AM_RUN_LOG([$_am_tar --version]) && break | |
9772 | done | |
9773 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' | |
9774 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' | |
9775 | am__untar="$_am_tar -xf -" | |
9776 | ;; | |
9777 | plaintar) | |
9778 | # Must skip GNU tar: if it does not support --format= it doesn't create | |
9779 | # ustar tarball either. | |
9780 | (tar --version) >/dev/null 2>&1 && continue | |
9781 | am__tar='tar chf - "$$tardir"' | |
9782 | am__tar_='tar chf - "$tardir"' | |
9783 | am__untar='tar xf -' | |
9784 | ;; | |
9785 | pax) | |
9786 | am__tar='pax -L -x $1 -w "$$tardir"' | |
9787 | am__tar_='pax -L -x $1 -w "$tardir"' | |
9788 | am__untar='pax -r' | |
9789 | ;; | |
9790 | cpio) | |
9791 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' | |
9792 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' | |
9793 | am__untar='cpio -i -H $1 -d' | |
9794 | ;; | |
9795 | none) | |
9796 | am__tar=false | |
9797 | am__tar_=false | |
9798 | am__untar=false | |
9799 | ;; | |
9800 | esac | |
9801 | ||
9802 | # If the value was cached, stop now. We just wanted to have am__tar | |
9803 | # and am__untar set. | |
9804 | test -n "${am_cv_prog_tar_$1}" && break | |
9805 | ||
9806 | # tar/untar a dummy directory, and stop if the command works | |
9807 | rm -rf conftest.dir | |
9808 | mkdir conftest.dir | |
9809 | echo GrepMe > conftest.dir/file | |
9810 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) | |
9811 | rm -rf conftest.dir | |
9812 | if test -s conftest.tar; then | |
9813 | AM_RUN_LOG([$am__untar <conftest.tar]) | |
9814 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break | |
9815 | fi | |
9816 | done | |
9817 | rm -rf conftest.dir | |
9818 | ||
9819 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) | |
9820 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) | |
9821 | AC_SUBST([am__tar]) | |
9822 | AC_SUBST([am__untar]) | |
9823 | ]) # _AM_PROG_TAR | |
9824 |