source: trunk/third/glib2/aclocal.m4 @ 18159

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