~ubuntu-desktop/telepathy-indicator/ubuntu

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Ken VanDine
  • Date: 2011-06-01 14:46:59 UTC
  • Revision ID: ken.vandine@canonical.com-20110601144659-g7l0zjz9l7nbiba4
Tags: upstream-0.0.1
ImportĀ upstreamĀ versionĀ 0.0.1

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.67],,
 
17
[m4_warning([this file was generated for autoconf 2.67.
 
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
# iconv.m4 serial 11 (gettext-0.18.1)
 
407
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
 
408
dnl This file is free software; the Free Software Foundation
 
409
dnl gives unlimited permission to copy and/or distribute it,
 
410
dnl with or without modifications, as long as this notice is preserved.
 
411
 
 
412
dnl From Bruno Haible.
 
413
 
 
414
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
 
415
[
 
416
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
417
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
418
  AC_REQUIRE([AC_LIB_RPATH])
 
419
 
 
420
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
421
  dnl accordingly.
 
422
  AC_LIB_LINKFLAGS_BODY([iconv])
 
423
])
 
424
 
 
425
AC_DEFUN([AM_ICONV_LINK],
 
426
[
 
427
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
 
428
  dnl those with the standalone portable GNU libiconv installed).
 
429
  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
430
 
 
431
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
432
  dnl accordingly.
 
433
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
 
434
 
 
435
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
 
436
  dnl because if the user has installed libiconv and not disabled its use
 
437
  dnl via --without-libiconv-prefix, he wants to use it. The first
 
438
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
 
439
  am_save_CPPFLAGS="$CPPFLAGS"
 
440
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
 
441
 
 
442
  AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
 
443
    am_cv_func_iconv="no, consider installing GNU libiconv"
 
444
    am_cv_lib_iconv=no
 
445
    AC_TRY_LINK([#include <stdlib.h>
 
446
#include <iconv.h>],
 
447
      [iconv_t cd = iconv_open("","");
 
448
       iconv(cd,NULL,NULL,NULL,NULL);
 
449
       iconv_close(cd);],
 
450
      [am_cv_func_iconv=yes])
 
451
    if test "$am_cv_func_iconv" != yes; then
 
452
      am_save_LIBS="$LIBS"
 
453
      LIBS="$LIBS $LIBICONV"
 
454
      AC_TRY_LINK([#include <stdlib.h>
 
455
#include <iconv.h>],
 
456
        [iconv_t cd = iconv_open("","");
 
457
         iconv(cd,NULL,NULL,NULL,NULL);
 
458
         iconv_close(cd);],
 
459
        [am_cv_lib_iconv=yes]
 
460
        [am_cv_func_iconv=yes])
 
461
      LIBS="$am_save_LIBS"
 
462
    fi
 
463
  ])
 
464
  if test "$am_cv_func_iconv" = yes; then
 
465
    AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
 
466
      dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
 
467
      am_save_LIBS="$LIBS"
 
468
      if test $am_cv_lib_iconv = yes; then
 
469
        LIBS="$LIBS $LIBICONV"
 
470
      fi
 
471
      AC_TRY_RUN([
 
472
#include <iconv.h>
 
473
#include <string.h>
 
474
int main ()
 
475
{
 
476
  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
 
477
     returns.  */
 
478
  {
 
479
    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
 
480
    if (cd_utf8_to_88591 != (iconv_t)(-1))
 
481
      {
 
482
        static const char input[] = "\342\202\254"; /* EURO SIGN */
 
483
        char buf[10];
 
484
        const char *inptr = input;
 
485
        size_t inbytesleft = strlen (input);
 
486
        char *outptr = buf;
 
487
        size_t outbytesleft = sizeof (buf);
 
488
        size_t res = iconv (cd_utf8_to_88591,
 
489
                            (char **) &inptr, &inbytesleft,
 
490
                            &outptr, &outbytesleft);
 
491
        if (res == 0)
 
492
          return 1;
 
493
      }
 
494
  }
 
495
  /* Test against Solaris 10 bug: Failures are not distinguishable from
 
496
     successful returns.  */
 
497
  {
 
498
    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
 
499
    if (cd_ascii_to_88591 != (iconv_t)(-1))
 
500
      {
 
501
        static const char input[] = "\263";
 
502
        char buf[10];
 
503
        const char *inptr = input;
 
504
        size_t inbytesleft = strlen (input);
 
505
        char *outptr = buf;
 
506
        size_t outbytesleft = sizeof (buf);
 
507
        size_t res = iconv (cd_ascii_to_88591,
 
508
                            (char **) &inptr, &inbytesleft,
 
509
                            &outptr, &outbytesleft);
 
510
        if (res == 0)
 
511
          return 1;
 
512
      }
 
513
  }
 
514
#if 0 /* This bug could be worked around by the caller.  */
 
515
  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
 
516
  {
 
517
    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
 
518
    if (cd_88591_to_utf8 != (iconv_t)(-1))
 
519
      {
 
520
        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
 
521
        char buf[50];
 
522
        const char *inptr = input;
 
523
        size_t inbytesleft = strlen (input);
 
524
        char *outptr = buf;
 
525
        size_t outbytesleft = sizeof (buf);
 
526
        size_t res = iconv (cd_88591_to_utf8,
 
527
                            (char **) &inptr, &inbytesleft,
 
528
                            &outptr, &outbytesleft);
 
529
        if ((int)res > 0)
 
530
          return 1;
 
531
      }
 
532
  }
 
533
#endif
 
534
  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
 
535
     provided.  */
 
536
  if (/* Try standardized names.  */
 
537
      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
 
538
      /* Try IRIX, OSF/1 names.  */
 
539
      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
 
540
      /* Try AIX names.  */
 
541
      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
 
542
      /* Try HP-UX names.  */
 
543
      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
 
544
    return 1;
 
545
  return 0;
 
546
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
 
547
        [case "$host_os" in
 
548
           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
 
549
           *)            am_cv_func_iconv_works="guessing yes" ;;
 
550
         esac])
 
551
      LIBS="$am_save_LIBS"
 
552
    ])
 
553
    case "$am_cv_func_iconv_works" in
 
554
      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
 
555
      *)   am_func_iconv=yes ;;
 
556
    esac
 
557
  else
 
558
    am_func_iconv=no am_cv_lib_iconv=no
 
559
  fi
 
560
  if test "$am_func_iconv" = yes; then
 
561
    AC_DEFINE([HAVE_ICONV], [1],
 
562
      [Define if you have the iconv() function and it works.])
 
563
  fi
 
564
  if test "$am_cv_lib_iconv" = yes; then
 
565
    AC_MSG_CHECKING([how to link with libiconv])
 
566
    AC_MSG_RESULT([$LIBICONV])
 
567
  else
 
568
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
 
569
    dnl either.
 
570
    CPPFLAGS="$am_save_CPPFLAGS"
 
571
    LIBICONV=
 
572
    LTLIBICONV=
 
573
  fi
 
574
  AC_SUBST([LIBICONV])
 
575
  AC_SUBST([LTLIBICONV])
 
576
])
 
577
 
 
578
dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
 
579
dnl avoid warnings like
 
580
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
 
581
dnl This is tricky because of the way 'aclocal' is implemented:
 
582
dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
 
583
dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
 
584
dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
 
585
dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
 
586
dnl   warnings.
 
587
m4_define([gl_iconv_AC_DEFUN],
 
588
  m4_version_prereq([2.64],
 
589
    [[AC_DEFUN_ONCE(
 
590
        [$1], [$2])]],
 
591
    [[AC_DEFUN(
 
592
        [$1], [$2])]]))
 
593
gl_iconv_AC_DEFUN([AM_ICONV],
 
594
[
 
595
  AM_ICONV_LINK
 
596
  if test "$am_cv_func_iconv" = yes; then
 
597
    AC_MSG_CHECKING([for iconv declaration])
 
598
    AC_CACHE_VAL([am_cv_proto_iconv], [
 
599
      AC_TRY_COMPILE([
 
600
#include <stdlib.h>
 
601
#include <iconv.h>
 
602
extern
 
603
#ifdef __cplusplus
 
604
"C"
 
605
#endif
 
606
#if defined(__STDC__) || defined(__cplusplus)
 
607
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
 
608
#else
 
609
size_t iconv();
 
610
#endif
 
611
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
 
612
      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
 
613
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
 
614
    AC_MSG_RESULT([
 
615
         $am_cv_proto_iconv])
 
616
    AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
 
617
      [Define as const if the declaration of iconv() needs const.])
 
618
  fi
 
619
])
 
620
 
 
621
# intlmacosx.m4 serial 3 (gettext-0.18)
 
622
dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
 
623
dnl This file is free software; the Free Software Foundation
 
624
dnl gives unlimited permission to copy and/or distribute it,
 
625
dnl with or without modifications, as long as this notice is preserved.
 
626
dnl
 
627
dnl This file can can be used in projects which are not available under
 
628
dnl the GNU General Public License or the GNU Library General Public
 
629
dnl License but which still want to provide support for the GNU gettext
 
630
dnl functionality.
 
631
dnl Please note that the actual code of the GNU gettext library is covered
 
632
dnl by the GNU Library General Public License, and the rest of the GNU
 
633
dnl gettext package package is covered by the GNU General Public License.
 
634
dnl They are *not* in the public domain.
 
635
 
 
636
dnl Checks for special options needed on MacOS X.
 
637
dnl Defines INTL_MACOSX_LIBS.
 
638
AC_DEFUN([gt_INTL_MACOSX],
 
639
[
 
640
  dnl Check for API introduced in MacOS X 10.2.
 
641
  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
 
642
    [gt_cv_func_CFPreferencesCopyAppValue],
 
643
    [gt_save_LIBS="$LIBS"
 
644
     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
 
645
     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
 
646
       [CFPreferencesCopyAppValue(NULL, NULL)],
 
647
       [gt_cv_func_CFPreferencesCopyAppValue=yes],
 
648
       [gt_cv_func_CFPreferencesCopyAppValue=no])
 
649
     LIBS="$gt_save_LIBS"])
 
650
  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
 
651
    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
 
652
      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
 
653
  fi
 
654
  dnl Check for API introduced in MacOS X 10.3.
 
655
  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
 
656
    [gt_save_LIBS="$LIBS"
 
657
     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
 
658
     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
 
659
       [gt_cv_func_CFLocaleCopyCurrent=yes],
 
660
       [gt_cv_func_CFLocaleCopyCurrent=no])
 
661
     LIBS="$gt_save_LIBS"])
 
662
  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 
663
    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
 
664
      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
 
665
  fi
 
666
  INTL_MACOSX_LIBS=
 
667
  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 
668
    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
 
669
  fi
 
670
  AC_SUBST([INTL_MACOSX_LIBS])
 
671
])
 
672
 
 
673
 
 
674
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
675
# serial 40 IT_PROG_INTLTOOL
 
676
AC_DEFUN([IT_PROG_INTLTOOL], [
 
677
AC_PREREQ([2.50])dnl
 
678
AC_REQUIRE([AM_NLS])dnl
 
679
 
 
680
case "$am__api_version" in
 
681
    1.[01234])
 
682
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
683
    ;;
 
684
    *)
 
685
    ;;
 
686
esac
 
687
 
 
688
if test -n "$1"; then
 
689
    AC_MSG_CHECKING([for intltool >= $1])
 
690
 
 
691
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
692
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
693
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
694
    ]
 
695
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
696
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
697
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
698
fi
 
699
 
 
700
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
701
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
702
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
703
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
704
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
705
fi
 
706
 
 
707
  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 $< [$]@' 
 
708
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 $< [$]@' 
 
709
     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 $< [$]@' 
 
710
     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 $< [$]@' 
 
711
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
712
     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 $< [$]@' 
 
713
   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 $< [$]@' 
 
714
    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 $< [$]@' 
 
715
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 $< [$]@' 
 
716
       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 $< [$]@' 
 
717
      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 $< [$]@' 
 
718
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
719
      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 $< [$]@' 
 
720
      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 $< [$]@' 
 
721
    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 $< [$]@' 
 
722
  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 $< [$]@' 
 
723
    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 $< [$]@' 
 
724
    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 $< [$]@'
 
725
   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 $< [$]@'
 
726
 
 
727
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
 
728
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 
729
_IT_SUBST(INTLTOOL_KEYS_RULE)
 
730
_IT_SUBST(INTLTOOL_PROP_RULE)
 
731
_IT_SUBST(INTLTOOL_OAF_RULE)
 
732
_IT_SUBST(INTLTOOL_PONG_RULE)
 
733
_IT_SUBST(INTLTOOL_SERVER_RULE)
 
734
_IT_SUBST(INTLTOOL_SHEET_RULE)
 
735
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
736
_IT_SUBST(INTLTOOL_UI_RULE)
 
737
_IT_SUBST(INTLTOOL_XAM_RULE)
 
738
_IT_SUBST(INTLTOOL_KBD_RULE)
 
739
_IT_SUBST(INTLTOOL_XML_RULE)
 
740
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
741
_IT_SUBST(INTLTOOL_CAVES_RULE)
 
742
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 
743
_IT_SUBST(INTLTOOL_THEME_RULE)
 
744
_IT_SUBST(INTLTOOL_SERVICE_RULE)
 
745
_IT_SUBST(INTLTOOL_POLICY_RULE)
 
746
 
 
747
# Check the gettext tools to make sure they are GNU
 
748
AC_PATH_PROG(XGETTEXT, xgettext)
 
749
AC_PATH_PROG(MSGMERGE, msgmerge)
 
750
AC_PATH_PROG(MSGFMT, msgfmt)
 
751
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
752
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
753
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
754
fi
 
755
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
756
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
757
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
758
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
759
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
760
fi
 
761
 
 
762
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
763
if test -z "$INTLTOOL_PERL"; then
 
764
   AC_MSG_ERROR([perl not found])
 
765
fi
 
766
AC_MSG_CHECKING([for perl >= 5.8.1])
 
767
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 
768
if test $? -ne 0; then
 
769
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 
770
else
 
771
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
 
772
   AC_MSG_RESULT([$IT_PERL_VERSION])
 
773
fi
 
774
if test "x$2" != "xno-xml"; then
 
775
   AC_MSG_CHECKING([for XML::Parser])
 
776
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
777
       AC_MSG_RESULT([ok])
 
778
   else
 
779
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
780
   fi
 
781
fi
 
782
 
 
783
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
784
AC_SUBST(ALL_LINGUAS)
 
785
 
 
786
# Set DATADIRNAME correctly if it is not set yet
 
787
# (copied from glib-gettext.m4)
 
788
if test -z "$DATADIRNAME"; then
 
789
  AC_LINK_IFELSE(
 
790
    [AC_LANG_PROGRAM([[]],
 
791
                     [[extern int _nl_msg_cat_cntr;
 
792
                       return _nl_msg_cat_cntr]])],
 
793
    [DATADIRNAME=share],
 
794
    [case $host in
 
795
    *-*-solaris*)
 
796
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
797
    dnl GNU format message catalog is always supported,
 
798
    dnl since both are added to the libc all together.
 
799
    dnl Hence, we'd like to go with DATADIRNAME=share
 
800
    dnl in this case.
 
801
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
802
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
803
    ;;
 
804
    *)
 
805
    [DATADIRNAME=lib]
 
806
    ;;
 
807
    esac])
 
808
fi
 
809
AC_SUBST(DATADIRNAME)
 
810
 
 
811
IT_PO_SUBDIR([po])
 
812
 
 
813
])
 
814
 
 
815
 
 
816
# IT_PO_SUBDIR(DIRNAME)
 
817
# ---------------------
 
818
# All po subdirs have to be declared with this macro; the subdir "po" is
 
819
# declared by IT_PROG_INTLTOOL.
 
820
#
 
821
AC_DEFUN([IT_PO_SUBDIR],
 
822
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
823
dnl
 
824
dnl The following CONFIG_COMMANDS should be executed at the very end
 
825
dnl of config.status.
 
826
AC_CONFIG_COMMANDS_PRE([
 
827
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
828
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 
829
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
830
    fi
 
831
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
832
    >"$1/stamp-it.tmp"
 
833
    [sed '/^#/d
 
834
         s/^[[].*] *//
 
835
         /^[    ]*$/d
 
836
        '"s|^|  $ac_top_srcdir/|" \
 
837
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
838
    ]
 
839
    [sed '/^POTFILES =/,/[^\\]$/ {
 
840
                /^POTFILES =/!d
 
841
                r $1/POTFILES
 
842
          }
 
843
         ' "$1/Makefile.in" >"$1/Makefile"]
 
844
    rm -f "$1/Makefile.tmp"
 
845
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
846
  ])
 
847
])dnl
 
848
])
 
849
 
 
850
# _IT_SUBST(VARIABLE)
 
851
# -------------------
 
852
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
853
#
 
854
AC_DEFUN([_IT_SUBST],
 
855
[
 
856
AC_SUBST([$1])
 
857
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
858
]
 
859
)
 
860
 
 
861
# deprecated macros
 
862
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
863
# A hint is needed for aclocal from Automake <= 1.9.4:
 
864
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
865
 
 
866
 
 
867
# lib-ld.m4 serial 4 (gettext-0.18)
 
868
dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
 
869
dnl This file is free software; the Free Software Foundation
 
870
dnl gives unlimited permission to copy and/or distribute it,
 
871
dnl with or without modifications, as long as this notice is preserved.
 
872
 
 
873
dnl Subroutines of libtool.m4,
 
874
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
 
875
dnl with libtool.m4.
 
876
 
 
877
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
 
878
AC_DEFUN([AC_LIB_PROG_LD_GNU],
 
879
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
 
880
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
881
case `$LD -v 2>&1 </dev/null` in
 
882
*GNU* | *'with BFD'*)
 
883
  acl_cv_prog_gnu_ld=yes ;;
 
884
*)
 
885
  acl_cv_prog_gnu_ld=no ;;
 
886
esac])
 
887
with_gnu_ld=$acl_cv_prog_gnu_ld
 
888
])
 
889
 
 
890
dnl From libtool-1.4. Sets the variable LD.
 
891
AC_DEFUN([AC_LIB_PROG_LD],
 
892
[AC_ARG_WITH([gnu-ld],
 
893
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 
894
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 
895
AC_REQUIRE([AC_PROG_CC])dnl
 
896
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
897
# Prepare PATH_SEPARATOR.
 
898
# The user is always right.
 
899
if test "${PATH_SEPARATOR+set}" != set; then
 
900
  echo "#! /bin/sh" >conf$$.sh
 
901
  echo  "exit 0"   >>conf$$.sh
 
902
  chmod +x conf$$.sh
 
903
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
904
    PATH_SEPARATOR=';'
 
905
  else
 
906
    PATH_SEPARATOR=:
 
907
  fi
 
908
  rm -f conf$$.sh
 
909
fi
 
910
ac_prog=ld
 
911
if test "$GCC" = yes; then
 
912
  # Check if gcc -print-prog-name=ld gives a path.
 
913
  AC_MSG_CHECKING([for ld used by GCC])
 
914
  case $host in
 
915
  *-*-mingw*)
 
916
    # gcc leaves a trailing carriage return which upsets mingw
 
917
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
918
  *)
 
919
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
920
  esac
 
921
  case $ac_prog in
 
922
    # Accept absolute paths.
 
923
    [[\\/]* | [A-Za-z]:[\\/]*)]
 
924
      [re_direlt='/[^/][^/]*/\.\./']
 
925
      # Canonicalize the path of ld
 
926
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 
927
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
928
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 
929
      done
 
930
      test -z "$LD" && LD="$ac_prog"
 
931
      ;;
 
932
  "")
 
933
    # If it fails, then pretend we aren't using GCC.
 
934
    ac_prog=ld
 
935
    ;;
 
936
  *)
 
937
    # If it is relative, then search for the first ld in PATH.
 
938
    with_gnu_ld=unknown
 
939
    ;;
 
940
  esac
 
941
elif test "$with_gnu_ld" = yes; then
 
942
  AC_MSG_CHECKING([for GNU ld])
 
943
else
 
944
  AC_MSG_CHECKING([for non-GNU ld])
 
945
fi
 
946
AC_CACHE_VAL([acl_cv_path_LD],
 
947
[if test -z "$LD"; then
 
948
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
949
  for ac_dir in $PATH; do
 
950
    test -z "$ac_dir" && ac_dir=.
 
951
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
952
      acl_cv_path_LD="$ac_dir/$ac_prog"
 
953
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
954
      # but apparently some GNU ld's only accept -v.
 
955
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
956
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
 
957
      *GNU* | *'with BFD'*)
 
958
        test "$with_gnu_ld" != no && break ;;
 
959
      *)
 
960
        test "$with_gnu_ld" != yes && break ;;
 
961
      esac
 
962
    fi
 
963
  done
 
964
  IFS="$ac_save_ifs"
 
965
else
 
966
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
 
967
fi])
 
968
LD="$acl_cv_path_LD"
 
969
if test -n "$LD"; then
 
970
  AC_MSG_RESULT([$LD])
 
971
else
 
972
  AC_MSG_RESULT([no])
 
973
fi
 
974
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
975
AC_LIB_PROG_LD_GNU
 
976
])
 
977
 
 
978
# lib-link.m4 serial 21 (gettext-0.18)
 
979
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
 
980
dnl This file is free software; the Free Software Foundation
 
981
dnl gives unlimited permission to copy and/or distribute it,
 
982
dnl with or without modifications, as long as this notice is preserved.
 
983
 
 
984
dnl From Bruno Haible.
 
985
 
 
986
AC_PREREQ([2.54])
 
987
 
 
988
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 
989
dnl the libraries corresponding to explicit and implicit dependencies.
 
990
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 
991
dnl augments the CPPFLAGS variable.
 
992
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
 
993
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 
994
AC_DEFUN([AC_LIB_LINKFLAGS],
 
995
[
 
996
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
997
  AC_REQUIRE([AC_LIB_RPATH])
 
998
  pushdef([Name],[translit([$1],[./-], [___])])
 
999
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1000
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1001
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
 
1002
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
1003
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
 
1004
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
 
1005
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
 
1006
    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
 
1007
  ])
 
1008
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
 
1009
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
 
1010
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
 
1011
  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
 
1012
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
1013
  AC_SUBST([LIB]NAME)
 
1014
  AC_SUBST([LTLIB]NAME)
 
1015
  AC_SUBST([LIB]NAME[_PREFIX])
 
1016
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
 
1017
  dnl results of this search when this library appears as a dependency.
 
1018
  HAVE_LIB[]NAME=yes
 
1019
  popdef([NAME])
 
1020
  popdef([Name])
 
1021
])
 
1022
 
 
1023
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
 
1024
dnl searches for libname and the libraries corresponding to explicit and
 
1025
dnl implicit dependencies, together with the specified include files and
 
1026
dnl the ability to compile and link the specified testcode. The missing-message
 
1027
dnl defaults to 'no' and may contain additional hints for the user.
 
1028
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
 
1029
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 
1030
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 
1031
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
 
1032
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
 
1033
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 
1034
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 
1035
[
 
1036
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
1037
  AC_REQUIRE([AC_LIB_RPATH])
 
1038
  pushdef([Name],[translit([$1],[./-], [___])])
 
1039
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1040
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1041
 
 
1042
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
 
1043
  dnl accordingly.
 
1044
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
1045
 
 
1046
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
 
1047
  dnl because if the user has installed lib[]Name and not disabled its use
 
1048
  dnl via --without-lib[]Name-prefix, he wants to use it.
 
1049
  ac_save_CPPFLAGS="$CPPFLAGS"
 
1050
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
1051
 
 
1052
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
 
1053
    ac_save_LIBS="$LIBS"
 
1054
    dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
 
1055
    dnl because these -l options might require -L options that are present in
 
1056
    dnl LIBS. -l options benefit only from the -L options listed before it.
 
1057
    dnl Otherwise, add it to the front of LIBS, because it may be a static
 
1058
    dnl library that depends on another static library that is present in LIBS.
 
1059
    dnl Static libraries benefit only from the static libraries listed after
 
1060
    dnl it.
 
1061
    case " $LIB[]NAME" in
 
1062
      *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
 
1063
      *)       LIBS="$LIB[]NAME $LIBS" ;;
 
1064
    esac
 
1065
    AC_TRY_LINK([$3], [$4],
 
1066
      [ac_cv_lib[]Name=yes],
 
1067
      [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
 
1068
    LIBS="$ac_save_LIBS"
 
1069
  ])
 
1070
  if test "$ac_cv_lib[]Name" = yes; then
 
1071
    HAVE_LIB[]NAME=yes
 
1072
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
 
1073
    AC_MSG_CHECKING([how to link with lib[]$1])
 
1074
    AC_MSG_RESULT([$LIB[]NAME])
 
1075
  else
 
1076
    HAVE_LIB[]NAME=no
 
1077
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
 
1078
    dnl $INC[]NAME either.
 
1079
    CPPFLAGS="$ac_save_CPPFLAGS"
 
1080
    LIB[]NAME=
 
1081
    LTLIB[]NAME=
 
1082
    LIB[]NAME[]_PREFIX=
 
1083
  fi
 
1084
  AC_SUBST([HAVE_LIB]NAME)
 
1085
  AC_SUBST([LIB]NAME)
 
1086
  AC_SUBST([LTLIB]NAME)
 
1087
  AC_SUBST([LIB]NAME[_PREFIX])
 
1088
  popdef([NAME])
 
1089
  popdef([Name])
 
1090
])
 
1091
 
 
1092
dnl Determine the platform dependent parameters needed to use rpath:
 
1093
dnl   acl_libext,
 
1094
dnl   acl_shlibext,
 
1095
dnl   acl_hardcode_libdir_flag_spec,
 
1096
dnl   acl_hardcode_libdir_separator,
 
1097
dnl   acl_hardcode_direct,
 
1098
dnl   acl_hardcode_minus_L.
 
1099
AC_DEFUN([AC_LIB_RPATH],
 
1100
[
 
1101
  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
 
1102
  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
 
1103
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
 
1104
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
 
1105
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
 
1106
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
 
1107
  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
 
1108
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
 
1109
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
 
1110
    . ./conftest.sh
 
1111
    rm -f ./conftest.sh
 
1112
    acl_cv_rpath=done
 
1113
  ])
 
1114
  wl="$acl_cv_wl"
 
1115
  acl_libext="$acl_cv_libext"
 
1116
  acl_shlibext="$acl_cv_shlibext"
 
1117
  acl_libname_spec="$acl_cv_libname_spec"
 
1118
  acl_library_names_spec="$acl_cv_library_names_spec"
 
1119
  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
 
1120
  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
 
1121
  acl_hardcode_direct="$acl_cv_hardcode_direct"
 
1122
  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
 
1123
  dnl Determine whether the user wants rpath handling at all.
 
1124
  AC_ARG_ENABLE([rpath],
 
1125
    [  --disable-rpath         do not hardcode runtime library paths],
 
1126
    :, enable_rpath=yes)
 
1127
])
 
1128
 
 
1129
dnl AC_LIB_FROMPACKAGE(name, package)
 
1130
dnl declares that libname comes from the given package. The configure file
 
1131
dnl will then not have a --with-libname-prefix option but a
 
1132
dnl --with-package-prefix option. Several libraries can come from the same
 
1133
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
 
1134
dnl macro call that searches for libname.
 
1135
AC_DEFUN([AC_LIB_FROMPACKAGE],
 
1136
[
 
1137
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1138
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1139
  define([acl_frompackage_]NAME, [$2])
 
1140
  popdef([NAME])
 
1141
  pushdef([PACK],[$2])
 
1142
  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
 
1143
                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1144
  define([acl_libsinpackage_]PACKUP,
 
1145
    m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
 
1146
  popdef([PACKUP])
 
1147
  popdef([PACK])
 
1148
])
 
1149
 
 
1150
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 
1151
dnl the libraries corresponding to explicit and implicit dependencies.
 
1152
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
 
1153
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
 
1154
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 
1155
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 
1156
[
 
1157
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
 
1158
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1159
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1160
  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
 
1161
  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
 
1162
                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1163
  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
 
1164
  dnl Autoconf >= 2.61 supports dots in --with options.
 
1165
  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
 
1166
  dnl By default, look in $includedir and $libdir.
 
1167
  use_additional=yes
 
1168
  AC_LIB_WITH_FINAL_PREFIX([
 
1169
    eval additional_includedir=\"$includedir\"
 
1170
    eval additional_libdir=\"$libdir\"
 
1171
  ])
 
1172
  AC_ARG_WITH(P_A_C_K[-prefix],
 
1173
[[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
 
1174
  --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
 
1175
[
 
1176
    if test "X$withval" = "Xno"; then
 
1177
      use_additional=no
 
1178
    else
 
1179
      if test "X$withval" = "X"; then
 
1180
        AC_LIB_WITH_FINAL_PREFIX([
 
1181
          eval additional_includedir=\"$includedir\"
 
1182
          eval additional_libdir=\"$libdir\"
 
1183
        ])
 
1184
      else
 
1185
        additional_includedir="$withval/include"
 
1186
        additional_libdir="$withval/$acl_libdirstem"
 
1187
        if test "$acl_libdirstem2" != "$acl_libdirstem" \
 
1188
           && ! test -d "$withval/$acl_libdirstem"; then
 
1189
          additional_libdir="$withval/$acl_libdirstem2"
 
1190
        fi
 
1191
      fi
 
1192
    fi
 
1193
])
 
1194
  dnl Search the library and its dependencies in $additional_libdir and
 
1195
  dnl $LDFLAGS. Using breadth-first-seach.
 
1196
  LIB[]NAME=
 
1197
  LTLIB[]NAME=
 
1198
  INC[]NAME=
 
1199
  LIB[]NAME[]_PREFIX=
 
1200
  dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
 
1201
  dnl computed. So it has to be reset here.
 
1202
  HAVE_LIB[]NAME=
 
1203
  rpathdirs=
 
1204
  ltrpathdirs=
 
1205
  names_already_handled=
 
1206
  names_next_round='$1 $2'
 
1207
  while test -n "$names_next_round"; do
 
1208
    names_this_round="$names_next_round"
 
1209
    names_next_round=
 
1210
    for name in $names_this_round; do
 
1211
      already_handled=
 
1212
      for n in $names_already_handled; do
 
1213
        if test "$n" = "$name"; then
 
1214
          already_handled=yes
 
1215
          break
 
1216
        fi
 
1217
      done
 
1218
      if test -z "$already_handled"; then
 
1219
        names_already_handled="$names_already_handled $name"
 
1220
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
 
1221
        dnl or AC_LIB_HAVE_LINKFLAGS call.
 
1222
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
 
1223
        eval value=\"\$HAVE_LIB$uppername\"
 
1224
        if test -n "$value"; then
 
1225
          if test "$value" = yes; then
 
1226
            eval value=\"\$LIB$uppername\"
 
1227
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
 
1228
            eval value=\"\$LTLIB$uppername\"
 
1229
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
 
1230
          else
 
1231
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
 
1232
            dnl that this library doesn't exist. So just drop it.
 
1233
            :
 
1234
          fi
 
1235
        else
 
1236
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
 
1237
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
 
1238
          found_dir=
 
1239
          found_la=
 
1240
          found_so=
 
1241
          found_a=
 
1242
          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
 
1243
          if test -n "$acl_shlibext"; then
 
1244
            shrext=".$acl_shlibext"             # typically: shrext=.so
 
1245
          else
 
1246
            shrext=
 
1247
          fi
 
1248
          if test $use_additional = yes; then
 
1249
            dir="$additional_libdir"
 
1250
            dnl The same code as in the loop below:
 
1251
            dnl First look for a shared library.
 
1252
            if test -n "$acl_shlibext"; then
 
1253
              if test -f "$dir/$libname$shrext"; then
 
1254
                found_dir="$dir"
 
1255
                found_so="$dir/$libname$shrext"
 
1256
              else
 
1257
                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
 
1258
                  ver=`(cd "$dir" && \
 
1259
                        for f in "$libname$shrext".*; do echo "$f"; done \
 
1260
                        | sed -e "s,^$libname$shrext\\\\.,," \
 
1261
                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
 
1262
                        | sed 1q ) 2>/dev/null`
 
1263
                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
 
1264
                    found_dir="$dir"
 
1265
                    found_so="$dir/$libname$shrext.$ver"
 
1266
                  fi
 
1267
                else
 
1268
                  eval library_names=\"$acl_library_names_spec\"
 
1269
                  for f in $library_names; do
 
1270
                    if test -f "$dir/$f"; then
 
1271
                      found_dir="$dir"
 
1272
                      found_so="$dir/$f"
 
1273
                      break
 
1274
                    fi
 
1275
                  done
 
1276
                fi
 
1277
              fi
 
1278
            fi
 
1279
            dnl Then look for a static library.
 
1280
            if test "X$found_dir" = "X"; then
 
1281
              if test -f "$dir/$libname.$acl_libext"; then
 
1282
                found_dir="$dir"
 
1283
                found_a="$dir/$libname.$acl_libext"
 
1284
              fi
 
1285
            fi
 
1286
            if test "X$found_dir" != "X"; then
 
1287
              if test -f "$dir/$libname.la"; then
 
1288
                found_la="$dir/$libname.la"
 
1289
              fi
 
1290
            fi
 
1291
          fi
 
1292
          if test "X$found_dir" = "X"; then
 
1293
            for x in $LDFLAGS $LTLIB[]NAME; do
 
1294
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1295
              case "$x" in
 
1296
                -L*)
 
1297
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
 
1298
                  dnl First look for a shared library.
 
1299
                  if test -n "$acl_shlibext"; then
 
1300
                    if test -f "$dir/$libname$shrext"; then
 
1301
                      found_dir="$dir"
 
1302
                      found_so="$dir/$libname$shrext"
 
1303
                    else
 
1304
                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
 
1305
                        ver=`(cd "$dir" && \
 
1306
                              for f in "$libname$shrext".*; do echo "$f"; done \
 
1307
                              | sed -e "s,^$libname$shrext\\\\.,," \
 
1308
                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
 
1309
                              | sed 1q ) 2>/dev/null`
 
1310
                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
 
1311
                          found_dir="$dir"
 
1312
                          found_so="$dir/$libname$shrext.$ver"
 
1313
                        fi
 
1314
                      else
 
1315
                        eval library_names=\"$acl_library_names_spec\"
 
1316
                        for f in $library_names; do
 
1317
                          if test -f "$dir/$f"; then
 
1318
                            found_dir="$dir"
 
1319
                            found_so="$dir/$f"
 
1320
                            break
 
1321
                          fi
 
1322
                        done
 
1323
                      fi
 
1324
                    fi
 
1325
                  fi
 
1326
                  dnl Then look for a static library.
 
1327
                  if test "X$found_dir" = "X"; then
 
1328
                    if test -f "$dir/$libname.$acl_libext"; then
 
1329
                      found_dir="$dir"
 
1330
                      found_a="$dir/$libname.$acl_libext"
 
1331
                    fi
 
1332
                  fi
 
1333
                  if test "X$found_dir" != "X"; then
 
1334
                    if test -f "$dir/$libname.la"; then
 
1335
                      found_la="$dir/$libname.la"
 
1336
                    fi
 
1337
                  fi
 
1338
                  ;;
 
1339
              esac
 
1340
              if test "X$found_dir" != "X"; then
 
1341
                break
 
1342
              fi
 
1343
            done
 
1344
          fi
 
1345
          if test "X$found_dir" != "X"; then
 
1346
            dnl Found the library.
 
1347
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
 
1348
            if test "X$found_so" != "X"; then
 
1349
              dnl Linking with a shared library. We attempt to hardcode its
 
1350
              dnl directory into the executable's runpath, unless it's the
 
1351
              dnl standard /usr/lib.
 
1352
              if test "$enable_rpath" = no \
 
1353
                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
 
1354
                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
 
1355
                dnl No hardcoding is needed.
 
1356
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1357
              else
 
1358
                dnl Use an explicit option to hardcode DIR into the resulting
 
1359
                dnl binary.
 
1360
                dnl Potentially add DIR to ltrpathdirs.
 
1361
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
1362
                haveit=
 
1363
                for x in $ltrpathdirs; do
 
1364
                  if test "X$x" = "X$found_dir"; then
 
1365
                    haveit=yes
 
1366
                    break
 
1367
                  fi
 
1368
                done
 
1369
                if test -z "$haveit"; then
 
1370
                  ltrpathdirs="$ltrpathdirs $found_dir"
 
1371
                fi
 
1372
                dnl The hardcoding into $LIBNAME is system dependent.
 
1373
                if test "$acl_hardcode_direct" = yes; then
 
1374
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
 
1375
                  dnl resulting binary.
 
1376
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1377
                else
 
1378
                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
 
1379
                    dnl Use an explicit option to hardcode DIR into the resulting
 
1380
                    dnl binary.
 
1381
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1382
                    dnl Potentially add DIR to rpathdirs.
 
1383
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
 
1384
                    haveit=
 
1385
                    for x in $rpathdirs; do
 
1386
                      if test "X$x" = "X$found_dir"; then
 
1387
                        haveit=yes
 
1388
                        break
 
1389
                      fi
 
1390
                    done
 
1391
                    if test -z "$haveit"; then
 
1392
                      rpathdirs="$rpathdirs $found_dir"
 
1393
                    fi
 
1394
                  else
 
1395
                    dnl Rely on "-L$found_dir".
 
1396
                    dnl But don't add it if it's already contained in the LDFLAGS
 
1397
                    dnl or the already constructed $LIBNAME
 
1398
                    haveit=
 
1399
                    for x in $LDFLAGS $LIB[]NAME; do
 
1400
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1401
                      if test "X$x" = "X-L$found_dir"; then
 
1402
                        haveit=yes
 
1403
                        break
 
1404
                      fi
 
1405
                    done
 
1406
                    if test -z "$haveit"; then
 
1407
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
 
1408
                    fi
 
1409
                    if test "$acl_hardcode_minus_L" != no; then
 
1410
                      dnl FIXME: Not sure whether we should use
 
1411
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
1412
                      dnl here.
 
1413
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1414
                    else
 
1415
                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
 
1416
                      dnl here, because this doesn't fit in flags passed to the
 
1417
                      dnl compiler. So give up. No hardcoding. This affects only
 
1418
                      dnl very old systems.
 
1419
                      dnl FIXME: Not sure whether we should use
 
1420
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
1421
                      dnl here.
 
1422
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
1423
                    fi
 
1424
                  fi
 
1425
                fi
 
1426
              fi
 
1427
            else
 
1428
              if test "X$found_a" != "X"; then
 
1429
                dnl Linking with a static library.
 
1430
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
 
1431
              else
 
1432
                dnl We shouldn't come here, but anyway it's good to have a
 
1433
                dnl fallback.
 
1434
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
 
1435
              fi
 
1436
            fi
 
1437
            dnl Assume the include files are nearby.
 
1438
            additional_includedir=
 
1439
            case "$found_dir" in
 
1440
              */$acl_libdirstem | */$acl_libdirstem/)
 
1441
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
 
1442
                if test "$name" = '$1'; then
 
1443
                  LIB[]NAME[]_PREFIX="$basedir"
 
1444
                fi
 
1445
                additional_includedir="$basedir/include"
 
1446
                ;;
 
1447
              */$acl_libdirstem2 | */$acl_libdirstem2/)
 
1448
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
 
1449
                if test "$name" = '$1'; then
 
1450
                  LIB[]NAME[]_PREFIX="$basedir"
 
1451
                fi
 
1452
                additional_includedir="$basedir/include"
 
1453
                ;;
 
1454
            esac
 
1455
            if test "X$additional_includedir" != "X"; then
 
1456
              dnl Potentially add $additional_includedir to $INCNAME.
 
1457
              dnl But don't add it
 
1458
              dnl   1. if it's the standard /usr/include,
 
1459
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
 
1460
              dnl   3. if it's already present in $CPPFLAGS or the already
 
1461
              dnl      constructed $INCNAME,
 
1462
              dnl   4. if it doesn't exist as a directory.
 
1463
              if test "X$additional_includedir" != "X/usr/include"; then
 
1464
                haveit=
 
1465
                if test "X$additional_includedir" = "X/usr/local/include"; then
 
1466
                  if test -n "$GCC"; then
 
1467
                    case $host_os in
 
1468
                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 
1469
                    esac
 
1470
                  fi
 
1471
                fi
 
1472
                if test -z "$haveit"; then
 
1473
                  for x in $CPPFLAGS $INC[]NAME; do
 
1474
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1475
                    if test "X$x" = "X-I$additional_includedir"; then
 
1476
                      haveit=yes
 
1477
                      break
 
1478
                    fi
 
1479
                  done
 
1480
                  if test -z "$haveit"; then
 
1481
                    if test -d "$additional_includedir"; then
 
1482
                      dnl Really add $additional_includedir to $INCNAME.
 
1483
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
 
1484
                    fi
 
1485
                  fi
 
1486
                fi
 
1487
              fi
 
1488
            fi
 
1489
            dnl Look for dependencies.
 
1490
            if test -n "$found_la"; then
 
1491
              dnl Read the .la file. It defines the variables
 
1492
              dnl dlname, library_names, old_library, dependency_libs, current,
 
1493
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
 
1494
              save_libdir="$libdir"
 
1495
              case "$found_la" in
 
1496
                */* | *\\*) . "$found_la" ;;
 
1497
                *) . "./$found_la" ;;
 
1498
              esac
 
1499
              libdir="$save_libdir"
 
1500
              dnl We use only dependency_libs.
 
1501
              for dep in $dependency_libs; do
 
1502
                case "$dep" in
 
1503
                  -L*)
 
1504
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
 
1505
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
 
1506
                    dnl But don't add it
 
1507
                    dnl   1. if it's the standard /usr/lib,
 
1508
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
 
1509
                    dnl   3. if it's already present in $LDFLAGS or the already
 
1510
                    dnl      constructed $LIBNAME,
 
1511
                    dnl   4. if it doesn't exist as a directory.
 
1512
                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
 
1513
                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
 
1514
                      haveit=
 
1515
                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
 
1516
                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
 
1517
                        if test -n "$GCC"; then
 
1518
                          case $host_os in
 
1519
                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 
1520
                          esac
 
1521
                        fi
 
1522
                      fi
 
1523
                      if test -z "$haveit"; then
 
1524
                        haveit=
 
1525
                        for x in $LDFLAGS $LIB[]NAME; do
 
1526
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1527
                          if test "X$x" = "X-L$additional_libdir"; then
 
1528
                            haveit=yes
 
1529
                            break
 
1530
                          fi
 
1531
                        done
 
1532
                        if test -z "$haveit"; then
 
1533
                          if test -d "$additional_libdir"; then
 
1534
                            dnl Really add $additional_libdir to $LIBNAME.
 
1535
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
 
1536
                          fi
 
1537
                        fi
 
1538
                        haveit=
 
1539
                        for x in $LDFLAGS $LTLIB[]NAME; do
 
1540
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1541
                          if test "X$x" = "X-L$additional_libdir"; then
 
1542
                            haveit=yes
 
1543
                            break
 
1544
                          fi
 
1545
                        done
 
1546
                        if test -z "$haveit"; then
 
1547
                          if test -d "$additional_libdir"; then
 
1548
                            dnl Really add $additional_libdir to $LTLIBNAME.
 
1549
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
 
1550
                          fi
 
1551
                        fi
 
1552
                      fi
 
1553
                    fi
 
1554
                    ;;
 
1555
                  -R*)
 
1556
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
 
1557
                    if test "$enable_rpath" != no; then
 
1558
                      dnl Potentially add DIR to rpathdirs.
 
1559
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
 
1560
                      haveit=
 
1561
                      for x in $rpathdirs; do
 
1562
                        if test "X$x" = "X$dir"; then
 
1563
                          haveit=yes
 
1564
                          break
 
1565
                        fi
 
1566
                      done
 
1567
                      if test -z "$haveit"; then
 
1568
                        rpathdirs="$rpathdirs $dir"
 
1569
                      fi
 
1570
                      dnl Potentially add DIR to ltrpathdirs.
 
1571
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
1572
                      haveit=
 
1573
                      for x in $ltrpathdirs; do
 
1574
                        if test "X$x" = "X$dir"; then
 
1575
                          haveit=yes
 
1576
                          break
 
1577
                        fi
 
1578
                      done
 
1579
                      if test -z "$haveit"; then
 
1580
                        ltrpathdirs="$ltrpathdirs $dir"
 
1581
                      fi
 
1582
                    fi
 
1583
                    ;;
 
1584
                  -l*)
 
1585
                    dnl Handle this in the next round.
 
1586
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
 
1587
                    ;;
 
1588
                  *.la)
 
1589
                    dnl Handle this in the next round. Throw away the .la's
 
1590
                    dnl directory; it is already contained in a preceding -L
 
1591
                    dnl option.
 
1592
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
 
1593
                    ;;
 
1594
                  *)
 
1595
                    dnl Most likely an immediate library name.
 
1596
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
 
1597
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
 
1598
                    ;;
 
1599
                esac
 
1600
              done
 
1601
            fi
 
1602
          else
 
1603
            dnl Didn't find the library; assume it is in the system directories
 
1604
            dnl known to the linker and runtime loader. (All the system
 
1605
            dnl directories known to the linker should also be known to the
 
1606
            dnl runtime loader, otherwise the system is severely misconfigured.)
 
1607
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
1608
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
 
1609
          fi
 
1610
        fi
 
1611
      fi
 
1612
    done
 
1613
  done
 
1614
  if test "X$rpathdirs" != "X"; then
 
1615
    if test -n "$acl_hardcode_libdir_separator"; then
 
1616
      dnl Weird platform: only the last -rpath option counts, the user must
 
1617
      dnl pass all path elements in one option. We can arrange that for a
 
1618
      dnl single library, but not when more than one $LIBNAMEs are used.
 
1619
      alldirs=
 
1620
      for found_dir in $rpathdirs; do
 
1621
        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
 
1622
      done
 
1623
      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
 
1624
      acl_save_libdir="$libdir"
 
1625
      libdir="$alldirs"
 
1626
      eval flag=\"$acl_hardcode_libdir_flag_spec\"
 
1627
      libdir="$acl_save_libdir"
 
1628
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
1629
    else
 
1630
      dnl The -rpath options are cumulative.
 
1631
      for found_dir in $rpathdirs; do
 
1632
        acl_save_libdir="$libdir"
 
1633
        libdir="$found_dir"
 
1634
        eval flag=\"$acl_hardcode_libdir_flag_spec\"
 
1635
        libdir="$acl_save_libdir"
 
1636
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
1637
      done
 
1638
    fi
 
1639
  fi
 
1640
  if test "X$ltrpathdirs" != "X"; then
 
1641
    dnl When using libtool, the option that works for both libraries and
 
1642
    dnl executables is -R. The -R options are cumulative.
 
1643
    for found_dir in $ltrpathdirs; do
 
1644
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
 
1645
    done
 
1646
  fi
 
1647
  popdef([P_A_C_K])
 
1648
  popdef([PACKLIBS])
 
1649
  popdef([PACKUP])
 
1650
  popdef([PACK])
 
1651
  popdef([NAME])
 
1652
])
 
1653
 
 
1654
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
 
1655
dnl unless already present in VAR.
 
1656
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
 
1657
dnl contains two or three consecutive elements that belong together.
 
1658
AC_DEFUN([AC_LIB_APPENDTOVAR],
 
1659
[
 
1660
  for element in [$2]; do
 
1661
    haveit=
 
1662
    for x in $[$1]; do
 
1663
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1664
      if test "X$x" = "X$element"; then
 
1665
        haveit=yes
 
1666
        break
 
1667
      fi
 
1668
    done
 
1669
    if test -z "$haveit"; then
 
1670
      [$1]="${[$1]}${[$1]:+ }$element"
 
1671
    fi
 
1672
  done
 
1673
])
 
1674
 
 
1675
dnl For those cases where a variable contains several -L and -l options
 
1676
dnl referring to unknown libraries and directories, this macro determines the
 
1677
dnl necessary additional linker options for the runtime path.
 
1678
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
 
1679
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
 
1680
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
 
1681
dnl otherwise linking without libtool is assumed.
 
1682
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
 
1683
[
 
1684
  AC_REQUIRE([AC_LIB_RPATH])
 
1685
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
 
1686
  $1=
 
1687
  if test "$enable_rpath" != no; then
 
1688
    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
 
1689
      dnl Use an explicit option to hardcode directories into the resulting
 
1690
      dnl binary.
 
1691
      rpathdirs=
 
1692
      next=
 
1693
      for opt in $2; do
 
1694
        if test -n "$next"; then
 
1695
          dir="$next"
 
1696
          dnl No need to hardcode the standard /usr/lib.
 
1697
          if test "X$dir" != "X/usr/$acl_libdirstem" \
 
1698
             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
 
1699
            rpathdirs="$rpathdirs $dir"
 
1700
          fi
 
1701
          next=
 
1702
        else
 
1703
          case $opt in
 
1704
            -L) next=yes ;;
 
1705
            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
 
1706
                 dnl No need to hardcode the standard /usr/lib.
 
1707
                 if test "X$dir" != "X/usr/$acl_libdirstem" \
 
1708
                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
 
1709
                   rpathdirs="$rpathdirs $dir"
 
1710
                 fi
 
1711
                 next= ;;
 
1712
            *) next= ;;
 
1713
          esac
 
1714
        fi
 
1715
      done
 
1716
      if test "X$rpathdirs" != "X"; then
 
1717
        if test -n ""$3""; then
 
1718
          dnl libtool is used for linking. Use -R options.
 
1719
          for dir in $rpathdirs; do
 
1720
            $1="${$1}${$1:+ }-R$dir"
 
1721
          done
 
1722
        else
 
1723
          dnl The linker is used for linking directly.
 
1724
          if test -n "$acl_hardcode_libdir_separator"; then
 
1725
            dnl Weird platform: only the last -rpath option counts, the user
 
1726
            dnl must pass all path elements in one option.
 
1727
            alldirs=
 
1728
            for dir in $rpathdirs; do
 
1729
              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
 
1730
            done
 
1731
            acl_save_libdir="$libdir"
 
1732
            libdir="$alldirs"
 
1733
            eval flag=\"$acl_hardcode_libdir_flag_spec\"
 
1734
            libdir="$acl_save_libdir"
 
1735
            $1="$flag"
 
1736
          else
 
1737
            dnl The -rpath options are cumulative.
 
1738
            for dir in $rpathdirs; do
 
1739
              acl_save_libdir="$libdir"
 
1740
              libdir="$dir"
 
1741
              eval flag=\"$acl_hardcode_libdir_flag_spec\"
 
1742
              libdir="$acl_save_libdir"
 
1743
              $1="${$1}${$1:+ }$flag"
 
1744
            done
 
1745
          fi
 
1746
        fi
 
1747
      fi
 
1748
    fi
 
1749
  fi
 
1750
  AC_SUBST([$1])
 
1751
])
 
1752
 
 
1753
# lib-prefix.m4 serial 7 (gettext-0.18)
 
1754
dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
 
1755
dnl This file is free software; the Free Software Foundation
 
1756
dnl gives unlimited permission to copy and/or distribute it,
 
1757
dnl with or without modifications, as long as this notice is preserved.
 
1758
 
 
1759
dnl From Bruno Haible.
 
1760
 
 
1761
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
 
1762
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
 
1763
dnl require excessive bracketing.
 
1764
ifdef([AC_HELP_STRING],
 
1765
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
 
1766
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
 
1767
 
 
1768
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
 
1769
dnl to access previously installed libraries. The basic assumption is that
 
1770
dnl a user will want packages to use other packages he previously installed
 
1771
dnl with the same --prefix option.
 
1772
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
 
1773
dnl libraries, but is otherwise very convenient.
 
1774
AC_DEFUN([AC_LIB_PREFIX],
 
1775
[
 
1776
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
 
1777
  AC_REQUIRE([AC_PROG_CC])
 
1778
  AC_REQUIRE([AC_CANONICAL_HOST])
 
1779
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
 
1780
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
1781
  dnl By default, look in $includedir and $libdir.
 
1782
  use_additional=yes
 
1783
  AC_LIB_WITH_FINAL_PREFIX([
 
1784
    eval additional_includedir=\"$includedir\"
 
1785
    eval additional_libdir=\"$libdir\"
 
1786
  ])
 
1787
  AC_LIB_ARG_WITH([lib-prefix],
 
1788
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
 
1789
  --without-lib-prefix    don't search for libraries in includedir and libdir],
 
1790
[
 
1791
    if test "X$withval" = "Xno"; then
 
1792
      use_additional=no
 
1793
    else
 
1794
      if test "X$withval" = "X"; then
 
1795
        AC_LIB_WITH_FINAL_PREFIX([
 
1796
          eval additional_includedir=\"$includedir\"
 
1797
          eval additional_libdir=\"$libdir\"
 
1798
        ])
 
1799
      else
 
1800
        additional_includedir="$withval/include"
 
1801
        additional_libdir="$withval/$acl_libdirstem"
 
1802
      fi
 
1803
    fi
 
1804
])
 
1805
  if test $use_additional = yes; then
 
1806
    dnl Potentially add $additional_includedir to $CPPFLAGS.
 
1807
    dnl But don't add it
 
1808
    dnl   1. if it's the standard /usr/include,
 
1809
    dnl   2. if it's already present in $CPPFLAGS,
 
1810
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
 
1811
    dnl   4. if it doesn't exist as a directory.
 
1812
    if test "X$additional_includedir" != "X/usr/include"; then
 
1813
      haveit=
 
1814
      for x in $CPPFLAGS; do
 
1815
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1816
        if test "X$x" = "X-I$additional_includedir"; then
 
1817
          haveit=yes
 
1818
          break
 
1819
        fi
 
1820
      done
 
1821
      if test -z "$haveit"; then
 
1822
        if test "X$additional_includedir" = "X/usr/local/include"; then
 
1823
          if test -n "$GCC"; then
 
1824
            case $host_os in
 
1825
              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 
1826
            esac
 
1827
          fi
 
1828
        fi
 
1829
        if test -z "$haveit"; then
 
1830
          if test -d "$additional_includedir"; then
 
1831
            dnl Really add $additional_includedir to $CPPFLAGS.
 
1832
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
 
1833
          fi
 
1834
        fi
 
1835
      fi
 
1836
    fi
 
1837
    dnl Potentially add $additional_libdir to $LDFLAGS.
 
1838
    dnl But don't add it
 
1839
    dnl   1. if it's the standard /usr/lib,
 
1840
    dnl   2. if it's already present in $LDFLAGS,
 
1841
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
 
1842
    dnl   4. if it doesn't exist as a directory.
 
1843
    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
 
1844
      haveit=
 
1845
      for x in $LDFLAGS; do
 
1846
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1847
        if test "X$x" = "X-L$additional_libdir"; then
 
1848
          haveit=yes
 
1849
          break
 
1850
        fi
 
1851
      done
 
1852
      if test -z "$haveit"; then
 
1853
        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
 
1854
          if test -n "$GCC"; then
 
1855
            case $host_os in
 
1856
              linux*) haveit=yes;;
 
1857
            esac
 
1858
          fi
 
1859
        fi
 
1860
        if test -z "$haveit"; then
 
1861
          if test -d "$additional_libdir"; then
 
1862
            dnl Really add $additional_libdir to $LDFLAGS.
 
1863
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
 
1864
          fi
 
1865
        fi
 
1866
      fi
 
1867
    fi
 
1868
  fi
 
1869
])
 
1870
 
 
1871
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
 
1872
dnl acl_final_exec_prefix, containing the values to which $prefix and
 
1873
dnl $exec_prefix will expand at the end of the configure script.
 
1874
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
 
1875
[
 
1876
  dnl Unfortunately, prefix and exec_prefix get only finally determined
 
1877
  dnl at the end of configure.
 
1878
  if test "X$prefix" = "XNONE"; then
 
1879
    acl_final_prefix="$ac_default_prefix"
 
1880
  else
 
1881
    acl_final_prefix="$prefix"
 
1882
  fi
 
1883
  if test "X$exec_prefix" = "XNONE"; then
 
1884
    acl_final_exec_prefix='${prefix}'
 
1885
  else
 
1886
    acl_final_exec_prefix="$exec_prefix"
 
1887
  fi
 
1888
  acl_save_prefix="$prefix"
 
1889
  prefix="$acl_final_prefix"
 
1890
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
 
1891
  prefix="$acl_save_prefix"
 
1892
])
 
1893
 
 
1894
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
 
1895
dnl variables prefix and exec_prefix bound to the values they will have
 
1896
dnl at the end of the configure script.
 
1897
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
 
1898
[
 
1899
  acl_save_prefix="$prefix"
 
1900
  prefix="$acl_final_prefix"
 
1901
  acl_save_exec_prefix="$exec_prefix"
 
1902
  exec_prefix="$acl_final_exec_prefix"
 
1903
  $1
 
1904
  exec_prefix="$acl_save_exec_prefix"
 
1905
  prefix="$acl_save_prefix"
 
1906
])
 
1907
 
 
1908
dnl AC_LIB_PREPARE_MULTILIB creates
 
1909
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
 
1910
dnl   "lib" or "lib64" or "lib/64",
 
1911
dnl - a variable acl_libdirstem2, as a secondary possible value for
 
1912
dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
 
1913
dnl   "lib/amd64".
 
1914
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
 
1915
[
 
1916
  dnl There is no formal standard regarding lib and lib64.
 
1917
  dnl On glibc systems, the current practice is that on a system supporting
 
1918
  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
 
1919
  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
 
1920
  dnl the compiler's default mode by looking at the compiler's library search
 
1921
  dnl path. If at least one of its elements ends in /lib64 or points to a
 
1922
  dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
 
1923
  dnl Otherwise we use the default, namely "lib".
 
1924
  dnl On Solaris systems, the current practice is that on a system supporting
 
1925
  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
 
1926
  dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
 
1927
  dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
 
1928
  AC_REQUIRE([AC_CANONICAL_HOST])
 
1929
  acl_libdirstem=lib
 
1930
  acl_libdirstem2=
 
1931
  case "$host_os" in
 
1932
    solaris*)
 
1933
      dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
 
1934
      dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
 
1935
      dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
 
1936
      dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
 
1937
      dnl symlink is missing, so we set acl_libdirstem2 too.
 
1938
      AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
 
1939
        [AC_EGREP_CPP([sixtyfour bits], [
 
1940
#ifdef _LP64
 
1941
sixtyfour bits
 
1942
#endif
 
1943
           ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
 
1944
        ])
 
1945
      if test $gl_cv_solaris_64bit = yes; then
 
1946
        acl_libdirstem=lib/64
 
1947
        case "$host_cpu" in
 
1948
          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
 
1949
          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
 
1950
        esac
 
1951
      fi
 
1952
      ;;
 
1953
    *)
 
1954
      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
 
1955
      if test -n "$searchpath"; then
 
1956
        acl_save_IFS="${IFS=    }"; IFS=":"
 
1957
        for searchdir in $searchpath; do
 
1958
          if test -d "$searchdir"; then
 
1959
            case "$searchdir" in
 
1960
              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
 
1961
              */../ | */.. )
 
1962
                # Better ignore directories of this form. They are misleading.
 
1963
                ;;
 
1964
              *) searchdir=`cd "$searchdir" && pwd`
 
1965
                 case "$searchdir" in
 
1966
                   */lib64 ) acl_libdirstem=lib64 ;;
 
1967
                 esac ;;
 
1968
            esac
 
1969
          fi
 
1970
        done
 
1971
        IFS="$acl_save_IFS"
 
1972
      fi
 
1973
      ;;
 
1974
  esac
 
1975
  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
 
1976
])
 
1977
 
 
1978
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
1979
#
 
1980
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 
1981
#                 2006, 2007, 2008 Free Software Foundation, Inc.
 
1982
#   Written by Gordon Matzigkeit, 1996
 
1983
#
 
1984
# This file is free software; the Free Software Foundation gives
 
1985
# unlimited permission to copy and/or distribute it, with or without
 
1986
# modifications, as long as this notice is preserved.
 
1987
 
 
1988
m4_define([_LT_COPYING], [dnl
 
1989
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 
1990
#                 2006, 2007, 2008 Free Software Foundation, Inc.
 
1991
#   Written by Gordon Matzigkeit, 1996
 
1992
#
 
1993
#   This file is part of GNU Libtool.
 
1994
#
 
1995
# GNU Libtool is free software; you can redistribute it and/or
 
1996
# modify it under the terms of the GNU General Public License as
 
1997
# published by the Free Software Foundation; either version 2 of
 
1998
# the License, or (at your option) any later version.
 
1999
#
 
2000
# As a special exception to the GNU General Public License,
 
2001
# if you distribute this file as part of a program or library that
 
2002
# is built using GNU Libtool, you may include this file under the
 
2003
# same distribution terms that you use for the rest of that program.
 
2004
#
 
2005
# GNU Libtool is distributed in the hope that it will be useful,
 
2006
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
2007
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
2008
# GNU General Public License for more details.
 
2009
#
 
2010
# You should have received a copy of the GNU General Public License
 
2011
# along with GNU Libtool; see the file COPYING.  If not, a copy
 
2012
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
 
2013
# obtained by writing to the Free Software Foundation, Inc.,
 
2014
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
2015
])
 
2016
 
 
2017
# serial 56 LT_INIT
 
2018
 
 
2019
 
 
2020
# LT_PREREQ(VERSION)
 
2021
# ------------------
 
2022
# Complain and exit if this libtool version is less that VERSION.
 
2023
m4_defun([LT_PREREQ],
 
2024
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
 
2025
       [m4_default([$3],
 
2026
                   [m4_fatal([Libtool version $1 or higher is required],
 
2027
                             63)])],
 
2028
       [$2])])
 
2029
 
 
2030
 
 
2031
# _LT_CHECK_BUILDDIR
 
2032
# ------------------
 
2033
# Complain if the absolute build directory name contains unusual characters
 
2034
m4_defun([_LT_CHECK_BUILDDIR],
 
2035
[case `pwd` in
 
2036
  *\ * | *\     *)
 
2037
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
 
2038
esac
 
2039
])
 
2040
 
 
2041
 
 
2042
# LT_INIT([OPTIONS])
 
2043
# ------------------
 
2044
AC_DEFUN([LT_INIT],
 
2045
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
 
2046
AC_BEFORE([$0], [LT_LANG])dnl
 
2047
AC_BEFORE([$0], [LT_OUTPUT])dnl
 
2048
AC_BEFORE([$0], [LTDL_INIT])dnl
 
2049
m4_require([_LT_CHECK_BUILDDIR])dnl
 
2050
 
 
2051
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
 
2052
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
 
2053
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
 
2054
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
 
2055
dnl unless we require an AC_DEFUNed macro:
 
2056
AC_REQUIRE([LTOPTIONS_VERSION])dnl
 
2057
AC_REQUIRE([LTSUGAR_VERSION])dnl
 
2058
AC_REQUIRE([LTVERSION_VERSION])dnl
 
2059
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
 
2060
m4_require([_LT_PROG_LTMAIN])dnl
 
2061
 
 
2062
dnl Parse OPTIONS
 
2063
_LT_SET_OPTIONS([$0], [$1])
 
2064
 
 
2065
# This can be used to rebuild libtool when needed
 
2066
LIBTOOL_DEPS="$ltmain"
 
2067
 
 
2068
# Always use our own libtool.
 
2069
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
2070
AC_SUBST(LIBTOOL)dnl
 
2071
 
 
2072
_LT_SETUP
 
2073
 
 
2074
# Only expand once:
 
2075
m4_define([LT_INIT])
 
2076
])# LT_INIT
 
2077
 
 
2078
# Old names:
 
2079
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
 
2080
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
 
2081
dnl aclocal-1.4 backwards compatibility:
 
2082
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 
2083
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
2084
 
 
2085
 
 
2086
# _LT_CC_BASENAME(CC)
 
2087
# -------------------
 
2088
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 
2089
m4_defun([_LT_CC_BASENAME],
 
2090
[for cc_temp in $1""; do
 
2091
  case $cc_temp in
 
2092
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
 
2093
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
 
2094
    \-*) ;;
 
2095
    *) break;;
 
2096
  esac
 
2097
done
 
2098
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
2099
])
 
2100
 
 
2101
 
 
2102
# _LT_FILEUTILS_DEFAULTS
 
2103
# ----------------------
 
2104
# It is okay to use these file commands and assume they have been set
 
2105
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
 
2106
m4_defun([_LT_FILEUTILS_DEFAULTS],
 
2107
[: ${CP="cp -f"}
 
2108
: ${MV="mv -f"}
 
2109
: ${RM="rm -f"}
 
2110
])# _LT_FILEUTILS_DEFAULTS
 
2111
 
 
2112
 
 
2113
# _LT_SETUP
 
2114
# ---------
 
2115
m4_defun([_LT_SETUP],
 
2116
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2117
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
2118
_LT_DECL([], [host_alias], [0], [The host system])dnl
 
2119
_LT_DECL([], [host], [0])dnl
 
2120
_LT_DECL([], [host_os], [0])dnl
 
2121
dnl
 
2122
_LT_DECL([], [build_alias], [0], [The build system])dnl
 
2123
_LT_DECL([], [build], [0])dnl
 
2124
_LT_DECL([], [build_os], [0])dnl
 
2125
dnl
 
2126
AC_REQUIRE([AC_PROG_CC])dnl
 
2127
AC_REQUIRE([LT_PATH_LD])dnl
 
2128
AC_REQUIRE([LT_PATH_NM])dnl
 
2129
dnl
 
2130
AC_REQUIRE([AC_PROG_LN_S])dnl
 
2131
test -z "$LN_S" && LN_S="ln -s"
 
2132
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
 
2133
dnl
 
2134
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
 
2135
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
 
2136
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 
2137
dnl
 
2138
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2139
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 
2140
m4_require([_LT_CMD_RELOAD])dnl
 
2141
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 
2142
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 
2143
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
2144
 
 
2145
_LT_CONFIG_LIBTOOL_INIT([
 
2146
# See if we are running on zsh, and set the options which allow our
 
2147
# commands through without removal of \ escapes INIT.
 
2148
if test -n "\${ZSH_VERSION+set}" ; then
 
2149
   setopt NO_GLOB_SUBST
 
2150
fi
 
2151
])
 
2152
if test -n "${ZSH_VERSION+set}" ; then
 
2153
   setopt NO_GLOB_SUBST
 
2154
fi
 
2155
 
 
2156
_LT_CHECK_OBJDIR
 
2157
 
 
2158
m4_require([_LT_TAG_COMPILER])dnl
 
2159
_LT_PROG_ECHO_BACKSLASH
 
2160
 
 
2161
case $host_os in
 
2162
aix3*)
 
2163
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
2164
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
2165
  # vanish in a puff of smoke.
 
2166
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
2167
    COLLECT_NAMES=
 
2168
    export COLLECT_NAMES
 
2169
  fi
 
2170
  ;;
 
2171
esac
 
2172
 
 
2173
# Sed substitution that helps us do robust quoting.  It backslashifies
 
2174
# metacharacters that are still active within double-quoted strings.
 
2175
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
 
2176
 
 
2177
# Same as above, but do not quote variable references.
 
2178
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
 
2179
 
 
2180
# Sed substitution to delay expansion of an escaped shell variable in a
 
2181
# double_quote_subst'ed string.
 
2182
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
2183
 
 
2184
# Sed substitution to delay expansion of an escaped single quote.
 
2185
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
2186
 
 
2187
# Sed substitution to avoid accidental globbing in evaled expressions
 
2188
no_glob_subst='s/\*/\\\*/g'
 
2189
 
 
2190
# Global variables:
 
2191
ofile=libtool
 
2192
can_build_shared=yes
 
2193
 
 
2194
# All known linkers require a `.a' archive for static linking (except MSVC,
 
2195
# which needs '.lib').
 
2196
libext=a
 
2197
 
 
2198
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
2199
 
 
2200
old_CC="$CC"
 
2201
old_CFLAGS="$CFLAGS"
 
2202
 
 
2203
# Set sane defaults for various variables
 
2204
test -z "$CC" && CC=cc
 
2205
test -z "$LTCC" && LTCC=$CC
 
2206
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 
2207
test -z "$LD" && LD=ld
 
2208
test -z "$ac_objext" && ac_objext=o
 
2209
 
 
2210
_LT_CC_BASENAME([$compiler])
 
2211
 
 
2212
# Only perform the check for file, if the check method requires it
 
2213
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
2214
case $deplibs_check_method in
 
2215
file_magic*)
 
2216
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
2217
    _LT_PATH_MAGIC
 
2218
  fi
 
2219
  ;;
 
2220
esac
 
2221
 
 
2222
# Use C for the default configuration in the libtool script
 
2223
LT_SUPPORTED_TAG([CC])
 
2224
_LT_LANG_C_CONFIG
 
2225
_LT_LANG_DEFAULT_CONFIG
 
2226
_LT_CONFIG_COMMANDS
 
2227
])# _LT_SETUP
 
2228
 
 
2229
 
 
2230
# _LT_PROG_LTMAIN
 
2231
# ---------------
 
2232
# Note that this code is called both from `configure', and `config.status'
 
2233
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
 
2234
# `config.status' has no value for ac_aux_dir unless we are using Automake,
 
2235
# so we pass a copy along to make sure it has a sensible value anyway.
 
2236
m4_defun([_LT_PROG_LTMAIN],
 
2237
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
 
2238
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
 
2239
ltmain="$ac_aux_dir/ltmain.sh"
 
2240
])# _LT_PROG_LTMAIN
 
2241
 
 
2242
 
 
2243
 
 
2244
# So that we can recreate a full libtool script including additional
 
2245
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
 
2246
# in macros and then make a single call at the end using the `libtool'
 
2247
# label.
 
2248
 
 
2249
 
 
2250
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
 
2251
# ----------------------------------------
 
2252
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
2253
m4_define([_LT_CONFIG_LIBTOOL_INIT],
 
2254
[m4_ifval([$1],
 
2255
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
 
2256
                     [$1
 
2257
])])])
 
2258
 
 
2259
# Initialize.
 
2260
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
 
2261
 
 
2262
 
 
2263
# _LT_CONFIG_LIBTOOL([COMMANDS])
 
2264
# ------------------------------
 
2265
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
2266
m4_define([_LT_CONFIG_LIBTOOL],
 
2267
[m4_ifval([$1],
 
2268
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
 
2269
                     [$1
 
2270
])])])
 
2271
 
 
2272
# Initialize.
 
2273
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
 
2274
 
 
2275
 
 
2276
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
 
2277
# -----------------------------------------------------
 
2278
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
 
2279
[_LT_CONFIG_LIBTOOL([$1])
 
2280
_LT_CONFIG_LIBTOOL_INIT([$2])
 
2281
])
 
2282
 
 
2283
 
 
2284
# _LT_FORMAT_COMMENT([COMMENT])
 
2285
# -----------------------------
 
2286
# Add leading comment marks to the start of each line, and a trailing
 
2287
# full-stop to the whole comment if one is not present already.
 
2288
m4_define([_LT_FORMAT_COMMENT],
 
2289
[m4_ifval([$1], [
 
2290
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
 
2291
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
 
2292
)])
 
2293
 
 
2294
 
 
2295
 
 
2296
 
 
2297
 
 
2298
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
 
2299
# -------------------------------------------------------------------
 
2300
# CONFIGNAME is the name given to the value in the libtool script.
 
2301
# VARNAME is the (base) name used in the configure script.
 
2302
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
 
2303
# VARNAME.  Any other value will be used directly.
 
2304
m4_define([_LT_DECL],
 
2305
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
 
2306
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
 
2307
        [m4_ifval([$1], [$1], [$2])])
 
2308
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
 
2309
    m4_ifval([$4],
 
2310
        [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
 
2311
    lt_dict_add_subkey([lt_decl_dict], [$2],
 
2312
        [tagged?], [m4_ifval([$5], [yes], [no])])])
 
2313
])
 
2314
 
 
2315
 
 
2316
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
 
2317
# --------------------------------------------------------
 
2318
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
 
2319
 
 
2320
 
 
2321
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
 
2322
# ------------------------------------------------
 
2323
m4_define([lt_decl_tag_varnames],
 
2324
[_lt_decl_filter([tagged?], [yes], $@)])
 
2325
 
 
2326
 
 
2327
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
 
2328
# ---------------------------------------------------------
 
2329
m4_define([_lt_decl_filter],
 
2330
[m4_case([$#],
 
2331
  [0], [m4_fatal([$0: too few arguments: $#])],
 
2332
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
 
2333
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
 
2334
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
 
2335
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
 
2336
])
 
2337
 
 
2338
 
 
2339
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
 
2340
# --------------------------------------------------
 
2341
m4_define([lt_decl_quote_varnames],
 
2342
[_lt_decl_filter([value], [1], $@)])
 
2343
 
 
2344
 
 
2345
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
 
2346
# ---------------------------------------------------
 
2347
m4_define([lt_decl_dquote_varnames],
 
2348
[_lt_decl_filter([value], [2], $@)])
 
2349
 
 
2350
 
 
2351
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
 
2352
# ---------------------------------------------------
 
2353
m4_define([lt_decl_varnames_tagged],
 
2354
[m4_assert([$# <= 2])dnl
 
2355
_$0(m4_quote(m4_default([$1], [[, ]])),
 
2356
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
 
2357
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
 
2358
m4_define([_lt_decl_varnames_tagged],
 
2359
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
 
2360
 
 
2361
 
 
2362
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
 
2363
# ------------------------------------------------
 
2364
m4_define([lt_decl_all_varnames],
 
2365
[_$0(m4_quote(m4_default([$1], [[, ]])),
 
2366
     m4_if([$2], [],
 
2367
           m4_quote(lt_decl_varnames),
 
2368
        m4_quote(m4_shift($@))))[]dnl
 
2369
])
 
2370
m4_define([_lt_decl_all_varnames],
 
2371
[lt_join($@, lt_decl_varnames_tagged([$1],
 
2372
                        lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
 
2373
])
 
2374
 
 
2375
 
 
2376
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
 
2377
# ------------------------------------
 
2378
# Quote a variable value, and forward it to `config.status' so that its
 
2379
# declaration there will have the same value as in `configure'.  VARNAME
 
2380
# must have a single quote delimited value for this to work.
 
2381
m4_define([_LT_CONFIG_STATUS_DECLARE],
 
2382
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
 
2383
 
 
2384
 
 
2385
# _LT_CONFIG_STATUS_DECLARATIONS
 
2386
# ------------------------------
 
2387
# We delimit libtool config variables with single quotes, so when
 
2388
# we write them to config.status, we have to be sure to quote all
 
2389
# embedded single quotes properly.  In configure, this macro expands
 
2390
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
 
2391
#
 
2392
#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
 
2393
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 
2394
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
 
2395
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
 
2396
 
 
2397
 
 
2398
# _LT_LIBTOOL_TAGS
 
2399
# ----------------
 
2400
# Output comment and list of tags supported by the script
 
2401
m4_defun([_LT_LIBTOOL_TAGS],
 
2402
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
 
2403
available_tags="_LT_TAGS"dnl
 
2404
])
 
2405
 
 
2406
 
 
2407
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
 
2408
# -----------------------------------
 
2409
# Extract the dictionary values for VARNAME (optionally with TAG) and
 
2410
# expand to a commented shell variable setting:
 
2411
#
 
2412
#    # Some comment about what VAR is for.
 
2413
#    visible_name=$lt_internal_name
 
2414
m4_define([_LT_LIBTOOL_DECLARE],
 
2415
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
 
2416
                                           [description])))[]dnl
 
2417
m4_pushdef([_libtool_name],
 
2418
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
 
2419
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
 
2420
    [0], [_libtool_name=[$]$1],
 
2421
    [1], [_libtool_name=$lt_[]$1],
 
2422
    [2], [_libtool_name=$lt_[]$1],
 
2423
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
 
2424
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
 
2425
])
 
2426
 
 
2427
 
 
2428
# _LT_LIBTOOL_CONFIG_VARS
 
2429
# -----------------------
 
2430
# Produce commented declarations of non-tagged libtool config variables
 
2431
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
 
2432
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
 
2433
# section) are produced by _LT_LIBTOOL_TAG_VARS.
 
2434
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
 
2435
[m4_foreach([_lt_var],
 
2436
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
 
2437
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
 
2438
 
 
2439
 
 
2440
# _LT_LIBTOOL_TAG_VARS(TAG)
 
2441
# -------------------------
 
2442
m4_define([_LT_LIBTOOL_TAG_VARS],
 
2443
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
 
2444
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
 
2445
 
 
2446
 
 
2447
# _LT_TAGVAR(VARNAME, [TAGNAME])
 
2448
# ------------------------------
 
2449
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
 
2450
 
 
2451
 
 
2452
# _LT_CONFIG_COMMANDS
 
2453
# -------------------
 
2454
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
 
2455
# variables for single and double quote escaping we saved from calls
 
2456
# to _LT_DECL, we can put quote escaped variables declarations
 
2457
# into `config.status', and then the shell code to quote escape them in
 
2458
# for loops in `config.status'.  Finally, any additional code accumulated
 
2459
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
 
2460
m4_defun([_LT_CONFIG_COMMANDS],
 
2461
[AC_PROVIDE_IFELSE([LT_OUTPUT],
 
2462
        dnl If the libtool generation code has been placed in $CONFIG_LT,
 
2463
        dnl instead of duplicating it all over again into config.status,
 
2464
        dnl then we will have config.status run $CONFIG_LT later, so it
 
2465
        dnl needs to know what name is stored there:
 
2466
        [AC_CONFIG_COMMANDS([libtool],
 
2467
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
 
2468
    dnl If the libtool generation code is destined for config.status,
 
2469
    dnl expand the accumulated commands and init code now:
 
2470
    [AC_CONFIG_COMMANDS([libtool],
 
2471
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
 
2472
])#_LT_CONFIG_COMMANDS
 
2473
 
 
2474
 
 
2475
# Initialize.
 
2476
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
 
2477
[
 
2478
 
 
2479
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
2480
# if CDPATH is set.
 
2481
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
2482
 
 
2483
sed_quote_subst='$sed_quote_subst'
 
2484
double_quote_subst='$double_quote_subst'
 
2485
delay_variable_subst='$delay_variable_subst'
 
2486
_LT_CONFIG_STATUS_DECLARATIONS
 
2487
LTCC='$LTCC'
 
2488
LTCFLAGS='$LTCFLAGS'
 
2489
compiler='$compiler_DEFAULT'
 
2490
 
 
2491
# Quote evaled strings.
 
2492
for var in lt_decl_all_varnames([[ \
 
2493
]], lt_decl_quote_varnames); do
 
2494
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
 
2495
    *[[\\\\\\\`\\"\\\$]]*)
 
2496
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
 
2497
      ;;
 
2498
    *)
 
2499
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
 
2500
      ;;
 
2501
    esac
 
2502
done
 
2503
 
 
2504
# Double-quote double-evaled strings.
 
2505
for var in lt_decl_all_varnames([[ \
 
2506
]], lt_decl_dquote_varnames); do
 
2507
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
 
2508
    *[[\\\\\\\`\\"\\\$]]*)
 
2509
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
 
2510
      ;;
 
2511
    *)
 
2512
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
 
2513
      ;;
 
2514
    esac
 
2515
done
 
2516
 
 
2517
# Fix-up fallback echo if it was mangled by the above quoting rules.
 
2518
case \$lt_ECHO in
 
2519
*'\\\[$]0 --fallback-echo"')dnl "
 
2520
  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
 
2521
  ;;
 
2522
esac
 
2523
 
 
2524
_LT_OUTPUT_LIBTOOL_INIT
 
2525
])
 
2526
 
 
2527
 
 
2528
# LT_OUTPUT
 
2529
# ---------
 
2530
# This macro allows early generation of the libtool script (before
 
2531
# AC_OUTPUT is called), incase it is used in configure for compilation
 
2532
# tests.
 
2533
AC_DEFUN([LT_OUTPUT],
 
2534
[: ${CONFIG_LT=./config.lt}
 
2535
AC_MSG_NOTICE([creating $CONFIG_LT])
 
2536
cat >"$CONFIG_LT" <<_LTEOF
 
2537
#! $SHELL
 
2538
# Generated by $as_me.
 
2539
# Run this file to recreate a libtool stub with the current configuration.
 
2540
 
 
2541
lt_cl_silent=false
 
2542
SHELL=\${CONFIG_SHELL-$SHELL}
 
2543
_LTEOF
 
2544
 
 
2545
cat >>"$CONFIG_LT" <<\_LTEOF
 
2546
AS_SHELL_SANITIZE
 
2547
_AS_PREPARE
 
2548
 
 
2549
exec AS_MESSAGE_FD>&1
 
2550
exec AS_MESSAGE_LOG_FD>>config.log
 
2551
{
 
2552
  echo
 
2553
  AS_BOX([Running $as_me.])
 
2554
} >&AS_MESSAGE_LOG_FD
 
2555
 
 
2556
lt_cl_help="\
 
2557
\`$as_me' creates a local libtool stub from the current configuration,
 
2558
for use in further configure time tests before the real libtool is
 
2559
generated.
 
2560
 
 
2561
Usage: $[0] [[OPTIONS]]
 
2562
 
 
2563
  -h, --help      print this help, then exit
 
2564
  -V, --version   print version number, then exit
 
2565
  -q, --quiet     do not print progress messages
 
2566
  -d, --debug     don't remove temporary files
 
2567
 
 
2568
Report bugs to <bug-libtool@gnu.org>."
 
2569
 
 
2570
lt_cl_version="\
 
2571
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 
2572
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 
2573
configured by $[0], generated by m4_PACKAGE_STRING.
 
2574
 
 
2575
Copyright (C) 2008 Free Software Foundation, Inc.
 
2576
This config.lt script is free software; the Free Software Foundation
 
2577
gives unlimited permision to copy, distribute and modify it."
 
2578
 
 
2579
while test $[#] != 0
 
2580
do
 
2581
  case $[1] in
 
2582
    --version | --v* | -V )
 
2583
      echo "$lt_cl_version"; exit 0 ;;
 
2584
    --help | --h* | -h )
 
2585
      echo "$lt_cl_help"; exit 0 ;;
 
2586
    --debug | --d* | -d )
 
2587
      debug=: ;;
 
2588
    --quiet | --q* | --silent | --s* | -q )
 
2589
      lt_cl_silent=: ;;
 
2590
 
 
2591
    -*) AC_MSG_ERROR([unrecognized option: $[1]
 
2592
Try \`$[0] --help' for more information.]) ;;
 
2593
 
 
2594
    *) AC_MSG_ERROR([unrecognized argument: $[1]
 
2595
Try \`$[0] --help' for more information.]) ;;
 
2596
  esac
 
2597
  shift
 
2598
done
 
2599
 
 
2600
if $lt_cl_silent; then
 
2601
  exec AS_MESSAGE_FD>/dev/null
 
2602
fi
 
2603
_LTEOF
 
2604
 
 
2605
cat >>"$CONFIG_LT" <<_LTEOF
 
2606
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
 
2607
_LTEOF
 
2608
 
 
2609
cat >>"$CONFIG_LT" <<\_LTEOF
 
2610
AC_MSG_NOTICE([creating $ofile])
 
2611
_LT_OUTPUT_LIBTOOL_COMMANDS
 
2612
AS_EXIT(0)
 
2613
_LTEOF
 
2614
chmod +x "$CONFIG_LT"
 
2615
 
 
2616
# configure is writing to config.log, but config.lt does its own redirection,
 
2617
# appending to config.log, which fails on DOS, as config.log is still kept
 
2618
# open by configure.  Here we exec the FD to /dev/null, effectively closing
 
2619
# config.log, so it can be properly (re)opened and appended to by config.lt.
 
2620
if test "$no_create" != yes; then
 
2621
  lt_cl_success=:
 
2622
  test "$silent" = yes &&
 
2623
    lt_config_lt_args="$lt_config_lt_args --quiet"
 
2624
  exec AS_MESSAGE_LOG_FD>/dev/null
 
2625
  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
 
2626
  exec AS_MESSAGE_LOG_FD>>config.log
 
2627
  $lt_cl_success || AS_EXIT(1)
 
2628
fi
 
2629
])# LT_OUTPUT
 
2630
 
 
2631
 
 
2632
# _LT_CONFIG(TAG)
 
2633
# ---------------
 
2634
# If TAG is the built-in tag, create an initial libtool script with a
 
2635
# default configuration from the untagged config vars.  Otherwise add code
 
2636
# to config.status for appending the configuration named by TAG from the
 
2637
# matching tagged config vars.
 
2638
m4_defun([_LT_CONFIG],
 
2639
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2640
_LT_CONFIG_SAVE_COMMANDS([
 
2641
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
 
2642
  m4_if(_LT_TAG, [C], [
 
2643
    # See if we are running on zsh, and set the options which allow our
 
2644
    # commands through without removal of \ escapes.
 
2645
    if test -n "${ZSH_VERSION+set}" ; then
 
2646
      setopt NO_GLOB_SUBST
 
2647
    fi
 
2648
 
 
2649
    cfgfile="${ofile}T"
 
2650
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
 
2651
    $RM "$cfgfile"
 
2652
 
 
2653
    cat <<_LT_EOF >> "$cfgfile"
 
2654
#! $SHELL
 
2655
 
 
2656
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
2657
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
 
2658
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
2659
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
2660
#
 
2661
_LT_COPYING
 
2662
_LT_LIBTOOL_TAGS
 
2663
 
 
2664
# ### BEGIN LIBTOOL CONFIG
 
2665
_LT_LIBTOOL_CONFIG_VARS
 
2666
_LT_LIBTOOL_TAG_VARS
 
2667
# ### END LIBTOOL CONFIG
 
2668
 
 
2669
_LT_EOF
 
2670
 
 
2671
  case $host_os in
 
2672
  aix3*)
 
2673
    cat <<\_LT_EOF >> "$cfgfile"
 
2674
# AIX sometimes has problems with the GCC collect2 program.  For some
 
2675
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
2676
# vanish in a puff of smoke.
 
2677
if test "X${COLLECT_NAMES+set}" != Xset; then
 
2678
  COLLECT_NAMES=
 
2679
  export COLLECT_NAMES
 
2680
fi
 
2681
_LT_EOF
 
2682
    ;;
 
2683
  esac
 
2684
 
 
2685
  _LT_PROG_LTMAIN
 
2686
 
 
2687
  # We use sed instead of cat because bash on DJGPP gets confused if
 
2688
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
2689
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
2690
  # is reportedly fixed, but why not run on old versions too?
 
2691
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
 
2692
    || (rm -f "$cfgfile"; exit 1)
 
2693
 
 
2694
  _LT_PROG_XSI_SHELLFNS
 
2695
 
 
2696
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
 
2697
    || (rm -f "$cfgfile"; exit 1)
 
2698
 
 
2699
  mv -f "$cfgfile" "$ofile" ||
 
2700
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
2701
  chmod +x "$ofile"
 
2702
],
 
2703
[cat <<_LT_EOF >> "$ofile"
 
2704
 
 
2705
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
 
2706
dnl in a comment (ie after a #).
 
2707
# ### BEGIN LIBTOOL TAG CONFIG: $1
 
2708
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
 
2709
# ### END LIBTOOL TAG CONFIG: $1
 
2710
_LT_EOF
 
2711
])dnl /m4_if
 
2712
],
 
2713
[m4_if([$1], [], [
 
2714
    PACKAGE='$PACKAGE'
 
2715
    VERSION='$VERSION'
 
2716
    TIMESTAMP='$TIMESTAMP'
 
2717
    RM='$RM'
 
2718
    ofile='$ofile'], [])
 
2719
])dnl /_LT_CONFIG_SAVE_COMMANDS
 
2720
])# _LT_CONFIG
 
2721
 
 
2722
 
 
2723
# LT_SUPPORTED_TAG(TAG)
 
2724
# ---------------------
 
2725
# Trace this macro to discover what tags are supported by the libtool
 
2726
# --tag option, using:
 
2727
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
 
2728
AC_DEFUN([LT_SUPPORTED_TAG], [])
 
2729
 
 
2730
 
 
2731
# C support is built-in for now
 
2732
m4_define([_LT_LANG_C_enabled], [])
 
2733
m4_define([_LT_TAGS], [])
 
2734
 
 
2735
 
 
2736
# LT_LANG(LANG)
 
2737
# -------------
 
2738
# Enable libtool support for the given language if not already enabled.
 
2739
AC_DEFUN([LT_LANG],
 
2740
[AC_BEFORE([$0], [LT_OUTPUT])dnl
 
2741
m4_case([$1],
 
2742
  [C],                  [_LT_LANG(C)],
 
2743
  [C++],                [_LT_LANG(CXX)],
 
2744
  [Java],               [_LT_LANG(GCJ)],
 
2745
  [Fortran 77],         [_LT_LANG(F77)],
 
2746
  [Fortran],            [_LT_LANG(FC)],
 
2747
  [Windows Resource],   [_LT_LANG(RC)],
 
2748
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
 
2749
    [_LT_LANG($1)],
 
2750
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
 
2751
])# LT_LANG
 
2752
 
 
2753
 
 
2754
# _LT_LANG(LANGNAME)
 
2755
# ------------------
 
2756
m4_defun([_LT_LANG],
 
2757
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
 
2758
  [LT_SUPPORTED_TAG([$1])dnl
 
2759
  m4_append([_LT_TAGS], [$1 ])dnl
 
2760
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
 
2761
  _LT_LANG_$1_CONFIG($1)])dnl
 
2762
])# _LT_LANG
 
2763
 
 
2764
 
 
2765
# _LT_LANG_DEFAULT_CONFIG
 
2766
# -----------------------
 
2767
m4_defun([_LT_LANG_DEFAULT_CONFIG],
 
2768
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
2769
  [LT_LANG(CXX)],
 
2770
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
 
2771
 
 
2772
AC_PROVIDE_IFELSE([AC_PROG_F77],
 
2773
  [LT_LANG(F77)],
 
2774
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
 
2775
 
 
2776
AC_PROVIDE_IFELSE([AC_PROG_FC],
 
2777
  [LT_LANG(FC)],
 
2778
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
 
2779
 
 
2780
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
 
2781
dnl pulling things in needlessly.
 
2782
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
2783
  [LT_LANG(GCJ)],
 
2784
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
2785
    [LT_LANG(GCJ)],
 
2786
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
 
2787
      [LT_LANG(GCJ)],
 
2788
      [m4_ifdef([AC_PROG_GCJ],
 
2789
        [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
 
2790
       m4_ifdef([A][M_PROG_GCJ],
 
2791
        [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
 
2792
       m4_ifdef([LT_PROG_GCJ],
 
2793
        [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
2794
 
 
2795
AC_PROVIDE_IFELSE([LT_PROG_RC],
 
2796
  [LT_LANG(RC)],
 
2797
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
 
2798
])# _LT_LANG_DEFAULT_CONFIG
 
2799
 
 
2800
# Obsolete macros:
 
2801
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 
2802
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 
2803
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
 
2804
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
 
2805
dnl aclocal-1.4 backwards compatibility:
 
2806
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
 
2807
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
 
2808
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
 
2809
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
 
2810
 
 
2811
 
 
2812
# _LT_TAG_COMPILER
 
2813
# ----------------
 
2814
m4_defun([_LT_TAG_COMPILER],
 
2815
[AC_REQUIRE([AC_PROG_CC])dnl
 
2816
 
 
2817
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
 
2818
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
 
2819
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
 
2820
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
 
2821
 
 
2822
# If no C compiler was specified, use CC.
 
2823
LTCC=${LTCC-"$CC"}
 
2824
 
 
2825
# If no C compiler flags were specified, use CFLAGS.
 
2826
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
2827
 
 
2828
# Allow CC to be a program name with arguments.
 
2829
compiler=$CC
 
2830
])# _LT_TAG_COMPILER
 
2831
 
 
2832
 
 
2833
# _LT_COMPILER_BOILERPLATE
 
2834
# ------------------------
 
2835
# Check for compiler boilerplate output or warnings with
 
2836
# the simple compiler test code.
 
2837
m4_defun([_LT_COMPILER_BOILERPLATE],
 
2838
[m4_require([_LT_DECL_SED])dnl
 
2839
ac_outfile=conftest.$ac_objext
 
2840
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
 
2841
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
2842
_lt_compiler_boilerplate=`cat conftest.err`
 
2843
$RM conftest*
 
2844
])# _LT_COMPILER_BOILERPLATE
 
2845
 
 
2846
 
 
2847
# _LT_LINKER_BOILERPLATE
 
2848
# ----------------------
 
2849
# Check for linker boilerplate output or warnings with
 
2850
# the simple link test code.
 
2851
m4_defun([_LT_LINKER_BOILERPLATE],
 
2852
[m4_require([_LT_DECL_SED])dnl
 
2853
ac_outfile=conftest.$ac_objext
 
2854
echo "$lt_simple_link_test_code" >conftest.$ac_ext
 
2855
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
2856
_lt_linker_boilerplate=`cat conftest.err`
 
2857
$RM -r conftest*
 
2858
])# _LT_LINKER_BOILERPLATE
 
2859
 
 
2860
# _LT_REQUIRED_DARWIN_CHECKS
 
2861
# -------------------------
 
2862
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 
2863
  case $host_os in
 
2864
    rhapsody* | darwin*)
 
2865
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
 
2866
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
 
2867
    AC_CHECK_TOOL([LIPO], [lipo], [:])
 
2868
    AC_CHECK_TOOL([OTOOL], [otool], [:])
 
2869
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
 
2870
    _LT_DECL([], [DSYMUTIL], [1],
 
2871
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
 
2872
    _LT_DECL([], [NMEDIT], [1],
 
2873
      [Tool to change global to local symbols on Mac OS X])
 
2874
    _LT_DECL([], [LIPO], [1],
 
2875
      [Tool to manipulate fat objects and archives on Mac OS X])
 
2876
    _LT_DECL([], [OTOOL], [1],
 
2877
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
 
2878
    _LT_DECL([], [OTOOL64], [1],
 
2879
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
 
2880
 
 
2881
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
 
2882
      [lt_cv_apple_cc_single_mod=no
 
2883
      if test -z "${LT_MULTI_MODULE}"; then
 
2884
        # By default we will add the -single_module flag. You can override
 
2885
        # by either setting the environment variable LT_MULTI_MODULE
 
2886
        # non-empty at configure time, or by adding -multi_module to the
 
2887
        # link flags.
 
2888
        rm -rf libconftest.dylib*
 
2889
        echo "int foo(void){return 1;}" > conftest.c
 
2890
        echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 
2891
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
 
2892
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 
2893
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
 
2894
        _lt_result=$?
 
2895
        if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
 
2896
          lt_cv_apple_cc_single_mod=yes
 
2897
        else
 
2898
          cat conftest.err >&AS_MESSAGE_LOG_FD
 
2899
        fi
 
2900
        rm -rf libconftest.dylib*
 
2901
        rm -f conftest.*
 
2902
      fi])
 
2903
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
 
2904
      [lt_cv_ld_exported_symbols_list],
 
2905
      [lt_cv_ld_exported_symbols_list=no
 
2906
      save_LDFLAGS=$LDFLAGS
 
2907
      echo "_main" > conftest.sym
 
2908
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
 
2909
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
2910
        [lt_cv_ld_exported_symbols_list=yes],
 
2911
        [lt_cv_ld_exported_symbols_list=no])
 
2912
        LDFLAGS="$save_LDFLAGS"
 
2913
    ])
 
2914
    case $host_os in
 
2915
    rhapsody* | darwin1.[[012]])
 
2916
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
 
2917
    darwin1.*)
 
2918
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
2919
    darwin*) # darwin 5.x on
 
2920
      # if running on 10.5 or later, the deployment target defaults
 
2921
      # to the OS version, if on x86, and 10.4, the deployment
 
2922
      # target defaults to 10.4. Don't you love it?
 
2923
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 
2924
        10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
 
2925
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
2926
        10.[[012]]*)
 
2927
          _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
2928
        10.*)
 
2929
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
2930
      esac
 
2931
    ;;
 
2932
  esac
 
2933
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
 
2934
      _lt_dar_single_mod='$single_module'
 
2935
    fi
 
2936
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
 
2937
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
 
2938
    else
 
2939
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
2940
    fi
 
2941
    if test "$DSYMUTIL" != ":"; then
 
2942
      _lt_dsymutil='~$DSYMUTIL $lib || :'
 
2943
    else
 
2944
      _lt_dsymutil=
 
2945
    fi
 
2946
    ;;
 
2947
  esac
 
2948
])
 
2949
 
 
2950
 
 
2951
# _LT_DARWIN_LINKER_FEATURES
 
2952
# --------------------------
 
2953
# Checks for linker and compiler features on darwin
 
2954
m4_defun([_LT_DARWIN_LINKER_FEATURES],
 
2955
[
 
2956
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
 
2957
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
2958
  _LT_TAGVAR(hardcode_direct, $1)=no
 
2959
  _LT_TAGVAR(hardcode_automatic, $1)=yes
 
2960
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
2961
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
 
2962
  _LT_TAGVAR(link_all_deplibs, $1)=yes
 
2963
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
 
2964
  case $cc_basename in
 
2965
     ifort*) _lt_dar_can_shared=yes ;;
 
2966
     *) _lt_dar_can_shared=$GCC ;;
 
2967
  esac
 
2968
  if test "$_lt_dar_can_shared" = "yes"; then
 
2969
    output_verbose_link_cmd=echo
 
2970
    _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}"
 
2971
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
 
2972
    _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}"
 
2973
    _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}"
 
2974
    m4_if([$1], [CXX],
 
2975
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
 
2976
      _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}"
 
2977
      _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}"
 
2978
    fi
 
2979
],[])
 
2980
  else
 
2981
  _LT_TAGVAR(ld_shlibs, $1)=no
 
2982
  fi
 
2983
])
 
2984
 
 
2985
# _LT_SYS_MODULE_PATH_AIX
 
2986
# -----------------------
 
2987
# Links a minimal program and checks the executable
 
2988
# for the system default hardcoded library path. In most cases,
 
2989
# this is /usr/lib:/lib, but when the MPI compilers are used
 
2990
# the location of the communication and MPI libs are included too.
 
2991
# If we don't find anything, use the default library path according
 
2992
# to the aix ld manual.
 
2993
m4_defun([_LT_SYS_MODULE_PATH_AIX],
 
2994
[m4_require([_LT_DECL_SED])dnl
 
2995
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
2996
lt_aix_libpath_sed='
 
2997
    /Import File Strings/,/^$/ {
 
2998
        /^0/ {
 
2999
            s/^0  *\(.*\)$/\1/
 
3000
            p
 
3001
        }
 
3002
    }'
 
3003
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
3004
# Check for a 64-bit object if we didn't find anything.
 
3005
if test -z "$aix_libpath"; then
 
3006
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
3007
fi],[])
 
3008
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
3009
])# _LT_SYS_MODULE_PATH_AIX
 
3010
 
 
3011
 
 
3012
# _LT_SHELL_INIT(ARG)
 
3013
# -------------------
 
3014
m4_define([_LT_SHELL_INIT],
 
3015
[ifdef([AC_DIVERSION_NOTICE],
 
3016
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
3017
         [AC_DIVERT_PUSH(NOTICE)])
 
3018
$1
 
3019
AC_DIVERT_POP
 
3020
])# _LT_SHELL_INIT
 
3021
 
 
3022
 
 
3023
# _LT_PROG_ECHO_BACKSLASH
 
3024
# -----------------------
 
3025
# Add some code to the start of the generated configure script which
 
3026
# will find an echo command which doesn't interpret backslashes.
 
3027
m4_defun([_LT_PROG_ECHO_BACKSLASH],
 
3028
[_LT_SHELL_INIT([
 
3029
# Check that we are running under the correct shell.
 
3030
SHELL=${CONFIG_SHELL-/bin/sh}
 
3031
 
 
3032
case X$lt_ECHO in
 
3033
X*--fallback-echo)
 
3034
  # Remove one level of quotation (which was required for Make).
 
3035
  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
 
3036
  ;;
 
3037
esac
 
3038
 
 
3039
ECHO=${lt_ECHO-echo}
 
3040
if test "X[$]1" = X--no-reexec; then
 
3041
  # Discard the --no-reexec flag, and continue.
 
3042
  shift
 
3043
elif test "X[$]1" = X--fallback-echo; then
 
3044
  # Avoid inline document here, it may be left over
 
3045
  :
 
3046
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
 
3047
  # Yippee, $ECHO works!
 
3048
  :
 
3049
else
 
3050
  # Restart under the correct shell.
 
3051
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
3052
fi
 
3053
 
 
3054
if test "X[$]1" = X--fallback-echo; then
 
3055
  # used as fallback echo
 
3056
  shift
 
3057
  cat <<_LT_EOF
 
3058
[$]*
 
3059
_LT_EOF
 
3060
  exit 0
 
3061
fi
 
3062
 
 
3063
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
3064
# if CDPATH is set.
 
3065
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
3066
 
 
3067
if test -z "$lt_ECHO"; then
 
3068
  if test "X${echo_test_string+set}" != Xset; then
 
3069
    # find a string as large as possible, as long as the shell can cope with it
 
3070
    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
 
3071
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
 
3072
      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
 
3073
         { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
 
3074
      then
 
3075
        break
 
3076
      fi
 
3077
    done
 
3078
  fi
 
3079
 
 
3080
  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
 
3081
     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
 
3082
     test "X$echo_testing_string" = "X$echo_test_string"; then
 
3083
    :
 
3084
  else
 
3085
    # The Solaris, AIX, and Digital Unix default echo programs unquote
 
3086
    # backslashes.  This makes it impossible to quote backslashes using
 
3087
    #   echo "$something" | sed 's/\\/\\\\/g'
 
3088
    #
 
3089
    # So, first we look for a working echo in the user's PATH.
 
3090
 
 
3091
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3092
    for dir in $PATH /usr/ucb; do
 
3093
      IFS="$lt_save_ifs"
 
3094
      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
 
3095
         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
 
3096
         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
 
3097
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
3098
        ECHO="$dir/echo"
 
3099
        break
 
3100
      fi
 
3101
    done
 
3102
    IFS="$lt_save_ifs"
 
3103
 
 
3104
    if test "X$ECHO" = Xecho; then
 
3105
      # We didn't find a better echo, so look for alternatives.
 
3106
      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
 
3107
         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
 
3108
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
3109
        # This shell has a builtin print -r that does the trick.
 
3110
        ECHO='print -r'
 
3111
      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
 
3112
           test "X$CONFIG_SHELL" != X/bin/ksh; then
 
3113
        # If we have ksh, try running configure again with it.
 
3114
        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
3115
        export ORIGINAL_CONFIG_SHELL
 
3116
        CONFIG_SHELL=/bin/ksh
 
3117
        export CONFIG_SHELL
 
3118
        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
3119
      else
 
3120
        # Try using printf.
 
3121
        ECHO='printf %s\n'
 
3122
        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
 
3123
           echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
 
3124
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
3125
          # Cool, printf works
 
3126
          :
 
3127
        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
3128
             test "X$echo_testing_string" = 'X\t' &&
 
3129
             echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
3130
             test "X$echo_testing_string" = "X$echo_test_string"; then
 
3131
          CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
 
3132
          export CONFIG_SHELL
 
3133
          SHELL="$CONFIG_SHELL"
 
3134
          export SHELL
 
3135
          ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
 
3136
        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
3137
             test "X$echo_testing_string" = 'X\t' &&
 
3138
             echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
3139
             test "X$echo_testing_string" = "X$echo_test_string"; then
 
3140
          ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
 
3141
        else
 
3142
          # maybe with a smaller string...
 
3143
          prev=:
 
3144
 
 
3145
          for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
 
3146
            if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
 
3147
            then
 
3148
              break
 
3149
            fi
 
3150
            prev="$cmd"
 
3151
          done
 
3152
 
 
3153
          if test "$prev" != 'sed 50q "[$]0"'; then
 
3154
            echo_test_string=`eval $prev`
 
3155
            export echo_test_string
 
3156
            exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
 
3157
          else
 
3158
            # Oops.  We lost completely, so just stick with echo.
 
3159
            ECHO=echo
 
3160
          fi
 
3161
        fi
 
3162
      fi
 
3163
    fi
 
3164
  fi
 
3165
fi
 
3166
 
 
3167
# Copy echo and quote the copy suitably for passing to libtool from
 
3168
# the Makefile, instead of quoting the original, which is used later.
 
3169
lt_ECHO=$ECHO
 
3170
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
 
3171
   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 
3172
fi
 
3173
 
 
3174
AC_SUBST(lt_ECHO)
 
3175
])
 
3176
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
 
3177
_LT_DECL([], [ECHO], [1],
 
3178
    [An echo program that does not interpret backslashes])
 
3179
])# _LT_PROG_ECHO_BACKSLASH
 
3180
 
 
3181
 
 
3182
# _LT_ENABLE_LOCK
 
3183
# ---------------
 
3184
m4_defun([_LT_ENABLE_LOCK],
 
3185
[AC_ARG_ENABLE([libtool-lock],
 
3186
  [AS_HELP_STRING([--disable-libtool-lock],
 
3187
    [avoid locking (might break parallel builds)])])
 
3188
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
3189
 
 
3190
# Some flags need to be propagated to the compiler or linker for good
 
3191
# libtool support.
 
3192
case $host in
 
3193
ia64-*-hpux*)
 
3194
  # Find out which ABI we are using.
 
3195
  echo 'int i;' > conftest.$ac_ext
 
3196
  if AC_TRY_EVAL(ac_compile); then
 
3197
    case `/usr/bin/file conftest.$ac_objext` in
 
3198
      *ELF-32*)
 
3199
        HPUX_IA64_MODE="32"
 
3200
        ;;
 
3201
      *ELF-64*)
 
3202
        HPUX_IA64_MODE="64"
 
3203
        ;;
 
3204
    esac
 
3205
  fi
 
3206
  rm -rf conftest*
 
3207
  ;;
 
3208
*-*-irix6*)
 
3209
  # Find out which ABI we are using.
 
3210
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
3211
  if AC_TRY_EVAL(ac_compile); then
 
3212
    if test "$lt_cv_prog_gnu_ld" = yes; then
 
3213
      case `/usr/bin/file conftest.$ac_objext` in
 
3214
        *32-bit*)
 
3215
          LD="${LD-ld} -melf32bsmip"
 
3216
          ;;
 
3217
        *N32*)
 
3218
          LD="${LD-ld} -melf32bmipn32"
 
3219
          ;;
 
3220
        *64-bit*)
 
3221
          LD="${LD-ld} -melf64bmip"
 
3222
        ;;
 
3223
      esac
 
3224
    else
 
3225
      case `/usr/bin/file conftest.$ac_objext` in
 
3226
        *32-bit*)
 
3227
          LD="${LD-ld} -32"
 
3228
          ;;
 
3229
        *N32*)
 
3230
          LD="${LD-ld} -n32"
 
3231
          ;;
 
3232
        *64-bit*)
 
3233
          LD="${LD-ld} -64"
 
3234
          ;;
 
3235
      esac
 
3236
    fi
 
3237
  fi
 
3238
  rm -rf conftest*
 
3239
  ;;
 
3240
 
 
3241
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
 
3242
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
3243
  # Find out which ABI we are using.
 
3244
  echo 'int i;' > conftest.$ac_ext
 
3245
  if AC_TRY_EVAL(ac_compile); then
 
3246
    case `/usr/bin/file conftest.o` in
 
3247
      *32-bit*)
 
3248
        case $host in
 
3249
          x86_64-*kfreebsd*-gnu)
 
3250
            LD="${LD-ld} -m elf_i386_fbsd"
 
3251
            ;;
 
3252
          x86_64-*linux*)
 
3253
            LD="${LD-ld} -m elf_i386"
 
3254
            ;;
 
3255
          ppc64-*linux*|powerpc64-*linux*)
 
3256
            LD="${LD-ld} -m elf32ppclinux"
 
3257
            ;;
 
3258
          s390x-*linux*)
 
3259
            LD="${LD-ld} -m elf_s390"
 
3260
            ;;
 
3261
          sparc64-*linux*)
 
3262
            LD="${LD-ld} -m elf32_sparc"
 
3263
            ;;
 
3264
        esac
 
3265
        ;;
 
3266
      *64-bit*)
 
3267
        case $host in
 
3268
          x86_64-*kfreebsd*-gnu)
 
3269
            LD="${LD-ld} -m elf_x86_64_fbsd"
 
3270
            ;;
 
3271
          x86_64-*linux*)
 
3272
            LD="${LD-ld} -m elf_x86_64"
 
3273
            ;;
 
3274
          ppc*-*linux*|powerpc*-*linux*)
 
3275
            LD="${LD-ld} -m elf64ppc"
 
3276
            ;;
 
3277
          s390*-*linux*|s390*-*tpf*)
 
3278
            LD="${LD-ld} -m elf64_s390"
 
3279
            ;;
 
3280
          sparc*-*linux*)
 
3281
            LD="${LD-ld} -m elf64_sparc"
 
3282
            ;;
 
3283
        esac
 
3284
        ;;
 
3285
    esac
 
3286
  fi
 
3287
  rm -rf conftest*
 
3288
  ;;
 
3289
 
 
3290
*-*-sco3.2v5*)
 
3291
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
3292
  SAVE_CFLAGS="$CFLAGS"
 
3293
  CFLAGS="$CFLAGS -belf"
 
3294
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
3295
    [AC_LANG_PUSH(C)
 
3296
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
3297
     AC_LANG_POP])
 
3298
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
3299
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
3300
    CFLAGS="$SAVE_CFLAGS"
 
3301
  fi
 
3302
  ;;
 
3303
sparc*-*solaris*)
 
3304
  # Find out which ABI we are using.
 
3305
  echo 'int i;' > conftest.$ac_ext
 
3306
  if AC_TRY_EVAL(ac_compile); then
 
3307
    case `/usr/bin/file conftest.o` in
 
3308
    *64-bit*)
 
3309
      case $lt_cv_prog_gnu_ld in
 
3310
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
 
3311
      *)
 
3312
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 
3313
          LD="${LD-ld} -64"
 
3314
        fi
 
3315
        ;;
 
3316
      esac
 
3317
      ;;
 
3318
    esac
 
3319
  fi
 
3320
  rm -rf conftest*
 
3321
  ;;
 
3322
esac
 
3323
 
 
3324
need_locks="$enable_libtool_lock"
 
3325
])# _LT_ENABLE_LOCK
 
3326
 
 
3327
 
 
3328
# _LT_CMD_OLD_ARCHIVE
 
3329
# -------------------
 
3330
m4_defun([_LT_CMD_OLD_ARCHIVE],
 
3331
[AC_CHECK_TOOL(AR, ar, false)
 
3332
test -z "$AR" && AR=ar
 
3333
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
3334
_LT_DECL([], [AR], [1], [The archiver])
 
3335
_LT_DECL([], [AR_FLAGS], [1])
 
3336
 
 
3337
AC_CHECK_TOOL(STRIP, strip, :)
 
3338
test -z "$STRIP" && STRIP=:
 
3339
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
 
3340
 
 
3341
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
3342
test -z "$RANLIB" && RANLIB=:
 
3343
_LT_DECL([], [RANLIB], [1],
 
3344
    [Commands used to install an old-style archive])
 
3345
 
 
3346
# Determine commands to create old-style static archives.
 
3347
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
 
3348
old_postinstall_cmds='chmod 644 $oldlib'
 
3349
old_postuninstall_cmds=
 
3350
 
 
3351
if test -n "$RANLIB"; then
 
3352
  case $host_os in
 
3353
  openbsd*)
 
3354
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
 
3355
    ;;
 
3356
  *)
 
3357
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
 
3358
    ;;
 
3359
  esac
 
3360
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
3361
fi
 
3362
_LT_DECL([], [old_postinstall_cmds], [2])
 
3363
_LT_DECL([], [old_postuninstall_cmds], [2])
 
3364
_LT_TAGDECL([], [old_archive_cmds], [2],
 
3365
    [Commands used to build an old-style archive])
 
3366
])# _LT_CMD_OLD_ARCHIVE
 
3367
 
 
3368
 
 
3369
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
3370
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
3371
# ----------------------------------------------------------------
 
3372
# Check whether the given compiler option works
 
3373
AC_DEFUN([_LT_COMPILER_OPTION],
 
3374
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
3375
m4_require([_LT_DECL_SED])dnl
 
3376
AC_CACHE_CHECK([$1], [$2],
 
3377
  [$2=no
 
3378
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
3379
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
3380
   lt_compiler_flag="$3"
 
3381
   # Insert the option either (1) after the last *FLAGS variable, or
 
3382
   # (2) before a word containing "conftest.", or (3) at the end.
 
3383
   # Note that $ac_compile itself does not contain backslashes and begins
 
3384
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
3385
   # The option is referenced via a variable to avoid confusing sed.
 
3386
   lt_compile=`echo "$ac_compile" | $SED \
 
3387
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
3388
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
3389
   -e 's:$: $lt_compiler_flag:'`
 
3390
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
3391
   (eval "$lt_compile" 2>conftest.err)
 
3392
   ac_status=$?
 
3393
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
3394
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
3395
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
3396
     # The compiler can only warn and ignore the option if not recognized
 
3397
     # So say no if there are warnings other than the usual output.
 
3398
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
 
3399
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
3400
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
 
3401
       $2=yes
 
3402
     fi
 
3403
   fi
 
3404
   $RM conftest*
 
3405
])
 
3406
 
 
3407
if test x"[$]$2" = xyes; then
 
3408
    m4_if([$5], , :, [$5])
 
3409
else
 
3410
    m4_if([$6], , :, [$6])
 
3411
fi
 
3412
])# _LT_COMPILER_OPTION
 
3413
 
 
3414
# Old name:
 
3415
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
 
3416
dnl aclocal-1.4 backwards compatibility:
 
3417
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
 
3418
 
 
3419
 
 
3420
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
3421
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
 
3422
# ----------------------------------------------------
 
3423
# Check whether the given linker option works
 
3424
AC_DEFUN([_LT_LINKER_OPTION],
 
3425
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
3426
m4_require([_LT_DECL_SED])dnl
 
3427
AC_CACHE_CHECK([$1], [$2],
 
3428
  [$2=no
 
3429
   save_LDFLAGS="$LDFLAGS"
 
3430
   LDFLAGS="$LDFLAGS $3"
 
3431
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
 
3432
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
3433
     # The linker can only warn and ignore the option if not recognized
 
3434
     # So say no if there are warnings
 
3435
     if test -s conftest.err; then
 
3436
       # Append any errors to the config.log.
 
3437
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
3438
       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
 
3439
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
3440
       if diff conftest.exp conftest.er2 >/dev/null; then
 
3441
         $2=yes
 
3442
       fi
 
3443
     else
 
3444
       $2=yes
 
3445
     fi
 
3446
   fi
 
3447
   $RM -r conftest*
 
3448
   LDFLAGS="$save_LDFLAGS"
 
3449
])
 
3450
 
 
3451
if test x"[$]$2" = xyes; then
 
3452
    m4_if([$4], , :, [$4])
 
3453
else
 
3454
    m4_if([$5], , :, [$5])
 
3455
fi
 
3456
])# _LT_LINKER_OPTION
 
3457
 
 
3458
# Old name:
 
3459
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
 
3460
dnl aclocal-1.4 backwards compatibility:
 
3461
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
 
3462
 
 
3463
 
 
3464
# LT_CMD_MAX_LEN
 
3465
#---------------
 
3466
AC_DEFUN([LT_CMD_MAX_LEN],
 
3467
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3468
# find the maximum length of command line arguments
 
3469
AC_MSG_CHECKING([the maximum length of command line arguments])
 
3470
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
3471
  i=0
 
3472
  teststring="ABCD"
 
3473
 
 
3474
  case $build_os in
 
3475
  msdosdjgpp*)
 
3476
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
3477
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
3478
    # during glob expansion).  Even if it were fixed, the result of this
 
3479
    # check would be larger than it should be.
 
3480
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
3481
    ;;
 
3482
 
 
3483
  gnu*)
 
3484
    # Under GNU Hurd, this test is not required because there is
 
3485
    # no limit to the length of command line arguments.
 
3486
    # Libtool will interpret -1 as no limit whatsoever
 
3487
    lt_cv_sys_max_cmd_len=-1;
 
3488
    ;;
 
3489
 
 
3490
  cygwin* | mingw* | cegcc*)
 
3491
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
3492
    # about 5 minutes as the teststring grows exponentially.
 
3493
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
3494
    # you end up with a "frozen" computer, even though with patience
 
3495
    # the test eventually succeeds (with a max line length of 256k).
 
3496
    # Instead, let's just punt: use the minimum linelength reported by
 
3497
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
3498
    lt_cv_sys_max_cmd_len=8192;
 
3499
    ;;
 
3500
 
 
3501
  amigaos*)
 
3502
    # On AmigaOS with pdksh, this test takes hours, literally.
 
3503
    # So we just punt and use a minimum line length of 8192.
 
3504
    lt_cv_sys_max_cmd_len=8192;
 
3505
    ;;
 
3506
 
 
3507
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
 
3508
    # This has been around since 386BSD, at least.  Likely further.
 
3509
    if test -x /sbin/sysctl; then
 
3510
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
3511
    elif test -x /usr/sbin/sysctl; then
 
3512
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
3513
    else
 
3514
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
 
3515
    fi
 
3516
    # And add a safety zone
 
3517
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
3518
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
3519
    ;;
 
3520
 
 
3521
  interix*)
 
3522
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
 
3523
    lt_cv_sys_max_cmd_len=196608
 
3524
    ;;
 
3525
 
 
3526
  osf*)
 
3527
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
 
3528
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
 
3529
    # nice to cause kernel panics so lets avoid the loop below.
 
3530
    # First set a reasonable default.
 
3531
    lt_cv_sys_max_cmd_len=16384
 
3532
    #
 
3533
    if test -x /sbin/sysconfig; then
 
3534
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
 
3535
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
 
3536
      esac
 
3537
    fi
 
3538
    ;;
 
3539
  sco3.2v5*)
 
3540
    lt_cv_sys_max_cmd_len=102400
 
3541
    ;;
 
3542
  sysv5* | sco5v6* | sysv4.2uw2*)
 
3543
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
 
3544
    if test -n "$kargmax"; then
 
3545
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
 
3546
    else
 
3547
      lt_cv_sys_max_cmd_len=32768
 
3548
    fi
 
3549
    ;;
 
3550
  *)
 
3551
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
 
3552
    if test -n "$lt_cv_sys_max_cmd_len"; then
 
3553
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
3554
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
3555
    else
 
3556
      # Make teststring a little bigger before we do anything with it.
 
3557
      # a 1K string should be a reasonable start.
 
3558
      for i in 1 2 3 4 5 6 7 8 ; do
 
3559
        teststring=$teststring$teststring
 
3560
      done
 
3561
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
3562
      # If test is not a shell built-in, we'll probably end up computing a
 
3563
      # maximum length that is only half of the actual maximum length, but
 
3564
      # we can't tell.
 
3565
      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
 
3566
                 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
 
3567
              test $i != 17 # 1/2 MB should be enough
 
3568
      do
 
3569
        i=`expr $i + 1`
 
3570
        teststring=$teststring$teststring
 
3571
      done
 
3572
      # Only check the string length outside the loop.
 
3573
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
 
3574
      teststring=
 
3575
      # Add a significant safety factor because C++ compilers can tack on
 
3576
      # massive amounts of additional arguments before passing them to the
 
3577
      # linker.  It appears as though 1/2 is a usable value.
 
3578
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
3579
    fi
 
3580
    ;;
 
3581
  esac
 
3582
])
 
3583
if test -n $lt_cv_sys_max_cmd_len ; then
 
3584
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
3585
else
 
3586
  AC_MSG_RESULT(none)
 
3587
fi
 
3588
max_cmd_len=$lt_cv_sys_max_cmd_len
 
3589
_LT_DECL([], [max_cmd_len], [0],
 
3590
    [What is the maximum length of a command?])
 
3591
])# LT_CMD_MAX_LEN
 
3592
 
 
3593
# Old name:
 
3594
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
 
3595
dnl aclocal-1.4 backwards compatibility:
 
3596
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
 
3597
 
 
3598
 
 
3599
# _LT_HEADER_DLFCN
 
3600
# ----------------
 
3601
m4_defun([_LT_HEADER_DLFCN],
 
3602
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
 
3603
])# _LT_HEADER_DLFCN
 
3604
 
 
3605
 
 
3606
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
3607
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
3608
# ----------------------------------------------------------------
 
3609
m4_defun([_LT_TRY_DLOPEN_SELF],
 
3610
[m4_require([_LT_HEADER_DLFCN])dnl
 
3611
if test "$cross_compiling" = yes; then :
 
3612
  [$4]
 
3613
else
 
3614
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
3615
  lt_status=$lt_dlunknown
 
3616
  cat > conftest.$ac_ext <<_LT_EOF
 
3617
[#line __oline__ "configure"
 
3618
#include "confdefs.h"
 
3619
 
 
3620
#if HAVE_DLFCN_H
 
3621
#include <dlfcn.h>
 
3622
#endif
 
3623
 
 
3624
#include <stdio.h>
 
3625
 
 
3626
#ifdef RTLD_GLOBAL
 
3627
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
3628
#else
 
3629
#  ifdef DL_GLOBAL
 
3630
#    define LT_DLGLOBAL         DL_GLOBAL
 
3631
#  else
 
3632
#    define LT_DLGLOBAL         0
 
3633
#  endif
 
3634
#endif
 
3635
 
 
3636
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
3637
   find out it does not work in some platform. */
 
3638
#ifndef LT_DLLAZY_OR_NOW
 
3639
#  ifdef RTLD_LAZY
 
3640
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
3641
#  else
 
3642
#    ifdef DL_LAZY
 
3643
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
3644
#    else
 
3645
#      ifdef RTLD_NOW
 
3646
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
3647
#      else
 
3648
#        ifdef DL_NOW
 
3649
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
3650
#        else
 
3651
#          define LT_DLLAZY_OR_NOW      0
 
3652
#        endif
 
3653
#      endif
 
3654
#    endif
 
3655
#  endif
 
3656
#endif
 
3657
 
 
3658
void fnord() { int i=42;}
 
3659
int main ()
 
3660
{
 
3661
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
3662
  int status = $lt_dlunknown;
 
3663
 
 
3664
  if (self)
 
3665
    {
 
3666
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
3667
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
3668
      /* dlclose (self); */
 
3669
    }
 
3670
  else
 
3671
    puts (dlerror ());
 
3672
 
 
3673
  return status;
 
3674
}]
 
3675
_LT_EOF
 
3676
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
3677
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
 
3678
    lt_status=$?
 
3679
    case x$lt_status in
 
3680
      x$lt_dlno_uscore) $1 ;;
 
3681
      x$lt_dlneed_uscore) $2 ;;
 
3682
      x$lt_dlunknown|x*) $3 ;;
 
3683
    esac
 
3684
  else :
 
3685
    # compilation failed
 
3686
    $3
 
3687
  fi
 
3688
fi
 
3689
rm -fr conftest*
 
3690
])# _LT_TRY_DLOPEN_SELF
 
3691
 
 
3692
 
 
3693
# LT_SYS_DLOPEN_SELF
 
3694
# ------------------
 
3695
AC_DEFUN([LT_SYS_DLOPEN_SELF],
 
3696
[m4_require([_LT_HEADER_DLFCN])dnl
 
3697
if test "x$enable_dlopen" != xyes; then
 
3698
  enable_dlopen=unknown
 
3699
  enable_dlopen_self=unknown
 
3700
  enable_dlopen_self_static=unknown
 
3701
else
 
3702
  lt_cv_dlopen=no
 
3703
  lt_cv_dlopen_libs=
 
3704
 
 
3705
  case $host_os in
 
3706
  beos*)
 
3707
    lt_cv_dlopen="load_add_on"
 
3708
    lt_cv_dlopen_libs=
 
3709
    lt_cv_dlopen_self=yes
 
3710
    ;;
 
3711
 
 
3712
  mingw* | pw32* | cegcc*)
 
3713
    lt_cv_dlopen="LoadLibrary"
 
3714
    lt_cv_dlopen_libs=
 
3715
    ;;
 
3716
 
 
3717
  cygwin*)
 
3718
    lt_cv_dlopen="dlopen"
 
3719
    lt_cv_dlopen_libs=
 
3720
    ;;
 
3721
 
 
3722
  darwin*)
 
3723
  # if libdl is installed we need to link against it
 
3724
    AC_CHECK_LIB([dl], [dlopen],
 
3725
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
3726
    lt_cv_dlopen="dyld"
 
3727
    lt_cv_dlopen_libs=
 
3728
    lt_cv_dlopen_self=yes
 
3729
    ])
 
3730
    ;;
 
3731
 
 
3732
  *)
 
3733
    AC_CHECK_FUNC([shl_load],
 
3734
          [lt_cv_dlopen="shl_load"],
 
3735
      [AC_CHECK_LIB([dld], [shl_load],
 
3736
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
 
3737
        [AC_CHECK_FUNC([dlopen],
 
3738
              [lt_cv_dlopen="dlopen"],
 
3739
          [AC_CHECK_LIB([dl], [dlopen],
 
3740
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
3741
            [AC_CHECK_LIB([svld], [dlopen],
 
3742
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
3743
              [AC_CHECK_LIB([dld], [dld_link],
 
3744
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
 
3745
              ])
 
3746
            ])
 
3747
          ])
 
3748
        ])
 
3749
      ])
 
3750
    ;;
 
3751
  esac
 
3752
 
 
3753
  if test "x$lt_cv_dlopen" != xno; then
 
3754
    enable_dlopen=yes
 
3755
  else
 
3756
    enable_dlopen=no
 
3757
  fi
 
3758
 
 
3759
  case $lt_cv_dlopen in
 
3760
  dlopen)
 
3761
    save_CPPFLAGS="$CPPFLAGS"
 
3762
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
3763
 
 
3764
    save_LDFLAGS="$LDFLAGS"
 
3765
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
3766
 
 
3767
    save_LIBS="$LIBS"
 
3768
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
3769
 
 
3770
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
3771
          lt_cv_dlopen_self, [dnl
 
3772
          _LT_TRY_DLOPEN_SELF(
 
3773
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
3774
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
3775
    ])
 
3776
 
 
3777
    if test "x$lt_cv_dlopen_self" = xyes; then
 
3778
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
 
3779
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
3780
          lt_cv_dlopen_self_static, [dnl
 
3781
          _LT_TRY_DLOPEN_SELF(
 
3782
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
3783
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
3784
      ])
 
3785
    fi
 
3786
 
 
3787
    CPPFLAGS="$save_CPPFLAGS"
 
3788
    LDFLAGS="$save_LDFLAGS"
 
3789
    LIBS="$save_LIBS"
 
3790
    ;;
 
3791
  esac
 
3792
 
 
3793
  case $lt_cv_dlopen_self in
 
3794
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
3795
  *) enable_dlopen_self=unknown ;;
 
3796
  esac
 
3797
 
 
3798
  case $lt_cv_dlopen_self_static in
 
3799
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
3800
  *) enable_dlopen_self_static=unknown ;;
 
3801
  esac
 
3802
fi
 
3803
_LT_DECL([dlopen_support], [enable_dlopen], [0],
 
3804
         [Whether dlopen is supported])
 
3805
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
 
3806
         [Whether dlopen of programs is supported])
 
3807
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
 
3808
         [Whether dlopen of statically linked programs is supported])
 
3809
])# LT_SYS_DLOPEN_SELF
 
3810
 
 
3811
# Old name:
 
3812
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
 
3813
dnl aclocal-1.4 backwards compatibility:
 
3814
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
 
3815
 
 
3816
 
 
3817
# _LT_COMPILER_C_O([TAGNAME])
 
3818
# ---------------------------
 
3819
# Check to see if options -c and -o are simultaneously supported by compiler.
 
3820
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
 
3821
m4_defun([_LT_COMPILER_C_O],
 
3822
[m4_require([_LT_DECL_SED])dnl
 
3823
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
3824
m4_require([_LT_TAG_COMPILER])dnl
 
3825
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
3826
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
3827
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
3828
   $RM -r conftest 2>/dev/null
 
3829
   mkdir conftest
 
3830
   cd conftest
 
3831
   mkdir out
 
3832
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
3833
 
 
3834
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
3835
   # Insert the option either (1) after the last *FLAGS variable, or
 
3836
   # (2) before a word containing "conftest.", or (3) at the end.
 
3837
   # Note that $ac_compile itself does not contain backslashes and begins
 
3838
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
3839
   lt_compile=`echo "$ac_compile" | $SED \
 
3840
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
3841
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
3842
   -e 's:$: $lt_compiler_flag:'`
 
3843
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
3844
   (eval "$lt_compile" 2>out/conftest.err)
 
3845
   ac_status=$?
 
3846
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
3847
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
3848
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
3849
   then
 
3850
     # The compiler can only warn and ignore the option if not recognized
 
3851
     # So say no if there are warnings
 
3852
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
 
3853
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
 
3854
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
 
3855
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
3856
     fi
 
3857
   fi
 
3858
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
 
3859
   $RM conftest*
 
3860
   # SGI C++ compiler will create directory out/ii_files/ for
 
3861
   # template instantiation
 
3862
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
 
3863
   $RM out/* && rmdir out
 
3864
   cd ..
 
3865
   $RM -r conftest
 
3866
   $RM conftest*
 
3867
])
 
3868
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
 
3869
        [Does compiler simultaneously support -c and -o options?])
 
3870
])# _LT_COMPILER_C_O
 
3871
 
 
3872
 
 
3873
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
 
3874
# ----------------------------------
 
3875
# Check to see if we can do hard links to lock some files if needed
 
3876
m4_defun([_LT_COMPILER_FILE_LOCKS],
 
3877
[m4_require([_LT_ENABLE_LOCK])dnl
 
3878
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
3879
_LT_COMPILER_C_O([$1])
 
3880
 
 
3881
hard_links="nottested"
 
3882
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
3883
  # do not overwrite the value of need_locks provided by the user
 
3884
  AC_MSG_CHECKING([if we can lock with hard links])
 
3885
  hard_links=yes
 
3886
  $RM conftest*
 
3887
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
3888
  touch conftest.a
 
3889
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
3890
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
3891
  AC_MSG_RESULT([$hard_links])
 
3892
  if test "$hard_links" = no; then
 
3893
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
3894
    need_locks=warn
 
3895
  fi
 
3896
else
 
3897
  need_locks=no
 
3898
fi
 
3899
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
 
3900
])# _LT_COMPILER_FILE_LOCKS
 
3901
 
 
3902
 
 
3903
# _LT_CHECK_OBJDIR
 
3904
# ----------------
 
3905
m4_defun([_LT_CHECK_OBJDIR],
 
3906
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
3907
[rm -f .libs 2>/dev/null
 
3908
mkdir .libs 2>/dev/null
 
3909
if test -d .libs; then
 
3910
  lt_cv_objdir=.libs
 
3911
else
 
3912
  # MS-DOS does not allow filenames that begin with a dot.
 
3913
  lt_cv_objdir=_libs
 
3914
fi
 
3915
rmdir .libs 2>/dev/null])
 
3916
objdir=$lt_cv_objdir
 
3917
_LT_DECL([], [objdir], [0],
 
3918
         [The name of the directory that contains temporary libtool files])dnl
 
3919
m4_pattern_allow([LT_OBJDIR])dnl
 
3920
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
 
3921
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
 
3922
])# _LT_CHECK_OBJDIR
 
3923
 
 
3924
 
 
3925
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
 
3926
# --------------------------------------
 
3927
# Check hardcoding attributes.
 
3928
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
 
3929
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
3930
_LT_TAGVAR(hardcode_action, $1)=
 
3931
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
 
3932
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
 
3933
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
3934
 
 
3935
  # We can hardcode non-existent directories.
 
3936
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
 
3937
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
3938
     # have to relink, otherwise we might link with an installed library
 
3939
     # when we should be linking with a yet-to-be-installed one
 
3940
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
3941
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
 
3942
    # Linking always hardcodes the temporary library directory.
 
3943
    _LT_TAGVAR(hardcode_action, $1)=relink
 
3944
  else
 
3945
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
3946
    _LT_TAGVAR(hardcode_action, $1)=immediate
 
3947
  fi
 
3948
else
 
3949
  # We cannot hardcode anything, or else we can only hardcode existing
 
3950
  # directories.
 
3951
  _LT_TAGVAR(hardcode_action, $1)=unsupported
 
3952
fi
 
3953
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
3954
 
 
3955
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
 
3956
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
 
3957
  # Fast installation is not supported
 
3958
  enable_fast_install=no
 
3959
elif test "$shlibpath_overrides_runpath" = yes ||
 
3960
     test "$enable_shared" = no; then
 
3961
  # Fast installation is not necessary
 
3962
  enable_fast_install=needless
 
3963
fi
 
3964
_LT_TAGDECL([], [hardcode_action], [0],
 
3965
    [How to hardcode a shared library path into an executable])
 
3966
])# _LT_LINKER_HARDCODE_LIBPATH
 
3967
 
 
3968
 
 
3969
# _LT_CMD_STRIPLIB
 
3970
# ----------------
 
3971
m4_defun([_LT_CMD_STRIPLIB],
 
3972
[m4_require([_LT_DECL_EGREP])
 
3973
striplib=
 
3974
old_striplib=
 
3975
AC_MSG_CHECKING([whether stripping libraries is possible])
 
3976
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
 
3977
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
3978
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
3979
  AC_MSG_RESULT([yes])
 
3980
else
 
3981
# FIXME - insert some real tests, host_os isn't really good enough
 
3982
  case $host_os in
 
3983
  darwin*)
 
3984
    if test -n "$STRIP" ; then
 
3985
      striplib="$STRIP -x"
 
3986
      old_striplib="$STRIP -S"
 
3987
      AC_MSG_RESULT([yes])
 
3988
    else
 
3989
      AC_MSG_RESULT([no])
 
3990
    fi
 
3991
    ;;
 
3992
  *)
 
3993
    AC_MSG_RESULT([no])
 
3994
    ;;
 
3995
  esac
 
3996
fi
 
3997
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
 
3998
_LT_DECL([], [striplib], [1])
 
3999
])# _LT_CMD_STRIPLIB
 
4000
 
 
4001
 
 
4002
# _LT_SYS_DYNAMIC_LINKER([TAG])
 
4003
# -----------------------------
 
4004
# PORTME Fill in your ld.so characteristics
 
4005
m4_defun([_LT_SYS_DYNAMIC_LINKER],
 
4006
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
4007
m4_require([_LT_DECL_EGREP])dnl
 
4008
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
4009
m4_require([_LT_DECL_OBJDUMP])dnl
 
4010
m4_require([_LT_DECL_SED])dnl
 
4011
AC_MSG_CHECKING([dynamic linker characteristics])
 
4012
m4_if([$1],
 
4013
        [], [
 
4014
if test "$GCC" = yes; then
 
4015
  case $host_os in
 
4016
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
 
4017
    *) lt_awk_arg="/^libraries:/" ;;
 
4018
  esac
 
4019
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
4020
  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
 
4021
    # if the path contains ";" then we assume it to be the separator
 
4022
    # otherwise default to the standard path separator (i.e. ":") - it is
 
4023
    # assumed that no part of a normal pathname contains ";" but that should
 
4024
    # okay in the real world where ";" in dirpaths is itself problematic.
 
4025
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
 
4026
  else
 
4027
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
4028
  fi
 
4029
  # Ok, now we have the path, separated by spaces, we can step through it
 
4030
  # and add multilib dir if necessary.
 
4031
  lt_tmp_lt_search_path_spec=
 
4032
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
 
4033
  for lt_sys_path in $lt_search_path_spec; do
 
4034
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
 
4035
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
 
4036
    else
 
4037
      test -d "$lt_sys_path" && \
 
4038
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
 
4039
    fi
 
4040
  done
 
4041
  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
 
4042
BEGIN {RS=" "; FS="/|\n";} {
 
4043
  lt_foo="";
 
4044
  lt_count=0;
 
4045
  for (lt_i = NF; lt_i > 0; lt_i--) {
 
4046
    if ($lt_i != "" && $lt_i != ".") {
 
4047
      if ($lt_i == "..") {
 
4048
        lt_count++;
 
4049
      } else {
 
4050
        if (lt_count == 0) {
 
4051
          lt_foo="/" $lt_i lt_foo;
 
4052
        } else {
 
4053
          lt_count--;
 
4054
        }
 
4055
      }
 
4056
    }
 
4057
  }
 
4058
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
 
4059
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 
4060
}'`
 
4061
  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
 
4062
else
 
4063
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
4064
fi])
 
4065
library_names_spec=
 
4066
libname_spec='lib$name'
 
4067
soname_spec=
 
4068
shrext_cmds=".so"
 
4069
postinstall_cmds=
 
4070
postuninstall_cmds=
 
4071
finish_cmds=
 
4072
finish_eval=
 
4073
shlibpath_var=
 
4074
shlibpath_overrides_runpath=unknown
 
4075
version_type=none
 
4076
dynamic_linker="$host_os ld.so"
 
4077
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
4078
need_lib_prefix=unknown
 
4079
hardcode_into_libs=no
 
4080
 
 
4081
# when you set need_version to no, make sure it does not cause -set_version
 
4082
# flags to be left without arguments
 
4083
need_version=unknown
 
4084
 
 
4085
case $host_os in
 
4086
aix3*)
 
4087
  version_type=linux
 
4088
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 
4089
  shlibpath_var=LIBPATH
 
4090
 
 
4091
  # AIX 3 has no versioning support, so we append a major version to the name.
 
4092
  soname_spec='${libname}${release}${shared_ext}$major'
 
4093
  ;;
 
4094
 
 
4095
aix[[4-9]]*)
 
4096
  version_type=linux
 
4097
  need_lib_prefix=no
 
4098
  need_version=no
 
4099
  hardcode_into_libs=yes
 
4100
  if test "$host_cpu" = ia64; then
 
4101
    # AIX 5 supports IA64
 
4102
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 
4103
    shlibpath_var=LD_LIBRARY_PATH
 
4104
  else
 
4105
    # With GCC up to 2.95.x, collect2 would create an import file
 
4106
    # for dependence libraries.  The import file would start with
 
4107
    # the line `#! .'.  This would cause the generated library to
 
4108
    # depend on `.', always an invalid library.  This was fixed in
 
4109
    # development snapshots of GCC prior to 3.0.
 
4110
    case $host_os in
 
4111
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
4112
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
4113
           echo ' yes '
 
4114
           echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 
4115
        :
 
4116
      else
 
4117
        can_build_shared=no
 
4118
      fi
 
4119
      ;;
 
4120
    esac
 
4121
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
4122
    # soname into executable. Probably we can add versioning support to
 
4123
    # collect2, so additional links can be useful in future.
 
4124
    if test "$aix_use_runtimelinking" = yes; then
 
4125
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
4126
      # instead of lib<name>.a to let people know that these are not
 
4127
      # typical AIX shared libraries.
 
4128
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4129
    else
 
4130
      # We preserve .a as extension for shared libraries through AIX4.2
 
4131
      # and later when we are not doing run time linking.
 
4132
      library_names_spec='${libname}${release}.a $libname.a'
 
4133
      soname_spec='${libname}${release}${shared_ext}$major'
 
4134
    fi
 
4135
    shlibpath_var=LIBPATH
 
4136
  fi
 
4137
  ;;
 
4138
 
 
4139
amigaos*)
 
4140
  case $host_cpu in
 
4141
  powerpc)
 
4142
    # Since July 2007 AmigaOS4 officially supports .so libraries.
 
4143
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
 
4144
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4145
    ;;
 
4146
  m68k)
 
4147
    library_names_spec='$libname.ixlibrary $libname.a'
 
4148
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
4149
    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
 
4150
    ;;
 
4151
  esac
 
4152
  ;;
 
4153
 
 
4154
beos*)
 
4155
  library_names_spec='${libname}${shared_ext}'
 
4156
  dynamic_linker="$host_os ld.so"
 
4157
  shlibpath_var=LIBRARY_PATH
 
4158
  ;;
 
4159
 
 
4160
bsdi[[45]]*)
 
4161
  version_type=linux
 
4162
  need_version=no
 
4163
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4164
  soname_spec='${libname}${release}${shared_ext}$major'
 
4165
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
4166
  shlibpath_var=LD_LIBRARY_PATH
 
4167
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
4168
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
4169
  # the default ld.so.conf also contains /usr/contrib/lib and
 
4170
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
4171
  # libtool to hard-code these into programs
 
4172
  ;;
 
4173
 
 
4174
cygwin* | mingw* | pw32* | cegcc*)
 
4175
  version_type=windows
 
4176
  shrext_cmds=".dll"
 
4177
  need_version=no
 
4178
  need_lib_prefix=no
 
4179
 
 
4180
  case $GCC,$host_os in
 
4181
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
 
4182
    library_names_spec='$libname.dll.a'
 
4183
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
4184
    postinstall_cmds='base_file=`basename \${file}`~
 
4185
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
 
4186
      dldir=$destdir/`dirname \$dlpath`~
 
4187
      test -d \$dldir || mkdir -p \$dldir~
 
4188
      $install_prog $dir/$dlname \$dldir/$dlname~
 
4189
      chmod a+x \$dldir/$dlname~
 
4190
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
 
4191
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
 
4192
      fi'
 
4193
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
4194
      dlpath=$dir/\$dldll~
 
4195
       $RM \$dlpath'
 
4196
    shlibpath_overrides_runpath=yes
 
4197
 
 
4198
    case $host_os in
 
4199
    cygwin*)
 
4200
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
4201
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
4202
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
4203
      ;;
 
4204
    mingw* | cegcc*)
 
4205
      # MinGW DLLs use traditional 'lib' prefix
 
4206
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
4207
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
4208
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
 
4209
        # It is most probably a Windows format PATH printed by
 
4210
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
4211
        # path with ; separators, and with drive letters. We can handle the
 
4212
        # drive letters (cygwin fileutils understands them), so leave them,
 
4213
        # especially as we might pass files found there to a mingw objdump,
 
4214
        # which wouldn't understand a cygwinified path. Ahh.
 
4215
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
4216
      else
 
4217
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
4218
      fi
 
4219
      ;;
 
4220
    pw32*)
 
4221
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
4222
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
4223
      ;;
 
4224
    esac
 
4225
    ;;
 
4226
 
 
4227
  *)
 
4228
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
4229
    ;;
 
4230
  esac
 
4231
  dynamic_linker='Win32 ld.exe'
 
4232
  # FIXME: first we should search . and the directory the executable is in
 
4233
  shlibpath_var=PATH
 
4234
  ;;
 
4235
 
 
4236
darwin* | rhapsody*)
 
4237
  dynamic_linker="$host_os dyld"
 
4238
  version_type=darwin
 
4239
  need_lib_prefix=no
 
4240
  need_version=no
 
4241
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
4242
  soname_spec='${libname}${release}${major}$shared_ext'
 
4243
  shlibpath_overrides_runpath=yes
 
4244
  shlibpath_var=DYLD_LIBRARY_PATH
 
4245
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 
4246
m4_if([$1], [],[
 
4247
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
 
4248
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
4249
  ;;
 
4250
 
 
4251
dgux*)
 
4252
  version_type=linux
 
4253
  need_lib_prefix=no
 
4254
  need_version=no
 
4255
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
4256
  soname_spec='${libname}${release}${shared_ext}$major'
 
4257
  shlibpath_var=LD_LIBRARY_PATH
 
4258
  ;;
 
4259
 
 
4260
freebsd1*)
 
4261
  dynamic_linker=no
 
4262
  ;;
 
4263
 
 
4264
freebsd* | dragonfly*)
 
4265
  # DragonFly does not have aout.  When/if they implement a new
 
4266
  # versioning mechanism, adjust this.
 
4267
  if test -x /usr/bin/objformat; then
 
4268
    objformat=`/usr/bin/objformat`
 
4269
  else
 
4270
    case $host_os in
 
4271
    freebsd[[123]]*) objformat=aout ;;
 
4272
    *) objformat=elf ;;
 
4273
    esac
 
4274
  fi
 
4275
  version_type=freebsd-$objformat
 
4276
  case $version_type in
 
4277
    freebsd-elf*)
 
4278
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
4279
      need_version=no
 
4280
      need_lib_prefix=no
 
4281
      ;;
 
4282
    freebsd-*)
 
4283
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 
4284
      need_version=yes
 
4285
      ;;
 
4286
  esac
 
4287
  shlibpath_var=LD_LIBRARY_PATH
 
4288
  case $host_os in
 
4289
  freebsd2*)
 
4290
    shlibpath_overrides_runpath=yes
 
4291
    ;;
 
4292
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
 
4293
    shlibpath_overrides_runpath=yes
 
4294
    hardcode_into_libs=yes
 
4295
    ;;
 
4296
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
 
4297
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
 
4298
    shlibpath_overrides_runpath=no
 
4299
    hardcode_into_libs=yes
 
4300
    ;;
 
4301
  *) # from 4.6 on, and DragonFly
 
4302
    shlibpath_overrides_runpath=yes
 
4303
    hardcode_into_libs=yes
 
4304
    ;;
 
4305
  esac
 
4306
  ;;
 
4307
 
 
4308
gnu*)
 
4309
  version_type=linux
 
4310
  need_lib_prefix=no
 
4311
  need_version=no
 
4312
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
4313
  soname_spec='${libname}${release}${shared_ext}$major'
 
4314
  shlibpath_var=LD_LIBRARY_PATH
 
4315
  hardcode_into_libs=yes
 
4316
  ;;
 
4317
 
 
4318
hpux9* | hpux10* | hpux11*)
 
4319
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
4320
  # link against other versions.
 
4321
  version_type=sunos
 
4322
  need_lib_prefix=no
 
4323
  need_version=no
 
4324
  case $host_cpu in
 
4325
  ia64*)
 
4326
    shrext_cmds='.so'
 
4327
    hardcode_into_libs=yes
 
4328
    dynamic_linker="$host_os dld.so"
 
4329
    shlibpath_var=LD_LIBRARY_PATH
 
4330
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
4331
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4332
    soname_spec='${libname}${release}${shared_ext}$major'
 
4333
    if test "X$HPUX_IA64_MODE" = X32; then
 
4334
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
4335
    else
 
4336
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
4337
    fi
 
4338
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
4339
    ;;
 
4340
  hppa*64*)
 
4341
    shrext_cmds='.sl'
 
4342
    hardcode_into_libs=yes
 
4343
    dynamic_linker="$host_os dld.sl"
 
4344
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
4345
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
4346
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4347
    soname_spec='${libname}${release}${shared_ext}$major'
 
4348
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
4349
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
4350
    ;;
 
4351
  *)
 
4352
    shrext_cmds='.sl'
 
4353
    dynamic_linker="$host_os dld.sl"
 
4354
    shlibpath_var=SHLIB_PATH
 
4355
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
4356
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4357
    soname_spec='${libname}${release}${shared_ext}$major'
 
4358
    ;;
 
4359
  esac
 
4360
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
4361
  postinstall_cmds='chmod 555 $lib'
 
4362
  ;;
 
4363
 
 
4364
interix[[3-9]]*)
 
4365
  version_type=linux
 
4366
  need_lib_prefix=no
 
4367
  need_version=no
 
4368
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
4369
  soname_spec='${libname}${release}${shared_ext}$major'
 
4370
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
 
4371
  shlibpath_var=LD_LIBRARY_PATH
 
4372
  shlibpath_overrides_runpath=no
 
4373
  hardcode_into_libs=yes
 
4374
  ;;
 
4375
 
 
4376
irix5* | irix6* | nonstopux*)
 
4377
  case $host_os in
 
4378
    nonstopux*) version_type=nonstopux ;;
 
4379
    *)
 
4380
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
4381
                version_type=linux
 
4382
        else
 
4383
                version_type=irix
 
4384
        fi ;;
 
4385
  esac
 
4386
  need_lib_prefix=no
 
4387
  need_version=no
 
4388
  soname_spec='${libname}${release}${shared_ext}$major'
 
4389
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 
4390
  case $host_os in
 
4391
  irix5* | nonstopux*)
 
4392
    libsuff= shlibsuff=
 
4393
    ;;
 
4394
  *)
 
4395
    case $LD in # libtool.m4 will add one of these switches to LD
 
4396
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
4397
      libsuff= shlibsuff= libmagic=32-bit;;
 
4398
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
4399
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
4400
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
4401
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
4402
    *) libsuff= shlibsuff= libmagic=never-match;;
 
4403
    esac
 
4404
    ;;
 
4405
  esac
 
4406
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
4407
  shlibpath_overrides_runpath=no
 
4408
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
4409
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
4410
  hardcode_into_libs=yes
 
4411
  ;;
 
4412
 
 
4413
# No shared lib support for Linux oldld, aout, or coff.
 
4414
linux*oldld* | linux*aout* | linux*coff*)
 
4415
  dynamic_linker=no
 
4416
  ;;
 
4417
 
 
4418
# This must be Linux ELF.
 
4419
linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
4420
  version_type=linux
 
4421
  need_lib_prefix=no
 
4422
  need_version=no
 
4423
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4424
  soname_spec='${libname}${release}${shared_ext}$major'
 
4425
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
4426
  shlibpath_var=LD_LIBRARY_PATH
 
4427
  shlibpath_overrides_runpath=no
 
4428
  # Some binutils ld are patched to set DT_RUNPATH
 
4429
  save_LDFLAGS=$LDFLAGS
 
4430
  save_libdir=$libdir
 
4431
  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
 
4432
       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
 
4433
  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
4434
    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
 
4435
       [shlibpath_overrides_runpath=yes])])
 
4436
  LDFLAGS=$save_LDFLAGS
 
4437
  libdir=$save_libdir
 
4438
 
 
4439
  # This implies no fast_install, which is unacceptable.
 
4440
  # Some rework will be needed to allow for fast_install
 
4441
  # before this can be enabled.
 
4442
  hardcode_into_libs=yes
 
4443
 
 
4444
  # Append ld.so.conf contents to the search path
 
4445
  if test -f /etc/ld.so.conf; then
 
4446
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
 
4447
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
4448
  fi
 
4449
 
 
4450
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
4451
  # powerpc, because MkLinux only supported shared libraries with the
 
4452
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
4453
  # most powerpc-linux boxes support dynamic linking these days and
 
4454
  # people can always --disable-shared, the test was removed, and we
 
4455
  # assume the GNU/Linux dynamic linker is in use.
 
4456
  dynamic_linker='GNU/Linux ld.so'
 
4457
  ;;
 
4458
 
 
4459
netbsdelf*-gnu)
 
4460
  version_type=linux
 
4461
  need_lib_prefix=no
 
4462
  need_version=no
 
4463
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
4464
  soname_spec='${libname}${release}${shared_ext}$major'
 
4465
  shlibpath_var=LD_LIBRARY_PATH
 
4466
  shlibpath_overrides_runpath=no
 
4467
  hardcode_into_libs=yes
 
4468
  dynamic_linker='NetBSD ld.elf_so'
 
4469
  ;;
 
4470
 
 
4471
netbsd*)
 
4472
  version_type=sunos
 
4473
  need_lib_prefix=no
 
4474
  need_version=no
 
4475
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
4476
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
4477
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
4478
    dynamic_linker='NetBSD (a.out) ld.so'
 
4479
  else
 
4480
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
4481
    soname_spec='${libname}${release}${shared_ext}$major'
 
4482
    dynamic_linker='NetBSD ld.elf_so'
 
4483
  fi
 
4484
  shlibpath_var=LD_LIBRARY_PATH
 
4485
  shlibpath_overrides_runpath=yes
 
4486
  hardcode_into_libs=yes
 
4487
  ;;
 
4488
 
 
4489
newsos6)
 
4490
  version_type=linux
 
4491
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4492
  shlibpath_var=LD_LIBRARY_PATH
 
4493
  shlibpath_overrides_runpath=yes
 
4494
  ;;
 
4495
 
 
4496
*nto* | *qnx*)
 
4497
  version_type=qnx
 
4498
  need_lib_prefix=no
 
4499
  need_version=no
 
4500
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4501
  soname_spec='${libname}${release}${shared_ext}$major'
 
4502
  shlibpath_var=LD_LIBRARY_PATH
 
4503
  shlibpath_overrides_runpath=no
 
4504
  hardcode_into_libs=yes
 
4505
  dynamic_linker='ldqnx.so'
 
4506
  ;;
 
4507
 
 
4508
openbsd*)
 
4509
  version_type=sunos
 
4510
  sys_lib_dlsearch_path_spec="/usr/lib"
 
4511
  need_lib_prefix=no
 
4512
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 
4513
  case $host_os in
 
4514
    openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
 
4515
    *)                          need_version=no  ;;
 
4516
  esac
 
4517
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
4518
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
4519
  shlibpath_var=LD_LIBRARY_PATH
 
4520
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
4521
    case $host_os in
 
4522
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
4523
        shlibpath_overrides_runpath=no
 
4524
        ;;
 
4525
      *)
 
4526
        shlibpath_overrides_runpath=yes
 
4527
        ;;
 
4528
      esac
 
4529
  else
 
4530
    shlibpath_overrides_runpath=yes
 
4531
  fi
 
4532
  ;;
 
4533
 
 
4534
os2*)
 
4535
  libname_spec='$name'
 
4536
  shrext_cmds=".dll"
 
4537
  need_lib_prefix=no
 
4538
  library_names_spec='$libname${shared_ext} $libname.a'
 
4539
  dynamic_linker='OS/2 ld.exe'
 
4540
  shlibpath_var=LIBPATH
 
4541
  ;;
 
4542
 
 
4543
osf3* | osf4* | osf5*)
 
4544
  version_type=osf
 
4545
  need_lib_prefix=no
 
4546
  need_version=no
 
4547
  soname_spec='${libname}${release}${shared_ext}$major'
 
4548
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4549
  shlibpath_var=LD_LIBRARY_PATH
 
4550
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
4551
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
4552
  ;;
 
4553
 
 
4554
rdos*)
 
4555
  dynamic_linker=no
 
4556
  ;;
 
4557
 
 
4558
solaris*)
 
4559
  version_type=linux
 
4560
  need_lib_prefix=no
 
4561
  need_version=no
 
4562
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4563
  soname_spec='${libname}${release}${shared_ext}$major'
 
4564
  shlibpath_var=LD_LIBRARY_PATH
 
4565
  shlibpath_overrides_runpath=yes
 
4566
  hardcode_into_libs=yes
 
4567
  # ldd complains unless libraries are executable
 
4568
  postinstall_cmds='chmod +x $lib'
 
4569
  ;;
 
4570
 
 
4571
sunos4*)
 
4572
  version_type=sunos
 
4573
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
4574
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
4575
  shlibpath_var=LD_LIBRARY_PATH
 
4576
  shlibpath_overrides_runpath=yes
 
4577
  if test "$with_gnu_ld" = yes; then
 
4578
    need_lib_prefix=no
 
4579
  fi
 
4580
  need_version=yes
 
4581
  ;;
 
4582
 
 
4583
sysv4 | sysv4.3*)
 
4584
  version_type=linux
 
4585
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4586
  soname_spec='${libname}${release}${shared_ext}$major'
 
4587
  shlibpath_var=LD_LIBRARY_PATH
 
4588
  case $host_vendor in
 
4589
    sni)
 
4590
      shlibpath_overrides_runpath=no
 
4591
      need_lib_prefix=no
 
4592
      runpath_var=LD_RUN_PATH
 
4593
      ;;
 
4594
    siemens)
 
4595
      need_lib_prefix=no
 
4596
      ;;
 
4597
    motorola)
 
4598
      need_lib_prefix=no
 
4599
      need_version=no
 
4600
      shlibpath_overrides_runpath=no
 
4601
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
4602
      ;;
 
4603
  esac
 
4604
  ;;
 
4605
 
 
4606
sysv4*MP*)
 
4607
  if test -d /usr/nec ;then
 
4608
    version_type=linux
 
4609
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
4610
    soname_spec='$libname${shared_ext}.$major'
 
4611
    shlibpath_var=LD_LIBRARY_PATH
 
4612
  fi
 
4613
  ;;
 
4614
 
 
4615
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
4616
  version_type=freebsd-elf
 
4617
  need_lib_prefix=no
 
4618
  need_version=no
 
4619
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
4620
  soname_spec='${libname}${release}${shared_ext}$major'
 
4621
  shlibpath_var=LD_LIBRARY_PATH
 
4622
  shlibpath_overrides_runpath=yes
 
4623
  hardcode_into_libs=yes
 
4624
  if test "$with_gnu_ld" = yes; then
 
4625
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
 
4626
  else
 
4627
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
 
4628
    case $host_os in
 
4629
      sco3.2v5*)
 
4630
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
 
4631
        ;;
 
4632
    esac
 
4633
  fi
 
4634
  sys_lib_dlsearch_path_spec='/usr/lib'
 
4635
  ;;
 
4636
 
 
4637
tpf*)
 
4638
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
 
4639
  version_type=linux
 
4640
  need_lib_prefix=no
 
4641
  need_version=no
 
4642
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4643
  shlibpath_var=LD_LIBRARY_PATH
 
4644
  shlibpath_overrides_runpath=no
 
4645
  hardcode_into_libs=yes
 
4646
  ;;
 
4647
 
 
4648
uts4*)
 
4649
  version_type=linux
 
4650
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
4651
  soname_spec='${libname}${release}${shared_ext}$major'
 
4652
  shlibpath_var=LD_LIBRARY_PATH
 
4653
  ;;
 
4654
 
 
4655
*)
 
4656
  dynamic_linker=no
 
4657
  ;;
 
4658
esac
 
4659
AC_MSG_RESULT([$dynamic_linker])
 
4660
test "$dynamic_linker" = no && can_build_shared=no
 
4661
 
 
4662
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
4663
if test "$GCC" = yes; then
 
4664
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
4665
fi
 
4666
 
 
4667
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
 
4668
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
 
4669
fi
 
4670
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
 
4671
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 
4672
fi
 
4673
 
 
4674
_LT_DECL([], [variables_saved_for_relink], [1],
 
4675
    [Variables whose values should be saved in libtool wrapper scripts and
 
4676
    restored at link time])
 
4677
_LT_DECL([], [need_lib_prefix], [0],
 
4678
    [Do we need the "lib" prefix for modules?])
 
4679
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
 
4680
_LT_DECL([], [version_type], [0], [Library versioning type])
 
4681
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
 
4682
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
 
4683
_LT_DECL([], [shlibpath_overrides_runpath], [0],
 
4684
    [Is shlibpath searched before the hard-coded library search path?])
 
4685
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
 
4686
_LT_DECL([], [library_names_spec], [1],
 
4687
    [[List of archive names.  First name is the real one, the rest are links.
 
4688
    The last name is the one that the linker finds with -lNAME]])
 
4689
_LT_DECL([], [soname_spec], [1],
 
4690
    [[The coded name of the library, if different from the real name]])
 
4691
_LT_DECL([], [postinstall_cmds], [2],
 
4692
    [Command to use after installation of a shared archive])
 
4693
_LT_DECL([], [postuninstall_cmds], [2],
 
4694
    [Command to use after uninstallation of a shared archive])
 
4695
_LT_DECL([], [finish_cmds], [2],
 
4696
    [Commands used to finish a libtool library installation in a directory])
 
4697
_LT_DECL([], [finish_eval], [1],
 
4698
    [[As "finish_cmds", except a single script fragment to be evaled but
 
4699
    not shown]])
 
4700
_LT_DECL([], [hardcode_into_libs], [0],
 
4701
    [Whether we should hardcode library paths into libraries])
 
4702
_LT_DECL([], [sys_lib_search_path_spec], [2],
 
4703
    [Compile-time system search path for libraries])
 
4704
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
 
4705
    [Run-time system search path for libraries])
 
4706
])# _LT_SYS_DYNAMIC_LINKER
 
4707
 
 
4708
 
 
4709
# _LT_PATH_TOOL_PREFIX(TOOL)
 
4710
# --------------------------
 
4711
# find a file program which can recognize shared library
 
4712
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
 
4713
[m4_require([_LT_DECL_EGREP])dnl
 
4714
AC_MSG_CHECKING([for $1])
 
4715
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
4716
[case $MAGIC_CMD in
 
4717
[[\\/*] |  ?:[\\/]*])
 
4718
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
4719
  ;;
 
4720
*)
 
4721
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
4722
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
4723
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
4724
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
4725
dnl not every word.  This closes a longstanding sh security hole.
 
4726
  ac_dummy="m4_if([$2], , $PATH, [$2])"
 
4727
  for ac_dir in $ac_dummy; do
 
4728
    IFS="$lt_save_ifs"
 
4729
    test -z "$ac_dir" && ac_dir=.
 
4730
    if test -f $ac_dir/$1; then
 
4731
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
4732
      if test -n "$file_magic_test_file"; then
 
4733
        case $deplibs_check_method in
 
4734
        "file_magic "*)
 
4735
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 
4736
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
4737
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
4738
            $EGREP "$file_magic_regex" > /dev/null; then
 
4739
            :
 
4740
          else
 
4741
            cat <<_LT_EOF 1>&2
 
4742
 
 
4743
*** Warning: the command libtool uses to detect shared libraries,
 
4744
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
4745
*** The result is that libtool may fail to recognize shared libraries
 
4746
*** as such.  This will affect the creation of libtool libraries that
 
4747
*** depend on shared libraries, but programs linked with such libtool
 
4748
*** libraries will work regardless of this problem.  Nevertheless, you
 
4749
*** may want to report the problem to your system manager and/or to
 
4750
*** bug-libtool@gnu.org
 
4751
 
 
4752
_LT_EOF
 
4753
          fi ;;
 
4754
        esac
 
4755
      fi
 
4756
      break
 
4757
    fi
 
4758
  done
 
4759
  IFS="$lt_save_ifs"
 
4760
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
4761
  ;;
 
4762
esac])
 
4763
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
4764
if test -n "$MAGIC_CMD"; then
 
4765
  AC_MSG_RESULT($MAGIC_CMD)
 
4766
else
 
4767
  AC_MSG_RESULT(no)
 
4768
fi
 
4769
_LT_DECL([], [MAGIC_CMD], [0],
 
4770
         [Used to examine libraries when file_magic_cmd begins with "file"])dnl
 
4771
])# _LT_PATH_TOOL_PREFIX
 
4772
 
 
4773
# Old name:
 
4774
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
 
4775
dnl aclocal-1.4 backwards compatibility:
 
4776
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
4777
 
 
4778
 
 
4779
# _LT_PATH_MAGIC
 
4780
# --------------
 
4781
# find a file program which can recognize a shared library
 
4782
m4_defun([_LT_PATH_MAGIC],
 
4783
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
4784
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
4785
  if test -n "$ac_tool_prefix"; then
 
4786
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
4787
  else
 
4788
    MAGIC_CMD=:
 
4789
  fi
 
4790
fi
 
4791
])# _LT_PATH_MAGIC
 
4792
 
 
4793
 
 
4794
# LT_PATH_LD
 
4795
# ----------
 
4796
# find the pathname to the GNU or non-GNU linker
 
4797
AC_DEFUN([LT_PATH_LD],
 
4798
[AC_REQUIRE([AC_PROG_CC])dnl
 
4799
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
4800
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
4801
m4_require([_LT_DECL_SED])dnl
 
4802
m4_require([_LT_DECL_EGREP])dnl
 
4803
 
 
4804
AC_ARG_WITH([gnu-ld],
 
4805
    [AS_HELP_STRING([--with-gnu-ld],
 
4806
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
4807
    [test "$withval" = no || with_gnu_ld=yes],
 
4808
    [with_gnu_ld=no])dnl
 
4809
 
 
4810
ac_prog=ld
 
4811
if test "$GCC" = yes; then
 
4812
  # Check if gcc -print-prog-name=ld gives a path.
 
4813
  AC_MSG_CHECKING([for ld used by $CC])
 
4814
  case $host in
 
4815
  *-*-mingw*)
 
4816
    # gcc leaves a trailing carriage return which upsets mingw
 
4817
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
4818
  *)
 
4819
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
4820
  esac
 
4821
  case $ac_prog in
 
4822
    # Accept absolute paths.
 
4823
    [[\\/]]* | ?:[[\\/]]*)
 
4824
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
4825
      # Canonicalize the pathname of ld
 
4826
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
 
4827
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 
4828
        ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
 
4829
      done
 
4830
      test -z "$LD" && LD="$ac_prog"
 
4831
      ;;
 
4832
  "")
 
4833
    # If it fails, then pretend we aren't using GCC.
 
4834
    ac_prog=ld
 
4835
    ;;
 
4836
  *)
 
4837
    # If it is relative, then search for the first ld in PATH.
 
4838
    with_gnu_ld=unknown
 
4839
    ;;
 
4840
  esac
 
4841
elif test "$with_gnu_ld" = yes; then
 
4842
  AC_MSG_CHECKING([for GNU ld])
 
4843
else
 
4844
  AC_MSG_CHECKING([for non-GNU ld])
 
4845
fi
 
4846
AC_CACHE_VAL(lt_cv_path_LD,
 
4847
[if test -z "$LD"; then
 
4848
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
4849
  for ac_dir in $PATH; do
 
4850
    IFS="$lt_save_ifs"
 
4851
    test -z "$ac_dir" && ac_dir=.
 
4852
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
4853
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
4854
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
4855
      # but apparently some variants of GNU ld only accept -v.
 
4856
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
4857
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
4858
      *GNU* | *'with BFD'*)
 
4859
        test "$with_gnu_ld" != no && break
 
4860
        ;;
 
4861
      *)
 
4862
        test "$with_gnu_ld" != yes && break
 
4863
        ;;
 
4864
      esac
 
4865
    fi
 
4866
  done
 
4867
  IFS="$lt_save_ifs"
 
4868
else
 
4869
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
4870
fi])
 
4871
LD="$lt_cv_path_LD"
 
4872
if test -n "$LD"; then
 
4873
  AC_MSG_RESULT($LD)
 
4874
else
 
4875
  AC_MSG_RESULT(no)
 
4876
fi
 
4877
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
4878
_LT_PATH_LD_GNU
 
4879
AC_SUBST([LD])
 
4880
 
 
4881
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
 
4882
])# LT_PATH_LD
 
4883
 
 
4884
# Old names:
 
4885
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
 
4886
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
 
4887
dnl aclocal-1.4 backwards compatibility:
 
4888
dnl AC_DEFUN([AM_PROG_LD], [])
 
4889
dnl AC_DEFUN([AC_PROG_LD], [])
 
4890
 
 
4891
 
 
4892
# _LT_PATH_LD_GNU
 
4893
#- --------------
 
4894
m4_defun([_LT_PATH_LD_GNU],
 
4895
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
4896
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 
4897
case `$LD -v 2>&1 </dev/null` in
 
4898
*GNU* | *'with BFD'*)
 
4899
  lt_cv_prog_gnu_ld=yes
 
4900
  ;;
 
4901
*)
 
4902
  lt_cv_prog_gnu_ld=no
 
4903
  ;;
 
4904
esac])
 
4905
with_gnu_ld=$lt_cv_prog_gnu_ld
 
4906
])# _LT_PATH_LD_GNU
 
4907
 
 
4908
 
 
4909
# _LT_CMD_RELOAD
 
4910
# --------------
 
4911
# find reload flag for linker
 
4912
#   -- PORTME Some linkers may need a different reload flag.
 
4913
m4_defun([_LT_CMD_RELOAD],
 
4914
[AC_CACHE_CHECK([for $LD option to reload object files],
 
4915
  lt_cv_ld_reload_flag,
 
4916
  [lt_cv_ld_reload_flag='-r'])
 
4917
reload_flag=$lt_cv_ld_reload_flag
 
4918
case $reload_flag in
 
4919
"" | " "*) ;;
 
4920
*) reload_flag=" $reload_flag" ;;
 
4921
esac
 
4922
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
4923
case $host_os in
 
4924
  darwin*)
 
4925
    if test "$GCC" = yes; then
 
4926
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
 
4927
    else
 
4928
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
4929
    fi
 
4930
    ;;
 
4931
esac
 
4932
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
 
4933
_LT_DECL([], [reload_cmds], [2])dnl
 
4934
])# _LT_CMD_RELOAD
 
4935
 
 
4936
 
 
4937
# _LT_CHECK_MAGIC_METHOD
 
4938
# ----------------------
 
4939
# how to check for library dependencies
 
4940
#  -- PORTME fill in with the dynamic library characteristics
 
4941
m4_defun([_LT_CHECK_MAGIC_METHOD],
 
4942
[m4_require([_LT_DECL_EGREP])
 
4943
m4_require([_LT_DECL_OBJDUMP])
 
4944
AC_CACHE_CHECK([how to recognize dependent libraries],
 
4945
lt_cv_deplibs_check_method,
 
4946
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
4947
lt_cv_file_magic_test_file=
 
4948
lt_cv_deplibs_check_method='unknown'
 
4949
# Need to set the preceding variable on all platforms that support
 
4950
# interlibrary dependencies.
 
4951
# 'none' -- dependencies not supported.
 
4952
# `unknown' -- same as none, but documents that we really don't know.
 
4953
# 'pass_all' -- all dependencies passed with no checks.
 
4954
# 'test_compile' -- check by making test program.
 
4955
# 'file_magic [[regex]]' -- check by looking for files in library path
 
4956
# which responds to the $file_magic_cmd with a given extended regex.
 
4957
# If you have `file' or equivalent on your system and you're not sure
 
4958
# whether `pass_all' will *always* work, you probably want this one.
 
4959
 
 
4960
case $host_os in
 
4961
aix[[4-9]]*)
 
4962
  lt_cv_deplibs_check_method=pass_all
 
4963
  ;;
 
4964
 
 
4965
beos*)
 
4966
  lt_cv_deplibs_check_method=pass_all
 
4967
  ;;
 
4968
 
 
4969
bsdi[[45]]*)
 
4970
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
4971
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
4972
  lt_cv_file_magic_test_file=/shlib/libc.so
 
4973
  ;;
 
4974
 
 
4975
cygwin*)
 
4976
  # func_win32_libid is a shell function defined in ltmain.sh
 
4977
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
4978
  lt_cv_file_magic_cmd='func_win32_libid'
 
4979
  ;;
 
4980
 
 
4981
mingw* | pw32*)
 
4982
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
4983
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
 
4984
  # unless we find 'file', for example because we are cross-compiling.
 
4985
  if ( file / ) >/dev/null 2>&1; then
 
4986
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
4987
    lt_cv_file_magic_cmd='func_win32_libid'
 
4988
  else
 
4989
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
4990
    lt_cv_file_magic_cmd='$OBJDUMP -f'
 
4991
  fi
 
4992
  ;;
 
4993
 
 
4994
cegcc)
 
4995
  # use the weaker test based on 'objdump'. See mingw*.
 
4996
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
 
4997
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
4998
  ;;
 
4999
 
 
5000
darwin* | rhapsody*)
 
5001
  lt_cv_deplibs_check_method=pass_all
 
5002
  ;;
 
5003
 
 
5004
freebsd* | dragonfly*)
 
5005
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
5006
    case $host_cpu in
 
5007
    i*86 )
 
5008
      # Not sure whether the presence of OpenBSD here was a mistake.
 
5009
      # Let's accept both of them until this is cleared up.
 
5010
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
 
5011
      lt_cv_file_magic_cmd=/usr/bin/file
 
5012
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
5013
      ;;
 
5014
    esac
 
5015
  else
 
5016
    lt_cv_deplibs_check_method=pass_all
 
5017
  fi
 
5018
  ;;
 
5019
 
 
5020
gnu*)
 
5021
  lt_cv_deplibs_check_method=pass_all
 
5022
  ;;
 
5023
 
 
5024
hpux10.20* | hpux11*)
 
5025
  lt_cv_file_magic_cmd=/usr/bin/file
 
5026
  case $host_cpu in
 
5027
  ia64*)
 
5028
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
5029
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
5030
    ;;
 
5031
  hppa*64*)
 
5032
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
 
5033
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
5034
    ;;
 
5035
  *)
 
5036
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
5037
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
5038
    ;;
 
5039
  esac
 
5040
  ;;
 
5041
 
 
5042
interix[[3-9]]*)
 
5043
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
 
5044
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
 
5045
  ;;
 
5046
 
 
5047
irix5* | irix6* | nonstopux*)
 
5048
  case $LD in
 
5049
  *-32|*"-32 ") libmagic=32-bit;;
 
5050
  *-n32|*"-n32 ") libmagic=N32;;
 
5051
  *-64|*"-64 ") libmagic=64-bit;;
 
5052
  *) libmagic=never-match;;
 
5053
  esac
 
5054
  lt_cv_deplibs_check_method=pass_all
 
5055
  ;;
 
5056
 
 
5057
# This must be Linux ELF.
 
5058
linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
5059
  lt_cv_deplibs_check_method=pass_all
 
5060
  ;;
 
5061
 
 
5062
netbsd* | netbsdelf*-gnu)
 
5063
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
5064
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
5065
  else
 
5066
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
5067
  fi
 
5068
  ;;
 
5069
 
 
5070
newos6*)
 
5071
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
5072
  lt_cv_file_magic_cmd=/usr/bin/file
 
5073
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
5074
  ;;
 
5075
 
 
5076
*nto* | *qnx*)
 
5077
  lt_cv_deplibs_check_method=pass_all
 
5078
  ;;
 
5079
 
 
5080
openbsd*)
 
5081
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
5082
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
 
5083
  else
 
5084
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
5085
  fi
 
5086
  ;;
 
5087
 
 
5088
osf3* | osf4* | osf5*)
 
5089
  lt_cv_deplibs_check_method=pass_all
 
5090
  ;;
 
5091
 
 
5092
rdos*)
 
5093
  lt_cv_deplibs_check_method=pass_all
 
5094
  ;;
 
5095
 
 
5096
solaris*)
 
5097
  lt_cv_deplibs_check_method=pass_all
 
5098
  ;;
 
5099
 
 
5100
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
5101
  lt_cv_deplibs_check_method=pass_all
 
5102
  ;;
 
5103
 
 
5104
sysv4 | sysv4.3*)
 
5105
  case $host_vendor in
 
5106
  motorola)
 
5107
    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]]'
 
5108
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
5109
    ;;
 
5110
  ncr)
 
5111
    lt_cv_deplibs_check_method=pass_all
 
5112
    ;;
 
5113
  sequent)
 
5114
    lt_cv_file_magic_cmd='/bin/file'
 
5115
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
5116
    ;;
 
5117
  sni)
 
5118
    lt_cv_file_magic_cmd='/bin/file'
 
5119
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
5120
    lt_cv_file_magic_test_file=/lib/libc.so
 
5121
    ;;
 
5122
  siemens)
 
5123
    lt_cv_deplibs_check_method=pass_all
 
5124
    ;;
 
5125
  pc)
 
5126
    lt_cv_deplibs_check_method=pass_all
 
5127
    ;;
 
5128
  esac
 
5129
  ;;
 
5130
 
 
5131
tpf*)
 
5132
  lt_cv_deplibs_check_method=pass_all
 
5133
  ;;
 
5134
esac
 
5135
])
 
5136
file_magic_cmd=$lt_cv_file_magic_cmd
 
5137
deplibs_check_method=$lt_cv_deplibs_check_method
 
5138
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
5139
 
 
5140
_LT_DECL([], [deplibs_check_method], [1],
 
5141
    [Method to check whether dependent libraries are shared objects])
 
5142
_LT_DECL([], [file_magic_cmd], [1],
 
5143
    [Command to use when deplibs_check_method == "file_magic"])
 
5144
])# _LT_CHECK_MAGIC_METHOD
 
5145
 
 
5146
 
 
5147
# LT_PATH_NM
 
5148
# ----------
 
5149
# find the pathname to a BSD- or MS-compatible name lister
 
5150
AC_DEFUN([LT_PATH_NM],
 
5151
[AC_REQUIRE([AC_PROG_CC])dnl
 
5152
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 
5153
[if test -n "$NM"; then
 
5154
  # Let the user override the test.
 
5155
  lt_cv_path_NM="$NM"
 
5156
else
 
5157
  lt_nm_to_check="${ac_tool_prefix}nm"
 
5158
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
 
5159
    lt_nm_to_check="$lt_nm_to_check nm"
 
5160
  fi
 
5161
  for lt_tmp_nm in $lt_nm_to_check; do
 
5162
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
5163
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
 
5164
      IFS="$lt_save_ifs"
 
5165
      test -z "$ac_dir" && ac_dir=.
 
5166
      tmp_nm="$ac_dir/$lt_tmp_nm"
 
5167
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
5168
        # Check to see if the nm accepts a BSD-compat flag.
 
5169
        # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
5170
        #   nm: unknown option "B" ignored
 
5171
        # Tru64's nm complains that /dev/null is an invalid object file
 
5172
        case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
5173
        */dev/null* | *'Invalid file or object type'*)
 
5174
          lt_cv_path_NM="$tmp_nm -B"
 
5175
          break
 
5176
          ;;
 
5177
        *)
 
5178
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
5179
          */dev/null*)
 
5180
            lt_cv_path_NM="$tmp_nm -p"
 
5181
            break
 
5182
            ;;
 
5183
          *)
 
5184
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
5185
            continue # so that we can try to find one that supports BSD flags
 
5186
            ;;
 
5187
          esac
 
5188
          ;;
 
5189
        esac
 
5190
      fi
 
5191
    done
 
5192
    IFS="$lt_save_ifs"
 
5193
  done
 
5194
  : ${lt_cv_path_NM=no}
 
5195
fi])
 
5196
if test "$lt_cv_path_NM" != "no"; then
 
5197
  NM="$lt_cv_path_NM"
 
5198
else
 
5199
  # Didn't find any BSD compatible name lister, look for dumpbin.
 
5200
  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
 
5201
  AC_SUBST([DUMPBIN])
 
5202
  if test "$DUMPBIN" != ":"; then
 
5203
    NM="$DUMPBIN"
 
5204
  fi
 
5205
fi
 
5206
test -z "$NM" && NM=nm
 
5207
AC_SUBST([NM])
 
5208
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
 
5209
 
 
5210
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
 
5211
  [lt_cv_nm_interface="BSD nm"
 
5212
  echo "int some_variable = 0;" > conftest.$ac_ext
 
5213
  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
 
5214
  (eval "$ac_compile" 2>conftest.err)
 
5215
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
5216
  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
 
5217
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
 
5218
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
5219
  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
 
5220
  cat conftest.out >&AS_MESSAGE_LOG_FD
 
5221
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
 
5222
    lt_cv_nm_interface="MS dumpbin"
 
5223
  fi
 
5224
  rm -f conftest*])
 
5225
])# LT_PATH_NM
 
5226
 
 
5227
# Old names:
 
5228
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
 
5229
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
 
5230
dnl aclocal-1.4 backwards compatibility:
 
5231
dnl AC_DEFUN([AM_PROG_NM], [])
 
5232
dnl AC_DEFUN([AC_PROG_NM], [])
 
5233
 
 
5234
 
 
5235
# LT_LIB_M
 
5236
# --------
 
5237
# check for math library
 
5238
AC_DEFUN([LT_LIB_M],
 
5239
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
5240
LIBM=
 
5241
case $host in
 
5242
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
5243
  # These system don't have libm, or don't need it
 
5244
  ;;
 
5245
*-ncr-sysv4.3*)
 
5246
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
5247
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
5248
  ;;
 
5249
*)
 
5250
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
5251
  ;;
 
5252
esac
 
5253
AC_SUBST([LIBM])
 
5254
])# LT_LIB_M
 
5255
 
 
5256
# Old name:
 
5257
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
 
5258
dnl aclocal-1.4 backwards compatibility:
 
5259
dnl AC_DEFUN([AC_CHECK_LIBM], [])
 
5260
 
 
5261
 
 
5262
# _LT_COMPILER_NO_RTTI([TAGNAME])
 
5263
# -------------------------------
 
5264
m4_defun([_LT_COMPILER_NO_RTTI],
 
5265
[m4_require([_LT_TAG_COMPILER])dnl
 
5266
 
 
5267
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
5268
 
 
5269
if test "$GCC" = yes; then
 
5270
  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
5271
 
 
5272
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
5273
    lt_cv_prog_compiler_rtti_exceptions,
 
5274
    [-fno-rtti -fno-exceptions], [],
 
5275
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
5276
fi
 
5277
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
 
5278
        [Compiler flag to turn off builtin functions])
 
5279
])# _LT_COMPILER_NO_RTTI
 
5280
 
 
5281
 
 
5282
# _LT_CMD_GLOBAL_SYMBOLS
 
5283
# ----------------------
 
5284
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
 
5285
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
5286
AC_REQUIRE([AC_PROG_CC])dnl
 
5287
AC_REQUIRE([LT_PATH_NM])dnl
 
5288
AC_REQUIRE([LT_PATH_LD])dnl
 
5289
m4_require([_LT_DECL_SED])dnl
 
5290
m4_require([_LT_DECL_EGREP])dnl
 
5291
m4_require([_LT_TAG_COMPILER])dnl
 
5292
 
 
5293
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
5294
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
5295
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
5296
[
 
5297
# These are sane defaults that work on at least a few old systems.
 
5298
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
5299
 
 
5300
# Character class describing NM global symbol codes.
 
5301
symcode='[[BCDEGRST]]'
 
5302
 
 
5303
# Regexp to match symbols that can be accessed directly from C.
 
5304
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
5305
 
 
5306
# Define system-specific variables.
 
5307
case $host_os in
 
5308
aix*)
 
5309
  symcode='[[BCDT]]'
 
5310
  ;;
 
5311
cygwin* | mingw* | pw32* | cegcc*)
 
5312
  symcode='[[ABCDGISTW]]'
 
5313
  ;;
 
5314
hpux*)
 
5315
  if test "$host_cpu" = ia64; then
 
5316
    symcode='[[ABCDEGRST]]'
 
5317
  fi
 
5318
  ;;
 
5319
irix* | nonstopux*)
 
5320
  symcode='[[BCDEGRST]]'
 
5321
  ;;
 
5322
osf*)
 
5323
  symcode='[[BCDEGQRST]]'
 
5324
  ;;
 
5325
solaris*)
 
5326
  symcode='[[BDRT]]'
 
5327
  ;;
 
5328
sco3.2v5*)
 
5329
  symcode='[[DT]]'
 
5330
  ;;
 
5331
sysv4.2uw2*)
 
5332
  symcode='[[DT]]'
 
5333
  ;;
 
5334
sysv5* | sco5v6* | unixware* | OpenUNIX*)
 
5335
  symcode='[[ABDT]]'
 
5336
  ;;
 
5337
sysv4)
 
5338
  symcode='[[DFNSTU]]'
 
5339
  ;;
 
5340
esac
 
5341
 
 
5342
# If we're using GNU nm, then use its standard symbol codes.
 
5343
case `$NM -V 2>&1` in
 
5344
*GNU* | *'with BFD'*)
 
5345
  symcode='[[ABCDGIRSTW]]' ;;
 
5346
esac
 
5347
 
 
5348
# Transform an extracted symbol line into a proper C declaration.
 
5349
# Some systems (esp. on ia64) link data and code symbols differently,
 
5350
# so use this general approach.
 
5351
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
5352
 
 
5353
# Transform an extracted symbol line into symbol name and symbol address
 
5354
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
 
5355
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'"
 
5356
 
 
5357
# Handle CRLF in mingw tool chain
 
5358
opt_cr=
 
5359
case $build_os in
 
5360
mingw*)
 
5361
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
5362
  ;;
 
5363
esac
 
5364
 
 
5365
# Try without a prefix underscore, then with it.
 
5366
for ac_symprfx in "" "_"; do
 
5367
 
 
5368
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
 
5369
  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
5370
 
 
5371
  # Write the raw and C identifiers.
 
5372
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
 
5373
    # Fake it for dumpbin and say T for any non-static function
 
5374
    # and D for any global variable.
 
5375
    # Also find C++ and __fastcall symbols from MSVC++,
 
5376
    # which start with @ or ?.
 
5377
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
 
5378
"     {last_section=section; section=\$ 3};"\
 
5379
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 
5380
"     \$ 0!~/External *\|/{next};"\
 
5381
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 
5382
"     {if(hide[section]) next};"\
 
5383
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
 
5384
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
 
5385
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
 
5386
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
 
5387
"     ' prfx=^$ac_symprfx]"
 
5388
  else
 
5389
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
5390
  fi
 
5391
 
 
5392
  # Check to see that the pipe works correctly.
 
5393
  pipe_works=no
 
5394
 
 
5395
  rm -f conftest*
 
5396
  cat > conftest.$ac_ext <<_LT_EOF
 
5397
#ifdef __cplusplus
 
5398
extern "C" {
 
5399
#endif
 
5400
char nm_test_var;
 
5401
void nm_test_func(void);
 
5402
void nm_test_func(void){}
 
5403
#ifdef __cplusplus
 
5404
}
 
5405
#endif
 
5406
int main(){nm_test_var='a';nm_test_func();return(0);}
 
5407
_LT_EOF
 
5408
 
 
5409
  if AC_TRY_EVAL(ac_compile); then
 
5410
    # Now try to grab the symbols.
 
5411
    nlist=conftest.nm
 
5412
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
5413
      # Try sorting and uniquifying the output.
 
5414
      if sort "$nlist" | uniq > "$nlist"T; then
 
5415
        mv -f "$nlist"T "$nlist"
 
5416
      else
 
5417
        rm -f "$nlist"T
 
5418
      fi
 
5419
 
 
5420
      # Make sure that we snagged all the symbols we need.
 
5421
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 
5422
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 
5423
          cat <<_LT_EOF > conftest.$ac_ext
 
5424
#ifdef __cplusplus
 
5425
extern "C" {
 
5426
#endif
 
5427
 
 
5428
_LT_EOF
 
5429
          # Now generate the symbol file.
 
5430
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
5431
 
 
5432
          cat <<_LT_EOF >> conftest.$ac_ext
 
5433
 
 
5434
/* The mapping between symbol names and symbols.  */
 
5435
const struct {
 
5436
  const char *name;
 
5437
  void       *address;
 
5438
}
 
5439
lt__PROGRAM__LTX_preloaded_symbols[[]] =
 
5440
{
 
5441
  { "@PROGRAM@", (void *) 0 },
 
5442
_LT_EOF
 
5443
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 
5444
          cat <<\_LT_EOF >> conftest.$ac_ext
 
5445
  {0, (void *) 0}
 
5446
};
 
5447
 
 
5448
/* This works around a problem in FreeBSD linker */
 
5449
#ifdef FREEBSD_WORKAROUND
 
5450
static const void *lt_preloaded_setup() {
 
5451
  return lt__PROGRAM__LTX_preloaded_symbols;
 
5452
}
 
5453
#endif
 
5454
 
 
5455
#ifdef __cplusplus
 
5456
}
 
5457
#endif
 
5458
_LT_EOF
 
5459
          # Now try linking the two files.
 
5460
          mv conftest.$ac_objext conftstm.$ac_objext
 
5461
          lt_save_LIBS="$LIBS"
 
5462
          lt_save_CFLAGS="$CFLAGS"
 
5463
          LIBS="conftstm.$ac_objext"
 
5464
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
5465
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
5466
            pipe_works=yes
 
5467
          fi
 
5468
          LIBS="$lt_save_LIBS"
 
5469
          CFLAGS="$lt_save_CFLAGS"
 
5470
        else
 
5471
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
5472
        fi
 
5473
      else
 
5474
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
5475
      fi
 
5476
    else
 
5477
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
5478
    fi
 
5479
  else
 
5480
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
5481
    cat conftest.$ac_ext >&5
 
5482
  fi
 
5483
  rm -rf conftest* conftst*
 
5484
 
 
5485
  # Do not use the global_symbol_pipe unless it works.
 
5486
  if test "$pipe_works" = yes; then
 
5487
    break
 
5488
  else
 
5489
    lt_cv_sys_global_symbol_pipe=
 
5490
  fi
 
5491
done
 
5492
])
 
5493
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
5494
  lt_cv_sys_global_symbol_to_cdecl=
 
5495
fi
 
5496
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
5497
  AC_MSG_RESULT(failed)
 
5498
else
 
5499
  AC_MSG_RESULT(ok)
 
5500
fi
 
5501
 
 
5502
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
 
5503
    [Take the output of nm and produce a listing of raw symbols and C names])
 
5504
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
 
5505
    [Transform the output of nm in a proper C declaration])
 
5506
_LT_DECL([global_symbol_to_c_name_address],
 
5507
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
 
5508
    [Transform the output of nm in a C name address pair])
 
5509
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
 
5510
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
 
5511
    [Transform the output of nm in a C name address pair when lib prefix is needed])
 
5512
]) # _LT_CMD_GLOBAL_SYMBOLS
 
5513
 
 
5514
 
 
5515
# _LT_COMPILER_PIC([TAGNAME])
 
5516
# ---------------------------
 
5517
m4_defun([_LT_COMPILER_PIC],
 
5518
[m4_require([_LT_TAG_COMPILER])dnl
 
5519
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
 
5520
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5521
_LT_TAGVAR(lt_prog_compiler_static, $1)=
 
5522
 
 
5523
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
5524
m4_if([$1], [CXX], [
 
5525
  # C++ specific cases for pic, static, wl, etc.
 
5526
  if test "$GXX" = yes; then
 
5527
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5528
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5529
 
 
5530
    case $host_os in
 
5531
    aix*)
 
5532
      # All AIX code is PIC.
 
5533
      if test "$host_cpu" = ia64; then
 
5534
        # AIX 5 now supports IA64 processor
 
5535
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5536
      fi
 
5537
      ;;
 
5538
 
 
5539
    amigaos*)
 
5540
      case $host_cpu in
 
5541
      powerpc)
 
5542
            # see comment about AmigaOS4 .so support
 
5543
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5544
        ;;
 
5545
      m68k)
 
5546
            # FIXME: we need at least 68020 code to build shared libraries, but
 
5547
            # adding the `-m68020' flag to GCC prevents building anything better,
 
5548
            # like `-m68040'.
 
5549
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
5550
        ;;
 
5551
      esac
 
5552
      ;;
 
5553
 
 
5554
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
5555
      # PIC is the default for these OSes.
 
5556
      ;;
 
5557
    mingw* | cygwin* | os2* | pw32* | cegcc*)
 
5558
      # This hack is so that the source file can tell whether it is being
 
5559
      # built for inclusion in a dll (and should export symbols for example).
 
5560
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
5561
      # (--disable-auto-import) libraries
 
5562
      m4_if([$1], [GCJ], [],
 
5563
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
5564
      ;;
 
5565
    darwin* | rhapsody*)
 
5566
      # PIC is the default on this platform
 
5567
      # Common symbols not allowed in MH_DYLIB files
 
5568
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
5569
      ;;
 
5570
    *djgpp*)
 
5571
      # DJGPP does not support shared libraries at all
 
5572
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5573
      ;;
 
5574
    interix[[3-9]]*)
 
5575
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
5576
      # Instead, we relocate shared libraries at runtime.
 
5577
      ;;
 
5578
    sysv4*MP*)
 
5579
      if test -d /usr/nec; then
 
5580
        _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
5581
      fi
 
5582
      ;;
 
5583
    hpux*)
 
5584
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
 
5585
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
 
5586
      # sets the default TLS model and affects inlining.
 
5587
      case $host_cpu in
 
5588
      hppa*64*)
 
5589
        ;;
 
5590
      *)
 
5591
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5592
        ;;
 
5593
      esac
 
5594
      ;;
 
5595
    *qnx* | *nto*)
 
5596
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
5597
      # it will coredump.
 
5598
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
5599
      ;;
 
5600
    *)
 
5601
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5602
      ;;
 
5603
    esac
 
5604
  else
 
5605
    case $host_os in
 
5606
      aix[[4-9]]*)
 
5607
        # All AIX code is PIC.
 
5608
        if test "$host_cpu" = ia64; then
 
5609
          # AIX 5 now supports IA64 processor
 
5610
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5611
        else
 
5612
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
5613
        fi
 
5614
        ;;
 
5615
      chorus*)
 
5616
        case $cc_basename in
 
5617
        cxch68*)
 
5618
          # Green Hills C++ Compiler
 
5619
          # _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"
 
5620
          ;;
 
5621
        esac
 
5622
        ;;
 
5623
      dgux*)
 
5624
        case $cc_basename in
 
5625
          ec++*)
 
5626
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5627
            ;;
 
5628
          ghcx*)
 
5629
            # Green Hills C++ Compiler
 
5630
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5631
            ;;
 
5632
          *)
 
5633
            ;;
 
5634
        esac
 
5635
        ;;
 
5636
      freebsd* | dragonfly*)
 
5637
        # FreeBSD uses GNU C++
 
5638
        ;;
 
5639
      hpux9* | hpux10* | hpux11*)
 
5640
        case $cc_basename in
 
5641
          CC*)
 
5642
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5643
            _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5644
            if test "$host_cpu" != ia64; then
 
5645
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5646
            fi
 
5647
            ;;
 
5648
          aCC*)
 
5649
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5650
            _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5651
            case $host_cpu in
 
5652
            hppa*64*|ia64*)
 
5653
              # +Z the default
 
5654
              ;;
 
5655
            *)
 
5656
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5657
              ;;
 
5658
            esac
 
5659
            ;;
 
5660
          *)
 
5661
            ;;
 
5662
        esac
 
5663
        ;;
 
5664
      interix*)
 
5665
        # This is c89, which is MS Visual C++ (no shared libs)
 
5666
        # Anyone wants to do a port?
 
5667
        ;;
 
5668
      irix5* | irix6* | nonstopux*)
 
5669
        case $cc_basename in
 
5670
          CC*)
 
5671
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5672
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5673
            # CC pic flag -KPIC is the default.
 
5674
            ;;
 
5675
          *)
 
5676
            ;;
 
5677
        esac
 
5678
        ;;
 
5679
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
5680
        case $cc_basename in
 
5681
          KCC*)
 
5682
            # KAI C++ Compiler
 
5683
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
5684
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5685
            ;;
 
5686
          ecpc* )
 
5687
            # old Intel C++ for x86_64 which still supported -KPIC.
 
5688
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5689
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5690
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5691
            ;;
 
5692
          icpc* )
 
5693
            # Intel C++, used to be incompatible with GCC.
 
5694
            # ICC 10 doesn't accept -KPIC any more.
 
5695
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5696
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5697
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5698
            ;;
 
5699
          pgCC* | pgcpp*)
 
5700
            # Portland Group C++ compiler
 
5701
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5702
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5703
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5704
            ;;
 
5705
          cxx*)
 
5706
            # Compaq C++
 
5707
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
5708
            # Linux and Compaq Tru64 Unix objects are PIC.
 
5709
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5710
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5711
            ;;
 
5712
          xlc* | xlC*)
 
5713
            # IBM XL 8.0 on PPC
 
5714
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5715
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 
5716
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 
5717
            ;;
 
5718
          *)
 
5719
            case `$CC -V 2>&1 | sed 5q` in
 
5720
            *Sun\ C*)
 
5721
              # Sun C++ 5.9
 
5722
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5723
              _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5724
              _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5725
              ;;
 
5726
            esac
 
5727
            ;;
 
5728
        esac
 
5729
        ;;
 
5730
      lynxos*)
 
5731
        ;;
 
5732
      m88k*)
 
5733
        ;;
 
5734
      mvs*)
 
5735
        case $cc_basename in
 
5736
          cxx*)
 
5737
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
5738
            ;;
 
5739
          *)
 
5740
            ;;
 
5741
        esac
 
5742
        ;;
 
5743
      netbsd* | netbsdelf*-gnu)
 
5744
        ;;
 
5745
      *qnx* | *nto*)
 
5746
        # QNX uses GNU C++, but need to define -shared option too, otherwise
 
5747
        # it will coredump.
 
5748
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
5749
        ;;
 
5750
      osf3* | osf4* | osf5*)
 
5751
        case $cc_basename in
 
5752
          KCC*)
 
5753
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
5754
            ;;
 
5755
          RCC*)
 
5756
            # Rational C++ 2.4.1
 
5757
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5758
            ;;
 
5759
          cxx*)
 
5760
            # Digital/Compaq C++
 
5761
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5762
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
5763
            # Linux and Compaq Tru64 Unix objects are PIC.
 
5764
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5765
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5766
            ;;
 
5767
          *)
 
5768
            ;;
 
5769
        esac
 
5770
        ;;
 
5771
      psos*)
 
5772
        ;;
 
5773
      solaris*)
 
5774
        case $cc_basename in
 
5775
          CC*)
 
5776
            # Sun C++ 4.2, 5.x and Centerline C++
 
5777
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5778
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5779
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5780
            ;;
 
5781
          gcx*)
 
5782
            # Green Hills C++ Compiler
 
5783
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5784
            ;;
 
5785
          *)
 
5786
            ;;
 
5787
        esac
 
5788
        ;;
 
5789
      sunos4*)
 
5790
        case $cc_basename in
 
5791
          CC*)
 
5792
            # Sun C++ 4.x
 
5793
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5794
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5795
            ;;
 
5796
          lcc*)
 
5797
            # Lucid
 
5798
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5799
            ;;
 
5800
          *)
 
5801
            ;;
 
5802
        esac
 
5803
        ;;
 
5804
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
5805
        case $cc_basename in
 
5806
          CC*)
 
5807
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5808
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5809
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5810
            ;;
 
5811
        esac
 
5812
        ;;
 
5813
      tandem*)
 
5814
        case $cc_basename in
 
5815
          NCC*)
 
5816
            # NonStop-UX NCC 3.20
 
5817
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5818
            ;;
 
5819
          *)
 
5820
            ;;
 
5821
        esac
 
5822
        ;;
 
5823
      vxworks*)
 
5824
        ;;
 
5825
      *)
 
5826
        _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5827
        ;;
 
5828
    esac
 
5829
  fi
 
5830
],
 
5831
[
 
5832
  if test "$GCC" = yes; then
 
5833
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5834
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5835
 
 
5836
    case $host_os in
 
5837
      aix*)
 
5838
      # All AIX code is PIC.
 
5839
      if test "$host_cpu" = ia64; then
 
5840
        # AIX 5 now supports IA64 processor
 
5841
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5842
      fi
 
5843
      ;;
 
5844
 
 
5845
    amigaos*)
 
5846
      case $host_cpu in
 
5847
      powerpc)
 
5848
            # see comment about AmigaOS4 .so support
 
5849
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5850
        ;;
 
5851
      m68k)
 
5852
            # FIXME: we need at least 68020 code to build shared libraries, but
 
5853
            # adding the `-m68020' flag to GCC prevents building anything better,
 
5854
            # like `-m68040'.
 
5855
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
5856
        ;;
 
5857
      esac
 
5858
      ;;
 
5859
 
 
5860
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
5861
      # PIC is the default for these OSes.
 
5862
      ;;
 
5863
 
 
5864
    mingw* | cygwin* | pw32* | os2* | cegcc*)
 
5865
      # This hack is so that the source file can tell whether it is being
 
5866
      # built for inclusion in a dll (and should export symbols for example).
 
5867
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
5868
      # (--disable-auto-import) libraries
 
5869
      m4_if([$1], [GCJ], [],
 
5870
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
5871
      ;;
 
5872
 
 
5873
    darwin* | rhapsody*)
 
5874
      # PIC is the default on this platform
 
5875
      # Common symbols not allowed in MH_DYLIB files
 
5876
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
5877
      ;;
 
5878
 
 
5879
    hpux*)
 
5880
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
 
5881
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
 
5882
      # sets the default TLS model and affects inlining.
 
5883
      case $host_cpu in
 
5884
      hppa*64*)
 
5885
        # +Z the default
 
5886
        ;;
 
5887
      *)
 
5888
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5889
        ;;
 
5890
      esac
 
5891
      ;;
 
5892
 
 
5893
    interix[[3-9]]*)
 
5894
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
5895
      # Instead, we relocate shared libraries at runtime.
 
5896
      ;;
 
5897
 
 
5898
    msdosdjgpp*)
 
5899
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
5900
      # on systems that don't support them.
 
5901
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5902
      enable_shared=no
 
5903
      ;;
 
5904
 
 
5905
    *nto* | *qnx*)
 
5906
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
5907
      # it will coredump.
 
5908
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
5909
      ;;
 
5910
 
 
5911
    sysv4*MP*)
 
5912
      if test -d /usr/nec; then
 
5913
        _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
5914
      fi
 
5915
      ;;
 
5916
 
 
5917
    *)
 
5918
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5919
      ;;
 
5920
    esac
 
5921
  else
 
5922
    # PORTME Check for flag to pass linker flags through the system compiler.
 
5923
    case $host_os in
 
5924
    aix*)
 
5925
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5926
      if test "$host_cpu" = ia64; then
 
5927
        # AIX 5 now supports IA64 processor
 
5928
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5929
      else
 
5930
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
5931
      fi
 
5932
      ;;
 
5933
 
 
5934
    mingw* | cygwin* | pw32* | os2* | cegcc*)
 
5935
      # This hack is so that the source file can tell whether it is being
 
5936
      # built for inclusion in a dll (and should export symbols for example).
 
5937
      m4_if([$1], [GCJ], [],
 
5938
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
5939
      ;;
 
5940
 
 
5941
    hpux9* | hpux10* | hpux11*)
 
5942
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5943
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5944
      # not for PA HP-UX.
 
5945
      case $host_cpu in
 
5946
      hppa*64*|ia64*)
 
5947
        # +Z the default
 
5948
        ;;
 
5949
      *)
 
5950
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5951
        ;;
 
5952
      esac
 
5953
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
5954
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5955
      ;;
 
5956
 
 
5957
    irix5* | irix6* | nonstopux*)
 
5958
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5959
      # PIC (with -KPIC) is the default.
 
5960
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5961
      ;;
 
5962
 
 
5963
    linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
5964
      case $cc_basename in
 
5965
      # old Intel for x86_64 which still supported -KPIC.
 
5966
      ecc*)
 
5967
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5968
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5969
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5970
        ;;
 
5971
      # icc used to be incompatible with GCC.
 
5972
      # ICC 10 doesn't accept -KPIC any more.
 
5973
      icc* | ifort*)
 
5974
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5975
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5976
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5977
        ;;
 
5978
      # Lahey Fortran 8.1.
 
5979
      lf95*)
 
5980
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5981
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
 
5982
        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
 
5983
        ;;
 
5984
      pgcc* | pgf77* | pgf90* | pgf95*)
 
5985
        # Portland Group compilers (*not* the Pentium gcc compiler,
 
5986
        # which looks to be a dead project)
 
5987
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5988
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5989
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5990
        ;;
 
5991
      ccc*)
 
5992
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5993
        # All Alpha code is PIC.
 
5994
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5995
        ;;
 
5996
      xl*)
 
5997
        # IBM XL C 8.0/Fortran 10.1 on PPC
 
5998
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5999
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 
6000
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 
6001
        ;;
 
6002
      *)
 
6003
        case `$CC -V 2>&1 | sed 5q` in
 
6004
        *Sun\ C*)
 
6005
          # Sun C 5.9
 
6006
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6007
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6008
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6009
          ;;
 
6010
        *Sun\ F*)
 
6011
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
 
6012
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6013
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6014
          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
 
6015
          ;;
 
6016
        esac
 
6017
        ;;
 
6018
      esac
 
6019
      ;;
 
6020
 
 
6021
    newsos6)
 
6022
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6023
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6024
      ;;
 
6025
 
 
6026
    *nto* | *qnx*)
 
6027
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
6028
      # it will coredump.
 
6029
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
6030
      ;;
 
6031
 
 
6032
    osf3* | osf4* | osf5*)
 
6033
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6034
      # All OSF/1 code is PIC.
 
6035
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
6036
      ;;
 
6037
 
 
6038
    rdos*)
 
6039
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
6040
      ;;
 
6041
 
 
6042
    solaris*)
 
6043
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6044
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6045
      case $cc_basename in
 
6046
      f77* | f90* | f95*)
 
6047
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
 
6048
      *)
 
6049
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
 
6050
      esac
 
6051
      ;;
 
6052
 
 
6053
    sunos4*)
 
6054
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
6055
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
6056
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6057
      ;;
 
6058
 
 
6059
    sysv4 | sysv4.2uw2* | sysv4.3*)
 
6060
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6061
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6062
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6063
      ;;
 
6064
 
 
6065
    sysv4*MP*)
 
6066
      if test -d /usr/nec ;then
 
6067
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
6068
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6069
      fi
 
6070
      ;;
 
6071
 
 
6072
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
6073
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6074
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6075
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6076
      ;;
 
6077
 
 
6078
    unicos*)
 
6079
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6080
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
6081
      ;;
 
6082
 
 
6083
    uts4*)
 
6084
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
6085
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6086
      ;;
 
6087
 
 
6088
    *)
 
6089
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
6090
      ;;
 
6091
    esac
 
6092
  fi
 
6093
])
 
6094
case $host_os in
 
6095
  # For platforms which do not support PIC, -DPIC is meaningless:
 
6096
  *djgpp*)
 
6097
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
6098
    ;;
 
6099
  *)
 
6100
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
 
6101
    ;;
 
6102
esac
 
6103
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
 
6104
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
 
6105
        [How to pass a linker flag through the compiler])
 
6106
 
 
6107
#
 
6108
# Check to make sure the PIC flag actually works.
 
6109
#
 
6110
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
6111
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
 
6112
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
 
6113
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
 
6114
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
 
6115
     "" | " "*) ;;
 
6116
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
6117
     esac],
 
6118
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
6119
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
6120
fi
 
6121
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
 
6122
        [Additional compiler flags for building library objects])
 
6123
 
 
6124
#
 
6125
# Check to make sure the static flag actually works.
 
6126
#
 
6127
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
 
6128
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
 
6129
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
 
6130
  $lt_tmp_static_flag,
 
6131
  [],
 
6132
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
 
6133
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
 
6134
        [Compiler flag to prevent dynamic linking])
 
6135
])# _LT_COMPILER_PIC
 
6136
 
 
6137
 
 
6138
# _LT_LINKER_SHLIBS([TAGNAME])
 
6139
# ----------------------------
 
6140
# See if the linker supports building shared libraries.
 
6141
m4_defun([_LT_LINKER_SHLIBS],
 
6142
[AC_REQUIRE([LT_PATH_LD])dnl
 
6143
AC_REQUIRE([LT_PATH_NM])dnl
 
6144
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
6145
m4_require([_LT_DECL_EGREP])dnl
 
6146
m4_require([_LT_DECL_SED])dnl
 
6147
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
6148
m4_require([_LT_TAG_COMPILER])dnl
 
6149
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
6150
m4_if([$1], [CXX], [
 
6151
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
6152
  case $host_os in
 
6153
  aix[[4-9]]*)
 
6154
    # If we're using GNU nm, then we don't want the "-C" option.
 
6155
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
6156
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 
6157
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
6158
    else
 
6159
      _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'
 
6160
    fi
 
6161
    ;;
 
6162
  pw32*)
 
6163
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
6164
  ;;
 
6165
  cygwin* | mingw* | cegcc*)
 
6166
    _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'
 
6167
  ;;
 
6168
  linux* | k*bsd*-gnu)
 
6169
    _LT_TAGVAR(link_all_deplibs, $1)=no
 
6170
  ;;
 
6171
  *)
 
6172
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
6173
  ;;
 
6174
  esac
 
6175
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 
6176
], [
 
6177
  runpath_var=
 
6178
  _LT_TAGVAR(allow_undefined_flag, $1)=
 
6179
  _LT_TAGVAR(always_export_symbols, $1)=no
 
6180
  _LT_TAGVAR(archive_cmds, $1)=
 
6181
  _LT_TAGVAR(archive_expsym_cmds, $1)=
 
6182
  _LT_TAGVAR(compiler_needs_object, $1)=no
 
6183
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
6184
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
6185
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
6186
  _LT_TAGVAR(hardcode_automatic, $1)=no
 
6187
  _LT_TAGVAR(hardcode_direct, $1)=no
 
6188
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
6189
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
6190
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
6191
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
6192
  _LT_TAGVAR(hardcode_minus_L, $1)=no
 
6193
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
6194
  _LT_TAGVAR(inherit_rpath, $1)=no
 
6195
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
 
6196
  _LT_TAGVAR(module_cmds, $1)=
 
6197
  _LT_TAGVAR(module_expsym_cmds, $1)=
 
6198
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
 
6199
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
6200
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
 
6201
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6202
  # include_expsyms should be a list of space-separated symbols to be *always*
 
6203
  # included in the symbol list
 
6204
  _LT_TAGVAR(include_expsyms, $1)=
 
6205
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
6206
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
6207
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
6208
  # as well as any symbol that contains `d'.
 
6209
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 
6210
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
6211
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
6212
  # the symbol is explicitly referenced.  Since portable code cannot
 
6213
  # rely on this symbol name, it's probably fine to never include it in
 
6214
  # preloaded symbol tables.
 
6215
  # Exclude shared library initialization/finalization symbols.
 
6216
dnl Note also adjust exclude_expsyms for C++ above.
 
6217
  extract_expsyms_cmds=
 
6218
 
 
6219
  case $host_os in
 
6220
  cygwin* | mingw* | pw32* | cegcc*)
 
6221
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
6222
    # When not using gcc, we currently assume that we are using
 
6223
    # Microsoft Visual C++.
 
6224
    if test "$GCC" != yes; then
 
6225
      with_gnu_ld=no
 
6226
    fi
 
6227
    ;;
 
6228
  interix*)
 
6229
    # we just hope/assume this is gcc and not c89 (= MSVC++)
 
6230
    with_gnu_ld=yes
 
6231
    ;;
 
6232
  openbsd*)
 
6233
    with_gnu_ld=no
 
6234
    ;;
 
6235
  linux* | k*bsd*-gnu)
 
6236
    _LT_TAGVAR(link_all_deplibs, $1)=no
 
6237
    ;;
 
6238
  esac
 
6239
 
 
6240
  _LT_TAGVAR(ld_shlibs, $1)=yes
 
6241
  if test "$with_gnu_ld" = yes; then
 
6242
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
6243
    wlarc='${wl}'
 
6244
 
 
6245
    # Set some defaults for GNU ld with shared library support. These
 
6246
    # are reset later if shared libraries are not supported. Putting them
 
6247
    # here allows them to be overridden if necessary.
 
6248
    runpath_var=LD_RUN_PATH
 
6249
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6250
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
6251
    # ancient GNU ld didn't support --whole-archive et. al.
 
6252
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
 
6253
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
6254
    else
 
6255
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6256
    fi
 
6257
    supports_anon_versioning=no
 
6258
    case `$LD -v 2>&1` in
 
6259
      *GNU\ gold*) supports_anon_versioning=yes ;;
 
6260
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
6261
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
6262
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
6263
      *\ 2.11.*) ;; # other 2.11 versions
 
6264
      *) supports_anon_versioning=yes ;;
 
6265
    esac
 
6266
 
 
6267
    # See if GNU ld supports shared libraries.
 
6268
    case $host_os in
 
6269
    aix[[3-9]]*)
 
6270
      # On AIX/PPC, the GNU linker is very broken
 
6271
      if test "$host_cpu" != ia64; then
 
6272
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6273
        cat <<_LT_EOF 1>&2
 
6274
 
 
6275
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
6276
*** to be unable to reliably create shared libraries on AIX.
 
6277
*** Therefore, libtool is disabling shared libraries support.  If you
 
6278
*** really care for shared libraries, you may want to modify your PATH
 
6279
*** so that a non-GNU linker is found, and then restart.
 
6280
 
 
6281
_LT_EOF
 
6282
      fi
 
6283
      ;;
 
6284
 
 
6285
    amigaos*)
 
6286
      case $host_cpu in
 
6287
      powerpc)
 
6288
            # see comment about AmigaOS4 .so support
 
6289
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6290
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
 
6291
        ;;
 
6292
      m68k)
 
6293
            _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)'
 
6294
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6295
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6296
        ;;
 
6297
      esac
 
6298
      ;;
 
6299
 
 
6300
    beos*)
 
6301
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
6302
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6303
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
6304
        # support --undefined.  This deserves some investigation.  FIXME
 
6305
        _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6306
      else
 
6307
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6308
      fi
 
6309
      ;;
 
6310
 
 
6311
    cygwin* | mingw* | pw32* | cegcc*)
 
6312
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
6313
      # as there is no search path for DLLs.
 
6314
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6315
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6316
      _LT_TAGVAR(always_export_symbols, $1)=no
 
6317
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6318
      _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'
 
6319
 
 
6320
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
6321
        _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'
 
6322
        # If the export-symbols file already is a .def file (1st line
 
6323
        # is EXPORTS), use it as is; otherwise, prepend...
 
6324
        _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
6325
          cp $export_symbols $output_objdir/$soname.def;
 
6326
        else
 
6327
          echo EXPORTS > $output_objdir/$soname.def;
 
6328
          cat $export_symbols >> $output_objdir/$soname.def;
 
6329
        fi~
 
6330
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
6331
      else
 
6332
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6333
      fi
 
6334
      ;;
 
6335
 
 
6336
    interix[[3-9]]*)
 
6337
      _LT_TAGVAR(hardcode_direct, $1)=no
 
6338
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6339
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6340
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6341
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
6342
      # Instead, shared libraries are loaded at an image base (0x10000000 by
 
6343
      # default) and relocated if they conflict, which is a slow very memory
 
6344
      # consuming and fragmenting process.  To avoid this, we pick a random,
 
6345
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
6346
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
6347
      _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'
 
6348
      _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'
 
6349
      ;;
 
6350
 
 
6351
    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
 
6352
      tmp_diet=no
 
6353
      if test "$host_os" = linux-dietlibc; then
 
6354
        case $cc_basename in
 
6355
          diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
 
6356
        esac
 
6357
      fi
 
6358
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
 
6359
         && test "$tmp_diet" = no
 
6360
      then
 
6361
        tmp_addflag=
 
6362
        tmp_sharedflag='-shared'
 
6363
        case $cc_basename,$host_cpu in
 
6364
        pgcc*)                          # Portland Group C compiler
 
6365
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
6366
          tmp_addflag=' $pic_flag'
 
6367
          ;;
 
6368
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
 
6369
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
6370
          tmp_addflag=' $pic_flag -Mnomain' ;;
 
6371
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
 
6372
          tmp_addflag=' -i_dynamic' ;;
 
6373
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
 
6374
          tmp_addflag=' -i_dynamic -nofor_main' ;;
 
6375
        ifc* | ifort*)                  # Intel Fortran compiler
 
6376
          tmp_addflag=' -nofor_main' ;;
 
6377
        lf95*)                          # Lahey Fortran 8.1
 
6378
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6379
          tmp_sharedflag='--shared' ;;
 
6380
        xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
 
6381
          tmp_sharedflag='-qmkshrobj'
 
6382
          tmp_addflag= ;;
 
6383
        esac
 
6384
        case `$CC -V 2>&1 | sed 5q` in
 
6385
        *Sun\ C*)                       # Sun C 5.9
 
6386
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
6387
          _LT_TAGVAR(compiler_needs_object, $1)=yes
 
6388
          tmp_sharedflag='-G' ;;
 
6389
        *Sun\ F*)                       # Sun Fortran 8.3
 
6390
          tmp_sharedflag='-G' ;;
 
6391
        esac
 
6392
        _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6393
 
 
6394
        if test "x$supports_anon_versioning" = xyes; then
 
6395
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
6396
            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
6397
            echo "local: *; };" >> $output_objdir/$libname.ver~
 
6398
            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
6399
        fi
 
6400
 
 
6401
        case $cc_basename in
 
6402
        xlf*)
 
6403
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 
6404
          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
 
6405
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
6406
          _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
6407
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
 
6408
          if test "x$supports_anon_versioning" = xyes; then
 
6409
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
6410
              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
6411
              echo "local: *; };" >> $output_objdir/$libname.ver~
 
6412
              $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 
6413
          fi
 
6414
          ;;
 
6415
        esac
 
6416
      else
 
6417
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6418
      fi
 
6419
      ;;
 
6420
 
 
6421
    netbsd* | netbsdelf*-gnu)
 
6422
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
6423
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
6424
        wlarc=
 
6425
      else
 
6426
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6427
        _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'
 
6428
      fi
 
6429
      ;;
 
6430
 
 
6431
    solaris*)
 
6432
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
 
6433
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6434
        cat <<_LT_EOF 1>&2
 
6435
 
 
6436
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
6437
*** create shared libraries on Solaris systems.  Therefore, libtool
 
6438
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
6439
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
6440
*** your PATH or compiler configuration so that the native linker is
 
6441
*** used, and then restart.
 
6442
 
 
6443
_LT_EOF
 
6444
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
6445
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6446
        _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'
 
6447
      else
 
6448
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6449
      fi
 
6450
      ;;
 
6451
 
 
6452
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
 
6453
      case `$LD -v 2>&1` in
 
6454
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
 
6455
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6456
        cat <<_LT_EOF 1>&2
 
6457
 
 
6458
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
 
6459
*** reliably create shared libraries on SCO systems.  Therefore, libtool
 
6460
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
6461
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
 
6462
*** your PATH or compiler configuration so that the native linker is
 
6463
*** used, and then restart.
 
6464
 
 
6465
_LT_EOF
 
6466
        ;;
 
6467
        *)
 
6468
          # For security reasons, it is highly recommended that you always
 
6469
          # use absolute paths for naming shared libraries, and exclude the
 
6470
          # DT_RUNPATH tag from executables and libraries.  But doing so
 
6471
          # requires that you compile everything twice, which is a pain.
 
6472
          if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
6473
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6474
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6475
            _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'
 
6476
          else
 
6477
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6478
          fi
 
6479
        ;;
 
6480
      esac
 
6481
      ;;
 
6482
 
 
6483
    sunos4*)
 
6484
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6485
      wlarc=
 
6486
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6487
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6488
      ;;
 
6489
 
 
6490
    *)
 
6491
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
6492
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6493
        _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'
 
6494
      else
 
6495
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6496
      fi
 
6497
      ;;
 
6498
    esac
 
6499
 
 
6500
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
 
6501
      runpath_var=
 
6502
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
6503
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
6504
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6505
    fi
 
6506
  else
 
6507
    # PORTME fill in a description of your system's linker (not GNU ld)
 
6508
    case $host_os in
 
6509
    aix3*)
 
6510
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6511
      _LT_TAGVAR(always_export_symbols, $1)=yes
 
6512
      _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'
 
6513
      # Note: this linker hardcodes the directories in LIBPATH if there
 
6514
      # are no directories specified by -L.
 
6515
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6516
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
 
6517
        # Neither direct hardcoding nor static linking is supported with a
 
6518
        # broken collect2.
 
6519
        _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
6520
      fi
 
6521
      ;;
 
6522
 
 
6523
    aix[[4-9]]*)
 
6524
      if test "$host_cpu" = ia64; then
 
6525
        # On IA64, the linker does run time linking by default, so we don't
 
6526
        # have to do anything special.
 
6527
        aix_use_runtimelinking=no
 
6528
        exp_sym_flag='-Bexport'
 
6529
        no_entry_flag=""
 
6530
      else
 
6531
        # If we're using GNU nm, then we don't want the "-C" option.
 
6532
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
6533
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 
6534
          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
6535
        else
 
6536
          _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'
 
6537
        fi
 
6538
        aix_use_runtimelinking=no
 
6539
 
 
6540
        # Test if we are trying to use run time linking or normal
 
6541
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
6542
        # need to do runtime linking.
 
6543
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 
6544
          for ld_flag in $LDFLAGS; do
 
6545
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
6546
            aix_use_runtimelinking=yes
 
6547
            break
 
6548
          fi
 
6549
          done
 
6550
          ;;
 
6551
        esac
 
6552
 
 
6553
        exp_sym_flag='-bexport'
 
6554
        no_entry_flag='-bnoentry'
 
6555
      fi
 
6556
 
 
6557
      # When large executables or shared objects are built, AIX ld can
 
6558
      # have problems creating the table of contents.  If linking a library
 
6559
      # or program results in "error TOC overflow" add -mminimal-toc to
 
6560
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
6561
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
6562
 
 
6563
      _LT_TAGVAR(archive_cmds, $1)=''
 
6564
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6565
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6566
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
6567
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6568
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
6569
 
 
6570
      if test "$GCC" = yes; then
 
6571
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
6572
        # We only want to do this on AIX 4.2 and lower, the check
 
6573
        # below for broken collect2 doesn't work under 4.3+
 
6574
          collect2name=`${CC} -print-prog-name=collect2`
 
6575
          if test -f "$collect2name" &&
 
6576
           strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 
6577
          then
 
6578
          # We have reworked collect2
 
6579
          :
 
6580
          else
 
6581
          # We have old collect2
 
6582
          _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
6583
          # It fails to find uninstalled libraries when the uninstalled
 
6584
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
6585
          # to unsupported forces relinking
 
6586
          _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6587
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6588
          _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
6589
          fi
 
6590
          ;;
 
6591
        esac
 
6592
        shared_flag='-shared'
 
6593
        if test "$aix_use_runtimelinking" = yes; then
 
6594
          shared_flag="$shared_flag "'${wl}-G'
 
6595
        fi
 
6596
        _LT_TAGVAR(link_all_deplibs, $1)=no
 
6597
      else
 
6598
        # not using gcc
 
6599
        if test "$host_cpu" = ia64; then
 
6600
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
6601
        # chokes on -Wl,-G. The following line is correct:
 
6602
          shared_flag='-G'
 
6603
        else
 
6604
          if test "$aix_use_runtimelinking" = yes; then
 
6605
            shared_flag='${wl}-G'
 
6606
          else
 
6607
            shared_flag='${wl}-bM:SRE'
 
6608
          fi
 
6609
        fi
 
6610
      fi
 
6611
 
 
6612
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
 
6613
      # It seems that -bexpall does not export symbols beginning with
 
6614
      # underscore (_), so it is better to generate a list of symbols to export.
 
6615
      _LT_TAGVAR(always_export_symbols, $1)=yes
 
6616
      if test "$aix_use_runtimelinking" = yes; then
 
6617
        # Warning - without using the other runtime loading flags (-brtl),
 
6618
        # -berok will link without error, but may produce a broken library.
 
6619
        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
 
6620
        # Determine the default libpath from the value encoded in an
 
6621
        # empty executable.
 
6622
        _LT_SYS_MODULE_PATH_AIX
 
6623
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
6624
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
6625
      else
 
6626
        if test "$host_cpu" = ia64; then
 
6627
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
6628
          _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
6629
          _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"
 
6630
        else
 
6631
         # Determine the default libpath from the value encoded in an
 
6632
         # empty executable.
 
6633
         _LT_SYS_MODULE_PATH_AIX
 
6634
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
6635
          # Warning - without using the other run time loading flags,
 
6636
          # -berok will link without error, but may produce a broken library.
 
6637
          _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
6638
          _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
6639
          # Exported symbols can be pulled into shared objects from archives
 
6640
          _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
6641
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6642
          # This is similar to how AIX traditionally builds its shared libraries.
 
6643
          _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'
 
6644
        fi
 
6645
      fi
 
6646
      ;;
 
6647
 
 
6648
    amigaos*)
 
6649
      case $host_cpu in
 
6650
      powerpc)
 
6651
            # see comment about AmigaOS4 .so support
 
6652
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6653
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
 
6654
        ;;
 
6655
      m68k)
 
6656
            _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)'
 
6657
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6658
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6659
        ;;
 
6660
      esac
 
6661
      ;;
 
6662
 
 
6663
    bsdi[[45]]*)
 
6664
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
6665
      ;;
 
6666
 
 
6667
    cygwin* | mingw* | pw32* | cegcc*)
 
6668
      # When not using gcc, we currently assume that we are using
 
6669
      # Microsoft Visual C++.
 
6670
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
6671
      # no search path for DLLs.
 
6672
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
6673
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6674
      # Tell ltmain to make .lib files, not .a files.
 
6675
      libext=lib
 
6676
      # Tell ltmain to make .dll files, not .so files.
 
6677
      shrext_cmds=".dll"
 
6678
      # FIXME: Setting linknames here is a bad hack.
 
6679
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
6680
      # The linker will automatically build a .lib file if we build a DLL.
 
6681
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
6682
      # FIXME: Should let the user specify the lib program.
 
6683
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
 
6684
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
 
6685
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6686
      ;;
 
6687
 
 
6688
    darwin* | rhapsody*)
 
6689
      _LT_DARWIN_LINKER_FEATURES($1)
 
6690
      ;;
 
6691
 
 
6692
    dgux*)
 
6693
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6694
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6695
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6696
      ;;
 
6697
 
 
6698
    freebsd1*)
 
6699
      _LT_TAGVAR(ld_shlibs, $1)=no
 
6700
      ;;
 
6701
 
 
6702
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
6703
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
6704
    # does not break anything, and helps significantly (at the cost of a little
 
6705
    # extra space).
 
6706
    freebsd2.2*)
 
6707
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
6708
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6709
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6710
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6711
      ;;
 
6712
 
 
6713
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
6714
    freebsd2*)
 
6715
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6716
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6717
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6718
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6719
      ;;
 
6720
 
 
6721
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
6722
    freebsd* | dragonfly*)
 
6723
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
6724
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6725
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6726
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6727
      ;;
 
6728
 
 
6729
    hpux9*)
 
6730
      if test "$GCC" = yes; then
 
6731
        _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'
 
6732
      else
 
6733
        _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'
 
6734
      fi
 
6735
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6736
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6737
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6738
 
 
6739
      # hardcode_minus_L: Not really in the search PATH,
 
6740
      # but as the default location of the library.
 
6741
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6742
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6743
      ;;
 
6744
 
 
6745
    hpux10*)
 
6746
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
6747
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6748
      else
 
6749
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
6750
      fi
 
6751
      if test "$with_gnu_ld" = no; then
 
6752
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6753
        _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
6754
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6755
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
6756
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6757
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6758
        # hardcode_minus_L: Not really in the search PATH,
 
6759
        # but as the default location of the library.
 
6760
        _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6761
      fi
 
6762
      ;;
 
6763
 
 
6764
    hpux11*)
 
6765
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
6766
        case $host_cpu in
 
6767
        hppa*64*)
 
6768
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6769
          ;;
 
6770
        ia64*)
 
6771
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
6772
          ;;
 
6773
        *)
 
6774
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6775
          ;;
 
6776
        esac
 
6777
      else
 
6778
        case $host_cpu in
 
6779
        hppa*64*)
 
6780
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6781
          ;;
 
6782
        ia64*)
 
6783
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
6784
          ;;
 
6785
        *)
 
6786
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6787
          ;;
 
6788
        esac
 
6789
      fi
 
6790
      if test "$with_gnu_ld" = no; then
 
6791
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6792
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6793
 
 
6794
        case $host_cpu in
 
6795
        hppa*64*|ia64*)
 
6796
          _LT_TAGVAR(hardcode_direct, $1)=no
 
6797
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6798
          ;;
 
6799
        *)
 
6800
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
6801
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6802
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6803
 
 
6804
          # hardcode_minus_L: Not really in the search PATH,
 
6805
          # but as the default location of the library.
 
6806
          _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6807
          ;;
 
6808
        esac
 
6809
      fi
 
6810
      ;;
 
6811
 
 
6812
    irix5* | irix6* | nonstopux*)
 
6813
      if test "$GCC" = yes; then
 
6814
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6815
        # Try to use the -exported_symbol ld option, if it does not
 
6816
        # work, assume that -exports_file does not work either and
 
6817
        # implicitly export all symbols.
 
6818
        save_LDFLAGS="$LDFLAGS"
 
6819
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
 
6820
        AC_LINK_IFELSE(int foo(void) {},
 
6821
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
6822
        )
 
6823
        LDFLAGS="$save_LDFLAGS"
 
6824
      else
 
6825
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
6826
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
 
6827
      fi
 
6828
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
6829
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6830
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6831
      _LT_TAGVAR(inherit_rpath, $1)=yes
 
6832
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6833
      ;;
 
6834
 
 
6835
    netbsd* | netbsdelf*-gnu)
 
6836
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
6837
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
6838
      else
 
6839
        _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
6840
      fi
 
6841
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6842
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6843
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6844
      ;;
 
6845
 
 
6846
    newsos6)
 
6847
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6848
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6849
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6850
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6851
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6852
      ;;
 
6853
 
 
6854
    *nto* | *qnx*)
 
6855
      ;;
 
6856
 
 
6857
    openbsd*)
 
6858
      if test -f /usr/libexec/ld.so; then
 
6859
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
6860
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6861
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6862
        if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
6863
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6864
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 
6865
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6866
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6867
        else
 
6868
          case $host_os in
 
6869
           openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
6870
             _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6871
             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6872
             ;;
 
6873
           *)
 
6874
             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6875
             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6876
             ;;
 
6877
          esac
 
6878
        fi
 
6879
      else
 
6880
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6881
      fi
 
6882
      ;;
 
6883
 
 
6884
    os2*)
 
6885
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6886
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6887
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6888
      _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'
 
6889
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
6890
      ;;
 
6891
 
 
6892
    osf3*)
 
6893
      if test "$GCC" = yes; then
 
6894
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6895
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6896
      else
 
6897
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6898
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
6899
      fi
 
6900
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
6901
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6902
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6903
      ;;
 
6904
 
 
6905
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
6906
      if test "$GCC" = yes; then
 
6907
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6908
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6909
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6910
      else
 
6911
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6912
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
6913
        _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~
 
6914
        $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
6915
 
 
6916
        # Both c and cxx compiler support -rpath directly
 
6917
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
6918
      fi
 
6919
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
6920
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6921
      ;;
 
6922
 
 
6923
    solaris*)
 
6924
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
 
6925
      if test "$GCC" = yes; then
 
6926
        wlarc='${wl}'
 
6927
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6928
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6929
          $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 
6930
      else
 
6931
        case `$CC -V 2>&1` in
 
6932
        *"Compilers 5.0"*)
 
6933
          wlarc=''
 
6934
          _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6935
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6936
          $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 
6937
          ;;
 
6938
        *)
 
6939
          wlarc='${wl}'
 
6940
          _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
6941
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6942
          $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 
6943
          ;;
 
6944
        esac
 
6945
      fi
 
6946
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6947
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6948
      case $host_os in
 
6949
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
6950
      *)
 
6951
        # The compiler driver will combine and reorder linker options,
 
6952
        # but understands `-z linker_flag'.  GCC discards it without `$wl',
 
6953
        # but is careful enough not to reorder.
 
6954
        # Supported since Solaris 2.6 (maybe 2.5.1?)
 
6955
        if test "$GCC" = yes; then
 
6956
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
6957
        else
 
6958
          _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 
6959
        fi
 
6960
        ;;
 
6961
      esac
 
6962
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6963
      ;;
 
6964
 
 
6965
    sunos4*)
 
6966
      if test "x$host_vendor" = xsequent; then
 
6967
        # Use $CC to link under sequent, because it throws in some extra .o
 
6968
        # files that make .init and .fini sections work.
 
6969
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
6970
      else
 
6971
        _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
6972
      fi
 
6973
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6974
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6975
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6976
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6977
      ;;
 
6978
 
 
6979
    sysv4)
 
6980
      case $host_vendor in
 
6981
        sni)
 
6982
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6983
          _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
6984
        ;;
 
6985
        siemens)
 
6986
          ## LD is ld it makes a PLAMLIB
 
6987
          ## CC just makes a GrossModule.
 
6988
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
6989
          _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
6990
          _LT_TAGVAR(hardcode_direct, $1)=no
 
6991
        ;;
 
6992
        motorola)
 
6993
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6994
          _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
6995
        ;;
 
6996
      esac
 
6997
      runpath_var='LD_RUN_PATH'
 
6998
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6999
      ;;
 
7000
 
 
7001
    sysv4.3*)
 
7002
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7003
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7004
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
7005
      ;;
 
7006
 
 
7007
    sysv4*MP*)
 
7008
      if test -d /usr/nec; then
 
7009
        _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7010
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7011
        runpath_var=LD_RUN_PATH
 
7012
        hardcode_runpath_var=yes
 
7013
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
7014
      fi
 
7015
      ;;
 
7016
 
 
7017
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
7018
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
7019
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7020
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7021
      runpath_var='LD_RUN_PATH'
 
7022
 
 
7023
      if test "$GCC" = yes; then
 
7024
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7025
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7026
      else
 
7027
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7028
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7029
      fi
 
7030
      ;;
 
7031
 
 
7032
    sysv5* | sco3.2v5* | sco5v6*)
 
7033
      # Note: We can NOT use -z defs as we might desire, because we do not
 
7034
      # link with -lc, and that would cause any symbols used from libc to
 
7035
      # always be unresolved, which means just about no library would
 
7036
      # ever link correctly.  If we're not using GNU ld we use -z text
 
7037
      # though, which does catch some bad symbols but isn't as heavy-handed
 
7038
      # as -z defs.
 
7039
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
7040
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
7041
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7042
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7043
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
 
7044
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
7045
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7046
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
7047
      runpath_var='LD_RUN_PATH'
 
7048
 
 
7049
      if test "$GCC" = yes; then
 
7050
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7051
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7052
      else
 
7053
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7054
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7055
      fi
 
7056
      ;;
 
7057
 
 
7058
    uts4*)
 
7059
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7060
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7061
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7062
      ;;
 
7063
 
 
7064
    *)
 
7065
      _LT_TAGVAR(ld_shlibs, $1)=no
 
7066
      ;;
 
7067
    esac
 
7068
 
 
7069
    if test x$host_vendor = xsni; then
 
7070
      case $host in
 
7071
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
7072
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
 
7073
        ;;
 
7074
      esac
 
7075
    fi
 
7076
  fi
 
7077
])
 
7078
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
 
7079
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
7080
 
 
7081
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
 
7082
 
 
7083
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
 
7084
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
 
7085
_LT_DECL([], [extract_expsyms_cmds], [2],
 
7086
    [The commands to extract the exported symbol list from a shared archive])
 
7087
 
 
7088
#
 
7089
# Do we need to explicitly link libc?
 
7090
#
 
7091
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
 
7092
x|xyes)
 
7093
  # Assume -lc should be added
 
7094
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
7095
 
 
7096
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
7097
    case $_LT_TAGVAR(archive_cmds, $1) in
 
7098
    *'~'*)
 
7099
      # FIXME: we may have to deal with multi-command sequences.
 
7100
      ;;
 
7101
    '$CC '*)
 
7102
      # Test whether the compiler implicitly links with -lc since on some
 
7103
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
7104
      # to ld, don't add -lc before -lgcc.
 
7105
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
7106
      $RM conftest*
 
7107
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
7108
 
 
7109
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
7110
        soname=conftest
 
7111
        lib=conftest
 
7112
        libobjs=conftest.$ac_objext
 
7113
        deplibs=
 
7114
        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
 
7115
        pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
 
7116
        compiler_flags=-v
 
7117
        linker_flags=-v
 
7118
        verstring=
 
7119
        output_objdir=.
 
7120
        libname=conftest
 
7121
        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
 
7122
        _LT_TAGVAR(allow_undefined_flag, $1)=
 
7123
        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
 
7124
        then
 
7125
          _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7126
        else
 
7127
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
7128
        fi
 
7129
        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
7130
      else
 
7131
        cat conftest.err 1>&5
 
7132
      fi
 
7133
      $RM conftest*
 
7134
      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
 
7135
      ;;
 
7136
    esac
 
7137
  fi
 
7138
  ;;
 
7139
esac
 
7140
 
 
7141
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
 
7142
    [Whether or not to add -lc for building shared libraries])
 
7143
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
 
7144
    [enable_shared_with_static_runtimes], [0],
 
7145
    [Whether or not to disallow shared libs when runtime libs are static])
 
7146
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
 
7147
    [Compiler flag to allow reflexive dlopens])
 
7148
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
 
7149
    [Compiler flag to generate shared objects directly from archives])
 
7150
_LT_TAGDECL([], [compiler_needs_object], [1],
 
7151
    [Whether the compiler copes with passing no objects directly])
 
7152
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
 
7153
    [Create an old-style archive from a shared archive])
 
7154
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
 
7155
    [Create a temporary old-style archive to link instead of a shared archive])
 
7156
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
 
7157
_LT_TAGDECL([], [archive_expsym_cmds], [2])
 
7158
_LT_TAGDECL([], [module_cmds], [2],
 
7159
    [Commands used to build a loadable module if different from building
 
7160
    a shared archive.])
 
7161
_LT_TAGDECL([], [module_expsym_cmds], [2])
 
7162
_LT_TAGDECL([], [with_gnu_ld], [1],
 
7163
    [Whether we are building with GNU ld or not])
 
7164
_LT_TAGDECL([], [allow_undefined_flag], [1],
 
7165
    [Flag that allows shared libraries with undefined symbols to be built])
 
7166
_LT_TAGDECL([], [no_undefined_flag], [1],
 
7167
    [Flag that enforces no undefined symbols])
 
7168
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
 
7169
    [Flag to hardcode $libdir into a binary during linking.
 
7170
    This must work even if $libdir does not exist])
 
7171
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
 
7172
    [[If ld is used when linking, flag to hardcode $libdir into a binary
 
7173
    during linking.  This must work even if $libdir does not exist]])
 
7174
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
 
7175
    [Whether we need a single "-rpath" flag with a separated argument])
 
7176
_LT_TAGDECL([], [hardcode_direct], [0],
 
7177
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
 
7178
    DIR into the resulting binary])
 
7179
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
 
7180
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
 
7181
    DIR into the resulting binary and the resulting library dependency is
 
7182
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
 
7183
    library is relocated])
 
7184
_LT_TAGDECL([], [hardcode_minus_L], [0],
 
7185
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
 
7186
    into the resulting binary])
 
7187
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
 
7188
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
 
7189
    into the resulting binary])
 
7190
_LT_TAGDECL([], [hardcode_automatic], [0],
 
7191
    [Set to "yes" if building a shared library automatically hardcodes DIR
 
7192
    into the library and all subsequent libraries and executables linked
 
7193
    against it])
 
7194
_LT_TAGDECL([], [inherit_rpath], [0],
 
7195
    [Set to yes if linker adds runtime paths of dependent libraries
 
7196
    to runtime path list])
 
7197
_LT_TAGDECL([], [link_all_deplibs], [0],
 
7198
    [Whether libtool must link a program against all its dependency libraries])
 
7199
_LT_TAGDECL([], [fix_srcfile_path], [1],
 
7200
    [Fix the shell variable $srcfile for the compiler])
 
7201
_LT_TAGDECL([], [always_export_symbols], [0],
 
7202
    [Set to "yes" if exported symbols are required])
 
7203
_LT_TAGDECL([], [export_symbols_cmds], [2],
 
7204
    [The commands to list exported symbols])
 
7205
_LT_TAGDECL([], [exclude_expsyms], [1],
 
7206
    [Symbols that should not be listed in the preloaded symbols])
 
7207
_LT_TAGDECL([], [include_expsyms], [1],
 
7208
    [Symbols that must always be exported])
 
7209
_LT_TAGDECL([], [prelink_cmds], [2],
 
7210
    [Commands necessary for linking programs (against libraries) with templates])
 
7211
_LT_TAGDECL([], [file_list_spec], [1],
 
7212
    [Specify filename containing input files])
 
7213
dnl FIXME: Not yet implemented
 
7214
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
 
7215
dnl    [Compiler flag to generate thread safe objects])
 
7216
])# _LT_LINKER_SHLIBS
 
7217
 
 
7218
 
 
7219
# _LT_LANG_C_CONFIG([TAG])
 
7220
# ------------------------
 
7221
# Ensure that the configuration variables for a C compiler are suitably
 
7222
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
7223
# the compiler configuration to `libtool'.
 
7224
m4_defun([_LT_LANG_C_CONFIG],
 
7225
[m4_require([_LT_DECL_EGREP])dnl
 
7226
lt_save_CC="$CC"
 
7227
AC_LANG_PUSH(C)
 
7228
 
 
7229
# Source file extension for C test sources.
 
7230
ac_ext=c
 
7231
 
 
7232
# Object file extension for compiled C test sources.
 
7233
objext=o
 
7234
_LT_TAGVAR(objext, $1)=$objext
 
7235
 
 
7236
# Code to be used in simple compile tests
 
7237
lt_simple_compile_test_code="int some_variable = 0;"
 
7238
 
 
7239
# Code to be used in simple link tests
 
7240
lt_simple_link_test_code='int main(){return(0);}'
 
7241
 
 
7242
_LT_TAG_COMPILER
 
7243
# Save the default compiler, since it gets overwritten when the other
 
7244
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
 
7245
compiler_DEFAULT=$CC
 
7246
 
 
7247
# save warnings/boilerplate of simple test code
 
7248
_LT_COMPILER_BOILERPLATE
 
7249
_LT_LINKER_BOILERPLATE
 
7250
 
 
7251
if test -n "$compiler"; then
 
7252
  _LT_COMPILER_NO_RTTI($1)
 
7253
  _LT_COMPILER_PIC($1)
 
7254
  _LT_COMPILER_C_O($1)
 
7255
  _LT_COMPILER_FILE_LOCKS($1)
 
7256
  _LT_LINKER_SHLIBS($1)
 
7257
  _LT_SYS_DYNAMIC_LINKER($1)
 
7258
  _LT_LINKER_HARDCODE_LIBPATH($1)
 
7259
  LT_SYS_DLOPEN_SELF
 
7260
  _LT_CMD_STRIPLIB
 
7261
 
 
7262
  # Report which library types will actually be built
 
7263
  AC_MSG_CHECKING([if libtool supports shared libraries])
 
7264
  AC_MSG_RESULT([$can_build_shared])
 
7265
 
 
7266
  AC_MSG_CHECKING([whether to build shared libraries])
 
7267
  test "$can_build_shared" = "no" && enable_shared=no
 
7268
 
 
7269
  # On AIX, shared libraries and static libraries use the same namespace, and
 
7270
  # are all built from PIC.
 
7271
  case $host_os in
 
7272
  aix3*)
 
7273
    test "$enable_shared" = yes && enable_static=no
 
7274
    if test -n "$RANLIB"; then
 
7275
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
7276
      postinstall_cmds='$RANLIB $lib'
 
7277
    fi
 
7278
    ;;
 
7279
 
 
7280
  aix[[4-9]]*)
 
7281
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
7282
      test "$enable_shared" = yes && enable_static=no
 
7283
    fi
 
7284
    ;;
 
7285
  esac
 
7286
  AC_MSG_RESULT([$enable_shared])
 
7287
 
 
7288
  AC_MSG_CHECKING([whether to build static libraries])
 
7289
  # Make sure either enable_shared or enable_static is yes.
 
7290
  test "$enable_shared" = yes || enable_static=yes
 
7291
  AC_MSG_RESULT([$enable_static])
 
7292
 
 
7293
  _LT_CONFIG($1)
 
7294
fi
 
7295
AC_LANG_POP
 
7296
CC="$lt_save_CC"
 
7297
])# _LT_LANG_C_CONFIG
 
7298
 
 
7299
 
 
7300
# _LT_PROG_CXX
 
7301
# ------------
 
7302
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
 
7303
# compiler, we have our own version here.
 
7304
m4_defun([_LT_PROG_CXX],
 
7305
[
 
7306
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
 
7307
AC_PROG_CXX
 
7308
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
7309
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
7310
    (test "X$CXX" != "Xg++"))) ; then
 
7311
  AC_PROG_CXXCPP
 
7312
else
 
7313
  _lt_caught_CXX_error=yes
 
7314
fi
 
7315
popdef([AC_MSG_ERROR])
 
7316
])# _LT_PROG_CXX
 
7317
 
 
7318
dnl aclocal-1.4 backwards compatibility:
 
7319
dnl AC_DEFUN([_LT_PROG_CXX], [])
 
7320
 
 
7321
 
 
7322
# _LT_LANG_CXX_CONFIG([TAG])
 
7323
# --------------------------
 
7324
# Ensure that the configuration variables for a C++ compiler are suitably
 
7325
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
7326
# the compiler configuration to `libtool'.
 
7327
m4_defun([_LT_LANG_CXX_CONFIG],
 
7328
[AC_REQUIRE([_LT_PROG_CXX])dnl
 
7329
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
7330
m4_require([_LT_DECL_EGREP])dnl
 
7331
 
 
7332
AC_LANG_PUSH(C++)
 
7333
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7334
_LT_TAGVAR(allow_undefined_flag, $1)=
 
7335
_LT_TAGVAR(always_export_symbols, $1)=no
 
7336
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
7337
_LT_TAGVAR(compiler_needs_object, $1)=no
 
7338
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
7339
_LT_TAGVAR(hardcode_direct, $1)=no
 
7340
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
7341
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7342
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
7343
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
7344
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
7345
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
7346
_LT_TAGVAR(hardcode_automatic, $1)=no
 
7347
_LT_TAGVAR(inherit_rpath, $1)=no
 
7348
_LT_TAGVAR(module_cmds, $1)=
 
7349
_LT_TAGVAR(module_expsym_cmds, $1)=
 
7350
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
7351
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7352
_LT_TAGVAR(no_undefined_flag, $1)=
 
7353
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
7354
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
7355
 
 
7356
# Source file extension for C++ test sources.
 
7357
ac_ext=cpp
 
7358
 
 
7359
# Object file extension for compiled C++ test sources.
 
7360
objext=o
 
7361
_LT_TAGVAR(objext, $1)=$objext
 
7362
 
 
7363
# No sense in running all these tests if we already determined that
 
7364
# the CXX compiler isn't working.  Some variables (like enable_shared)
 
7365
# are currently assumed to apply to all compilers on this platform,
 
7366
# and will be corrupted by setting them based on a non-working compiler.
 
7367
if test "$_lt_caught_CXX_error" != yes; then
 
7368
  # Code to be used in simple compile tests
 
7369
  lt_simple_compile_test_code="int some_variable = 0;"
 
7370
 
 
7371
  # Code to be used in simple link tests
 
7372
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
 
7373
 
 
7374
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
7375
  _LT_TAG_COMPILER
 
7376
 
 
7377
  # save warnings/boilerplate of simple test code
 
7378
  _LT_COMPILER_BOILERPLATE
 
7379
  _LT_LINKER_BOILERPLATE
 
7380
 
 
7381
  # Allow CC to be a program name with arguments.
 
7382
  lt_save_CC=$CC
 
7383
  lt_save_LD=$LD
 
7384
  lt_save_GCC=$GCC
 
7385
  GCC=$GXX
 
7386
  lt_save_with_gnu_ld=$with_gnu_ld
 
7387
  lt_save_path_LD=$lt_cv_path_LD
 
7388
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
7389
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
7390
  else
 
7391
    $as_unset lt_cv_prog_gnu_ld
 
7392
  fi
 
7393
  if test -n "${lt_cv_path_LDCXX+set}"; then
 
7394
    lt_cv_path_LD=$lt_cv_path_LDCXX
 
7395
  else
 
7396
    $as_unset lt_cv_path_LD
 
7397
  fi
 
7398
  test -z "${LDCXX+set}" || LD=$LDCXX
 
7399
  CC=${CXX-"c++"}
 
7400
  compiler=$CC
 
7401
  _LT_TAGVAR(compiler, $1)=$CC
 
7402
  _LT_CC_BASENAME([$compiler])
 
7403
 
 
7404
  if test -n "$compiler"; then
 
7405
    # We don't want -fno-exception when compiling C++ code, so set the
 
7406
    # no_builtin_flag separately
 
7407
    if test "$GXX" = yes; then
 
7408
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
7409
    else
 
7410
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
7411
    fi
 
7412
 
 
7413
    if test "$GXX" = yes; then
 
7414
      # Set up default GNU C++ configuration
 
7415
 
 
7416
      LT_PATH_LD
 
7417
 
 
7418
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
7419
      # archiving commands below assume that GNU ld is being used.
 
7420
      if test "$with_gnu_ld" = yes; then
 
7421
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7422
        _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'
 
7423
 
 
7424
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7425
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7426
 
 
7427
        # If archive_cmds runs LD, not CC, wlarc should be empty
 
7428
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
7429
        #     investigate it a little bit more. (MM)
 
7430
        wlarc='${wl}'
 
7431
 
 
7432
        # ancient GNU ld didn't support --whole-archive et. al.
 
7433
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
 
7434
          $GREP 'no-whole-archive' > /dev/null; then
 
7435
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
7436
        else
 
7437
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
7438
        fi
 
7439
      else
 
7440
        with_gnu_ld=no
 
7441
        wlarc=
 
7442
 
 
7443
        # A generic and very simple default shared library creation
 
7444
        # command for GNU C++ for the case where it uses the native
 
7445
        # linker, instead of GNU ld.  If possible, this setting should
 
7446
        # overridden to take advantage of the native linker features on
 
7447
        # the platform it is being used on.
 
7448
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
7449
      fi
 
7450
 
 
7451
      # Commands to make compiler produce verbose output that lists
 
7452
      # what "hidden" libraries, object files and flags are used when
 
7453
      # linking a shared library.
 
7454
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
7455
 
 
7456
    else
 
7457
      GXX=no
 
7458
      with_gnu_ld=no
 
7459
      wlarc=
 
7460
    fi
 
7461
 
 
7462
    # PORTME: fill in a description of your system's C++ link characteristics
 
7463
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
7464
    _LT_TAGVAR(ld_shlibs, $1)=yes
 
7465
    case $host_os in
 
7466
      aix3*)
 
7467
        # FIXME: insert proper C++ library support
 
7468
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7469
        ;;
 
7470
      aix[[4-9]]*)
 
7471
        if test "$host_cpu" = ia64; then
 
7472
          # On IA64, the linker does run time linking by default, so we don't
 
7473
          # have to do anything special.
 
7474
          aix_use_runtimelinking=no
 
7475
          exp_sym_flag='-Bexport'
 
7476
          no_entry_flag=""
 
7477
        else
 
7478
          aix_use_runtimelinking=no
 
7479
 
 
7480
          # Test if we are trying to use run time linking or normal
 
7481
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
7482
          # need to do runtime linking.
 
7483
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 
7484
            for ld_flag in $LDFLAGS; do
 
7485
              case $ld_flag in
 
7486
              *-brtl*)
 
7487
                aix_use_runtimelinking=yes
 
7488
                break
 
7489
                ;;
 
7490
              esac
 
7491
            done
 
7492
            ;;
 
7493
          esac
 
7494
 
 
7495
          exp_sym_flag='-bexport'
 
7496
          no_entry_flag='-bnoentry'
 
7497
        fi
 
7498
 
 
7499
        # When large executables or shared objects are built, AIX ld can
 
7500
        # have problems creating the table of contents.  If linking a library
 
7501
        # or program results in "error TOC overflow" add -mminimal-toc to
 
7502
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
7503
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
7504
 
 
7505
        _LT_TAGVAR(archive_cmds, $1)=''
 
7506
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
7507
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
7508
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
7509
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7510
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
7511
 
 
7512
        if test "$GXX" = yes; then
 
7513
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
7514
          # We only want to do this on AIX 4.2 and lower, the check
 
7515
          # below for broken collect2 doesn't work under 4.3+
 
7516
          collect2name=`${CC} -print-prog-name=collect2`
 
7517
          if test -f "$collect2name" &&
 
7518
             strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 
7519
          then
 
7520
            # We have reworked collect2
 
7521
            :
 
7522
          else
 
7523
            # We have old collect2
 
7524
            _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
7525
            # It fails to find uninstalled libraries when the uninstalled
 
7526
            # path is not listed in the libpath.  Setting hardcode_minus_L
 
7527
            # to unsupported forces relinking
 
7528
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
7529
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7530
            _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
7531
          fi
 
7532
          esac
 
7533
          shared_flag='-shared'
 
7534
          if test "$aix_use_runtimelinking" = yes; then
 
7535
            shared_flag="$shared_flag "'${wl}-G'
 
7536
          fi
 
7537
        else
 
7538
          # not using gcc
 
7539
          if test "$host_cpu" = ia64; then
 
7540
          # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
7541
          # chokes on -Wl,-G. The following line is correct:
 
7542
          shared_flag='-G'
 
7543
          else
 
7544
            if test "$aix_use_runtimelinking" = yes; then
 
7545
              shared_flag='${wl}-G'
 
7546
            else
 
7547
              shared_flag='${wl}-bM:SRE'
 
7548
            fi
 
7549
          fi
 
7550
        fi
 
7551
 
 
7552
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
 
7553
        # It seems that -bexpall does not export symbols beginning with
 
7554
        # underscore (_), so it is better to generate a list of symbols to
 
7555
        # export.
 
7556
        _LT_TAGVAR(always_export_symbols, $1)=yes
 
7557
        if test "$aix_use_runtimelinking" = yes; then
 
7558
          # Warning - without using the other runtime loading flags (-brtl),
 
7559
          # -berok will link without error, but may produce a broken library.
 
7560
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
 
7561
          # Determine the default libpath from the value encoded in an empty
 
7562
          # executable.
 
7563
          _LT_SYS_MODULE_PATH_AIX
 
7564
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
7565
 
 
7566
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
7567
        else
 
7568
          if test "$host_cpu" = ia64; then
 
7569
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
7570
            _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
7571
            _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"
 
7572
          else
 
7573
            # Determine the default libpath from the value encoded in an
 
7574
            # empty executable.
 
7575
            _LT_SYS_MODULE_PATH_AIX
 
7576
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
7577
            # Warning - without using the other run time loading flags,
 
7578
            # -berok will link without error, but may produce a broken library.
 
7579
            _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
7580
            _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
7581
            # Exported symbols can be pulled into shared objects from archives
 
7582
            _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
7583
            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
7584
            # This is similar to how AIX traditionally builds its shared
 
7585
            # libraries.
 
7586
            _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'
 
7587
          fi
 
7588
        fi
 
7589
        ;;
 
7590
 
 
7591
      beos*)
 
7592
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
7593
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
7594
          # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
7595
          # support --undefined.  This deserves some investigation.  FIXME
 
7596
          _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7597
        else
 
7598
          _LT_TAGVAR(ld_shlibs, $1)=no
 
7599
        fi
 
7600
        ;;
 
7601
 
 
7602
      chorus*)
 
7603
        case $cc_basename in
 
7604
          *)
 
7605
          # FIXME: insert proper C++ library support
 
7606
          _LT_TAGVAR(ld_shlibs, $1)=no
 
7607
          ;;
 
7608
        esac
 
7609
        ;;
 
7610
 
 
7611
      cygwin* | mingw* | pw32* | cegcc*)
 
7612
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
7613
        # as there is no search path for DLLs.
 
7614
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7615
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
7616
        _LT_TAGVAR(always_export_symbols, $1)=no
 
7617
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
7618
 
 
7619
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
7620
          _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'
 
7621
          # If the export-symbols file already is a .def file (1st line
 
7622
          # is EXPORTS), use it as is; otherwise, prepend...
 
7623
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
7624
            cp $export_symbols $output_objdir/$soname.def;
 
7625
          else
 
7626
            echo EXPORTS > $output_objdir/$soname.def;
 
7627
            cat $export_symbols >> $output_objdir/$soname.def;
 
7628
          fi~
 
7629
          $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'
 
7630
        else
 
7631
          _LT_TAGVAR(ld_shlibs, $1)=no
 
7632
        fi
 
7633
        ;;
 
7634
      darwin* | rhapsody*)
 
7635
        _LT_DARWIN_LINKER_FEATURES($1)
 
7636
        ;;
 
7637
 
 
7638
      dgux*)
 
7639
        case $cc_basename in
 
7640
          ec++*)
 
7641
            # FIXME: insert proper C++ library support
 
7642
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7643
            ;;
 
7644
          ghcx*)
 
7645
            # Green Hills C++ Compiler
 
7646
            # FIXME: insert proper C++ library support
 
7647
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7648
            ;;
 
7649
          *)
 
7650
            # FIXME: insert proper C++ library support
 
7651
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7652
            ;;
 
7653
        esac
 
7654
        ;;
 
7655
 
 
7656
      freebsd[[12]]*)
 
7657
        # C++ shared libraries reported to be fairly broken before
 
7658
        # switch to ELF
 
7659
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7660
        ;;
 
7661
 
 
7662
      freebsd-elf*)
 
7663
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7664
        ;;
 
7665
 
 
7666
      freebsd* | dragonfly*)
 
7667
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
7668
        # conventions
 
7669
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
7670
        ;;
 
7671
 
 
7672
      gnu*)
 
7673
        ;;
 
7674
 
 
7675
      hpux9*)
 
7676
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
7677
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7678
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7679
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
7680
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
7681
                                             # but as the default
 
7682
                                             # location of the library.
 
7683
 
 
7684
        case $cc_basename in
 
7685
          CC*)
 
7686
            # FIXME: insert proper C++ library support
 
7687
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7688
            ;;
 
7689
          aCC*)
 
7690
            _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'
 
7691
            # Commands to make compiler produce verbose output that lists
 
7692
            # what "hidden" libraries, object files and flags are used when
 
7693
            # linking a shared library.
 
7694
            #
 
7695
            # There doesn't appear to be a way to prevent this compiler from
 
7696
            # explicitly linking system object files so we need to strip them
 
7697
            # from the output so that they don't get included in the library
 
7698
            # dependencies.
 
7699
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
7700
            ;;
 
7701
          *)
 
7702
            if test "$GXX" = yes; then
 
7703
              _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'
 
7704
            else
 
7705
              # FIXME: insert proper C++ library support
 
7706
              _LT_TAGVAR(ld_shlibs, $1)=no
 
7707
            fi
 
7708
            ;;
 
7709
        esac
 
7710
        ;;
 
7711
 
 
7712
      hpux10*|hpux11*)
 
7713
        if test $with_gnu_ld = no; then
 
7714
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
7715
          _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7716
 
 
7717
          case $host_cpu in
 
7718
            hppa*64*|ia64*)
 
7719
              ;;
 
7720
            *)
 
7721
              _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7722
              ;;
 
7723
          esac
 
7724
        fi
 
7725
        case $host_cpu in
 
7726
          hppa*64*|ia64*)
 
7727
            _LT_TAGVAR(hardcode_direct, $1)=no
 
7728
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7729
            ;;
 
7730
          *)
 
7731
            _LT_TAGVAR(hardcode_direct, $1)=yes
 
7732
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
7733
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
7734
                                                 # but as the default
 
7735
                                                 # location of the library.
 
7736
            ;;
 
7737
        esac
 
7738
 
 
7739
        case $cc_basename in
 
7740
          CC*)
 
7741
            # FIXME: insert proper C++ library support
 
7742
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7743
            ;;
 
7744
          aCC*)
 
7745
            case $host_cpu in
 
7746
              hppa*64*)
 
7747
                _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7748
                ;;
 
7749
              ia64*)
 
7750
                _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7751
                ;;
 
7752
              *)
 
7753
                _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'
 
7754
                ;;
 
7755
            esac
 
7756
            # Commands to make compiler produce verbose output that lists
 
7757
            # what "hidden" libraries, object files and flags are used when
 
7758
            # linking a shared library.
 
7759
            #
 
7760
            # There doesn't appear to be a way to prevent this compiler from
 
7761
            # explicitly linking system object files so we need to strip them
 
7762
            # from the output so that they don't get included in the library
 
7763
            # dependencies.
 
7764
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
7765
            ;;
 
7766
          *)
 
7767
            if test "$GXX" = yes; then
 
7768
              if test $with_gnu_ld = no; then
 
7769
                case $host_cpu in
 
7770
                  hppa*64*)
 
7771
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7772
                    ;;
 
7773
                  ia64*)
 
7774
                    _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'
 
7775
                    ;;
 
7776
                  *)
 
7777
                    _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'
 
7778
                    ;;
 
7779
                esac
 
7780
              fi
 
7781
            else
 
7782
              # FIXME: insert proper C++ library support
 
7783
              _LT_TAGVAR(ld_shlibs, $1)=no
 
7784
            fi
 
7785
            ;;
 
7786
        esac
 
7787
        ;;
 
7788
 
 
7789
      interix[[3-9]]*)
 
7790
        _LT_TAGVAR(hardcode_direct, $1)=no
 
7791
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7792
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7793
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7794
        # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
7795
        # Instead, shared libraries are loaded at an image base (0x10000000 by
 
7796
        # default) and relocated if they conflict, which is a slow very memory
 
7797
        # consuming and fragmenting process.  To avoid this, we pick a random,
 
7798
        # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
7799
        # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
7800
        _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'
 
7801
        _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'
 
7802
        ;;
 
7803
      irix5* | irix6*)
 
7804
        case $cc_basename in
 
7805
          CC*)
 
7806
            # SGI C++
 
7807
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
7808
 
 
7809
            # Archives containing C++ object files must be created using
 
7810
            # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
7811
            # necessary to make sure instantiated templates are included
 
7812
            # in the archive.
 
7813
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
7814
            ;;
 
7815
          *)
 
7816
            if test "$GXX" = yes; then
 
7817
              if test "$with_gnu_ld" = no; then
 
7818
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
7819
              else
 
7820
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
 
7821
              fi
 
7822
            fi
 
7823
            _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7824
            ;;
 
7825
        esac
 
7826
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7827
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7828
        _LT_TAGVAR(inherit_rpath, $1)=yes
 
7829
        ;;
 
7830
 
 
7831
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
7832
        case $cc_basename in
 
7833
          KCC*)
 
7834
            # Kuck and Associates, Inc. (KAI) C++ Compiler
 
7835
 
 
7836
            # KCC will only create a shared library if the output file
 
7837
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
7838
            # to its proper name (with version) after linking.
 
7839
            _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'
 
7840
            _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'
 
7841
            # Commands to make compiler produce verbose output that lists
 
7842
            # what "hidden" libraries, object files and flags are used when
 
7843
            # linking a shared library.
 
7844
            #
 
7845
            # There doesn't appear to be a way to prevent this compiler from
 
7846
            # explicitly linking system object files so we need to strip them
 
7847
            # from the output so that they don't get included in the library
 
7848
            # dependencies.
 
7849
            output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
7850
 
 
7851
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7852
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7853
 
 
7854
            # Archives containing C++ object files must be created using
 
7855
            # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
7856
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
7857
            ;;
 
7858
          icpc* | ecpc* )
 
7859
            # Intel C++
 
7860
            with_gnu_ld=yes
 
7861
            # version 8.0 and above of icpc choke on multiply defined symbols
 
7862
            # if we add $predep_objects and $postdep_objects, however 7.1 and
 
7863
            # earlier do not add the objects themselves.
 
7864
            case `$CC -V 2>&1` in
 
7865
              *"Version 7."*)
 
7866
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7867
                _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'
 
7868
                ;;
 
7869
              *)  # Version 8.0 or newer
 
7870
                tmp_idyn=
 
7871
                case $host_cpu in
 
7872
                  ia64*) tmp_idyn=' -i_dynamic';;
 
7873
                esac
 
7874
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7875
                _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'
 
7876
                ;;
 
7877
            esac
 
7878
            _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7879
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7880
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7881
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
7882
            ;;
 
7883
          pgCC* | pgcpp*)
 
7884
            # Portland Group C++ compiler
 
7885
            case `$CC -V` in
 
7886
            *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
 
7887
              _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
 
7888
                rm -rf $tpldir~
 
7889
                $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
 
7890
                compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
 
7891
              _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
 
7892
                rm -rf $tpldir~
 
7893
                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
 
7894
                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
 
7895
                $RANLIB $oldlib'
 
7896
              _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
 
7897
                rm -rf $tpldir~
 
7898
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
 
7899
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
7900
              _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
 
7901
                rm -rf $tpldir~
 
7902
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
 
7903
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 
7904
              ;;
 
7905
            *) # Version 6 will use weak symbols
 
7906
              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
7907
              _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'
 
7908
              ;;
 
7909
            esac
 
7910
 
 
7911
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
7912
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7913
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
7914
            ;;
 
7915
          cxx*)
 
7916
            # Compaq C++
 
7917
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7918
            _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'
 
7919
 
 
7920
            runpath_var=LD_RUN_PATH
 
7921
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
7922
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7923
 
 
7924
            # Commands to make compiler produce verbose output that lists
 
7925
            # what "hidden" libraries, object files and flags are used when
 
7926
            # linking a shared library.
 
7927
            #
 
7928
            # There doesn't appear to be a way to prevent this compiler from
 
7929
            # explicitly linking system object files so we need to strip them
 
7930
            # from the output so that they don't get included in the library
 
7931
            # dependencies.
 
7932
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
7933
            ;;
 
7934
          xl*)
 
7935
            # IBM XL 8.0 on PPC, with GNU ld
 
7936
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7937
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7938
            _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7939
            if test "x$supports_anon_versioning" = xyes; then
 
7940
              _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
7941
                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
7942
                echo "local: *; };" >> $output_objdir/$libname.ver~
 
7943
                $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
7944
            fi
 
7945
            ;;
 
7946
          *)
 
7947
            case `$CC -V 2>&1 | sed 5q` in
 
7948
            *Sun\ C*)
 
7949
              # Sun C++ 5.9
 
7950
              _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
7951
              _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7952
              _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'
 
7953
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7954
              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
 
7955
              _LT_TAGVAR(compiler_needs_object, $1)=yes
 
7956
 
 
7957
              # Not sure whether something based on
 
7958
              # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
 
7959
              # would be better.
 
7960
              output_verbose_link_cmd='echo'
 
7961
 
 
7962
              # Archives containing C++ object files must be created using
 
7963
              # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
7964
              # necessary to make sure instantiated templates are included
 
7965
              # in the archive.
 
7966
              _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
7967
              ;;
 
7968
            esac
 
7969
            ;;
 
7970
        esac
 
7971
        ;;
 
7972
 
 
7973
      lynxos*)
 
7974
        # FIXME: insert proper C++ library support
 
7975
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7976
        ;;
 
7977
 
 
7978
      m88k*)
 
7979
        # FIXME: insert proper C++ library support
 
7980
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7981
        ;;
 
7982
 
 
7983
      mvs*)
 
7984
        case $cc_basename in
 
7985
          cxx*)
 
7986
            # FIXME: insert proper C++ library support
 
7987
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7988
            ;;
 
7989
          *)
 
7990
            # FIXME: insert proper C++ library support
 
7991
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7992
            ;;
 
7993
        esac
 
7994
        ;;
 
7995
 
 
7996
      netbsd*)
 
7997
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
7998
          _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
7999
          wlarc=
 
8000
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
8001
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
8002
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8003
        fi
 
8004
        # Workaround some broken pre-1.5 toolchains
 
8005
        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
8006
        ;;
 
8007
 
 
8008
      *nto* | *qnx*)
 
8009
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
8010
        ;;
 
8011
 
 
8012
      openbsd2*)
 
8013
        # C++ shared libraries are fairly broken
 
8014
        _LT_TAGVAR(ld_shlibs, $1)=no
 
8015
        ;;
 
8016
 
 
8017
      openbsd*)
 
8018
        if test -f /usr/libexec/ld.so; then
 
8019
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
8020
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8021
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
8022
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
8023
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8024
          if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
8025
            _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'
 
8026
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
8027
            _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
8028
          fi
 
8029
          output_verbose_link_cmd=echo
 
8030
        else
 
8031
          _LT_TAGVAR(ld_shlibs, $1)=no
 
8032
        fi
 
8033
        ;;
 
8034
 
 
8035
      osf3* | osf4* | osf5*)
 
8036
        case $cc_basename in
 
8037
          KCC*)
 
8038
            # Kuck and Associates, Inc. (KAI) C++ Compiler
 
8039
 
 
8040
            # KCC will only create a shared library if the output file
 
8041
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
8042
            # to its proper name (with version) after linking.
 
8043
            _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'
 
8044
 
 
8045
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
8046
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
8047
 
 
8048
            # Archives containing C++ object files must be created using
 
8049
            # the KAI C++ compiler.
 
8050
            case $host in
 
8051
              osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
 
8052
              *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
 
8053
            esac
 
8054
            ;;
 
8055
          RCC*)
 
8056
            # Rational C++ 2.4.1
 
8057
            # FIXME: insert proper C++ library support
 
8058
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8059
            ;;
 
8060
          cxx*)
 
8061
            case $host in
 
8062
              osf3*)
 
8063
                _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8064
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
8065
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8066
                ;;
 
8067
              *)
 
8068
                _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
8069
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
 
8070
                _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
8071
                  echo "-hidden">> $lib.exp~
 
8072
                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
 
8073
                  $RM $lib.exp'
 
8074
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
8075
                ;;
 
8076
            esac
 
8077
 
 
8078
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
8079
 
 
8080
            # Commands to make compiler produce verbose output that lists
 
8081
            # what "hidden" libraries, object files and flags are used when
 
8082
            # linking a shared library.
 
8083
            #
 
8084
            # There doesn't appear to be a way to prevent this compiler from
 
8085
            # explicitly linking system object files so we need to strip them
 
8086
            # from the output so that they don't get included in the library
 
8087
            # dependencies.
 
8088
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 
8089
            ;;
 
8090
          *)
 
8091
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8092
              _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
8093
              case $host in
 
8094
                osf3*)
 
8095
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
8096
                  ;;
 
8097
                *)
 
8098
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
8099
                  ;;
 
8100
              esac
 
8101
 
 
8102
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
8103
              _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
8104
 
 
8105
              # Commands to make compiler produce verbose output that lists
 
8106
              # what "hidden" libraries, object files and flags are used when
 
8107
              # linking a shared library.
 
8108
              output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
8109
 
 
8110
            else
 
8111
              # FIXME: insert proper C++ library support
 
8112
              _LT_TAGVAR(ld_shlibs, $1)=no
 
8113
            fi
 
8114
            ;;
 
8115
        esac
 
8116
        ;;
 
8117
 
 
8118
      psos*)
 
8119
        # FIXME: insert proper C++ library support
 
8120
        _LT_TAGVAR(ld_shlibs, $1)=no
 
8121
        ;;
 
8122
 
 
8123
      sunos4*)
 
8124
        case $cc_basename in
 
8125
          CC*)
 
8126
            # Sun C++ 4.x
 
8127
            # FIXME: insert proper C++ library support
 
8128
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8129
            ;;
 
8130
          lcc*)
 
8131
            # Lucid
 
8132
            # FIXME: insert proper C++ library support
 
8133
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8134
            ;;
 
8135
          *)
 
8136
            # FIXME: insert proper C++ library support
 
8137
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8138
            ;;
 
8139
        esac
 
8140
        ;;
 
8141
 
 
8142
      solaris*)
 
8143
        case $cc_basename in
 
8144
          CC*)
 
8145
            # Sun C++ 4.2, 5.x and Centerline C++
 
8146
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
 
8147
            _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
8148
            _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8149
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
8150
              $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'
 
8151
 
 
8152
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
8153
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8154
            case $host_os in
 
8155
              solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
8156
              *)
 
8157
                # The compiler driver will combine and reorder linker options,
 
8158
                # but understands `-z linker_flag'.
 
8159
                # Supported since Solaris 2.6 (maybe 2.5.1?)
 
8160
                _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 
8161
                ;;
 
8162
            esac
 
8163
            _LT_TAGVAR(link_all_deplibs, $1)=yes
 
8164
 
 
8165
            output_verbose_link_cmd='echo'
 
8166
 
 
8167
            # Archives containing C++ object files must be created using
 
8168
            # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
8169
            # necessary to make sure instantiated templates are included
 
8170
            # in the archive.
 
8171
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
8172
            ;;
 
8173
          gcx*)
 
8174
            # Green Hills C++ Compiler
 
8175
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8176
 
 
8177
            # The C++ compiler must be used to create the archive.
 
8178
            _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
8179
            ;;
 
8180
          *)
 
8181
            # GNU C++ compiler with Solaris linker
 
8182
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
8183
              _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
8184
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
 
8185
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8186
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
8187
                  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
8188
 
 
8189
                # Commands to make compiler produce verbose output that lists
 
8190
                # what "hidden" libraries, object files and flags are used when
 
8191
                # linking a shared library.
 
8192
                output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
8193
              else
 
8194
                # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
8195
                # platform.
 
8196
                _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
8197
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
8198
                  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
8199
 
 
8200
                # Commands to make compiler produce verbose output that lists
 
8201
                # what "hidden" libraries, object files and flags are used when
 
8202
                # linking a shared library.
 
8203
                output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
8204
              fi
 
8205
 
 
8206
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
8207
              case $host_os in
 
8208
                solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
8209
                *)
 
8210
                  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
8211
                  ;;
 
8212
              esac
 
8213
            fi
 
8214
            ;;
 
8215
        esac
 
8216
        ;;
 
8217
 
 
8218
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
8219
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
8220
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8221
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8222
      runpath_var='LD_RUN_PATH'
 
8223
 
 
8224
      case $cc_basename in
 
8225
        CC*)
 
8226
          _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8227
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8228
          ;;
 
8229
        *)
 
8230
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8231
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8232
          ;;
 
8233
      esac
 
8234
      ;;
 
8235
 
 
8236
      sysv5* | sco3.2v5* | sco5v6*)
 
8237
        # Note: We can NOT use -z defs as we might desire, because we do not
 
8238
        # link with -lc, and that would cause any symbols used from libc to
 
8239
        # always be unresolved, which means just about no library would
 
8240
        # ever link correctly.  If we're not using GNU ld we use -z text
 
8241
        # though, which does catch some bad symbols but isn't as heavy-handed
 
8242
        # as -z defs.
 
8243
        _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
8244
        _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
8245
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8246
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
8247
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
 
8248
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
8249
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
8250
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
8251
        runpath_var='LD_RUN_PATH'
 
8252
 
 
8253
        case $cc_basename in
 
8254
          CC*)
 
8255
            _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8256
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8257
            ;;
 
8258
          *)
 
8259
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8260
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
8261
            ;;
 
8262
        esac
 
8263
      ;;
 
8264
 
 
8265
      tandem*)
 
8266
        case $cc_basename in
 
8267
          NCC*)
 
8268
            # NonStop-UX NCC 3.20
 
8269
            # FIXME: insert proper C++ library support
 
8270
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8271
            ;;
 
8272
          *)
 
8273
            # FIXME: insert proper C++ library support
 
8274
            _LT_TAGVAR(ld_shlibs, $1)=no
 
8275
            ;;
 
8276
        esac
 
8277
        ;;
 
8278
 
 
8279
      vxworks*)
 
8280
        # FIXME: insert proper C++ library support
 
8281
        _LT_TAGVAR(ld_shlibs, $1)=no
 
8282
        ;;
 
8283
 
 
8284
      *)
 
8285
        # FIXME: insert proper C++ library support
 
8286
        _LT_TAGVAR(ld_shlibs, $1)=no
 
8287
        ;;
 
8288
    esac
 
8289
 
 
8290
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
 
8291
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
8292
 
 
8293
    _LT_TAGVAR(GCC, $1)="$GXX"
 
8294
    _LT_TAGVAR(LD, $1)="$LD"
 
8295
 
 
8296
    ## CAVEAT EMPTOR:
 
8297
    ## There is no encapsulation within the following macros, do not change
 
8298
    ## the running order or otherwise move them around unless you know exactly
 
8299
    ## what you are doing...
 
8300
    _LT_SYS_HIDDEN_LIBDEPS($1)
 
8301
    _LT_COMPILER_PIC($1)
 
8302
    _LT_COMPILER_C_O($1)
 
8303
    _LT_COMPILER_FILE_LOCKS($1)
 
8304
    _LT_LINKER_SHLIBS($1)
 
8305
    _LT_SYS_DYNAMIC_LINKER($1)
 
8306
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
8307
 
 
8308
    _LT_CONFIG($1)
 
8309
  fi # test -n "$compiler"
 
8310
 
 
8311
  CC=$lt_save_CC
 
8312
  LDCXX=$LD
 
8313
  LD=$lt_save_LD
 
8314
  GCC=$lt_save_GCC
 
8315
  with_gnu_ld=$lt_save_with_gnu_ld
 
8316
  lt_cv_path_LDCXX=$lt_cv_path_LD
 
8317
  lt_cv_path_LD=$lt_save_path_LD
 
8318
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
8319
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
8320
fi # test "$_lt_caught_CXX_error" != yes
 
8321
 
 
8322
AC_LANG_POP
 
8323
])# _LT_LANG_CXX_CONFIG
 
8324
 
 
8325
 
 
8326
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 
8327
# ---------------------------------
 
8328
# Figure out "hidden" library dependencies from verbose
 
8329
# compiler output when linking a shared library.
 
8330
# Parse the compiler output and extract the necessary
 
8331
# objects, libraries and library flags.
 
8332
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
 
8333
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
8334
# Dependencies to place before and after the object being linked:
 
8335
_LT_TAGVAR(predep_objects, $1)=
 
8336
_LT_TAGVAR(postdep_objects, $1)=
 
8337
_LT_TAGVAR(predeps, $1)=
 
8338
_LT_TAGVAR(postdeps, $1)=
 
8339
_LT_TAGVAR(compiler_lib_search_path, $1)=
 
8340
 
 
8341
dnl we can't use the lt_simple_compile_test_code here,
 
8342
dnl because it contains code intended for an executable,
 
8343
dnl not a library.  It's possible we should let each
 
8344
dnl tag define a new lt_????_link_test_code variable,
 
8345
dnl but it's only used here...
 
8346
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
 
8347
int a;
 
8348
void foo (void) { a = 0; }
 
8349
_LT_EOF
 
8350
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
 
8351
class Foo
 
8352
{
 
8353
public:
 
8354
  Foo (void) { a = 0; }
 
8355
private:
 
8356
  int a;
 
8357
};
 
8358
_LT_EOF
 
8359
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
 
8360
      subroutine foo
 
8361
      implicit none
 
8362
      integer*4 a
 
8363
      a=0
 
8364
      return
 
8365
      end
 
8366
_LT_EOF
 
8367
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
 
8368
      subroutine foo
 
8369
      implicit none
 
8370
      integer a
 
8371
      a=0
 
8372
      return
 
8373
      end
 
8374
_LT_EOF
 
8375
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
 
8376
public class foo {
 
8377
  private int a;
 
8378
  public void bar (void) {
 
8379
    a = 0;
 
8380
  }
 
8381
};
 
8382
_LT_EOF
 
8383
])
 
8384
dnl Parse the compiler output and extract the necessary
 
8385
dnl objects, libraries and library flags.
 
8386
if AC_TRY_EVAL(ac_compile); then
 
8387
  # Parse the compiler output and extract the necessary
 
8388
  # objects, libraries and library flags.
 
8389
 
 
8390
  # Sentinel used to keep track of whether or not we are before
 
8391
  # the conftest object file.
 
8392
  pre_test_object_deps_done=no
 
8393
 
 
8394
  for p in `eval "$output_verbose_link_cmd"`; do
 
8395
    case $p in
 
8396
 
 
8397
    -L* | -R* | -l*)
 
8398
       # Some compilers place space between "-{L,R}" and the path.
 
8399
       # Remove the space.
 
8400
       if test $p = "-L" ||
 
8401
          test $p = "-R"; then
 
8402
         prev=$p
 
8403
         continue
 
8404
       else
 
8405
         prev=
 
8406
       fi
 
8407
 
 
8408
       if test "$pre_test_object_deps_done" = no; then
 
8409
         case $p in
 
8410
         -L* | -R*)
 
8411
           # Internal compiler library paths should come after those
 
8412
           # provided the user.  The postdeps already come after the
 
8413
           # user supplied libs so there is no need to process them.
 
8414
           if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
 
8415
             _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
8416
           else
 
8417
             _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
8418
           fi
 
8419
           ;;
 
8420
         # The "-l" case would never come before the object being
 
8421
         # linked, so don't bother handling this case.
 
8422
         esac
 
8423
       else
 
8424
         if test -z "$_LT_TAGVAR(postdeps, $1)"; then
 
8425
           _LT_TAGVAR(postdeps, $1)="${prev}${p}"
 
8426
         else
 
8427
           _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
 
8428
         fi
 
8429
       fi
 
8430
       ;;
 
8431
 
 
8432
    *.$objext)
 
8433
       # This assumes that the test object file only shows up
 
8434
       # once in the compiler output.
 
8435
       if test "$p" = "conftest.$objext"; then
 
8436
         pre_test_object_deps_done=yes
 
8437
         continue
 
8438
       fi
 
8439
 
 
8440
       if test "$pre_test_object_deps_done" = no; then
 
8441
         if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
 
8442
           _LT_TAGVAR(predep_objects, $1)="$p"
 
8443
         else
 
8444
           _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
 
8445
         fi
 
8446
       else
 
8447
         if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
 
8448
           _LT_TAGVAR(postdep_objects, $1)="$p"
 
8449
         else
 
8450
           _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
 
8451
         fi
 
8452
       fi
 
8453
       ;;
 
8454
 
 
8455
    *) ;; # Ignore the rest.
 
8456
 
 
8457
    esac
 
8458
  done
 
8459
 
 
8460
  # Clean up.
 
8461
  rm -f a.out a.exe
 
8462
else
 
8463
  echo "libtool.m4: error: problem compiling $1 test program"
 
8464
fi
 
8465
 
 
8466
$RM -f confest.$objext
 
8467
 
 
8468
# PORTME: override above test on systems where it is broken
 
8469
m4_if([$1], [CXX],
 
8470
[case $host_os in
 
8471
interix[[3-9]]*)
 
8472
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
 
8473
  # hack all around it, let's just trust "g++" to DTRT.
 
8474
  _LT_TAGVAR(predep_objects,$1)=
 
8475
  _LT_TAGVAR(postdep_objects,$1)=
 
8476
  _LT_TAGVAR(postdeps,$1)=
 
8477
  ;;
 
8478
 
 
8479
linux*)
 
8480
  case `$CC -V 2>&1 | sed 5q` in
 
8481
  *Sun\ C*)
 
8482
    # Sun C++ 5.9
 
8483
 
 
8484
    # The more standards-conforming stlport4 library is
 
8485
    # incompatible with the Cstd library. Avoid specifying
 
8486
    # it if it's in CXXFLAGS. Ignore libCrun as
 
8487
    # -library=stlport4 depends on it.
 
8488
    case " $CXX $CXXFLAGS " in
 
8489
    *" -library=stlport4 "*)
 
8490
      solaris_use_stlport4=yes
 
8491
      ;;
 
8492
    esac
 
8493
 
 
8494
    if test "$solaris_use_stlport4" != yes; then
 
8495
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
8496
    fi
 
8497
    ;;
 
8498
  esac
 
8499
  ;;
 
8500
 
 
8501
solaris*)
 
8502
  case $cc_basename in
 
8503
  CC*)
 
8504
    # The more standards-conforming stlport4 library is
 
8505
    # incompatible with the Cstd library. Avoid specifying
 
8506
    # it if it's in CXXFLAGS. Ignore libCrun as
 
8507
    # -library=stlport4 depends on it.
 
8508
    case " $CXX $CXXFLAGS " in
 
8509
    *" -library=stlport4 "*)
 
8510
      solaris_use_stlport4=yes
 
8511
      ;;
 
8512
    esac
 
8513
 
 
8514
    # Adding this requires a known-good setup of shared libraries for
 
8515
    # Sun compiler versions before 5.6, else PIC objects from an old
 
8516
    # archive will be linked into the output, leading to subtle bugs.
 
8517
    if test "$solaris_use_stlport4" != yes; then
 
8518
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
8519
    fi
 
8520
    ;;
 
8521
  esac
 
8522
  ;;
 
8523
esac
 
8524
])
 
8525
 
 
8526
case " $_LT_TAGVAR(postdeps, $1) " in
 
8527
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
8528
esac
 
8529
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
 
8530
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
 
8531
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
 
8532
fi
 
8533
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
 
8534
    [The directories searched by this compiler when creating a shared library])
 
8535
_LT_TAGDECL([], [predep_objects], [1],
 
8536
    [Dependencies to place before and after the objects being linked to
 
8537
    create a shared library])
 
8538
_LT_TAGDECL([], [postdep_objects], [1])
 
8539
_LT_TAGDECL([], [predeps], [1])
 
8540
_LT_TAGDECL([], [postdeps], [1])
 
8541
_LT_TAGDECL([], [compiler_lib_search_path], [1],
 
8542
    [The library search path used internally by the compiler when linking
 
8543
    a shared library])
 
8544
])# _LT_SYS_HIDDEN_LIBDEPS
 
8545
 
 
8546
 
 
8547
# _LT_PROG_F77
 
8548
# ------------
 
8549
# Since AC_PROG_F77 is broken, in that it returns the empty string
 
8550
# if there is no fortran compiler, we have our own version here.
 
8551
m4_defun([_LT_PROG_F77],
 
8552
[
 
8553
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
 
8554
AC_PROG_F77
 
8555
if test -z "$F77" || test "X$F77" = "Xno"; then
 
8556
  _lt_disable_F77=yes
 
8557
fi
 
8558
popdef([AC_MSG_ERROR])
 
8559
])# _LT_PROG_F77
 
8560
 
 
8561
dnl aclocal-1.4 backwards compatibility:
 
8562
dnl AC_DEFUN([_LT_PROG_F77], [])
 
8563
 
 
8564
 
 
8565
# _LT_LANG_F77_CONFIG([TAG])
 
8566
# --------------------------
 
8567
# Ensure that the configuration variables for a Fortran 77 compiler are
 
8568
# suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8569
# to write the compiler configuration to `libtool'.
 
8570
m4_defun([_LT_LANG_F77_CONFIG],
 
8571
[AC_REQUIRE([_LT_PROG_F77])dnl
 
8572
AC_LANG_PUSH(Fortran 77)
 
8573
 
 
8574
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8575
_LT_TAGVAR(allow_undefined_flag, $1)=
 
8576
_LT_TAGVAR(always_export_symbols, $1)=no
 
8577
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
8578
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
8579
_LT_TAGVAR(hardcode_direct, $1)=no
 
8580
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
8581
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
8582
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
8583
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
8584
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
8585
_LT_TAGVAR(hardcode_automatic, $1)=no
 
8586
_LT_TAGVAR(inherit_rpath, $1)=no
 
8587
_LT_TAGVAR(module_cmds, $1)=
 
8588
_LT_TAGVAR(module_expsym_cmds, $1)=
 
8589
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
8590
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8591
_LT_TAGVAR(no_undefined_flag, $1)=
 
8592
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
8593
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
8594
 
 
8595
# Source file extension for f77 test sources.
 
8596
ac_ext=f
 
8597
 
 
8598
# Object file extension for compiled f77 test sources.
 
8599
objext=o
 
8600
_LT_TAGVAR(objext, $1)=$objext
 
8601
 
 
8602
# No sense in running all these tests if we already determined that
 
8603
# the F77 compiler isn't working.  Some variables (like enable_shared)
 
8604
# are currently assumed to apply to all compilers on this platform,
 
8605
# and will be corrupted by setting them based on a non-working compiler.
 
8606
if test "$_lt_disable_F77" != yes; then
 
8607
  # Code to be used in simple compile tests
 
8608
  lt_simple_compile_test_code="\
 
8609
      subroutine t
 
8610
      return
 
8611
      end
 
8612
"
 
8613
 
 
8614
  # Code to be used in simple link tests
 
8615
  lt_simple_link_test_code="\
 
8616
      program t
 
8617
      end
 
8618
"
 
8619
 
 
8620
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8621
  _LT_TAG_COMPILER
 
8622
 
 
8623
  # save warnings/boilerplate of simple test code
 
8624
  _LT_COMPILER_BOILERPLATE
 
8625
  _LT_LINKER_BOILERPLATE
 
8626
 
 
8627
  # Allow CC to be a program name with arguments.
 
8628
  lt_save_CC="$CC"
 
8629
  lt_save_GCC=$GCC
 
8630
  CC=${F77-"f77"}
 
8631
  compiler=$CC
 
8632
  _LT_TAGVAR(compiler, $1)=$CC
 
8633
  _LT_CC_BASENAME([$compiler])
 
8634
  GCC=$G77
 
8635
  if test -n "$compiler"; then
 
8636
    AC_MSG_CHECKING([if libtool supports shared libraries])
 
8637
    AC_MSG_RESULT([$can_build_shared])
 
8638
 
 
8639
    AC_MSG_CHECKING([whether to build shared libraries])
 
8640
    test "$can_build_shared" = "no" && enable_shared=no
 
8641
 
 
8642
    # On AIX, shared libraries and static libraries use the same namespace, and
 
8643
    # are all built from PIC.
 
8644
    case $host_os in
 
8645
      aix3*)
 
8646
        test "$enable_shared" = yes && enable_static=no
 
8647
        if test -n "$RANLIB"; then
 
8648
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
8649
          postinstall_cmds='$RANLIB $lib'
 
8650
        fi
 
8651
        ;;
 
8652
      aix[[4-9]]*)
 
8653
        if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
8654
          test "$enable_shared" = yes && enable_static=no
 
8655
        fi
 
8656
        ;;
 
8657
    esac
 
8658
    AC_MSG_RESULT([$enable_shared])
 
8659
 
 
8660
    AC_MSG_CHECKING([whether to build static libraries])
 
8661
    # Make sure either enable_shared or enable_static is yes.
 
8662
    test "$enable_shared" = yes || enable_static=yes
 
8663
    AC_MSG_RESULT([$enable_static])
 
8664
 
 
8665
    _LT_TAGVAR(GCC, $1)="$G77"
 
8666
    _LT_TAGVAR(LD, $1)="$LD"
 
8667
 
 
8668
    ## CAVEAT EMPTOR:
 
8669
    ## There is no encapsulation within the following macros, do not change
 
8670
    ## the running order or otherwise move them around unless you know exactly
 
8671
    ## what you are doing...
 
8672
    _LT_COMPILER_PIC($1)
 
8673
    _LT_COMPILER_C_O($1)
 
8674
    _LT_COMPILER_FILE_LOCKS($1)
 
8675
    _LT_LINKER_SHLIBS($1)
 
8676
    _LT_SYS_DYNAMIC_LINKER($1)
 
8677
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
8678
 
 
8679
    _LT_CONFIG($1)
 
8680
  fi # test -n "$compiler"
 
8681
 
 
8682
  GCC=$lt_save_GCC
 
8683
  CC="$lt_save_CC"
 
8684
fi # test "$_lt_disable_F77" != yes
 
8685
 
 
8686
AC_LANG_POP
 
8687
])# _LT_LANG_F77_CONFIG
 
8688
 
 
8689
 
 
8690
# _LT_PROG_FC
 
8691
# -----------
 
8692
# Since AC_PROG_FC is broken, in that it returns the empty string
 
8693
# if there is no fortran compiler, we have our own version here.
 
8694
m4_defun([_LT_PROG_FC],
 
8695
[
 
8696
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
 
8697
AC_PROG_FC
 
8698
if test -z "$FC" || test "X$FC" = "Xno"; then
 
8699
  _lt_disable_FC=yes
 
8700
fi
 
8701
popdef([AC_MSG_ERROR])
 
8702
])# _LT_PROG_FC
 
8703
 
 
8704
dnl aclocal-1.4 backwards compatibility:
 
8705
dnl AC_DEFUN([_LT_PROG_FC], [])
 
8706
 
 
8707
 
 
8708
# _LT_LANG_FC_CONFIG([TAG])
 
8709
# -------------------------
 
8710
# Ensure that the configuration variables for a Fortran compiler are
 
8711
# suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8712
# to write the compiler configuration to `libtool'.
 
8713
m4_defun([_LT_LANG_FC_CONFIG],
 
8714
[AC_REQUIRE([_LT_PROG_FC])dnl
 
8715
AC_LANG_PUSH(Fortran)
 
8716
 
 
8717
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8718
_LT_TAGVAR(allow_undefined_flag, $1)=
 
8719
_LT_TAGVAR(always_export_symbols, $1)=no
 
8720
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
8721
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
8722
_LT_TAGVAR(hardcode_direct, $1)=no
 
8723
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
8724
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
8725
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
8726
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
8727
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
8728
_LT_TAGVAR(hardcode_automatic, $1)=no
 
8729
_LT_TAGVAR(inherit_rpath, $1)=no
 
8730
_LT_TAGVAR(module_cmds, $1)=
 
8731
_LT_TAGVAR(module_expsym_cmds, $1)=
 
8732
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
8733
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8734
_LT_TAGVAR(no_undefined_flag, $1)=
 
8735
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
8736
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
8737
 
 
8738
# Source file extension for fc test sources.
 
8739
ac_ext=${ac_fc_srcext-f}
 
8740
 
 
8741
# Object file extension for compiled fc test sources.
 
8742
objext=o
 
8743
_LT_TAGVAR(objext, $1)=$objext
 
8744
 
 
8745
# No sense in running all these tests if we already determined that
 
8746
# the FC compiler isn't working.  Some variables (like enable_shared)
 
8747
# are currently assumed to apply to all compilers on this platform,
 
8748
# and will be corrupted by setting them based on a non-working compiler.
 
8749
if test "$_lt_disable_FC" != yes; then
 
8750
  # Code to be used in simple compile tests
 
8751
  lt_simple_compile_test_code="\
 
8752
      subroutine t
 
8753
      return
 
8754
      end
 
8755
"
 
8756
 
 
8757
  # Code to be used in simple link tests
 
8758
  lt_simple_link_test_code="\
 
8759
      program t
 
8760
      end
 
8761
"
 
8762
 
 
8763
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8764
  _LT_TAG_COMPILER
 
8765
 
 
8766
  # save warnings/boilerplate of simple test code
 
8767
  _LT_COMPILER_BOILERPLATE
 
8768
  _LT_LINKER_BOILERPLATE
 
8769
 
 
8770
  # Allow CC to be a program name with arguments.
 
8771
  lt_save_CC="$CC"
 
8772
  lt_save_GCC=$GCC
 
8773
  CC=${FC-"f95"}
 
8774
  compiler=$CC
 
8775
  GCC=$ac_cv_fc_compiler_gnu
 
8776
 
 
8777
  _LT_TAGVAR(compiler, $1)=$CC
 
8778
  _LT_CC_BASENAME([$compiler])
 
8779
 
 
8780
  if test -n "$compiler"; then
 
8781
    AC_MSG_CHECKING([if libtool supports shared libraries])
 
8782
    AC_MSG_RESULT([$can_build_shared])
 
8783
 
 
8784
    AC_MSG_CHECKING([whether to build shared libraries])
 
8785
    test "$can_build_shared" = "no" && enable_shared=no
 
8786
 
 
8787
    # On AIX, shared libraries and static libraries use the same namespace, and
 
8788
    # are all built from PIC.
 
8789
    case $host_os in
 
8790
      aix3*)
 
8791
        test "$enable_shared" = yes && enable_static=no
 
8792
        if test -n "$RANLIB"; then
 
8793
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
8794
          postinstall_cmds='$RANLIB $lib'
 
8795
        fi
 
8796
        ;;
 
8797
      aix[[4-9]]*)
 
8798
        if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
8799
          test "$enable_shared" = yes && enable_static=no
 
8800
        fi
 
8801
        ;;
 
8802
    esac
 
8803
    AC_MSG_RESULT([$enable_shared])
 
8804
 
 
8805
    AC_MSG_CHECKING([whether to build static libraries])
 
8806
    # Make sure either enable_shared or enable_static is yes.
 
8807
    test "$enable_shared" = yes || enable_static=yes
 
8808
    AC_MSG_RESULT([$enable_static])
 
8809
 
 
8810
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
 
8811
    _LT_TAGVAR(LD, $1)="$LD"
 
8812
 
 
8813
    ## CAVEAT EMPTOR:
 
8814
    ## There is no encapsulation within the following macros, do not change
 
8815
    ## the running order or otherwise move them around unless you know exactly
 
8816
    ## what you are doing...
 
8817
    _LT_SYS_HIDDEN_LIBDEPS($1)
 
8818
    _LT_COMPILER_PIC($1)
 
8819
    _LT_COMPILER_C_O($1)
 
8820
    _LT_COMPILER_FILE_LOCKS($1)
 
8821
    _LT_LINKER_SHLIBS($1)
 
8822
    _LT_SYS_DYNAMIC_LINKER($1)
 
8823
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
8824
 
 
8825
    _LT_CONFIG($1)
 
8826
  fi # test -n "$compiler"
 
8827
 
 
8828
  GCC=$lt_save_GCC
 
8829
  CC="$lt_save_CC"
 
8830
fi # test "$_lt_disable_FC" != yes
 
8831
 
 
8832
AC_LANG_POP
 
8833
])# _LT_LANG_FC_CONFIG
 
8834
 
 
8835
 
 
8836
# _LT_LANG_GCJ_CONFIG([TAG])
 
8837
# --------------------------
 
8838
# Ensure that the configuration variables for the GNU Java Compiler compiler
 
8839
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8840
# to write the compiler configuration to `libtool'.
 
8841
m4_defun([_LT_LANG_GCJ_CONFIG],
 
8842
[AC_REQUIRE([LT_PROG_GCJ])dnl
 
8843
AC_LANG_SAVE
 
8844
 
 
8845
# Source file extension for Java test sources.
 
8846
ac_ext=java
 
8847
 
 
8848
# Object file extension for compiled Java test sources.
 
8849
objext=o
 
8850
_LT_TAGVAR(objext, $1)=$objext
 
8851
 
 
8852
# Code to be used in simple compile tests
 
8853
lt_simple_compile_test_code="class foo {}"
 
8854
 
 
8855
# Code to be used in simple link tests
 
8856
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
 
8857
 
 
8858
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8859
_LT_TAG_COMPILER
 
8860
 
 
8861
# save warnings/boilerplate of simple test code
 
8862
_LT_COMPILER_BOILERPLATE
 
8863
_LT_LINKER_BOILERPLATE
 
8864
 
 
8865
# Allow CC to be a program name with arguments.
 
8866
lt_save_CC="$CC"
 
8867
lt_save_GCC=$GCC
 
8868
GCC=yes
 
8869
CC=${GCJ-"gcj"}
 
8870
compiler=$CC
 
8871
_LT_TAGVAR(compiler, $1)=$CC
 
8872
_LT_TAGVAR(LD, $1)="$LD"
 
8873
_LT_CC_BASENAME([$compiler])
 
8874
 
 
8875
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
8876
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8877
 
 
8878
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8879
 
 
8880
if test -n "$compiler"; then
 
8881
  _LT_COMPILER_NO_RTTI($1)
 
8882
  _LT_COMPILER_PIC($1)
 
8883
  _LT_COMPILER_C_O($1)
 
8884
  _LT_COMPILER_FILE_LOCKS($1)
 
8885
  _LT_LINKER_SHLIBS($1)
 
8886
  _LT_LINKER_HARDCODE_LIBPATH($1)
 
8887
 
 
8888
  _LT_CONFIG($1)
 
8889
fi
 
8890
 
 
8891
AC_LANG_RESTORE
 
8892
 
 
8893
GCC=$lt_save_GCC
 
8894
CC="$lt_save_CC"
 
8895
])# _LT_LANG_GCJ_CONFIG
 
8896
 
 
8897
 
 
8898
# _LT_LANG_RC_CONFIG([TAG])
 
8899
# -------------------------
 
8900
# Ensure that the configuration variables for the Windows resource compiler
 
8901
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8902
# to write the compiler configuration to `libtool'.
 
8903
m4_defun([_LT_LANG_RC_CONFIG],
 
8904
[AC_REQUIRE([LT_PROG_RC])dnl
 
8905
AC_LANG_SAVE
 
8906
 
 
8907
# Source file extension for RC test sources.
 
8908
ac_ext=rc
 
8909
 
 
8910
# Object file extension for compiled RC test sources.
 
8911
objext=o
 
8912
_LT_TAGVAR(objext, $1)=$objext
 
8913
 
 
8914
# Code to be used in simple compile tests
 
8915
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
8916
 
 
8917
# Code to be used in simple link tests
 
8918
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
8919
 
 
8920
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8921
_LT_TAG_COMPILER
 
8922
 
 
8923
# save warnings/boilerplate of simple test code
 
8924
_LT_COMPILER_BOILERPLATE
 
8925
_LT_LINKER_BOILERPLATE
 
8926
 
 
8927
# Allow CC to be a program name with arguments.
 
8928
lt_save_CC="$CC"
 
8929
lt_save_GCC=$GCC
 
8930
GCC=
 
8931
CC=${RC-"windres"}
 
8932
compiler=$CC
 
8933
_LT_TAGVAR(compiler, $1)=$CC
 
8934
_LT_CC_BASENAME([$compiler])
 
8935
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
8936
 
 
8937
if test -n "$compiler"; then
 
8938
  :
 
8939
  _LT_CONFIG($1)
 
8940
fi
 
8941
 
 
8942
GCC=$lt_save_GCC
 
8943
AC_LANG_RESTORE
 
8944
CC="$lt_save_CC"
 
8945
])# _LT_LANG_RC_CONFIG
 
8946
 
 
8947
 
 
8948
# LT_PROG_GCJ
 
8949
# -----------
 
8950
AC_DEFUN([LT_PROG_GCJ],
 
8951
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
 
8952
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
 
8953
    [AC_CHECK_TOOL(GCJ, gcj,)
 
8954
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
8955
      AC_SUBST(GCJFLAGS)])])[]dnl
 
8956
])
 
8957
 
 
8958
# Old name:
 
8959
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
 
8960
dnl aclocal-1.4 backwards compatibility:
 
8961
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
8962
 
 
8963
 
 
8964
# LT_PROG_RC
 
8965
# ----------
 
8966
AC_DEFUN([LT_PROG_RC],
 
8967
[AC_CHECK_TOOL(RC, windres,)
 
8968
])
 
8969
 
 
8970
# Old name:
 
8971
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
 
8972
dnl aclocal-1.4 backwards compatibility:
 
8973
dnl AC_DEFUN([LT_AC_PROG_RC], [])
 
8974
 
 
8975
 
 
8976
# _LT_DECL_EGREP
 
8977
# --------------
 
8978
# If we don't have a new enough Autoconf to choose the best grep
 
8979
# available, choose the one first in the user's PATH.
 
8980
m4_defun([_LT_DECL_EGREP],
 
8981
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
8982
AC_REQUIRE([AC_PROG_FGREP])dnl
 
8983
test -z "$GREP" && GREP=grep
 
8984
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
 
8985
_LT_DECL([], [EGREP], [1], [An ERE matcher])
 
8986
_LT_DECL([], [FGREP], [1], [A literal string matcher])
 
8987
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
 
8988
AC_SUBST([GREP])
 
8989
])
 
8990
 
 
8991
 
 
8992
# _LT_DECL_OBJDUMP
 
8993
# --------------
 
8994
# If we don't have a new enough Autoconf to choose the best objdump
 
8995
# available, choose the one first in the user's PATH.
 
8996
m4_defun([_LT_DECL_OBJDUMP],
 
8997
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
8998
test -z "$OBJDUMP" && OBJDUMP=objdump
 
8999
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
 
9000
AC_SUBST([OBJDUMP])
 
9001
])
 
9002
 
 
9003
 
 
9004
# _LT_DECL_SED
 
9005
# ------------
 
9006
# Check for a fully-functional sed program, that truncates
 
9007
# as few characters as possible.  Prefer GNU sed if found.
 
9008
m4_defun([_LT_DECL_SED],
 
9009
[AC_PROG_SED
 
9010
test -z "$SED" && SED=sed
 
9011
Xsed="$SED -e 1s/^X//"
 
9012
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
 
9013
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
 
9014
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
 
9015
])# _LT_DECL_SED
 
9016
 
 
9017
m4_ifndef([AC_PROG_SED], [
 
9018
# NOTE: This macro has been submitted for inclusion into   #
 
9019
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
9020
#  a released version of Autoconf we should remove this    #
 
9021
#  macro and use it instead.                               #
 
9022
 
 
9023
m4_defun([AC_PROG_SED],
 
9024
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
9025
AC_CACHE_VAL(lt_cv_path_SED,
 
9026
[# Loop through the user's path and test for sed and gsed.
 
9027
# Then use that list of sed's as ones to test for truncation.
 
9028
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
9029
for as_dir in $PATH
 
9030
do
 
9031
  IFS=$as_save_IFS
 
9032
  test -z "$as_dir" && as_dir=.
 
9033
  for lt_ac_prog in sed gsed; do
 
9034
    for ac_exec_ext in '' $ac_executable_extensions; do
 
9035
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
9036
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
 
9037
      fi
 
9038
    done
 
9039
  done
 
9040
done
 
9041
IFS=$as_save_IFS
 
9042
lt_ac_max=0
 
9043
lt_ac_count=0
 
9044
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
9045
# along with /bin/sed that truncates output.
 
9046
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
9047
  test ! -f $lt_ac_sed && continue
 
9048
  cat /dev/null > conftest.in
 
9049
  lt_ac_count=0
 
9050
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
9051
  # Check for GNU sed and select it if it is found.
 
9052
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
9053
    lt_cv_path_SED=$lt_ac_sed
 
9054
    break
 
9055
  fi
 
9056
  while true; do
 
9057
    cat conftest.in conftest.in >conftest.tmp
 
9058
    mv conftest.tmp conftest.in
 
9059
    cp conftest.in conftest.nl
 
9060
    echo >>conftest.nl
 
9061
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
9062
    cmp -s conftest.out conftest.nl || break
 
9063
    # 10000 chars as input seems more than enough
 
9064
    test $lt_ac_count -gt 10 && break
 
9065
    lt_ac_count=`expr $lt_ac_count + 1`
 
9066
    if test $lt_ac_count -gt $lt_ac_max; then
 
9067
      lt_ac_max=$lt_ac_count
 
9068
      lt_cv_path_SED=$lt_ac_sed
 
9069
    fi
 
9070
  done
 
9071
done
 
9072
])
 
9073
SED=$lt_cv_path_SED
 
9074
AC_SUBST([SED])
 
9075
AC_MSG_RESULT([$SED])
 
9076
])#AC_PROG_SED
 
9077
])#m4_ifndef
 
9078
 
 
9079
# Old name:
 
9080
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
 
9081
dnl aclocal-1.4 backwards compatibility:
 
9082
dnl AC_DEFUN([LT_AC_PROG_SED], [])
 
9083
 
 
9084
 
 
9085
# _LT_CHECK_SHELL_FEATURES
 
9086
# ------------------------
 
9087
# Find out whether the shell is Bourne or XSI compatible,
 
9088
# or has some other useful features.
 
9089
m4_defun([_LT_CHECK_SHELL_FEATURES],
 
9090
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
 
9091
# Try some XSI features
 
9092
xsi_shell=no
 
9093
( _lt_dummy="a/b/c"
 
9094
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
 
9095
      = c,a/b,, \
 
9096
    && eval 'test $(( 1 + 1 )) -eq 2 \
 
9097
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
 
9098
  && xsi_shell=yes
 
9099
AC_MSG_RESULT([$xsi_shell])
 
9100
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
 
9101
 
 
9102
AC_MSG_CHECKING([whether the shell understands "+="])
 
9103
lt_shell_append=no
 
9104
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
 
9105
    >/dev/null 2>&1 \
 
9106
  && lt_shell_append=yes
 
9107
AC_MSG_RESULT([$lt_shell_append])
 
9108
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
 
9109
 
 
9110
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
 
9111
  lt_unset=unset
 
9112
else
 
9113
  lt_unset=false
 
9114
fi
 
9115
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
 
9116
 
 
9117
# test EBCDIC or ASCII
 
9118
case `echo X|tr X '\101'` in
 
9119
 A) # ASCII based system
 
9120
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
 
9121
  lt_SP2NL='tr \040 \012'
 
9122
  lt_NL2SP='tr \015\012 \040\040'
 
9123
  ;;
 
9124
 *) # EBCDIC based system
 
9125
  lt_SP2NL='tr \100 \n'
 
9126
  lt_NL2SP='tr \r\n \100\100'
 
9127
  ;;
 
9128
esac
 
9129
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
 
9130
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 
9131
])# _LT_CHECK_SHELL_FEATURES
 
9132
 
 
9133
 
 
9134
# _LT_PROG_XSI_SHELLFNS
 
9135
# ---------------------
 
9136
# Bourne and XSI compatible variants of some useful shell functions.
 
9137
m4_defun([_LT_PROG_XSI_SHELLFNS],
 
9138
[case $xsi_shell in
 
9139
  yes)
 
9140
    cat << \_LT_EOF >> "$cfgfile"
 
9141
 
 
9142
# func_dirname file append nondir_replacement
 
9143
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
 
9144
# otherwise set result to NONDIR_REPLACEMENT.
 
9145
func_dirname ()
 
9146
{
 
9147
  case ${1} in
 
9148
    */*) func_dirname_result="${1%/*}${2}" ;;
 
9149
    *  ) func_dirname_result="${3}" ;;
 
9150
  esac
 
9151
}
 
9152
 
 
9153
# func_basename file
 
9154
func_basename ()
 
9155
{
 
9156
  func_basename_result="${1##*/}"
 
9157
}
 
9158
 
 
9159
# func_dirname_and_basename file append nondir_replacement
 
9160
# perform func_basename and func_dirname in a single function
 
9161
# call:
 
9162
#   dirname:  Compute the dirname of FILE.  If nonempty,
 
9163
#             add APPEND to the result, otherwise set result
 
9164
#             to NONDIR_REPLACEMENT.
 
9165
#             value returned in "$func_dirname_result"
 
9166
#   basename: Compute filename of FILE.
 
9167
#             value retuned in "$func_basename_result"
 
9168
# Implementation must be kept synchronized with func_dirname
 
9169
# and func_basename. For efficiency, we do not delegate to
 
9170
# those functions but instead duplicate the functionality here.
 
9171
func_dirname_and_basename ()
 
9172
{
 
9173
  case ${1} in
 
9174
    */*) func_dirname_result="${1%/*}${2}" ;;
 
9175
    *  ) func_dirname_result="${3}" ;;
 
9176
  esac
 
9177
  func_basename_result="${1##*/}"
 
9178
}
 
9179
 
 
9180
# func_stripname prefix suffix name
 
9181
# strip PREFIX and SUFFIX off of NAME.
 
9182
# PREFIX and SUFFIX must not contain globbing or regex special
 
9183
# characters, hashes, percent signs, but SUFFIX may contain a leading
 
9184
# dot (in which case that matches only a dot).
 
9185
func_stripname ()
 
9186
{
 
9187
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
 
9188
  # positional parameters, so assign one to ordinary parameter first.
 
9189
  func_stripname_result=${3}
 
9190
  func_stripname_result=${func_stripname_result#"${1}"}
 
9191
  func_stripname_result=${func_stripname_result%"${2}"}
 
9192
}
 
9193
 
 
9194
# func_opt_split
 
9195
func_opt_split ()
 
9196
{
 
9197
  func_opt_split_opt=${1%%=*}
 
9198
  func_opt_split_arg=${1#*=}
 
9199
}
 
9200
 
 
9201
# func_lo2o object
 
9202
func_lo2o ()
 
9203
{
 
9204
  case ${1} in
 
9205
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
 
9206
    *)    func_lo2o_result=${1} ;;
 
9207
  esac
 
9208
}
 
9209
 
 
9210
# func_xform libobj-or-source
 
9211
func_xform ()
 
9212
{
 
9213
  func_xform_result=${1%.*}.lo
 
9214
}
 
9215
 
 
9216
# func_arith arithmetic-term...
 
9217
func_arith ()
 
9218
{
 
9219
  func_arith_result=$(( $[*] ))
 
9220
}
 
9221
 
 
9222
# func_len string
 
9223
# STRING may not start with a hyphen.
 
9224
func_len ()
 
9225
{
 
9226
  func_len_result=${#1}
 
9227
}
 
9228
 
 
9229
_LT_EOF
 
9230
    ;;
 
9231
  *) # Bourne compatible functions.
 
9232
    cat << \_LT_EOF >> "$cfgfile"
 
9233
 
 
9234
# func_dirname file append nondir_replacement
 
9235
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
 
9236
# otherwise set result to NONDIR_REPLACEMENT.
 
9237
func_dirname ()
 
9238
{
 
9239
  # Extract subdirectory from the argument.
 
9240
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
 
9241
  if test "X$func_dirname_result" = "X${1}"; then
 
9242
    func_dirname_result="${3}"
 
9243
  else
 
9244
    func_dirname_result="$func_dirname_result${2}"
 
9245
  fi
 
9246
}
 
9247
 
 
9248
# func_basename file
 
9249
func_basename ()
 
9250
{
 
9251
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
 
9252
}
 
9253
 
 
9254
dnl func_dirname_and_basename
 
9255
dnl A portable version of this function is already defined in general.m4sh
 
9256
dnl so there is no need for it here.
 
9257
 
 
9258
# func_stripname prefix suffix name
 
9259
# strip PREFIX and SUFFIX off of NAME.
 
9260
# PREFIX and SUFFIX must not contain globbing or regex special
 
9261
# characters, hashes, percent signs, but SUFFIX may contain a leading
 
9262
# dot (in which case that matches only a dot).
 
9263
# func_strip_suffix prefix name
 
9264
func_stripname ()
 
9265
{
 
9266
  case ${2} in
 
9267
    .*) func_stripname_result=`$ECHO "X${3}" \
 
9268
           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
 
9269
    *)  func_stripname_result=`$ECHO "X${3}" \
 
9270
           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
 
9271
  esac
 
9272
}
 
9273
 
 
9274
# sed scripts:
 
9275
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
 
9276
my_sed_long_arg='1s/^-[[^=]]*=//'
 
9277
 
 
9278
# func_opt_split
 
9279
func_opt_split ()
 
9280
{
 
9281
  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
 
9282
  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
 
9283
}
 
9284
 
 
9285
# func_lo2o object
 
9286
func_lo2o ()
 
9287
{
 
9288
  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
 
9289
}
 
9290
 
 
9291
# func_xform libobj-or-source
 
9292
func_xform ()
 
9293
{
 
9294
  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
 
9295
}
 
9296
 
 
9297
# func_arith arithmetic-term...
 
9298
func_arith ()
 
9299
{
 
9300
  func_arith_result=`expr "$[@]"`
 
9301
}
 
9302
 
 
9303
# func_len string
 
9304
# STRING may not start with a hyphen.
 
9305
func_len ()
 
9306
{
 
9307
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
 
9308
}
 
9309
 
 
9310
_LT_EOF
 
9311
esac
 
9312
 
 
9313
case $lt_shell_append in
 
9314
  yes)
 
9315
    cat << \_LT_EOF >> "$cfgfile"
 
9316
 
 
9317
# func_append var value
 
9318
# Append VALUE to the end of shell variable VAR.
 
9319
func_append ()
 
9320
{
 
9321
  eval "$[1]+=\$[2]"
 
9322
}
 
9323
_LT_EOF
 
9324
    ;;
 
9325
  *)
 
9326
    cat << \_LT_EOF >> "$cfgfile"
 
9327
 
 
9328
# func_append var value
 
9329
# Append VALUE to the end of shell variable VAR.
 
9330
func_append ()
 
9331
{
 
9332
  eval "$[1]=\$$[1]\$[2]"
 
9333
}
 
9334
 
 
9335
_LT_EOF
 
9336
    ;;
 
9337
  esac
 
9338
])
 
9339
 
 
9340
# Helper functions for option handling.                    -*- Autoconf -*-
 
9341
#
 
9342
#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
9343
#   Written by Gary V. Vaughan, 2004
 
9344
#
 
9345
# This file is free software; the Free Software Foundation gives
 
9346
# unlimited permission to copy and/or distribute it, with or without
 
9347
# modifications, as long as this notice is preserved.
 
9348
 
 
9349
# serial 6 ltoptions.m4
 
9350
 
 
9351
# This is to help aclocal find these macros, as it can't see m4_define.
 
9352
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
 
9353
 
 
9354
 
 
9355
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
 
9356
# ------------------------------------------
 
9357
m4_define([_LT_MANGLE_OPTION],
 
9358
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
 
9359
 
 
9360
 
 
9361
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
 
9362
# ---------------------------------------
 
9363
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
 
9364
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
 
9365
# saved as a flag.
 
9366
m4_define([_LT_SET_OPTION],
 
9367
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
 
9368
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
 
9369
        _LT_MANGLE_DEFUN([$1], [$2]),
 
9370
    [m4_warning([Unknown $1 option `$2'])])[]dnl
 
9371
])
 
9372
 
 
9373
 
 
9374
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
 
9375
# ------------------------------------------------------------
 
9376
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
9377
m4_define([_LT_IF_OPTION],
 
9378
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
 
9379
 
 
9380
 
 
9381
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
 
9382
# -------------------------------------------------------
 
9383
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
 
9384
# are set.
 
9385
m4_define([_LT_UNLESS_OPTIONS],
 
9386
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
 
9387
            [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
 
9388
                      [m4_define([$0_found])])])[]dnl
 
9389
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
 
9390
])[]dnl
 
9391
])
 
9392
 
 
9393
 
 
9394
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
 
9395
# ----------------------------------------
 
9396
# OPTION-LIST is a space-separated list of Libtool options associated
 
9397
# with MACRO-NAME.  If any OPTION has a matching handler declared with
 
9398
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
 
9399
# the unknown option and exit.
 
9400
m4_defun([_LT_SET_OPTIONS],
 
9401
[# Set options
 
9402
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
 
9403
    [_LT_SET_OPTION([$1], _LT_Option)])
 
9404
 
 
9405
m4_if([$1],[LT_INIT],[
 
9406
  dnl
 
9407
  dnl Simply set some default values (i.e off) if boolean options were not
 
9408
  dnl specified:
 
9409
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
 
9410
  ])
 
9411
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
 
9412
  ])
 
9413
  dnl
 
9414
  dnl If no reference was made to various pairs of opposing options, then
 
9415
  dnl we run the default mode handler for the pair.  For example, if neither
 
9416
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
 
9417
  dnl archives by default:
 
9418
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
 
9419
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
 
9420
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
 
9421
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
 
9422
                   [_LT_ENABLE_FAST_INSTALL])
 
9423
  ])
 
9424
])# _LT_SET_OPTIONS
 
9425
 
 
9426
 
 
9427
 
 
9428
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
 
9429
# -----------------------------------------
 
9430
m4_define([_LT_MANGLE_DEFUN],
 
9431
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
 
9432
 
 
9433
 
 
9434
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
 
9435
# -----------------------------------------------
 
9436
m4_define([LT_OPTION_DEFINE],
 
9437
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
 
9438
])# LT_OPTION_DEFINE
 
9439
 
 
9440
 
 
9441
# dlopen
 
9442
# ------
 
9443
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
 
9444
])
 
9445
 
 
9446
AU_DEFUN([AC_LIBTOOL_DLOPEN],
 
9447
[_LT_SET_OPTION([LT_INIT], [dlopen])
 
9448
AC_DIAGNOSE([obsolete],
 
9449
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
9450
put the `dlopen' option into LT_INIT's first parameter.])
 
9451
])
 
9452
 
 
9453
dnl aclocal-1.4 backwards compatibility:
 
9454
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
 
9455
 
 
9456
 
 
9457
# win32-dll
 
9458
# ---------
 
9459
# Declare package support for building win32 dll's.
 
9460
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
 
9461
[enable_win32_dll=yes
 
9462
 
 
9463
case $host in
 
9464
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
 
9465
  AC_CHECK_TOOL(AS, as, false)
 
9466
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
9467
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
9468
  ;;
 
9469
esac
 
9470
 
 
9471
test -z "$AS" && AS=as
 
9472
_LT_DECL([], [AS],      [0], [Assembler program])dnl
 
9473
 
 
9474
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
9475
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
 
9476
 
 
9477
test -z "$OBJDUMP" && OBJDUMP=objdump
 
9478
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
 
9479
])# win32-dll
 
9480
 
 
9481
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
9482
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
9483
_LT_SET_OPTION([LT_INIT], [win32-dll])
 
9484
AC_DIAGNOSE([obsolete],
 
9485
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
9486
put the `win32-dll' option into LT_INIT's first parameter.])
 
9487
])
 
9488
 
 
9489
dnl aclocal-1.4 backwards compatibility:
 
9490
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 
9491
 
 
9492
 
 
9493
# _LT_ENABLE_SHARED([DEFAULT])
 
9494
# ----------------------------
 
9495
# implement the --enable-shared flag, and supports the `shared' and
 
9496
# `disable-shared' LT_INIT options.
 
9497
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
9498
m4_define([_LT_ENABLE_SHARED],
 
9499
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
9500
AC_ARG_ENABLE([shared],
 
9501
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
9502
        [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
 
9503
    [p=${PACKAGE-default}
 
9504
    case $enableval in
 
9505
    yes) enable_shared=yes ;;
 
9506
    no) enable_shared=no ;;
 
9507
    *)
 
9508
      enable_shared=no
 
9509
      # Look at the argument we got.  We use all the common list separators.
 
9510
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
9511
      for pkg in $enableval; do
 
9512
        IFS="$lt_save_ifs"
 
9513
        if test "X$pkg" = "X$p"; then
 
9514
          enable_shared=yes
 
9515
        fi
 
9516
      done
 
9517
      IFS="$lt_save_ifs"
 
9518
      ;;
 
9519
    esac],
 
9520
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
 
9521
 
 
9522
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
 
9523
        [Whether or not to build shared libraries])
 
9524
])# _LT_ENABLE_SHARED
 
9525
 
 
9526
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
 
9527
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
 
9528
 
 
9529
# Old names:
 
9530
AC_DEFUN([AC_ENABLE_SHARED],
 
9531
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
 
9532
])
 
9533
 
 
9534
AC_DEFUN([AC_DISABLE_SHARED],
 
9535
[_LT_SET_OPTION([LT_INIT], [disable-shared])
 
9536
])
 
9537
 
 
9538
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
 
9539
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
9540
 
 
9541
dnl aclocal-1.4 backwards compatibility:
 
9542
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
 
9543
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 
9544
 
 
9545
 
 
9546
 
 
9547
# _LT_ENABLE_STATIC([DEFAULT])
 
9548
# ----------------------------
 
9549
# implement the --enable-static flag, and support the `static' and
 
9550
# `disable-static' LT_INIT options.
 
9551
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
9552
m4_define([_LT_ENABLE_STATIC],
 
9553
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
9554
AC_ARG_ENABLE([static],
 
9555
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
9556
        [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
 
9557
    [p=${PACKAGE-default}
 
9558
    case $enableval in
 
9559
    yes) enable_static=yes ;;
 
9560
    no) enable_static=no ;;
 
9561
    *)
 
9562
     enable_static=no
 
9563
      # Look at the argument we got.  We use all the common list separators.
 
9564
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
9565
      for pkg in $enableval; do
 
9566
        IFS="$lt_save_ifs"
 
9567
        if test "X$pkg" = "X$p"; then
 
9568
          enable_static=yes
 
9569
        fi
 
9570
      done
 
9571
      IFS="$lt_save_ifs"
 
9572
      ;;
 
9573
    esac],
 
9574
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
 
9575
 
 
9576
    _LT_DECL([build_old_libs], [enable_static], [0],
 
9577
        [Whether or not to build static libraries])
 
9578
])# _LT_ENABLE_STATIC
 
9579
 
 
9580
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
 
9581
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
 
9582
 
 
9583
# Old names:
 
9584
AC_DEFUN([AC_ENABLE_STATIC],
 
9585
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
 
9586
])
 
9587
 
 
9588
AC_DEFUN([AC_DISABLE_STATIC],
 
9589
[_LT_SET_OPTION([LT_INIT], [disable-static])
 
9590
])
 
9591
 
 
9592
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
 
9593
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
9594
 
 
9595
dnl aclocal-1.4 backwards compatibility:
 
9596
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
 
9597
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 
9598
 
 
9599
 
 
9600
 
 
9601
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
 
9602
# ----------------------------------
 
9603
# implement the --enable-fast-install flag, and support the `fast-install'
 
9604
# and `disable-fast-install' LT_INIT options.
 
9605
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
9606
m4_define([_LT_ENABLE_FAST_INSTALL],
 
9607
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
9608
AC_ARG_ENABLE([fast-install],
 
9609
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
9610
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
9611
    [p=${PACKAGE-default}
 
9612
    case $enableval in
 
9613
    yes) enable_fast_install=yes ;;
 
9614
    no) enable_fast_install=no ;;
 
9615
    *)
 
9616
      enable_fast_install=no
 
9617
      # Look at the argument we got.  We use all the common list separators.
 
9618
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
9619
      for pkg in $enableval; do
 
9620
        IFS="$lt_save_ifs"
 
9621
        if test "X$pkg" = "X$p"; then
 
9622
          enable_fast_install=yes
 
9623
        fi
 
9624
      done
 
9625
      IFS="$lt_save_ifs"
 
9626
      ;;
 
9627
    esac],
 
9628
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
 
9629
 
 
9630
_LT_DECL([fast_install], [enable_fast_install], [0],
 
9631
         [Whether or not to optimize for fast installation])dnl
 
9632
])# _LT_ENABLE_FAST_INSTALL
 
9633
 
 
9634
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
 
9635
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
 
9636
 
 
9637
# Old names:
 
9638
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
 
9639
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
 
9640
AC_DIAGNOSE([obsolete],
 
9641
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
 
9642
the `fast-install' option into LT_INIT's first parameter.])
 
9643
])
 
9644
 
 
9645
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
 
9646
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
 
9647
AC_DIAGNOSE([obsolete],
 
9648
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
 
9649
the `disable-fast-install' option into LT_INIT's first parameter.])
 
9650
])
 
9651
 
 
9652
dnl aclocal-1.4 backwards compatibility:
 
9653
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
 
9654
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 
9655
 
 
9656
 
 
9657
# _LT_WITH_PIC([MODE])
 
9658
# --------------------
 
9659
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
 
9660
# LT_INIT options.
 
9661
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
9662
m4_define([_LT_WITH_PIC],
 
9663
[AC_ARG_WITH([pic],
 
9664
    [AS_HELP_STRING([--with-pic],
 
9665
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
9666
    [pic_mode="$withval"],
 
9667
    [pic_mode=default])
 
9668
 
 
9669
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
 
9670
 
 
9671
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
 
9672
])# _LT_WITH_PIC
 
9673
 
 
9674
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
 
9675
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
 
9676
 
 
9677
# Old name:
 
9678
AU_DEFUN([AC_LIBTOOL_PICMODE],
 
9679
[_LT_SET_OPTION([LT_INIT], [pic-only])
 
9680
AC_DIAGNOSE([obsolete],
 
9681
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
9682
put the `pic-only' option into LT_INIT's first parameter.])
 
9683
])
 
9684
 
 
9685
dnl aclocal-1.4 backwards compatibility:
 
9686
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
 
9687
 
 
9688
 
 
9689
m4_define([_LTDL_MODE], [])
 
9690
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
 
9691
                 [m4_define([_LTDL_MODE], [nonrecursive])])
 
9692
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
 
9693
                 [m4_define([_LTDL_MODE], [recursive])])
 
9694
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
 
9695
                 [m4_define([_LTDL_MODE], [subproject])])
 
9696
 
 
9697
m4_define([_LTDL_TYPE], [])
 
9698
LT_OPTION_DEFINE([LTDL_INIT], [installable],
 
9699
                 [m4_define([_LTDL_TYPE], [installable])])
 
9700
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
 
9701
                 [m4_define([_LTDL_TYPE], [convenience])])
 
9702
 
 
9703
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 
9704
#
 
9705
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
9706
# Written by Gary V. Vaughan, 2004
 
9707
#
 
9708
# This file is free software; the Free Software Foundation gives
 
9709
# unlimited permission to copy and/or distribute it, with or without
 
9710
# modifications, as long as this notice is preserved.
 
9711
 
 
9712
# serial 6 ltsugar.m4
 
9713
 
 
9714
# This is to help aclocal find these macros, as it can't see m4_define.
 
9715
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
 
9716
 
 
9717
 
 
9718
# lt_join(SEP, ARG1, [ARG2...])
 
9719
# -----------------------------
 
9720
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
 
9721
# associated separator.
 
9722
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
 
9723
# versions in m4sugar had bugs.
 
9724
m4_define([lt_join],
 
9725
[m4_if([$#], [1], [],
 
9726
       [$#], [2], [[$2]],
 
9727
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
 
9728
m4_define([_lt_join],
 
9729
[m4_if([$#$2], [2], [],
 
9730
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
 
9731
 
 
9732
 
 
9733
# lt_car(LIST)
 
9734
# lt_cdr(LIST)
 
9735
# ------------
 
9736
# Manipulate m4 lists.
 
9737
# These macros are necessary as long as will still need to support
 
9738
# Autoconf-2.59 which quotes differently.
 
9739
m4_define([lt_car], [[$1]])
 
9740
m4_define([lt_cdr],
 
9741
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
 
9742
       [$#], 1, [],
 
9743
       [m4_dquote(m4_shift($@))])])
 
9744
m4_define([lt_unquote], $1)
 
9745
 
 
9746
 
 
9747
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
 
9748
# ------------------------------------------
 
9749
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
 
9750
# Note that neither SEPARATOR nor STRING are expanded; they are appended
 
9751
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
 
9752
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
 
9753
# than defined and empty).
 
9754
#
 
9755
# This macro is needed until we can rely on Autoconf 2.62, since earlier
 
9756
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
 
9757
m4_define([lt_append],
 
9758
[m4_define([$1],
 
9759
           m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
 
9760
 
 
9761
 
 
9762
 
 
9763
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
 
9764
# ----------------------------------------------------------
 
9765
# Produce a SEP delimited list of all paired combinations of elements of
 
9766
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
 
9767
# has the form PREFIXmINFIXSUFFIXn.
 
9768
# Needed until we can rely on m4_combine added in Autoconf 2.62.
 
9769
m4_define([lt_combine],
 
9770
[m4_if(m4_eval([$# > 3]), [1],
 
9771
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
 
9772
[[m4_foreach([_Lt_prefix], [$2],
 
9773
             [m4_foreach([_Lt_suffix],
 
9774
                ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
 
9775
        [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
 
9776
 
 
9777
 
 
9778
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
 
9779
# -----------------------------------------------------------------------
 
9780
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
 
9781
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
 
9782
m4_define([lt_if_append_uniq],
 
9783
[m4_ifdef([$1],
 
9784
          [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
 
9785
                 [lt_append([$1], [$2], [$3])$4],
 
9786
                 [$5])],
 
9787
          [lt_append([$1], [$2], [$3])$4])])
 
9788
 
 
9789
 
 
9790
# lt_dict_add(DICT, KEY, VALUE)
 
9791
# -----------------------------
 
9792
m4_define([lt_dict_add],
 
9793
[m4_define([$1($2)], [$3])])
 
9794
 
 
9795
 
 
9796
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
 
9797
# --------------------------------------------
 
9798
m4_define([lt_dict_add_subkey],
 
9799
[m4_define([$1($2:$3)], [$4])])
 
9800
 
 
9801
 
 
9802
# lt_dict_fetch(DICT, KEY, [SUBKEY])
 
9803
# ----------------------------------
 
9804
m4_define([lt_dict_fetch],
 
9805
[m4_ifval([$3],
 
9806
        m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
 
9807
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
 
9808
 
 
9809
 
 
9810
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
 
9811
# -----------------------------------------------------------------
 
9812
m4_define([lt_if_dict_fetch],
 
9813
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
 
9814
        [$5],
 
9815
    [$6])])
 
9816
 
 
9817
 
 
9818
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
 
9819
# --------------------------------------------------------------
 
9820
m4_define([lt_dict_filter],
 
9821
[m4_if([$5], [], [],
 
9822
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
 
9823
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
 
9824
                      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
 
9825
])
 
9826
 
 
9827
# ltversion.m4 -- version numbers                       -*- Autoconf -*-
 
9828
#
 
9829
#   Copyright (C) 2004 Free Software Foundation, Inc.
 
9830
#   Written by Scott James Remnant, 2004
 
9831
#
 
9832
# This file is free software; the Free Software Foundation gives
 
9833
# unlimited permission to copy and/or distribute it, with or without
 
9834
# modifications, as long as this notice is preserved.
 
9835
 
 
9836
# Generated from ltversion.in.
 
9837
 
 
9838
# serial 3017 ltversion.m4
 
9839
# This file is part of GNU Libtool
 
9840
 
 
9841
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
 
9842
m4_define([LT_PACKAGE_REVISION], [1.3017])
 
9843
 
 
9844
AC_DEFUN([LTVERSION_VERSION],
 
9845
[macro_version='2.2.6b'
 
9846
macro_revision='1.3017'
 
9847
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 
9848
_LT_DECL(, macro_revision, 0)
 
9849
])
 
9850
 
 
9851
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 
9852
#
 
9853
#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
 
9854
#   Written by Scott James Remnant, 2004.
 
9855
#
 
9856
# This file is free software; the Free Software Foundation gives
 
9857
# unlimited permission to copy and/or distribute it, with or without
 
9858
# modifications, as long as this notice is preserved.
 
9859
 
 
9860
# serial 4 lt~obsolete.m4
 
9861
 
 
9862
# These exist entirely to fool aclocal when bootstrapping libtool.
 
9863
#
 
9864
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
 
9865
# which have later been changed to m4_define as they aren't part of the
 
9866
# exported API, or moved to Autoconf or Automake where they belong.
 
9867
#
 
9868
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
 
9869
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
 
9870
# using a macro with the same name in our local m4/libtool.m4 it'll
 
9871
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
 
9872
# and doesn't know about Autoconf macros at all.)
 
9873
#
 
9874
# So we provide this file, which has a silly filename so it's always
 
9875
# included after everything else.  This provides aclocal with the
 
9876
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
 
9877
# because those macros already exist, or will be overwritten later.
 
9878
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
 
9879
#
 
9880
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
 
9881
# Yes, that means every name once taken will need to remain here until
 
9882
# we give up compatibility with versions before 1.7, at which point
 
9883
# we need to keep only those names which we still refer to.
 
9884
 
 
9885
# This is to help aclocal find these macros, as it can't see m4_define.
 
9886
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
 
9887
 
 
9888
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
 
9889
m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
 
9890
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
 
9891
m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
 
9892
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
 
9893
m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
 
9894
m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
 
9895
m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
 
9896
m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
 
9897
m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
 
9898
m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
 
9899
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
 
9900
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
 
9901
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
 
9902
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
 
9903
m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
 
9904
m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
 
9905
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
 
9906
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
 
9907
m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
 
9908
m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
 
9909
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
 
9910
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
 
9911
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
 
9912
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
 
9913
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
 
9914
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
 
9915
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
 
9916
m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
 
9917
m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
 
9918
m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
 
9919
m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
 
9920
m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
 
9921
m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
 
9922
m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
 
9923
m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
 
9924
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
 
9925
m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
 
9926
m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
 
9927
m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
 
9928
m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
 
9929
m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
 
9930
m4_ifndef([AC_LIBTOOL_RC],              [AC_DEFUN([AC_LIBTOOL_RC])])
 
9931
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
 
9932
m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
 
9933
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
 
9934
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
 
9935
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
 
9936
m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
 
9937
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
 
9938
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
 
9939
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
 
9940
m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
 
9941
m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
 
9942
m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
 
9943
 
 
9944
# nls.m4 serial 5 (gettext-0.18)
 
9945
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
 
9946
dnl Inc.
 
9947
dnl This file is free software; the Free Software Foundation
 
9948
dnl gives unlimited permission to copy and/or distribute it,
 
9949
dnl with or without modifications, as long as this notice is preserved.
 
9950
dnl
 
9951
dnl This file can can be used in projects which are not available under
 
9952
dnl the GNU General Public License or the GNU Library General Public
 
9953
dnl License but which still want to provide support for the GNU gettext
 
9954
dnl functionality.
 
9955
dnl Please note that the actual code of the GNU gettext library is covered
 
9956
dnl by the GNU Library General Public License, and the rest of the GNU
 
9957
dnl gettext package package is covered by the GNU General Public License.
 
9958
dnl They are *not* in the public domain.
 
9959
 
 
9960
dnl Authors:
 
9961
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
9962
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
9963
 
 
9964
AC_PREREQ([2.50])
 
9965
 
 
9966
AC_DEFUN([AM_NLS],
 
9967
[
 
9968
  AC_MSG_CHECKING([whether NLS is requested])
 
9969
  dnl Default is enabled NLS
 
9970
  AC_ARG_ENABLE([nls],
 
9971
    [  --disable-nls           do not use Native Language Support],
 
9972
    USE_NLS=$enableval, USE_NLS=yes)
 
9973
  AC_MSG_RESULT([$USE_NLS])
 
9974
  AC_SUBST([USE_NLS])
 
9975
])
 
9976
 
 
9977
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
9978
# serial 1 (pkg-config-0.24)
 
9979
 
9980
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
 
9981
#
 
9982
# This program is free software; you can redistribute it and/or modify
 
9983
# it under the terms of the GNU General Public License as published by
 
9984
# the Free Software Foundation; either version 2 of the License, or
 
9985
# (at your option) any later version.
 
9986
#
 
9987
# This program is distributed in the hope that it will be useful, but
 
9988
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
9989
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
9990
# General Public License for more details.
 
9991
#
 
9992
# You should have received a copy of the GNU General Public License
 
9993
# along with this program; if not, write to the Free Software
 
9994
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
9995
#
 
9996
# As a special exception to the GNU General Public License, if you
 
9997
# distribute this file as part of a program that contains a
 
9998
# configuration script generated by Autoconf, you may include it under
 
9999
# the same distribution terms that you use for the rest of that program.
 
10000
 
 
10001
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
10002
# ----------------------------------
 
10003
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
10004
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
10005
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
10006
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
10007
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
10008
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
10009
 
 
10010
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
10011
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
10012
fi
 
10013
if test -n "$PKG_CONFIG"; then
 
10014
        _pkg_min_version=m4_default([$1], [0.9.0])
 
10015
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
10016
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
10017
                AC_MSG_RESULT([yes])
 
10018
        else
 
10019
                AC_MSG_RESULT([no])
 
10020
                PKG_CONFIG=""
 
10021
        fi
 
10022
fi[]dnl
 
10023
])# PKG_PROG_PKG_CONFIG
 
10024
 
 
10025
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
10026
#
 
10027
# Check to see whether a particular set of modules exists.  Similar
 
10028
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
10029
#
 
10030
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
10031
# only at the first occurence in configure.ac, so if the first place
 
10032
# it's called might be skipped (such as if it is within an "if", you
 
10033
# have to call PKG_CHECK_EXISTS manually
 
10034
# --------------------------------------------------------------
 
10035
AC_DEFUN([PKG_CHECK_EXISTS],
 
10036
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
10037
if test -n "$PKG_CONFIG" && \
 
10038
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
10039
  m4_default([$2], [:])
 
10040
m4_ifvaln([$3], [else
 
10041
  $3])dnl
 
10042
fi])
 
10043
 
 
10044
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
10045
# ---------------------------------------------
 
10046
m4_define([_PKG_CONFIG],
 
10047
[if test -n "$$1"; then
 
10048
    pkg_cv_[]$1="$$1"
 
10049
 elif test -n "$PKG_CONFIG"; then
 
10050
    PKG_CHECK_EXISTS([$3],
 
10051
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
10052
                     [pkg_failed=yes])
 
10053
 else
 
10054
    pkg_failed=untried
 
10055
fi[]dnl
 
10056
])# _PKG_CONFIG
 
10057
 
 
10058
# _PKG_SHORT_ERRORS_SUPPORTED
 
10059
# -----------------------------
 
10060
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
10061
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
10062
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
10063
        _pkg_short_errors_supported=yes
 
10064
else
 
10065
        _pkg_short_errors_supported=no
 
10066
fi[]dnl
 
10067
])# _PKG_SHORT_ERRORS_SUPPORTED
 
10068
 
 
10069
 
 
10070
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
10071
# [ACTION-IF-NOT-FOUND])
 
10072
#
 
10073
#
 
10074
# Note that if there is a possibility the first call to
 
10075
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
10076
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
10077
#
 
10078
#
 
10079
# --------------------------------------------------------------
 
10080
AC_DEFUN([PKG_CHECK_MODULES],
 
10081
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
10082
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
10083
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
10084
 
 
10085
pkg_failed=no
 
10086
AC_MSG_CHECKING([for $1])
 
10087
 
 
10088
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
10089
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
10090
 
 
10091
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
10092
and $1[]_LIBS to avoid the need to call pkg-config.
 
10093
See the pkg-config man page for more details.])
 
10094
 
 
10095
if test $pkg_failed = yes; then
 
10096
        AC_MSG_RESULT([no])
 
10097
        _PKG_SHORT_ERRORS_SUPPORTED
 
10098
        if test $_pkg_short_errors_supported = yes; then
 
10099
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
 
10100
        else 
 
10101
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 
10102
        fi
 
10103
        # Put the nasty error message in config.log where it belongs
 
10104
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
10105
 
 
10106
        m4_default([$4], [AC_MSG_ERROR(
 
10107
[Package requirements ($2) were not met:
 
10108
 
 
10109
$$1_PKG_ERRORS
 
10110
 
 
10111
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
10112
installed software in a non-standard prefix.
 
10113
 
 
10114
_PKG_TEXT])[]dnl
 
10115
        ])
 
10116
elif test $pkg_failed = untried; then
 
10117
        AC_MSG_RESULT([no])
 
10118
        m4_default([$4], [AC_MSG_FAILURE(
 
10119
[The pkg-config script could not be found or is too old.  Make sure it
 
10120
is in your PATH or set the PKG_CONFIG environment variable to the full
 
10121
path to pkg-config.
 
10122
 
 
10123
_PKG_TEXT
 
10124
 
 
10125
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 
10126
        ])
 
10127
else
 
10128
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
10129
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
10130
        AC_MSG_RESULT([yes])
 
10131
        $3
 
10132
fi[]dnl
 
10133
])# PKG_CHECK_MODULES
 
10134
 
 
10135
# po.m4 serial 17 (gettext-0.18)
 
10136
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
 
10137
dnl This file is free software; the Free Software Foundation
 
10138
dnl gives unlimited permission to copy and/or distribute it,
 
10139
dnl with or without modifications, as long as this notice is preserved.
 
10140
dnl
 
10141
dnl This file can can be used in projects which are not available under
 
10142
dnl the GNU General Public License or the GNU Library General Public
 
10143
dnl License but which still want to provide support for the GNU gettext
 
10144
dnl functionality.
 
10145
dnl Please note that the actual code of the GNU gettext library is covered
 
10146
dnl by the GNU Library General Public License, and the rest of the GNU
 
10147
dnl gettext package package is covered by the GNU General Public License.
 
10148
dnl They are *not* in the public domain.
 
10149
 
 
10150
dnl Authors:
 
10151
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
10152
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
10153
 
 
10154
AC_PREREQ([2.50])
 
10155
 
 
10156
dnl Checks for all prerequisites of the po subdirectory.
 
10157
AC_DEFUN([AM_PO_SUBDIRS],
 
10158
[
 
10159
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
10160
  AC_REQUIRE([AC_PROG_INSTALL])dnl
 
10161
  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
 
10162
  AC_REQUIRE([AM_NLS])dnl
 
10163
 
 
10164
  dnl Release version of the gettext macros. This is used to ensure that
 
10165
  dnl the gettext macros and po/Makefile.in.in are in sync.
 
10166
  AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
 
10167
 
 
10168
  dnl Perform the following tests also if --disable-nls has been given,
 
10169
  dnl because they are needed for "make dist" to work.
 
10170
 
 
10171
  dnl Search for GNU msgfmt in the PATH.
 
10172
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
 
10173
  dnl The second test excludes FreeBSD msgfmt.
 
10174
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
10175
    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
 
10176
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 
10177
    :)
 
10178
  AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
 
10179
 
 
10180
  dnl Test whether it is GNU msgfmt >= 0.15.
 
10181
changequote(,)dnl
 
10182
  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
 
10183
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
 
10184
    *) MSGFMT_015=$MSGFMT ;;
 
10185
  esac
 
10186
changequote([,])dnl
 
10187
  AC_SUBST([MSGFMT_015])
 
10188
changequote(,)dnl
 
10189
  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
 
10190
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
 
10191
    *) GMSGFMT_015=$GMSGFMT ;;
 
10192
  esac
 
10193
changequote([,])dnl
 
10194
  AC_SUBST([GMSGFMT_015])
 
10195
 
 
10196
  dnl Search for GNU xgettext 0.12 or newer in the PATH.
 
10197
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
 
10198
  dnl The second test excludes FreeBSD xgettext.
 
10199
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
10200
    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
 
10201
     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 
10202
    :)
 
10203
  dnl Remove leftover from FreeBSD xgettext call.
 
10204
  rm -f messages.po
 
10205
 
 
10206
  dnl Test whether it is GNU xgettext >= 0.15.
 
10207
changequote(,)dnl
 
10208
  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
 
10209
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
 
10210
    *) XGETTEXT_015=$XGETTEXT ;;
 
10211
  esac
 
10212
changequote([,])dnl
 
10213
  AC_SUBST([XGETTEXT_015])
 
10214
 
 
10215
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
 
10216
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
 
10217
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
 
10218
 
 
10219
  dnl Installation directories.
 
10220
  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
 
10221
  dnl have to define it here, so that it can be used in po/Makefile.
 
10222
  test -n "$localedir" || localedir='${datadir}/locale'
 
10223
  AC_SUBST([localedir])
 
10224
 
 
10225
  dnl Support for AM_XGETTEXT_OPTION.
 
10226
  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
 
10227
  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
 
10228
 
 
10229
  AC_CONFIG_COMMANDS([po-directories], [[
 
10230
    for ac_file in $CONFIG_FILES; do
 
10231
      # Support "outfile[:infile[:infile...]]"
 
10232
      case "$ac_file" in
 
10233
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
 
10234
      esac
 
10235
      # PO directories have a Makefile.in generated from Makefile.in.in.
 
10236
      case "$ac_file" in */Makefile.in)
 
10237
        # Adjust a relative srcdir.
 
10238
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 
10239
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
10240
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 
10241
        # In autoconf-2.13 it is called $ac_given_srcdir.
 
10242
        # In autoconf-2.50 it is called $srcdir.
 
10243
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 
10244
        case "$ac_given_srcdir" in
 
10245
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 
10246
          /*) top_srcdir="$ac_given_srcdir" ;;
 
10247
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
10248
        esac
 
10249
        # Treat a directory as a PO directory if and only if it has a
 
10250
        # POTFILES.in file. This allows packages to have multiple PO
 
10251
        # directories under different names or in different locations.
 
10252
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
 
10253
          rm -f "$ac_dir/POTFILES"
 
10254
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
 
10255
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
 
10256
          POMAKEFILEDEPS="POTFILES.in"
 
10257
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
 
10258
          # on $ac_dir but don't depend on user-specified configuration
 
10259
          # parameters.
 
10260
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 
10261
            # The LINGUAS file contains the set of available languages.
 
10262
            if test -n "$OBSOLETE_ALL_LINGUAS"; then
 
10263
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 
10264
            fi
 
10265
            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
10266
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
 
10267
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 
10268
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 
10269
          else
 
10270
            # The set of available languages was given in configure.in.
 
10271
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
 
10272
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
 
10273
          fi
 
10274
          # Compute POFILES
 
10275
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 
10276
          # Compute UPDATEPOFILES
 
10277
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 
10278
          # Compute DUMMYPOFILES
 
10279
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 
10280
          # Compute GMOFILES
 
10281
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
 
10282
          case "$ac_given_srcdir" in
 
10283
            .) srcdirpre= ;;
 
10284
            *) srcdirpre='$(srcdir)/' ;;
 
10285
          esac
 
10286
          POFILES=
 
10287
          UPDATEPOFILES=
 
10288
          DUMMYPOFILES=
 
10289
          GMOFILES=
 
10290
          for lang in $ALL_LINGUAS; do
 
10291
            POFILES="$POFILES $srcdirpre$lang.po"
 
10292
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 
10293
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 
10294
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 
10295
          done
 
10296
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
 
10297
          # environment variable.
 
10298
          INST_LINGUAS=
 
10299
          if test -n "$ALL_LINGUAS"; then
 
10300
            for presentlang in $ALL_LINGUAS; do
 
10301
              useit=no
 
10302
              if test "%UNSET%" != "$LINGUAS"; then
 
10303
                desiredlanguages="$LINGUAS"
 
10304
              else
 
10305
                desiredlanguages="$ALL_LINGUAS"
 
10306
              fi
 
10307
              for desiredlang in $desiredlanguages; do
 
10308
                # Use the presentlang catalog if desiredlang is
 
10309
                #   a. equal to presentlang, or
 
10310
                #   b. a variant of presentlang (because in this case,
 
10311
                #      presentlang can be used as a fallback for messages
 
10312
                #      which are not translated in the desiredlang catalog).
 
10313
                case "$desiredlang" in
 
10314
                  "$presentlang"*) useit=yes;;
 
10315
                esac
 
10316
              done
 
10317
              if test $useit = yes; then
 
10318
                INST_LINGUAS="$INST_LINGUAS $presentlang"
 
10319
              fi
 
10320
            done
 
10321
          fi
 
10322
          CATALOGS=
 
10323
          if test -n "$INST_LINGUAS"; then
 
10324
            for lang in $INST_LINGUAS; do
 
10325
              CATALOGS="$CATALOGS $lang.gmo"
 
10326
            done
 
10327
          fi
 
10328
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
 
10329
          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
 
10330
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
 
10331
            if test -f "$f"; then
 
10332
              case "$f" in
 
10333
                *.orig | *.bak | *~) ;;
 
10334
                *) cat "$f" >> "$ac_dir/Makefile" ;;
 
10335
              esac
 
10336
            fi
 
10337
          done
 
10338
        fi
 
10339
        ;;
 
10340
      esac
 
10341
    done]],
 
10342
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
 
10343
    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
 
10344
    # from automake < 1.5.
 
10345
    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
 
10346
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
 
10347
    LINGUAS="${LINGUAS-%UNSET%}"
 
10348
   ])
 
10349
])
 
10350
 
 
10351
dnl Postprocesses a Makefile in a directory containing PO files.
 
10352
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
 
10353
[
 
10354
  # When this code is run, in config.status, two variables have already been
 
10355
  # set:
 
10356
  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
 
10357
  # - LINGUAS is the value of the environment variable LINGUAS at configure
 
10358
  #   time.
 
10359
 
 
10360
changequote(,)dnl
 
10361
  # Adjust a relative srcdir.
 
10362
  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 
10363
  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
10364
  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 
10365
  # In autoconf-2.13 it is called $ac_given_srcdir.
 
10366
  # In autoconf-2.50 it is called $srcdir.
 
10367
  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 
10368
  case "$ac_given_srcdir" in
 
10369
    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 
10370
    /*) top_srcdir="$ac_given_srcdir" ;;
 
10371
    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
10372
  esac
 
10373
 
 
10374
  # Find a way to echo strings without interpreting backslash.
 
10375
  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
 
10376
    gt_echo='echo'
 
10377
  else
 
10378
    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
 
10379
      gt_echo='printf %s\n'
 
10380
    else
 
10381
      echo_func () {
 
10382
        cat <<EOT
 
10383
$*
 
10384
EOT
 
10385
      }
 
10386
      gt_echo='echo_func'
 
10387
    fi
 
10388
  fi
 
10389
 
 
10390
  # A sed script that extracts the value of VARIABLE from a Makefile.
 
10391
  sed_x_variable='
 
10392
# Test if the hold space is empty.
 
10393
x
 
10394
s/P/P/
 
10395
x
 
10396
ta
 
10397
# Yes it was empty. Look if we have the expected variable definition.
 
10398
/^[      ]*VARIABLE[     ]*=/{
 
10399
  # Seen the first line of the variable definition.
 
10400
  s/^[   ]*VARIABLE[     ]*=//
 
10401
  ba
 
10402
}
 
10403
bd
 
10404
:a
 
10405
# Here we are processing a line from the variable definition.
 
10406
# Remove comment, more precisely replace it with a space.
 
10407
s/#.*$/ /
 
10408
# See if the line ends in a backslash.
 
10409
tb
 
10410
:b
 
10411
s/\\$//
 
10412
# Print the line, without the trailing backslash.
 
10413
p
 
10414
tc
 
10415
# There was no trailing backslash. The end of the variable definition is
 
10416
# reached. Clear the hold space.
 
10417
s/^.*$//
 
10418
x
 
10419
bd
 
10420
:c
 
10421
# A trailing backslash means that the variable definition continues in the
 
10422
# next line. Put a nonempty string into the hold space to indicate this.
 
10423
s/^.*$/P/
 
10424
x
 
10425
:d
 
10426
'
 
10427
changequote([,])dnl
 
10428
 
 
10429
  # Set POTFILES to the value of the Makefile variable POTFILES.
 
10430
  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
 
10431
  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
 
10432
  # Compute POTFILES_DEPS as
 
10433
  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
 
10434
  POTFILES_DEPS=
 
10435
  for file in $POTFILES; do
 
10436
    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
 
10437
  done
 
10438
  POMAKEFILEDEPS=""
 
10439
 
 
10440
  if test -n "$OBSOLETE_ALL_LINGUAS"; then
 
10441
    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 
10442
  fi
 
10443
  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 
10444
    # The LINGUAS file contains the set of available languages.
 
10445
    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
10446
    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 
10447
  else
 
10448
    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
 
10449
    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
 
10450
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
 
10451
  fi
 
10452
  # Hide the ALL_LINGUAS assigment from automake < 1.5.
 
10453
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 
10454
  # Compute POFILES
 
10455
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 
10456
  # Compute UPDATEPOFILES
 
10457
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 
10458
  # Compute DUMMYPOFILES
 
10459
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 
10460
  # Compute GMOFILES
 
10461
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
 
10462
  # Compute PROPERTIESFILES
 
10463
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
 
10464
  # Compute CLASSFILES
 
10465
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
 
10466
  # Compute QMFILES
 
10467
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
 
10468
  # Compute MSGFILES
 
10469
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
 
10470
  # Compute RESOURCESDLLFILES
 
10471
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
 
10472
  case "$ac_given_srcdir" in
 
10473
    .) srcdirpre= ;;
 
10474
    *) srcdirpre='$(srcdir)/' ;;
 
10475
  esac
 
10476
  POFILES=
 
10477
  UPDATEPOFILES=
 
10478
  DUMMYPOFILES=
 
10479
  GMOFILES=
 
10480
  PROPERTIESFILES=
 
10481
  CLASSFILES=
 
10482
  QMFILES=
 
10483
  MSGFILES=
 
10484
  RESOURCESDLLFILES=
 
10485
  for lang in $ALL_LINGUAS; do
 
10486
    POFILES="$POFILES $srcdirpre$lang.po"
 
10487
    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 
10488
    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 
10489
    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 
10490
    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
 
10491
    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
 
10492
    QMFILES="$QMFILES $srcdirpre$lang.qm"
 
10493
    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
10494
    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
 
10495
    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
 
10496
    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
 
10497
  done
 
10498
  # CATALOGS depends on both $ac_dir and the user's LINGUAS
 
10499
  # environment variable.
 
10500
  INST_LINGUAS=
 
10501
  if test -n "$ALL_LINGUAS"; then
 
10502
    for presentlang in $ALL_LINGUAS; do
 
10503
      useit=no
 
10504
      if test "%UNSET%" != "$LINGUAS"; then
 
10505
        desiredlanguages="$LINGUAS"
 
10506
      else
 
10507
        desiredlanguages="$ALL_LINGUAS"
 
10508
      fi
 
10509
      for desiredlang in $desiredlanguages; do
 
10510
        # Use the presentlang catalog if desiredlang is
 
10511
        #   a. equal to presentlang, or
 
10512
        #   b. a variant of presentlang (because in this case,
 
10513
        #      presentlang can be used as a fallback for messages
 
10514
        #      which are not translated in the desiredlang catalog).
 
10515
        case "$desiredlang" in
 
10516
          "$presentlang"*) useit=yes;;
 
10517
        esac
 
10518
      done
 
10519
      if test $useit = yes; then
 
10520
        INST_LINGUAS="$INST_LINGUAS $presentlang"
 
10521
      fi
 
10522
    done
 
10523
  fi
 
10524
  CATALOGS=
 
10525
  JAVACATALOGS=
 
10526
  QTCATALOGS=
 
10527
  TCLCATALOGS=
 
10528
  CSHARPCATALOGS=
 
10529
  if test -n "$INST_LINGUAS"; then
 
10530
    for lang in $INST_LINGUAS; do
 
10531
      CATALOGS="$CATALOGS $lang.gmo"
 
10532
      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
 
10533
      QTCATALOGS="$QTCATALOGS $lang.qm"
 
10534
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
10535
      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
 
10536
      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
 
10537
      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
 
10538
    done
 
10539
  fi
 
10540
 
 
10541
  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
 
10542
  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
 
10543
    # Add dependencies that cannot be formulated as a simple suffix rule.
 
10544
    for lang in $ALL_LINGUAS; do
 
10545
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
10546
      cat >> "$ac_file.tmp" <<EOF
 
10547
$frobbedlang.msg: $lang.po
 
10548
        @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
 
10549
        \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
10550
EOF
 
10551
    done
 
10552
  fi
 
10553
  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
 
10554
    # Add dependencies that cannot be formulated as a simple suffix rule.
 
10555
    for lang in $ALL_LINGUAS; do
 
10556
      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
 
10557
      cat >> "$ac_file.tmp" <<EOF
 
10558
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
 
10559
        @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
 
10560
        \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
10561
EOF
 
10562
    done
 
10563
  fi
 
10564
  if test -n "$POMAKEFILEDEPS"; then
 
10565
    cat >> "$ac_file.tmp" <<EOF
 
10566
Makefile: $POMAKEFILEDEPS
 
10567
EOF
 
10568
  fi
 
10569
  mv "$ac_file.tmp" "$ac_file"
 
10570
])
 
10571
 
 
10572
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
 
10573
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
 
10574
[
 
10575
  XGETTEXT_EXTRA_OPTIONS=
 
10576
])
 
10577
 
 
10578
dnl Registers an option to be passed to xgettext in the po subdirectory.
 
10579
AC_DEFUN([AM_XGETTEXT_OPTION],
 
10580
[
 
10581
  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
 
10582
  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
 
10583
])
 
10584
 
 
10585
# progtest.m4 serial 6 (gettext-0.18)
 
10586
dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
 
10587
dnl This file is free software; the Free Software Foundation
 
10588
dnl gives unlimited permission to copy and/or distribute it,
 
10589
dnl with or without modifications, as long as this notice is preserved.
 
10590
dnl
 
10591
dnl This file can can be used in projects which are not available under
 
10592
dnl the GNU General Public License or the GNU Library General Public
 
10593
dnl License but which still want to provide support for the GNU gettext
 
10594
dnl functionality.
 
10595
dnl Please note that the actual code of the GNU gettext library is covered
 
10596
dnl by the GNU Library General Public License, and the rest of the GNU
 
10597
dnl gettext package package is covered by the GNU General Public License.
 
10598
dnl They are *not* in the public domain.
 
10599
 
 
10600
dnl Authors:
 
10601
dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
 
10602
 
 
10603
AC_PREREQ([2.50])
 
10604
 
 
10605
# Search path for a program which passes the given test.
 
10606
 
 
10607
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
10608
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
10609
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
 
10610
[
 
10611
# Prepare PATH_SEPARATOR.
 
10612
# The user is always right.
 
10613
if test "${PATH_SEPARATOR+set}" != set; then
 
10614
  echo "#! /bin/sh" >conf$$.sh
 
10615
  echo  "exit 0"   >>conf$$.sh
 
10616
  chmod +x conf$$.sh
 
10617
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
10618
    PATH_SEPARATOR=';'
 
10619
  else
 
10620
    PATH_SEPARATOR=:
 
10621
  fi
 
10622
  rm -f conf$$.sh
 
10623
fi
 
10624
 
 
10625
# Find out how to test for executable files. Don't use a zero-byte file,
 
10626
# as systems may use methods other than mode bits to determine executability.
 
10627
cat >conf$$.file <<_ASEOF
 
10628
#! /bin/sh
 
10629
exit 0
 
10630
_ASEOF
 
10631
chmod +x conf$$.file
 
10632
if test -x conf$$.file >/dev/null 2>&1; then
 
10633
  ac_executable_p="test -x"
 
10634
else
 
10635
  ac_executable_p="test -f"
 
10636
fi
 
10637
rm -f conf$$.file
 
10638
 
 
10639
# Extract the first word of "$2", so it can be a program name with args.
 
10640
set dummy $2; ac_word=[$]2
 
10641
AC_MSG_CHECKING([for $ac_word])
 
10642
AC_CACHE_VAL([ac_cv_path_$1],
 
10643
[case "[$]$1" in
 
10644
  [[\\/]]* | ?:[[\\/]]*)
 
10645
    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
10646
    ;;
 
10647
  *)
 
10648
    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
 
10649
    for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
10650
      IFS="$ac_save_IFS"
 
10651
      test -z "$ac_dir" && ac_dir=.
 
10652
      for ac_exec_ext in '' $ac_executable_extensions; do
 
10653
        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
 
10654
          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
 
10655
          if [$3]; then
 
10656
            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
 
10657
            break 2
 
10658
          fi
 
10659
        fi
 
10660
      done
 
10661
    done
 
10662
    IFS="$ac_save_IFS"
 
10663
dnl If no 4th arg is given, leave the cache variable unset,
 
10664
dnl so AC_PATH_PROGS will keep looking.
 
10665
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
10666
])dnl
 
10667
    ;;
 
10668
esac])dnl
 
10669
$1="$ac_cv_path_$1"
 
10670
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
10671
  AC_MSG_RESULT([$][$1])
 
10672
else
 
10673
  AC_MSG_RESULT([no])
 
10674
fi
 
10675
AC_SUBST([$1])dnl
 
10676
])
 
10677
 
 
10678
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 
10679
#
 
10680
# This file is free software; the Free Software Foundation
 
10681
# gives unlimited permission to copy and/or distribute it,
 
10682
# with or without modifications, as long as this notice is preserved.
 
10683
 
 
10684
# AM_AUTOMAKE_VERSION(VERSION)
 
10685
# ----------------------------
 
10686
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
10687
# generated from the m4 files accompanying Automake X.Y.
 
10688
# (This private macro should not be called outside this file.)
 
10689
AC_DEFUN([AM_AUTOMAKE_VERSION],
 
10690
[am__api_version='1.11'
 
10691
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 
10692
dnl require some minimum version.  Point them to the right macro.
 
10693
m4_if([$1], [1.11.1], [],
 
10694
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 
10695
])
 
10696
 
 
10697
# _AM_AUTOCONF_VERSION(VERSION)
 
10698
# -----------------------------
 
10699
# aclocal traces this macro to find the Autoconf version.
 
10700
# This is a private macro too.  Using m4_define simplifies
 
10701
# the logic in aclocal, which can simply ignore this definition.
 
10702
m4_define([_AM_AUTOCONF_VERSION], [])
 
10703
 
 
10704
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
10705
# -------------------------------
 
10706
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 
10707
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 
10708
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
10709
[AM_AUTOMAKE_VERSION([1.11.1])dnl
 
10710
m4_ifndef([AC_AUTOCONF_VERSION],
 
10711
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
10712
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
10713
 
 
10714
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
10715
 
 
10716
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
10717
#
 
10718
# This file is free software; the Free Software Foundation
 
10719
# gives unlimited permission to copy and/or distribute it,
 
10720
# with or without modifications, as long as this notice is preserved.
 
10721
 
 
10722
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
10723
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
10724
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
10725
#
 
10726
# Of course, Automake must honor this variable whenever it calls a
 
10727
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
10728
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
10729
# depending on how configure is run.  This is pretty annoying, since
 
10730
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
10731
# source directory, any form will work fine, but in subdirectories a
 
10732
# relative path needs to be adjusted first.
 
10733
#
 
10734
# $ac_aux_dir/missing
 
10735
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
10736
# $top_srcdir/$ac_aux_dir/missing
 
10737
#    fails if $ac_aux_dir is absolute,
 
10738
#    fails when called from a subdirectory in a VPATH build with
 
10739
#          a relative $ac_aux_dir
 
10740
#
 
10741
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
10742
# are both prefixed by $srcdir.  In an in-source build this is usually
 
10743
# harmless because $srcdir is `.', but things will broke when you
 
10744
# start a VPATH build or use an absolute $srcdir.
 
10745
#
 
10746
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
10747
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
10748
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
10749
# and then we would define $MISSING as
 
10750
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
10751
# This will work as long as MISSING is not called from configure, because
 
10752
# unfortunately $(top_srcdir) has no meaning in configure.
 
10753
# However there are other variables, like CC, which are often used in
 
10754
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
10755
#
 
10756
# Another solution, used here, is to always expand $ac_aux_dir to an
 
10757
# absolute PATH.  The drawback is that using absolute paths prevent a
 
10758
# configured tree to be moved without reconfiguration.
 
10759
 
 
10760
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
10761
[dnl Rely on autoconf to set up CDPATH properly.
 
10762
AC_PREREQ([2.50])dnl
 
10763
# expand $ac_aux_dir to an absolute path
 
10764
am_aux_dir=`cd $ac_aux_dir && pwd`
 
10765
])
 
10766
 
 
10767
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
10768
 
 
10769
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 
10770
# Free Software Foundation, Inc.
 
10771
#
 
10772
# This file is free software; the Free Software Foundation
 
10773
# gives unlimited permission to copy and/or distribute it,
 
10774
# with or without modifications, as long as this notice is preserved.
 
10775
 
 
10776
# serial 9
 
10777
 
 
10778
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
10779
# -------------------------------------
 
10780
# Define a conditional.
 
10781
AC_DEFUN([AM_CONDITIONAL],
 
10782
[AC_PREREQ(2.52)dnl
 
10783
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
10784
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
10785
AC_SUBST([$1_TRUE])dnl
 
10786
AC_SUBST([$1_FALSE])dnl
 
10787
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
 
10788
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 
10789
m4_define([_AM_COND_VALUE_$1], [$2])dnl
 
10790
if $2; then
 
10791
  $1_TRUE=
 
10792
  $1_FALSE='#'
 
10793
else
 
10794
  $1_TRUE='#'
 
10795
  $1_FALSE=
 
10796
fi
 
10797
AC_CONFIG_COMMANDS_PRE(
 
10798
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
10799
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
10800
Usually this means the macro was only invoked conditionally.]])
 
10801
fi])])
 
10802
 
 
10803
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 
10804
# Free Software Foundation, Inc.
 
10805
#
 
10806
# This file is free software; the Free Software Foundation
 
10807
# gives unlimited permission to copy and/or distribute it,
 
10808
# with or without modifications, as long as this notice is preserved.
 
10809
 
 
10810
# serial 10
 
10811
 
 
10812
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
10813
# written in clear, in which case automake, when reading aclocal.m4,
 
10814
# will think it sees a *use*, and therefore will trigger all it's
 
10815
# C support machinery.  Also note that it means that autoscan, seeing
 
10816
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
10817
 
 
10818
 
 
10819
# _AM_DEPENDENCIES(NAME)
 
10820
# ----------------------
 
10821
# See how the compiler implements dependency checking.
 
10822
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
10823
# We try a few techniques and use that to set a single cache variable.
 
10824
#
 
10825
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
10826
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
10827
# dependency, and given that the user is not expected to run this macro,
 
10828
# just rely on AC_PROG_CC.
 
10829
AC_DEFUN([_AM_DEPENDENCIES],
 
10830
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
10831
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
10832
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
10833
AC_REQUIRE([AM_DEP_TRACK])dnl
 
10834
 
 
10835
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
10836
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
10837
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
10838
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
 
10839
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
10840
                   [depcc="$$1"   am_compiler_list=])
 
10841
 
 
10842
AC_CACHE_CHECK([dependency style of $depcc],
 
10843
               [am_cv_$1_dependencies_compiler_type],
 
10844
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
10845
  # We make a subdir and do the tests there.  Otherwise we can end up
 
10846
  # making bogus files that we don't know about and never remove.  For
 
10847
  # instance it was reported that on HP-UX the gcc test will end up
 
10848
  # making a dummy file named `D' -- because `-MD' means `put the output
 
10849
  # in D'.
 
10850
  mkdir conftest.dir
 
10851
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
10852
  # using a relative directory.
 
10853
  cp "$am_depcomp" conftest.dir
 
10854
  cd conftest.dir
 
10855
  # We will build objects and dependencies in a subdirectory because
 
10856
  # it helps to detect inapplicable dependency modes.  For instance
 
10857
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
10858
  # side effect of compilation, but ICC will put the dependencies in
 
10859
  # the current directory while Tru64 will put them in the object
 
10860
  # directory.
 
10861
  mkdir sub
 
10862
 
 
10863
  am_cv_$1_dependencies_compiler_type=none
 
10864
  if test "$am_compiler_list" = ""; then
 
10865
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
10866
  fi
 
10867
  am__universal=false
 
10868
  m4_case([$1], [CC],
 
10869
    [case " $depcc " in #(
 
10870
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
10871
     esac],
 
10872
    [CXX],
 
10873
    [case " $depcc " in #(
 
10874
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
10875
     esac])
 
10876
 
 
10877
  for depmode in $am_compiler_list; do
 
10878
    # Setup a source with many dependencies, because some compilers
 
10879
    # like to wrap large dependency lists on column 80 (with \), and
 
10880
    # we should not choose a depcomp mode which is confused by this.
 
10881
    #
 
10882
    # We need to recreate these files for each test, as the compiler may
 
10883
    # overwrite some of them when testing with obscure command lines.
 
10884
    # This happens at least with the AIX C compiler.
 
10885
    : > sub/conftest.c
 
10886
    for i in 1 2 3 4 5 6; do
 
10887
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
10888
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
10889
      # Solaris 8's {/usr,}/bin/sh.
 
10890
      touch sub/conftst$i.h
 
10891
    done
 
10892
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
10893
 
 
10894
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
10895
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
10896
    # handle `-M -o', and we need to detect this.  Also, some Intel
 
10897
    # versions had trouble with output in subdirs
 
10898
    am__obj=sub/conftest.${OBJEXT-o}
 
10899
    am__minus_obj="-o $am__obj"
 
10900
    case $depmode in
 
10901
    gcc)
 
10902
      # This depmode causes a compiler race in universal mode.
 
10903
      test "$am__universal" = false || continue
 
10904
      ;;
 
10905
    nosideeffect)
 
10906
      # after this tag, mechanisms are not by side-effect, so they'll
 
10907
      # only be used when explicitly requested
 
10908
      if test "x$enable_dependency_tracking" = xyes; then
 
10909
        continue
 
10910
      else
 
10911
        break
 
10912
      fi
 
10913
      ;;
 
10914
    msvisualcpp | msvcmsys)
 
10915
      # This compiler won't grok `-c -o', but also, the minuso test has
 
10916
      # not run yet.  These depmodes are late enough in the game, and
 
10917
      # so weak that their functioning should not be impacted.
 
10918
      am__obj=conftest.${OBJEXT-o}
 
10919
      am__minus_obj=
 
10920
      ;;
 
10921
    none) break ;;
 
10922
    esac
 
10923
    if depmode=$depmode \
 
10924
       source=sub/conftest.c object=$am__obj \
 
10925
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
10926
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
 
10927
         >/dev/null 2>conftest.err &&
 
10928
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 
10929
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
10930
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
 
10931
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
10932
      # icc doesn't choke on unknown options, it will just issue warnings
 
10933
      # or remarks (even with -Werror).  So we grep stderr for any message
 
10934
      # that says an option was ignored or not supported.
 
10935
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
10936
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
10937
      # The diagnosis changed in icc 8.0:
 
10938
      #   icc: Command line remark: option '-MP' not supported
 
10939
      if (grep 'ignoring option' conftest.err ||
 
10940
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
10941
        am_cv_$1_dependencies_compiler_type=$depmode
 
10942
        break
 
10943
      fi
 
10944
    fi
 
10945
  done
 
10946
 
 
10947
  cd ..
 
10948
  rm -rf conftest.dir
 
10949
else
 
10950
  am_cv_$1_dependencies_compiler_type=none
 
10951
fi
 
10952
])
 
10953
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
10954
AM_CONDITIONAL([am__fastdep$1], [
 
10955
  test "x$enable_dependency_tracking" != xno \
 
10956
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
10957
])
 
10958
 
 
10959
 
 
10960
# AM_SET_DEPDIR
 
10961
# -------------
 
10962
# Choose a directory name for dependency files.
 
10963
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
10964
AC_DEFUN([AM_SET_DEPDIR],
 
10965
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
10966
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
10967
])
 
10968
 
 
10969
 
 
10970
# AM_DEP_TRACK
 
10971
# ------------
 
10972
AC_DEFUN([AM_DEP_TRACK],
 
10973
[AC_ARG_ENABLE(dependency-tracking,
 
10974
[  --disable-dependency-tracking  speeds up one-time build
 
10975
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
10976
if test "x$enable_dependency_tracking" != xno; then
 
10977
  am_depcomp="$ac_aux_dir/depcomp"
 
10978
  AMDEPBACKSLASH='\'
 
10979
fi
 
10980
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
10981
AC_SUBST([AMDEPBACKSLASH])dnl
 
10982
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
10983
])
 
10984
 
 
10985
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
10986
 
 
10987
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 
10988
# Free Software Foundation, Inc.
 
10989
#
 
10990
# This file is free software; the Free Software Foundation
 
10991
# gives unlimited permission to copy and/or distribute it,
 
10992
# with or without modifications, as long as this notice is preserved.
 
10993
 
 
10994
#serial 5
 
10995
 
 
10996
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
10997
# ------------------------------
 
10998
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
10999
[{
 
11000
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
 
11001
  # are listed without --file.  Let's play safe and only enable the eval
 
11002
  # if we detect the quoting.
 
11003
  case $CONFIG_FILES in
 
11004
  *\'*) eval set x "$CONFIG_FILES" ;;
 
11005
  *)   set x $CONFIG_FILES ;;
 
11006
  esac
 
11007
  shift
 
11008
  for mf
 
11009
  do
 
11010
    # Strip MF so we end up with the name of the file.
 
11011
    mf=`echo "$mf" | sed -e 's/:.*$//'`
 
11012
    # Check whether this is an Automake generated Makefile or not.
 
11013
    # We used to match only the files named `Makefile.in', but
 
11014
    # some people rename them; so instead we look at the file content.
 
11015
    # Grep'ing the first line is not enough: some people post-process
 
11016
    # each Makefile.in and add a new line on top of each file to say so.
 
11017
    # Grep'ing the whole file is not good either: AIX grep has a line
 
11018
    # limit of 2048, but all sed's we know have understand at least 4000.
 
11019
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
 
11020
      dirpart=`AS_DIRNAME("$mf")`
 
11021
    else
 
11022
      continue
 
11023
    fi
 
11024
    # Extract the definition of DEPDIR, am__include, and am__quote
 
11025
    # from the Makefile without running `make'.
 
11026
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
11027
    test -z "$DEPDIR" && continue
 
11028
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
11029
    test -z "am__include" && continue
 
11030
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
11031
    # When using ansi2knr, U may be empty or an underscore; expand it
 
11032
    U=`sed -n 's/^U = //p' < "$mf"`
 
11033
    # Find all dependency output files, they are included files with
 
11034
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
11035
    # simplest approach to changing $(DEPDIR) to its actual value in the
 
11036
    # expansion.
 
11037
    for file in `sed -n "
 
11038
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
11039
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
11040
      # Make sure the directory exists.
 
11041
      test -f "$dirpart/$file" && continue
 
11042
      fdir=`AS_DIRNAME(["$file"])`
 
11043
      AS_MKDIR_P([$dirpart/$fdir])
 
11044
      # echo "creating $dirpart/$file"
 
11045
      echo '# dummy' > "$dirpart/$file"
 
11046
    done
 
11047
  done
 
11048
}
 
11049
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
11050
 
 
11051
 
 
11052
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
11053
# -----------------------------
 
11054
# This macro should only be invoked once -- use via AC_REQUIRE.
 
11055
#
 
11056
# This code is only required when automatic dependency tracking
 
11057
# is enabled.  FIXME.  This creates each `.P' file that we will
 
11058
# need in order to bootstrap the dependency handling code.
 
11059
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
11060
[AC_CONFIG_COMMANDS([depfiles],
 
11061
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
11062
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
11063
])
 
11064
 
 
11065
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
11066
# Free Software Foundation, Inc.
 
11067
#
 
11068
# This file is free software; the Free Software Foundation
 
11069
# gives unlimited permission to copy and/or distribute it,
 
11070
# with or without modifications, as long as this notice is preserved.
 
11071
 
 
11072
# serial 8
 
11073
 
 
11074
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
11075
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
11076
 
 
11077
# Do all the work for Automake.                             -*- Autoconf -*-
 
11078
 
 
11079
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
11080
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 
11081
#
 
11082
# This file is free software; the Free Software Foundation
 
11083
# gives unlimited permission to copy and/or distribute it,
 
11084
# with or without modifications, as long as this notice is preserved.
 
11085
 
 
11086
# serial 16
 
11087
 
 
11088
# This macro actually does too much.  Some checks are only needed if
 
11089
# your package does certain things.  But this isn't really a big deal.
 
11090
 
 
11091
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
11092
# AM_INIT_AUTOMAKE([OPTIONS])
 
11093
# -----------------------------------------------
 
11094
# The call with PACKAGE and VERSION arguments is the old style
 
11095
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
11096
# and VERSION should now be passed to AC_INIT and removed from
 
11097
# the call to AM_INIT_AUTOMAKE.
 
11098
# We support both call styles for the transition.  After
 
11099
# the next Automake release, Autoconf can make the AC_INIT
 
11100
# arguments mandatory, and then we can depend on a new Autoconf
 
11101
# release and drop the old call support.
 
11102
AC_DEFUN([AM_INIT_AUTOMAKE],
 
11103
[AC_PREREQ([2.62])dnl
 
11104
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
11105
dnl the ones we care about.
 
11106
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
11107
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
11108
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
11109
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
11110
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
11111
  # is not polluted with repeated "-I."
 
11112
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
11113
  # test to see if srcdir already configured
 
11114
  if test -f $srcdir/config.status; then
 
11115
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
11116
  fi
 
11117
fi
 
11118
 
 
11119
# test whether we have cygpath
 
11120
if test -z "$CYGPATH_W"; then
 
11121
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
11122
    CYGPATH_W='cygpath -w'
 
11123
  else
 
11124
    CYGPATH_W=echo
 
11125
  fi
 
11126
fi
 
11127
AC_SUBST([CYGPATH_W])
 
11128
 
 
11129
# Define the identity of the package.
 
11130
dnl Distinguish between old-style and new-style calls.
 
11131
m4_ifval([$2],
 
11132
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
11133
 AC_SUBST([PACKAGE], [$1])dnl
 
11134
 AC_SUBST([VERSION], [$2])],
 
11135
[_AM_SET_OPTIONS([$1])dnl
 
11136
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
11137
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
11138
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 
11139
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
11140
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
11141
 
 
11142
_AM_IF_OPTION([no-define],,
 
11143
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
11144
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
11145
 
 
11146
# Some tools Automake needs.
 
11147
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
11148
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
11149
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
11150
AM_MISSING_PROG(AUTOCONF, autoconf)
 
11151
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
11152
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
11153
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
11154
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
11155
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 
11156
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
11157
# We need awk for the "check" target.  The system "awk" is bad on
 
11158
# some platforms.
 
11159
AC_REQUIRE([AC_PROG_AWK])dnl
 
11160
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
11161
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
11162
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
11163
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
11164
                             [_AM_PROG_TAR([v7])])])
 
11165
_AM_IF_OPTION([no-dependencies],,
 
11166
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
11167
                  [_AM_DEPENDENCIES(CC)],
 
11168
                  [define([AC_PROG_CC],
 
11169
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
11170
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
11171
                  [_AM_DEPENDENCIES(CXX)],
 
11172
                  [define([AC_PROG_CXX],
 
11173
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
11174
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
11175
                  [_AM_DEPENDENCIES(OBJC)],
 
11176
                  [define([AC_PROG_OBJC],
 
11177
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
11178
])
 
11179
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
 
11180
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
 
11181
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 
11182
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 
11183
AC_CONFIG_COMMANDS_PRE(dnl
 
11184
[m4_provide_if([_AM_COMPILER_EXEEXT],
 
11185
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 
11186
])
 
11187
 
 
11188
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 
11189
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 
11190
dnl mangled by Autoconf and run in a shell conditional statement.
 
11191
m4_define([_AC_COMPILER_EXEEXT],
 
11192
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
11193
 
 
11194
 
 
11195
# When config.status generates a header, we must update the stamp-h file.
 
11196
# This file resides in the same directory as the config header
 
11197
# that is generated.  The stamp files are numbered to have different names.
 
11198
 
 
11199
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
11200
# loop where config.status creates the headers, so we can generate
 
11201
# our stamp files there.
 
11202
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
11203
[# Compute $1's index in $config_headers.
 
11204
_am_arg=$1
 
11205
_am_stamp_count=1
 
11206
for _am_header in $config_headers :; do
 
11207
  case $_am_header in
 
11208
    $_am_arg | $_am_arg:* )
 
11209
      break ;;
 
11210
    * )
 
11211
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
11212
  esac
 
11213
done
 
11214
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
11215
 
 
11216
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 
11217
#
 
11218
# This file is free software; the Free Software Foundation
 
11219
# gives unlimited permission to copy and/or distribute it,
 
11220
# with or without modifications, as long as this notice is preserved.
 
11221
 
 
11222
# AM_PROG_INSTALL_SH
 
11223
# ------------------
 
11224
# Define $install_sh.
 
11225
AC_DEFUN([AM_PROG_INSTALL_SH],
 
11226
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
11227
if test x"${install_sh}" != xset; then
 
11228
  case $am_aux_dir in
 
11229
  *\ * | *\     *)
 
11230
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 
11231
  *)
 
11232
    install_sh="\${SHELL} $am_aux_dir/install-sh"
 
11233
  esac
 
11234
fi
 
11235
AC_SUBST(install_sh)])
 
11236
 
 
11237
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
11238
#
 
11239
# This file is free software; the Free Software Foundation
 
11240
# gives unlimited permission to copy and/or distribute it,
 
11241
# with or without modifications, as long as this notice is preserved.
 
11242
 
 
11243
# serial 2
 
11244
 
 
11245
# Check whether the underlying file-system supports filenames
 
11246
# with a leading dot.  For instance MS-DOS doesn't.
 
11247
AC_DEFUN([AM_SET_LEADING_DOT],
 
11248
[rm -rf .tst 2>/dev/null
 
11249
mkdir .tst 2>/dev/null
 
11250
if test -d .tst; then
 
11251
  am__leading_dot=.
 
11252
else
 
11253
  am__leading_dot=_
 
11254
fi
 
11255
rmdir .tst 2>/dev/null
 
11256
AC_SUBST([am__leading_dot])])
 
11257
 
 
11258
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 
11259
# From Jim Meyering
 
11260
 
 
11261
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 
11262
# Free Software Foundation, Inc.
 
11263
#
 
11264
# This file is free software; the Free Software Foundation
 
11265
# gives unlimited permission to copy and/or distribute it,
 
11266
# with or without modifications, as long as this notice is preserved.
 
11267
 
 
11268
# serial 5
 
11269
 
 
11270
# AM_MAINTAINER_MODE([DEFAULT-MODE])
 
11271
# ----------------------------------
 
11272
# Control maintainer-specific portions of Makefiles.
 
11273
# Default is to disable them, unless `enable' is passed literally.
 
11274
# For symmetry, `disable' may be passed as well.  Anyway, the user
 
11275
# can override the default with the --enable/--disable switch.
 
11276
AC_DEFUN([AM_MAINTAINER_MODE],
 
11277
[m4_case(m4_default([$1], [disable]),
 
11278
       [enable], [m4_define([am_maintainer_other], [disable])],
 
11279
       [disable], [m4_define([am_maintainer_other], [enable])],
 
11280
       [m4_define([am_maintainer_other], [enable])
 
11281
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
 
11282
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
 
11283
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
 
11284
  AC_ARG_ENABLE([maintainer-mode],
 
11285
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
 
11286
                          (and sometimes confusing) to the casual installer],
 
11287
      [USE_MAINTAINER_MODE=$enableval],
 
11288
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
 
11289
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
11290
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
 
11291
  MAINT=$MAINTAINER_MODE_TRUE
 
11292
  AC_SUBST([MAINT])dnl
 
11293
]
 
11294
)
 
11295
 
 
11296
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
11297
 
 
11298
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
11299
 
 
11300
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 
11301
#
 
11302
# This file is free software; the Free Software Foundation
 
11303
# gives unlimited permission to copy and/or distribute it,
 
11304
# with or without modifications, as long as this notice is preserved.
 
11305
 
 
11306
# serial 4
 
11307
 
 
11308
# AM_MAKE_INCLUDE()
 
11309
# -----------------
 
11310
# Check to see how make treats includes.
 
11311
AC_DEFUN([AM_MAKE_INCLUDE],
 
11312
[am_make=${MAKE-make}
 
11313
cat > confinc << 'END'
 
11314
am__doit:
 
11315
        @echo this is the am__doit target
 
11316
.PHONY: am__doit
 
11317
END
 
11318
# If we don't find an include directive, just comment out the code.
 
11319
AC_MSG_CHECKING([for style of include used by $am_make])
 
11320
am__include="#"
 
11321
am__quote=
 
11322
_am_result=none
 
11323
# First try GNU make style include.
 
11324
echo "include confinc" > confmf
 
11325
# Ignore all kinds of additional output from `make'.
 
11326
case `$am_make -s -f confmf 2> /dev/null` in #(
 
11327
*the\ am__doit\ target*)
 
11328
  am__include=include
 
11329
  am__quote=
 
11330
  _am_result=GNU
 
11331
  ;;
 
11332
esac
 
11333
# Now try BSD make style include.
 
11334
if test "$am__include" = "#"; then
 
11335
   echo '.include "confinc"' > confmf
 
11336
   case `$am_make -s -f confmf 2> /dev/null` in #(
 
11337
   *the\ am__doit\ target*)
 
11338
     am__include=.include
 
11339
     am__quote="\""
 
11340
     _am_result=BSD
 
11341
     ;;
 
11342
   esac
 
11343
fi
 
11344
AC_SUBST([am__include])
 
11345
AC_SUBST([am__quote])
 
11346
AC_MSG_RESULT([$_am_result])
 
11347
rm -f confinc confmf
 
11348
])
 
11349
 
 
11350
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
 
11351
# Free Software Foundation, Inc.
 
11352
#
 
11353
# This file is free software; the Free Software Foundation
 
11354
# gives unlimited permission to copy and/or distribute it,
 
11355
# with or without modifications, as long as this notice is preserved.
 
11356
 
 
11357
# serial 6
 
11358
 
 
11359
# AM_PROG_CC_C_O
 
11360
# --------------
 
11361
# Like AC_PROG_CC_C_O, but changed for automake.
 
11362
AC_DEFUN([AM_PROG_CC_C_O],
 
11363
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
 
11364
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
11365
AC_REQUIRE_AUX_FILE([compile])dnl
 
11366
# FIXME: we rely on the cache variable name because
 
11367
# there is no other way.
 
11368
set dummy $CC
 
11369
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
 
11370
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
 
11371
if test "$am_t" != yes; then
 
11372
   # Losing compiler, so override with the script.
 
11373
   # FIXME: It is wrong to rewrite CC.
 
11374
   # But if we don't then we get into trouble of one sort or another.
 
11375
   # A longer-term fix would be to have automake use am__CC in this case,
 
11376
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
 
11377
   CC="$am_aux_dir/compile $CC"
 
11378
fi
 
11379
dnl Make sure AC_PROG_CC is never called again, or it will override our
 
11380
dnl setting of CC.
 
11381
m4_define([AC_PROG_CC],
 
11382
          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
 
11383
])
 
11384
 
 
11385
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
11386
 
 
11387
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 
11388
# Free Software Foundation, Inc.
 
11389
#
 
11390
# This file is free software; the Free Software Foundation
 
11391
# gives unlimited permission to copy and/or distribute it,
 
11392
# with or without modifications, as long as this notice is preserved.
 
11393
 
 
11394
# serial 6
 
11395
 
 
11396
# AM_MISSING_PROG(NAME, PROGRAM)
 
11397
# ------------------------------
 
11398
AC_DEFUN([AM_MISSING_PROG],
 
11399
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
11400
$1=${$1-"${am_missing_run}$2"}
 
11401
AC_SUBST($1)])
 
11402
 
 
11403
 
 
11404
# AM_MISSING_HAS_RUN
 
11405
# ------------------
 
11406
# Define MISSING if not defined so far and test if it supports --run.
 
11407
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
11408
AC_DEFUN([AM_MISSING_HAS_RUN],
 
11409
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
11410
AC_REQUIRE_AUX_FILE([missing])dnl
 
11411
if test x"${MISSING+set}" != xset; then
 
11412
  case $am_aux_dir in
 
11413
  *\ * | *\     *)
 
11414
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 
11415
  *)
 
11416
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
 
11417
  esac
 
11418
fi
 
11419
# Use eval to expand $SHELL
 
11420
if eval "$MISSING --run true"; then
 
11421
  am_missing_run="$MISSING --run "
 
11422
else
 
11423
  am_missing_run=
 
11424
  AC_MSG_WARN([`missing' script is too old or missing])
 
11425
fi
 
11426
])
 
11427
 
 
11428
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
11429
#
 
11430
# This file is free software; the Free Software Foundation
 
11431
# gives unlimited permission to copy and/or distribute it,
 
11432
# with or without modifications, as long as this notice is preserved.
 
11433
 
 
11434
# AM_PROG_MKDIR_P
 
11435
# ---------------
 
11436
# Check for `mkdir -p'.
 
11437
AC_DEFUN([AM_PROG_MKDIR_P],
 
11438
[AC_PREREQ([2.60])dnl
 
11439
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
11440
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 
11441
dnl while keeping a definition of mkdir_p for backward compatibility.
 
11442
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 
11443
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 
11444
dnl Makefile.ins that do not define MKDIR_P, so we do our own
 
11445
dnl adjustment using top_builddir (which is defined more often than
 
11446
dnl MKDIR_P).
 
11447
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 
11448
case $mkdir_p in
 
11449
  [[\\/$]]* | ?:[[\\/]]*) ;;
 
11450
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 
11451
esac
 
11452
])
 
11453
 
 
11454
# Helper functions for option handling.                     -*- Autoconf -*-
 
11455
 
 
11456
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 
11457
#
 
11458
# This file is free software; the Free Software Foundation
 
11459
# gives unlimited permission to copy and/or distribute it,
 
11460
# with or without modifications, as long as this notice is preserved.
 
11461
 
 
11462
# serial 4
 
11463
 
 
11464
# _AM_MANGLE_OPTION(NAME)
 
11465
# -----------------------
 
11466
AC_DEFUN([_AM_MANGLE_OPTION],
 
11467
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
11468
 
 
11469
# _AM_SET_OPTION(NAME)
 
11470
# ------------------------------
 
11471
# Set option NAME.  Presently that only means defining a flag for this option.
 
11472
AC_DEFUN([_AM_SET_OPTION],
 
11473
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
11474
 
 
11475
# _AM_SET_OPTIONS(OPTIONS)
 
11476
# ----------------------------------
 
11477
# OPTIONS is a space-separated list of Automake options.
 
11478
AC_DEFUN([_AM_SET_OPTIONS],
 
11479
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
11480
 
 
11481
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
11482
# -------------------------------------------
 
11483
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
11484
AC_DEFUN([_AM_IF_OPTION],
 
11485
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
11486
 
 
11487
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
11488
 
 
11489
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 
11490
# Free Software Foundation, Inc.
 
11491
#
 
11492
# This file is free software; the Free Software Foundation
 
11493
# gives unlimited permission to copy and/or distribute it,
 
11494
# with or without modifications, as long as this notice is preserved.
 
11495
 
 
11496
# serial 5
 
11497
 
 
11498
# AM_SANITY_CHECK
 
11499
# ---------------
 
11500
AC_DEFUN([AM_SANITY_CHECK],
 
11501
[AC_MSG_CHECKING([whether build environment is sane])
 
11502
# Just in case
 
11503
sleep 1
 
11504
echo timestamp > conftest.file
 
11505
# Reject unsafe characters in $srcdir or the absolute working directory
 
11506
# name.  Accept space and tab only in the latter.
 
11507
am_lf='
 
11508
'
 
11509
case `pwd` in
 
11510
  *[[\\\"\#\$\&\'\`$am_lf]]*)
 
11511
    AC_MSG_ERROR([unsafe absolute working directory name]);;
 
11512
esac
 
11513
case $srcdir in
 
11514
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
 
11515
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 
11516
esac
 
11517
 
 
11518
# Do `set' in a subshell so we don't clobber the current shell's
 
11519
# arguments.  Must try -L first in case configure is actually a
 
11520
# symlink; some systems play weird games with the mod time of symlinks
 
11521
# (eg FreeBSD returns the mod time of the symlink's containing
 
11522
# directory).
 
11523
if (
 
11524
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 
11525
   if test "$[*]" = "X"; then
 
11526
      # -L didn't work.
 
11527
      set X `ls -t "$srcdir/configure" conftest.file`
 
11528
   fi
 
11529
   rm -f conftest.file
 
11530
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
11531
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
11532
 
 
11533
      # If neither matched, then we have a broken ls.  This can happen
 
11534
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
11535
      # broken ls alias from the environment.  This has actually
 
11536
      # happened.  Such a system could not be considered "sane".
 
11537
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
11538
alias in your environment])
 
11539
   fi
 
11540
 
 
11541
   test "$[2]" = conftest.file
 
11542
   )
 
11543
then
 
11544
   # Ok.
 
11545
   :
 
11546
else
 
11547
   AC_MSG_ERROR([newly created file is older than distributed files!
 
11548
Check your system clock])
 
11549
fi
 
11550
AC_MSG_RESULT(yes)])
 
11551
 
 
11552
# Copyright (C) 2009  Free Software Foundation, Inc.
 
11553
#
 
11554
# This file is free software; the Free Software Foundation
 
11555
# gives unlimited permission to copy and/or distribute it,
 
11556
# with or without modifications, as long as this notice is preserved.
 
11557
 
 
11558
# serial 1
 
11559
 
 
11560
# AM_SILENT_RULES([DEFAULT])
 
11561
# --------------------------
 
11562
# Enable less verbose build rules; with the default set to DEFAULT
 
11563
# (`yes' being less verbose, `no' or empty being verbose).
 
11564
AC_DEFUN([AM_SILENT_RULES],
 
11565
[AC_ARG_ENABLE([silent-rules],
 
11566
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
 
11567
  --disable-silent-rules         verbose build output (undo: `make V=0')])
 
11568
case $enable_silent_rules in
 
11569
yes) AM_DEFAULT_VERBOSITY=0;;
 
11570
no)  AM_DEFAULT_VERBOSITY=1;;
 
11571
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 
11572
esac
 
11573
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 
11574
AM_BACKSLASH='\'
 
11575
AC_SUBST([AM_BACKSLASH])dnl
 
11576
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 
11577
])
 
11578
 
 
11579
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
11580
#
 
11581
# This file is free software; the Free Software Foundation
 
11582
# gives unlimited permission to copy and/or distribute it,
 
11583
# with or without modifications, as long as this notice is preserved.
 
11584
 
 
11585
# AM_PROG_INSTALL_STRIP
 
11586
# ---------------------
 
11587
# One issue with vendor `install' (even GNU) is that you can't
 
11588
# specify the program used to strip binaries.  This is especially
 
11589
# annoying in cross-compiling environments, where the build's strip
 
11590
# is unlikely to handle the host's binaries.
 
11591
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
11592
# always use install-sh in `make install-strip', and initialize
 
11593
# STRIPPROG with the value of the STRIP variable (set by the user).
 
11594
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
11595
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
11596
# Installed binaries are usually stripped using `strip' when the user
 
11597
# run `make install-strip'.  However `strip' might not be the right
 
11598
# tool to use in cross-compilation environments, therefore Automake
 
11599
# will honor the `STRIP' environment variable to overrule this program.
 
11600
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
11601
if test "$cross_compiling" != no; then
 
11602
  AC_CHECK_TOOL([STRIP], [strip], :)
 
11603
fi
 
11604
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
11605
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
11606
 
 
11607
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 
11608
#
 
11609
# This file is free software; the Free Software Foundation
 
11610
# gives unlimited permission to copy and/or distribute it,
 
11611
# with or without modifications, as long as this notice is preserved.
 
11612
 
 
11613
# serial 2
 
11614
 
 
11615
# _AM_SUBST_NOTMAKE(VARIABLE)
 
11616
# ---------------------------
 
11617
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 
11618
# This macro is traced by Automake.
 
11619
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
11620
 
 
11621
# AM_SUBST_NOTMAKE(VARIABLE)
 
11622
# ---------------------------
 
11623
# Public sister of _AM_SUBST_NOTMAKE.
 
11624
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
11625
 
 
11626
# Check how to create a tarball.                            -*- Autoconf -*-
 
11627
 
 
11628
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
11629
#
 
11630
# This file is free software; the Free Software Foundation
 
11631
# gives unlimited permission to copy and/or distribute it,
 
11632
# with or without modifications, as long as this notice is preserved.
 
11633
 
 
11634
# serial 2
 
11635
 
 
11636
# _AM_PROG_TAR(FORMAT)
 
11637
# --------------------
 
11638
# Check how to create a tarball in format FORMAT.
 
11639
# FORMAT should be one of `v7', `ustar', or `pax'.
 
11640
#
 
11641
# Substitute a variable $(am__tar) that is a command
 
11642
# writing to stdout a FORMAT-tarball containing the directory
 
11643
# $tardir.
 
11644
#     tardir=directory && $(am__tar) > result.tar
 
11645
#
 
11646
# Substitute a variable $(am__untar) that extract such
 
11647
# a tarball read from stdin.
 
11648
#     $(am__untar) < result.tar
 
11649
AC_DEFUN([_AM_PROG_TAR],
 
11650
[# Always define AMTAR for backward compatibility.
 
11651
AM_MISSING_PROG([AMTAR], [tar])
 
11652
m4_if([$1], [v7],
 
11653
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
11654
     [m4_case([$1], [ustar],, [pax],,
 
11655
              [m4_fatal([Unknown tar format])])
 
11656
AC_MSG_CHECKING([how to create a $1 tar archive])
 
11657
# Loop over all known methods to create a tar archive until one works.
 
11658
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
11659
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
11660
# Do not fold the above two line into one, because Tru64 sh and
 
11661
# Solaris sh will not grok spaces in the rhs of `-'.
 
11662
for _am_tool in $_am_tools
 
11663
do
 
11664
  case $_am_tool in
 
11665
  gnutar)
 
11666
    for _am_tar in tar gnutar gtar;
 
11667
    do
 
11668
      AM_RUN_LOG([$_am_tar --version]) && break
 
11669
    done
 
11670
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
11671
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
11672
    am__untar="$_am_tar -xf -"
 
11673
    ;;
 
11674
  plaintar)
 
11675
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
11676
    # ustar tarball either.
 
11677
    (tar --version) >/dev/null 2>&1 && continue
 
11678
    am__tar='tar chf - "$$tardir"'
 
11679
    am__tar_='tar chf - "$tardir"'
 
11680
    am__untar='tar xf -'
 
11681
    ;;
 
11682
  pax)
 
11683
    am__tar='pax -L -x $1 -w "$$tardir"'
 
11684
    am__tar_='pax -L -x $1 -w "$tardir"'
 
11685
    am__untar='pax -r'
 
11686
    ;;
 
11687
  cpio)
 
11688
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
11689
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
11690
    am__untar='cpio -i -H $1 -d'
 
11691
    ;;
 
11692
  none)
 
11693
    am__tar=false
 
11694
    am__tar_=false
 
11695
    am__untar=false
 
11696
    ;;
 
11697
  esac
 
11698
 
 
11699
  # If the value was cached, stop now.  We just wanted to have am__tar
 
11700
  # and am__untar set.
 
11701
  test -n "${am_cv_prog_tar_$1}" && break
 
11702
 
 
11703
  # tar/untar a dummy directory, and stop if the command works
 
11704
  rm -rf conftest.dir
 
11705
  mkdir conftest.dir
 
11706
  echo GrepMe > conftest.dir/file
 
11707
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
11708
  rm -rf conftest.dir
 
11709
  if test -s conftest.tar; then
 
11710
    AM_RUN_LOG([$am__untar <conftest.tar])
 
11711
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
11712
  fi
 
11713
done
 
11714
rm -rf conftest.dir
 
11715
 
 
11716
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
11717
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
11718
AC_SUBST([am__tar])
 
11719
AC_SUBST([am__untar])
 
11720
]) # _AM_PROG_TAR
 
11721