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