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

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