source: trunk/third/ORBit/libIDL/aclocal.m4 @ 16729

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