source: trunk/third/libsoup/aclocal.m4 @ 19535

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