Add default Smack manifest for libXvMC.spec
[pkgs/xorg/lib/libXvMC.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.65],,
17 [m4_warning([this file was generated for autoconf 2.65.
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 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
410 # Free Software Foundation, Inc.
411 #
412 # This file is free software; the Free Software Foundation
413 # gives unlimited permission to copy and/or distribute it,
414 # with or without modifications, as long as this notice is preserved.
415
416 # serial 8
417
418 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
419 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
420
421 # Do all the work for Automake.                             -*- Autoconf -*-
422
423 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
424 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
425 #
426 # This file is free software; the Free Software Foundation
427 # gives unlimited permission to copy and/or distribute it,
428 # with or without modifications, as long as this notice is preserved.
429
430 # serial 16
431
432 # This macro actually does too much.  Some checks are only needed if
433 # your package does certain things.  But this isn't really a big deal.
434
435 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
436 # AM_INIT_AUTOMAKE([OPTIONS])
437 # -----------------------------------------------
438 # The call with PACKAGE and VERSION arguments is the old style
439 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
440 # and VERSION should now be passed to AC_INIT and removed from
441 # the call to AM_INIT_AUTOMAKE.
442 # We support both call styles for the transition.  After
443 # the next Automake release, Autoconf can make the AC_INIT
444 # arguments mandatory, and then we can depend on a new Autoconf
445 # release and drop the old call support.
446 AC_DEFUN([AM_INIT_AUTOMAKE],
447 [AC_PREREQ([2.62])dnl
448 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
449 dnl the ones we care about.
450 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
451 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
452 AC_REQUIRE([AC_PROG_INSTALL])dnl
453 if test "`cd $srcdir && pwd`" != "`pwd`"; then
454   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
455   # is not polluted with repeated "-I."
456   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
457   # test to see if srcdir already configured
458   if test -f $srcdir/config.status; then
459     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
460   fi
461 fi
462
463 # test whether we have cygpath
464 if test -z "$CYGPATH_W"; then
465   if (cygpath --version) >/dev/null 2>/dev/null; then
466     CYGPATH_W='cygpath -w'
467   else
468     CYGPATH_W=echo
469   fi
470 fi
471 AC_SUBST([CYGPATH_W])
472
473 # Define the identity of the package.
474 dnl Distinguish between old-style and new-style calls.
475 m4_ifval([$2],
476 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
477  AC_SUBST([PACKAGE], [$1])dnl
478  AC_SUBST([VERSION], [$2])],
479 [_AM_SET_OPTIONS([$1])dnl
480 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
481 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
482   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
483  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
484  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
485
486 _AM_IF_OPTION([no-define],,
487 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
488  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
489
490 # Some tools Automake needs.
491 AC_REQUIRE([AM_SANITY_CHECK])dnl
492 AC_REQUIRE([AC_ARG_PROGRAM])dnl
493 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
494 AM_MISSING_PROG(AUTOCONF, autoconf)
495 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
496 AM_MISSING_PROG(AUTOHEADER, autoheader)
497 AM_MISSING_PROG(MAKEINFO, makeinfo)
498 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
499 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
500 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
501 # We need awk for the "check" target.  The system "awk" is bad on
502 # some platforms.
503 AC_REQUIRE([AC_PROG_AWK])dnl
504 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
505 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
506 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
507               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
508                              [_AM_PROG_TAR([v7])])])
509 _AM_IF_OPTION([no-dependencies],,
510 [AC_PROVIDE_IFELSE([AC_PROG_CC],
511                   [_AM_DEPENDENCIES(CC)],
512                   [define([AC_PROG_CC],
513                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
514 AC_PROVIDE_IFELSE([AC_PROG_CXX],
515                   [_AM_DEPENDENCIES(CXX)],
516                   [define([AC_PROG_CXX],
517                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
518 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
519                   [_AM_DEPENDENCIES(OBJC)],
520                   [define([AC_PROG_OBJC],
521                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
522 ])
523 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
524 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
525 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
526 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
527 AC_CONFIG_COMMANDS_PRE(dnl
528 [m4_provide_if([_AM_COMPILER_EXEEXT],
529   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
530 ])
531
532 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
533 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
534 dnl mangled by Autoconf and run in a shell conditional statement.
535 m4_define([_AC_COMPILER_EXEEXT],
536 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
537
538
539 # When config.status generates a header, we must update the stamp-h file.
540 # This file resides in the same directory as the config header
541 # that is generated.  The stamp files are numbered to have different names.
542
543 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
544 # loop where config.status creates the headers, so we can generate
545 # our stamp files there.
546 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
547 [# Compute $1's index in $config_headers.
548 _am_arg=$1
549 _am_stamp_count=1
550 for _am_header in $config_headers :; do
551   case $_am_header in
552     $_am_arg | $_am_arg:* )
553       break ;;
554     * )
555       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
556   esac
557 done
558 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
559
560 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
561 #
562 # This file is free software; the Free Software Foundation
563 # gives unlimited permission to copy and/or distribute it,
564 # with or without modifications, as long as this notice is preserved.
565
566 # AM_PROG_INSTALL_SH
567 # ------------------
568 # Define $install_sh.
569 AC_DEFUN([AM_PROG_INSTALL_SH],
570 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
571 if test x"${install_sh}" != xset; then
572   case $am_aux_dir in
573   *\ * | *\     *)
574     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
575   *)
576     install_sh="\${SHELL} $am_aux_dir/install-sh"
577   esac
578 fi
579 AC_SUBST(install_sh)])
580
581 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
582 #
583 # This file is free software; the Free Software Foundation
584 # gives unlimited permission to copy and/or distribute it,
585 # with or without modifications, as long as this notice is preserved.
586
587 # serial 2
588
589 # Check whether the underlying file-system supports filenames
590 # with a leading dot.  For instance MS-DOS doesn't.
591 AC_DEFUN([AM_SET_LEADING_DOT],
592 [rm -rf .tst 2>/dev/null
593 mkdir .tst 2>/dev/null
594 if test -d .tst; then
595   am__leading_dot=.
596 else
597   am__leading_dot=_
598 fi
599 rmdir .tst 2>/dev/null
600 AC_SUBST([am__leading_dot])])
601
602 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
603 # From Jim Meyering
604
605 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
606 # Free Software Foundation, Inc.
607 #
608 # This file is free software; the Free Software Foundation
609 # gives unlimited permission to copy and/or distribute it,
610 # with or without modifications, as long as this notice is preserved.
611
612 # serial 5
613
614 # AM_MAINTAINER_MODE([DEFAULT-MODE])
615 # ----------------------------------
616 # Control maintainer-specific portions of Makefiles.
617 # Default is to disable them, unless `enable' is passed literally.
618 # For symmetry, `disable' may be passed as well.  Anyway, the user
619 # can override the default with the --enable/--disable switch.
620 AC_DEFUN([AM_MAINTAINER_MODE],
621 [m4_case(m4_default([$1], [disable]),
622        [enable], [m4_define([am_maintainer_other], [disable])],
623        [disable], [m4_define([am_maintainer_other], [enable])],
624        [m4_define([am_maintainer_other], [enable])
625         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
626 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
627   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
628   AC_ARG_ENABLE([maintainer-mode],
629 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
630                           (and sometimes confusing) to the casual installer],
631       [USE_MAINTAINER_MODE=$enableval],
632       [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
633   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
634   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
635   MAINT=$MAINTAINER_MODE_TRUE
636   AC_SUBST([MAINT])dnl
637 ]
638 )
639
640 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
641
642 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
643
644 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
645 #
646 # This file is free software; the Free Software Foundation
647 # gives unlimited permission to copy and/or distribute it,
648 # with or without modifications, as long as this notice is preserved.
649
650 # serial 4
651
652 # AM_MAKE_INCLUDE()
653 # -----------------
654 # Check to see how make treats includes.
655 AC_DEFUN([AM_MAKE_INCLUDE],
656 [am_make=${MAKE-make}
657 cat > confinc << 'END'
658 am__doit:
659         @echo this is the am__doit target
660 .PHONY: am__doit
661 END
662 # If we don't find an include directive, just comment out the code.
663 AC_MSG_CHECKING([for style of include used by $am_make])
664 am__include="#"
665 am__quote=
666 _am_result=none
667 # First try GNU make style include.
668 echo "include confinc" > confmf
669 # Ignore all kinds of additional output from `make'.
670 case `$am_make -s -f confmf 2> /dev/null` in #(
671 *the\ am__doit\ target*)
672   am__include=include
673   am__quote=
674   _am_result=GNU
675   ;;
676 esac
677 # Now try BSD make style include.
678 if test "$am__include" = "#"; then
679    echo '.include "confinc"' > confmf
680    case `$am_make -s -f confmf 2> /dev/null` in #(
681    *the\ am__doit\ target*)
682      am__include=.include
683      am__quote="\""
684      _am_result=BSD
685      ;;
686    esac
687 fi
688 AC_SUBST([am__include])
689 AC_SUBST([am__quote])
690 AC_MSG_RESULT([$_am_result])
691 rm -f confinc confmf
692 ])
693
694 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
695
696 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
697 # Free Software Foundation, Inc.
698 #
699 # This file is free software; the Free Software Foundation
700 # gives unlimited permission to copy and/or distribute it,
701 # with or without modifications, as long as this notice is preserved.
702
703 # serial 6
704
705 # AM_MISSING_PROG(NAME, PROGRAM)
706 # ------------------------------
707 AC_DEFUN([AM_MISSING_PROG],
708 [AC_REQUIRE([AM_MISSING_HAS_RUN])
709 $1=${$1-"${am_missing_run}$2"}
710 AC_SUBST($1)])
711
712
713 # AM_MISSING_HAS_RUN
714 # ------------------
715 # Define MISSING if not defined so far and test if it supports --run.
716 # If it does, set am_missing_run to use it, otherwise, to nothing.
717 AC_DEFUN([AM_MISSING_HAS_RUN],
718 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
719 AC_REQUIRE_AUX_FILE([missing])dnl
720 if test x"${MISSING+set}" != xset; then
721   case $am_aux_dir in
722   *\ * | *\     *)
723     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
724   *)
725     MISSING="\${SHELL} $am_aux_dir/missing" ;;
726   esac
727 fi
728 # Use eval to expand $SHELL
729 if eval "$MISSING --run true"; then
730   am_missing_run="$MISSING --run "
731 else
732   am_missing_run=
733   AC_MSG_WARN([`missing' script is too old or missing])
734 fi
735 ])
736
737 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
738 #
739 # This file is free software; the Free Software Foundation
740 # gives unlimited permission to copy and/or distribute it,
741 # with or without modifications, as long as this notice is preserved.
742
743 # AM_PROG_MKDIR_P
744 # ---------------
745 # Check for `mkdir -p'.
746 AC_DEFUN([AM_PROG_MKDIR_P],
747 [AC_PREREQ([2.60])dnl
748 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
749 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
750 dnl while keeping a definition of mkdir_p for backward compatibility.
751 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
752 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
753 dnl Makefile.ins that do not define MKDIR_P, so we do our own
754 dnl adjustment using top_builddir (which is defined more often than
755 dnl MKDIR_P).
756 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
757 case $mkdir_p in
758   [[\\/$]]* | ?:[[\\/]]*) ;;
759   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
760 esac
761 ])
762
763 # Helper functions for option handling.                     -*- Autoconf -*-
764
765 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
766 #
767 # This file is free software; the Free Software Foundation
768 # gives unlimited permission to copy and/or distribute it,
769 # with or without modifications, as long as this notice is preserved.
770
771 # serial 4
772
773 # _AM_MANGLE_OPTION(NAME)
774 # -----------------------
775 AC_DEFUN([_AM_MANGLE_OPTION],
776 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
777
778 # _AM_SET_OPTION(NAME)
779 # ------------------------------
780 # Set option NAME.  Presently that only means defining a flag for this option.
781 AC_DEFUN([_AM_SET_OPTION],
782 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
783
784 # _AM_SET_OPTIONS(OPTIONS)
785 # ----------------------------------
786 # OPTIONS is a space-separated list of Automake options.
787 AC_DEFUN([_AM_SET_OPTIONS],
788 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
789
790 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
791 # -------------------------------------------
792 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
793 AC_DEFUN([_AM_IF_OPTION],
794 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
795
796 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
797
798 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
799 # Free Software Foundation, Inc.
800 #
801 # This file is free software; the Free Software Foundation
802 # gives unlimited permission to copy and/or distribute it,
803 # with or without modifications, as long as this notice is preserved.
804
805 # serial 5
806
807 # AM_SANITY_CHECK
808 # ---------------
809 AC_DEFUN([AM_SANITY_CHECK],
810 [AC_MSG_CHECKING([whether build environment is sane])
811 # Just in case
812 sleep 1
813 echo timestamp > conftest.file
814 # Reject unsafe characters in $srcdir or the absolute working directory
815 # name.  Accept space and tab only in the latter.
816 am_lf='
817 '
818 case `pwd` in
819   *[[\\\"\#\$\&\'\`$am_lf]]*)
820     AC_MSG_ERROR([unsafe absolute working directory name]);;
821 esac
822 case $srcdir in
823   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
824     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
825 esac
826
827 # Do `set' in a subshell so we don't clobber the current shell's
828 # arguments.  Must try -L first in case configure is actually a
829 # symlink; some systems play weird games with the mod time of symlinks
830 # (eg FreeBSD returns the mod time of the symlink's containing
831 # directory).
832 if (
833    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
834    if test "$[*]" = "X"; then
835       # -L didn't work.
836       set X `ls -t "$srcdir/configure" conftest.file`
837    fi
838    rm -f conftest.file
839    if test "$[*]" != "X $srcdir/configure conftest.file" \
840       && test "$[*]" != "X conftest.file $srcdir/configure"; then
841
842       # If neither matched, then we have a broken ls.  This can happen
843       # if, for instance, CONFIG_SHELL is bash and it inherits a
844       # broken ls alias from the environment.  This has actually
845       # happened.  Such a system could not be considered "sane".
846       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
847 alias in your environment])
848    fi
849
850    test "$[2]" = conftest.file
851    )
852 then
853    # Ok.
854    :
855 else
856    AC_MSG_ERROR([newly created file is older than distributed files!
857 Check your system clock])
858 fi
859 AC_MSG_RESULT(yes)])
860
861 # Copyright (C) 2009  Free Software Foundation, Inc.
862 #
863 # This file is free software; the Free Software Foundation
864 # gives unlimited permission to copy and/or distribute it,
865 # with or without modifications, as long as this notice is preserved.
866
867 # serial 1
868
869 # AM_SILENT_RULES([DEFAULT])
870 # --------------------------
871 # Enable less verbose build rules; with the default set to DEFAULT
872 # (`yes' being less verbose, `no' or empty being verbose).
873 AC_DEFUN([AM_SILENT_RULES],
874 [AC_ARG_ENABLE([silent-rules],
875 [  --enable-silent-rules          less verbose build output (undo: `make V=1')
876   --disable-silent-rules         verbose build output (undo: `make V=0')])
877 case $enable_silent_rules in
878 yes) AM_DEFAULT_VERBOSITY=0;;
879 no)  AM_DEFAULT_VERBOSITY=1;;
880 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
881 esac
882 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
883 AM_BACKSLASH='\'
884 AC_SUBST([AM_BACKSLASH])dnl
885 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
886 ])
887
888 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
889 #
890 # This file is free software; the Free Software Foundation
891 # gives unlimited permission to copy and/or distribute it,
892 # with or without modifications, as long as this notice is preserved.
893
894 # AM_PROG_INSTALL_STRIP
895 # ---------------------
896 # One issue with vendor `install' (even GNU) is that you can't
897 # specify the program used to strip binaries.  This is especially
898 # annoying in cross-compiling environments, where the build's strip
899 # is unlikely to handle the host's binaries.
900 # Fortunately install-sh will honor a STRIPPROG variable, so we
901 # always use install-sh in `make install-strip', and initialize
902 # STRIPPROG with the value of the STRIP variable (set by the user).
903 AC_DEFUN([AM_PROG_INSTALL_STRIP],
904 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
905 # Installed binaries are usually stripped using `strip' when the user
906 # run `make install-strip'.  However `strip' might not be the right
907 # tool to use in cross-compilation environments, therefore Automake
908 # will honor the `STRIP' environment variable to overrule this program.
909 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
910 if test "$cross_compiling" != no; then
911   AC_CHECK_TOOL([STRIP], [strip], :)
912 fi
913 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
914 AC_SUBST([INSTALL_STRIP_PROGRAM])])
915
916 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
917 #
918 # This file is free software; the Free Software Foundation
919 # gives unlimited permission to copy and/or distribute it,
920 # with or without modifications, as long as this notice is preserved.
921
922 # serial 2
923
924 # _AM_SUBST_NOTMAKE(VARIABLE)
925 # ---------------------------
926 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
927 # This macro is traced by Automake.
928 AC_DEFUN([_AM_SUBST_NOTMAKE])
929
930 # AM_SUBST_NOTMAKE(VARIABLE)
931 # ---------------------------
932 # Public sister of _AM_SUBST_NOTMAKE.
933 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
934
935 # Check how to create a tarball.                            -*- Autoconf -*-
936
937 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
938 #
939 # This file is free software; the Free Software Foundation
940 # gives unlimited permission to copy and/or distribute it,
941 # with or without modifications, as long as this notice is preserved.
942
943 # serial 2
944
945 # _AM_PROG_TAR(FORMAT)
946 # --------------------
947 # Check how to create a tarball in format FORMAT.
948 # FORMAT should be one of `v7', `ustar', or `pax'.
949 #
950 # Substitute a variable $(am__tar) that is a command
951 # writing to stdout a FORMAT-tarball containing the directory
952 # $tardir.
953 #     tardir=directory && $(am__tar) > result.tar
954 #
955 # Substitute a variable $(am__untar) that extract such
956 # a tarball read from stdin.
957 #     $(am__untar) < result.tar
958 AC_DEFUN([_AM_PROG_TAR],
959 [# Always define AMTAR for backward compatibility.
960 AM_MISSING_PROG([AMTAR], [tar])
961 m4_if([$1], [v7],
962      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
963      [m4_case([$1], [ustar],, [pax],,
964               [m4_fatal([Unknown tar format])])
965 AC_MSG_CHECKING([how to create a $1 tar archive])
966 # Loop over all known methods to create a tar archive until one works.
967 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
968 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
969 # Do not fold the above two line into one, because Tru64 sh and
970 # Solaris sh will not grok spaces in the rhs of `-'.
971 for _am_tool in $_am_tools
972 do
973   case $_am_tool in
974   gnutar)
975     for _am_tar in tar gnutar gtar;
976     do
977       AM_RUN_LOG([$_am_tar --version]) && break
978     done
979     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
980     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
981     am__untar="$_am_tar -xf -"
982     ;;
983   plaintar)
984     # Must skip GNU tar: if it does not support --format= it doesn't create
985     # ustar tarball either.
986     (tar --version) >/dev/null 2>&1 && continue
987     am__tar='tar chf - "$$tardir"'
988     am__tar_='tar chf - "$tardir"'
989     am__untar='tar xf -'
990     ;;
991   pax)
992     am__tar='pax -L -x $1 -w "$$tardir"'
993     am__tar_='pax -L -x $1 -w "$tardir"'
994     am__untar='pax -r'
995     ;;
996   cpio)
997     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
998     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
999     am__untar='cpio -i -H $1 -d'
1000     ;;
1001   none)
1002     am__tar=false
1003     am__tar_=false
1004     am__untar=false
1005     ;;
1006   esac
1007
1008   # If the value was cached, stop now.  We just wanted to have am__tar
1009   # and am__untar set.
1010   test -n "${am_cv_prog_tar_$1}" && break
1011
1012   # tar/untar a dummy directory, and stop if the command works
1013   rm -rf conftest.dir
1014   mkdir conftest.dir
1015   echo GrepMe > conftest.dir/file
1016   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1017   rm -rf conftest.dir
1018   if test -s conftest.tar; then
1019     AM_RUN_LOG([$am__untar <conftest.tar])
1020     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1021   fi
1022 done
1023 rm -rf conftest.dir
1024
1025 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1026 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1027 AC_SUBST([am__tar])
1028 AC_SUBST([am__untar])
1029 ]) # _AM_PROG_TAR
1030
1031 dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1032 dnl
1033 dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
1034 dnl 
1035 dnl Permission is hereby granted, free of charge, to any person obtaining a
1036 dnl copy of this software and associated documentation files (the "Software"),
1037 dnl to deal in the Software without restriction, including without limitation
1038 dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1039 dnl and/or sell copies of the Software, and to permit persons to whom the
1040 dnl Software is furnished to do so, subject to the following conditions:
1041 dnl
1042 dnl The above copyright notice and this permission notice (including the next
1043 dnl paragraph) shall be included in all copies or substantial portions of the
1044 dnl Software.
1045 dnl
1046 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1047 dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1048 dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1049 dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1050 dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1051 dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1052 dnl DEALINGS IN THE SOFTWARE.
1053
1054 # XORG_MACROS_VERSION(required-version)
1055 # -------------------------------------
1056 # Minimum version: 1.1.0
1057 #
1058 # If you're using a macro added in Version 1.1 or newer, include this in
1059 # your configure.ac with the minimum required version, such as:
1060 # XORG_MACROS_VERSION(1.1)
1061 #
1062 # To ensure that this macro is defined, also add:
1063 # m4_ifndef([XORG_MACROS_VERSION],
1064 #     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1065 #
1066 #
1067 # See the "minimum version" comment for each macro you use to see what 
1068 # version you require.
1069 m4_defun([XORG_MACROS_VERSION],[
1070 m4_define([vers_have], [1.10.0])
1071 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1072 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1073 m4_if(m4_cmp(maj_have, maj_needed), 0,,
1074     [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1075 m4_if(m4_version_compare(vers_have, [$1]), -1,
1076     [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1077 m4_undefine([vers_have])
1078 m4_undefine([maj_have])
1079 m4_undefine([maj_needed])
1080 ]) # XORG_MACROS_VERSION
1081
1082 # XORG_PROG_RAWCPP()
1083 # ------------------
1084 # Minimum version: 1.0.0
1085 #
1086 # Find cpp program and necessary flags for use in pre-processing text files
1087 # such as man pages and config files
1088 AC_DEFUN([XORG_PROG_RAWCPP],[
1089 AC_REQUIRE([AC_PROG_CPP])
1090 AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
1091    [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1092
1093 # Check for flag to avoid builtin definitions - assumes unix is predefined,
1094 # which is not the best choice for supporting other OS'es, but covers most
1095 # of the ones we need for now.
1096 AC_MSG_CHECKING([if $RAWCPP requires -undef])
1097 AC_LANG_CONFTEST([Does cpp redefine unix ?])
1098 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1099         AC_MSG_RESULT([no])
1100 else
1101         if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1102                 RAWCPPFLAGS=-undef
1103                 AC_MSG_RESULT([yes])
1104         # under Cygwin unix is still defined even with -undef
1105         elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1106                 RAWCPPFLAGS="-undef -ansi"
1107                 AC_MSG_RESULT([yes, with -ansi])
1108         else
1109                 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1110         fi
1111 fi
1112 rm -f conftest.$ac_ext
1113
1114 AC_MSG_CHECKING([if $RAWCPP requires -traditional])
1115 AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
1116 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1117         AC_MSG_RESULT([no])
1118 else
1119         if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1120                 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1121                 AC_MSG_RESULT([yes])
1122         else
1123                 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1124         fi
1125 fi
1126 rm -f conftest.$ac_ext
1127 AC_SUBST(RAWCPPFLAGS)
1128 ]) # XORG_PROG_RAWCPP
1129
1130 # XORG_MANPAGE_SECTIONS()
1131 # -----------------------
1132 # Minimum version: 1.0.0
1133 #
1134 # Determine which sections man pages go in for the different man page types
1135 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1136 # Not sure if there's any better way than just hardcoding by OS name.
1137 # Override default settings by setting environment variables
1138 # Added MAN_SUBSTS in version 1.8
1139 # Added AC_PROG_SED in version 1.8
1140
1141 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1142 AC_REQUIRE([AC_CANONICAL_HOST])
1143 AC_REQUIRE([AC_PROG_SED])
1144
1145 if test x$APP_MAN_SUFFIX = x    ; then
1146     APP_MAN_SUFFIX=1
1147 fi
1148 if test x$APP_MAN_DIR = x    ; then
1149     APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1150 fi
1151
1152 if test x$LIB_MAN_SUFFIX = x    ; then
1153     LIB_MAN_SUFFIX=3
1154 fi
1155 if test x$LIB_MAN_DIR = x    ; then
1156     LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1157 fi
1158
1159 if test x$FILE_MAN_SUFFIX = x    ; then
1160     case $host_os in
1161         solaris*)       FILE_MAN_SUFFIX=4  ;;
1162         *)              FILE_MAN_SUFFIX=5  ;;
1163     esac
1164 fi
1165 if test x$FILE_MAN_DIR = x    ; then
1166     FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1167 fi
1168
1169 if test x$MISC_MAN_SUFFIX = x    ; then
1170     case $host_os in
1171         solaris*)       MISC_MAN_SUFFIX=5  ;;
1172         *)              MISC_MAN_SUFFIX=7  ;;
1173     esac
1174 fi
1175 if test x$MISC_MAN_DIR = x    ; then
1176     MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1177 fi
1178
1179 if test x$DRIVER_MAN_SUFFIX = x    ; then
1180     case $host_os in
1181         solaris*)       DRIVER_MAN_SUFFIX=7  ;;
1182         *)              DRIVER_MAN_SUFFIX=4  ;;
1183     esac
1184 fi
1185 if test x$DRIVER_MAN_DIR = x    ; then
1186     DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1187 fi
1188
1189 if test x$ADMIN_MAN_SUFFIX = x    ; then
1190     case $host_os in
1191         solaris*)       ADMIN_MAN_SUFFIX=1m ;;
1192         *)              ADMIN_MAN_SUFFIX=8  ;;
1193     esac
1194 fi
1195 if test x$ADMIN_MAN_DIR = x    ; then
1196     ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1197 fi
1198
1199
1200 AC_SUBST([APP_MAN_SUFFIX])
1201 AC_SUBST([LIB_MAN_SUFFIX])
1202 AC_SUBST([FILE_MAN_SUFFIX])
1203 AC_SUBST([MISC_MAN_SUFFIX])
1204 AC_SUBST([DRIVER_MAN_SUFFIX])
1205 AC_SUBST([ADMIN_MAN_SUFFIX])
1206 AC_SUBST([APP_MAN_DIR])
1207 AC_SUBST([LIB_MAN_DIR])
1208 AC_SUBST([FILE_MAN_DIR])
1209 AC_SUBST([MISC_MAN_DIR])
1210 AC_SUBST([DRIVER_MAN_DIR])
1211 AC_SUBST([ADMIN_MAN_DIR])
1212
1213 XORG_MAN_PAGE="X Version 11"
1214 AC_SUBST([XORG_MAN_PAGE])
1215 MAN_SUBSTS="\
1216         -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1217         -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1218         -e 's|__xservername__|Xorg|g' \
1219         -e 's|__xconfigfile__|xorg.conf|g' \
1220         -e 's|__projectroot__|\$(prefix)|g' \
1221         -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
1222         -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
1223         -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
1224         -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
1225         -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
1226         -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
1227 AC_SUBST([MAN_SUBSTS])
1228
1229 ]) # XORG_MANPAGE_SECTIONS
1230
1231 # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
1232 # ------------------------
1233 # Minimum version: 1.7.0
1234 #
1235 # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1236 # provided by xorg-sgml-doctools, if installed.
1237 AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1238 AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
1239 XORG_SGML_PATH=
1240 PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
1241     [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1242     [m4_ifval([$1],[:],
1243         [if test x"$cross_compiling" != x"yes" ; then
1244             AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1245                           [XORG_SGML_PATH=$prefix/share/sgml])
1246          fi])
1247     ])
1248
1249 # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
1250 # the path and the name of the doc stylesheet
1251 if test "x$XORG_SGML_PATH" != "x" ; then
1252    AC_MSG_RESULT([$XORG_SGML_PATH])
1253    STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
1254    XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
1255 else
1256    AC_MSG_RESULT([no])
1257 fi
1258
1259 AC_SUBST(XORG_SGML_PATH)
1260 AC_SUBST(STYLESHEET_SRCDIR)
1261 AC_SUBST(XSL_STYLESHEET)
1262 AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1263 ]) # XORG_CHECK_SGML_DOCTOOLS
1264
1265 # XORG_CHECK_LINUXDOC
1266 # -------------------
1267 # Minimum version: 1.0.0
1268 #
1269 # Defines the variable MAKE_TEXT if the necessary tools and
1270 # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1271 # Whether or not the necessary tools and files are found can be checked
1272 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
1273 AC_DEFUN([XORG_CHECK_LINUXDOC],[
1274 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1275 AC_REQUIRE([XORG_WITH_PS2PDF])
1276
1277 AC_PATH_PROG(LINUXDOC, linuxdoc)
1278
1279 AC_MSG_CHECKING([whether to build documentation])
1280
1281 if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1282    BUILDDOC=yes
1283 else
1284    BUILDDOC=no
1285 fi
1286
1287 AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1288
1289 AC_MSG_RESULT([$BUILDDOC])
1290
1291 AC_MSG_CHECKING([whether to build pdf documentation])
1292
1293 if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1294    BUILDPDFDOC=yes
1295 else
1296    BUILDPDFDOC=no
1297 fi
1298
1299 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1300
1301 AC_MSG_RESULT([$BUILDPDFDOC])
1302
1303 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1304 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1305 MAKE_PDF="$PS2PDF"
1306 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1307
1308 AC_SUBST(MAKE_TEXT)
1309 AC_SUBST(MAKE_PS)
1310 AC_SUBST(MAKE_PDF)
1311 AC_SUBST(MAKE_HTML)
1312 ]) # XORG_CHECK_LINUXDOC
1313
1314 # XORG_CHECK_DOCBOOK
1315 # -------------------
1316 # Minimum version: 1.0.0
1317 #
1318 # Checks for the ability to build output formats from SGML DocBook source.
1319 # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1320 # indicates whether the necessary tools and files are found and, if set,
1321 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
1322 AC_DEFUN([XORG_CHECK_DOCBOOK],[
1323 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1324
1325 BUILDTXTDOC=no
1326 BUILDPDFDOC=no
1327 BUILDPSDOC=no
1328 BUILDHTMLDOC=no
1329
1330 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
1331 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1332 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
1333 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1334
1335 AC_MSG_CHECKING([whether to build text documentation])
1336 if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1337    test x$BUILD_TXTDOC != xno; then
1338         BUILDTXTDOC=yes
1339 fi
1340 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1341 AC_MSG_RESULT([$BUILDTXTDOC])
1342
1343 AC_MSG_CHECKING([whether to build PDF documentation])
1344 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1345    test x$BUILD_PDFDOC != xno; then
1346         BUILDPDFDOC=yes
1347 fi
1348 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1349 AC_MSG_RESULT([$BUILDPDFDOC])
1350
1351 AC_MSG_CHECKING([whether to build PostScript documentation])
1352 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1353    test x$BUILD_PSDOC != xno; then
1354         BUILDPSDOC=yes
1355 fi
1356 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1357 AC_MSG_RESULT([$BUILDPSDOC])
1358
1359 AC_MSG_CHECKING([whether to build HTML documentation])
1360 if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1361    test x$BUILD_HTMLDOC != xno; then
1362         BUILDHTMLDOC=yes
1363 fi
1364 AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1365 AC_MSG_RESULT([$BUILDHTMLDOC])
1366
1367 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1368 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1369 MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1370 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1371
1372 AC_SUBST(MAKE_TEXT)
1373 AC_SUBST(MAKE_PS)
1374 AC_SUBST(MAKE_PDF)
1375 AC_SUBST(MAKE_HTML)
1376 ]) # XORG_CHECK_DOCBOOK
1377
1378 # XORG_WITH_XMLTO([MIN-VERSION])
1379 # ----------------
1380 # Minimum version: 1.5.0
1381 #
1382 # Documentation tools are not always available on all platforms and sometimes
1383 # not at the appropriate level. This macro enables a module to test for the
1384 # presence of the tool and obtain it's path in separate variables. Coupled with
1385 # the --with-xmlto option, it allows maximum flexibilty in making decisions
1386 # as whether or not to use the xmlto package.
1387 #
1388 # Interface to module:
1389 # HAVE_XMLTO:   used in makefiles to conditionally generate documentation
1390 # XMLTO:        returns the path of the xmlto program found
1391 #               returns the path set by the user in the environment
1392 # --with-xmlto: 'yes' user instructs the module to use xmlto
1393 #               'no' user instructs the module not to use xmlto
1394 #
1395 # Added in version 1.10.0
1396 # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
1397 #                  xmlto for text output requires either lynx, links, or w3m browsers
1398 #
1399 # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1400 #
1401 AC_DEFUN([XORG_WITH_XMLTO],[
1402 AC_ARG_VAR([XMLTO], [Path to xmlto command])
1403 AC_ARG_WITH(xmlto,
1404         AS_HELP_STRING([--with-xmlto],
1405            [Use xmlto to regenerate documentation (default: yes, if installed)]),
1406            [use_xmlto=$withval], [use_xmlto=auto])
1407
1408 if test "x$use_xmlto" = x"auto"; then
1409    AC_PATH_PROG([XMLTO], [xmlto])
1410    if test "x$XMLTO" = "x"; then
1411         AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1412         have_xmlto=no
1413    else
1414         have_xmlto=yes
1415    fi
1416 elif test "x$use_xmlto" = x"yes" ; then
1417    AC_PATH_PROG([XMLTO], [xmlto])
1418    if test "x$XMLTO" = "x"; then
1419         AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1420    fi
1421    have_xmlto=yes
1422 elif test "x$use_xmlto" = x"no" ; then
1423    if test "x$XMLTO" != "x"; then
1424       AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1425    fi
1426    have_xmlto=no
1427 else
1428    AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1429 fi
1430
1431 # Test for a minimum version of xmlto, if provided.
1432 m4_ifval([$1],
1433 [if test "$have_xmlto" = yes; then
1434     # scrape the xmlto version
1435     AC_MSG_CHECKING([the xmlto version])
1436     xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1437     AC_MSG_RESULT([$xmlto_version])
1438     AS_VERSION_COMPARE([$xmlto_version], [$1],
1439         [if test "x$use_xmlto" = xauto; then
1440             AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1441             have_xmlto=no
1442         else
1443             AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1444         fi])
1445 fi])
1446
1447 # Test for the ability of xmlto to generate a text target
1448 have_xmlto_text=no
1449 cat > conftest.xml << "EOF"
1450 EOF
1451 AS_IF([test "$have_xmlto" = yes],
1452       [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1453              [have_xmlto_text=yes],
1454              [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
1455 rm -f conftest.xml
1456 AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1457 AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1458 ]) # XORG_WITH_XMLTO
1459
1460 # XORG_WITH_ASCIIDOC([MIN-VERSION])
1461 # ----------------
1462 # Minimum version: 1.5.0
1463 #
1464 # Documentation tools are not always available on all platforms and sometimes
1465 # not at the appropriate level. This macro enables a module to test for the
1466 # presence of the tool and obtain it's path in separate variables. Coupled with
1467 # the --with-asciidoc option, it allows maximum flexibilty in making decisions
1468 # as whether or not to use the asciidoc package.
1469 #
1470 # Interface to module:
1471 # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1472 # ASCIIDOC:      returns the path of the asciidoc program found
1473 #                returns the path set by the user in the environment
1474 # --with-asciidoc: 'yes' user instructs the module to use asciidoc
1475 #                 'no' user instructs the module not to use asciidoc
1476 #
1477 # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1478 #
1479 AC_DEFUN([XORG_WITH_ASCIIDOC],[
1480 AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1481 AC_ARG_WITH(asciidoc,
1482         AS_HELP_STRING([--with-asciidoc],
1483            [Use asciidoc to regenerate documentation (default: yes, if installed)]),
1484            [use_asciidoc=$withval], [use_asciidoc=auto])
1485
1486 if test "x$use_asciidoc" = x"auto"; then
1487    AC_PATH_PROG([ASCIIDOC], [asciidoc])
1488    if test "x$ASCIIDOC" = "x"; then
1489         AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1490         have_asciidoc=no
1491    else
1492         have_asciidoc=yes
1493    fi
1494 elif test "x$use_asciidoc" = x"yes" ; then
1495    AC_PATH_PROG([ASCIIDOC], [asciidoc])
1496    if test "x$ASCIIDOC" = "x"; then
1497         AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1498    fi
1499    have_asciidoc=yes
1500 elif test "x$use_asciidoc" = x"no" ; then
1501    if test "x$ASCIIDOC" != "x"; then
1502       AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1503    fi
1504    have_asciidoc=no
1505 else
1506    AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1507 fi
1508 m4_ifval([$1],
1509 [if test "$have_asciidoc" = yes; then
1510     # scrape the asciidoc version
1511     AC_MSG_CHECKING([the asciidoc version])
1512     asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1513     AC_MSG_RESULT([$asciidoc_version])
1514     AS_VERSION_COMPARE([$asciidoc_version], [$1],
1515         [if test "x$use_asciidoc" = xauto; then
1516             AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1517             have_asciidoc=no
1518         else
1519             AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1520         fi])
1521 fi])
1522 AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1523 ]) # XORG_WITH_ASCIIDOC
1524
1525 # XORG_WITH_DOXYGEN([MIN-VERSION])
1526 # --------------------------------
1527 # Minimum version: 1.5.0
1528 #
1529 # Documentation tools are not always available on all platforms and sometimes
1530 # not at the appropriate level. This macro enables a module to test for the
1531 # presence of the tool and obtain it's path in separate variables. Coupled with
1532 # the --with-doxygen option, it allows maximum flexibilty in making decisions
1533 # as whether or not to use the doxygen package.
1534 #
1535 # Interface to module:
1536 # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1537 # DOXYGEN:       returns the path of the doxygen program found
1538 #                returns the path set by the user in the environment
1539 # --with-doxygen: 'yes' user instructs the module to use doxygen
1540 #                 'no' user instructs the module not to use doxygen
1541 #
1542 # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1543 #
1544 AC_DEFUN([XORG_WITH_DOXYGEN],[
1545 AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1546 AC_ARG_WITH(doxygen,
1547         AS_HELP_STRING([--with-doxygen],
1548            [Use doxygen to regenerate documentation (default: yes, if installed)]),
1549            [use_doxygen=$withval], [use_doxygen=auto])
1550
1551 if test "x$use_doxygen" = x"auto"; then
1552    AC_PATH_PROG([DOXYGEN], [doxygen])
1553    if test "x$DOXYGEN" = "x"; then
1554         AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1555         have_doxygen=no
1556    else
1557         have_doxygen=yes
1558    fi
1559 elif test "x$use_doxygen" = x"yes" ; then
1560    AC_PATH_PROG([DOXYGEN], [doxygen])
1561    if test "x$DOXYGEN" = "x"; then
1562         AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1563    fi
1564    have_doxygen=yes
1565 elif test "x$use_doxygen" = x"no" ; then
1566    if test "x$DOXYGEN" != "x"; then
1567       AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1568    fi
1569    have_doxygen=no
1570 else
1571    AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1572 fi
1573 m4_ifval([$1],
1574 [if test "$have_doxygen" = yes; then
1575     # scrape the doxygen version
1576     AC_MSG_CHECKING([the doxygen version])
1577     doxygen_version=`$DOXYGEN --version 2>/dev/null`
1578     AC_MSG_RESULT([$doxygen_version])
1579     AS_VERSION_COMPARE([$doxygen_version], [$1],
1580         [if test "x$use_doxygen" = xauto; then
1581             AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1582             have_doxygen=no
1583         else
1584             AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1585         fi])
1586 fi])
1587 AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1588 ]) # XORG_WITH_DOXYGEN
1589
1590 # XORG_WITH_GROFF
1591 # ----------------
1592 # Minimum version: 1.6.0
1593 #
1594 # Documentation tools are not always available on all platforms and sometimes
1595 # not at the appropriate level. This macro enables a module to test for the
1596 # presence of the tool and obtain it's path in separate variables. Coupled with
1597 # the --with-groff option, it allows maximum flexibilty in making decisions
1598 # as whether or not to use the groff package.
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 AC_ARG_WITH(groff,
1628         AS_HELP_STRING([--with-groff],
1629            [Use groff to regenerate documentation (default: yes, if installed)]),
1630            [use_groff=$withval], [use_groff=auto])
1631
1632 if test "x$use_groff" = x"auto"; then
1633    AC_PATH_PROG([GROFF], [groff])
1634    if test "x$GROFF" = "x"; then
1635         AC_MSG_WARN([groff not found - documentation targets will be skipped])
1636         have_groff=no
1637    else
1638         have_groff=yes
1639    fi
1640 elif test "x$use_groff" = x"yes" ; then
1641    AC_PATH_PROG([GROFF], [groff])
1642    if test "x$GROFF" = "x"; then
1643         AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1644    fi
1645    have_groff=yes
1646 elif test "x$use_groff" = x"no" ; then
1647    if test "x$GROFF" != "x"; then
1648       AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1649    fi
1650    have_groff=no
1651 else
1652    AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1653 fi
1654
1655 # We have groff, test for the presence of the macro packages
1656 if test "x$have_groff" = x"yes"; then
1657     AC_MSG_CHECKING([for ${GROFF} -ms macros])
1658     if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1659         groff_ms_works=yes
1660     else
1661         groff_ms_works=no
1662     fi
1663     AC_MSG_RESULT([$groff_ms_works])
1664     AC_MSG_CHECKING([for ${GROFF} -mm macros])
1665     if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1666         groff_mm_works=yes
1667     else
1668         groff_mm_works=no
1669     fi
1670     AC_MSG_RESULT([$groff_mm_works])
1671 fi
1672
1673 # We have groff, test for HTML dependencies, one command per package
1674 if test "x$have_groff" = x"yes"; then
1675    AC_PATH_PROGS(GS_PATH, [gs gswin32c])
1676    AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
1677    AC_PATH_PROG(PSSELECT_PATH, [psselect])
1678    if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1679       have_groff_html=yes
1680    else
1681       have_groff_html=no
1682       AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
1683    fi
1684 fi
1685
1686 # Set Automake conditionals for Makefiles
1687 AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1688 AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1689 AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1690 AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1691 ]) # XORG_WITH_GROFF
1692
1693 # XORG_WITH_FOP
1694 # ----------------
1695 # Minimum version: 1.6.0
1696 #
1697 # Documentation tools are not always available on all platforms and sometimes
1698 # not at the appropriate level. This macro enables a module to test for the
1699 # presence of the tool and obtain it's path in separate variables. Coupled with
1700 # the --with-fop option, it allows maximum flexibilty in making decisions
1701 # as whether or not to use the fop package.
1702 #
1703 # Interface to module:
1704 # HAVE_FOP:     used in makefiles to conditionally generate documentation
1705 # FOP:          returns the path of the fop program found
1706 #               returns the path set by the user in the environment
1707 # --with-fop:   'yes' user instructs the module to use fop
1708 #               'no' user instructs the module not to use fop
1709 #
1710 # If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1711 #
1712 AC_DEFUN([XORG_WITH_FOP],[
1713 AC_ARG_VAR([FOP], [Path to fop command])
1714 AC_ARG_WITH(fop,
1715         AS_HELP_STRING([--with-fop],
1716            [Use fop to regenerate documentation (default: yes, if installed)]),
1717            [use_fop=$withval], [use_fop=auto])
1718
1719 if test "x$use_fop" = x"auto"; then
1720    AC_PATH_PROG([FOP], [fop])
1721    if test "x$FOP" = "x"; then
1722         AC_MSG_WARN([fop not found - documentation targets will be skipped])
1723         have_fop=no
1724    else
1725         have_fop=yes
1726    fi
1727 elif test "x$use_fop" = x"yes" ; then
1728    AC_PATH_PROG([FOP], [fop])
1729    if test "x$FOP" = "x"; then
1730         AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1731    fi
1732    have_fop=yes
1733 elif test "x$use_fop" = x"no" ; then
1734    if test "x$FOP" != "x"; then
1735       AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1736    fi
1737    have_fop=no
1738 else
1739    AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1740 fi
1741 AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1742 ]) # XORG_WITH_FOP
1743
1744 # XORG_WITH_PS2PDF
1745 # ----------------
1746 # Minimum version: 1.6.0
1747 #
1748 # Documentation tools are not always available on all platforms and sometimes
1749 # not at the appropriate level. This macro enables a module to test for the
1750 # presence of the tool and obtain it's path in separate variables. Coupled with
1751 # the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1752 # as whether or not to use the ps2pdf package.
1753 #
1754 # Interface to module:
1755 # HAVE_PS2PDF:  used in makefiles to conditionally generate documentation
1756 # PS2PDF:       returns the path of the ps2pdf program found
1757 #               returns the path set by the user in the environment
1758 # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1759 #                'no' user instructs the module not to use ps2pdf
1760 #
1761 # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1762 #
1763 AC_DEFUN([XORG_WITH_PS2PDF],[
1764 AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1765 AC_ARG_WITH(ps2pdf,
1766         AS_HELP_STRING([--with-ps2pdf],
1767            [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
1768            [use_ps2pdf=$withval], [use_ps2pdf=auto])
1769
1770 if test "x$use_ps2pdf" = x"auto"; then
1771    AC_PATH_PROG([PS2PDF], [ps2pdf])
1772    if test "x$PS2PDF" = "x"; then
1773         AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1774         have_ps2pdf=no
1775    else
1776         have_ps2pdf=yes
1777    fi
1778 elif test "x$use_ps2pdf" = x"yes" ; then
1779    AC_PATH_PROG([PS2PDF], [ps2pdf])
1780    if test "x$PS2PDF" = "x"; then
1781         AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1782    fi
1783    have_ps2pdf=yes
1784 elif test "x$use_ps2pdf" = x"no" ; then
1785    if test "x$PS2PDF" != "x"; then
1786       AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1787    fi
1788    have_ps2pdf=no
1789 else
1790    AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1791 fi
1792 AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1793 ]) # XORG_WITH_PS2PDF
1794
1795 # XORG_ENABLE_DOCS (enable_docs=yes)
1796 # ----------------
1797 # Minimum version: 1.6.0
1798 #
1799 # Documentation tools are not always available on all platforms and sometimes
1800 # not at the appropriate level. This macro enables a builder to skip all
1801 # documentation targets except traditional man pages.
1802 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1803 # maximum flexibilty in controlling documentation building.
1804 # Refer to:
1805 # XORG_WITH_XMLTO         --with-xmlto
1806 # XORG_WITH_ASCIIDOC      --with-asciidoc
1807 # XORG_WITH_DOXYGEN       --with-doxygen
1808 # XORG_WITH_FOP           --with-fop
1809 # XORG_WITH_GROFF         --with-groff
1810 # XORG_WITH_PS2PDF        --with-ps2pdf
1811 #
1812 # Interface to module:
1813 # ENABLE_DOCS:    used in makefiles to conditionally generate documentation
1814 # --enable-docs: 'yes' user instructs the module to generate docs
1815 #                'no' user instructs the module not to generate docs
1816 # parm1:        specify the default value, yes or no.
1817 #
1818 AC_DEFUN([XORG_ENABLE_DOCS],[
1819 default=$1
1820 if test "x$default" = x ; then
1821   default="yes"
1822 fi
1823 AC_ARG_ENABLE(docs,
1824         AS_HELP_STRING([--enable-docs],
1825            [Enable building the documentation (default: yes)]),
1826            [build_docs=$enableval], [build_docs=$default])
1827 AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1828 AC_MSG_CHECKING([whether to build documentation])
1829 AC_MSG_RESULT([$build_docs])
1830 ]) # XORG_ENABLE_DOCS
1831
1832 # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1833 # ----------------
1834 # Minimum version: 1.6.0
1835 #
1836 # This macro enables a builder to skip all developer documentation.
1837 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1838 # maximum flexibilty in controlling documentation building.
1839 # Refer to:
1840 # XORG_WITH_XMLTO         --with-xmlto
1841 # XORG_WITH_ASCIIDOC      --with-asciidoc
1842 # XORG_WITH_DOXYGEN       --with-doxygen
1843 # XORG_WITH_FOP           --with-fop
1844 # XORG_WITH_GROFF         --with-groff
1845 # XORG_WITH_PS2PDF        --with-ps2pdf
1846 #
1847 # Interface to module:
1848 # ENABLE_DEVEL_DOCS:    used in makefiles to conditionally generate developer docs
1849 # --enable-devel-docs:  'yes' user instructs the module to generate developer docs
1850 #                       'no' user instructs the module not to generate developer docs
1851 # parm1:                specify the default value, yes or no.
1852 #
1853 AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1854 devel_default=$1
1855 if test "x$devel_default" = x ; then
1856   devel_default="yes"
1857 fi
1858 AC_ARG_ENABLE(devel-docs,
1859         AS_HELP_STRING([--enable-devel-docs],
1860            [Enable building the developer documentation (default: yes)]),
1861            [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
1862 AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1863 AC_MSG_CHECKING([whether to build developer documentation])
1864 AC_MSG_RESULT([$build_devel_docs])
1865 ]) # XORG_ENABLE_DEVEL_DOCS
1866
1867 # XORG_ENABLE_SPECS (enable_specs=yes)
1868 # ----------------
1869 # Minimum version: 1.6.0
1870 #
1871 # This macro enables a builder to skip all functional specification targets.
1872 # Combined with the specific tool checking macros XORG_WITH_*, it provides
1873 # maximum flexibilty in controlling documentation building.
1874 # Refer to:
1875 # XORG_WITH_XMLTO         --with-xmlto
1876 # XORG_WITH_ASCIIDOC      --with-asciidoc
1877 # XORG_WITH_DOXYGEN       --with-doxygen
1878 # XORG_WITH_FOP           --with-fop
1879 # XORG_WITH_GROFF         --with-groff
1880 # XORG_WITH_PS2PDF        --with-ps2pdf
1881 #
1882 # Interface to module:
1883 # ENABLE_SPECS:         used in makefiles to conditionally generate specs
1884 # --enable-specs:       'yes' user instructs the module to generate specs
1885 #                       'no' user instructs the module not to generate specs
1886 # parm1:                specify the default value, yes or no.
1887 #
1888 AC_DEFUN([XORG_ENABLE_SPECS],[
1889 spec_default=$1
1890 if test "x$spec_default" = x ; then
1891   spec_default="yes"
1892 fi
1893 AC_ARG_ENABLE(specs,
1894         AS_HELP_STRING([--enable-specs],
1895            [Enable building the specs (default: yes)]),
1896            [build_specs=$enableval], [build_specs=$spec_default])
1897 AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1898 AC_MSG_CHECKING([whether to build functional specifications])
1899 AC_MSG_RESULT([$build_specs])
1900 ]) # XORG_ENABLE_SPECS
1901
1902 # XORG_CHECK_MALLOC_ZERO
1903 # ----------------------
1904 # Minimum version: 1.0.0
1905 #
1906 # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1907 # malloc(0) returns NULL.  Packages should add one of these cflags to
1908 # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1909 AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1910 AC_ARG_ENABLE(malloc0returnsnull,
1911         AS_HELP_STRING([--enable-malloc0returnsnull],
1912                        [malloc(0) returns NULL (default: auto)]),
1913         [MALLOC_ZERO_RETURNS_NULL=$enableval],
1914         [MALLOC_ZERO_RETURNS_NULL=auto])
1915
1916 AC_MSG_CHECKING([whether malloc(0) returns NULL])
1917 if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1918         AC_RUN_IFELSE([
1919 char *malloc();
1920 char *realloc();
1921 char *calloc();
1922 main() {
1923     char *m0, *r0, *c0, *p;
1924     m0 = malloc(0);
1925     p = malloc(10);
1926     r0 = realloc(p,0);
1927     c0 = calloc(0);
1928     exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1929 }],
1930                 [MALLOC_ZERO_RETURNS_NULL=yes],
1931                 [MALLOC_ZERO_RETURNS_NULL=no],
1932                 [MALLOC_ZERO_RETURNS_NULL=yes])
1933 fi
1934 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1935
1936 if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1937         MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1938         XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1939         XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1940 else
1941         MALLOC_ZERO_CFLAGS=""
1942         XMALLOC_ZERO_CFLAGS=""
1943         XTMALLOC_ZERO_CFLAGS=""
1944 fi
1945
1946 AC_SUBST([MALLOC_ZERO_CFLAGS])
1947 AC_SUBST([XMALLOC_ZERO_CFLAGS])
1948 AC_SUBST([XTMALLOC_ZERO_CFLAGS])
1949 ]) # XORG_CHECK_MALLOC_ZERO
1950
1951 # XORG_WITH_LINT()
1952 # ----------------
1953 # Minimum version: 1.1.0
1954 #
1955 # This macro enables the use of a tool that flags some suspicious and
1956 # non-portable constructs (likely to be bugs) in C language source code.
1957 # It will attempt to locate the tool and use appropriate options.
1958 # There are various lint type tools on different platforms.
1959 #
1960 # Interface to module:
1961 # LINT:         returns the path to the tool found on the platform
1962 #               or the value set to LINT on the configure cmd line
1963 #               also an Automake conditional
1964 # LINT_FLAGS:   an Automake variable with appropriate flags
1965 #
1966 # --with-lint:  'yes' user instructs the module to use lint
1967 #               'no' user instructs the module not to use lint (default)
1968 #
1969 # If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
1970 # If the user sets the value of LINT_FLAGS, they are used verbatim.
1971 #
1972 AC_DEFUN([XORG_WITH_LINT],[
1973
1974 AC_ARG_VAR([LINT], [Path to a lint-style command])
1975 AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
1976 AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1977                 [Use a lint-style source code checker (default: disabled)])],
1978                 [use_lint=$withval], [use_lint=no])
1979
1980 # Obtain platform specific info like program name and options
1981 # The lint program on FreeBSD and NetBSD is different from the one on Solaris
1982 case $host_os in
1983   *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
1984         lint_name=splint
1985         lint_options="-badflag"
1986         ;;
1987   *freebsd* | *netbsd*)
1988         lint_name=lint
1989         lint_options="-u -b"
1990         ;;
1991   *solaris*)
1992         lint_name=lint
1993         lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1994         ;;
1995 esac
1996
1997 # Test for the presence of the program (either guessed by the code or spelled out by the user)
1998 if test "x$use_lint" = x"yes" ; then
1999    AC_PATH_PROG([LINT], [$lint_name])
2000    if test "x$LINT" = "x"; then
2001         AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
2002    fi
2003 elif test "x$use_lint" = x"no" ; then
2004    if test "x$LINT" != "x"; then
2005       AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
2006    fi
2007 else
2008    AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
2009 fi
2010
2011 # User supplied flags override default flags
2012 if test "x$LINT_FLAGS" != "x"; then
2013    lint_options=$LINT_FLAGS
2014 fi
2015
2016 AC_SUBST([LINT_FLAGS],[$lint_options])
2017 AM_CONDITIONAL(LINT, [test "x$LINT" != x])
2018
2019 ]) # XORG_WITH_LINT
2020
2021 # XORG_LINT_LIBRARY(LIBNAME)
2022 # --------------------------
2023 # Minimum version: 1.1.0
2024 #
2025 # Sets up flags for building lint libraries for checking programs that call
2026 # functions in the library.
2027 #
2028 # Interface to module:
2029 # LINTLIB               - Automake variable with the name of lint library file to make
2030 # MAKE_LINT_LIB         - Automake conditional
2031 #
2032 # --enable-lint-library:  - 'yes' user instructs the module to created a lint library
2033 #                         - 'no' user instructs the module not to create a lint library (default)
2034
2035 AC_DEFUN([XORG_LINT_LIBRARY],[
2036 AC_REQUIRE([XORG_WITH_LINT])
2037 AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
2038         [Create lint library (default: disabled)])],
2039         [make_lint_lib=$enableval], [make_lint_lib=no])
2040
2041 if test "x$make_lint_lib" = x"yes" ; then
2042    LINTLIB=llib-l$1.ln
2043    if test "x$LINT" = "x"; then
2044         AC_MSG_ERROR([Cannot make lint library without --with-lint])
2045    fi
2046 elif test "x$make_lint_lib" != x"no" ; then
2047    AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
2048 fi
2049
2050 AC_SUBST(LINTLIB)
2051 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2052
2053 ]) # XORG_LINT_LIBRARY
2054
2055 # XORG_CWARNFLAGS
2056 # ---------------
2057 # Minimum version: 1.2.0
2058 #
2059 # Defines CWARNFLAGS to enable C compiler warnings.
2060 #
2061 AC_DEFUN([XORG_CWARNFLAGS], [
2062 AC_REQUIRE([AC_PROG_CC_C99])
2063 if  test "x$GCC" = xyes ; then
2064     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
2065 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
2066 -Wbad-function-cast -Wformat=2"
2067     case `$CC -dumpversion` in
2068     3.4.* | 4.*)
2069         CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
2070         ;;
2071     esac
2072 else
2073     AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2074     if test "x$SUNCC" = "xyes"; then
2075         CWARNFLAGS="-v"
2076     fi
2077 fi
2078 AC_SUBST(CWARNFLAGS)
2079 ]) # XORG_CWARNFLAGS
2080
2081 # XORG_STRICT_OPTION
2082 # -----------------------
2083 # Minimum version: 1.3.0
2084 #
2085 # Add configure option to enable strict compilation
2086 AC_DEFUN([XORG_STRICT_OPTION], [
2087 # If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
2088 AC_REQUIRE([AC_PROG_CC_C99])
2089 AC_REQUIRE([XORG_CWARNFLAGS])
2090
2091 AC_ARG_ENABLE(strict-compilation,
2092                           AS_HELP_STRING([--enable-strict-compilation],
2093                           [Enable all warnings from compiler and make them errors (default: disabled)]),
2094                           [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
2095 if test "x$STRICT_COMPILE" = "xyes"; then
2096         AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2097         AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
2098         if test "x$GCC" = xyes ; then
2099                 STRICT_CFLAGS="-pedantic -Werror"
2100         elif test "x$SUNCC" = "xyes"; then
2101                 STRICT_CFLAGS="-errwarn"
2102     elif test "x$INTELCC" = "xyes"; then
2103                 STRICT_CFLAGS="-Werror"
2104         fi
2105 fi
2106 CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
2107 AC_SUBST([CWARNFLAGS])
2108 ]) # XORG_STRICT_OPTION
2109
2110 # XORG_DEFAULT_OPTIONS
2111 # --------------------
2112 # Minimum version: 1.3.0
2113 #
2114 # Defines default options for X.Org modules.
2115 #
2116 AC_DEFUN([XORG_DEFAULT_OPTIONS], [
2117 AC_REQUIRE([AC_PROG_INSTALL])
2118 XORG_CWARNFLAGS
2119 XORG_STRICT_OPTION
2120 XORG_RELEASE_VERSION
2121 XORG_CHANGELOG
2122 XORG_INSTALL
2123 XORG_MANPAGE_SECTIONS
2124 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
2125     [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
2126 ]) # XORG_DEFAULT_OPTIONS
2127
2128 # XORG_INSTALL()
2129 # ----------------
2130 # Minimum version: 1.4.0
2131 #
2132 # Defines the variable INSTALL_CMD as the command to copy
2133 # INSTALL from $prefix/share/util-macros.
2134 #
2135 AC_DEFUN([XORG_INSTALL], [
2136 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2137 macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
2138 INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
2139 mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
2140 || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
2141 echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
2142 AC_SUBST([INSTALL_CMD])
2143 ]) # XORG_INSTALL
2144 dnl Copyright 2005 Red Hat, Inc
2145 dnl
2146 dnl Permission to use, copy, modify, distribute, and sell this software and its
2147 dnl documentation for any purpose is hereby granted without fee, provided that
2148 dnl the above copyright notice appear in all copies and that both that
2149 dnl copyright notice and this permission notice appear in supporting
2150 dnl documentation.
2151 dnl
2152 dnl The above copyright notice and this permission notice shall be included
2153 dnl in all copies or substantial portions of the Software.
2154 dnl
2155 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2156 dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2157 dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2158 dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2159 dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2160 dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2161 dnl OTHER DEALINGS IN THE SOFTWARE.
2162 dnl
2163 dnl Except as contained in this notice, the name of the copyright holders shall
2164 dnl not be used in advertising or otherwise to promote the sale, use or
2165 dnl other dealings in this Software without prior written authorization
2166 dnl from the copyright holders.
2167 dnl
2168
2169 # XORG_RELEASE_VERSION
2170 # --------------------
2171 # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2172  
2173 AC_DEFUN([XORG_RELEASE_VERSION],[
2174         AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
2175                 [`echo $PACKAGE_VERSION | cut -d . -f 1`],
2176                 [Major version of this package])
2177         PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
2178         if test "x$PVM" = "x"; then
2179                 PVM="0"
2180         fi
2181         AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
2182                 [$PVM],
2183                 [Minor version of this package])
2184         PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
2185         if test "x$PVP" = "x"; then
2186                 PVP="0"
2187         fi
2188         AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
2189                 [$PVP],
2190                 [Patch version of this package])
2191 ])
2192
2193 # XORG_CHANGELOG()
2194 # ----------------
2195 # Minimum version: 1.2.0
2196 #
2197 # Defines the variable CHANGELOG_CMD as the command to generate
2198 # ChangeLog from git.
2199 #
2200 #
2201 AC_DEFUN([XORG_CHANGELOG], [
2202 CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
2203 mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
2204 || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
2205 echo 'git directory not found: installing possibly empty changelog.' >&2)"
2206 AC_SUBST([CHANGELOG_CMD])
2207 ]) # XORG_CHANGELOG
2208
2209 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2210
2211 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
2212 #
2213 # This program is free software; you can redistribute it and/or modify
2214 # it under the terms of the GNU General Public License as published by
2215 # the Free Software Foundation; either version 2 of the License, or
2216 # (at your option) any later version.
2217 #
2218 # This program is distributed in the hope that it will be useful, but
2219 # WITHOUT ANY WARRANTY; without even the implied warranty of
2220 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2221 # General Public License for more details.
2222 #
2223 # You should have received a copy of the GNU General Public License
2224 # along with this program; if not, write to the Free Software
2225 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2226 #
2227 # As a special exception to the GNU General Public License, if you
2228 # distribute this file as part of a program that contains a
2229 # configuration script generated by Autoconf, you may include it under
2230 # the same distribution terms that you use for the rest of that program.
2231
2232 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
2233 # ----------------------------------
2234 AC_DEFUN([PKG_PROG_PKG_CONFIG],
2235 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2236 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
2237 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
2238 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2239         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2240 fi
2241 if test -n "$PKG_CONFIG"; then
2242         _pkg_min_version=m4_default([$1], [0.9.0])
2243         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2244         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2245                 AC_MSG_RESULT([yes])
2246         else
2247                 AC_MSG_RESULT([no])
2248                 PKG_CONFIG=""
2249         fi
2250                 
2251 fi[]dnl
2252 ])# PKG_PROG_PKG_CONFIG
2253
2254 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2255 #
2256 # Check to see whether a particular set of modules exists.  Similar
2257 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
2258 #
2259 #
2260 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
2261 # this or PKG_CHECK_MODULES is called, or make sure to call
2262 # PKG_CHECK_EXISTS manually
2263 # --------------------------------------------------------------
2264 AC_DEFUN([PKG_CHECK_EXISTS],
2265 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2266 if test -n "$PKG_CONFIG" && \
2267     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2268   m4_ifval([$2], [$2], [:])
2269 m4_ifvaln([$3], [else
2270   $3])dnl
2271 fi])
2272
2273
2274 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2275 # ---------------------------------------------
2276 m4_define([_PKG_CONFIG],
2277 [if test -n "$$1"; then
2278     pkg_cv_[]$1="$$1"
2279  elif test -n "$PKG_CONFIG"; then
2280     PKG_CHECK_EXISTS([$3],
2281                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2282                      [pkg_failed=yes])
2283  else
2284     pkg_failed=untried
2285 fi[]dnl
2286 ])# _PKG_CONFIG
2287
2288 # _PKG_SHORT_ERRORS_SUPPORTED
2289 # -----------------------------
2290 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2291 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2292 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2293         _pkg_short_errors_supported=yes
2294 else
2295         _pkg_short_errors_supported=no
2296 fi[]dnl
2297 ])# _PKG_SHORT_ERRORS_SUPPORTED
2298
2299
2300 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2301 # [ACTION-IF-NOT-FOUND])
2302 #
2303 #
2304 # Note that if there is a possibility the first call to
2305 # PKG_CHECK_MODULES might not happen, you should be sure to include an
2306 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2307 #
2308 #
2309 # --------------------------------------------------------------
2310 AC_DEFUN([PKG_CHECK_MODULES],
2311 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2312 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2313 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2314
2315 pkg_failed=no
2316 AC_MSG_CHECKING([for $1])
2317
2318 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2319 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
2320
2321 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2322 and $1[]_LIBS to avoid the need to call pkg-config.
2323 See the pkg-config man page for more details.])
2324
2325 if test $pkg_failed = yes; then
2326         _PKG_SHORT_ERRORS_SUPPORTED
2327         if test $_pkg_short_errors_supported = yes; then
2328                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2329         else 
2330                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2331         fi
2332         # Put the nasty error message in config.log where it belongs
2333         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2334
2335         ifelse([$4], , [AC_MSG_ERROR(dnl
2336 [Package requirements ($2) were not met:
2337
2338 $$1_PKG_ERRORS
2339
2340 Consider adjusting the PKG_CONFIG_PATH environment variable if you
2341 installed software in a non-standard prefix.
2342
2343 _PKG_TEXT
2344 ])],
2345                 [AC_MSG_RESULT([no])
2346                 $4])
2347 elif test $pkg_failed = untried; then
2348         ifelse([$4], , [AC_MSG_FAILURE(dnl
2349 [The pkg-config script could not be found or is too old.  Make sure it
2350 is in your PATH or set the PKG_CONFIG environment variable to the full
2351 path to pkg-config.
2352
2353 _PKG_TEXT
2354
2355 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
2356                 [$4])
2357 else
2358         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2359         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2360         AC_MSG_RESULT([yes])
2361         ifelse([$3], , :, [$3])
2362 fi[]dnl
2363 ])# PKG_CHECK_MODULES
2364
2365 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2366 #
2367 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2368 #                 2006, 2007, 2008 Free Software Foundation, Inc.
2369 #   Written by Gordon Matzigkeit, 1996
2370 #
2371 # This file is free software; the Free Software Foundation gives
2372 # unlimited permission to copy and/or distribute it, with or without
2373 # modifications, as long as this notice is preserved.
2374
2375 m4_define([_LT_COPYING], [dnl
2376 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2377 #                 2006, 2007, 2008 Free Software Foundation, Inc.
2378 #   Written by Gordon Matzigkeit, 1996
2379 #
2380 #   This file is part of GNU Libtool.
2381 #
2382 # GNU Libtool is free software; you can redistribute it and/or
2383 # modify it under the terms of the GNU General Public License as
2384 # published by the Free Software Foundation; either version 2 of
2385 # the License, or (at your option) any later version.
2386 #
2387 # As a special exception to the GNU General Public License,
2388 # if you distribute this file as part of a program or library that
2389 # is built using GNU Libtool, you may include this file under the
2390 # same distribution terms that you use for the rest of that program.
2391 #
2392 # GNU Libtool is distributed in the hope that it will be useful,
2393 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2394 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2395 # GNU General Public License for more details.
2396 #
2397 # You should have received a copy of the GNU General Public License
2398 # along with GNU Libtool; see the file COPYING.  If not, a copy
2399 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2400 # obtained by writing to the Free Software Foundation, Inc.,
2401 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2402 ])
2403
2404 # serial 56 LT_INIT
2405
2406
2407 # LT_PREREQ(VERSION)
2408 # ------------------
2409 # Complain and exit if this libtool version is less that VERSION.
2410 m4_defun([LT_PREREQ],
2411 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2412        [m4_default([$3],
2413                    [m4_fatal([Libtool version $1 or higher is required],
2414                              63)])],
2415        [$2])])
2416
2417
2418 # _LT_CHECK_BUILDDIR
2419 # ------------------
2420 # Complain if the absolute build directory name contains unusual characters
2421 m4_defun([_LT_CHECK_BUILDDIR],
2422 [case `pwd` in
2423   *\ * | *\     *)
2424     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2425 esac
2426 ])
2427
2428
2429 # LT_INIT([OPTIONS])
2430 # ------------------
2431 AC_DEFUN([LT_INIT],
2432 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2433 AC_BEFORE([$0], [LT_LANG])dnl
2434 AC_BEFORE([$0], [LT_OUTPUT])dnl
2435 AC_BEFORE([$0], [LTDL_INIT])dnl
2436 m4_require([_LT_CHECK_BUILDDIR])dnl
2437
2438 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2439 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2440 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2441 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2442 dnl unless we require an AC_DEFUNed macro:
2443 AC_REQUIRE([LTOPTIONS_VERSION])dnl
2444 AC_REQUIRE([LTSUGAR_VERSION])dnl
2445 AC_REQUIRE([LTVERSION_VERSION])dnl
2446 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2447 m4_require([_LT_PROG_LTMAIN])dnl
2448
2449 dnl Parse OPTIONS
2450 _LT_SET_OPTIONS([$0], [$1])
2451
2452 # This can be used to rebuild libtool when needed
2453 LIBTOOL_DEPS="$ltmain"
2454
2455 # Always use our own libtool.
2456 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2457 AC_SUBST(LIBTOOL)dnl
2458
2459 _LT_SETUP
2460
2461 # Only expand once:
2462 m4_define([LT_INIT])
2463 ])# LT_INIT
2464
2465 # Old names:
2466 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2467 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2468 dnl aclocal-1.4 backwards compatibility:
2469 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2470 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2471
2472
2473 # _LT_CC_BASENAME(CC)
2474 # -------------------
2475 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2476 m4_defun([_LT_CC_BASENAME],
2477 [for cc_temp in $1""; do
2478   case $cc_temp in
2479     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2480     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2481     \-*) ;;
2482     *) break;;
2483   esac
2484 done
2485 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
2486 ])
2487
2488
2489 # _LT_FILEUTILS_DEFAULTS
2490 # ----------------------
2491 # It is okay to use these file commands and assume they have been set
2492 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2493 m4_defun([_LT_FILEUTILS_DEFAULTS],
2494 [: ${CP="cp -f"}
2495 : ${MV="mv -f"}
2496 : ${RM="rm -f"}
2497 ])# _LT_FILEUTILS_DEFAULTS
2498
2499
2500 # _LT_SETUP
2501 # ---------
2502 m4_defun([_LT_SETUP],
2503 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2504 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2505 _LT_DECL([], [host_alias], [0], [The host system])dnl
2506 _LT_DECL([], [host], [0])dnl
2507 _LT_DECL([], [host_os], [0])dnl
2508 dnl
2509 _LT_DECL([], [build_alias], [0], [The build system])dnl
2510 _LT_DECL([], [build], [0])dnl
2511 _LT_DECL([], [build_os], [0])dnl
2512 dnl
2513 AC_REQUIRE([AC_PROG_CC])dnl
2514 AC_REQUIRE([LT_PATH_LD])dnl
2515 AC_REQUIRE([LT_PATH_NM])dnl
2516 dnl
2517 AC_REQUIRE([AC_PROG_LN_S])dnl
2518 test -z "$LN_S" && LN_S="ln -s"
2519 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2520 dnl
2521 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2522 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2523 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2524 dnl
2525 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2526 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2527 m4_require([_LT_CMD_RELOAD])dnl
2528 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2529 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2530 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2531
2532 _LT_CONFIG_LIBTOOL_INIT([
2533 # See if we are running on zsh, and set the options which allow our
2534 # commands through without removal of \ escapes INIT.
2535 if test -n "\${ZSH_VERSION+set}" ; then
2536    setopt NO_GLOB_SUBST
2537 fi
2538 ])
2539 if test -n "${ZSH_VERSION+set}" ; then
2540    setopt NO_GLOB_SUBST
2541 fi
2542
2543 _LT_CHECK_OBJDIR
2544
2545 m4_require([_LT_TAG_COMPILER])dnl
2546 _LT_PROG_ECHO_BACKSLASH
2547
2548 case $host_os in
2549 aix3*)
2550   # AIX sometimes has problems with the GCC collect2 program.  For some
2551   # reason, if we set the COLLECT_NAMES environment variable, the problems
2552   # vanish in a puff of smoke.
2553   if test "X${COLLECT_NAMES+set}" != Xset; then
2554     COLLECT_NAMES=
2555     export COLLECT_NAMES
2556   fi
2557   ;;
2558 esac
2559
2560 # Sed substitution that helps us do robust quoting.  It backslashifies
2561 # metacharacters that are still active within double-quoted strings.
2562 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2563
2564 # Same as above, but do not quote variable references.
2565 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2566
2567 # Sed substitution to delay expansion of an escaped shell variable in a
2568 # double_quote_subst'ed string.
2569 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2570
2571 # Sed substitution to delay expansion of an escaped single quote.
2572 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2573
2574 # Sed substitution to avoid accidental globbing in evaled expressions
2575 no_glob_subst='s/\*/\\\*/g'
2576
2577 # Global variables:
2578 ofile=libtool
2579 can_build_shared=yes
2580
2581 # All known linkers require a `.a' archive for static linking (except MSVC,
2582 # which needs '.lib').
2583 libext=a
2584
2585 with_gnu_ld="$lt_cv_prog_gnu_ld"
2586
2587 old_CC="$CC"
2588 old_CFLAGS="$CFLAGS"
2589
2590 # Set sane defaults for various variables
2591 test -z "$CC" && CC=cc
2592 test -z "$LTCC" && LTCC=$CC
2593 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2594 test -z "$LD" && LD=ld
2595 test -z "$ac_objext" && ac_objext=o
2596
2597 _LT_CC_BASENAME([$compiler])
2598
2599 # Only perform the check for file, if the check method requires it
2600 test -z "$MAGIC_CMD" && MAGIC_CMD=file
2601 case $deplibs_check_method in
2602 file_magic*)
2603   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2604     _LT_PATH_MAGIC
2605   fi
2606   ;;
2607 esac
2608
2609 # Use C for the default configuration in the libtool script
2610 LT_SUPPORTED_TAG([CC])
2611 _LT_LANG_C_CONFIG
2612 _LT_LANG_DEFAULT_CONFIG
2613 _LT_CONFIG_COMMANDS
2614 ])# _LT_SETUP
2615
2616
2617 # _LT_PROG_LTMAIN
2618 # ---------------
2619 # Note that this code is called both from `configure', and `config.status'
2620 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2621 # `config.status' has no value for ac_aux_dir unless we are using Automake,
2622 # so we pass a copy along to make sure it has a sensible value anyway.
2623 m4_defun([_LT_PROG_LTMAIN],
2624 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2625 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2626 ltmain="$ac_aux_dir/ltmain.sh"
2627 ])# _LT_PROG_LTMAIN
2628
2629
2630
2631 # So that we can recreate a full libtool script including additional
2632 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2633 # in macros and then make a single call at the end using the `libtool'
2634 # label.
2635
2636
2637 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2638 # ----------------------------------------
2639 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2640 m4_define([_LT_CONFIG_LIBTOOL_INIT],
2641 [m4_ifval([$1],
2642           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2643                      [$1
2644 ])])])
2645
2646 # Initialize.
2647 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2648
2649
2650 # _LT_CONFIG_LIBTOOL([COMMANDS])
2651 # ------------------------------
2652 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2653 m4_define([_LT_CONFIG_LIBTOOL],
2654 [m4_ifval([$1],
2655           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2656                      [$1
2657 ])])])
2658
2659 # Initialize.
2660 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2661
2662
2663 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2664 # -----------------------------------------------------
2665 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2666 [_LT_CONFIG_LIBTOOL([$1])
2667 _LT_CONFIG_LIBTOOL_INIT([$2])
2668 ])
2669
2670
2671 # _LT_FORMAT_COMMENT([COMMENT])
2672 # -----------------------------
2673 # Add leading comment marks to the start of each line, and a trailing
2674 # full-stop to the whole comment if one is not present already.
2675 m4_define([_LT_FORMAT_COMMENT],
2676 [m4_ifval([$1], [
2677 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2678               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2679 )])
2680
2681
2682
2683
2684
2685 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2686 # -------------------------------------------------------------------
2687 # CONFIGNAME is the name given to the value in the libtool script.
2688 # VARNAME is the (base) name used in the configure script.
2689 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2690 # VARNAME.  Any other value will be used directly.
2691 m4_define([_LT_DECL],
2692 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2693     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2694         [m4_ifval([$1], [$1], [$2])])
2695     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2696     m4_ifval([$4],
2697         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2698     lt_dict_add_subkey([lt_decl_dict], [$2],
2699         [tagged?], [m4_ifval([$5], [yes], [no])])])
2700 ])
2701
2702
2703 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2704 # --------------------------------------------------------
2705 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2706
2707
2708 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2709 # ------------------------------------------------
2710 m4_define([lt_decl_tag_varnames],
2711 [_lt_decl_filter([tagged?], [yes], $@)])
2712
2713
2714 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2715 # ---------------------------------------------------------
2716 m4_define([_lt_decl_filter],
2717 [m4_case([$#],
2718   [0], [m4_fatal([$0: too few arguments: $#])],
2719   [1], [m4_fatal([$0: too few arguments: $#: $1])],
2720   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2721   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2722   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2723 ])
2724
2725
2726 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2727 # --------------------------------------------------
2728 m4_define([lt_decl_quote_varnames],
2729 [_lt_decl_filter([value], [1], $@)])
2730
2731
2732 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2733 # ---------------------------------------------------
2734 m4_define([lt_decl_dquote_varnames],
2735 [_lt_decl_filter([value], [2], $@)])
2736
2737
2738 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2739 # ---------------------------------------------------
2740 m4_define([lt_decl_varnames_tagged],
2741 [m4_assert([$# <= 2])dnl
2742 _$0(m4_quote(m4_default([$1], [[, ]])),
2743     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2744     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2745 m4_define([_lt_decl_varnames_tagged],
2746 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2747
2748
2749 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2750 # ------------------------------------------------
2751 m4_define([lt_decl_all_varnames],
2752 [_$0(m4_quote(m4_default([$1], [[, ]])),
2753      m4_if([$2], [],
2754            m4_quote(lt_decl_varnames),
2755         m4_quote(m4_shift($@))))[]dnl
2756 ])
2757 m4_define([_lt_decl_all_varnames],
2758 [lt_join($@, lt_decl_varnames_tagged([$1],
2759                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2760 ])
2761
2762
2763 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
2764 # ------------------------------------
2765 # Quote a variable value, and forward it to `config.status' so that its
2766 # declaration there will have the same value as in `configure'.  VARNAME
2767 # must have a single quote delimited value for this to work.
2768 m4_define([_LT_CONFIG_STATUS_DECLARE],
2769 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
2770
2771
2772 # _LT_CONFIG_STATUS_DECLARATIONS
2773 # ------------------------------
2774 # We delimit libtool config variables with single quotes, so when
2775 # we write them to config.status, we have to be sure to quote all
2776 # embedded single quotes properly.  In configure, this macro expands
2777 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2778 #
2779 #    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
2780 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2781 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2782     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2783
2784
2785 # _LT_LIBTOOL_TAGS
2786 # ----------------
2787 # Output comment and list of tags supported by the script
2788 m4_defun([_LT_LIBTOOL_TAGS],
2789 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2790 available_tags="_LT_TAGS"dnl
2791 ])
2792
2793
2794 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2795 # -----------------------------------
2796 # Extract the dictionary values for VARNAME (optionally with TAG) and
2797 # expand to a commented shell variable setting:
2798 #
2799 #    # Some comment about what VAR is for.
2800 #    visible_name=$lt_internal_name
2801 m4_define([_LT_LIBTOOL_DECLARE],
2802 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2803                                            [description])))[]dnl
2804 m4_pushdef([_libtool_name],
2805     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2806 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2807     [0], [_libtool_name=[$]$1],
2808     [1], [_libtool_name=$lt_[]$1],
2809     [2], [_libtool_name=$lt_[]$1],
2810     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2811 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2812 ])
2813
2814
2815 # _LT_LIBTOOL_CONFIG_VARS
2816 # -----------------------
2817 # Produce commented declarations of non-tagged libtool config variables
2818 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2819 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2820 # section) are produced by _LT_LIBTOOL_TAG_VARS.
2821 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2822 [m4_foreach([_lt_var],
2823     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2824     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2825
2826
2827 # _LT_LIBTOOL_TAG_VARS(TAG)
2828 # -------------------------
2829 m4_define([_LT_LIBTOOL_TAG_VARS],
2830 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2831     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2832
2833
2834 # _LT_TAGVAR(VARNAME, [TAGNAME])
2835 # ------------------------------
2836 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2837
2838
2839 # _LT_CONFIG_COMMANDS
2840 # -------------------
2841 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2842 # variables for single and double quote escaping we saved from calls
2843 # to _LT_DECL, we can put quote escaped variables declarations
2844 # into `config.status', and then the shell code to quote escape them in
2845 # for loops in `config.status'.  Finally, any additional code accumulated
2846 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2847 m4_defun([_LT_CONFIG_COMMANDS],
2848 [AC_PROVIDE_IFELSE([LT_OUTPUT],
2849         dnl If the libtool generation code has been placed in $CONFIG_LT,
2850         dnl instead of duplicating it all over again into config.status,
2851         dnl then we will have config.status run $CONFIG_LT later, so it
2852         dnl needs to know what name is stored there:
2853         [AC_CONFIG_COMMANDS([libtool],
2854             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2855     dnl If the libtool generation code is destined for config.status,
2856     dnl expand the accumulated commands and init code now:
2857     [AC_CONFIG_COMMANDS([libtool],
2858         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2859 ])#_LT_CONFIG_COMMANDS
2860
2861
2862 # Initialize.
2863 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2864 [
2865
2866 # The HP-UX ksh and POSIX shell print the target directory to stdout
2867 # if CDPATH is set.
2868 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2869
2870 sed_quote_subst='$sed_quote_subst'
2871 double_quote_subst='$double_quote_subst'
2872 delay_variable_subst='$delay_variable_subst'
2873 _LT_CONFIG_STATUS_DECLARATIONS
2874 LTCC='$LTCC'
2875 LTCFLAGS='$LTCFLAGS'
2876 compiler='$compiler_DEFAULT'
2877
2878 # Quote evaled strings.
2879 for var in lt_decl_all_varnames([[ \
2880 ]], lt_decl_quote_varnames); do
2881     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2882     *[[\\\\\\\`\\"\\\$]]*)
2883       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2884       ;;
2885     *)
2886       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2887       ;;
2888     esac
2889 done
2890
2891 # Double-quote double-evaled strings.
2892 for var in lt_decl_all_varnames([[ \
2893 ]], lt_decl_dquote_varnames); do
2894     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2895     *[[\\\\\\\`\\"\\\$]]*)
2896       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2897       ;;
2898     *)
2899       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2900       ;;
2901     esac
2902 done
2903
2904 # Fix-up fallback echo if it was mangled by the above quoting rules.
2905 case \$lt_ECHO in
2906 *'\\\[$]0 --fallback-echo"')dnl "
2907   lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
2908   ;;
2909 esac
2910
2911 _LT_OUTPUT_LIBTOOL_INIT
2912 ])
2913
2914
2915 # LT_OUTPUT
2916 # ---------
2917 # This macro allows early generation of the libtool script (before
2918 # AC_OUTPUT is called), incase it is used in configure for compilation
2919 # tests.
2920 AC_DEFUN([LT_OUTPUT],
2921 [: ${CONFIG_LT=./config.lt}
2922 AC_MSG_NOTICE([creating $CONFIG_LT])
2923 cat >"$CONFIG_LT" <<_LTEOF
2924 #! $SHELL
2925 # Generated by $as_me.
2926 # Run this file to recreate a libtool stub with the current configuration.
2927
2928 lt_cl_silent=false
2929 SHELL=\${CONFIG_SHELL-$SHELL}
2930 _LTEOF
2931
2932 cat >>"$CONFIG_LT" <<\_LTEOF
2933 AS_SHELL_SANITIZE
2934 _AS_PREPARE
2935
2936 exec AS_MESSAGE_FD>&1
2937 exec AS_MESSAGE_LOG_FD>>config.log
2938 {
2939   echo
2940   AS_BOX([Running $as_me.])
2941 } >&AS_MESSAGE_LOG_FD
2942
2943 lt_cl_help="\
2944 \`$as_me' creates a local libtool stub from the current configuration,
2945 for use in further configure time tests before the real libtool is
2946 generated.
2947
2948 Usage: $[0] [[OPTIONS]]
2949
2950   -h, --help      print this help, then exit
2951   -V, --version   print version number, then exit
2952   -q, --quiet     do not print progress messages
2953   -d, --debug     don't remove temporary files
2954
2955 Report bugs to <bug-libtool@gnu.org>."
2956
2957 lt_cl_version="\
2958 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2959 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2960 configured by $[0], generated by m4_PACKAGE_STRING.
2961
2962 Copyright (C) 2008 Free Software Foundation, Inc.
2963 This config.lt script is free software; the Free Software Foundation
2964 gives unlimited permision to copy, distribute and modify it."
2965
2966 while test $[#] != 0
2967 do
2968   case $[1] in
2969     --version | --v* | -V )
2970       echo "$lt_cl_version"; exit 0 ;;
2971     --help | --h* | -h )
2972       echo "$lt_cl_help"; exit 0 ;;
2973     --debug | --d* | -d )
2974       debug=: ;;
2975     --quiet | --q* | --silent | --s* | -q )
2976       lt_cl_silent=: ;;
2977
2978     -*) AC_MSG_ERROR([unrecognized option: $[1]
2979 Try \`$[0] --help' for more information.]) ;;
2980
2981     *) AC_MSG_ERROR([unrecognized argument: $[1]
2982 Try \`$[0] --help' for more information.]) ;;
2983   esac
2984   shift
2985 done
2986
2987 if $lt_cl_silent; then
2988   exec AS_MESSAGE_FD>/dev/null
2989 fi
2990 _LTEOF
2991
2992 cat >>"$CONFIG_LT" <<_LTEOF
2993 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2994 _LTEOF
2995
2996 cat >>"$CONFIG_LT" <<\_LTEOF
2997 AC_MSG_NOTICE([creating $ofile])
2998 _LT_OUTPUT_LIBTOOL_COMMANDS
2999 AS_EXIT(0)
3000 _LTEOF
3001 chmod +x "$CONFIG_LT"
3002
3003 # configure is writing to config.log, but config.lt does its own redirection,
3004 # appending to config.log, which fails on DOS, as config.log is still kept
3005 # open by configure.  Here we exec the FD to /dev/null, effectively closing
3006 # config.log, so it can be properly (re)opened and appended to by config.lt.
3007 if test "$no_create" != yes; then
3008   lt_cl_success=:
3009   test "$silent" = yes &&
3010     lt_config_lt_args="$lt_config_lt_args --quiet"
3011   exec AS_MESSAGE_LOG_FD>/dev/null
3012   $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
3013   exec AS_MESSAGE_LOG_FD>>config.log
3014   $lt_cl_success || AS_EXIT(1)
3015 fi
3016 ])# LT_OUTPUT
3017
3018
3019 # _LT_CONFIG(TAG)
3020 # ---------------
3021 # If TAG is the built-in tag, create an initial libtool script with a
3022 # default configuration from the untagged config vars.  Otherwise add code
3023 # to config.status for appending the configuration named by TAG from the
3024 # matching tagged config vars.
3025 m4_defun([_LT_CONFIG],
3026 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3027 _LT_CONFIG_SAVE_COMMANDS([
3028   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
3029   m4_if(_LT_TAG, [C], [
3030     # See if we are running on zsh, and set the options which allow our
3031     # commands through without removal of \ escapes.
3032     if test -n "${ZSH_VERSION+set}" ; then
3033       setopt NO_GLOB_SUBST
3034     fi
3035
3036     cfgfile="${ofile}T"
3037     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
3038     $RM "$cfgfile"
3039
3040     cat <<_LT_EOF >> "$cfgfile"
3041 #! $SHELL
3042
3043 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3044 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
3045 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3046 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3047 #
3048 _LT_COPYING
3049 _LT_LIBTOOL_TAGS
3050
3051 # ### BEGIN LIBTOOL CONFIG
3052 _LT_LIBTOOL_CONFIG_VARS
3053 _LT_LIBTOOL_TAG_VARS
3054 # ### END LIBTOOL CONFIG
3055
3056 _LT_EOF
3057
3058   case $host_os in
3059   aix3*)
3060     cat <<\_LT_EOF >> "$cfgfile"
3061 # AIX sometimes has problems with the GCC collect2 program.  For some
3062 # reason, if we set the COLLECT_NAMES environment variable, the problems
3063 # vanish in a puff of smoke.
3064 if test "X${COLLECT_NAMES+set}" != Xset; then
3065   COLLECT_NAMES=
3066   export COLLECT_NAMES
3067 fi
3068 _LT_EOF
3069     ;;
3070   esac
3071
3072   _LT_PROG_LTMAIN
3073
3074   # We use sed instead of cat because bash on DJGPP gets confused if
3075   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3076   # text mode, it properly converts lines to CR/LF.  This bash problem
3077   # is reportedly fixed, but why not run on old versions too?
3078   sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
3079     || (rm -f "$cfgfile"; exit 1)
3080
3081   _LT_PROG_XSI_SHELLFNS
3082
3083   sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
3084     || (rm -f "$cfgfile"; exit 1)
3085
3086   mv -f "$cfgfile" "$ofile" ||
3087     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3088   chmod +x "$ofile"
3089 ],
3090 [cat <<_LT_EOF >> "$ofile"
3091
3092 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
3093 dnl in a comment (ie after a #).
3094 # ### BEGIN LIBTOOL TAG CONFIG: $1
3095 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
3096 # ### END LIBTOOL TAG CONFIG: $1
3097 _LT_EOF
3098 ])dnl /m4_if
3099 ],
3100 [m4_if([$1], [], [
3101     PACKAGE='$PACKAGE'
3102     VERSION='$VERSION'
3103     TIMESTAMP='$TIMESTAMP'
3104     RM='$RM'
3105     ofile='$ofile'], [])
3106 ])dnl /_LT_CONFIG_SAVE_COMMANDS
3107 ])# _LT_CONFIG
3108
3109
3110 # LT_SUPPORTED_TAG(TAG)
3111 # ---------------------
3112 # Trace this macro to discover what tags are supported by the libtool
3113 # --tag option, using:
3114 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
3115 AC_DEFUN([LT_SUPPORTED_TAG], [])
3116
3117
3118 # C support is built-in for now
3119 m4_define([_LT_LANG_C_enabled], [])
3120 m4_define([_LT_TAGS], [])
3121
3122
3123 # LT_LANG(LANG)
3124 # -------------
3125 # Enable libtool support for the given language if not already enabled.
3126 AC_DEFUN([LT_LANG],
3127 [AC_BEFORE([$0], [LT_OUTPUT])dnl
3128 m4_case([$1],
3129   [C],                  [_LT_LANG(C)],
3130   [C++],                [_LT_LANG(CXX)],
3131   [Java],               [_LT_LANG(GCJ)],
3132   [Fortran 77],         [_LT_LANG(F77)],
3133   [Fortran],            [_LT_LANG(FC)],
3134   [Windows Resource],   [_LT_LANG(RC)],
3135   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
3136     [_LT_LANG($1)],
3137     [m4_fatal([$0: unsupported language: "$1"])])])dnl
3138 ])# LT_LANG
3139
3140
3141 # _LT_LANG(LANGNAME)
3142 # ------------------
3143 m4_defun([_LT_LANG],
3144 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
3145   [LT_SUPPORTED_TAG([$1])dnl
3146   m4_append([_LT_TAGS], [$1 ])dnl
3147   m4_define([_LT_LANG_]$1[_enabled], [])dnl
3148   _LT_LANG_$1_CONFIG($1)])dnl
3149 ])# _LT_LANG
3150
3151
3152 # _LT_LANG_DEFAULT_CONFIG
3153 # -----------------------
3154 m4_defun([_LT_LANG_DEFAULT_CONFIG],
3155 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
3156   [LT_LANG(CXX)],
3157   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3158
3159 AC_PROVIDE_IFELSE([AC_PROG_F77],
3160   [LT_LANG(F77)],
3161   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3162
3163 AC_PROVIDE_IFELSE([AC_PROG_FC],
3164   [LT_LANG(FC)],
3165   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3166
3167 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3168 dnl pulling things in needlessly.
3169 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3170   [LT_LANG(GCJ)],
3171   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3172     [LT_LANG(GCJ)],
3173     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3174       [LT_LANG(GCJ)],
3175       [m4_ifdef([AC_PROG_GCJ],
3176         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3177        m4_ifdef([A][M_PROG_GCJ],
3178         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3179        m4_ifdef([LT_PROG_GCJ],
3180         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3181
3182 AC_PROVIDE_IFELSE([LT_PROG_RC],
3183   [LT_LANG(RC)],
3184   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3185 ])# _LT_LANG_DEFAULT_CONFIG
3186
3187 # Obsolete macros:
3188 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3189 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3190 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3191 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3192 dnl aclocal-1.4 backwards compatibility:
3193 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3194 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3195 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3196 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3197
3198
3199 # _LT_TAG_COMPILER
3200 # ----------------
3201 m4_defun([_LT_TAG_COMPILER],
3202 [AC_REQUIRE([AC_PROG_CC])dnl
3203
3204 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3205 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3206 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3207 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3208
3209 # If no C compiler was specified, use CC.
3210 LTCC=${LTCC-"$CC"}
3211
3212 # If no C compiler flags were specified, use CFLAGS.
3213 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3214
3215 # Allow CC to be a program name with arguments.
3216 compiler=$CC
3217 ])# _LT_TAG_COMPILER
3218
3219
3220 # _LT_COMPILER_BOILERPLATE
3221 # ------------------------
3222 # Check for compiler boilerplate output or warnings with
3223 # the simple compiler test code.
3224 m4_defun([_LT_COMPILER_BOILERPLATE],
3225 [m4_require([_LT_DECL_SED])dnl
3226 ac_outfile=conftest.$ac_objext
3227 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3228 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3229 _lt_compiler_boilerplate=`cat conftest.err`
3230 $RM conftest*
3231 ])# _LT_COMPILER_BOILERPLATE
3232
3233
3234 # _LT_LINKER_BOILERPLATE
3235 # ----------------------
3236 # Check for linker boilerplate output or warnings with
3237 # the simple link test code.
3238 m4_defun([_LT_LINKER_BOILERPLATE],
3239 [m4_require([_LT_DECL_SED])dnl
3240 ac_outfile=conftest.$ac_objext
3241 echo "$lt_simple_link_test_code" >conftest.$ac_ext
3242 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3243 _lt_linker_boilerplate=`cat conftest.err`
3244 $RM -r conftest*
3245 ])# _LT_LINKER_BOILERPLATE
3246
3247 # _LT_REQUIRED_DARWIN_CHECKS
3248 # -------------------------
3249 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3250   case $host_os in
3251     rhapsody* | darwin*)
3252     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3253     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3254     AC_CHECK_TOOL([LIPO], [lipo], [:])
3255     AC_CHECK_TOOL([OTOOL], [otool], [:])
3256     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3257     _LT_DECL([], [DSYMUTIL], [1],
3258       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3259     _LT_DECL([], [NMEDIT], [1],
3260       [Tool to change global to local symbols on Mac OS X])
3261     _LT_DECL([], [LIPO], [1],
3262       [Tool to manipulate fat objects and archives on Mac OS X])
3263     _LT_DECL([], [OTOOL], [1],
3264       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3265     _LT_DECL([], [OTOOL64], [1],
3266       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3267
3268     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3269       [lt_cv_apple_cc_single_mod=no
3270       if test -z "${LT_MULTI_MODULE}"; then
3271         # By default we will add the -single_module flag. You can override
3272         # by either setting the environment variable LT_MULTI_MODULE
3273         # non-empty at configure time, or by adding -multi_module to the
3274         # link flags.
3275         rm -rf libconftest.dylib*
3276         echo "int foo(void){return 1;}" > conftest.c
3277         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3278 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3279         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3280           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3281         _lt_result=$?
3282         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
3283           lt_cv_apple_cc_single_mod=yes
3284         else
3285           cat conftest.err >&AS_MESSAGE_LOG_FD
3286         fi
3287         rm -rf libconftest.dylib*
3288         rm -f conftest.*
3289       fi])
3290     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3291       [lt_cv_ld_exported_symbols_list],
3292       [lt_cv_ld_exported_symbols_list=no
3293       save_LDFLAGS=$LDFLAGS
3294       echo "_main" > conftest.sym
3295       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3296       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3297         [lt_cv_ld_exported_symbols_list=yes],
3298         [lt_cv_ld_exported_symbols_list=no])
3299         LDFLAGS="$save_LDFLAGS"
3300     ])
3301     case $host_os in
3302     rhapsody* | darwin1.[[012]])
3303       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3304     darwin1.*)
3305       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3306     darwin*) # darwin 5.x on
3307       # if running on 10.5 or later, the deployment target defaults
3308       # to the OS version, if on x86, and 10.4, the deployment
3309       # target defaults to 10.4. Don't you love it?
3310       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3311         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3312           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3313         10.[[012]]*)
3314           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3315         10.*)
3316           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3317       esac
3318     ;;
3319   esac
3320     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3321       _lt_dar_single_mod='$single_module'
3322     fi
3323     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3324       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3325     else
3326       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3327     fi
3328     if test "$DSYMUTIL" != ":"; then
3329       _lt_dsymutil='~$DSYMUTIL $lib || :'
3330     else
3331       _lt_dsymutil=
3332     fi
3333     ;;
3334   esac
3335 ])
3336
3337
3338 # _LT_DARWIN_LINKER_FEATURES
3339 # --------------------------
3340 # Checks for linker and compiler features on darwin
3341 m4_defun([_LT_DARWIN_LINKER_FEATURES],
3342 [
3343   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3344   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3345   _LT_TAGVAR(hardcode_direct, $1)=no
3346   _LT_TAGVAR(hardcode_automatic, $1)=yes
3347   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3348   _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3349   _LT_TAGVAR(link_all_deplibs, $1)=yes
3350   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3351   case $cc_basename in
3352      ifort*) _lt_dar_can_shared=yes ;;
3353      *) _lt_dar_can_shared=$GCC ;;
3354   esac
3355   if test "$_lt_dar_can_shared" = "yes"; then
3356     output_verbose_link_cmd=echo
3357     _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}"
3358     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3359     _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}"
3360     _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}"
3361     m4_if([$1], [CXX],
3362 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3363       _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}"
3364       _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}"
3365     fi
3366 ],[])
3367   else
3368   _LT_TAGVAR(ld_shlibs, $1)=no
3369   fi
3370 ])
3371
3372 # _LT_SYS_MODULE_PATH_AIX
3373 # -----------------------
3374 # Links a minimal program and checks the executable
3375 # for the system default hardcoded library path. In most cases,
3376 # this is /usr/lib:/lib, but when the MPI compilers are used
3377 # the location of the communication and MPI libs are included too.
3378 # If we don't find anything, use the default library path according
3379 # to the aix ld manual.
3380 m4_defun([_LT_SYS_MODULE_PATH_AIX],
3381 [m4_require([_LT_DECL_SED])dnl
3382 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
3383 lt_aix_libpath_sed='
3384     /Import File Strings/,/^$/ {
3385         /^0/ {
3386             s/^0  *\(.*\)$/\1/
3387             p
3388         }
3389     }'
3390 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3391 # Check for a 64-bit object if we didn't find anything.
3392 if test -z "$aix_libpath"; then
3393   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3394 fi],[])
3395 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3396 ])# _LT_SYS_MODULE_PATH_AIX
3397
3398
3399 # _LT_SHELL_INIT(ARG)
3400 # -------------------
3401 m4_define([_LT_SHELL_INIT],
3402 [ifdef([AC_DIVERSION_NOTICE],
3403              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
3404          [AC_DIVERT_PUSH(NOTICE)])
3405 $1
3406 AC_DIVERT_POP
3407 ])# _LT_SHELL_INIT
3408
3409
3410 # _LT_PROG_ECHO_BACKSLASH
3411 # -----------------------
3412 # Add some code to the start of the generated configure script which
3413 # will find an echo command which doesn't interpret backslashes.
3414 m4_defun([_LT_PROG_ECHO_BACKSLASH],
3415 [_LT_SHELL_INIT([
3416 # Check that we are running under the correct shell.
3417 SHELL=${CONFIG_SHELL-/bin/sh}
3418
3419 case X$lt_ECHO in
3420 X*--fallback-echo)
3421   # Remove one level of quotation (which was required for Make).
3422   ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
3423   ;;
3424 esac
3425
3426 ECHO=${lt_ECHO-echo}
3427 if test "X[$]1" = X--no-reexec; then
3428   # Discard the --no-reexec flag, and continue.
3429   shift
3430 elif test "X[$]1" = X--fallback-echo; then
3431   # Avoid inline document here, it may be left over
3432   :
3433 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
3434   # Yippee, $ECHO works!
3435   :
3436 else
3437   # Restart under the correct shell.
3438   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
3439 fi
3440
3441 if test "X[$]1" = X--fallback-echo; then
3442   # used as fallback echo
3443   shift
3444   cat <<_LT_EOF
3445 [$]*
3446 _LT_EOF
3447   exit 0
3448 fi
3449
3450 # The HP-UX ksh and POSIX shell print the target directory to stdout
3451 # if CDPATH is set.
3452 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3453
3454 if test -z "$lt_ECHO"; then
3455   if test "X${echo_test_string+set}" != Xset; then
3456     # find a string as large as possible, as long as the shell can cope with it
3457     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3458       # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3459       if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
3460          { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
3461       then
3462         break
3463       fi
3464     done
3465   fi
3466
3467   if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
3468      echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
3469      test "X$echo_testing_string" = "X$echo_test_string"; then
3470     :
3471   else
3472     # The Solaris, AIX, and Digital Unix default echo programs unquote
3473     # backslashes.  This makes it impossible to quote backslashes using
3474     #   echo "$something" | sed 's/\\/\\\\/g'
3475     #
3476     # So, first we look for a working echo in the user's PATH.
3477
3478     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3479     for dir in $PATH /usr/ucb; do
3480       IFS="$lt_save_ifs"
3481       if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3482          test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3483          echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3484          test "X$echo_testing_string" = "X$echo_test_string"; then
3485         ECHO="$dir/echo"
3486         break
3487       fi
3488     done
3489     IFS="$lt_save_ifs"
3490
3491     if test "X$ECHO" = Xecho; then
3492       # We didn't find a better echo, so look for alternatives.
3493       if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
3494          echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
3495          test "X$echo_testing_string" = "X$echo_test_string"; then
3496         # This shell has a builtin print -r that does the trick.
3497         ECHO='print -r'
3498       elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
3499            test "X$CONFIG_SHELL" != X/bin/ksh; then
3500         # If we have ksh, try running configure again with it.
3501         ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3502         export ORIGINAL_CONFIG_SHELL
3503         CONFIG_SHELL=/bin/ksh
3504         export CONFIG_SHELL
3505         exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
3506       else
3507         # Try using printf.
3508         ECHO='printf %s\n'
3509         if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
3510            echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
3511            test "X$echo_testing_string" = "X$echo_test_string"; then
3512           # Cool, printf works
3513           :
3514         elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3515              test "X$echo_testing_string" = 'X\t' &&
3516              echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3517              test "X$echo_testing_string" = "X$echo_test_string"; then
3518           CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
3519           export CONFIG_SHELL
3520           SHELL="$CONFIG_SHELL"
3521           export SHELL
3522           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
3523         elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3524              test "X$echo_testing_string" = 'X\t' &&
3525              echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3526              test "X$echo_testing_string" = "X$echo_test_string"; then
3527           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
3528         else
3529           # maybe with a smaller string...
3530           prev=:
3531
3532           for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
3533             if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
3534             then
3535               break
3536             fi
3537             prev="$cmd"
3538           done
3539
3540           if test "$prev" != 'sed 50q "[$]0"'; then
3541             echo_test_string=`eval $prev`
3542             export echo_test_string
3543             exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
3544           else
3545             # Oops.  We lost completely, so just stick with echo.
3546             ECHO=echo
3547           fi
3548         fi
3549       fi
3550     fi
3551   fi
3552 fi
3553
3554 # Copy echo and quote the copy suitably for passing to libtool from
3555 # the Makefile, instead of quoting the original, which is used later.
3556 lt_ECHO=$ECHO
3557 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
3558    lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
3559 fi
3560
3561 AC_SUBST(lt_ECHO)
3562 ])
3563 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3564 _LT_DECL([], [ECHO], [1],
3565     [An echo program that does not interpret backslashes])
3566 ])# _LT_PROG_ECHO_BACKSLASH
3567
3568
3569 # _LT_ENABLE_LOCK
3570 # ---------------
3571 m4_defun([_LT_ENABLE_LOCK],
3572 [AC_ARG_ENABLE([libtool-lock],
3573   [AS_HELP_STRING([--disable-libtool-lock],
3574     [avoid locking (might break parallel builds)])])
3575 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3576
3577 # Some flags need to be propagated to the compiler or linker for good
3578 # libtool support.
3579 case $host in
3580 ia64-*-hpux*)
3581   # Find out which ABI we are using.
3582   echo 'int i;' > conftest.$ac_ext
3583   if AC_TRY_EVAL(ac_compile); then
3584     case `/usr/bin/file conftest.$ac_objext` in
3585       *ELF-32*)
3586         HPUX_IA64_MODE="32"
3587         ;;
3588       *ELF-64*)
3589         HPUX_IA64_MODE="64"
3590         ;;
3591     esac
3592   fi
3593   rm -rf conftest*
3594   ;;
3595 *-*-irix6*)
3596   # Find out which ABI we are using.
3597   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3598   if AC_TRY_EVAL(ac_compile); then
3599     if test "$lt_cv_prog_gnu_ld" = yes; then
3600       case `/usr/bin/file conftest.$ac_objext` in
3601         *32-bit*)
3602           LD="${LD-ld} -melf32bsmip"
3603           ;;
3604         *N32*)
3605           LD="${LD-ld} -melf32bmipn32"
3606           ;;
3607         *64-bit*)
3608           LD="${LD-ld} -melf64bmip"
3609         ;;
3610       esac
3611     else
3612       case `/usr/bin/file conftest.$ac_objext` in
3613         *32-bit*)
3614           LD="${LD-ld} -32"
3615           ;;
3616         *N32*)
3617           LD="${LD-ld} -n32"
3618           ;;
3619         *64-bit*)
3620           LD="${LD-ld} -64"
3621           ;;
3622       esac
3623     fi
3624   fi
3625   rm -rf conftest*
3626   ;;
3627
3628 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3629 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3630   # Find out which ABI we are using.
3631   echo 'int i;' > conftest.$ac_ext
3632   if AC_TRY_EVAL(ac_compile); then
3633     case `/usr/bin/file conftest.o` in
3634       *32-bit*)
3635         case $host in
3636           x86_64-*kfreebsd*-gnu)
3637             LD="${LD-ld} -m elf_i386_fbsd"
3638             ;;
3639           x86_64-*linux*)
3640             LD="${LD-ld} -m elf_i386"
3641             ;;
3642           ppc64-*linux*|powerpc64-*linux*)
3643             LD="${LD-ld} -m elf32ppclinux"
3644             ;;
3645           s390x-*linux*)
3646             LD="${LD-ld} -m elf_s390"
3647             ;;
3648           sparc64-*linux*)
3649             LD="${LD-ld} -m elf32_sparc"
3650             ;;
3651         esac
3652         ;;
3653       *64-bit*)
3654         case $host in
3655           x86_64-*kfreebsd*-gnu)
3656             LD="${LD-ld} -m elf_x86_64_fbsd"
3657             ;;
3658           x86_64-*linux*)
3659             LD="${LD-ld} -m elf_x86_64"
3660             ;;
3661           ppc*-*linux*|powerpc*-*linux*)
3662             LD="${LD-ld} -m elf64ppc"
3663             ;;
3664           s390*-*linux*|s390*-*tpf*)
3665             LD="${LD-ld} -m elf64_s390"
3666             ;;
3667           sparc*-*linux*)
3668             LD="${LD-ld} -m elf64_sparc"
3669             ;;
3670         esac
3671         ;;
3672     esac
3673   fi
3674   rm -rf conftest*
3675   ;;
3676
3677 *-*-sco3.2v5*)
3678   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3679   SAVE_CFLAGS="$CFLAGS"
3680   CFLAGS="$CFLAGS -belf"
3681   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3682     [AC_LANG_PUSH(C)
3683      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3684      AC_LANG_POP])
3685   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3686     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3687     CFLAGS="$SAVE_CFLAGS"
3688   fi
3689   ;;
3690 sparc*-*solaris*)
3691   # Find out which ABI we are using.
3692   echo 'int i;' > conftest.$ac_ext
3693   if AC_TRY_EVAL(ac_compile); then
3694     case `/usr/bin/file conftest.o` in
3695     *64-bit*)
3696       case $lt_cv_prog_gnu_ld in
3697       yes*) LD="${LD-ld} -m elf64_sparc" ;;
3698       *)
3699         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3700           LD="${LD-ld} -64"
3701         fi
3702         ;;
3703       esac
3704       ;;
3705     esac
3706   fi
3707   rm -rf conftest*
3708   ;;
3709 esac
3710
3711 need_locks="$enable_libtool_lock"
3712 ])# _LT_ENABLE_LOCK
3713
3714
3715 # _LT_CMD_OLD_ARCHIVE
3716 # -------------------
3717 m4_defun([_LT_CMD_OLD_ARCHIVE],
3718 [AC_CHECK_TOOL(AR, ar, false)
3719 test -z "$AR" && AR=ar
3720 test -z "$AR_FLAGS" && AR_FLAGS=cru
3721 _LT_DECL([], [AR], [1], [The archiver])
3722 _LT_DECL([], [AR_FLAGS], [1])
3723
3724 AC_CHECK_TOOL(STRIP, strip, :)
3725 test -z "$STRIP" && STRIP=:
3726 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
3727
3728 AC_CHECK_TOOL(RANLIB, ranlib, :)
3729 test -z "$RANLIB" && RANLIB=:
3730 _LT_DECL([], [RANLIB], [1],
3731     [Commands used to install an old-style archive])
3732
3733 # Determine commands to create old-style static archives.
3734 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3735 old_postinstall_cmds='chmod 644 $oldlib'
3736 old_postuninstall_cmds=
3737
3738 if test -n "$RANLIB"; then
3739   case $host_os in
3740   openbsd*)
3741     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3742     ;;
3743   *)
3744     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3745     ;;
3746   esac
3747   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3748 fi
3749 _LT_DECL([], [old_postinstall_cmds], [2])
3750 _LT_DECL([], [old_postuninstall_cmds], [2])
3751 _LT_TAGDECL([], [old_archive_cmds], [2],
3752     [Commands used to build an old-style archive])
3753 ])# _LT_CMD_OLD_ARCHIVE
3754
3755
3756 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3757 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3758 # ----------------------------------------------------------------
3759 # Check whether the given compiler option works
3760 AC_DEFUN([_LT_COMPILER_OPTION],
3761 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3762 m4_require([_LT_DECL_SED])dnl
3763 AC_CACHE_CHECK([$1], [$2],
3764   [$2=no
3765    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3766    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3767    lt_compiler_flag="$3"
3768    # Insert the option either (1) after the last *FLAGS variable, or
3769    # (2) before a word containing "conftest.", or (3) at the end.
3770    # Note that $ac_compile itself does not contain backslashes and begins
3771    # with a dollar sign (not a hyphen), so the echo should work correctly.
3772    # The option is referenced via a variable to avoid confusing sed.
3773    lt_compile=`echo "$ac_compile" | $SED \
3774    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3775    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3776    -e 's:$: $lt_compiler_flag:'`
3777    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3778    (eval "$lt_compile" 2>conftest.err)
3779    ac_status=$?
3780    cat conftest.err >&AS_MESSAGE_LOG_FD
3781    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3782    if (exit $ac_status) && test -s "$ac_outfile"; then
3783      # The compiler can only warn and ignore the option if not recognized
3784      # So say no if there are warnings other than the usual output.
3785      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
3786      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3787      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3788        $2=yes
3789      fi
3790    fi
3791    $RM conftest*
3792 ])
3793
3794 if test x"[$]$2" = xyes; then
3795     m4_if([$5], , :, [$5])
3796 else
3797     m4_if([$6], , :, [$6])
3798 fi
3799 ])# _LT_COMPILER_OPTION
3800
3801 # Old name:
3802 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3803 dnl aclocal-1.4 backwards compatibility:
3804 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3805
3806
3807 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3808 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
3809 # ----------------------------------------------------
3810 # Check whether the given linker option works
3811 AC_DEFUN([_LT_LINKER_OPTION],
3812 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3813 m4_require([_LT_DECL_SED])dnl
3814 AC_CACHE_CHECK([$1], [$2],
3815   [$2=no
3816    save_LDFLAGS="$LDFLAGS"
3817    LDFLAGS="$LDFLAGS $3"
3818    echo "$lt_simple_link_test_code" > conftest.$ac_ext
3819    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3820      # The linker can only warn and ignore the option if not recognized
3821      # So say no if there are warnings
3822      if test -s conftest.err; then
3823        # Append any errors to the config.log.
3824        cat conftest.err 1>&AS_MESSAGE_LOG_FD
3825        $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
3826        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3827        if diff conftest.exp conftest.er2 >/dev/null; then
3828          $2=yes
3829        fi
3830      else
3831        $2=yes
3832      fi
3833    fi
3834    $RM -r conftest*
3835    LDFLAGS="$save_LDFLAGS"
3836 ])
3837
3838 if test x"[$]$2" = xyes; then
3839     m4_if([$4], , :, [$4])
3840 else
3841     m4_if([$5], , :, [$5])
3842 fi
3843 ])# _LT_LINKER_OPTION
3844
3845 # Old name:
3846 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3847 dnl aclocal-1.4 backwards compatibility:
3848 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3849
3850
3851 # LT_CMD_MAX_LEN
3852 #---------------
3853 AC_DEFUN([LT_CMD_MAX_LEN],
3854 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3855 # find the maximum length of command line arguments
3856 AC_MSG_CHECKING([the maximum length of command line arguments])
3857 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3858   i=0
3859   teststring="ABCD"
3860
3861   case $build_os in
3862   msdosdjgpp*)
3863     # On DJGPP, this test can blow up pretty badly due to problems in libc
3864     # (any single argument exceeding 2000 bytes causes a buffer overrun
3865     # during glob expansion).  Even if it were fixed, the result of this
3866     # check would be larger than it should be.
3867     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3868     ;;
3869
3870   gnu*)
3871     # Under GNU Hurd, this test is not required because there is
3872     # no limit to the length of command line arguments.
3873     # Libtool will interpret -1 as no limit whatsoever
3874     lt_cv_sys_max_cmd_len=-1;
3875     ;;
3876
3877   cygwin* | mingw* | cegcc*)
3878     # On Win9x/ME, this test blows up -- it succeeds, but takes
3879     # about 5 minutes as the teststring grows exponentially.
3880     # Worse, since 9x/ME are not pre-emptively multitasking,
3881     # you end up with a "frozen" computer, even though with patience
3882     # the test eventually succeeds (with a max line length of 256k).
3883     # Instead, let's just punt: use the minimum linelength reported by
3884     # all of the supported platforms: 8192 (on NT/2K/XP).
3885     lt_cv_sys_max_cmd_len=8192;
3886     ;;
3887
3888   amigaos*)
3889     # On AmigaOS with pdksh, this test takes hours, literally.
3890     # So we just punt and use a minimum line length of 8192.
3891     lt_cv_sys_max_cmd_len=8192;
3892     ;;
3893
3894   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3895     # This has been around since 386BSD, at least.  Likely further.
3896     if test -x /sbin/sysctl; then
3897       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3898     elif test -x /usr/sbin/sysctl; then
3899       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3900     else
3901       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
3902     fi
3903     # And add a safety zone
3904     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3905     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3906     ;;
3907
3908   interix*)
3909     # We know the value 262144 and hardcode it with a safety zone (like BSD)
3910     lt_cv_sys_max_cmd_len=196608
3911     ;;
3912
3913   osf*)
3914     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3915     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3916     # nice to cause kernel panics so lets avoid the loop below.
3917     # First set a reasonable default.
3918     lt_cv_sys_max_cmd_len=16384
3919     #
3920     if test -x /sbin/sysconfig; then
3921       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3922         *1*) lt_cv_sys_max_cmd_len=-1 ;;
3923       esac
3924     fi
3925     ;;
3926   sco3.2v5*)
3927     lt_cv_sys_max_cmd_len=102400
3928     ;;
3929   sysv5* | sco5v6* | sysv4.2uw2*)
3930     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3931     if test -n "$kargmax"; then
3932       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
3933     else
3934       lt_cv_sys_max_cmd_len=32768
3935     fi
3936     ;;
3937   *)
3938     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3939     if test -n "$lt_cv_sys_max_cmd_len"; then
3940       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3941       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3942     else
3943       # Make teststring a little bigger before we do anything with it.
3944       # a 1K string should be a reasonable start.
3945       for i in 1 2 3 4 5 6 7 8 ; do
3946         teststring=$teststring$teststring
3947       done
3948       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3949       # If test is not a shell built-in, we'll probably end up computing a
3950       # maximum length that is only half of the actual maximum length, but
3951       # we can't tell.
3952       while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
3953                  = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
3954               test $i != 17 # 1/2 MB should be enough
3955       do
3956         i=`expr $i + 1`
3957         teststring=$teststring$teststring
3958       done
3959       # Only check the string length outside the loop.
3960       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3961       teststring=
3962       # Add a significant safety factor because C++ compilers can tack on
3963       # massive amounts of additional arguments before passing them to the
3964       # linker.  It appears as though 1/2 is a usable value.
3965       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3966     fi
3967     ;;
3968   esac
3969 ])
3970 if test -n $lt_cv_sys_max_cmd_len ; then
3971   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3972 else
3973   AC_MSG_RESULT(none)
3974 fi
3975 max_cmd_len=$lt_cv_sys_max_cmd_len
3976 _LT_DECL([], [max_cmd_len], [0],
3977     [What is the maximum length of a command?])
3978 ])# LT_CMD_MAX_LEN
3979
3980 # Old name:
3981 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3982 dnl aclocal-1.4 backwards compatibility:
3983 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3984
3985
3986 # _LT_HEADER_DLFCN
3987 # ----------------
3988 m4_defun([_LT_HEADER_DLFCN],
3989 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3990 ])# _LT_HEADER_DLFCN
3991
3992
3993 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3994 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3995 # ----------------------------------------------------------------
3996 m4_defun([_LT_TRY_DLOPEN_SELF],
3997 [m4_require([_LT_HEADER_DLFCN])dnl
3998 if test "$cross_compiling" = yes; then :
3999   [$4]
4000 else
4001   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4002   lt_status=$lt_dlunknown
4003   cat > conftest.$ac_ext <<_LT_EOF
4004 [#line __oline__ "configure"
4005 #include "confdefs.h"
4006
4007 #if HAVE_DLFCN_H
4008 #include <dlfcn.h>
4009 #endif
4010
4011 #include <stdio.h>
4012
4013 #ifdef RTLD_GLOBAL
4014 #  define LT_DLGLOBAL           RTLD_GLOBAL
4015 #else
4016 #  ifdef DL_GLOBAL
4017 #    define LT_DLGLOBAL         DL_GLOBAL
4018 #  else
4019 #    define LT_DLGLOBAL         0
4020 #  endif
4021 #endif
4022
4023 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4024    find out it does not work in some platform. */
4025 #ifndef LT_DLLAZY_OR_NOW
4026 #  ifdef RTLD_LAZY
4027 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
4028 #  else
4029 #    ifdef DL_LAZY
4030 #      define LT_DLLAZY_OR_NOW          DL_LAZY
4031 #    else
4032 #      ifdef RTLD_NOW
4033 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
4034 #      else
4035 #        ifdef DL_NOW
4036 #          define LT_DLLAZY_OR_NOW      DL_NOW
4037 #        else
4038 #          define LT_DLLAZY_OR_NOW      0
4039 #        endif
4040 #      endif
4041 #    endif
4042 #  endif
4043 #endif
4044
4045 void fnord() { int i=42;}
4046 int main ()
4047 {
4048   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4049   int status = $lt_dlunknown;
4050
4051   if (self)
4052     {
4053       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4054       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
4055       /* dlclose (self); */
4056     }
4057   else
4058     puts (dlerror ());
4059
4060   return status;
4061 }]
4062 _LT_EOF
4063   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
4064     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4065     lt_status=$?
4066     case x$lt_status in
4067       x$lt_dlno_uscore) $1 ;;
4068       x$lt_dlneed_uscore) $2 ;;
4069       x$lt_dlunknown|x*) $3 ;;
4070     esac
4071   else :
4072     # compilation failed
4073     $3
4074   fi
4075 fi
4076 rm -fr conftest*
4077 ])# _LT_TRY_DLOPEN_SELF
4078
4079
4080 # LT_SYS_DLOPEN_SELF
4081 # ------------------
4082 AC_DEFUN([LT_SYS_DLOPEN_SELF],
4083 [m4_require([_LT_HEADER_DLFCN])dnl
4084 if test "x$enable_dlopen" != xyes; then
4085   enable_dlopen=unknown
4086   enable_dlopen_self=unknown
4087   enable_dlopen_self_static=unknown
4088 else
4089   lt_cv_dlopen=no
4090   lt_cv_dlopen_libs=
4091
4092   case $host_os in
4093   beos*)
4094     lt_cv_dlopen="load_add_on"
4095     lt_cv_dlopen_libs=
4096     lt_cv_dlopen_self=yes
4097     ;;
4098
4099   mingw* | pw32* | cegcc*)
4100     lt_cv_dlopen="LoadLibrary"
4101     lt_cv_dlopen_libs=
4102     ;;
4103
4104   cygwin*)
4105     lt_cv_dlopen="dlopen"
4106     lt_cv_dlopen_libs=
4107     ;;
4108
4109   darwin*)
4110   # if libdl is installed we need to link against it
4111     AC_CHECK_LIB([dl], [dlopen],
4112                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4113     lt_cv_dlopen="dyld"
4114     lt_cv_dlopen_libs=
4115     lt_cv_dlopen_self=yes
4116     ])
4117     ;;
4118
4119   *)
4120     AC_CHECK_FUNC([shl_load],
4121           [lt_cv_dlopen="shl_load"],
4122       [AC_CHECK_LIB([dld], [shl_load],
4123             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4124         [AC_CHECK_FUNC([dlopen],
4125               [lt_cv_dlopen="dlopen"],
4126           [AC_CHECK_LIB([dl], [dlopen],
4127                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4128             [AC_CHECK_LIB([svld], [dlopen],
4129                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4130               [AC_CHECK_LIB([dld], [dld_link],
4131                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4132               ])
4133             ])
4134           ])
4135         ])
4136       ])
4137     ;;
4138   esac
4139
4140   if test "x$lt_cv_dlopen" != xno; then
4141     enable_dlopen=yes
4142   else
4143     enable_dlopen=no
4144   fi
4145
4146   case $lt_cv_dlopen in
4147   dlopen)
4148     save_CPPFLAGS="$CPPFLAGS"
4149     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4150
4151     save_LDFLAGS="$LDFLAGS"
4152     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4153
4154     save_LIBS="$LIBS"
4155     LIBS="$lt_cv_dlopen_libs $LIBS"
4156
4157     AC_CACHE_CHECK([whether a program can dlopen itself],
4158           lt_cv_dlopen_self, [dnl
4159           _LT_TRY_DLOPEN_SELF(
4160             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4161             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4162     ])
4163
4164     if test "x$lt_cv_dlopen_self" = xyes; then
4165       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4166       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4167           lt_cv_dlopen_self_static, [dnl
4168           _LT_TRY_DLOPEN_SELF(
4169             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4170             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
4171       ])
4172     fi
4173
4174     CPPFLAGS="$save_CPPFLAGS"
4175     LDFLAGS="$save_LDFLAGS"
4176     LIBS="$save_LIBS"
4177     ;;
4178   esac
4179
4180   case $lt_cv_dlopen_self in
4181   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4182   *) enable_dlopen_self=unknown ;;
4183   esac
4184
4185   case $lt_cv_dlopen_self_static in
4186   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4187   *) enable_dlopen_self_static=unknown ;;
4188   esac
4189 fi
4190 _LT_DECL([dlopen_support], [enable_dlopen], [0],
4191          [Whether dlopen is supported])
4192 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4193          [Whether dlopen of programs is supported])
4194 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4195          [Whether dlopen of statically linked programs is supported])
4196 ])# LT_SYS_DLOPEN_SELF
4197
4198 # Old name:
4199 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4200 dnl aclocal-1.4 backwards compatibility:
4201 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4202
4203
4204 # _LT_COMPILER_C_O([TAGNAME])
4205 # ---------------------------
4206 # Check to see if options -c and -o are simultaneously supported by compiler.
4207 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
4208 m4_defun([_LT_COMPILER_C_O],
4209 [m4_require([_LT_DECL_SED])dnl
4210 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4211 m4_require([_LT_TAG_COMPILER])dnl
4212 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4213   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4214   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4215    $RM -r conftest 2>/dev/null
4216    mkdir conftest
4217    cd conftest
4218    mkdir out
4219    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4220
4221    lt_compiler_flag="-o out/conftest2.$ac_objext"
4222    # Insert the option either (1) after the last *FLAGS variable, or
4223    # (2) before a word containing "conftest.", or (3) at the end.
4224    # Note that $ac_compile itself does not contain backslashes and begins
4225    # with a dollar sign (not a hyphen), so the echo should work correctly.
4226    lt_compile=`echo "$ac_compile" | $SED \
4227    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4228    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4229    -e 's:$: $lt_compiler_flag:'`
4230    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4231    (eval "$lt_compile" 2>out/conftest.err)
4232    ac_status=$?
4233    cat out/conftest.err >&AS_MESSAGE_LOG_FD
4234    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4235    if (exit $ac_status) && test -s out/conftest2.$ac_objext
4236    then
4237      # The compiler can only warn and ignore the option if not recognized
4238      # So say no if there are warnings
4239      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
4240      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4241      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4242        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4243      fi
4244    fi
4245    chmod u+w . 2>&AS_MESSAGE_LOG_FD
4246    $RM conftest*
4247    # SGI C++ compiler will create directory out/ii_files/ for
4248    # template instantiation
4249    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4250    $RM out/* && rmdir out
4251    cd ..
4252    $RM -r conftest
4253    $RM conftest*
4254 ])
4255 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4256         [Does compiler simultaneously support -c and -o options?])
4257 ])# _LT_COMPILER_C_O
4258
4259
4260 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
4261 # ----------------------------------
4262 # Check to see if we can do hard links to lock some files if needed
4263 m4_defun([_LT_COMPILER_FILE_LOCKS],
4264 [m4_require([_LT_ENABLE_LOCK])dnl
4265 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4266 _LT_COMPILER_C_O([$1])
4267
4268 hard_links="nottested"
4269 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4270   # do not overwrite the value of need_locks provided by the user
4271   AC_MSG_CHECKING([if we can lock with hard links])
4272   hard_links=yes
4273   $RM conftest*
4274   ln conftest.a conftest.b 2>/dev/null && hard_links=no
4275   touch conftest.a
4276   ln conftest.a conftest.b 2>&5 || hard_links=no
4277   ln conftest.a conftest.b 2>/dev/null && hard_links=no
4278   AC_MSG_RESULT([$hard_links])
4279   if test "$hard_links" = no; then
4280     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
4281     need_locks=warn
4282   fi
4283 else
4284   need_locks=no
4285 fi
4286 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4287 ])# _LT_COMPILER_FILE_LOCKS
4288
4289
4290 # _LT_CHECK_OBJDIR
4291 # ----------------
4292 m4_defun([_LT_CHECK_OBJDIR],
4293 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4294 [rm -f .libs 2>/dev/null
4295 mkdir .libs 2>/dev/null
4296 if test -d .libs; then
4297   lt_cv_objdir=.libs
4298 else
4299   # MS-DOS does not allow filenames that begin with a dot.
4300   lt_cv_objdir=_libs
4301 fi
4302 rmdir .libs 2>/dev/null])
4303 objdir=$lt_cv_objdir
4304 _LT_DECL([], [objdir], [0],
4305          [The name of the directory that contains temporary libtool files])dnl
4306 m4_pattern_allow([LT_OBJDIR])dnl
4307 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4308   [Define to the sub-directory in which libtool stores uninstalled libraries.])
4309 ])# _LT_CHECK_OBJDIR
4310
4311
4312 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4313 # --------------------------------------
4314 # Check hardcoding attributes.
4315 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4316 [AC_MSG_CHECKING([how to hardcode library paths into programs])
4317 _LT_TAGVAR(hardcode_action, $1)=
4318 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4319    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4320    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4321
4322   # We can hardcode non-existent directories.
4323   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4324      # If the only mechanism to avoid hardcoding is shlibpath_var, we
4325      # have to relink, otherwise we might link with an installed library
4326      # when we should be linking with a yet-to-be-installed one
4327      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4328      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4329     # Linking always hardcodes the temporary library directory.
4330     _LT_TAGVAR(hardcode_action, $1)=relink
4331   else
4332     # We can link without hardcoding, and we can hardcode nonexisting dirs.
4333     _LT_TAGVAR(hardcode_action, $1)=immediate
4334   fi
4335 else
4336   # We cannot hardcode anything, or else we can only hardcode existing
4337   # directories.
4338   _LT_TAGVAR(hardcode_action, $1)=unsupported
4339 fi
4340 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4341
4342 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4343    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4344   # Fast installation is not supported
4345   enable_fast_install=no
4346 elif test "$shlibpath_overrides_runpath" = yes ||
4347      test "$enable_shared" = no; then
4348   # Fast installation is not necessary
4349   enable_fast_install=needless
4350 fi
4351 _LT_TAGDECL([], [hardcode_action], [0],
4352     [How to hardcode a shared library path into an executable])
4353 ])# _LT_LINKER_HARDCODE_LIBPATH
4354
4355
4356 # _LT_CMD_STRIPLIB
4357 # ----------------
4358 m4_defun([_LT_CMD_STRIPLIB],
4359 [m4_require([_LT_DECL_EGREP])
4360 striplib=
4361 old_striplib=
4362 AC_MSG_CHECKING([whether stripping libraries is possible])
4363 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4364   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4365   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4366   AC_MSG_RESULT([yes])
4367 else
4368 # FIXME - insert some real tests, host_os isn't really good enough
4369   case $host_os in
4370   darwin*)
4371     if test -n "$STRIP" ; then
4372       striplib="$STRIP -x"
4373       old_striplib="$STRIP -S"
4374       AC_MSG_RESULT([yes])
4375     else
4376       AC_MSG_RESULT([no])
4377     fi
4378     ;;
4379   *)
4380     AC_MSG_RESULT([no])
4381     ;;
4382   esac
4383 fi
4384 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4385 _LT_DECL([], [striplib], [1])
4386 ])# _LT_CMD_STRIPLIB
4387
4388
4389 # _LT_SYS_DYNAMIC_LINKER([TAG])
4390 # -----------------------------
4391 # PORTME Fill in your ld.so characteristics
4392 m4_defun([_LT_SYS_DYNAMIC_LINKER],
4393 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4394 m4_require([_LT_DECL_EGREP])dnl
4395 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4396 m4_require([_LT_DECL_OBJDUMP])dnl
4397 m4_require([_LT_DECL_SED])dnl
4398 AC_MSG_CHECKING([dynamic linker characteristics])
4399 m4_if([$1],
4400         [], [
4401 if test "$GCC" = yes; then
4402   case $host_os in
4403     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4404     *) lt_awk_arg="/^libraries:/" ;;
4405   esac
4406   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4407   if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
4408     # if the path contains ";" then we assume it to be the separator
4409     # otherwise default to the standard path separator (i.e. ":") - it is
4410     # assumed that no part of a normal pathname contains ";" but that should
4411     # okay in the real world where ";" in dirpaths is itself problematic.
4412     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
4413   else
4414     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
4415   fi
4416   # Ok, now we have the path, separated by spaces, we can step through it
4417   # and add multilib dir if necessary.
4418   lt_tmp_lt_search_path_spec=
4419   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4420   for lt_sys_path in $lt_search_path_spec; do
4421     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4422       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4423     else
4424       test -d "$lt_sys_path" && \
4425         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4426     fi
4427   done
4428   lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
4429 BEGIN {RS=" "; FS="/|\n";} {
4430   lt_foo="";
4431   lt_count=0;
4432   for (lt_i = NF; lt_i > 0; lt_i--) {
4433     if ($lt_i != "" && $lt_i != ".") {
4434       if ($lt_i == "..") {
4435         lt_count++;
4436       } else {
4437         if (lt_count == 0) {
4438           lt_foo="/" $lt_i lt_foo;
4439         } else {
4440           lt_count--;
4441         }
4442       }
4443     }
4444   }
4445   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4446   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4447 }'`
4448   sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
4449 else
4450   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4451 fi])
4452 library_names_spec=
4453 libname_spec='lib$name'
4454 soname_spec=
4455 shrext_cmds=".so"
4456 postinstall_cmds=
4457 postuninstall_cmds=
4458 finish_cmds=
4459 finish_eval=
4460 shlibpath_var=
4461 shlibpath_overrides_runpath=unknown
4462 version_type=none
4463 dynamic_linker="$host_os ld.so"
4464 sys_lib_dlsearch_path_spec="/lib /usr/lib"
4465 need_lib_prefix=unknown
4466 hardcode_into_libs=no
4467
4468 # when you set need_version to no, make sure it does not cause -set_version
4469 # flags to be left without arguments
4470 need_version=unknown
4471
4472 case $host_os in
4473 aix3*)
4474   version_type=linux
4475   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4476   shlibpath_var=LIBPATH
4477
4478   # AIX 3 has no versioning support, so we append a major version to the name.
4479   soname_spec='${libname}${release}${shared_ext}$major'
4480   ;;
4481
4482 aix[[4-9]]*)
4483   version_type=linux
4484   need_lib_prefix=no
4485   need_version=no
4486   hardcode_into_libs=yes
4487   if test "$host_cpu" = ia64; then
4488     # AIX 5 supports IA64
4489     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4490     shlibpath_var=LD_LIBRARY_PATH
4491   else
4492     # With GCC up to 2.95.x, collect2 would create an import file
4493     # for dependence libraries.  The import file would start with
4494     # the line `#! .'.  This would cause the generated library to
4495     # depend on `.', always an invalid library.  This was fixed in
4496     # development snapshots of GCC prior to 3.0.
4497     case $host_os in
4498       aix4 | aix4.[[01]] | aix4.[[01]].*)
4499       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4500            echo ' yes '
4501            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4502         :
4503       else
4504         can_build_shared=no
4505       fi
4506       ;;
4507     esac
4508     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4509     # soname into executable. Probably we can add versioning support to
4510     # collect2, so additional links can be useful in future.
4511     if test "$aix_use_runtimelinking" = yes; then
4512       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4513       # instead of lib<name>.a to let people know that these are not
4514       # typical AIX shared libraries.
4515       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4516     else
4517       # We preserve .a as extension for shared libraries through AIX4.2
4518       # and later when we are not doing run time linking.
4519       library_names_spec='${libname}${release}.a $libname.a'
4520       soname_spec='${libname}${release}${shared_ext}$major'
4521     fi
4522     shlibpath_var=LIBPATH
4523   fi
4524   ;;
4525
4526 amigaos*)
4527   case $host_cpu in
4528   powerpc)
4529     # Since July 2007 AmigaOS4 officially supports .so libraries.
4530     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4531     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4532     ;;
4533   m68k)
4534     library_names_spec='$libname.ixlibrary $libname.a'
4535     # Create ${libname}_ixlibrary.a entries in /sys/libs.
4536     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
4537     ;;
4538   esac
4539   ;;
4540
4541 beos*)
4542   library_names_spec='${libname}${shared_ext}'
4543   dynamic_linker="$host_os ld.so"
4544   shlibpath_var=LIBRARY_PATH
4545   ;;
4546
4547 bsdi[[45]]*)
4548   version_type=linux
4549   need_version=no
4550   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4551   soname_spec='${libname}${release}${shared_ext}$major'
4552   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4553   shlibpath_var=LD_LIBRARY_PATH
4554   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4555   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4556   # the default ld.so.conf also contains /usr/contrib/lib and
4557   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4558   # libtool to hard-code these into programs
4559   ;;
4560
4561 cygwin* | mingw* | pw32* | cegcc*)
4562   version_type=windows
4563   shrext_cmds=".dll"
4564   need_version=no
4565   need_lib_prefix=no
4566
4567   case $GCC,$host_os in
4568   yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
4569     library_names_spec='$libname.dll.a'
4570     # DLL is installed to $(libdir)/../bin by postinstall_cmds
4571     postinstall_cmds='base_file=`basename \${file}`~
4572       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4573       dldir=$destdir/`dirname \$dlpath`~
4574       test -d \$dldir || mkdir -p \$dldir~
4575       $install_prog $dir/$dlname \$dldir/$dlname~
4576       chmod a+x \$dldir/$dlname~
4577       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4578         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4579       fi'
4580     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4581       dlpath=$dir/\$dldll~
4582        $RM \$dlpath'
4583     shlibpath_overrides_runpath=yes
4584
4585     case $host_os in
4586     cygwin*)
4587       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4588       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4589       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
4590       ;;
4591     mingw* | cegcc*)
4592       # MinGW DLLs use traditional 'lib' prefix
4593       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4594       sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4595       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4596         # It is most probably a Windows format PATH printed by
4597         # mingw gcc, but we are running on Cygwin. Gcc prints its search
4598         # path with ; separators, and with drive letters. We can handle the
4599         # drive letters (cygwin fileutils understands them), so leave them,
4600         # especially as we might pass files found there to a mingw objdump,
4601         # which wouldn't understand a cygwinified path. Ahh.
4602         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4603       else
4604         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
4605       fi
4606       ;;
4607     pw32*)
4608       # pw32 DLLs use 'pw' prefix rather than 'lib'
4609       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4610       ;;
4611     esac
4612     ;;
4613
4614   *)
4615     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4616     ;;
4617   esac
4618   dynamic_linker='Win32 ld.exe'
4619   # FIXME: first we should search . and the directory the executable is in
4620   shlibpath_var=PATH
4621   ;;
4622
4623 darwin* | rhapsody*)
4624   dynamic_linker="$host_os dyld"
4625   version_type=darwin
4626   need_lib_prefix=no
4627   need_version=no
4628   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4629   soname_spec='${libname}${release}${major}$shared_ext'
4630   shlibpath_overrides_runpath=yes
4631   shlibpath_var=DYLD_LIBRARY_PATH
4632   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4633 m4_if([$1], [],[
4634   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4635   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4636   ;;
4637
4638 dgux*)
4639   version_type=linux
4640   need_lib_prefix=no
4641   need_version=no
4642   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4643   soname_spec='${libname}${release}${shared_ext}$major'
4644   shlibpath_var=LD_LIBRARY_PATH
4645   ;;
4646
4647 freebsd1*)
4648   dynamic_linker=no
4649   ;;
4650
4651 freebsd* | dragonfly*)
4652   # DragonFly does not have aout.  When/if they implement a new
4653   # versioning mechanism, adjust this.
4654   if test -x /usr/bin/objformat; then
4655     objformat=`/usr/bin/objformat`
4656   else
4657     case $host_os in
4658     freebsd[[123]]*) objformat=aout ;;
4659     *) objformat=elf ;;
4660     esac
4661   fi
4662   version_type=freebsd-$objformat
4663   case $version_type in
4664     freebsd-elf*)
4665       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4666       need_version=no
4667       need_lib_prefix=no
4668       ;;
4669     freebsd-*)
4670       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4671       need_version=yes
4672       ;;
4673   esac
4674   shlibpath_var=LD_LIBRARY_PATH
4675   case $host_os in
4676   freebsd2*)
4677     shlibpath_overrides_runpath=yes
4678     ;;
4679   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4680     shlibpath_overrides_runpath=yes
4681     hardcode_into_libs=yes
4682     ;;
4683   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4684   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4685     shlibpath_overrides_runpath=no
4686     hardcode_into_libs=yes
4687     ;;
4688   *) # from 4.6 on, and DragonFly
4689     shlibpath_overrides_runpath=yes
4690     hardcode_into_libs=yes
4691     ;;
4692   esac
4693   ;;
4694
4695 gnu*)
4696   version_type=linux
4697   need_lib_prefix=no
4698   need_version=no
4699   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4700   soname_spec='${libname}${release}${shared_ext}$major'
4701   shlibpath_var=LD_LIBRARY_PATH
4702   hardcode_into_libs=yes
4703   ;;
4704
4705 hpux9* | hpux10* | hpux11*)
4706   # Give a soname corresponding to the major version so that dld.sl refuses to
4707   # link against other versions.
4708   version_type=sunos
4709   need_lib_prefix=no
4710   need_version=no
4711   case $host_cpu in
4712   ia64*)
4713     shrext_cmds='.so'
4714     hardcode_into_libs=yes
4715     dynamic_linker="$host_os dld.so"
4716     shlibpath_var=LD_LIBRARY_PATH
4717     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4718     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4719     soname_spec='${libname}${release}${shared_ext}$major'
4720     if test "X$HPUX_IA64_MODE" = X32; then
4721       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4722     else
4723       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4724     fi
4725     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4726     ;;
4727   hppa*64*)
4728     shrext_cmds='.sl'
4729     hardcode_into_libs=yes
4730     dynamic_linker="$host_os dld.sl"
4731     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4732     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4733     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4734     soname_spec='${libname}${release}${shared_ext}$major'
4735     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4736     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4737     ;;
4738   *)
4739     shrext_cmds='.sl'
4740     dynamic_linker="$host_os dld.sl"
4741     shlibpath_var=SHLIB_PATH
4742     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4743     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4744     soname_spec='${libname}${release}${shared_ext}$major'
4745     ;;
4746   esac
4747   # HP-UX runs *really* slowly unless shared libraries are mode 555.
4748   postinstall_cmds='chmod 555 $lib'
4749   ;;
4750
4751 interix[[3-9]]*)
4752   version_type=linux
4753   need_lib_prefix=no
4754   need_version=no
4755   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4756   soname_spec='${libname}${release}${shared_ext}$major'
4757   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4758   shlibpath_var=LD_LIBRARY_PATH
4759   shlibpath_overrides_runpath=no
4760   hardcode_into_libs=yes
4761   ;;
4762
4763 irix5* | irix6* | nonstopux*)
4764   case $host_os in
4765     nonstopux*) version_type=nonstopux ;;
4766     *)
4767         if test "$lt_cv_prog_gnu_ld" = yes; then
4768                 version_type=linux
4769         else
4770                 version_type=irix
4771         fi ;;
4772   esac
4773   need_lib_prefix=no
4774   need_version=no
4775   soname_spec='${libname}${release}${shared_ext}$major'
4776   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4777   case $host_os in
4778   irix5* | nonstopux*)
4779     libsuff= shlibsuff=
4780     ;;
4781   *)
4782     case $LD in # libtool.m4 will add one of these switches to LD
4783     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4784       libsuff= shlibsuff= libmagic=32-bit;;
4785     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4786       libsuff=32 shlibsuff=N32 libmagic=N32;;
4787     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4788       libsuff=64 shlibsuff=64 libmagic=64-bit;;
4789     *) libsuff= shlibsuff= libmagic=never-match;;
4790     esac
4791     ;;
4792   esac
4793   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4794   shlibpath_overrides_runpath=no
4795   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4796   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4797   hardcode_into_libs=yes
4798   ;;
4799
4800 # No shared lib support for Linux oldld, aout, or coff.
4801 linux*oldld* | linux*aout* | linux*coff*)
4802   dynamic_linker=no
4803   ;;
4804
4805 # This must be Linux ELF.
4806 linux* | k*bsd*-gnu)
4807   version_type=linux
4808   need_lib_prefix=no
4809   need_version=no
4810   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4811   soname_spec='${libname}${release}${shared_ext}$major'
4812   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4813   shlibpath_var=LD_LIBRARY_PATH
4814   shlibpath_overrides_runpath=no
4815   # Some binutils ld are patched to set DT_RUNPATH
4816   save_LDFLAGS=$LDFLAGS
4817   save_libdir=$libdir
4818   eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4819        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4820   AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4821     [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4822        [shlibpath_overrides_runpath=yes])])
4823   LDFLAGS=$save_LDFLAGS
4824   libdir=$save_libdir
4825
4826   # This implies no fast_install, which is unacceptable.
4827   # Some rework will be needed to allow for fast_install
4828   # before this can be enabled.
4829   hardcode_into_libs=yes
4830
4831   # Append ld.so.conf contents to the search path
4832   if test -f /etc/ld.so.conf; then
4833     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;/^$/d' | tr '\n' ' '`
4834     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4835   fi
4836
4837   # We used to test for /lib/ld.so.1 and disable shared libraries on
4838   # powerpc, because MkLinux only supported shared libraries with the
4839   # GNU dynamic linker.  Since this was broken with cross compilers,
4840   # most powerpc-linux boxes support dynamic linking these days and
4841   # people can always --disable-shared, the test was removed, and we
4842   # assume the GNU/Linux dynamic linker is in use.
4843   dynamic_linker='GNU/Linux ld.so'
4844   ;;
4845
4846 netbsd*)
4847   version_type=sunos
4848   need_lib_prefix=no
4849   need_version=no
4850   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4851     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4852     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4853     dynamic_linker='NetBSD (a.out) ld.so'
4854   else
4855     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4856     soname_spec='${libname}${release}${shared_ext}$major'
4857     dynamic_linker='NetBSD ld.elf_so'
4858   fi
4859   shlibpath_var=LD_LIBRARY_PATH
4860   shlibpath_overrides_runpath=yes
4861   hardcode_into_libs=yes
4862   ;;
4863
4864 newsos6)
4865   version_type=linux
4866   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4867   shlibpath_var=LD_LIBRARY_PATH
4868   shlibpath_overrides_runpath=yes
4869   ;;
4870
4871 *nto* | *qnx*)
4872   version_type=qnx
4873   need_lib_prefix=no
4874   need_version=no
4875   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4876   soname_spec='${libname}${release}${shared_ext}$major'
4877   shlibpath_var=LD_LIBRARY_PATH
4878   shlibpath_overrides_runpath=no
4879   hardcode_into_libs=yes
4880   dynamic_linker='ldqnx.so'
4881   ;;
4882
4883 openbsd*)
4884   version_type=sunos
4885   sys_lib_dlsearch_path_spec="/usr/lib"
4886   need_lib_prefix=no
4887   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4888   case $host_os in
4889     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
4890     *)                          need_version=no  ;;
4891   esac
4892   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4893   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4894   shlibpath_var=LD_LIBRARY_PATH
4895   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4896     case $host_os in
4897       openbsd2.[[89]] | openbsd2.[[89]].*)
4898         shlibpath_overrides_runpath=no
4899         ;;
4900       *)
4901         shlibpath_overrides_runpath=yes
4902         ;;
4903       esac
4904   else
4905     shlibpath_overrides_runpath=yes
4906   fi
4907   ;;
4908
4909 os2*)
4910   libname_spec='$name'
4911   shrext_cmds=".dll"
4912   need_lib_prefix=no
4913   library_names_spec='$libname${shared_ext} $libname.a'
4914   dynamic_linker='OS/2 ld.exe'
4915   shlibpath_var=LIBPATH
4916   ;;
4917
4918 osf3* | osf4* | osf5*)
4919   version_type=osf
4920   need_lib_prefix=no
4921   need_version=no
4922   soname_spec='${libname}${release}${shared_ext}$major'
4923   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4924   shlibpath_var=LD_LIBRARY_PATH
4925   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4926   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4927   ;;
4928
4929 rdos*)
4930   dynamic_linker=no
4931   ;;
4932
4933 solaris*)
4934   version_type=linux
4935   need_lib_prefix=no
4936   need_version=no
4937   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4938   soname_spec='${libname}${release}${shared_ext}$major'
4939   shlibpath_var=LD_LIBRARY_PATH
4940   shlibpath_overrides_runpath=yes
4941   hardcode_into_libs=yes
4942   # ldd complains unless libraries are executable
4943   postinstall_cmds='chmod +x $lib'
4944   ;;
4945
4946 sunos4*)
4947   version_type=sunos
4948   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4949   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4950   shlibpath_var=LD_LIBRARY_PATH
4951   shlibpath_overrides_runpath=yes
4952   if test "$with_gnu_ld" = yes; then
4953     need_lib_prefix=no
4954   fi
4955   need_version=yes
4956   ;;
4957
4958 sysv4 | sysv4.3*)
4959   version_type=linux
4960   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4961   soname_spec='${libname}${release}${shared_ext}$major'
4962   shlibpath_var=LD_LIBRARY_PATH
4963   case $host_vendor in
4964     sni)
4965       shlibpath_overrides_runpath=no
4966       need_lib_prefix=no
4967       runpath_var=LD_RUN_PATH
4968       ;;
4969     siemens)
4970       need_lib_prefix=no
4971       ;;
4972     motorola)
4973       need_lib_prefix=no
4974       need_version=no
4975       shlibpath_overrides_runpath=no
4976       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4977       ;;
4978   esac
4979   ;;
4980
4981 sysv4*MP*)
4982   if test -d /usr/nec ;then
4983     version_type=linux
4984     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4985     soname_spec='$libname${shared_ext}.$major'
4986     shlibpath_var=LD_LIBRARY_PATH
4987   fi
4988   ;;
4989
4990 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4991   version_type=freebsd-elf
4992   need_lib_prefix=no
4993   need_version=no
4994   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4995   soname_spec='${libname}${release}${shared_ext}$major'
4996   shlibpath_var=LD_LIBRARY_PATH
4997   shlibpath_overrides_runpath=yes
4998   hardcode_into_libs=yes
4999   if test "$with_gnu_ld" = yes; then
5000     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5001   else
5002     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5003     case $host_os in
5004       sco3.2v5*)
5005         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5006         ;;
5007     esac
5008   fi
5009   sys_lib_dlsearch_path_spec='/usr/lib'
5010   ;;
5011
5012 tpf*)
5013   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
5014   version_type=linux
5015   need_lib_prefix=no
5016   need_version=no
5017   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5018   shlibpath_var=LD_LIBRARY_PATH
5019   shlibpath_overrides_runpath=no
5020   hardcode_into_libs=yes
5021   ;;
5022
5023 uts4*)
5024   version_type=linux
5025   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5026   soname_spec='${libname}${release}${shared_ext}$major'
5027   shlibpath_var=LD_LIBRARY_PATH
5028   ;;
5029
5030 *)
5031   dynamic_linker=no
5032   ;;
5033 esac
5034 AC_MSG_RESULT([$dynamic_linker])
5035 test "$dynamic_linker" = no && can_build_shared=no
5036
5037 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5038 if test "$GCC" = yes; then
5039   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5040 fi
5041
5042 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5043   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5044 fi
5045 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5046   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5047 fi
5048
5049 _LT_DECL([], [variables_saved_for_relink], [1],
5050     [Variables whose values should be saved in libtool wrapper scripts and
5051     restored at link time])
5052 _LT_DECL([], [need_lib_prefix], [0],
5053     [Do we need the "lib" prefix for modules?])
5054 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5055 _LT_DECL([], [version_type], [0], [Library versioning type])
5056 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
5057 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5058 _LT_DECL([], [shlibpath_overrides_runpath], [0],
5059     [Is shlibpath searched before the hard-coded library search path?])
5060 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5061 _LT_DECL([], [library_names_spec], [1],
5062     [[List of archive names.  First name is the real one, the rest are links.
5063     The last name is the one that the linker finds with -lNAME]])
5064 _LT_DECL([], [soname_spec], [1],
5065     [[The coded name of the library, if different from the real name]])
5066 _LT_DECL([], [postinstall_cmds], [2],
5067     [Command to use after installation of a shared archive])
5068 _LT_DECL([], [postuninstall_cmds], [2],
5069     [Command to use after uninstallation of a shared archive])
5070 _LT_DECL([], [finish_cmds], [2],
5071     [Commands used to finish a libtool library installation in a directory])
5072 _LT_DECL([], [finish_eval], [1],
5073     [[As "finish_cmds", except a single script fragment to be evaled but
5074     not shown]])
5075 _LT_DECL([], [hardcode_into_libs], [0],
5076     [Whether we should hardcode library paths into libraries])
5077 _LT_DECL([], [sys_lib_search_path_spec], [2],
5078     [Compile-time system search path for libraries])
5079 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5080     [Run-time system search path for libraries])
5081 ])# _LT_SYS_DYNAMIC_LINKER
5082
5083
5084 # _LT_PATH_TOOL_PREFIX(TOOL)
5085 # --------------------------
5086 # find a file program which can recognize shared library
5087 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5088 [m4_require([_LT_DECL_EGREP])dnl
5089 AC_MSG_CHECKING([for $1])
5090 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5091 [case $MAGIC_CMD in
5092 [[\\/*] |  ?:[\\/]*])
5093   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5094   ;;
5095 *)
5096   lt_save_MAGIC_CMD="$MAGIC_CMD"
5097   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5098 dnl $ac_dummy forces splitting on constant user-supplied paths.
5099 dnl POSIX.2 word splitting is done only on the output of word expansions,
5100 dnl not every word.  This closes a longstanding sh security hole.
5101   ac_dummy="m4_if([$2], , $PATH, [$2])"
5102   for ac_dir in $ac_dummy; do
5103     IFS="$lt_save_ifs"
5104     test -z "$ac_dir" && ac_dir=.
5105     if test -f $ac_dir/$1; then
5106       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5107       if test -n "$file_magic_test_file"; then
5108         case $deplibs_check_method in
5109         "file_magic "*)
5110           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5111           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5112           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5113             $EGREP "$file_magic_regex" > /dev/null; then
5114             :
5115           else
5116             cat <<_LT_EOF 1>&2
5117
5118 *** Warning: the command libtool uses to detect shared libraries,
5119 *** $file_magic_cmd, produces output that libtool cannot recognize.
5120 *** The result is that libtool may fail to recognize shared libraries
5121 *** as such.  This will affect the creation of libtool libraries that
5122 *** depend on shared libraries, but programs linked with such libtool
5123 *** libraries will work regardless of this problem.  Nevertheless, you
5124 *** may want to report the problem to your system manager and/or to
5125 *** bug-libtool@gnu.org
5126
5127 _LT_EOF
5128           fi ;;
5129         esac
5130       fi
5131       break
5132     fi
5133   done
5134   IFS="$lt_save_ifs"
5135   MAGIC_CMD="$lt_save_MAGIC_CMD"
5136   ;;
5137 esac])
5138 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5139 if test -n "$MAGIC_CMD"; then
5140   AC_MSG_RESULT($MAGIC_CMD)
5141 else
5142   AC_MSG_RESULT(no)
5143 fi
5144 _LT_DECL([], [MAGIC_CMD], [0],
5145          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5146 ])# _LT_PATH_TOOL_PREFIX
5147
5148 # Old name:
5149 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5150 dnl aclocal-1.4 backwards compatibility:
5151 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5152
5153
5154 # _LT_PATH_MAGIC
5155 # --------------
5156 # find a file program which can recognize a shared library
5157 m4_defun([_LT_PATH_MAGIC],
5158 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5159 if test -z "$lt_cv_path_MAGIC_CMD"; then
5160   if test -n "$ac_tool_prefix"; then
5161     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5162   else
5163     MAGIC_CMD=:
5164   fi
5165 fi
5166 ])# _LT_PATH_MAGIC
5167
5168
5169 # LT_PATH_LD
5170 # ----------
5171 # find the pathname to the GNU or non-GNU linker
5172 AC_DEFUN([LT_PATH_LD],
5173 [AC_REQUIRE([AC_PROG_CC])dnl
5174 AC_REQUIRE([AC_CANONICAL_HOST])dnl
5175 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5176 m4_require([_LT_DECL_SED])dnl
5177 m4_require([_LT_DECL_EGREP])dnl
5178
5179 AC_ARG_WITH([gnu-ld],
5180     [AS_HELP_STRING([--with-gnu-ld],
5181         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
5182     [test "$withval" = no || with_gnu_ld=yes],
5183     [with_gnu_ld=no])dnl
5184
5185 ac_prog=ld
5186 if test "$GCC" = yes; then
5187   # Check if gcc -print-prog-name=ld gives a path.
5188   AC_MSG_CHECKING([for ld used by $CC])
5189   case $host in
5190   *-*-mingw*)
5191     # gcc leaves a trailing carriage return which upsets mingw
5192     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5193   *)
5194     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5195   esac
5196   case $ac_prog in
5197     # Accept absolute paths.
5198     [[\\/]]* | ?:[[\\/]]*)
5199       re_direlt='/[[^/]][[^/]]*/\.\./'
5200       # Canonicalize the pathname of ld
5201       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5202       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5203         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5204       done
5205       test -z "$LD" && LD="$ac_prog"
5206       ;;
5207   "")
5208     # If it fails, then pretend we aren't using GCC.
5209     ac_prog=ld
5210     ;;
5211   *)
5212     # If it is relative, then search for the first ld in PATH.
5213     with_gnu_ld=unknown
5214     ;;
5215   esac
5216 elif test "$with_gnu_ld" = yes; then
5217   AC_MSG_CHECKING([for GNU ld])
5218 else
5219   AC_MSG_CHECKING([for non-GNU ld])
5220 fi
5221 AC_CACHE_VAL(lt_cv_path_LD,
5222 [if test -z "$LD"; then
5223   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5224   for ac_dir in $PATH; do
5225     IFS="$lt_save_ifs"
5226     test -z "$ac_dir" && ac_dir=.
5227     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5228       lt_cv_path_LD="$ac_dir/$ac_prog"
5229       # Check to see if the program is GNU ld.  I'd rather use --version,
5230       # but apparently some variants of GNU ld only accept -v.
5231       # Break only if it was the GNU/non-GNU ld that we prefer.
5232       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5233       *GNU* | *'with BFD'*)
5234         test "$with_gnu_ld" != no && break
5235         ;;
5236       *)
5237         test "$with_gnu_ld" != yes && break
5238         ;;
5239       esac
5240     fi
5241   done
5242   IFS="$lt_save_ifs"
5243 else
5244   lt_cv_path_LD="$LD" # Let the user override the test with a path.
5245 fi])
5246 LD="$lt_cv_path_LD"
5247 if test -n "$LD"; then
5248   AC_MSG_RESULT($LD)
5249 else
5250   AC_MSG_RESULT(no)
5251 fi
5252 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5253 _LT_PATH_LD_GNU
5254 AC_SUBST([LD])
5255
5256 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5257 ])# LT_PATH_LD
5258
5259 # Old names:
5260 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5261 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5262 dnl aclocal-1.4 backwards compatibility:
5263 dnl AC_DEFUN([AM_PROG_LD], [])
5264 dnl AC_DEFUN([AC_PROG_LD], [])
5265
5266
5267 # _LT_PATH_LD_GNU
5268 #- --------------
5269 m4_defun([_LT_PATH_LD_GNU],
5270 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5271 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
5272 case `$LD -v 2>&1 </dev/null` in
5273 *GNU* | *'with BFD'*)
5274   lt_cv_prog_gnu_ld=yes
5275   ;;
5276 *)
5277   lt_cv_prog_gnu_ld=no
5278   ;;
5279 esac])
5280 with_gnu_ld=$lt_cv_prog_gnu_ld
5281 ])# _LT_PATH_LD_GNU
5282
5283
5284 # _LT_CMD_RELOAD
5285 # --------------
5286 # find reload flag for linker
5287 #   -- PORTME Some linkers may need a different reload flag.
5288 m4_defun([_LT_CMD_RELOAD],
5289 [AC_CACHE_CHECK([for $LD option to reload object files],
5290   lt_cv_ld_reload_flag,
5291   [lt_cv_ld_reload_flag='-r'])
5292 reload_flag=$lt_cv_ld_reload_flag
5293 case $reload_flag in
5294 "" | " "*) ;;
5295 *) reload_flag=" $reload_flag" ;;
5296 esac
5297 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5298 case $host_os in
5299   darwin*)
5300     if test "$GCC" = yes; then
5301       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5302     else
5303       reload_cmds='$LD$reload_flag -o $output$reload_objs'
5304     fi
5305     ;;
5306 esac
5307 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5308 _LT_DECL([], [reload_cmds], [2])dnl
5309 ])# _LT_CMD_RELOAD
5310
5311
5312 # _LT_CHECK_MAGIC_METHOD
5313 # ----------------------
5314 # how to check for library dependencies
5315 #  -- PORTME fill in with the dynamic library characteristics
5316 m4_defun([_LT_CHECK_MAGIC_METHOD],
5317 [m4_require([_LT_DECL_EGREP])
5318 m4_require([_LT_DECL_OBJDUMP])
5319 AC_CACHE_CHECK([how to recognize dependent libraries],
5320 lt_cv_deplibs_check_method,
5321 [lt_cv_file_magic_cmd='$MAGIC_CMD'
5322 lt_cv_file_magic_test_file=
5323 lt_cv_deplibs_check_method='unknown'
5324 # Need to set the preceding variable on all platforms that support
5325 # interlibrary dependencies.
5326 # 'none' -- dependencies not supported.
5327 # `unknown' -- same as none, but documents that we really don't know.
5328 # 'pass_all' -- all dependencies passed with no checks.
5329 # 'test_compile' -- check by making test program.
5330 # 'file_magic [[regex]]' -- check by looking for files in library path
5331 # which responds to the $file_magic_cmd with a given extended regex.
5332 # If you have `file' or equivalent on your system and you're not sure
5333 # whether `pass_all' will *always* work, you probably want this one.
5334
5335 case $host_os in
5336 aix[[4-9]]*)
5337   lt_cv_deplibs_check_method=pass_all
5338   ;;
5339
5340 beos*)
5341   lt_cv_deplibs_check_method=pass_all
5342   ;;
5343
5344 bsdi[[45]]*)
5345   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5346   lt_cv_file_magic_cmd='/usr/bin/file -L'
5347   lt_cv_file_magic_test_file=/shlib/libc.so
5348   ;;
5349
5350 cygwin*)
5351   # func_win32_libid is a shell function defined in ltmain.sh
5352   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5353   lt_cv_file_magic_cmd='func_win32_libid'
5354   ;;
5355
5356 mingw* | pw32*)
5357   # Base MSYS/MinGW do not provide the 'file' command needed by
5358   # func_win32_libid shell function, so use a weaker test based on 'objdump',
5359   # unless we find 'file', for example because we are cross-compiling.
5360   if ( file / ) >/dev/null 2>&1; then
5361     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5362     lt_cv_file_magic_cmd='func_win32_libid'
5363   else
5364     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5365     lt_cv_file_magic_cmd='$OBJDUMP -f'
5366   fi
5367   ;;
5368
5369 cegcc)
5370   # use the weaker test based on 'objdump'. See mingw*.
5371   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5372   lt_cv_file_magic_cmd='$OBJDUMP -f'
5373   ;;
5374
5375 darwin* | rhapsody*)
5376   lt_cv_deplibs_check_method=pass_all
5377   ;;
5378
5379 freebsd* | dragonfly*)
5380   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5381     case $host_cpu in
5382     i*86 )
5383       # Not sure whether the presence of OpenBSD here was a mistake.
5384       # Let's accept both of them until this is cleared up.
5385       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5386       lt_cv_file_magic_cmd=/usr/bin/file
5387       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5388       ;;
5389     esac
5390   else
5391     lt_cv_deplibs_check_method=pass_all
5392   fi
5393   ;;
5394
5395 gnu*)
5396   lt_cv_deplibs_check_method=pass_all
5397   ;;
5398
5399 hpux10.20* | hpux11*)
5400   lt_cv_file_magic_cmd=/usr/bin/file
5401   case $host_cpu in
5402   ia64*)
5403     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5404     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5405     ;;
5406   hppa*64*)
5407     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
5408     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5409     ;;
5410   *)
5411     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
5412     lt_cv_file_magic_test_file=/usr/lib/libc.sl
5413     ;;
5414   esac
5415   ;;
5416
5417 interix[[3-9]]*)
5418   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5419   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5420   ;;
5421
5422 irix5* | irix6* | nonstopux*)
5423   case $LD in
5424   *-32|*"-32 ") libmagic=32-bit;;
5425   *-n32|*"-n32 ") libmagic=N32;;
5426   *-64|*"-64 ") libmagic=64-bit;;
5427   *) libmagic=never-match;;
5428   esac
5429   lt_cv_deplibs_check_method=pass_all
5430   ;;
5431
5432 # This must be Linux ELF.
5433 linux* | k*bsd*-gnu)
5434   lt_cv_deplibs_check_method=pass_all
5435   ;;
5436
5437 netbsd*)
5438   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5439     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5440   else
5441     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5442   fi
5443   ;;
5444
5445 newos6*)
5446   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5447   lt_cv_file_magic_cmd=/usr/bin/file
5448   lt_cv_file_magic_test_file=/usr/lib/libnls.so
5449   ;;
5450
5451 *nto* | *qnx*)
5452   lt_cv_deplibs_check_method=pass_all
5453   ;;
5454
5455 openbsd*)
5456   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5457     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5458   else
5459     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5460   fi
5461   ;;
5462
5463 osf3* | osf4* | osf5*)
5464   lt_cv_deplibs_check_method=pass_all
5465   ;;
5466
5467 rdos*)
5468   lt_cv_deplibs_check_method=pass_all
5469   ;;
5470
5471 solaris*)
5472   lt_cv_deplibs_check_method=pass_all
5473   ;;
5474
5475 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5476   lt_cv_deplibs_check_method=pass_all
5477   ;;
5478
5479 sysv4 | sysv4.3*)
5480   case $host_vendor in
5481   motorola)
5482     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]]'
5483     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5484     ;;
5485   ncr)
5486     lt_cv_deplibs_check_method=pass_all
5487     ;;
5488   sequent)
5489     lt_cv_file_magic_cmd='/bin/file'
5490     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5491     ;;
5492   sni)
5493     lt_cv_file_magic_cmd='/bin/file'
5494     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5495     lt_cv_file_magic_test_file=/lib/libc.so
5496     ;;
5497   siemens)
5498     lt_cv_deplibs_check_method=pass_all
5499     ;;
5500   pc)
5501     lt_cv_deplibs_check_method=pass_all
5502     ;;
5503   esac
5504   ;;
5505
5506 tpf*)
5507   lt_cv_deplibs_check_method=pass_all
5508   ;;
5509 esac
5510 ])
5511 file_magic_cmd=$lt_cv_file_magic_cmd
5512 deplibs_check_method=$lt_cv_deplibs_check_method
5513 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5514
5515 _LT_DECL([], [deplibs_check_method], [1],
5516     [Method to check whether dependent libraries are shared objects])
5517 _LT_DECL([], [file_magic_cmd], [1],
5518     [Command to use when deplibs_check_method == "file_magic"])
5519 ])# _LT_CHECK_MAGIC_METHOD
5520
5521
5522 # LT_PATH_NM
5523 # ----------
5524 # find the pathname to a BSD- or MS-compatible name lister
5525 AC_DEFUN([LT_PATH_NM],
5526 [AC_REQUIRE([AC_PROG_CC])dnl
5527 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5528 [if test -n "$NM"; then
5529   # Let the user override the test.
5530   lt_cv_path_NM="$NM"
5531 else
5532   lt_nm_to_check="${ac_tool_prefix}nm"
5533   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5534     lt_nm_to_check="$lt_nm_to_check nm"
5535   fi
5536   for lt_tmp_nm in $lt_nm_to_check; do
5537     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5538     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5539       IFS="$lt_save_ifs"
5540       test -z "$ac_dir" && ac_dir=.
5541       tmp_nm="$ac_dir/$lt_tmp_nm"
5542       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5543         # Check to see if the nm accepts a BSD-compat flag.
5544         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5545         #   nm: unknown option "B" ignored
5546         # Tru64's nm complains that /dev/null is an invalid object file
5547         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5548         */dev/null* | *'Invalid file or object type'*)
5549           lt_cv_path_NM="$tmp_nm -B"
5550           break
5551           ;;
5552         *)
5553           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5554           */dev/null*)
5555             lt_cv_path_NM="$tmp_nm -p"
5556             break
5557             ;;
5558           *)
5559             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5560             continue # so that we can try to find one that supports BSD flags
5561             ;;
5562           esac
5563           ;;
5564         esac
5565       fi
5566     done
5567     IFS="$lt_save_ifs"
5568   done
5569   : ${lt_cv_path_NM=no}
5570 fi])
5571 if test "$lt_cv_path_NM" != "no"; then
5572   NM="$lt_cv_path_NM"
5573 else
5574   # Didn't find any BSD compatible name lister, look for dumpbin.
5575   AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
5576   AC_SUBST([DUMPBIN])
5577   if test "$DUMPBIN" != ":"; then
5578     NM="$DUMPBIN"
5579   fi
5580 fi
5581 test -z "$NM" && NM=nm
5582 AC_SUBST([NM])
5583 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5584
5585 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5586   [lt_cv_nm_interface="BSD nm"
5587   echo "int some_variable = 0;" > conftest.$ac_ext
5588   (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5589   (eval "$ac_compile" 2>conftest.err)
5590   cat conftest.err >&AS_MESSAGE_LOG_FD
5591   (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5592   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5593   cat conftest.err >&AS_MESSAGE_LOG_FD
5594   (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
5595   cat conftest.out >&AS_MESSAGE_LOG_FD
5596   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5597     lt_cv_nm_interface="MS dumpbin"
5598   fi
5599   rm -f conftest*])
5600 ])# LT_PATH_NM
5601
5602 # Old names:
5603 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5604 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5605 dnl aclocal-1.4 backwards compatibility:
5606 dnl AC_DEFUN([AM_PROG_NM], [])
5607 dnl AC_DEFUN([AC_PROG_NM], [])
5608
5609
5610 # LT_LIB_M
5611 # --------
5612 # check for math library
5613 AC_DEFUN([LT_LIB_M],
5614 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5615 LIBM=
5616 case $host in
5617 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
5618   # These system don't have libm, or don't need it
5619   ;;
5620 *-ncr-sysv4.3*)
5621   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5622   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5623   ;;
5624 *)
5625   AC_CHECK_LIB(m, cos, LIBM="-lm")
5626   ;;
5627 esac
5628 AC_SUBST([LIBM])
5629 ])# LT_LIB_M
5630
5631 # Old name:
5632 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5633 dnl aclocal-1.4 backwards compatibility:
5634 dnl AC_DEFUN([AC_CHECK_LIBM], [])
5635
5636
5637 # _LT_COMPILER_NO_RTTI([TAGNAME])
5638 # -------------------------------
5639 m4_defun([_LT_COMPILER_NO_RTTI],
5640 [m4_require([_LT_TAG_COMPILER])dnl
5641
5642 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5643
5644 if test "$GCC" = yes; then
5645   _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5646
5647   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5648     lt_cv_prog_compiler_rtti_exceptions,
5649     [-fno-rtti -fno-exceptions], [],
5650     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5651 fi
5652 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5653         [Compiler flag to turn off builtin functions])
5654 ])# _LT_COMPILER_NO_RTTI
5655
5656
5657 # _LT_CMD_GLOBAL_SYMBOLS
5658 # ----------------------
5659 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5660 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5661 AC_REQUIRE([AC_PROG_CC])dnl
5662 AC_REQUIRE([LT_PATH_NM])dnl
5663 AC_REQUIRE([LT_PATH_LD])dnl
5664 m4_require([_LT_DECL_SED])dnl
5665 m4_require([_LT_DECL_EGREP])dnl
5666 m4_require([_LT_TAG_COMPILER])dnl
5667
5668 # Check for command to grab the raw symbol name followed by C symbol from nm.
5669 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5670 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5671 [
5672 # These are sane defaults that work on at least a few old systems.
5673 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5674
5675 # Character class describing NM global symbol codes.
5676 symcode='[[BCDEGRST]]'
5677
5678 # Regexp to match symbols that can be accessed directly from C.
5679 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5680
5681 # Define system-specific variables.
5682 case $host_os in
5683 aix*)
5684   symcode='[[BCDT]]'
5685   ;;
5686 cygwin* | mingw* | pw32* | cegcc*)
5687   symcode='[[ABCDGISTW]]'
5688   ;;
5689 hpux*)
5690   if test "$host_cpu" = ia64; then
5691     symcode='[[ABCDEGRST]]'
5692   fi
5693   ;;
5694 irix* | nonstopux*)
5695   symcode='[[BCDEGRST]]'
5696   ;;
5697 osf*)
5698   symcode='[[BCDEGQRST]]'
5699   ;;
5700 solaris*)
5701   symcode='[[BDRT]]'
5702   ;;
5703 sco3.2v5*)
5704   symcode='[[DT]]'
5705   ;;
5706 sysv4.2uw2*)
5707   symcode='[[DT]]'
5708   ;;
5709 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5710   symcode='[[ABDT]]'
5711   ;;
5712 sysv4)
5713   symcode='[[DFNSTU]]'
5714   ;;
5715 esac
5716
5717 # If we're using GNU nm, then use its standard symbol codes.
5718 case `$NM -V 2>&1` in
5719 *GNU* | *'with BFD'*)
5720   symcode='[[ABCDGIRSTW]]' ;;
5721 esac
5722
5723 # Transform an extracted symbol line into a proper C declaration.
5724 # Some systems (esp. on ia64) link data and code symbols differently,
5725 # so use this general approach.
5726 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5727
5728 # Transform an extracted symbol line into symbol name and symbol address
5729 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5730 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'"
5731
5732 # Handle CRLF in mingw tool chain
5733 opt_cr=
5734 case $build_os in
5735 mingw*)
5736   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5737   ;;
5738 esac
5739
5740 # Try without a prefix underscore, then with it.
5741 for ac_symprfx in "" "_"; do
5742
5743   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5744   symxfrm="\\1 $ac_symprfx\\2 \\2"
5745
5746   # Write the raw and C identifiers.
5747   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5748     # Fake it for dumpbin and say T for any non-static function
5749     # and D for any global variable.
5750     # Also find C++ and __fastcall symbols from MSVC++,
5751     # which start with @ or ?.
5752     lt_cv_sys_global_symbol_pipe="$AWK ['"\
5753 "     {last_section=section; section=\$ 3};"\
5754 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5755 "     \$ 0!~/External *\|/{next};"\
5756 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5757 "     {if(hide[section]) next};"\
5758 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5759 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5760 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5761 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5762 "     ' prfx=^$ac_symprfx]"
5763   else
5764     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5765   fi
5766
5767   # Check to see that the pipe works correctly.
5768   pipe_works=no
5769
5770   rm -f conftest*
5771   cat > conftest.$ac_ext <<_LT_EOF
5772 #ifdef __cplusplus
5773 extern "C" {
5774 #endif
5775 char nm_test_var;
5776 void nm_test_func(void);
5777 void nm_test_func(void){}
5778 #ifdef __cplusplus
5779 }
5780 #endif
5781 int main(){nm_test_var='a';nm_test_func();return(0);}
5782 _LT_EOF
5783
5784   if AC_TRY_EVAL(ac_compile); then
5785     # Now try to grab the symbols.
5786     nlist=conftest.nm
5787     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5788       # Try sorting and uniquifying the output.
5789       if sort "$nlist" | uniq > "$nlist"T; then
5790         mv -f "$nlist"T "$nlist"
5791       else
5792         rm -f "$nlist"T
5793       fi
5794
5795       # Make sure that we snagged all the symbols we need.
5796       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5797         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5798           cat <<_LT_EOF > conftest.$ac_ext
5799 #ifdef __cplusplus
5800 extern "C" {
5801 #endif
5802
5803 _LT_EOF
5804           # Now generate the symbol file.
5805           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5806
5807           cat <<_LT_EOF >> conftest.$ac_ext
5808
5809 /* The mapping between symbol names and symbols.  */
5810 const struct {
5811   const char *name;
5812   void       *address;
5813 }
5814 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5815 {
5816   { "@PROGRAM@", (void *) 0 },
5817 _LT_EOF
5818           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5819           cat <<\_LT_EOF >> conftest.$ac_ext
5820   {0, (void *) 0}
5821 };
5822
5823 /* This works around a problem in FreeBSD linker */
5824 #ifdef FREEBSD_WORKAROUND
5825 static const void *lt_preloaded_setup() {
5826   return lt__PROGRAM__LTX_preloaded_symbols;
5827 }
5828 #endif
5829
5830 #ifdef __cplusplus
5831 }
5832 #endif
5833 _LT_EOF
5834           # Now try linking the two files.
5835           mv conftest.$ac_objext conftstm.$ac_objext
5836           lt_save_LIBS="$LIBS"
5837           lt_save_CFLAGS="$CFLAGS"
5838           LIBS="conftstm.$ac_objext"
5839           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5840           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5841             pipe_works=yes
5842           fi
5843           LIBS="$lt_save_LIBS"
5844           CFLAGS="$lt_save_CFLAGS"
5845         else
5846           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5847         fi
5848       else
5849         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5850       fi
5851     else
5852       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5853     fi
5854   else
5855     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5856     cat conftest.$ac_ext >&5
5857   fi
5858   rm -rf conftest* conftst*
5859
5860   # Do not use the global_symbol_pipe unless it works.
5861   if test "$pipe_works" = yes; then
5862     break
5863   else
5864     lt_cv_sys_global_symbol_pipe=
5865   fi
5866 done
5867 ])
5868 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5869   lt_cv_sys_global_symbol_to_cdecl=
5870 fi
5871 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5872   AC_MSG_RESULT(failed)
5873 else
5874   AC_MSG_RESULT(ok)
5875 fi
5876
5877 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5878     [Take the output of nm and produce a listing of raw symbols and C names])
5879 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5880     [Transform the output of nm in a proper C declaration])
5881 _LT_DECL([global_symbol_to_c_name_address],
5882     [lt_cv_sys_global_symbol_to_c_name_address], [1],
5883     [Transform the output of nm in a C name address pair])
5884 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5885     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5886     [Transform the output of nm in a C name address pair when lib prefix is needed])
5887 ]) # _LT_CMD_GLOBAL_SYMBOLS
5888
5889
5890 # _LT_COMPILER_PIC([TAGNAME])
5891 # ---------------------------
5892 m4_defun([_LT_COMPILER_PIC],
5893 [m4_require([_LT_TAG_COMPILER])dnl
5894 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5895 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5896 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5897
5898 AC_MSG_CHECKING([for $compiler option to produce PIC])
5899 m4_if([$1], [CXX], [
5900   # C++ specific cases for pic, static, wl, etc.
5901   if test "$GXX" = yes; then
5902     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5903     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5904
5905     case $host_os in
5906     aix*)
5907       # All AIX code is PIC.
5908       if test "$host_cpu" = ia64; then
5909         # AIX 5 now supports IA64 processor
5910         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5911       fi
5912       ;;
5913
5914     amigaos*)
5915       case $host_cpu in
5916       powerpc)
5917             # see comment about AmigaOS4 .so support
5918             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5919         ;;
5920       m68k)
5921             # FIXME: we need at least 68020 code to build shared libraries, but
5922             # adding the `-m68020' flag to GCC prevents building anything better,
5923             # like `-m68040'.
5924             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5925         ;;
5926       esac
5927       ;;
5928
5929     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5930       # PIC is the default for these OSes.
5931       ;;
5932     mingw* | cygwin* | os2* | pw32* | cegcc*)
5933       # This hack is so that the source file can tell whether it is being
5934       # built for inclusion in a dll (and should export symbols for example).
5935       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5936       # (--disable-auto-import) libraries
5937       m4_if([$1], [GCJ], [],
5938         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5939       ;;
5940     darwin* | rhapsody*)
5941       # PIC is the default on this platform
5942       # Common symbols not allowed in MH_DYLIB files
5943       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5944       ;;
5945     *djgpp*)
5946       # DJGPP does not support shared libraries at all
5947       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5948       ;;
5949     interix[[3-9]]*)
5950       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5951       # Instead, we relocate shared libraries at runtime.
5952       ;;
5953     sysv4*MP*)
5954       if test -d /usr/nec; then
5955         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5956       fi
5957       ;;
5958     hpux*)
5959       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5960       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5961       # sets the default TLS model and affects inlining.
5962       case $host_cpu in
5963       hppa*64*)
5964         ;;
5965       *)
5966         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5967         ;;
5968       esac
5969       ;;
5970     *qnx* | *nto*)
5971       # QNX uses GNU C++, but need to define -shared option too, otherwise
5972       # it will coredump.
5973       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5974       ;;
5975     *)
5976       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5977       ;;
5978     esac
5979   else
5980     case $host_os in
5981       aix[[4-9]]*)
5982         # All AIX code is PIC.
5983         if test "$host_cpu" = ia64; then
5984           # AIX 5 now supports IA64 processor
5985           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5986         else
5987           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5988         fi
5989         ;;
5990       chorus*)
5991         case $cc_basename in
5992         cxch68*)
5993           # Green Hills C++ Compiler
5994           # _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"
5995           ;;
5996         esac
5997         ;;
5998       dgux*)
5999         case $cc_basename in
6000           ec++*)
6001             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6002             ;;
6003           ghcx*)
6004             # Green Hills C++ Compiler
6005             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6006             ;;
6007           *)
6008             ;;
6009         esac
6010         ;;
6011       freebsd* | dragonfly*)
6012         # FreeBSD uses GNU C++
6013         ;;
6014       hpux9* | hpux10* | hpux11*)
6015         case $cc_basename in
6016           CC*)
6017             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6018             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6019             if test "$host_cpu" != ia64; then
6020               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6021             fi
6022             ;;
6023           aCC*)
6024             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6025             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6026             case $host_cpu in
6027             hppa*64*|ia64*)
6028               # +Z the default
6029               ;;
6030             *)
6031               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6032               ;;
6033             esac
6034             ;;
6035           *)
6036             ;;
6037         esac
6038         ;;
6039       interix*)
6040         # This is c89, which is MS Visual C++ (no shared libs)
6041         # Anyone wants to do a port?
6042         ;;
6043       irix5* | irix6* | nonstopux*)
6044         case $cc_basename in
6045           CC*)
6046             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6047             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6048             # CC pic flag -KPIC is the default.
6049             ;;
6050           *)
6051             ;;
6052         esac
6053         ;;
6054       linux* | k*bsd*-gnu)
6055         case $cc_basename in
6056           KCC*)
6057             # KAI C++ Compiler
6058             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6059             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6060             ;;
6061           ecpc* )
6062             # old Intel C++ for x86_64 which still supported -KPIC.
6063             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6064             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6065             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6066             ;;
6067           icpc* )
6068             # Intel C++, used to be incompatible with GCC.
6069             # ICC 10 doesn't accept -KPIC any more.
6070             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6071             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6072             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6073             ;;
6074           pgCC* | pgcpp*)
6075             # Portland Group C++ compiler
6076             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6077             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6078             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6079             ;;
6080           cxx*)
6081             # Compaq C++
6082             # Make sure the PIC flag is empty.  It appears that all Alpha
6083             # Linux and Compaq Tru64 Unix objects are PIC.
6084             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6085             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6086             ;;
6087           xlc* | xlC*)
6088             # IBM XL 8.0 on PPC
6089             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6090             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6091             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6092             ;;
6093           *)
6094             case `$CC -V 2>&1 | sed 5q` in
6095             *Sun\ C*)
6096               # Sun C++ 5.9
6097               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6098               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6099               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6100               ;;
6101             esac
6102             ;;
6103         esac
6104         ;;
6105       lynxos*)
6106         ;;
6107       m88k*)
6108         ;;
6109       mvs*)
6110         case $cc_basename in
6111           cxx*)
6112             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6113             ;;
6114           *)
6115             ;;
6116         esac
6117         ;;
6118       netbsd*)
6119         ;;
6120       *qnx* | *nto*)
6121         # QNX uses GNU C++, but need to define -shared option too, otherwise
6122         # it will coredump.
6123         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6124         ;;
6125       osf3* | osf4* | osf5*)
6126         case $cc_basename in
6127           KCC*)
6128             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6129             ;;
6130           RCC*)
6131             # Rational C++ 2.4.1
6132             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6133             ;;
6134           cxx*)
6135             # Digital/Compaq C++
6136             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6137             # Make sure the PIC flag is empty.  It appears that all Alpha
6138             # Linux and Compaq Tru64 Unix objects are PIC.
6139             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6140             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6141             ;;
6142           *)
6143             ;;
6144         esac
6145         ;;
6146       psos*)
6147         ;;
6148       solaris*)
6149         case $cc_basename in
6150           CC*)
6151             # Sun C++ 4.2, 5.x and Centerline C++
6152             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6153             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6154             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6155             ;;
6156           gcx*)
6157             # Green Hills C++ Compiler
6158             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6159             ;;
6160           *)
6161             ;;
6162         esac
6163         ;;
6164       sunos4*)
6165         case $cc_basename in
6166           CC*)
6167             # Sun C++ 4.x
6168             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6169             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6170             ;;
6171           lcc*)
6172             # Lucid
6173             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6174             ;;
6175           *)
6176             ;;
6177         esac
6178         ;;
6179       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6180         case $cc_basename in
6181           CC*)
6182             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6183             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6184             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6185             ;;
6186         esac
6187         ;;
6188       tandem*)
6189         case $cc_basename in
6190           NCC*)
6191             # NonStop-UX NCC 3.20
6192             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6193             ;;
6194           *)
6195             ;;
6196         esac
6197         ;;
6198       vxworks*)
6199         ;;
6200       *)
6201         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6202         ;;
6203     esac
6204   fi
6205 ],
6206 [
6207   if test "$GCC" = yes; then
6208     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6209     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6210
6211     case $host_os in
6212       aix*)
6213       # All AIX code is PIC.
6214       if test "$host_cpu" = ia64; then
6215         # AIX 5 now supports IA64 processor
6216         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6217       fi
6218       ;;
6219
6220     amigaos*)
6221       case $host_cpu in
6222       powerpc)
6223             # see comment about AmigaOS4 .so support
6224             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6225         ;;
6226       m68k)
6227             # FIXME: we need at least 68020 code to build shared libraries, but
6228             # adding the `-m68020' flag to GCC prevents building anything better,
6229             # like `-m68040'.
6230             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6231         ;;
6232       esac
6233       ;;
6234
6235     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6236       # PIC is the default for these OSes.
6237       ;;
6238
6239     mingw* | cygwin* | pw32* | os2* | cegcc*)
6240       # This hack is so that the source file can tell whether it is being
6241       # built for inclusion in a dll (and should export symbols for example).
6242       # Although the cygwin gcc ignores -fPIC, still need this for old-style
6243       # (--disable-auto-import) libraries
6244       m4_if([$1], [GCJ], [],
6245         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6246       ;;
6247
6248     darwin* | rhapsody*)
6249       # PIC is the default on this platform
6250       # Common symbols not allowed in MH_DYLIB files
6251       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6252       ;;
6253
6254     hpux*)
6255       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6256       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6257       # sets the default TLS model and affects inlining.
6258       case $host_cpu in
6259       hppa*64*)
6260         # +Z the default
6261         ;;
6262       *)
6263         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6264         ;;
6265       esac
6266       ;;
6267
6268     interix[[3-9]]*)
6269       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6270       # Instead, we relocate shared libraries at runtime.
6271       ;;
6272
6273     msdosdjgpp*)
6274       # Just because we use GCC doesn't mean we suddenly get shared libraries
6275       # on systems that don't support them.
6276       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6277       enable_shared=no
6278       ;;
6279
6280     *nto* | *qnx*)
6281       # QNX uses GNU C++, but need to define -shared option too, otherwise
6282       # it will coredump.
6283       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6284       ;;
6285
6286     sysv4*MP*)
6287       if test -d /usr/nec; then
6288         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6289       fi
6290       ;;
6291
6292     *)
6293       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6294       ;;
6295     esac
6296   else
6297     # PORTME Check for flag to pass linker flags through the system compiler.
6298     case $host_os in
6299     aix*)
6300       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6301       if test "$host_cpu" = ia64; then
6302         # AIX 5 now supports IA64 processor
6303         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6304       else
6305         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6306       fi
6307       ;;
6308
6309     mingw* | cygwin* | pw32* | os2* | cegcc*)
6310       # This hack is so that the source file can tell whether it is being
6311       # built for inclusion in a dll (and should export symbols for example).
6312       m4_if([$1], [GCJ], [],
6313         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6314       ;;
6315
6316     hpux9* | hpux10* | hpux11*)
6317       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6318       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6319       # not for PA HP-UX.
6320       case $host_cpu in
6321       hppa*64*|ia64*)
6322         # +Z the default
6323         ;;
6324       *)
6325         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6326         ;;
6327       esac
6328       # Is there a better lt_prog_compiler_static that works with the bundled CC?
6329       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6330       ;;
6331
6332     irix5* | irix6* | nonstopux*)
6333       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6334       # PIC (with -KPIC) is the default.
6335       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6336       ;;
6337
6338     linux* | k*bsd*-gnu)
6339       case $cc_basename in
6340       # old Intel for x86_64 which still supported -KPIC.
6341       ecc*)
6342         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6343         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6344         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6345         ;;
6346       # icc used to be incompatible with GCC.
6347       # ICC 10 doesn't accept -KPIC any more.
6348       icc* | ifort*)
6349         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6350         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6351         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6352         ;;
6353       # Lahey Fortran 8.1.
6354       lf95*)
6355         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6356         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6357         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6358         ;;
6359       pgcc* | pgf77* | pgf90* | pgf95*)
6360         # Portland Group compilers (*not* the Pentium gcc compiler,
6361         # which looks to be a dead project)
6362         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6363         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6364         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6365         ;;
6366       ccc*)
6367         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6368         # All Alpha code is PIC.
6369         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6370         ;;
6371       xl*)
6372         # IBM XL C 8.0/Fortran 10.1 on PPC
6373         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6374         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6375         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6376         ;;
6377       *)
6378         case `$CC -V 2>&1 | sed 5q` in
6379         *Sun\ C*)
6380           # Sun C 5.9
6381           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6382           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6383           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6384           ;;
6385         *Sun\ F*)
6386           # Sun Fortran 8.3 passes all unrecognized flags to the linker
6387           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6388           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6389           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6390           ;;
6391         esac
6392         ;;
6393       esac
6394       ;;
6395
6396     newsos6)
6397       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6398       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6399       ;;
6400
6401     *nto* | *qnx*)
6402       # QNX uses GNU C++, but need to define -shared option too, otherwise
6403       # it will coredump.
6404       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6405       ;;
6406
6407     osf3* | osf4* | osf5*)
6408       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6409       # All OSF/1 code is PIC.
6410       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6411       ;;
6412
6413     rdos*)
6414       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6415       ;;
6416
6417     solaris*)
6418       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6419       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6420       case $cc_basename in
6421       f77* | f90* | f95*)
6422         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6423       *)
6424         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6425       esac
6426       ;;
6427
6428     sunos4*)
6429       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6430       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6431       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6432       ;;
6433
6434     sysv4 | sysv4.2uw2* | sysv4.3*)
6435       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6436       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6437       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6438       ;;
6439
6440     sysv4*MP*)
6441       if test -d /usr/nec ;then
6442         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6443         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6444       fi
6445       ;;
6446
6447     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6448       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6449       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6450       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6451       ;;
6452
6453     unicos*)
6454       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6455       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6456       ;;
6457
6458     uts4*)
6459       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6460       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6461       ;;
6462
6463     *)
6464       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6465       ;;
6466     esac
6467   fi
6468 ])
6469 case $host_os in
6470   # For platforms which do not support PIC, -DPIC is meaningless:
6471   *djgpp*)
6472     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6473     ;;
6474   *)
6475     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6476     ;;
6477 esac
6478 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6479 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6480         [How to pass a linker flag through the compiler])
6481
6482 #
6483 # Check to make sure the PIC flag actually works.
6484 #
6485 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6486   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6487     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6488     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6489     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6490      "" | " "*) ;;
6491      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6492      esac],
6493     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6494      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6495 fi
6496 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6497         [Additional compiler flags for building library objects])
6498
6499 #
6500 # Check to make sure the static flag actually works.
6501 #
6502 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6503 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6504   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6505   $lt_tmp_static_flag,
6506   [],
6507   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6508 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6509         [Compiler flag to prevent dynamic linking])
6510 ])# _LT_COMPILER_PIC
6511
6512
6513 # _LT_LINKER_SHLIBS([TAGNAME])
6514 # ----------------------------
6515 # See if the linker supports building shared libraries.
6516 m4_defun([_LT_LINKER_SHLIBS],
6517 [AC_REQUIRE([LT_PATH_LD])dnl
6518 AC_REQUIRE([LT_PATH_NM])dnl
6519 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6520 m4_require([_LT_DECL_EGREP])dnl
6521 m4_require([_LT_DECL_SED])dnl
6522 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6523 m4_require([_LT_TAG_COMPILER])dnl
6524 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6525 m4_if([$1], [CXX], [
6526   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6527   case $host_os in
6528   aix[[4-9]]*)
6529     # If we're using GNU nm, then we don't want the "-C" option.
6530     # -C means demangle to AIX nm, but means don't demangle with GNU nm
6531     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6532       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6533     else
6534       _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'
6535     fi
6536     ;;
6537   pw32*)
6538     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6539   ;;
6540   cygwin* | mingw* | cegcc*)
6541     _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'
6542   ;;
6543   *)
6544     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6545   ;;
6546   esac
6547   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6548 ], [
6549   runpath_var=
6550   _LT_TAGVAR(allow_undefined_flag, $1)=
6551   _LT_TAGVAR(always_export_symbols, $1)=no
6552   _LT_TAGVAR(archive_cmds, $1)=
6553   _LT_TAGVAR(archive_expsym_cmds, $1)=
6554   _LT_TAGVAR(compiler_needs_object, $1)=no
6555   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6556   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6557   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6558   _LT_TAGVAR(hardcode_automatic, $1)=no
6559   _LT_TAGVAR(hardcode_direct, $1)=no
6560   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6561   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6562   _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6563   _LT_TAGVAR(hardcode_libdir_separator, $1)=
6564   _LT_TAGVAR(hardcode_minus_L, $1)=no
6565   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6566   _LT_TAGVAR(inherit_rpath, $1)=no
6567   _LT_TAGVAR(link_all_deplibs, $1)=unknown
6568   _LT_TAGVAR(module_cmds, $1)=
6569   _LT_TAGVAR(module_expsym_cmds, $1)=
6570   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6571   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6572   _LT_TAGVAR(thread_safe_flag_spec, $1)=
6573   _LT_TAGVAR(whole_archive_flag_spec, $1)=
6574   # include_expsyms should be a list of space-separated symbols to be *always*
6575   # included in the symbol list
6576   _LT_TAGVAR(include_expsyms, $1)=
6577   # exclude_expsyms can be an extended regexp of symbols to exclude
6578   # it will be wrapped by ` (' and `)$', so one must not match beginning or
6579   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6580   # as well as any symbol that contains `d'.
6581   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6582   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6583   # platforms (ab)use it in PIC code, but their linkers get confused if
6584   # the symbol is explicitly referenced.  Since portable code cannot
6585   # rely on this symbol name, it's probably fine to never include it in
6586   # preloaded symbol tables.
6587   # Exclude shared library initialization/finalization symbols.
6588 dnl Note also adjust exclude_expsyms for C++ above.
6589   extract_expsyms_cmds=
6590
6591   case $host_os in
6592   cygwin* | mingw* | pw32* | cegcc*)
6593     # FIXME: the MSVC++ port hasn't been tested in a loooong time
6594     # When not using gcc, we currently assume that we are using
6595     # Microsoft Visual C++.
6596     if test "$GCC" != yes; then
6597       with_gnu_ld=no
6598     fi
6599     ;;
6600   interix*)
6601     # we just hope/assume this is gcc and not c89 (= MSVC++)
6602     with_gnu_ld=yes
6603     ;;
6604   openbsd*)
6605     with_gnu_ld=no
6606     ;;
6607   esac
6608
6609   _LT_TAGVAR(ld_shlibs, $1)=yes
6610   if test "$with_gnu_ld" = yes; then
6611     # If archive_cmds runs LD, not CC, wlarc should be empty
6612     wlarc='${wl}'
6613
6614     # Set some defaults for GNU ld with shared library support. These
6615     # are reset later if shared libraries are not supported. Putting them
6616     # here allows them to be overridden if necessary.
6617     runpath_var=LD_RUN_PATH
6618     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6619     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6620     # ancient GNU ld didn't support --whole-archive et. al.
6621     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6622       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6623     else
6624       _LT_TAGVAR(whole_archive_flag_spec, $1)=
6625     fi
6626     supports_anon_versioning=no
6627     case `$LD -v 2>&1` in
6628       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6629       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6630       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6631       *\ 2.11.*) ;; # other 2.11 versions
6632       *) supports_anon_versioning=yes ;;
6633     esac
6634
6635     # See if GNU ld supports shared libraries.
6636     case $host_os in
6637     aix[[3-9]]*)
6638       # On AIX/PPC, the GNU linker is very broken
6639       if test "$host_cpu" != ia64; then
6640         _LT_TAGVAR(ld_shlibs, $1)=no
6641         cat <<_LT_EOF 1>&2
6642
6643 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6644 *** to be unable to reliably create shared libraries on AIX.
6645 *** Therefore, libtool is disabling shared libraries support.  If you
6646 *** really care for shared libraries, you may want to modify your PATH
6647 *** so that a non-GNU linker is found, and then restart.
6648
6649 _LT_EOF
6650       fi
6651       ;;
6652
6653     amigaos*)
6654       case $host_cpu in
6655       powerpc)
6656             # see comment about AmigaOS4 .so support
6657             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6658             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6659         ;;
6660       m68k)
6661             _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)'
6662             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6663             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6664         ;;
6665       esac
6666       ;;
6667
6668     beos*)
6669       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6670         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6671         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6672         # support --undefined.  This deserves some investigation.  FIXME
6673         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6674       else
6675         _LT_TAGVAR(ld_shlibs, $1)=no
6676       fi
6677       ;;
6678
6679     cygwin* | mingw* | pw32* | cegcc*)
6680       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6681       # as there is no search path for DLLs.
6682       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6683       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6684       _LT_TAGVAR(always_export_symbols, $1)=no
6685       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6686       _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'
6687
6688       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6689         _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'
6690         # If the export-symbols file already is a .def file (1st line
6691         # is EXPORTS), use it as is; otherwise, prepend...
6692         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6693           cp $export_symbols $output_objdir/$soname.def;
6694         else
6695           echo EXPORTS > $output_objdir/$soname.def;
6696           cat $export_symbols >> $output_objdir/$soname.def;
6697         fi~
6698         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6699       else
6700         _LT_TAGVAR(ld_shlibs, $1)=no
6701       fi
6702       ;;
6703
6704     interix[[3-9]]*)
6705       _LT_TAGVAR(hardcode_direct, $1)=no
6706       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6707       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6708       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6709       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6710       # Instead, shared libraries are loaded at an image base (0x10000000 by
6711       # default) and relocated if they conflict, which is a slow very memory
6712       # consuming and fragmenting process.  To avoid this, we pick a random,
6713       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6714       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6715       _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'
6716       _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'
6717       ;;
6718
6719     gnu* | linux* | tpf* | k*bsd*-gnu)
6720       tmp_diet=no
6721       if test "$host_os" = linux-dietlibc; then
6722         case $cc_basename in
6723           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
6724         esac
6725       fi
6726       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6727          && test "$tmp_diet" = no
6728       then
6729         tmp_addflag=
6730         tmp_sharedflag='-shared'
6731         case $cc_basename,$host_cpu in
6732         pgcc*)                          # Portland Group C compiler
6733           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6734           tmp_addflag=' $pic_flag'
6735           ;;
6736         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
6737           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6738           tmp_addflag=' $pic_flag -Mnomain' ;;
6739         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
6740           tmp_addflag=' -i_dynamic' ;;
6741         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
6742           tmp_addflag=' -i_dynamic -nofor_main' ;;
6743         ifc* | ifort*)                  # Intel Fortran compiler
6744           tmp_addflag=' -nofor_main' ;;
6745         lf95*)                          # Lahey Fortran 8.1
6746           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6747           tmp_sharedflag='--shared' ;;
6748         xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
6749           tmp_sharedflag='-qmkshrobj'
6750           tmp_addflag= ;;
6751         esac
6752         case `$CC -V 2>&1 | sed 5q` in
6753         *Sun\ C*)                       # Sun C 5.9
6754           _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6755           _LT_TAGVAR(compiler_needs_object, $1)=yes
6756           tmp_sharedflag='-G' ;;
6757         *Sun\ F*)                       # Sun Fortran 8.3
6758           tmp_sharedflag='-G' ;;
6759         esac
6760         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6761
6762         if test "x$supports_anon_versioning" = xyes; then
6763           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6764             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6765             echo "local: *; };" >> $output_objdir/$libname.ver~
6766             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6767         fi
6768
6769         case $cc_basename in
6770         xlf*)
6771           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6772           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6773           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6774           _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6775           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
6776           if test "x$supports_anon_versioning" = xyes; then
6777             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6778               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6779               echo "local: *; };" >> $output_objdir/$libname.ver~
6780               $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6781           fi
6782           ;;
6783         esac
6784       else
6785         _LT_TAGVAR(ld_shlibs, $1)=no
6786       fi
6787       ;;
6788
6789     netbsd*)
6790       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6791         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6792         wlarc=
6793       else
6794         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6795         _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'
6796       fi
6797       ;;
6798
6799     solaris*)
6800       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6801         _LT_TAGVAR(ld_shlibs, $1)=no
6802         cat <<_LT_EOF 1>&2
6803
6804 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6805 *** create shared libraries on Solaris systems.  Therefore, libtool
6806 *** is disabling shared libraries support.  We urge you to upgrade GNU
6807 *** binutils to release 2.9.1 or newer.  Another option is to modify
6808 *** your PATH or compiler configuration so that the native linker is
6809 *** used, and then restart.
6810
6811 _LT_EOF
6812       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6813         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6814         _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'
6815       else
6816         _LT_TAGVAR(ld_shlibs, $1)=no
6817       fi
6818       ;;
6819
6820     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6821       case `$LD -v 2>&1` in
6822         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6823         _LT_TAGVAR(ld_shlibs, $1)=no
6824         cat <<_LT_EOF 1>&2
6825
6826 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6827 *** reliably create shared libraries on SCO systems.  Therefore, libtool
6828 *** is disabling shared libraries support.  We urge you to upgrade GNU
6829 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6830 *** your PATH or compiler configuration so that the native linker is
6831 *** used, and then restart.
6832
6833 _LT_EOF
6834         ;;
6835         *)
6836           # For security reasons, it is highly recommended that you always
6837           # use absolute paths for naming shared libraries, and exclude the
6838           # DT_RUNPATH tag from executables and libraries.  But doing so
6839           # requires that you compile everything twice, which is a pain.
6840           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6841             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6842             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6843             _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'
6844           else
6845             _LT_TAGVAR(ld_shlibs, $1)=no
6846           fi
6847         ;;
6848       esac
6849       ;;
6850
6851     sunos4*)
6852       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6853       wlarc=
6854       _LT_TAGVAR(hardcode_direct, $1)=yes
6855       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6856       ;;
6857
6858     *)
6859       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6860         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6861         _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'
6862       else
6863         _LT_TAGVAR(ld_shlibs, $1)=no
6864       fi
6865       ;;
6866     esac
6867
6868     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6869       runpath_var=
6870       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6871       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6872       _LT_TAGVAR(whole_archive_flag_spec, $1)=
6873     fi
6874   else
6875     # PORTME fill in a description of your system's linker (not GNU ld)
6876     case $host_os in
6877     aix3*)
6878       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6879       _LT_TAGVAR(always_export_symbols, $1)=yes
6880       _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'
6881       # Note: this linker hardcodes the directories in LIBPATH if there
6882       # are no directories specified by -L.
6883       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6884       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6885         # Neither direct hardcoding nor static linking is supported with a
6886         # broken collect2.
6887         _LT_TAGVAR(hardcode_direct, $1)=unsupported
6888       fi
6889       ;;
6890
6891     aix[[4-9]]*)
6892       if test "$host_cpu" = ia64; then
6893         # On IA64, the linker does run time linking by default, so we don't
6894         # have to do anything special.
6895         aix_use_runtimelinking=no
6896         exp_sym_flag='-Bexport'
6897         no_entry_flag=""
6898       else
6899         # If we're using GNU nm, then we don't want the "-C" option.
6900         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6901         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6902           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6903         else
6904           _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'
6905         fi
6906         aix_use_runtimelinking=no
6907
6908         # Test if we are trying to use run time linking or normal
6909         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6910         # need to do runtime linking.
6911         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6912           for ld_flag in $LDFLAGS; do
6913           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6914             aix_use_runtimelinking=yes
6915             break
6916           fi
6917           done
6918           ;;
6919         esac
6920
6921         exp_sym_flag='-bexport'
6922         no_entry_flag='-bnoentry'
6923       fi
6924
6925       # When large executables or shared objects are built, AIX ld can
6926       # have problems creating the table of contents.  If linking a library
6927       # or program results in "error TOC overflow" add -mminimal-toc to
6928       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6929       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6930
6931       _LT_TAGVAR(archive_cmds, $1)=''
6932       _LT_TAGVAR(hardcode_direct, $1)=yes
6933       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6934       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6935       _LT_TAGVAR(link_all_deplibs, $1)=yes
6936       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6937
6938       if test "$GCC" = yes; then
6939         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6940         # We only want to do this on AIX 4.2 and lower, the check
6941         # below for broken collect2 doesn't work under 4.3+
6942           collect2name=`${CC} -print-prog-name=collect2`
6943           if test -f "$collect2name" &&
6944            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6945           then
6946           # We have reworked collect2
6947           :
6948           else
6949           # We have old collect2
6950           _LT_TAGVAR(hardcode_direct, $1)=unsupported
6951           # It fails to find uninstalled libraries when the uninstalled
6952           # path is not listed in the libpath.  Setting hardcode_minus_L
6953           # to unsupported forces relinking
6954           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6955           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6956           _LT_TAGVAR(hardcode_libdir_separator, $1)=
6957           fi
6958           ;;
6959         esac
6960         shared_flag='-shared'
6961         if test "$aix_use_runtimelinking" = yes; then
6962           shared_flag="$shared_flag "'${wl}-G'
6963         fi
6964       else
6965         # not using gcc
6966         if test "$host_cpu" = ia64; then
6967         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6968         # chokes on -Wl,-G. The following line is correct:
6969           shared_flag='-G'
6970         else
6971           if test "$aix_use_runtimelinking" = yes; then
6972             shared_flag='${wl}-G'
6973           else
6974             shared_flag='${wl}-bM:SRE'
6975           fi
6976         fi
6977       fi
6978
6979       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6980       # It seems that -bexpall does not export symbols beginning with
6981       # underscore (_), so it is better to generate a list of symbols to export.
6982       _LT_TAGVAR(always_export_symbols, $1)=yes
6983       if test "$aix_use_runtimelinking" = yes; then
6984         # Warning - without using the other runtime loading flags (-brtl),
6985         # -berok will link without error, but may produce a broken library.
6986         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6987         # Determine the default libpath from the value encoded in an
6988         # empty executable.
6989         _LT_SYS_MODULE_PATH_AIX
6990         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6991         _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6992       else
6993         if test "$host_cpu" = ia64; then
6994           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6995           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6996           _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"
6997         else
6998          # Determine the default libpath from the value encoded in an
6999          # empty executable.
7000          _LT_SYS_MODULE_PATH_AIX
7001          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7002           # Warning - without using the other run time loading flags,
7003           # -berok will link without error, but may produce a broken library.
7004           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7005           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7006           # Exported symbols can be pulled into shared objects from archives
7007           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7008           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7009           # This is similar to how AIX traditionally builds its shared libraries.
7010           _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'
7011         fi
7012       fi
7013       ;;
7014
7015     amigaos*)
7016       case $host_cpu in
7017       powerpc)
7018             # see comment about AmigaOS4 .so support
7019             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7020             _LT_TAGVAR(archive_expsym_cmds, $1)=''
7021         ;;
7022       m68k)
7023             _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)'
7024             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7025             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7026         ;;
7027       esac
7028       ;;
7029
7030     bsdi[[45]]*)
7031       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7032       ;;
7033
7034     cygwin* | mingw* | pw32* | cegcc*)
7035       # When not using gcc, we currently assume that we are using
7036       # Microsoft Visual C++.
7037       # hardcode_libdir_flag_spec is actually meaningless, as there is
7038       # no search path for DLLs.
7039       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7040       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7041       # Tell ltmain to make .lib files, not .a files.
7042       libext=lib
7043       # Tell ltmain to make .dll files, not .so files.
7044       shrext_cmds=".dll"
7045       # FIXME: Setting linknames here is a bad hack.
7046       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
7047       # The linker will automatically build a .lib file if we build a DLL.
7048       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7049       # FIXME: Should let the user specify the lib program.
7050       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7051       _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7052       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7053       ;;
7054
7055     darwin* | rhapsody*)
7056       _LT_DARWIN_LINKER_FEATURES($1)
7057       ;;
7058
7059     dgux*)
7060       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7061       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7062       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7063       ;;
7064
7065     freebsd1*)
7066       _LT_TAGVAR(ld_shlibs, $1)=no
7067       ;;
7068
7069     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7070     # support.  Future versions do this automatically, but an explicit c++rt0.o
7071     # does not break anything, and helps significantly (at the cost of a little
7072     # extra space).
7073     freebsd2.2*)
7074       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7075       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7076       _LT_TAGVAR(hardcode_direct, $1)=yes
7077       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7078       ;;
7079
7080     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7081     freebsd2*)
7082       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7083       _LT_TAGVAR(hardcode_direct, $1)=yes
7084       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7085       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7086       ;;
7087
7088     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7089     freebsd* | dragonfly*)
7090       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7091       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7092       _LT_TAGVAR(hardcode_direct, $1)=yes
7093       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7094       ;;
7095
7096     hpux9*)
7097       if test "$GCC" = yes; then
7098         _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'
7099       else
7100         _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'
7101       fi
7102       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7103       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7104       _LT_TAGVAR(hardcode_direct, $1)=yes
7105
7106       # hardcode_minus_L: Not really in the search PATH,
7107       # but as the default location of the library.
7108       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7109       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7110       ;;
7111
7112     hpux10*)
7113       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7114         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7115       else
7116         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7117       fi
7118       if test "$with_gnu_ld" = no; then
7119         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7120         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7121         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7122         _LT_TAGVAR(hardcode_direct, $1)=yes
7123         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7124         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7125         # hardcode_minus_L: Not really in the search PATH,
7126         # but as the default location of the library.
7127         _LT_TAGVAR(hardcode_minus_L, $1)=yes
7128       fi
7129       ;;
7130
7131     hpux11*)
7132       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7133         case $host_cpu in
7134         hppa*64*)
7135           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7136           ;;
7137         ia64*)
7138           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7139           ;;
7140         *)
7141           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7142           ;;
7143         esac
7144       else
7145         case $host_cpu in
7146         hppa*64*)
7147           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7148           ;;
7149         ia64*)
7150           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7151           ;;
7152         *)
7153           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7154           ;;
7155         esac
7156       fi
7157       if test "$with_gnu_ld" = no; then
7158         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7159         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7160
7161         case $host_cpu in
7162         hppa*64*|ia64*)
7163           _LT_TAGVAR(hardcode_direct, $1)=no
7164           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7165           ;;
7166         *)
7167           _LT_TAGVAR(hardcode_direct, $1)=yes
7168           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7169           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7170
7171           # hardcode_minus_L: Not really in the search PATH,
7172           # but as the default location of the library.
7173           _LT_TAGVAR(hardcode_minus_L, $1)=yes
7174           ;;
7175         esac
7176       fi
7177       ;;
7178
7179     irix5* | irix6* | nonstopux*)
7180       if test "$GCC" = yes; then
7181         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7182         # Try to use the -exported_symbol ld option, if it does not
7183         # work, assume that -exports_file does not work either and
7184         # implicitly export all symbols.
7185         save_LDFLAGS="$LDFLAGS"
7186         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7187         AC_LINK_IFELSE(int foo(void) {},
7188           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
7189         )
7190         LDFLAGS="$save_LDFLAGS"
7191       else
7192         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7193         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
7194       fi
7195       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7196       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7197       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7198       _LT_TAGVAR(inherit_rpath, $1)=yes
7199       _LT_TAGVAR(link_all_deplibs, $1)=yes
7200       ;;
7201
7202     netbsd*)
7203       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7204         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7205       else
7206         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7207       fi
7208       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7209       _LT_TAGVAR(hardcode_direct, $1)=yes
7210       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7211       ;;
7212
7213     newsos6)
7214       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7215       _LT_TAGVAR(hardcode_direct, $1)=yes
7216       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7217       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7218       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7219       ;;
7220
7221     *nto* | *qnx*)
7222       ;;
7223
7224     openbsd*)
7225       if test -f /usr/libexec/ld.so; then
7226         _LT_TAGVAR(hardcode_direct, $1)=yes
7227         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7228         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7229         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7230           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7231           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7232           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7233           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7234         else
7235           case $host_os in
7236            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7237              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7238              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7239              ;;
7240            *)
7241              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7242              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7243              ;;
7244           esac
7245         fi
7246       else
7247         _LT_TAGVAR(ld_shlibs, $1)=no
7248       fi
7249       ;;
7250
7251     os2*)
7252       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7253       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7254       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7255       _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'
7256       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7257       ;;
7258
7259     osf3*)
7260       if test "$GCC" = yes; then
7261         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7262         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7263       else
7264         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7265         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7266       fi
7267       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7268       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7269       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7270       ;;
7271
7272     osf4* | osf5*)      # as osf3* with the addition of -msym flag
7273       if test "$GCC" = yes; then
7274         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7275         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7276         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7277       else
7278         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7279         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7280         _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~
7281         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
7282
7283         # Both c and cxx compiler support -rpath directly
7284         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7285       fi
7286       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7287       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7288       ;;
7289
7290     solaris*)
7291       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7292       if test "$GCC" = yes; then
7293         wlarc='${wl}'
7294         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7295         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7296           $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7297       else
7298         case `$CC -V 2>&1` in
7299         *"Compilers 5.0"*)
7300           wlarc=''
7301           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7302           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7303           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7304           ;;
7305         *)
7306           wlarc='${wl}'
7307           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7308           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7309           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7310           ;;
7311         esac
7312       fi
7313       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7314       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7315       case $host_os in
7316       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7317       *)
7318         # The compiler driver will combine and reorder linker options,
7319         # but understands `-z linker_flag'.  GCC discards it without `$wl',
7320         # but is careful enough not to reorder.
7321         # Supported since Solaris 2.6 (maybe 2.5.1?)
7322         if test "$GCC" = yes; then
7323           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7324         else
7325           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7326         fi
7327         ;;
7328       esac
7329       _LT_TAGVAR(link_all_deplibs, $1)=yes
7330       ;;
7331
7332     sunos4*)
7333       if test "x$host_vendor" = xsequent; then
7334         # Use $CC to link under sequent, because it throws in some extra .o
7335         # files that make .init and .fini sections work.
7336         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7337       else
7338         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7339       fi
7340       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7341       _LT_TAGVAR(hardcode_direct, $1)=yes
7342       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7343       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7344       ;;
7345
7346     sysv4)
7347       case $host_vendor in
7348         sni)
7349           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7350           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7351         ;;
7352         siemens)
7353           ## LD is ld it makes a PLAMLIB
7354           ## CC just makes a GrossModule.
7355           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7356           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7357           _LT_TAGVAR(hardcode_direct, $1)=no
7358         ;;
7359         motorola)
7360           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7361           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7362         ;;
7363       esac
7364       runpath_var='LD_RUN_PATH'
7365       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7366       ;;
7367
7368     sysv4.3*)
7369       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7370       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7371       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7372       ;;
7373
7374     sysv4*MP*)
7375       if test -d /usr/nec; then
7376         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7377         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7378         runpath_var=LD_RUN_PATH
7379         hardcode_runpath_var=yes
7380         _LT_TAGVAR(ld_shlibs, $1)=yes
7381       fi
7382       ;;
7383
7384     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7385       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7386       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7387       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7388       runpath_var='LD_RUN_PATH'
7389
7390       if test "$GCC" = yes; then
7391         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7392         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7393       else
7394         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7395         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7396       fi
7397       ;;
7398
7399     sysv5* | sco3.2v5* | sco5v6*)
7400       # Note: We can NOT use -z defs as we might desire, because we do not
7401       # link with -lc, and that would cause any symbols used from libc to
7402       # always be unresolved, which means just about no library would
7403       # ever link correctly.  If we're not using GNU ld we use -z text
7404       # though, which does catch some bad symbols but isn't as heavy-handed
7405       # as -z defs.
7406       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7407       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7408       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7409       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7410       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7411       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7412       _LT_TAGVAR(link_all_deplibs, $1)=yes
7413       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7414       runpath_var='LD_RUN_PATH'
7415
7416       if test "$GCC" = yes; then
7417         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7418         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7419       else
7420         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7421         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7422       fi
7423       ;;
7424
7425     uts4*)
7426       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7427       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7428       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7429       ;;
7430
7431     *)
7432       _LT_TAGVAR(ld_shlibs, $1)=no
7433       ;;
7434     esac
7435
7436     if test x$host_vendor = xsni; then
7437       case $host in
7438       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7439         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7440         ;;
7441       esac
7442     fi
7443   fi
7444 ])
7445 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7446 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7447
7448 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7449
7450 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7451 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7452 _LT_DECL([], [extract_expsyms_cmds], [2],
7453     [The commands to extract the exported symbol list from a shared archive])
7454
7455 #
7456 # Do we need to explicitly link libc?
7457 #
7458 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7459 x|xyes)
7460   # Assume -lc should be added
7461   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7462
7463   if test "$enable_shared" = yes && test "$GCC" = yes; then
7464     case $_LT_TAGVAR(archive_cmds, $1) in
7465     *'~'*)
7466       # FIXME: we may have to deal with multi-command sequences.
7467       ;;
7468     '$CC '*)
7469       # Test whether the compiler implicitly links with -lc since on some
7470       # systems, -lgcc has to come before -lc. If gcc already passes -lc
7471       # to ld, don't add -lc before -lgcc.
7472       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7473       $RM conftest*
7474       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7475
7476       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7477         soname=conftest
7478         lib=conftest
7479         libobjs=conftest.$ac_objext
7480         deplibs=
7481         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7482         pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7483         compiler_flags=-v
7484         linker_flags=-v
7485         verstring=
7486         output_objdir=.
7487         libname=conftest
7488         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7489         _LT_TAGVAR(allow_undefined_flag, $1)=
7490         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7491         then
7492           _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7493         else
7494           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7495         fi
7496         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7497       else
7498         cat conftest.err 1>&5
7499       fi
7500       $RM conftest*
7501       AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
7502       ;;
7503     esac
7504   fi
7505   ;;
7506 esac
7507
7508 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7509     [Whether or not to add -lc for building shared libraries])
7510 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7511     [enable_shared_with_static_runtimes], [0],
7512     [Whether or not to disallow shared libs when runtime libs are static])
7513 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7514     [Compiler flag to allow reflexive dlopens])
7515 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
7516     [Compiler flag to generate shared objects directly from archives])
7517 _LT_TAGDECL([], [compiler_needs_object], [1],
7518     [Whether the compiler copes with passing no objects directly])
7519 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7520     [Create an old-style archive from a shared archive])
7521 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7522     [Create a temporary old-style archive to link instead of a shared archive])
7523 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7524 _LT_TAGDECL([], [archive_expsym_cmds], [2])
7525 _LT_TAGDECL([], [module_cmds], [2],
7526     [Commands used to build a loadable module if different from building
7527     a shared archive.])
7528 _LT_TAGDECL([], [module_expsym_cmds], [2])
7529 _LT_TAGDECL([], [with_gnu_ld], [1],
7530     [Whether we are building with GNU ld or not])
7531 _LT_TAGDECL([], [allow_undefined_flag], [1],
7532     [Flag that allows shared libraries with undefined symbols to be built])
7533 _LT_TAGDECL([], [no_undefined_flag], [1],
7534     [Flag that enforces no undefined symbols])
7535 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7536     [Flag to hardcode $libdir into a binary during linking.
7537     This must work even if $libdir does not exist])
7538 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7539     [[If ld is used when linking, flag to hardcode $libdir into a binary
7540     during linking.  This must work even if $libdir does not exist]])
7541 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
7542     [Whether we need a single "-rpath" flag with a separated argument])
7543 _LT_TAGDECL([], [hardcode_direct], [0],
7544     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7545     DIR into the resulting binary])
7546 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
7547     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7548     DIR into the resulting binary and the resulting library dependency is
7549     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7550     library is relocated])
7551 _LT_TAGDECL([], [hardcode_minus_L], [0],
7552     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7553     into the resulting binary])
7554 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7555     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7556     into the resulting binary])
7557 _LT_TAGDECL([], [hardcode_automatic], [0],
7558     [Set to "yes" if building a shared library automatically hardcodes DIR
7559     into the library and all subsequent libraries and executables linked
7560     against it])
7561 _LT_TAGDECL([], [inherit_rpath], [0],
7562     [Set to yes if linker adds runtime paths of dependent libraries
7563     to runtime path list])
7564 _LT_TAGDECL([], [link_all_deplibs], [0],
7565     [Whether libtool must link a program against all its dependency libraries])
7566 _LT_TAGDECL([], [fix_srcfile_path], [1],
7567     [Fix the shell variable $srcfile for the compiler])
7568 _LT_TAGDECL([], [always_export_symbols], [0],
7569     [Set to "yes" if exported symbols are required])
7570 _LT_TAGDECL([], [export_symbols_cmds], [2],
7571     [The commands to list exported symbols])
7572 _LT_TAGDECL([], [exclude_expsyms], [1],
7573     [Symbols that should not be listed in the preloaded symbols])
7574 _LT_TAGDECL([], [include_expsyms], [1],
7575     [Symbols that must always be exported])
7576 _LT_TAGDECL([], [prelink_cmds], [2],
7577     [Commands necessary for linking programs (against libraries) with templates])
7578 _LT_TAGDECL([], [file_list_spec], [1],
7579     [Specify filename containing input files])
7580 dnl FIXME: Not yet implemented
7581 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7582 dnl    [Compiler flag to generate thread safe objects])
7583 ])# _LT_LINKER_SHLIBS
7584
7585
7586 # _LT_LANG_C_CONFIG([TAG])
7587 # ------------------------
7588 # Ensure that the configuration variables for a C compiler are suitably
7589 # defined.  These variables are subsequently used by _LT_CONFIG to write
7590 # the compiler configuration to `libtool'.
7591 m4_defun([_LT_LANG_C_CONFIG],
7592 [m4_require([_LT_DECL_EGREP])dnl
7593 lt_save_CC="$CC"
7594 AC_LANG_PUSH(C)
7595
7596 # Source file extension for C test sources.
7597 ac_ext=c
7598
7599 # Object file extension for compiled C test sources.
7600 objext=o
7601 _LT_TAGVAR(objext, $1)=$objext
7602
7603 # Code to be used in simple compile tests
7604 lt_simple_compile_test_code="int some_variable = 0;"
7605
7606 # Code to be used in simple link tests
7607 lt_simple_link_test_code='int main(){return(0);}'
7608
7609 _LT_TAG_COMPILER
7610 # Save the default compiler, since it gets overwritten when the other
7611 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7612 compiler_DEFAULT=$CC
7613
7614 # save warnings/boilerplate of simple test code
7615 _LT_COMPILER_BOILERPLATE
7616 _LT_LINKER_BOILERPLATE
7617
7618 if test -n "$compiler"; then
7619   _LT_COMPILER_NO_RTTI($1)
7620   _LT_COMPILER_PIC($1)
7621   _LT_COMPILER_C_O($1)
7622   _LT_COMPILER_FILE_LOCKS($1)
7623   _LT_LINKER_SHLIBS($1)
7624   _LT_SYS_DYNAMIC_LINKER($1)
7625   _LT_LINKER_HARDCODE_LIBPATH($1)
7626   LT_SYS_DLOPEN_SELF
7627   _LT_CMD_STRIPLIB
7628
7629   # Report which library types will actually be built
7630   AC_MSG_CHECKING([if libtool supports shared libraries])
7631   AC_MSG_RESULT([$can_build_shared])
7632
7633   AC_MSG_CHECKING([whether to build shared libraries])
7634   test "$can_build_shared" = "no" && enable_shared=no
7635
7636   # On AIX, shared libraries and static libraries use the same namespace, and
7637   # are all built from PIC.
7638   case $host_os in
7639   aix3*)
7640     test "$enable_shared" = yes && enable_static=no
7641     if test -n "$RANLIB"; then
7642       archive_cmds="$archive_cmds~\$RANLIB \$lib"
7643       postinstall_cmds='$RANLIB $lib'
7644     fi
7645     ;;
7646
7647   aix[[4-9]]*)
7648     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7649       test "$enable_shared" = yes && enable_static=no
7650     fi
7651     ;;
7652   esac
7653   AC_MSG_RESULT([$enable_shared])
7654
7655   AC_MSG_CHECKING([whether to build static libraries])
7656   # Make sure either enable_shared or enable_static is yes.
7657   test "$enable_shared" = yes || enable_static=yes
7658   AC_MSG_RESULT([$enable_static])
7659
7660   _LT_CONFIG($1)
7661 fi
7662 AC_LANG_POP
7663 CC="$lt_save_CC"
7664 ])# _LT_LANG_C_CONFIG
7665
7666
7667 # _LT_PROG_CXX
7668 # ------------
7669 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
7670 # compiler, we have our own version here.
7671 m4_defun([_LT_PROG_CXX],
7672 [
7673 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
7674 AC_PROG_CXX
7675 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7676     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7677     (test "X$CXX" != "Xg++"))) ; then
7678   AC_PROG_CXXCPP
7679 else
7680   _lt_caught_CXX_error=yes
7681 fi
7682 popdef([AC_MSG_ERROR])
7683 ])# _LT_PROG_CXX
7684
7685 dnl aclocal-1.4 backwards compatibility:
7686 dnl AC_DEFUN([_LT_PROG_CXX], [])
7687
7688
7689 # _LT_LANG_CXX_CONFIG([TAG])
7690 # --------------------------
7691 # Ensure that the configuration variables for a C++ compiler are suitably
7692 # defined.  These variables are subsequently used by _LT_CONFIG to write
7693 # the compiler configuration to `libtool'.
7694 m4_defun([_LT_LANG_CXX_CONFIG],
7695 [AC_REQUIRE([_LT_PROG_CXX])dnl
7696 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7697 m4_require([_LT_DECL_EGREP])dnl
7698
7699 AC_LANG_PUSH(C++)
7700 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7701 _LT_TAGVAR(allow_undefined_flag, $1)=
7702 _LT_TAGVAR(always_export_symbols, $1)=no
7703 _LT_TAGVAR(archive_expsym_cmds, $1)=
7704 _LT_TAGVAR(compiler_needs_object, $1)=no
7705 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7706 _LT_TAGVAR(hardcode_direct, $1)=no
7707 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7708 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7709 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7710 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7711 _LT_TAGVAR(hardcode_minus_L, $1)=no
7712 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7713 _LT_TAGVAR(hardcode_automatic, $1)=no
7714 _LT_TAGVAR(inherit_rpath, $1)=no
7715 _LT_TAGVAR(module_cmds, $1)=
7716 _LT_TAGVAR(module_expsym_cmds, $1)=
7717 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7718 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7719 _LT_TAGVAR(no_undefined_flag, $1)=
7720 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7721 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7722
7723 # Source file extension for C++ test sources.
7724 ac_ext=cpp
7725
7726 # Object file extension for compiled C++ test sources.
7727 objext=o
7728 _LT_TAGVAR(objext, $1)=$objext
7729
7730 # No sense in running all these tests if we already determined that
7731 # the CXX compiler isn't working.  Some variables (like enable_shared)
7732 # are currently assumed to apply to all compilers on this platform,
7733 # and will be corrupted by setting them based on a non-working compiler.
7734 if test "$_lt_caught_CXX_error" != yes; then
7735   # Code to be used in simple compile tests
7736   lt_simple_compile_test_code="int some_variable = 0;"
7737
7738   # Code to be used in simple link tests
7739   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7740
7741   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7742   _LT_TAG_COMPILER
7743
7744   # save warnings/boilerplate of simple test code
7745   _LT_COMPILER_BOILERPLATE
7746   _LT_LINKER_BOILERPLATE
7747
7748   # Allow CC to be a program name with arguments.
7749   lt_save_CC=$CC
7750   lt_save_LD=$LD
7751   lt_save_GCC=$GCC
7752   GCC=$GXX
7753   lt_save_with_gnu_ld=$with_gnu_ld
7754   lt_save_path_LD=$lt_cv_path_LD
7755   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7756     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7757   else
7758     $as_unset lt_cv_prog_gnu_ld
7759   fi
7760   if test -n "${lt_cv_path_LDCXX+set}"; then
7761     lt_cv_path_LD=$lt_cv_path_LDCXX
7762   else
7763     $as_unset lt_cv_path_LD
7764   fi
7765   test -z "${LDCXX+set}" || LD=$LDCXX
7766   CC=${CXX-"c++"}
7767   compiler=$CC
7768   _LT_TAGVAR(compiler, $1)=$CC
7769   _LT_CC_BASENAME([$compiler])
7770
7771   if test -n "$compiler"; then
7772     # We don't want -fno-exception when compiling C++ code, so set the
7773     # no_builtin_flag separately
7774     if test "$GXX" = yes; then
7775       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7776     else
7777       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7778     fi
7779
7780     if test "$GXX" = yes; then
7781       # Set up default GNU C++ configuration
7782
7783       LT_PATH_LD
7784
7785       # Check if GNU C++ uses GNU ld as the underlying linker, since the
7786       # archiving commands below assume that GNU ld is being used.
7787       if test "$with_gnu_ld" = yes; then
7788         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7789         _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'
7790
7791         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7792         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7793
7794         # If archive_cmds runs LD, not CC, wlarc should be empty
7795         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7796         #     investigate it a little bit more. (MM)
7797         wlarc='${wl}'
7798
7799         # ancient GNU ld didn't support --whole-archive et. al.
7800         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7801           $GREP 'no-whole-archive' > /dev/null; then
7802           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7803         else
7804           _LT_TAGVAR(whole_archive_flag_spec, $1)=
7805         fi
7806       else
7807         with_gnu_ld=no
7808         wlarc=
7809
7810         # A generic and very simple default shared library creation
7811         # command for GNU C++ for the case where it uses the native
7812         # linker, instead of GNU ld.  If possible, this setting should
7813         # overridden to take advantage of the native linker features on
7814         # the platform it is being used on.
7815         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7816       fi
7817
7818       # Commands to make compiler produce verbose output that lists
7819       # what "hidden" libraries, object files and flags are used when
7820       # linking a shared library.
7821       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7822
7823     else
7824       GXX=no
7825       with_gnu_ld=no
7826       wlarc=
7827     fi
7828
7829     # PORTME: fill in a description of your system's C++ link characteristics
7830     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7831     _LT_TAGVAR(ld_shlibs, $1)=yes
7832     case $host_os in
7833       aix3*)
7834         # FIXME: insert proper C++ library support
7835         _LT_TAGVAR(ld_shlibs, $1)=no
7836         ;;
7837       aix[[4-9]]*)
7838         if test "$host_cpu" = ia64; then
7839           # On IA64, the linker does run time linking by default, so we don't
7840           # have to do anything special.
7841           aix_use_runtimelinking=no
7842           exp_sym_flag='-Bexport'
7843           no_entry_flag=""
7844         else
7845           aix_use_runtimelinking=no
7846
7847           # Test if we are trying to use run time linking or normal
7848           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7849           # need to do runtime linking.
7850           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7851             for ld_flag in $LDFLAGS; do
7852               case $ld_flag in
7853               *-brtl*)
7854                 aix_use_runtimelinking=yes
7855                 break
7856                 ;;
7857               esac
7858             done
7859             ;;
7860           esac
7861
7862           exp_sym_flag='-bexport'
7863           no_entry_flag='-bnoentry'
7864         fi
7865
7866         # When large executables or shared objects are built, AIX ld can
7867         # have problems creating the table of contents.  If linking a library
7868         # or program results in "error TOC overflow" add -mminimal-toc to
7869         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7870         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7871
7872         _LT_TAGVAR(archive_cmds, $1)=''
7873         _LT_TAGVAR(hardcode_direct, $1)=yes
7874         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7875         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7876         _LT_TAGVAR(link_all_deplibs, $1)=yes
7877         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7878
7879         if test "$GXX" = yes; then
7880           case $host_os in aix4.[[012]]|aix4.[[012]].*)
7881           # We only want to do this on AIX 4.2 and lower, the check
7882           # below for broken collect2 doesn't work under 4.3+
7883           collect2name=`${CC} -print-prog-name=collect2`
7884           if test -f "$collect2name" &&
7885              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7886           then
7887             # We have reworked collect2
7888             :
7889           else
7890             # We have old collect2
7891             _LT_TAGVAR(hardcode_direct, $1)=unsupported
7892             # It fails to find uninstalled libraries when the uninstalled
7893             # path is not listed in the libpath.  Setting hardcode_minus_L
7894             # to unsupported forces relinking
7895             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7896             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7897             _LT_TAGVAR(hardcode_libdir_separator, $1)=
7898           fi
7899           esac
7900           shared_flag='-shared'
7901           if test "$aix_use_runtimelinking" = yes; then
7902             shared_flag="$shared_flag "'${wl}-G'
7903           fi
7904         else
7905           # not using gcc
7906           if test "$host_cpu" = ia64; then
7907           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7908           # chokes on -Wl,-G. The following line is correct:
7909           shared_flag='-G'
7910           else
7911             if test "$aix_use_runtimelinking" = yes; then
7912               shared_flag='${wl}-G'
7913             else
7914               shared_flag='${wl}-bM:SRE'
7915             fi
7916           fi
7917         fi
7918
7919         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7920         # It seems that -bexpall does not export symbols beginning with
7921         # underscore (_), so it is better to generate a list of symbols to
7922         # export.
7923         _LT_TAGVAR(always_export_symbols, $1)=yes
7924         if test "$aix_use_runtimelinking" = yes; then
7925           # Warning - without using the other runtime loading flags (-brtl),
7926           # -berok will link without error, but may produce a broken library.
7927           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7928           # Determine the default libpath from the value encoded in an empty
7929           # executable.
7930           _LT_SYS_MODULE_PATH_AIX
7931           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7932
7933           _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7934         else
7935           if test "$host_cpu" = ia64; then
7936             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7937             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7938             _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"
7939           else
7940             # Determine the default libpath from the value encoded in an
7941             # empty executable.
7942             _LT_SYS_MODULE_PATH_AIX
7943             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7944             # Warning - without using the other run time loading flags,
7945             # -berok will link without error, but may produce a broken library.
7946             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7947             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7948             # Exported symbols can be pulled into shared objects from archives
7949             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7950             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7951             # This is similar to how AIX traditionally builds its shared
7952             # libraries.
7953             _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'
7954           fi
7955         fi
7956         ;;
7957
7958       beos*)
7959         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7960           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7961           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7962           # support --undefined.  This deserves some investigation.  FIXME
7963           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7964         else
7965           _LT_TAGVAR(ld_shlibs, $1)=no
7966         fi
7967         ;;
7968
7969       chorus*)
7970         case $cc_basename in
7971           *)
7972           # FIXME: insert proper C++ library support
7973           _LT_TAGVAR(ld_shlibs, $1)=no
7974           ;;
7975         esac
7976         ;;
7977
7978       cygwin* | mingw* | pw32* | cegcc*)
7979         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7980         # as there is no search path for DLLs.
7981         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7982         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7983         _LT_TAGVAR(always_export_symbols, $1)=no
7984         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7985
7986         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7987           _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'
7988           # If the export-symbols file already is a .def file (1st line
7989           # is EXPORTS), use it as is; otherwise, prepend...
7990           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7991             cp $export_symbols $output_objdir/$soname.def;
7992           else
7993             echo EXPORTS > $output_objdir/$soname.def;
7994             cat $export_symbols >> $output_objdir/$soname.def;
7995           fi~
7996           $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'
7997         else
7998           _LT_TAGVAR(ld_shlibs, $1)=no
7999         fi
8000         ;;
8001       darwin* | rhapsody*)
8002         _LT_DARWIN_LINKER_FEATURES($1)
8003         ;;
8004
8005       dgux*)
8006         case $cc_basename in
8007           ec++*)
8008             # FIXME: insert proper C++ library support
8009             _LT_TAGVAR(ld_shlibs, $1)=no
8010             ;;
8011           ghcx*)
8012             # Green Hills C++ Compiler
8013             # FIXME: insert proper C++ library support
8014             _LT_TAGVAR(ld_shlibs, $1)=no
8015             ;;
8016           *)
8017             # FIXME: insert proper C++ library support
8018             _LT_TAGVAR(ld_shlibs, $1)=no
8019             ;;
8020         esac
8021         ;;
8022
8023       freebsd[[12]]*)
8024         # C++ shared libraries reported to be fairly broken before
8025         # switch to ELF
8026         _LT_TAGVAR(ld_shlibs, $1)=no
8027         ;;
8028
8029       freebsd-elf*)
8030         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8031         ;;
8032
8033       freebsd* | dragonfly*)
8034         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8035         # conventions
8036         _LT_TAGVAR(ld_shlibs, $1)=yes
8037         ;;
8038
8039       gnu*)
8040         ;;
8041
8042       hpux9*)
8043         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8044         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8045         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8046         _LT_TAGVAR(hardcode_direct, $1)=yes
8047         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8048                                              # but as the default
8049                                              # location of the library.
8050
8051         case $cc_basename in
8052           CC*)
8053             # FIXME: insert proper C++ library support
8054             _LT_TAGVAR(ld_shlibs, $1)=no
8055             ;;
8056           aCC*)
8057             _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'
8058             # Commands to make compiler produce verbose output that lists
8059             # what "hidden" libraries, object files and flags are used when
8060             # linking a shared library.
8061             #
8062             # There doesn't appear to be a way to prevent this compiler from
8063             # explicitly linking system object files so we need to strip them
8064             # from the output so that they don't get included in the library
8065             # dependencies.
8066             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8067             ;;
8068           *)
8069             if test "$GXX" = yes; then
8070               _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'
8071             else
8072               # FIXME: insert proper C++ library support
8073               _LT_TAGVAR(ld_shlibs, $1)=no
8074             fi
8075             ;;
8076         esac
8077         ;;
8078
8079       hpux10*|hpux11*)
8080         if test $with_gnu_ld = no; then
8081           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8082           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8083
8084           case $host_cpu in
8085             hppa*64*|ia64*)
8086               ;;
8087             *)
8088               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8089               ;;
8090           esac
8091         fi
8092         case $host_cpu in
8093           hppa*64*|ia64*)
8094             _LT_TAGVAR(hardcode_direct, $1)=no
8095             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8096             ;;
8097           *)
8098             _LT_TAGVAR(hardcode_direct, $1)=yes
8099             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8100             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8101                                                  # but as the default
8102                                                  # location of the library.
8103             ;;
8104         esac
8105
8106         case $cc_basename in
8107           CC*)
8108             # FIXME: insert proper C++ library support
8109             _LT_TAGVAR(ld_shlibs, $1)=no
8110             ;;
8111           aCC*)
8112             case $host_cpu in
8113               hppa*64*)
8114                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8115                 ;;
8116               ia64*)
8117                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8118                 ;;
8119               *)
8120                 _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'
8121                 ;;
8122             esac
8123             # Commands to make compiler produce verbose output that lists
8124             # what "hidden" libraries, object files and flags are used when
8125             # linking a shared library.
8126             #
8127             # There doesn't appear to be a way to prevent this compiler from
8128             # explicitly linking system object files so we need to strip them
8129             # from the output so that they don't get included in the library
8130             # dependencies.
8131             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8132             ;;
8133           *)
8134             if test "$GXX" = yes; then
8135               if test $with_gnu_ld = no; then
8136                 case $host_cpu in
8137                   hppa*64*)
8138                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8139                     ;;
8140                   ia64*)
8141                     _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'
8142                     ;;
8143                   *)
8144                     _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'
8145                     ;;
8146                 esac
8147               fi
8148             else
8149               # FIXME: insert proper C++ library support
8150               _LT_TAGVAR(ld_shlibs, $1)=no
8151             fi
8152             ;;
8153         esac
8154         ;;
8155
8156       interix[[3-9]]*)
8157         _LT_TAGVAR(hardcode_direct, $1)=no
8158         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8159         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8160         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8161         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8162         # Instead, shared libraries are loaded at an image base (0x10000000 by
8163         # default) and relocated if they conflict, which is a slow very memory
8164         # consuming and fragmenting process.  To avoid this, we pick a random,
8165         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8166         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8167         _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'
8168         _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'
8169         ;;
8170       irix5* | irix6*)
8171         case $cc_basename in
8172           CC*)
8173             # SGI C++
8174             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8175
8176             # Archives containing C++ object files must be created using
8177             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8178             # necessary to make sure instantiated templates are included
8179             # in the archive.
8180             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8181             ;;
8182           *)
8183             if test "$GXX" = yes; then
8184               if test "$with_gnu_ld" = no; then
8185                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8186               else
8187                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
8188               fi
8189             fi
8190             _LT_TAGVAR(link_all_deplibs, $1)=yes
8191             ;;
8192         esac
8193         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8194         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8195         _LT_TAGVAR(inherit_rpath, $1)=yes
8196         ;;
8197
8198       linux* | k*bsd*-gnu)
8199         case $cc_basename in
8200           KCC*)
8201             # Kuck and Associates, Inc. (KAI) C++ Compiler
8202
8203             # KCC will only create a shared library if the output file
8204             # ends with ".so" (or ".sl" for HP-UX), so rename the library
8205             # to its proper name (with version) after linking.
8206             _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'
8207             _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'
8208             # Commands to make compiler produce verbose output that lists
8209             # what "hidden" libraries, object files and flags are used when
8210             # linking a shared library.
8211             #
8212             # There doesn't appear to be a way to prevent this compiler from
8213             # explicitly linking system object files so we need to strip them
8214             # from the output so that they don't get included in the library
8215             # dependencies.
8216             output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8217
8218             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8219             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8220
8221             # Archives containing C++ object files must be created using
8222             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8223             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8224             ;;
8225           icpc* | ecpc* )
8226             # Intel C++
8227             with_gnu_ld=yes
8228             # version 8.0 and above of icpc choke on multiply defined symbols
8229             # if we add $predep_objects and $postdep_objects, however 7.1 and
8230             # earlier do not add the objects themselves.
8231             case `$CC -V 2>&1` in
8232               *"Version 7."*)
8233                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8234                 _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'
8235                 ;;
8236               *)  # Version 8.0 or newer
8237                 tmp_idyn=
8238                 case $host_cpu in
8239                   ia64*) tmp_idyn=' -i_dynamic';;
8240                 esac
8241                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8242                 _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'
8243                 ;;
8244             esac
8245             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8246             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8247             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8248             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8249             ;;
8250           pgCC* | pgcpp*)
8251             # Portland Group C++ compiler
8252             case `$CC -V` in
8253             *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
8254               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8255                 rm -rf $tpldir~
8256                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8257                 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
8258               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8259                 rm -rf $tpldir~
8260                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8261                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
8262                 $RANLIB $oldlib'
8263               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8264                 rm -rf $tpldir~
8265                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8266                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8267               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8268                 rm -rf $tpldir~
8269                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8270                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
8271               ;;
8272             *) # Version 6 will use weak symbols
8273               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8274               _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'
8275               ;;
8276             esac
8277
8278             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8279             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8280             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8281             ;;
8282           cxx*)
8283             # Compaq C++
8284             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8285             _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'
8286
8287             runpath_var=LD_RUN_PATH
8288             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8289             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8290
8291             # Commands to make compiler produce verbose output that lists
8292             # what "hidden" libraries, object files and flags are used when
8293             # linking a shared library.
8294             #
8295             # There doesn't appear to be a way to prevent this compiler from
8296             # explicitly linking system object files so we need to strip them
8297             # from the output so that they don't get included in the library
8298             # dependencies.
8299             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8300             ;;
8301           xl*)
8302             # IBM XL 8.0 on PPC, with GNU ld
8303             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8304             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8305             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8306             if test "x$supports_anon_versioning" = xyes; then
8307               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8308                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8309                 echo "local: *; };" >> $output_objdir/$libname.ver~
8310                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8311             fi
8312             ;;
8313           *)
8314             case `$CC -V 2>&1 | sed 5q` in
8315             *Sun\ C*)
8316               # Sun C++ 5.9
8317               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8318               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8319               _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'
8320               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8321               _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8322               _LT_TAGVAR(compiler_needs_object, $1)=yes
8323
8324               # Not sure whether something based on
8325               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8326               # would be better.
8327               output_verbose_link_cmd='echo'
8328
8329               # Archives containing C++ object files must be created using
8330               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8331               # necessary to make sure instantiated templates are included
8332               # in the archive.
8333               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8334               ;;
8335             esac
8336             ;;
8337         esac
8338         ;;
8339
8340       lynxos*)
8341         # FIXME: insert proper C++ library support
8342         _LT_TAGVAR(ld_shlibs, $1)=no
8343         ;;
8344
8345       m88k*)
8346         # FIXME: insert proper C++ library support
8347         _LT_TAGVAR(ld_shlibs, $1)=no
8348         ;;
8349
8350       mvs*)
8351         case $cc_basename in
8352           cxx*)
8353             # FIXME: insert proper C++ library support
8354             _LT_TAGVAR(ld_shlibs, $1)=no
8355             ;;
8356           *)
8357             # FIXME: insert proper C++ library support
8358             _LT_TAGVAR(ld_shlibs, $1)=no
8359             ;;
8360         esac
8361         ;;
8362
8363       netbsd*)
8364         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8365           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8366           wlarc=
8367           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8368           _LT_TAGVAR(hardcode_direct, $1)=yes
8369           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8370         fi
8371         # Workaround some broken pre-1.5 toolchains
8372         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8373         ;;
8374
8375       *nto* | *qnx*)
8376         _LT_TAGVAR(ld_shlibs, $1)=yes
8377         ;;
8378
8379       openbsd2*)
8380         # C++ shared libraries are fairly broken
8381         _LT_TAGVAR(ld_shlibs, $1)=no
8382         ;;
8383
8384       openbsd*)
8385         if test -f /usr/libexec/ld.so; then
8386           _LT_TAGVAR(hardcode_direct, $1)=yes
8387           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8388           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8389           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8390           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8391           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8392             _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'
8393             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8394             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8395           fi
8396           output_verbose_link_cmd=echo
8397         else
8398           _LT_TAGVAR(ld_shlibs, $1)=no
8399         fi
8400         ;;
8401
8402       osf3* | osf4* | osf5*)
8403         case $cc_basename in
8404           KCC*)
8405             # Kuck and Associates, Inc. (KAI) C++ Compiler
8406
8407             # KCC will only create a shared library if the output file
8408             # ends with ".so" (or ".sl" for HP-UX), so rename the library
8409             # to its proper name (with version) after linking.
8410             _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'
8411
8412             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8413             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8414
8415             # Archives containing C++ object files must be created using
8416             # the KAI C++ compiler.
8417             case $host in
8418               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8419               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8420             esac
8421             ;;
8422           RCC*)
8423             # Rational C++ 2.4.1
8424             # FIXME: insert proper C++ library support
8425             _LT_TAGVAR(ld_shlibs, $1)=no
8426             ;;
8427           cxx*)
8428             case $host in
8429               osf3*)
8430                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8431                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8432                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8433                 ;;
8434               *)
8435                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8436                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8437                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8438                   echo "-hidden">> $lib.exp~
8439                   $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
8440                   $RM $lib.exp'
8441                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8442                 ;;
8443             esac
8444
8445             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8446
8447             # Commands to make compiler produce verbose output that lists
8448             # what "hidden" libraries, object files and flags are used when
8449             # linking a shared library.
8450             #
8451             # There doesn't appear to be a way to prevent this compiler from
8452             # explicitly linking system object files so we need to strip them
8453             # from the output so that they don't get included in the library
8454             # dependencies.
8455             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8456             ;;
8457           *)
8458             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8459               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8460               case $host in
8461                 osf3*)
8462                   _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8463                   ;;
8464                 *)
8465                   _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" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8466                   ;;
8467               esac
8468
8469               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8470               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8471
8472               # Commands to make compiler produce verbose output that lists
8473               # what "hidden" libraries, object files and flags are used when
8474               # linking a shared library.
8475               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8476
8477             else
8478               # FIXME: insert proper C++ library support
8479               _LT_TAGVAR(ld_shlibs, $1)=no
8480             fi
8481             ;;
8482         esac
8483         ;;
8484
8485       psos*)
8486         # FIXME: insert proper C++ library support
8487         _LT_TAGVAR(ld_shlibs, $1)=no
8488         ;;
8489
8490       sunos4*)
8491         case $cc_basename in
8492           CC*)
8493             # Sun C++ 4.x
8494             # FIXME: insert proper C++ library support
8495             _LT_TAGVAR(ld_shlibs, $1)=no
8496             ;;
8497           lcc*)
8498             # Lucid
8499             # FIXME: insert proper C++ library support
8500             _LT_TAGVAR(ld_shlibs, $1)=no
8501             ;;
8502           *)
8503             # FIXME: insert proper C++ library support
8504             _LT_TAGVAR(ld_shlibs, $1)=no
8505             ;;
8506         esac
8507         ;;
8508
8509       solaris*)
8510         case $cc_basename in
8511           CC*)
8512             # Sun C++ 4.2, 5.x and Centerline C++
8513             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8514             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8515             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8516             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8517               $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'
8518
8519             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8520             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8521             case $host_os in
8522               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8523               *)
8524                 # The compiler driver will combine and reorder linker options,
8525                 # but understands `-z linker_flag'.
8526                 # Supported since Solaris 2.6 (maybe 2.5.1?)
8527                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8528                 ;;
8529             esac
8530             _LT_TAGVAR(link_all_deplibs, $1)=yes
8531
8532             output_verbose_link_cmd='echo'
8533
8534             # Archives containing C++ object files must be created using
8535             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8536             # necessary to make sure instantiated templates are included
8537             # in the archive.
8538             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8539             ;;
8540           gcx*)
8541             # Green Hills C++ Compiler
8542             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8543
8544             # The C++ compiler must be used to create the archive.
8545             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8546             ;;
8547           *)
8548             # GNU C++ compiler with Solaris linker
8549             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8550               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8551               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8552                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8553                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8554                   $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8555
8556                 # Commands to make compiler produce verbose output that lists
8557                 # what "hidden" libraries, object files and flags are used when
8558                 # linking a shared library.
8559                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8560               else
8561                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
8562                 # platform.
8563                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8564                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8565                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8566
8567                 # Commands to make compiler produce verbose output that lists
8568                 # what "hidden" libraries, object files and flags are used when
8569                 # linking a shared library.
8570                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8571               fi
8572
8573               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8574               case $host_os in
8575                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8576                 *)
8577                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8578                   ;;
8579               esac
8580             fi
8581             ;;
8582         esac
8583         ;;
8584
8585     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8586       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8587       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8588       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8589       runpath_var='LD_RUN_PATH'
8590
8591       case $cc_basename in
8592         CC*)
8593           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8594           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8595           ;;
8596         *)
8597           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8598           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8599           ;;
8600       esac
8601       ;;
8602
8603       sysv5* | sco3.2v5* | sco5v6*)
8604         # Note: We can NOT use -z defs as we might desire, because we do not
8605         # link with -lc, and that would cause any symbols used from libc to
8606         # always be unresolved, which means just about no library would
8607         # ever link correctly.  If we're not using GNU ld we use -z text
8608         # though, which does catch some bad symbols but isn't as heavy-handed
8609         # as -z defs.
8610         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8611         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8612         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8613         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8614         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8615         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8616         _LT_TAGVAR(link_all_deplibs, $1)=yes
8617         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8618         runpath_var='LD_RUN_PATH'
8619
8620         case $cc_basename in
8621           CC*)
8622             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8623             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8624             ;;
8625           *)
8626             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8627             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8628             ;;
8629         esac
8630       ;;
8631
8632       tandem*)
8633         case $cc_basename in
8634           NCC*)
8635             # NonStop-UX NCC 3.20
8636             # FIXME: insert proper C++ library support
8637             _LT_TAGVAR(ld_shlibs, $1)=no
8638             ;;
8639           *)
8640             # FIXME: insert proper C++ library support
8641             _LT_TAGVAR(ld_shlibs, $1)=no
8642             ;;
8643         esac
8644         ;;
8645
8646       vxworks*)
8647         # FIXME: insert proper C++ library support
8648         _LT_TAGVAR(ld_shlibs, $1)=no
8649         ;;
8650
8651       *)
8652         # FIXME: insert proper C++ library support
8653         _LT_TAGVAR(ld_shlibs, $1)=no
8654         ;;
8655     esac
8656
8657     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8658     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8659
8660     _LT_TAGVAR(GCC, $1)="$GXX"
8661     _LT_TAGVAR(LD, $1)="$LD"
8662
8663     ## CAVEAT EMPTOR:
8664     ## There is no encapsulation within the following macros, do not change
8665     ## the running order or otherwise move them around unless you know exactly
8666     ## what you are doing...
8667     _LT_SYS_HIDDEN_LIBDEPS($1)
8668     _LT_COMPILER_PIC($1)
8669     _LT_COMPILER_C_O($1)
8670     _LT_COMPILER_FILE_LOCKS($1)
8671     _LT_LINKER_SHLIBS($1)
8672     _LT_SYS_DYNAMIC_LINKER($1)
8673     _LT_LINKER_HARDCODE_LIBPATH($1)
8674
8675     _LT_CONFIG($1)
8676   fi # test -n "$compiler"
8677
8678   CC=$lt_save_CC
8679   LDCXX=$LD
8680   LD=$lt_save_LD
8681   GCC=$lt_save_GCC
8682   with_gnu_ld=$lt_save_with_gnu_ld
8683   lt_cv_path_LDCXX=$lt_cv_path_LD
8684   lt_cv_path_LD=$lt_save_path_LD
8685   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8686   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8687 fi # test "$_lt_caught_CXX_error" != yes
8688
8689 AC_LANG_POP
8690 ])# _LT_LANG_CXX_CONFIG
8691
8692
8693 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8694 # ---------------------------------
8695 # Figure out "hidden" library dependencies from verbose
8696 # compiler output when linking a shared library.
8697 # Parse the compiler output and extract the necessary
8698 # objects, libraries and library flags.
8699 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8700 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8701 # Dependencies to place before and after the object being linked:
8702 _LT_TAGVAR(predep_objects, $1)=
8703 _LT_TAGVAR(postdep_objects, $1)=
8704 _LT_TAGVAR(predeps, $1)=
8705 _LT_TAGVAR(postdeps, $1)=
8706 _LT_TAGVAR(compiler_lib_search_path, $1)=
8707
8708 dnl we can't use the lt_simple_compile_test_code here,
8709 dnl because it contains code intended for an executable,
8710 dnl not a library.  It's possible we should let each
8711 dnl tag define a new lt_????_link_test_code variable,
8712 dnl but it's only used here...
8713 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8714 int a;
8715 void foo (void) { a = 0; }
8716 _LT_EOF
8717 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8718 class Foo
8719 {
8720 public:
8721   Foo (void) { a = 0; }
8722 private:
8723   int a;
8724 };
8725 _LT_EOF
8726 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8727       subroutine foo
8728       implicit none
8729       integer*4 a
8730       a=0
8731       return
8732       end
8733 _LT_EOF
8734 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8735       subroutine foo
8736       implicit none
8737       integer a
8738       a=0
8739       return
8740       end
8741 _LT_EOF
8742 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8743 public class foo {
8744   private int a;
8745   public void bar (void) {
8746     a = 0;
8747   }
8748 };
8749 _LT_EOF
8750 ])
8751 dnl Parse the compiler output and extract the necessary
8752 dnl objects, libraries and library flags.
8753 if AC_TRY_EVAL(ac_compile); then
8754   # Parse the compiler output and extract the necessary
8755   # objects, libraries and library flags.
8756
8757   # Sentinel used to keep track of whether or not we are before
8758   # the conftest object file.
8759   pre_test_object_deps_done=no
8760
8761   for p in `eval "$output_verbose_link_cmd"`; do
8762     case $p in
8763
8764     -L* | -R* | -l*)
8765        # Some compilers place space between "-{L,R}" and the path.
8766        # Remove the space.
8767        if test $p = "-L" ||
8768           test $p = "-R"; then
8769          prev=$p
8770          continue
8771        else
8772          prev=
8773        fi
8774
8775        if test "$pre_test_object_deps_done" = no; then
8776          case $p in
8777          -L* | -R*)
8778            # Internal compiler library paths should come after those
8779            # provided the user.  The postdeps already come after the
8780            # user supplied libs so there is no need to process them.
8781            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8782              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8783            else
8784              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8785            fi
8786            ;;
8787          # The "-l" case would never come before the object being
8788          # linked, so don't bother handling this case.
8789          esac
8790        else
8791          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8792            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8793          else
8794            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8795          fi
8796        fi
8797        ;;
8798
8799     *.$objext)
8800        # This assumes that the test object file only shows up
8801        # once in the compiler output.
8802        if test "$p" = "conftest.$objext"; then
8803          pre_test_object_deps_done=yes
8804          continue
8805        fi
8806
8807        if test "$pre_test_object_deps_done" = no; then
8808          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8809            _LT_TAGVAR(predep_objects, $1)="$p"
8810          else
8811            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8812          fi
8813        else
8814          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8815            _LT_TAGVAR(postdep_objects, $1)="$p"
8816          else
8817            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8818          fi
8819        fi
8820        ;;
8821
8822     *) ;; # Ignore the rest.
8823
8824     esac
8825   done
8826
8827   # Clean up.
8828   rm -f a.out a.exe
8829 else
8830   echo "libtool.m4: error: problem compiling $1 test program"
8831 fi
8832
8833 $RM -f confest.$objext
8834
8835 # PORTME: override above test on systems where it is broken
8836 m4_if([$1], [CXX],
8837 [case $host_os in
8838 interix[[3-9]]*)
8839   # Interix 3.5 installs completely hosed .la files for C++, so rather than
8840   # hack all around it, let's just trust "g++" to DTRT.
8841   _LT_TAGVAR(predep_objects,$1)=
8842   _LT_TAGVAR(postdep_objects,$1)=
8843   _LT_TAGVAR(postdeps,$1)=
8844   ;;
8845
8846 linux*)
8847   case `$CC -V 2>&1 | sed 5q` in
8848   *Sun\ C*)
8849     # Sun C++ 5.9
8850
8851     # The more standards-conforming stlport4 library is
8852     # incompatible with the Cstd library. Avoid specifying
8853     # it if it's in CXXFLAGS. Ignore libCrun as
8854     # -library=stlport4 depends on it.
8855     case " $CXX $CXXFLAGS " in
8856     *" -library=stlport4 "*)
8857       solaris_use_stlport4=yes
8858       ;;
8859     esac
8860
8861     if test "$solaris_use_stlport4" != yes; then
8862       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8863     fi
8864     ;;
8865   esac
8866   ;;
8867
8868 solaris*)
8869   case $cc_basename in
8870   CC*)
8871     # The more standards-conforming stlport4 library is
8872     # incompatible with the Cstd library. Avoid specifying
8873     # it if it's in CXXFLAGS. Ignore libCrun as
8874     # -library=stlport4 depends on it.
8875     case " $CXX $CXXFLAGS " in
8876     *" -library=stlport4 "*)
8877       solaris_use_stlport4=yes
8878       ;;
8879     esac
8880
8881     # Adding this requires a known-good setup of shared libraries for
8882     # Sun compiler versions before 5.6, else PIC objects from an old
8883     # archive will be linked into the output, leading to subtle bugs.
8884     if test "$solaris_use_stlport4" != yes; then
8885       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8886     fi
8887     ;;
8888   esac
8889   ;;
8890 esac
8891 ])
8892
8893 case " $_LT_TAGVAR(postdeps, $1) " in
8894 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8895 esac
8896  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8897 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8898  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8899 fi
8900 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8901     [The directories searched by this compiler when creating a shared library])
8902 _LT_TAGDECL([], [predep_objects], [1],
8903     [Dependencies to place before and after the objects being linked to
8904     create a shared library])
8905 _LT_TAGDECL([], [postdep_objects], [1])
8906 _LT_TAGDECL([], [predeps], [1])
8907 _LT_TAGDECL([], [postdeps], [1])
8908 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8909     [The library search path used internally by the compiler when linking
8910     a shared library])
8911 ])# _LT_SYS_HIDDEN_LIBDEPS
8912
8913
8914 # _LT_PROG_F77
8915 # ------------
8916 # Since AC_PROG_F77 is broken, in that it returns the empty string
8917 # if there is no fortran compiler, we have our own version here.
8918 m4_defun([_LT_PROG_F77],
8919 [
8920 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
8921 AC_PROG_F77
8922 if test -z "$F77" || test "X$F77" = "Xno"; then
8923   _lt_disable_F77=yes
8924 fi
8925 popdef([AC_MSG_ERROR])
8926 ])# _LT_PROG_F77
8927
8928 dnl aclocal-1.4 backwards compatibility:
8929 dnl AC_DEFUN([_LT_PROG_F77], [])
8930
8931
8932 # _LT_LANG_F77_CONFIG([TAG])
8933 # --------------------------
8934 # Ensure that the configuration variables for a Fortran 77 compiler are
8935 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8936 # to write the compiler configuration to `libtool'.
8937 m4_defun([_LT_LANG_F77_CONFIG],
8938 [AC_REQUIRE([_LT_PROG_F77])dnl
8939 AC_LANG_PUSH(Fortran 77)
8940
8941 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8942 _LT_TAGVAR(allow_undefined_flag, $1)=
8943 _LT_TAGVAR(always_export_symbols, $1)=no
8944 _LT_TAGVAR(archive_expsym_cmds, $1)=
8945 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8946 _LT_TAGVAR(hardcode_direct, $1)=no
8947 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8948 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8949 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8950 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8951 _LT_TAGVAR(hardcode_minus_L, $1)=no
8952 _LT_TAGVAR(hardcode_automatic, $1)=no
8953 _LT_TAGVAR(inherit_rpath, $1)=no
8954 _LT_TAGVAR(module_cmds, $1)=
8955 _LT_TAGVAR(module_expsym_cmds, $1)=
8956 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8957 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8958 _LT_TAGVAR(no_undefined_flag, $1)=
8959 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8960 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8961
8962 # Source file extension for f77 test sources.
8963 ac_ext=f
8964
8965 # Object file extension for compiled f77 test sources.
8966 objext=o
8967 _LT_TAGVAR(objext, $1)=$objext
8968
8969 # No sense in running all these tests if we already determined that
8970 # the F77 compiler isn't working.  Some variables (like enable_shared)
8971 # are currently assumed to apply to all compilers on this platform,
8972 # and will be corrupted by setting them based on a non-working compiler.
8973 if test "$_lt_disable_F77" != yes; then
8974   # Code to be used in simple compile tests
8975   lt_simple_compile_test_code="\
8976       subroutine t
8977       return
8978       end
8979 "
8980
8981   # Code to be used in simple link tests
8982   lt_simple_link_test_code="\
8983       program t
8984       end
8985 "
8986
8987   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8988   _LT_TAG_COMPILER
8989
8990   # save warnings/boilerplate of simple test code
8991   _LT_COMPILER_BOILERPLATE
8992   _LT_LINKER_BOILERPLATE
8993
8994   # Allow CC to be a program name with arguments.
8995   lt_save_CC="$CC"
8996   lt_save_GCC=$GCC
8997   CC=${F77-"f77"}
8998   compiler=$CC
8999   _LT_TAGVAR(compiler, $1)=$CC
9000   _LT_CC_BASENAME([$compiler])
9001   GCC=$G77
9002   if test -n "$compiler"; then
9003     AC_MSG_CHECKING([if libtool supports shared libraries])
9004     AC_MSG_RESULT([$can_build_shared])
9005
9006     AC_MSG_CHECKING([whether to build shared libraries])
9007     test "$can_build_shared" = "no" && enable_shared=no
9008
9009     # On AIX, shared libraries and static libraries use the same namespace, and
9010     # are all built from PIC.
9011     case $host_os in
9012       aix3*)
9013         test "$enable_shared" = yes && enable_static=no
9014         if test -n "$RANLIB"; then
9015           archive_cmds="$archive_cmds~\$RANLIB \$lib"
9016           postinstall_cmds='$RANLIB $lib'
9017         fi
9018         ;;
9019       aix[[4-9]]*)
9020         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9021           test "$enable_shared" = yes && enable_static=no
9022         fi
9023         ;;
9024     esac
9025     AC_MSG_RESULT([$enable_shared])
9026
9027     AC_MSG_CHECKING([whether to build static libraries])
9028     # Make sure either enable_shared or enable_static is yes.
9029     test "$enable_shared" = yes || enable_static=yes
9030     AC_MSG_RESULT([$enable_static])
9031
9032     _LT_TAGVAR(GCC, $1)="$G77"
9033     _LT_TAGVAR(LD, $1)="$LD"
9034
9035     ## CAVEAT EMPTOR:
9036     ## There is no encapsulation within the following macros, do not change
9037     ## the running order or otherwise move them around unless you know exactly
9038     ## what you are doing...
9039     _LT_COMPILER_PIC($1)
9040     _LT_COMPILER_C_O($1)
9041     _LT_COMPILER_FILE_LOCKS($1)
9042     _LT_LINKER_SHLIBS($1)
9043     _LT_SYS_DYNAMIC_LINKER($1)
9044     _LT_LINKER_HARDCODE_LIBPATH($1)
9045
9046     _LT_CONFIG($1)
9047   fi # test -n "$compiler"
9048
9049   GCC=$lt_save_GCC
9050   CC="$lt_save_CC"
9051 fi # test "$_lt_disable_F77" != yes
9052
9053 AC_LANG_POP
9054 ])# _LT_LANG_F77_CONFIG
9055
9056
9057 # _LT_PROG_FC
9058 # -----------
9059 # Since AC_PROG_FC is broken, in that it returns the empty string
9060 # if there is no fortran compiler, we have our own version here.
9061 m4_defun([_LT_PROG_FC],
9062 [
9063 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
9064 AC_PROG_FC
9065 if test -z "$FC" || test "X$FC" = "Xno"; then
9066   _lt_disable_FC=yes
9067 fi
9068 popdef([AC_MSG_ERROR])
9069 ])# _LT_PROG_FC
9070
9071 dnl aclocal-1.4 backwards compatibility:
9072 dnl AC_DEFUN([_LT_PROG_FC], [])
9073
9074
9075 # _LT_LANG_FC_CONFIG([TAG])
9076 # -------------------------
9077 # Ensure that the configuration variables for a Fortran compiler are
9078 # suitably defined.  These variables are subsequently used by _LT_CONFIG
9079 # to write the compiler configuration to `libtool'.
9080 m4_defun([_LT_LANG_FC_CONFIG],
9081 [AC_REQUIRE([_LT_PROG_FC])dnl
9082 AC_LANG_PUSH(Fortran)
9083
9084 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9085 _LT_TAGVAR(allow_undefined_flag, $1)=
9086 _LT_TAGVAR(always_export_symbols, $1)=no
9087 _LT_TAGVAR(archive_expsym_cmds, $1)=
9088 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9089 _LT_TAGVAR(hardcode_direct, $1)=no
9090 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9091 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9092 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9093 _LT_TAGVAR(hardcode_libdir_separator, $1)=
9094 _LT_TAGVAR(hardcode_minus_L, $1)=no
9095 _LT_TAGVAR(hardcode_automatic, $1)=no
9096 _LT_TAGVAR(inherit_rpath, $1)=no
9097 _LT_TAGVAR(module_cmds, $1)=
9098 _LT_TAGVAR(module_expsym_cmds, $1)=
9099 _LT_TAGVAR(link_all_deplibs, $1)=unknown
9100 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9101 _LT_TAGVAR(no_undefined_flag, $1)=
9102 _LT_TAGVAR(whole_archive_flag_spec, $1)=
9103 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9104
9105 # Source file extension for fc test sources.
9106 ac_ext=${ac_fc_srcext-f}
9107
9108 # Object file extension for compiled fc test sources.
9109 objext=o
9110 _LT_TAGVAR(objext, $1)=$objext
9111
9112 # No sense in running all these tests if we already determined that
9113 # the FC compiler isn't working.  Some variables (like enable_shared)
9114 # are currently assumed to apply to all compilers on this platform,
9115 # and will be corrupted by setting them based on a non-working compiler.
9116 if test "$_lt_disable_FC" != yes; then
9117   # Code to be used in simple compile tests
9118   lt_simple_compile_test_code="\
9119       subroutine t
9120       return
9121       end
9122 "
9123
9124   # Code to be used in simple link tests
9125   lt_simple_link_test_code="\
9126       program t
9127       end
9128 "
9129
9130   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9131   _LT_TAG_COMPILER
9132
9133   # save warnings/boilerplate of simple test code
9134   _LT_COMPILER_BOILERPLATE
9135   _LT_LINKER_BOILERPLATE
9136
9137   # Allow CC to be a program name with arguments.
9138   lt_save_CC="$CC"
9139   lt_save_GCC=$GCC
9140   CC=${FC-"f95"}
9141   compiler=$CC
9142   GCC=$ac_cv_fc_compiler_gnu
9143
9144   _LT_TAGVAR(compiler, $1)=$CC
9145   _LT_CC_BASENAME([$compiler])
9146
9147   if test -n "$compiler"; then
9148     AC_MSG_CHECKING([if libtool supports shared libraries])
9149     AC_MSG_RESULT([$can_build_shared])
9150
9151     AC_MSG_CHECKING([whether to build shared libraries])
9152     test "$can_build_shared" = "no" && enable_shared=no
9153
9154     # On AIX, shared libraries and static libraries use the same namespace, and
9155     # are all built from PIC.
9156     case $host_os in
9157       aix3*)
9158         test "$enable_shared" = yes && enable_static=no
9159         if test -n "$RANLIB"; then
9160           archive_cmds="$archive_cmds~\$RANLIB \$lib"
9161           postinstall_cmds='$RANLIB $lib'
9162         fi
9163         ;;
9164       aix[[4-9]]*)
9165         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9166           test "$enable_shared" = yes && enable_static=no
9167         fi
9168         ;;
9169     esac
9170     AC_MSG_RESULT([$enable_shared])
9171
9172     AC_MSG_CHECKING([whether to build static libraries])
9173     # Make sure either enable_shared or enable_static is yes.
9174     test "$enable_shared" = yes || enable_static=yes
9175     AC_MSG_RESULT([$enable_static])
9176
9177     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9178     _LT_TAGVAR(LD, $1)="$LD"
9179
9180     ## CAVEAT EMPTOR:
9181     ## There is no encapsulation within the following macros, do not change
9182     ## the running order or otherwise move them around unless you know exactly
9183     ## what you are doing...
9184     _LT_SYS_HIDDEN_LIBDEPS($1)
9185     _LT_COMPILER_PIC($1)
9186     _LT_COMPILER_C_O($1)
9187     _LT_COMPILER_FILE_LOCKS($1)
9188     _LT_LINKER_SHLIBS($1)
9189     _LT_SYS_DYNAMIC_LINKER($1)
9190     _LT_LINKER_HARDCODE_LIBPATH($1)
9191
9192     _LT_CONFIG($1)
9193   fi # test -n "$compiler"
9194
9195   GCC=$lt_save_GCC
9196   CC="$lt_save_CC"
9197 fi # test "$_lt_disable_FC" != yes
9198
9199 AC_LANG_POP
9200 ])# _LT_LANG_FC_CONFIG
9201
9202
9203 # _LT_LANG_GCJ_CONFIG([TAG])
9204 # --------------------------
9205 # Ensure that the configuration variables for the GNU Java Compiler compiler
9206 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
9207 # to write the compiler configuration to `libtool'.
9208 m4_defun([_LT_LANG_GCJ_CONFIG],
9209 [AC_REQUIRE([LT_PROG_GCJ])dnl
9210 AC_LANG_SAVE
9211
9212 # Source file extension for Java test sources.
9213 ac_ext=java
9214
9215 # Object file extension for compiled Java test sources.
9216 objext=o
9217 _LT_TAGVAR(objext, $1)=$objext
9218
9219 # Code to be used in simple compile tests
9220 lt_simple_compile_test_code="class foo {}"
9221
9222 # Code to be used in simple link tests
9223 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9224
9225 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9226 _LT_TAG_COMPILER
9227
9228 # save warnings/boilerplate of simple test code
9229 _LT_COMPILER_BOILERPLATE
9230 _LT_LINKER_BOILERPLATE
9231
9232 # Allow CC to be a program name with arguments.
9233 lt_save_CC="$CC"
9234 lt_save_GCC=$GCC
9235 GCC=yes
9236 CC=${GCJ-"gcj"}
9237 compiler=$CC
9238 _LT_TAGVAR(compiler, $1)=$CC
9239 _LT_TAGVAR(LD, $1)="$LD"
9240 _LT_CC_BASENAME([$compiler])
9241
9242 # GCJ did not exist at the time GCC didn't implicitly link libc in.
9243 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9244
9245 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9246
9247 if test -n "$compiler"; then
9248   _LT_COMPILER_NO_RTTI($1)
9249   _LT_COMPILER_PIC($1)
9250   _LT_COMPILER_C_O($1)
9251   _LT_COMPILER_FILE_LOCKS($1)
9252   _LT_LINKER_SHLIBS($1)
9253   _LT_LINKER_HARDCODE_LIBPATH($1)
9254
9255   _LT_CONFIG($1)
9256 fi
9257
9258 AC_LANG_RESTORE
9259
9260 GCC=$lt_save_GCC
9261 CC="$lt_save_CC"
9262 ])# _LT_LANG_GCJ_CONFIG
9263
9264
9265 # _LT_LANG_RC_CONFIG([TAG])
9266 # -------------------------
9267 # Ensure that the configuration variables for the Windows resource compiler
9268 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
9269 # to write the compiler configuration to `libtool'.
9270 m4_defun([_LT_LANG_RC_CONFIG],
9271 [AC_REQUIRE([LT_PROG_RC])dnl
9272 AC_LANG_SAVE
9273
9274 # Source file extension for RC test sources.
9275 ac_ext=rc
9276
9277 # Object file extension for compiled RC test sources.
9278 objext=o
9279 _LT_TAGVAR(objext, $1)=$objext
9280
9281 # Code to be used in simple compile tests
9282 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9283
9284 # Code to be used in simple link tests
9285 lt_simple_link_test_code="$lt_simple_compile_test_code"
9286
9287 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9288 _LT_TAG_COMPILER
9289
9290 # save warnings/boilerplate of simple test code
9291 _LT_COMPILER_BOILERPLATE
9292 _LT_LINKER_BOILERPLATE
9293
9294 # Allow CC to be a program name with arguments.
9295 lt_save_CC="$CC"
9296 lt_save_GCC=$GCC
9297 GCC=
9298 CC=${RC-"windres"}
9299 compiler=$CC
9300 _LT_TAGVAR(compiler, $1)=$CC
9301 _LT_CC_BASENAME([$compiler])
9302 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9303
9304 if test -n "$compiler"; then
9305   :
9306   _LT_CONFIG($1)
9307 fi
9308
9309 GCC=$lt_save_GCC
9310 AC_LANG_RESTORE
9311 CC="$lt_save_CC"
9312 ])# _LT_LANG_RC_CONFIG
9313
9314
9315 # LT_PROG_GCJ
9316 # -----------
9317 AC_DEFUN([LT_PROG_GCJ],
9318 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9319   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9320     [AC_CHECK_TOOL(GCJ, gcj,)
9321       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9322       AC_SUBST(GCJFLAGS)])])[]dnl
9323 ])
9324
9325 # Old name:
9326 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9327 dnl aclocal-1.4 backwards compatibility:
9328 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9329
9330
9331 # LT_PROG_RC
9332 # ----------
9333 AC_DEFUN([LT_PROG_RC],
9334 [AC_CHECK_TOOL(RC, windres,)
9335 ])
9336
9337 # Old name:
9338 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9339 dnl aclocal-1.4 backwards compatibility:
9340 dnl AC_DEFUN([LT_AC_PROG_RC], [])
9341
9342
9343 # _LT_DECL_EGREP
9344 # --------------
9345 # If we don't have a new enough Autoconf to choose the best grep
9346 # available, choose the one first in the user's PATH.
9347 m4_defun([_LT_DECL_EGREP],
9348 [AC_REQUIRE([AC_PROG_EGREP])dnl
9349 AC_REQUIRE([AC_PROG_FGREP])dnl
9350 test -z "$GREP" && GREP=grep
9351 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9352 _LT_DECL([], [EGREP], [1], [An ERE matcher])
9353 _LT_DECL([], [FGREP], [1], [A literal string matcher])
9354 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9355 AC_SUBST([GREP])
9356 ])
9357
9358
9359 # _LT_DECL_OBJDUMP
9360 # --------------
9361 # If we don't have a new enough Autoconf to choose the best objdump
9362 # available, choose the one first in the user's PATH.
9363 m4_defun([_LT_DECL_OBJDUMP],
9364 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
9365 test -z "$OBJDUMP" && OBJDUMP=objdump
9366 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9367 AC_SUBST([OBJDUMP])
9368 ])
9369
9370
9371 # _LT_DECL_SED
9372 # ------------
9373 # Check for a fully-functional sed program, that truncates
9374 # as few characters as possible.  Prefer GNU sed if found.
9375 m4_defun([_LT_DECL_SED],
9376 [AC_PROG_SED
9377 test -z "$SED" && SED=sed
9378 Xsed="$SED -e 1s/^X//"
9379 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9380 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9381     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9382 ])# _LT_DECL_SED
9383
9384 m4_ifndef([AC_PROG_SED], [
9385 # NOTE: This macro has been submitted for inclusion into   #
9386 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
9387 #  a released version of Autoconf we should remove this    #
9388 #  macro and use it instead.                               #
9389
9390 m4_defun([AC_PROG_SED],
9391 [AC_MSG_CHECKING([for a sed that does not truncate output])
9392 AC_CACHE_VAL(lt_cv_path_SED,
9393 [# Loop through the user's path and test for sed and gsed.
9394 # Then use that list of sed's as ones to test for truncation.
9395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9396 for as_dir in $PATH
9397 do
9398   IFS=$as_save_IFS
9399   test -z "$as_dir" && as_dir=.
9400   for lt_ac_prog in sed gsed; do
9401     for ac_exec_ext in '' $ac_executable_extensions; do
9402       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9403         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9404       fi
9405     done
9406   done
9407 done
9408 IFS=$as_save_IFS
9409 lt_ac_max=0
9410 lt_ac_count=0
9411 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9412 # along with /bin/sed that truncates output.
9413 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9414   test ! -f $lt_ac_sed && continue
9415   cat /dev/null > conftest.in
9416   lt_ac_count=0
9417   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9418   # Check for GNU sed and select it if it is found.
9419   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9420     lt_cv_path_SED=$lt_ac_sed
9421     break
9422   fi
9423   while true; do
9424     cat conftest.in conftest.in >conftest.tmp
9425     mv conftest.tmp conftest.in
9426     cp conftest.in conftest.nl
9427     echo >>conftest.nl
9428     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9429     cmp -s conftest.out conftest.nl || break
9430     # 10000 chars as input seems more than enough
9431     test $lt_ac_count -gt 10 && break
9432     lt_ac_count=`expr $lt_ac_count + 1`
9433     if test $lt_ac_count -gt $lt_ac_max; then
9434       lt_ac_max=$lt_ac_count
9435       lt_cv_path_SED=$lt_ac_sed
9436     fi
9437   done
9438 done
9439 ])
9440 SED=$lt_cv_path_SED
9441 AC_SUBST([SED])
9442 AC_MSG_RESULT([$SED])
9443 ])#AC_PROG_SED
9444 ])#m4_ifndef
9445
9446 # Old name:
9447 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9448 dnl aclocal-1.4 backwards compatibility:
9449 dnl AC_DEFUN([LT_AC_PROG_SED], [])
9450
9451
9452 # _LT_CHECK_SHELL_FEATURES
9453 # ------------------------
9454 # Find out whether the shell is Bourne or XSI compatible,
9455 # or has some other useful features.
9456 m4_defun([_LT_CHECK_SHELL_FEATURES],
9457 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9458 # Try some XSI features
9459 xsi_shell=no
9460 ( _lt_dummy="a/b/c"
9461   test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
9462       = c,a/b,, \
9463     && eval 'test $(( 1 + 1 )) -eq 2 \
9464     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9465   && xsi_shell=yes
9466 AC_MSG_RESULT([$xsi_shell])
9467 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9468
9469 AC_MSG_CHECKING([whether the shell understands "+="])
9470 lt_shell_append=no
9471 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9472     >/dev/null 2>&1 \
9473   && lt_shell_append=yes
9474 AC_MSG_RESULT([$lt_shell_append])
9475 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9476
9477 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9478   lt_unset=unset
9479 else
9480   lt_unset=false
9481 fi
9482 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9483
9484 # test EBCDIC or ASCII
9485 case `echo X|tr X '\101'` in
9486  A) # ASCII based system
9487     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9488   lt_SP2NL='tr \040 \012'
9489   lt_NL2SP='tr \015\012 \040\040'
9490   ;;
9491  *) # EBCDIC based system
9492   lt_SP2NL='tr \100 \n'
9493   lt_NL2SP='tr \r\n \100\100'
9494   ;;
9495 esac
9496 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9497 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9498 ])# _LT_CHECK_SHELL_FEATURES
9499
9500
9501 # _LT_PROG_XSI_SHELLFNS
9502 # ---------------------
9503 # Bourne and XSI compatible variants of some useful shell functions.
9504 m4_defun([_LT_PROG_XSI_SHELLFNS],
9505 [case $xsi_shell in
9506   yes)
9507     cat << \_LT_EOF >> "$cfgfile"
9508
9509 # func_dirname file append nondir_replacement
9510 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9511 # otherwise set result to NONDIR_REPLACEMENT.
9512 func_dirname ()
9513 {
9514   case ${1} in
9515     */*) func_dirname_result="${1%/*}${2}" ;;
9516     *  ) func_dirname_result="${3}" ;;
9517   esac
9518 }
9519
9520 # func_basename file
9521 func_basename ()
9522 {
9523   func_basename_result="${1##*/}"
9524 }
9525
9526 # func_dirname_and_basename file append nondir_replacement
9527 # perform func_basename and func_dirname in a single function
9528 # call:
9529 #   dirname:  Compute the dirname of FILE.  If nonempty,
9530 #             add APPEND to the result, otherwise set result
9531 #             to NONDIR_REPLACEMENT.
9532 #             value returned in "$func_dirname_result"
9533 #   basename: Compute filename of FILE.
9534 #             value retuned in "$func_basename_result"
9535 # Implementation must be kept synchronized with func_dirname
9536 # and func_basename. For efficiency, we do not delegate to
9537 # those functions but instead duplicate the functionality here.
9538 func_dirname_and_basename ()
9539 {
9540   case ${1} in
9541     */*) func_dirname_result="${1%/*}${2}" ;;
9542     *  ) func_dirname_result="${3}" ;;
9543   esac
9544   func_basename_result="${1##*/}"
9545 }
9546
9547 # func_stripname prefix suffix name
9548 # strip PREFIX and SUFFIX off of NAME.
9549 # PREFIX and SUFFIX must not contain globbing or regex special
9550 # characters, hashes, percent signs, but SUFFIX may contain a leading
9551 # dot (in which case that matches only a dot).
9552 func_stripname ()
9553 {
9554   # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9555   # positional parameters, so assign one to ordinary parameter first.
9556   func_stripname_result=${3}
9557   func_stripname_result=${func_stripname_result#"${1}"}
9558   func_stripname_result=${func_stripname_result%"${2}"}
9559 }
9560
9561 # func_opt_split
9562 func_opt_split ()
9563 {
9564   func_opt_split_opt=${1%%=*}
9565   func_opt_split_arg=${1#*=}
9566 }
9567
9568 # func_lo2o object
9569 func_lo2o ()
9570 {
9571   case ${1} in
9572     *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9573     *)    func_lo2o_result=${1} ;;
9574   esac
9575 }
9576
9577 # func_xform libobj-or-source
9578 func_xform ()
9579 {
9580   func_xform_result=${1%.*}.lo
9581 }
9582
9583 # func_arith arithmetic-term...
9584 func_arith ()
9585 {
9586   func_arith_result=$(( $[*] ))
9587 }
9588
9589 # func_len string
9590 # STRING may not start with a hyphen.
9591 func_len ()
9592 {
9593   func_len_result=${#1}
9594 }
9595
9596 _LT_EOF
9597     ;;
9598   *) # Bourne compatible functions.
9599     cat << \_LT_EOF >> "$cfgfile"
9600
9601 # func_dirname file append nondir_replacement
9602 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9603 # otherwise set result to NONDIR_REPLACEMENT.
9604 func_dirname ()
9605 {
9606   # Extract subdirectory from the argument.
9607   func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
9608   if test "X$func_dirname_result" = "X${1}"; then
9609     func_dirname_result="${3}"
9610   else
9611     func_dirname_result="$func_dirname_result${2}"
9612   fi
9613 }
9614
9615 # func_basename file
9616 func_basename ()
9617 {
9618   func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
9619 }
9620
9621 dnl func_dirname_and_basename
9622 dnl A portable version of this function is already defined in general.m4sh
9623 dnl so there is no need for it here.
9624
9625 # func_stripname prefix suffix name
9626 # strip PREFIX and SUFFIX off of NAME.
9627 # PREFIX and SUFFIX must not contain globbing or regex special
9628 # characters, hashes, percent signs, but SUFFIX may contain a leading
9629 # dot (in which case that matches only a dot).
9630 # func_strip_suffix prefix name
9631 func_stripname ()
9632 {
9633   case ${2} in
9634     .*) func_stripname_result=`$ECHO "X${3}" \
9635            | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
9636     *)  func_stripname_result=`$ECHO "X${3}" \
9637            | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
9638   esac
9639 }
9640
9641 # sed scripts:
9642 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
9643 my_sed_long_arg='1s/^-[[^=]]*=//'
9644
9645 # func_opt_split
9646 func_opt_split ()
9647 {
9648   func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
9649   func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
9650 }
9651
9652 # func_lo2o object
9653 func_lo2o ()
9654 {
9655   func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
9656 }
9657
9658 # func_xform libobj-or-source
9659 func_xform ()
9660 {
9661   func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
9662 }
9663
9664 # func_arith arithmetic-term...
9665 func_arith ()
9666 {
9667   func_arith_result=`expr "$[@]"`
9668 }
9669
9670 # func_len string
9671 # STRING may not start with a hyphen.
9672 func_len ()
9673 {
9674   func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9675 }
9676
9677 _LT_EOF
9678 esac
9679
9680 case $lt_shell_append in
9681   yes)
9682     cat << \_LT_EOF >> "$cfgfile"
9683
9684 # func_append var value
9685 # Append VALUE to the end of shell variable VAR.
9686 func_append ()
9687 {
9688   eval "$[1]+=\$[2]"
9689 }
9690 _LT_EOF
9691     ;;
9692   *)
9693     cat << \_LT_EOF >> "$cfgfile"
9694
9695 # func_append var value
9696 # Append VALUE to the end of shell variable VAR.
9697 func_append ()
9698 {
9699   eval "$[1]=\$$[1]\$[2]"
9700 }
9701
9702 _LT_EOF
9703     ;;
9704   esac
9705 ])
9706
9707 # Helper functions for option handling.                    -*- Autoconf -*-
9708 #
9709 #   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9710 #   Written by Gary V. Vaughan, 2004
9711 #
9712 # This file is free software; the Free Software Foundation gives
9713 # unlimited permission to copy and/or distribute it, with or without
9714 # modifications, as long as this notice is preserved.
9715
9716 # serial 6 ltoptions.m4
9717
9718 # This is to help aclocal find these macros, as it can't see m4_define.
9719 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9720
9721
9722 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9723 # ------------------------------------------
9724 m4_define([_LT_MANGLE_OPTION],
9725 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9726
9727
9728 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9729 # ---------------------------------------
9730 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9731 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9732 # saved as a flag.
9733 m4_define([_LT_SET_OPTION],
9734 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9735 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9736         _LT_MANGLE_DEFUN([$1], [$2]),
9737     [m4_warning([Unknown $1 option `$2'])])[]dnl
9738 ])
9739
9740
9741 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9742 # ------------------------------------------------------------
9743 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9744 m4_define([_LT_IF_OPTION],
9745 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9746
9747
9748 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9749 # -------------------------------------------------------
9750 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9751 # are set.
9752 m4_define([_LT_UNLESS_OPTIONS],
9753 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9754             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9755                       [m4_define([$0_found])])])[]dnl
9756 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9757 ])[]dnl
9758 ])
9759
9760
9761 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9762 # ----------------------------------------
9763 # OPTION-LIST is a space-separated list of Libtool options associated
9764 # with MACRO-NAME.  If any OPTION has a matching handler declared with
9765 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9766 # the unknown option and exit.
9767 m4_defun([_LT_SET_OPTIONS],
9768 [# Set options
9769 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9770     [_LT_SET_OPTION([$1], _LT_Option)])
9771
9772 m4_if([$1],[LT_INIT],[
9773   dnl
9774   dnl Simply set some default values (i.e off) if boolean options were not
9775   dnl specified:
9776   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9777   ])
9778   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9779   ])
9780   dnl
9781   dnl If no reference was made to various pairs of opposing options, then
9782   dnl we run the default mode handler for the pair.  For example, if neither
9783   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9784   dnl archives by default:
9785   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9786   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9787   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9788   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9789                    [_LT_ENABLE_FAST_INSTALL])
9790   ])
9791 ])# _LT_SET_OPTIONS
9792
9793
9794
9795 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9796 # -----------------------------------------
9797 m4_define([_LT_MANGLE_DEFUN],
9798 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9799
9800
9801 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9802 # -----------------------------------------------
9803 m4_define([LT_OPTION_DEFINE],
9804 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9805 ])# LT_OPTION_DEFINE
9806
9807
9808 # dlopen
9809 # ------
9810 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9811 ])
9812
9813 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9814 [_LT_SET_OPTION([LT_INIT], [dlopen])
9815 AC_DIAGNOSE([obsolete],
9816 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9817 put the `dlopen' option into LT_INIT's first parameter.])
9818 ])
9819
9820 dnl aclocal-1.4 backwards compatibility:
9821 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9822
9823
9824 # win32-dll
9825 # ---------
9826 # Declare package support for building win32 dll's.
9827 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9828 [enable_win32_dll=yes
9829
9830 case $host in
9831 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
9832   AC_CHECK_TOOL(AS, as, false)
9833   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9834   AC_CHECK_TOOL(OBJDUMP, objdump, false)
9835   ;;
9836 esac
9837
9838 test -z "$AS" && AS=as
9839 _LT_DECL([], [AS],      [0], [Assembler program])dnl
9840
9841 test -z "$DLLTOOL" && DLLTOOL=dlltool
9842 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
9843
9844 test -z "$OBJDUMP" && OBJDUMP=objdump
9845 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
9846 ])# win32-dll
9847
9848 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9849 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9850 _LT_SET_OPTION([LT_INIT], [win32-dll])
9851 AC_DIAGNOSE([obsolete],
9852 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9853 put the `win32-dll' option into LT_INIT's first parameter.])
9854 ])
9855
9856 dnl aclocal-1.4 backwards compatibility:
9857 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9858
9859
9860 # _LT_ENABLE_SHARED([DEFAULT])
9861 # ----------------------------
9862 # implement the --enable-shared flag, and supports the `shared' and
9863 # `disable-shared' LT_INIT options.
9864 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9865 m4_define([_LT_ENABLE_SHARED],
9866 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9867 AC_ARG_ENABLE([shared],
9868     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9869         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9870     [p=${PACKAGE-default}
9871     case $enableval in
9872     yes) enable_shared=yes ;;
9873     no) enable_shared=no ;;
9874     *)
9875       enable_shared=no
9876       # Look at the argument we got.  We use all the common list separators.
9877       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9878       for pkg in $enableval; do
9879         IFS="$lt_save_ifs"
9880         if test "X$pkg" = "X$p"; then
9881           enable_shared=yes
9882         fi
9883       done
9884       IFS="$lt_save_ifs"
9885       ;;
9886     esac],
9887     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9888
9889     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9890         [Whether or not to build shared libraries])
9891 ])# _LT_ENABLE_SHARED
9892
9893 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9894 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9895
9896 # Old names:
9897 AC_DEFUN([AC_ENABLE_SHARED],
9898 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9899 ])
9900
9901 AC_DEFUN([AC_DISABLE_SHARED],
9902 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9903 ])
9904
9905 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9906 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9907
9908 dnl aclocal-1.4 backwards compatibility:
9909 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9910 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9911
9912
9913
9914 # _LT_ENABLE_STATIC([DEFAULT])
9915 # ----------------------------
9916 # implement the --enable-static flag, and support the `static' and
9917 # `disable-static' LT_INIT options.
9918 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9919 m4_define([_LT_ENABLE_STATIC],
9920 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9921 AC_ARG_ENABLE([static],
9922     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9923         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9924     [p=${PACKAGE-default}
9925     case $enableval in
9926     yes) enable_static=yes ;;
9927     no) enable_static=no ;;
9928     *)
9929      enable_static=no
9930       # Look at the argument we got.  We use all the common list separators.
9931       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9932       for pkg in $enableval; do
9933         IFS="$lt_save_ifs"
9934         if test "X$pkg" = "X$p"; then
9935           enable_static=yes
9936         fi
9937       done
9938       IFS="$lt_save_ifs"
9939       ;;
9940     esac],
9941     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9942
9943     _LT_DECL([build_old_libs], [enable_static], [0],
9944         [Whether or not to build static libraries])
9945 ])# _LT_ENABLE_STATIC
9946
9947 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9948 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9949
9950 # Old names:
9951 AC_DEFUN([AC_ENABLE_STATIC],
9952 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9953 ])
9954
9955 AC_DEFUN([AC_DISABLE_STATIC],
9956 [_LT_SET_OPTION([LT_INIT], [disable-static])
9957 ])
9958
9959 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9960 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9961
9962 dnl aclocal-1.4 backwards compatibility:
9963 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9964 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9965
9966
9967
9968 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9969 # ----------------------------------
9970 # implement the --enable-fast-install flag, and support the `fast-install'
9971 # and `disable-fast-install' LT_INIT options.
9972 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9973 m4_define([_LT_ENABLE_FAST_INSTALL],
9974 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9975 AC_ARG_ENABLE([fast-install],
9976     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9977     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9978     [p=${PACKAGE-default}
9979     case $enableval in
9980     yes) enable_fast_install=yes ;;
9981     no) enable_fast_install=no ;;
9982     *)
9983       enable_fast_install=no
9984       # Look at the argument we got.  We use all the common list separators.
9985       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9986       for pkg in $enableval; do
9987         IFS="$lt_save_ifs"
9988         if test "X$pkg" = "X$p"; then
9989           enable_fast_install=yes
9990         fi
9991       done
9992       IFS="$lt_save_ifs"
9993       ;;
9994     esac],
9995     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9996
9997 _LT_DECL([fast_install], [enable_fast_install], [0],
9998          [Whether or not to optimize for fast installation])dnl
9999 ])# _LT_ENABLE_FAST_INSTALL
10000
10001 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10002 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10003
10004 # Old names:
10005 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10006 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10007 AC_DIAGNOSE([obsolete],
10008 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10009 the `fast-install' option into LT_INIT's first parameter.])
10010 ])
10011
10012 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10013 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10014 AC_DIAGNOSE([obsolete],
10015 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
10016 the `disable-fast-install' option into LT_INIT's first parameter.])
10017 ])
10018
10019 dnl aclocal-1.4 backwards compatibility:
10020 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10021 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10022
10023
10024 # _LT_WITH_PIC([MODE])
10025 # --------------------
10026 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
10027 # LT_INIT options.
10028 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
10029 m4_define([_LT_WITH_PIC],
10030 [AC_ARG_WITH([pic],
10031     [AS_HELP_STRING([--with-pic],
10032         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10033     [pic_mode="$withval"],
10034     [pic_mode=default])
10035
10036 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10037
10038 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10039 ])# _LT_WITH_PIC
10040
10041 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10042 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10043
10044 # Old name:
10045 AU_DEFUN([AC_LIBTOOL_PICMODE],
10046 [_LT_SET_OPTION([LT_INIT], [pic-only])
10047 AC_DIAGNOSE([obsolete],
10048 [$0: Remove this warning and the call to _LT_SET_OPTION when you
10049 put the `pic-only' option into LT_INIT's first parameter.])
10050 ])
10051
10052 dnl aclocal-1.4 backwards compatibility:
10053 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10054
10055
10056 m4_define([_LTDL_MODE], [])
10057 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10058                  [m4_define([_LTDL_MODE], [nonrecursive])])
10059 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10060                  [m4_define([_LTDL_MODE], [recursive])])
10061 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10062                  [m4_define([_LTDL_MODE], [subproject])])
10063
10064 m4_define([_LTDL_TYPE], [])
10065 LT_OPTION_DEFINE([LTDL_INIT], [installable],
10066                  [m4_define([_LTDL_TYPE], [installable])])
10067 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10068                  [m4_define([_LTDL_TYPE], [convenience])])
10069
10070 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
10071 #
10072 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10073 # Written by Gary V. Vaughan, 2004
10074 #
10075 # This file is free software; the Free Software Foundation gives
10076 # unlimited permission to copy and/or distribute it, with or without
10077 # modifications, as long as this notice is preserved.
10078
10079 # serial 6 ltsugar.m4
10080
10081 # This is to help aclocal find these macros, as it can't see m4_define.
10082 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10083
10084
10085 # lt_join(SEP, ARG1, [ARG2...])
10086 # -----------------------------
10087 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10088 # associated separator.
10089 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10090 # versions in m4sugar had bugs.
10091 m4_define([lt_join],
10092 [m4_if([$#], [1], [],
10093        [$#], [2], [[$2]],
10094        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10095 m4_define([_lt_join],
10096 [m4_if([$#$2], [2], [],
10097        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10098
10099
10100 # lt_car(LIST)
10101 # lt_cdr(LIST)
10102 # ------------
10103 # Manipulate m4 lists.
10104 # These macros are necessary as long as will still need to support
10105 # Autoconf-2.59 which quotes differently.
10106 m4_define([lt_car], [[$1]])
10107 m4_define([lt_cdr],
10108 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10109        [$#], 1, [],
10110        [m4_dquote(m4_shift($@))])])
10111 m4_define([lt_unquote], $1)
10112
10113
10114 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
10115 # ------------------------------------------
10116 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10117 # Note that neither SEPARATOR nor STRING are expanded; they are appended
10118 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10119 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
10120 # than defined and empty).
10121 #
10122 # This macro is needed until we can rely on Autoconf 2.62, since earlier
10123 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10124 m4_define([lt_append],
10125 [m4_define([$1],
10126            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10127
10128
10129
10130 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10131 # ----------------------------------------------------------
10132 # Produce a SEP delimited list of all paired combinations of elements of
10133 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
10134 # has the form PREFIXmINFIXSUFFIXn.
10135 # Needed until we can rely on m4_combine added in Autoconf 2.62.
10136 m4_define([lt_combine],
10137 [m4_if(m4_eval([$# > 3]), [1],
10138        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10139 [[m4_foreach([_Lt_prefix], [$2],
10140              [m4_foreach([_Lt_suffix],
10141                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10142         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10143
10144
10145 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10146 # -----------------------------------------------------------------------
10147 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10148 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10149 m4_define([lt_if_append_uniq],
10150 [m4_ifdef([$1],
10151           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10152                  [lt_append([$1], [$2], [$3])$4],
10153                  [$5])],
10154           [lt_append([$1], [$2], [$3])$4])])
10155
10156
10157 # lt_dict_add(DICT, KEY, VALUE)
10158 # -----------------------------
10159 m4_define([lt_dict_add],
10160 [m4_define([$1($2)], [$3])])
10161
10162
10163 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10164 # --------------------------------------------
10165 m4_define([lt_dict_add_subkey],
10166 [m4_define([$1($2:$3)], [$4])])
10167
10168
10169 # lt_dict_fetch(DICT, KEY, [SUBKEY])
10170 # ----------------------------------
10171 m4_define([lt_dict_fetch],
10172 [m4_ifval([$3],
10173         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10174     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10175
10176
10177 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10178 # -----------------------------------------------------------------
10179 m4_define([lt_if_dict_fetch],
10180 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10181         [$5],
10182     [$6])])
10183
10184
10185 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10186 # --------------------------------------------------------------
10187 m4_define([lt_dict_filter],
10188 [m4_if([$5], [], [],
10189   [lt_join(m4_quote(m4_default([$4], [[, ]])),
10190            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10191                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10192 ])
10193
10194 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
10195 #
10196 #   Copyright (C) 2004 Free Software Foundation, Inc.
10197 #   Written by Scott James Remnant, 2004
10198 #
10199 # This file is free software; the Free Software Foundation gives
10200 # unlimited permission to copy and/or distribute it, with or without
10201 # modifications, as long as this notice is preserved.
10202
10203 # Generated from ltversion.in.
10204
10205 # serial 3017 ltversion.m4
10206 # This file is part of GNU Libtool
10207
10208 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
10209 m4_define([LT_PACKAGE_REVISION], [1.3017])
10210
10211 AC_DEFUN([LTVERSION_VERSION],
10212 [macro_version='2.2.6b'
10213 macro_revision='1.3017'
10214 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10215 _LT_DECL(, macro_revision, 0)
10216 ])
10217
10218 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
10219 #
10220 #   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
10221 #   Written by Scott James Remnant, 2004.
10222 #
10223 # This file is free software; the Free Software Foundation gives
10224 # unlimited permission to copy and/or distribute it, with or without
10225 # modifications, as long as this notice is preserved.
10226
10227 # serial 4 lt~obsolete.m4
10228
10229 # These exist entirely to fool aclocal when bootstrapping libtool.
10230 #
10231 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
10232 # which have later been changed to m4_define as they aren't part of the
10233 # exported API, or moved to Autoconf or Automake where they belong.
10234 #
10235 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
10236 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10237 # using a macro with the same name in our local m4/libtool.m4 it'll
10238 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10239 # and doesn't know about Autoconf macros at all.)
10240 #
10241 # So we provide this file, which has a silly filename so it's always
10242 # included after everything else.  This provides aclocal with the
10243 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10244 # because those macros already exist, or will be overwritten later.
10245 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
10246 #
10247 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10248 # Yes, that means every name once taken will need to remain here until
10249 # we give up compatibility with versions before 1.7, at which point
10250 # we need to keep only those names which we still refer to.
10251
10252 # This is to help aclocal find these macros, as it can't see m4_define.
10253 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10254
10255 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10256 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
10257 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10258 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
10259 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10260 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
10261 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
10262 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10263 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
10264 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
10265 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
10266 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10267 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10268 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10269 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10270 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10271 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
10272 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10273 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10274 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
10275 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
10276 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10277 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10278 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10279 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10280 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10281 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10282 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10283 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
10284 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
10285 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
10286 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10287 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10288 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
10289 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
10290 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10291 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10292 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
10293 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10294 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
10295 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
10296 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
10297 m4_ifndef([AC_LIBTOOL_RC],              [AC_DEFUN([AC_LIBTOOL_RC])])
10298 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10299 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10300 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10301 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10302 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10303 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10304 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10305 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10306 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10307 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10308 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
10309 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10310