1 | dnl aclocal.m4 generated automatically by aclocal 1.4-p6 |
---|
2 | |
---|
3 | dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
---|
4 | dnl This file is free software; the Free Software Foundation |
---|
5 | dnl gives unlimited permission to copy and/or distribute it, |
---|
6 | dnl with or without modifications, as long as this notice is preserved. |
---|
7 | |
---|
8 | dnl This program is distributed in the hope that it will be useful, |
---|
9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
11 | dnl PARTICULAR PURPOSE. |
---|
12 | |
---|
13 | # Do all the work for Automake. This macro actually does too much -- |
---|
14 | # some checks are only needed if your package does certain things. |
---|
15 | # But this isn't really a big deal. |
---|
16 | |
---|
17 | # serial 1 |
---|
18 | |
---|
19 | dnl Usage: |
---|
20 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
---|
21 | |
---|
22 | AC_DEFUN([AM_INIT_AUTOMAKE], |
---|
23 | [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
---|
24 | AC_REQUIRE([AC_PROG_INSTALL]) |
---|
25 | PACKAGE=[$1] |
---|
26 | AC_SUBST(PACKAGE) |
---|
27 | VERSION=[$2] |
---|
28 | AC_SUBST(VERSION) |
---|
29 | dnl test to see if srcdir already configured |
---|
30 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
---|
31 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
32 | fi |
---|
33 | ifelse([$3],, |
---|
34 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
35 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
---|
36 | AC_REQUIRE([AM_SANITY_CHECK]) |
---|
37 | AC_REQUIRE([AC_ARG_PROGRAM]) |
---|
38 | dnl FIXME This is truly gross. |
---|
39 | missing_dir=`cd $ac_aux_dir && pwd` |
---|
40 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) |
---|
41 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
---|
42 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) |
---|
43 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
---|
44 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
---|
45 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
---|
46 | |
---|
47 | # Copyright 2002 Free Software Foundation, Inc. |
---|
48 | |
---|
49 | # This program is free software; you can redistribute it and/or modify |
---|
50 | # it under the terms of the GNU General Public License as published by |
---|
51 | # the Free Software Foundation; either version 2, or (at your option) |
---|
52 | # any later version. |
---|
53 | |
---|
54 | # This program is distributed in the hope that it will be useful, |
---|
55 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
56 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
57 | # GNU General Public License for more details. |
---|
58 | |
---|
59 | # You should have received a copy of the GNU General Public License |
---|
60 | # along with this program; if not, write to the Free Software |
---|
61 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
62 | |
---|
63 | # AM_AUTOMAKE_VERSION(VERSION) |
---|
64 | # ---------------------------- |
---|
65 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
---|
66 | # generated from the m4 files accompanying Automake X.Y. |
---|
67 | AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) |
---|
68 | |
---|
69 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
---|
70 | # ------------------------------- |
---|
71 | # Call AM_AUTOMAKE_VERSION so it can be traced. |
---|
72 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
---|
73 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
---|
74 | [AM_AUTOMAKE_VERSION([1.4-p6])]) |
---|
75 | |
---|
76 | # |
---|
77 | # Check to make sure that the build environment is sane. |
---|
78 | # |
---|
79 | |
---|
80 | AC_DEFUN([AM_SANITY_CHECK], |
---|
81 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
82 | # Just in case |
---|
83 | sleep 1 |
---|
84 | echo timestamp > conftestfile |
---|
85 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
86 | # arguments. Must try -L first in case configure is actually a |
---|
87 | # symlink; some systems play weird games with the mod time of symlinks |
---|
88 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
89 | # directory). |
---|
90 | if ( |
---|
91 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
---|
92 | if test "[$]*" = "X"; then |
---|
93 | # -L didn't work. |
---|
94 | set X `ls -t $srcdir/configure conftestfile` |
---|
95 | fi |
---|
96 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
---|
97 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
---|
98 | |
---|
99 | # If neither matched, then we have a broken ls. This can happen |
---|
100 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
101 | # broken ls alias from the environment. This has actually |
---|
102 | # happened. Such a system could not be considered "sane". |
---|
103 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
104 | alias in your environment]) |
---|
105 | fi |
---|
106 | |
---|
107 | test "[$]2" = conftestfile |
---|
108 | ) |
---|
109 | then |
---|
110 | # Ok. |
---|
111 | : |
---|
112 | else |
---|
113 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
114 | Check your system clock]) |
---|
115 | fi |
---|
116 | rm -f conftest* |
---|
117 | AC_MSG_RESULT(yes)]) |
---|
118 | |
---|
119 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
---|
120 | dnl The program must properly implement --version. |
---|
121 | AC_DEFUN([AM_MISSING_PROG], |
---|
122 | [AC_MSG_CHECKING(for working $2) |
---|
123 | # Run test in a subshell; some versions of sh will print an error if |
---|
124 | # an executable is not found, even if stderr is redirected. |
---|
125 | # Redirect stdin to placate older versions of autoconf. Sigh. |
---|
126 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
---|
127 | $1=$2 |
---|
128 | AC_MSG_RESULT(found) |
---|
129 | else |
---|
130 | $1="$3/missing $2" |
---|
131 | AC_MSG_RESULT(missing) |
---|
132 | fi |
---|
133 | AC_SUBST($1)]) |
---|
134 | |
---|
135 | # Add --enable-maintainer-mode option to configure. |
---|
136 | # From Jim Meyering |
---|
137 | |
---|
138 | # serial 1 |
---|
139 | |
---|
140 | AC_DEFUN([AM_MAINTAINER_MODE], |
---|
141 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
---|
142 | dnl maintainer-mode is disabled by default |
---|
143 | AC_ARG_ENABLE(maintainer-mode, |
---|
144 | [ --enable-maintainer-mode enable make rules and dependencies not useful |
---|
145 | (and sometimes confusing) to the casual installer], |
---|
146 | USE_MAINTAINER_MODE=$enableval, |
---|
147 | USE_MAINTAINER_MODE=no) |
---|
148 | AC_MSG_RESULT($USE_MAINTAINER_MODE) |
---|
149 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
---|
150 | MAINT=$MAINTAINER_MODE_TRUE |
---|
151 | AC_SUBST(MAINT)dnl |
---|
152 | ] |
---|
153 | ) |
---|
154 | |
---|
155 | # Define a conditional. |
---|
156 | |
---|
157 | AC_DEFUN([AM_CONDITIONAL], |
---|
158 | [AC_SUBST($1_TRUE) |
---|
159 | AC_SUBST($1_FALSE) |
---|
160 | if $2; then |
---|
161 | $1_TRUE= |
---|
162 | $1_FALSE='#' |
---|
163 | else |
---|
164 | $1_TRUE='#' |
---|
165 | $1_FALSE= |
---|
166 | fi]) |
---|
167 | |
---|
168 | |
---|
169 | # serial 1 |
---|
170 | |
---|
171 | # @defmac AC_PROG_CC_STDC |
---|
172 | # @maindex PROG_CC_STDC |
---|
173 | # @ovindex CC |
---|
174 | # If the C compiler in not in ANSI C mode by default, try to add an option |
---|
175 | # to output variable @code{CC} to make it so. This macro tries various |
---|
176 | # options that select ANSI C on some system or another. It considers the |
---|
177 | # compiler to be in ANSI C mode if it handles function prototypes correctly. |
---|
178 | # |
---|
179 | # If you use this macro, you should check after calling it whether the C |
---|
180 | # compiler has been set to accept ANSI C; if not, the shell variable |
---|
181 | # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source |
---|
182 | # code in ANSI C, you can make an un-ANSIfied copy of it by using the |
---|
183 | # program @code{ansi2knr}, which comes with Ghostscript. |
---|
184 | # @end defmac |
---|
185 | |
---|
186 | AC_DEFUN([AM_PROG_CC_STDC], |
---|
187 | [AC_REQUIRE([AC_PROG_CC]) |
---|
188 | AC_BEFORE([$0], [AC_C_INLINE]) |
---|
189 | AC_BEFORE([$0], [AC_C_CONST]) |
---|
190 | dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require |
---|
191 | dnl a magic option to avoid problems with ANSI preprocessor commands |
---|
192 | dnl like #elif. |
---|
193 | dnl FIXME: can't do this because then AC_AIX won't work due to a |
---|
194 | dnl circular dependency. |
---|
195 | dnl AC_BEFORE([$0], [AC_PROG_CPP]) |
---|
196 | AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) |
---|
197 | AC_CACHE_VAL(am_cv_prog_cc_stdc, |
---|
198 | [am_cv_prog_cc_stdc=no |
---|
199 | ac_save_CC="$CC" |
---|
200 | # Don't try gcc -ansi; that turns off useful extensions and |
---|
201 | # breaks some systems' header files. |
---|
202 | # AIX -qlanglvl=ansi |
---|
203 | # Ultrix and OSF/1 -std1 |
---|
204 | # HP-UX -Aa -D_HPUX_SOURCE |
---|
205 | # SVR4 -Xc -D__EXTENSIONS__ |
---|
206 | for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
---|
207 | do |
---|
208 | CC="$ac_save_CC $ac_arg" |
---|
209 | AC_TRY_COMPILE( |
---|
210 | [#include <stdarg.h> |
---|
211 | #include <stdio.h> |
---|
212 | #include <sys/types.h> |
---|
213 | #include <sys/stat.h> |
---|
214 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
---|
215 | struct buf { int x; }; |
---|
216 | FILE * (*rcsopen) (struct buf *, struct stat *, int); |
---|
217 | static char *e (p, i) |
---|
218 | char **p; |
---|
219 | int i; |
---|
220 | { |
---|
221 | return p[i]; |
---|
222 | } |
---|
223 | static char *f (char * (*g) (char **, int), char **p, ...) |
---|
224 | { |
---|
225 | char *s; |
---|
226 | va_list v; |
---|
227 | va_start (v,p); |
---|
228 | s = g (p, va_arg (v,int)); |
---|
229 | va_end (v); |
---|
230 | return s; |
---|
231 | } |
---|
232 | int test (int i, double x); |
---|
233 | struct s1 {int (*f) (int a);}; |
---|
234 | struct s2 {int (*f) (double a);}; |
---|
235 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); |
---|
236 | int argc; |
---|
237 | char **argv; |
---|
238 | ], [ |
---|
239 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
---|
240 | ], |
---|
241 | [am_cv_prog_cc_stdc="$ac_arg"; break]) |
---|
242 | done |
---|
243 | CC="$ac_save_CC" |
---|
244 | ]) |
---|
245 | if test -z "$am_cv_prog_cc_stdc"; then |
---|
246 | AC_MSG_RESULT([none needed]) |
---|
247 | else |
---|
248 | AC_MSG_RESULT($am_cv_prog_cc_stdc) |
---|
249 | fi |
---|
250 | case "x$am_cv_prog_cc_stdc" in |
---|
251 | x|xno) ;; |
---|
252 | *) CC="$CC $am_cv_prog_cc_stdc" ;; |
---|
253 | esac |
---|
254 | ]) |
---|
255 | |
---|
256 | # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- |
---|
257 | |
---|
258 | # serial 46 AC_PROG_LIBTOOL |
---|
259 | |
---|
260 | AC_DEFUN([AC_PROG_LIBTOOL], |
---|
261 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
---|
262 | |
---|
263 | # This can be used to rebuild libtool when needed |
---|
264 | LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" |
---|
265 | |
---|
266 | # Always use our own libtool. |
---|
267 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
---|
268 | AC_SUBST(LIBTOOL)dnl |
---|
269 | |
---|
270 | # Prevent multiple expansion |
---|
271 | define([AC_PROG_LIBTOOL], []) |
---|
272 | ]) |
---|
273 | |
---|
274 | AC_DEFUN([AC_LIBTOOL_SETUP], |
---|
275 | [AC_PREREQ(2.13)dnl |
---|
276 | AC_REQUIRE([AC_ENABLE_SHARED])dnl |
---|
277 | AC_REQUIRE([AC_ENABLE_STATIC])dnl |
---|
278 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
---|
279 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
280 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
281 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
282 | AC_REQUIRE([AC_PROG_LD])dnl |
---|
283 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl |
---|
284 | AC_REQUIRE([AC_PROG_NM])dnl |
---|
285 | AC_REQUIRE([LT_AC_PROG_SED])dnl |
---|
286 | |
---|
287 | AC_REQUIRE([AC_PROG_LN_S])dnl |
---|
288 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl |
---|
289 | AC_REQUIRE([AC_OBJEXT])dnl |
---|
290 | AC_REQUIRE([AC_EXEEXT])dnl |
---|
291 | dnl |
---|
292 | |
---|
293 | _LT_AC_PROG_ECHO_BACKSLASH |
---|
294 | # Only perform the check for file, if the check method requires it |
---|
295 | case $deplibs_check_method in |
---|
296 | file_magic*) |
---|
297 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
---|
298 | AC_PATH_MAGIC |
---|
299 | fi |
---|
300 | ;; |
---|
301 | esac |
---|
302 | |
---|
303 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
---|
304 | AC_CHECK_TOOL(STRIP, strip, :) |
---|
305 | |
---|
306 | AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) |
---|
307 | AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], |
---|
308 | enable_win32_dll=yes, enable_win32_dll=no) |
---|
309 | |
---|
310 | AC_ARG_ENABLE(libtool-lock, |
---|
311 | [ --disable-libtool-lock avoid locking (might break parallel builds)]) |
---|
312 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
---|
313 | |
---|
314 | # Some flags need to be propagated to the compiler or linker for good |
---|
315 | # libtool support. |
---|
316 | case $host in |
---|
317 | *-*-irix6*) |
---|
318 | # Find out which ABI we are using. |
---|
319 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
---|
320 | if AC_TRY_EVAL(ac_compile); then |
---|
321 | case `/usr/bin/file conftest.$ac_objext` in |
---|
322 | *32-bit*) |
---|
323 | LD="${LD-ld} -32" |
---|
324 | ;; |
---|
325 | *N32*) |
---|
326 | LD="${LD-ld} -n32" |
---|
327 | ;; |
---|
328 | *64-bit*) |
---|
329 | LD="${LD-ld} -64" |
---|
330 | ;; |
---|
331 | esac |
---|
332 | fi |
---|
333 | rm -rf conftest* |
---|
334 | ;; |
---|
335 | |
---|
336 | *-*-sco3.2v5*) |
---|
337 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
---|
338 | SAVE_CFLAGS="$CFLAGS" |
---|
339 | CFLAGS="$CFLAGS -belf" |
---|
340 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
---|
341 | [AC_LANG_SAVE |
---|
342 | AC_LANG_C |
---|
343 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
---|
344 | AC_LANG_RESTORE]) |
---|
345 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
---|
346 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
---|
347 | CFLAGS="$SAVE_CFLAGS" |
---|
348 | fi |
---|
349 | ;; |
---|
350 | |
---|
351 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
---|
352 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
---|
353 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
---|
354 | AC_CHECK_TOOL(AS, as, false) |
---|
355 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
---|
356 | |
---|
357 | # recent cygwin and mingw systems supply a stub DllMain which the user |
---|
358 | # can override, but on older systems we have to supply one |
---|
359 | AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, |
---|
360 | [AC_TRY_LINK([], |
---|
361 | [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); |
---|
362 | DllMain (0, 0, 0);], |
---|
363 | [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) |
---|
364 | |
---|
365 | case $host/$CC in |
---|
366 | *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) |
---|
367 | # old mingw systems require "-dll" to link a DLL, while more recent ones |
---|
368 | # require "-mdll" |
---|
369 | SAVE_CFLAGS="$CFLAGS" |
---|
370 | CFLAGS="$CFLAGS -mdll" |
---|
371 | AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, |
---|
372 | [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) |
---|
373 | CFLAGS="$SAVE_CFLAGS" ;; |
---|
374 | *-*-cygwin* | *-*-pw32*) |
---|
375 | # cygwin systems need to pass --dll to the linker, and not link |
---|
376 | # crt.o which will require a WinMain@16 definition. |
---|
377 | lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; |
---|
378 | esac |
---|
379 | ;; |
---|
380 | ]) |
---|
381 | esac |
---|
382 | |
---|
383 | _LT_AC_LTCONFIG_HACK |
---|
384 | |
---|
385 | ]) |
---|
386 | |
---|
387 | # AC_LIBTOOL_HEADER_ASSERT |
---|
388 | # ------------------------ |
---|
389 | AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], |
---|
390 | [AC_CACHE_CHECK([whether $CC supports assert without backlinking], |
---|
391 | [lt_cv_func_assert_works], |
---|
392 | [case $host in |
---|
393 | *-*-solaris*) |
---|
394 | if test "$GCC" = yes && test "$with_gnu_ld" != yes; then |
---|
395 | case `$CC --version 2>/dev/null` in |
---|
396 | [[12]].*) lt_cv_func_assert_works=no ;; |
---|
397 | *) lt_cv_func_assert_works=yes ;; |
---|
398 | esac |
---|
399 | fi |
---|
400 | ;; |
---|
401 | esac]) |
---|
402 | |
---|
403 | if test "x$lt_cv_func_assert_works" = xyes; then |
---|
404 | AC_CHECK_HEADERS(assert.h) |
---|
405 | fi |
---|
406 | ])# AC_LIBTOOL_HEADER_ASSERT |
---|
407 | |
---|
408 | # _LT_AC_CHECK_DLFCN |
---|
409 | # -------------------- |
---|
410 | AC_DEFUN([_LT_AC_CHECK_DLFCN], |
---|
411 | [AC_CHECK_HEADERS(dlfcn.h) |
---|
412 | ])# _LT_AC_CHECK_DLFCN |
---|
413 | |
---|
414 | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
415 | # --------------------------------- |
---|
416 | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
---|
417 | [AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
418 | AC_REQUIRE([AC_PROG_NM]) |
---|
419 | AC_REQUIRE([AC_OBJEXT]) |
---|
420 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
---|
421 | AC_MSG_CHECKING([command to parse $NM output]) |
---|
422 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl |
---|
423 | |
---|
424 | # These are sane defaults that work on at least a few old systems. |
---|
425 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
---|
426 | |
---|
427 | # Character class describing NM global symbol codes. |
---|
428 | symcode='[[BCDEGRST]]' |
---|
429 | |
---|
430 | # Regexp to match symbols that can be accessed directly from C. |
---|
431 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
---|
432 | |
---|
433 | # Transform the above into a raw symbol and a C symbol. |
---|
434 | symxfrm='\1 \2\3 \3' |
---|
435 | |
---|
436 | # Transform an extracted symbol line into a proper C declaration |
---|
437 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" |
---|
438 | |
---|
439 | # Transform an extracted symbol line into symbol name and symbol address |
---|
440 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
---|
441 | |
---|
442 | # Define system-specific variables. |
---|
443 | case $host_os in |
---|
444 | aix*) |
---|
445 | symcode='[[BCDT]]' |
---|
446 | ;; |
---|
447 | cygwin* | mingw* | pw32*) |
---|
448 | symcode='[[ABCDGISTW]]' |
---|
449 | ;; |
---|
450 | hpux*) # Its linker distinguishes data from code symbols |
---|
451 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
---|
452 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
---|
453 | ;; |
---|
454 | irix* | nonstopux*) |
---|
455 | symcode='[[BCDEGRST]]' |
---|
456 | ;; |
---|
457 | osf*) |
---|
458 | symcode='[[BCDEGQRST]]' |
---|
459 | ;; |
---|
460 | solaris* | sysv5*) |
---|
461 | symcode='[[BDRT]]' |
---|
462 | ;; |
---|
463 | sysv4) |
---|
464 | symcode='[[DFNSTU]]' |
---|
465 | ;; |
---|
466 | esac |
---|
467 | |
---|
468 | # Handle CRLF in mingw tool chain |
---|
469 | opt_cr= |
---|
470 | case $host_os in |
---|
471 | mingw*) |
---|
472 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
---|
473 | ;; |
---|
474 | esac |
---|
475 | |
---|
476 | # If we're using GNU nm, then use its standard symbol codes. |
---|
477 | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
---|
478 | symcode='[[ABCDGIRSTW]]' |
---|
479 | fi |
---|
480 | |
---|
481 | # Try without a prefix undercore, then with it. |
---|
482 | for ac_symprfx in "" "_"; do |
---|
483 | |
---|
484 | # Write the raw and C identifiers. |
---|
485 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" |
---|
486 | |
---|
487 | # Check to see that the pipe works correctly. |
---|
488 | pipe_works=no |
---|
489 | rm -f conftest* |
---|
490 | cat > conftest.$ac_ext <<EOF |
---|
491 | #ifdef __cplusplus |
---|
492 | extern "C" { |
---|
493 | #endif |
---|
494 | char nm_test_var; |
---|
495 | void nm_test_func(){} |
---|
496 | #ifdef __cplusplus |
---|
497 | } |
---|
498 | #endif |
---|
499 | int main(){nm_test_var='a';nm_test_func();return(0);} |
---|
500 | EOF |
---|
501 | |
---|
502 | if AC_TRY_EVAL(ac_compile); then |
---|
503 | # Now try to grab the symbols. |
---|
504 | nlist=conftest.nm |
---|
505 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
---|
506 | # Try sorting and uniquifying the output. |
---|
507 | if sort "$nlist" | uniq > "$nlist"T; then |
---|
508 | mv -f "$nlist"T "$nlist" |
---|
509 | else |
---|
510 | rm -f "$nlist"T |
---|
511 | fi |
---|
512 | |
---|
513 | # Make sure that we snagged all the symbols we need. |
---|
514 | if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
---|
515 | if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
---|
516 | cat <<EOF > conftest.$ac_ext |
---|
517 | #ifdef __cplusplus |
---|
518 | extern "C" { |
---|
519 | #endif |
---|
520 | |
---|
521 | EOF |
---|
522 | # Now generate the symbol file. |
---|
523 | eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' |
---|
524 | |
---|
525 | cat <<EOF >> conftest.$ac_ext |
---|
526 | #if defined (__STDC__) && __STDC__ |
---|
527 | # define lt_ptr void * |
---|
528 | #else |
---|
529 | # define lt_ptr char * |
---|
530 | # define const |
---|
531 | #endif |
---|
532 | |
---|
533 | /* The mapping between symbol names and symbols. */ |
---|
534 | const struct { |
---|
535 | const char *name; |
---|
536 | lt_ptr address; |
---|
537 | } |
---|
538 | lt_preloaded_symbols[[]] = |
---|
539 | { |
---|
540 | EOF |
---|
541 | sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext |
---|
542 | cat <<\EOF >> conftest.$ac_ext |
---|
543 | {0, (lt_ptr) 0} |
---|
544 | }; |
---|
545 | |
---|
546 | #ifdef __cplusplus |
---|
547 | } |
---|
548 | #endif |
---|
549 | EOF |
---|
550 | # Now try linking the two files. |
---|
551 | mv conftest.$ac_objext conftstm.$ac_objext |
---|
552 | save_LIBS="$LIBS" |
---|
553 | save_CFLAGS="$CFLAGS" |
---|
554 | LIBS="conftstm.$ac_objext" |
---|
555 | CFLAGS="$CFLAGS$no_builtin_flag" |
---|
556 | if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then |
---|
557 | pipe_works=yes |
---|
558 | fi |
---|
559 | LIBS="$save_LIBS" |
---|
560 | CFLAGS="$save_CFLAGS" |
---|
561 | else |
---|
562 | echo "cannot find nm_test_func in $nlist" >&AC_FD_CC |
---|
563 | fi |
---|
564 | else |
---|
565 | echo "cannot find nm_test_var in $nlist" >&AC_FD_CC |
---|
566 | fi |
---|
567 | else |
---|
568 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC |
---|
569 | fi |
---|
570 | else |
---|
571 | echo "$progname: failed program was:" >&AC_FD_CC |
---|
572 | cat conftest.$ac_ext >&5 |
---|
573 | fi |
---|
574 | rm -f conftest* conftst* |
---|
575 | |
---|
576 | # Do not use the global_symbol_pipe unless it works. |
---|
577 | if test "$pipe_works" = yes; then |
---|
578 | break |
---|
579 | else |
---|
580 | lt_cv_sys_global_symbol_pipe= |
---|
581 | fi |
---|
582 | done |
---|
583 | ]) |
---|
584 | global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" |
---|
585 | if test -z "$lt_cv_sys_global_symbol_pipe"; then |
---|
586 | global_symbol_to_cdecl= |
---|
587 | global_symbol_to_c_name_address= |
---|
588 | else |
---|
589 | global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" |
---|
590 | global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" |
---|
591 | fi |
---|
592 | if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; |
---|
593 | then |
---|
594 | AC_MSG_RESULT(failed) |
---|
595 | else |
---|
596 | AC_MSG_RESULT(ok) |
---|
597 | fi |
---|
598 | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
599 | |
---|
600 | # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
---|
601 | # --------------------------------- |
---|
602 | AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], |
---|
603 | [# Find the correct PATH separator. Usually this is `:', but |
---|
604 | # DJGPP uses `;' like DOS. |
---|
605 | if test "X${PATH_SEPARATOR+set}" != Xset; then |
---|
606 | UNAME=${UNAME-`uname 2>/dev/null`} |
---|
607 | case X$UNAME in |
---|
608 | *-DOS) lt_cv_sys_path_separator=';' ;; |
---|
609 | *) lt_cv_sys_path_separator=':' ;; |
---|
610 | esac |
---|
611 | PATH_SEPARATOR=$lt_cv_sys_path_separator |
---|
612 | fi |
---|
613 | ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
---|
614 | |
---|
615 | # _LT_AC_PROG_ECHO_BACKSLASH |
---|
616 | # -------------------------- |
---|
617 | # Add some code to the start of the generated configure script which |
---|
618 | # will find an echo command which doesn't interpret backslashes. |
---|
619 | AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], |
---|
620 | [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
---|
621 | [AC_DIVERT_PUSH(NOTICE)]) |
---|
622 | _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
---|
623 | |
---|
624 | # Check that we are running under the correct shell. |
---|
625 | SHELL=${CONFIG_SHELL-/bin/sh} |
---|
626 | |
---|
627 | case X$ECHO in |
---|
628 | X*--fallback-echo) |
---|
629 | # Remove one level of quotation (which was required for Make). |
---|
630 | ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` |
---|
631 | ;; |
---|
632 | esac |
---|
633 | |
---|
634 | echo=${ECHO-echo} |
---|
635 | if test "X[$]1" = X--no-reexec; then |
---|
636 | # Discard the --no-reexec flag, and continue. |
---|
637 | shift |
---|
638 | elif test "X[$]1" = X--fallback-echo; then |
---|
639 | # Avoid inline document here, it may be left over |
---|
640 | : |
---|
641 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then |
---|
642 | # Yippee, $echo works! |
---|
643 | : |
---|
644 | else |
---|
645 | # Restart under the correct shell. |
---|
646 | exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} |
---|
647 | fi |
---|
648 | |
---|
649 | if test "X[$]1" = X--fallback-echo; then |
---|
650 | # used as fallback echo |
---|
651 | shift |
---|
652 | cat <<EOF |
---|
653 | $* |
---|
654 | EOF |
---|
655 | exit 0 |
---|
656 | fi |
---|
657 | |
---|
658 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
---|
659 | # if CDPATH is set. |
---|
660 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
---|
661 | |
---|
662 | if test -z "$ECHO"; then |
---|
663 | if test "X${echo_test_string+set}" != Xset; then |
---|
664 | # find a string as large as possible, as long as the shell can cope with it |
---|
665 | for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do |
---|
666 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
---|
667 | if (echo_test_string="`eval $cmd`") 2>/dev/null && |
---|
668 | echo_test_string="`eval $cmd`" && |
---|
669 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null |
---|
670 | then |
---|
671 | break |
---|
672 | fi |
---|
673 | done |
---|
674 | fi |
---|
675 | |
---|
676 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
---|
677 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
---|
678 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
679 | : |
---|
680 | else |
---|
681 | # The Solaris, AIX, and Digital Unix default echo programs unquote |
---|
682 | # backslashes. This makes it impossible to quote backslashes using |
---|
683 | # echo "$something" | sed 's/\\/\\\\/g' |
---|
684 | # |
---|
685 | # So, first we look for a working echo in the user's PATH. |
---|
686 | |
---|
687 | IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
688 | for dir in $PATH /usr/ucb; do |
---|
689 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
---|
690 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
---|
691 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && |
---|
692 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
693 | echo="$dir/echo" |
---|
694 | break |
---|
695 | fi |
---|
696 | done |
---|
697 | IFS="$save_ifs" |
---|
698 | |
---|
699 | if test "X$echo" = Xecho; then |
---|
700 | # We didn't find a better echo, so look for alternatives. |
---|
701 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
---|
702 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && |
---|
703 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
704 | # This shell has a builtin print -r that does the trick. |
---|
705 | echo='print -r' |
---|
706 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
---|
707 | test "X$CONFIG_SHELL" != X/bin/ksh; then |
---|
708 | # If we have ksh, try running configure again with it. |
---|
709 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
---|
710 | export ORIGINAL_CONFIG_SHELL |
---|
711 | CONFIG_SHELL=/bin/ksh |
---|
712 | export CONFIG_SHELL |
---|
713 | exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} |
---|
714 | else |
---|
715 | # Try using printf. |
---|
716 | echo='printf %s\n' |
---|
717 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
---|
718 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
---|
719 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
720 | # Cool, printf works |
---|
721 | : |
---|
722 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
---|
723 | test "X$echo_testing_string" = 'X\t' && |
---|
724 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
---|
725 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
726 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL |
---|
727 | export CONFIG_SHELL |
---|
728 | SHELL="$CONFIG_SHELL" |
---|
729 | export SHELL |
---|
730 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
---|
731 | elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
---|
732 | test "X$echo_testing_string" = 'X\t' && |
---|
733 | echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
---|
734 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
735 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
---|
736 | else |
---|
737 | # maybe with a smaller string... |
---|
738 | prev=: |
---|
739 | |
---|
740 | for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do |
---|
741 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null |
---|
742 | then |
---|
743 | break |
---|
744 | fi |
---|
745 | prev="$cmd" |
---|
746 | done |
---|
747 | |
---|
748 | if test "$prev" != 'sed 50q "[$]0"'; then |
---|
749 | echo_test_string=`eval $prev` |
---|
750 | export echo_test_string |
---|
751 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} |
---|
752 | else |
---|
753 | # Oops. We lost completely, so just stick with echo. |
---|
754 | echo=echo |
---|
755 | fi |
---|
756 | fi |
---|
757 | fi |
---|
758 | fi |
---|
759 | fi |
---|
760 | fi |
---|
761 | |
---|
762 | # Copy echo and quote the copy suitably for passing to libtool from |
---|
763 | # the Makefile, instead of quoting the original, which is used later. |
---|
764 | ECHO=$echo |
---|
765 | if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then |
---|
766 | ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" |
---|
767 | fi |
---|
768 | |
---|
769 | AC_SUBST(ECHO) |
---|
770 | AC_DIVERT_POP |
---|
771 | ])# _LT_AC_PROG_ECHO_BACKSLASH |
---|
772 | |
---|
773 | # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
---|
774 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
---|
775 | # ------------------------------------------------------------------ |
---|
776 | AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], |
---|
777 | [if test "$cross_compiling" = yes; then : |
---|
778 | [$4] |
---|
779 | else |
---|
780 | AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
---|
781 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
---|
782 | lt_status=$lt_dlunknown |
---|
783 | cat > conftest.$ac_ext <<EOF |
---|
784 | [#line __oline__ "configure" |
---|
785 | #include "confdefs.h" |
---|
786 | |
---|
787 | #if HAVE_DLFCN_H |
---|
788 | #include <dlfcn.h> |
---|
789 | #endif |
---|
790 | |
---|
791 | #include <stdio.h> |
---|
792 | |
---|
793 | #ifdef RTLD_GLOBAL |
---|
794 | # define LT_DLGLOBAL RTLD_GLOBAL |
---|
795 | #else |
---|
796 | # ifdef DL_GLOBAL |
---|
797 | # define LT_DLGLOBAL DL_GLOBAL |
---|
798 | # else |
---|
799 | # define LT_DLGLOBAL 0 |
---|
800 | # endif |
---|
801 | #endif |
---|
802 | |
---|
803 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
---|
804 | find out it does not work in some platform. */ |
---|
805 | #ifndef LT_DLLAZY_OR_NOW |
---|
806 | # ifdef RTLD_LAZY |
---|
807 | # define LT_DLLAZY_OR_NOW RTLD_LAZY |
---|
808 | # else |
---|
809 | # ifdef DL_LAZY |
---|
810 | # define LT_DLLAZY_OR_NOW DL_LAZY |
---|
811 | # else |
---|
812 | # ifdef RTLD_NOW |
---|
813 | # define LT_DLLAZY_OR_NOW RTLD_NOW |
---|
814 | # else |
---|
815 | # ifdef DL_NOW |
---|
816 | # define LT_DLLAZY_OR_NOW DL_NOW |
---|
817 | # else |
---|
818 | # define LT_DLLAZY_OR_NOW 0 |
---|
819 | # endif |
---|
820 | # endif |
---|
821 | # endif |
---|
822 | # endif |
---|
823 | #endif |
---|
824 | |
---|
825 | #ifdef __cplusplus |
---|
826 | extern "C" void exit (int); |
---|
827 | #endif |
---|
828 | |
---|
829 | void fnord() { int i=42;} |
---|
830 | int main () |
---|
831 | { |
---|
832 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
---|
833 | int status = $lt_dlunknown; |
---|
834 | |
---|
835 | if (self) |
---|
836 | { |
---|
837 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
---|
838 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
---|
839 | /* dlclose (self); */ |
---|
840 | } |
---|
841 | |
---|
842 | exit (status); |
---|
843 | }] |
---|
844 | EOF |
---|
845 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
---|
846 | (./conftest; exit; ) 2>/dev/null |
---|
847 | lt_status=$? |
---|
848 | case x$lt_status in |
---|
849 | x$lt_dlno_uscore) $1 ;; |
---|
850 | x$lt_dlneed_uscore) $2 ;; |
---|
851 | x$lt_unknown|x*) $3 ;; |
---|
852 | esac |
---|
853 | else : |
---|
854 | # compilation failed |
---|
855 | $3 |
---|
856 | fi |
---|
857 | fi |
---|
858 | rm -fr conftest* |
---|
859 | ])# _LT_AC_TRY_DLOPEN_SELF |
---|
860 | |
---|
861 | # AC_LIBTOOL_DLOPEN_SELF |
---|
862 | # ------------------- |
---|
863 | AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], |
---|
864 | [if test "x$enable_dlopen" != xyes; then |
---|
865 | enable_dlopen=unknown |
---|
866 | enable_dlopen_self=unknown |
---|
867 | enable_dlopen_self_static=unknown |
---|
868 | else |
---|
869 | lt_cv_dlopen=no |
---|
870 | lt_cv_dlopen_libs= |
---|
871 | |
---|
872 | case $host_os in |
---|
873 | beos*) |
---|
874 | lt_cv_dlopen="load_add_on" |
---|
875 | lt_cv_dlopen_libs= |
---|
876 | lt_cv_dlopen_self=yes |
---|
877 | ;; |
---|
878 | |
---|
879 | cygwin* | mingw* | pw32*) |
---|
880 | lt_cv_dlopen="LoadLibrary" |
---|
881 | lt_cv_dlopen_libs= |
---|
882 | ;; |
---|
883 | |
---|
884 | *) |
---|
885 | AC_CHECK_FUNC([shl_load], |
---|
886 | [lt_cv_dlopen="shl_load"], |
---|
887 | [AC_CHECK_LIB([dld], [shl_load], |
---|
888 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], |
---|
889 | [AC_CHECK_FUNC([dlopen], |
---|
890 | [lt_cv_dlopen="dlopen"], |
---|
891 | [AC_CHECK_LIB([dl], [dlopen], |
---|
892 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], |
---|
893 | [AC_CHECK_LIB([svld], [dlopen], |
---|
894 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], |
---|
895 | [AC_CHECK_LIB([dld], [dld_link], |
---|
896 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) |
---|
897 | ]) |
---|
898 | ]) |
---|
899 | ]) |
---|
900 | ]) |
---|
901 | ]) |
---|
902 | ;; |
---|
903 | esac |
---|
904 | |
---|
905 | if test "x$lt_cv_dlopen" != xno; then |
---|
906 | enable_dlopen=yes |
---|
907 | else |
---|
908 | enable_dlopen=no |
---|
909 | fi |
---|
910 | |
---|
911 | case $lt_cv_dlopen in |
---|
912 | dlopen) |
---|
913 | save_CPPFLAGS="$CPPFLAGS" |
---|
914 | AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
---|
915 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
---|
916 | |
---|
917 | save_LDFLAGS="$LDFLAGS" |
---|
918 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
---|
919 | |
---|
920 | save_LIBS="$LIBS" |
---|
921 | LIBS="$lt_cv_dlopen_libs $LIBS" |
---|
922 | |
---|
923 | AC_CACHE_CHECK([whether a program can dlopen itself], |
---|
924 | lt_cv_dlopen_self, [dnl |
---|
925 | _LT_AC_TRY_DLOPEN_SELF( |
---|
926 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
---|
927 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
---|
928 | ]) |
---|
929 | |
---|
930 | if test "x$lt_cv_dlopen_self" = xyes; then |
---|
931 | LDFLAGS="$LDFLAGS $link_static_flag" |
---|
932 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
---|
933 | lt_cv_dlopen_self_static, [dnl |
---|
934 | _LT_AC_TRY_DLOPEN_SELF( |
---|
935 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
---|
936 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
---|
937 | ]) |
---|
938 | fi |
---|
939 | |
---|
940 | CPPFLAGS="$save_CPPFLAGS" |
---|
941 | LDFLAGS="$save_LDFLAGS" |
---|
942 | LIBS="$save_LIBS" |
---|
943 | ;; |
---|
944 | esac |
---|
945 | |
---|
946 | case $lt_cv_dlopen_self in |
---|
947 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
---|
948 | *) enable_dlopen_self=unknown ;; |
---|
949 | esac |
---|
950 | |
---|
951 | case $lt_cv_dlopen_self_static in |
---|
952 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
---|
953 | *) enable_dlopen_self_static=unknown ;; |
---|
954 | esac |
---|
955 | fi |
---|
956 | ])# AC_LIBTOOL_DLOPEN_SELF |
---|
957 | |
---|
958 | AC_DEFUN([_LT_AC_LTCONFIG_HACK], |
---|
959 | [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl |
---|
960 | # Sed substitution that helps us do robust quoting. It backslashifies |
---|
961 | # metacharacters that are still active within double-quoted strings. |
---|
962 | Xsed='sed -e s/^X//' |
---|
963 | sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' |
---|
964 | |
---|
965 | # Same as above, but do not quote variable references. |
---|
966 | double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' |
---|
967 | |
---|
968 | # Sed substitution to delay expansion of an escaped shell variable in a |
---|
969 | # double_quote_subst'ed string. |
---|
970 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
---|
971 | |
---|
972 | # Constants: |
---|
973 | rm="rm -f" |
---|
974 | |
---|
975 | # Global variables: |
---|
976 | default_ofile=libtool |
---|
977 | can_build_shared=yes |
---|
978 | |
---|
979 | # All known linkers require a `.a' archive for static linking (except M$VC, |
---|
980 | # which needs '.lib'). |
---|
981 | libext=a |
---|
982 | ltmain="$ac_aux_dir/ltmain.sh" |
---|
983 | ofile="$default_ofile" |
---|
984 | with_gnu_ld="$lt_cv_prog_gnu_ld" |
---|
985 | need_locks="$enable_libtool_lock" |
---|
986 | |
---|
987 | old_CC="$CC" |
---|
988 | old_CFLAGS="$CFLAGS" |
---|
989 | |
---|
990 | # Set sane defaults for various variables |
---|
991 | test -z "$AR" && AR=ar |
---|
992 | test -z "$AR_FLAGS" && AR_FLAGS=cru |
---|
993 | test -z "$AS" && AS=as |
---|
994 | test -z "$CC" && CC=cc |
---|
995 | test -z "$DLLTOOL" && DLLTOOL=dlltool |
---|
996 | test -z "$LD" && LD=ld |
---|
997 | test -z "$LN_S" && LN_S="ln -s" |
---|
998 | test -z "$MAGIC_CMD" && MAGIC_CMD=file |
---|
999 | test -z "$NM" && NM=nm |
---|
1000 | test -z "$OBJDUMP" && OBJDUMP=objdump |
---|
1001 | test -z "$RANLIB" && RANLIB=: |
---|
1002 | test -z "$STRIP" && STRIP=: |
---|
1003 | test -z "$ac_objext" && ac_objext=o |
---|
1004 | |
---|
1005 | if test x"$host" != x"$build"; then |
---|
1006 | ac_tool_prefix=${host_alias}- |
---|
1007 | else |
---|
1008 | ac_tool_prefix= |
---|
1009 | fi |
---|
1010 | |
---|
1011 | # Transform linux* to *-*-linux-gnu*, to support old configure scripts. |
---|
1012 | case $host_os in |
---|
1013 | linux-gnu*) ;; |
---|
1014 | linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` |
---|
1015 | esac |
---|
1016 | |
---|
1017 | case $host_os in |
---|
1018 | aix3*) |
---|
1019 | # AIX sometimes has problems with the GCC collect2 program. For some |
---|
1020 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
---|
1021 | # vanish in a puff of smoke. |
---|
1022 | if test "X${COLLECT_NAMES+set}" != Xset; then |
---|
1023 | COLLECT_NAMES= |
---|
1024 | export COLLECT_NAMES |
---|
1025 | fi |
---|
1026 | ;; |
---|
1027 | esac |
---|
1028 | |
---|
1029 | # Determine commands to create old-style static archives. |
---|
1030 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' |
---|
1031 | old_postinstall_cmds='chmod 644 $oldlib' |
---|
1032 | old_postuninstall_cmds= |
---|
1033 | |
---|
1034 | if test -n "$RANLIB"; then |
---|
1035 | case $host_os in |
---|
1036 | openbsd*) |
---|
1037 | old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" |
---|
1038 | ;; |
---|
1039 | *) |
---|
1040 | old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" |
---|
1041 | ;; |
---|
1042 | esac |
---|
1043 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
---|
1044 | fi |
---|
1045 | |
---|
1046 | # Allow CC to be a program name with arguments. |
---|
1047 | set dummy $CC |
---|
1048 | compiler="[$]2" |
---|
1049 | |
---|
1050 | AC_MSG_CHECKING([for objdir]) |
---|
1051 | rm -f .libs 2>/dev/null |
---|
1052 | mkdir .libs 2>/dev/null |
---|
1053 | if test -d .libs; then |
---|
1054 | objdir=.libs |
---|
1055 | else |
---|
1056 | # MS-DOS does not allow filenames that begin with a dot. |
---|
1057 | objdir=_libs |
---|
1058 | fi |
---|
1059 | rmdir .libs 2>/dev/null |
---|
1060 | AC_MSG_RESULT($objdir) |
---|
1061 | |
---|
1062 | |
---|
1063 | AC_ARG_WITH(pic, |
---|
1064 | [ --with-pic try to use only PIC/non-PIC objects [default=use both]], |
---|
1065 | pic_mode="$withval", pic_mode=default) |
---|
1066 | test -z "$pic_mode" && pic_mode=default |
---|
1067 | |
---|
1068 | # We assume here that the value for lt_cv_prog_cc_pic will not be cached |
---|
1069 | # in isolation, and that seeing it set (from the cache) indicates that |
---|
1070 | # the associated values are set (in the cache) correctly too. |
---|
1071 | AC_MSG_CHECKING([for $compiler option to produce PIC]) |
---|
1072 | AC_CACHE_VAL(lt_cv_prog_cc_pic, |
---|
1073 | [ lt_cv_prog_cc_pic= |
---|
1074 | lt_cv_prog_cc_shlib= |
---|
1075 | lt_cv_prog_cc_wl= |
---|
1076 | lt_cv_prog_cc_static= |
---|
1077 | lt_cv_prog_cc_no_builtin= |
---|
1078 | lt_cv_prog_cc_can_build_shared=$can_build_shared |
---|
1079 | |
---|
1080 | if test "$GCC" = yes; then |
---|
1081 | lt_cv_prog_cc_wl='-Wl,' |
---|
1082 | lt_cv_prog_cc_static='-static' |
---|
1083 | |
---|
1084 | case $host_os in |
---|
1085 | aix*) |
---|
1086 | # Below there is a dirty hack to force normal static linking with -ldl |
---|
1087 | # The problem is because libdl dynamically linked with both libc and |
---|
1088 | # libC (AIX C++ library), which obviously doesn't included in libraries |
---|
1089 | # list by gcc. This cause undefined symbols with -static flags. |
---|
1090 | # This hack allows C programs to be linked with "-static -ldl", but |
---|
1091 | # not sure about C++ programs. |
---|
1092 | lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" |
---|
1093 | ;; |
---|
1094 | amigaos*) |
---|
1095 | # FIXME: we need at least 68020 code to build shared libraries, but |
---|
1096 | # adding the `-m68020' flag to GCC prevents building anything better, |
---|
1097 | # like `-m68040'. |
---|
1098 | lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' |
---|
1099 | ;; |
---|
1100 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
---|
1101 | # PIC is the default for these OSes. |
---|
1102 | ;; |
---|
1103 | darwin* | rhapsody*) |
---|
1104 | # PIC is the default on this platform |
---|
1105 | # Common symbols not allowed in MH_DYLIB files |
---|
1106 | lt_cv_prog_cc_pic='-fno-common' |
---|
1107 | ;; |
---|
1108 | cygwin* | mingw* | pw32* | os2*) |
---|
1109 | # This hack is so that the source file can tell whether it is being |
---|
1110 | # built for inclusion in a dll (and should export symbols for example). |
---|
1111 | lt_cv_prog_cc_pic='-DDLL_EXPORT' |
---|
1112 | ;; |
---|
1113 | sysv4*MP*) |
---|
1114 | if test -d /usr/nec; then |
---|
1115 | lt_cv_prog_cc_pic=-Kconform_pic |
---|
1116 | fi |
---|
1117 | ;; |
---|
1118 | *) |
---|
1119 | lt_cv_prog_cc_pic='-fPIC' |
---|
1120 | ;; |
---|
1121 | esac |
---|
1122 | else |
---|
1123 | # PORTME Check for PIC flags for the system compiler. |
---|
1124 | case $host_os in |
---|
1125 | aix3* | aix4* | aix5*) |
---|
1126 | lt_cv_prog_cc_wl='-Wl,' |
---|
1127 | # All AIX code is PIC. |
---|
1128 | if test "$host_cpu" = ia64; then |
---|
1129 | # AIX 5 now supports IA64 processor |
---|
1130 | lt_cv_prog_cc_static='-Bstatic' |
---|
1131 | else |
---|
1132 | lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' |
---|
1133 | fi |
---|
1134 | ;; |
---|
1135 | |
---|
1136 | hpux9* | hpux10* | hpux11*) |
---|
1137 | # Is there a better lt_cv_prog_cc_static that works with the bundled CC? |
---|
1138 | lt_cv_prog_cc_wl='-Wl,' |
---|
1139 | lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" |
---|
1140 | lt_cv_prog_cc_pic='+Z' |
---|
1141 | ;; |
---|
1142 | |
---|
1143 | irix5* | irix6* | nonstopux*) |
---|
1144 | lt_cv_prog_cc_wl='-Wl,' |
---|
1145 | lt_cv_prog_cc_static='-non_shared' |
---|
1146 | # PIC (with -KPIC) is the default. |
---|
1147 | ;; |
---|
1148 | |
---|
1149 | cygwin* | mingw* | pw32* | os2*) |
---|
1150 | # This hack is so that the source file can tell whether it is being |
---|
1151 | # built for inclusion in a dll (and should export symbols for example). |
---|
1152 | lt_cv_prog_cc_pic='-DDLL_EXPORT' |
---|
1153 | ;; |
---|
1154 | |
---|
1155 | newsos6) |
---|
1156 | lt_cv_prog_cc_pic='-KPIC' |
---|
1157 | lt_cv_prog_cc_static='-Bstatic' |
---|
1158 | ;; |
---|
1159 | |
---|
1160 | osf3* | osf4* | osf5*) |
---|
1161 | # All OSF/1 code is PIC. |
---|
1162 | lt_cv_prog_cc_wl='-Wl,' |
---|
1163 | lt_cv_prog_cc_static='-non_shared' |
---|
1164 | ;; |
---|
1165 | |
---|
1166 | sco3.2v5*) |
---|
1167 | lt_cv_prog_cc_pic='-Kpic' |
---|
1168 | lt_cv_prog_cc_static='-dn' |
---|
1169 | lt_cv_prog_cc_shlib='-belf' |
---|
1170 | ;; |
---|
1171 | |
---|
1172 | solaris*) |
---|
1173 | lt_cv_prog_cc_pic='-KPIC' |
---|
1174 | lt_cv_prog_cc_static='-Bstatic' |
---|
1175 | lt_cv_prog_cc_wl='-Wl,' |
---|
1176 | ;; |
---|
1177 | |
---|
1178 | sunos4*) |
---|
1179 | lt_cv_prog_cc_pic='-PIC' |
---|
1180 | lt_cv_prog_cc_static='-Bstatic' |
---|
1181 | lt_cv_prog_cc_wl='-Qoption ld ' |
---|
1182 | ;; |
---|
1183 | |
---|
1184 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
1185 | lt_cv_prog_cc_pic='-KPIC' |
---|
1186 | lt_cv_prog_cc_static='-Bstatic' |
---|
1187 | lt_cv_prog_cc_wl='-Wl,' |
---|
1188 | ;; |
---|
1189 | |
---|
1190 | uts4*) |
---|
1191 | lt_cv_prog_cc_pic='-pic' |
---|
1192 | lt_cv_prog_cc_static='-Bstatic' |
---|
1193 | ;; |
---|
1194 | |
---|
1195 | sysv4*MP*) |
---|
1196 | if test -d /usr/nec ;then |
---|
1197 | lt_cv_prog_cc_pic='-Kconform_pic' |
---|
1198 | lt_cv_prog_cc_static='-Bstatic' |
---|
1199 | fi |
---|
1200 | ;; |
---|
1201 | |
---|
1202 | *) |
---|
1203 | lt_cv_prog_cc_can_build_shared=no |
---|
1204 | ;; |
---|
1205 | esac |
---|
1206 | fi |
---|
1207 | ]) |
---|
1208 | if test -z "$lt_cv_prog_cc_pic"; then |
---|
1209 | AC_MSG_RESULT([none]) |
---|
1210 | else |
---|
1211 | AC_MSG_RESULT([$lt_cv_prog_cc_pic]) |
---|
1212 | |
---|
1213 | # Check to make sure the pic_flag actually works. |
---|
1214 | AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) |
---|
1215 | AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl |
---|
1216 | save_CFLAGS="$CFLAGS" |
---|
1217 | CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" |
---|
1218 | AC_TRY_COMPILE([], [], [dnl |
---|
1219 | case $host_os in |
---|
1220 | hpux9* | hpux10* | hpux11*) |
---|
1221 | # On HP-UX, both CC and GCC only warn that PIC is supported... then |
---|
1222 | # they create non-PIC objects. So, if there were any warnings, we |
---|
1223 | # assume that PIC is not supported. |
---|
1224 | if test -s conftest.err; then |
---|
1225 | lt_cv_prog_cc_pic_works=no |
---|
1226 | else |
---|
1227 | lt_cv_prog_cc_pic_works=yes |
---|
1228 | fi |
---|
1229 | ;; |
---|
1230 | *) |
---|
1231 | lt_cv_prog_cc_pic_works=yes |
---|
1232 | ;; |
---|
1233 | esac |
---|
1234 | ], [dnl |
---|
1235 | lt_cv_prog_cc_pic_works=no |
---|
1236 | ]) |
---|
1237 | CFLAGS="$save_CFLAGS" |
---|
1238 | ]) |
---|
1239 | |
---|
1240 | if test "X$lt_cv_prog_cc_pic_works" = Xno; then |
---|
1241 | lt_cv_prog_cc_pic= |
---|
1242 | lt_cv_prog_cc_can_build_shared=no |
---|
1243 | else |
---|
1244 | lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" |
---|
1245 | fi |
---|
1246 | |
---|
1247 | AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) |
---|
1248 | fi |
---|
1249 | |
---|
1250 | # Check for any special shared library compilation flags. |
---|
1251 | if test -n "$lt_cv_prog_cc_shlib"; then |
---|
1252 | AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) |
---|
1253 | if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : |
---|
1254 | else |
---|
1255 | AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) |
---|
1256 | lt_cv_prog_cc_can_build_shared=no |
---|
1257 | fi |
---|
1258 | fi |
---|
1259 | |
---|
1260 | AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) |
---|
1261 | AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl |
---|
1262 | lt_cv_prog_cc_static_works=no |
---|
1263 | save_LDFLAGS="$LDFLAGS" |
---|
1264 | LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" |
---|
1265 | AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) |
---|
1266 | LDFLAGS="$save_LDFLAGS" |
---|
1267 | ]) |
---|
1268 | |
---|
1269 | # Belt *and* braces to stop my trousers falling down: |
---|
1270 | test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= |
---|
1271 | AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) |
---|
1272 | |
---|
1273 | pic_flag="$lt_cv_prog_cc_pic" |
---|
1274 | special_shlib_compile_flags="$lt_cv_prog_cc_shlib" |
---|
1275 | wl="$lt_cv_prog_cc_wl" |
---|
1276 | link_static_flag="$lt_cv_prog_cc_static" |
---|
1277 | no_builtin_flag="$lt_cv_prog_cc_no_builtin" |
---|
1278 | can_build_shared="$lt_cv_prog_cc_can_build_shared" |
---|
1279 | |
---|
1280 | |
---|
1281 | # Check to see if options -o and -c are simultaneously supported by compiler |
---|
1282 | AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) |
---|
1283 | AC_CACHE_VAL([lt_cv_compiler_c_o], [ |
---|
1284 | $rm -r conftest 2>/dev/null |
---|
1285 | mkdir conftest |
---|
1286 | cd conftest |
---|
1287 | echo "int some_variable = 0;" > conftest.$ac_ext |
---|
1288 | mkdir out |
---|
1289 | # According to Tom Tromey, Ian Lance Taylor reported there are C compilers |
---|
1290 | # that will create temporary files in the current directory regardless of |
---|
1291 | # the output directory. Thus, making CWD read-only will cause this test |
---|
1292 | # to fail, enabling locking or at least warning the user not to do parallel |
---|
1293 | # builds. |
---|
1294 | chmod -w . |
---|
1295 | save_CFLAGS="$CFLAGS" |
---|
1296 | CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" |
---|
1297 | compiler_c_o=no |
---|
1298 | if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then |
---|
1299 | # The compiler can only warn and ignore the option if not recognized |
---|
1300 | # So say no if there are warnings |
---|
1301 | if test -s out/conftest.err; then |
---|
1302 | lt_cv_compiler_c_o=no |
---|
1303 | else |
---|
1304 | lt_cv_compiler_c_o=yes |
---|
1305 | fi |
---|
1306 | else |
---|
1307 | # Append any errors to the config.log. |
---|
1308 | cat out/conftest.err 1>&AC_FD_CC |
---|
1309 | lt_cv_compiler_c_o=no |
---|
1310 | fi |
---|
1311 | CFLAGS="$save_CFLAGS" |
---|
1312 | chmod u+w . |
---|
1313 | $rm conftest* out/* |
---|
1314 | rmdir out |
---|
1315 | cd .. |
---|
1316 | rmdir conftest |
---|
1317 | $rm -r conftest 2>/dev/null |
---|
1318 | ]) |
---|
1319 | compiler_c_o=$lt_cv_compiler_c_o |
---|
1320 | AC_MSG_RESULT([$compiler_c_o]) |
---|
1321 | |
---|
1322 | if test x"$compiler_c_o" = x"yes"; then |
---|
1323 | # Check to see if we can write to a .lo |
---|
1324 | AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) |
---|
1325 | AC_CACHE_VAL([lt_cv_compiler_o_lo], [ |
---|
1326 | lt_cv_compiler_o_lo=no |
---|
1327 | save_CFLAGS="$CFLAGS" |
---|
1328 | CFLAGS="$CFLAGS -c -o conftest.lo" |
---|
1329 | save_objext="$ac_objext" |
---|
1330 | ac_objext=lo |
---|
1331 | AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
---|
1332 | # The compiler can only warn and ignore the option if not recognized |
---|
1333 | # So say no if there are warnings |
---|
1334 | if test -s conftest.err; then |
---|
1335 | lt_cv_compiler_o_lo=no |
---|
1336 | else |
---|
1337 | lt_cv_compiler_o_lo=yes |
---|
1338 | fi |
---|
1339 | ]) |
---|
1340 | ac_objext="$save_objext" |
---|
1341 | CFLAGS="$save_CFLAGS" |
---|
1342 | ]) |
---|
1343 | compiler_o_lo=$lt_cv_compiler_o_lo |
---|
1344 | AC_MSG_RESULT([$compiler_o_lo]) |
---|
1345 | else |
---|
1346 | compiler_o_lo=no |
---|
1347 | fi |
---|
1348 | |
---|
1349 | # Check to see if we can do hard links to lock some files if needed |
---|
1350 | hard_links="nottested" |
---|
1351 | if test "$compiler_c_o" = no && test "$need_locks" != no; then |
---|
1352 | # do not overwrite the value of need_locks provided by the user |
---|
1353 | AC_MSG_CHECKING([if we can lock with hard links]) |
---|
1354 | hard_links=yes |
---|
1355 | $rm conftest* |
---|
1356 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
---|
1357 | touch conftest.a |
---|
1358 | ln conftest.a conftest.b 2>&5 || hard_links=no |
---|
1359 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
---|
1360 | AC_MSG_RESULT([$hard_links]) |
---|
1361 | if test "$hard_links" = no; then |
---|
1362 | AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) |
---|
1363 | need_locks=warn |
---|
1364 | fi |
---|
1365 | else |
---|
1366 | need_locks=no |
---|
1367 | fi |
---|
1368 | |
---|
1369 | if test "$GCC" = yes; then |
---|
1370 | # Check to see if options -fno-rtti -fno-exceptions are supported by compiler |
---|
1371 | AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) |
---|
1372 | echo "int some_variable = 0;" > conftest.$ac_ext |
---|
1373 | save_CFLAGS="$CFLAGS" |
---|
1374 | CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" |
---|
1375 | compiler_rtti_exceptions=no |
---|
1376 | AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
---|
1377 | # The compiler can only warn and ignore the option if not recognized |
---|
1378 | # So say no if there are warnings |
---|
1379 | if test -s conftest.err; then |
---|
1380 | compiler_rtti_exceptions=no |
---|
1381 | else |
---|
1382 | compiler_rtti_exceptions=yes |
---|
1383 | fi |
---|
1384 | ]) |
---|
1385 | CFLAGS="$save_CFLAGS" |
---|
1386 | AC_MSG_RESULT([$compiler_rtti_exceptions]) |
---|
1387 | |
---|
1388 | if test "$compiler_rtti_exceptions" = "yes"; then |
---|
1389 | no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' |
---|
1390 | else |
---|
1391 | no_builtin_flag=' -fno-builtin' |
---|
1392 | fi |
---|
1393 | fi |
---|
1394 | |
---|
1395 | # See if the linker supports building shared libraries. |
---|
1396 | AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) |
---|
1397 | |
---|
1398 | allow_undefined_flag= |
---|
1399 | no_undefined_flag= |
---|
1400 | need_lib_prefix=unknown |
---|
1401 | need_version=unknown |
---|
1402 | # when you set need_version to no, make sure it does not cause -set_version |
---|
1403 | # flags to be left without arguments |
---|
1404 | archive_cmds= |
---|
1405 | archive_expsym_cmds= |
---|
1406 | old_archive_from_new_cmds= |
---|
1407 | old_archive_from_expsyms_cmds= |
---|
1408 | export_dynamic_flag_spec= |
---|
1409 | whole_archive_flag_spec= |
---|
1410 | thread_safe_flag_spec= |
---|
1411 | hardcode_into_libs=no |
---|
1412 | hardcode_libdir_flag_spec= |
---|
1413 | hardcode_libdir_separator= |
---|
1414 | hardcode_direct=no |
---|
1415 | hardcode_minus_L=no |
---|
1416 | hardcode_shlibpath_var=unsupported |
---|
1417 | runpath_var= |
---|
1418 | link_all_deplibs=unknown |
---|
1419 | always_export_symbols=no |
---|
1420 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
---|
1421 | # include_expsyms should be a list of space-separated symbols to be *always* |
---|
1422 | # included in the symbol list |
---|
1423 | include_expsyms= |
---|
1424 | # exclude_expsyms can be an egrep regular expression of symbols to exclude |
---|
1425 | # it will be wrapped by ` (' and `)$', so one must not match beginning or |
---|
1426 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
---|
1427 | # as well as any symbol that contains `d'. |
---|
1428 | exclude_expsyms="_GLOBAL_OFFSET_TABLE_" |
---|
1429 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
---|
1430 | # platforms (ab)use it in PIC code, but their linkers get confused if |
---|
1431 | # the symbol is explicitly referenced. Since portable code cannot |
---|
1432 | # rely on this symbol name, it's probably fine to never include it in |
---|
1433 | # preloaded symbol tables. |
---|
1434 | extract_expsyms_cmds= |
---|
1435 | |
---|
1436 | case $host_os in |
---|
1437 | cygwin* | mingw* | pw32*) |
---|
1438 | # FIXME: the MSVC++ port hasn't been tested in a loooong time |
---|
1439 | # When not using gcc, we currently assume that we are using |
---|
1440 | # Microsoft Visual C++. |
---|
1441 | if test "$GCC" != yes; then |
---|
1442 | with_gnu_ld=no |
---|
1443 | fi |
---|
1444 | ;; |
---|
1445 | openbsd*) |
---|
1446 | with_gnu_ld=no |
---|
1447 | ;; |
---|
1448 | esac |
---|
1449 | |
---|
1450 | ld_shlibs=yes |
---|
1451 | if test "$with_gnu_ld" = yes; then |
---|
1452 | # If archive_cmds runs LD, not CC, wlarc should be empty |
---|
1453 | wlarc='${wl}' |
---|
1454 | |
---|
1455 | # See if GNU ld supports shared libraries. |
---|
1456 | case $host_os in |
---|
1457 | aix3* | aix4* | aix5*) |
---|
1458 | # On AIX, the GNU linker is very broken |
---|
1459 | # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. |
---|
1460 | ld_shlibs=no |
---|
1461 | cat <<EOF 1>&2 |
---|
1462 | |
---|
1463 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported |
---|
1464 | *** to be unable to reliably create shared libraries on AIX. |
---|
1465 | *** Therefore, libtool is disabling shared libraries support. If you |
---|
1466 | *** really care for shared libraries, you may want to modify your PATH |
---|
1467 | *** so that a non-GNU linker is found, and then restart. |
---|
1468 | |
---|
1469 | EOF |
---|
1470 | ;; |
---|
1471 | |
---|
1472 | amigaos*) |
---|
1473 | archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
---|
1474 | hardcode_libdir_flag_spec='-L$libdir' |
---|
1475 | hardcode_minus_L=yes |
---|
1476 | |
---|
1477 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
---|
1478 | # that the semantics of dynamic libraries on AmigaOS, at least up |
---|
1479 | # to version 4, is to share data among multiple programs linked |
---|
1480 | # with the same dynamic library. Since this doesn't match the |
---|
1481 | # behavior of shared libraries on other platforms, we can use |
---|
1482 | # them. |
---|
1483 | ld_shlibs=no |
---|
1484 | ;; |
---|
1485 | |
---|
1486 | beos*) |
---|
1487 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
---|
1488 | allow_undefined_flag=unsupported |
---|
1489 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
---|
1490 | # support --undefined. This deserves some investigation. FIXME |
---|
1491 | archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1492 | else |
---|
1493 | ld_shlibs=no |
---|
1494 | fi |
---|
1495 | ;; |
---|
1496 | |
---|
1497 | cygwin* | mingw* | pw32*) |
---|
1498 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
---|
1499 | # no search path for DLLs. |
---|
1500 | hardcode_libdir_flag_spec='-L$libdir' |
---|
1501 | allow_undefined_flag=unsupported |
---|
1502 | always_export_symbols=yes |
---|
1503 | |
---|
1504 | extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ |
---|
1505 | sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ |
---|
1506 | test -f $output_objdir/impgen.exe || (cd $output_objdir && \ |
---|
1507 | if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ |
---|
1508 | else $CC -o impgen impgen.c ; fi)~ |
---|
1509 | $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' |
---|
1510 | |
---|
1511 | old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' |
---|
1512 | |
---|
1513 | # cygwin and mingw dlls have different entry points and sets of symbols |
---|
1514 | # to exclude. |
---|
1515 | # FIXME: what about values for MSVC? |
---|
1516 | dll_entry=__cygwin_dll_entry@12 |
---|
1517 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ |
---|
1518 | case $host_os in |
---|
1519 | mingw*) |
---|
1520 | # mingw values |
---|
1521 | dll_entry=_DllMainCRTStartup@12 |
---|
1522 | dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ |
---|
1523 | ;; |
---|
1524 | esac |
---|
1525 | |
---|
1526 | # mingw and cygwin differ, and it's simplest to just exclude the union |
---|
1527 | # of the two symbol sets. |
---|
1528 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 |
---|
1529 | |
---|
1530 | # recent cygwin and mingw systems supply a stub DllMain which the user |
---|
1531 | # can override, but on older systems we have to supply one (in ltdll.c) |
---|
1532 | if test "x$lt_cv_need_dllmain" = "xyes"; then |
---|
1533 | ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " |
---|
1534 | ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ |
---|
1535 | test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' |
---|
1536 | else |
---|
1537 | ltdll_obj= |
---|
1538 | ltdll_cmds= |
---|
1539 | fi |
---|
1540 | |
---|
1541 | # Extract the symbol export list from an `--export-all' def file, |
---|
1542 | # then regenerate the def file from the symbol export list, so that |
---|
1543 | # the compiled dll only exports the symbol export list. |
---|
1544 | # Be careful not to strip the DATA tag left be newer dlltools. |
---|
1545 | export_symbols_cmds="$ltdll_cmds"' |
---|
1546 | $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ |
---|
1547 | sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' |
---|
1548 | |
---|
1549 | # If the export-symbols file already is a .def file (1st line |
---|
1550 | # is EXPORTS), use it as is. |
---|
1551 | # If DATA tags from a recent dlltool are present, honour them! |
---|
1552 | archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then |
---|
1553 | cp $export_symbols $output_objdir/$soname-def; |
---|
1554 | else |
---|
1555 | echo EXPORTS > $output_objdir/$soname-def; |
---|
1556 | _lt_hint=1; |
---|
1557 | cat $export_symbols | while read symbol; do |
---|
1558 | set dummy \$symbol; |
---|
1559 | case \[$]# in |
---|
1560 | 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; |
---|
1561 | 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; |
---|
1562 | *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; |
---|
1563 | esac; |
---|
1564 | _lt_hint=`expr 1 + \$_lt_hint`; |
---|
1565 | done; |
---|
1566 | fi~ |
---|
1567 | '"$ltdll_cmds"' |
---|
1568 | $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
---|
1569 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ |
---|
1570 | $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
---|
1571 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ |
---|
1572 | $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' |
---|
1573 | ;; |
---|
1574 | |
---|
1575 | netbsd*) |
---|
1576 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
1577 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
---|
1578 | wlarc= |
---|
1579 | else |
---|
1580 | archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1581 | archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
1582 | fi |
---|
1583 | ;; |
---|
1584 | |
---|
1585 | solaris* | sysv5*) |
---|
1586 | if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
---|
1587 | ld_shlibs=no |
---|
1588 | cat <<EOF 1>&2 |
---|
1589 | |
---|
1590 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
---|
1591 | *** create shared libraries on Solaris systems. Therefore, libtool |
---|
1592 | *** is disabling shared libraries support. We urge you to upgrade GNU |
---|
1593 | *** binutils to release 2.9.1 or newer. Another option is to modify |
---|
1594 | *** your PATH or compiler configuration so that the native linker is |
---|
1595 | *** used, and then restart. |
---|
1596 | |
---|
1597 | EOF |
---|
1598 | elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
---|
1599 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1600 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
1601 | else |
---|
1602 | ld_shlibs=no |
---|
1603 | fi |
---|
1604 | ;; |
---|
1605 | |
---|
1606 | sunos4*) |
---|
1607 | archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
1608 | wlarc= |
---|
1609 | hardcode_direct=yes |
---|
1610 | hardcode_shlibpath_var=no |
---|
1611 | ;; |
---|
1612 | |
---|
1613 | linux*) |
---|
1614 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
---|
1615 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1616 | supports_anon_versioning=no |
---|
1617 | case `$LD -v 2>/dev/null` in |
---|
1618 | *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 |
---|
1619 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... |
---|
1620 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... |
---|
1621 | *\ 2.11.*) ;; # other 2.11 versions |
---|
1622 | *) supports_anon_versioning=yes ;; |
---|
1623 | esac |
---|
1624 | if test $supports_anon_versioning = yes; then |
---|
1625 | archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ |
---|
1626 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ |
---|
1627 | $echo "local: *; };" >> $output_objdir/$libname.ver~ |
---|
1628 | $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' |
---|
1629 | else |
---|
1630 | $archive_expsym_cmds="$archive_cmds" |
---|
1631 | fi |
---|
1632 | else |
---|
1633 | ld_shlibs=no |
---|
1634 | fi |
---|
1635 | ;; |
---|
1636 | |
---|
1637 | *) |
---|
1638 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
---|
1639 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1640 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
1641 | else |
---|
1642 | ld_shlibs=no |
---|
1643 | fi |
---|
1644 | ;; |
---|
1645 | esac |
---|
1646 | |
---|
1647 | if test "$ld_shlibs" = yes; then |
---|
1648 | runpath_var=LD_RUN_PATH |
---|
1649 | hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' |
---|
1650 | export_dynamic_flag_spec='${wl}--export-dynamic' |
---|
1651 | case $host_os in |
---|
1652 | cygwin* | mingw* | pw32*) |
---|
1653 | # dlltool doesn't understand --whole-archive et. al. |
---|
1654 | whole_archive_flag_spec= |
---|
1655 | ;; |
---|
1656 | *) |
---|
1657 | # ancient GNU ld didn't support --whole-archive et. al. |
---|
1658 | if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
---|
1659 | whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
---|
1660 | else |
---|
1661 | whole_archive_flag_spec= |
---|
1662 | fi |
---|
1663 | ;; |
---|
1664 | esac |
---|
1665 | fi |
---|
1666 | else |
---|
1667 | # PORTME fill in a description of your system's linker (not GNU ld) |
---|
1668 | case $host_os in |
---|
1669 | aix3*) |
---|
1670 | allow_undefined_flag=unsupported |
---|
1671 | always_export_symbols=yes |
---|
1672 | archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' |
---|
1673 | # Note: this linker hardcodes the directories in LIBPATH if there |
---|
1674 | # are no directories specified by -L. |
---|
1675 | hardcode_minus_L=yes |
---|
1676 | if test "$GCC" = yes && test -z "$link_static_flag"; then |
---|
1677 | # Neither direct hardcoding nor static linking is supported with a |
---|
1678 | # broken collect2. |
---|
1679 | hardcode_direct=unsupported |
---|
1680 | fi |
---|
1681 | ;; |
---|
1682 | |
---|
1683 | aix4* | aix5*) |
---|
1684 | if test "$host_cpu" = ia64; then |
---|
1685 | # On IA64, the linker does run time linking by default, so we don't |
---|
1686 | # have to do anything special. |
---|
1687 | aix_use_runtimelinking=no |
---|
1688 | exp_sym_flag='-Bexport' |
---|
1689 | no_entry_flag="" |
---|
1690 | else |
---|
1691 | aix_use_runtimelinking=no |
---|
1692 | |
---|
1693 | # Test if we are trying to use run time linking or normal |
---|
1694 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
---|
1695 | # need to do runtime linking. |
---|
1696 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
---|
1697 | for ld_flag in $LDFLAGS; do |
---|
1698 | case $ld_flag in |
---|
1699 | *-brtl*) |
---|
1700 | aix_use_runtimelinking=yes |
---|
1701 | break |
---|
1702 | ;; |
---|
1703 | esac |
---|
1704 | done |
---|
1705 | esac |
---|
1706 | |
---|
1707 | exp_sym_flag='-bexport' |
---|
1708 | no_entry_flag='-bnoentry' |
---|
1709 | fi |
---|
1710 | |
---|
1711 | # When large executables or shared objects are built, AIX ld can |
---|
1712 | # have problems creating the table of contents. If linking a library |
---|
1713 | # or program results in "error TOC overflow" add -mminimal-toc to |
---|
1714 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
---|
1715 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
---|
1716 | |
---|
1717 | hardcode_direct=yes |
---|
1718 | archive_cmds='' |
---|
1719 | hardcode_libdir_separator=':' |
---|
1720 | if test "$GCC" = yes; then |
---|
1721 | case $host_os in aix4.[[012]]|aix4.[[012]].*) |
---|
1722 | collect2name=`${CC} -print-prog-name=collect2` |
---|
1723 | if test -f "$collect2name" && \ |
---|
1724 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
---|
1725 | then |
---|
1726 | # We have reworked collect2 |
---|
1727 | hardcode_direct=yes |
---|
1728 | else |
---|
1729 | # We have old collect2 |
---|
1730 | hardcode_direct=unsupported |
---|
1731 | # It fails to find uninstalled libraries when the uninstalled |
---|
1732 | # path is not listed in the libpath. Setting hardcode_minus_L |
---|
1733 | # to unsupported forces relinking |
---|
1734 | hardcode_minus_L=yes |
---|
1735 | hardcode_libdir_flag_spec='-L$libdir' |
---|
1736 | hardcode_libdir_separator= |
---|
1737 | fi |
---|
1738 | esac |
---|
1739 | |
---|
1740 | shared_flag='-shared' |
---|
1741 | else |
---|
1742 | # not using gcc |
---|
1743 | if test "$host_cpu" = ia64; then |
---|
1744 | shared_flag='${wl}-G' |
---|
1745 | else |
---|
1746 | if test "$aix_use_runtimelinking" = yes; then |
---|
1747 | shared_flag='${wl}-G' |
---|
1748 | else |
---|
1749 | shared_flag='${wl}-bM:SRE' |
---|
1750 | fi |
---|
1751 | fi |
---|
1752 | fi |
---|
1753 | |
---|
1754 | # It seems that -bexpall can do strange things, so it is better to |
---|
1755 | # generate a list of symbols to export. |
---|
1756 | always_export_symbols=yes |
---|
1757 | if test "$aix_use_runtimelinking" = yes; then |
---|
1758 | # Warning - without using the other runtime loading flags (-brtl), |
---|
1759 | # -berok will link without error, but may produce a broken library. |
---|
1760 | allow_undefined_flag='-berok' |
---|
1761 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' |
---|
1762 | archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
---|
1763 | else |
---|
1764 | if test "$host_cpu" = ia64; then |
---|
1765 | hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
---|
1766 | allow_undefined_flag="-z nodefs" |
---|
1767 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
---|
1768 | else |
---|
1769 | hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' |
---|
1770 | # Warning - without using the other run time loading flags, |
---|
1771 | # -berok will link without error, but may produce a broken library. |
---|
1772 | allow_undefined_flag='${wl}-berok' |
---|
1773 | # This is a bit strange, but is similar to how AIX traditionally builds |
---|
1774 | # it's shared libraries. |
---|
1775 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' |
---|
1776 | fi |
---|
1777 | fi |
---|
1778 | ;; |
---|
1779 | |
---|
1780 | amigaos*) |
---|
1781 | archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
---|
1782 | hardcode_libdir_flag_spec='-L$libdir' |
---|
1783 | hardcode_minus_L=yes |
---|
1784 | # see comment about different semantics on the GNU ld section |
---|
1785 | ld_shlibs=no |
---|
1786 | ;; |
---|
1787 | |
---|
1788 | cygwin* | mingw* | pw32*) |
---|
1789 | # When not using gcc, we currently assume that we are using |
---|
1790 | # Microsoft Visual C++. |
---|
1791 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
---|
1792 | # no search path for DLLs. |
---|
1793 | hardcode_libdir_flag_spec=' ' |
---|
1794 | allow_undefined_flag=unsupported |
---|
1795 | # Tell ltmain to make .lib files, not .a files. |
---|
1796 | libext=lib |
---|
1797 | # FIXME: Setting linknames here is a bad hack. |
---|
1798 | archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
---|
1799 | # The linker will automatically build a .lib file if we build a DLL. |
---|
1800 | old_archive_from_new_cmds='true' |
---|
1801 | # FIXME: Should let the user specify the lib program. |
---|
1802 | old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' |
---|
1803 | fix_srcfile_path='`cygpath -w "$srcfile"`' |
---|
1804 | ;; |
---|
1805 | |
---|
1806 | darwin* | rhapsody*) |
---|
1807 | case "$host_os" in |
---|
1808 | rhapsody* | darwin1.[[012]]) |
---|
1809 | allow_undefined_flag='-undefined suppress' |
---|
1810 | ;; |
---|
1811 | *) # Darwin 1.3 on |
---|
1812 | allow_undefined_flag='-flat_namespace -undefined suppress' |
---|
1813 | ;; |
---|
1814 | esac |
---|
1815 | # FIXME: Relying on posixy $() will cause problems for |
---|
1816 | # cross-compilation, but unfortunately the echo tests do not |
---|
1817 | # yet detect zsh echo's removal of \ escapes. Also zsh mangles |
---|
1818 | # `"' quotes if we put them in here... so don't! |
---|
1819 | archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' |
---|
1820 | # We need to add '_' to the symbols in $export_symbols first |
---|
1821 | #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' |
---|
1822 | hardcode_direct=yes |
---|
1823 | hardcode_shlibpath_var=no |
---|
1824 | whole_archive_flag_spec='-all_load $convenience' |
---|
1825 | ;; |
---|
1826 | |
---|
1827 | freebsd1*) |
---|
1828 | ld_shlibs=no |
---|
1829 | ;; |
---|
1830 | |
---|
1831 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
---|
1832 | # support. Future versions do this automatically, but an explicit c++rt0.o |
---|
1833 | # does not break anything, and helps significantly (at the cost of a little |
---|
1834 | # extra space). |
---|
1835 | freebsd2.2*) |
---|
1836 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
---|
1837 | hardcode_libdir_flag_spec='-R$libdir' |
---|
1838 | hardcode_direct=yes |
---|
1839 | hardcode_shlibpath_var=no |
---|
1840 | ;; |
---|
1841 | |
---|
1842 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
---|
1843 | freebsd2*) |
---|
1844 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
1845 | hardcode_direct=yes |
---|
1846 | hardcode_minus_L=yes |
---|
1847 | hardcode_shlibpath_var=no |
---|
1848 | ;; |
---|
1849 | |
---|
1850 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
---|
1851 | freebsd*) |
---|
1852 | archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
---|
1853 | hardcode_libdir_flag_spec='-R$libdir' |
---|
1854 | hardcode_direct=yes |
---|
1855 | hardcode_shlibpath_var=no |
---|
1856 | ;; |
---|
1857 | |
---|
1858 | hpux9* | hpux10* | hpux11*) |
---|
1859 | case $host_os in |
---|
1860 | hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; |
---|
1861 | *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; |
---|
1862 | esac |
---|
1863 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
---|
1864 | hardcode_libdir_separator=: |
---|
1865 | hardcode_direct=yes |
---|
1866 | hardcode_minus_L=yes # Not in the search PATH, but as the default |
---|
1867 | # location of the library. |
---|
1868 | export_dynamic_flag_spec='${wl}-E' |
---|
1869 | ;; |
---|
1870 | |
---|
1871 | irix5* | irix6* | nonstopux*) |
---|
1872 | if test "$GCC" = yes; then |
---|
1873 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
1874 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
1875 | else |
---|
1876 | archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
1877 | hardcode_libdir_flag_spec='-rpath $libdir' |
---|
1878 | fi |
---|
1879 | hardcode_libdir_separator=: |
---|
1880 | link_all_deplibs=yes |
---|
1881 | ;; |
---|
1882 | |
---|
1883 | netbsd*) |
---|
1884 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
1885 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
---|
1886 | else |
---|
1887 | archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
---|
1888 | fi |
---|
1889 | hardcode_libdir_flag_spec='-R$libdir' |
---|
1890 | hardcode_direct=yes |
---|
1891 | hardcode_shlibpath_var=no |
---|
1892 | ;; |
---|
1893 | |
---|
1894 | newsos6) |
---|
1895 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
1896 | hardcode_direct=yes |
---|
1897 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
1898 | hardcode_libdir_separator=: |
---|
1899 | hardcode_shlibpath_var=no |
---|
1900 | ;; |
---|
1901 | |
---|
1902 | openbsd*) |
---|
1903 | hardcode_direct=yes |
---|
1904 | hardcode_shlibpath_var=no |
---|
1905 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
1906 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
---|
1907 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
---|
1908 | export_dynamic_flag_spec='${wl}-E' |
---|
1909 | else |
---|
1910 | case "$host_os" in |
---|
1911 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) |
---|
1912 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
1913 | hardcode_libdir_flag_spec='-R$libdir' |
---|
1914 | ;; |
---|
1915 | *) |
---|
1916 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
---|
1917 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
---|
1918 | ;; |
---|
1919 | esac |
---|
1920 | fi |
---|
1921 | ;; |
---|
1922 | |
---|
1923 | os2*) |
---|
1924 | hardcode_libdir_flag_spec='-L$libdir' |
---|
1925 | hardcode_minus_L=yes |
---|
1926 | allow_undefined_flag=unsupported |
---|
1927 | archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' |
---|
1928 | old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
---|
1929 | ;; |
---|
1930 | |
---|
1931 | osf3*) |
---|
1932 | if test "$GCC" = yes; then |
---|
1933 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
---|
1934 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
1935 | else |
---|
1936 | allow_undefined_flag=' -expect_unresolved \*' |
---|
1937 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
1938 | fi |
---|
1939 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
1940 | hardcode_libdir_separator=: |
---|
1941 | ;; |
---|
1942 | |
---|
1943 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
---|
1944 | if test "$GCC" = yes; then |
---|
1945 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
---|
1946 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
1947 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
1948 | else |
---|
1949 | allow_undefined_flag=' -expect_unresolved \*' |
---|
1950 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
1951 | archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
---|
1952 | $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' |
---|
1953 | |
---|
1954 | #Both c and cxx compiler support -rpath directly |
---|
1955 | hardcode_libdir_flag_spec='-rpath $libdir' |
---|
1956 | fi |
---|
1957 | hardcode_libdir_separator=: |
---|
1958 | ;; |
---|
1959 | |
---|
1960 | sco3.2v5*) |
---|
1961 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
1962 | hardcode_shlibpath_var=no |
---|
1963 | runpath_var=LD_RUN_PATH |
---|
1964 | hardcode_runpath_var=yes |
---|
1965 | export_dynamic_flag_spec='${wl}-Bexport' |
---|
1966 | ;; |
---|
1967 | |
---|
1968 | solaris*) |
---|
1969 | # gcc --version < 3.0 without binutils cannot create self contained |
---|
1970 | # shared libraries reliably, requiring libgcc.a to resolve some of |
---|
1971 | # the object symbols generated in some cases. Libraries that use |
---|
1972 | # assert need libgcc.a to resolve __eprintf, for example. Linking |
---|
1973 | # a copy of libgcc.a into every shared library to guarantee resolving |
---|
1974 | # such symbols causes other problems: According to Tim Van Holder |
---|
1975 | # <tim.van.holder@pandora.be>, C++ libraries end up with a separate |
---|
1976 | # (to the application) exception stack for one thing. |
---|
1977 | no_undefined_flag=' -z defs' |
---|
1978 | if test "$GCC" = yes; then |
---|
1979 | case `$CC --version 2>/dev/null` in |
---|
1980 | [[12]].*) |
---|
1981 | cat <<EOF 1>&2 |
---|
1982 | |
---|
1983 | *** Warning: Releases of GCC earlier than version 3.0 cannot reliably |
---|
1984 | *** create self contained shared libraries on Solaris systems, without |
---|
1985 | *** introducing a dependency on libgcc.a. Therefore, libtool is disabling |
---|
1986 | *** -no-undefined support, which will at least allow you to build shared |
---|
1987 | *** libraries. However, you may find that when you link such libraries |
---|
1988 | *** into an application without using GCC, you have to manually add |
---|
1989 | *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to |
---|
1990 | *** upgrade to a newer version of GCC. Another option is to rebuild your |
---|
1991 | *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. |
---|
1992 | |
---|
1993 | EOF |
---|
1994 | no_undefined_flag= |
---|
1995 | ;; |
---|
1996 | esac |
---|
1997 | fi |
---|
1998 | # $CC -shared without GNU ld will not create a library from C++ |
---|
1999 | # object files and a static libstdc++, better avoid it by now |
---|
2000 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2001 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
2002 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
---|
2003 | hardcode_libdir_flag_spec='-R$libdir' |
---|
2004 | hardcode_shlibpath_var=no |
---|
2005 | case $host_os in |
---|
2006 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
---|
2007 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) |
---|
2008 | whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; |
---|
2009 | esac |
---|
2010 | link_all_deplibs=yes |
---|
2011 | ;; |
---|
2012 | |
---|
2013 | sunos4*) |
---|
2014 | if test "x$host_vendor" = xsequent; then |
---|
2015 | # Use $CC to link under sequent, because it throws in some extra .o |
---|
2016 | # files that make .init and .fini sections work. |
---|
2017 | archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
2018 | else |
---|
2019 | archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
---|
2020 | fi |
---|
2021 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2022 | hardcode_direct=yes |
---|
2023 | hardcode_minus_L=yes |
---|
2024 | hardcode_shlibpath_var=no |
---|
2025 | ;; |
---|
2026 | |
---|
2027 | sysv4) |
---|
2028 | case $host_vendor in |
---|
2029 | sni) |
---|
2030 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2031 | hardcode_direct=yes # is this really true??? |
---|
2032 | ;; |
---|
2033 | siemens) |
---|
2034 | ## LD is ld it makes a PLAMLIB |
---|
2035 | ## CC just makes a GrossModule. |
---|
2036 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
---|
2037 | reload_cmds='$CC -r -o $output$reload_objs' |
---|
2038 | hardcode_direct=no |
---|
2039 | ;; |
---|
2040 | motorola) |
---|
2041 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2042 | hardcode_direct=no #Motorola manual says yes, but my tests say they lie |
---|
2043 | ;; |
---|
2044 | esac |
---|
2045 | runpath_var='LD_RUN_PATH' |
---|
2046 | hardcode_shlibpath_var=no |
---|
2047 | ;; |
---|
2048 | |
---|
2049 | sysv4.3*) |
---|
2050 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2051 | hardcode_shlibpath_var=no |
---|
2052 | export_dynamic_flag_spec='-Bexport' |
---|
2053 | ;; |
---|
2054 | |
---|
2055 | sysv5*) |
---|
2056 | no_undefined_flag=' -z text' |
---|
2057 | # $CC -shared without GNU ld will not create a library from C++ |
---|
2058 | # object files and a static libstdc++, better avoid it by now |
---|
2059 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2060 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
2061 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
---|
2062 | hardcode_libdir_flag_spec= |
---|
2063 | hardcode_shlibpath_var=no |
---|
2064 | runpath_var='LD_RUN_PATH' |
---|
2065 | ;; |
---|
2066 | |
---|
2067 | uts4*) |
---|
2068 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2069 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2070 | hardcode_shlibpath_var=no |
---|
2071 | ;; |
---|
2072 | |
---|
2073 | dgux*) |
---|
2074 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2075 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2076 | hardcode_shlibpath_var=no |
---|
2077 | ;; |
---|
2078 | |
---|
2079 | sysv4*MP*) |
---|
2080 | if test -d /usr/nec; then |
---|
2081 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2082 | hardcode_shlibpath_var=no |
---|
2083 | runpath_var=LD_RUN_PATH |
---|
2084 | hardcode_runpath_var=yes |
---|
2085 | ld_shlibs=yes |
---|
2086 | fi |
---|
2087 | ;; |
---|
2088 | |
---|
2089 | sysv4.2uw2*) |
---|
2090 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
---|
2091 | hardcode_direct=yes |
---|
2092 | hardcode_minus_L=no |
---|
2093 | hardcode_shlibpath_var=no |
---|
2094 | hardcode_runpath_var=yes |
---|
2095 | runpath_var=LD_RUN_PATH |
---|
2096 | ;; |
---|
2097 | |
---|
2098 | sysv5uw7* | unixware7*) |
---|
2099 | no_undefined_flag='${wl}-z ${wl}text' |
---|
2100 | if test "$GCC" = yes; then |
---|
2101 | archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
2102 | else |
---|
2103 | archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
2104 | fi |
---|
2105 | runpath_var='LD_RUN_PATH' |
---|
2106 | hardcode_shlibpath_var=no |
---|
2107 | ;; |
---|
2108 | |
---|
2109 | *) |
---|
2110 | ld_shlibs=no |
---|
2111 | ;; |
---|
2112 | esac |
---|
2113 | fi |
---|
2114 | AC_MSG_RESULT([$ld_shlibs]) |
---|
2115 | test "$ld_shlibs" = no && can_build_shared=no |
---|
2116 | |
---|
2117 | # Check hardcoding attributes. |
---|
2118 | AC_MSG_CHECKING([how to hardcode library paths into programs]) |
---|
2119 | hardcode_action= |
---|
2120 | if test -n "$hardcode_libdir_flag_spec" || \ |
---|
2121 | test -n "$runpath_var"; then |
---|
2122 | |
---|
2123 | # We can hardcode non-existant directories. |
---|
2124 | if test "$hardcode_direct" != no && |
---|
2125 | # If the only mechanism to avoid hardcoding is shlibpath_var, we |
---|
2126 | # have to relink, otherwise we might link with an installed library |
---|
2127 | # when we should be linking with a yet-to-be-installed one |
---|
2128 | ## test "$hardcode_shlibpath_var" != no && |
---|
2129 | test "$hardcode_minus_L" != no; then |
---|
2130 | # Linking always hardcodes the temporary library directory. |
---|
2131 | hardcode_action=relink |
---|
2132 | else |
---|
2133 | # We can link without hardcoding, and we can hardcode nonexisting dirs. |
---|
2134 | hardcode_action=immediate |
---|
2135 | fi |
---|
2136 | else |
---|
2137 | # We cannot hardcode anything, or else we can only hardcode existing |
---|
2138 | # directories. |
---|
2139 | hardcode_action=unsupported |
---|
2140 | fi |
---|
2141 | AC_MSG_RESULT([$hardcode_action]) |
---|
2142 | |
---|
2143 | striplib= |
---|
2144 | old_striplib= |
---|
2145 | AC_MSG_CHECKING([whether stripping libraries is possible]) |
---|
2146 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then |
---|
2147 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" |
---|
2148 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" |
---|
2149 | AC_MSG_RESULT([yes]) |
---|
2150 | else |
---|
2151 | AC_MSG_RESULT([no]) |
---|
2152 | fi |
---|
2153 | |
---|
2154 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
---|
2155 | test -z "$deplibs_check_method" && deplibs_check_method=unknown |
---|
2156 | |
---|
2157 | # PORTME Fill in your ld.so characteristics |
---|
2158 | AC_MSG_CHECKING([dynamic linker characteristics]) |
---|
2159 | library_names_spec= |
---|
2160 | libname_spec='lib$name' |
---|
2161 | soname_spec= |
---|
2162 | postinstall_cmds= |
---|
2163 | postuninstall_cmds= |
---|
2164 | finish_cmds= |
---|
2165 | finish_eval= |
---|
2166 | shlibpath_var= |
---|
2167 | shlibpath_overrides_runpath=unknown |
---|
2168 | version_type=none |
---|
2169 | dynamic_linker="$host_os ld.so" |
---|
2170 | sys_lib_dlsearch_path_spec="/lib /usr/lib" |
---|
2171 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
---|
2172 | |
---|
2173 | case $host_os in |
---|
2174 | aix3*) |
---|
2175 | version_type=linux |
---|
2176 | library_names_spec='${libname}${release}.so$versuffix $libname.a' |
---|
2177 | shlibpath_var=LIBPATH |
---|
2178 | |
---|
2179 | # AIX has no versioning support, so we append a major version to the name. |
---|
2180 | soname_spec='${libname}${release}.so$major' |
---|
2181 | ;; |
---|
2182 | |
---|
2183 | aix4* | aix5*) |
---|
2184 | version_type=linux |
---|
2185 | need_lib_prefix=no |
---|
2186 | need_version=no |
---|
2187 | hardcode_into_libs=yes |
---|
2188 | if test "$host_cpu" = ia64; then |
---|
2189 | # AIX 5 supports IA64 |
---|
2190 | library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' |
---|
2191 | shlibpath_var=LD_LIBRARY_PATH |
---|
2192 | else |
---|
2193 | # With GCC up to 2.95.x, collect2 would create an import file |
---|
2194 | # for dependence libraries. The import file would start with |
---|
2195 | # the line `#! .'. This would cause the generated library to |
---|
2196 | # depend on `.', always an invalid library. This was fixed in |
---|
2197 | # development snapshots of GCC prior to 3.0. |
---|
2198 | case $host_os in |
---|
2199 | aix4 | aix4.[[01]] | aix4.[[01]].*) |
---|
2200 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
---|
2201 | echo ' yes ' |
---|
2202 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then |
---|
2203 | : |
---|
2204 | else |
---|
2205 | can_build_shared=no |
---|
2206 | fi |
---|
2207 | ;; |
---|
2208 | esac |
---|
2209 | # AIX (on Power*) has no versioning support, so currently we can |
---|
2210 | # not hardcode correct soname into executable. Probably we can |
---|
2211 | # add versioning support to collect2, so additional links can |
---|
2212 | # be useful in future. |
---|
2213 | if test "$aix_use_runtimelinking" = yes; then |
---|
2214 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so |
---|
2215 | # instead of lib<name>.a to let people know that these are not |
---|
2216 | # typical AIX shared libraries. |
---|
2217 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2218 | else |
---|
2219 | # We preserve .a as extension for shared libraries through AIX4.2 |
---|
2220 | # and later when we are not doing run time linking. |
---|
2221 | library_names_spec='${libname}${release}.a $libname.a' |
---|
2222 | soname_spec='${libname}${release}.so$major' |
---|
2223 | fi |
---|
2224 | shlibpath_var=LIBPATH |
---|
2225 | fi |
---|
2226 | hardcode_into_libs=yes |
---|
2227 | ;; |
---|
2228 | |
---|
2229 | amigaos*) |
---|
2230 | library_names_spec='$libname.ixlibrary $libname.a' |
---|
2231 | # Create ${libname}_ixlibrary.a entries in /sys/libs. |
---|
2232 | 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' |
---|
2233 | ;; |
---|
2234 | |
---|
2235 | beos*) |
---|
2236 | library_names_spec='${libname}.so' |
---|
2237 | dynamic_linker="$host_os ld.so" |
---|
2238 | shlibpath_var=LIBRARY_PATH |
---|
2239 | ;; |
---|
2240 | |
---|
2241 | bsdi4*) |
---|
2242 | version_type=linux |
---|
2243 | need_version=no |
---|
2244 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2245 | soname_spec='${libname}${release}.so$major' |
---|
2246 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
---|
2247 | shlibpath_var=LD_LIBRARY_PATH |
---|
2248 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
---|
2249 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
---|
2250 | export_dynamic_flag_spec=-rdynamic |
---|
2251 | # the default ld.so.conf also contains /usr/contrib/lib and |
---|
2252 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
---|
2253 | # libtool to hard-code these into programs |
---|
2254 | ;; |
---|
2255 | |
---|
2256 | cygwin* | mingw* | pw32*) |
---|
2257 | version_type=windows |
---|
2258 | need_version=no |
---|
2259 | need_lib_prefix=no |
---|
2260 | case $GCC,$host_os in |
---|
2261 | yes,cygwin*) |
---|
2262 | library_names_spec='$libname.dll.a' |
---|
2263 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
---|
2264 | postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ |
---|
2265 | dldir=$destdir/`dirname \$dlpath`~ |
---|
2266 | test -d \$dldir || mkdir -p \$dldir~ |
---|
2267 | $install_prog .libs/$dlname \$dldir/$dlname' |
---|
2268 | postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
---|
2269 | dlpath=$dir/\$dldll~ |
---|
2270 | $rm \$dlpath' |
---|
2271 | ;; |
---|
2272 | yes,mingw*) |
---|
2273 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
---|
2274 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` |
---|
2275 | ;; |
---|
2276 | yes,pw32*) |
---|
2277 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' |
---|
2278 | ;; |
---|
2279 | *) |
---|
2280 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' |
---|
2281 | ;; |
---|
2282 | esac |
---|
2283 | dynamic_linker='Win32 ld.exe' |
---|
2284 | # FIXME: first we should search . and the directory the executable is in |
---|
2285 | shlibpath_var=PATH |
---|
2286 | ;; |
---|
2287 | |
---|
2288 | darwin* | rhapsody*) |
---|
2289 | dynamic_linker="$host_os dyld" |
---|
2290 | version_type=darwin |
---|
2291 | need_lib_prefix=no |
---|
2292 | need_version=no |
---|
2293 | # FIXME: Relying on posixy $() will cause problems for |
---|
2294 | # cross-compilation, but unfortunately the echo tests do not |
---|
2295 | # yet detect zsh echo's removal of \ escapes. |
---|
2296 | library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' |
---|
2297 | soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' |
---|
2298 | shlibpath_overrides_runpath=yes |
---|
2299 | shlibpath_var=DYLD_LIBRARY_PATH |
---|
2300 | ;; |
---|
2301 | |
---|
2302 | freebsd1*) |
---|
2303 | dynamic_linker=no |
---|
2304 | ;; |
---|
2305 | |
---|
2306 | freebsd*) |
---|
2307 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` |
---|
2308 | version_type=freebsd-$objformat |
---|
2309 | case $version_type in |
---|
2310 | freebsd-elf*) |
---|
2311 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
---|
2312 | need_version=no |
---|
2313 | need_lib_prefix=no |
---|
2314 | ;; |
---|
2315 | freebsd-*) |
---|
2316 | library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' |
---|
2317 | need_version=yes |
---|
2318 | ;; |
---|
2319 | esac |
---|
2320 | shlibpath_var=LD_LIBRARY_PATH |
---|
2321 | case $host_os in |
---|
2322 | freebsd2*) |
---|
2323 | shlibpath_overrides_runpath=yes |
---|
2324 | ;; |
---|
2325 | *) |
---|
2326 | shlibpath_overrides_runpath=no |
---|
2327 | hardcode_into_libs=yes |
---|
2328 | ;; |
---|
2329 | esac |
---|
2330 | ;; |
---|
2331 | |
---|
2332 | gnu*) |
---|
2333 | version_type=linux |
---|
2334 | need_lib_prefix=no |
---|
2335 | need_version=no |
---|
2336 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' |
---|
2337 | soname_spec='${libname}${release}.so$major' |
---|
2338 | shlibpath_var=LD_LIBRARY_PATH |
---|
2339 | hardcode_into_libs=yes |
---|
2340 | ;; |
---|
2341 | |
---|
2342 | hpux9* | hpux10* | hpux11*) |
---|
2343 | # Give a soname corresponding to the major version so that dld.sl refuses to |
---|
2344 | # link against other versions. |
---|
2345 | dynamic_linker="$host_os dld.sl" |
---|
2346 | version_type=sunos |
---|
2347 | need_lib_prefix=no |
---|
2348 | need_version=no |
---|
2349 | shlibpath_var=SHLIB_PATH |
---|
2350 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
---|
2351 | library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' |
---|
2352 | soname_spec='${libname}${release}.sl$major' |
---|
2353 | # HP-UX runs *really* slowly unless shared libraries are mode 555. |
---|
2354 | postinstall_cmds='chmod 555 $lib' |
---|
2355 | ;; |
---|
2356 | |
---|
2357 | irix5* | irix6* | nonstopux*) |
---|
2358 | case $host_os in |
---|
2359 | nonstopux*) version_type=nonstopux ;; |
---|
2360 | *) version_type=irix ;; |
---|
2361 | esac |
---|
2362 | need_lib_prefix=no |
---|
2363 | need_version=no |
---|
2364 | soname_spec='${libname}${release}.so$major' |
---|
2365 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' |
---|
2366 | case $host_os in |
---|
2367 | irix5* | nonstopux*) |
---|
2368 | libsuff= shlibsuff= |
---|
2369 | ;; |
---|
2370 | *) |
---|
2371 | case $LD in # libtool.m4 will add one of these switches to LD |
---|
2372 | *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; |
---|
2373 | *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; |
---|
2374 | *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; |
---|
2375 | *) libsuff= shlibsuff= libmagic=never-match;; |
---|
2376 | esac |
---|
2377 | ;; |
---|
2378 | esac |
---|
2379 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
---|
2380 | shlibpath_overrides_runpath=no |
---|
2381 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
---|
2382 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
---|
2383 | ;; |
---|
2384 | |
---|
2385 | # No shared lib support for Linux oldld, aout, or coff. |
---|
2386 | linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) |
---|
2387 | dynamic_linker=no |
---|
2388 | ;; |
---|
2389 | |
---|
2390 | # This must be Linux ELF. |
---|
2391 | linux-gnu*) |
---|
2392 | version_type=linux |
---|
2393 | need_lib_prefix=no |
---|
2394 | need_version=no |
---|
2395 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2396 | soname_spec='${libname}${release}.so$major' |
---|
2397 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
---|
2398 | shlibpath_var=LD_LIBRARY_PATH |
---|
2399 | shlibpath_overrides_runpath=no |
---|
2400 | # This implies no fast_install, which is unacceptable. |
---|
2401 | # Some rework will be needed to allow for fast_install |
---|
2402 | # before this can be enabled. |
---|
2403 | hardcode_into_libs=yes |
---|
2404 | |
---|
2405 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
---|
2406 | # powerpc, because MkLinux only supported shared libraries with the |
---|
2407 | # GNU dynamic linker. Since this was broken with cross compilers, |
---|
2408 | # most powerpc-linux boxes support dynamic linking these days and |
---|
2409 | # people can always --disable-shared, the test was removed, and we |
---|
2410 | # assume the GNU/Linux dynamic linker is in use. |
---|
2411 | dynamic_linker='GNU/Linux ld.so' |
---|
2412 | |
---|
2413 | # Find out which ABI we are using (multilib Linux x86_64 hack). |
---|
2414 | libsuff= |
---|
2415 | case "$host_cpu" in |
---|
2416 | x86_64*) |
---|
2417 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
---|
2418 | if AC_TRY_EVAL(ac_compile); then |
---|
2419 | case `/usr/bin/file conftest.$ac_objext` in |
---|
2420 | *64-bit*) |
---|
2421 | libsuff=64 |
---|
2422 | ;; |
---|
2423 | esac |
---|
2424 | fi |
---|
2425 | rm -rf conftest* |
---|
2426 | ;; |
---|
2427 | *) |
---|
2428 | ;; |
---|
2429 | esac |
---|
2430 | sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" |
---|
2431 | sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" |
---|
2432 | ;; |
---|
2433 | |
---|
2434 | netbsd*) |
---|
2435 | version_type=sunos |
---|
2436 | need_lib_prefix=no |
---|
2437 | need_version=no |
---|
2438 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
2439 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
---|
2440 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
---|
2441 | dynamic_linker='NetBSD (a.out) ld.so' |
---|
2442 | else |
---|
2443 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' |
---|
2444 | soname_spec='${libname}${release}.so$major' |
---|
2445 | dynamic_linker='NetBSD ld.elf_so' |
---|
2446 | fi |
---|
2447 | shlibpath_var=LD_LIBRARY_PATH |
---|
2448 | shlibpath_overrides_runpath=yes |
---|
2449 | hardcode_into_libs=yes |
---|
2450 | ;; |
---|
2451 | |
---|
2452 | newsos6) |
---|
2453 | version_type=linux |
---|
2454 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2455 | shlibpath_var=LD_LIBRARY_PATH |
---|
2456 | shlibpath_overrides_runpath=yes |
---|
2457 | ;; |
---|
2458 | |
---|
2459 | openbsd*) |
---|
2460 | version_type=sunos |
---|
2461 | need_lib_prefix=no |
---|
2462 | need_version=no |
---|
2463 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
2464 | case "$host_os" in |
---|
2465 | openbsd2.[[89]] | openbsd2.[[89]].*) |
---|
2466 | shlibpath_overrides_runpath=no |
---|
2467 | ;; |
---|
2468 | *) |
---|
2469 | shlibpath_overrides_runpath=yes |
---|
2470 | ;; |
---|
2471 | esac |
---|
2472 | else |
---|
2473 | shlibpath_overrides_runpath=yes |
---|
2474 | fi |
---|
2475 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
---|
2476 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
---|
2477 | shlibpath_var=LD_LIBRARY_PATH |
---|
2478 | ;; |
---|
2479 | |
---|
2480 | os2*) |
---|
2481 | libname_spec='$name' |
---|
2482 | need_lib_prefix=no |
---|
2483 | library_names_spec='$libname.dll $libname.a' |
---|
2484 | dynamic_linker='OS/2 ld.exe' |
---|
2485 | shlibpath_var=LIBPATH |
---|
2486 | ;; |
---|
2487 | |
---|
2488 | osf3* | osf4* | osf5*) |
---|
2489 | version_type=osf |
---|
2490 | need_version=no |
---|
2491 | soname_spec='${libname}${release}.so$major' |
---|
2492 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2493 | shlibpath_var=LD_LIBRARY_PATH |
---|
2494 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
---|
2495 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
---|
2496 | hardcode_into_libs=yes |
---|
2497 | ;; |
---|
2498 | |
---|
2499 | sco3.2v5*) |
---|
2500 | version_type=osf |
---|
2501 | soname_spec='${libname}${release}.so$major' |
---|
2502 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2503 | shlibpath_var=LD_LIBRARY_PATH |
---|
2504 | ;; |
---|
2505 | |
---|
2506 | solaris*) |
---|
2507 | version_type=linux |
---|
2508 | need_lib_prefix=no |
---|
2509 | need_version=no |
---|
2510 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2511 | soname_spec='${libname}${release}.so$major' |
---|
2512 | shlibpath_var=LD_LIBRARY_PATH |
---|
2513 | shlibpath_overrides_runpath=yes |
---|
2514 | hardcode_into_libs=yes |
---|
2515 | # ldd complains unless libraries are executable |
---|
2516 | postinstall_cmds='chmod +x $lib' |
---|
2517 | ;; |
---|
2518 | |
---|
2519 | sunos4*) |
---|
2520 | version_type=sunos |
---|
2521 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
---|
2522 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
---|
2523 | shlibpath_var=LD_LIBRARY_PATH |
---|
2524 | shlibpath_overrides_runpath=yes |
---|
2525 | if test "$with_gnu_ld" = yes; then |
---|
2526 | need_lib_prefix=no |
---|
2527 | fi |
---|
2528 | need_version=yes |
---|
2529 | ;; |
---|
2530 | |
---|
2531 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
2532 | version_type=linux |
---|
2533 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2534 | soname_spec='${libname}${release}.so$major' |
---|
2535 | shlibpath_var=LD_LIBRARY_PATH |
---|
2536 | case $host_vendor in |
---|
2537 | sni) |
---|
2538 | shlibpath_overrides_runpath=no |
---|
2539 | need_lib_prefix=no |
---|
2540 | export_dynamic_flag_spec='${wl}-Blargedynsym' |
---|
2541 | runpath_var=LD_RUN_PATH |
---|
2542 | ;; |
---|
2543 | siemens) |
---|
2544 | need_lib_prefix=no |
---|
2545 | ;; |
---|
2546 | motorola) |
---|
2547 | need_lib_prefix=no |
---|
2548 | need_version=no |
---|
2549 | shlibpath_overrides_runpath=no |
---|
2550 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
---|
2551 | ;; |
---|
2552 | esac |
---|
2553 | ;; |
---|
2554 | |
---|
2555 | uts4*) |
---|
2556 | version_type=linux |
---|
2557 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2558 | soname_spec='${libname}${release}.so$major' |
---|
2559 | shlibpath_var=LD_LIBRARY_PATH |
---|
2560 | ;; |
---|
2561 | |
---|
2562 | dgux*) |
---|
2563 | version_type=linux |
---|
2564 | need_lib_prefix=no |
---|
2565 | need_version=no |
---|
2566 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2567 | soname_spec='${libname}${release}.so$major' |
---|
2568 | shlibpath_var=LD_LIBRARY_PATH |
---|
2569 | ;; |
---|
2570 | |
---|
2571 | sysv4*MP*) |
---|
2572 | if test -d /usr/nec ;then |
---|
2573 | version_type=linux |
---|
2574 | library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' |
---|
2575 | soname_spec='$libname.so.$major' |
---|
2576 | shlibpath_var=LD_LIBRARY_PATH |
---|
2577 | fi |
---|
2578 | ;; |
---|
2579 | |
---|
2580 | *) |
---|
2581 | dynamic_linker=no |
---|
2582 | ;; |
---|
2583 | esac |
---|
2584 | AC_MSG_RESULT([$dynamic_linker]) |
---|
2585 | test "$dynamic_linker" = no && can_build_shared=no |
---|
2586 | |
---|
2587 | # Report the final consequences. |
---|
2588 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
---|
2589 | AC_MSG_RESULT([$can_build_shared]) |
---|
2590 | |
---|
2591 | AC_MSG_CHECKING([whether to build shared libraries]) |
---|
2592 | test "$can_build_shared" = "no" && enable_shared=no |
---|
2593 | |
---|
2594 | # On AIX, shared libraries and static libraries use the same namespace, and |
---|
2595 | # are all built from PIC. |
---|
2596 | case "$host_os" in |
---|
2597 | aix3*) |
---|
2598 | test "$enable_shared" = yes && enable_static=no |
---|
2599 | if test -n "$RANLIB"; then |
---|
2600 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
---|
2601 | postinstall_cmds='$RANLIB $lib' |
---|
2602 | fi |
---|
2603 | ;; |
---|
2604 | |
---|
2605 | aix4*) |
---|
2606 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then |
---|
2607 | test "$enable_shared" = yes && enable_static=no |
---|
2608 | fi |
---|
2609 | ;; |
---|
2610 | esac |
---|
2611 | AC_MSG_RESULT([$enable_shared]) |
---|
2612 | |
---|
2613 | AC_MSG_CHECKING([whether to build static libraries]) |
---|
2614 | # Make sure either enable_shared or enable_static is yes. |
---|
2615 | test "$enable_shared" = yes || enable_static=yes |
---|
2616 | AC_MSG_RESULT([$enable_static]) |
---|
2617 | |
---|
2618 | if test "$hardcode_action" = relink; then |
---|
2619 | # Fast installation is not supported |
---|
2620 | enable_fast_install=no |
---|
2621 | elif test "$shlibpath_overrides_runpath" = yes || |
---|
2622 | test "$enable_shared" = no; then |
---|
2623 | # Fast installation is not necessary |
---|
2624 | enable_fast_install=needless |
---|
2625 | fi |
---|
2626 | |
---|
2627 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
---|
2628 | if test "$GCC" = yes; then |
---|
2629 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
---|
2630 | fi |
---|
2631 | |
---|
2632 | AC_LIBTOOL_DLOPEN_SELF |
---|
2633 | |
---|
2634 | if test "$enable_shared" = yes && test "$GCC" = yes; then |
---|
2635 | case $archive_cmds in |
---|
2636 | *'~'*) |
---|
2637 | # FIXME: we may have to deal with multi-command sequences. |
---|
2638 | ;; |
---|
2639 | '$CC '*) |
---|
2640 | # Test whether the compiler implicitly links with -lc since on some |
---|
2641 | # systems, -lgcc has to come before -lc. If gcc already passes -lc |
---|
2642 | # to ld, don't add -lc before -lgcc. |
---|
2643 | AC_MSG_CHECKING([whether -lc should be explicitly linked in]) |
---|
2644 | AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], |
---|
2645 | [$rm conftest* |
---|
2646 | echo 'static int dummy;' > conftest.$ac_ext |
---|
2647 | |
---|
2648 | if AC_TRY_EVAL(ac_compile); then |
---|
2649 | soname=conftest |
---|
2650 | lib=conftest |
---|
2651 | libobjs=conftest.$ac_objext |
---|
2652 | deplibs= |
---|
2653 | wl=$lt_cv_prog_cc_wl |
---|
2654 | compiler_flags=-v |
---|
2655 | linker_flags=-v |
---|
2656 | verstring= |
---|
2657 | output_objdir=. |
---|
2658 | libname=conftest |
---|
2659 | save_allow_undefined_flag=$allow_undefined_flag |
---|
2660 | allow_undefined_flag= |
---|
2661 | if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
---|
2662 | then |
---|
2663 | lt_cv_archive_cmds_need_lc=no |
---|
2664 | else |
---|
2665 | lt_cv_archive_cmds_need_lc=yes |
---|
2666 | fi |
---|
2667 | allow_undefined_flag=$save_allow_undefined_flag |
---|
2668 | else |
---|
2669 | cat conftest.err 1>&5 |
---|
2670 | fi]) |
---|
2671 | AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) |
---|
2672 | ;; |
---|
2673 | esac |
---|
2674 | fi |
---|
2675 | need_lc=${lt_cv_archive_cmds_need_lc-yes} |
---|
2676 | |
---|
2677 | # The second clause should only fire when bootstrapping the |
---|
2678 | # libtool distribution, otherwise you forgot to ship ltmain.sh |
---|
2679 | # with your package, and you will get complaints that there are |
---|
2680 | # no rules to generate ltmain.sh. |
---|
2681 | if test -f "$ltmain"; then |
---|
2682 | : |
---|
2683 | else |
---|
2684 | # If there is no Makefile yet, we rely on a make rule to execute |
---|
2685 | # `config.status --recheck' to rerun these tests and create the |
---|
2686 | # libtool script then. |
---|
2687 | test -f Makefile && make "$ltmain" |
---|
2688 | fi |
---|
2689 | |
---|
2690 | if test -f "$ltmain"; then |
---|
2691 | trap "$rm \"${ofile}T\"; exit 1" 1 2 15 |
---|
2692 | $rm -f "${ofile}T" |
---|
2693 | |
---|
2694 | echo creating $ofile |
---|
2695 | |
---|
2696 | # Now quote all the things that may contain metacharacters while being |
---|
2697 | # careful not to overquote the AC_SUBSTed values. We take copies of the |
---|
2698 | # variables and quote the copies for generation of the libtool script. |
---|
2699 | for var in echo old_CC old_CFLAGS SED \ |
---|
2700 | AR AR_FLAGS CC LD LN_S NM SHELL \ |
---|
2701 | reload_flag reload_cmds wl \ |
---|
2702 | pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ |
---|
2703 | thread_safe_flag_spec whole_archive_flag_spec libname_spec \ |
---|
2704 | library_names_spec soname_spec \ |
---|
2705 | RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ |
---|
2706 | old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ |
---|
2707 | postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ |
---|
2708 | old_striplib striplib file_magic_cmd export_symbols_cmds \ |
---|
2709 | deplibs_check_method allow_undefined_flag no_undefined_flag \ |
---|
2710 | finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ |
---|
2711 | global_symbol_to_c_name_address \ |
---|
2712 | hardcode_libdir_flag_spec hardcode_libdir_separator \ |
---|
2713 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
---|
2714 | compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do |
---|
2715 | |
---|
2716 | case $var in |
---|
2717 | reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ |
---|
2718 | old_postinstall_cmds | old_postuninstall_cmds | \ |
---|
2719 | export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ |
---|
2720 | extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ |
---|
2721 | postinstall_cmds | postuninstall_cmds | \ |
---|
2722 | finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
---|
2723 | # Double-quote double-evaled strings. |
---|
2724 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
---|
2725 | ;; |
---|
2726 | *) |
---|
2727 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
---|
2728 | ;; |
---|
2729 | esac |
---|
2730 | done |
---|
2731 | |
---|
2732 | cat <<__EOF__ > "${ofile}T" |
---|
2733 | #! $SHELL |
---|
2734 | |
---|
2735 | # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
---|
2736 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
---|
2737 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. |
---|
2738 | # |
---|
2739 | # Copyright (C) 1996-2000 Free Software Foundation, Inc. |
---|
2740 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
---|
2741 | # |
---|
2742 | # This program is free software; you can redistribute it and/or modify |
---|
2743 | # it under the terms of the GNU General Public License as published by |
---|
2744 | # the Free Software Foundation; either version 2 of the License, or |
---|
2745 | # (at your option) any later version. |
---|
2746 | # |
---|
2747 | # This program is distributed in the hope that it will be useful, but |
---|
2748 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
2749 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
2750 | # General Public License for more details. |
---|
2751 | # |
---|
2752 | # You should have received a copy of the GNU General Public License |
---|
2753 | # along with this program; if not, write to the Free Software |
---|
2754 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
2755 | # |
---|
2756 | # As a special exception to the GNU General Public License, if you |
---|
2757 | # distribute this file as part of a program that contains a |
---|
2758 | # configuration script generated by Autoconf, you may include it under |
---|
2759 | # the same distribution terms that you use for the rest of that program. |
---|
2760 | |
---|
2761 | # A sed that does not truncate output. |
---|
2762 | SED=$lt_SED |
---|
2763 | |
---|
2764 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. |
---|
2765 | Xsed="${SED} -e s/^X//" |
---|
2766 | |
---|
2767 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
---|
2768 | # if CDPATH is set. |
---|
2769 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
---|
2770 | |
---|
2771 | # ### BEGIN LIBTOOL CONFIG |
---|
2772 | |
---|
2773 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
---|
2774 | |
---|
2775 | # Shell to use when invoking shell scripts. |
---|
2776 | SHELL=$lt_SHELL |
---|
2777 | |
---|
2778 | # Whether or not to build shared libraries. |
---|
2779 | build_libtool_libs=$enable_shared |
---|
2780 | |
---|
2781 | # Whether or not to build static libraries. |
---|
2782 | build_old_libs=$enable_static |
---|
2783 | |
---|
2784 | # Whether or not to add -lc for building shared libraries. |
---|
2785 | build_libtool_need_lc=$need_lc |
---|
2786 | |
---|
2787 | # Whether or not to optimize for fast installation. |
---|
2788 | fast_install=$enable_fast_install |
---|
2789 | |
---|
2790 | # The host system. |
---|
2791 | host_alias=$host_alias |
---|
2792 | host=$host |
---|
2793 | |
---|
2794 | # An echo program that does not interpret backslashes. |
---|
2795 | echo=$lt_echo |
---|
2796 | |
---|
2797 | # The archiver. |
---|
2798 | AR=$lt_AR |
---|
2799 | AR_FLAGS=$lt_AR_FLAGS |
---|
2800 | |
---|
2801 | # The default C compiler. |
---|
2802 | CC=$lt_CC |
---|
2803 | |
---|
2804 | # Is the compiler the GNU C compiler? |
---|
2805 | with_gcc=$GCC |
---|
2806 | |
---|
2807 | # The linker used to build libraries. |
---|
2808 | LD=$lt_LD |
---|
2809 | |
---|
2810 | # Whether we need hard or soft links. |
---|
2811 | LN_S=$lt_LN_S |
---|
2812 | |
---|
2813 | # A BSD-compatible nm program. |
---|
2814 | NM=$lt_NM |
---|
2815 | |
---|
2816 | # A symbol stripping program |
---|
2817 | STRIP=$STRIP |
---|
2818 | |
---|
2819 | # Used to examine libraries when file_magic_cmd begins "file" |
---|
2820 | MAGIC_CMD=$MAGIC_CMD |
---|
2821 | |
---|
2822 | # Used on cygwin: DLL creation program. |
---|
2823 | DLLTOOL="$DLLTOOL" |
---|
2824 | |
---|
2825 | # Used on cygwin: object dumper. |
---|
2826 | OBJDUMP="$OBJDUMP" |
---|
2827 | |
---|
2828 | # Used on cygwin: assembler. |
---|
2829 | AS="$AS" |
---|
2830 | |
---|
2831 | # The name of the directory that contains temporary libtool files. |
---|
2832 | objdir=$objdir |
---|
2833 | |
---|
2834 | # How to create reloadable object files. |
---|
2835 | reload_flag=$lt_reload_flag |
---|
2836 | reload_cmds=$lt_reload_cmds |
---|
2837 | |
---|
2838 | # How to pass a linker flag through the compiler. |
---|
2839 | wl=$lt_wl |
---|
2840 | |
---|
2841 | # Object file suffix (normally "o"). |
---|
2842 | objext="$ac_objext" |
---|
2843 | |
---|
2844 | # Old archive suffix (normally "a"). |
---|
2845 | libext="$libext" |
---|
2846 | |
---|
2847 | # Executable file suffix (normally ""). |
---|
2848 | exeext="$exeext" |
---|
2849 | |
---|
2850 | # Additional compiler flags for building library objects. |
---|
2851 | pic_flag=$lt_pic_flag |
---|
2852 | pic_mode=$pic_mode |
---|
2853 | |
---|
2854 | # Does compiler simultaneously support -c and -o options? |
---|
2855 | compiler_c_o=$lt_compiler_c_o |
---|
2856 | |
---|
2857 | # Can we write directly to a .lo ? |
---|
2858 | compiler_o_lo=$lt_compiler_o_lo |
---|
2859 | |
---|
2860 | # Must we lock files when doing compilation ? |
---|
2861 | need_locks=$lt_need_locks |
---|
2862 | |
---|
2863 | # Do we need the lib prefix for modules? |
---|
2864 | need_lib_prefix=$need_lib_prefix |
---|
2865 | |
---|
2866 | # Do we need a version for libraries? |
---|
2867 | need_version=$need_version |
---|
2868 | |
---|
2869 | # Whether dlopen is supported. |
---|
2870 | dlopen_support=$enable_dlopen |
---|
2871 | |
---|
2872 | # Whether dlopen of programs is supported. |
---|
2873 | dlopen_self=$enable_dlopen_self |
---|
2874 | |
---|
2875 | # Whether dlopen of statically linked programs is supported. |
---|
2876 | dlopen_self_static=$enable_dlopen_self_static |
---|
2877 | |
---|
2878 | # Compiler flag to prevent dynamic linking. |
---|
2879 | link_static_flag=$lt_link_static_flag |
---|
2880 | |
---|
2881 | # Compiler flag to turn off builtin functions. |
---|
2882 | no_builtin_flag=$lt_no_builtin_flag |
---|
2883 | |
---|
2884 | # Compiler flag to allow reflexive dlopens. |
---|
2885 | export_dynamic_flag_spec=$lt_export_dynamic_flag_spec |
---|
2886 | |
---|
2887 | # Compiler flag to generate shared objects directly from archives. |
---|
2888 | whole_archive_flag_spec=$lt_whole_archive_flag_spec |
---|
2889 | |
---|
2890 | # Compiler flag to generate thread-safe objects. |
---|
2891 | thread_safe_flag_spec=$lt_thread_safe_flag_spec |
---|
2892 | |
---|
2893 | # Library versioning type. |
---|
2894 | version_type=$version_type |
---|
2895 | |
---|
2896 | # Format of library name prefix. |
---|
2897 | libname_spec=$lt_libname_spec |
---|
2898 | |
---|
2899 | # List of archive names. First name is the real one, the rest are links. |
---|
2900 | # The last name is the one that the linker finds with -lNAME. |
---|
2901 | library_names_spec=$lt_library_names_spec |
---|
2902 | |
---|
2903 | # The coded name of the library, if different from the real name. |
---|
2904 | soname_spec=$lt_soname_spec |
---|
2905 | |
---|
2906 | # Commands used to build and install an old-style archive. |
---|
2907 | RANLIB=$lt_RANLIB |
---|
2908 | old_archive_cmds=$lt_old_archive_cmds |
---|
2909 | old_postinstall_cmds=$lt_old_postinstall_cmds |
---|
2910 | old_postuninstall_cmds=$lt_old_postuninstall_cmds |
---|
2911 | |
---|
2912 | # Create an old-style archive from a shared archive. |
---|
2913 | old_archive_from_new_cmds=$lt_old_archive_from_new_cmds |
---|
2914 | |
---|
2915 | # Create a temporary old-style archive to link instead of a shared archive. |
---|
2916 | old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds |
---|
2917 | |
---|
2918 | # Commands used to build and install a shared archive. |
---|
2919 | archive_cmds=$lt_archive_cmds |
---|
2920 | archive_expsym_cmds=$lt_archive_expsym_cmds |
---|
2921 | postinstall_cmds=$lt_postinstall_cmds |
---|
2922 | postuninstall_cmds=$lt_postuninstall_cmds |
---|
2923 | |
---|
2924 | # Commands to strip libraries. |
---|
2925 | old_striplib=$lt_old_striplib |
---|
2926 | striplib=$lt_striplib |
---|
2927 | |
---|
2928 | # Method to check whether dependent libraries are shared objects. |
---|
2929 | deplibs_check_method=$lt_deplibs_check_method |
---|
2930 | |
---|
2931 | # Command to use when deplibs_check_method == file_magic. |
---|
2932 | file_magic_cmd=$lt_file_magic_cmd |
---|
2933 | |
---|
2934 | # Flag that allows shared libraries with undefined symbols to be built. |
---|
2935 | allow_undefined_flag=$lt_allow_undefined_flag |
---|
2936 | |
---|
2937 | # Flag that forces no undefined symbols. |
---|
2938 | no_undefined_flag=$lt_no_undefined_flag |
---|
2939 | |
---|
2940 | # Commands used to finish a libtool library installation in a directory. |
---|
2941 | finish_cmds=$lt_finish_cmds |
---|
2942 | |
---|
2943 | # Same as above, but a single script fragment to be evaled but not shown. |
---|
2944 | finish_eval=$lt_finish_eval |
---|
2945 | |
---|
2946 | # Take the output of nm and produce a listing of raw symbols and C names. |
---|
2947 | global_symbol_pipe=$lt_global_symbol_pipe |
---|
2948 | |
---|
2949 | # Transform the output of nm in a proper C declaration |
---|
2950 | global_symbol_to_cdecl=$lt_global_symbol_to_cdecl |
---|
2951 | |
---|
2952 | # Transform the output of nm in a C name address pair |
---|
2953 | global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address |
---|
2954 | |
---|
2955 | # This is the shared library runtime path variable. |
---|
2956 | runpath_var=$runpath_var |
---|
2957 | |
---|
2958 | # This is the shared library path variable. |
---|
2959 | shlibpath_var=$shlibpath_var |
---|
2960 | |
---|
2961 | # Is shlibpath searched before the hard-coded library search path? |
---|
2962 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
---|
2963 | |
---|
2964 | # How to hardcode a shared library path into an executable. |
---|
2965 | hardcode_action=$hardcode_action |
---|
2966 | |
---|
2967 | # Whether we should hardcode library paths into libraries. |
---|
2968 | hardcode_into_libs=$hardcode_into_libs |
---|
2969 | |
---|
2970 | # Flag to hardcode \$libdir into a binary during linking. |
---|
2971 | # This must work even if \$libdir does not exist. |
---|
2972 | hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec |
---|
2973 | |
---|
2974 | # Whether we need a single -rpath flag with a separated argument. |
---|
2975 | hardcode_libdir_separator=$lt_hardcode_libdir_separator |
---|
2976 | |
---|
2977 | # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
---|
2978 | # resulting binary. |
---|
2979 | hardcode_direct=$hardcode_direct |
---|
2980 | |
---|
2981 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
---|
2982 | # resulting binary. |
---|
2983 | hardcode_minus_L=$hardcode_minus_L |
---|
2984 | |
---|
2985 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
---|
2986 | # the resulting binary. |
---|
2987 | hardcode_shlibpath_var=$hardcode_shlibpath_var |
---|
2988 | |
---|
2989 | # Variables whose values should be saved in libtool wrapper scripts and |
---|
2990 | # restored at relink time. |
---|
2991 | variables_saved_for_relink="$variables_saved_for_relink" |
---|
2992 | |
---|
2993 | # Whether libtool must link a program against all its dependency libraries. |
---|
2994 | link_all_deplibs=$link_all_deplibs |
---|
2995 | |
---|
2996 | # Compile-time system search path for libraries |
---|
2997 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
---|
2998 | |
---|
2999 | # Run-time system search path for libraries |
---|
3000 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
---|
3001 | |
---|
3002 | # Fix the shell variable \$srcfile for the compiler. |
---|
3003 | fix_srcfile_path="$fix_srcfile_path" |
---|
3004 | |
---|
3005 | # Set to yes if exported symbols are required. |
---|
3006 | always_export_symbols=$always_export_symbols |
---|
3007 | |
---|
3008 | # The commands to list exported symbols. |
---|
3009 | export_symbols_cmds=$lt_export_symbols_cmds |
---|
3010 | |
---|
3011 | # The commands to extract the exported symbol list from a shared archive. |
---|
3012 | extract_expsyms_cmds=$lt_extract_expsyms_cmds |
---|
3013 | |
---|
3014 | # Symbols that should not be listed in the preloaded symbols. |
---|
3015 | exclude_expsyms=$lt_exclude_expsyms |
---|
3016 | |
---|
3017 | # Symbols that must always be exported. |
---|
3018 | include_expsyms=$lt_include_expsyms |
---|
3019 | |
---|
3020 | # ### END LIBTOOL CONFIG |
---|
3021 | |
---|
3022 | __EOF__ |
---|
3023 | |
---|
3024 | case $host_os in |
---|
3025 | aix3*) |
---|
3026 | cat <<\EOF >> "${ofile}T" |
---|
3027 | |
---|
3028 | # AIX sometimes has problems with the GCC collect2 program. For some |
---|
3029 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
---|
3030 | # vanish in a puff of smoke. |
---|
3031 | if test "X${COLLECT_NAMES+set}" != Xset; then |
---|
3032 | COLLECT_NAMES= |
---|
3033 | export COLLECT_NAMES |
---|
3034 | fi |
---|
3035 | EOF |
---|
3036 | ;; |
---|
3037 | esac |
---|
3038 | |
---|
3039 | case $host_os in |
---|
3040 | cygwin* | mingw* | pw32* | os2*) |
---|
3041 | cat <<'EOF' >> "${ofile}T" |
---|
3042 | # This is a source program that is used to create dlls on Windows |
---|
3043 | # Don't remove nor modify the starting and closing comments |
---|
3044 | # /* ltdll.c starts here */ |
---|
3045 | # #define WIN32_LEAN_AND_MEAN |
---|
3046 | # #include <windows.h> |
---|
3047 | # #undef WIN32_LEAN_AND_MEAN |
---|
3048 | # #include <stdio.h> |
---|
3049 | # |
---|
3050 | # #ifndef __CYGWIN__ |
---|
3051 | # # ifdef __CYGWIN32__ |
---|
3052 | # # define __CYGWIN__ __CYGWIN32__ |
---|
3053 | # # endif |
---|
3054 | # #endif |
---|
3055 | # |
---|
3056 | # #ifdef __cplusplus |
---|
3057 | # extern "C" { |
---|
3058 | # #endif |
---|
3059 | # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
---|
3060 | # #ifdef __cplusplus |
---|
3061 | # } |
---|
3062 | # #endif |
---|
3063 | # |
---|
3064 | # #ifdef __CYGWIN__ |
---|
3065 | # #include <cygwin/cygwin_dll.h> |
---|
3066 | # DECLARE_CYGWIN_DLL( DllMain ); |
---|
3067 | # #endif |
---|
3068 | # HINSTANCE __hDllInstance_base; |
---|
3069 | # |
---|
3070 | # BOOL APIENTRY |
---|
3071 | # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
---|
3072 | # { |
---|
3073 | # __hDllInstance_base = hInst; |
---|
3074 | # return TRUE; |
---|
3075 | # } |
---|
3076 | # /* ltdll.c ends here */ |
---|
3077 | # This is a source program that is used to create import libraries |
---|
3078 | # on Windows for dlls which lack them. Don't remove nor modify the |
---|
3079 | # starting and closing comments |
---|
3080 | # /* impgen.c starts here */ |
---|
3081 | # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. |
---|
3082 | # |
---|
3083 | # This file is part of GNU libtool. |
---|
3084 | # |
---|
3085 | # This program is free software; you can redistribute it and/or modify |
---|
3086 | # it under the terms of the GNU General Public License as published by |
---|
3087 | # the Free Software Foundation; either version 2 of the License, or |
---|
3088 | # (at your option) any later version. |
---|
3089 | # |
---|
3090 | # This program is distributed in the hope that it will be useful, |
---|
3091 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
3092 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
3093 | # GNU General Public License for more details. |
---|
3094 | # |
---|
3095 | # You should have received a copy of the GNU General Public License |
---|
3096 | # along with this program; if not, write to the Free Software |
---|
3097 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
3098 | # */ |
---|
3099 | # |
---|
3100 | # #include <stdio.h> /* for printf() */ |
---|
3101 | # #include <unistd.h> /* for open(), lseek(), read() */ |
---|
3102 | # #include <fcntl.h> /* for O_RDONLY, O_BINARY */ |
---|
3103 | # #include <string.h> /* for strdup() */ |
---|
3104 | # |
---|
3105 | # /* O_BINARY isn't required (or even defined sometimes) under Unix */ |
---|
3106 | # #ifndef O_BINARY |
---|
3107 | # #define O_BINARY 0 |
---|
3108 | # #endif |
---|
3109 | # |
---|
3110 | # static unsigned int |
---|
3111 | # pe_get16 (fd, offset) |
---|
3112 | # int fd; |
---|
3113 | # int offset; |
---|
3114 | # { |
---|
3115 | # unsigned char b[2]; |
---|
3116 | # lseek (fd, offset, SEEK_SET); |
---|
3117 | # read (fd, b, 2); |
---|
3118 | # return b[0] + (b[1]<<8); |
---|
3119 | # } |
---|
3120 | # |
---|
3121 | # static unsigned int |
---|
3122 | # pe_get32 (fd, offset) |
---|
3123 | # int fd; |
---|
3124 | # int offset; |
---|
3125 | # { |
---|
3126 | # unsigned char b[4]; |
---|
3127 | # lseek (fd, offset, SEEK_SET); |
---|
3128 | # read (fd, b, 4); |
---|
3129 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
---|
3130 | # } |
---|
3131 | # |
---|
3132 | # static unsigned int |
---|
3133 | # pe_as32 (ptr) |
---|
3134 | # void *ptr; |
---|
3135 | # { |
---|
3136 | # unsigned char *b = ptr; |
---|
3137 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
---|
3138 | # } |
---|
3139 | # |
---|
3140 | # int |
---|
3141 | # main (argc, argv) |
---|
3142 | # int argc; |
---|
3143 | # char *argv[]; |
---|
3144 | # { |
---|
3145 | # int dll; |
---|
3146 | # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; |
---|
3147 | # unsigned long export_rva, export_size, nsections, secptr, expptr; |
---|
3148 | # unsigned long name_rvas, nexp; |
---|
3149 | # unsigned char *expdata, *erva; |
---|
3150 | # char *filename, *dll_name; |
---|
3151 | # |
---|
3152 | # filename = argv[1]; |
---|
3153 | # |
---|
3154 | # dll = open(filename, O_RDONLY|O_BINARY); |
---|
3155 | # if (dll < 1) |
---|
3156 | # return 1; |
---|
3157 | # |
---|
3158 | # dll_name = filename; |
---|
3159 | # |
---|
3160 | # for (i=0; filename[i]; i++) |
---|
3161 | # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') |
---|
3162 | # dll_name = filename + i +1; |
---|
3163 | # |
---|
3164 | # pe_header_offset = pe_get32 (dll, 0x3c); |
---|
3165 | # opthdr_ofs = pe_header_offset + 4 + 20; |
---|
3166 | # num_entries = pe_get32 (dll, opthdr_ofs + 92); |
---|
3167 | # |
---|
3168 | # if (num_entries < 1) /* no exports */ |
---|
3169 | # return 1; |
---|
3170 | # |
---|
3171 | # export_rva = pe_get32 (dll, opthdr_ofs + 96); |
---|
3172 | # export_size = pe_get32 (dll, opthdr_ofs + 100); |
---|
3173 | # nsections = pe_get16 (dll, pe_header_offset + 4 +2); |
---|
3174 | # secptr = (pe_header_offset + 4 + 20 + |
---|
3175 | # pe_get16 (dll, pe_header_offset + 4 + 16)); |
---|
3176 | # |
---|
3177 | # expptr = 0; |
---|
3178 | # for (i = 0; i < nsections; i++) |
---|
3179 | # { |
---|
3180 | # char sname[8]; |
---|
3181 | # unsigned long secptr1 = secptr + 40 * i; |
---|
3182 | # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); |
---|
3183 | # unsigned long vsize = pe_get32 (dll, secptr1 + 16); |
---|
3184 | # unsigned long fptr = pe_get32 (dll, secptr1 + 20); |
---|
3185 | # lseek(dll, secptr1, SEEK_SET); |
---|
3186 | # read(dll, sname, 8); |
---|
3187 | # if (vaddr <= export_rva && vaddr+vsize > export_rva) |
---|
3188 | # { |
---|
3189 | # expptr = fptr + (export_rva - vaddr); |
---|
3190 | # if (export_rva + export_size > vaddr + vsize) |
---|
3191 | # export_size = vsize - (export_rva - vaddr); |
---|
3192 | # break; |
---|
3193 | # } |
---|
3194 | # } |
---|
3195 | # |
---|
3196 | # expdata = (unsigned char*)malloc(export_size); |
---|
3197 | # lseek (dll, expptr, SEEK_SET); |
---|
3198 | # read (dll, expdata, export_size); |
---|
3199 | # erva = expdata - export_rva; |
---|
3200 | # |
---|
3201 | # nexp = pe_as32 (expdata+24); |
---|
3202 | # name_rvas = pe_as32 (expdata+32); |
---|
3203 | # |
---|
3204 | # printf ("EXPORTS\n"); |
---|
3205 | # for (i = 0; i<nexp; i++) |
---|
3206 | # { |
---|
3207 | # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); |
---|
3208 | # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); |
---|
3209 | # } |
---|
3210 | # |
---|
3211 | # return 0; |
---|
3212 | # } |
---|
3213 | # /* impgen.c ends here */ |
---|
3214 | |
---|
3215 | EOF |
---|
3216 | ;; |
---|
3217 | esac |
---|
3218 | |
---|
3219 | # We use sed instead of cat because bash on DJGPP gets confused if |
---|
3220 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
---|
3221 | # text mode, it properly converts lines to CR/LF. This bash problem |
---|
3222 | # is reportedly fixed, but why not run on old versions too? |
---|
3223 | sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) |
---|
3224 | |
---|
3225 | mv -f "${ofile}T" "$ofile" || \ |
---|
3226 | (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") |
---|
3227 | chmod +x "$ofile" |
---|
3228 | fi |
---|
3229 | |
---|
3230 | ])# _LT_AC_LTCONFIG_HACK |
---|
3231 | |
---|
3232 | # AC_LIBTOOL_DLOPEN - enable checks for dlopen support |
---|
3233 | AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) |
---|
3234 | |
---|
3235 | # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's |
---|
3236 | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) |
---|
3237 | |
---|
3238 | # AC_ENABLE_SHARED - implement the --enable-shared flag |
---|
3239 | # Usage: AC_ENABLE_SHARED[(DEFAULT)] |
---|
3240 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
3241 | # `yes'. |
---|
3242 | AC_DEFUN([AC_ENABLE_SHARED], |
---|
3243 | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
3244 | AC_ARG_ENABLE(shared, |
---|
3245 | changequote(<<, >>)dnl |
---|
3246 | << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], |
---|
3247 | changequote([, ])dnl |
---|
3248 | [p=${PACKAGE-default} |
---|
3249 | case $enableval in |
---|
3250 | yes) enable_shared=yes ;; |
---|
3251 | no) enable_shared=no ;; |
---|
3252 | *) |
---|
3253 | enable_shared=no |
---|
3254 | # Look at the argument we got. We use all the common list separators. |
---|
3255 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
3256 | for pkg in $enableval; do |
---|
3257 | if test "X$pkg" = "X$p"; then |
---|
3258 | enable_shared=yes |
---|
3259 | fi |
---|
3260 | done |
---|
3261 | IFS="$ac_save_ifs" |
---|
3262 | ;; |
---|
3263 | esac], |
---|
3264 | enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
---|
3265 | ]) |
---|
3266 | |
---|
3267 | # AC_DISABLE_SHARED - set the default shared flag to --disable-shared |
---|
3268 | AC_DEFUN([AC_DISABLE_SHARED], |
---|
3269 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3270 | AC_ENABLE_SHARED(no)]) |
---|
3271 | |
---|
3272 | # AC_ENABLE_STATIC - implement the --enable-static flag |
---|
3273 | # Usage: AC_ENABLE_STATIC[(DEFAULT)] |
---|
3274 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
3275 | # `yes'. |
---|
3276 | AC_DEFUN([AC_ENABLE_STATIC], |
---|
3277 | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
3278 | AC_ARG_ENABLE(static, |
---|
3279 | changequote(<<, >>)dnl |
---|
3280 | << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], |
---|
3281 | changequote([, ])dnl |
---|
3282 | [p=${PACKAGE-default} |
---|
3283 | case $enableval in |
---|
3284 | yes) enable_static=yes ;; |
---|
3285 | no) enable_static=no ;; |
---|
3286 | *) |
---|
3287 | enable_static=no |
---|
3288 | # Look at the argument we got. We use all the common list separators. |
---|
3289 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
3290 | for pkg in $enableval; do |
---|
3291 | if test "X$pkg" = "X$p"; then |
---|
3292 | enable_static=yes |
---|
3293 | fi |
---|
3294 | done |
---|
3295 | IFS="$ac_save_ifs" |
---|
3296 | ;; |
---|
3297 | esac], |
---|
3298 | enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
---|
3299 | ]) |
---|
3300 | |
---|
3301 | # AC_DISABLE_STATIC - set the default static flag to --disable-static |
---|
3302 | AC_DEFUN([AC_DISABLE_STATIC], |
---|
3303 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3304 | AC_ENABLE_STATIC(no)]) |
---|
3305 | |
---|
3306 | |
---|
3307 | # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag |
---|
3308 | # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] |
---|
3309 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
3310 | # `yes'. |
---|
3311 | AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
---|
3312 | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
3313 | AC_ARG_ENABLE(fast-install, |
---|
3314 | changequote(<<, >>)dnl |
---|
3315 | << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], |
---|
3316 | changequote([, ])dnl |
---|
3317 | [p=${PACKAGE-default} |
---|
3318 | case $enableval in |
---|
3319 | yes) enable_fast_install=yes ;; |
---|
3320 | no) enable_fast_install=no ;; |
---|
3321 | *) |
---|
3322 | enable_fast_install=no |
---|
3323 | # Look at the argument we got. We use all the common list separators. |
---|
3324 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
3325 | for pkg in $enableval; do |
---|
3326 | if test "X$pkg" = "X$p"; then |
---|
3327 | enable_fast_install=yes |
---|
3328 | fi |
---|
3329 | done |
---|
3330 | IFS="$ac_save_ifs" |
---|
3331 | ;; |
---|
3332 | esac], |
---|
3333 | enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl |
---|
3334 | ]) |
---|
3335 | |
---|
3336 | # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install |
---|
3337 | AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
---|
3338 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3339 | AC_ENABLE_FAST_INSTALL(no)]) |
---|
3340 | |
---|
3341 | # AC_LIBTOOL_PICMODE - implement the --with-pic flag |
---|
3342 | # Usage: AC_LIBTOOL_PICMODE[(MODE)] |
---|
3343 | # Where MODE is either `yes' or `no'. If omitted, it defaults to |
---|
3344 | # `both'. |
---|
3345 | AC_DEFUN([AC_LIBTOOL_PICMODE], |
---|
3346 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3347 | pic_mode=ifelse($#,1,$1,default)]) |
---|
3348 | |
---|
3349 | |
---|
3350 | # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library |
---|
3351 | AC_DEFUN([AC_PATH_TOOL_PREFIX], |
---|
3352 | [AC_MSG_CHECKING([for $1]) |
---|
3353 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
---|
3354 | [case $MAGIC_CMD in |
---|
3355 | /*) |
---|
3356 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
---|
3357 | ;; |
---|
3358 | ?:/*) |
---|
3359 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. |
---|
3360 | ;; |
---|
3361 | *) |
---|
3362 | ac_save_MAGIC_CMD="$MAGIC_CMD" |
---|
3363 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
---|
3364 | dnl $ac_dummy forces splitting on constant user-supplied paths. |
---|
3365 | dnl POSIX.2 word splitting is done only on the output of word expansions, |
---|
3366 | dnl not every word. This closes a longstanding sh security hole. |
---|
3367 | ac_dummy="ifelse([$2], , $PATH, [$2])" |
---|
3368 | for ac_dir in $ac_dummy; do |
---|
3369 | test -z "$ac_dir" && ac_dir=. |
---|
3370 | if test -f $ac_dir/$1; then |
---|
3371 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
---|
3372 | if test -n "$file_magic_test_file"; then |
---|
3373 | case $deplibs_check_method in |
---|
3374 | "file_magic "*) |
---|
3375 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
---|
3376 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
---|
3377 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
---|
3378 | egrep "$file_magic_regex" > /dev/null; then |
---|
3379 | : |
---|
3380 | else |
---|
3381 | cat <<EOF 1>&2 |
---|
3382 | |
---|
3383 | *** Warning: the command libtool uses to detect shared libraries, |
---|
3384 | *** $file_magic_cmd, produces output that libtool cannot recognize. |
---|
3385 | *** The result is that libtool may fail to recognize shared libraries |
---|
3386 | *** as such. This will affect the creation of libtool libraries that |
---|
3387 | *** depend on shared libraries, but programs linked with such libtool |
---|
3388 | *** libraries will work regardless of this problem. Nevertheless, you |
---|
3389 | *** may want to report the problem to your system manager and/or to |
---|
3390 | *** bug-libtool@gnu.org |
---|
3391 | |
---|
3392 | EOF |
---|
3393 | fi ;; |
---|
3394 | esac |
---|
3395 | fi |
---|
3396 | break |
---|
3397 | fi |
---|
3398 | done |
---|
3399 | IFS="$ac_save_ifs" |
---|
3400 | MAGIC_CMD="$ac_save_MAGIC_CMD" |
---|
3401 | ;; |
---|
3402 | esac]) |
---|
3403 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
---|
3404 | if test -n "$MAGIC_CMD"; then |
---|
3405 | AC_MSG_RESULT($MAGIC_CMD) |
---|
3406 | else |
---|
3407 | AC_MSG_RESULT(no) |
---|
3408 | fi |
---|
3409 | ]) |
---|
3410 | |
---|
3411 | |
---|
3412 | # AC_PATH_MAGIC - find a file program which can recognise a shared library |
---|
3413 | AC_DEFUN([AC_PATH_MAGIC], |
---|
3414 | [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl |
---|
3415 | AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) |
---|
3416 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
---|
3417 | if test -n "$ac_tool_prefix"; then |
---|
3418 | AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) |
---|
3419 | else |
---|
3420 | MAGIC_CMD=: |
---|
3421 | fi |
---|
3422 | fi |
---|
3423 | ]) |
---|
3424 | |
---|
3425 | |
---|
3426 | # AC_PROG_LD - find the path to the GNU or non-GNU linker |
---|
3427 | AC_DEFUN([AC_PROG_LD], |
---|
3428 | [AC_ARG_WITH(gnu-ld, |
---|
3429 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
---|
3430 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
---|
3431 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
3432 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
3433 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
3434 | AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
---|
3435 | ac_prog=ld |
---|
3436 | if test "$GCC" = yes; then |
---|
3437 | # Check if gcc -print-prog-name=ld gives a path. |
---|
3438 | AC_MSG_CHECKING([for ld used by GCC]) |
---|
3439 | case $host in |
---|
3440 | *-*-mingw*) |
---|
3441 | # gcc leaves a trailing carriage return which upsets mingw |
---|
3442 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
---|
3443 | *) |
---|
3444 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
---|
3445 | esac |
---|
3446 | case $ac_prog in |
---|
3447 | # Accept absolute paths. |
---|
3448 | [[\\/]]* | [[A-Za-z]]:[[\\/]]*) |
---|
3449 | re_direlt='/[[^/]][[^/]]*/\.\./' |
---|
3450 | # Canonicalize the path of ld |
---|
3451 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
---|
3452 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
---|
3453 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
---|
3454 | done |
---|
3455 | test -z "$LD" && LD="$ac_prog" |
---|
3456 | ;; |
---|
3457 | "") |
---|
3458 | # If it fails, then pretend we aren't using GCC. |
---|
3459 | ac_prog=ld |
---|
3460 | ;; |
---|
3461 | *) |
---|
3462 | # If it is relative, then search for the first ld in PATH. |
---|
3463 | with_gnu_ld=unknown |
---|
3464 | ;; |
---|
3465 | esac |
---|
3466 | elif test "$with_gnu_ld" = yes; then |
---|
3467 | AC_MSG_CHECKING([for GNU ld]) |
---|
3468 | else |
---|
3469 | AC_MSG_CHECKING([for non-GNU ld]) |
---|
3470 | fi |
---|
3471 | AC_CACHE_VAL(lt_cv_path_LD, |
---|
3472 | [if test -z "$LD"; then |
---|
3473 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
3474 | for ac_dir in $PATH; do |
---|
3475 | test -z "$ac_dir" && ac_dir=. |
---|
3476 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
---|
3477 | lt_cv_path_LD="$ac_dir/$ac_prog" |
---|
3478 | # Check to see if the program is GNU ld. I'd rather use --version, |
---|
3479 | # but apparently some GNU ld's only accept -v. |
---|
3480 | # Break only if it was the GNU/non-GNU ld that we prefer. |
---|
3481 | if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
---|
3482 | test "$with_gnu_ld" != no && break |
---|
3483 | else |
---|
3484 | test "$with_gnu_ld" != yes && break |
---|
3485 | fi |
---|
3486 | fi |
---|
3487 | done |
---|
3488 | IFS="$ac_save_ifs" |
---|
3489 | else |
---|
3490 | lt_cv_path_LD="$LD" # Let the user override the test with a path. |
---|
3491 | fi]) |
---|
3492 | LD="$lt_cv_path_LD" |
---|
3493 | if test -n "$LD"; then |
---|
3494 | AC_MSG_RESULT($LD) |
---|
3495 | else |
---|
3496 | AC_MSG_RESULT(no) |
---|
3497 | fi |
---|
3498 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
---|
3499 | AC_PROG_LD_GNU |
---|
3500 | ]) |
---|
3501 | |
---|
3502 | # AC_PROG_LD_GNU - |
---|
3503 | AC_DEFUN([AC_PROG_LD_GNU], |
---|
3504 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
---|
3505 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
---|
3506 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
---|
3507 | lt_cv_prog_gnu_ld=yes |
---|
3508 | else |
---|
3509 | lt_cv_prog_gnu_ld=no |
---|
3510 | fi]) |
---|
3511 | with_gnu_ld=$lt_cv_prog_gnu_ld |
---|
3512 | ]) |
---|
3513 | |
---|
3514 | # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker |
---|
3515 | # -- PORTME Some linkers may need a different reload flag. |
---|
3516 | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], |
---|
3517 | [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, |
---|
3518 | [lt_cv_ld_reload_flag='-r']) |
---|
3519 | reload_flag=$lt_cv_ld_reload_flag |
---|
3520 | test -n "$reload_flag" && reload_flag=" $reload_flag" |
---|
3521 | ]) |
---|
3522 | |
---|
3523 | # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies |
---|
3524 | # -- PORTME fill in with the dynamic library characteristics |
---|
3525 | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], |
---|
3526 | [AC_CACHE_CHECK([how to recognise dependent libraries], |
---|
3527 | lt_cv_deplibs_check_method, |
---|
3528 | [lt_cv_file_magic_cmd='$MAGIC_CMD' |
---|
3529 | lt_cv_file_magic_test_file= |
---|
3530 | lt_cv_deplibs_check_method='unknown' |
---|
3531 | # Need to set the preceding variable on all platforms that support |
---|
3532 | # interlibrary dependencies. |
---|
3533 | # 'none' -- dependencies not supported. |
---|
3534 | # `unknown' -- same as none, but documents that we really don't know. |
---|
3535 | # 'pass_all' -- all dependencies passed with no checks. |
---|
3536 | # 'test_compile' -- check by making test program. |
---|
3537 | # 'file_magic [[regex]]' -- check by looking for files in library path |
---|
3538 | # which responds to the $file_magic_cmd with a given egrep regex. |
---|
3539 | # If you have `file' or equivalent on your system and you're not sure |
---|
3540 | # whether `pass_all' will *always* work, you probably want this one. |
---|
3541 | |
---|
3542 | case $host_os in |
---|
3543 | aix4* | aix5*) |
---|
3544 | lt_cv_deplibs_check_method=pass_all |
---|
3545 | ;; |
---|
3546 | |
---|
3547 | beos*) |
---|
3548 | lt_cv_deplibs_check_method=pass_all |
---|
3549 | ;; |
---|
3550 | |
---|
3551 | bsdi4*) |
---|
3552 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
---|
3553 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
---|
3554 | lt_cv_file_magic_test_file=/shlib/libc.so |
---|
3555 | ;; |
---|
3556 | |
---|
3557 | cygwin* | mingw* | pw32*) |
---|
3558 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
---|
3559 | lt_cv_file_magic_cmd='$OBJDUMP -f' |
---|
3560 | ;; |
---|
3561 | |
---|
3562 | darwin* | rhapsody*) |
---|
3563 | lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' |
---|
3564 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
---|
3565 | case "$host_os" in |
---|
3566 | rhapsody* | darwin1.[[012]]) |
---|
3567 | lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` |
---|
3568 | ;; |
---|
3569 | *) # Darwin 1.3 on |
---|
3570 | lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' |
---|
3571 | ;; |
---|
3572 | esac |
---|
3573 | ;; |
---|
3574 | |
---|
3575 | freebsd*) |
---|
3576 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
---|
3577 | case $host_cpu in |
---|
3578 | i*86 ) |
---|
3579 | # Not sure whether the presence of OpenBSD here was a mistake. |
---|
3580 | # Let's accept both of them until this is cleared up. |
---|
3581 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' |
---|
3582 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3583 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
---|
3584 | ;; |
---|
3585 | esac |
---|
3586 | else |
---|
3587 | lt_cv_deplibs_check_method=pass_all |
---|
3588 | fi |
---|
3589 | ;; |
---|
3590 | |
---|
3591 | gnu*) |
---|
3592 | lt_cv_deplibs_check_method=pass_all |
---|
3593 | ;; |
---|
3594 | |
---|
3595 | hpux10.20*|hpux11*) |
---|
3596 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
---|
3597 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3598 | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
---|
3599 | ;; |
---|
3600 | |
---|
3601 | irix5* | irix6* | nonstopux*) |
---|
3602 | case $host_os in |
---|
3603 | irix5* | nonstopux*) |
---|
3604 | # this will be overridden with pass_all, but let us keep it just in case |
---|
3605 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" |
---|
3606 | ;; |
---|
3607 | *) |
---|
3608 | case $LD in |
---|
3609 | *-32|*"-32 ") libmagic=32-bit;; |
---|
3610 | *-n32|*"-n32 ") libmagic=N32;; |
---|
3611 | *-64|*"-64 ") libmagic=64-bit;; |
---|
3612 | *) libmagic=never-match;; |
---|
3613 | esac |
---|
3614 | # this will be overridden with pass_all, but let us keep it just in case |
---|
3615 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" |
---|
3616 | ;; |
---|
3617 | esac |
---|
3618 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` |
---|
3619 | lt_cv_deplibs_check_method=pass_all |
---|
3620 | ;; |
---|
3621 | |
---|
3622 | # This must be Linux ELF. |
---|
3623 | linux-gnu*) |
---|
3624 | case $host_cpu in |
---|
3625 | alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | s390* | x86_64*) |
---|
3626 | lt_cv_deplibs_check_method=pass_all ;; |
---|
3627 | *) |
---|
3628 | # glibc up to 2.1.1 does not perform some relocations on ARM |
---|
3629 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; |
---|
3630 | esac |
---|
3631 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
---|
3632 | ;; |
---|
3633 | |
---|
3634 | netbsd*) |
---|
3635 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
---|
3636 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' |
---|
3637 | else |
---|
3638 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' |
---|
3639 | fi |
---|
3640 | ;; |
---|
3641 | |
---|
3642 | newos6*) |
---|
3643 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
---|
3644 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3645 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
---|
3646 | ;; |
---|
3647 | |
---|
3648 | openbsd*) |
---|
3649 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3650 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
---|
3651 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
3652 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' |
---|
3653 | else |
---|
3654 | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' |
---|
3655 | fi |
---|
3656 | ;; |
---|
3657 | |
---|
3658 | osf3* | osf4* | osf5*) |
---|
3659 | # this will be overridden with pass_all, but let us keep it just in case |
---|
3660 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' |
---|
3661 | lt_cv_file_magic_test_file=/shlib/libc.so |
---|
3662 | lt_cv_deplibs_check_method=pass_all |
---|
3663 | ;; |
---|
3664 | |
---|
3665 | sco3.2v5*) |
---|
3666 | lt_cv_deplibs_check_method=pass_all |
---|
3667 | ;; |
---|
3668 | |
---|
3669 | solaris*) |
---|
3670 | lt_cv_deplibs_check_method=pass_all |
---|
3671 | lt_cv_file_magic_test_file=/lib/libc.so |
---|
3672 | ;; |
---|
3673 | |
---|
3674 | sysv5uw[[78]]* | sysv4*uw2*) |
---|
3675 | lt_cv_deplibs_check_method=pass_all |
---|
3676 | ;; |
---|
3677 | |
---|
3678 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
3679 | case $host_vendor in |
---|
3680 | motorola) |
---|
3681 | 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]]' |
---|
3682 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
---|
3683 | ;; |
---|
3684 | ncr) |
---|
3685 | lt_cv_deplibs_check_method=pass_all |
---|
3686 | ;; |
---|
3687 | sequent) |
---|
3688 | lt_cv_file_magic_cmd='/bin/file' |
---|
3689 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
---|
3690 | ;; |
---|
3691 | sni) |
---|
3692 | lt_cv_file_magic_cmd='/bin/file' |
---|
3693 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
---|
3694 | lt_cv_file_magic_test_file=/lib/libc.so |
---|
3695 | ;; |
---|
3696 | siemens) |
---|
3697 | lt_cv_deplibs_check_method=pass_all |
---|
3698 | ;; |
---|
3699 | esac |
---|
3700 | ;; |
---|
3701 | esac |
---|
3702 | ]) |
---|
3703 | file_magic_cmd=$lt_cv_file_magic_cmd |
---|
3704 | deplibs_check_method=$lt_cv_deplibs_check_method |
---|
3705 | ]) |
---|
3706 | |
---|
3707 | |
---|
3708 | # AC_PROG_NM - find the path to a BSD-compatible name lister |
---|
3709 | AC_DEFUN([AC_PROG_NM], |
---|
3710 | [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
---|
3711 | AC_MSG_CHECKING([for BSD-compatible nm]) |
---|
3712 | AC_CACHE_VAL(lt_cv_path_NM, |
---|
3713 | [if test -n "$NM"; then |
---|
3714 | # Let the user override the test. |
---|
3715 | lt_cv_path_NM="$NM" |
---|
3716 | else |
---|
3717 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
3718 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
---|
3719 | test -z "$ac_dir" && ac_dir=. |
---|
3720 | tmp_nm=$ac_dir/${ac_tool_prefix}nm |
---|
3721 | if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then |
---|
3722 | # Check to see if the nm accepts a BSD-compat flag. |
---|
3723 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
---|
3724 | # nm: unknown option "B" ignored |
---|
3725 | # Tru64's nm complains that /dev/null is an invalid object file |
---|
3726 | if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then |
---|
3727 | lt_cv_path_NM="$tmp_nm -B" |
---|
3728 | break |
---|
3729 | elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
---|
3730 | lt_cv_path_NM="$tmp_nm -p" |
---|
3731 | break |
---|
3732 | else |
---|
3733 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
---|
3734 | continue # so that we can try to find one that supports BSD flags |
---|
3735 | fi |
---|
3736 | fi |
---|
3737 | done |
---|
3738 | IFS="$ac_save_ifs" |
---|
3739 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
---|
3740 | fi]) |
---|
3741 | NM="$lt_cv_path_NM" |
---|
3742 | AC_MSG_RESULT([$NM]) |
---|
3743 | ]) |
---|
3744 | |
---|
3745 | # AC_CHECK_LIBM - check for math library |
---|
3746 | AC_DEFUN([AC_CHECK_LIBM], |
---|
3747 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
3748 | LIBM= |
---|
3749 | case $host in |
---|
3750 | *-*-beos* | *-*-cygwin* | *-*-pw32*) |
---|
3751 | # These system don't have libm |
---|
3752 | ;; |
---|
3753 | *-ncr-sysv4.3*) |
---|
3754 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
---|
3755 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") |
---|
3756 | ;; |
---|
3757 | *) |
---|
3758 | AC_CHECK_LIB(m, main, LIBM="-lm") |
---|
3759 | ;; |
---|
3760 | esac |
---|
3761 | ]) |
---|
3762 | |
---|
3763 | # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for |
---|
3764 | # the libltdl convenience library and LTDLINCL to the include flags for |
---|
3765 | # the libltdl header and adds --enable-ltdl-convenience to the |
---|
3766 | # configure arguments. Note that LIBLTDL and LTDLINCL are not |
---|
3767 | # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not |
---|
3768 | # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed |
---|
3769 | # with '${top_builddir}/' and LTDLINCL will be prefixed with |
---|
3770 | # '${top_srcdir}/' (note the single quotes!). If your package is not |
---|
3771 | # flat and you're not using automake, define top_builddir and |
---|
3772 | # top_srcdir appropriately in the Makefiles. |
---|
3773 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
---|
3774 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3775 | case $enable_ltdl_convenience in |
---|
3776 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
---|
3777 | "") enable_ltdl_convenience=yes |
---|
3778 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
---|
3779 | esac |
---|
3780 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
---|
3781 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
3782 | # For backwards non-gettext consistent compatibility... |
---|
3783 | INCLTDL="$LTDLINCL" |
---|
3784 | ]) |
---|
3785 | |
---|
3786 | # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for |
---|
3787 | # the libltdl installable library and LTDLINCL to the include flags for |
---|
3788 | # the libltdl header and adds --enable-ltdl-install to the configure |
---|
3789 | # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is |
---|
3790 | # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed |
---|
3791 | # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will |
---|
3792 | # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed |
---|
3793 | # with '${top_srcdir}/' (note the single quotes!). If your package is |
---|
3794 | # not flat and you're not using automake, define top_builddir and |
---|
3795 | # top_srcdir appropriately in the Makefiles. |
---|
3796 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
---|
3797 | AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
---|
3798 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3799 | AC_CHECK_LIB(ltdl, main, |
---|
3800 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
---|
3801 | [if test x"$enable_ltdl_install" = xno; then |
---|
3802 | AC_MSG_WARN([libltdl not installed, but installation disabled]) |
---|
3803 | else |
---|
3804 | enable_ltdl_install=yes |
---|
3805 | fi |
---|
3806 | ]) |
---|
3807 | if test x"$enable_ltdl_install" = x"yes"; then |
---|
3808 | ac_configure_args="$ac_configure_args --enable-ltdl-install" |
---|
3809 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
---|
3810 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
3811 | else |
---|
3812 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
---|
3813 | LIBLTDL="-lltdl" |
---|
3814 | LTDLINCL= |
---|
3815 | fi |
---|
3816 | # For backwards non-gettext consistent compatibility... |
---|
3817 | INCLTDL="$LTDLINCL" |
---|
3818 | ]) |
---|
3819 | |
---|
3820 | # old names |
---|
3821 | AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
---|
3822 | AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
---|
3823 | AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
---|
3824 | AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
---|
3825 | AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
---|
3826 | AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) |
---|
3827 | AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) |
---|
3828 | |
---|
3829 | # This is just to silence aclocal about the macro not being used |
---|
3830 | ifelse([AC_DISABLE_FAST_INSTALL]) |
---|
3831 | |
---|
3832 | # NOTE: This macro has been submitted for inclusion into # |
---|
3833 | # GNU Autoconf as AC_PROG_SED. When it is available in # |
---|
3834 | # a released version of Autoconf we should remove this # |
---|
3835 | # macro and use it instead. # |
---|
3836 | # LT_AC_PROG_SED |
---|
3837 | # -------------- |
---|
3838 | # Check for a fully-functional sed program, that truncates |
---|
3839 | # as few characters as possible. Prefer GNU sed if found. |
---|
3840 | AC_DEFUN([LT_AC_PROG_SED], |
---|
3841 | [AC_MSG_CHECKING([for a sed that does not truncate output]) |
---|
3842 | AC_CACHE_VAL(lt_cv_path_SED, |
---|
3843 | [# Loop through the user's path and test for sed and gsed. |
---|
3844 | # Then use that list of sed's as ones to test for truncation. |
---|
3845 | as_executable_p="test -f" |
---|
3846 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
---|
3847 | for as_dir in $PATH |
---|
3848 | do |
---|
3849 | IFS=$as_save_IFS |
---|
3850 | test -z "$as_dir" && as_dir=. |
---|
3851 | for ac_prog in sed gsed; do |
---|
3852 | for ac_exec_ext in '' $ac_executable_extensions; do |
---|
3853 | if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
---|
3854 | _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" |
---|
3855 | fi |
---|
3856 | done |
---|
3857 | done |
---|
3858 | done |
---|
3859 | |
---|
3860 | # Create a temporary directory, and hook for its removal unless debugging. |
---|
3861 | $debug || |
---|
3862 | { |
---|
3863 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 |
---|
3864 | trap '{ (exit 1); exit 1; }' 1 2 13 15 |
---|
3865 | } |
---|
3866 | |
---|
3867 | # Create a (secure) tmp directory for tmp files. |
---|
3868 | : ${TMPDIR=/tmp} |
---|
3869 | { |
---|
3870 | tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && |
---|
3871 | test -n "$tmp" && test -d "$tmp" |
---|
3872 | } || |
---|
3873 | { |
---|
3874 | tmp=$TMPDIR/sed$$-$RANDOM |
---|
3875 | (umask 077 && mkdir $tmp) |
---|
3876 | } || |
---|
3877 | { |
---|
3878 | echo "$me: cannot create a temporary directory in $TMPDIR" >&2 |
---|
3879 | { (exit 1); exit 1; } |
---|
3880 | } |
---|
3881 | _max=0 |
---|
3882 | _count=0 |
---|
3883 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
---|
3884 | # along with /bin/sed that truncates output. |
---|
3885 | for _sed in $_sed_list /usr/xpg4/bin/sed; do |
---|
3886 | test ! -f ${_sed} && break |
---|
3887 | cat /dev/null > "$tmp/sed.in" |
---|
3888 | _count=0 |
---|
3889 | echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" |
---|
3890 | # Check for GNU sed and select it if it is found. |
---|
3891 | if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then |
---|
3892 | lt_cv_path_SED=${_sed} |
---|
3893 | break |
---|
3894 | fi |
---|
3895 | while true; do |
---|
3896 | cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" |
---|
3897 | mv "$tmp/sed.tmp" "$tmp/sed.in" |
---|
3898 | cp "$tmp/sed.in" "$tmp/sed.nl" |
---|
3899 | echo >>"$tmp/sed.nl" |
---|
3900 | ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break |
---|
3901 | cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break |
---|
3902 | # 40000 chars as input seems more than enough |
---|
3903 | test $_count -gt 10 && break |
---|
3904 | _count=`expr $_count + 1` |
---|
3905 | if test $_count -gt $_max; then |
---|
3906 | _max=$_count |
---|
3907 | lt_cv_path_SED=$_sed |
---|
3908 | fi |
---|
3909 | done |
---|
3910 | done |
---|
3911 | rm -rf "$tmp" |
---|
3912 | ]) |
---|
3913 | if test "X$SED" != "X"; then |
---|
3914 | lt_cv_path_SED=$SED |
---|
3915 | else |
---|
3916 | SED=$lt_cv_path_SED |
---|
3917 | fi |
---|
3918 | AC_MSG_RESULT([$SED]) |
---|
3919 | ]) |
---|
3920 | |
---|
3921 | |
---|
3922 | dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) |
---|
3923 | dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page |
---|
3924 | dnl also defines GSTUFF_PKG_ERRORS on error |
---|
3925 | AC_DEFUN(PKG_CHECK_MODULES, [ |
---|
3926 | succeeded=no |
---|
3927 | |
---|
3928 | if test -z "$PKG_CONFIG"; then |
---|
3929 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
---|
3930 | fi |
---|
3931 | |
---|
3932 | if test "$PKG_CONFIG" = "no" ; then |
---|
3933 | echo "*** The pkg-config script could not be found. Make sure it is" |
---|
3934 | echo "*** in your path, or set the PKG_CONFIG environment variable" |
---|
3935 | echo "*** to the full path to pkg-config." |
---|
3936 | echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
---|
3937 | else |
---|
3938 | PKG_CONFIG_MIN_VERSION=0.9.0 |
---|
3939 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
---|
3940 | AC_MSG_CHECKING(for $2) |
---|
3941 | |
---|
3942 | if $PKG_CONFIG --exists "$2" ; then |
---|
3943 | AC_MSG_RESULT(yes) |
---|
3944 | succeeded=yes |
---|
3945 | |
---|
3946 | AC_MSG_CHECKING($1_CFLAGS) |
---|
3947 | $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` |
---|
3948 | AC_MSG_RESULT($$1_CFLAGS) |
---|
3949 | |
---|
3950 | AC_MSG_CHECKING($1_LIBS) |
---|
3951 | $1_LIBS=`$PKG_CONFIG --libs "$2"` |
---|
3952 | AC_MSG_RESULT($$1_LIBS) |
---|
3953 | else |
---|
3954 | $1_CFLAGS="" |
---|
3955 | $1_LIBS="" |
---|
3956 | ## If we have a custom action on failure, don't print errors, but |
---|
3957 | ## do set a variable so people can do so. |
---|
3958 | $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` |
---|
3959 | ifelse([$4], ,echo $$1_PKG_ERRORS,) |
---|
3960 | fi |
---|
3961 | |
---|
3962 | AC_SUBST($1_CFLAGS) |
---|
3963 | AC_SUBST($1_LIBS) |
---|
3964 | else |
---|
3965 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
---|
3966 | echo "*** See http://www.freedesktop.org/software/pkgconfig" |
---|
3967 | fi |
---|
3968 | fi |
---|
3969 | |
---|
3970 | if test $succeeded = yes; then |
---|
3971 | ifelse([$3], , :, [$3]) |
---|
3972 | else |
---|
3973 | ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) |
---|
3974 | fi |
---|
3975 | ]) |
---|
3976 | |
---|
3977 | |
---|
3978 | |
---|