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

Revision 21108, 249.9 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21107, which included commits to RCS files with non-trunk default branches.
Line 
1# generated automatically by aclocal 1.8.3 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4# Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14# Configure paths for GLIB
15# Owen Taylor     1997-2001
16
17dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
18dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
19dnl gthread is specified in MODULES, pass to pkg-config
20dnl
21AC_DEFUN([AM_PATH_GLIB_2_0],
22[dnl
23dnl Get the cflags and libraries from pkg-config
24dnl
25AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
26                    , enable_glibtest=yes)
27
28  pkg_config_args=glib-2.0
29  for module in . $4
30  do
31      case "$module" in
32         gmodule)
33             pkg_config_args="$pkg_config_args gmodule-2.0"
34         ;;
35         gobject)
36             pkg_config_args="$pkg_config_args gobject-2.0"
37         ;;
38         gthread)
39             pkg_config_args="$pkg_config_args gthread-2.0"
40         ;;
41      esac
42  done
43
44  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
45
46  no_glib=""
47
48  if test x$PKG_CONFIG != xno ; then
49    if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
50      :
51    else
52      echo *** pkg-config too old; version 0.7 or better required.
53      no_glib=yes
54      PKG_CONFIG=no
55    fi
56  else
57    no_glib=yes
58  fi
59
60  min_glib_version=ifelse([$1], ,2.0.0,$1)
61  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
62
63  if test x$PKG_CONFIG != xno ; then
64    ## don't try to run the test against uninstalled libtool libs
65    if $PKG_CONFIG --uninstalled $pkg_config_args; then
66          echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
67          enable_glibtest=no
68    fi
69
70    if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
71          :
72    else
73          no_glib=yes
74    fi
75  fi
76
77  if test x"$no_glib" = x ; then
78    GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
79    GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
80    GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
81
82    GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
83    GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
84    glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
85           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
86    glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
87           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
88    glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
89           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
90    if test "x$enable_glibtest" = "xyes" ; then
91      ac_save_CFLAGS="$CFLAGS"
92      ac_save_LIBS="$LIBS"
93      CFLAGS="$CFLAGS $GLIB_CFLAGS"
94      LIBS="$GLIB_LIBS $LIBS"
95dnl
96dnl Now check if the installed GLIB is sufficiently new. (Also sanity
97dnl checks the results of pkg-config to some extent)
98dnl
99      rm -f conf.glibtest
100      AC_TRY_RUN([
101#include <glib.h>
102#include <stdio.h>
103#include <stdlib.h>
104
105int
106main ()
107{
108  int major, minor, micro;
109  char *tmp_version;
110
111  system ("touch conf.glibtest");
112
113  /* HP/UX 9 (%@#!) writes to sscanf strings */
114  tmp_version = g_strdup("$min_glib_version");
115  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
116     printf("%s, bad version string\n", "$min_glib_version");
117     exit(1);
118   }
119
120  if ((glib_major_version != $glib_config_major_version) ||
121      (glib_minor_version != $glib_config_minor_version) ||
122      (glib_micro_version != $glib_config_micro_version))
123    {
124      printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
125             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
126             glib_major_version, glib_minor_version, glib_micro_version);
127      printf ("*** was found! If pkg-config was correct, then it is best\n");
128      printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
129      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
130      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
131      printf("*** required on your system.\n");
132      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
133      printf("*** to point to the correct configuration files\n");
134    }
135  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
136           (glib_minor_version != GLIB_MINOR_VERSION) ||
137           (glib_micro_version != GLIB_MICRO_VERSION))
138    {
139      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
140             GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
141      printf("*** library (version %d.%d.%d)\n",
142             glib_major_version, glib_minor_version, glib_micro_version);
143    }
144  else
145    {
146      if ((glib_major_version > major) ||
147        ((glib_major_version == major) && (glib_minor_version > minor)) ||
148        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
149      {
150        return 0;
151       }
152     else
153      {
154        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
155               glib_major_version, glib_minor_version, glib_micro_version);
156        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
157               major, minor, micro);
158        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
159        printf("***\n");
160        printf("*** If you have already installed a sufficiently new version, this error\n");
161        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
162        printf("*** being found. The easiest way to fix this is to remove the old version\n");
163        printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
164        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
165        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
166        printf("*** so that the correct libraries are found at run-time))\n");
167      }
168    }
169  return 1;
170}
171],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
172       CFLAGS="$ac_save_CFLAGS"
173       LIBS="$ac_save_LIBS"
174     fi
175  fi
176  if test "x$no_glib" = x ; then
177     AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
178     ifelse([$2], , :, [$2])     
179  else
180     AC_MSG_RESULT(no)
181     if test "$PKG_CONFIG" = "no" ; then
182       echo "*** A new enough version of pkg-config was not found."
183       echo "*** See http://www.freedesktop.org/software/pkgconfig/"
184     else
185       if test -f conf.glibtest ; then
186        :
187       else
188          echo "*** Could not run GLIB test program, checking why..."
189          ac_save_CFLAGS="$CFLAGS"
190          ac_save_LIBS="$LIBS"
191          CFLAGS="$CFLAGS $GLIB_CFLAGS"
192          LIBS="$LIBS $GLIB_LIBS"
193          AC_TRY_LINK([
194#include <glib.h>
195#include <stdio.h>
196],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
197        [ echo "*** The test program compiled, but did not run. This usually means"
198          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
199          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
200          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
201          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
202          echo "*** is required on your system"
203          echo "***"
204          echo "*** If you have an old version installed, it is best to remove it, although"
205          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
206        [ echo "*** The test program failed to compile or link. See the file config.log for the"
207          echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
208          CFLAGS="$ac_save_CFLAGS"
209          LIBS="$ac_save_LIBS"
210       fi
211     fi
212     GLIB_CFLAGS=""
213     GLIB_LIBS=""
214     GLIB_GENMARSHAL=""
215     GOBJECT_QUERY=""
216     GLIB_MKENUMS=""
217     ifelse([$3], , :, [$3])
218  fi
219  AC_SUBST(GLIB_CFLAGS)
220  AC_SUBST(GLIB_LIBS)
221  AC_SUBST(GLIB_GENMARSHAL)
222  AC_SUBST(GOBJECT_QUERY)
223  AC_SUBST(GLIB_MKENUMS)
224  rm -f conf.glibtest
225])
226
227# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
228
229# serial 47 AC_PROG_LIBTOOL
230
231
232# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
233# -----------------------------------------------------------
234# If this macro is not defined by Autoconf, define it here.
235m4_ifdef([AC_PROVIDE_IFELSE],
236         [],
237         [m4_define([AC_PROVIDE_IFELSE],
238                 [m4_ifdef([AC_PROVIDE_$1],
239                           [$2], [$3])])])
240
241
242# AC_PROG_LIBTOOL
243# ---------------
244AC_DEFUN([AC_PROG_LIBTOOL],
245[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
246dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
247dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
248  AC_PROVIDE_IFELSE([AC_PROG_CXX],
249    [AC_LIBTOOL_CXX],
250    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
251  ])])
252dnl And a similar setup for Fortran 77 support
253  AC_PROVIDE_IFELSE([AC_PROG_F77],
254    [AC_LIBTOOL_F77],
255    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
256])])
257
258dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
259dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
260dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
261  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
262    [AC_LIBTOOL_GCJ],
263    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
264      [AC_LIBTOOL_GCJ],
265      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
266        [AC_LIBTOOL_GCJ],
267      [ifdef([AC_PROG_GCJ],
268             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
269       ifdef([A][M_PROG_GCJ],
270             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
271       ifdef([LT_AC_PROG_GCJ],
272             [define([LT_AC_PROG_GCJ],
273                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
274])])# AC_PROG_LIBTOOL
275
276
277# _AC_PROG_LIBTOOL
278# ----------------
279AC_DEFUN([_AC_PROG_LIBTOOL],
280[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
281AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
282AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
283AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
284
285# This can be used to rebuild libtool when needed
286LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
287
288# Always use our own libtool.
289LIBTOOL='$(SHELL) $(top_builddir)/libtool'
290AC_SUBST(LIBTOOL)dnl
291
292# Prevent multiple expansion
293define([AC_PROG_LIBTOOL], [])
294])# _AC_PROG_LIBTOOL
295
296
297# AC_LIBTOOL_SETUP
298# ----------------
299AC_DEFUN([AC_LIBTOOL_SETUP],
300[AC_PREREQ(2.50)dnl
301AC_REQUIRE([AC_ENABLE_SHARED])dnl
302AC_REQUIRE([AC_ENABLE_STATIC])dnl
303AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
304AC_REQUIRE([AC_CANONICAL_HOST])dnl
305AC_REQUIRE([AC_CANONICAL_BUILD])dnl
306AC_REQUIRE([AC_PROG_CC])dnl
307AC_REQUIRE([AC_PROG_LD])dnl
308AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
309AC_REQUIRE([AC_PROG_NM])dnl
310
311AC_REQUIRE([AC_PROG_LN_S])dnl
312AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
313# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
314AC_REQUIRE([AC_OBJEXT])dnl
315AC_REQUIRE([AC_EXEEXT])dnl
316dnl
317
318AC_LIBTOOL_SYS_MAX_CMD_LEN
319AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
320AC_LIBTOOL_OBJDIR
321
322AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
323_LT_AC_PROG_ECHO_BACKSLASH
324
325case $host_os in
326aix3*)
327  # AIX sometimes has problems with the GCC collect2 program.  For some
328  # reason, if we set the COLLECT_NAMES environment variable, the problems
329  # vanish in a puff of smoke.
330  if test "X${COLLECT_NAMES+set}" != Xset; then
331    COLLECT_NAMES=
332    export COLLECT_NAMES
333  fi
334  ;;
335esac
336
337# Sed substitution that helps us do robust quoting.  It backslashifies
338# metacharacters that are still active within double-quoted strings.
339Xsed='sed -e s/^X//'
340[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
341
342# Same as above, but do not quote variable references.
343[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
344
345# Sed substitution to delay expansion of an escaped shell variable in a
346# double_quote_subst'ed string.
347delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
348
349# Sed substitution to avoid accidental globbing in evaled expressions
350no_glob_subst='s/\*/\\\*/g'
351
352# Constants:
353rm="rm -f"
354
355# Global variables:
356default_ofile=libtool
357can_build_shared=yes
358
359# All known linkers require a `.a' archive for static linking (except M$VC,
360# which needs '.lib').
361libext=a
362ltmain="$ac_aux_dir/ltmain.sh"
363ofile="$default_ofile"
364with_gnu_ld="$lt_cv_prog_gnu_ld"
365
366AC_CHECK_TOOL(AR, ar, false)
367AC_CHECK_TOOL(RANLIB, ranlib, :)
368AC_CHECK_TOOL(STRIP, strip, :)
369
370old_CC="$CC"
371old_CFLAGS="$CFLAGS"
372
373# Set sane defaults for various variables
374test -z "$AR" && AR=ar
375test -z "$AR_FLAGS" && AR_FLAGS=cru
376test -z "$AS" && AS=as
377test -z "$CC" && CC=cc
378test -z "$LTCC" && LTCC=$CC
379test -z "$DLLTOOL" && DLLTOOL=dlltool
380test -z "$LD" && LD=ld
381test -z "$LN_S" && LN_S="ln -s"
382test -z "$MAGIC_CMD" && MAGIC_CMD=file
383test -z "$NM" && NM=nm
384test -z "$SED" && SED=sed
385test -z "$OBJDUMP" && OBJDUMP=objdump
386test -z "$RANLIB" && RANLIB=:
387test -z "$STRIP" && STRIP=:
388test -z "$ac_objext" && ac_objext=o
389
390# Determine commands to create old-style static archives.
391old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
392old_postinstall_cmds='chmod 644 $oldlib'
393old_postuninstall_cmds=
394
395if test -n "$RANLIB"; then
396  case $host_os in
397  openbsd*)
398    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
399    ;;
400  *)
401    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
402    ;;
403  esac
404  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
405fi
406
407# Only perform the check for file, if the check method requires it
408case $deplibs_check_method in
409file_magic*)
410  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
411    AC_PATH_MAGIC
412  fi
413  ;;
414esac
415
416AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
417AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
418enable_win32_dll=yes, enable_win32_dll=no)
419
420AC_ARG_ENABLE([libtool-lock],
421    [AC_HELP_STRING([--disable-libtool-lock],
422        [avoid locking (might break parallel builds)])])
423test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
424
425AC_ARG_WITH([pic],
426    [AC_HELP_STRING([--with-pic],
427        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
428    [pic_mode="$withval"],
429    [pic_mode=default])
430test -z "$pic_mode" && pic_mode=default
431
432# Use C for the default configuration in the libtool script
433tagname=
434AC_LIBTOOL_LANG_C_CONFIG
435_LT_AC_TAGCONFIG
436])# AC_LIBTOOL_SETUP
437
438
439# _LT_AC_SYS_COMPILER
440# -------------------
441AC_DEFUN([_LT_AC_SYS_COMPILER],
442[AC_REQUIRE([AC_PROG_CC])dnl
443
444# If no C compiler was specified, use CC.
445LTCC=${LTCC-"$CC"}
446
447# Allow CC to be a program name with arguments.
448compiler=$CC
449])# _LT_AC_SYS_COMPILER
450
451
452# _LT_AC_SYS_LIBPATH_AIX
453# ----------------------
454# Links a minimal program and checks the executable
455# for the system default hardcoded library path. In most cases,
456# this is /usr/lib:/lib, but when the MPI compilers are used
457# the location of the communication and MPI libs are included too.
458# If we don't find anything, use the default library path according
459# to the aix ld manual.
460AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
461[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
462aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
463}'`
464# Check for a 64-bit object if we didn't find anything.
465if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
466}'`; fi],[])
467if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
468])# _LT_AC_SYS_LIBPATH_AIX
469
470
471# _LT_AC_SHELL_INIT(ARG)
472# ----------------------
473AC_DEFUN([_LT_AC_SHELL_INIT],
474[ifdef([AC_DIVERSION_NOTICE],
475             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
476         [AC_DIVERT_PUSH(NOTICE)])
477$1
478AC_DIVERT_POP
479])# _LT_AC_SHELL_INIT
480
481
482# _LT_AC_PROG_ECHO_BACKSLASH
483# --------------------------
484# Add some code to the start of the generated configure script which
485# will find an echo command which doesn't interpret backslashes.
486AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
487[_LT_AC_SHELL_INIT([
488# Check that we are running under the correct shell.
489SHELL=${CONFIG_SHELL-/bin/sh}
490
491case X$ECHO in
492X*--fallback-echo)
493  # Remove one level of quotation (which was required for Make).
494  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
495  ;;
496esac
497
498echo=${ECHO-echo}
499if test "X[$]1" = X--no-reexec; then
500  # Discard the --no-reexec flag, and continue.
501  shift
502elif test "X[$]1" = X--fallback-echo; then
503  # Avoid inline document here, it may be left over
504  :
505elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
506  # Yippee, $echo works!
507  :
508else
509  # Restart under the correct shell.
510  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
511fi
512
513if test "X[$]1" = X--fallback-echo; then
514  # used as fallback echo
515  shift
516  cat <<EOF
517[$]*
518EOF
519  exit 0
520fi
521
522# The HP-UX ksh and POSIX shell print the target directory to stdout
523# if CDPATH is set.
524if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
525
526if test -z "$ECHO"; then
527if test "X${echo_test_string+set}" != Xset; then
528# find a string as large as possible, as long as the shell can cope with it
529  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
530    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
531    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
532       echo_test_string="`eval $cmd`" &&
533       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
534    then
535      break
536    fi
537  done
538fi
539
540if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
541   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
542   test "X$echo_testing_string" = "X$echo_test_string"; then
543  :
544else
545  # The Solaris, AIX, and Digital Unix default echo programs unquote
546  # backslashes.  This makes it impossible to quote backslashes using
547  #   echo "$something" | sed 's/\\/\\\\/g'
548  #
549  # So, first we look for a working echo in the user's PATH.
550
551  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
552  for dir in $PATH /usr/ucb; do
553    IFS="$lt_save_ifs"
554    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
555       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
556       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
557       test "X$echo_testing_string" = "X$echo_test_string"; then
558      echo="$dir/echo"
559      break
560    fi
561  done
562  IFS="$lt_save_ifs"
563
564  if test "X$echo" = Xecho; then
565    # We didn't find a better echo, so look for alternatives.
566    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
567       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
568       test "X$echo_testing_string" = "X$echo_test_string"; then
569      # This shell has a builtin print -r that does the trick.
570      echo='print -r'
571    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
572         test "X$CONFIG_SHELL" != X/bin/ksh; then
573      # If we have ksh, try running configure again with it.
574      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
575      export ORIGINAL_CONFIG_SHELL
576      CONFIG_SHELL=/bin/ksh
577      export CONFIG_SHELL
578      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
579    else
580      # Try using printf.
581      echo='printf %s\n'
582      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
583         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
584         test "X$echo_testing_string" = "X$echo_test_string"; then
585        # Cool, printf works
586        :
587      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
588           test "X$echo_testing_string" = 'X\t' &&
589           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
590           test "X$echo_testing_string" = "X$echo_test_string"; then
591        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
592        export CONFIG_SHELL
593        SHELL="$CONFIG_SHELL"
594        export SHELL
595        echo="$CONFIG_SHELL [$]0 --fallback-echo"
596      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
597           test "X$echo_testing_string" = 'X\t' &&
598           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
599           test "X$echo_testing_string" = "X$echo_test_string"; then
600        echo="$CONFIG_SHELL [$]0 --fallback-echo"
601      else
602        # maybe with a smaller string...
603        prev=:
604
605        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
606          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
607          then
608            break
609          fi
610          prev="$cmd"
611        done
612
613        if test "$prev" != 'sed 50q "[$]0"'; then
614          echo_test_string=`eval $prev`
615          export echo_test_string
616          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
617        else
618          # Oops.  We lost completely, so just stick with echo.
619          echo=echo
620        fi
621      fi
622    fi
623  fi
624fi
625fi
626
627# Copy echo and quote the copy suitably for passing to libtool from
628# the Makefile, instead of quoting the original, which is used later.
629ECHO=$echo
630if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
631   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
632fi
633
634AC_SUBST(ECHO)
635])])# _LT_AC_PROG_ECHO_BACKSLASH
636
637
638# _LT_AC_LOCK
639# -----------
640AC_DEFUN([_LT_AC_LOCK],
641[AC_ARG_ENABLE([libtool-lock],
642    [AC_HELP_STRING([--disable-libtool-lock],
643        [avoid locking (might break parallel builds)])])
644test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
645
646# Some flags need to be propagated to the compiler or linker for good
647# libtool support.
648case $host in
649ia64-*-hpux*)
650  # Find out which ABI we are using.
651  echo 'int i;' > conftest.$ac_ext
652  if AC_TRY_EVAL(ac_compile); then
653    case `/usr/bin/file conftest.$ac_objext` in
654    *ELF-32*)
655      HPUX_IA64_MODE="32"
656      ;;
657    *ELF-64*)
658      HPUX_IA64_MODE="64"
659      ;;
660    esac
661  fi
662  rm -rf conftest*
663  ;;
664*-*-irix6*)
665  # Find out which ABI we are using.
666  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
667  if AC_TRY_EVAL(ac_compile); then
668   if test "$lt_cv_prog_gnu_ld" = yes; then
669    case `/usr/bin/file conftest.$ac_objext` in
670    *32-bit*)
671      LD="${LD-ld} -melf32bsmip"
672      ;;
673    *N32*)
674      LD="${LD-ld} -melf32bmipn32"
675      ;;
676    *64-bit*)
677      LD="${LD-ld} -melf64bmip"
678      ;;
679    esac
680   else
681    case `/usr/bin/file conftest.$ac_objext` in
682    *32-bit*)
683      LD="${LD-ld} -32"
684      ;;
685    *N32*)
686      LD="${LD-ld} -n32"
687      ;;
688    *64-bit*)
689      LD="${LD-ld} -64"
690      ;;
691    esac
692   fi
693  fi
694  rm -rf conftest*
695  ;;
696
697x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
698  # Find out which ABI we are using.
699  echo 'int i;' > conftest.$ac_ext
700  if AC_TRY_EVAL(ac_compile); then
701    case "`/usr/bin/file conftest.o`" in
702    *32-bit*)
703      case $host in
704        x86_64-*linux*)
705          LD="${LD-ld} -m elf_i386"
706          ;;
707        ppc64-*linux*|powerpc64-*linux*)
708          LD="${LD-ld} -m elf32ppclinux"
709          ;;
710        s390x-*linux*)
711          LD="${LD-ld} -m elf_s390"
712          ;;
713        sparc64-*linux*)
714          LD="${LD-ld} -m elf32_sparc"
715          ;;
716      esac
717      ;;
718    *64-bit*)
719      case $host in
720        x86_64-*linux*)
721          LD="${LD-ld} -m elf_x86_64"
722          ;;
723        ppc*-*linux*|powerpc*-*linux*)
724          LD="${LD-ld} -m elf64ppc"
725          ;;
726        s390*-*linux*)
727          LD="${LD-ld} -m elf64_s390"
728          ;;
729        sparc*-*linux*)
730          LD="${LD-ld} -m elf64_sparc"
731          ;;
732      esac
733      ;;
734    esac
735  fi
736  rm -rf conftest*
737  ;;
738
739*-*-sco3.2v5*)
740  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
741  SAVE_CFLAGS="$CFLAGS"
742  CFLAGS="$CFLAGS -belf"
743  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
744    [AC_LANG_PUSH(C)
745     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
746     AC_LANG_POP])
747  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
748    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
749    CFLAGS="$SAVE_CFLAGS"
750  fi
751  ;;
752AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
753[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
754  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
755  AC_CHECK_TOOL(AS, as, false)
756  AC_CHECK_TOOL(OBJDUMP, objdump, false)
757  ;;
758  ])
759esac
760
761need_locks="$enable_libtool_lock"
762
763])# _LT_AC_LOCK
764
765
766# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
767#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
768# ----------------------------------------------------------------
769# Check whether the given compiler option works
770AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
771[AC_REQUIRE([LT_AC_PROG_SED])
772AC_CACHE_CHECK([$1], [$2],
773  [$2=no
774  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
775   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
776   lt_compiler_flag="$3"
777   # Insert the option either (1) after the last *FLAGS variable, or
778   # (2) before a word containing "conftest.", or (3) at the end.
779   # Note that $ac_compile itself does not contain backslashes and begins
780   # with a dollar sign (not a hyphen), so the echo should work correctly.
781   # The option is referenced via a variable to avoid confusing sed.
782   lt_compile=`echo "$ac_compile" | $SED \
783   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
784   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
785   -e 's:$: $lt_compiler_flag:'`
786   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
787   (eval "$lt_compile" 2>conftest.err)
788   ac_status=$?
789   cat conftest.err >&AS_MESSAGE_LOG_FD
790   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
791   if (exit $ac_status) && test -s "$ac_outfile"; then
792     # The compiler can only warn and ignore the option if not recognized
793     # So say no if there are warnings
794     if test ! -s conftest.err; then
795       $2=yes
796     fi
797   fi
798   $rm conftest*
799])
800
801if test x"[$]$2" = xyes; then
802    ifelse([$5], , :, [$5])
803else
804    ifelse([$6], , :, [$6])
805fi
806])# AC_LIBTOOL_COMPILER_OPTION
807
808
809# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
810#                          [ACTION-SUCCESS], [ACTION-FAILURE])
811# ------------------------------------------------------------
812# Check whether the given compiler option works
813AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
814[AC_CACHE_CHECK([$1], [$2],
815  [$2=no
816   save_LDFLAGS="$LDFLAGS"
817   LDFLAGS="$LDFLAGS $3"
818   printf "$lt_simple_link_test_code" > conftest.$ac_ext
819   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
820     # The compiler can only warn and ignore the option if not recognized
821     # So say no if there are warnings
822     if test -s conftest.err; then
823       # Append any errors to the config.log.
824       cat conftest.err 1>&AS_MESSAGE_LOG_FD
825     else
826       $2=yes
827     fi
828   fi
829   $rm conftest*
830   LDFLAGS="$save_LDFLAGS"
831])
832
833if test x"[$]$2" = xyes; then
834    ifelse([$4], , :, [$4])
835else
836    ifelse([$5], , :, [$5])
837fi
838])# AC_LIBTOOL_LINKER_OPTION
839
840
841# AC_LIBTOOL_SYS_MAX_CMD_LEN
842# --------------------------
843AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
844[# find the maximum length of command line arguments
845AC_MSG_CHECKING([the maximum length of command line arguments])
846AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
847  i=0
848  testring="ABCD"
849
850  case $build_os in
851  msdosdjgpp*)
852    # On DJGPP, this test can blow up pretty badly due to problems in libc
853    # (any single argument exceeding 2000 bytes causes a buffer overrun
854    # during glob expansion).  Even if it were fixed, the result of this
855    # check would be larger than it should be.
856    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
857    ;;
858
859  gnu*)
860    # Under GNU Hurd, this test is not required because there is
861    # no limit to the length of command line arguments.
862    # Libtool will interpret -1 as no limit whatsoever
863    lt_cv_sys_max_cmd_len=-1;
864    ;;
865
866  cygwin* | mingw*)
867    # On Win9x/ME, this test blows up -- it succeeds, but takes
868    # about 5 minutes as the teststring grows exponentially.
869    # Worse, since 9x/ME are not pre-emptively multitasking,
870    # you end up with a "frozen" computer, even though with patience
871    # the test eventually succeeds (with a max line length of 256k).
872    # Instead, let's just punt: use the minimum linelength reported by
873    # all of the supported platforms: 8192 (on NT/2K/XP).
874    lt_cv_sys_max_cmd_len=8192;
875    ;;
876
877  amigaos*)
878    # On AmigaOS with pdksh, this test takes hours, literally.
879    # So we just punt and use a minimum line length of 8192.
880    lt_cv_sys_max_cmd_len=8192;
881    ;;
882
883 *)
884    # If test is not a shell built-in, we'll probably end up computing a
885    # maximum length that is only half of the actual maximum length, but
886    # we can't tell.
887    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
888               = "XX$testring") >/dev/null 2>&1 &&
889            new_result=`expr "X$testring" : ".*" 2>&1` &&
890            lt_cv_sys_max_cmd_len=$new_result &&
891            test $i != 17 # 1/2 MB should be enough
892    do
893      i=`expr $i + 1`
894      testring=$testring$testring
895    done
896    testring=
897    # Add a significant safety factor because C++ compilers can tack on massive
898    # amounts of additional arguments before passing them to the linker.
899    # It appears as though 1/2 is a usable value.
900    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
901    ;;
902  esac
903])
904if test -n $lt_cv_sys_max_cmd_len ; then
905  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
906else
907  AC_MSG_RESULT(none)
908fi
909])# AC_LIBTOOL_SYS_MAX_CMD_LEN
910
911
912# _LT_AC_CHECK_DLFCN
913# --------------------
914AC_DEFUN([_LT_AC_CHECK_DLFCN],
915[AC_CHECK_HEADERS(dlfcn.h)dnl
916])# _LT_AC_CHECK_DLFCN
917
918
919# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
920#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
921# ------------------------------------------------------------------
922AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
923[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
924if test "$cross_compiling" = yes; then :
925  [$4]
926else
927  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
928  lt_status=$lt_dlunknown
929  cat > conftest.$ac_ext <<EOF
930[#line __oline__ "configure"
931#include "confdefs.h"
932
933#if HAVE_DLFCN_H
934#include <dlfcn.h>
935#endif
936
937#include <stdio.h>
938
939#ifdef RTLD_GLOBAL
940#  define LT_DLGLOBAL           RTLD_GLOBAL
941#else
942#  ifdef DL_GLOBAL
943#    define LT_DLGLOBAL         DL_GLOBAL
944#  else
945#    define LT_DLGLOBAL         0
946#  endif
947#endif
948
949/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
950   find out it does not work in some platform. */
951#ifndef LT_DLLAZY_OR_NOW
952#  ifdef RTLD_LAZY
953#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
954#  else
955#    ifdef DL_LAZY
956#      define LT_DLLAZY_OR_NOW          DL_LAZY
957#    else
958#      ifdef RTLD_NOW
959#        define LT_DLLAZY_OR_NOW        RTLD_NOW
960#      else
961#        ifdef DL_NOW
962#          define LT_DLLAZY_OR_NOW      DL_NOW
963#        else
964#          define LT_DLLAZY_OR_NOW      0
965#        endif
966#      endif
967#    endif
968#  endif
969#endif
970
971#ifdef __cplusplus
972extern "C" void exit (int);
973#endif
974
975void fnord() { int i=42;}
976int main ()
977{
978  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
979  int status = $lt_dlunknown;
980
981  if (self)
982    {
983      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
984      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
985      /* dlclose (self); */
986    }
987
988    exit (status);
989}]
990EOF
991  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
992    (./conftest; exit; ) 2>/dev/null
993    lt_status=$?
994    case x$lt_status in
995      x$lt_dlno_uscore) $1 ;;
996      x$lt_dlneed_uscore) $2 ;;
997      x$lt_unknown|x*) $3 ;;
998    esac
999  else :
1000    # compilation failed
1001    $3
1002  fi
1003fi
1004rm -fr conftest*
1005])# _LT_AC_TRY_DLOPEN_SELF
1006
1007
1008# AC_LIBTOOL_DLOPEN_SELF
1009# -------------------
1010AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1011[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1012if test "x$enable_dlopen" != xyes; then
1013  enable_dlopen=unknown
1014  enable_dlopen_self=unknown
1015  enable_dlopen_self_static=unknown
1016else
1017  lt_cv_dlopen=no
1018  lt_cv_dlopen_libs=
1019
1020  case $host_os in
1021  beos*)
1022    lt_cv_dlopen="load_add_on"
1023    lt_cv_dlopen_libs=
1024    lt_cv_dlopen_self=yes
1025    ;;
1026
1027  mingw* | pw32*)
1028    lt_cv_dlopen="LoadLibrary"
1029    lt_cv_dlopen_libs=
1030   ;;
1031
1032  cygwin*)
1033    lt_cv_dlopen="dlopen"
1034    lt_cv_dlopen_libs=
1035   ;;
1036
1037  darwin*)
1038  # if libdl is installed we need to link against it
1039    AC_CHECK_LIB([dl], [dlopen],
1040                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1041    lt_cv_dlopen="dyld"
1042    lt_cv_dlopen_libs=
1043    lt_cv_dlopen_self=yes
1044    ])
1045   ;;
1046
1047  *)
1048    AC_CHECK_FUNC([shl_load],
1049          [lt_cv_dlopen="shl_load"],
1050      [AC_CHECK_LIB([dld], [shl_load],
1051            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1052        [AC_CHECK_FUNC([dlopen],
1053              [lt_cv_dlopen="dlopen"],
1054          [AC_CHECK_LIB([dl], [dlopen],
1055                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1056            [AC_CHECK_LIB([svld], [dlopen],
1057                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1058              [AC_CHECK_LIB([dld], [dld_link],
1059                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1060              ])
1061            ])
1062          ])
1063        ])
1064      ])
1065    ;;
1066  esac
1067
1068  if test "x$lt_cv_dlopen" != xno; then
1069    enable_dlopen=yes
1070  else
1071    enable_dlopen=no
1072  fi
1073
1074  case $lt_cv_dlopen in
1075  dlopen)
1076    save_CPPFLAGS="$CPPFLAGS"
1077    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1078
1079    save_LDFLAGS="$LDFLAGS"
1080    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1081
1082    save_LIBS="$LIBS"
1083    LIBS="$lt_cv_dlopen_libs $LIBS"
1084
1085    AC_CACHE_CHECK([whether a program can dlopen itself],
1086          lt_cv_dlopen_self, [dnl
1087          _LT_AC_TRY_DLOPEN_SELF(
1088            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1089            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1090    ])
1091
1092    if test "x$lt_cv_dlopen_self" = xyes; then
1093      LDFLAGS="$LDFLAGS $link_static_flag"
1094      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1095          lt_cv_dlopen_self_static, [dnl
1096          _LT_AC_TRY_DLOPEN_SELF(
1097            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1098            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1099      ])
1100    fi
1101
1102    CPPFLAGS="$save_CPPFLAGS"
1103    LDFLAGS="$save_LDFLAGS"
1104    LIBS="$save_LIBS"
1105    ;;
1106  esac
1107
1108  case $lt_cv_dlopen_self in
1109  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1110  *) enable_dlopen_self=unknown ;;
1111  esac
1112
1113  case $lt_cv_dlopen_self_static in
1114  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1115  *) enable_dlopen_self_static=unknown ;;
1116  esac
1117fi
1118])# AC_LIBTOOL_DLOPEN_SELF
1119
1120
1121# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1122# ---------------------------------
1123# Check to see if options -c and -o are simultaneously supported by compiler
1124AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1125[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1126AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1127  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1128  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1129   $rm -r conftest 2>/dev/null
1130   mkdir conftest
1131   cd conftest
1132   mkdir out
1133   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1134
1135   lt_compiler_flag="-o out/conftest2.$ac_objext"
1136   # Insert the option either (1) after the last *FLAGS variable, or
1137   # (2) before a word containing "conftest.", or (3) at the end.
1138   # Note that $ac_compile itself does not contain backslashes and begins
1139   # with a dollar sign (not a hyphen), so the echo should work correctly.
1140   lt_compile=`echo "$ac_compile" | $SED \
1141   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1142   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1143   -e 's:$: $lt_compiler_flag:'`
1144   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1145   (eval "$lt_compile" 2>out/conftest.err)
1146   ac_status=$?
1147   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1148   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1149   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1150   then
1151     # The compiler can only warn and ignore the option if not recognized
1152     # So say no if there are warnings
1153     if test ! -s out/conftest.err; then
1154       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1155     fi
1156   fi
1157   chmod u+w .
1158   $rm conftest*
1159   # SGI C++ compiler will create directory out/ii_files/ for
1160   # template instantiation
1161   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1162   $rm out/* && rmdir out
1163   cd ..
1164   rmdir conftest
1165   $rm conftest*
1166])
1167])# AC_LIBTOOL_PROG_CC_C_O
1168
1169
1170# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1171# -----------------------------------------
1172# Check to see if we can do hard links to lock some files if needed
1173AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1174[AC_REQUIRE([_LT_AC_LOCK])dnl
1175
1176hard_links="nottested"
1177if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1178  # do not overwrite the value of need_locks provided by the user
1179  AC_MSG_CHECKING([if we can lock with hard links])
1180  hard_links=yes
1181  $rm conftest*
1182  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1183  touch conftest.a
1184  ln conftest.a conftest.b 2>&5 || hard_links=no
1185  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1186  AC_MSG_RESULT([$hard_links])
1187  if test "$hard_links" = no; then
1188    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1189    need_locks=warn
1190  fi
1191else
1192  need_locks=no
1193fi
1194])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1195
1196
1197# AC_LIBTOOL_OBJDIR
1198# -----------------
1199AC_DEFUN([AC_LIBTOOL_OBJDIR],
1200[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1201[rm -f .libs 2>/dev/null
1202mkdir .libs 2>/dev/null
1203if test -d .libs; then
1204  lt_cv_objdir=.libs
1205else
1206  # MS-DOS does not allow filenames that begin with a dot.
1207  lt_cv_objdir=_libs
1208fi
1209rmdir .libs 2>/dev/null])
1210objdir=$lt_cv_objdir
1211])# AC_LIBTOOL_OBJDIR
1212
1213
1214# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1215# ----------------------------------------------
1216# Check hardcoding attributes.
1217AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1218[AC_MSG_CHECKING([how to hardcode library paths into programs])
1219_LT_AC_TAGVAR(hardcode_action, $1)=
1220if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1221   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1222   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1223
1224  # We can hardcode non-existant directories.
1225  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1226     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1227     # have to relink, otherwise we might link with an installed library
1228     # when we should be linking with a yet-to-be-installed one
1229     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1230     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1231    # Linking always hardcodes the temporary library directory.
1232    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1233  else
1234    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1235    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1236  fi
1237else
1238  # We cannot hardcode anything, or else we can only hardcode existing
1239  # directories.
1240  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1241fi
1242AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1243
1244if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1245  # Fast installation is not supported
1246  enable_fast_install=no
1247elif test "$shlibpath_overrides_runpath" = yes ||
1248     test "$enable_shared" = no; then
1249  # Fast installation is not necessary
1250  enable_fast_install=needless
1251fi
1252])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1253
1254
1255# AC_LIBTOOL_SYS_LIB_STRIP
1256# ------------------------
1257AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1258[striplib=
1259old_striplib=
1260AC_MSG_CHECKING([whether stripping libraries is possible])
1261if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1262  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1263  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1264  AC_MSG_RESULT([yes])
1265else
1266# FIXME - insert some real tests, host_os isn't really good enough
1267  case $host_os in
1268   darwin*)
1269       if test -n "$STRIP" ; then
1270         striplib="$STRIP -x"
1271         AC_MSG_RESULT([yes])
1272       else
1273  AC_MSG_RESULT([no])
1274fi
1275       ;;
1276   *)
1277  AC_MSG_RESULT([no])
1278    ;;
1279  esac
1280fi
1281])# AC_LIBTOOL_SYS_LIB_STRIP
1282
1283
1284# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1285# -----------------------------
1286# PORTME Fill in your ld.so characteristics
1287AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1288[AC_MSG_CHECKING([dynamic linker characteristics])
1289library_names_spec=
1290libname_spec='lib$name'
1291soname_spec=
1292shrext=".so"
1293postinstall_cmds=
1294postuninstall_cmds=
1295finish_cmds=
1296finish_eval=
1297shlibpath_var=
1298shlibpath_overrides_runpath=unknown
1299version_type=none
1300dynamic_linker="$host_os ld.so"
1301sys_lib_dlsearch_path_spec="/lib /usr/lib"
1302if test "$GCC" = yes; then
1303  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1304  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1305    # if the path contains ";" then we assume it to be the separator
1306    # otherwise default to the standard path separator (i.e. ":") - it is
1307    # assumed that no part of a normal pathname contains ";" but that should
1308    # okay in the real world where ";" in dirpaths is itself problematic.
1309    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1310  else
1311    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1312  fi
1313else
1314  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1315fi
1316need_lib_prefix=unknown
1317hardcode_into_libs=no
1318
1319# when you set need_version to no, make sure it does not cause -set_version
1320# flags to be left without arguments
1321need_version=unknown
1322
1323case $host_os in
1324aix3*)
1325  version_type=linux
1326  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1327  shlibpath_var=LIBPATH
1328
1329  # AIX 3 has no versioning support, so we append a major version to the name.
1330  soname_spec='${libname}${release}${shared_ext}$major'
1331  ;;
1332
1333aix4* | aix5*)
1334  version_type=linux
1335  need_lib_prefix=no
1336  need_version=no
1337  hardcode_into_libs=yes
1338  if test "$host_cpu" = ia64; then
1339    # AIX 5 supports IA64
1340    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1341    shlibpath_var=LD_LIBRARY_PATH
1342  else
1343    # With GCC up to 2.95.x, collect2 would create an import file
1344    # for dependence libraries.  The import file would start with
1345    # the line `#! .'.  This would cause the generated library to
1346    # depend on `.', always an invalid library.  This was fixed in
1347    # development snapshots of GCC prior to 3.0.
1348    case $host_os in
1349      aix4 | aix4.[[01]] | aix4.[[01]].*)
1350      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1351           echo ' yes '
1352           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1353        :
1354      else
1355        can_build_shared=no
1356      fi
1357      ;;
1358    esac
1359    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1360    # soname into executable. Probably we can add versioning support to
1361    # collect2, so additional links can be useful in future.
1362    if test "$aix_use_runtimelinking" = yes; then
1363      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1364      # instead of lib<name>.a to let people know that these are not
1365      # typical AIX shared libraries.
1366      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1367    else
1368      # We preserve .a as extension for shared libraries through AIX4.2
1369      # and later when we are not doing run time linking.
1370      library_names_spec='${libname}${release}.a $libname.a'
1371      soname_spec='${libname}${release}${shared_ext}$major'
1372    fi
1373    shlibpath_var=LIBPATH
1374  fi
1375  ;;
1376
1377amigaos*)
1378  library_names_spec='$libname.ixlibrary $libname.a'
1379  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1380  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'
1381  ;;
1382
1383beos*)
1384  library_names_spec='${libname}${shared_ext}'
1385  dynamic_linker="$host_os ld.so"
1386  shlibpath_var=LIBRARY_PATH
1387  ;;
1388
1389bsdi4*)
1390  version_type=linux
1391  need_version=no
1392  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1393  soname_spec='${libname}${release}${shared_ext}$major'
1394  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1395  shlibpath_var=LD_LIBRARY_PATH
1396  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1397  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1398  # the default ld.so.conf also contains /usr/contrib/lib and
1399  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1400  # libtool to hard-code these into programs
1401  ;;
1402
1403cygwin* | mingw* | pw32*)
1404  version_type=windows
1405  shrext=".dll"
1406  need_version=no
1407  need_lib_prefix=no
1408
1409  case $GCC,$host_os in
1410  yes,cygwin* | yes,mingw* | yes,pw32*)
1411    library_names_spec='$libname.dll.a'
1412    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1413    postinstall_cmds='base_file=`basename \${file}`~
1414      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1415      dldir=$destdir/`dirname \$dlpath`~
1416      test -d \$dldir || mkdir -p \$dldir~
1417      $install_prog $dir/$dlname \$dldir/$dlname'
1418    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1419      dlpath=$dir/\$dldll~
1420       $rm \$dlpath'
1421    shlibpath_overrides_runpath=yes
1422
1423    case $host_os in
1424    cygwin*)
1425      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1426      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1427      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1428      ;;
1429    mingw*)
1430      # MinGW DLLs use traditional 'lib' prefix
1431      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1432      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1433      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1434        # It is most probably a Windows format PATH printed by
1435        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1436        # path with ; separators, and with drive letters. We can handle the
1437        # drive letters (cygwin fileutils understands them), so leave them,
1438        # especially as we might pass files found there to a mingw objdump,
1439        # which wouldn't understand a cygwinified path. Ahh.
1440        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1441      else
1442        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1443      fi
1444      ;;
1445    pw32*)
1446      # pw32 DLLs use 'pw' prefix rather than 'lib'
1447      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1448      ;;
1449    esac
1450    ;;
1451
1452  *)
1453    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1454    ;;
1455  esac
1456  dynamic_linker='Win32 ld.exe'
1457  # FIXME: first we should search . and the directory the executable is in
1458  shlibpath_var=PATH
1459  ;;
1460
1461darwin* | rhapsody*)
1462  dynamic_linker="$host_os dyld"
1463  version_type=darwin
1464  need_lib_prefix=no
1465  need_version=no
1466  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1467  soname_spec='${libname}${release}${major}$shared_ext'
1468  shlibpath_overrides_runpath=yes
1469  shlibpath_var=DYLD_LIBRARY_PATH
1470  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
1471  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1472  if test "$GCC" = yes; then
1473    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1474  else
1475    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1476  fi
1477  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1478  ;;
1479
1480dgux*)
1481  version_type=linux
1482  need_lib_prefix=no
1483  need_version=no
1484  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1485  soname_spec='${libname}${release}${shared_ext}$major'
1486  shlibpath_var=LD_LIBRARY_PATH
1487  ;;
1488
1489freebsd1*)
1490  dynamic_linker=no
1491  ;;
1492
1493kfreebsd*-gnu)
1494  version_type=linux
1495  need_lib_prefix=no
1496  need_version=no
1497  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1498  soname_spec='${libname}${release}${shared_ext}$major'
1499  shlibpath_var=LD_LIBRARY_PATH
1500  shlibpath_overrides_runpath=no
1501  hardcode_into_libs=yes
1502  dynamic_linker='GNU ld.so'
1503  ;;
1504
1505freebsd*)
1506  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1507  version_type=freebsd-$objformat
1508  case $version_type in
1509    freebsd-elf*)
1510      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1511      need_version=no
1512      need_lib_prefix=no
1513      ;;
1514    freebsd-*)
1515      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1516      need_version=yes
1517      ;;
1518  esac
1519  shlibpath_var=LD_LIBRARY_PATH
1520  case $host_os in
1521  freebsd2*)
1522    shlibpath_overrides_runpath=yes
1523    ;;
1524  freebsd3.[01]* | freebsdelf3.[01]*)
1525    shlibpath_overrides_runpath=yes
1526    hardcode_into_libs=yes
1527    ;;
1528  *) # from 3.2 on
1529    shlibpath_overrides_runpath=no
1530    hardcode_into_libs=yes
1531    ;;
1532  esac
1533  ;;
1534
1535gnu*)
1536  version_type=linux
1537  need_lib_prefix=no
1538  need_version=no
1539  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1540  soname_spec='${libname}${release}${shared_ext}$major'
1541  shlibpath_var=LD_LIBRARY_PATH
1542  hardcode_into_libs=yes
1543  ;;
1544
1545hpux9* | hpux10* | hpux11*)
1546  # Give a soname corresponding to the major version so that dld.sl refuses to
1547  # link against other versions.
1548  version_type=sunos
1549  need_lib_prefix=no
1550  need_version=no
1551  case "$host_cpu" in
1552  ia64*)
1553    shrext='.so'
1554    hardcode_into_libs=yes
1555    dynamic_linker="$host_os dld.so"
1556    shlibpath_var=LD_LIBRARY_PATH
1557    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1558    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1559    soname_spec='${libname}${release}${shared_ext}$major'
1560    if test "X$HPUX_IA64_MODE" = X32; then
1561      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1562    else
1563      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1564    fi
1565    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1566    ;;
1567   hppa*64*)
1568     shrext='.sl'
1569     hardcode_into_libs=yes
1570     dynamic_linker="$host_os dld.sl"
1571     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1572     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1573     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1574     soname_spec='${libname}${release}${shared_ext}$major'
1575     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1576     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1577     ;;
1578   *)
1579    shrext='.sl'
1580    dynamic_linker="$host_os dld.sl"
1581    shlibpath_var=SHLIB_PATH
1582    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1583    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1584    soname_spec='${libname}${release}${shared_ext}$major'
1585    ;;
1586  esac
1587  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1588  postinstall_cmds='chmod 555 $lib'
1589  ;;
1590
1591irix5* | irix6* | nonstopux*)
1592  case $host_os in
1593    nonstopux*) version_type=nonstopux ;;
1594    *)
1595        if test "$lt_cv_prog_gnu_ld" = yes; then
1596                version_type=linux
1597        else
1598                version_type=irix
1599        fi ;;
1600  esac
1601  need_lib_prefix=no
1602  need_version=no
1603  soname_spec='${libname}${release}${shared_ext}$major'
1604  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1605  case $host_os in
1606  irix5* | nonstopux*)
1607    libsuff= shlibsuff=
1608    ;;
1609  *)
1610    case $LD in # libtool.m4 will add one of these switches to LD
1611    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1612      libsuff= shlibsuff= libmagic=32-bit;;
1613    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1614      libsuff=32 shlibsuff=N32 libmagic=N32;;
1615    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1616      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1617    *) libsuff= shlibsuff= libmagic=never-match;;
1618    esac
1619    ;;
1620  esac
1621  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1622  shlibpath_overrides_runpath=no
1623  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1624  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1625  hardcode_into_libs=yes
1626  ;;
1627
1628# No shared lib support for Linux oldld, aout, or coff.
1629linux*oldld* | linux*aout* | linux*coff*)
1630  dynamic_linker=no
1631  ;;
1632
1633# This must be Linux ELF.
1634linux*)
1635  version_type=linux
1636  need_lib_prefix=no
1637  need_version=no
1638  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1639  soname_spec='${libname}${release}${shared_ext}$major'
1640  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1641  shlibpath_var=LD_LIBRARY_PATH
1642  shlibpath_overrides_runpath=no
1643  # This implies no fast_install, which is unacceptable.
1644  # Some rework will be needed to allow for fast_install
1645  # before this can be enabled.
1646  hardcode_into_libs=yes
1647
1648  # Append ld.so.conf contents to the search path
1649  if test -f /etc/ld.so.conf; then
1650    ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf`
1651    sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra"
1652  fi
1653
1654  # We used to test for /lib/ld.so.1 and disable shared libraries on
1655  # powerpc, because MkLinux only supported shared libraries with the
1656  # GNU dynamic linker.  Since this was broken with cross compilers,
1657  # most powerpc-linux boxes support dynamic linking these days and
1658  # people can always --disable-shared, the test was removed, and we
1659  # assume the GNU/Linux dynamic linker is in use.
1660  dynamic_linker='GNU/Linux ld.so'
1661  ;;
1662
1663knetbsd*-gnu)
1664  version_type=linux
1665  need_lib_prefix=no
1666  need_version=no
1667  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1668  soname_spec='${libname}${release}${shared_ext}$major'
1669  shlibpath_var=LD_LIBRARY_PATH
1670  shlibpath_overrides_runpath=no
1671  hardcode_into_libs=yes
1672  dynamic_linker='GNU ld.so'
1673  ;;
1674
1675netbsd*)
1676  version_type=sunos
1677  need_lib_prefix=no
1678  need_version=no
1679  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1680    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1681    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1682    dynamic_linker='NetBSD (a.out) ld.so'
1683  else
1684    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1685    soname_spec='${libname}${release}${shared_ext}$major'
1686    dynamic_linker='NetBSD ld.elf_so'
1687  fi
1688  shlibpath_var=LD_LIBRARY_PATH
1689  shlibpath_overrides_runpath=yes
1690  hardcode_into_libs=yes
1691  ;;
1692
1693newsos6)
1694  version_type=linux
1695  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1696  shlibpath_var=LD_LIBRARY_PATH
1697  shlibpath_overrides_runpath=yes
1698  ;;
1699
1700nto-qnx*)
1701  version_type=linux
1702  need_lib_prefix=no
1703  need_version=no
1704  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1705  soname_spec='${libname}${release}${shared_ext}$major'
1706  shlibpath_var=LD_LIBRARY_PATH
1707  shlibpath_overrides_runpath=yes
1708  ;;
1709
1710openbsd*)
1711  version_type=sunos
1712  need_lib_prefix=no
1713  need_version=yes
1714  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1715  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1716  shlibpath_var=LD_LIBRARY_PATH
1717  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1718    case $host_os in
1719      openbsd2.[[89]] | openbsd2.[[89]].*)
1720        shlibpath_overrides_runpath=no
1721        ;;
1722      *)
1723        shlibpath_overrides_runpath=yes
1724        ;;
1725      esac
1726  else
1727    shlibpath_overrides_runpath=yes
1728  fi
1729  ;;
1730
1731os2*)
1732  libname_spec='$name'
1733  shrext=".dll"
1734  need_lib_prefix=no
1735  library_names_spec='$libname${shared_ext} $libname.a'
1736  dynamic_linker='OS/2 ld.exe'
1737  shlibpath_var=LIBPATH
1738  ;;
1739
1740osf3* | osf4* | osf5*)
1741  version_type=osf
1742  need_lib_prefix=no
1743  need_version=no
1744  soname_spec='${libname}${release}${shared_ext}$major'
1745  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1746  shlibpath_var=LD_LIBRARY_PATH
1747  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1748  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1749  ;;
1750
1751sco3.2v5*)
1752  version_type=osf
1753  soname_spec='${libname}${release}${shared_ext}$major'
1754  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1755  shlibpath_var=LD_LIBRARY_PATH
1756  ;;
1757
1758solaris*)
1759  version_type=linux
1760  need_lib_prefix=no
1761  need_version=no
1762  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1763  soname_spec='${libname}${release}${shared_ext}$major'
1764  shlibpath_var=LD_LIBRARY_PATH
1765  shlibpath_overrides_runpath=yes
1766  hardcode_into_libs=yes
1767  # ldd complains unless libraries are executable
1768  postinstall_cmds='chmod +x $lib'
1769  ;;
1770
1771sunos4*)
1772  version_type=sunos
1773  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1774  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1775  shlibpath_var=LD_LIBRARY_PATH
1776  shlibpath_overrides_runpath=yes
1777  if test "$with_gnu_ld" = yes; then
1778    need_lib_prefix=no
1779  fi
1780  need_version=yes
1781  ;;
1782
1783sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1784  version_type=linux
1785  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1786  soname_spec='${libname}${release}${shared_ext}$major'
1787  shlibpath_var=LD_LIBRARY_PATH
1788  case $host_vendor in
1789    sni)
1790      shlibpath_overrides_runpath=no
1791      need_lib_prefix=no
1792      export_dynamic_flag_spec='${wl}-Blargedynsym'
1793      runpath_var=LD_RUN_PATH
1794      ;;
1795    siemens)
1796      need_lib_prefix=no
1797      ;;
1798    motorola)
1799      need_lib_prefix=no
1800      need_version=no
1801      shlibpath_overrides_runpath=no
1802      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1803      ;;
1804  esac
1805  ;;
1806
1807sysv4*MP*)
1808  if test -d /usr/nec ;then
1809    version_type=linux
1810    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1811    soname_spec='$libname${shared_ext}.$major'
1812    shlibpath_var=LD_LIBRARY_PATH
1813  fi
1814  ;;
1815
1816uts4*)
1817  version_type=linux
1818  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1819  soname_spec='${libname}${release}${shared_ext}$major'
1820  shlibpath_var=LD_LIBRARY_PATH
1821  ;;
1822
1823*)
1824  dynamic_linker=no
1825  ;;
1826esac
1827AC_MSG_RESULT([$dynamic_linker])
1828test "$dynamic_linker" = no && can_build_shared=no
1829])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1830
1831
1832# _LT_AC_TAGCONFIG
1833# ----------------
1834AC_DEFUN([_LT_AC_TAGCONFIG],
1835[AC_ARG_WITH([tags],
1836    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1837        [include additional configurations @<:@automatic@:>@])],
1838    [tagnames="$withval"])
1839
1840if test -f "$ltmain" && test -n "$tagnames"; then
1841  if test ! -f "${ofile}"; then
1842    AC_MSG_WARN([output file `$ofile' does not exist])
1843  fi
1844
1845  if test -z "$LTCC"; then
1846    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1847    if test -z "$LTCC"; then
1848      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1849    else
1850      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1851    fi
1852  fi
1853
1854  # Extract list of available tagged configurations in $ofile.
1855  # Note that this assumes the entire list is on one line.
1856  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1857
1858  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1859  for tagname in $tagnames; do
1860    IFS="$lt_save_ifs"
1861    # Check whether tagname contains only valid characters
1862    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1863    "") ;;
1864    *)  AC_MSG_ERROR([invalid tag name: $tagname])
1865        ;;
1866    esac
1867
1868    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1869    then
1870      AC_MSG_ERROR([tag name \"$tagname\" already exists])
1871    fi
1872
1873    # Update the list of available tags.
1874    if test -n "$tagname"; then
1875      echo appending configuration tag \"$tagname\" to $ofile
1876
1877      case $tagname in
1878      CXX)
1879        if test -n "$CXX" && test "X$CXX" != "Xno"; then
1880          AC_LIBTOOL_LANG_CXX_CONFIG
1881        else
1882          tagname=""
1883        fi
1884        ;;
1885
1886      F77)
1887        if test -n "$F77" && test "X$F77" != "Xno"; then
1888          AC_LIBTOOL_LANG_F77_CONFIG
1889        else
1890          tagname=""
1891        fi
1892        ;;
1893
1894      GCJ)
1895        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1896          AC_LIBTOOL_LANG_GCJ_CONFIG
1897        else
1898          tagname=""
1899        fi
1900        ;;
1901
1902      RC)
1903        AC_LIBTOOL_LANG_RC_CONFIG
1904        ;;
1905
1906      *)
1907        AC_MSG_ERROR([Unsupported tag name: $tagname])
1908        ;;
1909      esac
1910
1911      # Append the new tag name to the list of available tags.
1912      if test -n "$tagname" ; then
1913      available_tags="$available_tags $tagname"
1914    fi
1915    fi
1916  done
1917  IFS="$lt_save_ifs"
1918
1919  # Now substitute the updated list of available tags.
1920  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1921    mv "${ofile}T" "$ofile"
1922    chmod +x "$ofile"
1923  else
1924    rm -f "${ofile}T"
1925    AC_MSG_ERROR([unable to update list of available tagged configurations.])
1926  fi
1927fi
1928])# _LT_AC_TAGCONFIG
1929
1930
1931# AC_LIBTOOL_DLOPEN
1932# -----------------
1933# enable checks for dlopen support
1934AC_DEFUN([AC_LIBTOOL_DLOPEN],
1935 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1936])# AC_LIBTOOL_DLOPEN
1937
1938
1939# AC_LIBTOOL_WIN32_DLL
1940# --------------------
1941# declare package support for building win32 dll's
1942AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1943[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1944])# AC_LIBTOOL_WIN32_DLL
1945
1946
1947# AC_ENABLE_SHARED([DEFAULT])
1948# ---------------------------
1949# implement the --enable-shared flag
1950# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1951AC_DEFUN([AC_ENABLE_SHARED],
1952[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1953AC_ARG_ENABLE([shared],
1954    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1955        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1956    [p=${PACKAGE-default}
1957    case $enableval in
1958    yes) enable_shared=yes ;;
1959    no) enable_shared=no ;;
1960    *)
1961      enable_shared=no
1962      # Look at the argument we got.  We use all the common list separators.
1963      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1964      for pkg in $enableval; do
1965        IFS="$lt_save_ifs"
1966        if test "X$pkg" = "X$p"; then
1967          enable_shared=yes
1968        fi
1969      done
1970      IFS="$lt_save_ifs"
1971      ;;
1972    esac],
1973    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1974])# AC_ENABLE_SHARED
1975
1976
1977# AC_DISABLE_SHARED
1978# -----------------
1979#- set the default shared flag to --disable-shared
1980AC_DEFUN([AC_DISABLE_SHARED],
1981[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1982AC_ENABLE_SHARED(no)
1983])# AC_DISABLE_SHARED
1984
1985
1986# AC_ENABLE_STATIC([DEFAULT])
1987# ---------------------------
1988# implement the --enable-static flag
1989# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1990AC_DEFUN([AC_ENABLE_STATIC],
1991[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1992AC_ARG_ENABLE([static],
1993    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1994        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1995    [p=${PACKAGE-default}
1996    case $enableval in
1997    yes) enable_static=yes ;;
1998    no) enable_static=no ;;
1999    *)
2000     enable_static=no
2001      # Look at the argument we got.  We use all the common list separators.
2002      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2003      for pkg in $enableval; do
2004        IFS="$lt_save_ifs"
2005        if test "X$pkg" = "X$p"; then
2006          enable_static=yes
2007        fi
2008      done
2009      IFS="$lt_save_ifs"
2010      ;;
2011    esac],
2012    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2013])# AC_ENABLE_STATIC
2014
2015
2016# AC_DISABLE_STATIC
2017# -----------------
2018# set the default static flag to --disable-static
2019AC_DEFUN([AC_DISABLE_STATIC],
2020[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2021AC_ENABLE_STATIC(no)
2022])# AC_DISABLE_STATIC
2023
2024
2025# AC_ENABLE_FAST_INSTALL([DEFAULT])
2026# ---------------------------------
2027# implement the --enable-fast-install flag
2028# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2029AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2030[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2031AC_ARG_ENABLE([fast-install],
2032    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2033    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2034    [p=${PACKAGE-default}
2035    case $enableval in
2036    yes) enable_fast_install=yes ;;
2037    no) enable_fast_install=no ;;
2038    *)
2039      enable_fast_install=no
2040      # Look at the argument we got.  We use all the common list separators.
2041      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2042      for pkg in $enableval; do
2043        IFS="$lt_save_ifs"
2044        if test "X$pkg" = "X$p"; then
2045          enable_fast_install=yes
2046        fi
2047      done
2048      IFS="$lt_save_ifs"
2049      ;;
2050    esac],
2051    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2052])# AC_ENABLE_FAST_INSTALL
2053
2054
2055# AC_DISABLE_FAST_INSTALL
2056# -----------------------
2057# set the default to --disable-fast-install
2058AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2059[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2060AC_ENABLE_FAST_INSTALL(no)
2061])# AC_DISABLE_FAST_INSTALL
2062
2063
2064# AC_LIBTOOL_PICMODE([MODE])
2065# --------------------------
2066# implement the --with-pic flag
2067# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2068AC_DEFUN([AC_LIBTOOL_PICMODE],
2069[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2070pic_mode=ifelse($#,1,$1,default)
2071])# AC_LIBTOOL_PICMODE
2072
2073
2074# AC_PROG_EGREP
2075# -------------
2076# This is predefined starting with Autoconf 2.54, so this conditional
2077# definition can be removed once we require Autoconf 2.54 or later.
2078m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2079[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2080   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2081    then ac_cv_prog_egrep='grep -E'
2082    else ac_cv_prog_egrep='egrep'
2083    fi])
2084 EGREP=$ac_cv_prog_egrep
2085 AC_SUBST([EGREP])
2086])])
2087
2088
2089# AC_PATH_TOOL_PREFIX
2090# -------------------
2091# find a file program which can recognise shared library
2092AC_DEFUN([AC_PATH_TOOL_PREFIX],
2093[AC_REQUIRE([AC_PROG_EGREP])dnl
2094AC_MSG_CHECKING([for $1])
2095AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2096[case $MAGIC_CMD in
2097[[\\/*] |  ?:[\\/]*])
2098  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2099  ;;
2100*)
2101  lt_save_MAGIC_CMD="$MAGIC_CMD"
2102  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2103dnl $ac_dummy forces splitting on constant user-supplied paths.
2104dnl POSIX.2 word splitting is done only on the output of word expansions,
2105dnl not every word.  This closes a longstanding sh security hole.
2106  ac_dummy="ifelse([$2], , $PATH, [$2])"
2107  for ac_dir in $ac_dummy; do
2108    IFS="$lt_save_ifs"
2109    test -z "$ac_dir" && ac_dir=.
2110    if test -f $ac_dir/$1; then
2111      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2112      if test -n "$file_magic_test_file"; then
2113        case $deplibs_check_method in
2114        "file_magic "*)
2115          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2116          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2117          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2118            $EGREP "$file_magic_regex" > /dev/null; then
2119            :
2120          else
2121            cat <<EOF 1>&2
2122
2123*** Warning: the command libtool uses to detect shared libraries,
2124*** $file_magic_cmd, produces output that libtool cannot recognize.
2125*** The result is that libtool may fail to recognize shared libraries
2126*** as such.  This will affect the creation of libtool libraries that
2127*** depend on shared libraries, but programs linked with such libtool
2128*** libraries will work regardless of this problem.  Nevertheless, you
2129*** may want to report the problem to your system manager and/or to
2130*** bug-libtool@gnu.org
2131
2132EOF
2133          fi ;;
2134        esac
2135      fi
2136      break
2137    fi
2138  done
2139  IFS="$lt_save_ifs"
2140  MAGIC_CMD="$lt_save_MAGIC_CMD"
2141  ;;
2142esac])
2143MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2144if test -n "$MAGIC_CMD"; then
2145  AC_MSG_RESULT($MAGIC_CMD)
2146else
2147  AC_MSG_RESULT(no)
2148fi
2149])# AC_PATH_TOOL_PREFIX
2150
2151
2152# AC_PATH_MAGIC
2153# -------------
2154# find a file program which can recognise a shared library
2155AC_DEFUN([AC_PATH_MAGIC],
2156[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2157if test -z "$lt_cv_path_MAGIC_CMD"; then
2158  if test -n "$ac_tool_prefix"; then
2159    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2160  else
2161    MAGIC_CMD=:
2162  fi
2163fi
2164])# AC_PATH_MAGIC
2165
2166
2167# AC_PROG_LD
2168# ----------
2169# find the pathname to the GNU or non-GNU linker
2170AC_DEFUN([AC_PROG_LD],
2171[AC_ARG_WITH([gnu-ld],
2172    [AC_HELP_STRING([--with-gnu-ld],
2173        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2174    [test "$withval" = no || with_gnu_ld=yes],
2175    [with_gnu_ld=no])
2176AC_REQUIRE([LT_AC_PROG_SED])dnl
2177AC_REQUIRE([AC_PROG_CC])dnl
2178AC_REQUIRE([AC_CANONICAL_HOST])dnl
2179AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2180ac_prog=ld
2181if test "$GCC" = yes; then
2182  # Check if gcc -print-prog-name=ld gives a path.
2183  AC_MSG_CHECKING([for ld used by $CC])
2184  case $host in
2185  *-*-mingw*)
2186    # gcc leaves a trailing carriage return which upsets mingw
2187    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2188  *)
2189    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2190  esac
2191  case $ac_prog in
2192    # Accept absolute paths.
2193    [[\\/]]* | ?:[[\\/]]*)
2194      re_direlt='/[[^/]][[^/]]*/\.\./'
2195      # Canonicalize the pathname of ld
2196      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2197      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2198        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2199      done
2200      test -z "$LD" && LD="$ac_prog"
2201      ;;
2202  "")
2203    # If it fails, then pretend we aren't using GCC.
2204    ac_prog=ld
2205    ;;
2206  *)
2207    # If it is relative, then search for the first ld in PATH.
2208    with_gnu_ld=unknown
2209    ;;
2210  esac
2211elif test "$with_gnu_ld" = yes; then
2212  AC_MSG_CHECKING([for GNU ld])
2213else
2214  AC_MSG_CHECKING([for non-GNU ld])
2215fi
2216AC_CACHE_VAL(lt_cv_path_LD,
2217[if test -z "$LD"; then
2218  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2219  for ac_dir in $PATH; do
2220    IFS="$lt_save_ifs"
2221    test -z "$ac_dir" && ac_dir=.
2222    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2223      lt_cv_path_LD="$ac_dir/$ac_prog"
2224      # Check to see if the program is GNU ld.  I'd rather use --version,
2225      # but apparently some GNU ld's only accept -v.
2226      # Break only if it was the GNU/non-GNU ld that we prefer.
2227      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2228      *GNU* | *'with BFD'*)
2229        test "$with_gnu_ld" != no && break
2230        ;;
2231      *)
2232        test "$with_gnu_ld" != yes && break
2233        ;;
2234      esac
2235    fi
2236  done
2237  IFS="$lt_save_ifs"
2238else
2239  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2240fi])
2241LD="$lt_cv_path_LD"
2242if test -n "$LD"; then
2243  AC_MSG_RESULT($LD)
2244else
2245  AC_MSG_RESULT(no)
2246fi
2247test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2248AC_PROG_LD_GNU
2249])# AC_PROG_LD
2250
2251
2252# AC_PROG_LD_GNU
2253# --------------
2254AC_DEFUN([AC_PROG_LD_GNU],
2255[AC_REQUIRE([AC_PROG_EGREP])dnl
2256AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2257[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2258case `$LD -v 2>&1 </dev/null` in
2259*GNU* | *'with BFD'*)
2260  lt_cv_prog_gnu_ld=yes
2261  ;;
2262*)
2263  lt_cv_prog_gnu_ld=no
2264  ;;
2265esac])
2266with_gnu_ld=$lt_cv_prog_gnu_ld
2267])# AC_PROG_LD_GNU
2268
2269
2270# AC_PROG_LD_RELOAD_FLAG
2271# ----------------------
2272# find reload flag for linker
2273#   -- PORTME Some linkers may need a different reload flag.
2274AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2275[AC_CACHE_CHECK([for $LD option to reload object files],
2276  lt_cv_ld_reload_flag,
2277  [lt_cv_ld_reload_flag='-r'])
2278reload_flag=$lt_cv_ld_reload_flag
2279case $reload_flag in
2280"" | " "*) ;;
2281*) reload_flag=" $reload_flag" ;;
2282esac
2283reload_cmds='$LD$reload_flag -o $output$reload_objs'
2284])# AC_PROG_LD_RELOAD_FLAG
2285
2286
2287# AC_DEPLIBS_CHECK_METHOD
2288# -----------------------
2289# how to check for library dependencies
2290#  -- PORTME fill in with the dynamic library characteristics
2291AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2292[AC_CACHE_CHECK([how to recognise dependent libraries],
2293lt_cv_deplibs_check_method,
2294[lt_cv_file_magic_cmd='$MAGIC_CMD'
2295lt_cv_file_magic_test_file=
2296lt_cv_deplibs_check_method='unknown'
2297# Need to set the preceding variable on all platforms that support
2298# interlibrary dependencies.
2299# 'none' -- dependencies not supported.
2300# `unknown' -- same as none, but documents that we really don't know.
2301# 'pass_all' -- all dependencies passed with no checks.
2302# 'test_compile' -- check by making test program.
2303# 'file_magic [[regex]]' -- check by looking for files in library path
2304# which responds to the $file_magic_cmd with a given extended regex.
2305# If you have `file' or equivalent on your system and you're not sure
2306# whether `pass_all' will *always* work, you probably want this one.
2307
2308case $host_os in
2309aix4* | aix5*)
2310  lt_cv_deplibs_check_method=pass_all
2311  ;;
2312
2313beos*)
2314  lt_cv_deplibs_check_method=pass_all
2315  ;;
2316
2317bsdi4*)
2318  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2319  lt_cv_file_magic_cmd='/usr/bin/file -L'
2320  lt_cv_file_magic_test_file=/shlib/libc.so
2321  ;;
2322
2323cygwin*)
2324  # win32_libid is a shell function defined in ltmain.sh
2325  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2326  lt_cv_file_magic_cmd='win32_libid'
2327  ;;
2328
2329mingw* | pw32*)
2330  # Base MSYS/MinGW do not provide the 'file' command needed by
2331  # win32_libid shell function, so use a weaker test based on 'objdump'.
2332  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2333  lt_cv_file_magic_cmd='$OBJDUMP -f'
2334  ;;
2335
2336darwin* | rhapsody*)
2337  lt_cv_deplibs_check_method=pass_all
2338  ;;
2339
2340freebsd* | kfreebsd*-gnu)
2341  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2342    case $host_cpu in
2343    i*86 )
2344      # Not sure whether the presence of OpenBSD here was a mistake.
2345      # Let's accept both of them until this is cleared up.
2346      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2347      lt_cv_file_magic_cmd=/usr/bin/file
2348      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2349      ;;
2350    esac
2351  else
2352    lt_cv_deplibs_check_method=pass_all
2353  fi
2354  ;;
2355
2356gnu*)
2357  lt_cv_deplibs_check_method=pass_all
2358  ;;
2359
2360hpux10.20* | hpux11*)
2361  lt_cv_file_magic_cmd=/usr/bin/file
2362  case "$host_cpu" in
2363  ia64*)
2364    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2365    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2366    ;;
2367  hppa*64*)
2368    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2369    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2370    ;;
2371  *)
2372    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2373    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2374    ;;
2375  esac
2376  ;;
2377
2378irix5* | irix6* | nonstopux*)
2379  case $LD in
2380  *-32|*"-32 ") libmagic=32-bit;;
2381  *-n32|*"-n32 ") libmagic=N32;;
2382  *-64|*"-64 ") libmagic=64-bit;;
2383  *) libmagic=never-match;;
2384  esac
2385  lt_cv_deplibs_check_method=pass_all
2386  ;;
2387
2388# This must be Linux ELF.
2389linux*)
2390  case $host_cpu in
2391  alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64)
2392    lt_cv_deplibs_check_method=pass_all ;;
2393  *)
2394    # glibc up to 2.1.1 does not perform some relocations on ARM
2395    # this will be overridden with pass_all, but let us keep it just in case
2396    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2397  esac
2398  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2399  lt_cv_deplibs_check_method=pass_all
2400  ;;
2401
2402netbsd*)
2403  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2404    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2405  else
2406    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2407  fi
2408  ;;
2409
2410newos6*)
2411  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2412  lt_cv_file_magic_cmd=/usr/bin/file
2413  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2414  ;;
2415
2416nto-qnx*)
2417  lt_cv_deplibs_check_method=unknown
2418  ;;
2419
2420openbsd*)
2421  lt_cv_file_magic_cmd=/usr/bin/file
2422  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2423  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2424    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2425  else
2426    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2427  fi
2428  ;;
2429
2430osf3* | osf4* | osf5*)
2431  lt_cv_deplibs_check_method=pass_all
2432  ;;
2433
2434sco3.2v5*)
2435  lt_cv_deplibs_check_method=pass_all
2436  ;;
2437
2438solaris*)
2439  lt_cv_deplibs_check_method=pass_all
2440  ;;
2441
2442sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2443  case $host_vendor in
2444  motorola)
2445    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]]'
2446    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2447    ;;
2448  ncr)
2449    lt_cv_deplibs_check_method=pass_all
2450    ;;
2451  sequent)
2452    lt_cv_file_magic_cmd='/bin/file'
2453    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2454    ;;
2455  sni)
2456    lt_cv_file_magic_cmd='/bin/file'
2457    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2458    lt_cv_file_magic_test_file=/lib/libc.so
2459    ;;
2460  siemens)
2461    lt_cv_deplibs_check_method=pass_all
2462    ;;
2463  esac
2464  ;;
2465
2466sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2467  lt_cv_deplibs_check_method=pass_all
2468  ;;
2469esac
2470])
2471file_magic_cmd=$lt_cv_file_magic_cmd
2472deplibs_check_method=$lt_cv_deplibs_check_method
2473test -z "$deplibs_check_method" && deplibs_check_method=unknown
2474])# AC_DEPLIBS_CHECK_METHOD
2475
2476
2477# AC_PROG_NM
2478# ----------
2479# find the pathname to a BSD-compatible name lister
2480AC_DEFUN([AC_PROG_NM],
2481[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2482[if test -n "$NM"; then
2483  # Let the user override the test.
2484  lt_cv_path_NM="$NM"
2485else
2486  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2487  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2488    IFS="$lt_save_ifs"
2489    test -z "$ac_dir" && ac_dir=.
2490    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2491    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2492      # Check to see if the nm accepts a BSD-compat flag.
2493      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2494      #   nm: unknown option "B" ignored
2495      # Tru64's nm complains that /dev/null is an invalid object file
2496      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2497      */dev/null* | *'Invalid file or object type'*)
2498        lt_cv_path_NM="$tmp_nm -B"
2499        break
2500        ;;
2501      *)
2502        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2503        */dev/null*)
2504          lt_cv_path_NM="$tmp_nm -p"
2505          break
2506          ;;
2507        *)
2508          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2509          continue # so that we can try to find one that supports BSD flags
2510          ;;
2511        esac
2512      esac
2513    fi
2514  done
2515  IFS="$lt_save_ifs"
2516  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2517fi])
2518NM="$lt_cv_path_NM"
2519])# AC_PROG_NM
2520
2521
2522# AC_CHECK_LIBM
2523# -------------
2524# check for math library
2525AC_DEFUN([AC_CHECK_LIBM],
2526[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2527LIBM=
2528case $host in
2529*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2530  # These system don't have libm, or don't need it
2531  ;;
2532*-ncr-sysv4.3*)
2533  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2534  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2535  ;;
2536*)
2537  AC_CHECK_LIB(m, cos, LIBM="-lm")
2538  ;;
2539esac
2540])# AC_CHECK_LIBM
2541
2542
2543# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2544# -----------------------------------
2545# sets LIBLTDL to the link flags for the libltdl convenience library and
2546# LTDLINCL to the include flags for the libltdl header and adds
2547# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
2548# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2549# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
2550# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2551# '${top_srcdir}/' (note the single quotes!).  If your package is not
2552# flat and you're not using automake, define top_builddir and
2553# top_srcdir appropriately in the Makefiles.
2554AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2555[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2556  case $enable_ltdl_convenience in
2557  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2558  "") enable_ltdl_convenience=yes
2559      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2560  esac
2561  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2562  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2563  # For backwards non-gettext consistent compatibility...
2564  INCLTDL="$LTDLINCL"
2565])# AC_LIBLTDL_CONVENIENCE
2566
2567
2568# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2569# -----------------------------------
2570# sets LIBLTDL to the link flags for the libltdl installable library and
2571# LTDLINCL to the include flags for the libltdl header and adds
2572# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
2573# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2574# DIRECTORY is not provided and an installed libltdl is not found, it is
2575# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
2576# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2577# quotes!).  If your package is not flat and you're not using automake,
2578# define top_builddir and top_srcdir appropriately in the Makefiles.
2579# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2580AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2581[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2582  AC_CHECK_LIB(ltdl, lt_dlinit,
2583  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2584  [if test x"$enable_ltdl_install" = xno; then
2585     AC_MSG_WARN([libltdl not installed, but installation disabled])
2586   else
2587     enable_ltdl_install=yes
2588   fi
2589  ])
2590  if test x"$enable_ltdl_install" = x"yes"; then
2591    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2592    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2593    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2594  else
2595    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2596    LIBLTDL="-lltdl"
2597    LTDLINCL=
2598  fi
2599  # For backwards non-gettext consistent compatibility...
2600  INCLTDL="$LTDLINCL"
2601])# AC_LIBLTDL_INSTALLABLE
2602
2603
2604# AC_LIBTOOL_CXX
2605# --------------
2606# enable support for C++ libraries
2607AC_DEFUN([AC_LIBTOOL_CXX],
2608[AC_REQUIRE([_LT_AC_LANG_CXX])
2609])# AC_LIBTOOL_CXX
2610
2611
2612# _LT_AC_LANG_CXX
2613# ---------------
2614AC_DEFUN([_LT_AC_LANG_CXX],
2615[AC_REQUIRE([AC_PROG_CXX])
2616AC_REQUIRE([AC_PROG_CXXCPP])
2617_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2618])# _LT_AC_LANG_CXX
2619
2620
2621# AC_LIBTOOL_F77
2622# --------------
2623# enable support for Fortran 77 libraries
2624AC_DEFUN([AC_LIBTOOL_F77],
2625[AC_REQUIRE([_LT_AC_LANG_F77])
2626])# AC_LIBTOOL_F77
2627
2628
2629# _LT_AC_LANG_F77
2630# ---------------
2631AC_DEFUN([_LT_AC_LANG_F77],
2632[AC_REQUIRE([AC_PROG_F77])
2633_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2634])# _LT_AC_LANG_F77
2635
2636
2637# AC_LIBTOOL_GCJ
2638# --------------
2639# enable support for GCJ libraries
2640AC_DEFUN([AC_LIBTOOL_GCJ],
2641[AC_REQUIRE([_LT_AC_LANG_GCJ])
2642])# AC_LIBTOOL_GCJ
2643
2644
2645# _LT_AC_LANG_GCJ
2646# ---------------
2647AC_DEFUN([_LT_AC_LANG_GCJ],
2648[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2649  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2650    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2651      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2652         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2653           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2654_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2655])# _LT_AC_LANG_GCJ
2656
2657
2658# AC_LIBTOOL_RC
2659# --------------
2660# enable support for Windows resource files
2661AC_DEFUN([AC_LIBTOOL_RC],
2662[AC_REQUIRE([LT_AC_PROG_RC])
2663_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2664])# AC_LIBTOOL_RC
2665
2666
2667# AC_LIBTOOL_LANG_C_CONFIG
2668# ------------------------
2669# Ensure that the configuration vars for the C compiler are
2670# suitably defined.  Those variables are subsequently used by
2671# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2672AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2673AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2674[lt_save_CC="$CC"
2675AC_LANG_PUSH(C)
2676
2677# Source file extension for C test sources.
2678ac_ext=c
2679
2680# Object file extension for compiled C test sources.
2681objext=o
2682_LT_AC_TAGVAR(objext, $1)=$objext
2683
2684# Code to be used in simple compile tests
2685lt_simple_compile_test_code="int some_variable = 0;\n"
2686
2687# Code to be used in simple link tests
2688lt_simple_link_test_code='int main(){return(0);}\n'
2689
2690_LT_AC_SYS_COMPILER
2691
2692#
2693# Check for any special shared library compilation flags.
2694#
2695_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2696if test "$GCC" = no; then
2697  case $host_os in
2698  sco3.2v5*)
2699    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2700    ;;
2701  esac
2702fi
2703if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2704  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2705  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
2706  else
2707    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2708    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2709  fi
2710fi
2711
2712
2713#
2714# Check to make sure the static flag actually works.
2715#
2716AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2717  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2718  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2719  [],
2720  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2721
2722
2723AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2724AC_LIBTOOL_PROG_COMPILER_PIC($1)
2725AC_LIBTOOL_PROG_CC_C_O($1)
2726AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2727AC_LIBTOOL_PROG_LD_SHLIBS($1)
2728AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2729AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2730AC_LIBTOOL_SYS_LIB_STRIP
2731AC_LIBTOOL_DLOPEN_SELF($1)
2732
2733# Report which librarie types wil actually be built
2734AC_MSG_CHECKING([if libtool supports shared libraries])
2735AC_MSG_RESULT([$can_build_shared])
2736
2737AC_MSG_CHECKING([whether to build shared libraries])
2738test "$can_build_shared" = "no" && enable_shared=no
2739
2740# On AIX, shared libraries and static libraries use the same namespace, and
2741# are all built from PIC.
2742case "$host_os" in
2743aix3*)
2744  test "$enable_shared" = yes && enable_static=no
2745  if test -n "$RANLIB"; then
2746    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2747    postinstall_cmds='$RANLIB $lib'
2748  fi
2749  ;;
2750
2751aix4*)
2752  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2753    test "$enable_shared" = yes && enable_static=no
2754  fi
2755  ;;
2756  darwin* | rhapsody*)
2757  if test "$GCC" = yes; then
2758    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2759    case "$host_os" in
2760    rhapsody* | darwin1.[[012]])
2761      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
2762      ;;
2763    *) # Darwin 1.3 on
2764      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
2765        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2766      else
2767        case ${MACOSX_DEPLOYMENT_TARGET} in
2768          10.[[012]])
2769            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2770            ;;
2771          10.*)
2772            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
2773            ;;
2774        esac
2775      fi
2776      ;;
2777    esac
2778    output_verbose_link_cmd='echo'
2779    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
2780    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
2781    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2782    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2783    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2784    _LT_AC_TAGVAR(hardcode_direct, $1)=no
2785    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2786    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2787    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2788    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2789  else
2790    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2791  fi
2792    ;;
2793esac
2794AC_MSG_RESULT([$enable_shared])
2795
2796AC_MSG_CHECKING([whether to build static libraries])
2797# Make sure either enable_shared or enable_static is yes.
2798test "$enable_shared" = yes || enable_static=yes
2799AC_MSG_RESULT([$enable_static])
2800
2801AC_LIBTOOL_CONFIG($1)
2802
2803AC_LANG_POP
2804CC="$lt_save_CC"
2805])# AC_LIBTOOL_LANG_C_CONFIG
2806
2807
2808# AC_LIBTOOL_LANG_CXX_CONFIG
2809# --------------------------
2810# Ensure that the configuration vars for the C compiler are
2811# suitably defined.  Those variables are subsequently used by
2812# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2813AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2814AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2815[AC_LANG_PUSH(C++)
2816AC_REQUIRE([AC_PROG_CXX])
2817AC_REQUIRE([AC_PROG_CXXCPP])
2818
2819_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2820_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2821_LT_AC_TAGVAR(always_export_symbols, $1)=no
2822_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2823_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2824_LT_AC_TAGVAR(hardcode_direct, $1)=no
2825_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2826_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2827_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2828_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2829_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2830_LT_AC_TAGVAR(module_cmds, $1)=
2831_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2832_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2833_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2834_LT_AC_TAGVAR(no_undefined_flag, $1)=
2835_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2836_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2837
2838# Dependencies to place before and after the object being linked:
2839_LT_AC_TAGVAR(predep_objects, $1)=
2840_LT_AC_TAGVAR(postdep_objects, $1)=
2841_LT_AC_TAGVAR(predeps, $1)=
2842_LT_AC_TAGVAR(postdeps, $1)=
2843_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2844
2845# Source file extension for C++ test sources.
2846ac_ext=cc
2847
2848# Object file extension for compiled C++ test sources.
2849objext=o
2850_LT_AC_TAGVAR(objext, $1)=$objext
2851
2852# Code to be used in simple compile tests
2853lt_simple_compile_test_code="int some_variable = 0;\n"
2854
2855# Code to be used in simple link tests
2856lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2857
2858# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2859_LT_AC_SYS_COMPILER
2860
2861# Allow CC to be a program name with arguments.
2862lt_save_CC=$CC
2863lt_save_LD=$LD
2864lt_save_GCC=$GCC
2865GCC=$GXX
2866lt_save_with_gnu_ld=$with_gnu_ld
2867lt_save_path_LD=$lt_cv_path_LD
2868if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2869  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2870else
2871  unset lt_cv_prog_gnu_ld
2872fi
2873if test -n "${lt_cv_path_LDCXX+set}"; then
2874  lt_cv_path_LD=$lt_cv_path_LDCXX
2875else
2876  unset lt_cv_path_LD
2877fi
2878test -z "${LDCXX+set}" || LD=$LDCXX
2879CC=${CXX-"c++"}
2880compiler=$CC
2881_LT_AC_TAGVAR(compiler, $1)=$CC
2882cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2883
2884# We don't want -fno-exception wen compiling C++ code, so set the
2885# no_builtin_flag separately
2886if test "$GXX" = yes; then
2887  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2888else
2889  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2890fi
2891
2892if test "$GXX" = yes; then
2893  # Set up default GNU C++ configuration
2894
2895  AC_PROG_LD
2896
2897  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2898  # archiving commands below assume that GNU ld is being used.
2899  if test "$with_gnu_ld" = yes; then
2900    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2901    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2902
2903    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2904    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2905
2906    # If archive_cmds runs LD, not CC, wlarc should be empty
2907    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2908    #     investigate it a little bit more. (MM)
2909    wlarc='${wl}'
2910
2911    # ancient GNU ld didn't support --whole-archive et. al.
2912    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2913        grep 'no-whole-archive' > /dev/null; then
2914      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2915    else
2916      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2917    fi
2918  else
2919    with_gnu_ld=no
2920    wlarc=
2921
2922    # A generic and very simple default shared library creation
2923    # command for GNU C++ for the case where it uses the native
2924    # linker, instead of GNU ld.  If possible, this setting should
2925    # overridden to take advantage of the native linker features on
2926    # the platform it is being used on.
2927    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2928  fi
2929
2930  # Commands to make compiler produce verbose output that lists
2931  # what "hidden" libraries, object files and flags are used when
2932  # linking a shared library.
2933  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2934
2935else
2936  GXX=no
2937  with_gnu_ld=no
2938  wlarc=
2939fi
2940
2941# PORTME: fill in a description of your system's C++ link characteristics
2942AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2943_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2944case $host_os in
2945  aix3*)
2946    # FIXME: insert proper C++ library support
2947    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2948    ;;
2949  aix4* | aix5*)
2950    if test "$host_cpu" = ia64; then
2951      # On IA64, the linker does run time linking by default, so we don't
2952      # have to do anything special.
2953      aix_use_runtimelinking=no
2954      exp_sym_flag='-Bexport'
2955      no_entry_flag=""
2956    else
2957      aix_use_runtimelinking=no
2958
2959      # Test if we are trying to use run time linking or normal
2960      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2961      # need to do runtime linking.
2962      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2963        for ld_flag in $LDFLAGS; do
2964          case $ld_flag in
2965          *-brtl*)
2966            aix_use_runtimelinking=yes
2967            break
2968            ;;
2969          esac
2970        done
2971      esac
2972
2973      exp_sym_flag='-bexport'
2974      no_entry_flag='-bnoentry'
2975    fi
2976
2977    # When large executables or shared objects are built, AIX ld can
2978    # have problems creating the table of contents.  If linking a library
2979    # or program results in "error TOC overflow" add -mminimal-toc to
2980    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2981    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2982
2983    _LT_AC_TAGVAR(archive_cmds, $1)=''
2984    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2985    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2986    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2987
2988    if test "$GXX" = yes; then
2989      case $host_os in aix4.[012]|aix4.[012].*)
2990      # We only want to do this on AIX 4.2 and lower, the check
2991      # below for broken collect2 doesn't work under 4.3+
2992        collect2name=`${CC} -print-prog-name=collect2`
2993        if test -f "$collect2name" && \
2994           strings "$collect2name" | grep resolve_lib_name >/dev/null
2995        then
2996          # We have reworked collect2
2997          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2998        else
2999          # We have old collect2
3000          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3001          # It fails to find uninstalled libraries when the uninstalled
3002          # path is not listed in the libpath.  Setting hardcode_minus_L
3003          # to unsupported forces relinking
3004          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3005          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3006          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3007        fi
3008      esac
3009      shared_flag='-shared'
3010    else
3011      # not using gcc
3012      if test "$host_cpu" = ia64; then
3013        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3014        # chokes on -Wl,-G. The following line is correct:
3015        shared_flag='-G'
3016      else
3017        if test "$aix_use_runtimelinking" = yes; then
3018          shared_flag='${wl}-G'
3019        else
3020          shared_flag='${wl}-bM:SRE'
3021        fi
3022      fi
3023    fi
3024
3025    # It seems that -bexpall does not export symbols beginning with
3026    # underscore (_), so it is better to generate a list of symbols to export.
3027    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3028    if test "$aix_use_runtimelinking" = yes; then
3029      # Warning - without using the other runtime loading flags (-brtl),
3030      # -berok will link without error, but may produce a broken library.
3031      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3032      # Determine the default libpath from the value encoded in an empty executable.
3033      _LT_AC_SYS_LIBPATH_AIX
3034      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3035
3036      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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"
3037     else
3038      if test "$host_cpu" = ia64; then
3039        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3040        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3041        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3042      else
3043        # Determine the default libpath from the value encoded in an empty executable.
3044        _LT_AC_SYS_LIBPATH_AIX
3045        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3046        # Warning - without using the other run time loading flags,
3047        # -berok will link without error, but may produce a broken library.
3048        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3049        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3050        # -bexpall does not export symbols beginning with underscore (_)
3051        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3052        # Exported symbols can be pulled into shared objects from archives
3053        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3054        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3055        # This is similar to how AIX traditionally builds it's shared libraries.
3056        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3057      fi
3058    fi
3059    ;;
3060  chorus*)
3061    case $cc_basename in
3062      *)
3063        # FIXME: insert proper C++ library support
3064        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3065        ;;
3066    esac
3067    ;;
3068
3069  cygwin* | mingw* | pw32*)
3070    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3071    # as there is no search path for DLLs.
3072    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3073    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3074    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3075    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3076
3077    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3078      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3079      # If the export-symbols file already is a .def file (1st line
3080      # is EXPORTS), use it as is; otherwise, prepend...
3081      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3082        cp $export_symbols $output_objdir/$soname.def;
3083      else
3084        echo EXPORTS > $output_objdir/$soname.def;
3085        cat $export_symbols >> $output_objdir/$soname.def;
3086      fi~
3087      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3088    else
3089      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3090    fi
3091  ;;
3092
3093  darwin* | rhapsody*)
3094  if test "$GXX" = yes; then
3095    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3096    case "$host_os" in
3097    rhapsody* | darwin1.[[012]])
3098      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3099      ;;
3100    *) # Darwin 1.3 on
3101      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3102        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3103      else
3104        case ${MACOSX_DEPLOYMENT_TARGET} in
3105          10.[[012]])
3106            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3107            ;;
3108          10.*)
3109            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3110            ;;
3111        esac
3112      fi
3113      ;;
3114    esac
3115    lt_int_apple_cc_single_mod=no
3116    output_verbose_link_cmd='echo'
3117    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3118      lt_int_apple_cc_single_mod=yes
3119    fi
3120    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3121      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3122    else
3123      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3124    fi
3125    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3126
3127    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3128    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3129      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3130    else
3131      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3132    fi
3133    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3134    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3135    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3136    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3137    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3138    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3139  else
3140    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3141  fi
3142    ;;
3143
3144  dgux*)
3145    case $cc_basename in
3146      ec++)
3147        # FIXME: insert proper C++ library support
3148        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3149        ;;
3150      ghcx)
3151        # Green Hills C++ Compiler
3152        # FIXME: insert proper C++ library support
3153        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3154        ;;
3155      *)
3156        # FIXME: insert proper C++ library support
3157        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3158        ;;
3159    esac
3160    ;;
3161  freebsd[12]*)
3162    # C++ shared libraries reported to be fairly broken before switch to ELF
3163    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3164    ;;
3165  freebsd-elf*)
3166    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3167    ;;
3168  freebsd* | kfreebsd*-gnu)
3169    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3170    # conventions
3171    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3172    ;;
3173  gnu*)
3174    ;;
3175  hpux9*)
3176    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3177    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3178    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3179    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3180    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3181                                # but as the default
3182                                # location of the library.
3183
3184    case $cc_basename in
3185    CC)
3186      # FIXME: insert proper C++ library support
3187      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3188      ;;
3189    aCC)
3190      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3191      # Commands to make compiler produce verbose output that lists
3192      # what "hidden" libraries, object files and flags are used when
3193      # linking a shared library.
3194      #
3195      # There doesn't appear to be a way to prevent this compiler from
3196      # explicitly linking system object files so we need to strip them
3197      # from the output so that they don't get included in the library
3198      # dependencies.
3199      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3200      ;;
3201    *)
3202      if test "$GXX" = yes; then
3203        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3204      else
3205        # FIXME: insert proper C++ library support
3206        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3207      fi
3208      ;;
3209    esac
3210    ;;
3211  hpux10*|hpux11*)
3212    if test $with_gnu_ld = no; then
3213      case "$host_cpu" in
3214      hppa*64*)
3215        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3216        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3217        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3218        ;;
3219      ia64*)
3220        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3221        ;;
3222      *)
3223        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3224        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3225        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3226        ;;
3227      esac
3228    fi
3229    case "$host_cpu" in
3230    hppa*64*)
3231      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3232      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3233      ;;
3234    ia64*)
3235      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3236      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3237      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3238                                              # but as the default
3239                                              # location of the library.
3240      ;;
3241    *)
3242      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3243      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3244                                              # but as the default
3245                                              # location of the library.
3246      ;;
3247    esac
3248
3249    case $cc_basename in
3250      CC)
3251        # FIXME: insert proper C++ library support
3252        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3253        ;;
3254      aCC)
3255        case "$host_cpu" in
3256        hppa*64*|ia64*)
3257          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3258          ;;
3259        *)
3260          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3261          ;;
3262        esac
3263        # Commands to make compiler produce verbose output that lists
3264        # what "hidden" libraries, object files and flags are used when
3265        # linking a shared library.
3266        #
3267        # There doesn't appear to be a way to prevent this compiler from
3268        # explicitly linking system object files so we need to strip them
3269        # from the output so that they don't get included in the library
3270        # dependencies.
3271        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3272        ;;
3273      *)
3274        if test "$GXX" = yes; then
3275          if test $with_gnu_ld = no; then
3276            case "$host_cpu" in
3277            ia64*|hppa*64*)
3278              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3279              ;;
3280            *)
3281              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3282              ;;
3283            esac
3284          fi
3285        else
3286          # FIXME: insert proper C++ library support
3287          _LT_AC_TAGVAR(ld_shlibs, $1)=no
3288        fi
3289        ;;
3290    esac
3291    ;;
3292  irix5* | irix6*)
3293    case $cc_basename in
3294      CC)
3295        # SGI C++
3296        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3297
3298        # Archives containing C++ object files must be created using
3299        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3300        # necessary to make sure instantiated templates are included
3301        # in the archive.
3302        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3303        ;;
3304      *)
3305        if test "$GXX" = yes; then
3306          if test "$with_gnu_ld" = no; then
3307            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3308          else
3309            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3310          fi
3311        fi
3312        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3313        ;;
3314    esac
3315    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3316    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3317    ;;
3318  linux*)
3319    case $cc_basename in
3320      KCC)
3321        # Kuck and Associates, Inc. (KAI) C++ Compiler
3322
3323        # KCC will only create a shared library if the output file
3324        # ends with ".so" (or ".sl" for HP-UX), so rename the library
3325        # to its proper name (with version) after linking.
3326        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3327        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3328        # Commands to make compiler produce verbose output that lists
3329        # what "hidden" libraries, object files and flags are used when
3330        # linking a shared library.
3331        #
3332        # There doesn't appear to be a way to prevent this compiler from
3333        # explicitly linking system object files so we need to strip them
3334        # from the output so that they don't get included in the library
3335        # dependencies.
3336        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3337
3338        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3339        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3340
3341        # Archives containing C++ object files must be created using
3342        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3343        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3344        ;;
3345      icpc)
3346        # Intel C++
3347        with_gnu_ld=yes
3348        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3349        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3350        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3351        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3352        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3353        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3354        ;;
3355      cxx)
3356        # Compaq C++
3357        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3358        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3359
3360        runpath_var=LD_RUN_PATH
3361        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3362        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3363
3364        # Commands to make compiler produce verbose output that lists
3365        # what "hidden" libraries, object files and flags are used when
3366        # linking a shared library.
3367        #
3368        # There doesn't appear to be a way to prevent this compiler from
3369        # explicitly linking system object files so we need to strip them
3370        # from the output so that they don't get included in the library
3371        # dependencies.
3372        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3373        ;;
3374    esac
3375    ;;
3376  lynxos*)
3377    # FIXME: insert proper C++ library support
3378    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3379    ;;
3380  m88k*)
3381    # FIXME: insert proper C++ library support
3382    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3383    ;;
3384  mvs*)
3385    case $cc_basename in
3386      cxx)
3387        # FIXME: insert proper C++ library support
3388        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3389        ;;
3390      *)
3391        # FIXME: insert proper C++ library support
3392        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3393        ;;
3394    esac
3395    ;;
3396  netbsd*)
3397    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3398      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3399      wlarc=
3400      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3401      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3402      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3403    fi
3404    # Workaround some broken pre-1.5 toolchains
3405    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3406    ;;
3407  osf3*)
3408    case $cc_basename in
3409      KCC)
3410        # Kuck and Associates, Inc. (KAI) C++ Compiler
3411
3412        # KCC will only create a shared library if the output file
3413        # ends with ".so" (or ".sl" for HP-UX), so rename the library
3414        # to its proper name (with version) after linking.
3415        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3416
3417        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3418        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3419
3420        # Archives containing C++ object files must be created using
3421        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3422        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3423
3424        ;;
3425      RCC)
3426        # Rational C++ 2.4.1
3427        # FIXME: insert proper C++ library support
3428        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3429        ;;
3430      cxx)
3431        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3432        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3433
3434        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3435        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3436
3437        # Commands to make compiler produce verbose output that lists
3438        # what "hidden" libraries, object files and flags are used when
3439        # linking a shared library.
3440        #
3441        # There doesn't appear to be a way to prevent this compiler from
3442        # explicitly linking system object files so we need to strip them
3443        # from the output so that they don't get included in the library
3444        # dependencies.
3445        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3446        ;;
3447      *)
3448        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3449          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3450          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3451
3452          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3453          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3454
3455          # Commands to make compiler produce verbose output that lists
3456          # what "hidden" libraries, object files and flags are used when
3457          # linking a shared library.
3458          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3459
3460        else
3461          # FIXME: insert proper C++ library support
3462          _LT_AC_TAGVAR(ld_shlibs, $1)=no
3463        fi
3464        ;;
3465    esac
3466    ;;
3467  osf4* | osf5*)
3468    case $cc_basename in
3469      KCC)
3470        # Kuck and Associates, Inc. (KAI) C++ Compiler
3471
3472        # KCC will only create a shared library if the output file
3473        # ends with ".so" (or ".sl" for HP-UX), so rename the library
3474        # to its proper name (with version) after linking.
3475        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3476
3477        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3478        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3479
3480        # Archives containing C++ object files must be created using
3481        # the KAI C++ compiler.
3482        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3483        ;;
3484      RCC)
3485        # Rational C++ 2.4.1
3486        # FIXME: insert proper C++ library support
3487        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3488        ;;
3489      cxx)
3490        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3491        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3492        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3493          echo "-hidden">> $lib.exp~
3494          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
3495          $rm $lib.exp'
3496
3497        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3498        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3499
3500        # Commands to make compiler produce verbose output that lists
3501        # what "hidden" libraries, object files and flags are used when
3502        # linking a shared library.
3503        #
3504        # There doesn't appear to be a way to prevent this compiler from
3505        # explicitly linking system object files so we need to strip them
3506        # from the output so that they don't get included in the library
3507        # dependencies.
3508        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3509        ;;
3510      *)
3511        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3512          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3513         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3514
3515          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3516          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3517
3518          # Commands to make compiler produce verbose output that lists
3519          # what "hidden" libraries, object files and flags are used when
3520          # linking a shared library.
3521          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3522
3523        else
3524          # FIXME: insert proper C++ library support
3525          _LT_AC_TAGVAR(ld_shlibs, $1)=no
3526        fi
3527        ;;
3528    esac
3529    ;;
3530  psos*)
3531    # FIXME: insert proper C++ library support
3532    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3533    ;;
3534  sco*)
3535    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3536    case $cc_basename in
3537      CC)
3538        # FIXME: insert proper C++ library support
3539        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3540        ;;
3541      *)
3542        # FIXME: insert proper C++ library support
3543        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3544        ;;
3545    esac
3546    ;;
3547  sunos4*)
3548    case $cc_basename in
3549      CC)
3550        # Sun C++ 4.x
3551        # FIXME: insert proper C++ library support
3552        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3553        ;;
3554      lcc)
3555        # Lucid
3556        # FIXME: insert proper C++ library support
3557        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3558        ;;
3559      *)
3560        # FIXME: insert proper C++ library support
3561        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3562        ;;
3563    esac
3564    ;;
3565  solaris*)
3566    case $cc_basename in
3567      CC)
3568        # Sun C++ 4.2, 5.x and Centerline C++
3569        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3570        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3571        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3572        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3573
3574        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3575        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3576        case $host_os in
3577          solaris2.[0-5] | solaris2.[0-5].*) ;;
3578          *)
3579            # The C++ compiler is used as linker so we must use $wl
3580            # flag to pass the commands to the underlying system
3581            # linker.
3582            # Supported since Solaris 2.6 (maybe 2.5.1?)
3583            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3584            ;;
3585        esac
3586        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3587
3588        # Commands to make compiler produce verbose output that lists
3589        # what "hidden" libraries, object files and flags are used when
3590        # linking a shared library.
3591        #
3592        # There doesn't appear to be a way to prevent this compiler from
3593        # explicitly linking system object files so we need to strip them
3594        # from the output so that they don't get included in the library
3595        # dependencies.
3596        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3597
3598        # Archives containing C++ object files must be created using
3599        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3600        # necessary to make sure instantiated templates are included
3601        # in the archive.
3602        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3603        ;;
3604      gcx)
3605        # Green Hills C++ Compiler
3606        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3607
3608        # The C++ compiler must be used to create the archive.
3609        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3610        ;;
3611      *)
3612        # GNU C++ compiler with Solaris linker
3613        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3614          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3615          if $CC --version | grep -v '^2\.7' > /dev/null; then
3616            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3617            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3618                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3619
3620            # Commands to make compiler produce verbose output that lists
3621            # what "hidden" libraries, object files and flags are used when
3622            # linking a shared library.
3623            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3624          else
3625            # g++ 2.7 appears to require `-G' NOT `-shared' on this
3626            # platform.
3627            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3628            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3629                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3630
3631            # Commands to make compiler produce verbose output that lists
3632            # what "hidden" libraries, object files and flags are used when
3633            # linking a shared library.
3634            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3635          fi
3636
3637          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3638        fi
3639        ;;
3640    esac
3641    ;;
3642  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3643    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3644    ;;
3645  tandem*)
3646    case $cc_basename in
3647      NCC)
3648        # NonStop-UX NCC 3.20
3649        # FIXME: insert proper C++ library support
3650        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3651        ;;
3652      *)
3653        # FIXME: insert proper C++ library support
3654        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3655        ;;
3656    esac
3657    ;;
3658  vxworks*)
3659    # FIXME: insert proper C++ library support
3660    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3661    ;;
3662  *)
3663    # FIXME: insert proper C++ library support
3664    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3665    ;;
3666esac
3667AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3668test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3669
3670_LT_AC_TAGVAR(GCC, $1)="$GXX"
3671_LT_AC_TAGVAR(LD, $1)="$LD"
3672
3673AC_LIBTOOL_POSTDEP_PREDEP($1)
3674AC_LIBTOOL_PROG_COMPILER_PIC($1)
3675AC_LIBTOOL_PROG_CC_C_O($1)
3676AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3677AC_LIBTOOL_PROG_LD_SHLIBS($1)
3678AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3679AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3680AC_LIBTOOL_SYS_LIB_STRIP
3681AC_LIBTOOL_DLOPEN_SELF($1)
3682
3683AC_LIBTOOL_CONFIG($1)
3684
3685AC_LANG_POP
3686CC=$lt_save_CC
3687LDCXX=$LD
3688LD=$lt_save_LD
3689GCC=$lt_save_GCC
3690with_gnu_ldcxx=$with_gnu_ld
3691with_gnu_ld=$lt_save_with_gnu_ld
3692lt_cv_path_LDCXX=$lt_cv_path_LD
3693lt_cv_path_LD=$lt_save_path_LD
3694lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3695lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3696])# AC_LIBTOOL_LANG_CXX_CONFIG
3697
3698# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3699# ------------------------
3700# Figure out "hidden" library dependencies from verbose
3701# compiler output when linking a shared library.
3702# Parse the compiler output and extract the necessary
3703# objects, libraries and library flags.
3704AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3705dnl we can't use the lt_simple_compile_test_code here,
3706dnl because it contains code intended for an executable,
3707dnl not a library.  It's possible we should let each
3708dnl tag define a new lt_????_link_test_code variable,
3709dnl but it's only used here...
3710ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3711int a;
3712void foo (void) { a = 0; }
3713EOF
3714],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3715class Foo
3716{
3717public:
3718  Foo (void) { a = 0; }
3719private:
3720  int a;
3721};
3722EOF
3723],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3724      subroutine foo
3725      implicit none
3726      integer*4 a
3727      a=0
3728      return
3729      end
3730EOF
3731],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3732public class foo {
3733  private int a;
3734  public void bar (void) {
3735    a = 0;
3736  }
3737};
3738EOF
3739])
3740dnl Parse the compiler output and extract the necessary
3741dnl objects, libraries and library flags.
3742if AC_TRY_EVAL(ac_compile); then
3743  # Parse the compiler output and extract the necessary
3744  # objects, libraries and library flags.
3745
3746  # Sentinel used to keep track of whether or not we are before
3747  # the conftest object file.
3748  pre_test_object_deps_done=no
3749
3750  # The `*' in the case matches for architectures that use `case' in
3751  # $output_verbose_cmd can trigger glob expansion during the loop
3752  # eval without this substitution.
3753  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3754
3755  for p in `eval $output_verbose_link_cmd`; do
3756    case $p in
3757
3758    -L* | -R* | -l*)
3759       # Some compilers place space between "-{L,R}" and the path.
3760       # Remove the space.
3761       if test $p = "-L" \
3762          || test $p = "-R"; then
3763         prev=$p
3764         continue
3765       else
3766         prev=
3767       fi
3768
3769       if test "$pre_test_object_deps_done" = no; then
3770         case $p in
3771         -L* | -R*)
3772           # Internal compiler library paths should come after those
3773           # provided the user.  The postdeps already come after the
3774           # user supplied libs so there is no need to process them.
3775           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3776             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3777           else
3778             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3779           fi
3780           ;;
3781         # The "-l" case would never come before the object being
3782         # linked, so don't bother handling this case.
3783         esac
3784       else
3785         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3786           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3787         else
3788           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3789         fi
3790       fi
3791       ;;
3792
3793    *.$objext)
3794       # This assumes that the test object file only shows up
3795       # once in the compiler output.
3796       if test "$p" = "conftest.$objext"; then
3797         pre_test_object_deps_done=yes
3798         continue
3799       fi
3800
3801       if test "$pre_test_object_deps_done" = no; then
3802         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3803           _LT_AC_TAGVAR(predep_objects, $1)="$p"
3804         else
3805           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3806         fi
3807       else
3808         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3809           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3810         else
3811           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3812         fi
3813       fi
3814       ;;
3815
3816    *) ;; # Ignore the rest.
3817
3818    esac
3819  done
3820
3821  # Clean up.
3822  rm -f a.out a.exe
3823else
3824  echo "libtool.m4: error: problem compiling $1 test program"
3825fi
3826
3827$rm -f confest.$objext
3828
3829case " $_LT_AC_TAGVAR(postdeps, $1) " in
3830*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3831esac
3832])# AC_LIBTOOL_POSTDEP_PREDEP
3833
3834# AC_LIBTOOL_LANG_F77_CONFIG
3835# ------------------------
3836# Ensure that the configuration vars for the C compiler are
3837# suitably defined.  Those variables are subsequently used by
3838# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3839AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3840AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3841[AC_REQUIRE([AC_PROG_F77])
3842AC_LANG_PUSH(Fortran 77)
3843
3844_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3845_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3846_LT_AC_TAGVAR(always_export_symbols, $1)=no
3847_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3848_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3849_LT_AC_TAGVAR(hardcode_direct, $1)=no
3850_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3851_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3852_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3853_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3854_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3855_LT_AC_TAGVAR(module_cmds, $1)=
3856_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3857_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3858_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3859_LT_AC_TAGVAR(no_undefined_flag, $1)=
3860_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3861_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3862
3863# Source file extension for f77 test sources.
3864ac_ext=f
3865
3866# Object file extension for compiled f77 test sources.
3867objext=o
3868_LT_AC_TAGVAR(objext, $1)=$objext
3869
3870# Code to be used in simple compile tests
3871lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
3872
3873# Code to be used in simple link tests
3874lt_simple_link_test_code="      program t\n      end\n"
3875
3876# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3877_LT_AC_SYS_COMPILER
3878
3879# Allow CC to be a program name with arguments.
3880lt_save_CC="$CC"
3881CC=${F77-"f77"}
3882compiler=$CC
3883_LT_AC_TAGVAR(compiler, $1)=$CC
3884cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3885
3886AC_MSG_CHECKING([if libtool supports shared libraries])
3887AC_MSG_RESULT([$can_build_shared])
3888
3889AC_MSG_CHECKING([whether to build shared libraries])
3890test "$can_build_shared" = "no" && enable_shared=no
3891
3892# On AIX, shared libraries and static libraries use the same namespace, and
3893# are all built from PIC.
3894case "$host_os" in
3895aix3*)
3896  test "$enable_shared" = yes && enable_static=no
3897  if test -n "$RANLIB"; then
3898    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3899    postinstall_cmds='$RANLIB $lib'
3900  fi
3901  ;;
3902aix4*)
3903  test "$enable_shared" = yes && enable_static=no
3904  ;;
3905esac
3906AC_MSG_RESULT([$enable_shared])
3907
3908AC_MSG_CHECKING([whether to build static libraries])
3909# Make sure either enable_shared or enable_static is yes.
3910test "$enable_shared" = yes || enable_static=yes
3911AC_MSG_RESULT([$enable_static])
3912
3913test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3914
3915_LT_AC_TAGVAR(GCC, $1)="$G77"
3916_LT_AC_TAGVAR(LD, $1)="$LD"
3917
3918AC_LIBTOOL_PROG_COMPILER_PIC($1)
3919AC_LIBTOOL_PROG_CC_C_O($1)
3920AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3921AC_LIBTOOL_PROG_LD_SHLIBS($1)
3922AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3923AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3924AC_LIBTOOL_SYS_LIB_STRIP
3925
3926
3927AC_LIBTOOL_CONFIG($1)
3928
3929AC_LANG_POP
3930CC="$lt_save_CC"
3931])# AC_LIBTOOL_LANG_F77_CONFIG
3932
3933
3934# AC_LIBTOOL_LANG_GCJ_CONFIG
3935# --------------------------
3936# Ensure that the configuration vars for the C compiler are
3937# suitably defined.  Those variables are subsequently used by
3938# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3939AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3940AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3941[AC_LANG_SAVE
3942
3943# Source file extension for Java test sources.
3944ac_ext=java
3945
3946# Object file extension for compiled Java test sources.
3947objext=o
3948_LT_AC_TAGVAR(objext, $1)=$objext
3949
3950# Code to be used in simple compile tests
3951lt_simple_compile_test_code="class foo {}\n"
3952
3953# Code to be used in simple link tests
3954lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
3955
3956# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3957_LT_AC_SYS_COMPILER
3958
3959# Allow CC to be a program name with arguments.
3960lt_save_CC="$CC"
3961CC=${GCJ-"gcj"}
3962compiler=$CC
3963_LT_AC_TAGVAR(compiler, $1)=$CC
3964
3965# GCJ did not exist at the time GCC didn't implicitly link libc in.
3966_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3967
3968AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3969AC_LIBTOOL_PROG_COMPILER_PIC($1)
3970AC_LIBTOOL_PROG_CC_C_O($1)
3971AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3972AC_LIBTOOL_PROG_LD_SHLIBS($1)
3973AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3974AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3975AC_LIBTOOL_SYS_LIB_STRIP
3976AC_LIBTOOL_DLOPEN_SELF($1)
3977
3978AC_LIBTOOL_CONFIG($1)
3979
3980AC_LANG_RESTORE
3981CC="$lt_save_CC"
3982])# AC_LIBTOOL_LANG_GCJ_CONFIG
3983
3984
3985# AC_LIBTOOL_LANG_RC_CONFIG
3986# --------------------------
3987# Ensure that the configuration vars for the Windows resource compiler are
3988# suitably defined.  Those variables are subsequently used by
3989# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3990AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
3991AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
3992[AC_LANG_SAVE
3993
3994# Source file extension for RC test sources.
3995ac_ext=rc
3996
3997# Object file extension for compiled RC test sources.
3998objext=o
3999_LT_AC_TAGVAR(objext, $1)=$objext
4000
4001# Code to be used in simple compile tests
4002lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4003
4004# Code to be used in simple link tests
4005lt_simple_link_test_code="$lt_simple_compile_test_code"
4006
4007# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4008_LT_AC_SYS_COMPILER
4009
4010# Allow CC to be a program name with arguments.
4011lt_save_CC="$CC"
4012CC=${RC-"windres"}
4013compiler=$CC
4014_LT_AC_TAGVAR(compiler, $1)=$CC
4015_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4016
4017AC_LIBTOOL_CONFIG($1)
4018
4019AC_LANG_RESTORE
4020CC="$lt_save_CC"
4021])# AC_LIBTOOL_LANG_RC_CONFIG
4022
4023
4024# AC_LIBTOOL_CONFIG([TAGNAME])
4025# ----------------------------
4026# If TAGNAME is not passed, then create an initial libtool script
4027# with a default configuration from the untagged config vars.  Otherwise
4028# add code to config.status for appending the configuration named by
4029# TAGNAME from the matching tagged config vars.
4030AC_DEFUN([AC_LIBTOOL_CONFIG],
4031[# The else clause should only fire when bootstrapping the
4032# libtool distribution, otherwise you forgot to ship ltmain.sh
4033# with your package, and you will get complaints that there are
4034# no rules to generate ltmain.sh.
4035if test -f "$ltmain"; then
4036  # See if we are running on zsh, and set the options which allow our commands through
4037  # without removal of \ escapes.
4038  if test -n "${ZSH_VERSION+set}" ; then
4039    setopt NO_GLOB_SUBST
4040  fi
4041  # Now quote all the things that may contain metacharacters while being
4042  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4043  # variables and quote the copies for generation of the libtool script.
4044  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
4045    SED SHELL STRIP \
4046    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4047    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4048    deplibs_check_method reload_flag reload_cmds need_locks \
4049    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4050    lt_cv_sys_global_symbol_to_c_name_address \
4051    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4052    old_postinstall_cmds old_postuninstall_cmds \
4053    _LT_AC_TAGVAR(compiler, $1) \
4054    _LT_AC_TAGVAR(CC, $1) \
4055    _LT_AC_TAGVAR(LD, $1) \
4056    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4057    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4058    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4059    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4060    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4061    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4062    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4063    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4064    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4065    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4066    _LT_AC_TAGVAR(predep_objects, $1) \
4067    _LT_AC_TAGVAR(postdep_objects, $1) \
4068    _LT_AC_TAGVAR(predeps, $1) \
4069    _LT_AC_TAGVAR(postdeps, $1) \
4070    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4071    _LT_AC_TAGVAR(archive_cmds, $1) \
4072    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4073    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4074    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4075    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4076    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4077    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4078    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4079    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4080    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4081    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4082    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4083    _LT_AC_TAGVAR(module_cmds, $1) \
4084    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4085    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4086    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4087    _LT_AC_TAGVAR(include_expsyms, $1); do
4088
4089    case $var in
4090    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4091    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4092    _LT_AC_TAGVAR(archive_cmds, $1) | \
4093    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4094    _LT_AC_TAGVAR(module_cmds, $1) | \
4095    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4096    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4097    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4098    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4099    postinstall_cmds | postuninstall_cmds | \
4100    old_postinstall_cmds | old_postuninstall_cmds | \
4101    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4102      # Double-quote double-evaled strings.
4103      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4104      ;;
4105    *)
4106      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4107      ;;
4108    esac
4109  done
4110
4111  case $lt_echo in
4112  *'\[$]0 --fallback-echo"')
4113    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4114    ;;
4115  esac
4116
4117ifelse([$1], [],
4118  [cfgfile="${ofile}T"
4119  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4120  $rm -f "$cfgfile"
4121  AC_MSG_NOTICE([creating $ofile])],
4122  [cfgfile="$ofile"])
4123
4124  cat <<__EOF__ >> "$cfgfile"
4125ifelse([$1], [],
4126[#! $SHELL
4127
4128# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4129# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4130# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4131#
4132# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4133# Free Software Foundation, Inc.
4134#
4135# This file is part of GNU Libtool:
4136# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4137#
4138# This program is free software; you can redistribute it and/or modify
4139# it under the terms of the GNU General Public License as published by
4140# the Free Software Foundation; either version 2 of the License, or
4141# (at your option) any later version.
4142#
4143# This program is distributed in the hope that it will be useful, but
4144# WITHOUT ANY WARRANTY; without even the implied warranty of
4145# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4146# General Public License for more details.
4147#
4148# You should have received a copy of the GNU General Public License
4149# along with this program; if not, write to the Free Software
4150# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4151#
4152# As a special exception to the GNU General Public License, if you
4153# distribute this file as part of a program that contains a
4154# configuration script generated by Autoconf, you may include it under
4155# the same distribution terms that you use for the rest of that program.
4156
4157# A sed program that does not truncate output.
4158SED=$lt_SED
4159
4160# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4161Xsed="$SED -e s/^X//"
4162
4163# The HP-UX ksh and POSIX shell print the target directory to stdout
4164# if CDPATH is set.
4165if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4166
4167# The names of the tagged configurations supported by this script.
4168available_tags=
4169
4170# ### BEGIN LIBTOOL CONFIG],
4171[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4172
4173# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4174
4175# Shell to use when invoking shell scripts.
4176SHELL=$lt_SHELL
4177
4178# Whether or not to build shared libraries.
4179build_libtool_libs=$enable_shared
4180
4181# Whether or not to build static libraries.
4182build_old_libs=$enable_static
4183
4184# Whether or not to add -lc for building shared libraries.
4185build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4186
4187# Whether or not to disallow shared libs when runtime libs are static
4188allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4189
4190# Whether or not to optimize for fast installation.
4191fast_install=$enable_fast_install
4192
4193# The host system.
4194host_alias=$host_alias
4195host=$host
4196
4197# An echo program that does not interpret backslashes.
4198echo=$lt_echo
4199
4200# The archiver.
4201AR=$lt_AR
4202AR_FLAGS=$lt_AR_FLAGS
4203
4204# A C compiler.
4205LTCC=$lt_LTCC
4206
4207# A language-specific compiler.
4208CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4209
4210# Is the compiler the GNU C compiler?
4211with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4212
4213# An ERE matcher.
4214EGREP=$lt_EGREP
4215
4216# The linker used to build libraries.
4217LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4218
4219# Whether we need hard or soft links.
4220LN_S=$lt_LN_S
4221
4222# A BSD-compatible nm program.
4223NM=$lt_NM
4224
4225# A symbol stripping program
4226STRIP=$lt_STRIP
4227
4228# Used to examine libraries when file_magic_cmd begins "file"
4229MAGIC_CMD=$MAGIC_CMD
4230
4231# Used on cygwin: DLL creation program.
4232DLLTOOL="$DLLTOOL"
4233
4234# Used on cygwin: object dumper.
4235OBJDUMP="$OBJDUMP"
4236
4237# Used on cygwin: assembler.
4238AS=$lt_AS
4239
4240# The name of the directory that contains temporary libtool files.
4241objdir=$objdir
4242
4243# How to create reloadable object files.
4244reload_flag=$lt_reload_flag
4245reload_cmds=$lt_reload_cmds
4246
4247# How to pass a linker flag through the compiler.
4248wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4249
4250# Object file suffix (normally "o").
4251objext="$ac_objext"
4252
4253# Old archive suffix (normally "a").
4254libext="$libext"
4255
4256# Shared library suffix (normally ".so").
4257shrext='$shrext'
4258
4259# Executable file suffix (normally "").
4260exeext="$exeext"
4261
4262# Additional compiler flags for building library objects.
4263pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4264pic_mode=$pic_mode
4265
4266# What is the maximum length of a command?
4267max_cmd_len=$lt_cv_sys_max_cmd_len
4268
4269# Does compiler simultaneously support -c and -o options?
4270compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4271
4272# Must we lock files when doing compilation ?
4273need_locks=$lt_need_locks
4274
4275# Do we need the lib prefix for modules?
4276need_lib_prefix=$need_lib_prefix
4277
4278# Do we need a version for libraries?
4279need_version=$need_version
4280
4281# Whether dlopen is supported.
4282dlopen_support=$enable_dlopen
4283
4284# Whether dlopen of programs is supported.
4285dlopen_self=$enable_dlopen_self
4286
4287# Whether dlopen of statically linked programs is supported.
4288dlopen_self_static=$enable_dlopen_self_static
4289
4290# Compiler flag to prevent dynamic linking.
4291link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4292
4293# Compiler flag to turn off builtin functions.
4294no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4295
4296# Compiler flag to allow reflexive dlopens.
4297export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4298
4299# Compiler flag to generate shared objects directly from archives.
4300whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4301
4302# Compiler flag to generate thread-safe objects.
4303thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4304
4305# Library versioning type.
4306version_type=$version_type
4307
4308# Format of library name prefix.
4309libname_spec=$lt_libname_spec
4310
4311# List of archive names.  First name is the real one, the rest are links.
4312# The last name is the one that the linker finds with -lNAME.
4313library_names_spec=$lt_library_names_spec
4314
4315# The coded name of the library, if different from the real name.
4316soname_spec=$lt_soname_spec
4317
4318# Commands used to build and install an old-style archive.
4319RANLIB=$lt_RANLIB
4320old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4321old_postinstall_cmds=$lt_old_postinstall_cmds
4322old_postuninstall_cmds=$lt_old_postuninstall_cmds
4323
4324# Create an old-style archive from a shared archive.
4325old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4326
4327# Create a temporary old-style archive to link instead of a shared archive.
4328old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4329
4330# Commands used to build and install a shared archive.
4331archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4332archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4333postinstall_cmds=$lt_postinstall_cmds
4334postuninstall_cmds=$lt_postuninstall_cmds
4335
4336# Commands used to build a loadable module (assumed same as above if empty)
4337module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4338module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4339
4340# Commands to strip libraries.
4341old_striplib=$lt_old_striplib
4342striplib=$lt_striplib
4343
4344# Dependencies to place before the objects being linked to create a
4345# shared library.
4346predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4347
4348# Dependencies to place after the objects being linked to create a
4349# shared library.
4350postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4351
4352# Dependencies to place before the objects being linked to create a
4353# shared library.
4354predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4355
4356# Dependencies to place after the objects being linked to create a
4357# shared library.
4358postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4359
4360# The library search path used internally by the compiler when linking
4361# a shared library.
4362compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4363
4364# Method to check whether dependent libraries are shared objects.
4365deplibs_check_method=$lt_deplibs_check_method
4366
4367# Command to use when deplibs_check_method == file_magic.
4368file_magic_cmd=$lt_file_magic_cmd
4369
4370# Flag that allows shared libraries with undefined symbols to be built.
4371allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4372
4373# Flag that forces no undefined symbols.
4374no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4375
4376# Commands used to finish a libtool library installation in a directory.
4377finish_cmds=$lt_finish_cmds
4378
4379# Same as above, but a single script fragment to be evaled but not shown.
4380finish_eval=$lt_finish_eval
4381
4382# Take the output of nm and produce a listing of raw symbols and C names.
4383global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4384
4385# Transform the output of nm in a proper C declaration
4386global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4387
4388# Transform the output of nm in a C name address pair
4389global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4390
4391# This is the shared library runtime path variable.
4392runpath_var=$runpath_var
4393
4394# This is the shared library path variable.
4395shlibpath_var=$shlibpath_var
4396
4397# Is shlibpath searched before the hard-coded library search path?
4398shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4399
4400# How to hardcode a shared library path into an executable.
4401hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4402
4403# Whether we should hardcode library paths into libraries.
4404hardcode_into_libs=$hardcode_into_libs
4405
4406# Flag to hardcode \$libdir into a binary during linking.
4407# This must work even if \$libdir does not exist.
4408hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4409
4410# If ld is used when linking, flag to hardcode \$libdir into
4411# a binary during linking. This must work even if \$libdir does
4412# not exist.
4413hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4414
4415# Whether we need a single -rpath flag with a separated argument.
4416hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4417
4418# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4419# resulting binary.
4420hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4421
4422# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4423# resulting binary.
4424hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4425
4426# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4427# the resulting binary.
4428hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4429
4430# Set to yes if building a shared library automatically hardcodes DIR into the library
4431# and all subsequent libraries and executables linked against it.
4432hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4433
4434# Variables whose values should be saved in libtool wrapper scripts and
4435# restored at relink time.
4436variables_saved_for_relink="$variables_saved_for_relink"
4437
4438# Whether libtool must link a program against all its dependency libraries.
4439link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4440
4441# Compile-time system search path for libraries
4442sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4443
4444# Run-time system search path for libraries
4445sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4446
4447# Fix the shell variable \$srcfile for the compiler.
4448fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4449
4450# Set to yes if exported symbols are required.
4451always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4452
4453# The commands to list exported symbols.
4454export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4455
4456# The commands to extract the exported symbol list from a shared archive.
4457extract_expsyms_cmds=$lt_extract_expsyms_cmds
4458
4459# Symbols that should not be listed in the preloaded symbols.
4460exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4461
4462# Symbols that must always be exported.
4463include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4464
4465ifelse([$1],[],
4466[# ### END LIBTOOL CONFIG],
4467[# ### END LIBTOOL TAG CONFIG: $tagname])
4468
4469__EOF__
4470
4471ifelse([$1],[], [
4472  case $host_os in
4473  aix3*)
4474    cat <<\EOF >> "$cfgfile"
4475
4476# AIX sometimes has problems with the GCC collect2 program.  For some
4477# reason, if we set the COLLECT_NAMES environment variable, the problems
4478# vanish in a puff of smoke.
4479if test "X${COLLECT_NAMES+set}" != Xset; then
4480  COLLECT_NAMES=
4481  export COLLECT_NAMES
4482fi
4483EOF
4484    ;;
4485  esac
4486
4487  # We use sed instead of cat because bash on DJGPP gets confused if
4488  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4489  # text mode, it properly converts lines to CR/LF.  This bash problem
4490  # is reportedly fixed, but why not run on old versions too?
4491  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4492
4493  mv -f "$cfgfile" "$ofile" || \
4494    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4495  chmod +x "$ofile"
4496])
4497else
4498  # If there is no Makefile yet, we rely on a make rule to execute
4499  # `config.status --recheck' to rerun these tests and create the
4500  # libtool script then.
4501  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4502  if test -f "$ltmain_in"; then
4503    test -f Makefile && make "$ltmain"
4504  fi
4505fi
4506])# AC_LIBTOOL_CONFIG
4507
4508
4509# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4510# -------------------------------------------
4511AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4512[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4513
4514_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4515
4516if test "$GCC" = yes; then
4517  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4518
4519  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4520    lt_cv_prog_compiler_rtti_exceptions,
4521    [-fno-rtti -fno-exceptions], [],
4522    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4523fi
4524])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4525
4526
4527# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4528# ---------------------------------
4529AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4530[AC_REQUIRE([AC_CANONICAL_HOST])
4531AC_REQUIRE([AC_PROG_NM])
4532AC_REQUIRE([AC_OBJEXT])
4533# Check for command to grab the raw symbol name followed by C symbol from nm.
4534AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4535AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4536[
4537# These are sane defaults that work on at least a few old systems.
4538# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4539
4540# Character class describing NM global symbol codes.
4541symcode='[[BCDEGRST]]'
4542
4543# Regexp to match symbols that can be accessed directly from C.
4544sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4545
4546# Transform the above into a raw symbol and a C symbol.
4547symxfrm='\1 \2\3 \3'
4548
4549# Transform an extracted symbol line into a proper C declaration
4550lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4551
4552# Transform an extracted symbol line into symbol name and symbol address
4553lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4554
4555# Define system-specific variables.
4556case $host_os in
4557aix*)
4558  symcode='[[BCDT]]'
4559  ;;
4560cygwin* | mingw* | pw32*)
4561  symcode='[[ABCDGISTW]]'
4562  ;;
4563hpux*) # Its linker distinguishes data from code symbols
4564  if test "$host_cpu" = ia64; then
4565    symcode='[[ABCDEGRST]]'
4566  fi
4567  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4568  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4569  ;;
4570irix* | nonstopux*)
4571  symcode='[[BCDEGRST]]'
4572  ;;
4573osf*)
4574  symcode='[[BCDEGQRST]]'
4575  ;;
4576solaris* | sysv5*)
4577  symcode='[[BDRT]]'
4578  ;;
4579sysv4)
4580  symcode='[[DFNSTU]]'
4581  ;;
4582esac
4583
4584# Handle CRLF in mingw tool chain
4585opt_cr=
4586case $build_os in
4587mingw*)
4588  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4589  ;;
4590esac
4591
4592# If we're using GNU nm, then use its standard symbol codes.
4593case `$NM -V 2>&1` in
4594*GNU* | *'with BFD'*)
4595  symcode='[[ABCDGIRSTW]]' ;;
4596esac
4597
4598# Try without a prefix undercore, then with it.
4599for ac_symprfx in "" "_"; do
4600
4601  # Write the raw and C identifiers.
4602  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4603
4604  # Check to see that the pipe works correctly.
4605  pipe_works=no
4606
4607  rm -f conftest*
4608  cat > conftest.$ac_ext <<EOF
4609#ifdef __cplusplus
4610extern "C" {
4611#endif
4612char nm_test_var;
4613void nm_test_func(){}
4614#ifdef __cplusplus
4615}
4616#endif
4617int main(){nm_test_var='a';nm_test_func();return(0);}
4618EOF
4619
4620  if AC_TRY_EVAL(ac_compile); then
4621    # Now try to grab the symbols.
4622    nlist=conftest.nm
4623    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4624      # Try sorting and uniquifying the output.
4625      if sort "$nlist" | uniq > "$nlist"T; then
4626        mv -f "$nlist"T "$nlist"
4627      else
4628        rm -f "$nlist"T
4629      fi
4630
4631      # Make sure that we snagged all the symbols we need.
4632      if grep ' nm_test_var$' "$nlist" >/dev/null; then
4633        if grep ' nm_test_func$' "$nlist" >/dev/null; then
4634          cat <<EOF > conftest.$ac_ext
4635#ifdef __cplusplus
4636extern "C" {
4637#endif
4638
4639EOF
4640          # Now generate the symbol file.
4641          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4642
4643          cat <<EOF >> conftest.$ac_ext
4644#if defined (__STDC__) && __STDC__
4645# define lt_ptr_t void *
4646#else
4647# define lt_ptr_t char *
4648# define const
4649#endif
4650
4651/* The mapping between symbol names and symbols. */
4652const struct {
4653  const char *name;
4654  lt_ptr_t address;
4655}
4656lt_preloaded_symbols[[]] =
4657{
4658EOF
4659          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4660          cat <<\EOF >> conftest.$ac_ext
4661  {0, (lt_ptr_t) 0}
4662};
4663
4664#ifdef __cplusplus
4665}
4666#endif
4667EOF
4668          # Now try linking the two files.
4669          mv conftest.$ac_objext conftstm.$ac_objext
4670          lt_save_LIBS="$LIBS"
4671          lt_save_CFLAGS="$CFLAGS"
4672          LIBS="conftstm.$ac_objext"
4673          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4674          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4675            pipe_works=yes
4676          fi
4677          LIBS="$lt_save_LIBS"
4678          CFLAGS="$lt_save_CFLAGS"
4679        else
4680          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4681        fi
4682      else
4683        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4684      fi
4685    else
4686      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4687    fi
4688  else
4689    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4690    cat conftest.$ac_ext >&5
4691  fi
4692  rm -f conftest* conftst*
4693
4694  # Do not use the global_symbol_pipe unless it works.
4695  if test "$pipe_works" = yes; then
4696    break
4697  else
4698    lt_cv_sys_global_symbol_pipe=
4699  fi
4700done
4701])
4702if test -z "$lt_cv_sys_global_symbol_pipe"; then
4703  lt_cv_sys_global_symbol_to_cdecl=
4704fi
4705if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4706  AC_MSG_RESULT(failed)
4707else
4708  AC_MSG_RESULT(ok)
4709fi
4710]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4711
4712
4713# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4714# ---------------------------------------
4715AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4716[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4717_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4718_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4719
4720AC_MSG_CHECKING([for $compiler option to produce PIC])
4721 ifelse([$1],[CXX],[
4722  # C++ specific cases for pic, static, wl, etc.
4723  if test "$GXX" = yes; then
4724    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4725    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4726
4727    case $host_os in
4728    aix*)
4729      # All AIX code is PIC.
4730      if test "$host_cpu" = ia64; then
4731        # AIX 5 now supports IA64 processor
4732        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4733      fi
4734      ;;
4735    amigaos*)
4736      # FIXME: we need at least 68020 code to build shared libraries, but
4737      # adding the `-m68020' flag to GCC prevents building anything better,
4738      # like `-m68040'.
4739      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4740      ;;
4741    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4742      # PIC is the default for these OSes.
4743      ;;
4744    mingw* | os2* | pw32*)
4745      # This hack is so that the source file can tell whether it is being
4746      # built for inclusion in a dll (and should export symbols for example).
4747      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4748      ;;
4749    darwin* | rhapsody*)
4750      # PIC is the default on this platform
4751      # Common symbols not allowed in MH_DYLIB files
4752      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4753      ;;
4754    *djgpp*)
4755      # DJGPP does not support shared libraries at all
4756      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4757      ;;
4758    sysv4*MP*)
4759      if test -d /usr/nec; then
4760        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4761      fi
4762      ;;
4763    hpux*)
4764      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4765      # not for PA HP-UX.
4766      case "$host_cpu" in
4767      hppa*64*|ia64*)
4768        ;;
4769      *)
4770        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4771        ;;
4772      esac
4773      ;;
4774    *)
4775      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4776      ;;
4777    esac
4778  else
4779    case $host_os in
4780      aix4* | aix5*)
4781        # All AIX code is PIC.
4782        if test "$host_cpu" = ia64; then
4783          # AIX 5 now supports IA64 processor
4784          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4785        else
4786          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4787        fi
4788        ;;
4789      chorus*)
4790        case $cc_basename in
4791        cxch68)
4792          # Green Hills C++ Compiler
4793          # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4794          ;;
4795        esac
4796        ;;
4797      dgux*)
4798        case $cc_basename in
4799          ec++)
4800            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4801            ;;
4802          ghcx)
4803            # Green Hills C++ Compiler
4804            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4805            ;;
4806          *)
4807            ;;
4808        esac
4809        ;;
4810      freebsd* | kfreebsd*-gnu)
4811        # FreeBSD uses GNU C++
4812        ;;
4813      hpux9* | hpux10* | hpux11*)
4814        case $cc_basename in
4815          CC)
4816            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4817            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4818            if test "$host_cpu" != ia64; then
4819              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4820            fi
4821            ;;
4822          aCC)
4823            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4824            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4825            case "$host_cpu" in
4826            hppa*64*|ia64*)
4827              # +Z the default
4828              ;;
4829            *)
4830              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4831              ;;
4832            esac
4833            ;;
4834          *)
4835            ;;
4836        esac
4837        ;;
4838      irix5* | irix6* | nonstopux*)
4839        case $cc_basename in
4840          CC)
4841            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4842            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4843            # CC pic flag -KPIC is the default.
4844            ;;
4845          *)
4846            ;;
4847        esac
4848        ;;
4849      linux*)
4850        case $cc_basename in
4851          KCC)
4852            # KAI C++ Compiler
4853            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4854            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4855            ;;
4856          icpc)
4857            # Intel C++
4858            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4859            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4860            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4861            ;;
4862          cxx)
4863            # Compaq C++
4864            # Make sure the PIC flag is empty.  It appears that all Alpha
4865            # Linux and Compaq Tru64 Unix objects are PIC.
4866            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4867            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4868            ;;
4869          *)
4870            ;;
4871        esac
4872        ;;
4873      lynxos*)
4874        ;;
4875      m88k*)
4876        ;;
4877      mvs*)
4878        case $cc_basename in
4879          cxx)
4880            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4881            ;;
4882          *)
4883            ;;
4884        esac
4885        ;;
4886      netbsd*)
4887        ;;
4888      osf3* | osf4* | osf5*)
4889        case $cc_basename in
4890          KCC)
4891            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4892            ;;
4893          RCC)
4894            # Rational C++ 2.4.1
4895            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4896            ;;
4897          cxx)
4898            # Digital/Compaq C++
4899            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4900            # Make sure the PIC flag is empty.  It appears that all Alpha
4901            # Linux and Compaq Tru64 Unix objects are PIC.
4902            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4903            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4904            ;;
4905          *)
4906            ;;
4907        esac
4908        ;;
4909      psos*)
4910        ;;
4911      sco*)
4912        case $cc_basename in
4913          CC)
4914            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4915            ;;
4916          *)
4917            ;;
4918        esac
4919        ;;
4920      solaris*)
4921        case $cc_basename in
4922          CC)
4923            # Sun C++ 4.2, 5.x and Centerline C++
4924            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4925            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4926            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4927            ;;
4928          gcx)
4929            # Green Hills C++ Compiler
4930            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4931            ;;
4932          *)
4933            ;;
4934        esac
4935        ;;
4936      sunos4*)
4937        case $cc_basename in
4938          CC)
4939            # Sun C++ 4.x
4940            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4941            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4942            ;;
4943          lcc)
4944            # Lucid
4945            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4946            ;;
4947          *)
4948            ;;
4949        esac
4950        ;;
4951      tandem*)
4952        case $cc_basename in
4953          NCC)
4954            # NonStop-UX NCC 3.20
4955            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4956            ;;
4957          *)
4958            ;;
4959        esac
4960        ;;
4961      unixware*)
4962        ;;
4963      vxworks*)
4964        ;;
4965      *)
4966        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4967        ;;
4968    esac
4969  fi
4970],
4971[
4972  if test "$GCC" = yes; then
4973    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4974    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4975
4976    case $host_os in
4977      aix*)
4978      # All AIX code is PIC.
4979      if test "$host_cpu" = ia64; then
4980        # AIX 5 now supports IA64 processor
4981        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4982      fi
4983      ;;
4984
4985    amigaos*)
4986      # FIXME: we need at least 68020 code to build shared libraries, but
4987      # adding the `-m68020' flag to GCC prevents building anything better,
4988      # like `-m68040'.
4989      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4990      ;;
4991
4992    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4993      # PIC is the default for these OSes.
4994      ;;
4995
4996    mingw* | pw32* | os2*)
4997      # This hack is so that the source file can tell whether it is being
4998      # built for inclusion in a dll (and should export symbols for example).
4999      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5000      ;;
5001
5002    darwin* | rhapsody*)
5003      # PIC is the default on this platform
5004      # Common symbols not allowed in MH_DYLIB files
5005      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5006      ;;
5007
5008    msdosdjgpp*)
5009      # Just because we use GCC doesn't mean we suddenly get shared libraries
5010      # on systems that don't support them.
5011      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5012      enable_shared=no
5013      ;;
5014
5015    sysv4*MP*)
5016      if test -d /usr/nec; then
5017        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5018      fi
5019      ;;
5020
5021    hpux*)
5022      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5023      # not for PA HP-UX.
5024      case "$host_cpu" in
5025      hppa*64*|ia64*)
5026        # +Z the default
5027        ;;
5028      *)
5029        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5030        ;;
5031      esac
5032      ;;
5033
5034    *)
5035      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5036      ;;
5037    esac
5038  else
5039    # PORTME Check for flag to pass linker flags through the system compiler.
5040    case $host_os in
5041    aix*)
5042      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5043      if test "$host_cpu" = ia64; then
5044        # AIX 5 now supports IA64 processor
5045        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5046      else
5047        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5048      fi
5049      ;;
5050
5051    mingw* | pw32* | os2*)
5052      # This hack is so that the source file can tell whether it is being
5053      # built for inclusion in a dll (and should export symbols for example).
5054      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5055      ;;
5056
5057    hpux9* | hpux10* | hpux11*)
5058      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5059      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5060      # not for PA HP-UX.
5061      case "$host_cpu" in
5062      hppa*64*|ia64*)
5063        # +Z the default
5064        ;;
5065      *)
5066        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5067        ;;
5068      esac
5069      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5070      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5071      ;;
5072
5073    irix5* | irix6* | nonstopux*)
5074      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5075      # PIC (with -KPIC) is the default.
5076      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5077      ;;
5078
5079    newsos6)
5080      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5081      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5082      ;;
5083
5084    linux*)
5085      case $CC in
5086      icc* | ecc*)
5087        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5088        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5089        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5090        ;;
5091      ccc*)
5092        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5093        # All Alpha code is PIC.
5094        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5095        ;;
5096      esac
5097      ;;
5098
5099    osf3* | osf4* | osf5*)
5100      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5101      # All OSF/1 code is PIC.
5102      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5103      ;;
5104
5105    sco3.2v5*)
5106      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5107      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5108      ;;
5109
5110    solaris*)
5111      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5112      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5113      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5114      ;;
5115
5116    sunos4*)
5117      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5118      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5119      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5120      ;;
5121
5122    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5123      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5124      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5125      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5126      ;;
5127
5128    sysv4*MP*)
5129      if test -d /usr/nec ;then
5130        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5131        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5132      fi
5133      ;;
5134
5135    uts4*)
5136      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5137      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5138      ;;
5139
5140    *)
5141      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5142      ;;
5143    esac
5144  fi
5145])
5146AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5147
5148#
5149# Check to make sure the PIC flag actually works.
5150#
5151if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5152  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5153    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5154    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5155    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5156     "" | " "*) ;;
5157     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5158     esac],
5159    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5160     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5161fi
5162case "$host_os" in
5163  # For platforms which do not support PIC, -DPIC is meaningless:
5164  *djgpp*)
5165    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5166    ;;
5167  *)
5168    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5169    ;;
5170esac
5171])
5172
5173
5174# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5175# ------------------------------------
5176# See if the linker supports building shared libraries.
5177AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5178[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5179ifelse([$1],[CXX],[
5180  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5181  case $host_os in
5182  aix4* | aix5*)
5183    # If we're using GNU nm, then we don't want the "-C" option.
5184    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5185    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5186      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5187    else
5188      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5189    fi
5190    ;;
5191  pw32*)
5192    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5193  ;;
5194  cygwin* | mingw*)
5195    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5196  ;;
5197  *)
5198    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5199  ;;
5200  esac
5201],[
5202  runpath_var=
5203  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5204  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5205  _LT_AC_TAGVAR(archive_cmds, $1)=
5206  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5207  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5208  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5209  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5210  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5211  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5212  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5213  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5214  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5215  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5216  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5217  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5218  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5219  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5220  _LT_AC_TAGVAR(module_cmds, $1)=
5221  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5222  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5223  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5224  # include_expsyms should be a list of space-separated symbols to be *always*
5225  # included in the symbol list
5226  _LT_AC_TAGVAR(include_expsyms, $1)=
5227  # exclude_expsyms can be an extended regexp of symbols to exclude
5228  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5229  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5230  # as well as any symbol that contains `d'.
5231  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5232  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5233  # platforms (ab)use it in PIC code, but their linkers get confused if
5234  # the symbol is explicitly referenced.  Since portable code cannot
5235  # rely on this symbol name, it's probably fine to never include it in
5236  # preloaded symbol tables.
5237  extract_expsyms_cmds=
5238
5239  case $host_os in
5240  cygwin* | mingw* | pw32*)
5241    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5242    # When not using gcc, we currently assume that we are using
5243    # Microsoft Visual C++.
5244    if test "$GCC" != yes; then
5245      with_gnu_ld=no
5246    fi
5247    ;;
5248  openbsd*)
5249    with_gnu_ld=no
5250    ;;
5251  esac
5252
5253  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5254  if test "$with_gnu_ld" = yes; then
5255    # If archive_cmds runs LD, not CC, wlarc should be empty
5256    wlarc='${wl}'
5257
5258    # See if GNU ld supports shared libraries.
5259    case $host_os in
5260    aix3* | aix4* | aix5*)
5261      # On AIX/PPC, the GNU linker is very broken
5262      if test "$host_cpu" != ia64; then
5263        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5264        cat <<EOF 1>&2
5265
5266*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5267*** to be unable to reliably create shared libraries on AIX.
5268*** Therefore, libtool is disabling shared libraries support.  If you
5269*** really care for shared libraries, you may want to modify your PATH
5270*** so that a non-GNU linker is found, and then restart.
5271
5272EOF
5273      fi
5274      ;;
5275
5276    amigaos*)
5277      _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
5278      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5279      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5280
5281      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5282      # that the semantics of dynamic libraries on AmigaOS, at least up
5283      # to version 4, is to share data among multiple programs linked
5284      # with the same dynamic library.  Since this doesn't match the
5285      # behavior of shared libraries on other platforms, we can't use
5286      # them.
5287      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5288      ;;
5289
5290    beos*)
5291      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5292        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5293        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5294        # support --undefined.  This deserves some investigation.  FIXME
5295        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5296      else
5297        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5298      fi
5299      ;;
5300
5301    cygwin* | mingw* | pw32*)
5302      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5303      # as there is no search path for DLLs.
5304      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5305      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5306      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5307      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5308      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5309
5310      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5311        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5312        # If the export-symbols file already is a .def file (1st line
5313        # is EXPORTS), use it as is; otherwise, prepend...
5314        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5315          cp $export_symbols $output_objdir/$soname.def;
5316        else
5317          echo EXPORTS > $output_objdir/$soname.def;
5318          cat $export_symbols >> $output_objdir/$soname.def;
5319        fi~
5320        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
5321      else
5322        ld_shlibs=no
5323      fi
5324      ;;
5325
5326    netbsd*)
5327      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5328        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5329        wlarc=
5330      else
5331        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5332        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5333      fi
5334      ;;
5335
5336    solaris* | sysv5*)
5337      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5338        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5339        cat <<EOF 1>&2
5340
5341*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5342*** create shared libraries on Solaris systems.  Therefore, libtool
5343*** is disabling shared libraries support.  We urge you to upgrade GNU
5344*** binutils to release 2.9.1 or newer.  Another option is to modify
5345*** your PATH or compiler configuration so that the native linker is
5346*** used, and then restart.
5347
5348EOF
5349      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5350        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5351        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5352      else
5353        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5354      fi
5355      ;;
5356
5357    sunos4*)
5358      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5359      wlarc=
5360      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5361      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5362      ;;
5363
5364  linux*)
5365    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5366        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5367        _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
5368      supports_anon_versioning=no
5369      case `$LD -v 2>/dev/null` in
5370        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5371        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5372        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5373        *\ 2.11.*) ;; # other 2.11 versions
5374        *) supports_anon_versioning=yes ;;
5375      esac
5376      if test $supports_anon_versioning = yes; then
5377        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5378cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5379$echo "local: *; };" >> $output_objdir/$libname.ver~
5380        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5381      else
5382        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
5383      fi
5384    else
5385      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5386    fi
5387    ;;
5388
5389    *)
5390      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5391        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5392        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5393      else
5394        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5395      fi
5396      ;;
5397    esac
5398
5399    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5400      runpath_var=LD_RUN_PATH
5401      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5402      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5403      # ancient GNU ld didn't support --whole-archive et. al.
5404      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5405        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5406      else
5407        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5408      fi
5409    fi
5410  else
5411    # PORTME fill in a description of your system's linker (not GNU ld)
5412    case $host_os in
5413    aix3*)
5414      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5415      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5416      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5417      # Note: this linker hardcodes the directories in LIBPATH if there
5418      # are no directories specified by -L.
5419      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5420      if test "$GCC" = yes && test -z "$link_static_flag"; then
5421        # Neither direct hardcoding nor static linking is supported with a
5422        # broken collect2.
5423        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5424      fi
5425      ;;
5426
5427    aix4* | aix5*)
5428      if test "$host_cpu" = ia64; then
5429        # On IA64, the linker does run time linking by default, so we don't
5430        # have to do anything special.
5431        aix_use_runtimelinking=no
5432        exp_sym_flag='-Bexport'
5433        no_entry_flag=""
5434      else
5435        # If we're using GNU nm, then we don't want the "-C" option.
5436        # -C means demangle to AIX nm, but means don't demangle with GNU nm
5437        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5438          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5439        else
5440          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5441        fi
5442        aix_use_runtimelinking=no
5443
5444        # Test if we are trying to use run time linking or normal
5445        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5446        # need to do runtime linking.
5447        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5448          for ld_flag in $LDFLAGS; do
5449          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5450            aix_use_runtimelinking=yes
5451            break
5452          fi
5453          done
5454        esac
5455
5456        exp_sym_flag='-bexport'
5457        no_entry_flag='-bnoentry'
5458      fi
5459
5460      # When large executables or shared objects are built, AIX ld can
5461      # have problems creating the table of contents.  If linking a library
5462      # or program results in "error TOC overflow" add -mminimal-toc to
5463      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5464      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5465
5466      _LT_AC_TAGVAR(archive_cmds, $1)=''
5467      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5468      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5469      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5470
5471      if test "$GCC" = yes; then
5472        case $host_os in aix4.[012]|aix4.[012].*)
5473        # We only want to do this on AIX 4.2 and lower, the check
5474        # below for broken collect2 doesn't work under 4.3+
5475          collect2name=`${CC} -print-prog-name=collect2`
5476          if test -f "$collect2name" && \
5477           strings "$collect2name" | grep resolve_lib_name >/dev/null
5478          then
5479          # We have reworked collect2
5480          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5481          else
5482          # We have old collect2
5483          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5484          # It fails to find uninstalled libraries when the uninstalled
5485          # path is not listed in the libpath.  Setting hardcode_minus_L
5486          # to unsupported forces relinking
5487          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5488          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5489          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5490          fi
5491        esac
5492        shared_flag='-shared'
5493      else
5494        # not using gcc
5495        if test "$host_cpu" = ia64; then
5496        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5497        # chokes on -Wl,-G. The following line is correct:
5498          shared_flag='-G'
5499        else
5500        if test "$aix_use_runtimelinking" = yes; then
5501            shared_flag='${wl}-G'
5502          else
5503            shared_flag='${wl}-bM:SRE'
5504        fi
5505        fi
5506      fi
5507
5508      # It seems that -bexpall does not export symbols beginning with
5509      # underscore (_), so it is better to generate a list of symbols to export.
5510      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5511      if test "$aix_use_runtimelinking" = yes; then
5512        # Warning - without using the other runtime loading flags (-brtl),
5513        # -berok will link without error, but may produce a broken library.
5514        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5515       # Determine the default libpath from the value encoded in an empty executable.
5516       _LT_AC_SYS_LIBPATH_AIX
5517       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5518        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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"
5519       else
5520        if test "$host_cpu" = ia64; then
5521          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5522          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5523          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5524        else
5525         # Determine the default libpath from the value encoded in an empty executable.
5526         _LT_AC_SYS_LIBPATH_AIX
5527         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5528          # Warning - without using the other run time loading flags,
5529          # -berok will link without error, but may produce a broken library.
5530          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5531          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5532          # -bexpall does not export symbols beginning with underscore (_)
5533          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5534          # Exported symbols can be pulled into shared objects from archives
5535          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5536          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5537          # This is similar to how AIX traditionally builds it's shared libraries.
5538          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5539        fi
5540      fi
5541      ;;
5542
5543    amigaos*)
5544      _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
5545      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5546      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5547      # see comment about different semantics on the GNU ld section
5548      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5549      ;;
5550
5551    bsdi4*)
5552      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5553      ;;
5554
5555    cygwin* | mingw* | pw32*)
5556      # When not using gcc, we currently assume that we are using
5557      # Microsoft Visual C++.
5558      # hardcode_libdir_flag_spec is actually meaningless, as there is
5559      # no search path for DLLs.
5560      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5561      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5562      # Tell ltmain to make .lib files, not .a files.
5563      libext=lib
5564      # Tell ltmain to make .dll files, not .so files.
5565      shrext=".dll"
5566      # FIXME: Setting linknames here is a bad hack.
5567      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5568      # The linker will automatically build a .lib file if we build a DLL.
5569      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5570      # FIXME: Should let the user specify the lib program.
5571      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5572      fix_srcfile_path='`cygpath -w "$srcfile"`'
5573      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5574      ;;
5575
5576    darwin* | rhapsody*)
5577    if test "$GXX" = yes ; then
5578      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5579      case "$host_os" in
5580      rhapsody* | darwin1.[[012]])
5581        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5582        ;;
5583      *) # Darwin 1.3 on
5584      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5585        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5586      else
5587        case ${MACOSX_DEPLOYMENT_TARGET} in
5588          10.[[012]])
5589            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5590            ;;
5591          10.*)
5592            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
5593            ;;
5594        esac
5595      fi
5596        ;;
5597      esac
5598        lt_int_apple_cc_single_mod=no
5599        output_verbose_link_cmd='echo'
5600        if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
5601          lt_int_apple_cc_single_mod=yes
5602        fi
5603        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5604          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5605        else
5606        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5607      fi
5608      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5609      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5610        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5611          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5612        else
5613          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5614        fi
5615          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5616      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5617      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5618      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5619      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5620      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5621    else
5622      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5623    fi
5624      ;;
5625
5626    dgux*)
5627      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5628      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5629      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5630      ;;
5631
5632    freebsd1*)
5633      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5634      ;;
5635
5636    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5637    # support.  Future versions do this automatically, but an explicit c++rt0.o
5638    # does not break anything, and helps significantly (at the cost of a little
5639    # extra space).
5640    freebsd2.2*)
5641      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5642      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5643      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5644      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5645      ;;
5646
5647    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5648    freebsd2*)
5649      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5650      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5651      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5652      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5653      ;;
5654
5655    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5656    freebsd* | kfreebsd*-gnu)
5657      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5658      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5659      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5660      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5661      ;;
5662
5663    hpux9*)
5664      if test "$GCC" = yes; then
5665        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5666      else
5667        _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5668      fi
5669      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5670      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5671      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5672
5673      # hardcode_minus_L: Not really in the search PATH,
5674      # but as the default location of the library.
5675      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5676      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5677      ;;
5678
5679    hpux10* | hpux11*)
5680      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5681        case "$host_cpu" in
5682        hppa*64*|ia64*)
5683          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5684          ;;
5685        *)
5686          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5687          ;;
5688        esac
5689      else
5690        case "$host_cpu" in
5691        hppa*64*|ia64*)
5692          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5693          ;;
5694        *)
5695          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5696          ;;
5697        esac
5698      fi
5699      if test "$with_gnu_ld" = no; then
5700        case "$host_cpu" in
5701        hppa*64*)
5702          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5703          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5704          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5705          _LT_AC_TAGVAR(hardcode_direct, $1)=no
5706          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5707          ;;
5708        ia64*)
5709          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5710          _LT_AC_TAGVAR(hardcode_direct, $1)=no
5711          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5712
5713          # hardcode_minus_L: Not really in the search PATH,
5714          # but as the default location of the library.
5715          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5716          ;;
5717        *)
5718          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5719          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5720          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5721          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5722
5723          # hardcode_minus_L: Not really in the search PATH,
5724          # but as the default location of the library.
5725          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5726          ;;
5727        esac
5728      fi
5729      ;;
5730
5731    irix5* | irix6* | nonstopux*)
5732      if test "$GCC" = yes; then
5733        _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5734      else
5735        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5736        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5737      fi
5738      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5739      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5740      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5741      ;;
5742
5743    netbsd*)
5744      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5745        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5746      else
5747        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5748      fi
5749      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5750      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5751      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5752      ;;
5753
5754    newsos6)
5755      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5756      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5757      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5758      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5759      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5760      ;;
5761
5762    openbsd*)
5763      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5764      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5765      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5766        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5767        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5768        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5769      else
5770       case $host_os in
5771         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5772           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5773           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5774           ;;
5775         *)
5776           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5777           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5778           ;;
5779       esac
5780      fi
5781      ;;
5782
5783    os2*)
5784      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5785      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5786      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5787      _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5788      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5789      ;;
5790
5791    osf3*)
5792      if test "$GCC" = yes; then
5793        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5794        _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5795      else
5796        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5797        _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5798      fi
5799      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5800      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5801      ;;
5802
5803    osf4* | osf5*)      # as osf3* with the addition of -msym flag
5804      if test "$GCC" = yes; then
5805        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5806        _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5807        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5808      else
5809        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5810        _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5811        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5812        $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'
5813
5814        # Both c and cxx compiler support -rpath directly
5815        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5816      fi
5817      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5818      ;;
5819
5820    sco3.2v5*)
5821      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5822      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5823      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5824      runpath_var=LD_RUN_PATH
5825      hardcode_runpath_var=yes
5826      ;;
5827
5828    solaris*)
5829      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5830      if test "$GCC" = yes; then
5831        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5832        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5833          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5834      else
5835        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5836        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5837        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5838      fi
5839      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5840      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5841      case $host_os in
5842      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5843      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5844        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5845      esac
5846      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5847      ;;
5848
5849    sunos4*)
5850      if test "x$host_vendor" = xsequent; then
5851        # Use $CC to link under sequent, because it throws in some extra .o
5852        # files that make .init and .fini sections work.
5853        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5854      else
5855        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5856      fi
5857      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5858      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5859      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5860      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5861      ;;
5862
5863    sysv4)
5864      case $host_vendor in
5865        sni)
5866          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5867          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5868        ;;
5869        siemens)
5870          ## LD is ld it makes a PLAMLIB
5871          ## CC just makes a GrossModule.
5872          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5873          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5874          _LT_AC_TAGVAR(hardcode_direct, $1)=no
5875        ;;
5876        motorola)
5877          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5878          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5879        ;;
5880      esac
5881      runpath_var='LD_RUN_PATH'
5882      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5883      ;;
5884
5885    sysv4.3*)
5886      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5887      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5888      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5889      ;;
5890
5891    sysv4*MP*)
5892      if test -d /usr/nec; then
5893        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5894        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5895        runpath_var=LD_RUN_PATH
5896        hardcode_runpath_var=yes
5897        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5898      fi
5899      ;;
5900
5901    sysv4.2uw2*)
5902      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5903      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5904      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5905      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5906      hardcode_runpath_var=yes
5907      runpath_var=LD_RUN_PATH
5908      ;;
5909
5910   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
5911      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5912      if test "$GCC" = yes; then
5913        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5914      else
5915        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5916      fi
5917      runpath_var='LD_RUN_PATH'
5918      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5919      ;;
5920
5921    sysv5*)
5922      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5923      # $CC -shared without GNU ld will not create a library from C++
5924      # object files and a static libstdc++, better avoid it by now
5925      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5926      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5927                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5928      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5929      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5930      runpath_var='LD_RUN_PATH'
5931      ;;
5932
5933    uts4*)
5934      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5935      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5936      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5937      ;;
5938
5939    *)
5940      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5941      ;;
5942    esac
5943  fi
5944])
5945AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5946test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5947
5948variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5949if test "$GCC" = yes; then
5950  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5951fi
5952
5953#
5954# Do we need to explicitly link libc?
5955#
5956case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
5957x|xyes)
5958  # Assume -lc should be added
5959  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5960
5961  if test "$enable_shared" = yes && test "$GCC" = yes; then
5962    case $_LT_AC_TAGVAR(archive_cmds, $1) in
5963    *'~'*)
5964      # FIXME: we may have to deal with multi-command sequences.
5965      ;;
5966    '$CC '*)
5967      # Test whether the compiler implicitly links with -lc since on some
5968      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5969      # to ld, don't add -lc before -lgcc.
5970      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5971      $rm conftest*
5972      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
5973
5974      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5975        soname=conftest
5976        lib=conftest
5977        libobjs=conftest.$ac_objext
5978        deplibs=
5979        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5980        compiler_flags=-v
5981        linker_flags=-v
5982        verstring=
5983        output_objdir=.
5984        libname=conftest
5985        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5986        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5987        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5988        then
5989          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5990        else
5991          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5992        fi
5993        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5994      else
5995        cat conftest.err 1>&5
5996      fi
5997      $rm conftest*
5998      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5999      ;;
6000    esac
6001  fi
6002  ;;
6003esac
6004])# AC_LIBTOOL_PROG_LD_SHLIBS
6005
6006
6007# _LT_AC_FILE_LTDLL_C
6008# -------------------
6009# Be careful that the start marker always follows a newline.
6010AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6011# /* ltdll.c starts here */
6012# #define WIN32_LEAN_AND_MEAN
6013# #include <windows.h>
6014# #undef WIN32_LEAN_AND_MEAN
6015# #include <stdio.h>
6016#
6017# #ifndef __CYGWIN__
6018# #  ifdef __CYGWIN32__
6019# #    define __CYGWIN__ __CYGWIN32__
6020# #  endif
6021# #endif
6022#
6023# #ifdef __cplusplus
6024# extern "C" {
6025# #endif
6026# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6027# #ifdef __cplusplus
6028# }
6029# #endif
6030#
6031# #ifdef __CYGWIN__
6032# #include <cygwin/cygwin_dll.h>
6033# DECLARE_CYGWIN_DLL( DllMain );
6034# #endif
6035# HINSTANCE __hDllInstance_base;
6036#
6037# BOOL APIENTRY
6038# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6039# {
6040#   __hDllInstance_base = hInst;
6041#   return TRUE;
6042# }
6043# /* ltdll.c ends here */
6044])# _LT_AC_FILE_LTDLL_C
6045
6046
6047# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6048# ---------------------------------
6049AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6050
6051
6052# old names
6053AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6054AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6055AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6056AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6057AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6058AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6059AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6060
6061# This is just to silence aclocal about the macro not being used
6062ifelse([AC_DISABLE_FAST_INSTALL])
6063
6064AC_DEFUN([LT_AC_PROG_GCJ],
6065[AC_CHECK_TOOL(GCJ, gcj, no)
6066  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6067  AC_SUBST(GCJFLAGS)
6068])
6069
6070AC_DEFUN([LT_AC_PROG_RC],
6071[AC_CHECK_TOOL(RC, windres, no)
6072])
6073
6074# NOTE: This macro has been submitted for inclusion into   #
6075#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6076#  a released version of Autoconf we should remove this    #
6077#  macro and use it instead.                               #
6078# LT_AC_PROG_SED
6079# --------------
6080# Check for a fully-functional sed program, that truncates
6081# as few characters as possible.  Prefer GNU sed if found.
6082AC_DEFUN([LT_AC_PROG_SED],
6083[AC_MSG_CHECKING([for a sed that does not truncate output])
6084AC_CACHE_VAL(lt_cv_path_SED,
6085[# Loop through the user's path and test for sed and gsed.
6086# Then use that list of sed's as ones to test for truncation.
6087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6088for as_dir in $PATH
6089do
6090  IFS=$as_save_IFS
6091  test -z "$as_dir" && as_dir=.
6092  for lt_ac_prog in sed gsed; do
6093    for ac_exec_ext in '' $ac_executable_extensions; do
6094      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6095        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6096      fi
6097    done
6098  done
6099done
6100lt_ac_max=0
6101lt_ac_count=0
6102# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6103# along with /bin/sed that truncates output.
6104for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6105  test ! -f $lt_ac_sed && break
6106  cat /dev/null > conftest.in
6107  lt_ac_count=0
6108  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6109  # Check for GNU sed and select it if it is found.
6110  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6111    lt_cv_path_SED=$lt_ac_sed
6112    break
6113  fi
6114  while true; do
6115    cat conftest.in conftest.in >conftest.tmp
6116    mv conftest.tmp conftest.in
6117    cp conftest.in conftest.nl
6118    echo >>conftest.nl
6119    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6120    cmp -s conftest.out conftest.nl || break
6121    # 10000 chars as input seems more than enough
6122    test $lt_ac_count -gt 10 && break
6123    lt_ac_count=`expr $lt_ac_count + 1`
6124    if test $lt_ac_count -gt $lt_ac_max; then
6125      lt_ac_max=$lt_ac_count
6126      lt_cv_path_SED=$lt_ac_sed
6127    fi
6128  done
6129done
6130SED=$lt_cv_path_SED
6131])
6132AC_MSG_RESULT([$SED])
6133])
6134
6135
6136dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
6137dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
6138dnl also defines GSTUFF_PKG_ERRORS on error
6139AC_DEFUN([PKG_CHECK_MODULES], [
6140  succeeded=no
6141
6142  if test -z "$PKG_CONFIG"; then
6143    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
6144  fi
6145
6146  if test "$PKG_CONFIG" = "no" ; then
6147     echo "*** The pkg-config script could not be found. Make sure it is"
6148     echo "*** in your path, or set the PKG_CONFIG environment variable"
6149     echo "*** to the full path to pkg-config."
6150     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
6151  else
6152     PKG_CONFIG_MIN_VERSION=0.9.0
6153     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6154        AC_MSG_CHECKING(for $2)
6155
6156        if $PKG_CONFIG --exists "$2" ; then
6157            AC_MSG_RESULT(yes)
6158            succeeded=yes
6159
6160            AC_MSG_CHECKING($1_CFLAGS)
6161            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
6162            AC_MSG_RESULT($$1_CFLAGS)
6163
6164            AC_MSG_CHECKING($1_LIBS)
6165            $1_LIBS=`$PKG_CONFIG --libs "$2"`
6166            AC_MSG_RESULT($$1_LIBS)
6167        else
6168            $1_CFLAGS=""
6169            $1_LIBS=""
6170            ## If we have a custom action on failure, don't print errors, but
6171            ## do set a variable so people can do so.
6172            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6173            ifelse([$4], ,echo $$1_PKG_ERRORS,)
6174        fi
6175
6176        AC_SUBST($1_CFLAGS)
6177        AC_SUBST($1_LIBS)
6178     else
6179        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6180        echo "*** See http://www.freedesktop.org/software/pkgconfig"
6181     fi
6182  fi
6183
6184  if test $succeeded = yes; then
6185     ifelse([$3], , :, [$3])
6186  else
6187     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])
6188  fi
6189])
6190
6191
6192
6193#                                                        -*- Autoconf -*-
6194# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
6195# Generated from amversion.in; do not edit by hand.
6196
6197# This program is free software; you can redistribute it and/or modify
6198# it under the terms of the GNU General Public License as published by
6199# the Free Software Foundation; either version 2, or (at your option)
6200# any later version.
6201
6202# This program is distributed in the hope that it will be useful,
6203# but WITHOUT ANY WARRANTY; without even the implied warranty of
6204# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6205# GNU General Public License for more details.
6206
6207# You should have received a copy of the GNU General Public License
6208# along with this program; if not, write to the Free Software
6209# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6210
6211# AM_AUTOMAKE_VERSION(VERSION)
6212# ----------------------------
6213# Automake X.Y traces this macro to ensure aclocal.m4 has been
6214# generated from the m4 files accompanying Automake X.Y.
6215AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
6216
6217# AM_SET_CURRENT_AUTOMAKE_VERSION
6218# -------------------------------
6219# Call AM_AUTOMAKE_VERSION so it can be traced.
6220# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6221AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6222         [AM_AUTOMAKE_VERSION([1.8.3])])
6223
6224# AM_AUX_DIR_EXPAND
6225
6226# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6227
6228# This program is free software; you can redistribute it and/or modify
6229# it under the terms of the GNU General Public License as published by
6230# the Free Software Foundation; either version 2, or (at your option)
6231# any later version.
6232
6233# This program is distributed in the hope that it will be useful,
6234# but WITHOUT ANY WARRANTY; without even the implied warranty of
6235# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6236# GNU General Public License for more details.
6237
6238# You should have received a copy of the GNU General Public License
6239# along with this program; if not, write to the Free Software
6240# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6241# 02111-1307, USA.
6242
6243# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6244# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6245# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6246#
6247# Of course, Automake must honor this variable whenever it calls a
6248# tool from the auxiliary directory.  The problem is that $srcdir (and
6249# therefore $ac_aux_dir as well) can be either absolute or relative,
6250# depending on how configure is run.  This is pretty annoying, since
6251# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6252# source directory, any form will work fine, but in subdirectories a
6253# relative path needs to be adjusted first.
6254#
6255# $ac_aux_dir/missing
6256#    fails when called from a subdirectory if $ac_aux_dir is relative
6257# $top_srcdir/$ac_aux_dir/missing
6258#    fails if $ac_aux_dir is absolute,
6259#    fails when called from a subdirectory in a VPATH build with
6260#          a relative $ac_aux_dir
6261#
6262# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6263# are both prefixed by $srcdir.  In an in-source build this is usually
6264# harmless because $srcdir is `.', but things will broke when you
6265# start a VPATH build or use an absolute $srcdir.
6266#
6267# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6268# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
6269#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6270# and then we would define $MISSING as
6271#   MISSING="\${SHELL} $am_aux_dir/missing"
6272# This will work as long as MISSING is not called from configure, because
6273# unfortunately $(top_srcdir) has no meaning in configure.
6274# However there are other variables, like CC, which are often used in
6275# configure, and could therefore not use this "fixed" $ac_aux_dir.
6276#
6277# Another solution, used here, is to always expand $ac_aux_dir to an
6278# absolute PATH.  The drawback is that using absolute paths prevent a
6279# configured tree to be moved without reconfiguration.
6280
6281AC_DEFUN([AM_AUX_DIR_EXPAND],
6282[dnl Rely on autoconf to set up CDPATH properly.
6283AC_PREREQ([2.50])dnl
6284# expand $ac_aux_dir to an absolute path
6285am_aux_dir=`cd $ac_aux_dir && pwd`
6286])
6287
6288
6289# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003
6290# Free Software Foundation, Inc.
6291
6292# This program is free software; you can redistribute it and/or modify
6293# it under the terms of the GNU General Public License as published by
6294# the Free Software Foundation; either version 2, or (at your option)
6295# any later version.
6296
6297# This program is distributed in the hope that it will be useful,
6298# but WITHOUT ANY WARRANTY; without even the implied warranty of
6299# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6300# GNU General Public License for more details.
6301
6302# You should have received a copy of the GNU General Public License
6303# along with this program; if not, write to the Free Software
6304# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6305# 02111-1307, USA.
6306
6307# serial 3
6308
6309# This was merged into AC_PROG_CC in Autoconf.
6310
6311AU_DEFUN([AM_PROG_CC_STDC],
6312[AC_PROG_CC
6313AC_DIAGNOSE([obsolete], [$0:
6314        your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
6315        `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
6316        you adjust the code.  You can also remove the above call to
6317        AC_PROG_CC if you already called it elsewhere.])
6318am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6319])
6320AU_DEFUN([fp_PROG_CC_STDC])
6321
6322# AM_CONDITIONAL                                              -*- Autoconf -*-
6323
6324# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6325
6326# This program is free software; you can redistribute it and/or modify
6327# it under the terms of the GNU General Public License as published by
6328# the Free Software Foundation; either version 2, or (at your option)
6329# any later version.
6330
6331# This program is distributed in the hope that it will be useful,
6332# but WITHOUT ANY WARRANTY; without even the implied warranty of
6333# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6334# GNU General Public License for more details.
6335
6336# You should have received a copy of the GNU General Public License
6337# along with this program; if not, write to the Free Software
6338# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6339# 02111-1307, USA.
6340
6341# serial 6
6342
6343# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6344# -------------------------------------
6345# Define a conditional.
6346AC_DEFUN([AM_CONDITIONAL],
6347[AC_PREREQ(2.52)dnl
6348 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6349        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6350AC_SUBST([$1_TRUE])
6351AC_SUBST([$1_FALSE])
6352if $2; then
6353  $1_TRUE=
6354  $1_FALSE='#'
6355else
6356  $1_TRUE='#'
6357  $1_FALSE=
6358fi
6359AC_CONFIG_COMMANDS_PRE(
6360[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6361  AC_MSG_ERROR([conditional "$1" was never defined.
6362Usually this means the macro was only invoked conditionally.])
6363fi])])
6364
6365# serial 7                                              -*- Autoconf -*-
6366
6367# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
6368# Free Software Foundation, Inc.
6369
6370# This program is free software; you can redistribute it and/or modify
6371# it under the terms of the GNU General Public License as published by
6372# the Free Software Foundation; either version 2, or (at your option)
6373# any later version.
6374
6375# This program is distributed in the hope that it will be useful,
6376# but WITHOUT ANY WARRANTY; without even the implied warranty of
6377# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6378# GNU General Public License for more details.
6379
6380# You should have received a copy of the GNU General Public License
6381# along with this program; if not, write to the Free Software
6382# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6383# 02111-1307, USA.
6384
6385
6386# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6387# written in clear, in which case automake, when reading aclocal.m4,
6388# will think it sees a *use*, and therefore will trigger all it's
6389# C support machinery.  Also note that it means that autoscan, seeing
6390# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6391
6392
6393
6394# _AM_DEPENDENCIES(NAME)
6395# ----------------------
6396# See how the compiler implements dependency checking.
6397# NAME is "CC", "CXX", "GCJ", or "OBJC".
6398# We try a few techniques and use that to set a single cache variable.
6399#
6400# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6401# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6402# dependency, and given that the user is not expected to run this macro,
6403# just rely on AC_PROG_CC.
6404AC_DEFUN([_AM_DEPENDENCIES],
6405[AC_REQUIRE([AM_SET_DEPDIR])dnl
6406AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6407AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6408AC_REQUIRE([AM_DEP_TRACK])dnl
6409
6410ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6411       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6412       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6413       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6414                   [depcc="$$1"   am_compiler_list=])
6415
6416AC_CACHE_CHECK([dependency style of $depcc],
6417               [am_cv_$1_dependencies_compiler_type],
6418[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6419  # We make a subdir and do the tests there.  Otherwise we can end up
6420  # making bogus files that we don't know about and never remove.  For
6421  # instance it was reported that on HP-UX the gcc test will end up
6422  # making a dummy file named `D' -- because `-MD' means `put the output
6423  # in D'.
6424  mkdir conftest.dir
6425  # Copy depcomp to subdir because otherwise we won't find it if we're
6426  # using a relative directory.
6427  cp "$am_depcomp" conftest.dir
6428  cd conftest.dir
6429  # We will build objects and dependencies in a subdirectory because
6430  # it helps to detect inapplicable dependency modes.  For instance
6431  # both Tru64's cc and ICC support -MD to output dependencies as a
6432  # side effect of compilation, but ICC will put the dependencies in
6433  # the current directory while Tru64 will put them in the object
6434  # directory.
6435  mkdir sub
6436
6437  am_cv_$1_dependencies_compiler_type=none
6438  if test "$am_compiler_list" = ""; then
6439     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6440  fi
6441  for depmode in $am_compiler_list; do
6442    # Setup a source with many dependencies, because some compilers
6443    # like to wrap large dependency lists on column 80 (with \), and
6444    # we should not choose a depcomp mode which is confused by this.
6445    #
6446    # We need to recreate these files for each test, as the compiler may
6447    # overwrite some of them when testing with obscure command lines.
6448    # This happens at least with the AIX C compiler.
6449    : > sub/conftest.c
6450    for i in 1 2 3 4 5 6; do
6451      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6452      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6453      # Solaris 8's {/usr,}/bin/sh.
6454      touch sub/conftst$i.h
6455    done
6456    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6457
6458    case $depmode in
6459    nosideeffect)
6460      # after this tag, mechanisms are not by side-effect, so they'll
6461      # only be used when explicitly requested
6462      if test "x$enable_dependency_tracking" = xyes; then
6463        continue
6464      else
6465        break
6466      fi
6467      ;;
6468    none) break ;;
6469    esac
6470    # We check with `-c' and `-o' for the sake of the "dashmstdout"
6471    # mode.  It turns out that the SunPro C++ compiler does not properly
6472    # handle `-M -o', and we need to detect this.
6473    if depmode=$depmode \
6474       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6475       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6476       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6477         >/dev/null 2>conftest.err &&
6478       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6479       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6480       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6481      # icc doesn't choke on unknown options, it will just issue warnings
6482      # (even with -Werror).  So we grep stderr for any message
6483      # that says an option was ignored.
6484      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
6485        am_cv_$1_dependencies_compiler_type=$depmode
6486        break
6487      fi
6488    fi
6489  done
6490
6491  cd ..
6492  rm -rf conftest.dir
6493else
6494  am_cv_$1_dependencies_compiler_type=none
6495fi
6496])
6497AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6498AM_CONDITIONAL([am__fastdep$1], [
6499  test "x$enable_dependency_tracking" != xno \
6500  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6501])
6502
6503
6504# AM_SET_DEPDIR
6505# -------------
6506# Choose a directory name for dependency files.
6507# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6508AC_DEFUN([AM_SET_DEPDIR],
6509[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6510AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6511])
6512
6513
6514# AM_DEP_TRACK
6515# ------------
6516AC_DEFUN([AM_DEP_TRACK],
6517[AC_ARG_ENABLE(dependency-tracking,
6518[  --disable-dependency-tracking  speeds up one-time build
6519  --enable-dependency-tracking   do not reject slow dependency extractors])
6520if test "x$enable_dependency_tracking" != xno; then
6521  am_depcomp="$ac_aux_dir/depcomp"
6522  AMDEPBACKSLASH='\'
6523fi
6524AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6525AC_SUBST([AMDEPBACKSLASH])
6526])
6527
6528# Generate code to set up dependency tracking.   -*- Autoconf -*-
6529
6530# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
6531
6532# This program is free software; you can redistribute it and/or modify
6533# it under the terms of the GNU General Public License as published by
6534# the Free Software Foundation; either version 2, or (at your option)
6535# any later version.
6536
6537# This program is distributed in the hope that it will be useful,
6538# but WITHOUT ANY WARRANTY; without even the implied warranty of
6539# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6540# GNU General Public License for more details.
6541
6542# You should have received a copy of the GNU General Public License
6543# along with this program; if not, write to the Free Software
6544# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6545# 02111-1307, USA.
6546
6547#serial 2
6548
6549# _AM_OUTPUT_DEPENDENCY_COMMANDS
6550# ------------------------------
6551AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6552[for mf in $CONFIG_FILES; do
6553  # Strip MF so we end up with the name of the file.
6554  mf=`echo "$mf" | sed -e 's/:.*$//'`
6555  # Check whether this is an Automake generated Makefile or not.
6556  # We used to match only the files named `Makefile.in', but
6557  # some people rename them; so instead we look at the file content.
6558  # Grep'ing the first line is not enough: some people post-process
6559  # each Makefile.in and add a new line on top of each file to say so.
6560  # So let's grep whole file.
6561  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6562    dirpart=`AS_DIRNAME("$mf")`
6563  else
6564    continue
6565  fi
6566  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
6567  # Extract the definition of DEP_FILES from the Makefile without
6568  # running `make'.
6569  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6570  test -z "$DEPDIR" && continue
6571  # When using ansi2knr, U may be empty or an underscore; expand it
6572  U=`sed -n 's/^U = //p' < "$mf"`
6573  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
6574  # We invoke sed twice because it is the simplest approach to
6575  # changing $(DEPDIR) to its actual value in the expansion.
6576  for file in `sed -n '
6577    /^DEP_FILES = .*\\\\$/ {
6578      s/^DEP_FILES = //
6579      :loop
6580        s/\\\\$//
6581        p
6582        n
6583        /\\\\$/ b loop
6584      p
6585    }
6586    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
6587       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6588    # Make sure the directory exists.
6589    test -f "$dirpart/$file" && continue
6590    fdir=`AS_DIRNAME(["$file"])`
6591    AS_MKDIR_P([$dirpart/$fdir])
6592    # echo "creating $dirpart/$file"
6593    echo '# dummy' > "$dirpart/$file"
6594  done
6595done
6596])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6597
6598
6599# AM_OUTPUT_DEPENDENCY_COMMANDS
6600# -----------------------------
6601# This macro should only be invoked once -- use via AC_REQUIRE.
6602#
6603# This code is only required when automatic dependency tracking
6604# is enabled.  FIXME.  This creates each `.P' file that we will
6605# need in order to bootstrap the dependency handling code.
6606AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6607[AC_CONFIG_COMMANDS([depfiles],
6608     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6609     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6610])
6611
6612# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
6613
6614# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6615
6616# This program is free software; you can redistribute it and/or modify
6617# it under the terms of the GNU General Public License as published by
6618# the Free Software Foundation; either version 2, or (at your option)
6619# any later version.
6620
6621# This program is distributed in the hope that it will be useful,
6622# but WITHOUT ANY WARRANTY; without even the implied warranty of
6623# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6624# GNU General Public License for more details.
6625
6626# You should have received a copy of the GNU General Public License
6627# along with this program; if not, write to the Free Software
6628# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6629# 02111-1307, USA.
6630
6631# serial 7
6632
6633# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
6634AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6635
6636# Do all the work for Automake.                            -*- Autoconf -*-
6637
6638# This macro actually does too much some checks are only needed if
6639# your package does certain things.  But this isn't really a big deal.
6640
6641# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
6642# Free Software Foundation, Inc.
6643
6644# This program is free software; you can redistribute it and/or modify
6645# it under the terms of the GNU General Public License as published by
6646# the Free Software Foundation; either version 2, or (at your option)
6647# any later version.
6648
6649# This program is distributed in the hope that it will be useful,
6650# but WITHOUT ANY WARRANTY; without even the implied warranty of
6651# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6652# GNU General Public License for more details.
6653
6654# You should have received a copy of the GNU General Public License
6655# along with this program; if not, write to the Free Software
6656# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6657# 02111-1307, USA.
6658
6659# serial 11
6660
6661# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6662# AM_INIT_AUTOMAKE([OPTIONS])
6663# -----------------------------------------------
6664# The call with PACKAGE and VERSION arguments is the old style
6665# call (pre autoconf-2.50), which is being phased out.  PACKAGE
6666# and VERSION should now be passed to AC_INIT and removed from
6667# the call to AM_INIT_AUTOMAKE.
6668# We support both call styles for the transition.  After
6669# the next Automake release, Autoconf can make the AC_INIT
6670# arguments mandatory, and then we can depend on a new Autoconf
6671# release and drop the old call support.
6672AC_DEFUN([AM_INIT_AUTOMAKE],
6673[AC_PREREQ([2.58])dnl
6674dnl Autoconf wants to disallow AM_ names.  We explicitly allow
6675dnl the ones we care about.
6676m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6677AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6678AC_REQUIRE([AC_PROG_INSTALL])dnl
6679# test to see if srcdir already configured
6680if test "`cd $srcdir && pwd`" != "`pwd`" &&
6681   test -f $srcdir/config.status; then
6682  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6683fi
6684
6685# test whether we have cygpath
6686if test -z "$CYGPATH_W"; then
6687  if (cygpath --version) >/dev/null 2>/dev/null; then
6688    CYGPATH_W='cygpath -w'
6689  else
6690    CYGPATH_W=echo
6691  fi
6692fi
6693AC_SUBST([CYGPATH_W])
6694
6695# Define the identity of the package.
6696dnl Distinguish between old-style and new-style calls.
6697m4_ifval([$2],
6698[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6699 AC_SUBST([PACKAGE], [$1])dnl
6700 AC_SUBST([VERSION], [$2])],
6701[_AM_SET_OPTIONS([$1])dnl
6702 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6703 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6704
6705_AM_IF_OPTION([no-define],,
6706[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6707 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6708
6709# Some tools Automake needs.
6710AC_REQUIRE([AM_SANITY_CHECK])dnl
6711AC_REQUIRE([AC_ARG_PROGRAM])dnl
6712AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6713AM_MISSING_PROG(AUTOCONF, autoconf)
6714AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6715AM_MISSING_PROG(AUTOHEADER, autoheader)
6716AM_MISSING_PROG(MAKEINFO, makeinfo)
6717AM_MISSING_PROG(AMTAR, tar)
6718AM_PROG_INSTALL_SH
6719AM_PROG_INSTALL_STRIP
6720AC_REQUIRE([AM_PROG_MKDIR_P])dnl
6721# We need awk for the "check" target.  The system "awk" is bad on
6722# some platforms.
6723AC_REQUIRE([AC_PROG_AWK])dnl
6724AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6725AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6726
6727_AM_IF_OPTION([no-dependencies],,
6728[AC_PROVIDE_IFELSE([AC_PROG_CC],
6729                  [_AM_DEPENDENCIES(CC)],
6730                  [define([AC_PROG_CC],
6731                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6732AC_PROVIDE_IFELSE([AC_PROG_CXX],
6733                  [_AM_DEPENDENCIES(CXX)],
6734                  [define([AC_PROG_CXX],
6735                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6736])
6737])
6738
6739
6740# When config.status generates a header, we must update the stamp-h file.
6741# This file resides in the same directory as the config header
6742# that is generated.  The stamp files are numbered to have different names.
6743
6744# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6745# loop where config.status creates the headers, so we can generate
6746# our stamp files there.
6747AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6748[# Compute $1's index in $config_headers.
6749_am_stamp_count=1
6750for _am_header in $config_headers :; do
6751  case $_am_header in
6752    $1 | $1:* )
6753      break ;;
6754    * )
6755      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6756  esac
6757done
6758echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6759
6760# AM_PROG_INSTALL_SH
6761# ------------------
6762# Define $install_sh.
6763
6764# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6765
6766# This program is free software; you can redistribute it and/or modify
6767# it under the terms of the GNU General Public License as published by
6768# the Free Software Foundation; either version 2, or (at your option)
6769# any later version.
6770
6771# This program is distributed in the hope that it will be useful,
6772# but WITHOUT ANY WARRANTY; without even the implied warranty of
6773# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6774# GNU General Public License for more details.
6775
6776# You should have received a copy of the GNU General Public License
6777# along with this program; if not, write to the Free Software
6778# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6779# 02111-1307, USA.
6780
6781AC_DEFUN([AM_PROG_INSTALL_SH],
6782[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6783install_sh=${install_sh-"$am_aux_dir/install-sh"}
6784AC_SUBST(install_sh)])
6785
6786#                                                          -*- Autoconf -*-
6787# Copyright (C) 2003  Free Software Foundation, Inc.
6788
6789# This program is free software; you can redistribute it and/or modify
6790# it under the terms of the GNU General Public License as published by
6791# the Free Software Foundation; either version 2, or (at your option)
6792# any later version.
6793
6794# This program is distributed in the hope that it will be useful,
6795# but WITHOUT ANY WARRANTY; without even the implied warranty of
6796# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6797# GNU General Public License for more details.
6798
6799# You should have received a copy of the GNU General Public License
6800# along with this program; if not, write to the Free Software
6801# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6802# 02111-1307, USA.
6803
6804# serial 1
6805
6806# Check whether the underlying file-system supports filenames
6807# with a leading dot.  For instance MS-DOS doesn't.
6808AC_DEFUN([AM_SET_LEADING_DOT],
6809[rm -rf .tst 2>/dev/null
6810mkdir .tst 2>/dev/null
6811if test -d .tst; then
6812  am__leading_dot=.
6813else
6814  am__leading_dot=_
6815fi
6816rmdir .tst 2>/dev/null
6817AC_SUBST([am__leading_dot])])
6818
6819# Add --enable-maintainer-mode option to configure.
6820# From Jim Meyering
6821
6822# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
6823# Free Software Foundation, Inc.
6824
6825# This program is free software; you can redistribute it and/or modify
6826# it under the terms of the GNU General Public License as published by
6827# the Free Software Foundation; either version 2, or (at your option)
6828# any later version.
6829
6830# This program is distributed in the hope that it will be useful,
6831# but WITHOUT ANY WARRANTY; without even the implied warranty of
6832# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6833# GNU General Public License for more details.
6834
6835# You should have received a copy of the GNU General Public License
6836# along with this program; if not, write to the Free Software
6837# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6838# 02111-1307, USA.
6839
6840# serial 3
6841
6842AC_DEFUN([AM_MAINTAINER_MODE],
6843[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
6844  dnl maintainer-mode is disabled by default
6845  AC_ARG_ENABLE(maintainer-mode,
6846[  --enable-maintainer-mode  enable make rules and dependencies not useful
6847                          (and sometimes confusing) to the casual installer],
6848      USE_MAINTAINER_MODE=$enableval,
6849      USE_MAINTAINER_MODE=no)
6850  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6851  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
6852  MAINT=$MAINTAINER_MODE_TRUE
6853  AC_SUBST(MAINT)dnl
6854]
6855)
6856
6857AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6858
6859# Check to see how 'make' treats includes.      -*- Autoconf -*-
6860
6861# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
6862
6863# This program is free software; you can redistribute it and/or modify
6864# it under the terms of the GNU General Public License as published by
6865# the Free Software Foundation; either version 2, or (at your option)
6866# any later version.
6867
6868# This program is distributed in the hope that it will be useful,
6869# but WITHOUT ANY WARRANTY; without even the implied warranty of
6870# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6871# GNU General Public License for more details.
6872
6873# You should have received a copy of the GNU General Public License
6874# along with this program; if not, write to the Free Software
6875# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6876# 02111-1307, USA.
6877
6878# serial 2
6879
6880# AM_MAKE_INCLUDE()
6881# -----------------
6882# Check to see how make treats includes.
6883AC_DEFUN([AM_MAKE_INCLUDE],
6884[am_make=${MAKE-make}
6885cat > confinc << 'END'
6886am__doit:
6887        @echo done
6888.PHONY: am__doit
6889END
6890# If we don't find an include directive, just comment out the code.
6891AC_MSG_CHECKING([for style of include used by $am_make])
6892am__include="#"
6893am__quote=
6894_am_result=none
6895# First try GNU make style include.
6896echo "include confinc" > confmf
6897# We grep out `Entering directory' and `Leaving directory'
6898# messages which can occur if `w' ends up in MAKEFLAGS.
6899# In particular we don't look at `^make:' because GNU make might
6900# be invoked under some other name (usually "gmake"), in which
6901# case it prints its new name instead of `make'.
6902if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6903   am__include=include
6904   am__quote=
6905   _am_result=GNU
6906fi
6907# Now try BSD make style include.
6908if test "$am__include" = "#"; then
6909   echo '.include "confinc"' > confmf
6910   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6911      am__include=.include
6912      am__quote="\""
6913      _am_result=BSD
6914   fi
6915fi
6916AC_SUBST([am__include])
6917AC_SUBST([am__quote])
6918AC_MSG_RESULT([$_am_result])
6919rm -f confinc confmf
6920])
6921
6922#  -*- Autoconf -*-
6923
6924
6925# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
6926
6927# This program is free software; you can redistribute it and/or modify
6928# it under the terms of the GNU General Public License as published by
6929# the Free Software Foundation; either version 2, or (at your option)
6930# any later version.
6931
6932# This program is distributed in the hope that it will be useful,
6933# but WITHOUT ANY WARRANTY; without even the implied warranty of
6934# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6935# GNU General Public License for more details.
6936
6937# You should have received a copy of the GNU General Public License
6938# along with this program; if not, write to the Free Software
6939# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6940# 02111-1307, USA.
6941
6942# serial 3
6943
6944# AM_MISSING_PROG(NAME, PROGRAM)
6945# ------------------------------
6946AC_DEFUN([AM_MISSING_PROG],
6947[AC_REQUIRE([AM_MISSING_HAS_RUN])
6948$1=${$1-"${am_missing_run}$2"}
6949AC_SUBST($1)])
6950
6951
6952# AM_MISSING_HAS_RUN
6953# ------------------
6954# Define MISSING if not defined so far and test if it supports --run.
6955# If it does, set am_missing_run to use it, otherwise, to nothing.
6956AC_DEFUN([AM_MISSING_HAS_RUN],
6957[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6958test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6959# Use eval to expand $SHELL
6960if eval "$MISSING --run true"; then
6961  am_missing_run="$MISSING --run "
6962else
6963  am_missing_run=
6964  AC_MSG_WARN([`missing' script is too old or missing])
6965fi
6966])
6967
6968# AM_PROG_MKDIR_P
6969# ---------------
6970# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
6971
6972# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
6973
6974# This program is free software; you can redistribute it and/or modify
6975# it under the terms of the GNU General Public License as published by
6976# the Free Software Foundation; either version 2, or (at your option)
6977# any later version.
6978
6979# This program is distributed in the hope that it will be useful,
6980# but WITHOUT ANY WARRANTY; without even the implied warranty of
6981# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6982# GNU General Public License for more details.
6983
6984# You should have received a copy of the GNU General Public License
6985# along with this program; if not, write to the Free Software
6986# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6987# 02111-1307, USA.
6988
6989# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
6990# created by `make install' are always world readable, even if the
6991# installer happens to have an overly restrictive umask (e.g. 077).
6992# This was a mistake.  There are at least two reasons why we must not
6993# use `-m 0755':
6994#   - it causes special bits like SGID to be ignored,
6995#   - it may be too restrictive (some setups expect 775 directories).
6996#
6997# Do not use -m 0755 and let people choose whatever they expect by
6998# setting umask.
6999#
7000# We cannot accept any implementation of `mkdir' that recognizes `-p'.
7001# Some implementations (such as Solaris 8's) are not thread-safe: if a
7002# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7003# concurrently, both version can detect that a/ is missing, but only
7004# one can create it and the other will error out.  Consequently we
7005# restrict ourselves to GNU make (using the --version option ensures
7006# this.)
7007AC_DEFUN([AM_PROG_MKDIR_P],
7008[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7009  # Keeping the `.' argument allows $(mkdir_p) to be used without
7010  # argument.  Indeed, we sometimes output rules like
7011  #   $(mkdir_p) $(somedir)
7012  # where $(somedir) is conditionally defined.
7013  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
7014  # expensive solution, as it forces Make to start a sub-shell.)
7015  mkdir_p='mkdir -p -- .'
7016else
7017  # On NextStep and OpenStep, the `mkdir' command does not
7018  # recognize any option.  It will interpret all options as
7019  # directories to create, and then abort because `.' already
7020  # exists.
7021  for d in ./-p ./--version;
7022  do
7023    test -d $d && rmdir $d
7024  done
7025  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7026  if test -f "$ac_aux_dir/mkinstalldirs"; then
7027    mkdir_p='$(mkinstalldirs)'
7028  else
7029    mkdir_p='$(install_sh) -d'
7030  fi
7031fi
7032AC_SUBST([mkdir_p])])
7033
7034# Helper functions for option handling.                    -*- Autoconf -*-
7035
7036# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
7037
7038# This program is free software; you can redistribute it and/or modify
7039# it under the terms of the GNU General Public License as published by
7040# the Free Software Foundation; either version 2, or (at your option)
7041# any later version.
7042
7043# This program is distributed in the hope that it will be useful,
7044# but WITHOUT ANY WARRANTY; without even the implied warranty of
7045# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7046# GNU General Public License for more details.
7047
7048# You should have received a copy of the GNU General Public License
7049# along with this program; if not, write to the Free Software
7050# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7051# 02111-1307, USA.
7052
7053# serial 2
7054
7055# _AM_MANGLE_OPTION(NAME)
7056# -----------------------
7057AC_DEFUN([_AM_MANGLE_OPTION],
7058[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7059
7060# _AM_SET_OPTION(NAME)
7061# ------------------------------
7062# Set option NAME.  Presently that only means defining a flag for this option.
7063AC_DEFUN([_AM_SET_OPTION],
7064[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7065
7066# _AM_SET_OPTIONS(OPTIONS)
7067# ----------------------------------
7068# OPTIONS is a space-separated list of Automake options.
7069AC_DEFUN([_AM_SET_OPTIONS],
7070[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7071
7072# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7073# -------------------------------------------
7074# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7075AC_DEFUN([_AM_IF_OPTION],
7076[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7077
7078#
7079# Check to make sure that the build environment is sane.
7080#
7081
7082# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7083
7084# This program is free software; you can redistribute it and/or modify
7085# it under the terms of the GNU General Public License as published by
7086# the Free Software Foundation; either version 2, or (at your option)
7087# any later version.
7088
7089# This program is distributed in the hope that it will be useful,
7090# but WITHOUT ANY WARRANTY; without even the implied warranty of
7091# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7092# GNU General Public License for more details.
7093
7094# You should have received a copy of the GNU General Public License
7095# along with this program; if not, write to the Free Software
7096# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7097# 02111-1307, USA.
7098
7099# serial 3
7100
7101# AM_SANITY_CHECK
7102# ---------------
7103AC_DEFUN([AM_SANITY_CHECK],
7104[AC_MSG_CHECKING([whether build environment is sane])
7105# Just in case
7106sleep 1
7107echo timestamp > conftest.file
7108# Do `set' in a subshell so we don't clobber the current shell's
7109# arguments.  Must try -L first in case configure is actually a
7110# symlink; some systems play weird games with the mod time of symlinks
7111# (eg FreeBSD returns the mod time of the symlink's containing
7112# directory).
7113if (
7114   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7115   if test "$[*]" = "X"; then
7116      # -L didn't work.
7117      set X `ls -t $srcdir/configure conftest.file`
7118   fi
7119   rm -f conftest.file
7120   if test "$[*]" != "X $srcdir/configure conftest.file" \
7121      && test "$[*]" != "X conftest.file $srcdir/configure"; then
7122
7123      # If neither matched, then we have a broken ls.  This can happen
7124      # if, for instance, CONFIG_SHELL is bash and it inherits a
7125      # broken ls alias from the environment.  This has actually
7126      # happened.  Such a system could not be considered "sane".
7127      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
7128alias in your environment])
7129   fi
7130
7131   test "$[2]" = conftest.file
7132   )
7133then
7134   # Ok.
7135   :
7136else
7137   AC_MSG_ERROR([newly created file is older than distributed files!
7138Check your system clock])
7139fi
7140AC_MSG_RESULT(yes)])
7141
7142# AM_PROG_INSTALL_STRIP
7143
7144# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7145
7146# This program is free software; you can redistribute it and/or modify
7147# it under the terms of the GNU General Public License as published by
7148# the Free Software Foundation; either version 2, or (at your option)
7149# any later version.
7150
7151# This program is distributed in the hope that it will be useful,
7152# but WITHOUT ANY WARRANTY; without even the implied warranty of
7153# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7154# GNU General Public License for more details.
7155
7156# You should have received a copy of the GNU General Public License
7157# along with this program; if not, write to the Free Software
7158# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7159# 02111-1307, USA.
7160
7161# One issue with vendor `install' (even GNU) is that you can't
7162# specify the program used to strip binaries.  This is especially
7163# annoying in cross-compiling environments, where the build's strip
7164# is unlikely to handle the host's binaries.
7165# Fortunately install-sh will honor a STRIPPROG variable, so we
7166# always use install-sh in `make install-strip', and initialize
7167# STRIPPROG with the value of the STRIP variable (set by the user).
7168AC_DEFUN([AM_PROG_INSTALL_STRIP],
7169[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7170# Installed binaries are usually stripped using `strip' when the user
7171# run `make install-strip'.  However `strip' might not be the right
7172# tool to use in cross-compilation environments, therefore Automake
7173# will honor the `STRIP' environment variable to overrule this program.
7174dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7175if test "$cross_compiling" != no; then
7176  AC_CHECK_TOOL([STRIP], [strip], :)
7177fi
7178INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7179AC_SUBST([INSTALL_STRIP_PROGRAM])])
7180
7181m4_include([acinclude.m4])
Note: See TracBrowser for help on using the repository browser.