~matttbe/ubuntu/quantal/lxpanel/lp1013171

« back to all changes in this revision

Viewing changes to .pc/99-autotools.patch/aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-07-23 21:48:25 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100723214825-m19pcniwxqqmv1k4
Tags: 0.5.6-0ubuntu1
* New upstream release.
* debian/copyright:
 - Update copyright for xkb plugin.
* debian/patches:
 - sort_dirmenu.patch: disable, merged upstream.
 - kbled.patch: disable, merged upstream.
 - panel_draw_label_text.patch: disable, merged upstream.
 - libtool-fix.patch: disable, merged upstream.
 - g_locale_to_utf8.patch: disable, merged upstream.
 - 99-autotools.patch: refresh.
 - redefine-alarm-variable.patch: Use upstream fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
12
# PARTICULAR PURPOSE.
 
13
 
 
14
m4_ifndef([AC_AUTOCONF_VERSION],
 
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
 
17
[m4_warning([this file was generated for autoconf 2.65.
 
18
You have another version of autoconf.  It may work, but is not guaranteed to.
 
19
If you have problems, you may need to regenerate the build system entirely.
 
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
21
 
 
22
# gettext.m4 serial 63 (gettext-0.18)
 
23
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
 
24
dnl This file is free software; the Free Software Foundation
 
25
dnl gives unlimited permission to copy and/or distribute it,
 
26
dnl with or without modifications, as long as this notice is preserved.
 
27
dnl
 
28
dnl This file can can be used in projects which are not available under
 
29
dnl the GNU General Public License or the GNU Library General Public
 
30
dnl License but which still want to provide support for the GNU gettext
 
31
dnl functionality.
 
32
dnl Please note that the actual code of the GNU gettext library is covered
 
33
dnl by the GNU Library General Public License, and the rest of the GNU
 
34
dnl gettext package package is covered by the GNU General Public License.
 
35
dnl They are *not* in the public domain.
 
36
 
 
37
dnl Authors:
 
38
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
39
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
 
40
 
 
41
dnl Macro to add for using GNU gettext.
 
42
 
 
43
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
 
44
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
 
45
dnl    default (if it is not specified or empty) is 'no-libtool'.
 
46
dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
 
47
dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
 
48
dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
 
49
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
 
50
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
 
51
dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
 
52
dnl    $(top_builddir)/intl/libintl.a will be created.
 
53
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
 
54
dnl    implementations (in libc or libintl) without the ngettext() function
 
55
dnl    will be ignored.  If NEEDSYMBOL is specified and is
 
56
dnl    'need-formatstring-macros', then GNU gettext implementations that don't
 
57
dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
 
58
dnl INTLDIR is used to find the intl libraries.  If empty,
 
59
dnl    the value `$(top_builddir)/intl/' is used.
 
60
dnl
 
61
dnl The result of the configuration is one of three cases:
 
62
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
 
63
dnl    and used.
 
64
dnl    Catalog format: GNU --> install in $(datadir)
 
65
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
66
dnl 2) GNU gettext has been found in the system's C library.
 
67
dnl    Catalog format: GNU --> install in $(datadir)
 
68
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
69
dnl 3) No internationalization, always use English msgid.
 
70
dnl    Catalog format: none
 
71
dnl    Catalog extension: none
 
72
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
 
73
dnl The use of .gmo is historical (it was needed to avoid overwriting the
 
74
dnl GNU format catalogs when building on a platform with an X/Open gettext),
 
75
dnl but we keep it in order not to force irrelevant filename changes on the
 
76
dnl maintainers.
 
77
dnl
 
78
AC_DEFUN([AM_GNU_GETTEXT],
 
79
[
 
80
  dnl Argument checking.
 
81
  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
 
82
    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
 
83
])])])])])
 
84
  ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
 
85
    [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
 
86
  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
 
87
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
 
88
])])])])
 
89
  define([gt_included_intl],
 
90
    ifelse([$1], [external],
 
91
      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
 
92
      [yes]))
 
93
  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
 
94
  gt_NEEDS_INIT
 
95
  AM_GNU_GETTEXT_NEED([$2])
 
96
 
 
97
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
 
98
  ifelse(gt_included_intl, yes, [
 
99
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
 
100
  ])
 
101
 
 
102
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
103
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
104
  AC_REQUIRE([AC_LIB_RPATH])
 
105
 
 
106
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
 
107
  dnl Ideally we would do this search only after the
 
108
  dnl      if test "$USE_NLS" = "yes"; then
 
109
  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
 
110
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
 
111
  dnl the configure script would need to contain the same shell code
 
112
  dnl again, outside any 'if'. There are two solutions:
 
113
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
 
114
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
 
115
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
 
116
  dnl documented, we avoid it.
 
117
  ifelse(gt_included_intl, yes, , [
 
118
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
 
119
  ])
 
120
 
 
121
  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
 
122
  gt_INTL_MACOSX
 
123
 
 
124
  dnl Set USE_NLS.
 
125
  AC_REQUIRE([AM_NLS])
 
126
 
 
127
  ifelse(gt_included_intl, yes, [
 
128
    BUILD_INCLUDED_LIBINTL=no
 
129
    USE_INCLUDED_LIBINTL=no
 
130
  ])
 
131
  LIBINTL=
 
132
  LTLIBINTL=
 
133
  POSUB=
 
134
 
 
135
  dnl Add a version number to the cache macros.
 
136
  case " $gt_needs " in
 
137
    *" need-formatstring-macros "*) gt_api_version=3 ;;
 
138
    *" need-ngettext "*) gt_api_version=2 ;;
 
139
    *) gt_api_version=1 ;;
 
140
  esac
 
141
  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
 
142
  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
 
143
 
 
144
  dnl If we use NLS figure out what method
 
145
  if test "$USE_NLS" = "yes"; then
 
146
    gt_use_preinstalled_gnugettext=no
 
147
    ifelse(gt_included_intl, yes, [
 
148
      AC_MSG_CHECKING([whether included gettext is requested])
 
149
      AC_ARG_WITH([included-gettext],
 
150
        [  --with-included-gettext use the GNU gettext library included here],
 
151
        nls_cv_force_use_gnu_gettext=$withval,
 
152
        nls_cv_force_use_gnu_gettext=no)
 
153
      AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
 
154
 
 
155
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
 
156
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
 
157
    ])
 
158
        dnl User does not insist on using GNU NLS library.  Figure out what
 
159
        dnl to use.  If GNU gettext is available we use this.  Else we have
 
160
        dnl to fall back to GNU NLS library.
 
161
 
 
162
        if test $gt_api_version -ge 3; then
 
163
          gt_revision_test_code='
 
164
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 
165
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 
166
#endif
 
167
changequote(,)dnl
 
168
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
 
169
changequote([,])dnl
 
170
'
 
171
        else
 
172
          gt_revision_test_code=
 
173
        fi
 
174
        if test $gt_api_version -ge 2; then
 
175
          gt_expression_test_code=' + * ngettext ("", "", 0)'
 
176
        else
 
177
          gt_expression_test_code=
 
178
        fi
 
179
 
 
180
        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
 
181
         [AC_TRY_LINK([#include <libintl.h>
 
182
$gt_revision_test_code
 
183
extern int _nl_msg_cat_cntr;
 
184
extern int *_nl_domain_bindings;],
 
185
            [bindtextdomain ("", "");
 
186
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
 
187
            [eval "$gt_func_gnugettext_libc=yes"],
 
188
            [eval "$gt_func_gnugettext_libc=no"])])
 
189
 
 
190
        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
 
191
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
 
192
          ifelse(gt_included_intl, yes, , [
 
193
            AM_ICONV_LINK
 
194
          ])
 
195
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
 
196
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
 
197
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
 
198
          dnl even if libiconv doesn't exist.
 
199
          AC_LIB_LINKFLAGS_BODY([intl])
 
200
          AC_CACHE_CHECK([for GNU gettext in libintl],
 
201
            [$gt_func_gnugettext_libintl],
 
202
           [gt_save_CPPFLAGS="$CPPFLAGS"
 
203
            CPPFLAGS="$CPPFLAGS $INCINTL"
 
204
            gt_save_LIBS="$LIBS"
 
205
            LIBS="$LIBS $LIBINTL"
 
206
            dnl Now see whether libintl exists and does not depend on libiconv.
 
207
            AC_TRY_LINK([#include <libintl.h>
 
208
$gt_revision_test_code
 
209
extern int _nl_msg_cat_cntr;
 
210
extern
 
211
#ifdef __cplusplus
 
212
"C"
 
213
#endif
 
214
const char *_nl_expand_alias (const char *);],
 
215
              [bindtextdomain ("", "");
 
216
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
 
217
              [eval "$gt_func_gnugettext_libintl=yes"],
 
218
              [eval "$gt_func_gnugettext_libintl=no"])
 
219
            dnl Now see whether libintl exists and depends on libiconv.
 
220
            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
 
221
              LIBS="$LIBS $LIBICONV"
 
222
              AC_TRY_LINK([#include <libintl.h>
 
223
$gt_revision_test_code
 
224
extern int _nl_msg_cat_cntr;
 
225
extern
 
226
#ifdef __cplusplus
 
227
"C"
 
228
#endif
 
229
const char *_nl_expand_alias (const char *);],
 
230
                [bindtextdomain ("", "");
 
231
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
 
232
               [LIBINTL="$LIBINTL $LIBICONV"
 
233
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
 
234
                eval "$gt_func_gnugettext_libintl=yes"
 
235
               ])
 
236
            fi
 
237
            CPPFLAGS="$gt_save_CPPFLAGS"
 
238
            LIBS="$gt_save_LIBS"])
 
239
        fi
 
240
 
 
241
        dnl If an already present or preinstalled GNU gettext() is found,
 
242
        dnl use it.  But if this macro is used in GNU gettext, and GNU
 
243
        dnl gettext is already preinstalled in libintl, we update this
 
244
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
 
245
        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
 
246
           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
 
247
                && test "$PACKAGE" != gettext-runtime \
 
248
                && test "$PACKAGE" != gettext-tools; }; then
 
249
          gt_use_preinstalled_gnugettext=yes
 
250
        else
 
251
          dnl Reset the values set by searching for libintl.
 
252
          LIBINTL=
 
253
          LTLIBINTL=
 
254
          INCINTL=
 
255
        fi
 
256
 
 
257
    ifelse(gt_included_intl, yes, [
 
258
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
 
259
          dnl GNU gettext is not found in the C library.
 
260
          dnl Fall back on included GNU gettext library.
 
261
          nls_cv_use_gnu_gettext=yes
 
262
        fi
 
263
      fi
 
264
 
 
265
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
 
266
        dnl Mark actions used to generate GNU NLS library.
 
267
        BUILD_INCLUDED_LIBINTL=yes
 
268
        USE_INCLUDED_LIBINTL=yes
 
269
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
 
270
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
 
271
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
 
272
      fi
 
273
 
 
274
      CATOBJEXT=
 
275
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
276
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
277
        dnl Mark actions to use GNU gettext tools.
 
278
        CATOBJEXT=.gmo
 
279
      fi
 
280
    ])
 
281
 
 
282
    if test -n "$INTL_MACOSX_LIBS"; then
 
283
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
284
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
285
        dnl Some extra flags are needed during linking.
 
286
        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
 
287
        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
 
288
      fi
 
289
    fi
 
290
 
 
291
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
292
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
293
      AC_DEFINE([ENABLE_NLS], [1],
 
294
        [Define to 1 if translation of program messages to the user's native language
 
295
   is requested.])
 
296
    else
 
297
      USE_NLS=no
 
298
    fi
 
299
  fi
 
300
 
 
301
  AC_MSG_CHECKING([whether to use NLS])
 
302
  AC_MSG_RESULT([$USE_NLS])
 
303
  if test "$USE_NLS" = "yes"; then
 
304
    AC_MSG_CHECKING([where the gettext function comes from])
 
305
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
 
306
      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
 
307
        gt_source="external libintl"
 
308
      else
 
309
        gt_source="libc"
 
310
      fi
 
311
    else
 
312
      gt_source="included intl directory"
 
313
    fi
 
314
    AC_MSG_RESULT([$gt_source])
 
315
  fi
 
316
 
 
317
  if test "$USE_NLS" = "yes"; then
 
318
 
 
319
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
 
320
      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
 
321
        AC_MSG_CHECKING([how to link with libintl])
 
322
        AC_MSG_RESULT([$LIBINTL])
 
323
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
 
324
      fi
 
325
 
 
326
      dnl For backward compatibility. Some packages may be using this.
 
327
      AC_DEFINE([HAVE_GETTEXT], [1],
 
328
       [Define if the GNU gettext() function is already present or preinstalled.])
 
329
      AC_DEFINE([HAVE_DCGETTEXT], [1],
 
330
       [Define if the GNU dcgettext() function is already present or preinstalled.])
 
331
    fi
 
332
 
 
333
    dnl We need to process the po/ directory.
 
334
    POSUB=po
 
335
  fi
 
336
 
 
337
  ifelse(gt_included_intl, yes, [
 
338
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
 
339
    dnl to 'yes' because some of the testsuite requires it.
 
340
    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
 
341
      BUILD_INCLUDED_LIBINTL=yes
 
342
    fi
 
343
 
 
344
    dnl Make all variables we use known to autoconf.
 
345
    AC_SUBST([BUILD_INCLUDED_LIBINTL])
 
346
    AC_SUBST([USE_INCLUDED_LIBINTL])
 
347
    AC_SUBST([CATOBJEXT])
 
348
 
 
349
    dnl For backward compatibility. Some configure.ins may be using this.
 
350
    nls_cv_header_intl=
 
351
    nls_cv_header_libgt=
 
352
 
 
353
    dnl For backward compatibility. Some Makefiles may be using this.
 
354
    DATADIRNAME=share
 
355
    AC_SUBST([DATADIRNAME])
 
356
 
 
357
    dnl For backward compatibility. Some Makefiles may be using this.
 
358
    INSTOBJEXT=.mo
 
359
    AC_SUBST([INSTOBJEXT])
 
360
 
 
361
    dnl For backward compatibility. Some Makefiles may be using this.
 
362
    GENCAT=gencat
 
363
    AC_SUBST([GENCAT])
 
364
 
 
365
    dnl For backward compatibility. Some Makefiles may be using this.
 
366
    INTLOBJS=
 
367
    if test "$USE_INCLUDED_LIBINTL" = yes; then
 
368
      INTLOBJS="\$(GETTOBJS)"
 
369
    fi
 
370
    AC_SUBST([INTLOBJS])
 
371
 
 
372
    dnl Enable libtool support if the surrounding package wishes it.
 
373
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
 
374
    AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
 
375
  ])
 
376
 
 
377
  dnl For backward compatibility. Some Makefiles may be using this.
 
378
  INTLLIBS="$LIBINTL"
 
379
  AC_SUBST([INTLLIBS])
 
380
 
 
381
  dnl Make all documented variables known to autoconf.
 
382
  AC_SUBST([LIBINTL])
 
383
  AC_SUBST([LTLIBINTL])
 
384
  AC_SUBST([POSUB])
 
385
])
 
386
 
 
387
 
 
388
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
 
389
m4_define([gt_NEEDS_INIT],
 
390
[
 
391
  m4_divert_text([DEFAULTS], [gt_needs=])
 
392
  m4_define([gt_NEEDS_INIT], [])
 
393
])
 
394
 
 
395
 
 
396
dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
 
397
AC_DEFUN([AM_GNU_GETTEXT_NEED],
 
398
[
 
399
  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
 
400
])
 
401
 
 
402
 
 
403
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
 
404
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
 
405
 
 
406
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
407
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
408
#
 
409
# This file is free software, distributed under the terms of the GNU
 
410
# General Public License.  As a special exception to the GNU General
 
411
# Public License, this file may be distributed as part of a program
 
412
# that contains a configuration script generated by Autoconf, under
 
413
# the same distribution terms as the rest of that program.
 
414
#
 
415
# This file can be copied and used freely without restrictions.  It can
 
416
# be used in projects which are not available under the GNU Public License
 
417
# but which still want to provide support for the GNU gettext functionality.
 
418
#
 
419
# Macro to add for using GNU gettext.
 
420
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
421
#
 
422
# Modified to never use included libintl. 
 
423
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
424
#
 
425
# Major rework to remove unused code
 
426
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
427
#
 
428
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
429
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
430
#
 
431
# Modified to require ngettext
 
432
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
433
#
 
434
# We need this here as well, since someone might use autoconf-2.5x
 
435
# to configure GLib then an older version to configure a package
 
436
# using AM_GLIB_GNU_GETTEXT
 
437
AC_PREREQ(2.53)
 
438
 
 
439
dnl
 
440
dnl We go to great lengths to make sure that aclocal won't 
 
441
dnl try to pull in the installed version of these macros
 
442
dnl when running aclocal in the glib directory.
 
443
dnl
 
444
m4_copy([AC_DEFUN],[glib_DEFUN])
 
445
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
446
dnl
 
447
dnl At the end, if we're not within glib, we'll define the public
 
448
dnl definitions in terms of our private definitions.
 
449
dnl
 
450
 
 
451
# GLIB_LC_MESSAGES
 
452
#--------------------
 
453
glib_DEFUN([GLIB_LC_MESSAGES],
 
454
  [AC_CHECK_HEADERS([locale.h])
 
455
    if test $ac_cv_header_locale_h = yes; then
 
456
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
457
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
458
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
459
    if test $am_cv_val_LC_MESSAGES = yes; then
 
460
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
461
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
462
    fi
 
463
  fi])
 
464
 
 
465
# GLIB_PATH_PROG_WITH_TEST
 
466
#----------------------------
 
467
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
468
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
469
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
470
[# Extract the first word of "$2", so it can be a program name with args.
 
471
set dummy $2; ac_word=[$]2
 
472
AC_MSG_CHECKING([for $ac_word])
 
473
AC_CACHE_VAL(ac_cv_path_$1,
 
474
[case "[$]$1" in
 
475
  /*)
 
476
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
477
  ;;
 
478
  *)
 
479
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
480
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
481
    test -z "$ac_dir" && ac_dir=.
 
482
    if test -f $ac_dir/$ac_word; then
 
483
      if [$3]; then
 
484
        ac_cv_path_$1="$ac_dir/$ac_word"
 
485
        break
 
486
      fi
 
487
    fi
 
488
  done
 
489
  IFS="$ac_save_ifs"
 
490
dnl If no 4th arg is given, leave the cache variable unset,
 
491
dnl so AC_PATH_PROGS will keep looking.
 
492
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
493
])dnl
 
494
  ;;
 
495
esac])dnl
 
496
$1="$ac_cv_path_$1"
 
497
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
498
  AC_MSG_RESULT([$]$1)
 
499
else
 
500
  AC_MSG_RESULT(no)
 
501
fi
 
502
AC_SUBST($1)dnl
 
503
])
 
504
 
 
505
# GLIB_WITH_NLS
 
506
#-----------------
 
507
glib_DEFUN([GLIB_WITH_NLS],
 
508
  dnl NLS is obligatory
 
509
  [USE_NLS=yes
 
510
    AC_SUBST(USE_NLS)
 
511
 
 
512
    gt_cv_have_gettext=no
 
513
 
 
514
    CATOBJEXT=NONE
 
515
    XGETTEXT=:
 
516
    INTLLIBS=
 
517
 
 
518
    AC_CHECK_HEADER(libintl.h,
 
519
     [gt_cv_func_dgettext_libintl="no"
 
520
      libintl_extra_libs=""
 
521
 
 
522
      #
 
523
      # First check in libc
 
524
      #
 
525
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
526
        [AC_TRY_LINK([
 
527
#include <libintl.h>
 
528
],
 
529
         [return !ngettext ("","", 1)],
 
530
          gt_cv_func_ngettext_libc=yes,
 
531
          gt_cv_func_ngettext_libc=no)
 
532
        ])
 
533
  
 
534
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
535
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
536
                [AC_TRY_LINK([
 
537
#include <libintl.h>
 
538
],
 
539
                  [return !dgettext ("","")],
 
540
                  gt_cv_func_dgettext_libc=yes,
 
541
                  gt_cv_func_dgettext_libc=no)
 
542
                ])
 
543
      fi
 
544
  
 
545
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
546
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
547
      fi
 
548
 
 
549
      #
 
550
      # If we don't have everything we want, check in libintl
 
551
      #
 
552
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
553
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
554
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
555
        
 
556
        AC_CHECK_LIB(intl, bindtextdomain,
 
557
            [AC_CHECK_LIB(intl, ngettext,
 
558
                    [AC_CHECK_LIB(intl, dgettext,
 
559
                                  gt_cv_func_dgettext_libintl=yes)])])
 
560
 
 
561
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
562
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
563
          AC_MSG_RESULT([])
 
564
          AC_CHECK_LIB(intl, ngettext,
 
565
                [AC_CHECK_LIB(intl, dcgettext,
 
566
                       [gt_cv_func_dgettext_libintl=yes
 
567
                        libintl_extra_libs=-liconv],
 
568
                        :,-liconv)],
 
569
                :,-liconv)
 
570
        fi
 
571
 
 
572
        #
 
573
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
574
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
575
        # and both have dgettext and ngettext
 
576
        #
 
577
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
578
          glib_save_LIBS="$LIBS"
 
579
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
580
          unset ac_cv_func_bind_textdomain_codeset
 
581
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
582
          LIBS="$glib_save_LIBS"
 
583
 
 
584
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
585
            gt_cv_func_dgettext_libc=no
 
586
          else
 
587
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
588
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
589
              gt_cv_func_dgettext_libintl=no
 
590
            fi
 
591
          fi
 
592
        fi
 
593
      fi
 
594
 
 
595
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
596
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
597
        gt_cv_have_gettext=yes
 
598
      fi
 
599
  
 
600
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
601
        INTLLIBS="-lintl $libintl_extra_libs"
 
602
      fi
 
603
  
 
604
      if test "$gt_cv_have_gettext" = "yes"; then
 
605
        AC_DEFINE(HAVE_GETTEXT,1,
 
606
          [Define if the GNU gettext() function is already present or preinstalled.])
 
607
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
608
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
609
        if test "$MSGFMT" != "no"; then
 
610
          glib_save_LIBS="$LIBS"
 
611
          LIBS="$LIBS $INTLLIBS"
 
612
          AC_CHECK_FUNCS(dcgettext)
 
613
          MSGFMT_OPTS=
 
614
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
615
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
616
msgid ""
 
617
msgstr ""
 
618
"Content-Type: text/plain; charset=UTF-8\n"
 
619
"Project-Id-Version: test 1.0\n"
 
620
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
621
"Last-Translator: test <foo@bar.xx>\n"
 
622
"Language-Team: C <LL@li.org>\n"
 
623
"MIME-Version: 1.0\n"
 
624
"Content-Transfer-Encoding: 8bit\n"
 
625
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
626
          AC_SUBST(MSGFMT_OPTS)
 
627
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
628
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
629
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
630
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
631
                         return _nl_msg_cat_cntr],
 
632
            [CATOBJEXT=.gmo 
 
633
             DATADIRNAME=share],
 
634
            [case $host in
 
635
            *-*-solaris*)
 
636
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
637
            dnl GNU format message catalog is always supported,
 
638
            dnl since both are added to the libc all together.
 
639
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
640
            dnl and CATOBJEXT=.gmo in this case.
 
641
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
642
              [CATOBJEXT=.gmo 
 
643
               DATADIRNAME=share],
 
644
              [CATOBJEXT=.mo
 
645
               DATADIRNAME=lib])
 
646
            ;;
 
647
            *)
 
648
            CATOBJEXT=.mo
 
649
            DATADIRNAME=lib
 
650
            ;;
 
651
            esac])
 
652
          LIBS="$glib_save_LIBS"
 
653
          INSTOBJEXT=.mo
 
654
        else
 
655
          gt_cv_have_gettext=no
 
656
        fi
 
657
      fi
 
658
    ])
 
659
 
 
660
    if test "$gt_cv_have_gettext" = "yes" ; then
 
661
      AC_DEFINE(ENABLE_NLS, 1,
 
662
        [always defined to indicate that i18n is enabled])
 
663
    fi
 
664
 
 
665
    dnl Test whether we really found GNU xgettext.
 
666
    if test "$XGETTEXT" != ":"; then
 
667
      dnl If it is not GNU xgettext we define it as : so that the
 
668
      dnl Makefiles still can work.
 
669
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
670
        : ;
 
671
      else
 
672
        AC_MSG_RESULT(
 
673
          [found xgettext program is not GNU xgettext; ignore it])
 
674
        XGETTEXT=":"
 
675
      fi
 
676
    fi
 
677
 
 
678
    # We need to process the po/ directory.
 
679
    POSUB=po
 
680
 
 
681
    AC_OUTPUT_COMMANDS(
 
682
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
683
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
684
      esac])
 
685
 
 
686
    dnl These rules are solely for the distribution goal.  While doing this
 
687
    dnl we only have to keep exactly one list of the available catalogs
 
688
    dnl in configure.in.
 
689
    for lang in $ALL_LINGUAS; do
 
690
      GMOFILES="$GMOFILES $lang.gmo"
 
691
      POFILES="$POFILES $lang.po"
 
692
    done
 
693
 
 
694
    dnl Make all variables we use known to autoconf.
 
695
    AC_SUBST(CATALOGS)
 
696
    AC_SUBST(CATOBJEXT)
 
697
    AC_SUBST(DATADIRNAME)
 
698
    AC_SUBST(GMOFILES)
 
699
    AC_SUBST(INSTOBJEXT)
 
700
    AC_SUBST(INTLLIBS)
 
701
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
702
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
703
    AC_SUBST(POFILES)
 
704
    AC_SUBST(POSUB)
 
705
  ])
 
706
 
 
707
# AM_GLIB_GNU_GETTEXT
 
708
# -------------------
 
709
# Do checks necessary for use of gettext. If a suitable implementation 
 
710
# of gettext is found in either in libintl or in the C library,
 
711
# it will set INTLLIBS to the libraries needed for use of gettext
 
712
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
713
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
714
# on various variables needed by the Makefile.in.in installed by 
 
715
# glib-gettextize.
 
716
dnl
 
717
glib_DEFUN([GLIB_GNU_GETTEXT],
 
718
  [AC_REQUIRE([AC_PROG_CC])dnl
 
719
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
720
   
 
721
   GLIB_LC_MESSAGES
 
722
   GLIB_WITH_NLS
 
723
 
 
724
   if test "$gt_cv_have_gettext" = "yes"; then
 
725
     if test "x$ALL_LINGUAS" = "x"; then
 
726
       LINGUAS=
 
727
     else
 
728
       AC_MSG_CHECKING(for catalogs to be installed)
 
729
       NEW_LINGUAS=
 
730
       for presentlang in $ALL_LINGUAS; do
 
731
         useit=no
 
732
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
733
           desiredlanguages="$LINGUAS"
 
734
         else
 
735
           desiredlanguages="$ALL_LINGUAS"
 
736
         fi
 
737
         for desiredlang in $desiredlanguages; do
 
738
           # Use the presentlang catalog if desiredlang is
 
739
           #   a. equal to presentlang, or
 
740
           #   b. a variant of presentlang (because in this case,
 
741
           #      presentlang can be used as a fallback for messages
 
742
           #      which are not translated in the desiredlang catalog).
 
743
           case "$desiredlang" in
 
744
             "$presentlang"*) useit=yes;;
 
745
           esac
 
746
         done
 
747
         if test $useit = yes; then
 
748
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
749
         fi
 
750
       done
 
751
       LINGUAS=$NEW_LINGUAS
 
752
       AC_MSG_RESULT($LINGUAS)
 
753
     fi
 
754
 
 
755
     dnl Construct list of names of catalog files to be constructed.
 
756
     if test -n "$LINGUAS"; then
 
757
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
758
     fi
 
759
   fi
 
760
 
 
761
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
762
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
763
   dnl Try to locate is.
 
764
   MKINSTALLDIRS=
 
765
   if test -n "$ac_aux_dir"; then
 
766
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
767
   fi
 
768
   if test -z "$MKINSTALLDIRS"; then
 
769
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
770
   fi
 
771
   AC_SUBST(MKINSTALLDIRS)
 
772
 
 
773
   dnl Generate list of files to be processed by xgettext which will
 
774
   dnl be included in po/Makefile.
 
775
   test -d po || mkdir po
 
776
   if test "x$srcdir" != "x."; then
 
777
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
778
       posrcprefix="$srcdir/"
 
779
     else
 
780
       posrcprefix="../$srcdir/"
 
781
     fi
 
782
   else
 
783
     posrcprefix="../"
 
784
   fi
 
785
   rm -f po/POTFILES
 
786
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
787
        < $srcdir/po/POTFILES.in > po/POTFILES
 
788
  ])
 
789
 
 
790
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
791
# -------------------------------
 
792
# Define VARIABLE to the location where catalog files will
 
793
# be installed by po/Makefile.
 
794
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
795
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
796
glib_save_prefix="$prefix"
 
797
glib_save_exec_prefix="$exec_prefix"
 
798
glib_save_datarootdir="$datarootdir"
 
799
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
800
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
801
datarootdir=`eval echo "${datarootdir}"`
 
802
if test "x$CATOBJEXT" = "x.mo" ; then
 
803
  localedir=`eval echo "${libdir}/locale"`
 
804
else
 
805
  localedir=`eval echo "${datadir}/locale"`
 
806
fi
 
807
prefix="$glib_save_prefix"
 
808
exec_prefix="$glib_save_exec_prefix"
 
809
datarootdir="$glib_save_datarootdir"
 
810
AC_DEFINE_UNQUOTED($1, "$localedir",
 
811
  [Define the location where the catalogs will be installed])
 
812
])
 
813
 
 
814
dnl
 
815
dnl Now the definitions that aclocal will find
 
816
dnl
 
817
ifdef(glib_configure_in,[],[
 
818
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
819
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
820
])dnl
 
821
 
 
822
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
823
 
824
# Create a temporary file with TEST-FILE as its contents and pass the
 
825
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
826
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
827
AC_DEFUN([GLIB_RUN_PROG],
 
828
[cat >conftest.foo <<_ACEOF
 
829
$2
 
830
_ACEOF
 
831
if AC_RUN_LOG([$1 conftest.foo]); then
 
832
  m4_ifval([$3], [$3], [:])
 
833
m4_ifvaln([$4], [else $4])dnl
 
834
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
835
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
836
fi])
 
837
 
 
838
 
 
839
 
 
840
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
841
# serial 40 IT_PROG_INTLTOOL
 
842
AC_DEFUN([IT_PROG_INTLTOOL], [
 
843
AC_PREREQ([2.50])dnl
 
844
AC_REQUIRE([AM_NLS])dnl
 
845
 
 
846
case "$am__api_version" in
 
847
    1.[01234])
 
848
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
849
    ;;
 
850
    *)
 
851
    ;;
 
852
esac
 
853
 
 
854
if test -n "$1"; then
 
855
    AC_MSG_CHECKING([for intltool >= $1])
 
856
 
 
857
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
858
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
859
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
860
    ]
 
861
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
862
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
863
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
864
fi
 
865
 
 
866
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
867
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
868
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
869
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
870
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
871
fi
 
872
 
 
873
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
874
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
875
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
876
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
877
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
878
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
879
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
880
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
881
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
882
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
883
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
884
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
885
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
886
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
887
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
888
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
889
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
890
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
891
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
892
 
 
893
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
 
894
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 
895
_IT_SUBST(INTLTOOL_KEYS_RULE)
 
896
_IT_SUBST(INTLTOOL_PROP_RULE)
 
897
_IT_SUBST(INTLTOOL_OAF_RULE)
 
898
_IT_SUBST(INTLTOOL_PONG_RULE)
 
899
_IT_SUBST(INTLTOOL_SERVER_RULE)
 
900
_IT_SUBST(INTLTOOL_SHEET_RULE)
 
901
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
902
_IT_SUBST(INTLTOOL_UI_RULE)
 
903
_IT_SUBST(INTLTOOL_XAM_RULE)
 
904
_IT_SUBST(INTLTOOL_KBD_RULE)
 
905
_IT_SUBST(INTLTOOL_XML_RULE)
 
906
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
907
_IT_SUBST(INTLTOOL_CAVES_RULE)
 
908
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 
909
_IT_SUBST(INTLTOOL_THEME_RULE)
 
910
_IT_SUBST(INTLTOOL_SERVICE_RULE)
 
911
_IT_SUBST(INTLTOOL_POLICY_RULE)
 
912
 
 
913
# Check the gettext tools to make sure they are GNU
 
914
AC_PATH_PROG(XGETTEXT, xgettext)
 
915
AC_PATH_PROG(MSGMERGE, msgmerge)
 
916
AC_PATH_PROG(MSGFMT, msgfmt)
 
917
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
918
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
919
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
920
fi
 
921
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
922
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
923
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
924
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
925
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
926
fi
 
927
 
 
928
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
929
if test -z "$INTLTOOL_PERL"; then
 
930
   AC_MSG_ERROR([perl not found])
 
931
fi
 
932
AC_MSG_CHECKING([for perl >= 5.8.1])
 
933
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 
934
if test $? -ne 0; then
 
935
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 
936
else
 
937
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
 
938
   AC_MSG_RESULT([$IT_PERL_VERSION])
 
939
fi
 
940
if test "x$2" != "xno-xml"; then
 
941
   AC_MSG_CHECKING([for XML::Parser])
 
942
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
943
       AC_MSG_RESULT([ok])
 
944
   else
 
945
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
946
   fi
 
947
fi
 
948
 
 
949
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
950
AC_SUBST(ALL_LINGUAS)
 
951
 
 
952
# Set DATADIRNAME correctly if it is not set yet
 
953
# (copied from glib-gettext.m4)
 
954
if test -z "$DATADIRNAME"; then
 
955
  AC_LINK_IFELSE(
 
956
    [AC_LANG_PROGRAM([[]],
 
957
                     [[extern int _nl_msg_cat_cntr;
 
958
                       return _nl_msg_cat_cntr]])],
 
959
    [DATADIRNAME=share],
 
960
    [case $host in
 
961
    *-*-solaris*)
 
962
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
963
    dnl GNU format message catalog is always supported,
 
964
    dnl since both are added to the libc all together.
 
965
    dnl Hence, we'd like to go with DATADIRNAME=share
 
966
    dnl in this case.
 
967
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
968
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
969
    ;;
 
970
    *)
 
971
    [DATADIRNAME=lib]
 
972
    ;;
 
973
    esac])
 
974
fi
 
975
AC_SUBST(DATADIRNAME)
 
976
 
 
977
IT_PO_SUBDIR([po])
 
978
 
 
979
])
 
980
 
 
981
 
 
982
# IT_PO_SUBDIR(DIRNAME)
 
983
# ---------------------
 
984
# All po subdirs have to be declared with this macro; the subdir "po" is
 
985
# declared by IT_PROG_INTLTOOL.
 
986
#
 
987
AC_DEFUN([IT_PO_SUBDIR],
 
988
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
989
dnl
 
990
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
991
dnl of config.status.
 
992
AC_CONFIG_COMMANDS_PRE([
 
993
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
994
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 
995
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
996
    fi
 
997
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
998
    >"$1/stamp-it.tmp"
 
999
    [sed '/^#/d
 
1000
         s/^[[].*] *//
 
1001
         /^[    ]*$/d
 
1002
        '"s|^|  $ac_top_srcdir/|" \
 
1003
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
1004
    ]
 
1005
    [sed '/^POTFILES =/,/[^\\]$/ {
 
1006
                /^POTFILES =/!d
 
1007
                r $1/POTFILES
 
1008
          }
 
1009
         ' "$1/Makefile.in" >"$1/Makefile"]
 
1010
    rm -f "$1/Makefile.tmp"
 
1011
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
1012
  ])
 
1013
])dnl
 
1014
])
 
1015
 
 
1016
# _IT_SUBST(VARIABLE)
 
1017
# -------------------
 
1018
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
1019
#
 
1020
AC_DEFUN([_IT_SUBST],
 
1021
[
 
1022
AC_SUBST([$1])
 
1023
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
1024
]
 
1025
)
 
1026
 
 
1027
# deprecated macros
 
1028
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
1029
# A hint is needed for aclocal from Automake <= 1.9.4:
 
1030
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
1031
 
 
1032
 
 
1033
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
1034
#
 
1035
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 
1036
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 
1037
#                 Inc.
 
1038
#   Written by Gordon Matzigkeit, 1996
 
1039
#
 
1040
# This file is free software; the Free Software Foundation gives
 
1041
# unlimited permission to copy and/or distribute it, with or without
 
1042
# modifications, as long as this notice is preserved.
 
1043
 
 
1044
m4_define([_LT_COPYING], [dnl
 
1045
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 
1046
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 
1047
#                 Inc.
 
1048
#   Written by Gordon Matzigkeit, 1996
 
1049
#
 
1050
#   This file is part of GNU Libtool.
 
1051
#
 
1052
# GNU Libtool is free software; you can redistribute it and/or
 
1053
# modify it under the terms of the GNU General Public License as
 
1054
# published by the Free Software Foundation; either version 2 of
 
1055
# the License, or (at your option) any later version.
 
1056
#
 
1057
# As a special exception to the GNU General Public License,
 
1058
# if you distribute this file as part of a program or library that
 
1059
# is built using GNU Libtool, you may include this file under the
 
1060
# same distribution terms that you use for the rest of that program.
 
1061
#
 
1062
# GNU Libtool is distributed in the hope that it will be useful,
 
1063
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1064
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1065
# GNU General Public License for more details.
 
1066
#
 
1067
# You should have received a copy of the GNU General Public License
 
1068
# along with GNU Libtool; see the file COPYING.  If not, a copy
 
1069
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
 
1070
# obtained by writing to the Free Software Foundation, Inc.,
 
1071
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
1072
])
 
1073
 
 
1074
# serial 57 LT_INIT
 
1075
 
 
1076
 
 
1077
# LT_PREREQ(VERSION)
 
1078
# ------------------
 
1079
# Complain and exit if this libtool version is less that VERSION.
 
1080
m4_defun([LT_PREREQ],
 
1081
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
 
1082
       [m4_default([$3],
 
1083
                   [m4_fatal([Libtool version $1 or higher is required],
 
1084
                             63)])],
 
1085
       [$2])])
 
1086
 
 
1087
 
 
1088
# _LT_CHECK_BUILDDIR
 
1089
# ------------------
 
1090
# Complain if the absolute build directory name contains unusual characters
 
1091
m4_defun([_LT_CHECK_BUILDDIR],
 
1092
[case `pwd` in
 
1093
  *\ * | *\     *)
 
1094
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
 
1095
esac
 
1096
])
 
1097
 
 
1098
 
 
1099
# LT_INIT([OPTIONS])
 
1100
# ------------------
 
1101
AC_DEFUN([LT_INIT],
 
1102
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
 
1103
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 
1104
AC_BEFORE([$0], [LT_LANG])dnl
 
1105
AC_BEFORE([$0], [LT_OUTPUT])dnl
 
1106
AC_BEFORE([$0], [LTDL_INIT])dnl
 
1107
m4_require([_LT_CHECK_BUILDDIR])dnl
 
1108
 
 
1109
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
 
1110
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
 
1111
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
 
1112
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
 
1113
dnl unless we require an AC_DEFUNed macro:
 
1114
AC_REQUIRE([LTOPTIONS_VERSION])dnl
 
1115
AC_REQUIRE([LTSUGAR_VERSION])dnl
 
1116
AC_REQUIRE([LTVERSION_VERSION])dnl
 
1117
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
 
1118
m4_require([_LT_PROG_LTMAIN])dnl
 
1119
 
 
1120
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
 
1121
 
 
1122
dnl Parse OPTIONS
 
1123
_LT_SET_OPTIONS([$0], [$1])
 
1124
 
 
1125
# This can be used to rebuild libtool when needed
 
1126
LIBTOOL_DEPS="$ltmain"
 
1127
 
 
1128
# Always use our own libtool.
 
1129
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
1130
AC_SUBST(LIBTOOL)dnl
 
1131
 
 
1132
_LT_SETUP
 
1133
 
 
1134
# Only expand once:
 
1135
m4_define([LT_INIT])
 
1136
])# LT_INIT
 
1137
 
 
1138
# Old names:
 
1139
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
 
1140
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
 
1141
dnl aclocal-1.4 backwards compatibility:
 
1142
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 
1143
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
1144
 
 
1145
 
 
1146
# _LT_CC_BASENAME(CC)
 
1147
# -------------------
 
1148
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 
1149
m4_defun([_LT_CC_BASENAME],
 
1150
[for cc_temp in $1""; do
 
1151
  case $cc_temp in
 
1152
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
 
1153
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
 
1154
    \-*) ;;
 
1155
    *) break;;
 
1156
  esac
 
1157
done
 
1158
cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 
1159
])
 
1160
 
 
1161
 
 
1162
# _LT_FILEUTILS_DEFAULTS
 
1163
# ----------------------
 
1164
# It is okay to use these file commands and assume they have been set
 
1165
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
 
1166
m4_defun([_LT_FILEUTILS_DEFAULTS],
 
1167
[: ${CP="cp -f"}
 
1168
: ${MV="mv -f"}
 
1169
: ${RM="rm -f"}
 
1170
])# _LT_FILEUTILS_DEFAULTS
 
1171
 
 
1172
 
 
1173
# _LT_SETUP
 
1174
# ---------
 
1175
m4_defun([_LT_SETUP],
 
1176
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
1177
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
1178
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
 
1179
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
 
1180
 
 
1181
_LT_DECL([], [host_alias], [0], [The host system])dnl
 
1182
_LT_DECL([], [host], [0])dnl
 
1183
_LT_DECL([], [host_os], [0])dnl
 
1184
dnl
 
1185
_LT_DECL([], [build_alias], [0], [The build system])dnl
 
1186
_LT_DECL([], [build], [0])dnl
 
1187
_LT_DECL([], [build_os], [0])dnl
 
1188
dnl
 
1189
AC_REQUIRE([AC_PROG_CC])dnl
 
1190
AC_REQUIRE([LT_PATH_LD])dnl
 
1191
AC_REQUIRE([LT_PATH_NM])dnl
 
1192
dnl
 
1193
AC_REQUIRE([AC_PROG_LN_S])dnl
 
1194
test -z "$LN_S" && LN_S="ln -s"
 
1195
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
 
1196
dnl
 
1197
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
 
1198
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
 
1199
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 
1200
dnl
 
1201
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
1202
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 
1203
m4_require([_LT_CMD_RELOAD])dnl
 
1204
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 
1205
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 
1206
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
1207
 
 
1208
_LT_CONFIG_LIBTOOL_INIT([
 
1209
# See if we are running on zsh, and set the options which allow our
 
1210
# commands through without removal of \ escapes INIT.
 
1211
if test -n "\${ZSH_VERSION+set}" ; then
 
1212
   setopt NO_GLOB_SUBST
 
1213
fi
 
1214
])
 
1215
if test -n "${ZSH_VERSION+set}" ; then
 
1216
   setopt NO_GLOB_SUBST
 
1217
fi
 
1218
 
 
1219
_LT_CHECK_OBJDIR
 
1220
 
 
1221
m4_require([_LT_TAG_COMPILER])dnl
 
1222
 
 
1223
case $host_os in
 
1224
aix3*)
 
1225
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
1226
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
1227
  # vanish in a puff of smoke.
 
1228
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
1229
    COLLECT_NAMES=
 
1230
    export COLLECT_NAMES
 
1231
  fi
 
1232
  ;;
 
1233
esac
 
1234
 
 
1235
# Global variables:
 
1236
ofile=libtool
 
1237
can_build_shared=yes
 
1238
 
 
1239
# All known linkers require a `.a' archive for static linking (except MSVC,
 
1240
# which needs '.lib').
 
1241
libext=a
 
1242
 
 
1243
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
1244
 
 
1245
old_CC="$CC"
 
1246
old_CFLAGS="$CFLAGS"
 
1247
 
 
1248
# Set sane defaults for various variables
 
1249
test -z "$CC" && CC=cc
 
1250
test -z "$LTCC" && LTCC=$CC
 
1251
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 
1252
test -z "$LD" && LD=ld
 
1253
test -z "$ac_objext" && ac_objext=o
 
1254
 
 
1255
_LT_CC_BASENAME([$compiler])
 
1256
 
 
1257
# Only perform the check for file, if the check method requires it
 
1258
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
1259
case $deplibs_check_method in
 
1260
file_magic*)
 
1261
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
1262
    _LT_PATH_MAGIC
 
1263
  fi
 
1264
  ;;
 
1265
esac
 
1266
 
 
1267
# Use C for the default configuration in the libtool script
 
1268
LT_SUPPORTED_TAG([CC])
 
1269
_LT_LANG_C_CONFIG
 
1270
_LT_LANG_DEFAULT_CONFIG
 
1271
_LT_CONFIG_COMMANDS
 
1272
])# _LT_SETUP
 
1273
 
 
1274
 
 
1275
# _LT_PREPARE_SED_QUOTE_VARS
 
1276
# --------------------------
 
1277
# Define a few sed substitution that help us do robust quoting.
 
1278
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
 
1279
[# Backslashify metacharacters that are still active within
 
1280
# double-quoted strings.
 
1281
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
 
1282
 
 
1283
# Same as above, but do not quote variable references.
 
1284
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
 
1285
 
 
1286
# Sed substitution to delay expansion of an escaped shell variable in a
 
1287
# double_quote_subst'ed string.
 
1288
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
1289
 
 
1290
# Sed substitution to delay expansion of an escaped single quote.
 
1291
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
1292
 
 
1293
# Sed substitution to avoid accidental globbing in evaled expressions
 
1294
no_glob_subst='s/\*/\\\*/g'
 
1295
])
 
1296
 
 
1297
# _LT_PROG_LTMAIN
 
1298
# ---------------
 
1299
# Note that this code is called both from `configure', and `config.status'
 
1300
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
 
1301
# `config.status' has no value for ac_aux_dir unless we are using Automake,
 
1302
# so we pass a copy along to make sure it has a sensible value anyway.
 
1303
m4_defun([_LT_PROG_LTMAIN],
 
1304
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
 
1305
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
 
1306
ltmain="$ac_aux_dir/ltmain.sh"
 
1307
])# _LT_PROG_LTMAIN
 
1308
 
 
1309
 
 
1310
 
 
1311
# So that we can recreate a full libtool script including additional
 
1312
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
 
1313
# in macros and then make a single call at the end using the `libtool'
 
1314
# label.
 
1315
 
 
1316
 
 
1317
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
 
1318
# ----------------------------------------
 
1319
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
1320
m4_define([_LT_CONFIG_LIBTOOL_INIT],
 
1321
[m4_ifval([$1],
 
1322
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
 
1323
                     [$1
 
1324
])])])
 
1325
 
 
1326
# Initialize.
 
1327
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
 
1328
 
 
1329
 
 
1330
# _LT_CONFIG_LIBTOOL([COMMANDS])
 
1331
# ------------------------------
 
1332
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
1333
m4_define([_LT_CONFIG_LIBTOOL],
 
1334
[m4_ifval([$1],
 
1335
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
 
1336
                     [$1
 
1337
])])])
 
1338
 
 
1339
# Initialize.
 
1340
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
 
1341
 
 
1342
 
 
1343
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
 
1344
# -----------------------------------------------------
 
1345
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
 
1346
[_LT_CONFIG_LIBTOOL([$1])
 
1347
_LT_CONFIG_LIBTOOL_INIT([$2])
 
1348
])
 
1349
 
 
1350
 
 
1351
# _LT_FORMAT_COMMENT([COMMENT])
 
1352
# -----------------------------
 
1353
# Add leading comment marks to the start of each line, and a trailing
 
1354
# full-stop to the whole comment if one is not present already.
 
1355
m4_define([_LT_FORMAT_COMMENT],
 
1356
[m4_ifval([$1], [
 
1357
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
 
1358
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
 
1359
)])
 
1360
 
 
1361
 
 
1362
 
 
1363
 
 
1364
 
 
1365
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
 
1366
# -------------------------------------------------------------------
 
1367
# CONFIGNAME is the name given to the value in the libtool script.
 
1368
# VARNAME is the (base) name used in the configure script.
 
1369
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
 
1370
# VARNAME.  Any other value will be used directly.
 
1371
m4_define([_LT_DECL],
 
1372
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
 
1373
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
 
1374
        [m4_ifval([$1], [$1], [$2])])
 
1375
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
 
1376
    m4_ifval([$4],
 
1377
        [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
 
1378
    lt_dict_add_subkey([lt_decl_dict], [$2],
 
1379
        [tagged?], [m4_ifval([$5], [yes], [no])])])
 
1380
])
 
1381
 
 
1382
 
 
1383
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
 
1384
# --------------------------------------------------------
 
1385
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
 
1386
 
 
1387
 
 
1388
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
 
1389
# ------------------------------------------------
 
1390
m4_define([lt_decl_tag_varnames],
 
1391
[_lt_decl_filter([tagged?], [yes], $@)])
 
1392
 
 
1393
 
 
1394
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
 
1395
# ---------------------------------------------------------
 
1396
m4_define([_lt_decl_filter],
 
1397
[m4_case([$#],
 
1398
  [0], [m4_fatal([$0: too few arguments: $#])],
 
1399
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
 
1400
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
 
1401
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
 
1402
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
 
1403
])
 
1404
 
 
1405
 
 
1406
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
 
1407
# --------------------------------------------------
 
1408
m4_define([lt_decl_quote_varnames],
 
1409
[_lt_decl_filter([value], [1], $@)])
 
1410
 
 
1411
 
 
1412
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
 
1413
# ---------------------------------------------------
 
1414
m4_define([lt_decl_dquote_varnames],
 
1415
[_lt_decl_filter([value], [2], $@)])
 
1416
 
 
1417
 
 
1418
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
 
1419
# ---------------------------------------------------
 
1420
m4_define([lt_decl_varnames_tagged],
 
1421
[m4_assert([$# <= 2])dnl
 
1422
_$0(m4_quote(m4_default([$1], [[, ]])),
 
1423
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
 
1424
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
 
1425
m4_define([_lt_decl_varnames_tagged],
 
1426
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
 
1427
 
 
1428
 
 
1429
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
 
1430
# ------------------------------------------------
 
1431
m4_define([lt_decl_all_varnames],
 
1432
[_$0(m4_quote(m4_default([$1], [[, ]])),
 
1433
     m4_if([$2], [],
 
1434
           m4_quote(lt_decl_varnames),
 
1435
        m4_quote(m4_shift($@))))[]dnl
 
1436
])
 
1437
m4_define([_lt_decl_all_varnames],
 
1438
[lt_join($@, lt_decl_varnames_tagged([$1],
 
1439
                        lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
 
1440
])
 
1441
 
 
1442
 
 
1443
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
 
1444
# ------------------------------------
 
1445
# Quote a variable value, and forward it to `config.status' so that its
 
1446
# declaration there will have the same value as in `configure'.  VARNAME
 
1447
# must have a single quote delimited value for this to work.
 
1448
m4_define([_LT_CONFIG_STATUS_DECLARE],
 
1449
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
 
1450
 
 
1451
 
 
1452
# _LT_CONFIG_STATUS_DECLARATIONS
 
1453
# ------------------------------
 
1454
# We delimit libtool config variables with single quotes, so when
 
1455
# we write them to config.status, we have to be sure to quote all
 
1456
# embedded single quotes properly.  In configure, this macro expands
 
1457
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
 
1458
#
 
1459
#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
 
1460
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 
1461
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
 
1462
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
 
1463
 
 
1464
 
 
1465
# _LT_LIBTOOL_TAGS
 
1466
# ----------------
 
1467
# Output comment and list of tags supported by the script
 
1468
m4_defun([_LT_LIBTOOL_TAGS],
 
1469
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
 
1470
available_tags="_LT_TAGS"dnl
 
1471
])
 
1472
 
 
1473
 
 
1474
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
 
1475
# -----------------------------------
 
1476
# Extract the dictionary values for VARNAME (optionally with TAG) and
 
1477
# expand to a commented shell variable setting:
 
1478
#
 
1479
#    # Some comment about what VAR is for.
 
1480
#    visible_name=$lt_internal_name
 
1481
m4_define([_LT_LIBTOOL_DECLARE],
 
1482
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
 
1483
                                           [description])))[]dnl
 
1484
m4_pushdef([_libtool_name],
 
1485
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
 
1486
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
 
1487
    [0], [_libtool_name=[$]$1],
 
1488
    [1], [_libtool_name=$lt_[]$1],
 
1489
    [2], [_libtool_name=$lt_[]$1],
 
1490
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
 
1491
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
 
1492
])
 
1493
 
 
1494
 
 
1495
# _LT_LIBTOOL_CONFIG_VARS
 
1496
# -----------------------
 
1497
# Produce commented declarations of non-tagged libtool config variables
 
1498
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
 
1499
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
 
1500
# section) are produced by _LT_LIBTOOL_TAG_VARS.
 
1501
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
 
1502
[m4_foreach([_lt_var],
 
1503
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
 
1504
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
 
1505
 
 
1506
 
 
1507
# _LT_LIBTOOL_TAG_VARS(TAG)
 
1508
# -------------------------
 
1509
m4_define([_LT_LIBTOOL_TAG_VARS],
 
1510
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
 
1511
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
 
1512
 
 
1513
 
 
1514
# _LT_TAGVAR(VARNAME, [TAGNAME])
 
1515
# ------------------------------
 
1516
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
 
1517
 
 
1518
 
 
1519
# _LT_CONFIG_COMMANDS
 
1520
# -------------------
 
1521
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
 
1522
# variables for single and double quote escaping we saved from calls
 
1523
# to _LT_DECL, we can put quote escaped variables declarations
 
1524
# into `config.status', and then the shell code to quote escape them in
 
1525
# for loops in `config.status'.  Finally, any additional code accumulated
 
1526
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
 
1527
m4_defun([_LT_CONFIG_COMMANDS],
 
1528
[AC_PROVIDE_IFELSE([LT_OUTPUT],
 
1529
        dnl If the libtool generation code has been placed in $CONFIG_LT,
 
1530
        dnl instead of duplicating it all over again into config.status,
 
1531
        dnl then we will have config.status run $CONFIG_LT later, so it
 
1532
        dnl needs to know what name is stored there:
 
1533
        [AC_CONFIG_COMMANDS([libtool],
 
1534
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
 
1535
    dnl If the libtool generation code is destined for config.status,
 
1536
    dnl expand the accumulated commands and init code now:
 
1537
    [AC_CONFIG_COMMANDS([libtool],
 
1538
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
 
1539
])#_LT_CONFIG_COMMANDS
 
1540
 
 
1541
 
 
1542
# Initialize.
 
1543
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
 
1544
[
 
1545
 
 
1546
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
1547
# if CDPATH is set.
 
1548
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
1549
 
 
1550
sed_quote_subst='$sed_quote_subst'
 
1551
double_quote_subst='$double_quote_subst'
 
1552
delay_variable_subst='$delay_variable_subst'
 
1553
_LT_CONFIG_STATUS_DECLARATIONS
 
1554
LTCC='$LTCC'
 
1555
LTCFLAGS='$LTCFLAGS'
 
1556
compiler='$compiler_DEFAULT'
 
1557
 
 
1558
# A function that is used when there is no print builtin or printf.
 
1559
func_fallback_echo ()
 
1560
{
 
1561
  eval 'cat <<_LTECHO_EOF
 
1562
\$[]1
 
1563
_LTECHO_EOF'
 
1564
}
 
1565
 
 
1566
# Quote evaled strings.
 
1567
for var in lt_decl_all_varnames([[ \
 
1568
]], lt_decl_quote_varnames); do
 
1569
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
 
1570
    *[[\\\\\\\`\\"\\\$]]*)
 
1571
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
 
1572
      ;;
 
1573
    *)
 
1574
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
 
1575
      ;;
 
1576
    esac
 
1577
done
 
1578
 
 
1579
# Double-quote double-evaled strings.
 
1580
for var in lt_decl_all_varnames([[ \
 
1581
]], lt_decl_dquote_varnames); do
 
1582
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
 
1583
    *[[\\\\\\\`\\"\\\$]]*)
 
1584
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
 
1585
      ;;
 
1586
    *)
 
1587
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
 
1588
      ;;
 
1589
    esac
 
1590
done
 
1591
 
 
1592
_LT_OUTPUT_LIBTOOL_INIT
 
1593
])
 
1594
 
 
1595
# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
 
1596
# ------------------------------------
 
1597
# Generate a child script FILE with all initialization necessary to
 
1598
# reuse the environment learned by the parent script, and make the
 
1599
# file executable.  If COMMENT is supplied, it is inserted after the
 
1600
# `#!' sequence but before initialization text begins.  After this
 
1601
# macro, additional text can be appended to FILE to form the body of
 
1602
# the child script.  The macro ends with non-zero status if the
 
1603
# file could not be fully written (such as if the disk is full).
 
1604
m4_ifdef([AS_INIT_GENERATED],
 
1605
[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
 
1606
[m4_defun([_LT_GENERATED_FILE_INIT],
 
1607
[m4_require([AS_PREPARE])]dnl
 
1608
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
 
1609
[lt_write_fail=0
 
1610
cat >$1 <<_ASEOF || lt_write_fail=1
 
1611
#! $SHELL
 
1612
# Generated by $as_me.
 
1613
$2
 
1614
SHELL=\${CONFIG_SHELL-$SHELL}
 
1615
export SHELL
 
1616
_ASEOF
 
1617
cat >>$1 <<\_ASEOF || lt_write_fail=1
 
1618
AS_SHELL_SANITIZE
 
1619
_AS_PREPARE
 
1620
exec AS_MESSAGE_FD>&1
 
1621
_ASEOF
 
1622
test $lt_write_fail = 0 && chmod +x $1[]dnl
 
1623
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
1624
 
 
1625
# LT_OUTPUT
 
1626
# ---------
 
1627
# This macro allows early generation of the libtool script (before
 
1628
# AC_OUTPUT is called), incase it is used in configure for compilation
 
1629
# tests.
 
1630
AC_DEFUN([LT_OUTPUT],
 
1631
[: ${CONFIG_LT=./config.lt}
 
1632
AC_MSG_NOTICE([creating $CONFIG_LT])
 
1633
_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
 
1634
[# Run this file to recreate a libtool stub with the current configuration.])
 
1635
 
 
1636
cat >>"$CONFIG_LT" <<\_LTEOF
 
1637
lt_cl_silent=false
 
1638
exec AS_MESSAGE_LOG_FD>>config.log
 
1639
{
 
1640
  echo
 
1641
  AS_BOX([Running $as_me.])
 
1642
} >&AS_MESSAGE_LOG_FD
 
1643
 
 
1644
lt_cl_help="\
 
1645
\`$as_me' creates a local libtool stub from the current configuration,
 
1646
for use in further configure time tests before the real libtool is
 
1647
generated.
 
1648
 
 
1649
Usage: $[0] [[OPTIONS]]
 
1650
 
 
1651
  -h, --help      print this help, then exit
 
1652
  -V, --version   print version number, then exit
 
1653
  -q, --quiet     do not print progress messages
 
1654
  -d, --debug     don't remove temporary files
 
1655
 
 
1656
Report bugs to <bug-libtool@gnu.org>."
 
1657
 
 
1658
lt_cl_version="\
 
1659
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 
1660
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 
1661
configured by $[0], generated by m4_PACKAGE_STRING.
 
1662
 
 
1663
Copyright (C) 2010 Free Software Foundation, Inc.
 
1664
This config.lt script is free software; the Free Software Foundation
 
1665
gives unlimited permision to copy, distribute and modify it."
 
1666
 
 
1667
while test $[#] != 0
 
1668
do
 
1669
  case $[1] in
 
1670
    --version | --v* | -V )
 
1671
      echo "$lt_cl_version"; exit 0 ;;
 
1672
    --help | --h* | -h )
 
1673
      echo "$lt_cl_help"; exit 0 ;;
 
1674
    --debug | --d* | -d )
 
1675
      debug=: ;;
 
1676
    --quiet | --q* | --silent | --s* | -q )
 
1677
      lt_cl_silent=: ;;
 
1678
 
 
1679
    -*) AC_MSG_ERROR([unrecognized option: $[1]
 
1680
Try \`$[0] --help' for more information.]) ;;
 
1681
 
 
1682
    *) AC_MSG_ERROR([unrecognized argument: $[1]
 
1683
Try \`$[0] --help' for more information.]) ;;
 
1684
  esac
 
1685
  shift
 
1686
done
 
1687
 
 
1688
if $lt_cl_silent; then
 
1689
  exec AS_MESSAGE_FD>/dev/null
 
1690
fi
 
1691
_LTEOF
 
1692
 
 
1693
cat >>"$CONFIG_LT" <<_LTEOF
 
1694
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
 
1695
_LTEOF
 
1696
 
 
1697
cat >>"$CONFIG_LT" <<\_LTEOF
 
1698
AC_MSG_NOTICE([creating $ofile])
 
1699
_LT_OUTPUT_LIBTOOL_COMMANDS
 
1700
AS_EXIT(0)
 
1701
_LTEOF
 
1702
chmod +x "$CONFIG_LT"
 
1703
 
 
1704
# configure is writing to config.log, but config.lt does its own redirection,
 
1705
# appending to config.log, which fails on DOS, as config.log is still kept
 
1706
# open by configure.  Here we exec the FD to /dev/null, effectively closing
 
1707
# config.log, so it can be properly (re)opened and appended to by config.lt.
 
1708
lt_cl_success=:
 
1709
test "$silent" = yes &&
 
1710
  lt_config_lt_args="$lt_config_lt_args --quiet"
 
1711
exec AS_MESSAGE_LOG_FD>/dev/null
 
1712
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
 
1713
exec AS_MESSAGE_LOG_FD>>config.log
 
1714
$lt_cl_success || AS_EXIT(1)
 
1715
])# LT_OUTPUT
 
1716
 
 
1717
 
 
1718
# _LT_CONFIG(TAG)
 
1719
# ---------------
 
1720
# If TAG is the built-in tag, create an initial libtool script with a
 
1721
# default configuration from the untagged config vars.  Otherwise add code
 
1722
# to config.status for appending the configuration named by TAG from the
 
1723
# matching tagged config vars.
 
1724
m4_defun([_LT_CONFIG],
 
1725
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
1726
_LT_CONFIG_SAVE_COMMANDS([
 
1727
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
 
1728
  m4_if(_LT_TAG, [C], [
 
1729
    # See if we are running on zsh, and set the options which allow our
 
1730
    # commands through without removal of \ escapes.
 
1731
    if test -n "${ZSH_VERSION+set}" ; then
 
1732
      setopt NO_GLOB_SUBST
 
1733
    fi
 
1734
 
 
1735
    cfgfile="${ofile}T"
 
1736
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
 
1737
    $RM "$cfgfile"
 
1738
 
 
1739
    cat <<_LT_EOF >> "$cfgfile"
 
1740
#! $SHELL
 
1741
 
 
1742
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
1743
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
 
1744
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
1745
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
1746
#
 
1747
_LT_COPYING
 
1748
_LT_LIBTOOL_TAGS
 
1749
 
 
1750
# ### BEGIN LIBTOOL CONFIG
 
1751
_LT_LIBTOOL_CONFIG_VARS
 
1752
_LT_LIBTOOL_TAG_VARS
 
1753
# ### END LIBTOOL CONFIG
 
1754
 
 
1755
_LT_EOF
 
1756
 
 
1757
  case $host_os in
 
1758
  aix3*)
 
1759
    cat <<\_LT_EOF >> "$cfgfile"
 
1760
# AIX sometimes has problems with the GCC collect2 program.  For some
 
1761
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
1762
# vanish in a puff of smoke.
 
1763
if test "X${COLLECT_NAMES+set}" != Xset; then
 
1764
  COLLECT_NAMES=
 
1765
  export COLLECT_NAMES
 
1766
fi
 
1767
_LT_EOF
 
1768
    ;;
 
1769
  esac
 
1770
 
 
1771
  _LT_PROG_LTMAIN
 
1772
 
 
1773
  # We use sed instead of cat because bash on DJGPP gets confused if
 
1774
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
1775
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
1776
  # is reportedly fixed, but why not run on old versions too?
 
1777
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
 
1778
    || (rm -f "$cfgfile"; exit 1)
 
1779
 
 
1780
  _LT_PROG_XSI_SHELLFNS
 
1781
 
 
1782
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
 
1783
    || (rm -f "$cfgfile"; exit 1)
 
1784
 
 
1785
  mv -f "$cfgfile" "$ofile" ||
 
1786
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
1787
  chmod +x "$ofile"
 
1788
],
 
1789
[cat <<_LT_EOF >> "$ofile"
 
1790
 
 
1791
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
 
1792
dnl in a comment (ie after a #).
 
1793
# ### BEGIN LIBTOOL TAG CONFIG: $1
 
1794
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
 
1795
# ### END LIBTOOL TAG CONFIG: $1
 
1796
_LT_EOF
 
1797
])dnl /m4_if
 
1798
],
 
1799
[m4_if([$1], [], [
 
1800
    PACKAGE='$PACKAGE'
 
1801
    VERSION='$VERSION'
 
1802
    TIMESTAMP='$TIMESTAMP'
 
1803
    RM='$RM'
 
1804
    ofile='$ofile'], [])
 
1805
])dnl /_LT_CONFIG_SAVE_COMMANDS
 
1806
])# _LT_CONFIG
 
1807
 
 
1808
 
 
1809
# LT_SUPPORTED_TAG(TAG)
 
1810
# ---------------------
 
1811
# Trace this macro to discover what tags are supported by the libtool
 
1812
# --tag option, using:
 
1813
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
 
1814
AC_DEFUN([LT_SUPPORTED_TAG], [])
 
1815
 
 
1816
 
 
1817
# C support is built-in for now
 
1818
m4_define([_LT_LANG_C_enabled], [])
 
1819
m4_define([_LT_TAGS], [])
 
1820
 
 
1821
 
 
1822
# LT_LANG(LANG)
 
1823
# -------------
 
1824
# Enable libtool support for the given language if not already enabled.
 
1825
AC_DEFUN([LT_LANG],
 
1826
[AC_BEFORE([$0], [LT_OUTPUT])dnl
 
1827
m4_case([$1],
 
1828
  [C],                  [_LT_LANG(C)],
 
1829
  [C++],                [_LT_LANG(CXX)],
 
1830
  [Java],               [_LT_LANG(GCJ)],
 
1831
  [Fortran 77],         [_LT_LANG(F77)],
 
1832
  [Fortran],            [_LT_LANG(FC)],
 
1833
  [Windows Resource],   [_LT_LANG(RC)],
 
1834
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
 
1835
    [_LT_LANG($1)],
 
1836
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
 
1837
])# LT_LANG
 
1838
 
 
1839
 
 
1840
# _LT_LANG(LANGNAME)
 
1841
# ------------------
 
1842
m4_defun([_LT_LANG],
 
1843
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
 
1844
  [LT_SUPPORTED_TAG([$1])dnl
 
1845
  m4_append([_LT_TAGS], [$1 ])dnl
 
1846
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
 
1847
  _LT_LANG_$1_CONFIG($1)])dnl
 
1848
])# _LT_LANG
 
1849
 
 
1850
 
 
1851
# _LT_LANG_DEFAULT_CONFIG
 
1852
# -----------------------
 
1853
m4_defun([_LT_LANG_DEFAULT_CONFIG],
 
1854
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
1855
  [LT_LANG(CXX)],
 
1856
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
 
1857
 
 
1858
AC_PROVIDE_IFELSE([AC_PROG_F77],
 
1859
  [LT_LANG(F77)],
 
1860
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
 
1861
 
 
1862
AC_PROVIDE_IFELSE([AC_PROG_FC],
 
1863
  [LT_LANG(FC)],
 
1864
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
 
1865
 
 
1866
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
 
1867
dnl pulling things in needlessly.
 
1868
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
1869
  [LT_LANG(GCJ)],
 
1870
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
1871
    [LT_LANG(GCJ)],
 
1872
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
 
1873
      [LT_LANG(GCJ)],
 
1874
      [m4_ifdef([AC_PROG_GCJ],
 
1875
        [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
 
1876
       m4_ifdef([A][M_PROG_GCJ],
 
1877
        [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
 
1878
       m4_ifdef([LT_PROG_GCJ],
 
1879
        [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
1880
 
 
1881
AC_PROVIDE_IFELSE([LT_PROG_RC],
 
1882
  [LT_LANG(RC)],
 
1883
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
 
1884
])# _LT_LANG_DEFAULT_CONFIG
 
1885
 
 
1886
# Obsolete macros:
 
1887
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 
1888
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 
1889
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
 
1890
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
 
1891
AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
 
1892
dnl aclocal-1.4 backwards compatibility:
 
1893
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
 
1894
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
 
1895
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
 
1896
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
 
1897
dnl AC_DEFUN([AC_LIBTOOL_RC], [])
 
1898
 
 
1899
 
 
1900
# _LT_TAG_COMPILER
 
1901
# ----------------
 
1902
m4_defun([_LT_TAG_COMPILER],
 
1903
[AC_REQUIRE([AC_PROG_CC])dnl
 
1904
 
 
1905
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
 
1906
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
 
1907
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
 
1908
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
 
1909
 
 
1910
# If no C compiler was specified, use CC.
 
1911
LTCC=${LTCC-"$CC"}
 
1912
 
 
1913
# If no C compiler flags were specified, use CFLAGS.
 
1914
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
1915
 
 
1916
# Allow CC to be a program name with arguments.
 
1917
compiler=$CC
 
1918
])# _LT_TAG_COMPILER
 
1919
 
 
1920
 
 
1921
# _LT_COMPILER_BOILERPLATE
 
1922
# ------------------------
 
1923
# Check for compiler boilerplate output or warnings with
 
1924
# the simple compiler test code.
 
1925
m4_defun([_LT_COMPILER_BOILERPLATE],
 
1926
[m4_require([_LT_DECL_SED])dnl
 
1927
ac_outfile=conftest.$ac_objext
 
1928
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
 
1929
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
1930
_lt_compiler_boilerplate=`cat conftest.err`
 
1931
$RM conftest*
 
1932
])# _LT_COMPILER_BOILERPLATE
 
1933
 
 
1934
 
 
1935
# _LT_LINKER_BOILERPLATE
 
1936
# ----------------------
 
1937
# Check for linker boilerplate output or warnings with
 
1938
# the simple link test code.
 
1939
m4_defun([_LT_LINKER_BOILERPLATE],
 
1940
[m4_require([_LT_DECL_SED])dnl
 
1941
ac_outfile=conftest.$ac_objext
 
1942
echo "$lt_simple_link_test_code" >conftest.$ac_ext
 
1943
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
1944
_lt_linker_boilerplate=`cat conftest.err`
 
1945
$RM -r conftest*
 
1946
])# _LT_LINKER_BOILERPLATE
 
1947
 
 
1948
# _LT_REQUIRED_DARWIN_CHECKS
 
1949
# -------------------------
 
1950
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 
1951
  case $host_os in
 
1952
    rhapsody* | darwin*)
 
1953
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
 
1954
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
 
1955
    AC_CHECK_TOOL([LIPO], [lipo], [:])
 
1956
    AC_CHECK_TOOL([OTOOL], [otool], [:])
 
1957
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
 
1958
    _LT_DECL([], [DSYMUTIL], [1],
 
1959
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
 
1960
    _LT_DECL([], [NMEDIT], [1],
 
1961
      [Tool to change global to local symbols on Mac OS X])
 
1962
    _LT_DECL([], [LIPO], [1],
 
1963
      [Tool to manipulate fat objects and archives on Mac OS X])
 
1964
    _LT_DECL([], [OTOOL], [1],
 
1965
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
 
1966
    _LT_DECL([], [OTOOL64], [1],
 
1967
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
 
1968
 
 
1969
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
 
1970
      [lt_cv_apple_cc_single_mod=no
 
1971
      if test -z "${LT_MULTI_MODULE}"; then
 
1972
        # By default we will add the -single_module flag. You can override
 
1973
        # by either setting the environment variable LT_MULTI_MODULE
 
1974
        # non-empty at configure time, or by adding -multi_module to the
 
1975
        # link flags.
 
1976
        rm -rf libconftest.dylib*
 
1977
        echo "int foo(void){return 1;}" > conftest.c
 
1978
        echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 
1979
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
 
1980
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 
1981
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
 
1982
        _lt_result=$?
 
1983
        if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
 
1984
          lt_cv_apple_cc_single_mod=yes
 
1985
        else
 
1986
          cat conftest.err >&AS_MESSAGE_LOG_FD
 
1987
        fi
 
1988
        rm -rf libconftest.dylib*
 
1989
        rm -f conftest.*
 
1990
      fi])
 
1991
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
 
1992
      [lt_cv_ld_exported_symbols_list],
 
1993
      [lt_cv_ld_exported_symbols_list=no
 
1994
      save_LDFLAGS=$LDFLAGS
 
1995
      echo "_main" > conftest.sym
 
1996
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
 
1997
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
1998
        [lt_cv_ld_exported_symbols_list=yes],
 
1999
        [lt_cv_ld_exported_symbols_list=no])
 
2000
        LDFLAGS="$save_LDFLAGS"
 
2001
    ])
 
2002
    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
 
2003
      [lt_cv_ld_force_load=no
 
2004
      cat > conftest.c << _LT_EOF
 
2005
int forced_loaded() { return 2;}
 
2006
_LT_EOF
 
2007
      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
 
2008
      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
 
2009
      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
 
2010
      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
 
2011
      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
 
2012
      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
 
2013
      cat > conftest.c << _LT_EOF
 
2014
int main() { return 0;}
 
2015
_LT_EOF
 
2016
      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
 
2017
      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
 
2018
      _lt_result=$?
 
2019
      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
 
2020
        lt_cv_ld_force_load=yes
 
2021
      else
 
2022
        cat conftest.err >&AS_MESSAGE_LOG_FD
 
2023
      fi
 
2024
        rm -f conftest.err libconftest.a conftest conftest.c
 
2025
        rm -rf conftest.dSYM
 
2026
    ])
 
2027
    case $host_os in
 
2028
    rhapsody* | darwin1.[[012]])
 
2029
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
 
2030
    darwin1.*)
 
2031
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
2032
    darwin*) # darwin 5.x on
 
2033
      # if running on 10.5 or later, the deployment target defaults
 
2034
      # to the OS version, if on x86, and 10.4, the deployment
 
2035
      # target defaults to 10.4. Don't you love it?
 
2036
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 
2037
        10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
 
2038
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
2039
        10.[[012]]*)
 
2040
          _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
2041
        10.*)
 
2042
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
2043
      esac
 
2044
    ;;
 
2045
  esac
 
2046
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
 
2047
      _lt_dar_single_mod='$single_module'
 
2048
    fi
 
2049
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
 
2050
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
 
2051
    else
 
2052
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
2053
    fi
 
2054
    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
 
2055
      _lt_dsymutil='~$DSYMUTIL $lib || :'
 
2056
    else
 
2057
      _lt_dsymutil=
 
2058
    fi
 
2059
    ;;
 
2060
  esac
 
2061
])
 
2062
 
 
2063
 
 
2064
# _LT_DARWIN_LINKER_FEATURES
 
2065
# --------------------------
 
2066
# Checks for linker and compiler features on darwin
 
2067
m4_defun([_LT_DARWIN_LINKER_FEATURES],
 
2068
[
 
2069
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
 
2070
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
2071
  _LT_TAGVAR(hardcode_direct, $1)=no
 
2072
  _LT_TAGVAR(hardcode_automatic, $1)=yes
 
2073
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
2074
  if test "$lt_cv_ld_force_load" = "yes"; then
 
2075
    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
 
2076
  else
 
2077
    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
 
2078
  fi
 
2079
  _LT_TAGVAR(link_all_deplibs, $1)=yes
 
2080
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
 
2081
  case $cc_basename in
 
2082
     ifort*) _lt_dar_can_shared=yes ;;
 
2083
     *) _lt_dar_can_shared=$GCC ;;
 
2084
  esac
 
2085
  if test "$_lt_dar_can_shared" = "yes"; then
 
2086
    output_verbose_link_cmd=func_echo_all
 
2087
    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
 
2088
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
 
2089
    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
 
2090
    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
2091
    m4_if([$1], [CXX],
 
2092
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
 
2093
      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
 
2094
      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
 
2095
    fi
 
2096
],[])
 
2097
  else
 
2098
  _LT_TAGVAR(ld_shlibs, $1)=no
 
2099
  fi
 
2100
])
 
2101
 
 
2102
# _LT_SYS_MODULE_PATH_AIX
 
2103
# -----------------------
 
2104
# Links a minimal program and checks the executable
 
2105
# for the system default hardcoded library path. In most cases,
 
2106
# this is /usr/lib:/lib, but when the MPI compilers are used
 
2107
# the location of the communication and MPI libs are included too.
 
2108
# If we don't find anything, use the default library path according
 
2109
# to the aix ld manual.
 
2110
m4_defun([_LT_SYS_MODULE_PATH_AIX],
 
2111
[m4_require([_LT_DECL_SED])dnl
 
2112
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
2113
lt_aix_libpath_sed='
 
2114
    /Import File Strings/,/^$/ {
 
2115
        /^0/ {
 
2116
            s/^0  *\(.*\)$/\1/
 
2117
            p
 
2118
        }
 
2119
    }'
 
2120
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
2121
# Check for a 64-bit object if we didn't find anything.
 
2122
if test -z "$aix_libpath"; then
 
2123
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
2124
fi],[])
 
2125
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
2126
])# _LT_SYS_MODULE_PATH_AIX
 
2127
 
 
2128
 
 
2129
# _LT_SHELL_INIT(ARG)
 
2130
# -------------------
 
2131
m4_define([_LT_SHELL_INIT],
 
2132
[m4_divert_text([M4SH-INIT], [$1
 
2133
])])# _LT_SHELL_INIT
 
2134
 
 
2135
 
 
2136
 
 
2137
# _LT_PROG_ECHO_BACKSLASH
 
2138
# -----------------------
 
2139
# Find how we can fake an echo command that does not interpret backslash.
 
2140
# In particular, with Autoconf 2.60 or later we add some code to the start
 
2141
# of the generated configure script which will find a shell with a builtin
 
2142
# printf (which we can use as an echo command).
 
2143
m4_defun([_LT_PROG_ECHO_BACKSLASH],
 
2144
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 
2145
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 
2146
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
2147
 
 
2148
AC_MSG_CHECKING([how to print strings])
 
2149
# Test print first, because it will be a builtin if present.
 
2150
if test "X`print -r -- -n 2>/dev/null`" = X-n && \
 
2151
   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
 
2152
  ECHO='print -r --'
 
2153
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
 
2154
  ECHO='printf %s\n'
 
2155
else
 
2156
  # Use this function as a fallback that always works.
 
2157
  func_fallback_echo ()
 
2158
  {
 
2159
    eval 'cat <<_LTECHO_EOF
 
2160
$[]1
 
2161
_LTECHO_EOF'
 
2162
  }
 
2163
  ECHO='func_fallback_echo'
 
2164
fi
 
2165
 
 
2166
# func_echo_all arg...
 
2167
# Invoke $ECHO with all args, space-separated.
 
2168
func_echo_all ()
 
2169
{
 
2170
    $ECHO "$*" 
 
2171
}
 
2172
 
 
2173
case "$ECHO" in
 
2174
  printf*) AC_MSG_RESULT([printf]) ;;
 
2175
  print*) AC_MSG_RESULT([print -r]) ;;
 
2176
  *) AC_MSG_RESULT([cat]) ;;
 
2177
esac
 
2178
 
 
2179
m4_ifdef([_AS_DETECT_SUGGESTED],
 
2180
[_AS_DETECT_SUGGESTED([
 
2181
  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
 
2182
    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 
2183
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 
2184
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
2185
    PATH=/empty FPATH=/empty; export PATH FPATH
 
2186
    test "X`printf %s $ECHO`" = "X$ECHO" \
 
2187
      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
 
2188
 
 
2189
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
 
2190
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 
2191
])# _LT_PROG_ECHO_BACKSLASH
 
2192
 
 
2193
 
 
2194
# _LT_ENABLE_LOCK
 
2195
# ---------------
 
2196
m4_defun([_LT_ENABLE_LOCK],
 
2197
[AC_ARG_ENABLE([libtool-lock],
 
2198
  [AS_HELP_STRING([--disable-libtool-lock],
 
2199
    [avoid locking (might break parallel builds)])])
 
2200
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
2201
 
 
2202
# Some flags need to be propagated to the compiler or linker for good
 
2203
# libtool support.
 
2204
case $host in
 
2205
ia64-*-hpux*)
 
2206
  # Find out which ABI we are using.
 
2207
  echo 'int i;' > conftest.$ac_ext
 
2208
  if AC_TRY_EVAL(ac_compile); then
 
2209
    case `/usr/bin/file conftest.$ac_objext` in
 
2210
      *ELF-32*)
 
2211
        HPUX_IA64_MODE="32"
 
2212
        ;;
 
2213
      *ELF-64*)
 
2214
        HPUX_IA64_MODE="64"
 
2215
        ;;
 
2216
    esac
 
2217
  fi
 
2218
  rm -rf conftest*
 
2219
  ;;
 
2220
*-*-irix6*)
 
2221
  # Find out which ABI we are using.
 
2222
  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
 
2223
  if AC_TRY_EVAL(ac_compile); then
 
2224
    if test "$lt_cv_prog_gnu_ld" = yes; then
 
2225
      case `/usr/bin/file conftest.$ac_objext` in
 
2226
        *32-bit*)
 
2227
          LD="${LD-ld} -melf32bsmip"
 
2228
          ;;
 
2229
        *N32*)
 
2230
          LD="${LD-ld} -melf32bmipn32"
 
2231
          ;;
 
2232
        *64-bit*)
 
2233
          LD="${LD-ld} -melf64bmip"
 
2234
        ;;
 
2235
      esac
 
2236
    else
 
2237
      case `/usr/bin/file conftest.$ac_objext` in
 
2238
        *32-bit*)
 
2239
          LD="${LD-ld} -32"
 
2240
          ;;
 
2241
        *N32*)
 
2242
          LD="${LD-ld} -n32"
 
2243
          ;;
 
2244
        *64-bit*)
 
2245
          LD="${LD-ld} -64"
 
2246
          ;;
 
2247
      esac
 
2248
    fi
 
2249
  fi
 
2250
  rm -rf conftest*
 
2251
  ;;
 
2252
 
 
2253
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
 
2254
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
2255
  # Find out which ABI we are using.
 
2256
  echo 'int i;' > conftest.$ac_ext
 
2257
  if AC_TRY_EVAL(ac_compile); then
 
2258
    case `/usr/bin/file conftest.o` in
 
2259
      *32-bit*)
 
2260
        case $host in
 
2261
          x86_64-*kfreebsd*-gnu)
 
2262
            LD="${LD-ld} -m elf_i386_fbsd"
 
2263
            ;;
 
2264
          x86_64-*linux*)
 
2265
            LD="${LD-ld} -m elf_i386"
 
2266
            ;;
 
2267
          ppc64-*linux*|powerpc64-*linux*)
 
2268
            LD="${LD-ld} -m elf32ppclinux"
 
2269
            ;;
 
2270
          s390x-*linux*)
 
2271
            LD="${LD-ld} -m elf_s390"
 
2272
            ;;
 
2273
          sparc64-*linux*)
 
2274
            LD="${LD-ld} -m elf32_sparc"
 
2275
            ;;
 
2276
        esac
 
2277
        ;;
 
2278
      *64-bit*)
 
2279
        case $host in
 
2280
          x86_64-*kfreebsd*-gnu)
 
2281
            LD="${LD-ld} -m elf_x86_64_fbsd"
 
2282
            ;;
 
2283
          x86_64-*linux*)
 
2284
            LD="${LD-ld} -m elf_x86_64"
 
2285
            ;;
 
2286
          ppc*-*linux*|powerpc*-*linux*)
 
2287
            LD="${LD-ld} -m elf64ppc"
 
2288
            ;;
 
2289
          s390*-*linux*|s390*-*tpf*)
 
2290
            LD="${LD-ld} -m elf64_s390"
 
2291
            ;;
 
2292
          sparc*-*linux*)
 
2293
            LD="${LD-ld} -m elf64_sparc"
 
2294
            ;;
 
2295
        esac
 
2296
        ;;
 
2297
    esac
 
2298
  fi
 
2299
  rm -rf conftest*
 
2300
  ;;
 
2301
 
 
2302
*-*-sco3.2v5*)
 
2303
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
2304
  SAVE_CFLAGS="$CFLAGS"
 
2305
  CFLAGS="$CFLAGS -belf"
 
2306
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
2307
    [AC_LANG_PUSH(C)
 
2308
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
2309
     AC_LANG_POP])
 
2310
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
2311
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
2312
    CFLAGS="$SAVE_CFLAGS"
 
2313
  fi
 
2314
  ;;
 
2315
sparc*-*solaris*)
 
2316
  # Find out which ABI we are using.
 
2317
  echo 'int i;' > conftest.$ac_ext
 
2318
  if AC_TRY_EVAL(ac_compile); then
 
2319
    case `/usr/bin/file conftest.o` in
 
2320
    *64-bit*)
 
2321
      case $lt_cv_prog_gnu_ld in
 
2322
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
 
2323
      *)
 
2324
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 
2325
          LD="${LD-ld} -64"
 
2326
        fi
 
2327
        ;;
 
2328
      esac
 
2329
      ;;
 
2330
    esac
 
2331
  fi
 
2332
  rm -rf conftest*
 
2333
  ;;
 
2334
esac
 
2335
 
 
2336
need_locks="$enable_libtool_lock"
 
2337
])# _LT_ENABLE_LOCK
 
2338
 
 
2339
 
 
2340
# _LT_CMD_OLD_ARCHIVE
 
2341
# -------------------
 
2342
m4_defun([_LT_CMD_OLD_ARCHIVE],
 
2343
[AC_CHECK_TOOL(AR, ar, false)
 
2344
test -z "$AR" && AR=ar
 
2345
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
2346
_LT_DECL([], [AR], [1], [The archiver])
 
2347
_LT_DECL([], [AR_FLAGS], [1])
 
2348
 
 
2349
AC_CHECK_TOOL(STRIP, strip, :)
 
2350
test -z "$STRIP" && STRIP=:
 
2351
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
 
2352
 
 
2353
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
2354
test -z "$RANLIB" && RANLIB=:
 
2355
_LT_DECL([], [RANLIB], [1],
 
2356
    [Commands used to install an old-style archive])
 
2357
 
 
2358
# Determine commands to create old-style static archives.
 
2359
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
 
2360
old_postinstall_cmds='chmod 644 $oldlib'
 
2361
old_postuninstall_cmds=
 
2362
 
 
2363
if test -n "$RANLIB"; then
 
2364
  case $host_os in
 
2365
  openbsd*)
 
2366
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
 
2367
    ;;
 
2368
  *)
 
2369
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
 
2370
    ;;
 
2371
  esac
 
2372
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
2373
fi
 
2374
 
 
2375
case $host_os in
 
2376
  darwin*)
 
2377
    lock_old_archive_extraction=yes ;;
 
2378
  *)
 
2379
    lock_old_archive_extraction=no ;;
 
2380
esac
 
2381
_LT_DECL([], [old_postinstall_cmds], [2])
 
2382
_LT_DECL([], [old_postuninstall_cmds], [2])
 
2383
_LT_TAGDECL([], [old_archive_cmds], [2],
 
2384
    [Commands used to build an old-style archive])
 
2385
_LT_DECL([], [lock_old_archive_extraction], [0],
 
2386
    [Whether to use a lock for old archive extraction])
 
2387
])# _LT_CMD_OLD_ARCHIVE
 
2388
 
 
2389
 
 
2390
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
2391
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
2392
# ----------------------------------------------------------------
 
2393
# Check whether the given compiler option works
 
2394
AC_DEFUN([_LT_COMPILER_OPTION],
 
2395
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2396
m4_require([_LT_DECL_SED])dnl
 
2397
AC_CACHE_CHECK([$1], [$2],
 
2398
  [$2=no
 
2399
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
2400
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
2401
   lt_compiler_flag="$3"
 
2402
   # Insert the option either (1) after the last *FLAGS variable, or
 
2403
   # (2) before a word containing "conftest.", or (3) at the end.
 
2404
   # Note that $ac_compile itself does not contain backslashes and begins
 
2405
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
2406
   # The option is referenced via a variable to avoid confusing sed.
 
2407
   lt_compile=`echo "$ac_compile" | $SED \
 
2408
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
2409
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
2410
   -e 's:$: $lt_compiler_flag:'`
 
2411
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
2412
   (eval "$lt_compile" 2>conftest.err)
 
2413
   ac_status=$?
 
2414
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
2415
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
2416
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
2417
     # The compiler can only warn and ignore the option if not recognized
 
2418
     # So say no if there are warnings other than the usual output.
 
2419
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
 
2420
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
2421
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
 
2422
       $2=yes
 
2423
     fi
 
2424
   fi
 
2425
   $RM conftest*
 
2426
])
 
2427
 
 
2428
if test x"[$]$2" = xyes; then
 
2429
    m4_if([$5], , :, [$5])
 
2430
else
 
2431
    m4_if([$6], , :, [$6])
 
2432
fi
 
2433
])# _LT_COMPILER_OPTION
 
2434
 
 
2435
# Old name:
 
2436
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
 
2437
dnl aclocal-1.4 backwards compatibility:
 
2438
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
 
2439
 
 
2440
 
 
2441
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
2442
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
 
2443
# ----------------------------------------------------
 
2444
# Check whether the given linker option works
 
2445
AC_DEFUN([_LT_LINKER_OPTION],
 
2446
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2447
m4_require([_LT_DECL_SED])dnl
 
2448
AC_CACHE_CHECK([$1], [$2],
 
2449
  [$2=no
 
2450
   save_LDFLAGS="$LDFLAGS"
 
2451
   LDFLAGS="$LDFLAGS $3"
 
2452
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
 
2453
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
2454
     # The linker can only warn and ignore the option if not recognized
 
2455
     # So say no if there are warnings
 
2456
     if test -s conftest.err; then
 
2457
       # Append any errors to the config.log.
 
2458
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
2459
       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
 
2460
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
2461
       if diff conftest.exp conftest.er2 >/dev/null; then
 
2462
         $2=yes
 
2463
       fi
 
2464
     else
 
2465
       $2=yes
 
2466
     fi
 
2467
   fi
 
2468
   $RM -r conftest*
 
2469
   LDFLAGS="$save_LDFLAGS"
 
2470
])
 
2471
 
 
2472
if test x"[$]$2" = xyes; then
 
2473
    m4_if([$4], , :, [$4])
 
2474
else
 
2475
    m4_if([$5], , :, [$5])
 
2476
fi
 
2477
])# _LT_LINKER_OPTION
 
2478
 
 
2479
# Old name:
 
2480
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
 
2481
dnl aclocal-1.4 backwards compatibility:
 
2482
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
 
2483
 
 
2484
 
 
2485
# LT_CMD_MAX_LEN
 
2486
#---------------
 
2487
AC_DEFUN([LT_CMD_MAX_LEN],
 
2488
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2489
# find the maximum length of command line arguments
 
2490
AC_MSG_CHECKING([the maximum length of command line arguments])
 
2491
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
2492
  i=0
 
2493
  teststring="ABCD"
 
2494
 
 
2495
  case $build_os in
 
2496
  msdosdjgpp*)
 
2497
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
2498
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
2499
    # during glob expansion).  Even if it were fixed, the result of this
 
2500
    # check would be larger than it should be.
 
2501
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
2502
    ;;
 
2503
 
 
2504
  gnu*)
 
2505
    # Under GNU Hurd, this test is not required because there is
 
2506
    # no limit to the length of command line arguments.
 
2507
    # Libtool will interpret -1 as no limit whatsoever
 
2508
    lt_cv_sys_max_cmd_len=-1;
 
2509
    ;;
 
2510
 
 
2511
  cygwin* | mingw* | cegcc*)
 
2512
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
2513
    # about 5 minutes as the teststring grows exponentially.
 
2514
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
2515
    # you end up with a "frozen" computer, even though with patience
 
2516
    # the test eventually succeeds (with a max line length of 256k).
 
2517
    # Instead, let's just punt: use the minimum linelength reported by
 
2518
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
2519
    lt_cv_sys_max_cmd_len=8192;
 
2520
    ;;
 
2521
 
 
2522
  mint*)
 
2523
    # On MiNT this can take a long time and run out of memory.
 
2524
    lt_cv_sys_max_cmd_len=8192;
 
2525
    ;;
 
2526
 
 
2527
  amigaos*)
 
2528
    # On AmigaOS with pdksh, this test takes hours, literally.
 
2529
    # So we just punt and use a minimum line length of 8192.
 
2530
    lt_cv_sys_max_cmd_len=8192;
 
2531
    ;;
 
2532
 
 
2533
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
 
2534
    # This has been around since 386BSD, at least.  Likely further.
 
2535
    if test -x /sbin/sysctl; then
 
2536
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
2537
    elif test -x /usr/sbin/sysctl; then
 
2538
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
2539
    else
 
2540
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
 
2541
    fi
 
2542
    # And add a safety zone
 
2543
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
2544
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
2545
    ;;
 
2546
 
 
2547
  interix*)
 
2548
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
 
2549
    lt_cv_sys_max_cmd_len=196608
 
2550
    ;;
 
2551
 
 
2552
  osf*)
 
2553
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
 
2554
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
 
2555
    # nice to cause kernel panics so lets avoid the loop below.
 
2556
    # First set a reasonable default.
 
2557
    lt_cv_sys_max_cmd_len=16384
 
2558
    #
 
2559
    if test -x /sbin/sysconfig; then
 
2560
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
 
2561
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
 
2562
      esac
 
2563
    fi
 
2564
    ;;
 
2565
  sco3.2v5*)
 
2566
    lt_cv_sys_max_cmd_len=102400
 
2567
    ;;
 
2568
  sysv5* | sco5v6* | sysv4.2uw2*)
 
2569
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
 
2570
    if test -n "$kargmax"; then
 
2571
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
 
2572
    else
 
2573
      lt_cv_sys_max_cmd_len=32768
 
2574
    fi
 
2575
    ;;
 
2576
  *)
 
2577
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
 
2578
    if test -n "$lt_cv_sys_max_cmd_len"; then
 
2579
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
2580
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
2581
    else
 
2582
      # Make teststring a little bigger before we do anything with it.
 
2583
      # a 1K string should be a reasonable start.
 
2584
      for i in 1 2 3 4 5 6 7 8 ; do
 
2585
        teststring=$teststring$teststring
 
2586
      done
 
2587
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
2588
      # If test is not a shell built-in, we'll probably end up computing a
 
2589
      # maximum length that is only half of the actual maximum length, but
 
2590
      # we can't tell.
 
2591
      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
 
2592
                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
 
2593
              test $i != 17 # 1/2 MB should be enough
 
2594
      do
 
2595
        i=`expr $i + 1`
 
2596
        teststring=$teststring$teststring
 
2597
      done
 
2598
      # Only check the string length outside the loop.
 
2599
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
 
2600
      teststring=
 
2601
      # Add a significant safety factor because C++ compilers can tack on
 
2602
      # massive amounts of additional arguments before passing them to the
 
2603
      # linker.  It appears as though 1/2 is a usable value.
 
2604
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
2605
    fi
 
2606
    ;;
 
2607
  esac
 
2608
])
 
2609
if test -n $lt_cv_sys_max_cmd_len ; then
 
2610
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
2611
else
 
2612
  AC_MSG_RESULT(none)
 
2613
fi
 
2614
max_cmd_len=$lt_cv_sys_max_cmd_len
 
2615
_LT_DECL([], [max_cmd_len], [0],
 
2616
    [What is the maximum length of a command?])
 
2617
])# LT_CMD_MAX_LEN
 
2618
 
 
2619
# Old name:
 
2620
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
 
2621
dnl aclocal-1.4 backwards compatibility:
 
2622
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
 
2623
 
 
2624
 
 
2625
# _LT_HEADER_DLFCN
 
2626
# ----------------
 
2627
m4_defun([_LT_HEADER_DLFCN],
 
2628
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
 
2629
])# _LT_HEADER_DLFCN
 
2630
 
 
2631
 
 
2632
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
2633
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
2634
# ----------------------------------------------------------------
 
2635
m4_defun([_LT_TRY_DLOPEN_SELF],
 
2636
[m4_require([_LT_HEADER_DLFCN])dnl
 
2637
if test "$cross_compiling" = yes; then :
 
2638
  [$4]
 
2639
else
 
2640
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
2641
  lt_status=$lt_dlunknown
 
2642
  cat > conftest.$ac_ext <<_LT_EOF
 
2643
[#line $LINENO "configure"
 
2644
#include "confdefs.h"
 
2645
 
 
2646
#if HAVE_DLFCN_H
 
2647
#include <dlfcn.h>
 
2648
#endif
 
2649
 
 
2650
#include <stdio.h>
 
2651
 
 
2652
#ifdef RTLD_GLOBAL
 
2653
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
2654
#else
 
2655
#  ifdef DL_GLOBAL
 
2656
#    define LT_DLGLOBAL         DL_GLOBAL
 
2657
#  else
 
2658
#    define LT_DLGLOBAL         0
 
2659
#  endif
 
2660
#endif
 
2661
 
 
2662
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
2663
   find out it does not work in some platform. */
 
2664
#ifndef LT_DLLAZY_OR_NOW
 
2665
#  ifdef RTLD_LAZY
 
2666
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
2667
#  else
 
2668
#    ifdef DL_LAZY
 
2669
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
2670
#    else
 
2671
#      ifdef RTLD_NOW
 
2672
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
2673
#      else
 
2674
#        ifdef DL_NOW
 
2675
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
2676
#        else
 
2677
#          define LT_DLLAZY_OR_NOW      0
 
2678
#        endif
 
2679
#      endif
 
2680
#    endif
 
2681
#  endif
 
2682
#endif
 
2683
 
 
2684
/* When -fvisbility=hidden is used, assume the code has been annotated
 
2685
   correspondingly for the symbols needed.  */
 
2686
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 
2687
void fnord () __attribute__((visibility("default")));
 
2688
#endif
 
2689
 
 
2690
void fnord () { int i=42; }
 
2691
int main ()
 
2692
{
 
2693
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
2694
  int status = $lt_dlunknown;
 
2695
 
 
2696
  if (self)
 
2697
    {
 
2698
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
2699
      else
 
2700
        {
 
2701
          if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
 
2702
          else puts (dlerror ());
 
2703
        }
 
2704
      /* dlclose (self); */
 
2705
    }
 
2706
  else
 
2707
    puts (dlerror ());
 
2708
 
 
2709
  return status;
 
2710
}]
 
2711
_LT_EOF
 
2712
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
2713
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
 
2714
    lt_status=$?
 
2715
    case x$lt_status in
 
2716
      x$lt_dlno_uscore) $1 ;;
 
2717
      x$lt_dlneed_uscore) $2 ;;
 
2718
      x$lt_dlunknown|x*) $3 ;;
 
2719
    esac
 
2720
  else :
 
2721
    # compilation failed
 
2722
    $3
 
2723
  fi
 
2724
fi
 
2725
rm -fr conftest*
 
2726
])# _LT_TRY_DLOPEN_SELF
 
2727
 
 
2728
 
 
2729
# LT_SYS_DLOPEN_SELF
 
2730
# ------------------
 
2731
AC_DEFUN([LT_SYS_DLOPEN_SELF],
 
2732
[m4_require([_LT_HEADER_DLFCN])dnl
 
2733
if test "x$enable_dlopen" != xyes; then
 
2734
  enable_dlopen=unknown
 
2735
  enable_dlopen_self=unknown
 
2736
  enable_dlopen_self_static=unknown
 
2737
else
 
2738
  lt_cv_dlopen=no
 
2739
  lt_cv_dlopen_libs=
 
2740
 
 
2741
  case $host_os in
 
2742
  beos*)
 
2743
    lt_cv_dlopen="load_add_on"
 
2744
    lt_cv_dlopen_libs=
 
2745
    lt_cv_dlopen_self=yes
 
2746
    ;;
 
2747
 
 
2748
  mingw* | pw32* | cegcc*)
 
2749
    lt_cv_dlopen="LoadLibrary"
 
2750
    lt_cv_dlopen_libs=
 
2751
    ;;
 
2752
 
 
2753
  cygwin*)
 
2754
    lt_cv_dlopen="dlopen"
 
2755
    lt_cv_dlopen_libs=
 
2756
    ;;
 
2757
 
 
2758
  darwin*)
 
2759
  # if libdl is installed we need to link against it
 
2760
    AC_CHECK_LIB([dl], [dlopen],
 
2761
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
2762
    lt_cv_dlopen="dyld"
 
2763
    lt_cv_dlopen_libs=
 
2764
    lt_cv_dlopen_self=yes
 
2765
    ])
 
2766
    ;;
 
2767
 
 
2768
  *)
 
2769
    AC_CHECK_FUNC([shl_load],
 
2770
          [lt_cv_dlopen="shl_load"],
 
2771
      [AC_CHECK_LIB([dld], [shl_load],
 
2772
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
 
2773
        [AC_CHECK_FUNC([dlopen],
 
2774
              [lt_cv_dlopen="dlopen"],
 
2775
          [AC_CHECK_LIB([dl], [dlopen],
 
2776
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
2777
            [AC_CHECK_LIB([svld], [dlopen],
 
2778
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
2779
              [AC_CHECK_LIB([dld], [dld_link],
 
2780
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
 
2781
              ])
 
2782
            ])
 
2783
          ])
 
2784
        ])
 
2785
      ])
 
2786
    ;;
 
2787
  esac
 
2788
 
 
2789
  if test "x$lt_cv_dlopen" != xno; then
 
2790
    enable_dlopen=yes
 
2791
  else
 
2792
    enable_dlopen=no
 
2793
  fi
 
2794
 
 
2795
  case $lt_cv_dlopen in
 
2796
  dlopen)
 
2797
    save_CPPFLAGS="$CPPFLAGS"
 
2798
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
2799
 
 
2800
    save_LDFLAGS="$LDFLAGS"
 
2801
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
2802
 
 
2803
    save_LIBS="$LIBS"
 
2804
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
2805
 
 
2806
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
2807
          lt_cv_dlopen_self, [dnl
 
2808
          _LT_TRY_DLOPEN_SELF(
 
2809
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
2810
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
2811
    ])
 
2812
 
 
2813
    if test "x$lt_cv_dlopen_self" = xyes; then
 
2814
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
 
2815
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
2816
          lt_cv_dlopen_self_static, [dnl
 
2817
          _LT_TRY_DLOPEN_SELF(
 
2818
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
2819
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
2820
      ])
 
2821
    fi
 
2822
 
 
2823
    CPPFLAGS="$save_CPPFLAGS"
 
2824
    LDFLAGS="$save_LDFLAGS"
 
2825
    LIBS="$save_LIBS"
 
2826
    ;;
 
2827
  esac
 
2828
 
 
2829
  case $lt_cv_dlopen_self in
 
2830
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
2831
  *) enable_dlopen_self=unknown ;;
 
2832
  esac
 
2833
 
 
2834
  case $lt_cv_dlopen_self_static in
 
2835
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
2836
  *) enable_dlopen_self_static=unknown ;;
 
2837
  esac
 
2838
fi
 
2839
_LT_DECL([dlopen_support], [enable_dlopen], [0],
 
2840
         [Whether dlopen is supported])
 
2841
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
 
2842
         [Whether dlopen of programs is supported])
 
2843
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
 
2844
         [Whether dlopen of statically linked programs is supported])
 
2845
])# LT_SYS_DLOPEN_SELF
 
2846
 
 
2847
# Old name:
 
2848
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
 
2849
dnl aclocal-1.4 backwards compatibility:
 
2850
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
 
2851
 
 
2852
 
 
2853
# _LT_COMPILER_C_O([TAGNAME])
 
2854
# ---------------------------
 
2855
# Check to see if options -c and -o are simultaneously supported by compiler.
 
2856
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
 
2857
m4_defun([_LT_COMPILER_C_O],
 
2858
[m4_require([_LT_DECL_SED])dnl
 
2859
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2860
m4_require([_LT_TAG_COMPILER])dnl
 
2861
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
2862
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
2863
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
2864
   $RM -r conftest 2>/dev/null
 
2865
   mkdir conftest
 
2866
   cd conftest
 
2867
   mkdir out
 
2868
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
2869
 
 
2870
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
2871
   # Insert the option either (1) after the last *FLAGS variable, or
 
2872
   # (2) before a word containing "conftest.", or (3) at the end.
 
2873
   # Note that $ac_compile itself does not contain backslashes and begins
 
2874
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
2875
   lt_compile=`echo "$ac_compile" | $SED \
 
2876
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
2877
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
2878
   -e 's:$: $lt_compiler_flag:'`
 
2879
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
2880
   (eval "$lt_compile" 2>out/conftest.err)
 
2881
   ac_status=$?
 
2882
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
2883
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
2884
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
2885
   then
 
2886
     # The compiler can only warn and ignore the option if not recognized
 
2887
     # So say no if there are warnings
 
2888
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
 
2889
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
 
2890
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
 
2891
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
2892
     fi
 
2893
   fi
 
2894
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
 
2895
   $RM conftest*
 
2896
   # SGI C++ compiler will create directory out/ii_files/ for
 
2897
   # template instantiation
 
2898
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
 
2899
   $RM out/* && rmdir out
 
2900
   cd ..
 
2901
   $RM -r conftest
 
2902
   $RM conftest*
 
2903
])
 
2904
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
 
2905
        [Does compiler simultaneously support -c and -o options?])
 
2906
])# _LT_COMPILER_C_O
 
2907
 
 
2908
 
 
2909
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
 
2910
# ----------------------------------
 
2911
# Check to see if we can do hard links to lock some files if needed
 
2912
m4_defun([_LT_COMPILER_FILE_LOCKS],
 
2913
[m4_require([_LT_ENABLE_LOCK])dnl
 
2914
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2915
_LT_COMPILER_C_O([$1])
 
2916
 
 
2917
hard_links="nottested"
 
2918
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
2919
  # do not overwrite the value of need_locks provided by the user
 
2920
  AC_MSG_CHECKING([if we can lock with hard links])
 
2921
  hard_links=yes
 
2922
  $RM conftest*
 
2923
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
2924
  touch conftest.a
 
2925
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
2926
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
2927
  AC_MSG_RESULT([$hard_links])
 
2928
  if test "$hard_links" = no; then
 
2929
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
2930
    need_locks=warn
 
2931
  fi
 
2932
else
 
2933
  need_locks=no
 
2934
fi
 
2935
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
 
2936
])# _LT_COMPILER_FILE_LOCKS
 
2937
 
 
2938
 
 
2939
# _LT_CHECK_OBJDIR
 
2940
# ----------------
 
2941
m4_defun([_LT_CHECK_OBJDIR],
 
2942
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
2943
[rm -f .libs 2>/dev/null
 
2944
mkdir .libs 2>/dev/null
 
2945
if test -d .libs; then
 
2946
  lt_cv_objdir=.libs
 
2947
else
 
2948
  # MS-DOS does not allow filenames that begin with a dot.
 
2949
  lt_cv_objdir=_libs
 
2950
fi
 
2951
rmdir .libs 2>/dev/null])
 
2952
objdir=$lt_cv_objdir
 
2953
_LT_DECL([], [objdir], [0],
 
2954
         [The name of the directory that contains temporary libtool files])dnl
 
2955
m4_pattern_allow([LT_OBJDIR])dnl
 
2956
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
 
2957
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
 
2958
])# _LT_CHECK_OBJDIR
 
2959
 
 
2960
 
 
2961
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
 
2962
# --------------------------------------
 
2963
# Check hardcoding attributes.
 
2964
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
 
2965
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
2966
_LT_TAGVAR(hardcode_action, $1)=
 
2967
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
 
2968
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
 
2969
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
2970
 
 
2971
  # We can hardcode non-existent directories.
 
2972
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
 
2973
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
2974
     # have to relink, otherwise we might link with an installed library
 
2975
     # when we should be linking with a yet-to-be-installed one
 
2976
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
2977
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
 
2978
    # Linking always hardcodes the temporary library directory.
 
2979
    _LT_TAGVAR(hardcode_action, $1)=relink
 
2980
  else
 
2981
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
2982
    _LT_TAGVAR(hardcode_action, $1)=immediate
 
2983
  fi
 
2984
else
 
2985
  # We cannot hardcode anything, or else we can only hardcode existing
 
2986
  # directories.
 
2987
  _LT_TAGVAR(hardcode_action, $1)=unsupported
 
2988
fi
 
2989
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
2990
 
 
2991
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
 
2992
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
 
2993
  # Fast installation is not supported
 
2994
  enable_fast_install=no
 
2995
elif test "$shlibpath_overrides_runpath" = yes ||
 
2996
     test "$enable_shared" = no; then
 
2997
  # Fast installation is not necessary
 
2998
  enable_fast_install=needless
 
2999
fi
 
3000
_LT_TAGDECL([], [hardcode_action], [0],
 
3001
    [How to hardcode a shared library path into an executable])
 
3002
])# _LT_LINKER_HARDCODE_LIBPATH
 
3003
 
 
3004
 
 
3005
# _LT_CMD_STRIPLIB
 
3006
# ----------------
 
3007
m4_defun([_LT_CMD_STRIPLIB],
 
3008
[m4_require([_LT_DECL_EGREP])
 
3009
striplib=
 
3010
old_striplib=
 
3011
AC_MSG_CHECKING([whether stripping libraries is possible])
 
3012
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
 
3013
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
3014
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
3015
  AC_MSG_RESULT([yes])
 
3016
else
 
3017
# FIXME - insert some real tests, host_os isn't really good enough
 
3018
  case $host_os in
 
3019
  darwin*)
 
3020
    if test -n "$STRIP" ; then
 
3021
      striplib="$STRIP -x"
 
3022
      old_striplib="$STRIP -S"
 
3023
      AC_MSG_RESULT([yes])
 
3024
    else
 
3025
      AC_MSG_RESULT([no])
 
3026
    fi
 
3027
    ;;
 
3028
  *)
 
3029
    AC_MSG_RESULT([no])
 
3030
    ;;
 
3031
  esac
 
3032
fi
 
3033
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
 
3034
_LT_DECL([], [striplib], [1])
 
3035
])# _LT_CMD_STRIPLIB
 
3036
 
 
3037
 
 
3038
# _LT_SYS_DYNAMIC_LINKER([TAG])
 
3039
# -----------------------------
 
3040
# PORTME Fill in your ld.so characteristics
 
3041
m4_defun([_LT_SYS_DYNAMIC_LINKER],
 
3042
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3043
m4_require([_LT_DECL_EGREP])dnl
 
3044
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
3045
m4_require([_LT_DECL_OBJDUMP])dnl
 
3046
m4_require([_LT_DECL_SED])dnl
 
3047
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 
3048
AC_MSG_CHECKING([dynamic linker characteristics])
 
3049
m4_if([$1],
 
3050
        [], [
 
3051
if test "$GCC" = yes; then
 
3052
  case $host_os in
 
3053
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
 
3054
    *) lt_awk_arg="/^libraries:/" ;;
 
3055
  esac
 
3056
  case $host_os in
 
3057
    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
 
3058
    *) lt_sed_strip_eq="s,=/,/,g" ;;
 
3059
  esac
 
3060
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
 
3061
  case $lt_search_path_spec in
 
3062
  *\;*)
 
3063
    # if the path contains ";" then we assume it to be the separator
 
3064
    # otherwise default to the standard path separator (i.e. ":") - it is
 
3065
    # assumed that no part of a normal pathname contains ";" but that should
 
3066
    # okay in the real world where ";" in dirpaths is itself problematic.
 
3067
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
 
3068
    ;;
 
3069
  *)
 
3070
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
 
3071
    ;;
 
3072
  esac
 
3073
  # Ok, now we have the path, separated by spaces, we can step through it
 
3074
  # and add multilib dir if necessary.
 
3075
  lt_tmp_lt_search_path_spec=
 
3076
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
 
3077
  for lt_sys_path in $lt_search_path_spec; do
 
3078
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
 
3079
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
 
3080
    else
 
3081
      test -d "$lt_sys_path" && \
 
3082
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
 
3083
    fi
 
3084
  done
 
3085
  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
 
3086
BEGIN {RS=" "; FS="/|\n";} {
 
3087
  lt_foo="";
 
3088
  lt_count=0;
 
3089
  for (lt_i = NF; lt_i > 0; lt_i--) {
 
3090
    if ($lt_i != "" && $lt_i != ".") {
 
3091
      if ($lt_i == "..") {
 
3092
        lt_count++;
 
3093
      } else {
 
3094
        if (lt_count == 0) {
 
3095
          lt_foo="/" $lt_i lt_foo;
 
3096
        } else {
 
3097
          lt_count--;
 
3098
        }
 
3099
      }
 
3100
    }
 
3101
  }
 
3102
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
 
3103
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 
3104
}'`
 
3105
  # AWK program above erroneously prepends '/' to C:/dos/paths
 
3106
  # for these hosts.
 
3107
  case $host_os in
 
3108
    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
 
3109
      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
 
3110
  esac
 
3111
  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 
3112
else
 
3113
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
3114
fi])
 
3115
library_names_spec=
 
3116
libname_spec='lib$name'
 
3117
soname_spec=
 
3118
shrext_cmds=".so"
 
3119
postinstall_cmds=
 
3120
postuninstall_cmds=
 
3121
finish_cmds=
 
3122
finish_eval=
 
3123
shlibpath_var=
 
3124
shlibpath_overrides_runpath=unknown
 
3125
version_type=none
 
3126
dynamic_linker="$host_os ld.so"
 
3127
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
3128
need_lib_prefix=unknown
 
3129
hardcode_into_libs=no
 
3130
 
 
3131
# when you set need_version to no, make sure it does not cause -set_version
 
3132
# flags to be left without arguments
 
3133
need_version=unknown
 
3134
 
 
3135
case $host_os in
 
3136
aix3*)
 
3137
  version_type=linux
 
3138
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 
3139
  shlibpath_var=LIBPATH
 
3140
 
 
3141
  # AIX 3 has no versioning support, so we append a major version to the name.
 
3142
  soname_spec='${libname}${release}${shared_ext}$major'
 
3143
  ;;
 
3144
 
 
3145
aix[[4-9]]*)
 
3146
  version_type=linux
 
3147
  need_lib_prefix=no
 
3148
  need_version=no
 
3149
  hardcode_into_libs=yes
 
3150
  if test "$host_cpu" = ia64; then
 
3151
    # AIX 5 supports IA64
 
3152
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 
3153
    shlibpath_var=LD_LIBRARY_PATH
 
3154
  else
 
3155
    # With GCC up to 2.95.x, collect2 would create an import file
 
3156
    # for dependence libraries.  The import file would start with
 
3157
    # the line `#! .'.  This would cause the generated library to
 
3158
    # depend on `.', always an invalid library.  This was fixed in
 
3159
    # development snapshots of GCC prior to 3.0.
 
3160
    case $host_os in
 
3161
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
3162
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
3163
           echo ' yes '
 
3164
           echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 
3165
        :
 
3166
      else
 
3167
        can_build_shared=no
 
3168
      fi
 
3169
      ;;
 
3170
    esac
 
3171
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
3172
    # soname into executable. Probably we can add versioning support to
 
3173
    # collect2, so additional links can be useful in future.
 
3174
    if test "$aix_use_runtimelinking" = yes; then
 
3175
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
3176
      # instead of lib<name>.a to let people know that these are not
 
3177
      # typical AIX shared libraries.
 
3178
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3179
    else
 
3180
      # We preserve .a as extension for shared libraries through AIX4.2
 
3181
      # and later when we are not doing run time linking.
 
3182
      library_names_spec='${libname}${release}.a $libname.a'
 
3183
      soname_spec='${libname}${release}${shared_ext}$major'
 
3184
    fi
 
3185
    shlibpath_var=LIBPATH
 
3186
  fi
 
3187
  ;;
 
3188
 
 
3189
amigaos*)
 
3190
  case $host_cpu in
 
3191
  powerpc)
 
3192
    # Since July 2007 AmigaOS4 officially supports .so libraries.
 
3193
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
 
3194
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3195
    ;;
 
3196
  m68k)
 
3197
    library_names_spec='$libname.ixlibrary $libname.a'
 
3198
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
3199
    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
 
3200
    ;;
 
3201
  esac
 
3202
  ;;
 
3203
 
 
3204
beos*)
 
3205
  library_names_spec='${libname}${shared_ext}'
 
3206
  dynamic_linker="$host_os ld.so"
 
3207
  shlibpath_var=LIBRARY_PATH
 
3208
  ;;
 
3209
 
 
3210
bsdi[[45]]*)
 
3211
  version_type=linux
 
3212
  need_version=no
 
3213
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3214
  soname_spec='${libname}${release}${shared_ext}$major'
 
3215
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
3216
  shlibpath_var=LD_LIBRARY_PATH
 
3217
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
3218
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
3219
  # the default ld.so.conf also contains /usr/contrib/lib and
 
3220
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
3221
  # libtool to hard-code these into programs
 
3222
  ;;
 
3223
 
 
3224
cygwin* | mingw* | pw32* | cegcc*)
 
3225
  version_type=windows
 
3226
  shrext_cmds=".dll"
 
3227
  need_version=no
 
3228
  need_lib_prefix=no
 
3229
 
 
3230
  case $GCC,$host_os in
 
3231
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
 
3232
    library_names_spec='$libname.dll.a'
 
3233
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
3234
    postinstall_cmds='base_file=`basename \${file}`~
 
3235
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
 
3236
      dldir=$destdir/`dirname \$dlpath`~
 
3237
      test -d \$dldir || mkdir -p \$dldir~
 
3238
      $install_prog $dir/$dlname \$dldir/$dlname~
 
3239
      chmod a+x \$dldir/$dlname~
 
3240
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
 
3241
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
 
3242
      fi'
 
3243
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
3244
      dlpath=$dir/\$dldll~
 
3245
       $RM \$dlpath'
 
3246
    shlibpath_overrides_runpath=yes
 
3247
 
 
3248
    case $host_os in
 
3249
    cygwin*)
 
3250
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
3251
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
3252
m4_if([$1], [],[
 
3253
      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
 
3254
      ;;
 
3255
    mingw* | cegcc*)
 
3256
      # MinGW DLLs use traditional 'lib' prefix
 
3257
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
3258
      ;;
 
3259
    pw32*)
 
3260
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
3261
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
3262
      ;;
 
3263
    esac
 
3264
    ;;
 
3265
 
 
3266
  *)
 
3267
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
3268
    ;;
 
3269
  esac
 
3270
  dynamic_linker='Win32 ld.exe'
 
3271
  # FIXME: first we should search . and the directory the executable is in
 
3272
  shlibpath_var=PATH
 
3273
  ;;
 
3274
 
 
3275
darwin* | rhapsody*)
 
3276
  dynamic_linker="$host_os dyld"
 
3277
  version_type=darwin
 
3278
  need_lib_prefix=no
 
3279
  need_version=no
 
3280
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
3281
  soname_spec='${libname}${release}${major}$shared_ext'
 
3282
  shlibpath_overrides_runpath=yes
 
3283
  shlibpath_var=DYLD_LIBRARY_PATH
 
3284
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 
3285
m4_if([$1], [],[
 
3286
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
 
3287
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
3288
  ;;
 
3289
 
 
3290
dgux*)
 
3291
  version_type=linux
 
3292
  need_lib_prefix=no
 
3293
  need_version=no
 
3294
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
3295
  soname_spec='${libname}${release}${shared_ext}$major'
 
3296
  shlibpath_var=LD_LIBRARY_PATH
 
3297
  ;;
 
3298
 
 
3299
freebsd1*)
 
3300
  dynamic_linker=no
 
3301
  ;;
 
3302
 
 
3303
freebsd* | dragonfly*)
 
3304
  # DragonFly does not have aout.  When/if they implement a new
 
3305
  # versioning mechanism, adjust this.
 
3306
  if test -x /usr/bin/objformat; then
 
3307
    objformat=`/usr/bin/objformat`
 
3308
  else
 
3309
    case $host_os in
 
3310
    freebsd[[123]]*) objformat=aout ;;
 
3311
    *) objformat=elf ;;
 
3312
    esac
 
3313
  fi
 
3314
  version_type=freebsd-$objformat
 
3315
  case $version_type in
 
3316
    freebsd-elf*)
 
3317
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
3318
      need_version=no
 
3319
      need_lib_prefix=no
 
3320
      ;;
 
3321
    freebsd-*)
 
3322
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 
3323
      need_version=yes
 
3324
      ;;
 
3325
  esac
 
3326
  shlibpath_var=LD_LIBRARY_PATH
 
3327
  case $host_os in
 
3328
  freebsd2*)
 
3329
    shlibpath_overrides_runpath=yes
 
3330
    ;;
 
3331
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
 
3332
    shlibpath_overrides_runpath=yes
 
3333
    hardcode_into_libs=yes
 
3334
    ;;
 
3335
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
 
3336
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
 
3337
    shlibpath_overrides_runpath=no
 
3338
    hardcode_into_libs=yes
 
3339
    ;;
 
3340
  *) # from 4.6 on, and DragonFly
 
3341
    shlibpath_overrides_runpath=yes
 
3342
    hardcode_into_libs=yes
 
3343
    ;;
 
3344
  esac
 
3345
  ;;
 
3346
 
 
3347
gnu*)
 
3348
  version_type=linux
 
3349
  need_lib_prefix=no
 
3350
  need_version=no
 
3351
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
3352
  soname_spec='${libname}${release}${shared_ext}$major'
 
3353
  shlibpath_var=LD_LIBRARY_PATH
 
3354
  hardcode_into_libs=yes
 
3355
  ;;
 
3356
 
 
3357
haiku*)
 
3358
  version_type=linux
 
3359
  need_lib_prefix=no
 
3360
  need_version=no
 
3361
  dynamic_linker="$host_os runtime_loader"
 
3362
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
3363
  soname_spec='${libname}${release}${shared_ext}$major'
 
3364
  shlibpath_var=LIBRARY_PATH
 
3365
  shlibpath_overrides_runpath=yes
 
3366
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
 
3367
  hardcode_into_libs=yes
 
3368
  ;;
 
3369
 
 
3370
hpux9* | hpux10* | hpux11*)
 
3371
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
3372
  # link against other versions.
 
3373
  version_type=sunos
 
3374
  need_lib_prefix=no
 
3375
  need_version=no
 
3376
  case $host_cpu in
 
3377
  ia64*)
 
3378
    shrext_cmds='.so'
 
3379
    hardcode_into_libs=yes
 
3380
    dynamic_linker="$host_os dld.so"
 
3381
    shlibpath_var=LD_LIBRARY_PATH
 
3382
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
3383
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3384
    soname_spec='${libname}${release}${shared_ext}$major'
 
3385
    if test "X$HPUX_IA64_MODE" = X32; then
 
3386
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
3387
    else
 
3388
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
3389
    fi
 
3390
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
3391
    ;;
 
3392
  hppa*64*)
 
3393
    shrext_cmds='.sl'
 
3394
    hardcode_into_libs=yes
 
3395
    dynamic_linker="$host_os dld.sl"
 
3396
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
3397
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
3398
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3399
    soname_spec='${libname}${release}${shared_ext}$major'
 
3400
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
3401
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
3402
    ;;
 
3403
  *)
 
3404
    shrext_cmds='.sl'
 
3405
    dynamic_linker="$host_os dld.sl"
 
3406
    shlibpath_var=SHLIB_PATH
 
3407
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
3408
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3409
    soname_spec='${libname}${release}${shared_ext}$major'
 
3410
    ;;
 
3411
  esac
 
3412
  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
 
3413
  postinstall_cmds='chmod 555 $lib'
 
3414
  # or fails outright, so override atomically:
 
3415
  install_override_mode=555
 
3416
  ;;
 
3417
 
 
3418
interix[[3-9]]*)
 
3419
  version_type=linux
 
3420
  need_lib_prefix=no
 
3421
  need_version=no
 
3422
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
3423
  soname_spec='${libname}${release}${shared_ext}$major'
 
3424
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
 
3425
  shlibpath_var=LD_LIBRARY_PATH
 
3426
  shlibpath_overrides_runpath=no
 
3427
  hardcode_into_libs=yes
 
3428
  ;;
 
3429
 
 
3430
irix5* | irix6* | nonstopux*)
 
3431
  case $host_os in
 
3432
    nonstopux*) version_type=nonstopux ;;
 
3433
    *)
 
3434
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
3435
                version_type=linux
 
3436
        else
 
3437
                version_type=irix
 
3438
        fi ;;
 
3439
  esac
 
3440
  need_lib_prefix=no
 
3441
  need_version=no
 
3442
  soname_spec='${libname}${release}${shared_ext}$major'
 
3443
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 
3444
  case $host_os in
 
3445
  irix5* | nonstopux*)
 
3446
    libsuff= shlibsuff=
 
3447
    ;;
 
3448
  *)
 
3449
    case $LD in # libtool.m4 will add one of these switches to LD
 
3450
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
3451
      libsuff= shlibsuff= libmagic=32-bit;;
 
3452
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
3453
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
3454
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
3455
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
3456
    *) libsuff= shlibsuff= libmagic=never-match;;
 
3457
    esac
 
3458
    ;;
 
3459
  esac
 
3460
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
3461
  shlibpath_overrides_runpath=no
 
3462
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
3463
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
3464
  hardcode_into_libs=yes
 
3465
  ;;
 
3466
 
 
3467
# No shared lib support for Linux oldld, aout, or coff.
 
3468
linux*oldld* | linux*aout* | linux*coff*)
 
3469
  dynamic_linker=no
 
3470
  ;;
 
3471
 
 
3472
# This must be Linux ELF.
 
3473
linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
3474
  version_type=linux
 
3475
  need_lib_prefix=no
 
3476
  need_version=no
 
3477
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3478
  soname_spec='${libname}${release}${shared_ext}$major'
 
3479
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
3480
  shlibpath_var=LD_LIBRARY_PATH
 
3481
  shlibpath_overrides_runpath=no
 
3482
 
 
3483
  # Some binutils ld are patched to set DT_RUNPATH
 
3484
  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
 
3485
    [lt_cv_shlibpath_overrides_runpath=no
 
3486
    save_LDFLAGS=$LDFLAGS
 
3487
    save_libdir=$libdir
 
3488
    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
 
3489
         LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
 
3490
    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
3491
      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
 
3492
         [lt_cv_shlibpath_overrides_runpath=yes])])
 
3493
    LDFLAGS=$save_LDFLAGS
 
3494
    libdir=$save_libdir
 
3495
    ])
 
3496
  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
3497
 
 
3498
  # This implies no fast_install, which is unacceptable.
 
3499
  # Some rework will be needed to allow for fast_install
 
3500
  # before this can be enabled.
 
3501
  hardcode_into_libs=yes
 
3502
 
 
3503
  # Append ld.so.conf contents to the search path
 
3504
  if test -f /etc/ld.so.conf; then
 
3505
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
 
3506
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
3507
  fi
 
3508
 
 
3509
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
3510
  # powerpc, because MkLinux only supported shared libraries with the
 
3511
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
3512
  # most powerpc-linux boxes support dynamic linking these days and
 
3513
  # people can always --disable-shared, the test was removed, and we
 
3514
  # assume the GNU/Linux dynamic linker is in use.
 
3515
  dynamic_linker='GNU/Linux ld.so'
 
3516
  ;;
 
3517
 
 
3518
netbsd*)
 
3519
  version_type=sunos
 
3520
  need_lib_prefix=no
 
3521
  need_version=no
 
3522
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
3523
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
3524
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
3525
    dynamic_linker='NetBSD (a.out) ld.so'
 
3526
  else
 
3527
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
3528
    soname_spec='${libname}${release}${shared_ext}$major'
 
3529
    dynamic_linker='NetBSD ld.elf_so'
 
3530
  fi
 
3531
  shlibpath_var=LD_LIBRARY_PATH
 
3532
  shlibpath_overrides_runpath=yes
 
3533
  hardcode_into_libs=yes
 
3534
  ;;
 
3535
 
 
3536
newsos6)
 
3537
  version_type=linux
 
3538
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3539
  shlibpath_var=LD_LIBRARY_PATH
 
3540
  shlibpath_overrides_runpath=yes
 
3541
  ;;
 
3542
 
 
3543
*nto* | *qnx*)
 
3544
  version_type=qnx
 
3545
  need_lib_prefix=no
 
3546
  need_version=no
 
3547
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3548
  soname_spec='${libname}${release}${shared_ext}$major'
 
3549
  shlibpath_var=LD_LIBRARY_PATH
 
3550
  shlibpath_overrides_runpath=no
 
3551
  hardcode_into_libs=yes
 
3552
  dynamic_linker='ldqnx.so'
 
3553
  ;;
 
3554
 
 
3555
openbsd*)
 
3556
  version_type=sunos
 
3557
  sys_lib_dlsearch_path_spec="/usr/lib"
 
3558
  need_lib_prefix=no
 
3559
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 
3560
  case $host_os in
 
3561
    openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
 
3562
    *)                          need_version=no  ;;
 
3563
  esac
 
3564
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
3565
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
3566
  shlibpath_var=LD_LIBRARY_PATH
 
3567
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3568
    case $host_os in
 
3569
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
3570
        shlibpath_overrides_runpath=no
 
3571
        ;;
 
3572
      *)
 
3573
        shlibpath_overrides_runpath=yes
 
3574
        ;;
 
3575
      esac
 
3576
  else
 
3577
    shlibpath_overrides_runpath=yes
 
3578
  fi
 
3579
  ;;
 
3580
 
 
3581
os2*)
 
3582
  libname_spec='$name'
 
3583
  shrext_cmds=".dll"
 
3584
  need_lib_prefix=no
 
3585
  library_names_spec='$libname${shared_ext} $libname.a'
 
3586
  dynamic_linker='OS/2 ld.exe'
 
3587
  shlibpath_var=LIBPATH
 
3588
  ;;
 
3589
 
 
3590
osf3* | osf4* | osf5*)
 
3591
  version_type=osf
 
3592
  need_lib_prefix=no
 
3593
  need_version=no
 
3594
  soname_spec='${libname}${release}${shared_ext}$major'
 
3595
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3596
  shlibpath_var=LD_LIBRARY_PATH
 
3597
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
3598
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
3599
  ;;
 
3600
 
 
3601
rdos*)
 
3602
  dynamic_linker=no
 
3603
  ;;
 
3604
 
 
3605
solaris*)
 
3606
  version_type=linux
 
3607
  need_lib_prefix=no
 
3608
  need_version=no
 
3609
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3610
  soname_spec='${libname}${release}${shared_ext}$major'
 
3611
  shlibpath_var=LD_LIBRARY_PATH
 
3612
  shlibpath_overrides_runpath=yes
 
3613
  hardcode_into_libs=yes
 
3614
  # ldd complains unless libraries are executable
 
3615
  postinstall_cmds='chmod +x $lib'
 
3616
  ;;
 
3617
 
 
3618
sunos4*)
 
3619
  version_type=sunos
 
3620
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
3621
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
3622
  shlibpath_var=LD_LIBRARY_PATH
 
3623
  shlibpath_overrides_runpath=yes
 
3624
  if test "$with_gnu_ld" = yes; then
 
3625
    need_lib_prefix=no
 
3626
  fi
 
3627
  need_version=yes
 
3628
  ;;
 
3629
 
 
3630
sysv4 | sysv4.3*)
 
3631
  version_type=linux
 
3632
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3633
  soname_spec='${libname}${release}${shared_ext}$major'
 
3634
  shlibpath_var=LD_LIBRARY_PATH
 
3635
  case $host_vendor in
 
3636
    sni)
 
3637
      shlibpath_overrides_runpath=no
 
3638
      need_lib_prefix=no
 
3639
      runpath_var=LD_RUN_PATH
 
3640
      ;;
 
3641
    siemens)
 
3642
      need_lib_prefix=no
 
3643
      ;;
 
3644
    motorola)
 
3645
      need_lib_prefix=no
 
3646
      need_version=no
 
3647
      shlibpath_overrides_runpath=no
 
3648
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
3649
      ;;
 
3650
  esac
 
3651
  ;;
 
3652
 
 
3653
sysv4*MP*)
 
3654
  if test -d /usr/nec ;then
 
3655
    version_type=linux
 
3656
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
3657
    soname_spec='$libname${shared_ext}.$major'
 
3658
    shlibpath_var=LD_LIBRARY_PATH
 
3659
  fi
 
3660
  ;;
 
3661
 
 
3662
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
3663
  version_type=freebsd-elf
 
3664
  need_lib_prefix=no
 
3665
  need_version=no
 
3666
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
3667
  soname_spec='${libname}${release}${shared_ext}$major'
 
3668
  shlibpath_var=LD_LIBRARY_PATH
 
3669
  shlibpath_overrides_runpath=yes
 
3670
  hardcode_into_libs=yes
 
3671
  if test "$with_gnu_ld" = yes; then
 
3672
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
 
3673
  else
 
3674
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
 
3675
    case $host_os in
 
3676
      sco3.2v5*)
 
3677
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
 
3678
        ;;
 
3679
    esac
 
3680
  fi
 
3681
  sys_lib_dlsearch_path_spec='/usr/lib'
 
3682
  ;;
 
3683
 
 
3684
tpf*)
 
3685
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
 
3686
  version_type=linux
 
3687
  need_lib_prefix=no
 
3688
  need_version=no
 
3689
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3690
  shlibpath_var=LD_LIBRARY_PATH
 
3691
  shlibpath_overrides_runpath=no
 
3692
  hardcode_into_libs=yes
 
3693
  ;;
 
3694
 
 
3695
uts4*)
 
3696
  version_type=linux
 
3697
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3698
  soname_spec='${libname}${release}${shared_ext}$major'
 
3699
  shlibpath_var=LD_LIBRARY_PATH
 
3700
  ;;
 
3701
 
 
3702
*)
 
3703
  dynamic_linker=no
 
3704
  ;;
 
3705
esac
 
3706
AC_MSG_RESULT([$dynamic_linker])
 
3707
test "$dynamic_linker" = no && can_build_shared=no
 
3708
 
 
3709
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
3710
if test "$GCC" = yes; then
 
3711
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
3712
fi
 
3713
 
 
3714
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
 
3715
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
 
3716
fi
 
3717
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
 
3718
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 
3719
fi
 
3720
 
 
3721
_LT_DECL([], [variables_saved_for_relink], [1],
 
3722
    [Variables whose values should be saved in libtool wrapper scripts and
 
3723
    restored at link time])
 
3724
_LT_DECL([], [need_lib_prefix], [0],
 
3725
    [Do we need the "lib" prefix for modules?])
 
3726
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
 
3727
_LT_DECL([], [version_type], [0], [Library versioning type])
 
3728
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
 
3729
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
 
3730
_LT_DECL([], [shlibpath_overrides_runpath], [0],
 
3731
    [Is shlibpath searched before the hard-coded library search path?])
 
3732
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
 
3733
_LT_DECL([], [library_names_spec], [1],
 
3734
    [[List of archive names.  First name is the real one, the rest are links.
 
3735
    The last name is the one that the linker finds with -lNAME]])
 
3736
_LT_DECL([], [soname_spec], [1],
 
3737
    [[The coded name of the library, if different from the real name]])
 
3738
_LT_DECL([], [install_override_mode], [1],
 
3739
    [Permission mode override for installation of shared libraries])
 
3740
_LT_DECL([], [postinstall_cmds], [2],
 
3741
    [Command to use after installation of a shared archive])
 
3742
_LT_DECL([], [postuninstall_cmds], [2],
 
3743
    [Command to use after uninstallation of a shared archive])
 
3744
_LT_DECL([], [finish_cmds], [2],
 
3745
    [Commands used to finish a libtool library installation in a directory])
 
3746
_LT_DECL([], [finish_eval], [1],
 
3747
    [[As "finish_cmds", except a single script fragment to be evaled but
 
3748
    not shown]])
 
3749
_LT_DECL([], [hardcode_into_libs], [0],
 
3750
    [Whether we should hardcode library paths into libraries])
 
3751
_LT_DECL([], [sys_lib_search_path_spec], [2],
 
3752
    [Compile-time system search path for libraries])
 
3753
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
 
3754
    [Run-time system search path for libraries])
 
3755
])# _LT_SYS_DYNAMIC_LINKER
 
3756
 
 
3757
 
 
3758
# _LT_PATH_TOOL_PREFIX(TOOL)
 
3759
# --------------------------
 
3760
# find a file program which can recognize shared library
 
3761
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
 
3762
[m4_require([_LT_DECL_EGREP])dnl
 
3763
AC_MSG_CHECKING([for $1])
 
3764
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
3765
[case $MAGIC_CMD in
 
3766
[[\\/*] |  ?:[\\/]*])
 
3767
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
3768
  ;;
 
3769
*)
 
3770
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
3771
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3772
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
3773
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
3774
dnl not every word.  This closes a longstanding sh security hole.
 
3775
  ac_dummy="m4_if([$2], , $PATH, [$2])"
 
3776
  for ac_dir in $ac_dummy; do
 
3777
    IFS="$lt_save_ifs"
 
3778
    test -z "$ac_dir" && ac_dir=.
 
3779
    if test -f $ac_dir/$1; then
 
3780
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
3781
      if test -n "$file_magic_test_file"; then
 
3782
        case $deplibs_check_method in
 
3783
        "file_magic "*)
 
3784
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 
3785
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
3786
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
3787
            $EGREP "$file_magic_regex" > /dev/null; then
 
3788
            :
 
3789
          else
 
3790
            cat <<_LT_EOF 1>&2
 
3791
 
 
3792
*** Warning: the command libtool uses to detect shared libraries,
 
3793
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
3794
*** The result is that libtool may fail to recognize shared libraries
 
3795
*** as such.  This will affect the creation of libtool libraries that
 
3796
*** depend on shared libraries, but programs linked with such libtool
 
3797
*** libraries will work regardless of this problem.  Nevertheless, you
 
3798
*** may want to report the problem to your system manager and/or to
 
3799
*** bug-libtool@gnu.org
 
3800
 
 
3801
_LT_EOF
 
3802
          fi ;;
 
3803
        esac
 
3804
      fi
 
3805
      break
 
3806
    fi
 
3807
  done
 
3808
  IFS="$lt_save_ifs"
 
3809
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
3810
  ;;
 
3811
esac])
 
3812
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
3813
if test -n "$MAGIC_CMD"; then
 
3814
  AC_MSG_RESULT($MAGIC_CMD)
 
3815
else
 
3816
  AC_MSG_RESULT(no)
 
3817
fi
 
3818
_LT_DECL([], [MAGIC_CMD], [0],
 
3819
         [Used to examine libraries when file_magic_cmd begins with "file"])dnl
 
3820
])# _LT_PATH_TOOL_PREFIX
 
3821
 
 
3822
# Old name:
 
3823
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
 
3824
dnl aclocal-1.4 backwards compatibility:
 
3825
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
3826
 
 
3827
 
 
3828
# _LT_PATH_MAGIC
 
3829
# --------------
 
3830
# find a file program which can recognize a shared library
 
3831
m4_defun([_LT_PATH_MAGIC],
 
3832
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
3833
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
3834
  if test -n "$ac_tool_prefix"; then
 
3835
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
3836
  else
 
3837
    MAGIC_CMD=:
 
3838
  fi
 
3839
fi
 
3840
])# _LT_PATH_MAGIC
 
3841
 
 
3842
 
 
3843
# LT_PATH_LD
 
3844
# ----------
 
3845
# find the pathname to the GNU or non-GNU linker
 
3846
AC_DEFUN([LT_PATH_LD],
 
3847
[AC_REQUIRE([AC_PROG_CC])dnl
 
3848
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3849
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
3850
m4_require([_LT_DECL_SED])dnl
 
3851
m4_require([_LT_DECL_EGREP])dnl
 
3852
m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 
3853
 
 
3854
AC_ARG_WITH([gnu-ld],
 
3855
    [AS_HELP_STRING([--with-gnu-ld],
 
3856
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
3857
    [test "$withval" = no || with_gnu_ld=yes],
 
3858
    [with_gnu_ld=no])dnl
 
3859
 
 
3860
ac_prog=ld
 
3861
if test "$GCC" = yes; then
 
3862
  # Check if gcc -print-prog-name=ld gives a path.
 
3863
  AC_MSG_CHECKING([for ld used by $CC])
 
3864
  case $host in
 
3865
  *-*-mingw*)
 
3866
    # gcc leaves a trailing carriage return which upsets mingw
 
3867
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
3868
  *)
 
3869
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
3870
  esac
 
3871
  case $ac_prog in
 
3872
    # Accept absolute paths.
 
3873
    [[\\/]]* | ?:[[\\/]]*)
 
3874
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
3875
      # Canonicalize the pathname of ld
 
3876
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
 
3877
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 
3878
        ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
 
3879
      done
 
3880
      test -z "$LD" && LD="$ac_prog"
 
3881
      ;;
 
3882
  "")
 
3883
    # If it fails, then pretend we aren't using GCC.
 
3884
    ac_prog=ld
 
3885
    ;;
 
3886
  *)
 
3887
    # If it is relative, then search for the first ld in PATH.
 
3888
    with_gnu_ld=unknown
 
3889
    ;;
 
3890
  esac
 
3891
elif test "$with_gnu_ld" = yes; then
 
3892
  AC_MSG_CHECKING([for GNU ld])
 
3893
else
 
3894
  AC_MSG_CHECKING([for non-GNU ld])
 
3895
fi
 
3896
AC_CACHE_VAL(lt_cv_path_LD,
 
3897
[if test -z "$LD"; then
 
3898
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3899
  for ac_dir in $PATH; do
 
3900
    IFS="$lt_save_ifs"
 
3901
    test -z "$ac_dir" && ac_dir=.
 
3902
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
3903
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
3904
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
3905
      # but apparently some variants of GNU ld only accept -v.
 
3906
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
3907
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
3908
      *GNU* | *'with BFD'*)
 
3909
        test "$with_gnu_ld" != no && break
 
3910
        ;;
 
3911
      *)
 
3912
        test "$with_gnu_ld" != yes && break
 
3913
        ;;
 
3914
      esac
 
3915
    fi
 
3916
  done
 
3917
  IFS="$lt_save_ifs"
 
3918
else
 
3919
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
3920
fi])
 
3921
LD="$lt_cv_path_LD"
 
3922
if test -n "$LD"; then
 
3923
  AC_MSG_RESULT($LD)
 
3924
else
 
3925
  AC_MSG_RESULT(no)
 
3926
fi
 
3927
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
3928
_LT_PATH_LD_GNU
 
3929
AC_SUBST([LD])
 
3930
 
 
3931
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
 
3932
])# LT_PATH_LD
 
3933
 
 
3934
# Old names:
 
3935
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
 
3936
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
 
3937
dnl aclocal-1.4 backwards compatibility:
 
3938
dnl AC_DEFUN([AM_PROG_LD], [])
 
3939
dnl AC_DEFUN([AC_PROG_LD], [])
 
3940
 
 
3941
 
 
3942
# _LT_PATH_LD_GNU
 
3943
#- --------------
 
3944
m4_defun([_LT_PATH_LD_GNU],
 
3945
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
3946
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 
3947
case `$LD -v 2>&1 </dev/null` in
 
3948
*GNU* | *'with BFD'*)
 
3949
  lt_cv_prog_gnu_ld=yes
 
3950
  ;;
 
3951
*)
 
3952
  lt_cv_prog_gnu_ld=no
 
3953
  ;;
 
3954
esac])
 
3955
with_gnu_ld=$lt_cv_prog_gnu_ld
 
3956
])# _LT_PATH_LD_GNU
 
3957
 
 
3958
 
 
3959
# _LT_CMD_RELOAD
 
3960
# --------------
 
3961
# find reload flag for linker
 
3962
#   -- PORTME Some linkers may need a different reload flag.
 
3963
m4_defun([_LT_CMD_RELOAD],
 
3964
[AC_CACHE_CHECK([for $LD option to reload object files],
 
3965
  lt_cv_ld_reload_flag,
 
3966
  [lt_cv_ld_reload_flag='-r'])
 
3967
reload_flag=$lt_cv_ld_reload_flag
 
3968
case $reload_flag in
 
3969
"" | " "*) ;;
 
3970
*) reload_flag=" $reload_flag" ;;
 
3971
esac
 
3972
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
3973
case $host_os in
 
3974
  darwin*)
 
3975
    if test "$GCC" = yes; then
 
3976
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
 
3977
    else
 
3978
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
3979
    fi
 
3980
    ;;
 
3981
esac
 
3982
_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
 
3983
_LT_TAGDECL([], [reload_cmds], [2])dnl
 
3984
])# _LT_CMD_RELOAD
 
3985
 
 
3986
 
 
3987
# _LT_CHECK_MAGIC_METHOD
 
3988
# ----------------------
 
3989
# how to check for library dependencies
 
3990
#  -- PORTME fill in with the dynamic library characteristics
 
3991
m4_defun([_LT_CHECK_MAGIC_METHOD],
 
3992
[m4_require([_LT_DECL_EGREP])
 
3993
m4_require([_LT_DECL_OBJDUMP])
 
3994
AC_CACHE_CHECK([how to recognize dependent libraries],
 
3995
lt_cv_deplibs_check_method,
 
3996
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
3997
lt_cv_file_magic_test_file=
 
3998
lt_cv_deplibs_check_method='unknown'
 
3999
# Need to set the preceding variable on all platforms that support
 
4000
# interlibrary dependencies.
 
4001
# 'none' -- dependencies not supported.
 
4002
# `unknown' -- same as none, but documents that we really don't know.
 
4003
# 'pass_all' -- all dependencies passed with no checks.
 
4004
# 'test_compile' -- check by making test program.
 
4005
# 'file_magic [[regex]]' -- check by looking for files in library path
 
4006
# which responds to the $file_magic_cmd with a given extended regex.
 
4007
# If you have `file' or equivalent on your system and you're not sure
 
4008
# whether `pass_all' will *always* work, you probably want this one.
 
4009
 
 
4010
case $host_os in
 
4011
aix[[4-9]]*)
 
4012
  lt_cv_deplibs_check_method=pass_all
 
4013
  ;;
 
4014
 
 
4015
beos*)
 
4016
  lt_cv_deplibs_check_method=pass_all
 
4017
  ;;
 
4018
 
 
4019
bsdi[[45]]*)
 
4020
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
4021
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
4022
  lt_cv_file_magic_test_file=/shlib/libc.so
 
4023
  ;;
 
4024
 
 
4025
cygwin*)
 
4026
  # func_win32_libid is a shell function defined in ltmain.sh
 
4027
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
4028
  lt_cv_file_magic_cmd='func_win32_libid'
 
4029
  ;;
 
4030
 
 
4031
mingw* | pw32*)
 
4032
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
4033
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
 
4034
  # unless we find 'file', for example because we are cross-compiling.
 
4035
  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
 
4036
  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
 
4037
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
4038
    lt_cv_file_magic_cmd='func_win32_libid'
 
4039
  else
 
4040
    # Keep this pattern in sync with the one in func_win32_libid.
 
4041
    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
 
4042
    lt_cv_file_magic_cmd='$OBJDUMP -f'
 
4043
  fi
 
4044
  ;;
 
4045
 
 
4046
cegcc*)
 
4047
  # use the weaker test based on 'objdump'. See mingw*.
 
4048
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
 
4049
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
4050
  ;;
 
4051
 
 
4052
darwin* | rhapsody*)
 
4053
  lt_cv_deplibs_check_method=pass_all
 
4054
  ;;
 
4055
 
 
4056
freebsd* | dragonfly*)
 
4057
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
4058
    case $host_cpu in
 
4059
    i*86 )
 
4060
      # Not sure whether the presence of OpenBSD here was a mistake.
 
4061
      # Let's accept both of them until this is cleared up.
 
4062
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
 
4063
      lt_cv_file_magic_cmd=/usr/bin/file
 
4064
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
4065
      ;;
 
4066
    esac
 
4067
  else
 
4068
    lt_cv_deplibs_check_method=pass_all
 
4069
  fi
 
4070
  ;;
 
4071
 
 
4072
gnu*)
 
4073
  lt_cv_deplibs_check_method=pass_all
 
4074
  ;;
 
4075
 
 
4076
haiku*)
 
4077
  lt_cv_deplibs_check_method=pass_all
 
4078
  ;;
 
4079
 
 
4080
hpux10.20* | hpux11*)
 
4081
  lt_cv_file_magic_cmd=/usr/bin/file
 
4082
  case $host_cpu in
 
4083
  ia64*)
 
4084
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
4085
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
4086
    ;;
 
4087
  hppa*64*)
 
4088
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
 
4089
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
4090
    ;;
 
4091
  *)
 
4092
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
 
4093
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
4094
    ;;
 
4095
  esac
 
4096
  ;;
 
4097
 
 
4098
interix[[3-9]]*)
 
4099
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
 
4100
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
 
4101
  ;;
 
4102
 
 
4103
irix5* | irix6* | nonstopux*)
 
4104
  case $LD in
 
4105
  *-32|*"-32 ") libmagic=32-bit;;
 
4106
  *-n32|*"-n32 ") libmagic=N32;;
 
4107
  *-64|*"-64 ") libmagic=64-bit;;
 
4108
  *) libmagic=never-match;;
 
4109
  esac
 
4110
  lt_cv_deplibs_check_method=pass_all
 
4111
  ;;
 
4112
 
 
4113
# This must be Linux ELF.
 
4114
linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
4115
  lt_cv_deplibs_check_method=pass_all
 
4116
  ;;
 
4117
 
 
4118
netbsd*)
 
4119
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
4120
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
4121
  else
 
4122
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
4123
  fi
 
4124
  ;;
 
4125
 
 
4126
newos6*)
 
4127
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
4128
  lt_cv_file_magic_cmd=/usr/bin/file
 
4129
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
4130
  ;;
 
4131
 
 
4132
*nto* | *qnx*)
 
4133
  lt_cv_deplibs_check_method=pass_all
 
4134
  ;;
 
4135
 
 
4136
openbsd*)
 
4137
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
4138
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
 
4139
  else
 
4140
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
4141
  fi
 
4142
  ;;
 
4143
 
 
4144
osf3* | osf4* | osf5*)
 
4145
  lt_cv_deplibs_check_method=pass_all
 
4146
  ;;
 
4147
 
 
4148
rdos*)
 
4149
  lt_cv_deplibs_check_method=pass_all
 
4150
  ;;
 
4151
 
 
4152
solaris*)
 
4153
  lt_cv_deplibs_check_method=pass_all
 
4154
  ;;
 
4155
 
 
4156
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
4157
  lt_cv_deplibs_check_method=pass_all
 
4158
  ;;
 
4159
 
 
4160
sysv4 | sysv4.3*)
 
4161
  case $host_vendor in
 
4162
  motorola)
 
4163
    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]]'
 
4164
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
4165
    ;;
 
4166
  ncr)
 
4167
    lt_cv_deplibs_check_method=pass_all
 
4168
    ;;
 
4169
  sequent)
 
4170
    lt_cv_file_magic_cmd='/bin/file'
 
4171
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
4172
    ;;
 
4173
  sni)
 
4174
    lt_cv_file_magic_cmd='/bin/file'
 
4175
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
4176
    lt_cv_file_magic_test_file=/lib/libc.so
 
4177
    ;;
 
4178
  siemens)
 
4179
    lt_cv_deplibs_check_method=pass_all
 
4180
    ;;
 
4181
  pc)
 
4182
    lt_cv_deplibs_check_method=pass_all
 
4183
    ;;
 
4184
  esac
 
4185
  ;;
 
4186
 
 
4187
tpf*)
 
4188
  lt_cv_deplibs_check_method=pass_all
 
4189
  ;;
 
4190
esac
 
4191
])
 
4192
file_magic_cmd=$lt_cv_file_magic_cmd
 
4193
deplibs_check_method=$lt_cv_deplibs_check_method
 
4194
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
4195
 
 
4196
_LT_DECL([], [deplibs_check_method], [1],
 
4197
    [Method to check whether dependent libraries are shared objects])
 
4198
_LT_DECL([], [file_magic_cmd], [1],
 
4199
    [Command to use when deplibs_check_method == "file_magic"])
 
4200
])# _LT_CHECK_MAGIC_METHOD
 
4201
 
 
4202
 
 
4203
# LT_PATH_NM
 
4204
# ----------
 
4205
# find the pathname to a BSD- or MS-compatible name lister
 
4206
AC_DEFUN([LT_PATH_NM],
 
4207
[AC_REQUIRE([AC_PROG_CC])dnl
 
4208
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 
4209
[if test -n "$NM"; then
 
4210
  # Let the user override the test.
 
4211
  lt_cv_path_NM="$NM"
 
4212
else
 
4213
  lt_nm_to_check="${ac_tool_prefix}nm"
 
4214
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
 
4215
    lt_nm_to_check="$lt_nm_to_check nm"
 
4216
  fi
 
4217
  for lt_tmp_nm in $lt_nm_to_check; do
 
4218
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
4219
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
 
4220
      IFS="$lt_save_ifs"
 
4221
      test -z "$ac_dir" && ac_dir=.
 
4222
      tmp_nm="$ac_dir/$lt_tmp_nm"
 
4223
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
4224
        # Check to see if the nm accepts a BSD-compat flag.
 
4225
        # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
4226
        #   nm: unknown option "B" ignored
 
4227
        # Tru64's nm complains that /dev/null is an invalid object file
 
4228
        case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
4229
        */dev/null* | *'Invalid file or object type'*)
 
4230
          lt_cv_path_NM="$tmp_nm -B"
 
4231
          break
 
4232
          ;;
 
4233
        *)
 
4234
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
4235
          */dev/null*)
 
4236
            lt_cv_path_NM="$tmp_nm -p"
 
4237
            break
 
4238
            ;;
 
4239
          *)
 
4240
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
4241
            continue # so that we can try to find one that supports BSD flags
 
4242
            ;;
 
4243
          esac
 
4244
          ;;
 
4245
        esac
 
4246
      fi
 
4247
    done
 
4248
    IFS="$lt_save_ifs"
 
4249
  done
 
4250
  : ${lt_cv_path_NM=no}
 
4251
fi])
 
4252
if test "$lt_cv_path_NM" != "no"; then
 
4253
  NM="$lt_cv_path_NM"
 
4254
else
 
4255
  # Didn't find any BSD compatible name lister, look for dumpbin.
 
4256
  if test -n "$DUMPBIN"; then :
 
4257
    # Let the user override the test.
 
4258
  else
 
4259
    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
 
4260
    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
 
4261
    *COFF*)
 
4262
      DUMPBIN="$DUMPBIN -symbols"
 
4263
      ;;
 
4264
    *)
 
4265
      DUMPBIN=:
 
4266
      ;;
 
4267
    esac
 
4268
  fi
 
4269
  AC_SUBST([DUMPBIN])
 
4270
  if test "$DUMPBIN" != ":"; then
 
4271
    NM="$DUMPBIN"
 
4272
  fi
 
4273
fi
 
4274
test -z "$NM" && NM=nm
 
4275
AC_SUBST([NM])
 
4276
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
 
4277
 
 
4278
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
 
4279
  [lt_cv_nm_interface="BSD nm"
 
4280
  echo "int some_variable = 0;" > conftest.$ac_ext
 
4281
  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
 
4282
  (eval "$ac_compile" 2>conftest.err)
 
4283
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
4284
  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
 
4285
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
 
4286
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
4287
  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
 
4288
  cat conftest.out >&AS_MESSAGE_LOG_FD
 
4289
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
 
4290
    lt_cv_nm_interface="MS dumpbin"
 
4291
  fi
 
4292
  rm -f conftest*])
 
4293
])# LT_PATH_NM
 
4294
 
 
4295
# Old names:
 
4296
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
 
4297
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
 
4298
dnl aclocal-1.4 backwards compatibility:
 
4299
dnl AC_DEFUN([AM_PROG_NM], [])
 
4300
dnl AC_DEFUN([AC_PROG_NM], [])
 
4301
 
 
4302
 
 
4303
# LT_LIB_M
 
4304
# --------
 
4305
# check for math library
 
4306
AC_DEFUN([LT_LIB_M],
 
4307
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
4308
LIBM=
 
4309
case $host in
 
4310
*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
 
4311
  # These system don't have libm, or don't need it
 
4312
  ;;
 
4313
*-ncr-sysv4.3*)
 
4314
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
4315
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
4316
  ;;
 
4317
*)
 
4318
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
4319
  ;;
 
4320
esac
 
4321
AC_SUBST([LIBM])
 
4322
])# LT_LIB_M
 
4323
 
 
4324
# Old name:
 
4325
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
 
4326
dnl aclocal-1.4 backwards compatibility:
 
4327
dnl AC_DEFUN([AC_CHECK_LIBM], [])
 
4328
 
 
4329
 
 
4330
# _LT_COMPILER_NO_RTTI([TAGNAME])
 
4331
# -------------------------------
 
4332
m4_defun([_LT_COMPILER_NO_RTTI],
 
4333
[m4_require([_LT_TAG_COMPILER])dnl
 
4334
 
 
4335
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
4336
 
 
4337
if test "$GCC" = yes; then
 
4338
  case $cc_basename in
 
4339
  nvcc*)
 
4340
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
 
4341
  *)
 
4342
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
 
4343
  esac
 
4344
 
 
4345
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
4346
    lt_cv_prog_compiler_rtti_exceptions,
 
4347
    [-fno-rtti -fno-exceptions], [],
 
4348
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
4349
fi
 
4350
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
 
4351
        [Compiler flag to turn off builtin functions])
 
4352
])# _LT_COMPILER_NO_RTTI
 
4353
 
 
4354
 
 
4355
# _LT_CMD_GLOBAL_SYMBOLS
 
4356
# ----------------------
 
4357
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
 
4358
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
4359
AC_REQUIRE([AC_PROG_CC])dnl
 
4360
AC_REQUIRE([AC_PROG_AWK])dnl
 
4361
AC_REQUIRE([LT_PATH_NM])dnl
 
4362
AC_REQUIRE([LT_PATH_LD])dnl
 
4363
m4_require([_LT_DECL_SED])dnl
 
4364
m4_require([_LT_DECL_EGREP])dnl
 
4365
m4_require([_LT_TAG_COMPILER])dnl
 
4366
 
 
4367
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
4368
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
4369
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
4370
[
 
4371
# These are sane defaults that work on at least a few old systems.
 
4372
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
4373
 
 
4374
# Character class describing NM global symbol codes.
 
4375
symcode='[[BCDEGRST]]'
 
4376
 
 
4377
# Regexp to match symbols that can be accessed directly from C.
 
4378
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
4379
 
 
4380
# Define system-specific variables.
 
4381
case $host_os in
 
4382
aix*)
 
4383
  symcode='[[BCDT]]'
 
4384
  ;;
 
4385
cygwin* | mingw* | pw32* | cegcc*)
 
4386
  symcode='[[ABCDGISTW]]'
 
4387
  ;;
 
4388
hpux*)
 
4389
  if test "$host_cpu" = ia64; then
 
4390
    symcode='[[ABCDEGRST]]'
 
4391
  fi
 
4392
  ;;
 
4393
irix* | nonstopux*)
 
4394
  symcode='[[BCDEGRST]]'
 
4395
  ;;
 
4396
osf*)
 
4397
  symcode='[[BCDEGQRST]]'
 
4398
  ;;
 
4399
solaris*)
 
4400
  symcode='[[BDRT]]'
 
4401
  ;;
 
4402
sco3.2v5*)
 
4403
  symcode='[[DT]]'
 
4404
  ;;
 
4405
sysv4.2uw2*)
 
4406
  symcode='[[DT]]'
 
4407
  ;;
 
4408
sysv5* | sco5v6* | unixware* | OpenUNIX*)
 
4409
  symcode='[[ABDT]]'
 
4410
  ;;
 
4411
sysv4)
 
4412
  symcode='[[DFNSTU]]'
 
4413
  ;;
 
4414
esac
 
4415
 
 
4416
# If we're using GNU nm, then use its standard symbol codes.
 
4417
case `$NM -V 2>&1` in
 
4418
*GNU* | *'with BFD'*)
 
4419
  symcode='[[ABCDGIRSTW]]' ;;
 
4420
esac
 
4421
 
 
4422
# Transform an extracted symbol line into a proper C declaration.
 
4423
# Some systems (esp. on ia64) link data and code symbols differently,
 
4424
# so use this general approach.
 
4425
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
4426
 
 
4427
# Transform an extracted symbol line into symbol name and symbol address
 
4428
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
 
4429
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
4430
 
 
4431
# Handle CRLF in mingw tool chain
 
4432
opt_cr=
 
4433
case $build_os in
 
4434
mingw*)
 
4435
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
4436
  ;;
 
4437
esac
 
4438
 
 
4439
# Try without a prefix underscore, then with it.
 
4440
for ac_symprfx in "" "_"; do
 
4441
 
 
4442
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
 
4443
  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
4444
 
 
4445
  # Write the raw and C identifiers.
 
4446
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
 
4447
    # Fake it for dumpbin and say T for any non-static function
 
4448
    # and D for any global variable.
 
4449
    # Also find C++ and __fastcall symbols from MSVC++,
 
4450
    # which start with @ or ?.
 
4451
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
 
4452
"     {last_section=section; section=\$ 3};"\
 
4453
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 
4454
"     \$ 0!~/External *\|/{next};"\
 
4455
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 
4456
"     {if(hide[section]) next};"\
 
4457
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
 
4458
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
 
4459
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
 
4460
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
 
4461
"     ' prfx=^$ac_symprfx]"
 
4462
  else
 
4463
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
4464
  fi
 
4465
 
 
4466
  # Check to see that the pipe works correctly.
 
4467
  pipe_works=no
 
4468
 
 
4469
  rm -f conftest*
 
4470
  cat > conftest.$ac_ext <<_LT_EOF
 
4471
#ifdef __cplusplus
 
4472
extern "C" {
 
4473
#endif
 
4474
char nm_test_var;
 
4475
void nm_test_func(void);
 
4476
void nm_test_func(void){}
 
4477
#ifdef __cplusplus
 
4478
}
 
4479
#endif
 
4480
int main(){nm_test_var='a';nm_test_func();return(0);}
 
4481
_LT_EOF
 
4482
 
 
4483
  if AC_TRY_EVAL(ac_compile); then
 
4484
    # Now try to grab the symbols.
 
4485
    nlist=conftest.nm
 
4486
    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
 
4487
      # Try sorting and uniquifying the output.
 
4488
      if sort "$nlist" | uniq > "$nlist"T; then
 
4489
        mv -f "$nlist"T "$nlist"
 
4490
      else
 
4491
        rm -f "$nlist"T
 
4492
      fi
 
4493
 
 
4494
      # Make sure that we snagged all the symbols we need.
 
4495
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 
4496
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 
4497
          cat <<_LT_EOF > conftest.$ac_ext
 
4498
#ifdef __cplusplus
 
4499
extern "C" {
 
4500
#endif
 
4501
 
 
4502
_LT_EOF
 
4503
          # Now generate the symbol file.
 
4504
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
4505
 
 
4506
          cat <<_LT_EOF >> conftest.$ac_ext
 
4507
 
 
4508
/* The mapping between symbol names and symbols.  */
 
4509
const struct {
 
4510
  const char *name;
 
4511
  void       *address;
 
4512
}
 
4513
lt__PROGRAM__LTX_preloaded_symbols[[]] =
 
4514
{
 
4515
  { "@PROGRAM@", (void *) 0 },
 
4516
_LT_EOF
 
4517
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 
4518
          cat <<\_LT_EOF >> conftest.$ac_ext
 
4519
  {0, (void *) 0}
 
4520
};
 
4521
 
 
4522
/* This works around a problem in FreeBSD linker */
 
4523
#ifdef FREEBSD_WORKAROUND
 
4524
static const void *lt_preloaded_setup() {
 
4525
  return lt__PROGRAM__LTX_preloaded_symbols;
 
4526
}
 
4527
#endif
 
4528
 
 
4529
#ifdef __cplusplus
 
4530
}
 
4531
#endif
 
4532
_LT_EOF
 
4533
          # Now try linking the two files.
 
4534
          mv conftest.$ac_objext conftstm.$ac_objext
 
4535
          lt_save_LIBS="$LIBS"
 
4536
          lt_save_CFLAGS="$CFLAGS"
 
4537
          LIBS="conftstm.$ac_objext"
 
4538
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
4539
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
4540
            pipe_works=yes
 
4541
          fi
 
4542
          LIBS="$lt_save_LIBS"
 
4543
          CFLAGS="$lt_save_CFLAGS"
 
4544
        else
 
4545
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
4546
        fi
 
4547
      else
 
4548
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
4549
      fi
 
4550
    else
 
4551
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
4552
    fi
 
4553
  else
 
4554
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
4555
    cat conftest.$ac_ext >&5
 
4556
  fi
 
4557
  rm -rf conftest* conftst*
 
4558
 
 
4559
  # Do not use the global_symbol_pipe unless it works.
 
4560
  if test "$pipe_works" = yes; then
 
4561
    break
 
4562
  else
 
4563
    lt_cv_sys_global_symbol_pipe=
 
4564
  fi
 
4565
done
 
4566
])
 
4567
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
4568
  lt_cv_sys_global_symbol_to_cdecl=
 
4569
fi
 
4570
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
4571
  AC_MSG_RESULT(failed)
 
4572
else
 
4573
  AC_MSG_RESULT(ok)
 
4574
fi
 
4575
 
 
4576
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
 
4577
    [Take the output of nm and produce a listing of raw symbols and C names])
 
4578
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
 
4579
    [Transform the output of nm in a proper C declaration])
 
4580
_LT_DECL([global_symbol_to_c_name_address],
 
4581
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
 
4582
    [Transform the output of nm in a C name address pair])
 
4583
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
 
4584
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
 
4585
    [Transform the output of nm in a C name address pair when lib prefix is needed])
 
4586
]) # _LT_CMD_GLOBAL_SYMBOLS
 
4587
 
 
4588
 
 
4589
# _LT_COMPILER_PIC([TAGNAME])
 
4590
# ---------------------------
 
4591
m4_defun([_LT_COMPILER_PIC],
 
4592
[m4_require([_LT_TAG_COMPILER])dnl
 
4593
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
 
4594
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
4595
_LT_TAGVAR(lt_prog_compiler_static, $1)=
 
4596
 
 
4597
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
4598
m4_if([$1], [CXX], [
 
4599
  # C++ specific cases for pic, static, wl, etc.
 
4600
  if test "$GXX" = yes; then
 
4601
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4602
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4603
 
 
4604
    case $host_os in
 
4605
    aix*)
 
4606
      # All AIX code is PIC.
 
4607
      if test "$host_cpu" = ia64; then
 
4608
        # AIX 5 now supports IA64 processor
 
4609
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4610
      fi
 
4611
      ;;
 
4612
 
 
4613
    amigaos*)
 
4614
      case $host_cpu in
 
4615
      powerpc)
 
4616
            # see comment about AmigaOS4 .so support
 
4617
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4618
        ;;
 
4619
      m68k)
 
4620
            # FIXME: we need at least 68020 code to build shared libraries, but
 
4621
            # adding the `-m68020' flag to GCC prevents building anything better,
 
4622
            # like `-m68040'.
 
4623
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
4624
        ;;
 
4625
      esac
 
4626
      ;;
 
4627
 
 
4628
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
4629
      # PIC is the default for these OSes.
 
4630
      ;;
 
4631
    mingw* | cygwin* | os2* | pw32* | cegcc*)
 
4632
      # This hack is so that the source file can tell whether it is being
 
4633
      # built for inclusion in a dll (and should export symbols for example).
 
4634
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
4635
      # (--disable-auto-import) libraries
 
4636
      m4_if([$1], [GCJ], [],
 
4637
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
4638
      ;;
 
4639
    darwin* | rhapsody*)
 
4640
      # PIC is the default on this platform
 
4641
      # Common symbols not allowed in MH_DYLIB files
 
4642
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
4643
      ;;
 
4644
    *djgpp*)
 
4645
      # DJGPP does not support shared libraries at all
 
4646
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
4647
      ;;
 
4648
    haiku*)
 
4649
      # PIC is the default for Haiku.
 
4650
      # The "-static" flag exists, but is broken.
 
4651
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
4652
      ;;
 
4653
    interix[[3-9]]*)
 
4654
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
4655
      # Instead, we relocate shared libraries at runtime.
 
4656
      ;;
 
4657
    sysv4*MP*)
 
4658
      if test -d /usr/nec; then
 
4659
        _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
4660
      fi
 
4661
      ;;
 
4662
    hpux*)
 
4663
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
 
4664
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
 
4665
      # sets the default TLS model and affects inlining.
 
4666
      case $host_cpu in
 
4667
      hppa*64*)
 
4668
        ;;
 
4669
      *)
 
4670
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4671
        ;;
 
4672
      esac
 
4673
      ;;
 
4674
    *qnx* | *nto*)
 
4675
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
4676
      # it will coredump.
 
4677
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
4678
      ;;
 
4679
    *)
 
4680
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4681
      ;;
 
4682
    esac
 
4683
  else
 
4684
    case $host_os in
 
4685
      aix[[4-9]]*)
 
4686
        # All AIX code is PIC.
 
4687
        if test "$host_cpu" = ia64; then
 
4688
          # AIX 5 now supports IA64 processor
 
4689
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4690
        else
 
4691
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
4692
        fi
 
4693
        ;;
 
4694
      chorus*)
 
4695
        case $cc_basename in
 
4696
        cxch68*)
 
4697
          # Green Hills C++ Compiler
 
4698
          # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
 
4699
          ;;
 
4700
        esac
 
4701
        ;;
 
4702
      dgux*)
 
4703
        case $cc_basename in
 
4704
          ec++*)
 
4705
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4706
            ;;
 
4707
          ghcx*)
 
4708
            # Green Hills C++ Compiler
 
4709
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4710
            ;;
 
4711
          *)
 
4712
            ;;
 
4713
        esac
 
4714
        ;;
 
4715
      freebsd* | dragonfly*)
 
4716
        # FreeBSD uses GNU C++
 
4717
        ;;
 
4718
      hpux9* | hpux10* | hpux11*)
 
4719
        case $cc_basename in
 
4720
          CC*)
 
4721
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4722
            _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
4723
            if test "$host_cpu" != ia64; then
 
4724
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
4725
            fi
 
4726
            ;;
 
4727
          aCC*)
 
4728
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4729
            _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
4730
            case $host_cpu in
 
4731
            hppa*64*|ia64*)
 
4732
              # +Z the default
 
4733
              ;;
 
4734
            *)
 
4735
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
4736
              ;;
 
4737
            esac
 
4738
            ;;
 
4739
          *)
 
4740
            ;;
 
4741
        esac
 
4742
        ;;
 
4743
      interix*)
 
4744
        # This is c89, which is MS Visual C++ (no shared libs)
 
4745
        # Anyone wants to do a port?
 
4746
        ;;
 
4747
      irix5* | irix6* | nonstopux*)
 
4748
        case $cc_basename in
 
4749
          CC*)
 
4750
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4751
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4752
            # CC pic flag -KPIC is the default.
 
4753
            ;;
 
4754
          *)
 
4755
            ;;
 
4756
        esac
 
4757
        ;;
 
4758
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
4759
        case $cc_basename in
 
4760
          KCC*)
 
4761
            # KAI C++ Compiler
 
4762
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
4763
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4764
            ;;
 
4765
          ecpc* )
 
4766
            # old Intel C++ for x86_64 which still supported -KPIC.
 
4767
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4768
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4769
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4770
            ;;
 
4771
          icpc* )
 
4772
            # Intel C++, used to be incompatible with GCC.
 
4773
            # ICC 10 doesn't accept -KPIC any more.
 
4774
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4775
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4776
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4777
            ;;
 
4778
          pgCC* | pgcpp*)
 
4779
            # Portland Group C++ compiler
 
4780
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4781
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
4782
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4783
            ;;
 
4784
          cxx*)
 
4785
            # Compaq C++
 
4786
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
4787
            # Linux and Compaq Tru64 Unix objects are PIC.
 
4788
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
4789
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4790
            ;;
 
4791
          xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
 
4792
            # IBM XL 8.0, 9.0 on PPC and BlueGene
 
4793
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4794
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 
4795
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 
4796
            ;;
 
4797
          *)
 
4798
            case `$CC -V 2>&1 | sed 5q` in
 
4799
            *Sun\ C*)
 
4800
              # Sun C++ 5.9
 
4801
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4802
              _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4803
              _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
4804
              ;;
 
4805
            esac
 
4806
            ;;
 
4807
        esac
 
4808
        ;;
 
4809
      lynxos*)
 
4810
        ;;
 
4811
      m88k*)
 
4812
        ;;
 
4813
      mvs*)
 
4814
        case $cc_basename in
 
4815
          cxx*)
 
4816
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
4817
            ;;
 
4818
          *)
 
4819
            ;;
 
4820
        esac
 
4821
        ;;
 
4822
      netbsd*)
 
4823
        ;;
 
4824
      *qnx* | *nto*)
 
4825
        # QNX uses GNU C++, but need to define -shared option too, otherwise
 
4826
        # it will coredump.
 
4827
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
4828
        ;;
 
4829
      osf3* | osf4* | osf5*)
 
4830
        case $cc_basename in
 
4831
          KCC*)
 
4832
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
4833
            ;;
 
4834
          RCC*)
 
4835
            # Rational C++ 2.4.1
 
4836
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4837
            ;;
 
4838
          cxx*)
 
4839
            # Digital/Compaq C++
 
4840
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4841
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
4842
            # Linux and Compaq Tru64 Unix objects are PIC.
 
4843
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
4844
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4845
            ;;
 
4846
          *)
 
4847
            ;;
 
4848
        esac
 
4849
        ;;
 
4850
      psos*)
 
4851
        ;;
 
4852
      solaris*)
 
4853
        case $cc_basename in
 
4854
          CC* | sunCC*)
 
4855
            # Sun C++ 4.2, 5.x and Centerline C++
 
4856
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4857
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4858
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
4859
            ;;
 
4860
          gcx*)
 
4861
            # Green Hills C++ Compiler
 
4862
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
4863
            ;;
 
4864
          *)
 
4865
            ;;
 
4866
        esac
 
4867
        ;;
 
4868
      sunos4*)
 
4869
        case $cc_basename in
 
4870
          CC*)
 
4871
            # Sun C++ 4.x
 
4872
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4873
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4874
            ;;
 
4875
          lcc*)
 
4876
            # Lucid
 
4877
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4878
            ;;
 
4879
          *)
 
4880
            ;;
 
4881
        esac
 
4882
        ;;
 
4883
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
4884
        case $cc_basename in
 
4885
          CC*)
 
4886
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4887
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4888
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4889
            ;;
 
4890
        esac
 
4891
        ;;
 
4892
      tandem*)
 
4893
        case $cc_basename in
 
4894
          NCC*)
 
4895
            # NonStop-UX NCC 3.20
 
4896
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4897
            ;;
 
4898
          *)
 
4899
            ;;
 
4900
        esac
 
4901
        ;;
 
4902
      vxworks*)
 
4903
        ;;
 
4904
      *)
 
4905
        _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
4906
        ;;
 
4907
    esac
 
4908
  fi
 
4909
],
 
4910
[
 
4911
  if test "$GCC" = yes; then
 
4912
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4913
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4914
 
 
4915
    case $host_os in
 
4916
      aix*)
 
4917
      # All AIX code is PIC.
 
4918
      if test "$host_cpu" = ia64; then
 
4919
        # AIX 5 now supports IA64 processor
 
4920
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4921
      fi
 
4922
      ;;
 
4923
 
 
4924
    amigaos*)
 
4925
      case $host_cpu in
 
4926
      powerpc)
 
4927
            # see comment about AmigaOS4 .so support
 
4928
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4929
        ;;
 
4930
      m68k)
 
4931
            # FIXME: we need at least 68020 code to build shared libraries, but
 
4932
            # adding the `-m68020' flag to GCC prevents building anything better,
 
4933
            # like `-m68040'.
 
4934
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
4935
        ;;
 
4936
      esac
 
4937
      ;;
 
4938
 
 
4939
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
4940
      # PIC is the default for these OSes.
 
4941
      ;;
 
4942
 
 
4943
    mingw* | cygwin* | pw32* | os2* | cegcc*)
 
4944
      # This hack is so that the source file can tell whether it is being
 
4945
      # built for inclusion in a dll (and should export symbols for example).
 
4946
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
4947
      # (--disable-auto-import) libraries
 
4948
      m4_if([$1], [GCJ], [],
 
4949
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
4950
      ;;
 
4951
 
 
4952
    darwin* | rhapsody*)
 
4953
      # PIC is the default on this platform
 
4954
      # Common symbols not allowed in MH_DYLIB files
 
4955
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
4956
      ;;
 
4957
 
 
4958
    haiku*)
 
4959
      # PIC is the default for Haiku.
 
4960
      # The "-static" flag exists, but is broken.
 
4961
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
4962
      ;;
 
4963
 
 
4964
    hpux*)
 
4965
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
 
4966
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
 
4967
      # sets the default TLS model and affects inlining.
 
4968
      case $host_cpu in
 
4969
      hppa*64*)
 
4970
        # +Z the default
 
4971
        ;;
 
4972
      *)
 
4973
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4974
        ;;
 
4975
      esac
 
4976
      ;;
 
4977
 
 
4978
    interix[[3-9]]*)
 
4979
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
4980
      # Instead, we relocate shared libraries at runtime.
 
4981
      ;;
 
4982
 
 
4983
    msdosdjgpp*)
 
4984
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
4985
      # on systems that don't support them.
 
4986
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
4987
      enable_shared=no
 
4988
      ;;
 
4989
 
 
4990
    *nto* | *qnx*)
 
4991
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
4992
      # it will coredump.
 
4993
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
4994
      ;;
 
4995
 
 
4996
    sysv4*MP*)
 
4997
      if test -d /usr/nec; then
 
4998
        _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
4999
      fi
 
5000
      ;;
 
5001
 
 
5002
    *)
 
5003
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5004
      ;;
 
5005
    esac
 
5006
 
 
5007
    case $cc_basename in
 
5008
    nvcc*) # Cuda Compiler Driver 2.2
 
5009
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
 
5010
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
 
5011
      ;;
 
5012
    esac
 
5013
  else
 
5014
    # PORTME Check for flag to pass linker flags through the system compiler.
 
5015
    case $host_os in
 
5016
    aix*)
 
5017
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5018
      if test "$host_cpu" = ia64; then
 
5019
        # AIX 5 now supports IA64 processor
 
5020
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5021
      else
 
5022
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
5023
      fi
 
5024
      ;;
 
5025
 
 
5026
    mingw* | cygwin* | pw32* | os2* | cegcc*)
 
5027
      # This hack is so that the source file can tell whether it is being
 
5028
      # built for inclusion in a dll (and should export symbols for example).
 
5029
      m4_if([$1], [GCJ], [],
 
5030
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
5031
      ;;
 
5032
 
 
5033
    hpux9* | hpux10* | hpux11*)
 
5034
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5035
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5036
      # not for PA HP-UX.
 
5037
      case $host_cpu in
 
5038
      hppa*64*|ia64*)
 
5039
        # +Z the default
 
5040
        ;;
 
5041
      *)
 
5042
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5043
        ;;
 
5044
      esac
 
5045
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
5046
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5047
      ;;
 
5048
 
 
5049
    irix5* | irix6* | nonstopux*)
 
5050
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5051
      # PIC (with -KPIC) is the default.
 
5052
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5053
      ;;
 
5054
 
 
5055
    linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
5056
      case $cc_basename in
 
5057
      # old Intel for x86_64 which still supported -KPIC.
 
5058
      ecc*)
 
5059
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5060
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5061
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5062
        ;;
 
5063
      # icc used to be incompatible with GCC.
 
5064
      # ICC 10 doesn't accept -KPIC any more.
 
5065
      icc* | ifort*)
 
5066
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5067
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5068
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5069
        ;;
 
5070
      # Lahey Fortran 8.1.
 
5071
      lf95*)
 
5072
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5073
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
 
5074
        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
 
5075
        ;;
 
5076
      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
 
5077
        # Portland Group compilers (*not* the Pentium gcc compiler,
 
5078
        # which looks to be a dead project)
 
5079
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5080
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5081
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5082
        ;;
 
5083
      ccc*)
 
5084
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5085
        # All Alpha code is PIC.
 
5086
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5087
        ;;
 
5088
      xl* | bgxl* | bgf* | mpixl*)
 
5089
        # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
 
5090
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5091
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 
5092
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 
5093
        ;;
 
5094
      *)
 
5095
        case `$CC -V 2>&1 | sed 5q` in
 
5096
        *Sun\ F* | *Sun*Fortran*)
 
5097
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
 
5098
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5099
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5100
          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
 
5101
          ;;
 
5102
        *Sun\ C*)
 
5103
          # Sun C 5.9
 
5104
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5105
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5106
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5107
          ;;
 
5108
        esac
 
5109
        ;;
 
5110
      esac
 
5111
      ;;
 
5112
 
 
5113
    newsos6)
 
5114
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5115
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5116
      ;;
 
5117
 
 
5118
    *nto* | *qnx*)
 
5119
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
5120
      # it will coredump.
 
5121
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
5122
      ;;
 
5123
 
 
5124
    osf3* | osf4* | osf5*)
 
5125
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5126
      # All OSF/1 code is PIC.
 
5127
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5128
      ;;
 
5129
 
 
5130
    rdos*)
 
5131
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5132
      ;;
 
5133
 
 
5134
    solaris*)
 
5135
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5136
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5137
      case $cc_basename in
 
5138
      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
 
5139
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
 
5140
      *)
 
5141
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
 
5142
      esac
 
5143
      ;;
 
5144
 
 
5145
    sunos4*)
 
5146
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5147
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5148
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5149
      ;;
 
5150
 
 
5151
    sysv4 | sysv4.2uw2* | sysv4.3*)
 
5152
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5153
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5154
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5155
      ;;
 
5156
 
 
5157
    sysv4*MP*)
 
5158
      if test -d /usr/nec ;then
 
5159
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
5160
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5161
      fi
 
5162
      ;;
 
5163
 
 
5164
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
5165
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5166
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5167
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5168
      ;;
 
5169
 
 
5170
    unicos*)
 
5171
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5172
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5173
      ;;
 
5174
 
 
5175
    uts4*)
 
5176
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5177
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5178
      ;;
 
5179
 
 
5180
    *)
 
5181
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5182
      ;;
 
5183
    esac
 
5184
  fi
 
5185
])
 
5186
case $host_os in
 
5187
  # For platforms which do not support PIC, -DPIC is meaningless:
 
5188
  *djgpp*)
 
5189
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5190
    ;;
 
5191
  *)
 
5192
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
 
5193
    ;;
 
5194
esac
 
5195
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
 
5196
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
 
5197
        [How to pass a linker flag through the compiler])
 
5198
 
 
5199
#
 
5200
# Check to make sure the PIC flag actually works.
 
5201
#
 
5202
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
5203
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
 
5204
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
 
5205
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
 
5206
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
 
5207
     "" | " "*) ;;
 
5208
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
5209
     esac],
 
5210
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5211
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
5212
fi
 
5213
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
 
5214
        [Additional compiler flags for building library objects])
 
5215
 
 
5216
#
 
5217
# Check to make sure the static flag actually works.
 
5218
#
 
5219
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
 
5220
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
 
5221
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
 
5222
  $lt_tmp_static_flag,
 
5223
  [],
 
5224
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
 
5225
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
 
5226
        [Compiler flag to prevent dynamic linking])
 
5227
])# _LT_COMPILER_PIC
 
5228
 
 
5229
 
 
5230
# _LT_LINKER_SHLIBS([TAGNAME])
 
5231
# ----------------------------
 
5232
# See if the linker supports building shared libraries.
 
5233
m4_defun([_LT_LINKER_SHLIBS],
 
5234
[AC_REQUIRE([LT_PATH_LD])dnl
 
5235
AC_REQUIRE([LT_PATH_NM])dnl
 
5236
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
5237
m4_require([_LT_DECL_EGREP])dnl
 
5238
m4_require([_LT_DECL_SED])dnl
 
5239
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
5240
m4_require([_LT_TAG_COMPILER])dnl
 
5241
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
5242
m4_if([$1], [CXX], [
 
5243
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5244
  case $host_os in
 
5245
  aix[[4-9]]*)
 
5246
    # If we're using GNU nm, then we don't want the "-C" option.
 
5247
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5248
    # Also, AIX nm treats weak defined symbols like other global defined
 
5249
    # symbols, whereas GNU nm marks them as "W".
 
5250
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 
5251
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
5252
    else
 
5253
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
5254
    fi
 
5255
    ;;
 
5256
  pw32*)
 
5257
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
5258
  ;;
 
5259
  cygwin* | mingw* | cegcc*)
 
5260
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
 
5261
  ;;
 
5262
  *)
 
5263
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5264
  ;;
 
5265
  esac
 
5266
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 
5267
], [
 
5268
  runpath_var=
 
5269
  _LT_TAGVAR(allow_undefined_flag, $1)=
 
5270
  _LT_TAGVAR(always_export_symbols, $1)=no
 
5271
  _LT_TAGVAR(archive_cmds, $1)=
 
5272
  _LT_TAGVAR(archive_expsym_cmds, $1)=
 
5273
  _LT_TAGVAR(compiler_needs_object, $1)=no
 
5274
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
5275
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
5276
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5277
  _LT_TAGVAR(hardcode_automatic, $1)=no
 
5278
  _LT_TAGVAR(hardcode_direct, $1)=no
 
5279
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
5280
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5281
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
5282
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
5283
  _LT_TAGVAR(hardcode_minus_L, $1)=no
 
5284
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
5285
  _LT_TAGVAR(inherit_rpath, $1)=no
 
5286
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
 
5287
  _LT_TAGVAR(module_cmds, $1)=
 
5288
  _LT_TAGVAR(module_expsym_cmds, $1)=
 
5289
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
 
5290
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
5291
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
 
5292
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
5293
  # include_expsyms should be a list of space-separated symbols to be *always*
 
5294
  # included in the symbol list
 
5295
  _LT_TAGVAR(include_expsyms, $1)=
 
5296
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
5297
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
5298
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
5299
  # as well as any symbol that contains `d'.
 
5300
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 
5301
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
5302
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
5303
  # the symbol is explicitly referenced.  Since portable code cannot
 
5304
  # rely on this symbol name, it's probably fine to never include it in
 
5305
  # preloaded symbol tables.
 
5306
  # Exclude shared library initialization/finalization symbols.
 
5307
dnl Note also adjust exclude_expsyms for C++ above.
 
5308
  extract_expsyms_cmds=
 
5309
 
 
5310
  case $host_os in
 
5311
  cygwin* | mingw* | pw32* | cegcc*)
 
5312
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
5313
    # When not using gcc, we currently assume that we are using
 
5314
    # Microsoft Visual C++.
 
5315
    if test "$GCC" != yes; then
 
5316
      with_gnu_ld=no
 
5317
    fi
 
5318
    ;;
 
5319
  interix*)
 
5320
    # we just hope/assume this is gcc and not c89 (= MSVC++)
 
5321
    with_gnu_ld=yes
 
5322
    ;;
 
5323
  openbsd*)
 
5324
    with_gnu_ld=no
 
5325
    ;;
 
5326
  esac
 
5327
 
 
5328
  _LT_TAGVAR(ld_shlibs, $1)=yes
 
5329
 
 
5330
  # On some targets, GNU ld is compatible enough with the native linker
 
5331
  # that we're better off using the native interface for both.
 
5332
  lt_use_gnu_ld_interface=no
 
5333
  if test "$with_gnu_ld" = yes; then
 
5334
    case $host_os in
 
5335
      aix*)
 
5336
        # The AIX port of GNU ld has always aspired to compatibility
 
5337
        # with the native linker.  However, as the warning in the GNU ld
 
5338
        # block says, versions before 2.19.5* couldn't really create working
 
5339
        # shared libraries, regardless of the interface used.
 
5340
        case `$LD -v 2>&1` in
 
5341
          *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
 
5342
          *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
 
5343
          *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
 
5344
          *)
 
5345
            lt_use_gnu_ld_interface=yes
 
5346
            ;;
 
5347
        esac
 
5348
        ;;
 
5349
      *)
 
5350
        lt_use_gnu_ld_interface=yes
 
5351
        ;;
 
5352
    esac
 
5353
  fi
 
5354
 
 
5355
  if test "$lt_use_gnu_ld_interface" = yes; then
 
5356
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
5357
    wlarc='${wl}'
 
5358
 
 
5359
    # Set some defaults for GNU ld with shared library support. These
 
5360
    # are reset later if shared libraries are not supported. Putting them
 
5361
    # here allows them to be overridden if necessary.
 
5362
    runpath_var=LD_RUN_PATH
 
5363
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5364
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
5365
    # ancient GNU ld didn't support --whole-archive et. al.
 
5366
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
 
5367
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
5368
    else
 
5369
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
5370
    fi
 
5371
    supports_anon_versioning=no
 
5372
    case `$LD -v 2>&1` in
 
5373
      *GNU\ gold*) supports_anon_versioning=yes ;;
 
5374
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
5375
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
5376
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
5377
      *\ 2.11.*) ;; # other 2.11 versions
 
5378
      *) supports_anon_versioning=yes ;;
 
5379
    esac
 
5380
 
 
5381
    # See if GNU ld supports shared libraries.
 
5382
    case $host_os in
 
5383
    aix[[3-9]]*)
 
5384
      # On AIX/PPC, the GNU linker is very broken
 
5385
      if test "$host_cpu" != ia64; then
 
5386
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5387
        cat <<_LT_EOF 1>&2
 
5388
 
 
5389
*** Warning: the GNU linker, at least up to release 2.19, is reported
 
5390
*** to be unable to reliably create shared libraries on AIX.
 
5391
*** Therefore, libtool is disabling shared libraries support.  If you
 
5392
*** really care for shared libraries, you may want to install binutils
 
5393
*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
 
5394
*** You will then need to restart the configuration process.
 
5395
 
 
5396
_LT_EOF
 
5397
      fi
 
5398
      ;;
 
5399
 
 
5400
    amigaos*)
 
5401
      case $host_cpu in
 
5402
      powerpc)
 
5403
            # see comment about AmigaOS4 .so support
 
5404
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5405
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
 
5406
        ;;
 
5407
      m68k)
 
5408
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
5409
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5410
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5411
        ;;
 
5412
      esac
 
5413
      ;;
 
5414
 
 
5415
    beos*)
 
5416
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
5417
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5418
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
5419
        # support --undefined.  This deserves some investigation.  FIXME
 
5420
        _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5421
      else
 
5422
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5423
      fi
 
5424
      ;;
 
5425
 
 
5426
    cygwin* | mingw* | pw32* | cegcc*)
 
5427
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
5428
      # as there is no search path for DLLs.
 
5429
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5430
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
 
5431
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5432
      _LT_TAGVAR(always_export_symbols, $1)=no
 
5433
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5434
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
 
5435
 
 
5436
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
5437
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
5438
        # If the export-symbols file already is a .def file (1st line
 
5439
        # is EXPORTS), use it as is; otherwise, prepend...
 
5440
        _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
5441
          cp $export_symbols $output_objdir/$soname.def;
 
5442
        else
 
5443
          echo EXPORTS > $output_objdir/$soname.def;
 
5444
          cat $export_symbols >> $output_objdir/$soname.def;
 
5445
        fi~
 
5446
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
5447
      else
 
5448
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5449
      fi
 
5450
      ;;
 
5451
 
 
5452
    haiku*)
 
5453
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5454
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
5455
      ;;
 
5456
 
 
5457
    interix[[3-9]]*)
 
5458
      _LT_TAGVAR(hardcode_direct, $1)=no
 
5459
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5460
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5461
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5462
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
5463
      # Instead, shared libraries are loaded at an image base (0x10000000 by
 
5464
      # default) and relocated if they conflict, which is a slow very memory
 
5465
      # consuming and fragmenting process.  To avoid this, we pick a random,
 
5466
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
5467
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
5468
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
5469
      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
5470
      ;;
 
5471
 
 
5472
    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
 
5473
      tmp_diet=no
 
5474
      if test "$host_os" = linux-dietlibc; then
 
5475
        case $cc_basename in
 
5476
          diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
 
5477
        esac
 
5478
      fi
 
5479
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
 
5480
         && test "$tmp_diet" = no
 
5481
      then
 
5482
        tmp_addflag=
 
5483
        tmp_sharedflag='-shared'
 
5484
        case $cc_basename,$host_cpu in
 
5485
        pgcc*)                          # Portland Group C compiler
 
5486
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
5487
          tmp_addflag=' $pic_flag'
 
5488
          ;;
 
5489
        pgf77* | pgf90* | pgf95* | pgfortran*)
 
5490
                                        # Portland Group f77 and f90 compilers
 
5491
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
5492
          tmp_addflag=' $pic_flag -Mnomain' ;;
 
5493
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
 
5494
          tmp_addflag=' -i_dynamic' ;;
 
5495
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
 
5496
          tmp_addflag=' -i_dynamic -nofor_main' ;;
 
5497
        ifc* | ifort*)                  # Intel Fortran compiler
 
5498
          tmp_addflag=' -nofor_main' ;;
 
5499
        lf95*)                          # Lahey Fortran 8.1
 
5500
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
5501
          tmp_sharedflag='--shared' ;;
 
5502
        xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 
5503
          tmp_sharedflag='-qmkshrobj'
 
5504
          tmp_addflag= ;;
 
5505
        nvcc*)  # Cuda Compiler Driver 2.2
 
5506
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
5507
          _LT_TAGVAR(compiler_needs_object, $1)=yes
 
5508
          ;;
 
5509
        esac
 
5510
        case `$CC -V 2>&1 | sed 5q` in
 
5511
        *Sun\ C*)                       # Sun C 5.9
 
5512
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
5513
          _LT_TAGVAR(compiler_needs_object, $1)=yes
 
5514
          tmp_sharedflag='-G' ;;
 
5515
        *Sun\ F*)                       # Sun Fortran 8.3
 
5516
          tmp_sharedflag='-G' ;;
 
5517
        esac
 
5518
        _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5519
 
 
5520
        if test "x$supports_anon_versioning" = xyes; then
 
5521
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
5522
            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
5523
            echo "local: *; };" >> $output_objdir/$libname.ver~
 
5524
            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
5525
        fi
 
5526
 
 
5527
        case $cc_basename in
 
5528
        xlf* | bgf* | bgxlf* | mpixlf*)
 
5529
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 
5530
          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
 
5531
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5532
          _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
5533
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 
5534
          if test "x$supports_anon_versioning" = xyes; then
 
5535
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
5536
              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
5537
              echo "local: *; };" >> $output_objdir/$libname.ver~
 
5538
              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 
5539
          fi
 
5540
          ;;
 
5541
        esac
 
5542
      else
 
5543
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5544
      fi
 
5545
      ;;
 
5546
 
 
5547
    netbsd*)
 
5548
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
5549
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
5550
        wlarc=
 
5551
      else
 
5552
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5553
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5554
      fi
 
5555
      ;;
 
5556
 
 
5557
    solaris*)
 
5558
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
 
5559
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5560
        cat <<_LT_EOF 1>&2
 
5561
 
 
5562
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
5563
*** create shared libraries on Solaris systems.  Therefore, libtool
 
5564
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
5565
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
5566
*** your PATH or compiler configuration so that the native linker is
 
5567
*** used, and then restart.
 
5568
 
 
5569
_LT_EOF
 
5570
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
5571
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5572
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5573
      else
 
5574
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5575
      fi
 
5576
      ;;
 
5577
 
 
5578
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
 
5579
      case `$LD -v 2>&1` in
 
5580
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
 
5581
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5582
        cat <<_LT_EOF 1>&2
 
5583
 
 
5584
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
 
5585
*** reliably create shared libraries on SCO systems.  Therefore, libtool
 
5586
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
5587
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
 
5588
*** your PATH or compiler configuration so that the native linker is
 
5589
*** used, and then restart.
 
5590
 
 
5591
_LT_EOF
 
5592
        ;;
 
5593
        *)
 
5594
          # For security reasons, it is highly recommended that you always
 
5595
          # use absolute paths for naming shared libraries, and exclude the
 
5596
          # DT_RUNPATH tag from executables and libraries.  But doing so
 
5597
          # requires that you compile everything twice, which is a pain.
 
5598
          if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
5599
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5600
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5601
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5602
          else
 
5603
            _LT_TAGVAR(ld_shlibs, $1)=no
 
5604
          fi
 
5605
        ;;
 
5606
      esac
 
5607
      ;;
 
5608
 
 
5609
    sunos4*)
 
5610
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
5611
      wlarc=
 
5612
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5613
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5614
      ;;
 
5615
 
 
5616
    *)
 
5617
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
5618
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5619
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5620
      else
 
5621
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5622
      fi
 
5623
      ;;
 
5624
    esac
 
5625
 
 
5626
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
 
5627
      runpath_var=
 
5628
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5629
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
5630
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
5631
    fi
 
5632
  else
 
5633
    # PORTME fill in a description of your system's linker (not GNU ld)
 
5634
    case $host_os in
 
5635
    aix3*)
 
5636
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5637
      _LT_TAGVAR(always_export_symbols, $1)=yes
 
5638
      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
 
5639
      # Note: this linker hardcodes the directories in LIBPATH if there
 
5640
      # are no directories specified by -L.
 
5641
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5642
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
 
5643
        # Neither direct hardcoding nor static linking is supported with a
 
5644
        # broken collect2.
 
5645
        _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
5646
      fi
 
5647
      ;;
 
5648
 
 
5649
    aix[[4-9]]*)
 
5650
      if test "$host_cpu" = ia64; then
 
5651
        # On IA64, the linker does run time linking by default, so we don't
 
5652
        # have to do anything special.
 
5653
        aix_use_runtimelinking=no
 
5654
        exp_sym_flag='-Bexport'
 
5655
        no_entry_flag=""
 
5656
      else
 
5657
        # If we're using GNU nm, then we don't want the "-C" option.
 
5658
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5659
        # Also, AIX nm treats weak defined symbols like other global
 
5660
        # defined symbols, whereas GNU nm marks them as "W".
 
5661
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 
5662
          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
5663
        else
 
5664
          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
5665
        fi
 
5666
        aix_use_runtimelinking=no
 
5667
 
 
5668
        # Test if we are trying to use run time linking or normal
 
5669
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
5670
        # need to do runtime linking.
 
5671
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 
5672
          for ld_flag in $LDFLAGS; do
 
5673
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
5674
            aix_use_runtimelinking=yes
 
5675
            break
 
5676
          fi
 
5677
          done
 
5678
          ;;
 
5679
        esac
 
5680
 
 
5681
        exp_sym_flag='-bexport'
 
5682
        no_entry_flag='-bnoentry'
 
5683
      fi
 
5684
 
 
5685
      # When large executables or shared objects are built, AIX ld can
 
5686
      # have problems creating the table of contents.  If linking a library
 
5687
      # or program results in "error TOC overflow" add -mminimal-toc to
 
5688
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
5689
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
5690
 
 
5691
      _LT_TAGVAR(archive_cmds, $1)=''
 
5692
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5693
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
5694
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
5695
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
5696
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
5697
 
 
5698
      if test "$GCC" = yes; then
 
5699
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
5700
        # We only want to do this on AIX 4.2 and lower, the check
 
5701
        # below for broken collect2 doesn't work under 4.3+
 
5702
          collect2name=`${CC} -print-prog-name=collect2`
 
5703
          if test -f "$collect2name" &&
 
5704
           strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 
5705
          then
 
5706
          # We have reworked collect2
 
5707
          :
 
5708
          else
 
5709
          # We have old collect2
 
5710
          _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
5711
          # It fails to find uninstalled libraries when the uninstalled
 
5712
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
5713
          # to unsupported forces relinking
 
5714
          _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5715
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5716
          _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
5717
          fi
 
5718
          ;;
 
5719
        esac
 
5720
        shared_flag='-shared'
 
5721
        if test "$aix_use_runtimelinking" = yes; then
 
5722
          shared_flag="$shared_flag "'${wl}-G'
 
5723
        fi
 
5724
      else
 
5725
        # not using gcc
 
5726
        if test "$host_cpu" = ia64; then
 
5727
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
5728
        # chokes on -Wl,-G. The following line is correct:
 
5729
          shared_flag='-G'
 
5730
        else
 
5731
          if test "$aix_use_runtimelinking" = yes; then
 
5732
            shared_flag='${wl}-G'
 
5733
          else
 
5734
            shared_flag='${wl}-bM:SRE'
 
5735
          fi
 
5736
        fi
 
5737
      fi
 
5738
 
 
5739
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
 
5740
      # It seems that -bexpall does not export symbols beginning with
 
5741
      # underscore (_), so it is better to generate a list of symbols to export.
 
5742
      _LT_TAGVAR(always_export_symbols, $1)=yes
 
5743
      if test "$aix_use_runtimelinking" = yes; then
 
5744
        # Warning - without using the other runtime loading flags (-brtl),
 
5745
        # -berok will link without error, but may produce a broken library.
 
5746
        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
 
5747
        # Determine the default libpath from the value encoded in an
 
5748
        # empty executable.
 
5749
        _LT_SYS_MODULE_PATH_AIX
 
5750
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
5751
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
5752
      else
 
5753
        if test "$host_cpu" = ia64; then
 
5754
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
5755
          _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
5756
          _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
 
5757
        else
 
5758
         # Determine the default libpath from the value encoded in an
 
5759
         # empty executable.
 
5760
         _LT_SYS_MODULE_PATH_AIX
 
5761
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
5762
          # Warning - without using the other run time loading flags,
 
5763
          # -berok will link without error, but may produce a broken library.
 
5764
          _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
5765
          _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
5766
          if test "$with_gnu_ld" = yes; then
 
5767
            # We only use this code for GNU lds that support --whole-archive.
 
5768
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
5769
          else
 
5770
            # Exported symbols can be pulled into shared objects from archives
 
5771
            _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
5772
          fi
 
5773
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
5774
          # This is similar to how AIX traditionally builds its shared libraries.
 
5775
          _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
5776
        fi
 
5777
      fi
 
5778
      ;;
 
5779
 
 
5780
    amigaos*)
 
5781
      case $host_cpu in
 
5782
      powerpc)
 
5783
            # see comment about AmigaOS4 .so support
 
5784
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5785
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
 
5786
        ;;
 
5787
      m68k)
 
5788
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
5789
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5790
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5791
        ;;
 
5792
      esac
 
5793
      ;;
 
5794
 
 
5795
    bsdi[[45]]*)
 
5796
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
5797
      ;;
 
5798
 
 
5799
    cygwin* | mingw* | pw32* | cegcc*)
 
5800
      # When not using gcc, we currently assume that we are using
 
5801
      # Microsoft Visual C++.
 
5802
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
5803
      # no search path for DLLs.
 
5804
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
5805
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5806
      # Tell ltmain to make .lib files, not .a files.
 
5807
      libext=lib
 
5808
      # Tell ltmain to make .dll files, not .so files.
 
5809
      shrext_cmds=".dll"
 
5810
      # FIXME: Setting linknames here is a bad hack.
 
5811
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
 
5812
      # The linker will automatically build a .lib file if we build a DLL.
 
5813
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
5814
      # FIXME: Should let the user specify the lib program.
 
5815
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
 
5816
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
 
5817
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5818
      ;;
 
5819
 
 
5820
    darwin* | rhapsody*)
 
5821
      _LT_DARWIN_LINKER_FEATURES($1)
 
5822
      ;;
 
5823
 
 
5824
    dgux*)
 
5825
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5826
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5827
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5828
      ;;
 
5829
 
 
5830
    freebsd1*)
 
5831
      _LT_TAGVAR(ld_shlibs, $1)=no
 
5832
      ;;
 
5833
 
 
5834
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
5835
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
5836
    # does not break anything, and helps significantly (at the cost of a little
 
5837
    # extra space).
 
5838
    freebsd2.2*)
 
5839
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
5840
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5841
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5842
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5843
      ;;
 
5844
 
 
5845
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
5846
    freebsd2*)
 
5847
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
5848
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5849
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5850
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5851
      ;;
 
5852
 
 
5853
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
5854
    freebsd* | dragonfly*)
 
5855
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
5856
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5857
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5858
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5859
      ;;
 
5860
 
 
5861
    hpux9*)
 
5862
      if test "$GCC" = yes; then
 
5863
        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
5864
      else
 
5865
        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
5866
      fi
 
5867
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5868
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
5869
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5870
 
 
5871
      # hardcode_minus_L: Not really in the search PATH,
 
5872
      # but as the default location of the library.
 
5873
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5874
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5875
      ;;
 
5876
 
 
5877
    hpux10*)
 
5878
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
 
5879
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
5880
      else
 
5881
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
5882
      fi
 
5883
      if test "$with_gnu_ld" = no; then
 
5884
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5885
        _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
5886
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
5887
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
5888
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
5889
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5890
        # hardcode_minus_L: Not really in the search PATH,
 
5891
        # but as the default location of the library.
 
5892
        _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5893
      fi
 
5894
      ;;
 
5895
 
 
5896
    hpux11*)
 
5897
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
 
5898
        case $host_cpu in
 
5899
        hppa*64*)
 
5900
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5901
          ;;
 
5902
        ia64*)
 
5903
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
5904
          ;;
 
5905
        *)
 
5906
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
5907
          ;;
 
5908
        esac
 
5909
      else
 
5910
        case $host_cpu in
 
5911
        hppa*64*)
 
5912
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5913
          ;;
 
5914
        ia64*)
 
5915
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
5916
          ;;
 
5917
        *)
 
5918
        m4_if($1, [], [
 
5919
          # Older versions of the 11.00 compiler do not understand -b yet
 
5920
          # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
 
5921
          _LT_LINKER_OPTION([if $CC understands -b],
 
5922
            _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
 
5923
            [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
 
5924
            [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
 
5925
          [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
 
5926
          ;;
 
5927
        esac
 
5928
      fi
 
5929
      if test "$with_gnu_ld" = no; then
 
5930
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5931
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
5932
 
 
5933
        case $host_cpu in
 
5934
        hppa*64*|ia64*)
 
5935
          _LT_TAGVAR(hardcode_direct, $1)=no
 
5936
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5937
          ;;
 
5938
        *)
 
5939
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
5940
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
5941
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5942
 
 
5943
          # hardcode_minus_L: Not really in the search PATH,
 
5944
          # but as the default location of the library.
 
5945
          _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5946
          ;;
 
5947
        esac
 
5948
      fi
 
5949
      ;;
 
5950
 
 
5951
    irix5* | irix6* | nonstopux*)
 
5952
      if test "$GCC" = yes; then
 
5953
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5954
        # Try to use the -exported_symbol ld option, if it does not
 
5955
        # work, assume that -exports_file does not work either and
 
5956
        # implicitly export all symbols.
 
5957
        save_LDFLAGS="$LDFLAGS"
 
5958
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
 
5959
        AC_LINK_IFELSE(int foo(void) {},
 
5960
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
5961
        )
 
5962
        LDFLAGS="$save_LDFLAGS"
 
5963
      else
 
5964
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
5965
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
 
5966
      fi
 
5967
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
5968
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5969
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
5970
      _LT_TAGVAR(inherit_rpath, $1)=yes
 
5971
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
5972
      ;;
 
5973
 
 
5974
    netbsd*)
 
5975
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
5976
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
5977
      else
 
5978
        _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
5979
      fi
 
5980
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5981
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5982
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5983
      ;;
 
5984
 
 
5985
    newsos6)
 
5986
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5987
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5988
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5989
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
5990
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5991
      ;;
 
5992
 
 
5993
    *nto* | *qnx*)
 
5994
      ;;
 
5995
 
 
5996
    openbsd*)
 
5997
      if test -f /usr/libexec/ld.so; then
 
5998
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
5999
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6000
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6001
        if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
6002
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6003
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 
6004
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6005
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6006
        else
 
6007
          case $host_os in
 
6008
           openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
6009
             _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6010
             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6011
             ;;
 
6012
           *)
 
6013
             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6014
             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6015
             ;;
 
6016
          esac
 
6017
        fi
 
6018
      else
 
6019
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6020
      fi
 
6021
      ;;
 
6022
 
 
6023
    os2*)
 
6024
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6025
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6026
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6027
      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 
6028
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
6029
      ;;
 
6030
 
 
6031
    osf3*)
 
6032
      if test "$GCC" = yes; then
 
6033
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6034
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6035
      else
 
6036
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6037
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
6038
      fi
 
6039
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
6040
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6041
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6042
      ;;
 
6043
 
 
6044
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
6045
      if test "$GCC" = yes; then
 
6046
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6047
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6048
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6049
      else
 
6050
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6051
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
6052
        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
 
6053
        $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
6054
 
 
6055
        # Both c and cxx compiler support -rpath directly
 
6056
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
6057
      fi
 
6058
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
6059
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6060
      ;;
 
6061
 
 
6062
    solaris*)
 
6063
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
 
6064
      if test "$GCC" = yes; then
 
6065
        wlarc='${wl}'
 
6066
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6067
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6068
          $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 
6069
      else
 
6070
        case `$CC -V 2>&1` in
 
6071
        *"Compilers 5.0"*)
 
6072
          wlarc=''
 
6073
          _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6074
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6075
          $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 
6076
          ;;
 
6077
        *)
 
6078
          wlarc='${wl}'
 
6079
          _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
6080
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6081
          $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 
6082
          ;;
 
6083
        esac
 
6084
      fi
 
6085
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6086
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6087
      case $host_os in
 
6088
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
6089
      *)
 
6090
        # The compiler driver will combine and reorder linker options,
 
6091
        # but understands `-z linker_flag'.  GCC discards it without `$wl',
 
6092
        # but is careful enough not to reorder.
 
6093
        # Supported since Solaris 2.6 (maybe 2.5.1?)
 
6094
        if test "$GCC" = yes; then
 
6095
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
6096
        else
 
6097
          _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 
6098
        fi
 
6099
        ;;
 
6100
      esac
 
6101
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6102
      ;;
 
6103
 
 
6104
    sunos4*)
 
6105
      if test "x$host_vendor" = xsequent; then
 
6106
        # Use $CC to link under sequent, because it throws in some extra .o
 
6107
        # files that make .init and .fini sections work.
 
6108
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
6109
      else
 
6110
        _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
6111
      fi
 
6112
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6113
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6114
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6115
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6116
      ;;
 
6117
 
 
6118
    sysv4)
 
6119
      case $host_vendor in
 
6120
        sni)
 
6121
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6122
          _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
6123
        ;;
 
6124
        siemens)
 
6125
          ## LD is ld it makes a PLAMLIB
 
6126
          ## CC just makes a GrossModule.
 
6127
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
6128
          _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
6129
          _LT_TAGVAR(hardcode_direct, $1)=no
 
6130
        ;;
 
6131
        motorola)
 
6132
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6133
          _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
6134
        ;;
 
6135
      esac
 
6136
      runpath_var='LD_RUN_PATH'
 
6137
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6138
      ;;
 
6139
 
 
6140
    sysv4.3*)
 
6141
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6142
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6143
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
6144
      ;;
 
6145
 
 
6146
    sysv4*MP*)
 
6147
      if test -d /usr/nec; then
 
6148
        _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6149
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6150
        runpath_var=LD_RUN_PATH
 
6151
        hardcode_runpath_var=yes
 
6152
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
6153
      fi
 
6154
      ;;
 
6155
 
 
6156
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
6157
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
6158
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
6159
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6160
      runpath_var='LD_RUN_PATH'
 
6161
 
 
6162
      if test "$GCC" = yes; then
 
6163
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6164
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6165
      else
 
6166
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6167
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6168
      fi
 
6169
      ;;
 
6170
 
 
6171
    sysv5* | sco3.2v5* | sco5v6*)
 
6172
      # Note: We can NOT use -z defs as we might desire, because we do not
 
6173
      # link with -lc, and that would cause any symbols used from libc to
 
6174
      # always be unresolved, which means just about no library would
 
6175
      # ever link correctly.  If we're not using GNU ld we use -z text
 
6176
      # though, which does catch some bad symbols but isn't as heavy-handed
 
6177
      # as -z defs.
 
6178
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
6179
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
6180
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
6181
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6182
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
 
6183
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
6184
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6185
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
6186
      runpath_var='LD_RUN_PATH'
 
6187
 
 
6188
      if test "$GCC" = yes; then
 
6189
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6190
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6191
      else
 
6192
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6193
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6194
      fi
 
6195
      ;;
 
6196
 
 
6197
    uts4*)
 
6198
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6199
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6200
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6201
      ;;
 
6202
 
 
6203
    *)
 
6204
      _LT_TAGVAR(ld_shlibs, $1)=no
 
6205
      ;;
 
6206
    esac
 
6207
 
 
6208
    if test x$host_vendor = xsni; then
 
6209
      case $host in
 
6210
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
6211
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
 
6212
        ;;
 
6213
      esac
 
6214
    fi
 
6215
  fi
 
6216
])
 
6217
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
 
6218
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
6219
 
 
6220
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
 
6221
 
 
6222
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
 
6223
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
 
6224
_LT_DECL([], [extract_expsyms_cmds], [2],
 
6225
    [The commands to extract the exported symbol list from a shared archive])
 
6226
 
 
6227
#
 
6228
# Do we need to explicitly link libc?
 
6229
#
 
6230
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
 
6231
x|xyes)
 
6232
  # Assume -lc should be added
 
6233
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6234
 
 
6235
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
6236
    case $_LT_TAGVAR(archive_cmds, $1) in
 
6237
    *'~'*)
 
6238
      # FIXME: we may have to deal with multi-command sequences.
 
6239
      ;;
 
6240
    '$CC '*)
 
6241
      # Test whether the compiler implicitly links with -lc since on some
 
6242
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
6243
      # to ld, don't add -lc before -lgcc.
 
6244
      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
 
6245
        [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
 
6246
        [$RM conftest*
 
6247
        echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6248
 
 
6249
        if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
6250
          soname=conftest
 
6251
          lib=conftest
 
6252
          libobjs=conftest.$ac_objext
 
6253
          deplibs=
 
6254
          wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
 
6255
          pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
 
6256
          compiler_flags=-v
 
6257
          linker_flags=-v
 
6258
          verstring=
 
6259
          output_objdir=.
 
6260
          libname=conftest
 
6261
          lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
 
6262
          _LT_TAGVAR(allow_undefined_flag, $1)=
 
6263
          if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
 
6264
          then
 
6265
            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
6266
          else
 
6267
            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6268
          fi
 
6269
          _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
6270
        else
 
6271
          cat conftest.err 1>&5
 
6272
        fi
 
6273
        $RM conftest*
 
6274
        ])
 
6275
      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
 
6276
      ;;
 
6277
    esac
 
6278
  fi
 
6279
  ;;
 
6280
esac
 
6281
 
 
6282
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
 
6283
    [Whether or not to add -lc for building shared libraries])
 
6284
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
 
6285
    [enable_shared_with_static_runtimes], [0],
 
6286
    [Whether or not to disallow shared libs when runtime libs are static])
 
6287
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
 
6288
    [Compiler flag to allow reflexive dlopens])
 
6289
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
 
6290
    [Compiler flag to generate shared objects directly from archives])
 
6291
_LT_TAGDECL([], [compiler_needs_object], [1],
 
6292
    [Whether the compiler copes with passing no objects directly])
 
6293
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
 
6294
    [Create an old-style archive from a shared archive])
 
6295
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
 
6296
    [Create a temporary old-style archive to link instead of a shared archive])
 
6297
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
 
6298
_LT_TAGDECL([], [archive_expsym_cmds], [2])
 
6299
_LT_TAGDECL([], [module_cmds], [2],
 
6300
    [Commands used to build a loadable module if different from building
 
6301
    a shared archive.])
 
6302
_LT_TAGDECL([], [module_expsym_cmds], [2])
 
6303
_LT_TAGDECL([], [with_gnu_ld], [1],
 
6304
    [Whether we are building with GNU ld or not])
 
6305
_LT_TAGDECL([], [allow_undefined_flag], [1],
 
6306
    [Flag that allows shared libraries with undefined symbols to be built])
 
6307
_LT_TAGDECL([], [no_undefined_flag], [1],
 
6308
    [Flag that enforces no undefined symbols])
 
6309
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
 
6310
    [Flag to hardcode $libdir into a binary during linking.
 
6311
    This must work even if $libdir does not exist])
 
6312
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
 
6313
    [[If ld is used when linking, flag to hardcode $libdir into a binary
 
6314
    during linking.  This must work even if $libdir does not exist]])
 
6315
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
 
6316
    [Whether we need a single "-rpath" flag with a separated argument])
 
6317
_LT_TAGDECL([], [hardcode_direct], [0],
 
6318
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
 
6319
    DIR into the resulting binary])
 
6320
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
 
6321
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
 
6322
    DIR into the resulting binary and the resulting library dependency is
 
6323
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
 
6324
    library is relocated])
 
6325
_LT_TAGDECL([], [hardcode_minus_L], [0],
 
6326
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
 
6327
    into the resulting binary])
 
6328
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
 
6329
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
 
6330
    into the resulting binary])
 
6331
_LT_TAGDECL([], [hardcode_automatic], [0],
 
6332
    [Set to "yes" if building a shared library automatically hardcodes DIR
 
6333
    into the library and all subsequent libraries and executables linked
 
6334
    against it])
 
6335
_LT_TAGDECL([], [inherit_rpath], [0],
 
6336
    [Set to yes if linker adds runtime paths of dependent libraries
 
6337
    to runtime path list])
 
6338
_LT_TAGDECL([], [link_all_deplibs], [0],
 
6339
    [Whether libtool must link a program against all its dependency libraries])
 
6340
_LT_TAGDECL([], [fix_srcfile_path], [1],
 
6341
    [Fix the shell variable $srcfile for the compiler])
 
6342
_LT_TAGDECL([], [always_export_symbols], [0],
 
6343
    [Set to "yes" if exported symbols are required])
 
6344
_LT_TAGDECL([], [export_symbols_cmds], [2],
 
6345
    [The commands to list exported symbols])
 
6346
_LT_TAGDECL([], [exclude_expsyms], [1],
 
6347
    [Symbols that should not be listed in the preloaded symbols])
 
6348
_LT_TAGDECL([], [include_expsyms], [1],
 
6349
    [Symbols that must always be exported])
 
6350
_LT_TAGDECL([], [prelink_cmds], [2],
 
6351
    [Commands necessary for linking programs (against libraries) with templates])
 
6352
_LT_TAGDECL([], [file_list_spec], [1],
 
6353
    [Specify filename containing input files])
 
6354
dnl FIXME: Not yet implemented
 
6355
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
 
6356
dnl    [Compiler flag to generate thread safe objects])
 
6357
])# _LT_LINKER_SHLIBS
 
6358
 
 
6359
 
 
6360
# _LT_LANG_C_CONFIG([TAG])
 
6361
# ------------------------
 
6362
# Ensure that the configuration variables for a C compiler are suitably
 
6363
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
6364
# the compiler configuration to `libtool'.
 
6365
m4_defun([_LT_LANG_C_CONFIG],
 
6366
[m4_require([_LT_DECL_EGREP])dnl
 
6367
lt_save_CC="$CC"
 
6368
AC_LANG_PUSH(C)
 
6369
 
 
6370
# Source file extension for C test sources.
 
6371
ac_ext=c
 
6372
 
 
6373
# Object file extension for compiled C test sources.
 
6374
objext=o
 
6375
_LT_TAGVAR(objext, $1)=$objext
 
6376
 
 
6377
# Code to be used in simple compile tests
 
6378
lt_simple_compile_test_code="int some_variable = 0;"
 
6379
 
 
6380
# Code to be used in simple link tests
 
6381
lt_simple_link_test_code='int main(){return(0);}'
 
6382
 
 
6383
_LT_TAG_COMPILER
 
6384
# Save the default compiler, since it gets overwritten when the other
 
6385
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
 
6386
compiler_DEFAULT=$CC
 
6387
 
 
6388
# save warnings/boilerplate of simple test code
 
6389
_LT_COMPILER_BOILERPLATE
 
6390
_LT_LINKER_BOILERPLATE
 
6391
 
 
6392
if test -n "$compiler"; then
 
6393
  _LT_COMPILER_NO_RTTI($1)
 
6394
  _LT_COMPILER_PIC($1)
 
6395
  _LT_COMPILER_C_O($1)
 
6396
  _LT_COMPILER_FILE_LOCKS($1)
 
6397
  _LT_LINKER_SHLIBS($1)
 
6398
  _LT_SYS_DYNAMIC_LINKER($1)
 
6399
  _LT_LINKER_HARDCODE_LIBPATH($1)
 
6400
  LT_SYS_DLOPEN_SELF
 
6401
  _LT_CMD_STRIPLIB
 
6402
 
 
6403
  # Report which library types will actually be built
 
6404
  AC_MSG_CHECKING([if libtool supports shared libraries])
 
6405
  AC_MSG_RESULT([$can_build_shared])
 
6406
 
 
6407
  AC_MSG_CHECKING([whether to build shared libraries])
 
6408
  test "$can_build_shared" = "no" && enable_shared=no
 
6409
 
 
6410
  # On AIX, shared libraries and static libraries use the same namespace, and
 
6411
  # are all built from PIC.
 
6412
  case $host_os in
 
6413
  aix3*)
 
6414
    test "$enable_shared" = yes && enable_static=no
 
6415
    if test -n "$RANLIB"; then
 
6416
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
6417
      postinstall_cmds='$RANLIB $lib'
 
6418
    fi
 
6419
    ;;
 
6420
 
 
6421
  aix[[4-9]]*)
 
6422
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
6423
      test "$enable_shared" = yes && enable_static=no
 
6424
    fi
 
6425
    ;;
 
6426
  esac
 
6427
  AC_MSG_RESULT([$enable_shared])
 
6428
 
 
6429
  AC_MSG_CHECKING([whether to build static libraries])
 
6430
  # Make sure either enable_shared or enable_static is yes.
 
6431
  test "$enable_shared" = yes || enable_static=yes
 
6432
  AC_MSG_RESULT([$enable_static])
 
6433
 
 
6434
  _LT_CONFIG($1)
 
6435
fi
 
6436
AC_LANG_POP
 
6437
CC="$lt_save_CC"
 
6438
])# _LT_LANG_C_CONFIG
 
6439
 
 
6440
 
 
6441
# _LT_LANG_CXX_CONFIG([TAG])
 
6442
# --------------------------
 
6443
# Ensure that the configuration variables for a C++ compiler are suitably
 
6444
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
6445
# the compiler configuration to `libtool'.
 
6446
m4_defun([_LT_LANG_CXX_CONFIG],
 
6447
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
6448
m4_require([_LT_DECL_EGREP])dnl
 
6449
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
6450
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
6451
    (test "X$CXX" != "Xg++"))) ; then
 
6452
  AC_PROG_CXXCPP
 
6453
else
 
6454
  _lt_caught_CXX_error=yes
 
6455
fi
 
6456
 
 
6457
AC_LANG_PUSH(C++)
 
6458
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
6459
_LT_TAGVAR(allow_undefined_flag, $1)=
 
6460
_LT_TAGVAR(always_export_symbols, $1)=no
 
6461
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
6462
_LT_TAGVAR(compiler_needs_object, $1)=no
 
6463
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
6464
_LT_TAGVAR(hardcode_direct, $1)=no
 
6465
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
6466
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
6467
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
6468
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
6469
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
6470
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
6471
_LT_TAGVAR(hardcode_automatic, $1)=no
 
6472
_LT_TAGVAR(inherit_rpath, $1)=no
 
6473
_LT_TAGVAR(module_cmds, $1)=
 
6474
_LT_TAGVAR(module_expsym_cmds, $1)=
 
6475
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
6476
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
6477
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
6478
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
6479
_LT_TAGVAR(no_undefined_flag, $1)=
 
6480
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6481
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
6482
 
 
6483
# Source file extension for C++ test sources.
 
6484
ac_ext=cpp
 
6485
 
 
6486
# Object file extension for compiled C++ test sources.
 
6487
objext=o
 
6488
_LT_TAGVAR(objext, $1)=$objext
 
6489
 
 
6490
# No sense in running all these tests if we already determined that
 
6491
# the CXX compiler isn't working.  Some variables (like enable_shared)
 
6492
# are currently assumed to apply to all compilers on this platform,
 
6493
# and will be corrupted by setting them based on a non-working compiler.
 
6494
if test "$_lt_caught_CXX_error" != yes; then
 
6495
  # Code to be used in simple compile tests
 
6496
  lt_simple_compile_test_code="int some_variable = 0;"
 
6497
 
 
6498
  # Code to be used in simple link tests
 
6499
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
 
6500
 
 
6501
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
6502
  _LT_TAG_COMPILER
 
6503
 
 
6504
  # save warnings/boilerplate of simple test code
 
6505
  _LT_COMPILER_BOILERPLATE
 
6506
  _LT_LINKER_BOILERPLATE
 
6507
 
 
6508
  # Allow CC to be a program name with arguments.
 
6509
  lt_save_CC=$CC
 
6510
  lt_save_LD=$LD
 
6511
  lt_save_GCC=$GCC
 
6512
  GCC=$GXX
 
6513
  lt_save_with_gnu_ld=$with_gnu_ld
 
6514
  lt_save_path_LD=$lt_cv_path_LD
 
6515
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
6516
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
6517
  else
 
6518
    $as_unset lt_cv_prog_gnu_ld
 
6519
  fi
 
6520
  if test -n "${lt_cv_path_LDCXX+set}"; then
 
6521
    lt_cv_path_LD=$lt_cv_path_LDCXX
 
6522
  else
 
6523
    $as_unset lt_cv_path_LD
 
6524
  fi
 
6525
  test -z "${LDCXX+set}" || LD=$LDCXX
 
6526
  CC=${CXX-"c++"}
 
6527
  compiler=$CC
 
6528
  _LT_TAGVAR(compiler, $1)=$CC
 
6529
  _LT_CC_BASENAME([$compiler])
 
6530
 
 
6531
  if test -n "$compiler"; then
 
6532
    # We don't want -fno-exception when compiling C++ code, so set the
 
6533
    # no_builtin_flag separately
 
6534
    if test "$GXX" = yes; then
 
6535
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
6536
    else
 
6537
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
6538
    fi
 
6539
 
 
6540
    if test "$GXX" = yes; then
 
6541
      # Set up default GNU C++ configuration
 
6542
 
 
6543
      LT_PATH_LD
 
6544
 
 
6545
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
6546
      # archiving commands below assume that GNU ld is being used.
 
6547
      if test "$with_gnu_ld" = yes; then
 
6548
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6549
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
6550
 
 
6551
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6552
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
6553
 
 
6554
        # If archive_cmds runs LD, not CC, wlarc should be empty
 
6555
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
6556
        #     investigate it a little bit more. (MM)
 
6557
        wlarc='${wl}'
 
6558
 
 
6559
        # ancient GNU ld didn't support --whole-archive et. al.
 
6560
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
 
6561
          $GREP 'no-whole-archive' > /dev/null; then
 
6562
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
6563
        else
 
6564
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6565
        fi
 
6566
      else
 
6567
        with_gnu_ld=no
 
6568
        wlarc=
 
6569
 
 
6570
        # A generic and very simple default shared library creation
 
6571
        # command for GNU C++ for the case where it uses the native
 
6572
        # linker, instead of GNU ld.  If possible, this setting should
 
6573
        # overridden to take advantage of the native linker features on
 
6574
        # the platform it is being used on.
 
6575
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
6576
      fi
 
6577
 
 
6578
      # Commands to make compiler produce verbose output that lists
 
6579
      # what "hidden" libraries, object files and flags are used when
 
6580
      # linking a shared library.
 
6581
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
6582
 
 
6583
    else
 
6584
      GXX=no
 
6585
      with_gnu_ld=no
 
6586
      wlarc=
 
6587
    fi
 
6588
 
 
6589
    # PORTME: fill in a description of your system's C++ link characteristics
 
6590
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
6591
    _LT_TAGVAR(ld_shlibs, $1)=yes
 
6592
    case $host_os in
 
6593
      aix3*)
 
6594
        # FIXME: insert proper C++ library support
 
6595
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6596
        ;;
 
6597
      aix[[4-9]]*)
 
6598
        if test "$host_cpu" = ia64; then
 
6599
          # On IA64, the linker does run time linking by default, so we don't
 
6600
          # have to do anything special.
 
6601
          aix_use_runtimelinking=no
 
6602
          exp_sym_flag='-Bexport'
 
6603
          no_entry_flag=""
 
6604
        else
 
6605
          aix_use_runtimelinking=no
 
6606
 
 
6607
          # Test if we are trying to use run time linking or normal
 
6608
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
6609
          # need to do runtime linking.
 
6610
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 
6611
            for ld_flag in $LDFLAGS; do
 
6612
              case $ld_flag in
 
6613
              *-brtl*)
 
6614
                aix_use_runtimelinking=yes
 
6615
                break
 
6616
                ;;
 
6617
              esac
 
6618
            done
 
6619
            ;;
 
6620
          esac
 
6621
 
 
6622
          exp_sym_flag='-bexport'
 
6623
          no_entry_flag='-bnoentry'
 
6624
        fi
 
6625
 
 
6626
        # When large executables or shared objects are built, AIX ld can
 
6627
        # have problems creating the table of contents.  If linking a library
 
6628
        # or program results in "error TOC overflow" add -mminimal-toc to
 
6629
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
6630
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
6631
 
 
6632
        _LT_TAGVAR(archive_cmds, $1)=''
 
6633
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
6634
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6635
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
6636
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6637
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
6638
 
 
6639
        if test "$GXX" = yes; then
 
6640
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
6641
          # We only want to do this on AIX 4.2 and lower, the check
 
6642
          # below for broken collect2 doesn't work under 4.3+
 
6643
          collect2name=`${CC} -print-prog-name=collect2`
 
6644
          if test -f "$collect2name" &&
 
6645
             strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 
6646
          then
 
6647
            # We have reworked collect2
 
6648
            :
 
6649
          else
 
6650
            # We have old collect2
 
6651
            _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
6652
            # It fails to find uninstalled libraries when the uninstalled
 
6653
            # path is not listed in the libpath.  Setting hardcode_minus_L
 
6654
            # to unsupported forces relinking
 
6655
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6656
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6657
            _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
6658
          fi
 
6659
          esac
 
6660
          shared_flag='-shared'
 
6661
          if test "$aix_use_runtimelinking" = yes; then
 
6662
            shared_flag="$shared_flag "'${wl}-G'
 
6663
          fi
 
6664
        else
 
6665
          # not using gcc
 
6666
          if test "$host_cpu" = ia64; then
 
6667
          # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
6668
          # chokes on -Wl,-G. The following line is correct:
 
6669
          shared_flag='-G'
 
6670
          else
 
6671
            if test "$aix_use_runtimelinking" = yes; then
 
6672
              shared_flag='${wl}-G'
 
6673
            else
 
6674
              shared_flag='${wl}-bM:SRE'
 
6675
            fi
 
6676
          fi
 
6677
        fi
 
6678
 
 
6679
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
 
6680
        # It seems that -bexpall does not export symbols beginning with
 
6681
        # underscore (_), so it is better to generate a list of symbols to
 
6682
        # export.
 
6683
        _LT_TAGVAR(always_export_symbols, $1)=yes
 
6684
        if test "$aix_use_runtimelinking" = yes; then
 
6685
          # Warning - without using the other runtime loading flags (-brtl),
 
6686
          # -berok will link without error, but may produce a broken library.
 
6687
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
 
6688
          # Determine the default libpath from the value encoded in an empty
 
6689
          # executable.
 
6690
          _LT_SYS_MODULE_PATH_AIX
 
6691
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
6692
 
 
6693
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
6694
        else
 
6695
          if test "$host_cpu" = ia64; then
 
6696
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
6697
            _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
6698
            _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
 
6699
          else
 
6700
            # Determine the default libpath from the value encoded in an
 
6701
            # empty executable.
 
6702
            _LT_SYS_MODULE_PATH_AIX
 
6703
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
6704
            # Warning - without using the other run time loading flags,
 
6705
            # -berok will link without error, but may produce a broken library.
 
6706
            _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
6707
            _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
6708
            if test "$with_gnu_ld" = yes; then
 
6709
              # We only use this code for GNU lds that support --whole-archive.
 
6710
              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
6711
            else
 
6712
              # Exported symbols can be pulled into shared objects from archives
 
6713
              _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
6714
            fi
 
6715
            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6716
            # This is similar to how AIX traditionally builds its shared
 
6717
            # libraries.
 
6718
            _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
6719
          fi
 
6720
        fi
 
6721
        ;;
 
6722
 
 
6723
      beos*)
 
6724
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
6725
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6726
          # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
6727
          # support --undefined.  This deserves some investigation.  FIXME
 
6728
          _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6729
        else
 
6730
          _LT_TAGVAR(ld_shlibs, $1)=no
 
6731
        fi
 
6732
        ;;
 
6733
 
 
6734
      chorus*)
 
6735
        case $cc_basename in
 
6736
          *)
 
6737
          # FIXME: insert proper C++ library support
 
6738
          _LT_TAGVAR(ld_shlibs, $1)=no
 
6739
          ;;
 
6740
        esac
 
6741
        ;;
 
6742
 
 
6743
      cygwin* | mingw* | pw32* | cegcc*)
 
6744
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
6745
        # as there is no search path for DLLs.
 
6746
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6747
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
 
6748
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6749
        _LT_TAGVAR(always_export_symbols, $1)=no
 
6750
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6751
 
 
6752
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
6753
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
6754
          # If the export-symbols file already is a .def file (1st line
 
6755
          # is EXPORTS), use it as is; otherwise, prepend...
 
6756
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
6757
            cp $export_symbols $output_objdir/$soname.def;
 
6758
          else
 
6759
            echo EXPORTS > $output_objdir/$soname.def;
 
6760
            cat $export_symbols >> $output_objdir/$soname.def;
 
6761
          fi~
 
6762
          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
6763
        else
 
6764
          _LT_TAGVAR(ld_shlibs, $1)=no
 
6765
        fi
 
6766
        ;;
 
6767
      darwin* | rhapsody*)
 
6768
        _LT_DARWIN_LINKER_FEATURES($1)
 
6769
        ;;
 
6770
 
 
6771
      dgux*)
 
6772
        case $cc_basename in
 
6773
          ec++*)
 
6774
            # FIXME: insert proper C++ library support
 
6775
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6776
            ;;
 
6777
          ghcx*)
 
6778
            # Green Hills C++ Compiler
 
6779
            # FIXME: insert proper C++ library support
 
6780
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6781
            ;;
 
6782
          *)
 
6783
            # FIXME: insert proper C++ library support
 
6784
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6785
            ;;
 
6786
        esac
 
6787
        ;;
 
6788
 
 
6789
      freebsd[[12]]*)
 
6790
        # C++ shared libraries reported to be fairly broken before
 
6791
        # switch to ELF
 
6792
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6793
        ;;
 
6794
 
 
6795
      freebsd-elf*)
 
6796
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
6797
        ;;
 
6798
 
 
6799
      freebsd* | dragonfly*)
 
6800
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
6801
        # conventions
 
6802
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
6803
        ;;
 
6804
 
 
6805
      gnu*)
 
6806
        ;;
 
6807
 
 
6808
      haiku*)
 
6809
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6810
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6811
        ;;
 
6812
 
 
6813
      hpux9*)
 
6814
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6815
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6816
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6817
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
6818
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
6819
                                             # but as the default
 
6820
                                             # location of the library.
 
6821
 
 
6822
        case $cc_basename in
 
6823
          CC*)
 
6824
            # FIXME: insert proper C++ library support
 
6825
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6826
            ;;
 
6827
          aCC*)
 
6828
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
6829
            # Commands to make compiler produce verbose output that lists
 
6830
            # what "hidden" libraries, object files and flags are used when
 
6831
            # linking a shared library.
 
6832
            #
 
6833
            # There doesn't appear to be a way to prevent this compiler from
 
6834
            # explicitly linking system object files so we need to strip them
 
6835
            # from the output so that they don't get included in the library
 
6836
            # dependencies.
 
6837
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
6838
            ;;
 
6839
          *)
 
6840
            if test "$GXX" = yes; then
 
6841
              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
6842
            else
 
6843
              # FIXME: insert proper C++ library support
 
6844
              _LT_TAGVAR(ld_shlibs, $1)=no
 
6845
            fi
 
6846
            ;;
 
6847
        esac
 
6848
        ;;
 
6849
 
 
6850
      hpux10*|hpux11*)
 
6851
        if test $with_gnu_ld = no; then
 
6852
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6853
          _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6854
 
 
6855
          case $host_cpu in
 
6856
            hppa*64*|ia64*)
 
6857
              ;;
 
6858
            *)
 
6859
              _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6860
              ;;
 
6861
          esac
 
6862
        fi
 
6863
        case $host_cpu in
 
6864
          hppa*64*|ia64*)
 
6865
            _LT_TAGVAR(hardcode_direct, $1)=no
 
6866
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6867
            ;;
 
6868
          *)
 
6869
            _LT_TAGVAR(hardcode_direct, $1)=yes
 
6870
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6871
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
6872
                                                 # but as the default
 
6873
                                                 # location of the library.
 
6874
            ;;
 
6875
        esac
 
6876
 
 
6877
        case $cc_basename in
 
6878
          CC*)
 
6879
            # FIXME: insert proper C++ library support
 
6880
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6881
            ;;
 
6882
          aCC*)
 
6883
            case $host_cpu in
 
6884
              hppa*64*)
 
6885
                _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
6886
                ;;
 
6887
              ia64*)
 
6888
                _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
6889
                ;;
 
6890
              *)
 
6891
                _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
6892
                ;;
 
6893
            esac
 
6894
            # Commands to make compiler produce verbose output that lists
 
6895
            # what "hidden" libraries, object files and flags are used when
 
6896
            # linking a shared library.
 
6897
            #
 
6898
            # There doesn't appear to be a way to prevent this compiler from
 
6899
            # explicitly linking system object files so we need to strip them
 
6900
            # from the output so that they don't get included in the library
 
6901
            # dependencies.
 
6902
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
6903
            ;;
 
6904
          *)
 
6905
            if test "$GXX" = yes; then
 
6906
              if test $with_gnu_ld = no; then
 
6907
                case $host_cpu in
 
6908
                  hppa*64*)
 
6909
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
6910
                    ;;
 
6911
                  ia64*)
 
6912
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
6913
                    ;;
 
6914
                  *)
 
6915
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
6916
                    ;;
 
6917
                esac
 
6918
              fi
 
6919
            else
 
6920
              # FIXME: insert proper C++ library support
 
6921
              _LT_TAGVAR(ld_shlibs, $1)=no
 
6922
            fi
 
6923
            ;;
 
6924
        esac
 
6925
        ;;
 
6926
 
 
6927
      interix[[3-9]]*)
 
6928
        _LT_TAGVAR(hardcode_direct, $1)=no
 
6929
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6930
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6931
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6932
        # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
6933
        # Instead, shared libraries are loaded at an image base (0x10000000 by
 
6934
        # default) and relocated if they conflict, which is a slow very memory
 
6935
        # consuming and fragmenting process.  To avoid this, we pick a random,
 
6936
        # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
6937
        # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
6938
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
6939
        _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
6940
        ;;
 
6941
      irix5* | irix6*)
 
6942
        case $cc_basename in
 
6943
          CC*)
 
6944
            # SGI C++
 
6945
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
6946
 
 
6947
            # Archives containing C++ object files must be created using
 
6948
            # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
6949
            # necessary to make sure instantiated templates are included
 
6950
            # in the archive.
 
6951
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
6952
            ;;
 
6953
          *)
 
6954
            if test "$GXX" = yes; then
 
6955
              if test "$with_gnu_ld" = no; then
 
6956
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6957
              else
 
6958
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
 
6959
              fi
 
6960
            fi
 
6961
            _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6962
            ;;
 
6963
        esac
 
6964
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6965
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6966
        _LT_TAGVAR(inherit_rpath, $1)=yes
 
6967
        ;;
 
6968
 
 
6969
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
6970
        case $cc_basename in
 
6971
          KCC*)
 
6972
            # Kuck and Associates, Inc. (KAI) C++ Compiler
 
6973
 
 
6974
            # KCC will only create a shared library if the output file
 
6975
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
6976
            # to its proper name (with version) after linking.
 
6977
            _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
6978
            _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 
6979
            # Commands to make compiler produce verbose output that lists
 
6980
            # what "hidden" libraries, object files and flags are used when
 
6981
            # linking a shared library.
 
6982
            #
 
6983
            # There doesn't appear to be a way to prevent this compiler from
 
6984
            # explicitly linking system object files so we need to strip them
 
6985
            # from the output so that they don't get included in the library
 
6986
            # dependencies.
 
6987
            output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
6988
 
 
6989
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6990
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
6991
 
 
6992
            # Archives containing C++ object files must be created using
 
6993
            # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
6994
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
6995
            ;;
 
6996
          icpc* | ecpc* )
 
6997
            # Intel C++
 
6998
            with_gnu_ld=yes
 
6999
            # version 8.0 and above of icpc choke on multiply defined symbols
 
7000
            # if we add $predep_objects and $postdep_objects, however 7.1 and
 
7001
            # earlier do not add the objects themselves.
 
7002
            case `$CC -V 2>&1` in
 
7003
              *"Version 7."*)
 
7004
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7005
                _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
7006
                ;;
 
7007
              *)  # Version 8.0 or newer
 
7008
                tmp_idyn=
 
7009
                case $host_cpu in
 
7010
                  ia64*) tmp_idyn=' -i_dynamic';;
 
7011
                esac
 
7012
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7013
                _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
7014
                ;;
 
7015
            esac
 
7016
            _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7017
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7018
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7019
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
7020
            ;;
 
7021
          pgCC* | pgcpp*)
 
7022
            # Portland Group C++ compiler
 
7023
            case `$CC -V` in
 
7024
            *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
 
7025
              _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
 
7026
                rm -rf $tpldir~
 
7027
                $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
 
7028
                compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
 
7029
              _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
 
7030
                rm -rf $tpldir~
 
7031
                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
 
7032
                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
 
7033
                $RANLIB $oldlib'
 
7034
              _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
 
7035
                rm -rf $tpldir~
 
7036
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
 
7037
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
7038
              _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
 
7039
                rm -rf $tpldir~
 
7040
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
 
7041
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 
7042
              ;;
 
7043
            *) # Version 6 and above use weak symbols
 
7044
              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
7045
              _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 
7046
              ;;
 
7047
            esac
 
7048
 
 
7049
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
7050
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7051
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
7052
            ;;
 
7053
          cxx*)
 
7054
            # Compaq C++
 
7055
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7056
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
7057
 
 
7058
            runpath_var=LD_RUN_PATH
 
7059
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
7060
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7061
 
 
7062
            # Commands to make compiler produce verbose output that lists
 
7063
            # what "hidden" libraries, object files and flags are used when
 
7064
            # linking a shared library.
 
7065
            #
 
7066
            # There doesn't appear to be a way to prevent this compiler from
 
7067
            # explicitly linking system object files so we need to strip them
 
7068
            # from the output so that they don't get included in the library
 
7069
            # dependencies.
 
7070
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
 
7071
            ;;
 
7072
          xl* | mpixl* | bgxl*)
 
7073
            # IBM XL 8.0 on PPC, with GNU ld
 
7074
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7075
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7076
            _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7077
            if test "x$supports_anon_versioning" = xyes; then
 
7078
              _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
7079
                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
7080
                echo "local: *; };" >> $output_objdir/$libname.ver~
 
7081
                $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
7082
            fi
 
7083
            ;;
 
7084
          *)
 
7085
            case `$CC -V 2>&1 | sed 5q` in
 
7086
            *Sun\ C*)
 
7087
              # Sun C++ 5.9
 
7088
              _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
7089
              _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7090
              _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
 
7091
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7092
              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
7093
              _LT_TAGVAR(compiler_needs_object, $1)=yes
 
7094
 
 
7095
              # Not sure whether something based on
 
7096
              # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
 
7097
              # would be better.
 
7098
              output_verbose_link_cmd='func_echo_all'
 
7099
 
 
7100
              # Archives containing C++ object files must be created using
 
7101
              # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
7102
              # necessary to make sure instantiated templates are included
 
7103
              # in the archive.
 
7104
              _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
7105
              ;;
 
7106
            esac
 
7107
            ;;
 
7108
        esac
 
7109
        ;;
 
7110
 
 
7111
      lynxos*)
 
7112
        # FIXME: insert proper C++ library support
 
7113
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7114
        ;;
 
7115
 
 
7116
      m88k*)
 
7117
        # FIXME: insert proper C++ library support
 
7118
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7119
        ;;
 
7120
 
 
7121
      mvs*)
 
7122
        case $cc_basename in
 
7123
          cxx*)
 
7124
            # FIXME: insert proper C++ library support
 
7125
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7126
            ;;
 
7127
          *)
 
7128
            # FIXME: insert proper C++ library support
 
7129
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7130
            ;;
 
7131
        esac
 
7132
        ;;
 
7133
 
 
7134
      netbsd*)
 
7135
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
7136
          _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
7137
          wlarc=
 
7138
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7139
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
7140
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7141
        fi
 
7142
        # Workaround some broken pre-1.5 toolchains
 
7143
        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
7144
        ;;
 
7145
 
 
7146
      *nto* | *qnx*)
 
7147
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
7148
        ;;
 
7149
 
 
7150
      openbsd2*)
 
7151
        # C++ shared libraries are fairly broken
 
7152
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7153
        ;;
 
7154
 
 
7155
      openbsd*)
 
7156
        if test -f /usr/libexec/ld.so; then
 
7157
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
7158
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7159
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
7160
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
7161
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7162
          if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
7163
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
 
7164
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7165
            _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
7166
          fi
 
7167
          output_verbose_link_cmd=func_echo_all
 
7168
        else
 
7169
          _LT_TAGVAR(ld_shlibs, $1)=no
 
7170
        fi
 
7171
        ;;
 
7172
 
 
7173
      osf3* | osf4* | osf5*)
 
7174
        case $cc_basename in
 
7175
          KCC*)
 
7176
            # Kuck and Associates, Inc. (KAI) C++ Compiler
 
7177
 
 
7178
            # KCC will only create a shared library if the output file
 
7179
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
7180
            # to its proper name (with version) after linking.
 
7181
            _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
7182
 
 
7183
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7184
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7185
 
 
7186
            # Archives containing C++ object files must be created using
 
7187
            # the KAI C++ compiler.
 
7188
            case $host in
 
7189
              osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
 
7190
              *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
 
7191
            esac
 
7192
            ;;
 
7193
          RCC*)
 
7194
            # Rational C++ 2.4.1
 
7195
            # FIXME: insert proper C++ library support
 
7196
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7197
            ;;
 
7198
          cxx*)
 
7199
            case $host in
 
7200
              osf3*)
 
7201
                _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
7202
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
7203
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7204
                ;;
 
7205
              *)
 
7206
                _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
7207
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
7208
                _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
7209
                  echo "-hidden">> $lib.exp~
 
7210
                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
 
7211
                  $RM $lib.exp'
 
7212
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
7213
                ;;
 
7214
            esac
 
7215
 
 
7216
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7217
 
 
7218
            # Commands to make compiler produce verbose output that lists
 
7219
            # what "hidden" libraries, object files and flags are used when
 
7220
            # linking a shared library.
 
7221
            #
 
7222
            # There doesn't appear to be a way to prevent this compiler from
 
7223
            # explicitly linking system object files so we need to strip them
 
7224
            # from the output so that they don't get included in the library
 
7225
            # dependencies.
 
7226
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
7227
            ;;
 
7228
          *)
 
7229
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
7230
              _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
7231
              case $host in
 
7232
                osf3*)
 
7233
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
7234
                  ;;
 
7235
                *)
 
7236
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
7237
                  ;;
 
7238
              esac
 
7239
 
 
7240
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7241
              _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7242
 
 
7243
              # Commands to make compiler produce verbose output that lists
 
7244
              # what "hidden" libraries, object files and flags are used when
 
7245
              # linking a shared library.
 
7246
              output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
7247
 
 
7248
            else
 
7249
              # FIXME: insert proper C++ library support
 
7250
              _LT_TAGVAR(ld_shlibs, $1)=no
 
7251
            fi
 
7252
            ;;
 
7253
        esac
 
7254
        ;;
 
7255
 
 
7256
      psos*)
 
7257
        # FIXME: insert proper C++ library support
 
7258
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7259
        ;;
 
7260
 
 
7261
      sunos4*)
 
7262
        case $cc_basename in
 
7263
          CC*)
 
7264
            # Sun C++ 4.x
 
7265
            # FIXME: insert proper C++ library support
 
7266
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7267
            ;;
 
7268
          lcc*)
 
7269
            # Lucid
 
7270
            # FIXME: insert proper C++ library support
 
7271
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7272
            ;;
 
7273
          *)
 
7274
            # FIXME: insert proper C++ library support
 
7275
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7276
            ;;
 
7277
        esac
 
7278
        ;;
 
7279
 
 
7280
      solaris*)
 
7281
        case $cc_basename in
 
7282
          CC* | sunCC*)
 
7283
            # Sun C++ 4.2, 5.x and Centerline C++
 
7284
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
 
7285
            _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
7286
            _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7287
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
7288
              $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
7289
 
 
7290
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7291
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7292
            case $host_os in
 
7293
              solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
7294
              *)
 
7295
                # The compiler driver will combine and reorder linker options,
 
7296
                # but understands `-z linker_flag'.
 
7297
                # Supported since Solaris 2.6 (maybe 2.5.1?)
 
7298
                _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 
7299
                ;;
 
7300
            esac
 
7301
            _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7302
 
 
7303
            output_verbose_link_cmd='func_echo_all'
 
7304
 
 
7305
            # Archives containing C++ object files must be created using
 
7306
            # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
7307
            # necessary to make sure instantiated templates are included
 
7308
            # in the archive.
 
7309
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
7310
            ;;
 
7311
          gcx*)
 
7312
            # Green Hills C++ Compiler
 
7313
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
7314
 
 
7315
            # The C++ compiler must be used to create the archive.
 
7316
            _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
7317
            ;;
 
7318
          *)
 
7319
            # GNU C++ compiler with Solaris linker
 
7320
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
7321
              _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
7322
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
 
7323
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
7324
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
7325
                  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
7326
 
 
7327
                # Commands to make compiler produce verbose output that lists
 
7328
                # what "hidden" libraries, object files and flags are used when
 
7329
                # linking a shared library.
 
7330
                output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
7331
              else
 
7332
                # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
7333
                # platform.
 
7334
                _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
7335
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
7336
                  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
7337
 
 
7338
                # Commands to make compiler produce verbose output that lists
 
7339
                # what "hidden" libraries, object files and flags are used when
 
7340
                # linking a shared library.
 
7341
                output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
7342
              fi
 
7343
 
 
7344
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
7345
              case $host_os in
 
7346
                solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
7347
                *)
 
7348
                  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
7349
                  ;;
 
7350
              esac
 
7351
            fi
 
7352
            ;;
 
7353
        esac
 
7354
        ;;
 
7355
 
 
7356
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
7357
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
7358
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7359
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7360
      runpath_var='LD_RUN_PATH'
 
7361
 
 
7362
      case $cc_basename in
 
7363
        CC*)
 
7364
          _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7365
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7366
          ;;
 
7367
        *)
 
7368
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7369
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7370
          ;;
 
7371
      esac
 
7372
      ;;
 
7373
 
 
7374
      sysv5* | sco3.2v5* | sco5v6*)
 
7375
        # Note: We can NOT use -z defs as we might desire, because we do not
 
7376
        # link with -lc, and that would cause any symbols used from libc to
 
7377
        # always be unresolved, which means just about no library would
 
7378
        # ever link correctly.  If we're not using GNU ld we use -z text
 
7379
        # though, which does catch some bad symbols but isn't as heavy-handed
 
7380
        # as -z defs.
 
7381
        _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
7382
        _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
7383
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7384
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7385
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
 
7386
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
7387
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7388
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
7389
        runpath_var='LD_RUN_PATH'
 
7390
 
 
7391
        case $cc_basename in
 
7392
          CC*)
 
7393
            _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7394
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7395
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
 
7396
              '"$_LT_TAGVAR(old_archive_cmds, $1)"
 
7397
            _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
 
7398
              '"$_LT_TAGVAR(reload_cmds, $1)"
 
7399
            ;;
 
7400
          *)
 
7401
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7402
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7403
            ;;
 
7404
        esac
 
7405
      ;;
 
7406
 
 
7407
      tandem*)
 
7408
        case $cc_basename in
 
7409
          NCC*)
 
7410
            # NonStop-UX NCC 3.20
 
7411
            # FIXME: insert proper C++ library support
 
7412
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7413
            ;;
 
7414
          *)
 
7415
            # FIXME: insert proper C++ library support
 
7416
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7417
            ;;
 
7418
        esac
 
7419
        ;;
 
7420
 
 
7421
      vxworks*)
 
7422
        # FIXME: insert proper C++ library support
 
7423
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7424
        ;;
 
7425
 
 
7426
      *)
 
7427
        # FIXME: insert proper C++ library support
 
7428
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7429
        ;;
 
7430
    esac
 
7431
 
 
7432
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
 
7433
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
7434
 
 
7435
    _LT_TAGVAR(GCC, $1)="$GXX"
 
7436
    _LT_TAGVAR(LD, $1)="$LD"
 
7437
 
 
7438
    ## CAVEAT EMPTOR:
 
7439
    ## There is no encapsulation within the following macros, do not change
 
7440
    ## the running order or otherwise move them around unless you know exactly
 
7441
    ## what you are doing...
 
7442
    _LT_SYS_HIDDEN_LIBDEPS($1)
 
7443
    _LT_COMPILER_PIC($1)
 
7444
    _LT_COMPILER_C_O($1)
 
7445
    _LT_COMPILER_FILE_LOCKS($1)
 
7446
    _LT_LINKER_SHLIBS($1)
 
7447
    _LT_SYS_DYNAMIC_LINKER($1)
 
7448
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
7449
 
 
7450
    _LT_CONFIG($1)
 
7451
  fi # test -n "$compiler"
 
7452
 
 
7453
  CC=$lt_save_CC
 
7454
  LDCXX=$LD
 
7455
  LD=$lt_save_LD
 
7456
  GCC=$lt_save_GCC
 
7457
  with_gnu_ld=$lt_save_with_gnu_ld
 
7458
  lt_cv_path_LDCXX=$lt_cv_path_LD
 
7459
  lt_cv_path_LD=$lt_save_path_LD
 
7460
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
7461
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
7462
fi # test "$_lt_caught_CXX_error" != yes
 
7463
 
 
7464
AC_LANG_POP
 
7465
])# _LT_LANG_CXX_CONFIG
 
7466
 
 
7467
 
 
7468
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 
7469
# ---------------------------------
 
7470
# Figure out "hidden" library dependencies from verbose
 
7471
# compiler output when linking a shared library.
 
7472
# Parse the compiler output and extract the necessary
 
7473
# objects, libraries and library flags.
 
7474
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
 
7475
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
7476
# Dependencies to place before and after the object being linked:
 
7477
_LT_TAGVAR(predep_objects, $1)=
 
7478
_LT_TAGVAR(postdep_objects, $1)=
 
7479
_LT_TAGVAR(predeps, $1)=
 
7480
_LT_TAGVAR(postdeps, $1)=
 
7481
_LT_TAGVAR(compiler_lib_search_path, $1)=
 
7482
 
 
7483
dnl we can't use the lt_simple_compile_test_code here,
 
7484
dnl because it contains code intended for an executable,
 
7485
dnl not a library.  It's possible we should let each
 
7486
dnl tag define a new lt_????_link_test_code variable,
 
7487
dnl but it's only used here...
 
7488
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
 
7489
int a;
 
7490
void foo (void) { a = 0; }
 
7491
_LT_EOF
 
7492
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
 
7493
class Foo
 
7494
{
 
7495
public:
 
7496
  Foo (void) { a = 0; }
 
7497
private:
 
7498
  int a;
 
7499
};
 
7500
_LT_EOF
 
7501
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
 
7502
      subroutine foo
 
7503
      implicit none
 
7504
      integer*4 a
 
7505
      a=0
 
7506
      return
 
7507
      end
 
7508
_LT_EOF
 
7509
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
 
7510
      subroutine foo
 
7511
      implicit none
 
7512
      integer a
 
7513
      a=0
 
7514
      return
 
7515
      end
 
7516
_LT_EOF
 
7517
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
 
7518
public class foo {
 
7519
  private int a;
 
7520
  public void bar (void) {
 
7521
    a = 0;
 
7522
  }
 
7523
};
 
7524
_LT_EOF
 
7525
])
 
7526
dnl Parse the compiler output and extract the necessary
 
7527
dnl objects, libraries and library flags.
 
7528
if AC_TRY_EVAL(ac_compile); then
 
7529
  # Parse the compiler output and extract the necessary
 
7530
  # objects, libraries and library flags.
 
7531
 
 
7532
  # Sentinel used to keep track of whether or not we are before
 
7533
  # the conftest object file.
 
7534
  pre_test_object_deps_done=no
 
7535
 
 
7536
  for p in `eval "$output_verbose_link_cmd"`; do
 
7537
    case $p in
 
7538
 
 
7539
    -L* | -R* | -l*)
 
7540
       # Some compilers place space between "-{L,R}" and the path.
 
7541
       # Remove the space.
 
7542
       if test $p = "-L" ||
 
7543
          test $p = "-R"; then
 
7544
         prev=$p
 
7545
         continue
 
7546
       else
 
7547
         prev=
 
7548
       fi
 
7549
 
 
7550
       if test "$pre_test_object_deps_done" = no; then
 
7551
         case $p in
 
7552
         -L* | -R*)
 
7553
           # Internal compiler library paths should come after those
 
7554
           # provided the user.  The postdeps already come after the
 
7555
           # user supplied libs so there is no need to process them.
 
7556
           if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
 
7557
             _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
7558
           else
 
7559
             _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
7560
           fi
 
7561
           ;;
 
7562
         # The "-l" case would never come before the object being
 
7563
         # linked, so don't bother handling this case.
 
7564
         esac
 
7565
       else
 
7566
         if test -z "$_LT_TAGVAR(postdeps, $1)"; then
 
7567
           _LT_TAGVAR(postdeps, $1)="${prev}${p}"
 
7568
         else
 
7569
           _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
 
7570
         fi
 
7571
       fi
 
7572
       ;;
 
7573
 
 
7574
    *.$objext)
 
7575
       # This assumes that the test object file only shows up
 
7576
       # once in the compiler output.
 
7577
       if test "$p" = "conftest.$objext"; then
 
7578
         pre_test_object_deps_done=yes
 
7579
         continue
 
7580
       fi
 
7581
 
 
7582
       if test "$pre_test_object_deps_done" = no; then
 
7583
         if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
 
7584
           _LT_TAGVAR(predep_objects, $1)="$p"
 
7585
         else
 
7586
           _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
 
7587
         fi
 
7588
       else
 
7589
         if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
 
7590
           _LT_TAGVAR(postdep_objects, $1)="$p"
 
7591
         else
 
7592
           _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
 
7593
         fi
 
7594
       fi
 
7595
       ;;
 
7596
 
 
7597
    *) ;; # Ignore the rest.
 
7598
 
 
7599
    esac
 
7600
  done
 
7601
 
 
7602
  # Clean up.
 
7603
  rm -f a.out a.exe
 
7604
else
 
7605
  echo "libtool.m4: error: problem compiling $1 test program"
 
7606
fi
 
7607
 
 
7608
$RM -f confest.$objext
 
7609
 
 
7610
# PORTME: override above test on systems where it is broken
 
7611
m4_if([$1], [CXX],
 
7612
[case $host_os in
 
7613
interix[[3-9]]*)
 
7614
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
 
7615
  # hack all around it, let's just trust "g++" to DTRT.
 
7616
  _LT_TAGVAR(predep_objects,$1)=
 
7617
  _LT_TAGVAR(postdep_objects,$1)=
 
7618
  _LT_TAGVAR(postdeps,$1)=
 
7619
  ;;
 
7620
 
 
7621
linux*)
 
7622
  case `$CC -V 2>&1 | sed 5q` in
 
7623
  *Sun\ C*)
 
7624
    # Sun C++ 5.9
 
7625
 
 
7626
    # The more standards-conforming stlport4 library is
 
7627
    # incompatible with the Cstd library. Avoid specifying
 
7628
    # it if it's in CXXFLAGS. Ignore libCrun as
 
7629
    # -library=stlport4 depends on it.
 
7630
    case " $CXX $CXXFLAGS " in
 
7631
    *" -library=stlport4 "*)
 
7632
      solaris_use_stlport4=yes
 
7633
      ;;
 
7634
    esac
 
7635
 
 
7636
    if test "$solaris_use_stlport4" != yes; then
 
7637
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
7638
    fi
 
7639
    ;;
 
7640
  esac
 
7641
  ;;
 
7642
 
 
7643
solaris*)
 
7644
  case $cc_basename in
 
7645
  CC* | sunCC*)
 
7646
    # The more standards-conforming stlport4 library is
 
7647
    # incompatible with the Cstd library. Avoid specifying
 
7648
    # it if it's in CXXFLAGS. Ignore libCrun as
 
7649
    # -library=stlport4 depends on it.
 
7650
    case " $CXX $CXXFLAGS " in
 
7651
    *" -library=stlport4 "*)
 
7652
      solaris_use_stlport4=yes
 
7653
      ;;
 
7654
    esac
 
7655
 
 
7656
    # Adding this requires a known-good setup of shared libraries for
 
7657
    # Sun compiler versions before 5.6, else PIC objects from an old
 
7658
    # archive will be linked into the output, leading to subtle bugs.
 
7659
    if test "$solaris_use_stlport4" != yes; then
 
7660
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
7661
    fi
 
7662
    ;;
 
7663
  esac
 
7664
  ;;
 
7665
esac
 
7666
])
 
7667
 
 
7668
case " $_LT_TAGVAR(postdeps, $1) " in
 
7669
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
7670
esac
 
7671
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
 
7672
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
 
7673
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
 
7674
fi
 
7675
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
 
7676
    [The directories searched by this compiler when creating a shared library])
 
7677
_LT_TAGDECL([], [predep_objects], [1],
 
7678
    [Dependencies to place before and after the objects being linked to
 
7679
    create a shared library])
 
7680
_LT_TAGDECL([], [postdep_objects], [1])
 
7681
_LT_TAGDECL([], [predeps], [1])
 
7682
_LT_TAGDECL([], [postdeps], [1])
 
7683
_LT_TAGDECL([], [compiler_lib_search_path], [1],
 
7684
    [The library search path used internally by the compiler when linking
 
7685
    a shared library])
 
7686
])# _LT_SYS_HIDDEN_LIBDEPS
 
7687
 
 
7688
 
 
7689
# _LT_LANG_F77_CONFIG([TAG])
 
7690
# --------------------------
 
7691
# Ensure that the configuration variables for a Fortran 77 compiler are
 
7692
# suitably defined.  These variables are subsequently used by _LT_CONFIG
 
7693
# to write the compiler configuration to `libtool'.
 
7694
m4_defun([_LT_LANG_F77_CONFIG],
 
7695
[AC_LANG_PUSH(Fortran 77)
 
7696
if test -z "$F77" || test "X$F77" = "Xno"; then
 
7697
  _lt_disable_F77=yes
 
7698
fi
 
7699
 
 
7700
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7701
_LT_TAGVAR(allow_undefined_flag, $1)=
 
7702
_LT_TAGVAR(always_export_symbols, $1)=no
 
7703
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
7704
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
7705
_LT_TAGVAR(hardcode_direct, $1)=no
 
7706
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
7707
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7708
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
7709
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
7710
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
7711
_LT_TAGVAR(hardcode_automatic, $1)=no
 
7712
_LT_TAGVAR(inherit_rpath, $1)=no
 
7713
_LT_TAGVAR(module_cmds, $1)=
 
7714
_LT_TAGVAR(module_expsym_cmds, $1)=
 
7715
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
7716
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7717
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
7718
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
7719
_LT_TAGVAR(no_undefined_flag, $1)=
 
7720
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
7721
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
7722
 
 
7723
# Source file extension for f77 test sources.
 
7724
ac_ext=f
 
7725
 
 
7726
# Object file extension for compiled f77 test sources.
 
7727
objext=o
 
7728
_LT_TAGVAR(objext, $1)=$objext
 
7729
 
 
7730
# No sense in running all these tests if we already determined that
 
7731
# the F77 compiler isn't working.  Some variables (like enable_shared)
 
7732
# are currently assumed to apply to all compilers on this platform,
 
7733
# and will be corrupted by setting them based on a non-working compiler.
 
7734
if test "$_lt_disable_F77" != yes; then
 
7735
  # Code to be used in simple compile tests
 
7736
  lt_simple_compile_test_code="\
 
7737
      subroutine t
 
7738
      return
 
7739
      end
 
7740
"
 
7741
 
 
7742
  # Code to be used in simple link tests
 
7743
  lt_simple_link_test_code="\
 
7744
      program t
 
7745
      end
 
7746
"
 
7747
 
 
7748
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
7749
  _LT_TAG_COMPILER
 
7750
 
 
7751
  # save warnings/boilerplate of simple test code
 
7752
  _LT_COMPILER_BOILERPLATE
 
7753
  _LT_LINKER_BOILERPLATE
 
7754
 
 
7755
  # Allow CC to be a program name with arguments.
 
7756
  lt_save_CC="$CC"
 
7757
  lt_save_GCC=$GCC
 
7758
  CC=${F77-"f77"}
 
7759
  compiler=$CC
 
7760
  _LT_TAGVAR(compiler, $1)=$CC
 
7761
  _LT_CC_BASENAME([$compiler])
 
7762
  GCC=$G77
 
7763
  if test -n "$compiler"; then
 
7764
    AC_MSG_CHECKING([if libtool supports shared libraries])
 
7765
    AC_MSG_RESULT([$can_build_shared])
 
7766
 
 
7767
    AC_MSG_CHECKING([whether to build shared libraries])
 
7768
    test "$can_build_shared" = "no" && enable_shared=no
 
7769
 
 
7770
    # On AIX, shared libraries and static libraries use the same namespace, and
 
7771
    # are all built from PIC.
 
7772
    case $host_os in
 
7773
      aix3*)
 
7774
        test "$enable_shared" = yes && enable_static=no
 
7775
        if test -n "$RANLIB"; then
 
7776
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
7777
          postinstall_cmds='$RANLIB $lib'
 
7778
        fi
 
7779
        ;;
 
7780
      aix[[4-9]]*)
 
7781
        if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
7782
          test "$enable_shared" = yes && enable_static=no
 
7783
        fi
 
7784
        ;;
 
7785
    esac
 
7786
    AC_MSG_RESULT([$enable_shared])
 
7787
 
 
7788
    AC_MSG_CHECKING([whether to build static libraries])
 
7789
    # Make sure either enable_shared or enable_static is yes.
 
7790
    test "$enable_shared" = yes || enable_static=yes
 
7791
    AC_MSG_RESULT([$enable_static])
 
7792
 
 
7793
    _LT_TAGVAR(GCC, $1)="$G77"
 
7794
    _LT_TAGVAR(LD, $1)="$LD"
 
7795
 
 
7796
    ## CAVEAT EMPTOR:
 
7797
    ## There is no encapsulation within the following macros, do not change
 
7798
    ## the running order or otherwise move them around unless you know exactly
 
7799
    ## what you are doing...
 
7800
    _LT_COMPILER_PIC($1)
 
7801
    _LT_COMPILER_C_O($1)
 
7802
    _LT_COMPILER_FILE_LOCKS($1)
 
7803
    _LT_LINKER_SHLIBS($1)
 
7804
    _LT_SYS_DYNAMIC_LINKER($1)
 
7805
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
7806
 
 
7807
    _LT_CONFIG($1)
 
7808
  fi # test -n "$compiler"
 
7809
 
 
7810
  GCC=$lt_save_GCC
 
7811
  CC="$lt_save_CC"
 
7812
fi # test "$_lt_disable_F77" != yes
 
7813
 
 
7814
AC_LANG_POP
 
7815
])# _LT_LANG_F77_CONFIG
 
7816
 
 
7817
 
 
7818
# _LT_LANG_FC_CONFIG([TAG])
 
7819
# -------------------------
 
7820
# Ensure that the configuration variables for a Fortran compiler are
 
7821
# suitably defined.  These variables are subsequently used by _LT_CONFIG
 
7822
# to write the compiler configuration to `libtool'.
 
7823
m4_defun([_LT_LANG_FC_CONFIG],
 
7824
[AC_LANG_PUSH(Fortran)
 
7825
 
 
7826
if test -z "$FC" || test "X$FC" = "Xno"; then
 
7827
  _lt_disable_FC=yes
 
7828
fi
 
7829
 
 
7830
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7831
_LT_TAGVAR(allow_undefined_flag, $1)=
 
7832
_LT_TAGVAR(always_export_symbols, $1)=no
 
7833
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
7834
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
7835
_LT_TAGVAR(hardcode_direct, $1)=no
 
7836
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
7837
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7838
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
7839
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
7840
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
7841
_LT_TAGVAR(hardcode_automatic, $1)=no
 
7842
_LT_TAGVAR(inherit_rpath, $1)=no
 
7843
_LT_TAGVAR(module_cmds, $1)=
 
7844
_LT_TAGVAR(module_expsym_cmds, $1)=
 
7845
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
7846
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7847
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
7848
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
7849
_LT_TAGVAR(no_undefined_flag, $1)=
 
7850
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
7851
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
7852
 
 
7853
# Source file extension for fc test sources.
 
7854
ac_ext=${ac_fc_srcext-f}
 
7855
 
 
7856
# Object file extension for compiled fc test sources.
 
7857
objext=o
 
7858
_LT_TAGVAR(objext, $1)=$objext
 
7859
 
 
7860
# No sense in running all these tests if we already determined that
 
7861
# the FC compiler isn't working.  Some variables (like enable_shared)
 
7862
# are currently assumed to apply to all compilers on this platform,
 
7863
# and will be corrupted by setting them based on a non-working compiler.
 
7864
if test "$_lt_disable_FC" != yes; then
 
7865
  # Code to be used in simple compile tests
 
7866
  lt_simple_compile_test_code="\
 
7867
      subroutine t
 
7868
      return
 
7869
      end
 
7870
"
 
7871
 
 
7872
  # Code to be used in simple link tests
 
7873
  lt_simple_link_test_code="\
 
7874
      program t
 
7875
      end
 
7876
"
 
7877
 
 
7878
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
7879
  _LT_TAG_COMPILER
 
7880
 
 
7881
  # save warnings/boilerplate of simple test code
 
7882
  _LT_COMPILER_BOILERPLATE
 
7883
  _LT_LINKER_BOILERPLATE
 
7884
 
 
7885
  # Allow CC to be a program name with arguments.
 
7886
  lt_save_CC="$CC"
 
7887
  lt_save_GCC=$GCC
 
7888
  CC=${FC-"f95"}
 
7889
  compiler=$CC
 
7890
  GCC=$ac_cv_fc_compiler_gnu
 
7891
 
 
7892
  _LT_TAGVAR(compiler, $1)=$CC
 
7893
  _LT_CC_BASENAME([$compiler])
 
7894
 
 
7895
  if test -n "$compiler"; then
 
7896
    AC_MSG_CHECKING([if libtool supports shared libraries])
 
7897
    AC_MSG_RESULT([$can_build_shared])
 
7898
 
 
7899
    AC_MSG_CHECKING([whether to build shared libraries])
 
7900
    test "$can_build_shared" = "no" && enable_shared=no
 
7901
 
 
7902
    # On AIX, shared libraries and static libraries use the same namespace, and
 
7903
    # are all built from PIC.
 
7904
    case $host_os in
 
7905
      aix3*)
 
7906
        test "$enable_shared" = yes && enable_static=no
 
7907
        if test -n "$RANLIB"; then
 
7908
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
7909
          postinstall_cmds='$RANLIB $lib'
 
7910
        fi
 
7911
        ;;
 
7912
      aix[[4-9]]*)
 
7913
        if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
7914
          test "$enable_shared" = yes && enable_static=no
 
7915
        fi
 
7916
        ;;
 
7917
    esac
 
7918
    AC_MSG_RESULT([$enable_shared])
 
7919
 
 
7920
    AC_MSG_CHECKING([whether to build static libraries])
 
7921
    # Make sure either enable_shared or enable_static is yes.
 
7922
    test "$enable_shared" = yes || enable_static=yes
 
7923
    AC_MSG_RESULT([$enable_static])
 
7924
 
 
7925
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
 
7926
    _LT_TAGVAR(LD, $1)="$LD"
 
7927
 
 
7928
    ## CAVEAT EMPTOR:
 
7929
    ## There is no encapsulation within the following macros, do not change
 
7930
    ## the running order or otherwise move them around unless you know exactly
 
7931
    ## what you are doing...
 
7932
    _LT_SYS_HIDDEN_LIBDEPS($1)
 
7933
    _LT_COMPILER_PIC($1)
 
7934
    _LT_COMPILER_C_O($1)
 
7935
    _LT_COMPILER_FILE_LOCKS($1)
 
7936
    _LT_LINKER_SHLIBS($1)
 
7937
    _LT_SYS_DYNAMIC_LINKER($1)
 
7938
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
7939
 
 
7940
    _LT_CONFIG($1)
 
7941
  fi # test -n "$compiler"
 
7942
 
 
7943
  GCC=$lt_save_GCC
 
7944
  CC="$lt_save_CC"
 
7945
fi # test "$_lt_disable_FC" != yes
 
7946
 
 
7947
AC_LANG_POP
 
7948
])# _LT_LANG_FC_CONFIG
 
7949
 
 
7950
 
 
7951
# _LT_LANG_GCJ_CONFIG([TAG])
 
7952
# --------------------------
 
7953
# Ensure that the configuration variables for the GNU Java Compiler compiler
 
7954
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
7955
# to write the compiler configuration to `libtool'.
 
7956
m4_defun([_LT_LANG_GCJ_CONFIG],
 
7957
[AC_REQUIRE([LT_PROG_GCJ])dnl
 
7958
AC_LANG_SAVE
 
7959
 
 
7960
# Source file extension for Java test sources.
 
7961
ac_ext=java
 
7962
 
 
7963
# Object file extension for compiled Java test sources.
 
7964
objext=o
 
7965
_LT_TAGVAR(objext, $1)=$objext
 
7966
 
 
7967
# Code to be used in simple compile tests
 
7968
lt_simple_compile_test_code="class foo {}"
 
7969
 
 
7970
# Code to be used in simple link tests
 
7971
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
 
7972
 
 
7973
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
7974
_LT_TAG_COMPILER
 
7975
 
 
7976
# save warnings/boilerplate of simple test code
 
7977
_LT_COMPILER_BOILERPLATE
 
7978
_LT_LINKER_BOILERPLATE
 
7979
 
 
7980
# Allow CC to be a program name with arguments.
 
7981
lt_save_CC="$CC"
 
7982
lt_save_GCC=$GCC
 
7983
GCC=yes
 
7984
CC=${GCJ-"gcj"}
 
7985
compiler=$CC
 
7986
_LT_TAGVAR(compiler, $1)=$CC
 
7987
_LT_TAGVAR(LD, $1)="$LD"
 
7988
_LT_CC_BASENAME([$compiler])
 
7989
 
 
7990
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
7991
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7992
 
 
7993
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7994
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
7995
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
7996
 
 
7997
if test -n "$compiler"; then
 
7998
  _LT_COMPILER_NO_RTTI($1)
 
7999
  _LT_COMPILER_PIC($1)
 
8000
  _LT_COMPILER_C_O($1)
 
8001
  _LT_COMPILER_FILE_LOCKS($1)
 
8002
  _LT_LINKER_SHLIBS($1)
 
8003
  _LT_LINKER_HARDCODE_LIBPATH($1)
 
8004
 
 
8005
  _LT_CONFIG($1)
 
8006
fi
 
8007
 
 
8008
AC_LANG_RESTORE
 
8009
 
 
8010
GCC=$lt_save_GCC
 
8011
CC="$lt_save_CC"
 
8012
])# _LT_LANG_GCJ_CONFIG
 
8013
 
 
8014
 
 
8015
# _LT_LANG_RC_CONFIG([TAG])
 
8016
# -------------------------
 
8017
# Ensure that the configuration variables for the Windows resource compiler
 
8018
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8019
# to write the compiler configuration to `libtool'.
 
8020
m4_defun([_LT_LANG_RC_CONFIG],
 
8021
[AC_REQUIRE([LT_PROG_RC])dnl
 
8022
AC_LANG_SAVE
 
8023
 
 
8024
# Source file extension for RC test sources.
 
8025
ac_ext=rc
 
8026
 
 
8027
# Object file extension for compiled RC test sources.
 
8028
objext=o
 
8029
_LT_TAGVAR(objext, $1)=$objext
 
8030
 
 
8031
# Code to be used in simple compile tests
 
8032
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
8033
 
 
8034
# Code to be used in simple link tests
 
8035
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
8036
 
 
8037
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8038
_LT_TAG_COMPILER
 
8039
 
 
8040
# save warnings/boilerplate of simple test code
 
8041
_LT_COMPILER_BOILERPLATE
 
8042
_LT_LINKER_BOILERPLATE
 
8043
 
 
8044
# Allow CC to be a program name with arguments.
 
8045
lt_save_CC="$CC"
 
8046
lt_save_GCC=$GCC
 
8047
GCC=
 
8048
CC=${RC-"windres"}
 
8049
compiler=$CC
 
8050
_LT_TAGVAR(compiler, $1)=$CC
 
8051
_LT_CC_BASENAME([$compiler])
 
8052
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
8053
 
 
8054
if test -n "$compiler"; then
 
8055
  :
 
8056
  _LT_CONFIG($1)
 
8057
fi
 
8058
 
 
8059
GCC=$lt_save_GCC
 
8060
AC_LANG_RESTORE
 
8061
CC="$lt_save_CC"
 
8062
])# _LT_LANG_RC_CONFIG
 
8063
 
 
8064
 
 
8065
# LT_PROG_GCJ
 
8066
# -----------
 
8067
AC_DEFUN([LT_PROG_GCJ],
 
8068
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
 
8069
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
 
8070
    [AC_CHECK_TOOL(GCJ, gcj,)
 
8071
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
8072
      AC_SUBST(GCJFLAGS)])])[]dnl
 
8073
])
 
8074
 
 
8075
# Old name:
 
8076
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
 
8077
dnl aclocal-1.4 backwards compatibility:
 
8078
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
8079
 
 
8080
 
 
8081
# LT_PROG_RC
 
8082
# ----------
 
8083
AC_DEFUN([LT_PROG_RC],
 
8084
[AC_CHECK_TOOL(RC, windres,)
 
8085
])
 
8086
 
 
8087
# Old name:
 
8088
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
 
8089
dnl aclocal-1.4 backwards compatibility:
 
8090
dnl AC_DEFUN([LT_AC_PROG_RC], [])
 
8091
 
 
8092
 
 
8093
# _LT_DECL_EGREP
 
8094
# --------------
 
8095
# If we don't have a new enough Autoconf to choose the best grep
 
8096
# available, choose the one first in the user's PATH.
 
8097
m4_defun([_LT_DECL_EGREP],
 
8098
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
8099
AC_REQUIRE([AC_PROG_FGREP])dnl
 
8100
test -z "$GREP" && GREP=grep
 
8101
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
 
8102
_LT_DECL([], [EGREP], [1], [An ERE matcher])
 
8103
_LT_DECL([], [FGREP], [1], [A literal string matcher])
 
8104
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
 
8105
AC_SUBST([GREP])
 
8106
])
 
8107
 
 
8108
 
 
8109
# _LT_DECL_OBJDUMP
 
8110
# --------------
 
8111
# If we don't have a new enough Autoconf to choose the best objdump
 
8112
# available, choose the one first in the user's PATH.
 
8113
m4_defun([_LT_DECL_OBJDUMP],
 
8114
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
8115
test -z "$OBJDUMP" && OBJDUMP=objdump
 
8116
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
 
8117
AC_SUBST([OBJDUMP])
 
8118
])
 
8119
 
 
8120
 
 
8121
# _LT_DECL_SED
 
8122
# ------------
 
8123
# Check for a fully-functional sed program, that truncates
 
8124
# as few characters as possible.  Prefer GNU sed if found.
 
8125
m4_defun([_LT_DECL_SED],
 
8126
[AC_PROG_SED
 
8127
test -z "$SED" && SED=sed
 
8128
Xsed="$SED -e 1s/^X//"
 
8129
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
 
8130
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
 
8131
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
 
8132
])# _LT_DECL_SED
 
8133
 
 
8134
m4_ifndef([AC_PROG_SED], [
 
8135
# NOTE: This macro has been submitted for inclusion into   #
 
8136
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
8137
#  a released version of Autoconf we should remove this    #
 
8138
#  macro and use it instead.                               #
 
8139
 
 
8140
m4_defun([AC_PROG_SED],
 
8141
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
8142
AC_CACHE_VAL(lt_cv_path_SED,
 
8143
[# Loop through the user's path and test for sed and gsed.
 
8144
# Then use that list of sed's as ones to test for truncation.
 
8145
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
8146
for as_dir in $PATH
 
8147
do
 
8148
  IFS=$as_save_IFS
 
8149
  test -z "$as_dir" && as_dir=.
 
8150
  for lt_ac_prog in sed gsed; do
 
8151
    for ac_exec_ext in '' $ac_executable_extensions; do
 
8152
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
8153
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
 
8154
      fi
 
8155
    done
 
8156
  done
 
8157
done
 
8158
IFS=$as_save_IFS
 
8159
lt_ac_max=0
 
8160
lt_ac_count=0
 
8161
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
8162
# along with /bin/sed that truncates output.
 
8163
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
8164
  test ! -f $lt_ac_sed && continue
 
8165
  cat /dev/null > conftest.in
 
8166
  lt_ac_count=0
 
8167
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
8168
  # Check for GNU sed and select it if it is found.
 
8169
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
8170
    lt_cv_path_SED=$lt_ac_sed
 
8171
    break
 
8172
  fi
 
8173
  while true; do
 
8174
    cat conftest.in conftest.in >conftest.tmp
 
8175
    mv conftest.tmp conftest.in
 
8176
    cp conftest.in conftest.nl
 
8177
    echo >>conftest.nl
 
8178
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
8179
    cmp -s conftest.out conftest.nl || break
 
8180
    # 10000 chars as input seems more than enough
 
8181
    test $lt_ac_count -gt 10 && break
 
8182
    lt_ac_count=`expr $lt_ac_count + 1`
 
8183
    if test $lt_ac_count -gt $lt_ac_max; then
 
8184
      lt_ac_max=$lt_ac_count
 
8185
      lt_cv_path_SED=$lt_ac_sed
 
8186
    fi
 
8187
  done
 
8188
done
 
8189
])
 
8190
SED=$lt_cv_path_SED
 
8191
AC_SUBST([SED])
 
8192
AC_MSG_RESULT([$SED])
 
8193
])#AC_PROG_SED
 
8194
])#m4_ifndef
 
8195
 
 
8196
# Old name:
 
8197
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
 
8198
dnl aclocal-1.4 backwards compatibility:
 
8199
dnl AC_DEFUN([LT_AC_PROG_SED], [])
 
8200
 
 
8201
 
 
8202
# _LT_CHECK_SHELL_FEATURES
 
8203
# ------------------------
 
8204
# Find out whether the shell is Bourne or XSI compatible,
 
8205
# or has some other useful features.
 
8206
m4_defun([_LT_CHECK_SHELL_FEATURES],
 
8207
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
 
8208
# Try some XSI features
 
8209
xsi_shell=no
 
8210
( _lt_dummy="a/b/c"
 
8211
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
 
8212
      = c,a/b,, \
 
8213
    && eval 'test $(( 1 + 1 )) -eq 2 \
 
8214
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
 
8215
  && xsi_shell=yes
 
8216
AC_MSG_RESULT([$xsi_shell])
 
8217
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
 
8218
 
 
8219
AC_MSG_CHECKING([whether the shell understands "+="])
 
8220
lt_shell_append=no
 
8221
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
 
8222
    >/dev/null 2>&1 \
 
8223
  && lt_shell_append=yes
 
8224
AC_MSG_RESULT([$lt_shell_append])
 
8225
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
 
8226
 
 
8227
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
 
8228
  lt_unset=unset
 
8229
else
 
8230
  lt_unset=false
 
8231
fi
 
8232
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
 
8233
 
 
8234
# test EBCDIC or ASCII
 
8235
case `echo X|tr X '\101'` in
 
8236
 A) # ASCII based system
 
8237
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
 
8238
  lt_SP2NL='tr \040 \012'
 
8239
  lt_NL2SP='tr \015\012 \040\040'
 
8240
  ;;
 
8241
 *) # EBCDIC based system
 
8242
  lt_SP2NL='tr \100 \n'
 
8243
  lt_NL2SP='tr \r\n \100\100'
 
8244
  ;;
 
8245
esac
 
8246
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
 
8247
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 
8248
])# _LT_CHECK_SHELL_FEATURES
 
8249
 
 
8250
 
 
8251
# _LT_PROG_XSI_SHELLFNS
 
8252
# ---------------------
 
8253
# Bourne and XSI compatible variants of some useful shell functions.
 
8254
m4_defun([_LT_PROG_XSI_SHELLFNS],
 
8255
[case $xsi_shell in
 
8256
  yes)
 
8257
    cat << \_LT_EOF >> "$cfgfile"
 
8258
 
 
8259
# func_dirname file append nondir_replacement
 
8260
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
 
8261
# otherwise set result to NONDIR_REPLACEMENT.
 
8262
func_dirname ()
 
8263
{
 
8264
  case ${1} in
 
8265
    */*) func_dirname_result="${1%/*}${2}" ;;
 
8266
    *  ) func_dirname_result="${3}" ;;
 
8267
  esac
 
8268
}
 
8269
 
 
8270
# func_basename file
 
8271
func_basename ()
 
8272
{
 
8273
  func_basename_result="${1##*/}"
 
8274
}
 
8275
 
 
8276
# func_dirname_and_basename file append nondir_replacement
 
8277
# perform func_basename and func_dirname in a single function
 
8278
# call:
 
8279
#   dirname:  Compute the dirname of FILE.  If nonempty,
 
8280
#             add APPEND to the result, otherwise set result
 
8281
#             to NONDIR_REPLACEMENT.
 
8282
#             value returned in "$func_dirname_result"
 
8283
#   basename: Compute filename of FILE.
 
8284
#             value retuned in "$func_basename_result"
 
8285
# Implementation must be kept synchronized with func_dirname
 
8286
# and func_basename. For efficiency, we do not delegate to
 
8287
# those functions but instead duplicate the functionality here.
 
8288
func_dirname_and_basename ()
 
8289
{
 
8290
  case ${1} in
 
8291
    */*) func_dirname_result="${1%/*}${2}" ;;
 
8292
    *  ) func_dirname_result="${3}" ;;
 
8293
  esac
 
8294
  func_basename_result="${1##*/}"
 
8295
}
 
8296
 
 
8297
# func_stripname prefix suffix name
 
8298
# strip PREFIX and SUFFIX off of NAME.
 
8299
# PREFIX and SUFFIX must not contain globbing or regex special
 
8300
# characters, hashes, percent signs, but SUFFIX may contain a leading
 
8301
# dot (in which case that matches only a dot).
 
8302
func_stripname ()
 
8303
{
 
8304
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
 
8305
  # positional parameters, so assign one to ordinary parameter first.
 
8306
  func_stripname_result=${3}
 
8307
  func_stripname_result=${func_stripname_result#"${1}"}
 
8308
  func_stripname_result=${func_stripname_result%"${2}"}
 
8309
}
 
8310
 
 
8311
# func_opt_split
 
8312
func_opt_split ()
 
8313
{
 
8314
  func_opt_split_opt=${1%%=*}
 
8315
  func_opt_split_arg=${1#*=}
 
8316
}
 
8317
 
 
8318
# func_lo2o object
 
8319
func_lo2o ()
 
8320
{
 
8321
  case ${1} in
 
8322
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
 
8323
    *)    func_lo2o_result=${1} ;;
 
8324
  esac
 
8325
}
 
8326
 
 
8327
# func_xform libobj-or-source
 
8328
func_xform ()
 
8329
{
 
8330
  func_xform_result=${1%.*}.lo
 
8331
}
 
8332
 
 
8333
# func_arith arithmetic-term...
 
8334
func_arith ()
 
8335
{
 
8336
  func_arith_result=$(( $[*] ))
 
8337
}
 
8338
 
 
8339
# func_len string
 
8340
# STRING may not start with a hyphen.
 
8341
func_len ()
 
8342
{
 
8343
  func_len_result=${#1}
 
8344
}
 
8345
 
 
8346
_LT_EOF
 
8347
    ;;
 
8348
  *) # Bourne compatible functions.
 
8349
    cat << \_LT_EOF >> "$cfgfile"
 
8350
 
 
8351
# func_dirname file append nondir_replacement
 
8352
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
 
8353
# otherwise set result to NONDIR_REPLACEMENT.
 
8354
func_dirname ()
 
8355
{
 
8356
  # Extract subdirectory from the argument.
 
8357
  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
 
8358
  if test "X$func_dirname_result" = "X${1}"; then
 
8359
    func_dirname_result="${3}"
 
8360
  else
 
8361
    func_dirname_result="$func_dirname_result${2}"
 
8362
  fi
 
8363
}
 
8364
 
 
8365
# func_basename file
 
8366
func_basename ()
 
8367
{
 
8368
  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
 
8369
}
 
8370
 
 
8371
dnl func_dirname_and_basename
 
8372
dnl A portable version of this function is already defined in general.m4sh
 
8373
dnl so there is no need for it here.
 
8374
 
 
8375
# func_stripname prefix suffix name
 
8376
# strip PREFIX and SUFFIX off of NAME.
 
8377
# PREFIX and SUFFIX must not contain globbing or regex special
 
8378
# characters, hashes, percent signs, but SUFFIX may contain a leading
 
8379
# dot (in which case that matches only a dot).
 
8380
# func_strip_suffix prefix name
 
8381
func_stripname ()
 
8382
{
 
8383
  case ${2} in
 
8384
    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
 
8385
    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
 
8386
  esac
 
8387
}
 
8388
 
 
8389
# sed scripts:
 
8390
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
 
8391
my_sed_long_arg='1s/^-[[^=]]*=//'
 
8392
 
 
8393
# func_opt_split
 
8394
func_opt_split ()
 
8395
{
 
8396
  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
 
8397
  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
 
8398
}
 
8399
 
 
8400
# func_lo2o object
 
8401
func_lo2o ()
 
8402
{
 
8403
  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
 
8404
}
 
8405
 
 
8406
# func_xform libobj-or-source
 
8407
func_xform ()
 
8408
{
 
8409
  func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
 
8410
}
 
8411
 
 
8412
# func_arith arithmetic-term...
 
8413
func_arith ()
 
8414
{
 
8415
  func_arith_result=`expr "$[@]"`
 
8416
}
 
8417
 
 
8418
# func_len string
 
8419
# STRING may not start with a hyphen.
 
8420
func_len ()
 
8421
{
 
8422
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
 
8423
}
 
8424
 
 
8425
_LT_EOF
 
8426
esac
 
8427
 
 
8428
case $lt_shell_append in
 
8429
  yes)
 
8430
    cat << \_LT_EOF >> "$cfgfile"
 
8431
 
 
8432
# func_append var value
 
8433
# Append VALUE to the end of shell variable VAR.
 
8434
func_append ()
 
8435
{
 
8436
  eval "$[1]+=\$[2]"
 
8437
}
 
8438
_LT_EOF
 
8439
    ;;
 
8440
  *)
 
8441
    cat << \_LT_EOF >> "$cfgfile"
 
8442
 
 
8443
# func_append var value
 
8444
# Append VALUE to the end of shell variable VAR.
 
8445
func_append ()
 
8446
{
 
8447
  eval "$[1]=\$$[1]\$[2]"
 
8448
}
 
8449
 
 
8450
_LT_EOF
 
8451
    ;;
 
8452
  esac
 
8453
])
 
8454
 
 
8455
# Helper functions for option handling.                    -*- Autoconf -*-
 
8456
#
 
8457
#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
 
8458
#   Inc.
 
8459
#   Written by Gary V. Vaughan, 2004
 
8460
#
 
8461
# This file is free software; the Free Software Foundation gives
 
8462
# unlimited permission to copy and/or distribute it, with or without
 
8463
# modifications, as long as this notice is preserved.
 
8464
 
 
8465
# serial 7 ltoptions.m4
 
8466
 
 
8467
# This is to help aclocal find these macros, as it can't see m4_define.
 
8468
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
 
8469
 
 
8470
 
 
8471
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
 
8472
# ------------------------------------------
 
8473
m4_define([_LT_MANGLE_OPTION],
 
8474
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
 
8475
 
 
8476
 
 
8477
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
 
8478
# ---------------------------------------
 
8479
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
 
8480
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
 
8481
# saved as a flag.
 
8482
m4_define([_LT_SET_OPTION],
 
8483
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
 
8484
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
 
8485
        _LT_MANGLE_DEFUN([$1], [$2]),
 
8486
    [m4_warning([Unknown $1 option `$2'])])[]dnl
 
8487
])
 
8488
 
 
8489
 
 
8490
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
 
8491
# ------------------------------------------------------------
 
8492
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
8493
m4_define([_LT_IF_OPTION],
 
8494
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
 
8495
 
 
8496
 
 
8497
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
 
8498
# -------------------------------------------------------
 
8499
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
 
8500
# are set.
 
8501
m4_define([_LT_UNLESS_OPTIONS],
 
8502
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
 
8503
            [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
 
8504
                      [m4_define([$0_found])])])[]dnl
 
8505
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
 
8506
])[]dnl
 
8507
])
 
8508
 
 
8509
 
 
8510
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
 
8511
# ----------------------------------------
 
8512
# OPTION-LIST is a space-separated list of Libtool options associated
 
8513
# with MACRO-NAME.  If any OPTION has a matching handler declared with
 
8514
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
 
8515
# the unknown option and exit.
 
8516
m4_defun([_LT_SET_OPTIONS],
 
8517
[# Set options
 
8518
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
 
8519
    [_LT_SET_OPTION([$1], _LT_Option)])
 
8520
 
 
8521
m4_if([$1],[LT_INIT],[
 
8522
  dnl
 
8523
  dnl Simply set some default values (i.e off) if boolean options were not
 
8524
  dnl specified:
 
8525
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
 
8526
  ])
 
8527
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
 
8528
  ])
 
8529
  dnl
 
8530
  dnl If no reference was made to various pairs of opposing options, then
 
8531
  dnl we run the default mode handler for the pair.  For example, if neither
 
8532
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
 
8533
  dnl archives by default:
 
8534
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
 
8535
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
 
8536
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
 
8537
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
 
8538
                   [_LT_ENABLE_FAST_INSTALL])
 
8539
  ])
 
8540
])# _LT_SET_OPTIONS
 
8541
 
 
8542
 
 
8543
 
 
8544
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
 
8545
# -----------------------------------------
 
8546
m4_define([_LT_MANGLE_DEFUN],
 
8547
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
 
8548
 
 
8549
 
 
8550
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
 
8551
# -----------------------------------------------
 
8552
m4_define([LT_OPTION_DEFINE],
 
8553
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
 
8554
])# LT_OPTION_DEFINE
 
8555
 
 
8556
 
 
8557
# dlopen
 
8558
# ------
 
8559
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
 
8560
])
 
8561
 
 
8562
AU_DEFUN([AC_LIBTOOL_DLOPEN],
 
8563
[_LT_SET_OPTION([LT_INIT], [dlopen])
 
8564
AC_DIAGNOSE([obsolete],
 
8565
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
8566
put the `dlopen' option into LT_INIT's first parameter.])
 
8567
])
 
8568
 
 
8569
dnl aclocal-1.4 backwards compatibility:
 
8570
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
 
8571
 
 
8572
 
 
8573
# win32-dll
 
8574
# ---------
 
8575
# Declare package support for building win32 dll's.
 
8576
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
 
8577
[enable_win32_dll=yes
 
8578
 
 
8579
case $host in
 
8580
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
 
8581
  AC_CHECK_TOOL(AS, as, false)
 
8582
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
8583
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
8584
  ;;
 
8585
esac
 
8586
 
 
8587
test -z "$AS" && AS=as
 
8588
_LT_DECL([], [AS],      [1], [Assembler program])dnl
 
8589
 
 
8590
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
8591
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
 
8592
 
 
8593
test -z "$OBJDUMP" && OBJDUMP=objdump
 
8594
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
 
8595
])# win32-dll
 
8596
 
 
8597
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
8598
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
8599
_LT_SET_OPTION([LT_INIT], [win32-dll])
 
8600
AC_DIAGNOSE([obsolete],
 
8601
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
8602
put the `win32-dll' option into LT_INIT's first parameter.])
 
8603
])
 
8604
 
 
8605
dnl aclocal-1.4 backwards compatibility:
 
8606
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 
8607
 
 
8608
 
 
8609
# _LT_ENABLE_SHARED([DEFAULT])
 
8610
# ----------------------------
 
8611
# implement the --enable-shared flag, and supports the `shared' and
 
8612
# `disable-shared' LT_INIT options.
 
8613
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
8614
m4_define([_LT_ENABLE_SHARED],
 
8615
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
8616
AC_ARG_ENABLE([shared],
 
8617
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
8618
        [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
 
8619
    [p=${PACKAGE-default}
 
8620
    case $enableval in
 
8621
    yes) enable_shared=yes ;;
 
8622
    no) enable_shared=no ;;
 
8623
    *)
 
8624
      enable_shared=no
 
8625
      # Look at the argument we got.  We use all the common list separators.
 
8626
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
8627
      for pkg in $enableval; do
 
8628
        IFS="$lt_save_ifs"
 
8629
        if test "X$pkg" = "X$p"; then
 
8630
          enable_shared=yes
 
8631
        fi
 
8632
      done
 
8633
      IFS="$lt_save_ifs"
 
8634
      ;;
 
8635
    esac],
 
8636
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
 
8637
 
 
8638
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
 
8639
        [Whether or not to build shared libraries])
 
8640
])# _LT_ENABLE_SHARED
 
8641
 
 
8642
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
 
8643
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
 
8644
 
 
8645
# Old names:
 
8646
AC_DEFUN([AC_ENABLE_SHARED],
 
8647
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
 
8648
])
 
8649
 
 
8650
AC_DEFUN([AC_DISABLE_SHARED],
 
8651
[_LT_SET_OPTION([LT_INIT], [disable-shared])
 
8652
])
 
8653
 
 
8654
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
 
8655
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
8656
 
 
8657
dnl aclocal-1.4 backwards compatibility:
 
8658
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
 
8659
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 
8660
 
 
8661
 
 
8662
 
 
8663
# _LT_ENABLE_STATIC([DEFAULT])
 
8664
# ----------------------------
 
8665
# implement the --enable-static flag, and support the `static' and
 
8666
# `disable-static' LT_INIT options.
 
8667
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
8668
m4_define([_LT_ENABLE_STATIC],
 
8669
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
8670
AC_ARG_ENABLE([static],
 
8671
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
8672
        [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
 
8673
    [p=${PACKAGE-default}
 
8674
    case $enableval in
 
8675
    yes) enable_static=yes ;;
 
8676
    no) enable_static=no ;;
 
8677
    *)
 
8678
     enable_static=no
 
8679
      # Look at the argument we got.  We use all the common list separators.
 
8680
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
8681
      for pkg in $enableval; do
 
8682
        IFS="$lt_save_ifs"
 
8683
        if test "X$pkg" = "X$p"; then
 
8684
          enable_static=yes
 
8685
        fi
 
8686
      done
 
8687
      IFS="$lt_save_ifs"
 
8688
      ;;
 
8689
    esac],
 
8690
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
 
8691
 
 
8692
    _LT_DECL([build_old_libs], [enable_static], [0],
 
8693
        [Whether or not to build static libraries])
 
8694
])# _LT_ENABLE_STATIC
 
8695
 
 
8696
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
 
8697
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
 
8698
 
 
8699
# Old names:
 
8700
AC_DEFUN([AC_ENABLE_STATIC],
 
8701
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
 
8702
])
 
8703
 
 
8704
AC_DEFUN([AC_DISABLE_STATIC],
 
8705
[_LT_SET_OPTION([LT_INIT], [disable-static])
 
8706
])
 
8707
 
 
8708
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
 
8709
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
8710
 
 
8711
dnl aclocal-1.4 backwards compatibility:
 
8712
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
 
8713
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 
8714
 
 
8715
 
 
8716
 
 
8717
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
 
8718
# ----------------------------------
 
8719
# implement the --enable-fast-install flag, and support the `fast-install'
 
8720
# and `disable-fast-install' LT_INIT options.
 
8721
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
8722
m4_define([_LT_ENABLE_FAST_INSTALL],
 
8723
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
8724
AC_ARG_ENABLE([fast-install],
 
8725
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
8726
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
8727
    [p=${PACKAGE-default}
 
8728
    case $enableval in
 
8729
    yes) enable_fast_install=yes ;;
 
8730
    no) enable_fast_install=no ;;
 
8731
    *)
 
8732
      enable_fast_install=no
 
8733
      # Look at the argument we got.  We use all the common list separators.
 
8734
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
8735
      for pkg in $enableval; do
 
8736
        IFS="$lt_save_ifs"
 
8737
        if test "X$pkg" = "X$p"; then
 
8738
          enable_fast_install=yes
 
8739
        fi
 
8740
      done
 
8741
      IFS="$lt_save_ifs"
 
8742
      ;;
 
8743
    esac],
 
8744
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
 
8745
 
 
8746
_LT_DECL([fast_install], [enable_fast_install], [0],
 
8747
         [Whether or not to optimize for fast installation])dnl
 
8748
])# _LT_ENABLE_FAST_INSTALL
 
8749
 
 
8750
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
 
8751
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
 
8752
 
 
8753
# Old names:
 
8754
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
 
8755
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
 
8756
AC_DIAGNOSE([obsolete],
 
8757
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
 
8758
the `fast-install' option into LT_INIT's first parameter.])
 
8759
])
 
8760
 
 
8761
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
 
8762
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
 
8763
AC_DIAGNOSE([obsolete],
 
8764
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
 
8765
the `disable-fast-install' option into LT_INIT's first parameter.])
 
8766
])
 
8767
 
 
8768
dnl aclocal-1.4 backwards compatibility:
 
8769
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
 
8770
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 
8771
 
 
8772
 
 
8773
# _LT_WITH_PIC([MODE])
 
8774
# --------------------
 
8775
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
 
8776
# LT_INIT options.
 
8777
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
8778
m4_define([_LT_WITH_PIC],
 
8779
[AC_ARG_WITH([pic],
 
8780
    [AS_HELP_STRING([--with-pic],
 
8781
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
8782
    [pic_mode="$withval"],
 
8783
    [pic_mode=default])
 
8784
 
 
8785
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
 
8786
 
 
8787
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
 
8788
])# _LT_WITH_PIC
 
8789
 
 
8790
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
 
8791
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
 
8792
 
 
8793
# Old name:
 
8794
AU_DEFUN([AC_LIBTOOL_PICMODE],
 
8795
[_LT_SET_OPTION([LT_INIT], [pic-only])
 
8796
AC_DIAGNOSE([obsolete],
 
8797
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
8798
put the `pic-only' option into LT_INIT's first parameter.])
 
8799
])
 
8800
 
 
8801
dnl aclocal-1.4 backwards compatibility:
 
8802
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
 
8803
 
 
8804
 
 
8805
m4_define([_LTDL_MODE], [])
 
8806
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
 
8807
                 [m4_define([_LTDL_MODE], [nonrecursive])])
 
8808
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
 
8809
                 [m4_define([_LTDL_MODE], [recursive])])
 
8810
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
 
8811
                 [m4_define([_LTDL_MODE], [subproject])])
 
8812
 
 
8813
m4_define([_LTDL_TYPE], [])
 
8814
LT_OPTION_DEFINE([LTDL_INIT], [installable],
 
8815
                 [m4_define([_LTDL_TYPE], [installable])])
 
8816
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
 
8817
                 [m4_define([_LTDL_TYPE], [convenience])])
 
8818
 
 
8819
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 
8820
#
 
8821
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
8822
# Written by Gary V. Vaughan, 2004
 
8823
#
 
8824
# This file is free software; the Free Software Foundation gives
 
8825
# unlimited permission to copy and/or distribute it, with or without
 
8826
# modifications, as long as this notice is preserved.
 
8827
 
 
8828
# serial 6 ltsugar.m4
 
8829
 
 
8830
# This is to help aclocal find these macros, as it can't see m4_define.
 
8831
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
 
8832
 
 
8833
 
 
8834
# lt_join(SEP, ARG1, [ARG2...])
 
8835
# -----------------------------
 
8836
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
 
8837
# associated separator.
 
8838
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
 
8839
# versions in m4sugar had bugs.
 
8840
m4_define([lt_join],
 
8841
[m4_if([$#], [1], [],
 
8842
       [$#], [2], [[$2]],
 
8843
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
 
8844
m4_define([_lt_join],
 
8845
[m4_if([$#$2], [2], [],
 
8846
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
 
8847
 
 
8848
 
 
8849
# lt_car(LIST)
 
8850
# lt_cdr(LIST)
 
8851
# ------------
 
8852
# Manipulate m4 lists.
 
8853
# These macros are necessary as long as will still need to support
 
8854
# Autoconf-2.59 which quotes differently.
 
8855
m4_define([lt_car], [[$1]])
 
8856
m4_define([lt_cdr],
 
8857
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
 
8858
       [$#], 1, [],
 
8859
       [m4_dquote(m4_shift($@))])])
 
8860
m4_define([lt_unquote], $1)
 
8861
 
 
8862
 
 
8863
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
 
8864
# ------------------------------------------
 
8865
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
 
8866
# Note that neither SEPARATOR nor STRING are expanded; they are appended
 
8867
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
 
8868
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
 
8869
# than defined and empty).
 
8870
#
 
8871
# This macro is needed until we can rely on Autoconf 2.62, since earlier
 
8872
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
 
8873
m4_define([lt_append],
 
8874
[m4_define([$1],
 
8875
           m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
 
8876
 
 
8877
 
 
8878
 
 
8879
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
 
8880
# ----------------------------------------------------------
 
8881
# Produce a SEP delimited list of all paired combinations of elements of
 
8882
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
 
8883
# has the form PREFIXmINFIXSUFFIXn.
 
8884
# Needed until we can rely on m4_combine added in Autoconf 2.62.
 
8885
m4_define([lt_combine],
 
8886
[m4_if(m4_eval([$# > 3]), [1],
 
8887
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
 
8888
[[m4_foreach([_Lt_prefix], [$2],
 
8889
             [m4_foreach([_Lt_suffix],
 
8890
                ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
 
8891
        [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
 
8892
 
 
8893
 
 
8894
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
 
8895
# -----------------------------------------------------------------------
 
8896
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
 
8897
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
 
8898
m4_define([lt_if_append_uniq],
 
8899
[m4_ifdef([$1],
 
8900
          [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
 
8901
                 [lt_append([$1], [$2], [$3])$4],
 
8902
                 [$5])],
 
8903
          [lt_append([$1], [$2], [$3])$4])])
 
8904
 
 
8905
 
 
8906
# lt_dict_add(DICT, KEY, VALUE)
 
8907
# -----------------------------
 
8908
m4_define([lt_dict_add],
 
8909
[m4_define([$1($2)], [$3])])
 
8910
 
 
8911
 
 
8912
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
 
8913
# --------------------------------------------
 
8914
m4_define([lt_dict_add_subkey],
 
8915
[m4_define([$1($2:$3)], [$4])])
 
8916
 
 
8917
 
 
8918
# lt_dict_fetch(DICT, KEY, [SUBKEY])
 
8919
# ----------------------------------
 
8920
m4_define([lt_dict_fetch],
 
8921
[m4_ifval([$3],
 
8922
        m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
 
8923
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
 
8924
 
 
8925
 
 
8926
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
 
8927
# -----------------------------------------------------------------
 
8928
m4_define([lt_if_dict_fetch],
 
8929
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
 
8930
        [$5],
 
8931
    [$6])])
 
8932
 
 
8933
 
 
8934
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
 
8935
# --------------------------------------------------------------
 
8936
m4_define([lt_dict_filter],
 
8937
[m4_if([$5], [], [],
 
8938
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
 
8939
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
 
8940
                      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
 
8941
])
 
8942
 
 
8943
# ltversion.m4 -- version numbers                       -*- Autoconf -*-
 
8944
#
 
8945
#   Copyright (C) 2004 Free Software Foundation, Inc.
 
8946
#   Written by Scott James Remnant, 2004
 
8947
#
 
8948
# This file is free software; the Free Software Foundation gives
 
8949
# unlimited permission to copy and/or distribute it, with or without
 
8950
# modifications, as long as this notice is preserved.
 
8951
 
 
8952
# Generated from ltversion.in.
 
8953
 
 
8954
# serial 3175 ltversion.m4
 
8955
# This file is part of GNU Libtool
 
8956
 
 
8957
m4_define([LT_PACKAGE_VERSION], [2.2.10])
 
8958
m4_define([LT_PACKAGE_REVISION], [1.3175])
 
8959
 
 
8960
AC_DEFUN([LTVERSION_VERSION],
 
8961
[macro_version='2.2.10'
 
8962
macro_revision='1.3175'
 
8963
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 
8964
_LT_DECL(, macro_revision, 0)
 
8965
])
 
8966
 
 
8967
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 
8968
#
 
8969
#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
 
8970
#   Written by Scott James Remnant, 2004.
 
8971
#
 
8972
# This file is free software; the Free Software Foundation gives
 
8973
# unlimited permission to copy and/or distribute it, with or without
 
8974
# modifications, as long as this notice is preserved.
 
8975
 
 
8976
# serial 5 lt~obsolete.m4
 
8977
 
 
8978
# These exist entirely to fool aclocal when bootstrapping libtool.
 
8979
#
 
8980
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
 
8981
# which have later been changed to m4_define as they aren't part of the
 
8982
# exported API, or moved to Autoconf or Automake where they belong.
 
8983
#
 
8984
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
 
8985
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
 
8986
# using a macro with the same name in our local m4/libtool.m4 it'll
 
8987
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
 
8988
# and doesn't know about Autoconf macros at all.)
 
8989
#
 
8990
# So we provide this file, which has a silly filename so it's always
 
8991
# included after everything else.  This provides aclocal with the
 
8992
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
 
8993
# because those macros already exist, or will be overwritten later.
 
8994
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
 
8995
#
 
8996
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
 
8997
# Yes, that means every name once taken will need to remain here until
 
8998
# we give up compatibility with versions before 1.7, at which point
 
8999
# we need to keep only those names which we still refer to.
 
9000
 
 
9001
# This is to help aclocal find these macros, as it can't see m4_define.
 
9002
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
 
9003
 
 
9004
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
 
9005
m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
 
9006
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
 
9007
m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
 
9008
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
 
9009
m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
 
9010
m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
 
9011
m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
 
9012
m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
 
9013
m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
 
9014
m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
 
9015
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
 
9016
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
 
9017
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
 
9018
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
 
9019
m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
 
9020
m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
 
9021
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
 
9022
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
 
9023
m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
 
9024
m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
 
9025
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
 
9026
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
 
9027
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
 
9028
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
 
9029
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
 
9030
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
 
9031
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
 
9032
m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
 
9033
m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
 
9034
m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
 
9035
m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
 
9036
m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
 
9037
m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
 
9038
m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
 
9039
m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
 
9040
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
 
9041
m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
 
9042
m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
 
9043
m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
 
9044
m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
 
9045
m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
 
9046
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
 
9047
m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
 
9048
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
 
9049
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
 
9050
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
 
9051
m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
 
9052
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
 
9053
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
 
9054
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
 
9055
m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
 
9056
m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
 
9057
m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
 
9058
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
 
9059
m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
 
9060
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
 
9061
m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
 
9062
m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
 
9063
m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
 
9064
m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
 
9065
 
 
9066
# nls.m4 serial 5 (gettext-0.18)
 
9067
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
 
9068
dnl Inc.
 
9069
dnl This file is free software; the Free Software Foundation
 
9070
dnl gives unlimited permission to copy and/or distribute it,
 
9071
dnl with or without modifications, as long as this notice is preserved.
 
9072
dnl
 
9073
dnl This file can can be used in projects which are not available under
 
9074
dnl the GNU General Public License or the GNU Library General Public
 
9075
dnl License but which still want to provide support for the GNU gettext
 
9076
dnl functionality.
 
9077
dnl Please note that the actual code of the GNU gettext library is covered
 
9078
dnl by the GNU Library General Public License, and the rest of the GNU
 
9079
dnl gettext package package is covered by the GNU General Public License.
 
9080
dnl They are *not* in the public domain.
 
9081
 
 
9082
dnl Authors:
 
9083
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
9084
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
9085
 
 
9086
AC_PREREQ([2.50])
 
9087
 
 
9088
AC_DEFUN([AM_NLS],
 
9089
[
 
9090
  AC_MSG_CHECKING([whether NLS is requested])
 
9091
  dnl Default is enabled NLS
 
9092
  AC_ARG_ENABLE([nls],
 
9093
    [  --disable-nls           do not use Native Language Support],
 
9094
    USE_NLS=$enableval, USE_NLS=yes)
 
9095
  AC_MSG_RESULT([$USE_NLS])
 
9096
  AC_SUBST([USE_NLS])
 
9097
])
 
9098
 
 
9099
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
9100
# serial 1 (pkg-config-0.24)
 
9101
 
9102
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
9103
#
 
9104
# This program is free software; you can redistribute it and/or modify
 
9105
# it under the terms of the GNU General Public License as published by
 
9106
# the Free Software Foundation; either version 2 of the License, or
 
9107
# (at your option) any later version.
 
9108
#
 
9109
# This program is distributed in the hope that it will be useful, but
 
9110
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
9111
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
9112
# General Public License for more details.
 
9113
#
 
9114
# You should have received a copy of the GNU General Public License
 
9115
# along with this program; if not, write to the Free Software
 
9116
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
9117
#
 
9118
# As a special exception to the GNU General Public License, if you
 
9119
# distribute this file as part of a program that contains a
 
9120
# configuration script generated by Autoconf, you may include it under
 
9121
# the same distribution terms that you use for the rest of that program.
 
9122
 
 
9123
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
9124
# ----------------------------------
 
9125
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
9126
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
9127
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
9128
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
9129
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
9130
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
9131
 
 
9132
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
9133
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
9134
fi
 
9135
if test -n "$PKG_CONFIG"; then
 
9136
        _pkg_min_version=m4_default([$1], [0.9.0])
 
9137
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
9138
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
9139
                AC_MSG_RESULT([yes])
 
9140
        else
 
9141
                AC_MSG_RESULT([no])
 
9142
                PKG_CONFIG=""
 
9143
        fi
 
9144
fi[]dnl
 
9145
])# PKG_PROG_PKG_CONFIG
 
9146
 
 
9147
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
9148
#
 
9149
# Check to see whether a particular set of modules exists.  Similar
 
9150
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
9151
#
 
9152
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
9153
# only at the first occurence in configure.ac, so if the first place
 
9154
# it's called might be skipped (such as if it is within an "if", you
 
9155
# have to call PKG_CHECK_EXISTS manually
 
9156
# --------------------------------------------------------------
 
9157
AC_DEFUN([PKG_CHECK_EXISTS],
 
9158
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
9159
if test -n "$PKG_CONFIG" && \
 
9160
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
9161
  m4_default([$2], [:])
 
9162
m4_ifvaln([$3], [else
 
9163
  $3])dnl
 
9164
fi])
 
9165
 
 
9166
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
9167
# ---------------------------------------------
 
9168
m4_define([_PKG_CONFIG],
 
9169
[if test -n "$$1"; then
 
9170
    pkg_cv_[]$1="$$1"
 
9171
 elif test -n "$PKG_CONFIG"; then
 
9172
    PKG_CHECK_EXISTS([$3],
 
9173
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
9174
                     [pkg_failed=yes])
 
9175
 else
 
9176
    pkg_failed=untried
 
9177
fi[]dnl
 
9178
])# _PKG_CONFIG
 
9179
 
 
9180
# _PKG_SHORT_ERRORS_SUPPORTED
 
9181
# -----------------------------
 
9182
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
9183
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
9184
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
9185
        _pkg_short_errors_supported=yes
 
9186
else
 
9187
        _pkg_short_errors_supported=no
 
9188
fi[]dnl
 
9189
])# _PKG_SHORT_ERRORS_SUPPORTED
 
9190
 
 
9191
 
 
9192
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
9193
# [ACTION-IF-NOT-FOUND])
 
9194
#
 
9195
#
 
9196
# Note that if there is a possibility the first call to
 
9197
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
9198
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
9199
#
 
9200
#
 
9201
# --------------------------------------------------------------
 
9202
AC_DEFUN([PKG_CHECK_MODULES],
 
9203
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
9204
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
9205
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
9206
 
 
9207
pkg_failed=no
 
9208
AC_MSG_CHECKING([for $1])
 
9209
 
 
9210
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
9211
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
9212
 
 
9213
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
9214
and $1[]_LIBS to avoid the need to call pkg-config.
 
9215
See the pkg-config man page for more details.])
 
9216
 
 
9217
if test $pkg_failed = yes; then
 
9218
        AC_MSG_RESULT([no])
 
9219
        _PKG_SHORT_ERRORS_SUPPORTED
 
9220
        if test $_pkg_short_errors_supported = yes; then
 
9221
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
 
9222
        else 
 
9223
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 
9224
        fi
 
9225
        # Put the nasty error message in config.log where it belongs
 
9226
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
9227
 
 
9228
        m4_default([$4], [AC_MSG_ERROR(
 
9229
[Package requirements ($2) were not met:
 
9230
 
 
9231
$$1_PKG_ERRORS
 
9232
 
 
9233
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
9234
installed software in a non-standard prefix.
 
9235
 
 
9236
_PKG_TEXT])dnl
 
9237
        ])
 
9238
elif test $pkg_failed = untried; then
 
9239
        AC_MSG_RESULT([no])
 
9240
        m4_default([$4], [AC_MSG_FAILURE(
 
9241
[The pkg-config script could not be found or is too old.  Make sure it
 
9242
is in your PATH or set the PKG_CONFIG environment variable to the full
 
9243
path to pkg-config.
 
9244
 
 
9245
_PKG_TEXT
 
9246
 
 
9247
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
 
9248
        ])
 
9249
else
 
9250
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
9251
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
9252
        AC_MSG_RESULT([yes])
 
9253
        $3
 
9254
fi[]dnl
 
9255
])# PKG_CHECK_MODULES
 
9256
 
 
9257
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 
9258
#
 
9259
# This file is free software; the Free Software Foundation
 
9260
# gives unlimited permission to copy and/or distribute it,
 
9261
# with or without modifications, as long as this notice is preserved.
 
9262
 
 
9263
# AM_AUTOMAKE_VERSION(VERSION)
 
9264
# ----------------------------
 
9265
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
9266
# generated from the m4 files accompanying Automake X.Y.
 
9267
# (This private macro should not be called outside this file.)
 
9268
AC_DEFUN([AM_AUTOMAKE_VERSION],
 
9269
[am__api_version='1.11'
 
9270
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 
9271
dnl require some minimum version.  Point them to the right macro.
 
9272
m4_if([$1], [1.11.1], [],
 
9273
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 
9274
])
 
9275
 
 
9276
# _AM_AUTOCONF_VERSION(VERSION)
 
9277
# -----------------------------
 
9278
# aclocal traces this macro to find the Autoconf version.
 
9279
# This is a private macro too.  Using m4_define simplifies
 
9280
# the logic in aclocal, which can simply ignore this definition.
 
9281
m4_define([_AM_AUTOCONF_VERSION], [])
 
9282
 
 
9283
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
9284
# -------------------------------
 
9285
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 
9286
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 
9287
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
9288
[AM_AUTOMAKE_VERSION([1.11.1])dnl
 
9289
m4_ifndef([AC_AUTOCONF_VERSION],
 
9290
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
9291
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
9292
 
 
9293
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
9294
 
 
9295
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
9296
#
 
9297
# This file is free software; the Free Software Foundation
 
9298
# gives unlimited permission to copy and/or distribute it,
 
9299
# with or without modifications, as long as this notice is preserved.
 
9300
 
 
9301
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
9302
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
9303
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
9304
#
 
9305
# Of course, Automake must honor this variable whenever it calls a
 
9306
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
9307
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
9308
# depending on how configure is run.  This is pretty annoying, since
 
9309
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
9310
# source directory, any form will work fine, but in subdirectories a
 
9311
# relative path needs to be adjusted first.
 
9312
#
 
9313
# $ac_aux_dir/missing
 
9314
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
9315
# $top_srcdir/$ac_aux_dir/missing
 
9316
#    fails if $ac_aux_dir is absolute,
 
9317
#    fails when called from a subdirectory in a VPATH build with
 
9318
#          a relative $ac_aux_dir
 
9319
#
 
9320
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
9321
# are both prefixed by $srcdir.  In an in-source build this is usually
 
9322
# harmless because $srcdir is `.', but things will broke when you
 
9323
# start a VPATH build or use an absolute $srcdir.
 
9324
#
 
9325
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
9326
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
9327
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
9328
# and then we would define $MISSING as
 
9329
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
9330
# This will work as long as MISSING is not called from configure, because
 
9331
# unfortunately $(top_srcdir) has no meaning in configure.
 
9332
# However there are other variables, like CC, which are often used in
 
9333
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
9334
#
 
9335
# Another solution, used here, is to always expand $ac_aux_dir to an
 
9336
# absolute PATH.  The drawback is that using absolute paths prevent a
 
9337
# configured tree to be moved without reconfiguration.
 
9338
 
 
9339
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
9340
[dnl Rely on autoconf to set up CDPATH properly.
 
9341
AC_PREREQ([2.50])dnl
 
9342
# expand $ac_aux_dir to an absolute path
 
9343
am_aux_dir=`cd $ac_aux_dir && pwd`
 
9344
])
 
9345
 
 
9346
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
9347
 
 
9348
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 
9349
# Free Software Foundation, Inc.
 
9350
#
 
9351
# This file is free software; the Free Software Foundation
 
9352
# gives unlimited permission to copy and/or distribute it,
 
9353
# with or without modifications, as long as this notice is preserved.
 
9354
 
 
9355
# serial 9
 
9356
 
 
9357
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
9358
# -------------------------------------
 
9359
# Define a conditional.
 
9360
AC_DEFUN([AM_CONDITIONAL],
 
9361
[AC_PREREQ(2.52)dnl
 
9362
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
9363
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
9364
AC_SUBST([$1_TRUE])dnl
 
9365
AC_SUBST([$1_FALSE])dnl
 
9366
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
 
9367
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 
9368
m4_define([_AM_COND_VALUE_$1], [$2])dnl
 
9369
if $2; then
 
9370
  $1_TRUE=
 
9371
  $1_FALSE='#'
 
9372
else
 
9373
  $1_TRUE='#'
 
9374
  $1_FALSE=
 
9375
fi
 
9376
AC_CONFIG_COMMANDS_PRE(
 
9377
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
9378
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
9379
Usually this means the macro was only invoked conditionally.]])
 
9380
fi])])
 
9381
 
 
9382
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 
9383
# Free Software Foundation, Inc.
 
9384
#
 
9385
# This file is free software; the Free Software Foundation
 
9386
# gives unlimited permission to copy and/or distribute it,
 
9387
# with or without modifications, as long as this notice is preserved.
 
9388
 
 
9389
# serial 10
 
9390
 
 
9391
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
9392
# written in clear, in which case automake, when reading aclocal.m4,
 
9393
# will think it sees a *use*, and therefore will trigger all it's
 
9394
# C support machinery.  Also note that it means that autoscan, seeing
 
9395
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
9396
 
 
9397
 
 
9398
# _AM_DEPENDENCIES(NAME)
 
9399
# ----------------------
 
9400
# See how the compiler implements dependency checking.
 
9401
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
9402
# We try a few techniques and use that to set a single cache variable.
 
9403
#
 
9404
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
9405
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
9406
# dependency, and given that the user is not expected to run this macro,
 
9407
# just rely on AC_PROG_CC.
 
9408
AC_DEFUN([_AM_DEPENDENCIES],
 
9409
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
9410
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
9411
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
9412
AC_REQUIRE([AM_DEP_TRACK])dnl
 
9413
 
 
9414
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
9415
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
9416
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
9417
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
 
9418
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
9419
                   [depcc="$$1"   am_compiler_list=])
 
9420
 
 
9421
AC_CACHE_CHECK([dependency style of $depcc],
 
9422
               [am_cv_$1_dependencies_compiler_type],
 
9423
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
9424
  # We make a subdir and do the tests there.  Otherwise we can end up
 
9425
  # making bogus files that we don't know about and never remove.  For
 
9426
  # instance it was reported that on HP-UX the gcc test will end up
 
9427
  # making a dummy file named `D' -- because `-MD' means `put the output
 
9428
  # in D'.
 
9429
  mkdir conftest.dir
 
9430
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
9431
  # using a relative directory.
 
9432
  cp "$am_depcomp" conftest.dir
 
9433
  cd conftest.dir
 
9434
  # We will build objects and dependencies in a subdirectory because
 
9435
  # it helps to detect inapplicable dependency modes.  For instance
 
9436
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
9437
  # side effect of compilation, but ICC will put the dependencies in
 
9438
  # the current directory while Tru64 will put them in the object
 
9439
  # directory.
 
9440
  mkdir sub
 
9441
 
 
9442
  am_cv_$1_dependencies_compiler_type=none
 
9443
  if test "$am_compiler_list" = ""; then
 
9444
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
9445
  fi
 
9446
  am__universal=false
 
9447
  m4_case([$1], [CC],
 
9448
    [case " $depcc " in #(
 
9449
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
9450
     esac],
 
9451
    [CXX],
 
9452
    [case " $depcc " in #(
 
9453
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
9454
     esac])
 
9455
 
 
9456
  for depmode in $am_compiler_list; do
 
9457
    # Setup a source with many dependencies, because some compilers
 
9458
    # like to wrap large dependency lists on column 80 (with \), and
 
9459
    # we should not choose a depcomp mode which is confused by this.
 
9460
    #
 
9461
    # We need to recreate these files for each test, as the compiler may
 
9462
    # overwrite some of them when testing with obscure command lines.
 
9463
    # This happens at least with the AIX C compiler.
 
9464
    : > sub/conftest.c
 
9465
    for i in 1 2 3 4 5 6; do
 
9466
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
9467
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
9468
      # Solaris 8's {/usr,}/bin/sh.
 
9469
      touch sub/conftst$i.h
 
9470
    done
 
9471
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
9472
 
 
9473
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
9474
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
9475
    # handle `-M -o', and we need to detect this.  Also, some Intel
 
9476
    # versions had trouble with output in subdirs
 
9477
    am__obj=sub/conftest.${OBJEXT-o}
 
9478
    am__minus_obj="-o $am__obj"
 
9479
    case $depmode in
 
9480
    gcc)
 
9481
      # This depmode causes a compiler race in universal mode.
 
9482
      test "$am__universal" = false || continue
 
9483
      ;;
 
9484
    nosideeffect)
 
9485
      # after this tag, mechanisms are not by side-effect, so they'll
 
9486
      # only be used when explicitly requested
 
9487
      if test "x$enable_dependency_tracking" = xyes; then
 
9488
        continue
 
9489
      else
 
9490
        break
 
9491
      fi
 
9492
      ;;
 
9493
    msvisualcpp | msvcmsys)
 
9494
      # This compiler won't grok `-c -o', but also, the minuso test has
 
9495
      # not run yet.  These depmodes are late enough in the game, and
 
9496
      # so weak that their functioning should not be impacted.
 
9497
      am__obj=conftest.${OBJEXT-o}
 
9498
      am__minus_obj=
 
9499
      ;;
 
9500
    none) break ;;
 
9501
    esac
 
9502
    if depmode=$depmode \
 
9503
       source=sub/conftest.c object=$am__obj \
 
9504
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
9505
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
 
9506
         >/dev/null 2>conftest.err &&
 
9507
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 
9508
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
9509
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
 
9510
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
9511
      # icc doesn't choke on unknown options, it will just issue warnings
 
9512
      # or remarks (even with -Werror).  So we grep stderr for any message
 
9513
      # that says an option was ignored or not supported.
 
9514
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
9515
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
9516
      # The diagnosis changed in icc 8.0:
 
9517
      #   icc: Command line remark: option '-MP' not supported
 
9518
      if (grep 'ignoring option' conftest.err ||
 
9519
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
9520
        am_cv_$1_dependencies_compiler_type=$depmode
 
9521
        break
 
9522
      fi
 
9523
    fi
 
9524
  done
 
9525
 
 
9526
  cd ..
 
9527
  rm -rf conftest.dir
 
9528
else
 
9529
  am_cv_$1_dependencies_compiler_type=none
 
9530
fi
 
9531
])
 
9532
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
9533
AM_CONDITIONAL([am__fastdep$1], [
 
9534
  test "x$enable_dependency_tracking" != xno \
 
9535
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
9536
])
 
9537
 
 
9538
 
 
9539
# AM_SET_DEPDIR
 
9540
# -------------
 
9541
# Choose a directory name for dependency files.
 
9542
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
9543
AC_DEFUN([AM_SET_DEPDIR],
 
9544
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
9545
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
9546
])
 
9547
 
 
9548
 
 
9549
# AM_DEP_TRACK
 
9550
# ------------
 
9551
AC_DEFUN([AM_DEP_TRACK],
 
9552
[AC_ARG_ENABLE(dependency-tracking,
 
9553
[  --disable-dependency-tracking  speeds up one-time build
 
9554
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
9555
if test "x$enable_dependency_tracking" != xno; then
 
9556
  am_depcomp="$ac_aux_dir/depcomp"
 
9557
  AMDEPBACKSLASH='\'
 
9558
fi
 
9559
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
9560
AC_SUBST([AMDEPBACKSLASH])dnl
 
9561
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
9562
])
 
9563
 
 
9564
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
9565
 
 
9566
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 
9567
# Free Software Foundation, Inc.
 
9568
#
 
9569
# This file is free software; the Free Software Foundation
 
9570
# gives unlimited permission to copy and/or distribute it,
 
9571
# with or without modifications, as long as this notice is preserved.
 
9572
 
 
9573
#serial 5
 
9574
 
 
9575
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
9576
# ------------------------------
 
9577
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
9578
[{
 
9579
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
 
9580
  # are listed without --file.  Let's play safe and only enable the eval
 
9581
  # if we detect the quoting.
 
9582
  case $CONFIG_FILES in
 
9583
  *\'*) eval set x "$CONFIG_FILES" ;;
 
9584
  *)   set x $CONFIG_FILES ;;
 
9585
  esac
 
9586
  shift
 
9587
  for mf
 
9588
  do
 
9589
    # Strip MF so we end up with the name of the file.
 
9590
    mf=`echo "$mf" | sed -e 's/:.*$//'`
 
9591
    # Check whether this is an Automake generated Makefile or not.
 
9592
    # We used to match only the files named `Makefile.in', but
 
9593
    # some people rename them; so instead we look at the file content.
 
9594
    # Grep'ing the first line is not enough: some people post-process
 
9595
    # each Makefile.in and add a new line on top of each file to say so.
 
9596
    # Grep'ing the whole file is not good either: AIX grep has a line
 
9597
    # limit of 2048, but all sed's we know have understand at least 4000.
 
9598
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
 
9599
      dirpart=`AS_DIRNAME("$mf")`
 
9600
    else
 
9601
      continue
 
9602
    fi
 
9603
    # Extract the definition of DEPDIR, am__include, and am__quote
 
9604
    # from the Makefile without running `make'.
 
9605
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
9606
    test -z "$DEPDIR" && continue
 
9607
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
9608
    test -z "am__include" && continue
 
9609
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
9610
    # When using ansi2knr, U may be empty or an underscore; expand it
 
9611
    U=`sed -n 's/^U = //p' < "$mf"`
 
9612
    # Find all dependency output files, they are included files with
 
9613
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
9614
    # simplest approach to changing $(DEPDIR) to its actual value in the
 
9615
    # expansion.
 
9616
    for file in `sed -n "
 
9617
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
9618
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
9619
      # Make sure the directory exists.
 
9620
      test -f "$dirpart/$file" && continue
 
9621
      fdir=`AS_DIRNAME(["$file"])`
 
9622
      AS_MKDIR_P([$dirpart/$fdir])
 
9623
      # echo "creating $dirpart/$file"
 
9624
      echo '# dummy' > "$dirpart/$file"
 
9625
    done
 
9626
  done
 
9627
}
 
9628
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
9629
 
 
9630
 
 
9631
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
9632
# -----------------------------
 
9633
# This macro should only be invoked once -- use via AC_REQUIRE.
 
9634
#
 
9635
# This code is only required when automatic dependency tracking
 
9636
# is enabled.  FIXME.  This creates each `.P' file that we will
 
9637
# need in order to bootstrap the dependency handling code.
 
9638
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
9639
[AC_CONFIG_COMMANDS([depfiles],
 
9640
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
9641
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
9642
])
 
9643
 
 
9644
# Do all the work for Automake.                             -*- Autoconf -*-
 
9645
 
 
9646
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
9647
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 
9648
#
 
9649
# This file is free software; the Free Software Foundation
 
9650
# gives unlimited permission to copy and/or distribute it,
 
9651
# with or without modifications, as long as this notice is preserved.
 
9652
 
 
9653
# serial 16
 
9654
 
 
9655
# This macro actually does too much.  Some checks are only needed if
 
9656
# your package does certain things.  But this isn't really a big deal.
 
9657
 
 
9658
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
9659
# AM_INIT_AUTOMAKE([OPTIONS])
 
9660
# -----------------------------------------------
 
9661
# The call with PACKAGE and VERSION arguments is the old style
 
9662
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
9663
# and VERSION should now be passed to AC_INIT and removed from
 
9664
# the call to AM_INIT_AUTOMAKE.
 
9665
# We support both call styles for the transition.  After
 
9666
# the next Automake release, Autoconf can make the AC_INIT
 
9667
# arguments mandatory, and then we can depend on a new Autoconf
 
9668
# release and drop the old call support.
 
9669
AC_DEFUN([AM_INIT_AUTOMAKE],
 
9670
[AC_PREREQ([2.62])dnl
 
9671
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
9672
dnl the ones we care about.
 
9673
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
9674
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
9675
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
9676
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
9677
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
9678
  # is not polluted with repeated "-I."
 
9679
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
9680
  # test to see if srcdir already configured
 
9681
  if test -f $srcdir/config.status; then
 
9682
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
9683
  fi
 
9684
fi
 
9685
 
 
9686
# test whether we have cygpath
 
9687
if test -z "$CYGPATH_W"; then
 
9688
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
9689
    CYGPATH_W='cygpath -w'
 
9690
  else
 
9691
    CYGPATH_W=echo
 
9692
  fi
 
9693
fi
 
9694
AC_SUBST([CYGPATH_W])
 
9695
 
 
9696
# Define the identity of the package.
 
9697
dnl Distinguish between old-style and new-style calls.
 
9698
m4_ifval([$2],
 
9699
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
9700
 AC_SUBST([PACKAGE], [$1])dnl
 
9701
 AC_SUBST([VERSION], [$2])],
 
9702
[_AM_SET_OPTIONS([$1])dnl
 
9703
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
9704
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
9705
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 
9706
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
9707
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
9708
 
 
9709
_AM_IF_OPTION([no-define],,
 
9710
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
9711
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
9712
 
 
9713
# Some tools Automake needs.
 
9714
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
9715
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
9716
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
9717
AM_MISSING_PROG(AUTOCONF, autoconf)
 
9718
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
9719
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
9720
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
9721
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
9722
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 
9723
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
9724
# We need awk for the "check" target.  The system "awk" is bad on
 
9725
# some platforms.
 
9726
AC_REQUIRE([AC_PROG_AWK])dnl
 
9727
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
9728
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
9729
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
9730
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
9731
                             [_AM_PROG_TAR([v7])])])
 
9732
_AM_IF_OPTION([no-dependencies],,
 
9733
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
9734
                  [_AM_DEPENDENCIES(CC)],
 
9735
                  [define([AC_PROG_CC],
 
9736
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
9737
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
9738
                  [_AM_DEPENDENCIES(CXX)],
 
9739
                  [define([AC_PROG_CXX],
 
9740
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
9741
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
9742
                  [_AM_DEPENDENCIES(OBJC)],
 
9743
                  [define([AC_PROG_OBJC],
 
9744
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
9745
])
 
9746
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
 
9747
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
 
9748
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 
9749
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 
9750
AC_CONFIG_COMMANDS_PRE(dnl
 
9751
[m4_provide_if([_AM_COMPILER_EXEEXT],
 
9752
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 
9753
])
 
9754
 
 
9755
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 
9756
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 
9757
dnl mangled by Autoconf and run in a shell conditional statement.
 
9758
m4_define([_AC_COMPILER_EXEEXT],
 
9759
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
9760
 
 
9761
 
 
9762
# When config.status generates a header, we must update the stamp-h file.
 
9763
# This file resides in the same directory as the config header
 
9764
# that is generated.  The stamp files are numbered to have different names.
 
9765
 
 
9766
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
9767
# loop where config.status creates the headers, so we can generate
 
9768
# our stamp files there.
 
9769
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
9770
[# Compute $1's index in $config_headers.
 
9771
_am_arg=$1
 
9772
_am_stamp_count=1
 
9773
for _am_header in $config_headers :; do
 
9774
  case $_am_header in
 
9775
    $_am_arg | $_am_arg:* )
 
9776
      break ;;
 
9777
    * )
 
9778
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
9779
  esac
 
9780
done
 
9781
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
9782
 
 
9783
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 
9784
#
 
9785
# This file is free software; the Free Software Foundation
 
9786
# gives unlimited permission to copy and/or distribute it,
 
9787
# with or without modifications, as long as this notice is preserved.
 
9788
 
 
9789
# AM_PROG_INSTALL_SH
 
9790
# ------------------
 
9791
# Define $install_sh.
 
9792
AC_DEFUN([AM_PROG_INSTALL_SH],
 
9793
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
9794
if test x"${install_sh}" != xset; then
 
9795
  case $am_aux_dir in
 
9796
  *\ * | *\     *)
 
9797
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 
9798
  *)
 
9799
    install_sh="\${SHELL} $am_aux_dir/install-sh"
 
9800
  esac
 
9801
fi
 
9802
AC_SUBST(install_sh)])
 
9803
 
 
9804
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
9805
#
 
9806
# This file is free software; the Free Software Foundation
 
9807
# gives unlimited permission to copy and/or distribute it,
 
9808
# with or without modifications, as long as this notice is preserved.
 
9809
 
 
9810
# serial 2
 
9811
 
 
9812
# Check whether the underlying file-system supports filenames
 
9813
# with a leading dot.  For instance MS-DOS doesn't.
 
9814
AC_DEFUN([AM_SET_LEADING_DOT],
 
9815
[rm -rf .tst 2>/dev/null
 
9816
mkdir .tst 2>/dev/null
 
9817
if test -d .tst; then
 
9818
  am__leading_dot=.
 
9819
else
 
9820
  am__leading_dot=_
 
9821
fi
 
9822
rmdir .tst 2>/dev/null
 
9823
AC_SUBST([am__leading_dot])])
 
9824
 
 
9825
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
9826
 
 
9827
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 
9828
#
 
9829
# This file is free software; the Free Software Foundation
 
9830
# gives unlimited permission to copy and/or distribute it,
 
9831
# with or without modifications, as long as this notice is preserved.
 
9832
 
 
9833
# serial 4
 
9834
 
 
9835
# AM_MAKE_INCLUDE()
 
9836
# -----------------
 
9837
# Check to see how make treats includes.
 
9838
AC_DEFUN([AM_MAKE_INCLUDE],
 
9839
[am_make=${MAKE-make}
 
9840
cat > confinc << 'END'
 
9841
am__doit:
 
9842
        @echo this is the am__doit target
 
9843
.PHONY: am__doit
 
9844
END
 
9845
# If we don't find an include directive, just comment out the code.
 
9846
AC_MSG_CHECKING([for style of include used by $am_make])
 
9847
am__include="#"
 
9848
am__quote=
 
9849
_am_result=none
 
9850
# First try GNU make style include.
 
9851
echo "include confinc" > confmf
 
9852
# Ignore all kinds of additional output from `make'.
 
9853
case `$am_make -s -f confmf 2> /dev/null` in #(
 
9854
*the\ am__doit\ target*)
 
9855
  am__include=include
 
9856
  am__quote=
 
9857
  _am_result=GNU
 
9858
  ;;
 
9859
esac
 
9860
# Now try BSD make style include.
 
9861
if test "$am__include" = "#"; then
 
9862
   echo '.include "confinc"' > confmf
 
9863
   case `$am_make -s -f confmf 2> /dev/null` in #(
 
9864
   *the\ am__doit\ target*)
 
9865
     am__include=.include
 
9866
     am__quote="\""
 
9867
     _am_result=BSD
 
9868
     ;;
 
9869
   esac
 
9870
fi
 
9871
AC_SUBST([am__include])
 
9872
AC_SUBST([am__quote])
 
9873
AC_MSG_RESULT([$_am_result])
 
9874
rm -f confinc confmf
 
9875
])
 
9876
 
 
9877
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
 
9878
# Free Software Foundation, Inc.
 
9879
#
 
9880
# This file is free software; the Free Software Foundation
 
9881
# gives unlimited permission to copy and/or distribute it,
 
9882
# with or without modifications, as long as this notice is preserved.
 
9883
 
 
9884
# serial 6
 
9885
 
 
9886
# AM_PROG_CC_C_O
 
9887
# --------------
 
9888
# Like AC_PROG_CC_C_O, but changed for automake.
 
9889
AC_DEFUN([AM_PROG_CC_C_O],
 
9890
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
 
9891
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
9892
AC_REQUIRE_AUX_FILE([compile])dnl
 
9893
# FIXME: we rely on the cache variable name because
 
9894
# there is no other way.
 
9895
set dummy $CC
 
9896
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
 
9897
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
 
9898
if test "$am_t" != yes; then
 
9899
   # Losing compiler, so override with the script.
 
9900
   # FIXME: It is wrong to rewrite CC.
 
9901
   # But if we don't then we get into trouble of one sort or another.
 
9902
   # A longer-term fix would be to have automake use am__CC in this case,
 
9903
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
 
9904
   CC="$am_aux_dir/compile $CC"
 
9905
fi
 
9906
dnl Make sure AC_PROG_CC is never called again, or it will override our
 
9907
dnl setting of CC.
 
9908
m4_define([AC_PROG_CC],
 
9909
          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
 
9910
])
 
9911
 
 
9912
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
9913
 
 
9914
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 
9915
# Free Software Foundation, Inc.
 
9916
#
 
9917
# This file is free software; the Free Software Foundation
 
9918
# gives unlimited permission to copy and/or distribute it,
 
9919
# with or without modifications, as long as this notice is preserved.
 
9920
 
 
9921
# serial 6
 
9922
 
 
9923
# AM_MISSING_PROG(NAME, PROGRAM)
 
9924
# ------------------------------
 
9925
AC_DEFUN([AM_MISSING_PROG],
 
9926
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
9927
$1=${$1-"${am_missing_run}$2"}
 
9928
AC_SUBST($1)])
 
9929
 
 
9930
 
 
9931
# AM_MISSING_HAS_RUN
 
9932
# ------------------
 
9933
# Define MISSING if not defined so far and test if it supports --run.
 
9934
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
9935
AC_DEFUN([AM_MISSING_HAS_RUN],
 
9936
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
9937
AC_REQUIRE_AUX_FILE([missing])dnl
 
9938
if test x"${MISSING+set}" != xset; then
 
9939
  case $am_aux_dir in
 
9940
  *\ * | *\     *)
 
9941
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 
9942
  *)
 
9943
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
 
9944
  esac
 
9945
fi
 
9946
# Use eval to expand $SHELL
 
9947
if eval "$MISSING --run true"; then
 
9948
  am_missing_run="$MISSING --run "
 
9949
else
 
9950
  am_missing_run=
 
9951
  AC_MSG_WARN([`missing' script is too old or missing])
 
9952
fi
 
9953
])
 
9954
 
 
9955
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
9956
#
 
9957
# This file is free software; the Free Software Foundation
 
9958
# gives unlimited permission to copy and/or distribute it,
 
9959
# with or without modifications, as long as this notice is preserved.
 
9960
 
 
9961
# AM_PROG_MKDIR_P
 
9962
# ---------------
 
9963
# Check for `mkdir -p'.
 
9964
AC_DEFUN([AM_PROG_MKDIR_P],
 
9965
[AC_PREREQ([2.60])dnl
 
9966
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
9967
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 
9968
dnl while keeping a definition of mkdir_p for backward compatibility.
 
9969
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 
9970
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 
9971
dnl Makefile.ins that do not define MKDIR_P, so we do our own
 
9972
dnl adjustment using top_builddir (which is defined more often than
 
9973
dnl MKDIR_P).
 
9974
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 
9975
case $mkdir_p in
 
9976
  [[\\/$]]* | ?:[[\\/]]*) ;;
 
9977
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 
9978
esac
 
9979
])
 
9980
 
 
9981
# Helper functions for option handling.                     -*- Autoconf -*-
 
9982
 
 
9983
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 
9984
#
 
9985
# This file is free software; the Free Software Foundation
 
9986
# gives unlimited permission to copy and/or distribute it,
 
9987
# with or without modifications, as long as this notice is preserved.
 
9988
 
 
9989
# serial 4
 
9990
 
 
9991
# _AM_MANGLE_OPTION(NAME)
 
9992
# -----------------------
 
9993
AC_DEFUN([_AM_MANGLE_OPTION],
 
9994
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
9995
 
 
9996
# _AM_SET_OPTION(NAME)
 
9997
# ------------------------------
 
9998
# Set option NAME.  Presently that only means defining a flag for this option.
 
9999
AC_DEFUN([_AM_SET_OPTION],
 
10000
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
10001
 
 
10002
# _AM_SET_OPTIONS(OPTIONS)
 
10003
# ----------------------------------
 
10004
# OPTIONS is a space-separated list of Automake options.
 
10005
AC_DEFUN([_AM_SET_OPTIONS],
 
10006
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
10007
 
 
10008
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
10009
# -------------------------------------------
 
10010
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
10011
AC_DEFUN([_AM_IF_OPTION],
 
10012
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
10013
 
 
10014
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
10015
 
 
10016
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 
10017
# Free Software Foundation, Inc.
 
10018
#
 
10019
# This file is free software; the Free Software Foundation
 
10020
# gives unlimited permission to copy and/or distribute it,
 
10021
# with or without modifications, as long as this notice is preserved.
 
10022
 
 
10023
# serial 5
 
10024
 
 
10025
# AM_SANITY_CHECK
 
10026
# ---------------
 
10027
AC_DEFUN([AM_SANITY_CHECK],
 
10028
[AC_MSG_CHECKING([whether build environment is sane])
 
10029
# Just in case
 
10030
sleep 1
 
10031
echo timestamp > conftest.file
 
10032
# Reject unsafe characters in $srcdir or the absolute working directory
 
10033
# name.  Accept space and tab only in the latter.
 
10034
am_lf='
 
10035
'
 
10036
case `pwd` in
 
10037
  *[[\\\"\#\$\&\'\`$am_lf]]*)
 
10038
    AC_MSG_ERROR([unsafe absolute working directory name]);;
 
10039
esac
 
10040
case $srcdir in
 
10041
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
 
10042
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 
10043
esac
 
10044
 
 
10045
# Do `set' in a subshell so we don't clobber the current shell's
 
10046
# arguments.  Must try -L first in case configure is actually a
 
10047
# symlink; some systems play weird games with the mod time of symlinks
 
10048
# (eg FreeBSD returns the mod time of the symlink's containing
 
10049
# directory).
 
10050
if (
 
10051
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 
10052
   if test "$[*]" = "X"; then
 
10053
      # -L didn't work.
 
10054
      set X `ls -t "$srcdir/configure" conftest.file`
 
10055
   fi
 
10056
   rm -f conftest.file
 
10057
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
10058
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
10059
 
 
10060
      # If neither matched, then we have a broken ls.  This can happen
 
10061
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
10062
      # broken ls alias from the environment.  This has actually
 
10063
      # happened.  Such a system could not be considered "sane".
 
10064
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
10065
alias in your environment])
 
10066
   fi
 
10067
 
 
10068
   test "$[2]" = conftest.file
 
10069
   )
 
10070
then
 
10071
   # Ok.
 
10072
   :
 
10073
else
 
10074
   AC_MSG_ERROR([newly created file is older than distributed files!
 
10075
Check your system clock])
 
10076
fi
 
10077
AC_MSG_RESULT(yes)])
 
10078
 
 
10079
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
10080
#
 
10081
# This file is free software; the Free Software Foundation
 
10082
# gives unlimited permission to copy and/or distribute it,
 
10083
# with or without modifications, as long as this notice is preserved.
 
10084
 
 
10085
# AM_PROG_INSTALL_STRIP
 
10086
# ---------------------
 
10087
# One issue with vendor `install' (even GNU) is that you can't
 
10088
# specify the program used to strip binaries.  This is especially
 
10089
# annoying in cross-compiling environments, where the build's strip
 
10090
# is unlikely to handle the host's binaries.
 
10091
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
10092
# always use install-sh in `make install-strip', and initialize
 
10093
# STRIPPROG with the value of the STRIP variable (set by the user).
 
10094
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
10095
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
10096
# Installed binaries are usually stripped using `strip' when the user
 
10097
# run `make install-strip'.  However `strip' might not be the right
 
10098
# tool to use in cross-compilation environments, therefore Automake
 
10099
# will honor the `STRIP' environment variable to overrule this program.
 
10100
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
10101
if test "$cross_compiling" != no; then
 
10102
  AC_CHECK_TOOL([STRIP], [strip], :)
 
10103
fi
 
10104
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
10105
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
10106
 
 
10107
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 
10108
#
 
10109
# This file is free software; the Free Software Foundation
 
10110
# gives unlimited permission to copy and/or distribute it,
 
10111
# with or without modifications, as long as this notice is preserved.
 
10112
 
 
10113
# serial 2
 
10114
 
 
10115
# _AM_SUBST_NOTMAKE(VARIABLE)
 
10116
# ---------------------------
 
10117
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 
10118
# This macro is traced by Automake.
 
10119
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
10120
 
 
10121
# AM_SUBST_NOTMAKE(VARIABLE)
 
10122
# ---------------------------
 
10123
# Public sister of _AM_SUBST_NOTMAKE.
 
10124
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
10125
 
 
10126
# Check how to create a tarball.                            -*- Autoconf -*-
 
10127
 
 
10128
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
10129
#
 
10130
# This file is free software; the Free Software Foundation
 
10131
# gives unlimited permission to copy and/or distribute it,
 
10132
# with or without modifications, as long as this notice is preserved.
 
10133
 
 
10134
# serial 2
 
10135
 
 
10136
# _AM_PROG_TAR(FORMAT)
 
10137
# --------------------
 
10138
# Check how to create a tarball in format FORMAT.
 
10139
# FORMAT should be one of `v7', `ustar', or `pax'.
 
10140
#
 
10141
# Substitute a variable $(am__tar) that is a command
 
10142
# writing to stdout a FORMAT-tarball containing the directory
 
10143
# $tardir.
 
10144
#     tardir=directory && $(am__tar) > result.tar
 
10145
#
 
10146
# Substitute a variable $(am__untar) that extract such
 
10147
# a tarball read from stdin.
 
10148
#     $(am__untar) < result.tar
 
10149
AC_DEFUN([_AM_PROG_TAR],
 
10150
[# Always define AMTAR for backward compatibility.
 
10151
AM_MISSING_PROG([AMTAR], [tar])
 
10152
m4_if([$1], [v7],
 
10153
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
10154
     [m4_case([$1], [ustar],, [pax],,
 
10155
              [m4_fatal([Unknown tar format])])
 
10156
AC_MSG_CHECKING([how to create a $1 tar archive])
 
10157
# Loop over all known methods to create a tar archive until one works.
 
10158
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
10159
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
10160
# Do not fold the above two line into one, because Tru64 sh and
 
10161
# Solaris sh will not grok spaces in the rhs of `-'.
 
10162
for _am_tool in $_am_tools
 
10163
do
 
10164
  case $_am_tool in
 
10165
  gnutar)
 
10166
    for _am_tar in tar gnutar gtar;
 
10167
    do
 
10168
      AM_RUN_LOG([$_am_tar --version]) && break
 
10169
    done
 
10170
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
10171
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
10172
    am__untar="$_am_tar -xf -"
 
10173
    ;;
 
10174
  plaintar)
 
10175
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
10176
    # ustar tarball either.
 
10177
    (tar --version) >/dev/null 2>&1 && continue
 
10178
    am__tar='tar chf - "$$tardir"'
 
10179
    am__tar_='tar chf - "$tardir"'
 
10180
    am__untar='tar xf -'
 
10181
    ;;
 
10182
  pax)
 
10183
    am__tar='pax -L -x $1 -w "$$tardir"'
 
10184
    am__tar_='pax -L -x $1 -w "$tardir"'
 
10185
    am__untar='pax -r'
 
10186
    ;;
 
10187
  cpio)
 
10188
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
10189
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
10190
    am__untar='cpio -i -H $1 -d'
 
10191
    ;;
 
10192
  none)
 
10193
    am__tar=false
 
10194
    am__tar_=false
 
10195
    am__untar=false
 
10196
    ;;
 
10197
  esac
 
10198
 
 
10199
  # If the value was cached, stop now.  We just wanted to have am__tar
 
10200
  # and am__untar set.
 
10201
  test -n "${am_cv_prog_tar_$1}" && break
 
10202
 
 
10203
  # tar/untar a dummy directory, and stop if the command works
 
10204
  rm -rf conftest.dir
 
10205
  mkdir conftest.dir
 
10206
  echo GrepMe > conftest.dir/file
 
10207
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
10208
  rm -rf conftest.dir
 
10209
  if test -s conftest.tar; then
 
10210
    AM_RUN_LOG([$am__untar <conftest.tar])
 
10211
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
10212
  fi
 
10213
done
 
10214
rm -rf conftest.dir
 
10215
 
 
10216
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
10217
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
10218
AC_SUBST([am__tar])
 
10219
AC_SUBST([am__untar])
 
10220
]) # _AM_PROG_TAR
 
10221
 
 
10222
m4_include([acinclude.m4])