source: abuse/trunk/aclocal.m4 @ 2

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