Update changes file
[profile/ivi/libXpm.git] / aclocal.m4
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009  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 m4_ifndef([AC_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17 [m4_warning([this file was generated for autoconf 2.68.
18 You have another version of autoconf.  It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
23 #
24 # This file is free software; the Free Software Foundation
25 # gives unlimited permission to copy and/or distribute it,
26 # with or without modifications, as long as this notice is preserved.
27
28 # AM_AUTOMAKE_VERSION(VERSION)
29 # ----------------------------
30 # Automake X.Y traces this macro to ensure aclocal.m4 has been
31 # generated from the m4 files accompanying Automake X.Y.
32 # (This private macro should not be called outside this file.)
33 AC_DEFUN([AM_AUTOMAKE_VERSION],
34 [am__api_version='1.11'
35 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36 dnl require some minimum version.  Point them to the right macro.
37 m4_if([$1], [1.11.1], [],
38       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39 ])
40
41 # _AM_AUTOCONF_VERSION(VERSION)
42 # -----------------------------
43 # aclocal traces this macro to find the Autoconf version.
44 # This is a private macro too.  Using m4_define simplifies
45 # the logic in aclocal, which can simply ignore this definition.
46 m4_define([_AM_AUTOCONF_VERSION], [])
47
48 # AM_SET_CURRENT_AUTOMAKE_VERSION
49 # -------------------------------
50 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.11.1])dnl
54 m4_ifndef([AC_AUTOCONF_VERSION],
55   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
58 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59
60 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61 #
62 # This file is free software; the Free Software Foundation
63 # gives unlimited permission to copy and/or distribute it,
64 # with or without modifications, as long as this notice is preserved.
65
66 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
69 #
70 # Of course, Automake must honor this variable whenever it calls a
71 # tool from the auxiliary directory.  The problem is that $srcdir (and
72 # therefore $ac_aux_dir as well) can be either absolute or relative,
73 # depending on how configure is run.  This is pretty annoying, since
74 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
75 # source directory, any form will work fine, but in subdirectories a
76 # relative path needs to be adjusted first.
77 #
78 # $ac_aux_dir/missing
79 #    fails when called from a subdirectory if $ac_aux_dir is relative
80 # $top_srcdir/$ac_aux_dir/missing
81 #    fails if $ac_aux_dir is absolute,
82 #    fails when called from a subdirectory in a VPATH build with
83 #          a relative $ac_aux_dir
84 #
85 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86 # are both prefixed by $srcdir.  In an in-source build this is usually
87 # harmless because $srcdir is `.', but things will broke when you
88 # start a VPATH build or use an absolute $srcdir.
89 #
90 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
92 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93 # and then we would define $MISSING as
94 #   MISSING="\${SHELL} $am_aux_dir/missing"
95 # This will work as long as MISSING is not called from configure, because
96 # unfortunately $(top_srcdir) has no meaning in configure.
97 # However there are other variables, like CC, which are often used in
98 # configure, and could therefore not use this "fixed" $ac_aux_dir.
99 #
100 # Another solution, used here, is to always expand $ac_aux_dir to an
101 # absolute PATH.  The drawback is that using absolute paths prevent a
102 # configured tree to be moved without reconfiguration.
103
104 AC_DEFUN([AM_AUX_DIR_EXPAND],
105 [dnl Rely on autoconf to set up CDPATH properly.
106 AC_PREREQ([2.50])dnl
107 # expand $ac_aux_dir to an absolute path
108 am_aux_dir=`cd $ac_aux_dir && pwd`
109 ])
110
111 # AM_CONDITIONAL                                            -*- Autoconf -*-
112
113 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114 # Free Software Foundation, Inc.
115 #
116 # This file is free software; the Free Software Foundation
117 # gives unlimited permission to copy and/or distribute it,
118 # with or without modifications, as long as this notice is preserved.
119
120 # serial 9
121
122 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
123 # -------------------------------------
124 # Define a conditional.
125 AC_DEFUN([AM_CONDITIONAL],
126 [AC_PREREQ(2.52)dnl
127  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129 AC_SUBST([$1_TRUE])dnl
130 AC_SUBST([$1_FALSE])dnl
131 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
132 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
133 m4_define([_AM_COND_VALUE_$1], [$2])dnl
134 if $2; then
135   $1_TRUE=
136   $1_FALSE='#'
137 else
138   $1_TRUE='#'
139   $1_FALSE=
140 fi
141 AC_CONFIG_COMMANDS_PRE(
142 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143   AC_MSG_ERROR([[conditional "$1" was never defined.
144 Usually this means the macro was only invoked conditionally.]])
145 fi])])
146
147 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148 # Free Software Foundation, Inc.
149 #
150 # This file is free software; the Free Software Foundation
151 # gives unlimited permission to copy and/or distribute it,
152 # with or without modifications, as long as this notice is preserved.
153
154 # serial 10
155
156 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157 # written in clear, in which case automake, when reading aclocal.m4,
158 # will think it sees a *use*, and therefore will trigger all it's
159 # C support machinery.  Also note that it means that autoscan, seeing
160 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
161
162
163 # _AM_DEPENDENCIES(NAME)
164 # ----------------------
165 # See how the compiler implements dependency checking.
166 # NAME is "CC", "CXX", "GCJ", or "OBJC".
167 # We try a few techniques and use that to set a single cache variable.
168 #
169 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171 # dependency, and given that the user is not expected to run this macro,
172 # just rely on AC_PROG_CC.
173 AC_DEFUN([_AM_DEPENDENCIES],
174 [AC_REQUIRE([AM_SET_DEPDIR])dnl
175 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177 AC_REQUIRE([AM_DEP_TRACK])dnl
178
179 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
180        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
181        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
183        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
184                    [depcc="$$1"   am_compiler_list=])
185
186 AC_CACHE_CHECK([dependency style of $depcc],
187                [am_cv_$1_dependencies_compiler_type],
188 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189   # We make a subdir and do the tests there.  Otherwise we can end up
190   # making bogus files that we don't know about and never remove.  For
191   # instance it was reported that on HP-UX the gcc test will end up
192   # making a dummy file named `D' -- because `-MD' means `put the output
193   # in D'.
194   mkdir conftest.dir
195   # Copy depcomp to subdir because otherwise we won't find it if we're
196   # using a relative directory.
197   cp "$am_depcomp" conftest.dir
198   cd conftest.dir
199   # We will build objects and dependencies in a subdirectory because
200   # it helps to detect inapplicable dependency modes.  For instance
201   # both Tru64's cc and ICC support -MD to output dependencies as a
202   # side effect of compilation, but ICC will put the dependencies in
203   # the current directory while Tru64 will put them in the object
204   # directory.
205   mkdir sub
206
207   am_cv_$1_dependencies_compiler_type=none
208   if test "$am_compiler_list" = ""; then
209      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210   fi
211   am__universal=false
212   m4_case([$1], [CC],
213     [case " $depcc " in #(
214      *\ -arch\ *\ -arch\ *) am__universal=true ;;
215      esac],
216     [CXX],
217     [case " $depcc " in #(
218      *\ -arch\ *\ -arch\ *) am__universal=true ;;
219      esac])
220
221   for depmode in $am_compiler_list; do
222     # Setup a source with many dependencies, because some compilers
223     # like to wrap large dependency lists on column 80 (with \), and
224     # we should not choose a depcomp mode which is confused by this.
225     #
226     # We need to recreate these files for each test, as the compiler may
227     # overwrite some of them when testing with obscure command lines.
228     # This happens at least with the AIX C compiler.
229     : > sub/conftest.c
230     for i in 1 2 3 4 5 6; do
231       echo '#include "conftst'$i'.h"' >> sub/conftest.c
232       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233       # Solaris 8's {/usr,}/bin/sh.
234       touch sub/conftst$i.h
235     done
236     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237
238     # We check with `-c' and `-o' for the sake of the "dashmstdout"
239     # mode.  It turns out that the SunPro C++ compiler does not properly
240     # handle `-M -o', and we need to detect this.  Also, some Intel
241     # versions had trouble with output in subdirs
242     am__obj=sub/conftest.${OBJEXT-o}
243     am__minus_obj="-o $am__obj"
244     case $depmode in
245     gcc)
246       # This depmode causes a compiler race in universal mode.
247       test "$am__universal" = false || continue
248       ;;
249     nosideeffect)
250       # after this tag, mechanisms are not by side-effect, so they'll
251       # only be used when explicitly requested
252       if test "x$enable_dependency_tracking" = xyes; then
253         continue
254       else
255         break
256       fi
257       ;;
258     msvisualcpp | msvcmsys)
259       # This compiler won't grok `-c -o', but also, the minuso test has
260       # not run yet.  These depmodes are late enough in the game, and
261       # so weak that their functioning should not be impacted.
262       am__obj=conftest.${OBJEXT-o}
263       am__minus_obj=
264       ;;
265     none) break ;;
266     esac
267     if depmode=$depmode \
268        source=sub/conftest.c object=$am__obj \
269        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271          >/dev/null 2>conftest.err &&
272        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276       # icc doesn't choke on unknown options, it will just issue warnings
277       # or remarks (even with -Werror).  So we grep stderr for any message
278       # that says an option was ignored or not supported.
279       # When given -MP, icc 7.0 and 7.1 complain thusly:
280       #   icc: Command line warning: ignoring option '-M'; no argument required
281       # The diagnosis changed in icc 8.0:
282       #   icc: Command line remark: option '-MP' not supported
283       if (grep 'ignoring option' conftest.err ||
284           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285         am_cv_$1_dependencies_compiler_type=$depmode
286         break
287       fi
288     fi
289   done
290
291   cd ..
292   rm -rf conftest.dir
293 else
294   am_cv_$1_dependencies_compiler_type=none
295 fi
296 ])
297 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298 AM_CONDITIONAL([am__fastdep$1], [
299   test "x$enable_dependency_tracking" != xno \
300   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
301 ])
302
303
304 # AM_SET_DEPDIR
305 # -------------
306 # Choose a directory name for dependency files.
307 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
308 AC_DEFUN([AM_SET_DEPDIR],
309 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
311 ])
312
313
314 # AM_DEP_TRACK
315 # ------------
316 AC_DEFUN([AM_DEP_TRACK],
317 [AC_ARG_ENABLE(dependency-tracking,
318 [  --disable-dependency-tracking  speeds up one-time build
319   --enable-dependency-tracking   do not reject slow dependency extractors])
320 if test "x$enable_dependency_tracking" != xno; then
321   am_depcomp="$ac_aux_dir/depcomp"
322   AMDEPBACKSLASH='\'
323 fi
324 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325 AC_SUBST([AMDEPBACKSLASH])dnl
326 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
327 ])
328
329 # Generate code to set up dependency tracking.              -*- Autoconf -*-
330
331 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332 # Free Software Foundation, Inc.
333 #
334 # This file is free software; the Free Software Foundation
335 # gives unlimited permission to copy and/or distribute it,
336 # with or without modifications, as long as this notice is preserved.
337
338 #serial 5
339
340 # _AM_OUTPUT_DEPENDENCY_COMMANDS
341 # ------------------------------
342 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
343 [{
344   # Autoconf 2.62 quotes --file arguments for eval, but not when files
345   # are listed without --file.  Let's play safe and only enable the eval
346   # if we detect the quoting.
347   case $CONFIG_FILES in
348   *\'*) eval set x "$CONFIG_FILES" ;;
349   *)   set x $CONFIG_FILES ;;
350   esac
351   shift
352   for mf
353   do
354     # Strip MF so we end up with the name of the file.
355     mf=`echo "$mf" | sed -e 's/:.*$//'`
356     # Check whether this is an Automake generated Makefile or not.
357     # We used to match only the files named `Makefile.in', but
358     # some people rename them; so instead we look at the file content.
359     # Grep'ing the first line is not enough: some people post-process
360     # each Makefile.in and add a new line on top of each file to say so.
361     # Grep'ing the whole file is not good either: AIX grep has a line
362     # limit of 2048, but all sed's we know have understand at least 4000.
363     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364       dirpart=`AS_DIRNAME("$mf")`
365     else
366       continue
367     fi
368     # Extract the definition of DEPDIR, am__include, and am__quote
369     # from the Makefile without running `make'.
370     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371     test -z "$DEPDIR" && continue
372     am__include=`sed -n 's/^am__include = //p' < "$mf"`
373     test -z "am__include" && continue
374     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375     # When using ansi2knr, U may be empty or an underscore; expand it
376     U=`sed -n 's/^U = //p' < "$mf"`
377     # Find all dependency output files, they are included files with
378     # $(DEPDIR) in their names.  We invoke sed twice because it is the
379     # simplest approach to changing $(DEPDIR) to its actual value in the
380     # expansion.
381     for file in `sed -n "
382       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
384       # Make sure the directory exists.
385       test -f "$dirpart/$file" && continue
386       fdir=`AS_DIRNAME(["$file"])`
387       AS_MKDIR_P([$dirpart/$fdir])
388       # echo "creating $dirpart/$file"
389       echo '# dummy' > "$dirpart/$file"
390     done
391   done
392 }
393 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
394
395
396 # AM_OUTPUT_DEPENDENCY_COMMANDS
397 # -----------------------------
398 # This macro should only be invoked once -- use via AC_REQUIRE.
399 #
400 # This code is only required when automatic dependency tracking
401 # is enabled.  FIXME.  This creates each `.P' file that we will
402 # need in order to bootstrap the dependency handling code.
403 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404 [AC_CONFIG_COMMANDS([depfiles],
405      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407 ])
408
409 # Do all the work for Automake.                             -*- Autoconf -*-
410
411 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
412 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
413 #
414 # This file is free software; the Free Software Foundation
415 # gives unlimited permission to copy and/or distribute it,
416 # with or without modifications, as long as this notice is preserved.
417
418 # serial 16
419
420 # This macro actually does too much.  Some checks are only needed if
421 # your package does certain things.  But this isn't really a big deal.
422
423 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
424 # AM_INIT_AUTOMAKE([OPTIONS])
425 # -----------------------------------------------
426 # The call with PACKAGE and VERSION arguments is the old style
427 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
428 # and VERSION should now be passed to AC_INIT and removed from
429 # the call to AM_INIT_AUTOMAKE.
430 # We support both call styles for the transition.  After
431 # the next Automake release, Autoconf can make the AC_INIT
432 # arguments mandatory, and then we can depend on a new Autoconf
433 # release and drop the old call support.
434 AC_DEFUN([AM_INIT_AUTOMAKE],
435 [AC_PREREQ([2.62])dnl
436 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
437 dnl the ones we care about.
438 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
439 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
440 AC_REQUIRE([AC_PROG_INSTALL])dnl
441 if test "`cd $srcdir && pwd`" != "`pwd`"; then
442   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
443   # is not polluted with repeated "-I."
444   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
445   # test to see if srcdir already configured
446   if test -f $srcdir/config.status; then
447     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
448   fi
449 fi
450
451 # test whether we have cygpath
452 if test -z "$CYGPATH_W"; then
453   if (cygpath --version) >/dev/null 2>/dev/null; then
454     CYGPATH_W='cygpath -w'
455   else
456     CYGPATH_W=echo
457   fi
458 fi
459 AC_SUBST([CYGPATH_W])
460
461 # Define the identity of the package.
462 dnl Distinguish between old-style and new-style calls.
463 m4_ifval([$2],
464 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465  AC_SUBST([PACKAGE], [$1])dnl
466  AC_SUBST([VERSION], [$2])],
467 [_AM_SET_OPTIONS([$1])dnl
468 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
470   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
473
474 _AM_IF_OPTION([no-define],,
475 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
477
478 # Some tools Automake needs.
479 AC_REQUIRE([AM_SANITY_CHECK])dnl
480 AC_REQUIRE([AC_ARG_PROGRAM])dnl
481 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482 AM_MISSING_PROG(AUTOCONF, autoconf)
483 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484 AM_MISSING_PROG(AUTOHEADER, autoheader)
485 AM_MISSING_PROG(MAKEINFO, makeinfo)
486 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
489 # We need awk for the "check" target.  The system "awk" is bad on
490 # some platforms.
491 AC_REQUIRE([AC_PROG_AWK])dnl
492 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
493 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
494 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
495               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
496                              [_AM_PROG_TAR([v7])])])
497 _AM_IF_OPTION([no-dependencies],,
498 [AC_PROVIDE_IFELSE([AC_PROG_CC],
499                   [_AM_DEPENDENCIES(CC)],
500                   [define([AC_PROG_CC],
501                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
502 AC_PROVIDE_IFELSE([AC_PROG_CXX],
503                   [_AM_DEPENDENCIES(CXX)],
504                   [define([AC_PROG_CXX],
505                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
506 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
507                   [_AM_DEPENDENCIES(OBJC)],
508                   [define([AC_PROG_OBJC],
509                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
510 ])
511 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
514 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
515 AC_CONFIG_COMMANDS_PRE(dnl
516 [m4_provide_if([_AM_COMPILER_EXEEXT],
517   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
518 ])
519
520 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
521 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522 dnl mangled by Autoconf and run in a shell conditional statement.
523 m4_define([_AC_COMPILER_EXEEXT],
524 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
525
526
527 # When config.status generates a header, we must update the stamp-h file.
528 # This file resides in the same directory as the config header
529 # that is generated.  The stamp files are numbered to have different names.
530
531 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
532 # loop where config.status creates the headers, so we can generate
533 # our stamp files there.
534 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
535 [# Compute $1's index in $config_headers.
536 _am_arg=$1
537 _am_stamp_count=1
538 for _am_header in $config_headers :; do
539   case $_am_header in
540     $_am_arg | $_am_arg:* )
541       break ;;
542     * )
543       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
544   esac
545 done
546 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
547
548 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
549 #
550 # This file is free software; the Free Software Foundation
551 # gives unlimited permission to copy and/or distribute it,
552 # with or without modifications, as long as this notice is preserved.
553
554 # AM_PROG_INSTALL_SH
555 # ------------------
556 # Define $install_sh.
557 AC_DEFUN([AM_PROG_INSTALL_SH],
558 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
559 if test x"${install_sh}" != xset; then
560   case $am_aux_dir in
561   *\ * | *\     *)
562     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
563   *)
564     install_sh="\${SHELL} $am_aux_dir/install-sh"
565   esac
566 fi
567 AC_SUBST(install_sh)])
568
569 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
570 #
571 # This file is free software; the Free Software Foundation
572 # gives unlimited permission to copy and/or distribute it,
573 # with or without modifications, as long as this notice is preserved.
574
575 # serial 2
576
577 # Check whether the underlying file-system supports filenames
578 # with a leading dot.  For instance MS-DOS doesn't.
579 AC_DEFUN([AM_SET_LEADING_DOT],
580 [rm -rf .tst 2>/dev/null
581 mkdir .tst 2>/dev/null
582 if test -d .tst; then
583   am__leading_dot=.
584 else
585   am__leading_dot=_
586 fi
587 rmdir .tst 2>/dev/null
588 AC_SUBST([am__leading_dot])])
589
590 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
591 # From Jim Meyering
592
593 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594 # Free Software Foundation, Inc.
595 #
596 # This file is free software; the Free Software Foundation
597 # gives unlimited permission to copy and/or distribute it,
598 # with or without modifications, as long as this notice is preserved.
599
600 # serial 5
601
602 # AM_MAINTAINER_MODE([DEFAULT-MODE])
603 # ----------------------------------
604 # Control maintainer-specific portions of Makefiles.
605 # Default is to disable them, unless `enable' is passed literally.
606 # For symmetry, `disable' may be passed as well.  Anyway, the user
607 # can override the default with the --enable/--disable switch.
608 AC_DEFUN([AM_MAINTAINER_MODE],
609 [m4_case(m4_default([$1], [disable]),
610        [enable], [m4_define([am_maintainer_other], [disable])],
611        [disable], [m4_define([am_maintainer_other], [enable])],
612        [m4_define([am_maintainer_other], [enable])
613         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
615   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616   AC_ARG_ENABLE([maintainer-mode],
617 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
618                           (and sometimes confusing) to the casual installer],
619       [USE_MAINTAINER_MODE=$enableval],
620       [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
621   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623   MAINT=$MAINTAINER_MODE_TRUE
624   AC_SUBST([MAINT])dnl
625 ]
626 )
627
628 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
629
630 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
631
632 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
633 #
634 # This file is free software; the Free Software Foundation
635 # gives unlimited permission to copy and/or distribute it,
636 # with or without modifications, as long as this notice is preserved.
637
638 # serial 4
639
640 # AM_MAKE_INCLUDE()
641 # -----------------
642 # Check to see how make treats includes.
643 AC_DEFUN([AM_MAKE_INCLUDE],
644 [am_make=${MAKE-make}
645 cat > confinc << 'END'
646 am__doit:
647         @echo this is the am__doit target
648 .PHONY: am__doit
649 END
650 # If we don't find an include directive, just comment out the code.
651 AC_MSG_CHECKING([for style of include used by $am_make])
652 am__include="#"
653 am__quote=
654 _am_result=none
655 # First try GNU make style include.
656 echo "include confinc" > confmf
657 # Ignore all kinds of additional output from `make'.
658 case `$am_make -s -f confmf 2> /dev/null` in #(
659 *the\ am__doit\ target*)
660   am__include=include
661   am__quote=
662   _am_result=GNU
663   ;;
664 esac
665 # Now try BSD make style include.
666 if test "$am__include" = "#"; then
667    echo '.include "confinc"' > confmf
668    case `$am_make -s -f confmf 2> /dev/null` in #(
669    *the\ am__doit\ target*)
670      am__include=.include
671      am__quote="\""
672      _am_result=BSD
673      ;;
674    esac
675 fi
676 AC_SUBST([am__include])
677 AC_SUBST([am__quote])
678 AC_MSG_RESULT([$_am_result])
679 rm -f confinc confmf
680 ])
681
682 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
683
684 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
685 # Free Software Foundation, Inc.
686 #
687 # This file is free software; the Free Software Foundation
688 # gives unlimited permission to copy and/or distribute it,
689 # with or without modifications, as long as this notice is preserved.
690
691 # serial 6
692
693 # AM_MISSING_PROG(NAME, PROGRAM)
694 # ------------------------------
695 AC_DEFUN([AM_MISSING_PROG],
696 [AC_REQUIRE([AM_MISSING_HAS_RUN])
697 $1=${$1-"${am_missing_run}$2"}
698 AC_SUBST($1)])
699
700
701 # AM_MISSING_HAS_RUN
702 # ------------------
703 # Define MISSING if not defined so far and test if it supports --run.
704 # If it does, set am_missing_run to use it, otherwise, to nothing.
705 AC_DEFUN([AM_MISSING_HAS_RUN],
706 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
707 AC_REQUIRE_AUX_FILE([missing])dnl
708 if test x"${MISSING+set}" != xset; then
709   case $am_aux_dir in
710   *\ * | *\     *)
711     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
712   *)
713     MISSING="\${SHELL} $am_aux_dir/missing" ;;
714   esac
715 fi
716 # Use eval to expand $SHELL
717 if eval "$MISSING --run true"; then
718   am_missing_run="$MISSING --run "
719 else
720   am_missing_run=
721   AC_MSG_WARN([`missing' script is too old or missing])
722 fi
723 ])
724
725 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
726 #
727 # This file is free software; the Free Software Foundation
728 # gives unlimited permission to copy and/or distribute it,
729 # with or without modifications, as long as this notice is preserved.
730
731 # AM_PROG_MKDIR_P
732 # ---------------
733 # Check for `mkdir -p'.
734 AC_DEFUN([AM_PROG_MKDIR_P],
735 [AC_PREREQ([2.60])dnl
736 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
737 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
738 dnl while keeping a definition of mkdir_p for backward compatibility.
739 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
740 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
741 dnl Makefile.ins that do not define MKDIR_P, so we do our own
742 dnl adjustment using top_builddir (which is defined more often than
743 dnl MKDIR_P).
744 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
745 case $mkdir_p in
746   [[\\/$]]* | ?:[[\\/]]*) ;;
747   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
748 esac
749 ])
750
751 # Helper functions for option handling.                     -*- Autoconf -*-
752
753 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
754 #
755 # This file is free software; the Free Software Foundation
756 # gives unlimited permission to copy and/or distribute it,
757 # with or without modifications, as long as this notice is preserved.
758
759 # serial 4
760
761 # _AM_MANGLE_OPTION(NAME)
762 # -----------------------
763 AC_DEFUN([_AM_MANGLE_OPTION],
764 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
765
766 # _AM_SET_OPTION(NAME)
767 # ------------------------------
768 # Set option NAME.  Presently that only means defining a flag for this option.
769 AC_DEFUN([_AM_SET_OPTION],
770 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
771
772 # _AM_SET_OPTIONS(OPTIONS)
773 # ----------------------------------
774 # OPTIONS is a space-separated list of Automake options.
775 AC_DEFUN([_AM_SET_OPTIONS],
776 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
777
778 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
779 # -------------------------------------------
780 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
781 AC_DEFUN([_AM_IF_OPTION],
782 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
783
784 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
785
786 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
787 # Free Software Foundation, Inc.
788 #
789 # This file is free software; the Free Software Foundation
790 # gives unlimited permission to copy and/or distribute it,
791 # with or without modifications, as long as this notice is preserved.
792
793 # serial 5
794
795 # AM_SANITY_CHECK
796 # ---------------
797 AC_DEFUN([AM_SANITY_CHECK],
798 [AC_MSG_CHECKING([whether build environment is sane])
799 # Just in case
800 sleep 1
801 echo timestamp > conftest.file
802 # Reject unsafe characters in $srcdir or the absolute working directory
803 # name.  Accept space and tab only in the latter.
804 am_lf='
805 '
806 case `pwd` in
807   *[[\\\"\#\$\&\'\`$am_lf]]*)
808     AC_MSG_ERROR([unsafe absolute working directory name]);;
809 esac
810 case $srcdir in
811   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
812     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
813 esac
814
815 # Do `set' in a subshell so we don't clobber the current shell's
816 # arguments.  Must try -L first in case configure is actually a
817 # symlink; some systems play weird games with the mod time of symlinks
818 # (eg FreeBSD returns the mod time of the symlink's containing
819 # directory).
820 if (
821    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
822    if test "$[*]" = "X"; then
823       # -L didn't work.
824       set X `ls -t "$srcdir/configure" conftest.file`
825    fi
826    rm -f conftest.file
827    if test "$[*]" != "X $srcdir/configure conftest.file" \
828       && test "$[*]" != "X conftest.file $srcdir/configure"; then
829
830       # If neither matched, then we have a broken ls.  This can happen
831       # if, for instance, CONFIG_SHELL is bash and it inherits a
832       # broken ls alias from the environment.  This has actually
833       # happened.  Such a system could not be considered "sane".
834       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
835 alias in your environment])
836    fi
837
838    test "$[2]" = conftest.file
839    )
840 then
841    # Ok.
842    :
843 else
844    AC_MSG_ERROR([newly created file is older than distributed files!
845 Check your system clock])
846 fi
847 AC_MSG_RESULT(yes)])
848
849 # Copyright (C) 2009  Free Software Foundation, Inc.
850 #
851 # This file is free software; the Free Software Foundation
852 # gives unlimited permission to copy and/or distribute it,
853 # with or without modifications, as long as this notice is preserved.
854
855 # serial 1
856
857 # AM_SILENT_RULES([DEFAULT])
858 # --------------------------
859 # Enable less verbose build rules; with the default set to DEFAULT
860 # (`yes' being less verbose, `no' or empty being verbose).
861 AC_DEFUN([AM_SILENT_RULES],
862 [AC_ARG_ENABLE([silent-rules],
863 [  --enable-silent-rules          less verbose build output (undo: `make V=1')
864   --disable-silent-rules         verbose build output (undo: `make V=0')])
865 case $enable_silent_rules in
866 yes) AM_DEFAULT_VERBOSITY=0;;
867 no)  AM_DEFAULT_VERBOSITY=1;;
868 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
869 esac
870 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
871 AM_BACKSLASH='\'
872 AC_SUBST([AM_BACKSLASH])dnl
873 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
874 ])
875
876 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
877 #
878 # This file is free software; the Free Software Foundation
879 # gives unlimited permission to copy and/or distribute it,
880 # with or without modifications, as long as this notice is preserved.
881
882 # AM_PROG_INSTALL_STRIP
883 # ---------------------
884 # One issue with vendor `install' (even GNU) is that you can't
885 # specify the program used to strip binaries.  This is especially
886 # annoying in cross-compiling environments, where the build's strip
887 # is unlikely to handle the host's binaries.
888 # Fortunately install-sh will honor a STRIPPROG variable, so we
889 # always use install-sh in `make install-strip', and initialize
890 # STRIPPROG with the value of the STRIP variable (set by the user).
891 AC_DEFUN([AM_PROG_INSTALL_STRIP],
892 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
893 # Installed binaries are usually stripped using `strip' when the user
894 # run `make install-strip'.  However `strip' might not be the right
895 # tool to use in cross-compilation environments, therefore Automake
896 # will honor the `STRIP' environment variable to overrule this program.
897 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
898 if test "$cross_compiling" != no; then
899   AC_CHECK_TOOL([STRIP], [strip], :)
900 fi
901 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
902 AC_SUBST([INSTALL_STRIP_PROGRAM])])
903
904 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
905 #
906 # This file is free software; the Free Software Foundation
907 # gives unlimited permission to copy and/or distribute it,
908 # with or without modifications, as long as this notice is preserved.
909
910 # serial 2
911
912 # _AM_SUBST_NOTMAKE(VARIABLE)
913 # ---------------------------
914 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
915 # This macro is traced by Automake.
916 AC_DEFUN([_AM_SUBST_NOTMAKE])
917
918 # AM_SUBST_NOTMAKE(VARIABLE)
919 # ---------------------------
920 # Public sister of _AM_SUBST_NOTMAKE.
921 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
922
923 # Check how to create a tarball.                            -*- Autoconf -*-
924
925 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
926 #
927 # This file is free software; the Free Software Foundation
928 # gives unlimited permission to copy and/or distribute it,
929 # with or without modifications, as long as this notice is preserved.
930
931 # serial 2
932
933 # _AM_PROG_TAR(FORMAT)
934 # --------------------
935 # Check how to create a tarball in format FORMAT.
936 # FORMAT should be one of `v7', `ustar', or `pax'.
937 #
938 # Substitute a variable $(am__tar) that is a command
939 # writing to stdout a FORMAT-tarball containing the directory
940 # $tardir.
941 #     tardir=directory && $(am__tar) > result.tar
942 #
943 # Substitute a variable $(am__untar) that extract such
944 # a tarball read from stdin.
945 #     $(am__untar) < result.tar
946 AC_DEFUN([_AM_PROG_TAR],
947 [# Always define AMTAR for backward compatibility.
948 AM_MISSING_PROG([AMTAR], [tar])
949 m4_if([$1], [v7],
950      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
951      [m4_case([$1], [ustar],, [pax],,
952               [m4_fatal([Unknown tar format])])
953 AC_MSG_CHECKING([how to create a $1 tar archive])
954 # Loop over all known methods to create a tar archive until one works.
955 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
956 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
957 # Do not fold the above two line into one, because Tru64 sh and
958 # Solaris sh will not grok spaces in the rhs of `-'.
959 for _am_tool in $_am_tools
960 do
961   case $_am_tool in
962   gnutar)
963     for _am_tar in tar gnutar gtar;
964     do
965       AM_RUN_LOG([$_am_tar --version]) && break
966     done
967     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
968     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
969     am__untar="$_am_tar -xf -"
970     ;;
971   plaintar)
972     # Must skip GNU tar: if it does not support --format= it doesn't create
973     # ustar tarball either.
974     (tar --version) >/dev/null 2>&1 && continue
975     am__tar='tar chf - "$$tardir"'
976     am__tar_='tar chf - "$tardir"'
977     am__untar='tar xf -'
978     ;;
979   pax)
980     am__tar='pax -L -x $1 -w "$$tardir"'
981     am__tar_='pax -L -x $1 -w "$tardir"'
982     am__untar='pax -r'
983     ;;
984   cpio)
985     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
986     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
987     am__untar='cpio -i -H $1 -d'
988     ;;
989   none)
990     am__tar=false
991     am__tar_=false
992     am__untar=false
993     ;;
994   esac
995
996   # If the value was cached, stop now.  We just wanted to have am__tar
997   # and am__untar set.
998   test -n "${am_cv_prog_tar_$1}" && break
999
1000   # tar/untar a dummy directory, and stop if the command works
1001   rm -rf conftest.dir
1002   mkdir conftest.dir
1003   echo GrepMe > conftest.dir/file
1004   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1005   rm -rf conftest.dir
1006   if test -s conftest.tar; then
1007     AM_RUN_LOG([$am__untar <conftest.tar])
1008     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1009   fi
1010 done
1011 rm -rf conftest.dir
1012
1013 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1014 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1015 AC_SUBST([am__tar])
1016 AC_SUBST([am__untar])
1017 ]) # _AM_PROG_TAR
1018
1019 m4_include([m4/ax_define_dir.m4])
1020 dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1021 dnl
1022 dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
1023 dnl 
1024 dnl Permission is hereby granted, free of charge, to any person obtaining a
1025 dnl copy of this software and associated documentation files (the "Software"),
1026 dnl to deal in the Software without restriction, including without limitation
1027 dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1028 dnl and/or sell copies of the Software, and to permit persons to whom the
1029 dnl Software is furnished to do so, subject to the following conditions:
1030 dnl
1031 dnl The above copyright notice and this permission notice (including the next
1032 dnl paragraph) shall be included in all copies or substantial portions of the
1033 dnl Software.
1034 dnl
1035 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1036 dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1037 dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1038 dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1039 dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1040 dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1041 dnl DEALINGS IN THE SOFTWARE.
1042
1043 # XORG_MACROS_VERSION(required-version)
1044 # -------------------------------------
1045 # Minimum version: 1.1.0
1046 #
1047 # If you're using a macro added in Version 1.1 or newer, include this in
1048 # your configure.ac with the minimum required version, such as:
1049 # XORG_MACROS_VERSION(1.1)
1050 #
1051 # To ensure that this macro is defined, also add:
1052 # m4_ifndef([XORG_MACROS_VERSION],
1053 #     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1054 #
1055 #
1056 # See the "minimum version" comment for each macro you use to see what 
1057 # version you require.
1058 m4_defun([XORG_MACROS_VERSION],[
1059 m4_define([vers_have], [1.10.1])
1060 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1061 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1062 m4_if(m4_cmp(maj_have, maj_needed), 0,,
1063     [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1064 m4_if(m4_version_compare(vers_have, [$1]), -1,
1065     [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1066 m4_undefine([vers_have])
1067 m4_undefine([maj_have])
1068 m4_undefine([maj_needed])
1069 ]) # XORG_MACROS_VERSION
1070
1071 # XORG_PROG_RAWCPP()
1072 # ------------------
1073 # Minimum version: 1.0.0
1074 #
1075 # Find cpp program and necessary flags for use in pre-processing text files
1076 # such as man pages and config files
1077 AC_DEFUN([XORG_PROG_RAWCPP],[
1078 AC_REQUIRE([AC_PROG_CPP])
1079 AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
1080    [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1081
1082 # Check for flag to avoid builtin definitions - assumes unix is predefined,
1083 # which is not the best choice for supporting other OS'es, but covers most
1084 # of the ones we need for now.
1085 AC_MSG_CHECKING([if $RAWCPP requires -undef])
1086 AC_LANG_CONFTEST([Does cpp redefine unix ?])
1087 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1088         AC_MSG_RESULT([no])
1089 else
1090         if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1091                 RAWCPPFLAGS=-undef
1092                 AC_MSG_RESULT([yes])
1093         # under Cygwin unix is still defined even with -undef
1094         elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1095                 RAWCPPFLAGS="-undef -ansi"
1096                 AC_MSG_RESULT([yes, with -ansi])
1097         else
1098                 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1099         fi
1100 fi
1101 rm -f conftest.$ac_ext
1102
1103 AC_MSG_CHECKING([if $RAWCPP requires -traditional])
1104 AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
1105 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1106         AC_MSG_RESULT([no])
1107 else
1108         if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1109                 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1110                 AC_MSG_RESULT([yes])
1111         else
1112                 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1113         fi
1114 fi
1115 rm -f conftest.$ac_ext
1116 AC_SUBST(RAWCPPFLAGS)
1117 ]) # XORG_PROG_RAWCPP
1118
1119 # XORG_MANPAGE_SECTIONS()
1120 # -----------------------
1121 # Minimum version: 1.0.0
1122 #
1123 # Determine which sections man pages go in for the different man page types
1124 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1125 # Not sure if there's any better way than just hardcoding by OS name.
1126 # Override default settings by setting environment variables
1127 # Added MAN_SUBSTS in version 1.8
1128 # Added AC_PROG_SED in version 1.8
1129
1130 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1131 AC_REQUIRE([AC_CANONICAL_HOST])
1132 AC_REQUIRE([AC_PROG_SED])
1133
1134 if test x$APP_MAN_SUFFIX = x    ; then
1135     APP_MAN_SUFFIX=1
1136 fi
1137 if test x$APP_MAN_DIR = x    ; then
1138     APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1139 fi
1140
1141 if test x$LIB_MAN_SUFFIX = x    ; then
1142     LIB_MAN_SUFFIX=3
1143 fi
1144 if test x$LIB_MAN_DIR = x    ; then
1145     LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1146 fi
1147
1148 if test x$FILE_MAN_SUFFIX = x    ; then
1149     case $host_os in
1150         solaris*)       FILE_MAN_SUFFIX=4  ;;
1151         *)              FILE_MAN_SUFFIX=5  ;;
1152     esac
1153 fi
1154 if test x$FILE_MAN_DIR = x    ; then
1155     FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1156 fi
1157
1158 if test x$MISC_MAN_SUFFIX = x    ; then
1159     case $host_os in
1160         solaris*)       MISC_MAN_SUFFIX=5  ;;
1161         *)              MISC_MAN_SUFFIX=7  ;;
1162     esac
1163 fi
1164 if test x$MISC_MAN_DIR = x    ; then
1165     MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1166 fi
1167
1168 if test x$DRIVER_MAN_SUFFIX = x    ; then
1169     case $host_os in
1170         solaris*)       DRIVER_MAN_SUFFIX=7  ;;
1171         *)              DRIVER_MAN_SUFFIX=4  ;;
1172     esac
1173 fi
1174 if test x$DRIVER_MAN_DIR = x    ; then
1175     DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1176 fi
1177
1178 if test x$ADMIN_MAN_SUFFIX = x    ; then
1179     case $host_os in
1180         solaris*)       ADMIN_MAN_SUFFIX=1m ;;
1181         *)              ADMIN_MAN_SUFFIX=8  ;;
1182     esac
1183 fi
1184 if test x$ADMIN_MAN_DIR = x    ; then
1185     ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1186 fi
1187
1188
1189 AC_SUBST([APP_MAN_SUFFIX])
1190 AC_SUBST([LIB_MAN_SUFFIX])
1191 AC_SUBST([FILE_MAN_SUFFIX])
1192 AC_SUBST([MISC_MAN_SUFFIX])
1193 AC_SUBST([DRIVER_MAN_SUFFIX])
1194 AC_SUBST([ADMIN_MAN_SUFFIX])
1195 AC_SUBST([APP_MAN_DIR])
1196 AC_SUBST([LIB_MAN_DIR])
1197 AC_SUBST([FILE_MAN_DIR])
1198 AC_SUBST([MISC_MAN_DIR])
1199 AC_SUBST([DRIVER_MAN_DIR])
1200 AC_SUBST([ADMIN_MAN_DIR])
1201
1202 XORG_MAN_PAGE="X Version 11"
1203 AC_SUBST([XORG_MAN_PAGE])
1204 MAN_SUBSTS="\
1205         -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1206         -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1207         -e 's|__xservername__|Xorg|g' \
1208         -e 's|__xconfigfile__|xorg.conf|g' \
1209         -e 's|__projectroot__|\$(prefix)|g' \
1210         -e 's|__apploaddir__|\$(appdefaultdir)|g' \
1211         -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
1212         -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
1213         -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
1214         -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
1215         -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
1216         -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
1217 AC_SUBST([MAN_SUBSTS])
1218
1219 ]) # XORG_MANPAGE_SECTIONS
1220
1221 # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
1222 # ------------------------
1223 # Minimum version: 1.7.0
1224 #
1225 # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1226 # provided by xorg-sgml-doctools, if installed.
1227 AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1228 AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
1229 XORG_SGML_PATH=
1230 PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
1231     [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1232     [m4_ifval([$1],[:],
1233         [if test x"$cross_compiling" != x"yes" ; then
1234             AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1235                           [XORG_SGML_PATH=$prefix/share/sgml])
1236          fi])
1237     ])
1238
1239 # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
1240 # the path and the name of the doc stylesheet
1241 if test "x$XORG_SGML_PATH" != "x" ; then
1242    AC_MSG_RESULT([$XORG_SGML_PATH])
1243    STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
1244    XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
1245 else
1246    AC_MSG_RESULT([no])
1247 fi
1248
1249 AC_SUBST(XORG_SGML_PATH)
1250 AC_SUBST(STYLESHEET_SRCDIR)
1251 AC_SUBST(XSL_STYLESHEET)
1252 AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1253 ]) # XORG_CHECK_SGML_DOCTOOLS
1254
1255 # XORG_CHECK_LINUXDOC
1256 # -------------------
1257 # Minimum version: 1.0.0
1258 #
1259 # Defines the variable MAKE_TEXT if the necessary tools and
1260 # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1261 # Whether or not the necessary tools and files are found can be checked
1262 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
1263 AC_DEFUN([XORG_CHECK_LINUXDOC],[
1264 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1265 AC_REQUIRE([XORG_WITH_PS2PDF])
1266
1267 AC_PATH_PROG(LINUXDOC, linuxdoc)
1268
1269 AC_MSG_CHECKING([whether to build documentation])
1270
1271 if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1272    BUILDDOC=yes
1273 else
1274    BUILDDOC=no
1275 fi
1276
1277 AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1278
1279 AC_MSG_RESULT([$BUILDDOC])
1280
1281 AC_MSG_CHECKING([whether to build pdf documentation])
1282
1283 if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1284    BUILDPDFDOC=yes
1285 else
1286    BUILDPDFDOC=no
1287 fi
1288
1289 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1290
1291 AC_MSG_RESULT([$BUILDPDFDOC])
1292
1293 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1294 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1295 MAKE_PDF="$PS2PDF"
1296 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1297
1298 AC_SUBST(MAKE_TEXT)
1299 AC_SUBST(MAKE_PS)
1300 AC_SUBST(MAKE_PDF)
1301 AC_SUBST(MAKE_HTML)
1302 ]) # XORG_CHECK_LINUXDOC
1303
1304 # XORG_CHECK_DOCBOOK
1305 # -------------------
1306 # Minimum version: 1.0.0
1307 #
1308 # Checks for the ability to build output formats from SGML DocBook source.
1309 # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1310 # indicates whether the necessary tools and files are found and, if set,
1311 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
1312 AC_DEFUN([XORG_CHECK_DOCBOOK],[
1313 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1314
1315 BUILDTXTDOC=no
1316 BUILDPDFDOC=no
1317 BUILDPSDOC=no
1318 BUILDHTMLDOC=no
1319
1320 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
1321 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1322 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
1323 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1324
1325 AC_MSG_CHECKING([whether to build text documentation])
1326 if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1327    test x$BUILD_TXTDOC != xno; then
1328         BUILDTXTDOC=yes
1329 fi
1330 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1331 AC_MSG_RESULT([$BUILDTXTDOC])
1332
1333 AC_MSG_CHECKING([whether to build PDF documentation])
1334 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1335    test x$BUILD_PDFDOC != xno; then
1336         BUILDPDFDOC=yes
1337 fi
1338 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1339 AC_MSG_RESULT([$BUILDPDFDOC])
1340
1341 AC_MSG_CHECKING([whether to build PostScript documentation])
1342 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1343    test x$BUILD_PSDOC != xno; then
1344         BUILDPSDOC=yes
1345 fi
1346 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1347 AC_MSG_RESULT([$BUILDPSDOC])
1348
1349 AC_MSG_CHECKING([whether to build HTML documentation])
1350 if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1351    test x$BUILD_HTMLDOC != xno; then
1352         BUILDHTMLDOC=yes
1353 fi
1354 AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1355 AC_MSG_RESULT([$BUILDHTMLDOC])
1356
1357 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1358 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1359 MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1360 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1361
1362 AC_SUBST(MAKE_TEXT)
1363 AC_SUBST(MAKE_PS)
1364 AC_SUBST(MAKE_PDF)
1365 AC_SUBST(MAKE_HTML)
1366 ]) # XORG_CHECK_DOCBOOK
1367
1368 # XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
1369 # ----------------
1370 # Minimum version: 1.5.0
1371 #
1372 # Documentation tools are not always available on all platforms and sometimes
1373 # not at the appropriate level. This macro enables a module to test for the
1374 # presence of the tool and obtain it's path in separate variables. Coupled with
1375 # the --with-xmlto option, it allows maximum flexibilty in making decisions
1376 # as whether or not to use the xmlto package. When DEFAULT is not specified,
1377 # --with-xmlto assumes 'auto'.
1378 #
1379 # Interface to module:
1380 # HAVE_XMLTO:   used in makefiles to conditionally generate documentation
1381 # XMLTO:        returns the path of the xmlto program found
1382 #               returns the path set by the user in the environment
1383 # --with-xmlto: 'yes' user instructs the module to use xmlto
1384 #               'no' user instructs the module not to use xmlto
1385 #
1386 # Added in version 1.10.0
1387 # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
1388 #                  xmlto for text output requires either lynx, links, or w3m browsers
1389 #
1390 # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1391 #
1392 AC_DEFUN([XORG_WITH_XMLTO],[
1393 AC_ARG_VAR([XMLTO], [Path to xmlto command])
1394 m4_define([_defopt], m4_default([$2], [auto]))
1395 AC_ARG_WITH(xmlto,
1396         AS_HELP_STRING([--with-xmlto],
1397            [Use xmlto to regenerate documentation (default: ]_defopt[)]),
1398            [use_xmlto=$withval], [use_xmlto=]_defopt)
1399 m4_undefine([_defopt])
1400
1401 if test "x$use_xmlto" = x"auto"; then
1402    AC_PATH_PROG([XMLTO], [xmlto])
1403    if test "x$XMLTO" = "x"; then
1404         AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1405         have_xmlto=no
1406    else
1407         have_xmlto=yes
1408    fi
1409 elif test "x$use_xmlto" = x"yes" ; then
1410    AC_PATH_PROG([XMLTO], [xmlto])
1411    if test "x$XMLTO" = "x"; then
1412         AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1413    fi
1414    have_xmlto=yes
1415 elif test "x$use_xmlto" = x"no" ; then
1416    if test "x$XMLTO" != "x"; then
1417       AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1418    fi
1419    have_xmlto=no
1420 else
1421    AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1422 fi
1423
1424 # Test for a minimum version of xmlto, if provided.
1425 m4_ifval([$1],
1426 [if test "$have_xmlto" = yes; then
1427     # scrape the xmlto version
1428     AC_MSG_CHECKING([the xmlto version])
1429     xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1430     AC_MSG_RESULT([$xmlto_version])
1431     AS_VERSION_COMPARE([$xmlto_version], [$1],
1432         [if test "x$use_xmlto" = xauto; then
1433             AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1434             have_xmlto=no
1435         else
1436             AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1437         fi])
1438 fi])
1439
1440 # Test for the ability of xmlto to generate a text target
1441 have_xmlto_text=no
1442 cat > conftest.xml << "EOF"
1443 EOF
1444 AS_IF([test "$have_xmlto" = yes],
1445       [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1446              [have_xmlto_text=yes],
1447              [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
1448 rm -f conftest.xml
1449 AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1450 AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1451 ]) # XORG_WITH_XMLTO
1452
1453 # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
1454 # ----------------
1455 # Minimum version: 1.5.0
1456 #
1457 # Documentation tools are not always available on all platforms and sometimes
1458 # not at the appropriate level. This macro enables a module to test for the
1459 # presence of the tool and obtain it's path in separate variables. Coupled with
1460 # the --with-asciidoc option, it allows maximum flexibilty in making decisions
1461 # as whether or not to use the asciidoc package. When DEFAULT is not specified,
1462 # --with-asciidoc assumes 'auto'.
1463 #
1464 # Interface to module:
1465 # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1466 # ASCIIDOC:      returns the path of the asciidoc program found
1467 #                returns the path set by the user in the environment
1468 # --with-asciidoc: 'yes' user instructs the module to use asciidoc
1469 #                 'no' user instructs the module not to use asciidoc
1470 #
1471 # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1472 #
1473 AC_DEFUN([XORG_WITH_ASCIIDOC],[
1474 AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1475 m4_define([_defopt], m4_default([$2], [auto]))
1476 AC_ARG_WITH(asciidoc,
1477         AS_HELP_STRING([--with-asciidoc],
1478            [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
1479            [use_asciidoc=$withval], [use_asciidoc=]_defopt)
1480 m4_undefine([_defopt])
1481
1482 if test "x$use_asciidoc" = x"auto"; then
1483    AC_PATH_PROG([ASCIIDOC], [asciidoc])
1484    if test "x$ASCIIDOC" = "x"; then
1485         AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1486         have_asciidoc=no
1487    else
1488         have_asciidoc=yes
1489    fi
1490 elif test "x$use_asciidoc" = x"yes" ; then
1491    AC_PATH_PROG([ASCIIDOC], [asciidoc])
1492    if test "x$ASCIIDOC" = "x"; then
1493         AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1494    fi
1495    have_asciidoc=yes
1496 elif test "x$use_asciidoc" = x"no" ; then
1497    if test "x$ASCIIDOC" != "x"; then
1498       AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1499    fi
1500    have_asciidoc=no
1501 else
1502    AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1503 fi
1504 m4_ifval([$1],
1505 [if test "$have_asciidoc" = yes; then
1506     # scrape the asciidoc version
1507     AC_MSG_CHECKING([the asciidoc version])
1508     asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1509     AC_MSG_RESULT([$asciidoc_version])
1510     AS_VERSION_COMPARE([$asciidoc_version], [$1],
1511         [if test "x$use_asciidoc" = xauto; then
1512             AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1513             have_asciidoc=no
1514         else
1515             AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1516         fi])
1517 fi])
1518 AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1519 ]) # XORG_WITH_ASCIIDOC
1520
1521 # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
1522 # --------------------------------
1523 # Minimum version: 1.5.0
1524 #
1525 # Documentation tools are not always available on all platforms and sometimes
1526 # not at the appropriate level. This macro enables a module to test for the
1527 # presence of the tool and obtain it's path in separate variables. Coupled with
1528 # the --with-doxygen option, it allows maximum flexibilty in making decisions
1529 # as whether or not to use the doxygen package. When DEFAULT is not specified,
1530 # --with-doxygen assumes 'auto'.
1531 #
1532 # Interface to module:
1533 # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1534 # DOXYGEN:       returns the path of the doxygen program found
1535 #                returns the path set by the user in the environment
1536 # --with-doxygen: 'yes' user instructs the module to use doxygen
1537 #                 'no' user instructs the module not to use doxygen
1538 #
1539 # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1540 #
1541 AC_DEFUN([XORG_WITH_DOXYGEN],[
1542 AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1543 m4_define([_defopt], m4_default([$2], [auto]))
1544 AC_ARG_WITH(doxygen,
1545         AS_HELP_STRING([--with-doxygen],
1546            [Use doxygen to regenerate documentation (default: ]_defopt[)]),
1547            [use_doxygen=$withval], [use_doxygen=]_defopt)
1548 m4_undefine([_defopt])
1549
1550 if test "x$use_doxygen" = x"auto"; then
1551    AC_PATH_PROG([DOXYGEN], [doxygen])
1552    if test "x$DOXYGEN" = "x"; then
1553         AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1554         have_doxygen=no
1555    else
1556         have_doxygen=yes
1557    fi
1558 elif test "x$use_doxygen" = x"yes" ; then
1559    AC_PATH_PROG([DOXYGEN], [doxygen])
1560    if test "x$DOXYGEN" = "x"; then
1561         AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1562    fi
1563    have_doxygen=yes
1564 elif test "x$use_doxygen" = x"no" ; then
1565    if test "x$DOXYGEN" != "x"; then
1566       AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1567    fi
1568    have_doxygen=no
1569 else
1570    AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1571 fi
1572 m4_ifval([$1],
1573 [if test "$have_doxygen" = yes; then
1574     # scrape the doxygen version
1575     AC_MSG_CHECKING([the doxygen version])
1576     doxygen_version=`$DOXYGEN --version 2>/dev/null`
1577     AC_MSG_RESULT([$doxygen_version])
1578     AS_VERSION_COMPARE([$doxygen_version], [$1],
1579         [if test "x$use_doxygen" = xauto; then
1580             AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1581             have_doxygen=no
1582         else
1583             AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1584         fi])
1585 fi])
1586 AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1587 ]) # XORG_WITH_DOXYGEN
1588
1589 # XORG_WITH_GROFF([DEFAULT])
1590 # ----------------
1591 # Minimum version: 1.6.0
1592 #
1593 # Documentation tools are not always available on all platforms and sometimes
1594 # not at the appropriate level. This macro enables a module to test for the
1595 # presence of the tool and obtain it's path in separate variables. Coupled with
1596 # the --with-groff option, it allows maximum flexibilty in making decisions
1597 # as whether or not to use the groff package. When DEFAULT is not specified,
1598 # --with-groff assumes 'auto'.
1599 #
1600 # Interface to module:
1601 # HAVE_GROFF:    used in makefiles to conditionally generate documentation
1602 # HAVE_GROFF_MM: the memorandum macros (-mm) package
1603 # HAVE_GROFF_MS: the -ms macros package
1604 # GROFF:         returns the path of the groff program found
1605 #                returns the path set by the user in the environment
1606 # --with-groff:  'yes' user instructs the module to use groff
1607 #                'no' user instructs the module not to use groff
1608 #
1609 # Added in version 1.9.0:
1610 # HAVE_GROFF_HTML: groff has dependencies to output HTML format:
1611 #                  pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
1612 #                  psselect from the psutils package.
1613 #                  the ghostcript package. Refer to the grohtml man pages
1614 #
1615 # If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
1616 #
1617 # OS and distros often splits groff in a basic and full package, the former
1618 # having the groff program and the later having devices, fonts and macros
1619 # Checking for the groff executable is not enough.
1620 #
1621 # If macros are missing, we cannot assume that groff is useless, so we don't
1622 # unset HAVE_GROFF or GROFF env variables.
1623 # HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
1624 #
1625 AC_DEFUN([XORG_WITH_GROFF],[
1626 AC_ARG_VAR([GROFF], [Path to groff command])
1627 m4_define([_defopt], m4_default([$1], [auto]))
1628 AC_ARG_WITH(groff,
1629         AS_HELP_STRING([--with-groff],
1630            [Use groff to regenerate documentation (default: ]_defopt[)]),
1631            [use_groff=$withval], [use_groff=]_defopt)
1632 m4_undefine([_defopt])
1633
1634 if test "x$use_groff" = x"auto"; then
1635    AC_PATH_PROG([GROFF], [groff])
1636    if test "x$GROFF" = "x"; then
1637         AC_MSG_WARN([groff not found - documentation targets will be skipped])
1638         have_groff=no
1639    else
1640         have_groff=yes
1641    fi
1642 elif test "x$use_groff" = x"yes" ; then
1643    AC_PATH_PROG([GROFF], [groff])
1644    if test "x$GROFF" = "x"; then
1645         AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1646    fi
1647    have_groff=yes
1648 elif test "x$use_groff" = x"no" ; then
1649    if test "x$GROFF" != "x"; then
1650       AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1651    fi
1652    have_groff=no
1653 else
1654    AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1655 fi
1656
1657 # We have groff, test for the presence of the macro packages
1658 if test "x$have_groff" = x"yes"; then
1659     AC_MSG_CHECKING([for ${GROFF} -ms macros])
1660     if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1661         groff_ms_works=yes
1662     else
1663         groff_ms_works=no
1664     fi
1665     AC_MSG_RESULT([$groff_ms_works])
1666     AC_MSG_CHECKING([for ${GROFF} -mm macros])
1667     if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1668         groff_mm_works=yes
1669     else
1670         groff_mm_works=no
1671     fi
1672     AC_MSG_RESULT([$groff_mm_works])
1673 fi
1674
1675 # We have groff, test for HTML dependencies, one command per package
1676 if test "x$have_groff" = x"yes"; then
1677    AC_PATH_PROGS(GS_PATH, [gs gswin32c])
1678    AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
1679    AC_PATH_PROG(PSSELECT_PATH, [psselect])
1680    if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1681       have_groff_html=yes
1682    else
1683       have_groff_html=no
1684       AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
1685    fi
1686 fi
1687
1688 # Set Automake conditionals for Makefiles
1689 AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1690 AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1691 AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1692 AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1693 ]) # XORG_WITH_GROFF
1694
1695 # XORG_WITH_FOP([DEFAULT])
1696 # ----------------
1697 # Minimum version: 1.6.0
1698 #
1699 # Documentation tools are not always available on all platforms and sometimes
1700 # not at the appropriate level. This macro enables a module to test for the
1701 # presence of the tool and obtain it's path in separate variables. Coupled with
1702 # the --with-fop option, it allows maximum flexibilty in making decisions
1703 # as whether or not to use the fop package. When DEFAULT is not specified,
1704 # --with-fop assumes 'auto'.
1705 #
1706 # Interface to module:
1707 # HAVE_FOP:     used in makefiles to conditionally generate documentation
1708 # FOP:          returns the path of the fop program found
1709 #               returns the path set by the user in the environment
1710 # --with-fop:   'yes' user instructs the module to use fop
1711 #               'no' user instructs the module not to use fop
1712 #
1713 # If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1714 #
1715 AC_DEFUN([XORG_WITH_FOP],[
1716 AC_ARG_VAR([FOP], [Path to fop command])
1717 m4_define([_defopt], m4_default([$1], [auto]))
1718 AC_ARG_WITH(fop,
1719         AS_HELP_STRING([--with-fop],
1720            [Use fop to regenerate documentation (default: ]_defopt[)]),
1721            [use_fop=$withval], [use_fop=]_defopt)
1722 m4_undefine([_defopt])
1723
1724 if test "x$use_fop" = x"auto"; then
1725    AC_PATH_PROG([FOP], [fop])
1726    if test "x$FOP" = "x"; then
1727         AC_MSG_WARN([fop not found - documentation targets will be skipped])
1728         have_fop=no
1729    else
1730         have_fop=yes
1731    fi
1732 elif test "x$use_fop" = x"yes" ; then
1733    AC_PATH_PROG([FOP], [fop])
1734    if test "x$FOP" = "x"; then
1735         AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1736    fi
1737    have_fop=yes
1738 elif test "x$use_fop" = x"no" ; then
1739    if test "x$FOP" != "x"; then
1740       AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1741    fi
1742    have_fop=no
1743 else
1744    AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1745 fi
1746 AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1747 ]) # XORG_WITH_FOP
1748
1749 # XORG_WITH_PS2PDF([DEFAULT])
1750 # ----------------
1751 # Minimum version: 1.6.0
1752 #
1753 # Documentation tools are not always available on all platforms and sometimes
1754 # not at the appropriate level. This macro enables a module to test for the
1755 # presence of the tool and obtain it's path in separate variables. Coupled with
1756 # the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1757 # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
1758 # --with-ps2pdf assumes 'auto'.
1759 #
1760 # Interface to module:
1761 # HAVE_PS2PDF:  used in makefiles to conditionally generate documentation
1762 # PS2PDF:       returns the path of the ps2pdf program found
1763 #               returns the path set by the user in the environment
1764 # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1765 #                'no' user instructs the module not to use ps2pdf
1766 #
1767 # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1768 #
1769 AC_DEFUN([XORG_WITH_PS2PDF],[
1770 AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1771 m4_define([_defopt], m4_default([$1], [auto]))
1772 AC_ARG_WITH(ps2pdf,
1773         AS_HELP_STRING([--with-ps2pdf],
1774            [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
1775            [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
1776 m4_undefine([_defopt])
1777
1778 if test "x$use_ps2pdf" = x"auto"; then
1779    AC_PATH_PROG([PS2PDF], [ps2pdf])
1780    if test "x$PS2PDF" = "x"; then
1781         AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1782         have_ps2pdf=no
1783    else
1784         have_ps2pdf=yes
1785    fi
1786 elif test "x$use_ps2pdf" = x"yes" ; then
1787    AC_PATH_PROG([PS2PDF], [ps2pdf])
1788    if test "x$PS2PDF" = "x"; then
1789         AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1790    fi
1791    have_ps2pdf=yes
1792 elif test "x$use_ps2pdf" = x"no" ; then
1793    if test "x$PS2PDF" != "x"; then
1794       AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1795    fi
1796    have_ps2pdf=no
1797 else
1798    AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1799 fi
1800 AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1801 ]) # XORG_WITH_PS2PDF
1802
1803 # XORG_ENABLE_DOCS (enable_docs=yes)
1804 # ----------------
1805 # Minimum version: 1.6.0
1806 #
1807 # Documentation tools are not always available on all platforms and sometimes
1808 # not at the appropriate level. This macro enables a builder to skip all
1809 # documentation targets except traditional man pages.
1810 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1811 # maximum flexibilty in controlling documentation building.
1812 # Refer to:
1813 # XORG_WITH_XMLTO         --with-xmlto
1814 # XORG_WITH_ASCIIDOC      --with-asciidoc
1815 # XORG_WITH_DOXYGEN       --with-doxygen
1816 # XORG_WITH_FOP           --with-fop
1817 # XORG_WITH_GROFF         --with-groff
1818 # XORG_WITH_PS2PDF        --with-ps2pdf
1819 #
1820 # Interface to module:
1821 # ENABLE_DOCS:    used in makefiles to conditionally generate documentation
1822 # --enable-docs: 'yes' user instructs the module to generate docs
1823 #                'no' user instructs the module not to generate docs
1824 # parm1:        specify the default value, yes or no.
1825 #
1826 AC_DEFUN([XORG_ENABLE_DOCS],[
1827 m4_define([default], m4_default([$1], [yes]))
1828 AC_ARG_ENABLE(docs,
1829         AS_HELP_STRING([--enable-docs],
1830            [Enable building the documentation (default: ]default[)]),
1831            [build_docs=$enableval], [build_docs=]default)
1832 m4_undefine([default])
1833 AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1834 AC_MSG_CHECKING([whether to build documentation])
1835 AC_MSG_RESULT([$build_docs])
1836 ]) # XORG_ENABLE_DOCS
1837
1838 # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1839 # ----------------
1840 # Minimum version: 1.6.0
1841 #
1842 # This macro enables a builder to skip all developer documentation.
1843 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1844 # maximum flexibilty in controlling documentation building.
1845 # Refer to:
1846 # XORG_WITH_XMLTO         --with-xmlto
1847 # XORG_WITH_ASCIIDOC      --with-asciidoc
1848 # XORG_WITH_DOXYGEN       --with-doxygen
1849 # XORG_WITH_FOP           --with-fop
1850 # XORG_WITH_GROFF         --with-groff
1851 # XORG_WITH_PS2PDF        --with-ps2pdf
1852 #
1853 # Interface to module:
1854 # ENABLE_DEVEL_DOCS:    used in makefiles to conditionally generate developer docs
1855 # --enable-devel-docs:  'yes' user instructs the module to generate developer docs
1856 #                       'no' user instructs the module not to generate developer docs
1857 # parm1:                specify the default value, yes or no.
1858 #
1859 AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1860 m4_define([devel_default], m4_default([$1], [yes]))
1861 AC_ARG_ENABLE(devel-docs,
1862         AS_HELP_STRING([--enable-devel-docs],
1863            [Enable building the developer documentation (default: ]devel_default[)]),
1864            [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
1865 m4_undefine([devel_default])
1866 AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1867 AC_MSG_CHECKING([whether to build developer documentation])
1868 AC_MSG_RESULT([$build_devel_docs])
1869 ]) # XORG_ENABLE_DEVEL_DOCS
1870
1871 # XORG_ENABLE_SPECS (enable_specs=yes)
1872 # ----------------
1873 # Minimum version: 1.6.0
1874 #
1875 # This macro enables a builder to skip all functional specification targets.
1876 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1877 # maximum flexibilty in controlling documentation building.
1878 # Refer to:
1879 # XORG_WITH_XMLTO         --with-xmlto
1880 # XORG_WITH_ASCIIDOC      --with-asciidoc
1881 # XORG_WITH_DOXYGEN       --with-doxygen
1882 # XORG_WITH_FOP           --with-fop
1883 # XORG_WITH_GROFF         --with-groff
1884 # XORG_WITH_PS2PDF        --with-ps2pdf
1885 #
1886 # Interface to module:
1887 # ENABLE_SPECS:         used in makefiles to conditionally generate specs
1888 # --enable-specs:       'yes' user instructs the module to generate specs
1889 #                       'no' user instructs the module not to generate specs
1890 # parm1:                specify the default value, yes or no.
1891 #
1892 AC_DEFUN([XORG_ENABLE_SPECS],[
1893 m4_define([spec_default], m4_default([$1], [yes]))
1894 AC_ARG_ENABLE(specs,
1895         AS_HELP_STRING([--enable-specs],
1896            [Enable building the specs (default: ]spec_default[)]),
1897            [build_specs=$enableval], [build_specs=]spec_default)
1898 m4_undefine([spec_default])
1899 AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1900 AC_MSG_CHECKING([whether to build functional specifications])
1901 AC_MSG_RESULT([$build_specs])
1902 ]) # XORG_ENABLE_SPECS
1903
1904 # XORG_CHECK_MALLOC_ZERO
1905 # ----------------------
1906 # Minimum version: 1.0.0
1907 #
1908 # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1909 # malloc(0) returns NULL.  Packages should add one of these cflags to
1910 # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1911 AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1912 AC_ARG_ENABLE(malloc0returnsnull,
1913         AS_HELP_STRING([--enable-malloc0returnsnull],
1914                        [malloc(0) returns NULL (default: auto)]),
1915         [MALLOC_ZERO_RETURNS_NULL=$enableval],
1916         [MALLOC_ZERO_RETURNS_NULL=auto])
1917
1918 AC_MSG_CHECKING([whether malloc(0) returns NULL])
1919 if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1920         AC_RUN_IFELSE([
1921 char *malloc();
1922 char *realloc();
1923 char *calloc();
1924 main() {
1925     char *m0, *r0, *c0, *p;
1926     m0 = malloc(0);
1927     p = malloc(10);
1928     r0 = realloc(p,0);
1929     c0 = calloc(0);
1930     exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1931 }],
1932                 [MALLOC_ZERO_RETURNS_NULL=yes],
1933                 [MALLOC_ZERO_RETURNS_NULL=no],
1934                 [MALLOC_ZERO_RETURNS_NULL=yes])
1935 fi
1936 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1937
1938 if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1939         MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1940         XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1941         XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1942 else
1943         MALLOC_ZERO_CFLAGS=""
1944         XMALLOC_ZERO_CFLAGS=""
1945         XTMALLOC_ZERO_CFLAGS=""
1946 fi
1947
1948 AC_SUBST([MALLOC_ZERO_CFLAGS])
1949 AC_SUBST([XMALLOC_ZERO_CFLAGS])
1950 AC_SUBST([XTMALLOC_ZERO_CFLAGS])
1951 ]) # XORG_CHECK_MALLOC_ZERO
1952
1953 # XORG_WITH_LINT()
1954 # ----------------
1955 # Minimum version: 1.1.0
1956 #
1957 # This macro enables the use of a tool that flags some suspicious and
1958 # non-portable constructs (likely to be bugs) in C language source code.
1959 # It will attempt to locate the tool and use appropriate options.
1960 # There are various lint type tools on different platforms.
1961 #
1962 # Interface to module:
1963 # LINT:         returns the path to the tool found on the platform
1964 #               or the value set to LINT on the configure cmd line
1965 #               also an Automake conditional
1966 # LINT_FLAGS:   an Automake variable with appropriate flags
1967 #
1968 # --with-lint:  'yes' user instructs the module to use lint
1969 #               'no' user instructs the module not to use lint (default)
1970 #
1971 # If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
1972 # If the user sets the value of LINT_FLAGS, they are used verbatim.
1973 #
1974 AC_DEFUN([XORG_WITH_LINT],[
1975
1976 AC_ARG_VAR([LINT], [Path to a lint-style command])
1977 AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
1978 AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1979                 [Use a lint-style source code checker (default: disabled)])],
1980                 [use_lint=$withval], [use_lint=no])
1981
1982 # Obtain platform specific info like program name and options
1983 # The lint program on FreeBSD and NetBSD is different from the one on Solaris
1984 case $host_os in
1985   *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
1986         lint_name=splint
1987         lint_options="-badflag"
1988         ;;
1989   *freebsd* | *netbsd*)
1990         lint_name=lint
1991         lint_options="-u -b"
1992         ;;
1993   *solaris*)
1994         lint_name=lint
1995         lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1996         ;;
1997 esac
1998
1999 # Test for the presence of the program (either guessed by the code or spelled out by the user)
2000 if test "x$use_lint" = x"yes" ; then
2001    AC_PATH_PROG([LINT], [$lint_name])
2002    if test "x$LINT" = "x"; then
2003         AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
2004    fi
2005 elif test "x$use_lint" = x"no" ; then
2006    if test "x$LINT" != "x"; then
2007       AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
2008    fi
2009 else
2010    AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
2011 fi
2012
2013 # User supplied flags override default flags
2014 if test "x$LINT_FLAGS" != "x"; then
2015    lint_options=$LINT_FLAGS
2016 fi
2017
2018 AC_SUBST([LINT_FLAGS],[$lint_options])
2019 AM_CONDITIONAL(LINT, [test "x$LINT" != x])
2020
2021 ]) # XORG_WITH_LINT
2022
2023 # XORG_LINT_LIBRARY(LIBNAME)
2024 # --------------------------
2025 # Minimum version: 1.1.0
2026 #
2027 # Sets up flags for building lint libraries for checking programs that call
2028 # functions in the library.
2029 #
2030 # Interface to module:
2031 # LINTLIB               - Automake variable with the name of lint library file to make
2032 # MAKE_LINT_LIB         - Automake conditional
2033 #
2034 # --enable-lint-library:  - 'yes' user instructs the module to created a lint library
2035 #                         - 'no' user instructs the module not to create a lint library (default)
2036
2037 AC_DEFUN([XORG_LINT_LIBRARY],[
2038 AC_REQUIRE([XORG_WITH_LINT])
2039 AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
2040         [Create lint library (default: disabled)])],
2041         [make_lint_lib=$enableval], [make_lint_lib=no])
2042
2043 if test "x$make_lint_lib" = x"yes" ; then
2044    LINTLIB=llib-l$1.ln
2045    if test "x$LINT" = "x"; then
2046         AC_MSG_ERROR([Cannot make lint library without --with-lint])
2047    fi
2048 elif test "x$make_lint_lib" != x"no" ; then
2049    AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
2050 fi
2051
2052 AC_SUBST(LINTLIB)
2053 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2054
2055 ]) # XORG_LINT_LIBRARY
2056
2057 # XORG_CWARNFLAGS
2058 # ---------------
2059 # Minimum version: 1.2.0
2060 #
2061 # Defines CWARNFLAGS to enable C compiler warnings.
2062 #
2063 AC_DEFUN([XORG_CWARNFLAGS], [
2064 AC_REQUIRE([AC_PROG_CC_C99])
2065 if  test "x$GCC" = xyes ; then
2066     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
2067 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
2068 -Wbad-function-cast -Wformat=2"
2069     case `$CC -dumpversion` in
2070     3.4.* | 4.*)
2071         CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
2072         ;;
2073     esac
2074 else
2075     AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2076     if test "x$SUNCC" = "xyes"; then
2077         CWARNFLAGS="-v"
2078     fi
2079 fi
2080 AC_SUBST(CWARNFLAGS)
2081 ]) # XORG_CWARNFLAGS
2082
2083 # XORG_STRICT_OPTION
2084 # -----------------------
2085 # Minimum version: 1.3.0
2086 #
2087 # Add configure option to enable strict compilation
2088 AC_DEFUN([XORG_STRICT_OPTION], [
2089 # If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
2090 AC_REQUIRE([AC_PROG_CC_C99])
2091 AC_REQUIRE([XORG_CWARNFLAGS])
2092
2093 AC_ARG_ENABLE(strict-compilation,
2094                           AS_HELP_STRING([--enable-strict-compilation],
2095                           [Enable all warnings from compiler and make them errors (default: disabled)]),
2096                           [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
2097 if test "x$STRICT_COMPILE" = "xyes"; then
2098         AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2099         AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
2100         if test "x$GCC" = xyes ; then
2101                 STRICT_CFLAGS="-pedantic -Werror"
2102         elif test "x$SUNCC" = "xyes"; then
2103                 STRICT_CFLAGS="-errwarn"
2104     elif test "x$INTELCC" = "xyes"; then
2105                 STRICT_CFLAGS="-Werror"
2106         fi
2107 fi
2108 CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
2109 AC_SUBST([CWARNFLAGS])
2110 ]) # XORG_STRICT_OPTION
2111
2112 # XORG_DEFAULT_OPTIONS
2113 # --------------------
2114 # Minimum version: 1.3.0
2115 #
2116 # Defines default options for X.Org modules.
2117 #
2118 AC_DEFUN([XORG_DEFAULT_OPTIONS], [
2119 AC_REQUIRE([AC_PROG_INSTALL])
2120 XORG_CWARNFLAGS
2121 XORG_STRICT_OPTION
2122 XORG_RELEASE_VERSION
2123 XORG_CHANGELOG
2124 XORG_INSTALL
2125 XORG_MANPAGE_SECTIONS
2126 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
2127     [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
2128 ]) # XORG_DEFAULT_OPTIONS
2129
2130 # XORG_INSTALL()
2131 # ----------------
2132 # Minimum version: 1.4.0
2133 #
2134 # Defines the variable INSTALL_CMD as the command to copy
2135 # INSTALL from $prefix/share/util-macros.
2136 #
2137 AC_DEFUN([XORG_INSTALL], [
2138 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2139 macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
2140 INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
2141 mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
2142 || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
2143 echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
2144 AC_SUBST([INSTALL_CMD])
2145 ]) # XORG_INSTALL
2146 dnl Copyright 2005 Red Hat, Inc
2147 dnl
2148 dnl Permission to use, copy, modify, distribute, and sell this software and its
2149 dnl documentation for any purpose is hereby granted without fee, provided that
2150 dnl the above copyright notice appear in all copies and that both that
2151 dnl copyright notice and this permission notice appear in supporting
2152 dnl documentation.
2153 dnl
2154 dnl The above copyright notice and this permission notice shall be included
2155 dnl in all copies or substantial portions of the Software.
2156 dnl
2157 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2158 dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2159 dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2160 dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2161 dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2162 dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2163 dnl OTHER DEALINGS IN THE SOFTWARE.
2164 dnl
2165 dnl Except as contained in this notice, the name of the copyright holders shall
2166 dnl not be used in advertising or otherwise to promote the sale, use or
2167 dnl other dealings in this Software without prior written authorization
2168 dnl from the copyright holders.
2169 dnl
2170
2171 # XORG_RELEASE_VERSION
2172 # --------------------
2173 # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2174  
2175 AC_DEFUN([XORG_RELEASE_VERSION],[
2176         AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
2177                 [`echo $PACKAGE_VERSION | cut -d . -f 1`],
2178                 [Major version of this package])
2179         PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
2180         if test "x$PVM" = "x"; then
2181                 PVM="0"
2182         fi
2183         AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
2184                 [$PVM],
2185                 [Minor version of this package])
2186         PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
2187         if test "x$PVP" = "x"; then
2188                 PVP="0"
2189         fi
2190         AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
2191                 [$PVP],
2192                 [Patch version of this package])
2193 ])
2194
2195 # XORG_CHANGELOG()
2196 # ----------------
2197 # Minimum version: 1.2.0
2198 #
2199 # Defines the variable CHANGELOG_CMD as the command to generate
2200 # ChangeLog from git.
2201 #
2202 #
2203 AC_DEFUN([XORG_CHANGELOG], [
2204 CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
2205 mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
2206 || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
2207 echo 'git directory not found: installing possibly empty changelog.' >&2)"
2208 AC_SUBST([CHANGELOG_CMD])
2209 ]) # XORG_CHANGELOG
2210
2211 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2212
2213 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
2214 #
2215 # This program is free software; you can redistribute it and/or modify
2216 # it under the terms of the GNU General Public License as published by
2217 # the Free Software Foundation; either version 2 of the License, or
2218 # (at your option) any later version.
2219 #
2220 # This program is distributed in the hope that it will be useful, but
2221 # WITHOUT ANY WARRANTY; without even the implied warranty of
2222 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2223 # General Public License for more details.
2224 #
2225 # You should have received a copy of the GNU General Public License
2226 # along with this program; if not, write to the Free Software
2227 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2228 #
2229 # As a special exception to the GNU General Public License, if you
2230 # distribute this file as part of a program that contains a
2231 # configuration script generated by Autoconf, you may include it under
2232 # the same distribution terms that you use for the rest of that program.
2233
2234 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
2235 # ----------------------------------
2236 AC_DEFUN([PKG_PROG_PKG_CONFIG],
2237 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2238 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
2239 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
2240 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2241         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2242 fi
2243 if test -n "$PKG_CONFIG"; then
2244         _pkg_min_version=m4_default([$1], [0.9.0])
2245         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2246         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2247                 AC_MSG_RESULT([yes])
2248         else
2249                 AC_MSG_RESULT([no])
2250                 PKG_CONFIG=""
2251         fi
2252                 
2253 fi[]dnl
2254 ])# PKG_PROG_PKG_CONFIG
2255
2256 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2257 #
2258 # Check to see whether a particular set of modules exists.  Similar
2259 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
2260 #
2261 #
2262 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
2263 # this or PKG_CHECK_MODULES is called, or make sure to call
2264 # PKG_CHECK_EXISTS manually
2265 # --------------------------------------------------------------
2266 AC_DEFUN([PKG_CHECK_EXISTS],
2267 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2268 if test -n "$PKG_CONFIG" && \
2269     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2270   m4_ifval([$2], [$2], [:])
2271 m4_ifvaln([$3], [else
2272   $3])dnl
2273 fi])
2274
2275
2276 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2277 # ---------------------------------------------
2278 m4_define([_PKG_CONFIG],
2279 [if test -n "$$1"; then
2280     pkg_cv_[]$1="$$1"
2281  elif test -n "$PKG_CONFIG"; then
2282     PKG_CHECK_EXISTS([$3],
2283                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2284                      [pkg_failed=yes])
2285  else
2286     pkg_failed=untried
2287 fi[]dnl
2288 ])# _PKG_CONFIG
2289
2290 # _PKG_SHORT_ERRORS_SUPPORTED
2291 # -----------------------------
2292 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2293 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2294 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2295         _pkg_short_errors_supported=yes
2296 else
2297         _pkg_short_errors_supported=no
2298 fi[]dnl
2299 ])# _PKG_SHORT_ERRORS_SUPPORTED
2300
2301
2302 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2303 # [ACTION-IF-NOT-FOUND])
2304 #
2305 #
2306 # Note that if there is a possibility the first call to
2307 # PKG_CHECK_MODULES might not happen, you should be sure to include an
2308 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2309 #
2310 #
2311 # --------------------------------------------------------------
2312 AC_DEFUN([PKG_CHECK_MODULES],
2313 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2314 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2315 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2316
2317 pkg_failed=no
2318 AC_MSG_CHECKING([for $1])
2319
2320 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2321 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
2322
2323 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2324 and $1[]_LIBS to avoid the need to call pkg-config.
2325 See the pkg-config man page for more details.])
2326
2327 if test $pkg_failed = yes; then
2328         _PKG_SHORT_ERRORS_SUPPORTED
2329         if test $_pkg_short_errors_supported = yes; then
2330                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2331         else 
2332                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2333         fi
2334         # Put the nasty error message in config.log where it belongs
2335         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2336
2337         ifelse([$4], , [AC_MSG_ERROR(dnl
2338 [Package requirements ($2) were not met:
2339
2340 $$1_PKG_ERRORS
2341
2342 Consider adjusting the PKG_CONFIG_PATH environment variable if you
2343 installed software in a non-standard prefix.
2344
2345 _PKG_TEXT
2346 ])],
2347                 [AC_MSG_RESULT([no])
2348                 $4])
2349 elif test $pkg_failed = untried; then
2350         ifelse([$4], , [AC_MSG_FAILURE(dnl
2351 [The pkg-config script could not be found or is too old.  Make sure it
2352 is in your PATH or set the PKG_CONFIG environment variable to the full
2353 path to pkg-config.
2354
2355 _PKG_TEXT
2356
2357 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
2358                 [$4])
2359 else
2360         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2361         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2362         AC_MSG_RESULT([yes])
2363         ifelse([$3], , :, [$3])
2364 fi[]dnl
2365 ])# PKG_CHECK_MODULES
2366
2367 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2368 #
2369 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2370 #                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2371 #                 Inc.
2372 #   Written by Gordon Matzigkeit, 1996
2373 #
2374 # This file is free software; the Free Software Foundation gives
2375 # unlimited permission to copy and/or distribute it, with or without
2376 # modifications, as long as this notice is preserved.
2377
2378 m4_define([_LT_COPYING], [dnl
2379 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2380 #                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2381 #                 Inc.
2382 #   Written by Gordon Matzigkeit, 1996
2383 #
2384 #   This file is part of GNU Libtool.
2385 #
2386 # GNU Libtool is free software; you can redistribute it and/or
2387 # modify it under the terms of the GNU General Public License as
2388 # published by the Free Software Foundation; either version 2 of
2389 # the License, or (at your option) any later version.
2390 #
2391 # As a special exception to the GNU General Public License,
2392 # if you distribute this file as part of a program or library that
2393 # is built using GNU Libtool, you may include this file under the
2394 # same distribution terms that you use for the rest of that program.
2395 #
2396 # GNU Libtool is distributed in the hope that it will be useful,
2397 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2398 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2399 # GNU General Public License for more details.
2400 #
2401 # You should have received a copy of the GNU General Public License
2402 # along with GNU Libtool; see the file COPYING.  If not, a copy
2403 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2404 # obtained by writing to the Free Software Foundation, Inc.,
2405 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2406 ])
2407
2408 # serial 57 LT_INIT
2409
2410
2411 # LT_PREREQ(VERSION)
2412 # ------------------
2413 # Complain and exit if this libtool version is less that VERSION.
2414 m4_defun([LT_PREREQ],
2415 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2416        [m4_default([$3],
2417                    [m4_fatal([Libtool version $1 or higher is required],
2418                              63)])],
2419        [$2])])
2420
2421
2422 # _LT_CHECK_BUILDDIR
2423 # ------------------
2424 # Complain if the absolute build directory name contains unusual characters
2425 m4_defun([_LT_CHECK_BUILDDIR],
2426 [case `pwd` in
2427   *\ * | *\     *)
2428     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2429 esac
2430 ])
2431
2432
2433 # LT_INIT([OPTIONS])
2434 # ------------------
2435 AC_DEFUN([LT_INIT],
2436 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2437 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2438 AC_BEFORE([$0], [LT_LANG])dnl
2439 AC_BEFORE([$0], [LT_OUTPUT])dnl
2440 AC_BEFORE([$0], [LTDL_INIT])dnl
2441 m4_require([_LT_CHECK_BUILDDIR])dnl
2442
2443 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2444 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2445 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2446 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2447 dnl unless we require an AC_DEFUNed macro:
2448 AC_REQUIRE([LTOPTIONS_VERSION])dnl
2449 AC_REQUIRE([LTSUGAR_VERSION])dnl
2450 AC_REQUIRE([LTVERSION_VERSION])dnl
2451 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2452 m4_require([_LT_PROG_LTMAIN])dnl
2453
2454 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
2455
2456 dnl Parse OPTIONS
2457 _LT_SET_OPTIONS([$0], [$1])
2458
2459 # This can be used to rebuild libtool when needed
2460 LIBTOOL_DEPS="$ltmain"
2461
2462 # Always use our own libtool.
2463 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2464 AC_SUBST(LIBTOOL)dnl
2465
2466 _LT_SETUP
2467
2468 # Only expand once:
2469 m4_define([LT_INIT])
2470 ])# LT_INIT
2471
2472 # Old names:
2473 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2474 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2475 dnl aclocal-1.4 backwards compatibility:
2476 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2477 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2478
2479
2480 # _LT_CC_BASENAME(CC)
2481 # -------------------
2482 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2483 m4_defun([_LT_CC_BASENAME],
2484 [for cc_temp in $1""; do
2485   case $cc_temp in
2486     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2487     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2488     \-*) ;;
2489     *) break;;
2490   esac
2491 done
2492 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
2493 ])
2494
2495
2496 # _LT_FILEUTILS_DEFAULTS
2497 # ----------------------
2498 # It is okay to use these file commands and assume they have been set
2499 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2500 m4_defun([_LT_FILEUTILS_DEFAULTS],
2501 [: ${CP="cp -f"}
2502 : ${MV="mv -f"}
2503 : ${RM="rm -f"}
2504 ])# _LT_FILEUTILS_DEFAULTS
2505
2506
2507 # _LT_SETUP
2508 # ---------
2509 m4_defun([_LT_SETUP],
2510 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2511 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2512 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
2513 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2514
2515 _LT_DECL([], [host_alias], [0], [The host system])dnl
2516 _LT_DECL([], [host], [0])dnl
2517 _LT_DECL([], [host_os], [0])dnl
2518 dnl
2519 _LT_DECL([], [build_alias], [0], [The build system])dnl
2520 _LT_DECL([], [build], [0])dnl
2521 _LT_DECL([], [build_os], [0])dnl
2522 dnl
2523 AC_REQUIRE([AC_PROG_CC])dnl
2524 AC_REQUIRE([LT_PATH_LD])dnl
2525 AC_REQUIRE([LT_PATH_NM])dnl
2526 dnl
2527 AC_REQUIRE([AC_PROG_LN_S])dnl
2528 test -z "$LN_S" && LN_S="ln -s"
2529 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2530 dnl
2531 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2532 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2533 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2534 dnl
2535 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2536 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2537 m4_require([_LT_CMD_RELOAD])dnl
2538 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2539 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2540 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2541
2542 _LT_CONFIG_LIBTOOL_INIT([
2543 # See if we are running on zsh, and set the options which allow our
2544 # commands through without removal of \ escapes INIT.
2545 if test -n "\${ZSH_VERSION+set}" ; then
2546    setopt NO_GLOB_SUBST
2547 fi
2548 ])
2549 if test -n "${ZSH_VERSION+set}" ; then
2550    setopt NO_GLOB_SUBST
2551 fi
2552
2553 _LT_CHECK_OBJDIR
2554
2555 m4_require([_LT_TAG_COMPILER])dnl
2556
2557 case $host_os in
2558 aix3*)
2559   # AIX sometimes has problems with the GCC collect2 program.  For some
2560   # reason, if we set the COLLECT_NAMES environment variable, the problems
2561   # vanish in a puff of smoke.
2562   if test "X${COLLECT_NAMES+set}" != Xset; then
2563     COLLECT_NAMES=
2564     export COLLECT_NAMES
2565   fi
2566   ;;
2567 esac
2568
2569 # Global variables:
2570 ofile=libtool
2571 can_build_shared=yes
2572
2573 # All known linkers require a `.a' archive for static linking (except MSVC,
2574 # which needs '.lib').
2575 libext=a
2576
2577 with_gnu_ld="$lt_cv_prog_gnu_ld"
2578
2579 old_CC="$CC"
2580 old_CFLAGS="$CFLAGS"
2581
2582 # Set sane defaults for various variables
2583 test -z "$CC" && CC=cc
2584 test -z "$LTCC" && LTCC=$CC
2585 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2586 test -z "$LD" && LD=ld
2587 test -z "$ac_objext" && ac_objext=o
2588
2589 _LT_CC_BASENAME([$compiler])
2590
2591 # Only perform the check for file, if the check method requires it
2592 test -z "$MAGIC_CMD" && MAGIC_CMD=file
2593 case $deplibs_check_method in
2594 file_magic*)
2595   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2596     _LT_PATH_MAGIC
2597   fi
2598   ;;
2599 esac
2600
2601 # Use C for the default configuration in the libtool script
2602 LT_SUPPORTED_TAG([CC])
2603 _LT_LANG_C_CONFIG
2604 _LT_LANG_DEFAULT_CONFIG
2605 _LT_CONFIG_COMMANDS
2606 ])# _LT_SETUP
2607
2608
2609 # _LT_PREPARE_SED_QUOTE_VARS
2610 # --------------------------
2611 # Define a few sed substitution that help us do robust quoting.
2612 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2613 [# Backslashify metacharacters that are still active within
2614 # double-quoted strings.
2615 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2616
2617 # Same as above, but do not quote variable references.
2618 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2619
2620 # Sed substitution to delay expansion of an escaped shell variable in a
2621 # double_quote_subst'ed string.
2622 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2623
2624 # Sed substitution to delay expansion of an escaped single quote.
2625 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2626
2627 # Sed substitution to avoid accidental globbing in evaled expressions
2628 no_glob_subst='s/\*/\\\*/g'
2629 ])
2630
2631 # _LT_PROG_LTMAIN
2632 # ---------------
2633 # Note that this code is called both from `configure', and `config.status'
2634 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2635 # `config.status' has no value for ac_aux_dir unless we are using Automake,
2636 # so we pass a copy along to make sure it has a sensible value anyway.
2637 m4_defun([_LT_PROG_LTMAIN],
2638 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2639 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2640 ltmain="$ac_aux_dir/ltmain.sh"
2641 ])# _LT_PROG_LTMAIN
2642
2643
2644
2645 # So that we can recreate a full libtool script including additional
2646 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2647 # in macros and then make a single call at the end using the `libtool'
2648 # label.
2649
2650
2651 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2652 # ----------------------------------------
2653 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2654 m4_define([_LT_CONFIG_LIBTOOL_INIT],
2655 [m4_ifval([$1],
2656           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2657                      [$1
2658 ])])])
2659
2660 # Initialize.
2661 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2662
2663
2664 # _LT_CONFIG_LIBTOOL([COMMANDS])
2665 # ------------------------------
2666 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2667 m4_define([_LT_CONFIG_LIBTOOL],
2668 [m4_ifval([$1],
2669           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2670                      [$1
2671 ])])])
2672
2673 # Initialize.
2674 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2675
2676
2677 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2678 # -----------------------------------------------------
2679 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2680 [_LT_CONFIG_LIBTOOL([$1])
2681 _LT_CONFIG_LIBTOOL_INIT([$2])
2682 ])
2683
2684
2685 # _LT_FORMAT_COMMENT([COMMENT])
2686 # -----------------------------
2687 # Add leading comment marks to the start of each line, and a trailing
2688 # full-stop to the whole comment if one is not present already.
2689 m4_define([_LT_FORMAT_COMMENT],
2690 [m4_ifval([$1], [
2691 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2692               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2693 )])
2694
2695
2696
2697
2698
2699 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2700 # -------------------------------------------------------------------
2701 # CONFIGNAME is the name given to the value in the libtool script.
2702 # VARNAME is the (base) name used in the configure script.
2703 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2704 # VARNAME.  Any other value will be used directly.
2705 m4_define([_LT_DECL],
2706 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2707     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2708         [m4_ifval([$1], [$1], [$2])])
2709     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2710     m4_ifval([$4],
2711         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2712     lt_dict_add_subkey([lt_decl_dict], [$2],
2713         [tagged?], [m4_ifval([$5], [yes], [no])])])
2714 ])
2715
2716
2717 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2718 # --------------------------------------------------------
2719 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2720
2721
2722 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2723 # ------------------------------------------------
2724 m4_define([lt_decl_tag_varnames],
2725 [_lt_decl_filter([tagged?], [yes], $@)])
2726
2727
2728 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2729 # ---------------------------------------------------------
2730 m4_define([_lt_decl_filter],
2731 [m4_case([$#],
2732   [0], [m4_fatal([$0: too few arguments: $#])],
2733   [1], [m4_fatal([$0: too few arguments: $#: $1])],
2734   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2735   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2736   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2737 ])
2738
2739
2740 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2741 # --------------------------------------------------
2742 m4_define([lt_decl_quote_varnames],
2743 [_lt_decl_filter([value], [1], $@)])
2744
2745
2746 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2747 # ---------------------------------------------------
2748 m4_define([lt_decl_dquote_varnames],
2749 [_lt_decl_filter([value], [2], $@)])
2750
2751
2752 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2753 # ---------------------------------------------------
2754 m4_define([lt_decl_varnames_tagged],
2755 [m4_assert([$# <= 2])dnl
2756 _$0(m4_quote(m4_default([$1], [[, ]])),
2757     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2758     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2759 m4_define([_lt_decl_varnames_tagged],
2760 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2761
2762
2763 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2764 # ------------------------------------------------
2765 m4_define([lt_decl_all_varnames],
2766 [_$0(m4_quote(m4_default([$1], [[, ]])),
2767      m4_if([$2], [],
2768            m4_quote(lt_decl_varnames),
2769         m4_quote(m4_shift($@))))[]dnl
2770 ])
2771 m4_define([_lt_decl_all_varnames],
2772 [lt_join($@, lt_decl_varnames_tagged([$1],
2773                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2774 ])
2775
2776
2777 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
2778 # ------------------------------------
2779 # Quote a variable value, and forward it to `config.status' so that its
2780 # declaration there will have the same value as in `configure'.  VARNAME
2781 # must have a single quote delimited value for this to work.
2782 m4_define([_LT_CONFIG_STATUS_DECLARE],
2783 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2784
2785
2786 # _LT_CONFIG_STATUS_DECLARATIONS
2787 # ------------------------------
2788 # We delimit libtool config variables with single quotes, so when
2789 # we write them to config.status, we have to be sure to quote all
2790 # embedded single quotes properly.  In configure, this macro expands
2791 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2792 #
2793 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2794 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2795 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2796     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2797
2798
2799 # _LT_LIBTOOL_TAGS
2800 # ----------------
2801 # Output comment and list of tags supported by the script
2802 m4_defun([_LT_LIBTOOL_TAGS],
2803 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2804 available_tags="_LT_TAGS"dnl
2805 ])
2806
2807
2808 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2809 # -----------------------------------
2810 # Extract the dictionary values for VARNAME (optionally with TAG) and
2811 # expand to a commented shell variable setting:
2812 #
2813 #    # Some comment about what VAR is for.
2814 #    visible_name=$lt_internal_name
2815 m4_define([_LT_LIBTOOL_DECLARE],
2816 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2817                                            [description])))[]dnl
2818 m4_pushdef([_libtool_name],
2819     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2820 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2821     [0], [_libtool_name=[$]$1],
2822     [1], [_libtool_name=$lt_[]$1],
2823     [2], [_libtool_name=$lt_[]$1],
2824     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2825 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2826 ])
2827
2828
2829 # _LT_LIBTOOL_CONFIG_VARS
2830 # -----------------------
2831 # Produce commented declarations of non-tagged libtool config variables
2832 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2833 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2834 # section) are produced by _LT_LIBTOOL_TAG_VARS.
2835 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2836 [m4_foreach([_lt_var],
2837     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2838     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2839
2840
2841 # _LT_LIBTOOL_TAG_VARS(TAG)
2842 # -------------------------
2843 m4_define([_LT_LIBTOOL_TAG_VARS],
2844 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2845     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2846
2847
2848 # _LT_TAGVAR(VARNAME, [TAGNAME])
2849 # ------------------------------
2850 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2851
2852
2853 # _LT_CONFIG_COMMANDS
2854 # -------------------
2855 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2856 # variables for single and double quote escaping we saved from calls
2857 # to _LT_DECL, we can put quote escaped variables declarations
2858 # into `config.status', and then the shell code to quote escape them in
2859 # for loops in `config.status'.  Finally, any additional code accumulated
2860 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2861 m4_defun([_LT_CONFIG_COMMANDS],
2862 [AC_PROVIDE_IFELSE([LT_OUTPUT],
2863         dnl If the libtool generation code has been placed in $CONFIG_LT,
2864         dnl instead of duplicating it all over again into config.status,
2865         dnl then we will have config.status run $CONFIG_LT later, so it
2866         dnl needs to know what name is stored there:
2867         [AC_CONFIG_COMMANDS([libtool],
2868             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2869     dnl If the libtool generation code is destined for config.status,
2870     dnl expand the accumulated commands and init code now:
2871     [AC_CONFIG_COMMANDS([libtool],
2872         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2873 ])#_LT_CONFIG_COMMANDS
2874
2875
2876 # Initialize.
2877 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2878 [
2879
2880 # The HP-UX ksh and POSIX shell print the target directory to stdout
2881 # if CDPATH is set.
2882 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2883
2884 sed_quote_subst='$sed_quote_subst'
2885 double_quote_subst='$double_quote_subst'
2886 delay_variable_subst='$delay_variable_subst'
2887 _LT_CONFIG_STATUS_DECLARATIONS
2888 LTCC='$LTCC'
2889 LTCFLAGS='$LTCFLAGS'
2890 compiler='$compiler_DEFAULT'
2891
2892 # A function that is used when there is no print builtin or printf.
2893 func_fallback_echo ()
2894 {
2895   eval 'cat <<_LTECHO_EOF
2896 \$[]1
2897 _LTECHO_EOF'
2898 }
2899
2900 # Quote evaled strings.
2901 for var in lt_decl_all_varnames([[ \
2902 ]], lt_decl_quote_varnames); do
2903     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2904     *[[\\\\\\\`\\"\\\$]]*)
2905       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2906       ;;
2907     *)
2908       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2909       ;;
2910     esac
2911 done
2912
2913 # Double-quote double-evaled strings.
2914 for var in lt_decl_all_varnames([[ \
2915 ]], lt_decl_dquote_varnames); do
2916     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2917     *[[\\\\\\\`\\"\\\$]]*)
2918       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2919       ;;
2920     *)
2921       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2922       ;;
2923     esac
2924 done
2925
2926 _LT_OUTPUT_LIBTOOL_INIT
2927 ])
2928
2929 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
2930 # ------------------------------------
2931 # Generate a child script FILE with all initialization necessary to
2932 # reuse the environment learned by the parent script, and make the
2933 # file executable.  If COMMENT is supplied, it is inserted after the
2934 # `#!' sequence but before initialization text begins.  After this
2935 # macro, additional text can be appended to FILE to form the body of
2936 # the child script.  The macro ends with non-zero status if the
2937 # file could not be fully written (such as if the disk is full).
2938 m4_ifdef([AS_INIT_GENERATED],
2939 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
2940 [m4_defun([_LT_GENERATED_FILE_INIT],
2941 [m4_require([AS_PREPARE])]dnl
2942 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
2943 [lt_write_fail=0
2944 cat >$1 <<_ASEOF || lt_write_fail=1
2945 #! $SHELL
2946 # Generated by $as_me.
2947 $2
2948 SHELL=\${CONFIG_SHELL-$SHELL}
2949 export SHELL
2950 _ASEOF
2951 cat >>$1 <<\_ASEOF || lt_write_fail=1
2952 AS_SHELL_SANITIZE
2953 _AS_PREPARE
2954 exec AS_MESSAGE_FD>&1
2955 _ASEOF
2956 test $lt_write_fail = 0 && chmod +x $1[]dnl
2957 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2958
2959 # LT_OUTPUT
2960 # ---------
2961 # This macro allows early generation of the libtool script (before
2962 # AC_OUTPUT is called), incase it is used in configure for compilation
2963 # tests.
2964 AC_DEFUN([LT_OUTPUT],
2965 [: ${CONFIG_LT=./config.lt}
2966 AC_MSG_NOTICE([creating $CONFIG_LT])
2967 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
2968 [# Run this file to recreate a libtool stub with the current configuration.])
2969
2970 cat >>"$CONFIG_LT" <<\_LTEOF
2971 lt_cl_silent=false
2972 exec AS_MESSAGE_LOG_FD>>config.log
2973 {
2974   echo
2975   AS_BOX([Running $as_me.])
2976 } >&AS_MESSAGE_LOG_FD
2977
2978 lt_cl_help="\
2979 \`$as_me' creates a local libtool stub from the current configuration,
2980 for use in further configure time tests before the real libtool is
2981 generated.
2982
2983 Usage: $[0] [[OPTIONS]]
2984
2985   -h, --help      print this help, then exit
2986   -V, --version   print version number, then exit
2987   -q, --quiet     do not print progress messages
2988   -d, --debug     don't remove temporary files
2989
2990 Report bugs to <bug-libtool@gnu.org>."
2991
2992 lt_cl_version="\
2993 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2994 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2995 configured by $[0], generated by m4_PACKAGE_STRING.
2996
2997 Copyright (C) 2010 Free Software Foundation, Inc.
2998 This config.lt script is free software; the Free Software Foundation
2999 gives unlimited permision to copy, distribute and modify it."
3000
3001 while test $[#] != 0
3002 do
3003   case $[1] in
3004     --version | --v* | -V )
3005       echo "$lt_cl_version"; exit 0 ;;
3006     --help | --h* | -h )
3007       echo "$lt_cl_help"; exit 0 ;;
3008     --debug | --d* | -d )
3009       debug=: ;;
3010     --quiet | --q* | --silent | --s* | -q )
3011       lt_cl_silent=: ;;
3012
3013     -*) AC_MSG_ERROR([unrecognized option: $[1]
3014 Try \`$[0] --help' for more information.]) ;;
3015
3016     *) AC_MSG_ERROR([unrecognized argument: $[1]
3017 Try \`$[0] --help' for more information.]) ;;
3018   esac
3019   shift
3020 done
3021
3022 if $lt_cl_silent; then
3023   exec AS_MESSAGE_FD>/dev/null
3024 fi
3025 _LTEOF
3026
3027 cat >>"$CONFIG_LT" <<_LTEOF
3028 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
3029 _LTEOF
3030
3031 cat >>"$CONFIG_LT" <<\_LTEOF
3032 AC_MSG_NOTICE([creating $ofile])
3033 _LT_OUTPUT_LIBTOOL_COMMANDS
3034 AS_EXIT(0)
3035 _LTEOF
3036 chmod +x "$CONFIG_LT"
3037
3038 # configure is writing to config.log, but config.lt does its own redirection,
3039 # appending to config.log, which fails on DOS, as config.log is still kept
3040 # open by configure.  Here we exec the FD to /dev/null, effectively closing
3041 # config.log, so it can be properly (re)opened and appended to by config.lt.
3042 lt_cl_success=:
3043 test "$silent" = yes &&
3044   lt_config_lt_args="$lt_config_lt_args --quiet"
3045 exec AS_MESSAGE_LOG_FD>/dev/null
3046 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
3047 exec AS_MESSAGE_LOG_FD>>config.log
3048 $lt_cl_success || AS_EXIT(1)
3049 ])# LT_OUTPUT
3050
3051
3052 # _LT_CONFIG(TAG)
3053 # ---------------
3054 # If TAG is the built-in tag, create an initial libtool script with a
3055 # default configuration from the untagged config vars.  Otherwise add code
3056 # to config.status for appending the configuration named by TAG from the
3057 # matching tagged config vars.
3058 m4_defun([_LT_CONFIG],
3059 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3060 _LT_CONFIG_SAVE_COMMANDS([
3061   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
3062   m4_if(_LT_TAG, [C], [
3063     # See if we are running on zsh, and set the options which allow our
3064     # commands through without removal of \ escapes.
3065     if test -n "${ZSH_VERSION+set}" ; then
3066       setopt NO_GLOB_SUBST
3067     fi
3068
3069     cfgfile="${ofile}T"
3070     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
3071     $RM "$cfgfile"
3072
3073     cat <<_LT_EOF >> "$cfgfile"
3074 #! $SHELL
3075
3076 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3077 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
3078 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3079 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3080 #
3081 _LT_COPYING
3082 _LT_LIBTOOL_TAGS
3083
3084 # ### BEGIN LIBTOOL CONFIG
3085 _LT_LIBTOOL_CONFIG_VARS
3086 _LT_LIBTOOL_TAG_VARS
3087 # ### END LIBTOOL CONFIG
3088
3089 _LT_EOF
3090
3091   case $host_os in
3092   aix3*)
3093     cat <<\_LT_EOF >> "$cfgfile"
3094 # AIX sometimes has problems with the GCC collect2 program.  For some
3095 # reason, if we set the COLLECT_NAMES environment variable, the problems
3096 # vanish in a puff of smoke.
3097 if test "X${COLLECT_NAMES+set}" != Xset; then
3098   COLLECT_NAMES=
3099   export COLLECT_NAMES
3100 fi
3101 _LT_EOF
3102     ;;
3103   esac
3104
3105   _LT_PROG_LTMAIN
3106
3107   # We use sed instead of cat because bash on DJGPP gets confused if
3108   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3109   # text mode, it properly converts lines to CR/LF.  This bash problem
3110   # is reportedly fixed, but why not run on old versions too?
3111   sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
3112     || (rm -f "$cfgfile"; exit 1)
3113
3114   _LT_PROG_XSI_SHELLFNS
3115
3116   sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
3117     || (rm -f "$cfgfile"; exit 1)
3118
3119   mv -f "$cfgfile" "$ofile" ||
3120     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3121   chmod +x "$ofile"
3122 ],
3123 [cat <<_LT_EOF >> "$ofile"
3124
3125 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
3126 dnl in a comment (ie after a #).
3127 # ### BEGIN LIBTOOL TAG CONFIG: $1
3128 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
3129 # ### END LIBTOOL TAG CONFIG: $1
3130 _LT_EOF
3131 ])dnl /m4_if
3132 ],
3133 [m4_if([$1], [], [
3134     PACKAGE='$PACKAGE'
3135     VERSION='$VERSION'
3136     TIMESTAMP='$TIMESTAMP'
3137     RM='$RM'
3138     ofile='$ofile'], [])
3139 ])dnl /_LT_CONFIG_SAVE_COMMANDS
3140 ])# _LT_CONFIG
3141
3142
3143 # LT_SUPPORTED_TAG(TAG)
3144 # ---------------------
3145 # Trace this macro to discover what tags are supported by the libtool
3146 # --tag option, using:
3147 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
3148 AC_DEFUN([LT_SUPPORTED_TAG], [])
3149
3150
3151 # C support is built-in for now
3152 m4_define([_LT_LANG_C_enabled], [])
3153 m4_define([_LT_TAGS], [])
3154
3155
3156 # LT_LANG(LANG)
3157 # -------------
3158 # Enable libtool support for the given language if not already enabled.
3159 AC_DEFUN([LT_LANG],
3160 [AC_BEFORE([$0], [LT_OUTPUT])dnl
3161 m4_case([$1],
3162   [C],                  [_LT_LANG(C)],
3163   [C++],                [_LT_LANG(CXX)],
3164   [Java],               [_LT_LANG(GCJ)],
3165   [Fortran 77],         [_LT_LANG(F77)],
3166   [Fortran],            [_LT_LANG(FC)],
3167   [Windows Resource],   [_LT_LANG(RC)],
3168   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
3169     [_LT_LANG($1)],
3170     [m4_fatal([$0: unsupported language: "$1"])])])dnl
3171 ])# LT_LANG
3172
3173
3174 # _LT_LANG(LANGNAME)
3175 # ------------------
3176 m4_defun([_LT_LANG],
3177 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
3178   [LT_SUPPORTED_TAG([$1])dnl
3179   m4_append([_LT_TAGS], [$1 ])dnl
3180   m4_define([_LT_LANG_]$1[_enabled], [])dnl
3181   _LT_LANG_$1_CONFIG($1)])dnl
3182 ])# _LT_LANG
3183
3184
3185 # _LT_LANG_DEFAULT_CONFIG
3186 # -----------------------
3187 m4_defun([_LT_LANG_DEFAULT_CONFIG],
3188 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
3189   [LT_LANG(CXX)],
3190   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3191
3192 AC_PROVIDE_IFELSE([AC_PROG_F77],
3193   [LT_LANG(F77)],
3194   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3195
3196 AC_PROVIDE_IFELSE([AC_PROG_FC],
3197   [LT_LANG(FC)],
3198   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3199
3200 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3201 dnl pulling things in needlessly.
3202 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3203   [LT_LANG(GCJ)],
3204   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3205     [LT_LANG(GCJ)],
3206     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3207       [LT_LANG(GCJ)],
3208       [m4_ifdef([AC_PROG_GCJ],
3209         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3210        m4_ifdef([A][M_PROG_GCJ],
3211         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3212        m4_ifdef([LT_PROG_GCJ],
3213         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3214
3215 AC_PROVIDE_IFELSE([LT_PROG_RC],
3216   [LT_LANG(RC)],
3217   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3218 ])# _LT_LANG_DEFAULT_CONFIG
3219
3220 # Obsolete macros:
3221 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3222 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3223 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3224 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3225 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
3226 dnl aclocal-1.4 backwards compatibility:
3227 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3228 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3229 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3230 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3231 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
3232
3233
3234 # _LT_TAG_COMPILER
3235 # ----------------
3236 m4_defun([_LT_TAG_COMPILER],
3237 [AC_REQUIRE([AC_PROG_CC])dnl
3238
3239 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3240 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3241 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3242 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3243
3244 # If no C compiler was specified, use CC.
3245 LTCC=${LTCC-"$CC"}
3246
3247 # If no C compiler flags were specified, use CFLAGS.
3248 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3249
3250 # Allow CC to be a program name with arguments.
3251 compiler=$CC
3252 ])# _LT_TAG_COMPILER
3253
3254
3255 # _LT_COMPILER_BOILERPLATE
3256 # ------------------------
3257 # Check for compiler boilerplate output or warnings with
3258 # the simple compiler test code.
3259 m4_defun([_LT_COMPILER_BOILERPLATE],
3260 [m4_require([_LT_DECL_SED])dnl
3261 ac_outfile=conftest.$ac_objext
3262 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3263 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3264 _lt_compiler_boilerplate=`cat conftest.err`
3265 $RM conftest*
3266 ])# _LT_COMPILER_BOILERPLATE
3267
3268
3269 # _LT_LINKER_BOILERPLATE
3270 # ----------------------
3271 # Check for linker boilerplate output or warnings with
3272 # the simple link test code.
3273 m4_defun([_LT_LINKER_BOILERPLATE],
3274 [m4_require([_LT_DECL_SED])dnl
3275 ac_outfile=conftest.$ac_objext
3276 echo "$lt_simple_link_test_code" >conftest.$ac_ext
3277 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3278 _lt_linker_boilerplate=`cat conftest.err`
3279 $RM -r conftest*
3280 ])# _LT_LINKER_BOILERPLATE
3281
3282 # _LT_REQUIRED_DARWIN_CHECKS
3283 # -------------------------
3284 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3285   case $host_os in
3286     rhapsody* | darwin*)
3287     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3288     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3289     AC_CHECK_TOOL([LIPO], [lipo], [:])
3290     AC_CHECK_TOOL([OTOOL], [otool], [:])
3291     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3292     _LT_DECL([], [DSYMUTIL], [1],
3293       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3294     _LT_DECL([], [NMEDIT], [1],
3295       [Tool to change global to local symbols on Mac OS X])
3296     _LT_DECL([], [LIPO], [1],
3297       [Tool to manipulate fat objects and archives on Mac OS X])
3298     _LT_DECL([], [OTOOL], [1],
3299       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3300     _LT_DECL([], [OTOOL64], [1],
3301       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3302
3303     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3304       [lt_cv_apple_cc_single_mod=no
3305       if test -z "${LT_MULTI_MODULE}"; then
3306         # By default we will add the -single_module flag. You can override
3307         # by either setting the environment variable LT_MULTI_MODULE
3308         # non-empty at configure time, or by adding -multi_module to the
3309         # link flags.
3310         rm -rf libconftest.dylib*
3311         echo "int foo(void){return 1;}" > conftest.c
3312         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3313 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3314         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3315           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3316         _lt_result=$?
3317         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
3318           lt_cv_apple_cc_single_mod=yes
3319         else
3320           cat conftest.err >&AS_MESSAGE_LOG_FD
3321         fi
3322         rm -rf libconftest.dylib*
3323         rm -f conftest.*
3324       fi])
3325     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3326       [lt_cv_ld_exported_symbols_list],
3327       [lt_cv_ld_exported_symbols_list=no
3328       save_LDFLAGS=$LDFLAGS
3329       echo "_main" > conftest.sym
3330       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3331       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3332         [lt_cv_ld_exported_symbols_list=yes],
3333         [lt_cv_ld_exported_symbols_list=no])
3334         LDFLAGS="$save_LDFLAGS"
3335     ])
3336     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
3337       [lt_cv_ld_force_load=no
3338       cat > conftest.c << _LT_EOF
3339 int forced_loaded() { return 2;}
3340 _LT_EOF
3341       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
3342       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
3343       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
3344       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
3345       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
3346       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
3347       cat > conftest.c << _LT_EOF
3348 int main() { return 0;}
3349 _LT_EOF
3350       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
3351       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
3352       _lt_result=$?
3353       if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
3354         lt_cv_ld_force_load=yes
3355       else
3356         cat conftest.err >&AS_MESSAGE_LOG_FD
3357       fi
3358         rm -f conftest.err libconftest.a conftest conftest.c
3359         rm -rf conftest.dSYM
3360     ])
3361     case $host_os in
3362     rhapsody* | darwin1.[[012]])
3363       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3364     darwin1.*)
3365       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3366     darwin*) # darwin 5.x on
3367       # if running on 10.5 or later, the deployment target defaults
3368       # to the OS version, if on x86, and 10.4, the deployment
3369       # target defaults to 10.4. Don't you love it?
3370       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3371         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3372           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3373         10.[[012]]*)
3374           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3375         10.*)
3376           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3377       esac
3378     ;;
3379   esac
3380     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3381       _lt_dar_single_mod='$single_module'
3382     fi
3383     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3384       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3385     else
3386       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3387     fi
3388     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
3389       _lt_dsymutil='~$DSYMUTIL $lib || :'
3390     else
3391       _lt_dsymutil=
3392     fi
3393     ;;
3394   esac
3395 ])
3396
3397
3398 # _LT_DARWIN_LINKER_FEATURES
3399 # --------------------------
3400 # Checks for linker and compiler features on darwin
3401 m4_defun([_LT_DARWIN_LINKER_FEATURES],
3402 [
3403   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3404   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3405   _LT_TAGVAR(hardcode_direct, $1)=no
3406   _LT_TAGVAR(hardcode_automatic, $1)=yes
3407   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3408   if test "$lt_cv_ld_force_load" = "yes"; then
3409     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
3410   else
3411     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3412   fi
3413   _LT_TAGVAR(link_all_deplibs, $1)=yes
3414   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3415   case $cc_basename in
3416      ifort*) _lt_dar_can_shared=yes ;;
3417      *) _lt_dar_can_shared=$GCC ;;
3418   esac
3419   if test "$_lt_dar_can_shared" = "yes"; then
3420     output_verbose_link_cmd=func_echo_all
3421     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
3422     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3423     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
3424     _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
3425     m4_if([$1], [CXX],
3426 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3427       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -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${_lt_dsymutil}"
3428       _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -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${_lt_dar_export_syms}${_lt_dsymutil}"
3429     fi
3430 ],[])
3431   else
3432   _LT_TAGVAR(ld_shlibs, $1)=no
3433   fi
3434 ])
3435
3436 # _LT_SYS_MODULE_PATH_AIX
3437 # -----------------------
3438 # Links a minimal program and checks the executable
3439 # for the system default hardcoded library path. In most cases,
3440 # this is /usr/lib:/lib, but when the MPI compilers are used
3441 # the location of the communication and MPI libs are included too.
3442 # If we don't find anything, use the default library path according
3443 # to the aix ld manual.
3444 m4_defun([_LT_SYS_MODULE_PATH_AIX],
3445 [m4_require([_LT_DECL_SED])dnl
3446 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
3447 lt_aix_libpath_sed='
3448     /Import File Strings/,/^$/ {
3449         /^0/ {
3450             s/^0  *\(.*\)$/\1/
3451             p
3452         }
3453     }'
3454 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3455 # Check for a 64-bit object if we didn't find anything.
3456 if test -z "$aix_libpath"; then
3457   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3458 fi],[])
3459 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3460 ])# _LT_SYS_MODULE_PATH_AIX
3461
3462
3463 # _LT_SHELL_INIT(ARG)
3464 # -------------------
3465 m4_define([_LT_SHELL_INIT],
3466 [m4_divert_text([M4SH-INIT], [$1
3467 ])])# _LT_SHELL_INIT
3468
3469
3470
3471 # _LT_PROG_ECHO_BACKSLASH
3472 # -----------------------
3473 # Find how we can fake an echo command that does not interpret backslash.
3474 # In particular, with Autoconf 2.60 or later we add some code to the start
3475 # of the generated configure script which will find a shell with a builtin
3476 # printf (which we can use as an echo command).
3477 m4_defun([_LT_PROG_ECHO_BACKSLASH],
3478 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3479 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3480 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3481
3482 AC_MSG_CHECKING([how to print strings])
3483 # Test print first, because it will be a builtin if present.
3484 if test "X`print -r -- -n 2>/dev/null`" = X-n && \
3485    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3486   ECHO='print -r --'
3487 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3488   ECHO='printf %s\n'
3489 else
3490   # Use this function as a fallback that always works.
3491   func_fallback_echo ()
3492   {
3493     eval 'cat <<_LTECHO_EOF
3494 $[]1
3495 _LTECHO_EOF'
3496   }
3497   ECHO='func_fallback_echo'
3498 fi
3499
3500 # func_echo_all arg...
3501 # Invoke $ECHO with all args, space-separated.
3502 func_echo_all ()
3503 {
3504     $ECHO "$*" 
3505 }
3506
3507 case "$ECHO" in
3508   printf*) AC_MSG_RESULT([printf]) ;;
3509   print*) AC_MSG_RESULT([print -r]) ;;
3510   *) AC_MSG_RESULT([cat]) ;;
3511 esac
3512
3513 m4_ifdef([_AS_DETECT_SUGGESTED],
3514 [_AS_DETECT_SUGGESTED([
3515   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
3516     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3517     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3518     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3519     PATH=/empty FPATH=/empty; export PATH FPATH
3520     test "X`printf %s $ECHO`" = "X$ECHO" \
3521       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
3522
3523 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3524 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
3525 ])# _LT_PROG_ECHO_BACKSLASH
3526
3527
3528 # _LT_ENABLE_LOCK
3529 # ---------------
3530 m4_defun([_LT_ENABLE_LOCK],
3531 [AC_ARG_ENABLE([libtool-lock],
3532   [AS_HELP_STRING([--disable-libtool-lock],
3533     [avoid locking (might break parallel builds)])])
3534 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3535
3536 # Some flags need to be propagated to the compiler or linker for good
3537 # libtool support.
3538 case $host in
3539 ia64-*-hpux*)
3540   # Find out which ABI we are using.
3541   echo 'int i;' > conftest.$ac_ext
3542   if AC_TRY_EVAL(ac_compile); then
3543     case `/usr/bin/file conftest.$ac_objext` in
3544       *ELF-32*)
3545         HPUX_IA64_MODE="32"
3546         ;;
3547       *ELF-64*)
3548         HPUX_IA64_MODE="64"
3549         ;;
3550     esac
3551   fi
3552   rm -rf conftest*
3553   ;;
3554 *-*-irix6*)
3555   # Find out which ABI we are using.
3556   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3557   if AC_TRY_EVAL(ac_compile); then
3558     if test "$lt_cv_prog_gnu_ld" = yes; then
3559       case `/usr/bin/file conftest.$ac_objext` in
3560         *32-bit*)
3561           LD="${LD-ld} -melf32bsmip"
3562           ;;
3563         *N32*)
3564           LD="${LD-ld} -melf32bmipn32"
3565           ;;
3566         *64-bit*)
3567           LD="${LD-ld} -melf64bmip"
3568         ;;
3569       esac
3570     else
3571       case `/usr/bin/file conftest.$ac_objext` in
3572         *32-bit*)
3573           LD="${LD-ld} -32"
3574           ;;
3575         *N32*)
3576           LD="${LD-ld} -n32"
3577           ;;
3578         *64-bit*)
3579           LD="${LD-ld} -64"
3580           ;;
3581       esac
3582     fi
3583   fi
3584   rm -rf conftest*
3585   ;;
3586
3587 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3588 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3589   # Find out which ABI we are using.
3590   echo 'int i;' > conftest.$ac_ext
3591   if AC_TRY_EVAL(ac_compile); then
3592     case `/usr/bin/file conftest.o` in
3593       *32-bit*)
3594         case $host in
3595           x86_64-*kfreebsd*-gnu)
3596             LD="${LD-ld} -m elf_i386_fbsd"
3597             ;;
3598           x86_64-*linux*)
3599             LD="${LD-ld} -m elf_i386"
3600             ;;
3601           ppc64-*linux*|powerpc64-*linux*)
3602             LD="${LD-ld} -m elf32ppclinux"
3603             ;;
3604           s390x-*linux*)
3605             LD="${LD-ld} -m elf_s390"
3606             ;;
3607           sparc64-*linux*)
3608             LD="${LD-ld} -m elf32_sparc"
3609             ;;
3610         esac
3611         ;;
3612       *64-bit*)
3613         case $host in
3614           x86_64-*kfreebsd*-gnu)
3615             LD="${LD-ld} -m elf_x86_64_fbsd"
3616             ;;
3617           x86_64-*linux*)
3618             LD="${LD-ld} -m elf_x86_64"
3619             ;;
3620           ppc*-*linux*|powerpc*-*linux*)
3621             LD="${LD-ld} -m elf64ppc"
3622             ;;
3623           s390*-*linux*|s390*-*tpf*)
3624             LD="${LD-ld} -m elf64_s390"
3625             ;;
3626           sparc*-*linux*)
3627             LD="${LD-ld} -m elf64_sparc"
3628             ;;
3629         esac
3630         ;;
3631     esac
3632   fi
3633   rm -rf conftest*
3634   ;;
3635
3636 *-*-sco3.2v5*)
3637   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3638   SAVE_CFLAGS="$CFLAGS"
3639   CFLAGS="$CFLAGS -belf"
3640   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3641     [AC_LANG_PUSH(C)
3642      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3643      AC_LANG_POP])
3644   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3645     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3646     CFLAGS="$SAVE_CFLAGS"
3647   fi
3648   ;;
3649 sparc*-*solaris*)
3650   # Find out which ABI we are using.
3651   echo 'int i;' > conftest.$ac_ext
3652   if AC_TRY_EVAL(ac_compile); then
3653     case `/usr/bin/file conftest.o` in
3654     *64-bit*)
3655       case $lt_cv_prog_gnu_ld in
3656       yes*) LD="${LD-ld} -m elf64_sparc" ;;
3657       *)
3658         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3659           LD="${LD-ld} -64"
3660         fi
3661         ;;
3662       esac
3663       ;;
3664     esac
3665   fi
3666   rm -rf conftest*
3667   ;;
3668 esac
3669
3670 need_locks="$enable_libtool_lock"
3671 ])# _LT_ENABLE_LOCK
3672
3673
3674 # _LT_CMD_OLD_ARCHIVE
3675 # -------------------
3676 m4_defun([_LT_CMD_OLD_ARCHIVE],
3677 [AC_CHECK_TOOL(AR, ar, false)
3678 test -z "$AR" && AR=ar
3679 test -z "$AR_FLAGS" && AR_FLAGS=cru
3680 _LT_DECL([], [AR], [1], [The archiver])
3681 _LT_DECL([], [AR_FLAGS], [1])
3682
3683 AC_CHECK_TOOL(STRIP, strip, :)
3684 test -z "$STRIP" && STRIP=:
3685 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
3686
3687 AC_CHECK_TOOL(RANLIB, ranlib, :)
3688 test -z "$RANLIB" && RANLIB=:
3689 _LT_DECL([], [RANLIB], [1],
3690     [Commands used to install an old-style archive])
3691
3692 # Determine commands to create old-style static archives.
3693 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3694 old_postinstall_cmds='chmod 644 $oldlib'
3695 old_postuninstall_cmds=
3696
3697 if test -n "$RANLIB"; then
3698   case $host_os in
3699   openbsd*)
3700     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3701     ;;
3702   *)
3703     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3704     ;;
3705   esac
3706   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3707 fi
3708
3709 case $host_os in
3710   darwin*)
3711     lock_old_archive_extraction=yes ;;
3712   *)
3713     lock_old_archive_extraction=no ;;
3714 esac
3715 _LT_DECL([], [old_postinstall_cmds], [2])
3716 _LT_DECL([], [old_postuninstall_cmds], [2])
3717 _LT_TAGDECL([], [old_archive_cmds], [2],
3718     [Commands used to build an old-style archive])
3719 _LT_DECL([], [lock_old_archive_extraction], [0],
3720     [Whether to use a lock for old archive extraction])
3721 ])# _LT_CMD_OLD_ARCHIVE
3722
3723
3724 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3725 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3726 # ----------------------------------------------------------------
3727 # Check whether the given compiler option works
3728 AC_DEFUN([_LT_COMPILER_OPTION],
3729 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3730 m4_require([_LT_DECL_SED])dnl
3731 AC_CACHE_CHECK([$1], [$2],
3732   [$2=no
3733    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3734    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3735    lt_compiler_flag="$3"
3736    # Insert the option either (1) after the last *FLAGS variable, or
3737    # (2) before a word containing "conftest.", or (3) at the end.
3738    # Note that $ac_compile itself does not contain backslashes and begins
3739    # with a dollar sign (not a hyphen), so the echo should work correctly.
3740    # The option is referenced via a variable to avoid confusing sed.
3741    lt_compile=`echo "$ac_compile" | $SED \
3742    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3743    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3744    -e 's:$: $lt_compiler_flag:'`
3745    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3746    (eval "$lt_compile" 2>conftest.err)
3747    ac_status=$?
3748    cat conftest.err >&AS_MESSAGE_LOG_FD
3749    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3750    if (exit $ac_status) && test -s "$ac_outfile"; then
3751      # The compiler can only warn and ignore the option if not recognized
3752      # So say no if there are warnings other than the usual output.
3753      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
3754      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3755      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3756        $2=yes
3757      fi
3758    fi
3759    $RM conftest*
3760 ])
3761
3762 if test x"[$]$2" = xyes; then
3763     m4_if([$5], , :, [$5])
3764 else
3765     m4_if([$6], , :, [$6])
3766 fi
3767 ])# _LT_COMPILER_OPTION
3768
3769 # Old name:
3770 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3771 dnl aclocal-1.4 backwards compatibility:
3772 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3773
3774
3775 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3776 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
3777 # ----------------------------------------------------
3778 # Check whether the given linker option works
3779 AC_DEFUN([_LT_LINKER_OPTION],
3780 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3781 m4_require([_LT_DECL_SED])dnl
3782 AC_CACHE_CHECK([$1], [$2],
3783   [$2=no
3784    save_LDFLAGS="$LDFLAGS"
3785    LDFLAGS="$LDFLAGS $3"
3786    echo "$lt_simple_link_test_code" > conftest.$ac_ext
3787    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3788      # The linker can only warn and ignore the option if not recognized
3789      # So say no if there are warnings
3790      if test -s conftest.err; then
3791        # Append any errors to the config.log.
3792        cat conftest.err 1>&AS_MESSAGE_LOG_FD
3793        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
3794        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3795        if diff conftest.exp conftest.er2 >/dev/null; then
3796          $2=yes
3797        fi
3798      else
3799        $2=yes
3800      fi
3801    fi
3802    $RM -r conftest*
3803    LDFLAGS="$save_LDFLAGS"
3804 ])
3805
3806 if test x"[$]$2" = xyes; then
3807     m4_if([$4], , :, [$4])
3808 else
3809     m4_if([$5], , :, [$5])
3810 fi
3811 ])# _LT_LINKER_OPTION
3812
3813 # Old name:
3814 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3815 dnl aclocal-1.4 backwards compatibility:
3816 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3817
3818
3819 # LT_CMD_MAX_LEN
3820 #---------------
3821 AC_DEFUN([LT_CMD_MAX_LEN],
3822 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3823 # find the maximum length of command line arguments
3824 AC_MSG_CHECKING([the maximum length of command line arguments])
3825 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3826   i=0
3827   teststring="ABCD"
3828
3829   case $build_os in
3830   msdosdjgpp*)
3831     # On DJGPP, this test can blow up pretty badly due to problems in libc
3832     # (any single argument exceeding 2000 bytes causes a buffer overrun
3833     # during glob expansion).  Even if it were fixed, the result of this
3834     # check would be larger than it should be.
3835     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3836     ;;
3837
3838   gnu*)
3839     # Under GNU Hurd, this test is not required because there is
3840     # no limit to the length of command line arguments.
3841     # Libtool will interpret -1 as no limit whatsoever
3842     lt_cv_sys_max_cmd_len=-1;
3843     ;;
3844
3845   cygwin* | mingw* | cegcc*)
3846     # On Win9x/ME, this test blows up -- it succeeds, but takes
3847     # about 5 minutes as the teststring grows exponentially.
3848     # Worse, since 9x/ME are not pre-emptively multitasking,
3849     # you end up with a "frozen" computer, even though with patience
3850     # the test eventually succeeds (with a max line length of 256k).
3851     # Instead, let's just punt: use the minimum linelength reported by
3852     # all of the supported platforms: 8192 (on NT/2K/XP).
3853     lt_cv_sys_max_cmd_len=8192;
3854     ;;
3855
3856   mint*)
3857     # On MiNT this can take a long time and run out of memory.
3858     lt_cv_sys_max_cmd_len=8192;
3859     ;;
3860
3861   amigaos*)
3862     # On AmigaOS with pdksh, this test takes hours, literally.
3863     # So we just punt and use a minimum line length of 8192.
3864     lt_cv_sys_max_cmd_len=8192;
3865     ;;
3866
3867   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3868     # This has been around since 386BSD, at least.  Likely further.
3869     if test -x /sbin/sysctl; then
3870       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3871     elif test -x /usr/sbin/sysctl; then
3872       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3873     else
3874       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
3875     fi
3876     # And add a safety zone
3877     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3878     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3879     ;;
3880
3881   interix*)
3882     # We know the value 262144 and hardcode it with a safety zone (like BSD)
3883     lt_cv_sys_max_cmd_len=196608
3884     ;;
3885
3886   osf*)
3887     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3888     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3889     # nice to cause kernel panics so lets avoid the loop below.
3890     # First set a reasonable default.
3891     lt_cv_sys_max_cmd_len=16384
3892     #
3893     if test -x /sbin/sysconfig; then
3894       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3895         *1*) lt_cv_sys_max_cmd_len=-1 ;;
3896       esac
3897     fi
3898     ;;
3899   sco3.2v5*)
3900     lt_cv_sys_max_cmd_len=102400
3901     ;;
3902   sysv5* | sco5v6* | sysv4.2uw2*)
3903     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3904     if test -n "$kargmax"; then
3905       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
3906     else
3907       lt_cv_sys_max_cmd_len=32768
3908     fi
3909     ;;
3910   *)
3911     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3912     if test -n "$lt_cv_sys_max_cmd_len"; then
3913       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3914       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3915     else
3916       # Make teststring a little bigger before we do anything with it.
3917       # a 1K string should be a reasonable start.
3918       for i in 1 2 3 4 5 6 7 8 ; do
3919         teststring=$teststring$teststring
3920       done
3921       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3922       # If test is not a shell built-in, we'll probably end up computing a
3923       # maximum length that is only half of the actual maximum length, but
3924       # we can't tell.
3925       while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
3926                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3927               test $i != 17 # 1/2 MB should be enough
3928       do
3929         i=`expr $i + 1`
3930         teststring=$teststring$teststring
3931       done
3932       # Only check the string length outside the loop.
3933       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3934       teststring=
3935       # Add a significant safety factor because C++ compilers can tack on
3936       # massive amounts of additional arguments before passing them to the
3937       # linker.  It appears as though 1/2 is a usable value.
3938       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3939     fi
3940     ;;
3941   esac
3942 ])
3943 if test -n $lt_cv_sys_max_cmd_len ; then
3944   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3945 else
3946   AC_MSG_RESULT(none)
3947 fi
3948 max_cmd_len=$lt_cv_sys_max_cmd_len
3949 _LT_DECL([], [max_cmd_len], [0],
3950     [What is the maximum length of a command?])
3951 ])# LT_CMD_MAX_LEN
3952
3953 # Old name:
3954 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3955 dnl aclocal-1.4 backwards compatibility:
3956 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3957
3958
3959 # _LT_HEADER_DLFCN
3960 # ----------------
3961 m4_defun([_LT_HEADER_DLFCN],
3962 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3963 ])# _LT_HEADER_DLFCN
3964
3965
3966 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3967 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3968 # ----------------------------------------------------------------
3969 m4_defun([_LT_TRY_DLOPEN_SELF],
3970 [m4_require([_LT_HEADER_DLFCN])dnl
3971 if test "$cross_compiling" = yes; then :
3972   [$4]
3973 else
3974   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3975   lt_status=$lt_dlunknown
3976   cat > conftest.$ac_ext <<_LT_EOF
3977 [#line $LINENO "configure"
3978 #include "confdefs.h"
3979
3980 #if HAVE_DLFCN_H
3981 #include <dlfcn.h>
3982 #endif
3983
3984 #include <stdio.h>
3985
3986 #ifdef RTLD_GLOBAL
3987 #  define LT_DLGLOBAL           RTLD_GLOBAL
3988 #else
3989 #  ifdef DL_GLOBAL
3990 #    define LT_DLGLOBAL         DL_GLOBAL
3991 #  else
3992 #    define LT_DLGLOBAL         0
3993 #  endif
3994 #endif
3995
3996 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3997    find out it does not work in some platform. */
3998 #ifndef LT_DLLAZY_OR_NOW
3999 #  ifdef RTLD_LAZY
4000 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
4001 #  else
4002 #    ifdef DL_LAZY
4003 #      define LT_DLLAZY_OR_NOW          DL_LAZY
4004 #    else
4005 #      ifdef RTLD_NOW
4006 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
4007 #      else
4008 #        ifdef DL_NOW
4009 #          define LT_DLLAZY_OR_NOW      DL_NOW
4010 #        else
4011 #          define LT_DLLAZY_OR_NOW      0
4012 #        endif
4013 #      endif
4014 #    endif
4015 #  endif
4016 #endif
4017
4018 /* When -fvisbility=hidden is used, assume the code has been annotated
4019    correspondingly for the symbols needed.  */
4020 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
4021 void fnord () __attribute__((visibility("default")));
4022 #endif
4023
4024 void fnord () { int i=42; }
4025 int main ()
4026 {
4027   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4028   int status = $lt_dlunknown;
4029
4030   if (self)
4031     {
4032       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4033       else
4034         {
4035           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
4036           else puts (dlerror ());
4037         }
4038       /* dlclose (self); */
4039     }
4040   else
4041     puts (dlerror ());
4042
4043   return status;
4044 }]
4045 _LT_EOF
4046   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
4047     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4048     lt_status=$?
4049     case x$lt_status in
4050       x$lt_dlno_uscore) $1 ;;
4051       x$lt_dlneed_uscore) $2 ;;
4052       x$lt_dlunknown|x*) $3 ;;
4053     esac
4054   else :
4055     # compilation failed
4056     $3
4057   fi
4058 fi
4059 rm -fr conftest*
4060 ])# _LT_TRY_DLOPEN_SELF
4061
4062
4063 # LT_SYS_DLOPEN_SELF
4064 # ------------------
4065 AC_DEFUN([LT_SYS_DLOPEN_SELF],
4066 [m4_require([_LT_HEADER_DLFCN])dnl
4067 if test "x$enable_dlopen" != xyes; then
4068   enable_dlopen=unknown
4069   enable_dlopen_self=unknown
4070   enable_dlopen_self_static=unknown
4071 else
4072   lt_cv_dlopen=no
4073   lt_cv_dlopen_libs=
4074
4075   case $host_os in
4076   beos*)
4077     lt_cv_dlopen="load_add_on"
4078     lt_cv_dlopen_libs=
4079     lt_cv_dlopen_self=yes
4080     ;;
4081
4082   mingw* | pw32* | cegcc*)
4083     lt_cv_dlopen="LoadLibrary"
4084     lt_cv_dlopen_libs=
4085     ;;
4086
4087   cygwin*)
4088     lt_cv_dlopen="dlopen"
4089     lt_cv_dlopen_libs=
4090     ;;
4091
4092   darwin*)
4093   # if libdl is installed we need to link against it
4094     AC_CHECK_LIB([dl], [dlopen],
4095                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4096     lt_cv_dlopen="dyld"
4097     lt_cv_dlopen_libs=
4098     lt_cv_dlopen_self=yes
4099     ])
4100     ;;
4101
4102   *)
4103     AC_CHECK_FUNC([shl_load],
4104           [lt_cv_dlopen="shl_load"],
4105       [AC_CHECK_LIB([dld], [shl_load],
4106             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4107         [AC_CHECK_FUNC([dlopen],
4108               [lt_cv_dlopen="dlopen"],
4109           [AC_CHECK_LIB([dl], [dlopen],
4110                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4111             [AC_CHECK_LIB([svld], [dlopen],
4112                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4113               [AC_CHECK_LIB([dld], [dld_link],
4114                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4115               ])
4116             ])
4117           ])
4118         ])
4119       ])
4120     ;;
4121   esac
4122
4123   if test "x$lt_cv_dlopen" != xno; then
4124     enable_dlopen=yes
4125   else
4126     enable_dlopen=no
4127   fi
4128
4129   case $lt_cv_dlopen in
4130   dlopen)
4131     save_CPPFLAGS="$CPPFLAGS"
4132     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4133
4134     save_LDFLAGS="$LDFLAGS"
4135     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4136
4137     save_LIBS="$LIBS"
4138     LIBS="$lt_cv_dlopen_libs $LIBS"
4139
4140     AC_CACHE_CHECK([whether a program can dlopen itself],
4141           lt_cv_dlopen_self, [dnl
4142           _LT_TRY_DLOPEN_SELF(
4143             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4144             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4145     ])
4146
4147     if test "x$lt_cv_dlopen_self" = xyes; then
4148       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4149       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4150           lt_cv_dlopen_self_static, [dnl
4151           _LT_TRY_DLOPEN_SELF(
4152             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4153             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
4154       ])
4155     fi
4156
4157     CPPFLAGS="$save_CPPFLAGS"
4158     LDFLAGS="$save_LDFLAGS"
4159     LIBS="$save_LIBS"
4160     ;;
4161   esac
4162
4163   case $lt_cv_dlopen_self in
4164   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4165   *) enable_dlopen_self=unknown ;;
4166   esac
4167
4168   case $lt_cv_dlopen_self_static in
4169   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4170   *) enable_dlopen_self_static=unknown ;;
4171   esac
4172 fi
4173 _LT_DECL([dlopen_support], [enable_dlopen], [0],
4174          [Whether dlopen is supported])
4175 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4176          [Whether dlopen of programs is supported])
4177 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4178          [Whether dlopen of statically linked programs is supported])
4179 ])# LT_SYS_DLOPEN_SELF
4180
4181 # Old name:
4182 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4183 dnl aclocal-1.4 backwards compatibility:
4184 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4185
4186
4187 # _LT_COMPILER_C_O([TAGNAME])
4188 # ---------------------------
4189 # Check to see if options -c and -o are simultaneously supported by compiler.
4190 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
4191 m4_defun([_LT_COMPILER_C_O],
4192 [m4_require([_LT_DECL_SED])dnl
4193 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4194 m4_require([_LT_TAG_COMPILER])dnl
4195 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4196   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4197   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4198    $RM -r conftest 2>/dev/null
4199    mkdir conftest
4200    cd conftest
4201    mkdir out
4202    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4203
4204    lt_compiler_flag="-o out/conftest2.$ac_objext"
4205    # Insert the option either (1) after the last *FLAGS variable, or
4206    # (2) before a word containing "conftest.", or (3) at the end.
4207    # Note that $ac_compile itself does not contain backslashes and begins
4208    # with a dollar sign (not a hyphen), so the echo should work correctly.
4209    lt_compile=`echo "$ac_compile" | $SED \
4210    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4211    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4212    -e 's:$: $lt_compiler_flag:'`
4213    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4214    (eval "$lt_compile" 2>out/conftest.err)
4215    ac_status=$?
4216    cat out/conftest.err >&AS_MESSAGE_LOG_FD
4217    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4218    if (exit $ac_status) && test -s out/conftest2.$ac_objext
4219    then
4220      # The compiler can only warn and ignore the option if not recognized
4221      # So say no if there are warnings
4222      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
4223      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4224      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4225        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4226      fi
4227    fi
4228    chmod u+w . 2>&AS_MESSAGE_LOG_FD
4229    $RM conftest*
4230    # SGI C++ compiler will create directory out/ii_files/ for
4231    # template instantiation
4232    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4233    $RM out/* && rmdir out
4234    cd ..
4235    $RM -r conftest
4236    $RM conftest*
4237 ])
4238 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4239         [Does compiler simultaneously support -c and -o options?])
4240 ])# _LT_COMPILER_C_O
4241
4242
4243 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
4244 # ----------------------------------
4245 # Check to see if we can do hard links to lock some files if needed
4246 m4_defun([_LT_COMPILER_FILE_LOCKS],
4247 [m4_require([_LT_ENABLE_LOCK])dnl
4248 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4249 _LT_COMPILER_C_O([$1])
4250
4251 hard_links="nottested"
4252 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4253   # do not overwrite the value of need_locks provided by the user
4254   AC_MSG_CHECKING([if we can lock with hard links])
4255   hard_links=yes
4256   $RM conftest*
4257   ln conftest.a conftest.b 2>/dev/null && hard_links=no
4258   touch conftest.a
4259   ln conftest.a conftest.b 2>&5 || hard_links=no
4260   ln conftest.a conftest.b 2>/dev/null && hard_links=no
4261   AC_MSG_RESULT([$hard_links])
4262   if test "$hard_links" = no; then
4263     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
4264     need_locks=warn
4265   fi
4266 else
4267   need_locks=no
4268 fi
4269 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4270 ])# _LT_COMPILER_FILE_LOCKS
4271
4272
4273 # _LT_CHECK_OBJDIR
4274 # ----------------
4275 m4_defun([_LT_CHECK_OBJDIR],
4276 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4277 [rm -f .libs 2>/dev/null
4278 mkdir .libs 2>/dev/null
4279 if test -d .libs; then
4280   lt_cv_objdir=.libs
4281 else
4282   # MS-DOS does not allow filenames that begin with a dot.
4283   lt_cv_objdir=_libs
4284 fi
4285 rmdir .libs 2>/dev/null])
4286 objdir=$lt_cv_objdir
4287 _LT_DECL([], [objdir], [0],
4288          [The name of the directory that contains temporary libtool files])dnl
4289 m4_pattern_allow([LT_OBJDIR])dnl
4290 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4291   [Define to the sub-directory in which libtool stores uninstalled libraries.])
4292 ])# _LT_CHECK_OBJDIR
4293
4294
4295 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4296 # --------------------------------------
4297 # Check hardcoding attributes.
4298 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4299 [AC_MSG_CHECKING([how to hardcode library paths into programs])
4300 _LT_TAGVAR(hardcode_action, $1)=
4301 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4302    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4303    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4304
4305   # We can hardcode non-existent directories.
4306   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4307      # If the only mechanism to avoid hardcoding is shlibpath_var, we
4308      # have to relink, otherwise we might link with an installed library
4309      # when we should be linking with a yet-to-be-installed one
4310      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4311      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4312     # Linking always hardcodes the temporary library directory.
4313     _LT_TAGVAR(hardcode_action, $1)=relink
4314   else
4315     # We can link without hardcoding, and we can hardcode nonexisting dirs.
4316     _LT_TAGVAR(hardcode_action, $1)=immediate
4317   fi
4318 else
4319   # We cannot hardcode anything, or else we can only hardcode existing
4320   # directories.
4321   _LT_TAGVAR(hardcode_action, $1)=unsupported
4322 fi
4323 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4324
4325 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4326    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4327   # Fast installation is not supported
4328   enable_fast_install=no
4329 elif test "$shlibpath_overrides_runpath" = yes ||
4330      test "$enable_shared" = no; then
4331   # Fast installation is not necessary
4332   enable_fast_install=needless
4333 fi
4334 _LT_TAGDECL([], [hardcode_action], [0],
4335     [How to hardcode a shared library path into an executable])
4336 ])# _LT_LINKER_HARDCODE_LIBPATH
4337
4338
4339 # _LT_CMD_STRIPLIB
4340 # ----------------
4341 m4_defun([_LT_CMD_STRIPLIB],
4342 [m4_require([_LT_DECL_EGREP])
4343 striplib=
4344 old_striplib=
4345 AC_MSG_CHECKING([whether stripping libraries is possible])
4346 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4347   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4348   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4349   AC_MSG_RESULT([yes])
4350 else
4351 # FIXME - insert some real tests, host_os isn't really good enough
4352   case $host_os in
4353   darwin*)
4354     if test -n "$STRIP" ; then
4355       striplib="$STRIP -x"
4356       old_striplib="$STRIP -S"
4357       AC_MSG_RESULT([yes])
4358     else
4359       AC_MSG_RESULT([no])
4360     fi
4361     ;;
4362   *)
4363     AC_MSG_RESULT([no])
4364     ;;
4365   esac
4366 fi
4367 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4368 _LT_DECL([], [striplib], [1])
4369 ])# _LT_CMD_STRIPLIB
4370
4371
4372 # _LT_SYS_DYNAMIC_LINKER([TAG])
4373 # -----------------------------
4374 # PORTME Fill in your ld.so characteristics
4375 m4_defun([_LT_SYS_DYNAMIC_LINKER],
4376 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4377 m4_require([_LT_DECL_EGREP])dnl
4378 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4379 m4_require([_LT_DECL_OBJDUMP])dnl
4380 m4_require([_LT_DECL_SED])dnl
4381 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
4382 AC_MSG_CHECKING([dynamic linker characteristics])
4383 m4_if([$1],
4384         [], [
4385 if test "$GCC" = yes; then
4386   case $host_os in
4387     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4388     *) lt_awk_arg="/^libraries:/" ;;
4389   esac
4390   case $host_os in
4391     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
4392     *) lt_sed_strip_eq="s,=/,/,g" ;;
4393   esac
4394   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
4395   case $lt_search_path_spec in
4396   *\;*)
4397     # if the path contains ";" then we assume it to be the separator
4398     # otherwise default to the standard path separator (i.e. ":") - it is
4399     # assumed that no part of a normal pathname contains ";" but that should
4400     # okay in the real world where ";" in dirpaths is itself problematic.
4401     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
4402     ;;
4403   *)
4404     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
4405     ;;
4406   esac
4407   # Ok, now we have the path, separated by spaces, we can step through it
4408   # and add multilib dir if necessary.
4409   lt_tmp_lt_search_path_spec=
4410   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4411   for lt_sys_path in $lt_search_path_spec; do
4412     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4413       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4414     else
4415       test -d "$lt_sys_path" && \
4416         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4417     fi
4418   done
4419   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
4420 BEGIN {RS=" "; FS="/|\n";} {
4421   lt_foo="";
4422   lt_count=0;
4423   for (lt_i = NF; lt_i > 0; lt_i--) {
4424     if ($lt_i != "" && $lt_i != ".") {
4425       if ($lt_i == "..") {
4426         lt_count++;
4427       } else {
4428         if (lt_count == 0) {
4429           lt_foo="/" $lt_i lt_foo;
4430         } else {
4431           lt_count--;
4432         }
4433       }
4434     }
4435   }
4436   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4437   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4438 }'`
4439   # AWK program above erroneously prepends '/' to C:/dos/paths
4440   # for these hosts.
4441   case $host_os in
4442     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
4443       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
4444   esac
4445   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
4446 else
4447   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4448 fi])
4449 library_names_spec=
4450 libname_spec='lib$name'
4451 soname_spec=
4452 shrext_cmds=".so"
4453 postinstall_cmds=
4454 postuninstall_cmds=
4455 finish_cmds=
4456 finish_eval=
4457 shlibpath_var=
4458 shlibpath_overrides_runpath=unknown
4459 version_type=none
4460 dynamic_linker="$host_os ld.so"
4461 sys_lib_dlsearch_path_spec="/lib /usr/lib"
4462 need_lib_prefix=unknown
4463 hardcode_into_libs=no
4464
4465 # when you set need_version to no, make sure it does not cause -set_version
4466 # flags to be left without arguments
4467 need_version=unknown
4468
4469 case $host_os in
4470 aix3*)
4471   version_type=linux
4472   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4473   shlibpath_var=LIBPATH
4474
4475   # AIX 3 has no versioning support, so we append a major version to the name.
4476   soname_spec='${libname}${release}${shared_ext}$major'
4477   ;;
4478
4479 aix[[4-9]]*)
4480   version_type=linux
4481   need_lib_prefix=no
4482   need_version=no
4483   hardcode_into_libs=yes
4484   if test "$host_cpu" = ia64; then
4485     # AIX 5 supports IA64
4486     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4487     shlibpath_var=LD_LIBRARY_PATH
4488   else
4489     # With GCC up to 2.95.x, collect2 would create an import file
4490     # for dependence libraries.  The import file would start with
4491     # the line `#! .'.  This would cause the generated library to
4492     # depend on `.', always an invalid library.  This was fixed in
4493     # development snapshots of GCC prior to 3.0.
4494     case $host_os in
4495       aix4 | aix4.[[01]] | aix4.[[01]].*)
4496       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4497            echo ' yes '
4498            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4499         :
4500       else
4501         can_build_shared=no
4502       fi
4503       ;;
4504     esac
4505     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4506     # soname into executable. Probably we can add versioning support to
4507     # collect2, so additional links can be useful in future.
4508     if test "$aix_use_runtimelinking" = yes; then
4509       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4510       # instead of lib<name>.a to let people know that these are not
4511       # typical AIX shared libraries.
4512       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4513     else
4514       # We preserve .a as extension for shared libraries through AIX4.2
4515       # and later when we are not doing run time linking.
4516       library_names_spec='${libname}${release}.a $libname.a'
4517       soname_spec='${libname}${release}${shared_ext}$major'
4518     fi
4519     shlibpath_var=LIBPATH
4520   fi
4521   ;;
4522
4523 amigaos*)
4524   case $host_cpu in
4525   powerpc)
4526     # Since July 2007 AmigaOS4 officially supports .so libraries.
4527     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4528     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4529     ;;
4530   m68k)
4531     library_names_spec='$libname.ixlibrary $libname.a'
4532     # Create ${libname}_ixlibrary.a entries in /sys/libs.
4533     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
4534     ;;
4535   esac
4536   ;;
4537
4538 beos*)
4539   library_names_spec='${libname}${shared_ext}'
4540   dynamic_linker="$host_os ld.so"
4541   shlibpath_var=LIBRARY_PATH
4542   ;;
4543
4544 bsdi[[45]]*)
4545   version_type=linux
4546   need_version=no
4547   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4548   soname_spec='${libname}${release}${shared_ext}$major'
4549   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4550   shlibpath_var=LD_LIBRARY_PATH
4551   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4552   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4553   # the default ld.so.conf also contains /usr/contrib/lib and
4554   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4555   # libtool to hard-code these into programs
4556   ;;
4557
4558 cygwin* | mingw* | pw32* | cegcc*)
4559   version_type=windows
4560   shrext_cmds=".dll"
4561   need_version=no
4562   need_lib_prefix=no
4563
4564   case $GCC,$host_os in
4565   yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
4566     library_names_spec='$libname.dll.a'
4567     # DLL is installed to $(libdir)/../bin by postinstall_cmds
4568     postinstall_cmds='base_file=`basename \${file}`~
4569       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4570       dldir=$destdir/`dirname \$dlpath`~
4571       test -d \$dldir || mkdir -p \$dldir~
4572       $install_prog $dir/$dlname \$dldir/$dlname~
4573       chmod a+x \$dldir/$dlname~
4574       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4575         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4576       fi'
4577     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4578       dlpath=$dir/\$dldll~
4579        $RM \$dlpath'
4580     shlibpath_overrides_runpath=yes
4581
4582     case $host_os in
4583     cygwin*)
4584       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4585       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4586 m4_if([$1], [],[
4587       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4588       ;;
4589     mingw* | cegcc*)
4590       # MinGW DLLs use traditional 'lib' prefix
4591       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4592       ;;
4593     pw32*)
4594       # pw32 DLLs use 'pw' prefix rather than 'lib'
4595       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4596       ;;
4597     esac
4598     ;;
4599
4600   *)
4601     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4602     ;;
4603   esac
4604   dynamic_linker='Win32 ld.exe'
4605   # FIXME: first we should search . and the directory the executable is in
4606   shlibpath_var=PATH
4607   ;;
4608
4609 darwin* | rhapsody*)
4610   dynamic_linker="$host_os dyld"
4611   version_type=darwin
4612   need_lib_prefix=no
4613   need_version=no
4614   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4615   soname_spec='${libname}${release}${major}$shared_ext'
4616   shlibpath_overrides_runpath=yes
4617   shlibpath_var=DYLD_LIBRARY_PATH
4618   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4619 m4_if([$1], [],[
4620   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4621   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4622   ;;
4623
4624 dgux*)
4625   version_type=linux
4626   need_lib_prefix=no
4627   need_version=no
4628   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4629   soname_spec='${libname}${release}${shared_ext}$major'
4630   shlibpath_var=LD_LIBRARY_PATH
4631   ;;
4632
4633 freebsd1*)
4634   dynamic_linker=no
4635   ;;
4636
4637 freebsd* | dragonfly*)
4638   # DragonFly does not have aout.  When/if they implement a new
4639   # versioning mechanism, adjust this.
4640   if test -x /usr/bin/objformat; then
4641     objformat=`/usr/bin/objformat`
4642   else
4643     case $host_os in
4644     freebsd[[123]]*) objformat=aout ;;
4645     *) objformat=elf ;;
4646     esac
4647   fi
4648   version_type=freebsd-$objformat
4649   case $version_type in
4650     freebsd-elf*)
4651       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4652       need_version=no
4653       need_lib_prefix=no
4654       ;;
4655     freebsd-*)
4656       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4657       need_version=yes
4658       ;;
4659   esac
4660   shlibpath_var=LD_LIBRARY_PATH
4661   case $host_os in
4662   freebsd2*)
4663     shlibpath_overrides_runpath=yes
4664     ;;
4665   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4666     shlibpath_overrides_runpath=yes
4667     hardcode_into_libs=yes
4668     ;;
4669   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4670   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4671     shlibpath_overrides_runpath=no
4672     hardcode_into_libs=yes
4673     ;;
4674   *) # from 4.6 on, and DragonFly
4675     shlibpath_overrides_runpath=yes
4676     hardcode_into_libs=yes
4677     ;;
4678   esac
4679   ;;
4680
4681 gnu*)
4682   version_type=linux
4683   need_lib_prefix=no
4684   need_version=no
4685   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4686   soname_spec='${libname}${release}${shared_ext}$major'
4687   shlibpath_var=LD_LIBRARY_PATH
4688   hardcode_into_libs=yes
4689   ;;
4690
4691 haiku*)
4692   version_type=linux
4693   need_lib_prefix=no
4694   need_version=no
4695   dynamic_linker="$host_os runtime_loader"
4696   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4697   soname_spec='${libname}${release}${shared_ext}$major'
4698   shlibpath_var=LIBRARY_PATH
4699   shlibpath_overrides_runpath=yes
4700   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
4701   hardcode_into_libs=yes
4702   ;;
4703
4704 hpux9* | hpux10* | hpux11*)
4705   # Give a soname corresponding to the major version so that dld.sl refuses to
4706   # link against other versions.
4707   version_type=sunos
4708   need_lib_prefix=no
4709   need_version=no
4710   case $host_cpu in
4711   ia64*)
4712     shrext_cmds='.so'
4713     hardcode_into_libs=yes
4714     dynamic_linker="$host_os dld.so"
4715     shlibpath_var=LD_LIBRARY_PATH
4716     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4717     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4718     soname_spec='${libname}${release}${shared_ext}$major'
4719     if test "X$HPUX_IA64_MODE" = X32; then
4720       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4721     else
4722       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4723     fi
4724     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4725     ;;
4726   hppa*64*)
4727     shrext_cmds='.sl'
4728     hardcode_into_libs=yes
4729     dynamic_linker="$host_os dld.sl"
4730     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4731     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4732     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4733     soname_spec='${libname}${release}${shared_ext}$major'
4734     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4735     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4736     ;;
4737   *)
4738     shrext_cmds='.sl'
4739     dynamic_linker="$host_os dld.sl"
4740     shlibpath_var=SHLIB_PATH
4741     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4742     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4743     soname_spec='${libname}${release}${shared_ext}$major'
4744     ;;
4745   esac
4746   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
4747   postinstall_cmds='chmod 555 $lib'
4748   # or fails outright, so override atomically:
4749   install_override_mode=555
4750   ;;
4751
4752 interix[[3-9]]*)
4753   version_type=linux
4754   need_lib_prefix=no
4755   need_version=no
4756   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4757   soname_spec='${libname}${release}${shared_ext}$major'
4758   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4759   shlibpath_var=LD_LIBRARY_PATH
4760   shlibpath_overrides_runpath=no
4761   hardcode_into_libs=yes
4762   ;;
4763
4764 irix5* | irix6* | nonstopux*)
4765   case $host_os in
4766     nonstopux*) version_type=nonstopux ;;
4767     *)
4768         if test "$lt_cv_prog_gnu_ld" = yes; then
4769                 version_type=linux
4770         else
4771                 version_type=irix
4772         fi ;;
4773   esac
4774   need_lib_prefix=no
4775   need_version=no
4776   soname_spec='${libname}${release}${shared_ext}$major'
4777   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4778   case $host_os in
4779   irix5* | nonstopux*)
4780     libsuff= shlibsuff=
4781     ;;
4782   *)
4783     case $LD in # libtool.m4 will add one of these switches to LD
4784     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4785       libsuff= shlibsuff= libmagic=32-bit;;
4786     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4787       libsuff=32 shlibsuff=N32 libmagic=N32;;
4788     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4789       libsuff=64 shlibsuff=64 libmagic=64-bit;;
4790     *) libsuff= shlibsuff= libmagic=never-match;;
4791     esac
4792     ;;
4793   esac
4794   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4795   shlibpath_overrides_runpath=no
4796   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4797   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4798   hardcode_into_libs=yes
4799   ;;
4800
4801 # No shared lib support for Linux oldld, aout, or coff.
4802 linux*oldld* | linux*aout* | linux*coff*)
4803   dynamic_linker=no
4804   ;;
4805
4806 # This must be Linux ELF.
4807 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4808   version_type=linux
4809   need_lib_prefix=no
4810   need_version=no
4811   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4812   soname_spec='${libname}${release}${shared_ext}$major'
4813   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4814   shlibpath_var=LD_LIBRARY_PATH
4815   shlibpath_overrides_runpath=no
4816
4817   # Some binutils ld are patched to set DT_RUNPATH
4818   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4819     [lt_cv_shlibpath_overrides_runpath=no
4820     save_LDFLAGS=$LDFLAGS
4821     save_libdir=$libdir
4822     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4823          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4824     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4825       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4826          [lt_cv_shlibpath_overrides_runpath=yes])])
4827     LDFLAGS=$save_LDFLAGS
4828     libdir=$save_libdir
4829     ])
4830   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4831
4832   # This implies no fast_install, which is unacceptable.
4833   # Some rework will be needed to allow for fast_install
4834   # before this can be enabled.
4835   hardcode_into_libs=yes
4836
4837   # Append ld.so.conf contents to the search path
4838   if test -f /etc/ld.so.conf; then
4839     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
4840     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4841   fi
4842
4843   # We used to test for /lib/ld.so.1 and disable shared libraries on
4844   # powerpc, because MkLinux only supported shared libraries with the
4845   # GNU dynamic linker.  Since this was broken with cross compilers,
4846   # most powerpc-linux boxes support dynamic linking these days and
4847   # people can always --disable-shared, the test was removed, and we
4848   # assume the GNU/Linux dynamic linker is in use.
4849   dynamic_linker='GNU/Linux ld.so'
4850   ;;
4851
4852 netbsd*)
4853   version_type=sunos
4854   need_lib_prefix=no
4855   need_version=no
4856   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4857     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4858     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4859     dynamic_linker='NetBSD (a.out) ld.so'
4860   else
4861     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4862     soname_spec='${libname}${release}${shared_ext}$major'
4863     dynamic_linker='NetBSD ld.elf_so'
4864   fi
4865   shlibpath_var=LD_LIBRARY_PATH
4866   shlibpath_overrides_runpath=yes
4867   hardcode_into_libs=yes
4868   ;;
4869
4870 newsos6)
4871   version_type=linux
4872   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4873   shlibpath_var=LD_LIBRARY_PATH
4874   shlibpath_overrides_runpath=yes
4875   ;;
4876
4877 *nto* | *qnx*)
4878   version_type=qnx
4879   need_lib_prefix=no
4880   need_version=no
4881   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4882   soname_spec='${libname}${release}${shared_ext}$major'
4883   shlibpath_var=LD_LIBRARY_PATH
4884   shlibpath_overrides_runpath=no
4885   hardcode_into_libs=yes
4886   dynamic_linker='ldqnx.so'
4887   ;;
4888
4889 openbsd*)
4890   version_type=sunos
4891   sys_lib_dlsearch_path_spec="/usr/lib"
4892   need_lib_prefix=no
4893   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4894   case $host_os in
4895     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
4896     *)                          need_version=no  ;;
4897   esac
4898   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4899   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4900   shlibpath_var=LD_LIBRARY_PATH
4901   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4902     case $host_os in
4903       openbsd2.[[89]] | openbsd2.[[89]].*)
4904         shlibpath_overrides_runpath=no
4905         ;;
4906       *)
4907         shlibpath_overrides_runpath=yes
4908         ;;
4909       esac
4910   else
4911     shlibpath_overrides_runpath=yes
4912   fi
4913   ;;
4914
4915 os2*)
4916   libname_spec='$name'
4917   shrext_cmds=".dll"
4918   need_lib_prefix=no
4919   library_names_spec='$libname${shared_ext} $libname.a'
4920   dynamic_linker='OS/2 ld.exe'
4921   shlibpath_var=LIBPATH
4922   ;;
4923
4924 osf3* | osf4* | osf5*)
4925   version_type=osf
4926   need_lib_prefix=no
4927   need_version=no
4928   soname_spec='${libname}${release}${shared_ext}$major'
4929   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4930   shlibpath_var=LD_LIBRARY_PATH
4931   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4932   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4933   ;;
4934
4935 rdos*)
4936   dynamic_linker=no
4937   ;;
4938
4939 solaris*)
4940   version_type=linux
4941   need_lib_prefix=no
4942   need_version=no
4943   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4944   soname_spec='${libname}${release}${shared_ext}$major'
4945   shlibpath_var=LD_LIBRARY_PATH
4946   shlibpath_overrides_runpath=yes
4947   hardcode_into_libs=yes
4948   # ldd complains unless libraries are executable
4949   postinstall_cmds='chmod +x $lib'
4950   ;;
4951
4952 sunos4*)
4953   version_type=sunos
4954   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4955   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4956   shlibpath_var=LD_LIBRARY_PATH
4957   shlibpath_overrides_runpath=yes
4958   if test "$with_gnu_ld" = yes; then
4959     need_lib_prefix=no
4960   fi
4961   need_version=yes
4962   ;;
4963
4964 sysv4 | sysv4.3*)
4965   version_type=linux
4966   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4967   soname_spec='${libname}${release}${shared_ext}$major'
4968   shlibpath_var=LD_LIBRARY_PATH
4969   case $host_vendor in
4970     sni)
4971       shlibpath_overrides_runpath=no
4972       need_lib_prefix=no
4973       runpath_var=LD_RUN_PATH
4974       ;;
4975     siemens)
4976       need_lib_prefix=no
4977       ;;
4978     motorola)
4979       need_lib_prefix=no
4980       need_version=no
4981       shlibpath_overrides_runpath=no
4982       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4983       ;;
4984   esac
4985   ;;
4986
4987 sysv4*MP*)
4988   if test -d /usr/nec ;then
4989     version_type=linux
4990     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4991     soname_spec='$libname${shared_ext}.$major'
4992     shlibpath_var=LD_LIBRARY_PATH
4993   fi
4994   ;;
4995
4996 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4997   version_type=freebsd-elf
4998   need_lib_prefix=no
4999   need_version=no
5000   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
5001   soname_spec='${libname}${release}${shared_ext}$major'
5002   shlibpath_var=LD_LIBRARY_PATH
5003   shlibpath_overrides_runpath=yes
5004   hardcode_into_libs=yes
5005   if test "$with_gnu_ld" = yes; then
5006     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5007   else
5008     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5009     case $host_os in
5010       sco3.2v5*)
5011         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5012         ;;
5013     esac
5014   fi
5015   sys_lib_dlsearch_path_spec='/usr/lib'
5016   ;;
5017
5018 tpf*)
5019   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
5020   version_type=linux
5021   need_lib_prefix=no
5022   need_version=no
5023   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5024   shlibpath_var=LD_LIBRARY_PATH
5025   shlibpath_overrides_runpath=no
5026   hardcode_into_libs=yes
5027   ;;
5028
5029 uts4*)
5030   version_type=linux
5031   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5032   soname_spec='${libname}${release}${shared_ext}$major'
5033   shlibpath_var=LD_LIBRARY_PATH
5034   ;;
5035
5036 *)
5037   dynamic_linker=no
5038   ;;
5039 esac
5040 AC_MSG_RESULT([$dynamic_linker])
5041 test "$dynamic_linker" = no && can_build_shared=no
5042
5043 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5044 if test "$GCC" = yes; then
5045   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5046 fi
5047
5048 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5049   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5050 fi
5051 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5052   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5053 fi
5054
5055 _LT_DECL([], [variables_saved_for_relink], [1],
5056     [Variables whose values should be saved in libtool wrapper scripts and
5057     restored at link time])
5058 _LT_DECL([], [need_lib_prefix], [0],
5059     [Do we need the "lib" prefix for modules?])
5060 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5061 _LT_DECL([], [version_type], [0], [Library versioning type])
5062 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
5063 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5064 _LT_DECL([], [shlibpath_overrides_runpath], [0],
5065     [Is shlibpath searched before the hard-coded library search path?])
5066 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5067 _LT_DECL([], [library_names_spec], [1],
5068     [[List of archive names.  First name is the real one, the rest are links.
5069     The last name is the one that the linker finds with -lNAME]])
5070 _LT_DECL([], [soname_spec], [1],
5071     [[The coded name of the library, if different from the real name]])
5072 _LT_DECL([], [install_override_mode], [1],
5073     [Permission mode override for installation of shared libraries])
5074 _LT_DECL([], [postinstall_cmds], [2],
5075     [Command to use after installation of a shared archive])
5076 _LT_DECL([], [postuninstall_cmds], [2],
5077     [Command to use after uninstallation of a shared archive])
5078 _LT_DECL([], [finish_cmds], [2],
5079     [Commands used to finish a libtool library installation in a directory])
5080 _LT_DECL([], [finish_eval], [1],
5081     [[As "finish_cmds", except a single script fragment to be evaled but
5082     not shown]])
5083 _LT_DECL([], [hardcode_into_libs], [0],
5084     [Whether we should hardcode library paths into libraries])
5085 _LT_DECL([], [sys_lib_search_path_spec], [2],
5086     [Compile-time system search path for libraries])
5087 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5088     [Run-time system search path for libraries])
5089 ])# _LT_SYS_DYNAMIC_LINKER
5090
5091
5092 # _LT_PATH_TOOL_PREFIX(TOOL)
5093 # --------------------------
5094 # find a file program which can recognize shared library
5095 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5096 [m4_require([_LT_DECL_EGREP])dnl
5097 AC_MSG_CHECKING([for $1])
5098 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5099 [case $MAGIC_CMD in
5100 [[\\/*] |  ?:[\\/]*])
5101   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5102   ;;
5103 *)
5104   lt_save_MAGIC_CMD="$MAGIC_CMD"
5105   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5106 dnl $ac_dummy forces splitting on constant user-supplied paths.
5107 dnl POSIX.2 word splitting is done only on the output of word expansions,
5108 dnl not every word.  This closes a longstanding sh security hole.
5109   ac_dummy="m4_if([$2], , $PATH, [$2])"
5110   for ac_dir in $ac_dummy; do
5111     IFS="$lt_save_ifs"
5112     test -z "$ac_dir" && ac_dir=.
5113     if test -f $ac_dir/$1; then
5114       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5115       if test -n "$file_magic_test_file"; then
5116         case $deplibs_check_method in
5117         "file_magic "*)
5118           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5119           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5120           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5121             $EGREP "$file_magic_regex" > /dev/null; then
5122             :
5123           else
5124             cat <<_LT_EOF 1>&2
5125
5126 *** Warning: the command libtool uses to detect shared libraries,
5127 *** $file_magic_cmd, produces output that libtool cannot recognize.
5128 *** The result is that libtool may fail to recognize shared libraries
5129 *** as such.  This will affect the creation of libtool libraries that
5130 *** depend on shared libraries, but programs linked with such libtool
5131 *** libraries will work regardless of this problem.  Nevertheless, you
5132 *** may want to report the problem to your system manager and/or to
5133 *** bug-libtool@gnu.org
5134
5135 _LT_EOF
5136           fi ;;
5137         esac
5138       fi
5139       break
5140     fi
5141   done
5142   IFS="$lt_save_ifs"
5143   MAGIC_CMD="$lt_save_MAGIC_CMD"
5144   ;;
5145 esac])
5146 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5147 if test -n "$MAGIC_CMD"; then
5148   AC_MSG_RESULT($MAGIC_CMD)
5149 else
5150   AC_MSG_RESULT(no)
5151 fi
5152 _LT_DECL([], [MAGIC_CMD], [0],
5153          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5154 ])# _LT_PATH_TOOL_PREFIX
5155
5156 # Old name:
5157 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5158 dnl aclocal-1.4 backwards compatibility:
5159 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5160
5161
5162 # _LT_PATH_MAGIC
5163 # --------------
5164 # find a file program which can recognize a shared library
5165 m4_defun([_LT_PATH_MAGIC],
5166 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5167 if test -z "$lt_cv_path_MAGIC_CMD"; then
5168   if test -n "$ac_tool_prefix"; then
5169     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5170   else
5171     MAGIC_CMD=:
5172   fi
5173 fi
5174 ])# _LT_PATH_MAGIC
5175
5176
5177 # LT_PATH_LD
5178 # ----------
5179 # find the pathname to the GNU or non-GNU linker
5180 AC_DEFUN([LT_PATH_LD],
5181 [AC_REQUIRE([AC_PROG_CC])dnl
5182 AC_REQUIRE([AC_CANONICAL_HOST])dnl
5183 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5184 m4_require([_LT_DECL_SED])dnl
5185 m4_require([_LT_DECL_EGREP])dnl
5186 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
5187
5188 AC_ARG_WITH([gnu-ld],
5189     [AS_HELP_STRING([--with-gnu-ld],
5190         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
5191     [test "$withval" = no || with_gnu_ld=yes],
5192     [with_gnu_ld=no])dnl
5193
5194 ac_prog=ld
5195 if test "$GCC" = yes; then
5196   # Check if gcc -print-prog-name=ld gives a path.
5197   AC_MSG_CHECKING([for ld used by $CC])
5198   case $host in
5199   *-*-mingw*)
5200     # gcc leaves a trailing carriage return which upsets mingw
5201     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5202   *)
5203     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5204   esac
5205   case $ac_prog in
5206     # Accept absolute paths.
5207     [[\\/]]* | ?:[[\\/]]*)
5208       re_direlt='/[[^/]][[^/]]*/\.\./'
5209       # Canonicalize the pathname of ld
5210       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5211       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5212         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5213       done
5214       test -z "$LD" && LD="$ac_prog"
5215       ;;
5216   "")
5217     # If it fails, then pretend we aren't using GCC.
5218     ac_prog=ld
5219     ;;
5220   *)
5221     # If it is relative, then search for the first ld in PATH.
5222     with_gnu_ld=unknown
5223     ;;
5224   esac
5225 elif test "$with_gnu_ld" = yes; then
5226   AC_MSG_CHECKING([for GNU ld])
5227 else
5228   AC_MSG_CHECKING([for non-GNU ld])
5229 fi
5230 AC_CACHE_VAL(lt_cv_path_LD,
5231 [if test -z "$LD"; then
5232   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5233   for ac_dir in $PATH; do
5234     IFS="$lt_save_ifs"
5235     test -z "$ac_dir" && ac_dir=.
5236     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5237       lt_cv_path_LD="$ac_dir/$ac_prog"
5238       # Check to see if the program is GNU ld.  I'd rather use --version,
5239       # but apparently some variants of GNU ld only accept -v.
5240       # Break only if it was the GNU/non-GNU ld that we prefer.
5241       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5242       *GNU* | *'with BFD'*)
5243         test "$with_gnu_ld" != no && break
5244         ;;
5245       *)
5246         test "$with_gnu_ld" != yes && break
5247         ;;
5248       esac
5249     fi
5250   done
5251   IFS="$lt_save_ifs"
5252 else
5253   lt_cv_path_LD="$LD" # Let the user override the test with a path.
5254 fi])
5255 LD="$lt_cv_path_LD"
5256 if test -n "$LD"; then
5257   AC_MSG_RESULT($LD)
5258 else
5259   AC_MSG_RESULT(no)
5260 fi
5261 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5262 _LT_PATH_LD_GNU
5263 AC_SUBST([LD])
5264
5265 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5266 ])# LT_PATH_LD
5267
5268 # Old names:
5269 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5270 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5271 dnl aclocal-1.4 backwards compatibility:
5272 dnl AC_DEFUN([AM_PROG_LD], [])
5273 dnl AC_DEFUN([AC_PROG_LD], [])
5274
5275
5276 # _LT_PATH_LD_GNU
5277 #- --------------
5278 m4_defun([_LT_PATH_LD_GNU],
5279 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5280 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
5281 case `$LD -v 2>&1 </dev/null` in
5282 *GNU* | *'with BFD'*)
5283   lt_cv_prog_gnu_ld=yes
5284   ;;
5285 *)
5286   lt_cv_prog_gnu_ld=no
5287   ;;
5288 esac])
5289 with_gnu_ld=$lt_cv_prog_gnu_ld
5290 ])# _LT_PATH_LD_GNU
5291
5292
5293 # _LT_CMD_RELOAD
5294 # --------------
5295 # find reload flag for linker
5296 #   -- PORTME Some linkers may need a different reload flag.
5297 m4_defun([_LT_CMD_RELOAD],
5298 [AC_CACHE_CHECK([for $LD option to reload object files],
5299   lt_cv_ld_reload_flag,
5300   [lt_cv_ld_reload_flag='-r'])
5301 reload_flag=$lt_cv_ld_reload_flag
5302 case $reload_flag in
5303 "" | " "*) ;;
5304 *) reload_flag=" $reload_flag" ;;
5305 esac
5306 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5307 case $host_os in
5308   darwin*)
5309     if test "$GCC" = yes; then
5310       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5311     else
5312       reload_cmds='$LD$reload_flag -o $output$reload_objs'
5313     fi
5314     ;;
5315 esac
5316 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5317 _LT_TAGDECL([], [reload_cmds], [2])dnl
5318 ])# _LT_CMD_RELOAD
5319
5320
5321 # _LT_CHECK_MAGIC_METHOD
5322 # ----------------------
5323 # how to check for library dependencies
5324 #  -- PORTME fill in with the dynamic library characteristics
5325 m4_defun([_LT_CHECK_MAGIC_METHOD],
5326 [m4_require([_LT_DECL_EGREP])
5327 m4_require([_LT_DECL_OBJDUMP])
5328 AC_CACHE_CHECK([how to recognize dependent libraries],
5329 lt_cv_deplibs_check_method,
5330 [lt_cv_file_magic_cmd='$MAGIC_CMD'
5331 lt_cv_file_magic_test_file=
5332 lt_cv_deplibs_check_method='unknown'
5333 # Need to set the preceding variable on all platforms that support
5334 # interlibrary dependencies.
5335 # 'none' -- dependencies not supported.
5336 # `unknown' -- same as none, but documents that we really don't know.
5337 # 'pass_all' -- all dependencies passed with no checks.
5338 # 'test_compile' -- check by making test program.
5339 # 'file_magic [[regex]]' -- check by looking for files in library path
5340 # which responds to the $file_magic_cmd with a given extended regex.
5341 # If you have `file' or equivalent on your system and you're not sure
5342 # whether `pass_all' will *always* work, you probably want this one.
5343
5344 case $host_os in
5345 aix[[4-9]]*)
5346   lt_cv_deplibs_check_method=pass_all
5347   ;;
5348
5349 beos*)
5350   lt_cv_deplibs_check_method=pass_all
5351   ;;
5352
5353 bsdi[[45]]*)
5354   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5355   lt_cv_file_magic_cmd='/usr/bin/file -L'
5356   lt_cv_file_magic_test_file=/shlib/libc.so
5357   ;;
5358
5359 cygwin*)
5360   # func_win32_libid is a shell function defined in ltmain.sh
5361   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5362   lt_cv_file_magic_cmd='func_win32_libid'
5363   ;;
5364
5365 mingw* | pw32*)
5366   # Base MSYS/MinGW do not provide the 'file' command needed by
5367   # func_win32_libid shell function, so use a weaker test based on 'objdump',
5368   # unless we find 'file', for example because we are cross-compiling.
5369   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
5370   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
5371     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5372     lt_cv_file_magic_cmd='func_win32_libid'
5373   else
5374     # Keep this pattern in sync with the one in func_win32_libid.
5375     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5376     lt_cv_file_magic_cmd='$OBJDUMP -f'
5377   fi
5378   ;;
5379
5380 cegcc*)
5381   # use the weaker test based on 'objdump'. See mingw*.
5382   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5383   lt_cv_file_magic_cmd='$OBJDUMP -f'
5384   ;;
5385
5386 darwin* | rhapsody*)
5387   lt_cv_deplibs_check_method=pass_all
5388   ;;
5389
5390 freebsd* | dragonfly*)
5391   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5392     case $host_cpu in
5393     i*86 )
5394       # Not sure whether the presence of OpenBSD here was a mistake.
5395       # Let's accept both of them until this is cleared up.
5396       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5397       lt_cv_file_magic_cmd=/usr/bin/file
5398       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5399       ;;
5400     esac
5401   else
5402     lt_cv_deplibs_check_method=pass_all
5403   fi
5404   ;;
5405
5406 gnu*)
5407   lt_cv_deplibs_check_method=pass_all
5408   ;;
5409
5410 haiku*)
5411   lt_cv_deplibs_check_method=pass_all
5412   ;;
5413
5414 hpux10.20* | hpux11*)
5415   lt_cv_file_magic_cmd=/usr/bin/file
5416   case $host_cpu in
5417   ia64*)
5418     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5419     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5420     ;;
5421   hppa*64*)
5422     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
5423     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5424     ;;
5425   *)
5426     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5427     lt_cv_file_magic_test_file=/usr/lib/libc.sl
5428     ;;
5429   esac
5430   ;;
5431
5432 interix[[3-9]]*)
5433   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5434   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5435   ;;
5436
5437 irix5* | irix6* | nonstopux*)
5438   case $LD in
5439   *-32|*"-32 ") libmagic=32-bit;;
5440   *-n32|*"-n32 ") libmagic=N32;;
5441   *-64|*"-64 ") libmagic=64-bit;;
5442   *) libmagic=never-match;;
5443   esac
5444   lt_cv_deplibs_check_method=pass_all
5445   ;;
5446
5447 # This must be Linux ELF.
5448 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5449   lt_cv_deplibs_check_method=pass_all
5450   ;;
5451
5452 netbsd*)
5453   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5454     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5455   else
5456     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5457   fi
5458   ;;
5459
5460 newos6*)
5461   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5462   lt_cv_file_magic_cmd=/usr/bin/file
5463   lt_cv_file_magic_test_file=/usr/lib/libnls.so
5464   ;;
5465
5466 *nto* | *qnx*)
5467   lt_cv_deplibs_check_method=pass_all
5468   ;;
5469
5470 openbsd*)
5471   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5472     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5473   else
5474     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5475   fi
5476   ;;
5477
5478 osf3* | osf4* | osf5*)
5479   lt_cv_deplibs_check_method=pass_all
5480   ;;
5481
5482 rdos*)
5483   lt_cv_deplibs_check_method=pass_all
5484   ;;
5485
5486 solaris*)
5487   lt_cv_deplibs_check_method=pass_all
5488   ;;
5489
5490 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5491   lt_cv_deplibs_check_method=pass_all
5492   ;;
5493
5494 sysv4 | sysv4.3*)
5495   case $host_vendor in
5496   motorola)
5497     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]]'
5498     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5499     ;;
5500   ncr)
5501     lt_cv_deplibs_check_method=pass_all
5502     ;;
5503   sequent)
5504     lt_cv_file_magic_cmd='/bin/file'
5505     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5506     ;;
5507   sni)
5508     lt_cv_file_magic_cmd='/bin/file'
5509     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5510     lt_cv_file_magic_test_file=/lib/libc.so
5511     ;;
5512   siemens)
5513     lt_cv_deplibs_check_method=pass_all
5514     ;;
5515   pc)
5516     lt_cv_deplibs_check_method=pass_all
5517     ;;
5518   esac
5519   ;;
5520
5521 tpf*)
5522   lt_cv_deplibs_check_method=pass_all
5523   ;;
5524 esac
5525 ])
5526 file_magic_cmd=$lt_cv_file_magic_cmd
5527 deplibs_check_method=$lt_cv_deplibs_check_method
5528 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5529
5530 _LT_DECL([], [deplibs_check_method], [1],
5531     [Method to check whether dependent libraries are shared objects])
5532 _LT_DECL([], [file_magic_cmd], [1],
5533     [Command to use when deplibs_check_method == "file_magic"])
5534 ])# _LT_CHECK_MAGIC_METHOD
5535
5536
5537 # LT_PATH_NM
5538 # ----------
5539 # find the pathname to a BSD- or MS-compatible name lister
5540 AC_DEFUN([LT_PATH_NM],
5541 [AC_REQUIRE([AC_PROG_CC])dnl
5542 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5543 [if test -n "$NM"; then
5544   # Let the user override the test.
5545   lt_cv_path_NM="$NM"
5546 else
5547   lt_nm_to_check="${ac_tool_prefix}nm"
5548   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5549     lt_nm_to_check="$lt_nm_to_check nm"
5550   fi
5551   for lt_tmp_nm in $lt_nm_to_check; do
5552     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5553     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5554       IFS="$lt_save_ifs"
5555       test -z "$ac_dir" && ac_dir=.
5556       tmp_nm="$ac_dir/$lt_tmp_nm"
5557       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5558         # Check to see if the nm accepts a BSD-compat flag.
5559         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5560         #   nm: unknown option "B" ignored
5561         # Tru64's nm complains that /dev/null is an invalid object file
5562         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5563         */dev/null* | *'Invalid file or object type'*)
5564           lt_cv_path_NM="$tmp_nm -B"
5565           break
5566           ;;
5567         *)
5568           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5569           */dev/null*)
5570             lt_cv_path_NM="$tmp_nm -p"
5571             break
5572             ;;
5573           *)
5574             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5575             continue # so that we can try to find one that supports BSD flags
5576             ;;
5577           esac
5578           ;;
5579         esac
5580       fi
5581     done
5582     IFS="$lt_save_ifs"
5583   done
5584   : ${lt_cv_path_NM=no}
5585 fi])
5586 if test "$lt_cv_path_NM" != "no"; then
5587   NM="$lt_cv_path_NM"
5588 else
5589   # Didn't find any BSD compatible name lister, look for dumpbin.
5590   if test -n "$DUMPBIN"; then :
5591     # Let the user override the test.
5592   else
5593     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5594     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5595     *COFF*)
5596       DUMPBIN="$DUMPBIN -symbols"
5597       ;;
5598     *)
5599       DUMPBIN=:
5600       ;;
5601     esac
5602   fi
5603   AC_SUBST([DUMPBIN])
5604   if test "$DUMPBIN" != ":"; then
5605     NM="$DUMPBIN"
5606   fi
5607 fi
5608 test -z "$NM" && NM=nm
5609 AC_SUBST([NM])
5610 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5611
5612 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5613   [lt_cv_nm_interface="BSD nm"
5614   echo "int some_variable = 0;" > conftest.$ac_ext
5615   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5616   (eval "$ac_compile" 2>conftest.err)
5617   cat conftest.err >&AS_MESSAGE_LOG_FD
5618   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5619   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5620   cat conftest.err >&AS_MESSAGE_LOG_FD
5621   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
5622   cat conftest.out >&AS_MESSAGE_LOG_FD
5623   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5624     lt_cv_nm_interface="MS dumpbin"
5625   fi
5626   rm -f conftest*])
5627 ])# LT_PATH_NM
5628
5629 # Old names:
5630 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5631 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5632 dnl aclocal-1.4 backwards compatibility:
5633 dnl AC_DEFUN([AM_PROG_NM], [])
5634 dnl AC_DEFUN([AC_PROG_NM], [])
5635
5636
5637 # LT_LIB_M
5638 # --------
5639 # check for math library
5640 AC_DEFUN([LT_LIB_M],
5641 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5642 LIBM=
5643 case $host in
5644 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5645   # These system don't have libm, or don't need it
5646   ;;
5647 *-ncr-sysv4.3*)
5648   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5649   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5650   ;;
5651 *)
5652   AC_CHECK_LIB(m, cos, LIBM="-lm")
5653   ;;
5654 esac
5655 AC_SUBST([LIBM])
5656 ])# LT_LIB_M
5657
5658 # Old name:
5659 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5660 dnl aclocal-1.4 backwards compatibility:
5661 dnl AC_DEFUN([AC_CHECK_LIBM], [])
5662
5663
5664 # _LT_COMPILER_NO_RTTI([TAGNAME])
5665 # -------------------------------
5666 m4_defun([_LT_COMPILER_NO_RTTI],
5667 [m4_require([_LT_TAG_COMPILER])dnl
5668
5669 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5670
5671 if test "$GCC" = yes; then
5672   case $cc_basename in
5673   nvcc*)
5674     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5675   *)
5676     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5677   esac
5678
5679   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5680     lt_cv_prog_compiler_rtti_exceptions,
5681     [-fno-rtti -fno-exceptions], [],
5682     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5683 fi
5684 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5685         [Compiler flag to turn off builtin functions])
5686 ])# _LT_COMPILER_NO_RTTI
5687
5688
5689 # _LT_CMD_GLOBAL_SYMBOLS
5690 # ----------------------
5691 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5692 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5693 AC_REQUIRE([AC_PROG_CC])dnl
5694 AC_REQUIRE([AC_PROG_AWK])dnl
5695 AC_REQUIRE([LT_PATH_NM])dnl
5696 AC_REQUIRE([LT_PATH_LD])dnl
5697 m4_require([_LT_DECL_SED])dnl
5698 m4_require([_LT_DECL_EGREP])dnl
5699 m4_require([_LT_TAG_COMPILER])dnl
5700
5701 # Check for command to grab the raw symbol name followed by C symbol from nm.
5702 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5703 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5704 [
5705 # These are sane defaults that work on at least a few old systems.
5706 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5707
5708 # Character class describing NM global symbol codes.
5709 symcode='[[BCDEGRST]]'
5710
5711 # Regexp to match symbols that can be accessed directly from C.
5712 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5713
5714 # Define system-specific variables.
5715 case $host_os in
5716 aix*)
5717   symcode='[[BCDT]]'
5718   ;;
5719 cygwin* | mingw* | pw32* | cegcc*)
5720   symcode='[[ABCDGISTW]]'
5721   ;;
5722 hpux*)
5723   if test "$host_cpu" = ia64; then
5724     symcode='[[ABCDEGRST]]'
5725   fi
5726   ;;
5727 irix* | nonstopux*)
5728   symcode='[[BCDEGRST]]'
5729   ;;
5730 osf*)
5731   symcode='[[BCDEGQRST]]'
5732   ;;
5733 solaris*)
5734   symcode='[[BDRT]]'
5735   ;;
5736 sco3.2v5*)
5737   symcode='[[DT]]'
5738   ;;
5739 sysv4.2uw2*)
5740   symcode='[[DT]]'
5741   ;;
5742 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5743   symcode='[[ABDT]]'
5744   ;;
5745 sysv4)
5746   symcode='[[DFNSTU]]'
5747   ;;
5748 esac
5749
5750 # If we're using GNU nm, then use its standard symbol codes.
5751 case `$NM -V 2>&1` in
5752 *GNU* | *'with BFD'*)
5753   symcode='[[ABCDGIRSTW]]' ;;
5754 esac
5755
5756 # Transform an extracted symbol line into a proper C declaration.
5757 # Some systems (esp. on ia64) link data and code symbols differently,
5758 # so use this general approach.
5759 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5760
5761 # Transform an extracted symbol line into symbol name and symbol address
5762 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5763 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
5764
5765 # Handle CRLF in mingw tool chain
5766 opt_cr=
5767 case $build_os in
5768 mingw*)
5769   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5770   ;;
5771 esac
5772
5773 # Try without a prefix underscore, then with it.
5774 for ac_symprfx in "" "_"; do
5775
5776   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5777   symxfrm="\\1 $ac_symprfx\\2 \\2"
5778
5779   # Write the raw and C identifiers.
5780   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5781     # Fake it for dumpbin and say T for any non-static function
5782     # and D for any global variable.
5783     # Also find C++ and __fastcall symbols from MSVC++,
5784     # which start with @ or ?.
5785     lt_cv_sys_global_symbol_pipe="$AWK ['"\
5786 "     {last_section=section; section=\$ 3};"\
5787 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5788 "     \$ 0!~/External *\|/{next};"\
5789 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5790 "     {if(hide[section]) next};"\
5791 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5792 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5793 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5794 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5795 "     ' prfx=^$ac_symprfx]"
5796   else
5797     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5798   fi
5799
5800   # Check to see that the pipe works correctly.
5801   pipe_works=no
5802
5803   rm -f conftest*
5804   cat > conftest.$ac_ext <<_LT_EOF
5805 #ifdef __cplusplus
5806 extern "C" {
5807 #endif
5808 char nm_test_var;
5809 void nm_test_func(void);
5810 void nm_test_func(void){}
5811 #ifdef __cplusplus
5812 }
5813 #endif
5814 int main(){nm_test_var='a';nm_test_func();return(0);}
5815 _LT_EOF
5816
5817   if AC_TRY_EVAL(ac_compile); then
5818     # Now try to grab the symbols.
5819     nlist=conftest.nm
5820     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5821       # Try sorting and uniquifying the output.
5822       if sort "$nlist" | uniq > "$nlist"T; then
5823         mv -f "$nlist"T "$nlist"
5824       else
5825         rm -f "$nlist"T
5826       fi
5827
5828       # Make sure that we snagged all the symbols we need.
5829       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5830         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5831           cat <<_LT_EOF > conftest.$ac_ext
5832 #ifdef __cplusplus
5833 extern "C" {
5834 #endif
5835
5836 _LT_EOF
5837           # Now generate the symbol file.
5838           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5839
5840           cat <<_LT_EOF >> conftest.$ac_ext
5841
5842 /* The mapping between symbol names and symbols.  */
5843 const struct {
5844   const char *name;
5845   void       *address;
5846 }
5847 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5848 {
5849   { "@PROGRAM@", (void *) 0 },
5850 _LT_EOF
5851           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5852           cat <<\_LT_EOF >> conftest.$ac_ext
5853   {0, (void *) 0}
5854 };
5855
5856 /* This works around a problem in FreeBSD linker */
5857 #ifdef FREEBSD_WORKAROUND
5858 static const void *lt_preloaded_setup() {
5859   return lt__PROGRAM__LTX_preloaded_symbols;
5860 }
5861 #endif
5862
5863 #ifdef __cplusplus
5864 }
5865 #endif
5866 _LT_EOF
5867           # Now try linking the two files.
5868           mv conftest.$ac_objext conftstm.$ac_objext
5869           lt_save_LIBS="$LIBS"
5870           lt_save_CFLAGS="$CFLAGS"
5871           LIBS="conftstm.$ac_objext"
5872           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5873           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5874             pipe_works=yes
5875           fi
5876           LIBS="$lt_save_LIBS"
5877           CFLAGS="$lt_save_CFLAGS"
5878         else
5879           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5880         fi
5881       else
5882         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5883       fi
5884     else
5885       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5886     fi
5887   else
5888     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5889     cat conftest.$ac_ext >&5
5890   fi
5891   rm -rf conftest* conftst*
5892
5893   # Do not use the global_symbol_pipe unless it works.
5894   if test "$pipe_works" = yes; then
5895     break
5896   else
5897     lt_cv_sys_global_symbol_pipe=
5898   fi
5899 done
5900 ])
5901 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5902   lt_cv_sys_global_symbol_to_cdecl=
5903 fi
5904 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5905   AC_MSG_RESULT(failed)
5906 else
5907   AC_MSG_RESULT(ok)
5908 fi
5909
5910 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5911     [Take the output of nm and produce a listing of raw symbols and C names])
5912 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5913     [Transform the output of nm in a proper C declaration])
5914 _LT_DECL([global_symbol_to_c_name_address],
5915     [lt_cv_sys_global_symbol_to_c_name_address], [1],
5916     [Transform the output of nm in a C name address pair])
5917 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5918     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5919     [Transform the output of nm in a C name address pair when lib prefix is needed])
5920 ]) # _LT_CMD_GLOBAL_SYMBOLS
5921
5922
5923 # _LT_COMPILER_PIC([TAGNAME])
5924 # ---------------------------
5925 m4_defun([_LT_COMPILER_PIC],
5926 [m4_require([_LT_TAG_COMPILER])dnl
5927 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5928 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5929 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5930
5931 AC_MSG_CHECKING([for $compiler option to produce PIC])
5932 m4_if([$1], [CXX], [
5933   # C++ specific cases for pic, static, wl, etc.
5934   if test "$GXX" = yes; then
5935     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5936     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5937
5938     case $host_os in
5939     aix*)
5940       # All AIX code is PIC.
5941       if test "$host_cpu" = ia64; then
5942         # AIX 5 now supports IA64 processor
5943         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5944       fi
5945       ;;
5946
5947     amigaos*)
5948       case $host_cpu in
5949       powerpc)
5950             # see comment about AmigaOS4 .so support
5951             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5952         ;;
5953       m68k)
5954             # FIXME: we need at least 68020 code to build shared libraries, but
5955             # adding the `-m68020' flag to GCC prevents building anything better,
5956             # like `-m68040'.
5957             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5958         ;;
5959       esac
5960       ;;
5961
5962     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5963       # PIC is the default for these OSes.
5964       ;;
5965     mingw* | cygwin* | os2* | pw32* | cegcc*)
5966       # This hack is so that the source file can tell whether it is being
5967       # built for inclusion in a dll (and should export symbols for example).
5968       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5969       # (--disable-auto-import) libraries
5970       m4_if([$1], [GCJ], [],
5971         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5972       ;;
5973     darwin* | rhapsody*)
5974       # PIC is the default on this platform
5975       # Common symbols not allowed in MH_DYLIB files
5976       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5977       ;;
5978     *djgpp*)
5979       # DJGPP does not support shared libraries at all
5980       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5981       ;;
5982     haiku*)
5983       # PIC is the default for Haiku.
5984       # The "-static" flag exists, but is broken.
5985       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5986       ;;
5987     interix[[3-9]]*)
5988       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5989       # Instead, we relocate shared libraries at runtime.
5990       ;;
5991     sysv4*MP*)
5992       if test -d /usr/nec; then
5993         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5994       fi
5995       ;;
5996     hpux*)
5997       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5998       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5999       # sets the default TLS model and affects inlining.
6000       case $host_cpu in
6001       hppa*64*)
6002         ;;
6003       *)
6004         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6005         ;;
6006       esac
6007       ;;
6008     *qnx* | *nto*)
6009       # QNX uses GNU C++, but need to define -shared option too, otherwise
6010       # it will coredump.
6011       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6012       ;;
6013     *)
6014       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6015       ;;
6016     esac
6017   else
6018     case $host_os in
6019       aix[[4-9]]*)
6020         # All AIX code is PIC.
6021         if test "$host_cpu" = ia64; then
6022           # AIX 5 now supports IA64 processor
6023           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6024         else
6025           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6026         fi
6027         ;;
6028       chorus*)
6029         case $cc_basename in
6030         cxch68*)
6031           # Green Hills C++ Compiler
6032           # _LT_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"
6033           ;;
6034         esac
6035         ;;
6036       dgux*)
6037         case $cc_basename in
6038           ec++*)
6039             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6040             ;;
6041           ghcx*)
6042             # Green Hills C++ Compiler
6043             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6044             ;;
6045           *)
6046             ;;
6047         esac
6048         ;;
6049       freebsd* | dragonfly*)
6050         # FreeBSD uses GNU C++
6051         ;;
6052       hpux9* | hpux10* | hpux11*)
6053         case $cc_basename in
6054           CC*)
6055             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6056             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6057             if test "$host_cpu" != ia64; then
6058               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6059             fi
6060             ;;
6061           aCC*)
6062             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6063             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6064             case $host_cpu in
6065             hppa*64*|ia64*)
6066               # +Z the default
6067               ;;
6068             *)
6069               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6070               ;;
6071             esac
6072             ;;
6073           *)
6074             ;;
6075         esac
6076         ;;
6077       interix*)
6078         # This is c89, which is MS Visual C++ (no shared libs)
6079         # Anyone wants to do a port?
6080         ;;
6081       irix5* | irix6* | nonstopux*)
6082         case $cc_basename in
6083           CC*)
6084             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6085             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6086             # CC pic flag -KPIC is the default.
6087             ;;
6088           *)
6089             ;;
6090         esac
6091         ;;
6092       linux* | k*bsd*-gnu | kopensolaris*-gnu)
6093         case $cc_basename in
6094           KCC*)
6095             # KAI C++ Compiler
6096             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6097             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6098             ;;
6099           ecpc* )
6100             # old Intel C++ for x86_64 which still supported -KPIC.
6101             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6102             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6103             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6104             ;;
6105           icpc* )
6106             # Intel C++, used to be incompatible with GCC.
6107             # ICC 10 doesn't accept -KPIC any more.
6108             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6109             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6110             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6111             ;;
6112           pgCC* | pgcpp*)
6113             # Portland Group C++ compiler
6114             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6115             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6116             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6117             ;;
6118           cxx*)
6119             # Compaq C++
6120             # Make sure the PIC flag is empty.  It appears that all Alpha
6121             # Linux and Compaq Tru64 Unix objects are PIC.
6122             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6123             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6124             ;;
6125           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
6126             # IBM XL 8.0, 9.0 on PPC and BlueGene
6127             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6128             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6129             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6130             ;;
6131           *)
6132             case `$CC -V 2>&1 | sed 5q` in
6133             *Sun\ C*)
6134               # Sun C++ 5.9
6135               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6136               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6137               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6138               ;;
6139             esac
6140             ;;
6141         esac
6142         ;;
6143       lynxos*)
6144         ;;
6145       m88k*)
6146         ;;
6147       mvs*)
6148         case $cc_basename in
6149           cxx*)
6150             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6151             ;;
6152           *)
6153             ;;
6154         esac
6155         ;;
6156       netbsd*)
6157         ;;
6158       *qnx* | *nto*)
6159         # QNX uses GNU C++, but need to define -shared option too, otherwise
6160         # it will coredump.
6161         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6162         ;;
6163       osf3* | osf4* | osf5*)
6164         case $cc_basename in
6165           KCC*)
6166             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6167             ;;
6168           RCC*)
6169             # Rational C++ 2.4.1
6170             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6171             ;;
6172           cxx*)
6173             # Digital/Compaq C++
6174             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6175             # Make sure the PIC flag is empty.  It appears that all Alpha
6176             # Linux and Compaq Tru64 Unix objects are PIC.
6177             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6178             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6179             ;;
6180           *)
6181             ;;
6182         esac
6183         ;;
6184       psos*)
6185         ;;
6186       solaris*)
6187         case $cc_basename in
6188           CC* | sunCC*)
6189             # Sun C++ 4.2, 5.x and Centerline C++
6190             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6191             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6192             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6193             ;;
6194           gcx*)
6195             # Green Hills C++ Compiler
6196             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6197             ;;
6198           *)
6199             ;;
6200         esac
6201         ;;
6202       sunos4*)
6203         case $cc_basename in
6204           CC*)
6205             # Sun C++ 4.x
6206             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6207             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6208             ;;
6209           lcc*)
6210             # Lucid
6211             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6212             ;;
6213           *)
6214             ;;
6215         esac
6216         ;;
6217       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6218         case $cc_basename in
6219           CC*)
6220             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6221             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6222             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6223             ;;
6224         esac
6225         ;;
6226       tandem*)
6227         case $cc_basename in
6228           NCC*)
6229             # NonStop-UX NCC 3.20
6230             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6231             ;;
6232           *)
6233             ;;
6234         esac
6235         ;;
6236       vxworks*)
6237         ;;
6238       *)
6239         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6240         ;;
6241     esac
6242   fi
6243 ],
6244 [
6245   if test "$GCC" = yes; then
6246     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6247     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6248
6249     case $host_os in
6250       aix*)
6251       # All AIX code is PIC.
6252       if test "$host_cpu" = ia64; then
6253         # AIX 5 now supports IA64 processor
6254         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6255       fi
6256       ;;
6257
6258     amigaos*)
6259       case $host_cpu in
6260       powerpc)
6261             # see comment about AmigaOS4 .so support
6262             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6263         ;;
6264       m68k)
6265             # FIXME: we need at least 68020 code to build shared libraries, but
6266             # adding the `-m68020' flag to GCC prevents building anything better,
6267             # like `-m68040'.
6268             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6269         ;;
6270       esac
6271       ;;
6272
6273     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6274       # PIC is the default for these OSes.
6275       ;;
6276
6277     mingw* | cygwin* | pw32* | os2* | cegcc*)
6278       # This hack is so that the source file can tell whether it is being
6279       # built for inclusion in a dll (and should export symbols for example).
6280       # Although the cygwin gcc ignores -fPIC, still need this for old-style
6281       # (--disable-auto-import) libraries
6282       m4_if([$1], [GCJ], [],
6283         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6284       ;;
6285
6286     darwin* | rhapsody*)
6287       # PIC is the default on this platform
6288       # Common symbols not allowed in MH_DYLIB files
6289       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6290       ;;
6291
6292     haiku*)
6293       # PIC is the default for Haiku.
6294       # The "-static" flag exists, but is broken.
6295       _LT_TAGVAR(lt_prog_compiler_static, $1)=
6296       ;;
6297
6298     hpux*)
6299       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6300       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6301       # sets the default TLS model and affects inlining.
6302       case $host_cpu in
6303       hppa*64*)
6304         # +Z the default
6305         ;;
6306       *)
6307         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6308         ;;
6309       esac
6310       ;;
6311
6312     interix[[3-9]]*)
6313       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6314       # Instead, we relocate shared libraries at runtime.
6315       ;;
6316
6317     msdosdjgpp*)
6318       # Just because we use GCC doesn't mean we suddenly get shared libraries
6319       # on systems that don't support them.
6320       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6321       enable_shared=no
6322       ;;
6323
6324     *nto* | *qnx*)
6325       # QNX uses GNU C++, but need to define -shared option too, otherwise
6326       # it will coredump.
6327       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6328       ;;
6329
6330     sysv4*MP*)
6331       if test -d /usr/nec; then
6332         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6333       fi
6334       ;;
6335
6336     *)
6337       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6338       ;;
6339     esac
6340
6341     case $cc_basename in
6342     nvcc*) # Cuda Compiler Driver 2.2
6343       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6344       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
6345       ;;
6346     esac
6347   else
6348     # PORTME Check for flag to pass linker flags through the system compiler.
6349     case $host_os in
6350     aix*)
6351       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6352       if test "$host_cpu" = ia64; then
6353         # AIX 5 now supports IA64 processor
6354         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6355       else
6356         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6357       fi
6358       ;;
6359
6360     mingw* | cygwin* | pw32* | os2* | cegcc*)
6361       # This hack is so that the source file can tell whether it is being
6362       # built for inclusion in a dll (and should export symbols for example).
6363       m4_if([$1], [GCJ], [],
6364         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6365       ;;
6366
6367     hpux9* | hpux10* | hpux11*)
6368       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6369       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6370       # not for PA HP-UX.
6371       case $host_cpu in
6372       hppa*64*|ia64*)
6373         # +Z the default
6374         ;;
6375       *)
6376         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6377         ;;
6378       esac
6379       # Is there a better lt_prog_compiler_static that works with the bundled CC?
6380       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6381       ;;
6382
6383     irix5* | irix6* | nonstopux*)
6384       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6385       # PIC (with -KPIC) is the default.
6386       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6387       ;;
6388
6389     linux* | k*bsd*-gnu | kopensolaris*-gnu)
6390       case $cc_basename in
6391       # old Intel for x86_64 which still supported -KPIC.
6392       ecc*)
6393         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6394         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6395         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6396         ;;
6397       # icc used to be incompatible with GCC.
6398       # ICC 10 doesn't accept -KPIC any more.
6399       icc* | ifort*)
6400         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6401         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6402         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6403         ;;
6404       # Lahey Fortran 8.1.
6405       lf95*)
6406         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6407         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6408         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6409         ;;
6410       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6411         # Portland Group compilers (*not* the Pentium gcc compiler,
6412         # which looks to be a dead project)
6413         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6414         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6415         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6416         ;;
6417       ccc*)
6418         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6419         # All Alpha code is PIC.
6420         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6421         ;;
6422       xl* | bgxl* | bgf* | mpixl*)
6423         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6424         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6425         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6426         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6427         ;;
6428       *)
6429         case `$CC -V 2>&1 | sed 5q` in
6430         *Sun\ F* | *Sun*Fortran*)
6431           # Sun Fortran 8.3 passes all unrecognized flags to the linker
6432           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6433           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6434           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6435           ;;
6436         *Sun\ C*)
6437           # Sun C 5.9
6438           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6439           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6440           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6441           ;;
6442         esac
6443         ;;
6444       esac
6445       ;;
6446
6447     newsos6)
6448       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6449       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6450       ;;
6451
6452     *nto* | *qnx*)
6453       # QNX uses GNU C++, but need to define -shared option too, otherwise
6454       # it will coredump.
6455       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6456       ;;
6457
6458     osf3* | osf4* | osf5*)
6459       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6460       # All OSF/1 code is PIC.
6461       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6462       ;;
6463
6464     rdos*)
6465       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6466       ;;
6467
6468     solaris*)
6469       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6470       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6471       case $cc_basename in
6472       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6473         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6474       *)
6475         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6476       esac
6477       ;;
6478
6479     sunos4*)
6480       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6481       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6482       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6483       ;;
6484
6485     sysv4 | sysv4.2uw2* | sysv4.3*)
6486       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6487       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6488       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6489       ;;
6490
6491     sysv4*MP*)
6492       if test -d /usr/nec ;then
6493         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6494         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6495       fi
6496       ;;
6497
6498     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6499       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6500       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6501       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6502       ;;
6503
6504     unicos*)
6505       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6506       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6507       ;;
6508
6509     uts4*)
6510       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6511       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6512       ;;
6513
6514     *)
6515       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6516       ;;
6517     esac
6518   fi
6519 ])
6520 case $host_os in
6521   # For platforms which do not support PIC, -DPIC is meaningless:
6522   *djgpp*)
6523     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6524     ;;
6525   *)
6526     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6527     ;;
6528 esac
6529 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6530 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6531         [How to pass a linker flag through the compiler])
6532
6533 #
6534 # Check to make sure the PIC flag actually works.
6535 #
6536 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6537   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6538     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6539     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6540     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6541      "" | " "*) ;;
6542      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6543      esac],
6544     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6545      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6546 fi
6547 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6548         [Additional compiler flags for building library objects])
6549
6550 #
6551 # Check to make sure the static flag actually works.
6552 #
6553 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6554 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6555   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6556   $lt_tmp_static_flag,
6557   [],
6558   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6559 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6560         [Compiler flag to prevent dynamic linking])
6561 ])# _LT_COMPILER_PIC
6562
6563
6564 # _LT_LINKER_SHLIBS([TAGNAME])
6565 # ----------------------------
6566 # See if the linker supports building shared libraries.
6567 m4_defun([_LT_LINKER_SHLIBS],
6568 [AC_REQUIRE([LT_PATH_LD])dnl
6569 AC_REQUIRE([LT_PATH_NM])dnl
6570 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6571 m4_require([_LT_DECL_EGREP])dnl
6572 m4_require([_LT_DECL_SED])dnl
6573 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6574 m4_require([_LT_TAG_COMPILER])dnl
6575 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6576 m4_if([$1], [CXX], [
6577   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6578   case $host_os in
6579   aix[[4-9]]*)
6580     # If we're using GNU nm, then we don't want the "-C" option.
6581     # -C means demangle to AIX nm, but means don't demangle with GNU nm
6582     # Also, AIX nm treats weak defined symbols like other global defined
6583     # symbols, whereas GNU nm marks them as "W".
6584     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6585       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6586     else
6587       _LT_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'
6588     fi
6589     ;;
6590   pw32*)
6591     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6592   ;;
6593   cygwin* | mingw* | cegcc*)
6594     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
6595   ;;
6596   *)
6597     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6598   ;;
6599   esac
6600   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6601 ], [
6602   runpath_var=
6603   _LT_TAGVAR(allow_undefined_flag, $1)=
6604   _LT_TAGVAR(always_export_symbols, $1)=no
6605   _LT_TAGVAR(archive_cmds, $1)=
6606   _LT_TAGVAR(archive_expsym_cmds, $1)=
6607   _LT_TAGVAR(compiler_needs_object, $1)=no
6608   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6609   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6610   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6611   _LT_TAGVAR(hardcode_automatic, $1)=no
6612   _LT_TAGVAR(hardcode_direct, $1)=no
6613   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6614   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6615   _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6616   _LT_TAGVAR(hardcode_libdir_separator, $1)=
6617   _LT_TAGVAR(hardcode_minus_L, $1)=no
6618   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6619   _LT_TAGVAR(inherit_rpath, $1)=no
6620   _LT_TAGVAR(link_all_deplibs, $1)=unknown
6621   _LT_TAGVAR(module_cmds, $1)=
6622   _LT_TAGVAR(module_expsym_cmds, $1)=
6623   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6624   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6625   _LT_TAGVAR(thread_safe_flag_spec, $1)=
6626   _LT_TAGVAR(whole_archive_flag_spec, $1)=
6627   # include_expsyms should be a list of space-separated symbols to be *always*
6628   # included in the symbol list
6629   _LT_TAGVAR(include_expsyms, $1)=
6630   # exclude_expsyms can be an extended regexp of symbols to exclude
6631   # it will be wrapped by ` (' and `)$', so one must not match beginning or
6632   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6633   # as well as any symbol that contains `d'.
6634   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6635   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6636   # platforms (ab)use it in PIC code, but their linkers get confused if
6637   # the symbol is explicitly referenced.  Since portable code cannot
6638   # rely on this symbol name, it's probably fine to never include it in
6639   # preloaded symbol tables.
6640   # Exclude shared library initialization/finalization symbols.
6641 dnl Note also adjust exclude_expsyms for C++ above.
6642   extract_expsyms_cmds=
6643
6644   case $host_os in
6645   cygwin* | mingw* | pw32* | cegcc*)
6646     # FIXME: the MSVC++ port hasn't been tested in a loooong time
6647     # When not using gcc, we currently assume that we are using
6648     # Microsoft Visual C++.
6649     if test "$GCC" != yes; then
6650       with_gnu_ld=no
6651     fi
6652     ;;
6653   interix*)
6654     # we just hope/assume this is gcc and not c89 (= MSVC++)
6655     with_gnu_ld=yes
6656     ;;
6657   openbsd*)
6658     with_gnu_ld=no
6659     ;;
6660   esac
6661
6662   _LT_TAGVAR(ld_shlibs, $1)=yes
6663
6664   # On some targets, GNU ld is compatible enough with the native linker
6665   # that we're better off using the native interface for both.
6666   lt_use_gnu_ld_interface=no
6667   if test "$with_gnu_ld" = yes; then
6668     case $host_os in
6669       aix*)
6670         # The AIX port of GNU ld has always aspired to compatibility
6671         # with the native linker.  However, as the warning in the GNU ld
6672         # block says, versions before 2.19.5* couldn't really create working
6673         # shared libraries, regardless of the interface used.
6674         case `$LD -v 2>&1` in
6675           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
6676           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
6677           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
6678           *)
6679             lt_use_gnu_ld_interface=yes
6680             ;;
6681         esac
6682         ;;
6683       *)
6684         lt_use_gnu_ld_interface=yes
6685         ;;
6686     esac
6687   fi
6688
6689   if test "$lt_use_gnu_ld_interface" = yes; then
6690     # If archive_cmds runs LD, not CC, wlarc should be empty
6691     wlarc='${wl}'
6692
6693     # Set some defaults for GNU ld with shared library support. These
6694     # are reset later if shared libraries are not supported. Putting them
6695     # here allows them to be overridden if necessary.
6696     runpath_var=LD_RUN_PATH
6697     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6698     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6699     # ancient GNU ld didn't support --whole-archive et. al.
6700     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6701       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6702     else
6703       _LT_TAGVAR(whole_archive_flag_spec, $1)=
6704     fi
6705     supports_anon_versioning=no
6706     case `$LD -v 2>&1` in
6707       *GNU\ gold*) supports_anon_versioning=yes ;;
6708       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6709       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6710       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6711       *\ 2.11.*) ;; # other 2.11 versions
6712       *) supports_anon_versioning=yes ;;
6713     esac
6714
6715     # See if GNU ld supports shared libraries.
6716     case $host_os in
6717     aix[[3-9]]*)
6718       # On AIX/PPC, the GNU linker is very broken
6719       if test "$host_cpu" != ia64; then
6720         _LT_TAGVAR(ld_shlibs, $1)=no
6721         cat <<_LT_EOF 1>&2
6722
6723 *** Warning: the GNU linker, at least up to release 2.19, is reported
6724 *** to be unable to reliably create shared libraries on AIX.
6725 *** Therefore, libtool is disabling shared libraries support.  If you
6726 *** really care for shared libraries, you may want to install binutils
6727 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6728 *** You will then need to restart the configuration process.
6729
6730 _LT_EOF
6731       fi
6732       ;;
6733
6734     amigaos*)
6735       case $host_cpu in
6736       powerpc)
6737             # see comment about AmigaOS4 .so support
6738             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6739             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6740         ;;
6741       m68k)
6742             _LT_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)'
6743             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6744             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6745         ;;
6746       esac
6747       ;;
6748
6749     beos*)
6750       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6751         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6752         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6753         # support --undefined.  This deserves some investigation.  FIXME
6754         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6755       else
6756         _LT_TAGVAR(ld_shlibs, $1)=no
6757       fi
6758       ;;
6759
6760     cygwin* | mingw* | pw32* | cegcc*)
6761       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6762       # as there is no search path for DLLs.
6763       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6764       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6765       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6766       _LT_TAGVAR(always_export_symbols, $1)=no
6767       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6768       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
6769
6770       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6771         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6772         # If the export-symbols file already is a .def file (1st line
6773         # is EXPORTS), use it as is; otherwise, prepend...
6774         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6775           cp $export_symbols $output_objdir/$soname.def;
6776         else
6777           echo EXPORTS > $output_objdir/$soname.def;
6778           cat $export_symbols >> $output_objdir/$soname.def;
6779         fi~
6780         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6781       else
6782         _LT_TAGVAR(ld_shlibs, $1)=no
6783       fi
6784       ;;
6785
6786     haiku*)
6787       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6788       _LT_TAGVAR(link_all_deplibs, $1)=yes
6789       ;;
6790
6791     interix[[3-9]]*)
6792       _LT_TAGVAR(hardcode_direct, $1)=no
6793       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6794       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6795       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6796       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6797       # Instead, shared libraries are loaded at an image base (0x10000000 by
6798       # default) and relocated if they conflict, which is a slow very memory
6799       # consuming and fragmenting process.  To avoid this, we pick a random,
6800       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6801       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6802       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6803       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6804       ;;
6805
6806     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6807       tmp_diet=no
6808       if test "$host_os" = linux-dietlibc; then
6809         case $cc_basename in
6810           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
6811         esac
6812       fi
6813       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6814          && test "$tmp_diet" = no
6815       then
6816         tmp_addflag=
6817         tmp_sharedflag='-shared'
6818         case $cc_basename,$host_cpu in
6819         pgcc*)                          # Portland Group C compiler
6820           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6821           tmp_addflag=' $pic_flag'
6822           ;;
6823         pgf77* | pgf90* | pgf95* | pgfortran*)
6824                                         # Portland Group f77 and f90 compilers
6825           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6826           tmp_addflag=' $pic_flag -Mnomain' ;;
6827         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
6828           tmp_addflag=' -i_dynamic' ;;
6829         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
6830           tmp_addflag=' -i_dynamic -nofor_main' ;;
6831         ifc* | ifort*)                  # Intel Fortran compiler
6832           tmp_addflag=' -nofor_main' ;;
6833         lf95*)                          # Lahey Fortran 8.1
6834           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6835           tmp_sharedflag='--shared' ;;
6836         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6837           tmp_sharedflag='-qmkshrobj'
6838           tmp_addflag= ;;
6839         nvcc*)  # Cuda Compiler Driver 2.2
6840           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6841           _LT_TAGVAR(compiler_needs_object, $1)=yes
6842           ;;
6843         esac
6844         case `$CC -V 2>&1 | sed 5q` in
6845         *Sun\ C*)                       # Sun C 5.9
6846           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6847           _LT_TAGVAR(compiler_needs_object, $1)=yes
6848           tmp_sharedflag='-G' ;;
6849         *Sun\ F*)                       # Sun Fortran 8.3
6850           tmp_sharedflag='-G' ;;
6851         esac
6852         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6853
6854         if test "x$supports_anon_versioning" = xyes; then
6855           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6856             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6857             echo "local: *; };" >> $output_objdir/$libname.ver~
6858             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6859         fi
6860
6861         case $cc_basename in
6862         xlf* | bgf* | bgxlf* | mpixlf*)
6863           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6864           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6865           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6866           _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6867           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6868           if test "x$supports_anon_versioning" = xyes; then
6869             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6870               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6871               echo "local: *; };" >> $output_objdir/$libname.ver~
6872               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6873           fi
6874           ;;
6875         esac
6876       else
6877         _LT_TAGVAR(ld_shlibs, $1)=no
6878       fi
6879       ;;
6880
6881     netbsd*)
6882       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6883         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6884         wlarc=
6885       else
6886         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6887         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6888       fi
6889       ;;
6890
6891     solaris*)
6892       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6893         _LT_TAGVAR(ld_shlibs, $1)=no
6894         cat <<_LT_EOF 1>&2
6895
6896 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6897 *** create shared libraries on Solaris systems.  Therefore, libtool
6898 *** is disabling shared libraries support.  We urge you to upgrade GNU
6899 *** binutils to release 2.9.1 or newer.  Another option is to modify
6900 *** your PATH or compiler configuration so that the native linker is
6901 *** used, and then restart.
6902
6903 _LT_EOF
6904       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6905         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6906         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6907       else
6908         _LT_TAGVAR(ld_shlibs, $1)=no
6909       fi
6910       ;;
6911
6912     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6913       case `$LD -v 2>&1` in
6914         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6915         _LT_TAGVAR(ld_shlibs, $1)=no
6916         cat <<_LT_EOF 1>&2
6917
6918 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6919 *** reliably create shared libraries on SCO systems.  Therefore, libtool
6920 *** is disabling shared libraries support.  We urge you to upgrade GNU
6921 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6922 *** your PATH or compiler configuration so that the native linker is
6923 *** used, and then restart.
6924
6925 _LT_EOF
6926         ;;
6927         *)
6928           # For security reasons, it is highly recommended that you always
6929           # use absolute paths for naming shared libraries, and exclude the
6930           # DT_RUNPATH tag from executables and libraries.  But doing so
6931           # requires that you compile everything twice, which is a pain.
6932           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6933             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6934             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6935             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6936           else
6937             _LT_TAGVAR(ld_shlibs, $1)=no
6938           fi
6939         ;;
6940       esac
6941       ;;
6942
6943     sunos4*)
6944       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6945       wlarc=
6946       _LT_TAGVAR(hardcode_direct, $1)=yes
6947       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6948       ;;
6949
6950     *)
6951       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6952         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6953         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6954       else
6955         _LT_TAGVAR(ld_shlibs, $1)=no
6956       fi
6957       ;;
6958     esac
6959
6960     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6961       runpath_var=
6962       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6963       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6964       _LT_TAGVAR(whole_archive_flag_spec, $1)=
6965     fi
6966   else
6967     # PORTME fill in a description of your system's linker (not GNU ld)
6968     case $host_os in
6969     aix3*)
6970       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6971       _LT_TAGVAR(always_export_symbols, $1)=yes
6972       _LT_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'
6973       # Note: this linker hardcodes the directories in LIBPATH if there
6974       # are no directories specified by -L.
6975       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6976       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6977         # Neither direct hardcoding nor static linking is supported with a
6978         # broken collect2.
6979         _LT_TAGVAR(hardcode_direct, $1)=unsupported
6980       fi
6981       ;;
6982
6983     aix[[4-9]]*)
6984       if test "$host_cpu" = ia64; then
6985         # On IA64, the linker does run time linking by default, so we don't
6986         # have to do anything special.
6987         aix_use_runtimelinking=no
6988         exp_sym_flag='-Bexport'
6989         no_entry_flag=""
6990       else
6991         # If we're using GNU nm, then we don't want the "-C" option.
6992         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6993         # Also, AIX nm treats weak defined symbols like other global
6994         # defined symbols, whereas GNU nm marks them as "W".
6995         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6996           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6997         else
6998           _LT_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'
6999         fi
7000         aix_use_runtimelinking=no
7001
7002         # Test if we are trying to use run time linking or normal
7003         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7004         # need to do runtime linking.
7005         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7006           for ld_flag in $LDFLAGS; do
7007           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7008             aix_use_runtimelinking=yes
7009             break
7010           fi
7011           done
7012           ;;
7013         esac
7014
7015         exp_sym_flag='-bexport'
7016         no_entry_flag='-bnoentry'
7017       fi
7018
7019       # When large executables or shared objects are built, AIX ld can
7020       # have problems creating the table of contents.  If linking a library
7021       # or program results in "error TOC overflow" add -mminimal-toc to
7022       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7023       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7024
7025       _LT_TAGVAR(archive_cmds, $1)=''
7026       _LT_TAGVAR(hardcode_direct, $1)=yes
7027       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7028       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7029       _LT_TAGVAR(link_all_deplibs, $1)=yes
7030       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7031
7032       if test "$GCC" = yes; then
7033         case $host_os in aix4.[[012]]|aix4.[[012]].*)
7034         # We only want to do this on AIX 4.2 and lower, the check
7035         # below for broken collect2 doesn't work under 4.3+
7036           collect2name=`${CC} -print-prog-name=collect2`
7037           if test -f "$collect2name" &&
7038            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7039           then
7040           # We have reworked collect2
7041           :
7042           else
7043           # We have old collect2
7044           _LT_TAGVAR(hardcode_direct, $1)=unsupported
7045           # It fails to find uninstalled libraries when the uninstalled
7046           # path is not listed in the libpath.  Setting hardcode_minus_L
7047           # to unsupported forces relinking
7048           _LT_TAGVAR(hardcode_minus_L, $1)=yes
7049           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7050           _LT_TAGVAR(hardcode_libdir_separator, $1)=
7051           fi
7052           ;;
7053         esac
7054         shared_flag='-shared'
7055         if test "$aix_use_runtimelinking" = yes; then
7056           shared_flag="$shared_flag "'${wl}-G'
7057         fi
7058       else
7059         # not using gcc
7060         if test "$host_cpu" = ia64; then
7061         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7062         # chokes on -Wl,-G. The following line is correct:
7063           shared_flag='-G'
7064         else
7065           if test "$aix_use_runtimelinking" = yes; then
7066             shared_flag='${wl}-G'
7067           else
7068             shared_flag='${wl}-bM:SRE'
7069           fi
7070         fi
7071       fi
7072
7073       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7074       # It seems that -bexpall does not export symbols beginning with
7075       # underscore (_), so it is better to generate a list of symbols to export.
7076       _LT_TAGVAR(always_export_symbols, $1)=yes
7077       if test "$aix_use_runtimelinking" = yes; then
7078         # Warning - without using the other runtime loading flags (-brtl),
7079         # -berok will link without error, but may produce a broken library.
7080         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7081         # Determine the default libpath from the value encoded in an
7082         # empty executable.
7083         _LT_SYS_MODULE_PATH_AIX
7084         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7085         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7086       else
7087         if test "$host_cpu" = ia64; then
7088           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7089           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7090           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7091         else
7092          # Determine the default libpath from the value encoded in an
7093          # empty executable.
7094          _LT_SYS_MODULE_PATH_AIX
7095          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7096           # Warning - without using the other run time loading flags,
7097           # -berok will link without error, but may produce a broken library.
7098           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7099           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7100           if test "$with_gnu_ld" = yes; then
7101             # We only use this code for GNU lds that support --whole-archive.
7102             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7103           else
7104             # Exported symbols can be pulled into shared objects from archives
7105             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7106           fi
7107           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7108           # This is similar to how AIX traditionally builds its shared libraries.
7109           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7110         fi
7111       fi
7112       ;;
7113
7114     amigaos*)
7115       case $host_cpu in
7116       powerpc)
7117             # see comment about AmigaOS4 .so support
7118             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7119             _LT_TAGVAR(archive_expsym_cmds, $1)=''
7120         ;;
7121       m68k)
7122             _LT_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)'
7123             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7124             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7125         ;;
7126       esac
7127       ;;
7128
7129     bsdi[[45]]*)
7130       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7131       ;;
7132
7133     cygwin* | mingw* | pw32* | cegcc*)
7134       # When not using gcc, we currently assume that we are using
7135       # Microsoft Visual C++.
7136       # hardcode_libdir_flag_spec is actually meaningless, as there is
7137       # no search path for DLLs.
7138       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7139       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7140       # Tell ltmain to make .lib files, not .a files.
7141       libext=lib
7142       # Tell ltmain to make .dll files, not .so files.
7143       shrext_cmds=".dll"
7144       # FIXME: Setting linknames here is a bad hack.
7145       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7146       # The linker will automatically build a .lib file if we build a DLL.
7147       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7148       # FIXME: Should let the user specify the lib program.
7149       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7150       _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7151       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7152       ;;
7153
7154     darwin* | rhapsody*)
7155       _LT_DARWIN_LINKER_FEATURES($1)
7156       ;;
7157
7158     dgux*)
7159       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7160       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7161       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7162       ;;
7163
7164     freebsd1*)
7165       _LT_TAGVAR(ld_shlibs, $1)=no
7166       ;;
7167
7168     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7169     # support.  Future versions do this automatically, but an explicit c++rt0.o
7170     # does not break anything, and helps significantly (at the cost of a little
7171     # extra space).
7172     freebsd2.2*)
7173       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7174       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7175       _LT_TAGVAR(hardcode_direct, $1)=yes
7176       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7177       ;;
7178
7179     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7180     freebsd2*)
7181       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7182       _LT_TAGVAR(hardcode_direct, $1)=yes
7183       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7184       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7185       ;;
7186
7187     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7188     freebsd* | dragonfly*)
7189       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7190       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7191       _LT_TAGVAR(hardcode_direct, $1)=yes
7192       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7193       ;;
7194
7195     hpux9*)
7196       if test "$GCC" = yes; then
7197         _LT_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'
7198       else
7199         _LT_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'
7200       fi
7201       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7202       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7203       _LT_TAGVAR(hardcode_direct, $1)=yes
7204
7205       # hardcode_minus_L: Not really in the search PATH,
7206       # but as the default location of the library.
7207       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7208       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7209       ;;
7210
7211     hpux10*)
7212       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7213         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7214       else
7215         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7216       fi
7217       if test "$with_gnu_ld" = no; then
7218         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7219         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7220         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7221         _LT_TAGVAR(hardcode_direct, $1)=yes
7222         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7223         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7224         # hardcode_minus_L: Not really in the search PATH,
7225         # but as the default location of the library.
7226         _LT_TAGVAR(hardcode_minus_L, $1)=yes
7227       fi
7228       ;;
7229
7230     hpux11*)
7231       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7232         case $host_cpu in
7233         hppa*64*)
7234           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7235           ;;
7236         ia64*)
7237           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7238           ;;
7239         *)
7240           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7241           ;;
7242         esac
7243       else
7244         case $host_cpu in
7245         hppa*64*)
7246           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7247           ;;
7248         ia64*)
7249           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7250           ;;
7251         *)
7252         m4_if($1, [], [
7253           # Older versions of the 11.00 compiler do not understand -b yet
7254           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7255           _LT_LINKER_OPTION([if $CC understands -b],
7256             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7257             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7258             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7259           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7260           ;;
7261         esac
7262       fi
7263       if test "$with_gnu_ld" = no; then
7264         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7265         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7266
7267         case $host_cpu in
7268         hppa*64*|ia64*)
7269           _LT_TAGVAR(hardcode_direct, $1)=no
7270           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7271           ;;
7272         *)
7273           _LT_TAGVAR(hardcode_direct, $1)=yes
7274           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7275           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7276
7277           # hardcode_minus_L: Not really in the search PATH,
7278           # but as the default location of the library.
7279           _LT_TAGVAR(hardcode_minus_L, $1)=yes
7280           ;;
7281         esac
7282       fi
7283       ;;
7284
7285     irix5* | irix6* | nonstopux*)
7286       if test "$GCC" = yes; then
7287         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7288         # Try to use the -exported_symbol ld option, if it does not
7289         # work, assume that -exports_file does not work either and
7290         # implicitly export all symbols.
7291         save_LDFLAGS="$LDFLAGS"
7292         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7293         AC_LINK_IFELSE(int foo(void) {},
7294           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
7295         )
7296         LDFLAGS="$save_LDFLAGS"
7297       else
7298         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7299         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
7300       fi
7301       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7302       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7303       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7304       _LT_TAGVAR(inherit_rpath, $1)=yes
7305       _LT_TAGVAR(link_all_deplibs, $1)=yes
7306       ;;
7307
7308     netbsd*)
7309       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7310         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7311       else
7312         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7313       fi
7314       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7315       _LT_TAGVAR(hardcode_direct, $1)=yes
7316       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7317       ;;
7318
7319     newsos6)
7320       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7321       _LT_TAGVAR(hardcode_direct, $1)=yes
7322       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7323       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7324       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7325       ;;
7326
7327     *nto* | *qnx*)
7328       ;;
7329
7330     openbsd*)
7331       if test -f /usr/libexec/ld.so; then
7332         _LT_TAGVAR(hardcode_direct, $1)=yes
7333         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7334         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7335         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7336           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7337           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7338           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7339           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7340         else
7341           case $host_os in
7342            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7343              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7344              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7345              ;;
7346            *)
7347              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7348              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7349              ;;
7350           esac
7351         fi
7352       else
7353         _LT_TAGVAR(ld_shlibs, $1)=no
7354       fi
7355       ;;
7356
7357     os2*)
7358       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7359       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7360       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7361       _LT_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'
7362       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7363       ;;
7364
7365     osf3*)
7366       if test "$GCC" = yes; then
7367         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7368         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7369       else
7370         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7371         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7372       fi
7373       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7374       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7375       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7376       ;;
7377
7378     osf4* | osf5*)      # as osf3* with the addition of -msym flag
7379       if test "$GCC" = yes; then
7380         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7381         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7382         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7383       else
7384         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7385         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7386         _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
7387         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
7388
7389         # Both c and cxx compiler support -rpath directly
7390         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7391       fi
7392       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7393       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7394       ;;
7395
7396     solaris*)
7397       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7398       if test "$GCC" = yes; then
7399         wlarc='${wl}'
7400         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7401         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7402           $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7403       else
7404         case `$CC -V 2>&1` in
7405         *"Compilers 5.0"*)
7406           wlarc=''
7407           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7408           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7409           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7410           ;;
7411         *)
7412           wlarc='${wl}'
7413           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7414           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7415           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7416           ;;
7417         esac
7418       fi
7419       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7420       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7421       case $host_os in
7422       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7423       *)
7424         # The compiler driver will combine and reorder linker options,
7425         # but understands `-z linker_flag'.  GCC discards it without `$wl',
7426         # but is careful enough not to reorder.
7427         # Supported since Solaris 2.6 (maybe 2.5.1?)
7428         if test "$GCC" = yes; then
7429           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7430         else
7431           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7432         fi
7433         ;;
7434       esac
7435       _LT_TAGVAR(link_all_deplibs, $1)=yes
7436       ;;
7437
7438     sunos4*)
7439       if test "x$host_vendor" = xsequent; then
7440         # Use $CC to link under sequent, because it throws in some extra .o
7441         # files that make .init and .fini sections work.
7442         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7443       else
7444         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7445       fi
7446       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7447       _LT_TAGVAR(hardcode_direct, $1)=yes
7448       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7449       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7450       ;;
7451
7452     sysv4)
7453       case $host_vendor in
7454         sni)
7455           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7456           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7457         ;;
7458         siemens)
7459           ## LD is ld it makes a PLAMLIB
7460           ## CC just makes a GrossModule.
7461           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7462           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7463           _LT_TAGVAR(hardcode_direct, $1)=no
7464         ;;
7465         motorola)
7466           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7467           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7468         ;;
7469       esac
7470       runpath_var='LD_RUN_PATH'
7471       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7472       ;;
7473
7474     sysv4.3*)
7475       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7476       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7477       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7478       ;;
7479
7480     sysv4*MP*)
7481       if test -d /usr/nec; then
7482         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7483         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7484         runpath_var=LD_RUN_PATH
7485         hardcode_runpath_var=yes
7486         _LT_TAGVAR(ld_shlibs, $1)=yes
7487       fi
7488       ;;
7489
7490     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7491       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7492       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7493       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7494       runpath_var='LD_RUN_PATH'
7495
7496       if test "$GCC" = yes; then
7497         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7498         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7499       else
7500         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7501         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7502       fi
7503       ;;
7504
7505     sysv5* | sco3.2v5* | sco5v6*)
7506       # Note: We can NOT use -z defs as we might desire, because we do not
7507       # link with -lc, and that would cause any symbols used from libc to
7508       # always be unresolved, which means just about no library would
7509       # ever link correctly.  If we're not using GNU ld we use -z text
7510       # though, which does catch some bad symbols but isn't as heavy-handed
7511       # as -z defs.
7512       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7513       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7514       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7515       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7516       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7517       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7518       _LT_TAGVAR(link_all_deplibs, $1)=yes
7519       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7520       runpath_var='LD_RUN_PATH'
7521
7522       if test "$GCC" = yes; then
7523         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7524         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7525       else
7526         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7527         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7528       fi
7529       ;;
7530
7531     uts4*)
7532       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7533       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7534       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7535       ;;
7536
7537     *)
7538       _LT_TAGVAR(ld_shlibs, $1)=no
7539       ;;
7540     esac
7541
7542     if test x$host_vendor = xsni; then
7543       case $host in
7544       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7545         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7546         ;;
7547       esac
7548     fi
7549   fi
7550 ])
7551 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7552 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7553
7554 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7555
7556 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7557 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7558 _LT_DECL([], [extract_expsyms_cmds], [2],
7559     [The commands to extract the exported symbol list from a shared archive])
7560
7561 #
7562 # Do we need to explicitly link libc?
7563 #
7564 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7565 x|xyes)
7566   # Assume -lc should be added
7567   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7568
7569   if test "$enable_shared" = yes && test "$GCC" = yes; then
7570     case $_LT_TAGVAR(archive_cmds, $1) in
7571     *'~'*)
7572       # FIXME: we may have to deal with multi-command sequences.
7573       ;;
7574     '$CC '*)
7575       # Test whether the compiler implicitly links with -lc since on some
7576       # systems, -lgcc has to come before -lc. If gcc already passes -lc
7577       # to ld, don't add -lc before -lgcc.
7578       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
7579         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
7580         [$RM conftest*
7581         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7582
7583         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7584           soname=conftest
7585           lib=conftest
7586           libobjs=conftest.$ac_objext
7587           deplibs=
7588           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7589           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7590           compiler_flags=-v
7591           linker_flags=-v
7592           verstring=
7593           output_objdir=.
7594           libname=conftest
7595           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7596           _LT_TAGVAR(allow_undefined_flag, $1)=
7597           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7598           then
7599             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7600           else
7601             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7602           fi
7603           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7604         else
7605           cat conftest.err 1>&5
7606         fi
7607         $RM conftest*
7608         ])
7609       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
7610       ;;
7611     esac
7612   fi
7613   ;;
7614 esac
7615
7616 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7617     [Whether or not to add -lc for building shared libraries])
7618 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7619     [enable_shared_with_static_runtimes], [0],
7620     [Whether or not to disallow shared libs when runtime libs are static])
7621 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7622     [Compiler flag to allow reflexive dlopens])
7623 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
7624     [Compiler flag to generate shared objects directly from archives])
7625 _LT_TAGDECL([], [compiler_needs_object], [1],
7626     [Whether the compiler copes with passing no objects directly])
7627 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7628     [Create an old-style archive from a shared archive])
7629 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7630     [Create a temporary old-style archive to link instead of a shared archive])
7631 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7632 _LT_TAGDECL([], [archive_expsym_cmds], [2])
7633 _LT_TAGDECL([], [module_cmds], [2],
7634     [Commands used to build a loadable module if different from building
7635     a shared archive.])
7636 _LT_TAGDECL([], [module_expsym_cmds], [2])
7637 _LT_TAGDECL([], [with_gnu_ld], [1],
7638     [Whether we are building with GNU ld or not])
7639 _LT_TAGDECL([], [allow_undefined_flag], [1],
7640     [Flag that allows shared libraries with undefined symbols to be built])
7641 _LT_TAGDECL([], [no_undefined_flag], [1],
7642     [Flag that enforces no undefined symbols])
7643 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7644     [Flag to hardcode $libdir into a binary during linking.
7645     This must work even if $libdir does not exist])
7646 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7647     [[If ld is used when linking, flag to hardcode $libdir into a binary
7648     during linking.  This must work even if $libdir does not exist]])
7649 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
7650     [Whether we need a single "-rpath" flag with a separated argument])
7651 _LT_TAGDECL([], [hardcode_direct], [0],
7652     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7653     DIR into the resulting binary])
7654 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
7655     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7656     DIR into the resulting binary and the resulting library dependency is
7657     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7658     library is relocated])
7659 _LT_TAGDECL([], [hardcode_minus_L], [0],
7660     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7661     into the resulting binary])
7662 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7663     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7664     into the resulting binary])
7665 _LT_TAGDECL([], [hardcode_automatic], [0],
7666     [Set to "yes" if building a shared library automatically hardcodes DIR
7667     into the library and all subsequent libraries and executables linked
7668     against it])
7669 _LT_TAGDECL([], [inherit_rpath], [0],
7670     [Set to yes if linker adds runtime paths of dependent libraries
7671     to runtime path list])
7672 _LT_TAGDECL([], [link_all_deplibs], [0],
7673     [Whether libtool must link a program against all its dependency libraries])
7674 _LT_TAGDECL([], [fix_srcfile_path], [1],
7675     [Fix the shell variable $srcfile for the compiler])
7676 _LT_TAGDECL([], [always_export_symbols], [0],
7677     [Set to "yes" if exported symbols are required])
7678 _LT_TAGDECL([], [export_symbols_cmds], [2],
7679     [The commands to list exported symbols])
7680 _LT_TAGDECL([], [exclude_expsyms], [1],
7681     [Symbols that should not be listed in the preloaded symbols])
7682 _LT_TAGDECL([], [include_expsyms], [1],
7683     [Symbols that must always be exported])
7684 _LT_TAGDECL([], [prelink_cmds], [2],
7685     [Commands necessary for linking programs (against libraries) with templates])
7686 _LT_TAGDECL([], [file_list_spec], [1],
7687     [Specify filename containing input files])
7688 dnl FIXME: Not yet implemented
7689 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7690 dnl    [Compiler flag to generate thread safe objects])
7691 ])# _LT_LINKER_SHLIBS
7692
7693
7694 # _LT_LANG_C_CONFIG([TAG])
7695 # ------------------------
7696 # Ensure that the configuration variables for a C compiler are suitably
7697 # defined.  These variables are subsequently used by _LT_CONFIG to write
7698 # the compiler configuration to `libtool'.
7699 m4_defun([_LT_LANG_C_CONFIG],
7700 [m4_require([_LT_DECL_EGREP])dnl
7701 lt_save_CC="$CC"
7702 AC_LANG_PUSH(C)
7703
7704 # Source file extension for C test sources.
7705 ac_ext=c
7706
7707 # Object file extension for compiled C test sources.
7708 objext=o
7709 _LT_TAGVAR(objext, $1)=$objext
7710
7711 # Code to be used in simple compile tests
7712 lt_simple_compile_test_code="int some_variable = 0;"
7713
7714 # Code to be used in simple link tests
7715 lt_simple_link_test_code='int main(){return(0);}'
7716
7717 _LT_TAG_COMPILER
7718 # Save the default compiler, since it gets overwritten when the other
7719 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7720 compiler_DEFAULT=$CC
7721
7722 # save warnings/boilerplate of simple test code
7723 _LT_COMPILER_BOILERPLATE
7724 _LT_LINKER_BOILERPLATE
7725
7726 if test -n "$compiler"; then
7727   _LT_COMPILER_NO_RTTI($1)
7728   _LT_COMPILER_PIC($1)
7729   _LT_COMPILER_C_O($1)
7730   _LT_COMPILER_FILE_LOCKS($1)
7731   _LT_LINKER_SHLIBS($1)
7732   _LT_SYS_DYNAMIC_LINKER($1)
7733   _LT_LINKER_HARDCODE_LIBPATH($1)
7734   LT_SYS_DLOPEN_SELF
7735   _LT_CMD_STRIPLIB
7736
7737   # Report which library types will actually be built
7738   AC_MSG_CHECKING([if libtool supports shared libraries])
7739   AC_MSG_RESULT([$can_build_shared])
7740
7741   AC_MSG_CHECKING([whether to build shared libraries])
7742   test "$can_build_shared" = "no" && enable_shared=no
7743
7744   # On AIX, shared libraries and static libraries use the same namespace, and
7745   # are all built from PIC.
7746   case $host_os in
7747   aix3*)
7748     test "$enable_shared" = yes && enable_static=no
7749     if test -n "$RANLIB"; then
7750       archive_cmds="$archive_cmds~\$RANLIB \$lib"
7751       postinstall_cmds='$RANLIB $lib'
7752     fi
7753     ;;
7754
7755   aix[[4-9]]*)
7756     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7757       test "$enable_shared" = yes && enable_static=no
7758     fi
7759     ;;
7760   esac
7761   AC_MSG_RESULT([$enable_shared])
7762
7763   AC_MSG_CHECKING([whether to build static libraries])
7764   # Make sure either enable_shared or enable_static is yes.
7765   test "$enable_shared" = yes || enable_static=yes
7766   AC_MSG_RESULT([$enable_static])
7767
7768   _LT_CONFIG($1)
7769 fi
7770 AC_LANG_POP
7771 CC="$lt_save_CC"
7772 ])# _LT_LANG_C_CONFIG
7773
7774
7775 # _LT_LANG_CXX_CONFIG([TAG])
7776 # --------------------------
7777 # Ensure that the configuration variables for a C++ compiler are suitably
7778 # defined.  These variables are subsequently used by _LT_CONFIG to write
7779 # the compiler configuration to `libtool'.
7780 m4_defun([_LT_LANG_CXX_CONFIG],
7781 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7782 m4_require([_LT_DECL_EGREP])dnl
7783 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7784     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7785     (test "X$CXX" != "Xg++"))) ; then
7786   AC_PROG_CXXCPP
7787 else
7788   _lt_caught_CXX_error=yes
7789 fi
7790
7791 AC_LANG_PUSH(C++)
7792 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7793 _LT_TAGVAR(allow_undefined_flag, $1)=
7794 _LT_TAGVAR(always_export_symbols, $1)=no
7795 _LT_TAGVAR(archive_expsym_cmds, $1)=
7796 _LT_TAGVAR(compiler_needs_object, $1)=no
7797 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7798 _LT_TAGVAR(hardcode_direct, $1)=no
7799 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7800 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7801 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7802 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7803 _LT_TAGVAR(hardcode_minus_L, $1)=no
7804 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7805 _LT_TAGVAR(hardcode_automatic, $1)=no
7806 _LT_TAGVAR(inherit_rpath, $1)=no
7807 _LT_TAGVAR(module_cmds, $1)=
7808 _LT_TAGVAR(module_expsym_cmds, $1)=
7809 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7810 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7811 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7812 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7813 _LT_TAGVAR(no_undefined_flag, $1)=
7814 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7815 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7816
7817 # Source file extension for C++ test sources.
7818 ac_ext=cpp
7819
7820 # Object file extension for compiled C++ test sources.
7821 objext=o
7822 _LT_TAGVAR(objext, $1)=$objext
7823
7824 # No sense in running all these tests if we already determined that
7825 # the CXX compiler isn't working.  Some variables (like enable_shared)
7826 # are currently assumed to apply to all compilers on this platform,
7827 # and will be corrupted by setting them based on a non-working compiler.
7828 if test "$_lt_caught_CXX_error" != yes; then
7829   # Code to be used in simple compile tests
7830   lt_simple_compile_test_code="int some_variable = 0;"
7831
7832   # Code to be used in simple link tests
7833   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7834
7835   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7836   _LT_TAG_COMPILER
7837
7838   # save warnings/boilerplate of simple test code
7839   _LT_COMPILER_BOILERPLATE
7840   _LT_LINKER_BOILERPLATE
7841
7842   # Allow CC to be a program name with arguments.
7843   lt_save_CC=$CC
7844   lt_save_LD=$LD
7845   lt_save_GCC=$GCC
7846   GCC=$GXX
7847   lt_save_with_gnu_ld=$with_gnu_ld
7848   lt_save_path_LD=$lt_cv_path_LD
7849   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7850     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7851   else
7852     $as_unset lt_cv_prog_gnu_ld
7853   fi
7854   if test -n "${lt_cv_path_LDCXX+set}"; then
7855     lt_cv_path_LD=$lt_cv_path_LDCXX
7856   else
7857     $as_unset lt_cv_path_LD
7858   fi
7859   test -z "${LDCXX+set}" || LD=$LDCXX
7860   CC=${CXX-"c++"}
7861   compiler=$CC
7862   _LT_TAGVAR(compiler, $1)=$CC
7863   _LT_CC_BASENAME([$compiler])
7864
7865   if test -n "$compiler"; then
7866     # We don't want -fno-exception when compiling C++ code, so set the
7867     # no_builtin_flag separately
7868     if test "$GXX" = yes; then
7869       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7870     else
7871       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7872     fi
7873
7874     if test "$GXX" = yes; then
7875       # Set up default GNU C++ configuration
7876
7877       LT_PATH_LD
7878
7879       # Check if GNU C++ uses GNU ld as the underlying linker, since the
7880       # archiving commands below assume that GNU ld is being used.
7881       if test "$with_gnu_ld" = yes; then
7882         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7883         _LT_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'
7884
7885         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7886         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7887
7888         # If archive_cmds runs LD, not CC, wlarc should be empty
7889         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7890         #     investigate it a little bit more. (MM)
7891         wlarc='${wl}'
7892
7893         # ancient GNU ld didn't support --whole-archive et. al.
7894         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7895           $GREP 'no-whole-archive' > /dev/null; then
7896           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7897         else
7898           _LT_TAGVAR(whole_archive_flag_spec, $1)=
7899         fi
7900       else
7901         with_gnu_ld=no
7902         wlarc=
7903
7904         # A generic and very simple default shared library creation
7905         # command for GNU C++ for the case where it uses the native
7906         # linker, instead of GNU ld.  If possible, this setting should
7907         # overridden to take advantage of the native linker features on
7908         # the platform it is being used on.
7909         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7910       fi
7911
7912       # Commands to make compiler produce verbose output that lists
7913       # what "hidden" libraries, object files and flags are used when
7914       # linking a shared library.
7915       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7916
7917     else
7918       GXX=no
7919       with_gnu_ld=no
7920       wlarc=
7921     fi
7922
7923     # PORTME: fill in a description of your system's C++ link characteristics
7924     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7925     _LT_TAGVAR(ld_shlibs, $1)=yes
7926     case $host_os in
7927       aix3*)
7928         # FIXME: insert proper C++ library support
7929         _LT_TAGVAR(ld_shlibs, $1)=no
7930         ;;
7931       aix[[4-9]]*)
7932         if test "$host_cpu" = ia64; then
7933           # On IA64, the linker does run time linking by default, so we don't
7934           # have to do anything special.
7935           aix_use_runtimelinking=no
7936           exp_sym_flag='-Bexport'
7937           no_entry_flag=""
7938         else
7939           aix_use_runtimelinking=no
7940
7941           # Test if we are trying to use run time linking or normal
7942           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7943           # need to do runtime linking.
7944           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7945             for ld_flag in $LDFLAGS; do
7946               case $ld_flag in
7947               *-brtl*)
7948                 aix_use_runtimelinking=yes
7949                 break
7950                 ;;
7951               esac
7952             done
7953             ;;
7954           esac
7955
7956           exp_sym_flag='-bexport'
7957           no_entry_flag='-bnoentry'
7958         fi
7959
7960         # When large executables or shared objects are built, AIX ld can
7961         # have problems creating the table of contents.  If linking a library
7962         # or program results in "error TOC overflow" add -mminimal-toc to
7963         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7964         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7965
7966         _LT_TAGVAR(archive_cmds, $1)=''
7967         _LT_TAGVAR(hardcode_direct, $1)=yes
7968         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7969         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7970         _LT_TAGVAR(link_all_deplibs, $1)=yes
7971         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7972
7973         if test "$GXX" = yes; then
7974           case $host_os in aix4.[[012]]|aix4.[[012]].*)
7975           # We only want to do this on AIX 4.2 and lower, the check
7976           # below for broken collect2 doesn't work under 4.3+
7977           collect2name=`${CC} -print-prog-name=collect2`
7978           if test -f "$collect2name" &&
7979              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7980           then
7981             # We have reworked collect2
7982             :
7983           else
7984             # We have old collect2
7985             _LT_TAGVAR(hardcode_direct, $1)=unsupported
7986             # It fails to find uninstalled libraries when the uninstalled
7987             # path is not listed in the libpath.  Setting hardcode_minus_L
7988             # to unsupported forces relinking
7989             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7990             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7991             _LT_TAGVAR(hardcode_libdir_separator, $1)=
7992           fi
7993           esac
7994           shared_flag='-shared'
7995           if test "$aix_use_runtimelinking" = yes; then
7996             shared_flag="$shared_flag "'${wl}-G'
7997           fi
7998         else
7999           # not using gcc
8000           if test "$host_cpu" = ia64; then
8001           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8002           # chokes on -Wl,-G. The following line is correct:
8003           shared_flag='-G'
8004           else
8005             if test "$aix_use_runtimelinking" = yes; then
8006               shared_flag='${wl}-G'
8007             else
8008               shared_flag='${wl}-bM:SRE'
8009             fi
8010           fi
8011         fi
8012
8013         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
8014         # It seems that -bexpall does not export symbols beginning with
8015         # underscore (_), so it is better to generate a list of symbols to
8016         # export.
8017         _LT_TAGVAR(always_export_symbols, $1)=yes
8018         if test "$aix_use_runtimelinking" = yes; then
8019           # Warning - without using the other runtime loading flags (-brtl),
8020           # -berok will link without error, but may produce a broken library.
8021           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8022           # Determine the default libpath from the value encoded in an empty
8023           # executable.
8024           _LT_SYS_MODULE_PATH_AIX
8025           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8026
8027           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8028         else
8029           if test "$host_cpu" = ia64; then
8030             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8031             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8032             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
8033           else
8034             # Determine the default libpath from the value encoded in an
8035             # empty executable.
8036             _LT_SYS_MODULE_PATH_AIX
8037             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8038             # Warning - without using the other run time loading flags,
8039             # -berok will link without error, but may produce a broken library.
8040             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8041             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8042             if test "$with_gnu_ld" = yes; then
8043               # We only use this code for GNU lds that support --whole-archive.
8044               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8045             else
8046               # Exported symbols can be pulled into shared objects from archives
8047               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8048             fi
8049             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8050             # This is similar to how AIX traditionally builds its shared
8051             # libraries.
8052             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8053           fi
8054         fi
8055         ;;
8056
8057       beos*)
8058         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8059           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8060           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8061           # support --undefined.  This deserves some investigation.  FIXME
8062           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8063         else
8064           _LT_TAGVAR(ld_shlibs, $1)=no
8065         fi
8066         ;;
8067
8068       chorus*)
8069         case $cc_basename in
8070           *)
8071           # FIXME: insert proper C++ library support
8072           _LT_TAGVAR(ld_shlibs, $1)=no
8073           ;;
8074         esac
8075         ;;
8076
8077       cygwin* | mingw* | pw32* | cegcc*)
8078         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8079         # as there is no search path for DLLs.
8080         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8081         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
8082         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8083         _LT_TAGVAR(always_export_symbols, $1)=no
8084         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8085
8086         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8087           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8088           # If the export-symbols file already is a .def file (1st line
8089           # is EXPORTS), use it as is; otherwise, prepend...
8090           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8091             cp $export_symbols $output_objdir/$soname.def;
8092           else
8093             echo EXPORTS > $output_objdir/$soname.def;
8094             cat $export_symbols >> $output_objdir/$soname.def;
8095           fi~
8096           $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8097         else
8098           _LT_TAGVAR(ld_shlibs, $1)=no
8099         fi
8100         ;;
8101       darwin* | rhapsody*)
8102         _LT_DARWIN_LINKER_FEATURES($1)
8103         ;;
8104
8105       dgux*)
8106         case $cc_basename in
8107           ec++*)
8108             # FIXME: insert proper C++ library support
8109             _LT_TAGVAR(ld_shlibs, $1)=no
8110             ;;
8111           ghcx*)
8112             # Green Hills C++ Compiler
8113             # FIXME: insert proper C++ library support
8114             _LT_TAGVAR(ld_shlibs, $1)=no
8115             ;;
8116           *)
8117             # FIXME: insert proper C++ library support
8118             _LT_TAGVAR(ld_shlibs, $1)=no
8119             ;;
8120         esac
8121         ;;
8122
8123       freebsd[[12]]*)
8124         # C++ shared libraries reported to be fairly broken before
8125         # switch to ELF
8126         _LT_TAGVAR(ld_shlibs, $1)=no
8127         ;;
8128
8129       freebsd-elf*)
8130         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8131         ;;
8132
8133       freebsd* | dragonfly*)
8134         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8135         # conventions
8136         _LT_TAGVAR(ld_shlibs, $1)=yes
8137         ;;
8138
8139       gnu*)
8140         ;;
8141
8142       haiku*)
8143         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8144         _LT_TAGVAR(link_all_deplibs, $1)=yes
8145         ;;
8146
8147       hpux9*)
8148         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8149         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8150         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8151         _LT_TAGVAR(hardcode_direct, $1)=yes
8152         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8153                                              # but as the default
8154                                              # location of the library.
8155
8156         case $cc_basename in
8157           CC*)
8158             # FIXME: insert proper C++ library support
8159             _LT_TAGVAR(ld_shlibs, $1)=no
8160             ;;
8161           aCC*)
8162             _LT_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'
8163             # Commands to make compiler produce verbose output that lists
8164             # what "hidden" libraries, object files and flags are used when
8165             # linking a shared library.
8166             #
8167             # There doesn't appear to be a way to prevent this compiler from
8168             # explicitly linking system object files so we need to strip them
8169             # from the output so that they don't get included in the library
8170             # dependencies.
8171             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; func_echo_all "$list"'
8172             ;;
8173           *)
8174             if test "$GXX" = yes; then
8175               _LT_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'
8176             else
8177               # FIXME: insert proper C++ library support
8178               _LT_TAGVAR(ld_shlibs, $1)=no
8179             fi
8180             ;;
8181         esac
8182         ;;
8183
8184       hpux10*|hpux11*)
8185         if test $with_gnu_ld = no; then
8186           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8187           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8188
8189           case $host_cpu in
8190             hppa*64*|ia64*)
8191               ;;
8192             *)
8193               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8194               ;;
8195           esac
8196         fi
8197         case $host_cpu in
8198           hppa*64*|ia64*)
8199             _LT_TAGVAR(hardcode_direct, $1)=no
8200             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8201             ;;
8202           *)
8203             _LT_TAGVAR(hardcode_direct, $1)=yes
8204             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8205             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8206                                                  # but as the default
8207                                                  # location of the library.
8208             ;;
8209         esac
8210
8211         case $cc_basename in
8212           CC*)
8213             # FIXME: insert proper C++ library support
8214             _LT_TAGVAR(ld_shlibs, $1)=no
8215             ;;
8216           aCC*)
8217             case $host_cpu in
8218               hppa*64*)
8219                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8220                 ;;
8221               ia64*)
8222                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8223                 ;;
8224               *)
8225                 _LT_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'
8226                 ;;
8227             esac
8228             # Commands to make compiler produce verbose output that lists
8229             # what "hidden" libraries, object files and flags are used when
8230             # linking a shared library.
8231             #
8232             # There doesn't appear to be a way to prevent this compiler from
8233             # explicitly linking system object files so we need to strip them
8234             # from the output so that they don't get included in the library
8235             # dependencies.
8236             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; func_echo_all "$list"'
8237             ;;
8238           *)
8239             if test "$GXX" = yes; then
8240               if test $with_gnu_ld = no; then
8241                 case $host_cpu in
8242                   hppa*64*)
8243                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8244                     ;;
8245                   ia64*)
8246                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8247                     ;;
8248                   *)
8249                     _LT_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'
8250                     ;;
8251                 esac
8252               fi
8253             else
8254               # FIXME: insert proper C++ library support
8255               _LT_TAGVAR(ld_shlibs, $1)=no
8256             fi
8257             ;;
8258         esac
8259         ;;
8260
8261       interix[[3-9]]*)
8262         _LT_TAGVAR(hardcode_direct, $1)=no
8263         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8264         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8265         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8266         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8267         # Instead, shared libraries are loaded at an image base (0x10000000 by
8268         # default) and relocated if they conflict, which is a slow very memory
8269         # consuming and fragmenting process.  To avoid this, we pick a random,
8270         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8271         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8272         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8273         _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8274         ;;
8275       irix5* | irix6*)
8276         case $cc_basename in
8277           CC*)
8278             # SGI C++
8279             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8280
8281             # Archives containing C++ object files must be created using
8282             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8283             # necessary to make sure instantiated templates are included
8284             # in the archive.
8285             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8286             ;;
8287           *)
8288             if test "$GXX" = yes; then
8289               if test "$with_gnu_ld" = no; then
8290                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8291               else
8292                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
8293               fi
8294             fi
8295             _LT_TAGVAR(link_all_deplibs, $1)=yes
8296             ;;
8297         esac
8298         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8299         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8300         _LT_TAGVAR(inherit_rpath, $1)=yes
8301         ;;
8302
8303       linux* | k*bsd*-gnu | kopensolaris*-gnu)
8304         case $cc_basename in
8305           KCC*)
8306             # Kuck and Associates, Inc. (KAI) C++ Compiler
8307
8308             # KCC will only create a shared library if the output file
8309             # ends with ".so" (or ".sl" for HP-UX), so rename the library
8310             # to its proper name (with version) after linking.
8311             _LT_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'
8312             _LT_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'
8313             # Commands to make compiler produce verbose output that lists
8314             # what "hidden" libraries, object files and flags are used when
8315             # linking a shared library.
8316             #
8317             # There doesn't appear to be a way to prevent this compiler from
8318             # explicitly linking system object files so we need to strip them
8319             # from the output so that they don't get included in the library
8320             # dependencies.
8321             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; func_echo_all "$list"'
8322
8323             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8324             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8325
8326             # Archives containing C++ object files must be created using
8327             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8328             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8329             ;;
8330           icpc* | ecpc* )
8331             # Intel C++
8332             with_gnu_ld=yes
8333             # version 8.0 and above of icpc choke on multiply defined symbols
8334             # if we add $predep_objects and $postdep_objects, however 7.1 and
8335             # earlier do not add the objects themselves.
8336             case `$CC -V 2>&1` in
8337               *"Version 7."*)
8338                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8339                 _LT_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'
8340                 ;;
8341               *)  # Version 8.0 or newer
8342                 tmp_idyn=
8343                 case $host_cpu in
8344                   ia64*) tmp_idyn=' -i_dynamic';;
8345                 esac
8346                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8347                 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8348                 ;;
8349             esac
8350             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8351             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8352             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8353             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8354             ;;
8355           pgCC* | pgcpp*)
8356             # Portland Group C++ compiler
8357             case `$CC -V` in
8358             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8359               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8360                 rm -rf $tpldir~
8361                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8362                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8363               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8364                 rm -rf $tpldir~
8365                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8366                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8367                 $RANLIB $oldlib'
8368               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8369                 rm -rf $tpldir~
8370                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8371                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8372               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8373                 rm -rf $tpldir~
8374                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8375                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
8376               ;;
8377             *) # Version 6 and above use weak symbols
8378               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8379               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
8380               ;;
8381             esac
8382
8383             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8384             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8385             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8386             ;;
8387           cxx*)
8388             # Compaq C++
8389             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8390             _LT_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'
8391
8392             runpath_var=LD_RUN_PATH
8393             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8394             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8395
8396             # Commands to make compiler produce verbose output that lists
8397             # what "hidden" libraries, object files and flags are used when
8398             # linking a shared library.
8399             #
8400             # There doesn't appear to be a way to prevent this compiler from
8401             # explicitly linking system object files so we need to strip them
8402             # from the output so that they don't get included in the library
8403             # dependencies.
8404             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
8405             ;;
8406           xl* | mpixl* | bgxl*)
8407             # IBM XL 8.0 on PPC, with GNU ld
8408             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8409             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8410             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8411             if test "x$supports_anon_versioning" = xyes; then
8412               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8413                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8414                 echo "local: *; };" >> $output_objdir/$libname.ver~
8415                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8416             fi
8417             ;;
8418           *)
8419             case `$CC -V 2>&1 | sed 5q` in
8420             *Sun\ C*)
8421               # Sun C++ 5.9
8422               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8423               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8424               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
8425               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8426               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8427               _LT_TAGVAR(compiler_needs_object, $1)=yes
8428
8429               # Not sure whether something based on
8430               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8431               # would be better.
8432               output_verbose_link_cmd='func_echo_all'
8433
8434               # Archives containing C++ object files must be created using
8435               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8436               # necessary to make sure instantiated templates are included
8437               # in the archive.
8438               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8439               ;;
8440             esac
8441             ;;
8442         esac
8443         ;;
8444
8445       lynxos*)
8446         # FIXME: insert proper C++ library support
8447         _LT_TAGVAR(ld_shlibs, $1)=no
8448         ;;
8449
8450       m88k*)
8451         # FIXME: insert proper C++ library support
8452         _LT_TAGVAR(ld_shlibs, $1)=no
8453         ;;
8454
8455       mvs*)
8456         case $cc_basename in
8457           cxx*)
8458             # FIXME: insert proper C++ library support
8459             _LT_TAGVAR(ld_shlibs, $1)=no
8460             ;;
8461           *)
8462             # FIXME: insert proper C++ library support
8463             _LT_TAGVAR(ld_shlibs, $1)=no
8464             ;;
8465         esac
8466         ;;
8467
8468       netbsd*)
8469         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8470           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8471           wlarc=
8472           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8473           _LT_TAGVAR(hardcode_direct, $1)=yes
8474           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8475         fi
8476         # Workaround some broken pre-1.5 toolchains
8477         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8478         ;;
8479
8480       *nto* | *qnx*)
8481         _LT_TAGVAR(ld_shlibs, $1)=yes
8482         ;;
8483
8484       openbsd2*)
8485         # C++ shared libraries are fairly broken
8486         _LT_TAGVAR(ld_shlibs, $1)=no
8487         ;;
8488
8489       openbsd*)
8490         if test -f /usr/libexec/ld.so; then
8491           _LT_TAGVAR(hardcode_direct, $1)=yes
8492           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8493           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8494           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8495           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8496           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8497             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
8498             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8499             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8500           fi
8501           output_verbose_link_cmd=func_echo_all
8502         else
8503           _LT_TAGVAR(ld_shlibs, $1)=no
8504         fi
8505         ;;
8506
8507       osf3* | osf4* | osf5*)
8508         case $cc_basename in
8509           KCC*)
8510             # Kuck and Associates, Inc. (KAI) C++ Compiler
8511
8512             # KCC will only create a shared library if the output file
8513             # ends with ".so" (or ".sl" for HP-UX), so rename the library
8514             # to its proper name (with version) after linking.
8515             _LT_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'
8516
8517             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8518             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8519
8520             # Archives containing C++ object files must be created using
8521             # the KAI C++ compiler.
8522             case $host in
8523               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8524               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8525             esac
8526             ;;
8527           RCC*)
8528             # Rational C++ 2.4.1
8529             # FIXME: insert proper C++ library support
8530             _LT_TAGVAR(ld_shlibs, $1)=no
8531             ;;
8532           cxx*)
8533             case $host in
8534               osf3*)
8535                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8536                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8537                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8538                 ;;
8539               *)
8540                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8541                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8542                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8543                   echo "-hidden">> $lib.exp~
8544                   $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 ${output_objdir}/so_locations -o $lib~
8545                   $RM $lib.exp'
8546                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8547                 ;;
8548             esac
8549
8550             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8551
8552             # Commands to make compiler produce verbose output that lists
8553             # what "hidden" libraries, object files and flags are used when
8554             # linking a shared library.
8555             #
8556             # There doesn't appear to be a way to prevent this compiler from
8557             # explicitly linking system object files so we need to strip them
8558             # from the output so that they don't get included in the library
8559             # dependencies.
8560             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
8561             ;;
8562           *)
8563             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8564               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8565               case $host in
8566                 osf3*)
8567                   _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8568                   ;;
8569                 *)
8570                   _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8571                   ;;
8572               esac
8573
8574               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8575               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8576
8577               # Commands to make compiler produce verbose output that lists
8578               # what "hidden" libraries, object files and flags are used when
8579               # linking a shared library.
8580               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8581
8582             else
8583               # FIXME: insert proper C++ library support
8584               _LT_TAGVAR(ld_shlibs, $1)=no
8585             fi
8586             ;;
8587         esac
8588         ;;
8589
8590       psos*)
8591         # FIXME: insert proper C++ library support
8592         _LT_TAGVAR(ld_shlibs, $1)=no
8593         ;;
8594
8595       sunos4*)
8596         case $cc_basename in
8597           CC*)
8598             # Sun C++ 4.x
8599             # FIXME: insert proper C++ library support
8600             _LT_TAGVAR(ld_shlibs, $1)=no
8601             ;;
8602           lcc*)
8603             # Lucid
8604             # FIXME: insert proper C++ library support
8605             _LT_TAGVAR(ld_shlibs, $1)=no
8606             ;;
8607           *)
8608             # FIXME: insert proper C++ library support
8609             _LT_TAGVAR(ld_shlibs, $1)=no
8610             ;;
8611         esac
8612         ;;
8613
8614       solaris*)
8615         case $cc_basename in
8616           CC* | sunCC*)
8617             # Sun C++ 4.2, 5.x and Centerline C++
8618             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8619             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8620             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8621             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8622               $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8623
8624             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8625             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8626             case $host_os in
8627               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8628               *)
8629                 # The compiler driver will combine and reorder linker options,
8630                 # but understands `-z linker_flag'.
8631                 # Supported since Solaris 2.6 (maybe 2.5.1?)
8632                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8633                 ;;
8634             esac
8635             _LT_TAGVAR(link_all_deplibs, $1)=yes
8636
8637             output_verbose_link_cmd='func_echo_all'
8638
8639             # Archives containing C++ object files must be created using
8640             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8641             # necessary to make sure instantiated templates are included
8642             # in the archive.
8643             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8644             ;;
8645           gcx*)
8646             # Green Hills C++ Compiler
8647             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8648
8649             # The C++ compiler must be used to create the archive.
8650             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8651             ;;
8652           *)
8653             # GNU C++ compiler with Solaris linker
8654             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8655               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8656               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8657                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8658                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8659                   $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8660
8661                 # Commands to make compiler produce verbose output that lists
8662                 # what "hidden" libraries, object files and flags are used when
8663                 # linking a shared library.
8664                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8665               else
8666                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
8667                 # platform.
8668                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8669                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8670                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8671
8672                 # Commands to make compiler produce verbose output that lists
8673                 # what "hidden" libraries, object files and flags are used when
8674                 # linking a shared library.
8675                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8676               fi
8677
8678               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8679               case $host_os in
8680                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8681                 *)
8682                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8683                   ;;
8684               esac
8685             fi
8686             ;;
8687         esac
8688         ;;
8689
8690     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8691       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8692       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8693       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8694       runpath_var='LD_RUN_PATH'
8695
8696       case $cc_basename in
8697         CC*)
8698           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8699           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8700           ;;
8701         *)
8702           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8703           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8704           ;;
8705       esac
8706       ;;
8707
8708       sysv5* | sco3.2v5* | sco5v6*)
8709         # Note: We can NOT use -z defs as we might desire, because we do not
8710         # link with -lc, and that would cause any symbols used from libc to
8711         # always be unresolved, which means just about no library would
8712         # ever link correctly.  If we're not using GNU ld we use -z text
8713         # though, which does catch some bad symbols but isn't as heavy-handed
8714         # as -z defs.
8715         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8716         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8717         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8718         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8719         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8720         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8721         _LT_TAGVAR(link_all_deplibs, $1)=yes
8722         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8723         runpath_var='LD_RUN_PATH'
8724
8725         case $cc_basename in
8726           CC*)
8727             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8728             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8729             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8730               '"$_LT_TAGVAR(old_archive_cmds, $1)"
8731             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8732               '"$_LT_TAGVAR(reload_cmds, $1)"
8733             ;;
8734           *)
8735             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8736             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8737             ;;
8738         esac
8739       ;;
8740
8741       tandem*)
8742         case $cc_basename in
8743           NCC*)
8744             # NonStop-UX NCC 3.20
8745             # FIXME: insert proper C++ library support
8746             _LT_TAGVAR(ld_shlibs, $1)=no
8747             ;;
8748           *)
8749             # FIXME: insert proper C++ library support
8750             _LT_TAGVAR(ld_shlibs, $1)=no
8751             ;;
8752         esac
8753         ;;
8754
8755       vxworks*)
8756         # FIXME: insert proper C++ library support
8757         _LT_TAGVAR(ld_shlibs, $1)=no
8758         ;;
8759
8760       *)
8761         # FIXME: insert proper C++ library support
8762         _LT_TAGVAR(ld_shlibs, $1)=no
8763         ;;
8764     esac
8765
8766     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8767     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8768
8769     _LT_TAGVAR(GCC, $1)="$GXX"
8770     _LT_TAGVAR(LD, $1)="$LD"
8771
8772     ## CAVEAT EMPTOR:
8773     ## There is no encapsulation within the following macros, do not change
8774     ## the running order or otherwise move them around unless you know exactly
8775     ## what you are doing...
8776     _LT_SYS_HIDDEN_LIBDEPS($1)
8777     _LT_COMPILER_PIC($1)
8778     _LT_COMPILER_C_O($1)
8779     _LT_COMPILER_FILE_LOCKS($1)
8780     _LT_LINKER_SHLIBS($1)
8781     _LT_SYS_DYNAMIC_LINKER($1)
8782     _LT_LINKER_HARDCODE_LIBPATH($1)
8783
8784     _LT_CONFIG($1)
8785   fi # test -n "$compiler"
8786
8787   CC=$lt_save_CC
8788   LDCXX=$LD
8789   LD=$lt_save_LD
8790   GCC=$lt_save_GCC
8791   with_gnu_ld=$lt_save_with_gnu_ld
8792   lt_cv_path_LDCXX=$lt_cv_path_LD
8793   lt_cv_path_LD=$lt_save_path_LD
8794   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8795   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8796 fi # test "$_lt_caught_CXX_error" != yes
8797
8798 AC_LANG_POP
8799 ])# _LT_LANG_CXX_CONFIG
8800
8801
8802 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8803 # ---------------------------------
8804 # Figure out "hidden" library dependencies from verbose
8805 # compiler output when linking a shared library.
8806 # Parse the compiler output and extract the necessary
8807 # objects, libraries and library flags.
8808 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8809 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8810 # Dependencies to place before and after the object being linked:
8811 _LT_TAGVAR(predep_objects, $1)=
8812 _LT_TAGVAR(postdep_objects, $1)=
8813 _LT_TAGVAR(predeps, $1)=
8814 _LT_TAGVAR(postdeps, $1)=
8815 _LT_TAGVAR(compiler_lib_search_path, $1)=
8816
8817 dnl we can't use the lt_simple_compile_test_code here,
8818 dnl because it contains code intended for an executable,
8819 dnl not a library.  It's possible we should let each
8820 dnl tag define a new lt_????_link_test_code variable,
8821 dnl but it's only used here...
8822 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8823 int a;
8824 void foo (void) { a = 0; }
8825 _LT_EOF
8826 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8827 class Foo
8828 {
8829 public:
8830   Foo (void) { a = 0; }
8831 private:
8832   int a;
8833 };
8834 _LT_EOF
8835 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8836       subroutine foo
8837       implicit none
8838       integer*4 a
8839       a=0
8840       return
8841       end
8842 _LT_EOF
8843 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8844       subroutine foo
8845       implicit none
8846       integer a
8847       a=0
8848       return
8849       end
8850 _LT_EOF
8851 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8852 public class foo {
8853   private int a;
8854   public void bar (void) {
8855     a = 0;
8856   }
8857 };
8858 _LT_EOF
8859 ])
8860 dnl Parse the compiler output and extract the necessary
8861 dnl objects, libraries and library flags.
8862 if AC_TRY_EVAL(ac_compile); then
8863   # Parse the compiler output and extract the necessary
8864   # objects, libraries and library flags.
8865
8866   # Sentinel used to keep track of whether or not we are before
8867   # the conftest object file.
8868   pre_test_object_deps_done=no
8869
8870   for p in `eval "$output_verbose_link_cmd"`; do
8871     case $p in
8872
8873     -L* | -R* | -l*)
8874        # Some compilers place space between "-{L,R}" and the path.
8875        # Remove the space.
8876        if test $p = "-L" ||
8877           test $p = "-R"; then
8878          prev=$p
8879          continue
8880        else
8881          prev=
8882        fi
8883
8884        if test "$pre_test_object_deps_done" = no; then
8885          case $p in
8886          -L* | -R*)
8887            # Internal compiler library paths should come after those
8888            # provided the user.  The postdeps already come after the
8889            # user supplied libs so there is no need to process them.
8890            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8891              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8892            else
8893              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8894            fi
8895            ;;
8896          # The "-l" case would never come before the object being
8897          # linked, so don't bother handling this case.
8898          esac
8899        else
8900          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8901            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8902          else
8903            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8904          fi
8905        fi
8906        ;;
8907
8908     *.$objext)
8909        # This assumes that the test object file only shows up
8910        # once in the compiler output.
8911        if test "$p" = "conftest.$objext"; then
8912          pre_test_object_deps_done=yes
8913          continue
8914        fi
8915
8916        if test "$pre_test_object_deps_done" = no; then
8917          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8918            _LT_TAGVAR(predep_objects, $1)="$p"
8919          else
8920            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8921          fi
8922        else
8923          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8924            _LT_TAGVAR(postdep_objects, $1)="$p"
8925          else
8926            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8927          fi
8928        fi
8929        ;;
8930
8931     *) ;; # Ignore the rest.
8932
8933     esac
8934   done
8935
8936   # Clean up.
8937   rm -f a.out a.exe
8938 else
8939   echo "libtool.m4: error: problem compiling $1 test program"
8940 fi
8941
8942 $RM -f confest.$objext
8943
8944 # PORTME: override above test on systems where it is broken
8945 m4_if([$1], [CXX],
8946 [case $host_os in
8947 interix[[3-9]]*)
8948   # Interix 3.5 installs completely hosed .la files for C++, so rather than
8949   # hack all around it, let's just trust "g++" to DTRT.
8950   _LT_TAGVAR(predep_objects,$1)=
8951   _LT_TAGVAR(postdep_objects,$1)=
8952   _LT_TAGVAR(postdeps,$1)=
8953   ;;
8954
8955 linux*)
8956   case `$CC -V 2>&1 | sed 5q` in
8957   *Sun\ C*)
8958     # Sun C++ 5.9
8959
8960     # The more standards-conforming stlport4 library is
8961     # incompatible with the Cstd library. Avoid specifying
8962     # it if it's in CXXFLAGS. Ignore libCrun as
8963     # -library=stlport4 depends on it.
8964     case " $CXX $CXXFLAGS " in
8965     *" -library=stlport4 "*)
8966       solaris_use_stlport4=yes
8967       ;;
8968     esac
8969
8970     if test "$solaris_use_stlport4" != yes; then
8971       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8972     fi
8973     ;;
8974   esac
8975   ;;
8976
8977 solaris*)
8978   case $cc_basename in
8979   CC* | sunCC*)
8980     # The more standards-conforming stlport4 library is
8981     # incompatible with the Cstd library. Avoid specifying
8982     # it if it's in CXXFLAGS. Ignore libCrun as
8983     # -library=stlport4 depends on it.
8984     case " $CXX $CXXFLAGS " in
8985     *" -library=stlport4 "*)
8986       solaris_use_stlport4=yes
8987       ;;
8988     esac
8989
8990     # Adding this requires a known-good setup of shared libraries for
8991     # Sun compiler versions before 5.6, else PIC objects from an old
8992     # archive will be linked into the output, leading to subtle bugs.
8993     if test "$solaris_use_stlport4" != yes; then
8994       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8995     fi
8996     ;;
8997   esac
8998   ;;
8999 esac
9000 ])
9001
9002 case " $_LT_TAGVAR(postdeps, $1) " in
9003 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9004 esac
9005  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
9006 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9007  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
9008 fi
9009 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9010     [The directories searched by this compiler when creating a shared library])
9011 _LT_TAGDECL([], [predep_objects], [1],
9012     [Dependencies to place before and after the objects being linked to
9013     create a shared library])
9014 _LT_TAGDECL([], [postdep_objects], [1])
9015 _LT_TAGDECL([], [predeps], [1])
9016 _LT_TAGDECL([], [postdeps], [1])
9017 _LT_TAGDECL([], [compiler_lib_search_path], [1],
9018     [The library search path used internally by the compiler when linking
9019     a shared library])
9020 ])# _LT_SYS_HIDDEN_LIBDEPS
9021
9022
9023 # _LT_LANG_F77_CONFIG([TAG])
9024 # --------------------------
9025 # Ensure that the configuration variables for a Fortran 77 compiler are
9026 # suitably defined.  These variables are subsequently used by _LT_CONFIG
9027 # to write the compiler configuration to `libtool'.
9028 m4_defun([_LT_LANG_F77_CONFIG],
9029 [AC_LANG_PUSH(Fortran 77)
9030 if test -z "$F77" || test "X$F77" = "Xno"; then
9031   _lt_disable_F77=yes
9032 fi
9033
9034 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9035 _LT_TAGVAR(allow_undefined_flag, $1)=
9036 _LT_TAGVAR(always_export_symbols, $1)=no
9037 _LT_TAGVAR(archive_expsym_cmds, $1)=
9038 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9039 _LT_TAGVAR(hardcode_direct, $1)=no
9040 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9041 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9042 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9043 _LT_TAGVAR(hardcode_libdir_separator, $1)=
9044 _LT_TAGVAR(hardcode_minus_L, $1)=no
9045 _LT_TAGVAR(hardcode_automatic, $1)=no
9046 _LT_TAGVAR(inherit_rpath, $1)=no
9047 _LT_TAGVAR(module_cmds, $1)=
9048 _LT_TAGVAR(module_expsym_cmds, $1)=
9049 _LT_TAGVAR(link_all_deplibs, $1)=unknown
9050 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9051 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9052 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9053 _LT_TAGVAR(no_undefined_flag, $1)=
9054 _LT_TAGVAR(whole_archive_flag_spec, $1)=
9055 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9056
9057 # Source file extension for f77 test sources.
9058 ac_ext=f
9059
9060 # Object file extension for compiled f77 test sources.
9061 objext=o
9062 _LT_TAGVAR(objext, $1)=$objext
9063
9064 # No sense in running all these tests if we already determined that
9065 # the F77 compiler isn't working.  Some variables (like enable_shared)
9066 # are currently assumed to apply to all compilers on this platform,
9067 # and will be corrupted by setting them based on a non-working compiler.
9068 if test "$_lt_disable_F77" != yes; then
9069   # Code to be used in simple compile tests
9070   lt_simple_compile_test_code="\
9071       subroutine t
9072       return
9073       end
9074 "
9075
9076   # Code to be used in simple link tests
9077   lt_simple_link_test_code="\
9078       program t
9079       end
9080 "
9081
9082   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9083   _LT_TAG_COMPILER
9084
9085   # save warnings/boilerplate of simple test code
9086   _LT_COMPILER_BOILERPLATE
9087   _LT_LINKER_BOILERPLATE
9088
9089   # Allow CC to be a program name with arguments.
9090   lt_save_CC="$CC"
9091   lt_save_GCC=$GCC
9092   CC=${F77-"f77"}
9093   compiler=$CC
9094   _LT_TAGVAR(compiler, $1)=$CC
9095   _LT_CC_BASENAME([$compiler])
9096   GCC=$G77
9097   if test -n "$compiler"; then
9098     AC_MSG_CHECKING([if libtool supports shared libraries])
9099     AC_MSG_RESULT([$can_build_shared])
9100
9101     AC_MSG_CHECKING([whether to build shared libraries])
9102     test "$can_build_shared" = "no" && enable_shared=no
9103
9104     # On AIX, shared libraries and static libraries use the same namespace, and
9105     # are all built from PIC.
9106     case $host_os in
9107       aix3*)
9108         test "$enable_shared" = yes && enable_static=no
9109         if test -n "$RANLIB"; then
9110           archive_cmds="$archive_cmds~\$RANLIB \$lib"
9111           postinstall_cmds='$RANLIB $lib'
9112         fi
9113         ;;
9114       aix[[4-9]]*)
9115         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9116           test "$enable_shared" = yes && enable_static=no
9117         fi
9118         ;;
9119     esac
9120     AC_MSG_RESULT([$enable_shared])
9121
9122     AC_MSG_CHECKING([whether to build static libraries])
9123     # Make sure either enable_shared or enable_static is yes.
9124     test "$enable_shared" = yes || enable_static=yes
9125     AC_MSG_RESULT([$enable_static])
9126
9127     _LT_TAGVAR(GCC, $1)="$G77"
9128     _LT_TAGVAR(LD, $1)="$LD"
9129
9130     ## CAVEAT EMPTOR:
9131     ## There is no encapsulation within the following macros, do not change
9132     ## the running order or otherwise move them around unless you know exactly
9133     ## what you are doing...
9134     _LT_COMPILER_PIC($1)
9135     _LT_COMPILER_C_O($1)
9136     _LT_COMPILER_FILE_LOCKS($1)
9137     _LT_LINKER_SHLIBS($1)
9138     _LT_SYS_DYNAMIC_LINKER($1)
9139     _LT_LINKER_HARDCODE_LIBPATH($1)
9140
9141     _LT_CONFIG($1)
9142   fi # test -n "$compiler"
9143
9144   GCC=$lt_save_GCC
9145   CC="$lt_save_CC"
9146 fi # test "$_lt_disable_F77" != yes
9147
9148 AC_LANG_POP
9149 ])# _LT_LANG_F77_CONFIG
9150
9151
9152 # _LT_LANG_FC_CONFIG([TAG])
9153 # -------------------------
9154 # Ensure that the configuration variables for a Fortran compiler are
9155 # suitably defined.  These variables are subsequently used by _LT_CONFIG
9156 # to write the compiler configuration to `libtool'.
9157 m4_defun([_LT_LANG_FC_CONFIG],
9158 [AC_LANG_PUSH(Fortran)
9159
9160 if test -z "$FC" || test "X$FC" = "Xno"; then
9161   _lt_disable_FC=yes
9162 fi
9163
9164 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9165 _LT_TAGVAR(allow_undefined_flag, $1)=
9166 _LT_TAGVAR(always_export_symbols, $1)=no
9167 _LT_TAGVAR(archive_expsym_cmds, $1)=
9168 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9169 _LT_TAGVAR(hardcode_direct, $1)=no
9170 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9171 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9172 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9173 _LT_TAGVAR(hardcode_libdir_separator, $1)=
9174 _LT_TAGVAR(hardcode_minus_L, $1)=no
9175 _LT_TAGVAR(hardcode_automatic, $1)=no
9176 _LT_TAGVAR(inherit_rpath, $1)=no
9177 _LT_TAGVAR(module_cmds, $1)=
9178 _LT_TAGVAR(module_expsym_cmds, $1)=
9179 _LT_TAGVAR(link_all_deplibs, $1)=unknown
9180 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9181 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9182 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9183 _LT_TAGVAR(no_undefined_flag, $1)=
9184 _LT_TAGVAR(whole_archive_flag_spec, $1)=
9185 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9186
9187 # Source file extension for fc test sources.
9188 ac_ext=${ac_fc_srcext-f}
9189
9190 # Object file extension for compiled fc test sources.
9191 objext=o
9192 _LT_TAGVAR(objext, $1)=$objext
9193
9194 # No sense in running all these tests if we already determined that
9195 # the FC compiler isn't working.  Some variables (like enable_shared)
9196 # are currently assumed to apply to all compilers on this platform,
9197 # and will be corrupted by setting them based on a non-working compiler.
9198 if test "$_lt_disable_FC" != yes; then
9199   # Code to be used in simple compile tests
9200   lt_simple_compile_test_code="\
9201       subroutine t
9202       return
9203       end
9204 "
9205
9206   # Code to be used in simple link tests
9207   lt_simple_link_test_code="\
9208       program t
9209       end
9210 "
9211
9212   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9213   _LT_TAG_COMPILER
9214
9215   # save warnings/boilerplate of simple test code
9216   _LT_COMPILER_BOILERPLATE
9217   _LT_LINKER_BOILERPLATE
9218
9219   # Allow CC to be a program name with arguments.
9220   lt_save_CC="$CC"
9221   lt_save_GCC=$GCC
9222   CC=${FC-"f95"}
9223   compiler=$CC
9224   GCC=$ac_cv_fc_compiler_gnu
9225
9226   _LT_TAGVAR(compiler, $1)=$CC
9227   _LT_CC_BASENAME([$compiler])
9228
9229   if test -n "$compiler"; then
9230     AC_MSG_CHECKING([if libtool supports shared libraries])
9231     AC_MSG_RESULT([$can_build_shared])
9232
9233     AC_MSG_CHECKING([whether to build shared libraries])
9234     test "$can_build_shared" = "no" && enable_shared=no
9235
9236     # On AIX, shared libraries and static libraries use the same namespace, and
9237     # are all built from PIC.
9238     case $host_os in
9239       aix3*)
9240         test "$enable_shared" = yes && enable_static=no
9241         if test -n "$RANLIB"; then
9242           archive_cmds="$archive_cmds~\$RANLIB \$lib"
9243           postinstall_cmds='$RANLIB $lib'
9244         fi
9245         ;;
9246       aix[[4-9]]*)
9247         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9248           test "$enable_shared" = yes && enable_static=no
9249         fi
9250         ;;
9251     esac
9252     AC_MSG_RESULT([$enable_shared])
9253
9254     AC_MSG_CHECKING([whether to build static libraries])
9255     # Make sure either enable_shared or enable_static is yes.
9256     test "$enable_shared" = yes || enable_static=yes
9257     AC_MSG_RESULT([$enable_static])
9258
9259     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9260     _LT_TAGVAR(LD, $1)="$LD"
9261
9262     ## CAVEAT EMPTOR:
9263     ## There is no encapsulation within the following macros, do not change
9264     ## the running order or otherwise move them around unless you know exactly
9265     ## what you are doing...
9266     _LT_SYS_HIDDEN_LIBDEPS($1)
9267     _LT_COMPILER_PIC($1)
9268     _LT_COMPILER_C_O($1)
9269     _LT_COMPILER_FILE_LOCKS($1)
9270     _LT_LINKER_SHLIBS($1)
9271     _LT_SYS_DYNAMIC_LINKER($1)
9272     _LT_LINKER_HARDCODE_LIBPATH($1)
9273
9274     _LT_CONFIG($1)
9275   fi # test -n "$compiler"
9276
9277   GCC=$lt_save_GCC
9278   CC="$lt_save_CC"
9279 fi # test "$_lt_disable_FC" != yes
9280
9281 AC_LANG_POP
9282 ])# _LT_LANG_FC_CONFIG
9283
9284
9285 # _LT_LANG_GCJ_CONFIG([TAG])
9286 # --------------------------
9287 # Ensure that the configuration variables for the GNU Java Compiler compiler
9288 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
9289 # to write the compiler configuration to `libtool'.
9290 m4_defun([_LT_LANG_GCJ_CONFIG],
9291 [AC_REQUIRE([LT_PROG_GCJ])dnl
9292 AC_LANG_SAVE
9293
9294 # Source file extension for Java test sources.
9295 ac_ext=java
9296
9297 # Object file extension for compiled Java test sources.
9298 objext=o
9299 _LT_TAGVAR(objext, $1)=$objext
9300
9301 # Code to be used in simple compile tests
9302 lt_simple_compile_test_code="class foo {}"
9303
9304 # Code to be used in simple link tests
9305 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9306
9307 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9308 _LT_TAG_COMPILER
9309
9310 # save warnings/boilerplate of simple test code
9311 _LT_COMPILER_BOILERPLATE
9312 _LT_LINKER_BOILERPLATE
9313
9314 # Allow CC to be a program name with arguments.
9315 lt_save_CC="$CC"
9316 lt_save_GCC=$GCC
9317 GCC=yes
9318 CC=${GCJ-"gcj"}
9319 compiler=$CC
9320 _LT_TAGVAR(compiler, $1)=$CC
9321 _LT_TAGVAR(LD, $1)="$LD"
9322 _LT_CC_BASENAME([$compiler])
9323
9324 # GCJ did not exist at the time GCC didn't implicitly link libc in.
9325 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9326
9327 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9328 _LT_TAGVAR(reload_flag, $1)=$reload_flag
9329 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9330
9331 if test -n "$compiler"; then
9332   _LT_COMPILER_NO_RTTI($1)
9333   _LT_COMPILER_PIC($1)
9334   _LT_COMPILER_C_O($1)
9335   _LT_COMPILER_FILE_LOCKS($1)
9336   _LT_LINKER_SHLIBS($1)
9337   _LT_LINKER_HARDCODE_LIBPATH($1)
9338
9339   _LT_CONFIG($1)
9340 fi
9341
9342 AC_LANG_RESTORE
9343
9344 GCC=$lt_save_GCC
9345 CC="$lt_save_CC"
9346 ])# _LT_LANG_GCJ_CONFIG
9347
9348
9349 # _LT_LANG_RC_CONFIG([TAG])
9350 # -------------------------
9351 # Ensure that the configuration variables for the Windows resource compiler
9352 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
9353 # to write the compiler configuration to `libtool'.
9354 m4_defun([_LT_LANG_RC_CONFIG],
9355 [AC_REQUIRE([LT_PROG_RC])dnl
9356 AC_LANG_SAVE
9357
9358 # Source file extension for RC test sources.
9359 ac_ext=rc
9360
9361 # Object file extension for compiled RC test sources.
9362 objext=o
9363 _LT_TAGVAR(objext, $1)=$objext
9364
9365 # Code to be used in simple compile tests
9366 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9367
9368 # Code to be used in simple link tests
9369 lt_simple_link_test_code="$lt_simple_compile_test_code"
9370
9371 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9372 _LT_TAG_COMPILER
9373
9374 # save warnings/boilerplate of simple test code
9375 _LT_COMPILER_BOILERPLATE
9376 _LT_LINKER_BOILERPLATE
9377
9378 # Allow CC to be a program name with arguments.
9379 lt_save_CC="$CC"
9380 lt_save_GCC=$GCC
9381 GCC=
9382 CC=${RC-"windres"}
9383 compiler=$CC
9384 _LT_TAGVAR(compiler, $1)=$CC
9385 _LT_CC_BASENAME([$compiler])
9386 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9387
9388 if test -n "$compiler"; then
9389   :
9390   _LT_CONFIG($1)
9391 fi
9392
9393 GCC=$lt_save_GCC
9394 AC_LANG_RESTORE
9395 CC="$lt_save_CC"
9396 ])# _LT_LANG_RC_CONFIG
9397
9398
9399 # LT_PROG_GCJ
9400 # -----------
9401 AC_DEFUN([LT_PROG_GCJ],
9402 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9403   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9404     [AC_CHECK_TOOL(GCJ, gcj,)
9405       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9406       AC_SUBST(GCJFLAGS)])])[]dnl
9407 ])
9408
9409 # Old name:
9410 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9411 dnl aclocal-1.4 backwards compatibility:
9412 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9413
9414
9415 # LT_PROG_RC
9416 # ----------
9417 AC_DEFUN([LT_PROG_RC],
9418 [AC_CHECK_TOOL(RC, windres,)
9419 ])
9420
9421 # Old name:
9422 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9423 dnl aclocal-1.4 backwards compatibility:
9424 dnl AC_DEFUN([LT_AC_PROG_RC], [])
9425
9426
9427 # _LT_DECL_EGREP
9428 # --------------
9429 # If we don't have a new enough Autoconf to choose the best grep
9430 # available, choose the one first in the user's PATH.
9431 m4_defun([_LT_DECL_EGREP],
9432 [AC_REQUIRE([AC_PROG_EGREP])dnl
9433 AC_REQUIRE([AC_PROG_FGREP])dnl
9434 test -z "$GREP" && GREP=grep
9435 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9436 _LT_DECL([], [EGREP], [1], [An ERE matcher])
9437 _LT_DECL([], [FGREP], [1], [A literal string matcher])
9438 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9439 AC_SUBST([GREP])
9440 ])
9441
9442
9443 # _LT_DECL_OBJDUMP
9444 # --------------
9445 # If we don't have a new enough Autoconf to choose the best objdump
9446 # available, choose the one first in the user's PATH.
9447 m4_defun([_LT_DECL_OBJDUMP],
9448 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
9449 test -z "$OBJDUMP" && OBJDUMP=objdump
9450 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9451 AC_SUBST([OBJDUMP])
9452 ])
9453
9454
9455 # _LT_DECL_SED
9456 # ------------
9457 # Check for a fully-functional sed program, that truncates
9458 # as few characters as possible.  Prefer GNU sed if found.
9459 m4_defun([_LT_DECL_SED],
9460 [AC_PROG_SED
9461 test -z "$SED" && SED=sed
9462 Xsed="$SED -e 1s/^X//"
9463 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9464 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9465     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9466 ])# _LT_DECL_SED
9467
9468 m4_ifndef([AC_PROG_SED], [
9469 # NOTE: This macro has been submitted for inclusion into   #
9470 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
9471 #  a released version of Autoconf we should remove this    #
9472 #  macro and use it instead.                               #
9473
9474 m4_defun([AC_PROG_SED],
9475 [AC_MSG_CHECKING([for a sed that does not truncate output])
9476 AC_CACHE_VAL(lt_cv_path_SED,
9477 [# Loop through the user's path and test for sed and gsed.
9478 # Then use that list of sed's as ones to test for truncation.
9479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9480 for as_dir in $PATH
9481 do
9482   IFS=$as_save_IFS
9483   test -z "$as_dir" && as_dir=.
9484   for lt_ac_prog in sed gsed; do
9485     for ac_exec_ext in '' $ac_executable_extensions; do
9486       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9487         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9488       fi
9489     done
9490   done
9491 done
9492 IFS=$as_save_IFS
9493 lt_ac_max=0
9494 lt_ac_count=0
9495 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9496 # along with /bin/sed that truncates output.
9497 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9498   test ! -f $lt_ac_sed && continue
9499   cat /dev/null > conftest.in
9500   lt_ac_count=0
9501   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9502   # Check for GNU sed and select it if it is found.
9503   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9504     lt_cv_path_SED=$lt_ac_sed
9505     break
9506   fi
9507   while true; do
9508     cat conftest.in conftest.in >conftest.tmp
9509     mv conftest.tmp conftest.in
9510     cp conftest.in conftest.nl
9511     echo >>conftest.nl
9512     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9513     cmp -s conftest.out conftest.nl || break
9514     # 10000 chars as input seems more than enough
9515     test $lt_ac_count -gt 10 && break
9516     lt_ac_count=`expr $lt_ac_count + 1`
9517     if test $lt_ac_count -gt $lt_ac_max; then
9518       lt_ac_max=$lt_ac_count
9519       lt_cv_path_SED=$lt_ac_sed
9520     fi
9521   done
9522 done
9523 ])
9524 SED=$lt_cv_path_SED
9525 AC_SUBST([SED])
9526 AC_MSG_RESULT([$SED])
9527 ])#AC_PROG_SED
9528 ])#m4_ifndef
9529
9530 # Old name:
9531 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9532 dnl aclocal-1.4 backwards compatibility:
9533 dnl AC_DEFUN([LT_AC_PROG_SED], [])
9534
9535
9536 # _LT_CHECK_SHELL_FEATURES
9537 # ------------------------
9538 # Find out whether the shell is Bourne or XSI compatible,
9539 # or has some other useful features.
9540 m4_defun([_LT_CHECK_SHELL_FEATURES],
9541 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9542 # Try some XSI features
9543 xsi_shell=no
9544 ( _lt_dummy="a/b/c"
9545   test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
9546       = c,a/b,, \
9547     && eval 'test $(( 1 + 1 )) -eq 2 \
9548     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9549   && xsi_shell=yes
9550 AC_MSG_RESULT([$xsi_shell])
9551 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9552
9553 AC_MSG_CHECKING([whether the shell understands "+="])
9554 lt_shell_append=no
9555 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9556     >/dev/null 2>&1 \
9557   && lt_shell_append=yes
9558 AC_MSG_RESULT([$lt_shell_append])
9559 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9560
9561 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9562   lt_unset=unset
9563 else
9564   lt_unset=false
9565 fi
9566 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9567
9568 # test EBCDIC or ASCII
9569 case `echo X|tr X '\101'` in
9570  A) # ASCII based system
9571     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9572   lt_SP2NL='tr \040 \012'
9573   lt_NL2SP='tr \015\012 \040\040'
9574   ;;
9575  *) # EBCDIC based system
9576   lt_SP2NL='tr \100 \n'
9577   lt_NL2SP='tr \r\n \100\100'
9578   ;;
9579 esac
9580 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9581 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9582 ])# _LT_CHECK_SHELL_FEATURES
9583
9584
9585 # _LT_PROG_XSI_SHELLFNS
9586 # ---------------------
9587 # Bourne and XSI compatible variants of some useful shell functions.
9588 m4_defun([_LT_PROG_XSI_SHELLFNS],
9589 [case $xsi_shell in
9590   yes)
9591     cat << \_LT_EOF >> "$cfgfile"
9592
9593 # func_dirname file append nondir_replacement
9594 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9595 # otherwise set result to NONDIR_REPLACEMENT.
9596 func_dirname ()
9597 {
9598   case ${1} in
9599     */*) func_dirname_result="${1%/*}${2}" ;;
9600     *  ) func_dirname_result="${3}" ;;
9601   esac
9602 }
9603
9604 # func_basename file
9605 func_basename ()
9606 {
9607   func_basename_result="${1##*/}"
9608 }
9609
9610 # func_dirname_and_basename file append nondir_replacement
9611 # perform func_basename and func_dirname in a single function
9612 # call:
9613 #   dirname:  Compute the dirname of FILE.  If nonempty,
9614 #             add APPEND to the result, otherwise set result
9615 #             to NONDIR_REPLACEMENT.
9616 #             value returned in "$func_dirname_result"
9617 #   basename: Compute filename of FILE.
9618 #             value retuned in "$func_basename_result"
9619 # Implementation must be kept synchronized with func_dirname
9620 # and func_basename. For efficiency, we do not delegate to
9621 # those functions but instead duplicate the functionality here.
9622 func_dirname_and_basename ()
9623 {
9624   case ${1} in
9625     */*) func_dirname_result="${1%/*}${2}" ;;
9626     *  ) func_dirname_result="${3}" ;;
9627   esac
9628   func_basename_result="${1##*/}"
9629 }
9630
9631 # func_stripname prefix suffix name
9632 # strip PREFIX and SUFFIX off of NAME.
9633 # PREFIX and SUFFIX must not contain globbing or regex special
9634 # characters, hashes, percent signs, but SUFFIX may contain a leading
9635 # dot (in which case that matches only a dot).
9636 func_stripname ()
9637 {
9638   # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9639   # positional parameters, so assign one to ordinary parameter first.
9640   func_stripname_result=${3}
9641   func_stripname_result=${func_stripname_result#"${1}"}
9642   func_stripname_result=${func_stripname_result%"${2}"}
9643 }
9644
9645 # func_opt_split
9646 func_opt_split ()
9647 {
9648   func_opt_split_opt=${1%%=*}
9649   func_opt_split_arg=${1#*=}
9650 }
9651
9652 # func_lo2o object
9653 func_lo2o ()
9654 {
9655   case ${1} in
9656     *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9657     *)    func_lo2o_result=${1} ;;
9658   esac
9659 }
9660
9661 # func_xform libobj-or-source
9662 func_xform ()
9663 {
9664   func_xform_result=${1%.*}.lo
9665 }
9666
9667 # func_arith arithmetic-term...
9668 func_arith ()
9669 {
9670   func_arith_result=$(( $[*] ))
9671 }
9672
9673 # func_len string
9674 # STRING may not start with a hyphen.
9675 func_len ()
9676 {
9677   func_len_result=${#1}
9678 }
9679
9680 _LT_EOF
9681     ;;
9682   *) # Bourne compatible functions.
9683     cat << \_LT_EOF >> "$cfgfile"
9684
9685 # func_dirname file append nondir_replacement
9686 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9687 # otherwise set result to NONDIR_REPLACEMENT.
9688 func_dirname ()
9689 {
9690   # Extract subdirectory from the argument.
9691   func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
9692   if test "X$func_dirname_result" = "X${1}"; then
9693     func_dirname_result="${3}"
9694   else
9695     func_dirname_result="$func_dirname_result${2}"
9696   fi
9697 }
9698
9699 # func_basename file
9700 func_basename ()
9701 {
9702   func_basename_result=`$ECHO "${1}" | $SED "$basename"`
9703 }
9704
9705 dnl func_dirname_and_basename
9706 dnl A portable version of this function is already defined in general.m4sh
9707 dnl so there is no need for it here.
9708
9709 # func_stripname prefix suffix name
9710 # strip PREFIX and SUFFIX off of NAME.
9711 # PREFIX and SUFFIX must not contain globbing or regex special
9712 # characters, hashes, percent signs, but SUFFIX may contain a leading
9713 # dot (in which case that matches only a dot).
9714 # func_strip_suffix prefix name
9715 func_stripname ()
9716 {
9717   case ${2} in
9718     .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
9719     *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
9720   esac
9721 }
9722
9723 # sed scripts:
9724 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
9725 my_sed_long_arg='1s/^-[[^=]]*=//'
9726
9727 # func_opt_split
9728 func_opt_split ()
9729 {
9730   func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
9731   func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
9732 }
9733
9734 # func_lo2o object
9735 func_lo2o ()
9736 {
9737   func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
9738 }
9739
9740 # func_xform libobj-or-source
9741 func_xform ()
9742 {
9743   func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
9744 }
9745
9746 # func_arith arithmetic-term...
9747 func_arith ()
9748 {
9749   func_arith_result=`expr "$[@]"`
9750 }
9751
9752 # func_len string
9753 # STRING may not start with a hyphen.
9754 func_len ()
9755 {
9756   func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9757 }
9758
9759 _LT_EOF
9760 esac
9761
9762 case $lt_shell_append in
9763   yes)
9764     cat << \_LT_EOF >> "$cfgfile"
9765
9766 # func_append var value
9767 # Append VALUE to the end of shell variable VAR.
9768 func_append ()
9769 {
9770   eval "$[1]+=\$[2]"
9771 }
9772 _LT_EOF
9773     ;;
9774   *)
9775     cat << \_LT_EOF >> "$cfgfile"
9776
9777 # func_append var value
9778 # Append VALUE to the end of shell variable VAR.
9779 func_append ()
9780 {
9781   eval "$[1]=\$$[1]\$[2]"
9782 }
9783
9784 _LT_EOF
9785     ;;
9786   esac
9787 ])
9788
9789 # Helper functions for option handling.                    -*- Autoconf -*-
9790 #
9791 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9792 #   Inc.
9793 #   Written by Gary V. Vaughan, 2004
9794 #
9795 # This file is free software; the Free Software Foundation gives
9796 # unlimited permission to copy and/or distribute it, with or without
9797 # modifications, as long as this notice is preserved.
9798
9799 # serial 7 ltoptions.m4
9800
9801 # This is to help aclocal find these macros, as it can't see m4_define.
9802 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9803
9804
9805 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9806 # ------------------------------------------
9807 m4_define([_LT_MANGLE_OPTION],
9808 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9809
9810
9811 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9812 # ---------------------------------------
9813 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9814 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9815 # saved as a flag.
9816 m4_define([_LT_SET_OPTION],
9817 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9818 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9819         _LT_MANGLE_DEFUN([$1], [$2]),
9820     [m4_warning([Unknown $1 option `$2'])])[]dnl
9821 ])
9822
9823
9824 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9825 # ------------------------------------------------------------
9826 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9827 m4_define([_LT_IF_OPTION],
9828 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9829
9830
9831 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9832 # -------------------------------------------------------
9833 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9834 # are set.
9835 m4_define([_LT_UNLESS_OPTIONS],
9836 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9837             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9838                       [m4_define([$0_found])])])[]dnl
9839 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9840 ])[]dnl
9841 ])
9842
9843
9844 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9845 # ----------------------------------------
9846 # OPTION-LIST is a space-separated list of Libtool options associated
9847 # with MACRO-NAME.  If any OPTION has a matching handler declared with
9848 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9849 # the unknown option and exit.
9850 m4_defun([_LT_SET_OPTIONS],
9851 [# Set options
9852 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9853     [_LT_SET_OPTION([$1], _LT_Option)])
9854
9855 m4_if([$1],[LT_INIT],[
9856   dnl
9857   dnl Simply set some default values (i.e off) if boolean options were not
9858   dnl specified:
9859   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9860   ])
9861   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9862   ])
9863   dnl
9864   dnl If no reference was made to various pairs of opposing options, then
9865   dnl we run the default mode handler for the pair.  For example, if neither
9866   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9867   dnl archives by default:
9868   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9869   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9870   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9871   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9872                    [_LT_ENABLE_FAST_INSTALL])
9873   ])
9874 ])# _LT_SET_OPTIONS
9875
9876
9877
9878 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9879 # -----------------------------------------
9880 m4_define([_LT_MANGLE_DEFUN],
9881 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9882
9883
9884 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9885 # -----------------------------------------------
9886 m4_define([LT_OPTION_DEFINE],
9887 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9888 ])# LT_OPTION_DEFINE
9889
9890
9891 # dlopen
9892 # ------
9893 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9894 ])
9895
9896 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9897 [_LT_SET_OPTION([LT_INIT], [dlopen])
9898 AC_DIAGNOSE([obsolete],
9899 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9900 put the `dlopen' option into LT_INIT's first parameter.])
9901 ])
9902
9903 dnl aclocal-1.4 backwards compatibility:
9904 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9905
9906
9907 # win32-dll
9908 # ---------
9909 # Declare package support for building win32 dll's.
9910 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9911 [enable_win32_dll=yes
9912
9913 case $host in
9914 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9915   AC_CHECK_TOOL(AS, as, false)
9916   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9917   AC_CHECK_TOOL(OBJDUMP, objdump, false)
9918   ;;
9919 esac
9920
9921 test -z "$AS" && AS=as
9922 _LT_DECL([], [AS],      [1], [Assembler program])dnl
9923
9924 test -z "$DLLTOOL" && DLLTOOL=dlltool
9925 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9926
9927 test -z "$OBJDUMP" && OBJDUMP=objdump
9928 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9929 ])# win32-dll
9930
9931 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9932 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9933 _LT_SET_OPTION([LT_INIT], [win32-dll])
9934 AC_DIAGNOSE([obsolete],
9935 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9936 put the `win32-dll' option into LT_INIT's first parameter.])
9937 ])
9938
9939 dnl aclocal-1.4 backwards compatibility:
9940 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9941
9942
9943 # _LT_ENABLE_SHARED([DEFAULT])
9944 # ----------------------------
9945 # implement the --enable-shared flag, and supports the `shared' and
9946 # `disable-shared' LT_INIT options.
9947 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9948 m4_define([_LT_ENABLE_SHARED],
9949 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9950 AC_ARG_ENABLE([shared],
9951     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9952         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9953     [p=${PACKAGE-default}
9954     case $enableval in
9955     yes) enable_shared=yes ;;
9956     no) enable_shared=no ;;
9957     *)
9958       enable_shared=no
9959       # Look at the argument we got.  We use all the common list separators.
9960       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9961       for pkg in $enableval; do
9962         IFS="$lt_save_ifs"
9963         if test "X$pkg" = "X$p"; then
9964           enable_shared=yes
9965         fi
9966       done
9967       IFS="$lt_save_ifs"
9968       ;;
9969     esac],
9970     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9971
9972     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9973         [Whether or not to build shared libraries])
9974 ])# _LT_ENABLE_SHARED
9975
9976 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9977 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9978
9979 # Old names:
9980 AC_DEFUN([AC_ENABLE_SHARED],
9981 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9982 ])
9983
9984 AC_DEFUN([AC_DISABLE_SHARED],
9985 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9986 ])
9987
9988 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9989 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9990
9991 dnl aclocal-1.4 backwards compatibility:
9992 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9993 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9994
9995
9996
9997 # _LT_ENABLE_STATIC([DEFAULT])
9998 # ----------------------------
9999 # implement the --enable-static flag, and support the `static' and
10000 # `disable-static' LT_INIT options.
10001 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10002 m4_define([_LT_ENABLE_STATIC],
10003 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10004 AC_ARG_ENABLE([static],
10005     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10006         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10007     [p=${PACKAGE-default}
10008     case $enableval in
10009     yes) enable_static=yes ;;
10010     no) enable_static=no ;;
10011     *)
10012      enable_static=no
10013       # Look at the argument we got.  We use all the common list separators.
10014       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10015       for pkg in $enableval; do
10016         IFS="$lt_save_ifs"
10017         if test "X$pkg" = "X$p"; then
10018           enable_static=yes
10019         fi
10020       done
10021       IFS="$lt_save_ifs"
10022       ;;
10023     esac],
10024     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10025
10026     _LT_DECL([build_old_libs], [enable_static], [0],
10027         [Whether or not to build static libraries])
10028 ])# _LT_ENABLE_STATIC
10029
10030 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10031 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10032
10033 # Old names:
10034 AC_DEFUN([AC_ENABLE_STATIC],
10035 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10036 ])
10037
10038 AC_DEFUN([AC_DISABLE_STATIC],
10039 [_LT_SET_OPTION([LT_INIT], [disable-static])
10040 ])
10041
10042 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10043 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10044
10045 dnl aclocal-1.4 backwards compatibility:
10046 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
10047 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
10048
10049
10050
10051 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
10052 # ----------------------------------
10053 # implement the --enable-fast-install flag, and support the `fast-install'
10054 # and `disable-fast-install' LT_INIT options.
10055 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10056 m4_define([_LT_ENABLE_FAST_INSTALL],
10057 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10058 AC_ARG_ENABLE([fast-install],
10059     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10060     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10061     [p=${PACKAGE-default}
10062     case $enableval in
10063     yes) enable_fast_install=yes ;;
10064     no) enable_fast_install=no ;;
10065     *)
10066       enable_fast_install=no
10067       # Look at the argument we got.  We use all the common list separators.
10068       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10069       for pkg in $enableval; do
10070         IFS="$lt_save_ifs"
10071         if test "X$pkg" = "X$p"; then
10072           enable_fast_install=yes
10073         fi
10074       done
10075       IFS="$lt_save_ifs"
10076       ;;
10077     esac],
10078     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10079
10080 _LT_DECL([fast_install], [enable_fast_install], [0],
10081          [Whether or not to optimize for fast installation])dnl
10082 ])# _LT_ENABLE_FAST_INSTALL
10083
10084 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10085 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10086
10087 # Old names:
10088 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10089 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10090 AC_DIAGNOSE([obsolete],
10091 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10092 the `fast-install' option into LT_INIT's first parameter.])
10093 ])
10094
10095 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10096 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10097 AC_DIAGNOSE([obsolete],
10098 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10099 the `disable-fast-install' option into LT_INIT's first parameter.])
10100 ])
10101
10102 dnl aclocal-1.4 backwards compatibility:
10103 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10104 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10105
10106
10107 # _LT_WITH_PIC([MODE])
10108 # --------------------
10109 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
10110 # LT_INIT options.
10111 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
10112 m4_define([_LT_WITH_PIC],
10113 [AC_ARG_WITH([pic],
10114     [AS_HELP_STRING([--with-pic],
10115         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10116     [pic_mode="$withval"],
10117     [pic_mode=default])
10118
10119 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10120
10121 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10122 ])# _LT_WITH_PIC
10123
10124 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10125 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10126
10127 # Old name:
10128 AU_DEFUN([AC_LIBTOOL_PICMODE],
10129 [_LT_SET_OPTION([LT_INIT], [pic-only])
10130 AC_DIAGNOSE([obsolete],
10131 [$0: Remove this warning and the call to _LT_SET_OPTION when you
10132 put the `pic-only' option into LT_INIT's first parameter.])
10133 ])
10134
10135 dnl aclocal-1.4 backwards compatibility:
10136 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10137
10138
10139 m4_define([_LTDL_MODE], [])
10140 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10141                  [m4_define([_LTDL_MODE], [nonrecursive])])
10142 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10143                  [m4_define([_LTDL_MODE], [recursive])])
10144 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10145                  [m4_define([_LTDL_MODE], [subproject])])
10146
10147 m4_define([_LTDL_TYPE], [])
10148 LT_OPTION_DEFINE([LTDL_INIT], [installable],
10149                  [m4_define([_LTDL_TYPE], [installable])])
10150 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10151                  [m4_define([_LTDL_TYPE], [convenience])])
10152
10153 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
10154 #
10155 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10156 # Written by Gary V. Vaughan, 2004
10157 #
10158 # This file is free software; the Free Software Foundation gives
10159 # unlimited permission to copy and/or distribute it, with or without
10160 # modifications, as long as this notice is preserved.
10161
10162 # serial 6 ltsugar.m4
10163
10164 # This is to help aclocal find these macros, as it can't see m4_define.
10165 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10166
10167
10168 # lt_join(SEP, ARG1, [ARG2...])
10169 # -----------------------------
10170 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10171 # associated separator.
10172 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10173 # versions in m4sugar had bugs.
10174 m4_define([lt_join],
10175 [m4_if([$#], [1], [],
10176        [$#], [2], [[$2]],
10177        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10178 m4_define([_lt_join],
10179 [m4_if([$#$2], [2], [],
10180        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10181
10182
10183 # lt_car(LIST)
10184 # lt_cdr(LIST)
10185 # ------------
10186 # Manipulate m4 lists.
10187 # These macros are necessary as long as will still need to support
10188 # Autoconf-2.59 which quotes differently.
10189 m4_define([lt_car], [[$1]])
10190 m4_define([lt_cdr],
10191 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10192        [$#], 1, [],
10193        [m4_dquote(m4_shift($@))])])
10194 m4_define([lt_unquote], $1)
10195
10196
10197 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
10198 # ------------------------------------------
10199 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10200 # Note that neither SEPARATOR nor STRING are expanded; they are appended
10201 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10202 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
10203 # than defined and empty).
10204 #
10205 # This macro is needed until we can rely on Autoconf 2.62, since earlier
10206 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10207 m4_define([lt_append],
10208 [m4_define([$1],
10209            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10210
10211
10212
10213 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10214 # ----------------------------------------------------------
10215 # Produce a SEP delimited list of all paired combinations of elements of
10216 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
10217 # has the form PREFIXmINFIXSUFFIXn.
10218 # Needed until we can rely on m4_combine added in Autoconf 2.62.
10219 m4_define([lt_combine],
10220 [m4_if(m4_eval([$# > 3]), [1],
10221        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10222 [[m4_foreach([_Lt_prefix], [$2],
10223              [m4_foreach([_Lt_suffix],
10224                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10225         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10226
10227
10228 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10229 # -----------------------------------------------------------------------
10230 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10231 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10232 m4_define([lt_if_append_uniq],
10233 [m4_ifdef([$1],
10234           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10235                  [lt_append([$1], [$2], [$3])$4],
10236                  [$5])],
10237           [lt_append([$1], [$2], [$3])$4])])
10238
10239
10240 # lt_dict_add(DICT, KEY, VALUE)
10241 # -----------------------------
10242 m4_define([lt_dict_add],
10243 [m4_define([$1($2)], [$3])])
10244
10245
10246 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10247 # --------------------------------------------
10248 m4_define([lt_dict_add_subkey],
10249 [m4_define([$1($2:$3)], [$4])])
10250
10251
10252 # lt_dict_fetch(DICT, KEY, [SUBKEY])
10253 # ----------------------------------
10254 m4_define([lt_dict_fetch],
10255 [m4_ifval([$3],
10256         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10257     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10258
10259
10260 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10261 # -----------------------------------------------------------------
10262 m4_define([lt_if_dict_fetch],
10263 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10264         [$5],
10265     [$6])])
10266
10267
10268 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10269 # --------------------------------------------------------------
10270 m4_define([lt_dict_filter],
10271 [m4_if([$5], [], [],
10272   [lt_join(m4_quote(m4_default([$4], [[, ]])),
10273            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10274                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10275 ])
10276
10277 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
10278 #
10279 #   Copyright (C) 2004 Free Software Foundation, Inc.
10280 #   Written by Scott James Remnant, 2004
10281 #
10282 # This file is free software; the Free Software Foundation gives
10283 # unlimited permission to copy and/or distribute it, with or without
10284 # modifications, as long as this notice is preserved.
10285
10286 # Generated from ltversion.in.
10287
10288 # serial 3175 ltversion.m4
10289 # This file is part of GNU Libtool
10290
10291 m4_define([LT_PACKAGE_VERSION], [2.2.10])
10292 m4_define([LT_PACKAGE_REVISION], [1.3175])
10293
10294 AC_DEFUN([LTVERSION_VERSION],
10295 [macro_version='2.2.10'
10296 macro_revision='1.3175'
10297 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10298 _LT_DECL(, macro_revision, 0)
10299 ])
10300
10301 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
10302 #
10303 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
10304 #   Written by Scott James Remnant, 2004.
10305 #
10306 # This file is free software; the Free Software Foundation gives
10307 # unlimited permission to copy and/or distribute it, with or without
10308 # modifications, as long as this notice is preserved.
10309
10310 # serial 5 lt~obsolete.m4
10311
10312 # These exist entirely to fool aclocal when bootstrapping libtool.
10313 #
10314 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
10315 # which have later been changed to m4_define as they aren't part of the
10316 # exported API, or moved to Autoconf or Automake where they belong.
10317 #
10318 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
10319 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10320 # using a macro with the same name in our local m4/libtool.m4 it'll
10321 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10322 # and doesn't know about Autoconf macros at all.)
10323 #
10324 # So we provide this file, which has a silly filename so it's always
10325 # included after everything else.  This provides aclocal with the
10326 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10327 # because those macros already exist, or will be overwritten later.
10328 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
10329 #
10330 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10331 # Yes, that means every name once taken will need to remain here until
10332 # we give up compatibility with versions before 1.7, at which point
10333 # we need to keep only those names which we still refer to.
10334
10335 # This is to help aclocal find these macros, as it can't see m4_define.
10336 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10337
10338 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10339 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
10340 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10341 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
10342 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10343 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
10344 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
10345 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10346 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
10347 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
10348 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
10349 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10350 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10351 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10352 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10353 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10354 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
10355 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10356 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10357 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
10358 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
10359 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10360 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10361 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10362 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10363 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10364 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10365 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10366 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
10367 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
10368 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
10369 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10370 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10371 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
10372 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
10373 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10374 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10375 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
10376 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10377 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
10378 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
10379 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
10380 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10381 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10382 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10383 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10384 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10385 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10386 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10387 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10388 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10389 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10390 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
10391 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10392 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10393 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10394 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10395 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10396 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
10397 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
10398 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
10399