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