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