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