~ubuntu-branches/ubuntu/maverick/cryptsetup/maverick-proposed

1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
1
# generated automatically by aclocal 1.11 -*- Autoconf -*-
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
2
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
4
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
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
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
17
[m4_warning([this file was generated for autoconf 2.64.
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
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 60 (gettext-0.17)
23
dnl Copyright (C) 1995-2007 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.
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([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
85
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
86
])])])])
87
  define([gt_included_intl],
88
    ifelse([$1], [external],
89
      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
90
      [yes]))
91
  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
92
  gt_NEEDS_INIT
93
  AM_GNU_GETTEXT_NEED([$2])
94
95
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
96
  ifelse(gt_included_intl, yes, [
97
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
98
  ])
99
100
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
101
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
102
  AC_REQUIRE([AC_LIB_RPATH])
103
104
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
105
  dnl Ideally we would do this search only after the
106
  dnl      if test "$USE_NLS" = "yes"; then
107
  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
108
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
109
  dnl the configure script would need to contain the same shell code
110
  dnl again, outside any 'if'. There are two solutions:
111
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
112
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
113
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
114
  dnl documented, we avoid it.
115
  ifelse(gt_included_intl, yes, , [
116
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
117
  ])
118
119
  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
120
  gt_INTL_MACOSX
121
122
  dnl Set USE_NLS.
123
  AC_REQUIRE([AM_NLS])
124
125
  ifelse(gt_included_intl, yes, [
126
    BUILD_INCLUDED_LIBINTL=no
127
    USE_INCLUDED_LIBINTL=no
128
  ])
129
  LIBINTL=
130
  LTLIBINTL=
131
  POSUB=
132
133
  dnl Add a version number to the cache macros.
134
  case " $gt_needs " in
135
    *" need-formatstring-macros "*) gt_api_version=3 ;;
136
    *" need-ngettext "*) gt_api_version=2 ;;
137
    *) gt_api_version=1 ;;
138
  esac
139
  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
140
  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
141
142
  dnl If we use NLS figure out what method
143
  if test "$USE_NLS" = "yes"; then
144
    gt_use_preinstalled_gnugettext=no
145
    ifelse(gt_included_intl, yes, [
146
      AC_MSG_CHECKING([whether included gettext is requested])
147
      AC_ARG_WITH(included-gettext,
148
        [  --with-included-gettext use the GNU gettext library included here],
149
        nls_cv_force_use_gnu_gettext=$withval,
150
        nls_cv_force_use_gnu_gettext=no)
151
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
152
153
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
154
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
155
    ])
156
        dnl User does not insist on using GNU NLS library.  Figure out what
157
        dnl to use.  If GNU gettext is available we use this.  Else we have
158
        dnl to fall back to GNU NLS library.
159
160
        if test $gt_api_version -ge 3; then
161
          gt_revision_test_code='
162
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
163
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
164
#endif
165
changequote(,)dnl
166
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
167
changequote([,])dnl
168
'
169
        else
170
          gt_revision_test_code=
171
        fi
172
        if test $gt_api_version -ge 2; then
173
          gt_expression_test_code=' + * ngettext ("", "", 0)'
174
        else
175
          gt_expression_test_code=
176
        fi
177
178
        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
179
         [AC_TRY_LINK([#include <libintl.h>
180
$gt_revision_test_code
181
extern int _nl_msg_cat_cntr;
182
extern int *_nl_domain_bindings;],
183
            [bindtextdomain ("", "");
184
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
185
            [eval "$gt_func_gnugettext_libc=yes"],
186
            [eval "$gt_func_gnugettext_libc=no"])])
187
188
        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
189
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
190
          ifelse(gt_included_intl, yes, , [
191
            AM_ICONV_LINK
192
          ])
193
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
194
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
195
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
196
          dnl even if libiconv doesn't exist.
197
          AC_LIB_LINKFLAGS_BODY([intl])
198
          AC_CACHE_CHECK([for GNU gettext in libintl],
199
            [$gt_func_gnugettext_libintl],
200
           [gt_save_CPPFLAGS="$CPPFLAGS"
201
            CPPFLAGS="$CPPFLAGS $INCINTL"
202
            gt_save_LIBS="$LIBS"
203
            LIBS="$LIBS $LIBINTL"
204
            dnl Now see whether libintl exists and does not depend on libiconv.
205
            AC_TRY_LINK([#include <libintl.h>
206
$gt_revision_test_code
207
extern int _nl_msg_cat_cntr;
208
extern
209
#ifdef __cplusplus
210
"C"
211
#endif
212
const char *_nl_expand_alias (const char *);],
213
              [bindtextdomain ("", "");
214
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
215
              [eval "$gt_func_gnugettext_libintl=yes"],
216
              [eval "$gt_func_gnugettext_libintl=no"])
217
            dnl Now see whether libintl exists and depends on libiconv.
218
            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
219
              LIBS="$LIBS $LIBICONV"
220
              AC_TRY_LINK([#include <libintl.h>
221
$gt_revision_test_code
222
extern int _nl_msg_cat_cntr;
223
extern
224
#ifdef __cplusplus
225
"C"
226
#endif
227
const char *_nl_expand_alias (const char *);],
228
                [bindtextdomain ("", "");
229
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
230
               [LIBINTL="$LIBINTL $LIBICONV"
231
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
232
                eval "$gt_func_gnugettext_libintl=yes"
233
               ])
234
            fi
235
            CPPFLAGS="$gt_save_CPPFLAGS"
236
            LIBS="$gt_save_LIBS"])
237
        fi
238
239
        dnl If an already present or preinstalled GNU gettext() is found,
240
        dnl use it.  But if this macro is used in GNU gettext, and GNU
241
        dnl gettext is already preinstalled in libintl, we update this
242
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
243
        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
244
           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
245
                && test "$PACKAGE" != gettext-runtime \
246
                && test "$PACKAGE" != gettext-tools; }; then
247
          gt_use_preinstalled_gnugettext=yes
248
        else
249
          dnl Reset the values set by searching for libintl.
250
          LIBINTL=
251
          LTLIBINTL=
252
          INCINTL=
253
        fi
254
255
    ifelse(gt_included_intl, yes, [
256
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
257
          dnl GNU gettext is not found in the C library.
258
          dnl Fall back on included GNU gettext library.
259
          nls_cv_use_gnu_gettext=yes
260
        fi
261
      fi
262
263
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
264
        dnl Mark actions used to generate GNU NLS library.
265
        BUILD_INCLUDED_LIBINTL=yes
266
        USE_INCLUDED_LIBINTL=yes
267
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
268
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
269
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
270
      fi
271
272
      CATOBJEXT=
273
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
274
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
275
        dnl Mark actions to use GNU gettext tools.
276
        CATOBJEXT=.gmo
277
      fi
278
    ])
279
280
    if test -n "$INTL_MACOSX_LIBS"; then
281
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
282
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
283
        dnl Some extra flags are needed during linking.
284
        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
285
        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
286
      fi
287
    fi
288
289
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
290
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
291
      AC_DEFINE(ENABLE_NLS, 1,
292
        [Define to 1 if translation of program messages to the user's native language
293
   is requested.])
294
    else
295
      USE_NLS=no
296
    fi
297
  fi
298
299
  AC_MSG_CHECKING([whether to use NLS])
300
  AC_MSG_RESULT([$USE_NLS])
301
  if test "$USE_NLS" = "yes"; then
302
    AC_MSG_CHECKING([where the gettext function comes from])
303
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
304
      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
305
        gt_source="external libintl"
306
      else
307
        gt_source="libc"
308
      fi
309
    else
310
      gt_source="included intl directory"
311
    fi
312
    AC_MSG_RESULT([$gt_source])
313
  fi
314
315
  if test "$USE_NLS" = "yes"; then
316
317
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
318
      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
319
        AC_MSG_CHECKING([how to link with libintl])
320
        AC_MSG_RESULT([$LIBINTL])
321
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
322
      fi
323
324
      dnl For backward compatibility. Some packages may be using this.
325
      AC_DEFINE(HAVE_GETTEXT, 1,
326
       [Define if the GNU gettext() function is already present or preinstalled.])
327
      AC_DEFINE(HAVE_DCGETTEXT, 1,
328
       [Define if the GNU dcgettext() function is already present or preinstalled.])
329
    fi
330
331
    dnl We need to process the po/ directory.
332
    POSUB=po
333
  fi
334
335
  ifelse(gt_included_intl, yes, [
336
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
337
    dnl to 'yes' because some of the testsuite requires it.
338
    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
339
      BUILD_INCLUDED_LIBINTL=yes
340
    fi
341
342
    dnl Make all variables we use known to autoconf.
343
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
344
    AC_SUBST(USE_INCLUDED_LIBINTL)
345
    AC_SUBST(CATOBJEXT)
346
347
    dnl For backward compatibility. Some configure.ins may be using this.
348
    nls_cv_header_intl=
349
    nls_cv_header_libgt=
350
351
    dnl For backward compatibility. Some Makefiles may be using this.
352
    DATADIRNAME=share
353
    AC_SUBST(DATADIRNAME)
354
355
    dnl For backward compatibility. Some Makefiles may be using this.
356
    INSTOBJEXT=.mo
357
    AC_SUBST(INSTOBJEXT)
358
359
    dnl For backward compatibility. Some Makefiles may be using this.
360
    GENCAT=gencat
361
    AC_SUBST(GENCAT)
362
363
    dnl For backward compatibility. Some Makefiles may be using this.
364
    INTLOBJS=
365
    if test "$USE_INCLUDED_LIBINTL" = yes; then
366
      INTLOBJS="\$(GETTOBJS)"
367
    fi
368
    AC_SUBST(INTLOBJS)
369
370
    dnl Enable libtool support if the surrounding package wishes it.
371
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
372
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
373
  ])
374
375
  dnl For backward compatibility. Some Makefiles may be using this.
376
  INTLLIBS="$LIBINTL"
377
  AC_SUBST(INTLLIBS)
378
379
  dnl Make all documented variables known to autoconf.
380
  AC_SUBST(LIBINTL)
381
  AC_SUBST(LTLIBINTL)
382
  AC_SUBST(POSUB)
383
])
384
385
386
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
387
m4_define([gt_NEEDS_INIT],
388
[
389
  m4_divert_text([DEFAULTS], [gt_needs=])
390
  m4_define([gt_NEEDS_INIT], [])
391
])
392
393
394
dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
395
AC_DEFUN([AM_GNU_GETTEXT_NEED],
396
[
397
  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
398
])
399
400
401
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
402
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
403
404
# iconv.m4 serial AM6 (gettext-0.17)
405
dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
406
dnl This file is free software; the Free Software Foundation
407
dnl gives unlimited permission to copy and/or distribute it,
408
dnl with or without modifications, as long as this notice is preserved.
409
410
dnl From Bruno Haible.
411
412
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
413
[
414
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
415
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
416
  AC_REQUIRE([AC_LIB_RPATH])
417
418
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
419
  dnl accordingly.
420
  AC_LIB_LINKFLAGS_BODY([iconv])
421
])
422
423
AC_DEFUN([AM_ICONV_LINK],
424
[
425
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
426
  dnl those with the standalone portable GNU libiconv installed).
427
  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
428
429
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
430
  dnl accordingly.
431
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
432
433
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
434
  dnl because if the user has installed libiconv and not disabled its use
435
  dnl via --without-libiconv-prefix, he wants to use it. The first
436
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
437
  am_save_CPPFLAGS="$CPPFLAGS"
438
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
439
440
  AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
441
    am_cv_func_iconv="no, consider installing GNU libiconv"
442
    am_cv_lib_iconv=no
443
    AC_TRY_LINK([#include <stdlib.h>
444
#include <iconv.h>],
445
      [iconv_t cd = iconv_open("","");
446
       iconv(cd,NULL,NULL,NULL,NULL);
447
       iconv_close(cd);],
448
      am_cv_func_iconv=yes)
449
    if test "$am_cv_func_iconv" != yes; then
450
      am_save_LIBS="$LIBS"
451
      LIBS="$LIBS $LIBICONV"
452
      AC_TRY_LINK([#include <stdlib.h>
453
#include <iconv.h>],
454
        [iconv_t cd = iconv_open("","");
455
         iconv(cd,NULL,NULL,NULL,NULL);
456
         iconv_close(cd);],
457
        am_cv_lib_iconv=yes
458
        am_cv_func_iconv=yes)
459
      LIBS="$am_save_LIBS"
460
    fi
461
  ])
462
  if test "$am_cv_func_iconv" = yes; then
463
    AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
464
      dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
465
      am_save_LIBS="$LIBS"
466
      if test $am_cv_lib_iconv = yes; then
467
        LIBS="$LIBS $LIBICONV"
468
      fi
469
      AC_TRY_RUN([
470
#include <iconv.h>
471
#include <string.h>
472
int main ()
473
{
474
  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
475
     returns.  */
476
  {
477
    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
478
    if (cd_utf8_to_88591 != (iconv_t)(-1))
479
      {
480
        static const char input[] = "\342\202\254"; /* EURO SIGN */
481
        char buf[10];
482
        const char *inptr = input;
483
        size_t inbytesleft = strlen (input);
484
        char *outptr = buf;
485
        size_t outbytesleft = sizeof (buf);
486
        size_t res = iconv (cd_utf8_to_88591,
487
                            (char **) &inptr, &inbytesleft,
488
                            &outptr, &outbytesleft);
489
        if (res == 0)
490
          return 1;
491
      }
492
  }
493
#if 0 /* This bug could be worked around by the caller.  */
494
  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
495
  {
496
    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
497
    if (cd_88591_to_utf8 != (iconv_t)(-1))
498
      {
499
        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
500
        char buf[50];
501
        const char *inptr = input;
502
        size_t inbytesleft = strlen (input);
503
        char *outptr = buf;
504
        size_t outbytesleft = sizeof (buf);
505
        size_t res = iconv (cd_88591_to_utf8,
506
                            (char **) &inptr, &inbytesleft,
507
                            &outptr, &outbytesleft);
508
        if ((int)res > 0)
509
          return 1;
510
      }
511
  }
512
#endif
513
  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
514
     provided.  */
515
  if (/* Try standardized names.  */
516
      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
517
      /* Try IRIX, OSF/1 names.  */
518
      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
519
      /* Try AIX names.  */
520
      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
521
      /* Try HP-UX names.  */
522
      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
523
    return 1;
524
  return 0;
525
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
526
        [case "$host_os" in
527
           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
528
           *)            am_cv_func_iconv_works="guessing yes" ;;
529
         esac])
530
      LIBS="$am_save_LIBS"
531
    ])
532
    case "$am_cv_func_iconv_works" in
533
      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
534
      *)   am_func_iconv=yes ;;
535
    esac
536
  else
537
    am_func_iconv=no am_cv_lib_iconv=no
538
  fi
539
  if test "$am_func_iconv" = yes; then
540
    AC_DEFINE(HAVE_ICONV, 1,
541
      [Define if you have the iconv() function and it works.])
542
  fi
543
  if test "$am_cv_lib_iconv" = yes; then
544
    AC_MSG_CHECKING([how to link with libiconv])
545
    AC_MSG_RESULT([$LIBICONV])
546
  else
547
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
548
    dnl either.
549
    CPPFLAGS="$am_save_CPPFLAGS"
550
    LIBICONV=
551
    LTLIBICONV=
552
  fi
553
  AC_SUBST(LIBICONV)
554
  AC_SUBST(LTLIBICONV)
555
])
556
557
AC_DEFUN([AM_ICONV],
558
[
559
  AM_ICONV_LINK
560
  if test "$am_cv_func_iconv" = yes; then
561
    AC_MSG_CHECKING([for iconv declaration])
562
    AC_CACHE_VAL(am_cv_proto_iconv, [
563
      AC_TRY_COMPILE([
564
#include <stdlib.h>
565
#include <iconv.h>
566
extern
567
#ifdef __cplusplus
568
"C"
569
#endif
570
#if defined(__STDC__) || defined(__cplusplus)
571
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
572
#else
573
size_t iconv();
574
#endif
575
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
576
      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);"])
577
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
578
    AC_MSG_RESULT([$]{ac_t:-
579
         }[$]am_cv_proto_iconv)
580
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
581
      [Define as const if the declaration of iconv() needs const.])
582
  fi
583
])
584
585
# intlmacosx.m4 serial 1 (gettext-0.17)
586
dnl Copyright (C) 2004-2007 Free Software Foundation, Inc.
587
dnl This file is free software; the Free Software Foundation
588
dnl gives unlimited permission to copy and/or distribute it,
589
dnl with or without modifications, as long as this notice is preserved.
590
dnl
591
dnl This file can can be used in projects which are not available under
592
dnl the GNU General Public License or the GNU Library General Public
593
dnl License but which still want to provide support for the GNU gettext
594
dnl functionality.
595
dnl Please note that the actual code of the GNU gettext library is covered
596
dnl by the GNU Library General Public License, and the rest of the GNU
597
dnl gettext package package is covered by the GNU General Public License.
598
dnl They are *not* in the public domain.
599
600
dnl Checks for special options needed on MacOS X.
601
dnl Defines INTL_MACOSX_LIBS.
602
AC_DEFUN([gt_INTL_MACOSX],
603
[
604
  dnl Check for API introduced in MacOS X 10.2.
605
  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
606
    gt_cv_func_CFPreferencesCopyAppValue,
607
    [gt_save_LIBS="$LIBS"
608
     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
609
     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
610
       [CFPreferencesCopyAppValue(NULL, NULL)],
611
       [gt_cv_func_CFPreferencesCopyAppValue=yes],
612
       [gt_cv_func_CFPreferencesCopyAppValue=no])
613
     LIBS="$gt_save_LIBS"])
614
  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
615
    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
616
      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
617
  fi
618
  dnl Check for API introduced in MacOS X 10.3.
619
  AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
620
    [gt_save_LIBS="$LIBS"
621
     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
622
     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
623
       [gt_cv_func_CFLocaleCopyCurrent=yes],
624
       [gt_cv_func_CFLocaleCopyCurrent=no])
625
     LIBS="$gt_save_LIBS"])
626
  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
627
    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
628
      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
629
  fi
630
  INTL_MACOSX_LIBS=
631
  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
632
    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
633
  fi
634
  AC_SUBST([INTL_MACOSX_LIBS])
635
])
636
637
# lib-ld.m4 serial 3 (gettext-0.13)
638
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
639
dnl This file is free software; the Free Software Foundation
640
dnl gives unlimited permission to copy and/or distribute it,
641
dnl with or without modifications, as long as this notice is preserved.
642
643
dnl Subroutines of libtool.m4,
644
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
645
dnl with libtool.m4.
646
647
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
648
AC_DEFUN([AC_LIB_PROG_LD_GNU],
649
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
650
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
651
case `$LD -v 2>&1 </dev/null` in
652
*GNU* | *'with BFD'*)
653
  acl_cv_prog_gnu_ld=yes ;;
654
*)
655
  acl_cv_prog_gnu_ld=no ;;
656
esac])
657
with_gnu_ld=$acl_cv_prog_gnu_ld
658
])
659
660
dnl From libtool-1.4. Sets the variable LD.
661
AC_DEFUN([AC_LIB_PROG_LD],
662
[AC_ARG_WITH(gnu-ld,
663
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
664
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
665
AC_REQUIRE([AC_PROG_CC])dnl
666
AC_REQUIRE([AC_CANONICAL_HOST])dnl
667
# Prepare PATH_SEPARATOR.
668
# The user is always right.
669
if test "${PATH_SEPARATOR+set}" != set; then
670
  echo "#! /bin/sh" >conf$$.sh
671
  echo  "exit 0"   >>conf$$.sh
672
  chmod +x conf$$.sh
673
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
674
    PATH_SEPARATOR=';'
675
  else
676
    PATH_SEPARATOR=:
677
  fi
678
  rm -f conf$$.sh
679
fi
680
ac_prog=ld
681
if test "$GCC" = yes; then
682
  # Check if gcc -print-prog-name=ld gives a path.
683
  AC_MSG_CHECKING([for ld used by GCC])
684
  case $host in
685
  *-*-mingw*)
686
    # gcc leaves a trailing carriage return which upsets mingw
687
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
688
  *)
689
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
690
  esac
691
  case $ac_prog in
692
    # Accept absolute paths.
693
    [[\\/]* | [A-Za-z]:[\\/]*)]
694
      [re_direlt='/[^/][^/]*/\.\./']
695
      # Canonicalize the path of ld
696
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
697
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
698
	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
699
      done
700
      test -z "$LD" && LD="$ac_prog"
701
      ;;
702
  "")
703
    # If it fails, then pretend we aren't using GCC.
704
    ac_prog=ld
705
    ;;
706
  *)
707
    # If it is relative, then search for the first ld in PATH.
708
    with_gnu_ld=unknown
709
    ;;
710
  esac
711
elif test "$with_gnu_ld" = yes; then
712
  AC_MSG_CHECKING([for GNU ld])
713
else
714
  AC_MSG_CHECKING([for non-GNU ld])
715
fi
716
AC_CACHE_VAL(acl_cv_path_LD,
717
[if test -z "$LD"; then
718
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
719
  for ac_dir in $PATH; do
720
    test -z "$ac_dir" && ac_dir=.
721
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
722
      acl_cv_path_LD="$ac_dir/$ac_prog"
723
      # Check to see if the program is GNU ld.  I'd rather use --version,
724
      # but apparently some GNU ld's only accept -v.
725
      # Break only if it was the GNU/non-GNU ld that we prefer.
726
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
727
      *GNU* | *'with BFD'*)
728
	test "$with_gnu_ld" != no && break ;;
729
      *)
730
	test "$with_gnu_ld" != yes && break ;;
731
      esac
732
    fi
733
  done
734
  IFS="$ac_save_ifs"
735
else
736
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
737
fi])
738
LD="$acl_cv_path_LD"
739
if test -n "$LD"; then
740
  AC_MSG_RESULT($LD)
741
else
742
  AC_MSG_RESULT(no)
743
fi
744
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
745
AC_LIB_PROG_LD_GNU
746
])
747
748
# lib-link.m4 serial 13 (gettext-0.17)
749
dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
750
dnl This file is free software; the Free Software Foundation
751
dnl gives unlimited permission to copy and/or distribute it,
752
dnl with or without modifications, as long as this notice is preserved.
753
754
dnl From Bruno Haible.
755
756
AC_PREREQ(2.54)
757
758
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
759
dnl the libraries corresponding to explicit and implicit dependencies.
760
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
761
dnl augments the CPPFLAGS variable.
762
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
763
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
764
AC_DEFUN([AC_LIB_LINKFLAGS],
765
[
766
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
767
  AC_REQUIRE([AC_LIB_RPATH])
768
  define([Name],[translit([$1],[./-], [___])])
769
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
770
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
771
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
772
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
773
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
774
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
775
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
776
    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
777
  ])
778
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
779
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
780
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
781
  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
782
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
783
  AC_SUBST([LIB]NAME)
784
  AC_SUBST([LTLIB]NAME)
785
  AC_SUBST([LIB]NAME[_PREFIX])
786
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
787
  dnl results of this search when this library appears as a dependency.
788
  HAVE_LIB[]NAME=yes
789
  undefine([Name])
790
  undefine([NAME])
791
])
792
793
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
794
dnl searches for libname and the libraries corresponding to explicit and
795
dnl implicit dependencies, together with the specified include files and
796
dnl the ability to compile and link the specified testcode. If found, it
797
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
798
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
799
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
800
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
801
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
802
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
803
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
804
[
805
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
806
  AC_REQUIRE([AC_LIB_RPATH])
807
  define([Name],[translit([$1],[./-], [___])])
808
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
809
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
810
811
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
812
  dnl accordingly.
813
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
814
815
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
816
  dnl because if the user has installed lib[]Name and not disabled its use
817
  dnl via --without-lib[]Name-prefix, he wants to use it.
818
  ac_save_CPPFLAGS="$CPPFLAGS"
819
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
820
821
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
822
    ac_save_LIBS="$LIBS"
823
    LIBS="$LIBS $LIB[]NAME"
824
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
825
    LIBS="$ac_save_LIBS"
826
  ])
827
  if test "$ac_cv_lib[]Name" = yes; then
828
    HAVE_LIB[]NAME=yes
829
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
830
    AC_MSG_CHECKING([how to link with lib[]$1])
831
    AC_MSG_RESULT([$LIB[]NAME])
832
  else
833
    HAVE_LIB[]NAME=no
834
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
835
    dnl $INC[]NAME either.
836
    CPPFLAGS="$ac_save_CPPFLAGS"
837
    LIB[]NAME=
838
    LTLIB[]NAME=
839
    LIB[]NAME[]_PREFIX=
840
  fi
841
  AC_SUBST([HAVE_LIB]NAME)
842
  AC_SUBST([LIB]NAME)
843
  AC_SUBST([LTLIB]NAME)
844
  AC_SUBST([LIB]NAME[_PREFIX])
845
  undefine([Name])
846
  undefine([NAME])
847
])
848
849
dnl Determine the platform dependent parameters needed to use rpath:
850
dnl   acl_libext,
851
dnl   acl_shlibext,
852
dnl   acl_hardcode_libdir_flag_spec,
853
dnl   acl_hardcode_libdir_separator,
854
dnl   acl_hardcode_direct,
855
dnl   acl_hardcode_minus_L.
856
AC_DEFUN([AC_LIB_RPATH],
857
[
858
  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
859
  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
860
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
861
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
862
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
863
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
864
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
865
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
866
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
867
    . ./conftest.sh
868
    rm -f ./conftest.sh
869
    acl_cv_rpath=done
870
  ])
871
  wl="$acl_cv_wl"
872
  acl_libext="$acl_cv_libext"
873
  acl_shlibext="$acl_cv_shlibext"
874
  acl_libname_spec="$acl_cv_libname_spec"
875
  acl_library_names_spec="$acl_cv_library_names_spec"
876
  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
877
  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
878
  acl_hardcode_direct="$acl_cv_hardcode_direct"
879
  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
880
  dnl Determine whether the user wants rpath handling at all.
881
  AC_ARG_ENABLE(rpath,
882
    [  --disable-rpath         do not hardcode runtime library paths],
883
    :, enable_rpath=yes)
884
])
885
886
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
887
dnl the libraries corresponding to explicit and implicit dependencies.
888
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
889
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
890
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
891
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
892
[
893
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
894
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
895
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
896
  dnl Autoconf >= 2.61 supports dots in --with options.
897
  define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
898
  dnl By default, look in $includedir and $libdir.
899
  use_additional=yes
900
  AC_LIB_WITH_FINAL_PREFIX([
901
    eval additional_includedir=\"$includedir\"
902
    eval additional_libdir=\"$libdir\"
903
  ])
904
  AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
905
[  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
906
  --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir],
907
[
908
    if test "X$withval" = "Xno"; then
909
      use_additional=no
910
    else
911
      if test "X$withval" = "X"; then
912
        AC_LIB_WITH_FINAL_PREFIX([
913
          eval additional_includedir=\"$includedir\"
914
          eval additional_libdir=\"$libdir\"
915
        ])
916
      else
917
        additional_includedir="$withval/include"
918
        additional_libdir="$withval/$acl_libdirstem"
919
      fi
920
    fi
921
])
922
  dnl Search the library and its dependencies in $additional_libdir and
923
  dnl $LDFLAGS. Using breadth-first-seach.
924
  LIB[]NAME=
925
  LTLIB[]NAME=
926
  INC[]NAME=
927
  LIB[]NAME[]_PREFIX=
928
  rpathdirs=
929
  ltrpathdirs=
930
  names_already_handled=
931
  names_next_round='$1 $2'
932
  while test -n "$names_next_round"; do
933
    names_this_round="$names_next_round"
934
    names_next_round=
935
    for name in $names_this_round; do
936
      already_handled=
937
      for n in $names_already_handled; do
938
        if test "$n" = "$name"; then
939
          already_handled=yes
940
          break
941
        fi
942
      done
943
      if test -z "$already_handled"; then
944
        names_already_handled="$names_already_handled $name"
945
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
946
        dnl or AC_LIB_HAVE_LINKFLAGS call.
947
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
948
        eval value=\"\$HAVE_LIB$uppername\"
949
        if test -n "$value"; then
950
          if test "$value" = yes; then
951
            eval value=\"\$LIB$uppername\"
952
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
953
            eval value=\"\$LTLIB$uppername\"
954
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
955
          else
956
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
957
            dnl that this library doesn't exist. So just drop it.
958
            :
959
          fi
960
        else
961
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
962
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
963
          found_dir=
964
          found_la=
965
          found_so=
966
          found_a=
967
          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
968
          if test -n "$acl_shlibext"; then
969
            shrext=".$acl_shlibext"             # typically: shrext=.so
970
          else
971
            shrext=
972
          fi
973
          if test $use_additional = yes; then
974
            dir="$additional_libdir"
975
            dnl The same code as in the loop below:
976
            dnl First look for a shared library.
977
            if test -n "$acl_shlibext"; then
978
              if test -f "$dir/$libname$shrext"; then
979
                found_dir="$dir"
980
                found_so="$dir/$libname$shrext"
981
              else
982
                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
983
                  ver=`(cd "$dir" && \
984
                        for f in "$libname$shrext".*; do echo "$f"; done \
985
                        | sed -e "s,^$libname$shrext\\\\.,," \
986
                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
987
                        | sed 1q ) 2>/dev/null`
988
                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
989
                    found_dir="$dir"
990
                    found_so="$dir/$libname$shrext.$ver"
991
                  fi
992
                else
993
                  eval library_names=\"$acl_library_names_spec\"
994
                  for f in $library_names; do
995
                    if test -f "$dir/$f"; then
996
                      found_dir="$dir"
997
                      found_so="$dir/$f"
998
                      break
999
                    fi
1000
                  done
1001
                fi
1002
              fi
1003
            fi
1004
            dnl Then look for a static library.
1005
            if test "X$found_dir" = "X"; then
1006
              if test -f "$dir/$libname.$acl_libext"; then
1007
                found_dir="$dir"
1008
                found_a="$dir/$libname.$acl_libext"
1009
              fi
1010
            fi
1011
            if test "X$found_dir" != "X"; then
1012
              if test -f "$dir/$libname.la"; then
1013
                found_la="$dir/$libname.la"
1014
              fi
1015
            fi
1016
          fi
1017
          if test "X$found_dir" = "X"; then
1018
            for x in $LDFLAGS $LTLIB[]NAME; do
1019
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1020
              case "$x" in
1021
                -L*)
1022
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
1023
                  dnl First look for a shared library.
1024
                  if test -n "$acl_shlibext"; then
1025
                    if test -f "$dir/$libname$shrext"; then
1026
                      found_dir="$dir"
1027
                      found_so="$dir/$libname$shrext"
1028
                    else
1029
                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1030
                        ver=`(cd "$dir" && \
1031
                              for f in "$libname$shrext".*; do echo "$f"; done \
1032
                              | sed -e "s,^$libname$shrext\\\\.,," \
1033
                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1034
                              | sed 1q ) 2>/dev/null`
1035
                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1036
                          found_dir="$dir"
1037
                          found_so="$dir/$libname$shrext.$ver"
1038
                        fi
1039
                      else
1040
                        eval library_names=\"$acl_library_names_spec\"
1041
                        for f in $library_names; do
1042
                          if test -f "$dir/$f"; then
1043
                            found_dir="$dir"
1044
                            found_so="$dir/$f"
1045
                            break
1046
                          fi
1047
                        done
1048
                      fi
1049
                    fi
1050
                  fi
1051
                  dnl Then look for a static library.
1052
                  if test "X$found_dir" = "X"; then
1053
                    if test -f "$dir/$libname.$acl_libext"; then
1054
                      found_dir="$dir"
1055
                      found_a="$dir/$libname.$acl_libext"
1056
                    fi
1057
                  fi
1058
                  if test "X$found_dir" != "X"; then
1059
                    if test -f "$dir/$libname.la"; then
1060
                      found_la="$dir/$libname.la"
1061
                    fi
1062
                  fi
1063
                  ;;
1064
              esac
1065
              if test "X$found_dir" != "X"; then
1066
                break
1067
              fi
1068
            done
1069
          fi
1070
          if test "X$found_dir" != "X"; then
1071
            dnl Found the library.
1072
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1073
            if test "X$found_so" != "X"; then
1074
              dnl Linking with a shared library. We attempt to hardcode its
1075
              dnl directory into the executable's runpath, unless it's the
1076
              dnl standard /usr/lib.
1077
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
1078
                dnl No hardcoding is needed.
1079
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1080
              else
1081
                dnl Use an explicit option to hardcode DIR into the resulting
1082
                dnl binary.
1083
                dnl Potentially add DIR to ltrpathdirs.
1084
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1085
                haveit=
1086
                for x in $ltrpathdirs; do
1087
                  if test "X$x" = "X$found_dir"; then
1088
                    haveit=yes
1089
                    break
1090
                  fi
1091
                done
1092
                if test -z "$haveit"; then
1093
                  ltrpathdirs="$ltrpathdirs $found_dir"
1094
                fi
1095
                dnl The hardcoding into $LIBNAME is system dependent.
1096
                if test "$acl_hardcode_direct" = yes; then
1097
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1098
                  dnl resulting binary.
1099
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1100
                else
1101
                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1102
                    dnl Use an explicit option to hardcode DIR into the resulting
1103
                    dnl binary.
1104
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1105
                    dnl Potentially add DIR to rpathdirs.
1106
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
1107
                    haveit=
1108
                    for x in $rpathdirs; do
1109
                      if test "X$x" = "X$found_dir"; then
1110
                        haveit=yes
1111
                        break
1112
                      fi
1113
                    done
1114
                    if test -z "$haveit"; then
1115
                      rpathdirs="$rpathdirs $found_dir"
1116
                    fi
1117
                  else
1118
                    dnl Rely on "-L$found_dir".
1119
                    dnl But don't add it if it's already contained in the LDFLAGS
1120
                    dnl or the already constructed $LIBNAME
1121
                    haveit=
1122
                    for x in $LDFLAGS $LIB[]NAME; do
1123
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1124
                      if test "X$x" = "X-L$found_dir"; then
1125
                        haveit=yes
1126
                        break
1127
                      fi
1128
                    done
1129
                    if test -z "$haveit"; then
1130
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1131
                    fi
1132
                    if test "$acl_hardcode_minus_L" != no; then
1133
                      dnl FIXME: Not sure whether we should use
1134
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1135
                      dnl here.
1136
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1137
                    else
1138
                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1139
                      dnl here, because this doesn't fit in flags passed to the
1140
                      dnl compiler. So give up. No hardcoding. This affects only
1141
                      dnl very old systems.
1142
                      dnl FIXME: Not sure whether we should use
1143
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1144
                      dnl here.
1145
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1146
                    fi
1147
                  fi
1148
                fi
1149
              fi
1150
            else
1151
              if test "X$found_a" != "X"; then
1152
                dnl Linking with a static library.
1153
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1154
              else
1155
                dnl We shouldn't come here, but anyway it's good to have a
1156
                dnl fallback.
1157
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1158
              fi
1159
            fi
1160
            dnl Assume the include files are nearby.
1161
            additional_includedir=
1162
            case "$found_dir" in
1163
              */$acl_libdirstem | */$acl_libdirstem/)
1164
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1165
                LIB[]NAME[]_PREFIX="$basedir"
1166
                additional_includedir="$basedir/include"
1167
                ;;
1168
            esac
1169
            if test "X$additional_includedir" != "X"; then
1170
              dnl Potentially add $additional_includedir to $INCNAME.
1171
              dnl But don't add it
1172
              dnl   1. if it's the standard /usr/include,
1173
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
1174
              dnl   3. if it's already present in $CPPFLAGS or the already
1175
              dnl      constructed $INCNAME,
1176
              dnl   4. if it doesn't exist as a directory.
1177
              if test "X$additional_includedir" != "X/usr/include"; then
1178
                haveit=
1179
                if test "X$additional_includedir" = "X/usr/local/include"; then
1180
                  if test -n "$GCC"; then
1181
                    case $host_os in
1182
                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1183
                    esac
1184
                  fi
1185
                fi
1186
                if test -z "$haveit"; then
1187
                  for x in $CPPFLAGS $INC[]NAME; do
1188
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1189
                    if test "X$x" = "X-I$additional_includedir"; then
1190
                      haveit=yes
1191
                      break
1192
                    fi
1193
                  done
1194
                  if test -z "$haveit"; then
1195
                    if test -d "$additional_includedir"; then
1196
                      dnl Really add $additional_includedir to $INCNAME.
1197
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1198
                    fi
1199
                  fi
1200
                fi
1201
              fi
1202
            fi
1203
            dnl Look for dependencies.
1204
            if test -n "$found_la"; then
1205
              dnl Read the .la file. It defines the variables
1206
              dnl dlname, library_names, old_library, dependency_libs, current,
1207
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
1208
              save_libdir="$libdir"
1209
              case "$found_la" in
1210
                */* | *\\*) . "$found_la" ;;
1211
                *) . "./$found_la" ;;
1212
              esac
1213
              libdir="$save_libdir"
1214
              dnl We use only dependency_libs.
1215
              for dep in $dependency_libs; do
1216
                case "$dep" in
1217
                  -L*)
1218
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1219
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1220
                    dnl But don't add it
1221
                    dnl   1. if it's the standard /usr/lib,
1222
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
1223
                    dnl   3. if it's already present in $LDFLAGS or the already
1224
                    dnl      constructed $LIBNAME,
1225
                    dnl   4. if it doesn't exist as a directory.
1226
                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1227
                      haveit=
1228
                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1229
                        if test -n "$GCC"; then
1230
                          case $host_os in
1231
                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1232
                          esac
1233
                        fi
1234
                      fi
1235
                      if test -z "$haveit"; then
1236
                        haveit=
1237
                        for x in $LDFLAGS $LIB[]NAME; do
1238
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1239
                          if test "X$x" = "X-L$additional_libdir"; then
1240
                            haveit=yes
1241
                            break
1242
                          fi
1243
                        done
1244
                        if test -z "$haveit"; then
1245
                          if test -d "$additional_libdir"; then
1246
                            dnl Really add $additional_libdir to $LIBNAME.
1247
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1248
                          fi
1249
                        fi
1250
                        haveit=
1251
                        for x in $LDFLAGS $LTLIB[]NAME; do
1252
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1253
                          if test "X$x" = "X-L$additional_libdir"; then
1254
                            haveit=yes
1255
                            break
1256
                          fi
1257
                        done
1258
                        if test -z "$haveit"; then
1259
                          if test -d "$additional_libdir"; then
1260
                            dnl Really add $additional_libdir to $LTLIBNAME.
1261
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1262
                          fi
1263
                        fi
1264
                      fi
1265
                    fi
1266
                    ;;
1267
                  -R*)
1268
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
1269
                    if test "$enable_rpath" != no; then
1270
                      dnl Potentially add DIR to rpathdirs.
1271
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
1272
                      haveit=
1273
                      for x in $rpathdirs; do
1274
                        if test "X$x" = "X$dir"; then
1275
                          haveit=yes
1276
                          break
1277
                        fi
1278
                      done
1279
                      if test -z "$haveit"; then
1280
                        rpathdirs="$rpathdirs $dir"
1281
                      fi
1282
                      dnl Potentially add DIR to ltrpathdirs.
1283
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1284
                      haveit=
1285
                      for x in $ltrpathdirs; do
1286
                        if test "X$x" = "X$dir"; then
1287
                          haveit=yes
1288
                          break
1289
                        fi
1290
                      done
1291
                      if test -z "$haveit"; then
1292
                        ltrpathdirs="$ltrpathdirs $dir"
1293
                      fi
1294
                    fi
1295
                    ;;
1296
                  -l*)
1297
                    dnl Handle this in the next round.
1298
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1299
                    ;;
1300
                  *.la)
1301
                    dnl Handle this in the next round. Throw away the .la's
1302
                    dnl directory; it is already contained in a preceding -L
1303
                    dnl option.
1304
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1305
                    ;;
1306
                  *)
1307
                    dnl Most likely an immediate library name.
1308
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1309
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1310
                    ;;
1311
                esac
1312
              done
1313
            fi
1314
          else
1315
            dnl Didn't find the library; assume it is in the system directories
1316
            dnl known to the linker and runtime loader. (All the system
1317
            dnl directories known to the linker should also be known to the
1318
            dnl runtime loader, otherwise the system is severely misconfigured.)
1319
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1320
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1321
          fi
1322
        fi
1323
      fi
1324
    done
1325
  done
1326
  if test "X$rpathdirs" != "X"; then
1327
    if test -n "$acl_hardcode_libdir_separator"; then
1328
      dnl Weird platform: only the last -rpath option counts, the user must
1329
      dnl pass all path elements in one option. We can arrange that for a
1330
      dnl single library, but not when more than one $LIBNAMEs are used.
1331
      alldirs=
1332
      for found_dir in $rpathdirs; do
1333
        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1334
      done
1335
      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1336
      acl_save_libdir="$libdir"
1337
      libdir="$alldirs"
1338
      eval flag=\"$acl_hardcode_libdir_flag_spec\"
1339
      libdir="$acl_save_libdir"
1340
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1341
    else
1342
      dnl The -rpath options are cumulative.
1343
      for found_dir in $rpathdirs; do
1344
        acl_save_libdir="$libdir"
1345
        libdir="$found_dir"
1346
        eval flag=\"$acl_hardcode_libdir_flag_spec\"
1347
        libdir="$acl_save_libdir"
1348
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1349
      done
1350
    fi
1351
  fi
1352
  if test "X$ltrpathdirs" != "X"; then
1353
    dnl When using libtool, the option that works for both libraries and
1354
    dnl executables is -R. The -R options are cumulative.
1355
    for found_dir in $ltrpathdirs; do
1356
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1357
    done
1358
  fi
1359
])
1360
1361
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1362
dnl unless already present in VAR.
1363
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1364
dnl contains two or three consecutive elements that belong together.
1365
AC_DEFUN([AC_LIB_APPENDTOVAR],
1366
[
1367
  for element in [$2]; do
1368
    haveit=
1369
    for x in $[$1]; do
1370
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1371
      if test "X$x" = "X$element"; then
1372
        haveit=yes
1373
        break
1374
      fi
1375
    done
1376
    if test -z "$haveit"; then
1377
      [$1]="${[$1]}${[$1]:+ }$element"
1378
    fi
1379
  done
1380
])
1381
1382
dnl For those cases where a variable contains several -L and -l options
1383
dnl referring to unknown libraries and directories, this macro determines the
1384
dnl necessary additional linker options for the runtime path.
1385
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1386
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1387
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1388
dnl otherwise linking without libtool is assumed.
1389
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1390
[
1391
  AC_REQUIRE([AC_LIB_RPATH])
1392
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1393
  $1=
1394
  if test "$enable_rpath" != no; then
1395
    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1396
      dnl Use an explicit option to hardcode directories into the resulting
1397
      dnl binary.
1398
      rpathdirs=
1399
      next=
1400
      for opt in $2; do
1401
        if test -n "$next"; then
1402
          dir="$next"
1403
          dnl No need to hardcode the standard /usr/lib.
1404
          if test "X$dir" != "X/usr/$acl_libdirstem"; then
1405
            rpathdirs="$rpathdirs $dir"
1406
          fi
1407
          next=
1408
        else
1409
          case $opt in
1410
            -L) next=yes ;;
1411
            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1412
                 dnl No need to hardcode the standard /usr/lib.
1413
                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
1414
                   rpathdirs="$rpathdirs $dir"
1415
                 fi
1416
                 next= ;;
1417
            *) next= ;;
1418
          esac
1419
        fi
1420
      done
1421
      if test "X$rpathdirs" != "X"; then
1422
        if test -n ""$3""; then
1423
          dnl libtool is used for linking. Use -R options.
1424
          for dir in $rpathdirs; do
1425
            $1="${$1}${$1:+ }-R$dir"
1426
          done
1427
        else
1428
          dnl The linker is used for linking directly.
1429
          if test -n "$acl_hardcode_libdir_separator"; then
1430
            dnl Weird platform: only the last -rpath option counts, the user
1431
            dnl must pass all path elements in one option.
1432
            alldirs=
1433
            for dir in $rpathdirs; do
1434
              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1435
            done
1436
            acl_save_libdir="$libdir"
1437
            libdir="$alldirs"
1438
            eval flag=\"$acl_hardcode_libdir_flag_spec\"
1439
            libdir="$acl_save_libdir"
1440
            $1="$flag"
1441
          else
1442
            dnl The -rpath options are cumulative.
1443
            for dir in $rpathdirs; do
1444
              acl_save_libdir="$libdir"
1445
              libdir="$dir"
1446
              eval flag=\"$acl_hardcode_libdir_flag_spec\"
1447
              libdir="$acl_save_libdir"
1448
              $1="${$1}${$1:+ }$flag"
1449
            done
1450
          fi
1451
        fi
1452
      fi
1453
    fi
1454
  fi
1455
  AC_SUBST([$1])
1456
])
1457
1458
# lib-prefix.m4 serial 5 (gettext-0.15)
1459
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1460
dnl This file is free software; the Free Software Foundation
1461
dnl gives unlimited permission to copy and/or distribute it,
1462
dnl with or without modifications, as long as this notice is preserved.
1463
1464
dnl From Bruno Haible.
1465
1466
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1467
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1468
dnl require excessive bracketing.
1469
ifdef([AC_HELP_STRING],
1470
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1471
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1472
1473
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1474
dnl to access previously installed libraries. The basic assumption is that
1475
dnl a user will want packages to use other packages he previously installed
1476
dnl with the same --prefix option.
1477
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1478
dnl libraries, but is otherwise very convenient.
1479
AC_DEFUN([AC_LIB_PREFIX],
1480
[
1481
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1482
  AC_REQUIRE([AC_PROG_CC])
1483
  AC_REQUIRE([AC_CANONICAL_HOST])
1484
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1485
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1486
  dnl By default, look in $includedir and $libdir.
1487
  use_additional=yes
1488
  AC_LIB_WITH_FINAL_PREFIX([
1489
    eval additional_includedir=\"$includedir\"
1490
    eval additional_libdir=\"$libdir\"
1491
  ])
1492
  AC_LIB_ARG_WITH([lib-prefix],
1493
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1494
  --without-lib-prefix    don't search for libraries in includedir and libdir],
1495
[
1496
    if test "X$withval" = "Xno"; then
1497
      use_additional=no
1498
    else
1499
      if test "X$withval" = "X"; then
1500
        AC_LIB_WITH_FINAL_PREFIX([
1501
          eval additional_includedir=\"$includedir\"
1502
          eval additional_libdir=\"$libdir\"
1503
        ])
1504
      else
1505
        additional_includedir="$withval/include"
1506
        additional_libdir="$withval/$acl_libdirstem"
1507
      fi
1508
    fi
1509
])
1510
  if test $use_additional = yes; then
1511
    dnl Potentially add $additional_includedir to $CPPFLAGS.
1512
    dnl But don't add it
1513
    dnl   1. if it's the standard /usr/include,
1514
    dnl   2. if it's already present in $CPPFLAGS,
1515
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1516
    dnl   4. if it doesn't exist as a directory.
1517
    if test "X$additional_includedir" != "X/usr/include"; then
1518
      haveit=
1519
      for x in $CPPFLAGS; do
1520
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1521
        if test "X$x" = "X-I$additional_includedir"; then
1522
          haveit=yes
1523
          break
1524
        fi
1525
      done
1526
      if test -z "$haveit"; then
1527
        if test "X$additional_includedir" = "X/usr/local/include"; then
1528
          if test -n "$GCC"; then
1529
            case $host_os in
1530
              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1531
            esac
1532
          fi
1533
        fi
1534
        if test -z "$haveit"; then
1535
          if test -d "$additional_includedir"; then
1536
            dnl Really add $additional_includedir to $CPPFLAGS.
1537
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1538
          fi
1539
        fi
1540
      fi
1541
    fi
1542
    dnl Potentially add $additional_libdir to $LDFLAGS.
1543
    dnl But don't add it
1544
    dnl   1. if it's the standard /usr/lib,
1545
    dnl   2. if it's already present in $LDFLAGS,
1546
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1547
    dnl   4. if it doesn't exist as a directory.
1548
    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1549
      haveit=
1550
      for x in $LDFLAGS; do
1551
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1552
        if test "X$x" = "X-L$additional_libdir"; then
1553
          haveit=yes
1554
          break
1555
        fi
1556
      done
1557
      if test -z "$haveit"; then
1558
        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1559
          if test -n "$GCC"; then
1560
            case $host_os in
1561
              linux*) haveit=yes;;
1562
            esac
1563
          fi
1564
        fi
1565
        if test -z "$haveit"; then
1566
          if test -d "$additional_libdir"; then
1567
            dnl Really add $additional_libdir to $LDFLAGS.
1568
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1569
          fi
1570
        fi
1571
      fi
1572
    fi
1573
  fi
1574
])
1575
1576
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1577
dnl acl_final_exec_prefix, containing the values to which $prefix and
1578
dnl $exec_prefix will expand at the end of the configure script.
1579
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1580
[
1581
  dnl Unfortunately, prefix and exec_prefix get only finally determined
1582
  dnl at the end of configure.
1583
  if test "X$prefix" = "XNONE"; then
1584
    acl_final_prefix="$ac_default_prefix"
1585
  else
1586
    acl_final_prefix="$prefix"
1587
  fi
1588
  if test "X$exec_prefix" = "XNONE"; then
1589
    acl_final_exec_prefix='${prefix}'
1590
  else
1591
    acl_final_exec_prefix="$exec_prefix"
1592
  fi
1593
  acl_save_prefix="$prefix"
1594
  prefix="$acl_final_prefix"
1595
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1596
  prefix="$acl_save_prefix"
1597
])
1598
1599
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1600
dnl variables prefix and exec_prefix bound to the values they will have
1601
dnl at the end of the configure script.
1602
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1603
[
1604
  acl_save_prefix="$prefix"
1605
  prefix="$acl_final_prefix"
1606
  acl_save_exec_prefix="$exec_prefix"
1607
  exec_prefix="$acl_final_exec_prefix"
1608
  $1
1609
  exec_prefix="$acl_save_exec_prefix"
1610
  prefix="$acl_save_prefix"
1611
])
1612
1613
dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
1614
dnl the basename of the libdir, either "lib" or "lib64".
1615
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1616
[
1617
  dnl There is no formal standard regarding lib and lib64. The current
1618
  dnl practice is that on a system supporting 32-bit and 64-bit instruction
1619
  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
1620
  dnl libraries go under $prefix/lib. We determine the compiler's default
1621
  dnl mode by looking at the compiler's library search path. If at least
1622
  dnl of its elements ends in /lib64 or points to a directory whose absolute
1623
  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
1624
  dnl default, namely "lib".
1625
  acl_libdirstem=lib
1626
  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1627
  if test -n "$searchpath"; then
1628
    acl_save_IFS="${IFS= 	}"; IFS=":"
1629
    for searchdir in $searchpath; do
1630
      if test -d "$searchdir"; then
1631
        case "$searchdir" in
1632
          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1633
          *) searchdir=`cd "$searchdir" && pwd`
1634
             case "$searchdir" in
1635
               */lib64 ) acl_libdirstem=lib64 ;;
1636
             esac ;;
1637
        esac
1638
      fi
1639
    done
1640
    IFS="$acl_save_IFS"
1641
  fi
1642
])
1643
1644
dnl Autoconf macros for libgcrypt
1645
dnl       Copyright (C) 2002, 2004 Free Software Foundation, Inc.
1646
dnl
1647
dnl This file is free software; as a special exception the author gives
1648
dnl unlimited permission to copy and/or distribute it, with or without
1649
dnl modifications, as long as this notice is preserved.
1650
dnl
1651
dnl This file is distributed in the hope that it will be useful, but
1652
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
1653
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1654
1655
1656
dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
1657
dnl                   [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
1658
dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
1659
dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed
1660
dnl with the API version to also check the API compatibility. Example:
1661
dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed 
1662
dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1.  Using
1663
dnl this features allows to prevent build against newer versions of libgcrypt
1664
dnl with a changed API.
1665
dnl
1666
AC_DEFUN([AM_PATH_LIBGCRYPT],
1667
[ AC_ARG_WITH(libgcrypt-prefix,
1668
            AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
1669
                           [prefix where LIBGCRYPT is installed (optional)]),
1670
     libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
1671
  if test x$libgcrypt_config_prefix != x ; then
1672
     if test x${LIBGCRYPT_CONFIG+set} != xset ; then
1673
        LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
1674
     fi
1675
  fi
1676
1677
  AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
1678
  tmp=ifelse([$1], ,1:1.2.0,$1)
1679
  if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
1680
     req_libgcrypt_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
1681
     min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
1682
  else
1683
     req_libgcrypt_api=0
1684
     min_libgcrypt_version="$tmp"
1685
  fi
1686
1687
  AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
1688
  ok=no
1689
  if test "$LIBGCRYPT_CONFIG" != "no" ; then
1690
    req_major=`echo $min_libgcrypt_version | \
1691
               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
1692
    req_minor=`echo $min_libgcrypt_version | \
1693
               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
1694
    req_micro=`echo $min_libgcrypt_version | \
1695
               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
1696
    libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
1697
    major=`echo $libgcrypt_config_version | \
1698
               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
1699
    minor=`echo $libgcrypt_config_version | \
1700
               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
1701
    micro=`echo $libgcrypt_config_version | \
1702
               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
1703
    if test "$major" -gt "$req_major"; then
1704
        ok=yes
1705
    else 
1706
        if test "$major" -eq "$req_major"; then
1707
            if test "$minor" -gt "$req_minor"; then
1708
               ok=yes
1709
            else
1710
               if test "$minor" -eq "$req_minor"; then
1711
                   if test "$micro" -ge "$req_micro"; then
1712
                     ok=yes
1713
                   fi
1714
               fi
1715
            fi
1716
        fi
1717
    fi
1718
  fi
1719
  if test $ok = yes; then
1720
    AC_MSG_RESULT([yes ($libgcrypt_config_version)])
1721
  else
1722
    AC_MSG_RESULT(no)
1723
  fi
1724
  if test $ok = yes; then
1725
     # If we have a recent libgcrypt, we should also check that the
1726
     # API is compatible
1727
     if test "$req_libgcrypt_api" -gt 0 ; then
1728
        tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
1729
        if test "$tmp" -gt 0 ; then
1730
           AC_MSG_CHECKING([LIBGCRYPT API version])
1731
           if test "$req_libgcrypt_api" -eq "$tmp" ; then
1732
             AC_MSG_RESULT([okay])
1733
           else
1734
             ok=no
1735
             AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
1736
           fi
1737
        fi
1738
     fi
1739
  fi
1740
  if test $ok = yes; then
1741
    LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
1742
    LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
1743
    ifelse([$2], , :, [$2])
1744
  else
1745
    LIBGCRYPT_CFLAGS=""
1746
    LIBGCRYPT_LIBS=""
1747
    ifelse([$3], , :, [$3])
1748
  fi
1749
  AC_SUBST(LIBGCRYPT_CFLAGS)
1750
  AC_SUBST(LIBGCRYPT_LIBS)
1751
])
1752
1753
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1754
#
1755
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1756
#                 2006, 2007, 2008 Free Software Foundation, Inc.
1757
#   Written by Gordon Matzigkeit, 1996
1758
#
1759
# This file is free software; the Free Software Foundation gives
1760
# unlimited permission to copy and/or distribute it, with or without
1761
# modifications, as long as this notice is preserved.
1762
1763
m4_define([_LT_COPYING], [dnl
1764
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1765
#                 2006, 2007, 2008 Free Software Foundation, Inc.
1766
#   Written by Gordon Matzigkeit, 1996
1767
#
1768
#   This file is part of GNU Libtool.
1769
#
1770
# GNU Libtool is free software; you can redistribute it and/or
1771
# modify it under the terms of the GNU General Public License as
1772
# published by the Free Software Foundation; either version 2 of
1773
# the License, or (at your option) any later version.
1774
#
1775
# As a special exception to the GNU General Public License,
1776
# if you distribute this file as part of a program or library that
1777
# is built using GNU Libtool, you may include this file under the
1778
# same distribution terms that you use for the rest of that program.
1779
#
1780
# GNU Libtool is distributed in the hope that it will be useful,
1781
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1782
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1783
# GNU General Public License for more details.
1784
#
1785
# You should have received a copy of the GNU General Public License
1786
# along with GNU Libtool; see the file COPYING.  If not, a copy
1787
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1788
# obtained by writing to the Free Software Foundation, Inc.,
1789
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1790
])
1791
1792
# serial 56 LT_INIT
1793
1794
1795
# LT_PREREQ(VERSION)
1796
# ------------------
1797
# Complain and exit if this libtool version is less that VERSION.
1798
m4_defun([LT_PREREQ],
1799
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1800
       [m4_default([$3],
1801
		   [m4_fatal([Libtool version $1 or higher is required],
1802
		             63)])],
1803
       [$2])])
1804
1805
1806
# _LT_CHECK_BUILDDIR
1807
# ------------------
1808
# Complain if the absolute build directory name contains unusual characters
1809
m4_defun([_LT_CHECK_BUILDDIR],
1810
[case `pwd` in
1811
  *\ * | *\	*)
1812
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1813
esac
1814
])
1815
1816
1817
# LT_INIT([OPTIONS])
1818
# ------------------
1819
AC_DEFUN([LT_INIT],
1820
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1821
AC_BEFORE([$0], [LT_LANG])dnl
1822
AC_BEFORE([$0], [LT_OUTPUT])dnl
1823
AC_BEFORE([$0], [LTDL_INIT])dnl
1824
m4_require([_LT_CHECK_BUILDDIR])dnl
1825
1826
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1827
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1828
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1829
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1830
dnl unless we require an AC_DEFUNed macro:
1831
AC_REQUIRE([LTOPTIONS_VERSION])dnl
1832
AC_REQUIRE([LTSUGAR_VERSION])dnl
1833
AC_REQUIRE([LTVERSION_VERSION])dnl
1834
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1835
m4_require([_LT_PROG_LTMAIN])dnl
1836
1837
dnl Parse OPTIONS
1838
_LT_SET_OPTIONS([$0], [$1])
1839
1840
# This can be used to rebuild libtool when needed
1841
LIBTOOL_DEPS="$ltmain"
1842
1843
# Always use our own libtool.
1844
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1845
AC_SUBST(LIBTOOL)dnl
1846
1847
_LT_SETUP
1848
1849
# Only expand once:
1850
m4_define([LT_INIT])
1851
])# LT_INIT
1852
1853
# Old names:
1854
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1855
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1856
dnl aclocal-1.4 backwards compatibility:
1857
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1858
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1859
1860
1861
# _LT_CC_BASENAME(CC)
1862
# -------------------
1863
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1864
m4_defun([_LT_CC_BASENAME],
1865
[for cc_temp in $1""; do
1866
  case $cc_temp in
1867
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1868
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1869
    \-*) ;;
1870
    *) break;;
1871
  esac
1872
done
1873
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1874
])
1875
1876
1877
# _LT_FILEUTILS_DEFAULTS
1878
# ----------------------
1879
# It is okay to use these file commands and assume they have been set
1880
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1881
m4_defun([_LT_FILEUTILS_DEFAULTS],
1882
[: ${CP="cp -f"}
1883
: ${MV="mv -f"}
1884
: ${RM="rm -f"}
1885
])# _LT_FILEUTILS_DEFAULTS
1886
1887
1888
# _LT_SETUP
1889
# ---------
1890
m4_defun([_LT_SETUP],
1891
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1892
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1893
_LT_DECL([], [host_alias], [0], [The host system])dnl
1894
_LT_DECL([], [host], [0])dnl
1895
_LT_DECL([], [host_os], [0])dnl
1896
dnl
1897
_LT_DECL([], [build_alias], [0], [The build system])dnl
1898
_LT_DECL([], [build], [0])dnl
1899
_LT_DECL([], [build_os], [0])dnl
1900
dnl
1901
AC_REQUIRE([AC_PROG_CC])dnl
1902
AC_REQUIRE([LT_PATH_LD])dnl
1903
AC_REQUIRE([LT_PATH_NM])dnl
1904
dnl
1905
AC_REQUIRE([AC_PROG_LN_S])dnl
1906
test -z "$LN_S" && LN_S="ln -s"
1907
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1908
dnl
1909
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1910
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1911
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1912
dnl
1913
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1914
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1915
m4_require([_LT_CMD_RELOAD])dnl
1916
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1917
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1918
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1919
1920
_LT_CONFIG_LIBTOOL_INIT([
1921
# See if we are running on zsh, and set the options which allow our
1922
# commands through without removal of \ escapes INIT.
1923
if test -n "\${ZSH_VERSION+set}" ; then
1924
   setopt NO_GLOB_SUBST
1925
fi
1926
])
1927
if test -n "${ZSH_VERSION+set}" ; then
1928
   setopt NO_GLOB_SUBST
1929
fi
1930
1931
_LT_CHECK_OBJDIR
1932
1933
m4_require([_LT_TAG_COMPILER])dnl
1934
_LT_PROG_ECHO_BACKSLASH
1935
1936
case $host_os in
1937
aix3*)
1938
  # AIX sometimes has problems with the GCC collect2 program.  For some
1939
  # reason, if we set the COLLECT_NAMES environment variable, the problems
1940
  # vanish in a puff of smoke.
1941
  if test "X${COLLECT_NAMES+set}" != Xset; then
1942
    COLLECT_NAMES=
1943
    export COLLECT_NAMES
1944
  fi
1945
  ;;
1946
esac
1947
1948
# Sed substitution that helps us do robust quoting.  It backslashifies
1949
# metacharacters that are still active within double-quoted strings.
1950
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1951
1952
# Same as above, but do not quote variable references.
1953
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1954
1955
# Sed substitution to delay expansion of an escaped shell variable in a
1956
# double_quote_subst'ed string.
1957
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1958
1959
# Sed substitution to delay expansion of an escaped single quote.
1960
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1961
1962
# Sed substitution to avoid accidental globbing in evaled expressions
1963
no_glob_subst='s/\*/\\\*/g'
1964
1965
# Global variables:
1966
ofile=libtool
1967
can_build_shared=yes
1968
1969
# All known linkers require a `.a' archive for static linking (except MSVC,
1970
# which needs '.lib').
1971
libext=a
1972
1973
with_gnu_ld="$lt_cv_prog_gnu_ld"
1974
1975
old_CC="$CC"
1976
old_CFLAGS="$CFLAGS"
1977
1978
# Set sane defaults for various variables
1979
test -z "$CC" && CC=cc
1980
test -z "$LTCC" && LTCC=$CC
1981
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1982
test -z "$LD" && LD=ld
1983
test -z "$ac_objext" && ac_objext=o
1984
1985
_LT_CC_BASENAME([$compiler])
1986
1987
# Only perform the check for file, if the check method requires it
1988
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1989
case $deplibs_check_method in
1990
file_magic*)
1991
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1992
    _LT_PATH_MAGIC
1993
  fi
1994
  ;;
1995
esac
1996
1997
# Use C for the default configuration in the libtool script
1998
LT_SUPPORTED_TAG([CC])
1999
_LT_LANG_C_CONFIG
2000
_LT_LANG_DEFAULT_CONFIG
2001
_LT_CONFIG_COMMANDS
2002
])# _LT_SETUP
2003
2004
2005
# _LT_PROG_LTMAIN
2006
# ---------------
2007
# Note that this code is called both from `configure', and `config.status'
2008
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2009
# `config.status' has no value for ac_aux_dir unless we are using Automake,
2010
# so we pass a copy along to make sure it has a sensible value anyway.
2011
m4_defun([_LT_PROG_LTMAIN],
2012
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2013
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2014
ltmain="$ac_aux_dir/ltmain.sh"
2015
])# _LT_PROG_LTMAIN
2016
2017
2018
2019
# So that we can recreate a full libtool script including additional
2020
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2021
# in macros and then make a single call at the end using the `libtool'
2022
# label.
2023
2024
2025
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2026
# ----------------------------------------
2027
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2028
m4_define([_LT_CONFIG_LIBTOOL_INIT],
2029
[m4_ifval([$1],
2030
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2031
                     [$1
2032
])])])
2033
2034
# Initialize.
2035
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2036
2037
2038
# _LT_CONFIG_LIBTOOL([COMMANDS])
2039
# ------------------------------
2040
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2041
m4_define([_LT_CONFIG_LIBTOOL],
2042
[m4_ifval([$1],
2043
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2044
                     [$1
2045
])])])
2046
2047
# Initialize.
2048
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2049
2050
2051
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2052
# -----------------------------------------------------
2053
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2054
[_LT_CONFIG_LIBTOOL([$1])
2055
_LT_CONFIG_LIBTOOL_INIT([$2])
2056
])
2057
2058
2059
# _LT_FORMAT_COMMENT([COMMENT])
2060
# -----------------------------
2061
# Add leading comment marks to the start of each line, and a trailing
2062
# full-stop to the whole comment if one is not present already.
2063
m4_define([_LT_FORMAT_COMMENT],
2064
[m4_ifval([$1], [
2065
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2066
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2067
)])
2068
2069
2070
2071
2072
2073
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2074
# -------------------------------------------------------------------
2075
# CONFIGNAME is the name given to the value in the libtool script.
2076
# VARNAME is the (base) name used in the configure script.
2077
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2078
# VARNAME.  Any other value will be used directly.
2079
m4_define([_LT_DECL],
2080
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2081
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2082
	[m4_ifval([$1], [$1], [$2])])
2083
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2084
    m4_ifval([$4],
2085
	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2086
    lt_dict_add_subkey([lt_decl_dict], [$2],
2087
	[tagged?], [m4_ifval([$5], [yes], [no])])])
2088
])
2089
2090
2091
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2092
# --------------------------------------------------------
2093
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2094
2095
2096
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2097
# ------------------------------------------------
2098
m4_define([lt_decl_tag_varnames],
2099
[_lt_decl_filter([tagged?], [yes], $@)])
2100
2101
2102
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2103
# ---------------------------------------------------------
2104
m4_define([_lt_decl_filter],
2105
[m4_case([$#],
2106
  [0], [m4_fatal([$0: too few arguments: $#])],
2107
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
2108
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2109
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2110
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2111
])
2112
2113
2114
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2115
# --------------------------------------------------
2116
m4_define([lt_decl_quote_varnames],
2117
[_lt_decl_filter([value], [1], $@)])
2118
2119
2120
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2121
# ---------------------------------------------------
2122
m4_define([lt_decl_dquote_varnames],
2123
[_lt_decl_filter([value], [2], $@)])
2124
2125
2126
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2127
# ---------------------------------------------------
2128
m4_define([lt_decl_varnames_tagged],
2129
[m4_assert([$# <= 2])dnl
2130
_$0(m4_quote(m4_default([$1], [[, ]])),
2131
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2132
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2133
m4_define([_lt_decl_varnames_tagged],
2134
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2135
2136
2137
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2138
# ------------------------------------------------
2139
m4_define([lt_decl_all_varnames],
2140
[_$0(m4_quote(m4_default([$1], [[, ]])),
2141
     m4_if([$2], [],
2142
	   m4_quote(lt_decl_varnames),
2143
	m4_quote(m4_shift($@))))[]dnl
2144
])
2145
m4_define([_lt_decl_all_varnames],
2146
[lt_join($@, lt_decl_varnames_tagged([$1],
2147
			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2148
])
2149
2150
2151
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2152
# ------------------------------------
2153
# Quote a variable value, and forward it to `config.status' so that its
2154
# declaration there will have the same value as in `configure'.  VARNAME
2155
# must have a single quote delimited value for this to work.
2156
m4_define([_LT_CONFIG_STATUS_DECLARE],
2157
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
2158
2159
2160
# _LT_CONFIG_STATUS_DECLARATIONS
2161
# ------------------------------
2162
# We delimit libtool config variables with single quotes, so when
2163
# we write them to config.status, we have to be sure to quote all
2164
# embedded single quotes properly.  In configure, this macro expands
2165
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2166
#
2167
#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
2168
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2169
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2170
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2171
2172
2173
# _LT_LIBTOOL_TAGS
2174
# ----------------
2175
# Output comment and list of tags supported by the script
2176
m4_defun([_LT_LIBTOOL_TAGS],
2177
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2178
available_tags="_LT_TAGS"dnl
2179
])
2180
2181
2182
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2183
# -----------------------------------
2184
# Extract the dictionary values for VARNAME (optionally with TAG) and
2185
# expand to a commented shell variable setting:
2186
#
2187
#    # Some comment about what VAR is for.
2188
#    visible_name=$lt_internal_name
2189
m4_define([_LT_LIBTOOL_DECLARE],
2190
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2191
					   [description])))[]dnl
2192
m4_pushdef([_libtool_name],
2193
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2194
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2195
    [0], [_libtool_name=[$]$1],
2196
    [1], [_libtool_name=$lt_[]$1],
2197
    [2], [_libtool_name=$lt_[]$1],
2198
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2199
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2200
])
2201
2202
2203
# _LT_LIBTOOL_CONFIG_VARS
2204
# -----------------------
2205
# Produce commented declarations of non-tagged libtool config variables
2206
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2207
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2208
# section) are produced by _LT_LIBTOOL_TAG_VARS.
2209
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2210
[m4_foreach([_lt_var],
2211
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2212
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2213
2214
2215
# _LT_LIBTOOL_TAG_VARS(TAG)
2216
# -------------------------
2217
m4_define([_LT_LIBTOOL_TAG_VARS],
2218
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2219
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2220
2221
2222
# _LT_TAGVAR(VARNAME, [TAGNAME])
2223
# ------------------------------
2224
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2225
2226
2227
# _LT_CONFIG_COMMANDS
2228
# -------------------
2229
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2230
# variables for single and double quote escaping we saved from calls
2231
# to _LT_DECL, we can put quote escaped variables declarations
2232
# into `config.status', and then the shell code to quote escape them in
2233
# for loops in `config.status'.  Finally, any additional code accumulated
2234
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2235
m4_defun([_LT_CONFIG_COMMANDS],
2236
[AC_PROVIDE_IFELSE([LT_OUTPUT],
2237
	dnl If the libtool generation code has been placed in $CONFIG_LT,
2238
	dnl instead of duplicating it all over again into config.status,
2239
	dnl then we will have config.status run $CONFIG_LT later, so it
2240
	dnl needs to know what name is stored there:
2241
        [AC_CONFIG_COMMANDS([libtool],
2242
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2243
    dnl If the libtool generation code is destined for config.status,
2244
    dnl expand the accumulated commands and init code now:
2245
    [AC_CONFIG_COMMANDS([libtool],
2246
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2247
])#_LT_CONFIG_COMMANDS
2248
2249
2250
# Initialize.
2251
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2252
[
2253
2254
# The HP-UX ksh and POSIX shell print the target directory to stdout
2255
# if CDPATH is set.
2256
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2257
2258
sed_quote_subst='$sed_quote_subst'
2259
double_quote_subst='$double_quote_subst'
2260
delay_variable_subst='$delay_variable_subst'
2261
_LT_CONFIG_STATUS_DECLARATIONS
2262
LTCC='$LTCC'
2263
LTCFLAGS='$LTCFLAGS'
2264
compiler='$compiler_DEFAULT'
2265
2266
# Quote evaled strings.
2267
for var in lt_decl_all_varnames([[ \
2268
]], lt_decl_quote_varnames); do
2269
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2270
    *[[\\\\\\\`\\"\\\$]]*)
2271
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2272
      ;;
2273
    *)
2274
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2275
      ;;
2276
    esac
2277
done
2278
2279
# Double-quote double-evaled strings.
2280
for var in lt_decl_all_varnames([[ \
2281
]], lt_decl_dquote_varnames); do
2282
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2283
    *[[\\\\\\\`\\"\\\$]]*)
2284
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2285
      ;;
2286
    *)
2287
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2288
      ;;
2289
    esac
2290
done
2291
2292
# Fix-up fallback echo if it was mangled by the above quoting rules.
2293
case \$lt_ECHO in
2294
*'\\\[$]0 --fallback-echo"')dnl "
2295
  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
2296
  ;;
2297
esac
2298
2299
_LT_OUTPUT_LIBTOOL_INIT
2300
])
2301
2302
2303
# LT_OUTPUT
2304
# ---------
2305
# This macro allows early generation of the libtool script (before
2306
# AC_OUTPUT is called), incase it is used in configure for compilation
2307
# tests.
2308
AC_DEFUN([LT_OUTPUT],
2309
[: ${CONFIG_LT=./config.lt}
2310
AC_MSG_NOTICE([creating $CONFIG_LT])
2311
cat >"$CONFIG_LT" <<_LTEOF
2312
#! $SHELL
2313
# Generated by $as_me.
2314
# Run this file to recreate a libtool stub with the current configuration.
2315
2316
lt_cl_silent=false
2317
SHELL=\${CONFIG_SHELL-$SHELL}
2318
_LTEOF
2319
2320
cat >>"$CONFIG_LT" <<\_LTEOF
2321
AS_SHELL_SANITIZE
2322
_AS_PREPARE
2323
2324
exec AS_MESSAGE_FD>&1
2325
exec AS_MESSAGE_LOG_FD>>config.log
2326
{
2327
  echo
2328
  AS_BOX([Running $as_me.])
2329
} >&AS_MESSAGE_LOG_FD
2330
2331
lt_cl_help="\
2332
\`$as_me' creates a local libtool stub from the current configuration,
2333
for use in further configure time tests before the real libtool is
2334
generated.
2335
2336
Usage: $[0] [[OPTIONS]]
2337
2338
  -h, --help      print this help, then exit
2339
  -V, --version   print version number, then exit
2340
  -q, --quiet     do not print progress messages
2341
  -d, --debug     don't remove temporary files
2342
2343
Report bugs to <bug-libtool@gnu.org>."
2344
2345
lt_cl_version="\
2346
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2347
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2348
configured by $[0], generated by m4_PACKAGE_STRING.
2349
2350
Copyright (C) 2008 Free Software Foundation, Inc.
2351
This config.lt script is free software; the Free Software Foundation
2352
gives unlimited permision to copy, distribute and modify it."
2353
2354
while test $[#] != 0
2355
do
2356
  case $[1] in
2357
    --version | --v* | -V )
2358
      echo "$lt_cl_version"; exit 0 ;;
2359
    --help | --h* | -h )
2360
      echo "$lt_cl_help"; exit 0 ;;
2361
    --debug | --d* | -d )
2362
      debug=: ;;
2363
    --quiet | --q* | --silent | --s* | -q )
2364
      lt_cl_silent=: ;;
2365
2366
    -*) AC_MSG_ERROR([unrecognized option: $[1]
2367
Try \`$[0] --help' for more information.]) ;;
2368
2369
    *) AC_MSG_ERROR([unrecognized argument: $[1]
2370
Try \`$[0] --help' for more information.]) ;;
2371
  esac
2372
  shift
2373
done
2374
2375
if $lt_cl_silent; then
2376
  exec AS_MESSAGE_FD>/dev/null
2377
fi
2378
_LTEOF
2379
2380
cat >>"$CONFIG_LT" <<_LTEOF
2381
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2382
_LTEOF
2383
2384
cat >>"$CONFIG_LT" <<\_LTEOF
2385
AC_MSG_NOTICE([creating $ofile])
2386
_LT_OUTPUT_LIBTOOL_COMMANDS
2387
AS_EXIT(0)
2388
_LTEOF
2389
chmod +x "$CONFIG_LT"
2390
2391
# configure is writing to config.log, but config.lt does its own redirection,
2392
# appending to config.log, which fails on DOS, as config.log is still kept
2393
# open by configure.  Here we exec the FD to /dev/null, effectively closing
2394
# config.log, so it can be properly (re)opened and appended to by config.lt.
2395
if test "$no_create" != yes; then
2396
  lt_cl_success=:
2397
  test "$silent" = yes &&
2398
    lt_config_lt_args="$lt_config_lt_args --quiet"
2399
  exec AS_MESSAGE_LOG_FD>/dev/null
2400
  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2401
  exec AS_MESSAGE_LOG_FD>>config.log
2402
  $lt_cl_success || AS_EXIT(1)
2403
fi
2404
])# LT_OUTPUT
2405
2406
2407
# _LT_CONFIG(TAG)
2408
# ---------------
2409
# If TAG is the built-in tag, create an initial libtool script with a
2410
# default configuration from the untagged config vars.  Otherwise add code
2411
# to config.status for appending the configuration named by TAG from the
2412
# matching tagged config vars.
2413
m4_defun([_LT_CONFIG],
2414
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2415
_LT_CONFIG_SAVE_COMMANDS([
2416
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2417
  m4_if(_LT_TAG, [C], [
2418
    # See if we are running on zsh, and set the options which allow our
2419
    # commands through without removal of \ escapes.
2420
    if test -n "${ZSH_VERSION+set}" ; then
2421
      setopt NO_GLOB_SUBST
2422
    fi
2423
2424
    cfgfile="${ofile}T"
2425
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2426
    $RM "$cfgfile"
2427
2428
    cat <<_LT_EOF >> "$cfgfile"
2429
#! $SHELL
2430
2431
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2432
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2433
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2434
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2435
#
2436
_LT_COPYING
2437
_LT_LIBTOOL_TAGS
2438
2439
# ### BEGIN LIBTOOL CONFIG
2440
_LT_LIBTOOL_CONFIG_VARS
2441
_LT_LIBTOOL_TAG_VARS
2442
# ### END LIBTOOL CONFIG
2443
2444
_LT_EOF
2445
2446
  case $host_os in
2447
  aix3*)
2448
    cat <<\_LT_EOF >> "$cfgfile"
2449
# AIX sometimes has problems with the GCC collect2 program.  For some
2450
# reason, if we set the COLLECT_NAMES environment variable, the problems
2451
# vanish in a puff of smoke.
2452
if test "X${COLLECT_NAMES+set}" != Xset; then
2453
  COLLECT_NAMES=
2454
  export COLLECT_NAMES
2455
fi
2456
_LT_EOF
2457
    ;;
2458
  esac
2459
2460
  _LT_PROG_LTMAIN
2461
2462
  # We use sed instead of cat because bash on DJGPP gets confused if
2463
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2464
  # text mode, it properly converts lines to CR/LF.  This bash problem
2465
  # is reportedly fixed, but why not run on old versions too?
2466
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
2467
    || (rm -f "$cfgfile"; exit 1)
2468
2469
  _LT_PROG_XSI_SHELLFNS
2470
2471
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
2472
    || (rm -f "$cfgfile"; exit 1)
2473
2474
  mv -f "$cfgfile" "$ofile" ||
2475
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2476
  chmod +x "$ofile"
2477
],
2478
[cat <<_LT_EOF >> "$ofile"
2479
2480
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2481
dnl in a comment (ie after a #).
2482
# ### BEGIN LIBTOOL TAG CONFIG: $1
2483
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2484
# ### END LIBTOOL TAG CONFIG: $1
2485
_LT_EOF
2486
])dnl /m4_if
2487
],
2488
[m4_if([$1], [], [
2489
    PACKAGE='$PACKAGE'
2490
    VERSION='$VERSION'
2491
    TIMESTAMP='$TIMESTAMP'
2492
    RM='$RM'
2493
    ofile='$ofile'], [])
2494
])dnl /_LT_CONFIG_SAVE_COMMANDS
2495
])# _LT_CONFIG
2496
2497
2498
# LT_SUPPORTED_TAG(TAG)
2499
# ---------------------
2500
# Trace this macro to discover what tags are supported by the libtool
2501
# --tag option, using:
2502
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2503
AC_DEFUN([LT_SUPPORTED_TAG], [])
2504
2505
2506
# C support is built-in for now
2507
m4_define([_LT_LANG_C_enabled], [])
2508
m4_define([_LT_TAGS], [])
2509
2510
2511
# LT_LANG(LANG)
2512
# -------------
2513
# Enable libtool support for the given language if not already enabled.
2514
AC_DEFUN([LT_LANG],
2515
[AC_BEFORE([$0], [LT_OUTPUT])dnl
2516
m4_case([$1],
2517
  [C],			[_LT_LANG(C)],
2518
  [C++],		[_LT_LANG(CXX)],
2519
  [Java],		[_LT_LANG(GCJ)],
2520
  [Fortran 77],		[_LT_LANG(F77)],
2521
  [Fortran],		[_LT_LANG(FC)],
2522
  [Windows Resource],	[_LT_LANG(RC)],
2523
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2524
    [_LT_LANG($1)],
2525
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
2526
])# LT_LANG
2527
2528
2529
# _LT_LANG(LANGNAME)
2530
# ------------------
2531
m4_defun([_LT_LANG],
2532
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2533
  [LT_SUPPORTED_TAG([$1])dnl
2534
  m4_append([_LT_TAGS], [$1 ])dnl
2535
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
2536
  _LT_LANG_$1_CONFIG($1)])dnl
2537
])# _LT_LANG
2538
2539
2540
# _LT_LANG_DEFAULT_CONFIG
2541
# -----------------------
2542
m4_defun([_LT_LANG_DEFAULT_CONFIG],
2543
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2544
  [LT_LANG(CXX)],
2545
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2546
2547
AC_PROVIDE_IFELSE([AC_PROG_F77],
2548
  [LT_LANG(F77)],
2549
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2550
2551
AC_PROVIDE_IFELSE([AC_PROG_FC],
2552
  [LT_LANG(FC)],
2553
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2554
2555
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2556
dnl pulling things in needlessly.
2557
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2558
  [LT_LANG(GCJ)],
2559
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2560
    [LT_LANG(GCJ)],
2561
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2562
      [LT_LANG(GCJ)],
2563
      [m4_ifdef([AC_PROG_GCJ],
2564
	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2565
       m4_ifdef([A][M_PROG_GCJ],
2566
	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2567
       m4_ifdef([LT_PROG_GCJ],
2568
	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2569
2570
AC_PROVIDE_IFELSE([LT_PROG_RC],
2571
  [LT_LANG(RC)],
2572
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2573
])# _LT_LANG_DEFAULT_CONFIG
2574
2575
# Obsolete macros:
2576
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2577
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2578
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2579
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2580
dnl aclocal-1.4 backwards compatibility:
2581
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2582
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2583
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2584
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2585
2586
2587
# _LT_TAG_COMPILER
2588
# ----------------
2589
m4_defun([_LT_TAG_COMPILER],
2590
[AC_REQUIRE([AC_PROG_CC])dnl
2591
2592
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2593
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2594
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2595
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2596
2597
# If no C compiler was specified, use CC.
2598
LTCC=${LTCC-"$CC"}
2599
2600
# If no C compiler flags were specified, use CFLAGS.
2601
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2602
2603
# Allow CC to be a program name with arguments.
2604
compiler=$CC
2605
])# _LT_TAG_COMPILER
2606
2607
2608
# _LT_COMPILER_BOILERPLATE
2609
# ------------------------
2610
# Check for compiler boilerplate output or warnings with
2611
# the simple compiler test code.
2612
m4_defun([_LT_COMPILER_BOILERPLATE],
2613
[m4_require([_LT_DECL_SED])dnl
2614
ac_outfile=conftest.$ac_objext
2615
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2616
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2617
_lt_compiler_boilerplate=`cat conftest.err`
2618
$RM conftest*
2619
])# _LT_COMPILER_BOILERPLATE
2620
2621
2622
# _LT_LINKER_BOILERPLATE
2623
# ----------------------
2624
# Check for linker boilerplate output or warnings with
2625
# the simple link test code.
2626
m4_defun([_LT_LINKER_BOILERPLATE],
2627
[m4_require([_LT_DECL_SED])dnl
2628
ac_outfile=conftest.$ac_objext
2629
echo "$lt_simple_link_test_code" >conftest.$ac_ext
2630
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2631
_lt_linker_boilerplate=`cat conftest.err`
2632
$RM -r conftest*
2633
])# _LT_LINKER_BOILERPLATE
2634
2635
# _LT_REQUIRED_DARWIN_CHECKS
2636
# -------------------------
2637
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2638
  case $host_os in
2639
    rhapsody* | darwin*)
2640
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2641
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2642
    AC_CHECK_TOOL([LIPO], [lipo], [:])
2643
    AC_CHECK_TOOL([OTOOL], [otool], [:])
2644
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2645
    _LT_DECL([], [DSYMUTIL], [1],
2646
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2647
    _LT_DECL([], [NMEDIT], [1],
2648
      [Tool to change global to local symbols on Mac OS X])
2649
    _LT_DECL([], [LIPO], [1],
2650
      [Tool to manipulate fat objects and archives on Mac OS X])
2651
    _LT_DECL([], [OTOOL], [1],
2652
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2653
    _LT_DECL([], [OTOOL64], [1],
2654
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2655
2656
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2657
      [lt_cv_apple_cc_single_mod=no
2658
      if test -z "${LT_MULTI_MODULE}"; then
2659
	# By default we will add the -single_module flag. You can override
2660
	# by either setting the environment variable LT_MULTI_MODULE
2661
	# non-empty at configure time, or by adding -multi_module to the
2662
	# link flags.
2663
	rm -rf libconftest.dylib*
2664
	echo "int foo(void){return 1;}" > conftest.c
2665
	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2666
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2667
	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2668
	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2669
        _lt_result=$?
2670
	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2671
	  lt_cv_apple_cc_single_mod=yes
2672
	else
2673
	  cat conftest.err >&AS_MESSAGE_LOG_FD
2674
	fi
2675
	rm -rf libconftest.dylib*
2676
	rm -f conftest.*
2677
      fi])
2678
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2679
      [lt_cv_ld_exported_symbols_list],
2680
      [lt_cv_ld_exported_symbols_list=no
2681
      save_LDFLAGS=$LDFLAGS
2682
      echo "_main" > conftest.sym
2683
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2684
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2685
	[lt_cv_ld_exported_symbols_list=yes],
2686
	[lt_cv_ld_exported_symbols_list=no])
2687
	LDFLAGS="$save_LDFLAGS"
2688
    ])
2689
    case $host_os in
2690
    rhapsody* | darwin1.[[012]])
2691
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2692
    darwin1.*)
2693
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2694
    darwin*) # darwin 5.x on
2695
      # if running on 10.5 or later, the deployment target defaults
2696
      # to the OS version, if on x86, and 10.4, the deployment
2697
      # target defaults to 10.4. Don't you love it?
2698
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2699
	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2700
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2701
	10.[[012]]*)
2702
	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2703
	10.*)
2704
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2705
      esac
2706
    ;;
2707
  esac
2708
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2709
      _lt_dar_single_mod='$single_module'
2710
    fi
2711
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2712
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2713
    else
2714
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2715
    fi
2716
    if test "$DSYMUTIL" != ":"; then
2717
      _lt_dsymutil='~$DSYMUTIL $lib || :'
2718
    else
2719
      _lt_dsymutil=
2720
    fi
2721
    ;;
2722
  esac
2723
])
2724
2725
2726
# _LT_DARWIN_LINKER_FEATURES
2727
# --------------------------
2728
# Checks for linker and compiler features on darwin
2729
m4_defun([_LT_DARWIN_LINKER_FEATURES],
2730
[
2731
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2732
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2733
  _LT_TAGVAR(hardcode_direct, $1)=no
2734
  _LT_TAGVAR(hardcode_automatic, $1)=yes
2735
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2736
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2737
  _LT_TAGVAR(link_all_deplibs, $1)=yes
2738
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2739
  case $cc_basename in
2740
     ifort*) _lt_dar_can_shared=yes ;;
2741
     *) _lt_dar_can_shared=$GCC ;;
2742
  esac
2743
  if test "$_lt_dar_can_shared" = "yes"; then
2744
    output_verbose_link_cmd=echo
2745
    _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}"
2746
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2747
    _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}"
2748
    _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}"
2749
    m4_if([$1], [CXX],
2750
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2751
      _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}"
2752
      _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}"
2753
    fi
2754
],[])
2755
  else
2756
  _LT_TAGVAR(ld_shlibs, $1)=no
2757
  fi
2758
])
2759
2760
# _LT_SYS_MODULE_PATH_AIX
2761
# -----------------------
2762
# Links a minimal program and checks the executable
2763
# for the system default hardcoded library path. In most cases,
2764
# this is /usr/lib:/lib, but when the MPI compilers are used
2765
# the location of the communication and MPI libs are included too.
2766
# If we don't find anything, use the default library path according
2767
# to the aix ld manual.
2768
m4_defun([_LT_SYS_MODULE_PATH_AIX],
2769
[m4_require([_LT_DECL_SED])dnl
2770
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2771
lt_aix_libpath_sed='
2772
    /Import File Strings/,/^$/ {
2773
	/^0/ {
2774
	    s/^0  *\(.*\)$/\1/
2775
	    p
2776
	}
2777
    }'
2778
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2779
# Check for a 64-bit object if we didn't find anything.
2780
if test -z "$aix_libpath"; then
2781
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2782
fi],[])
2783
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2784
])# _LT_SYS_MODULE_PATH_AIX
2785
2786
2787
# _LT_SHELL_INIT(ARG)
2788
# -------------------
2789
m4_define([_LT_SHELL_INIT],
2790
[ifdef([AC_DIVERSION_NOTICE],
2791
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2792
	 [AC_DIVERT_PUSH(NOTICE)])
2793
$1
2794
AC_DIVERT_POP
2795
])# _LT_SHELL_INIT
2796
2797
2798
# _LT_PROG_ECHO_BACKSLASH
2799
# -----------------------
2800
# Add some code to the start of the generated configure script which
2801
# will find an echo command which doesn't interpret backslashes.
2802
m4_defun([_LT_PROG_ECHO_BACKSLASH],
2803
[_LT_SHELL_INIT([
2804
# Check that we are running under the correct shell.
2805
SHELL=${CONFIG_SHELL-/bin/sh}
2806
2807
case X$lt_ECHO in
2808
X*--fallback-echo)
2809
  # Remove one level of quotation (which was required for Make).
2810
  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2811
  ;;
2812
esac
2813
2814
ECHO=${lt_ECHO-echo}
2815
if test "X[$]1" = X--no-reexec; then
2816
  # Discard the --no-reexec flag, and continue.
2817
  shift
2818
elif test "X[$]1" = X--fallback-echo; then
2819
  # Avoid inline document here, it may be left over
2820
  :
2821
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
2822
  # Yippee, $ECHO works!
2823
  :
2824
else
2825
  # Restart under the correct shell.
2826
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2827
fi
2828
2829
if test "X[$]1" = X--fallback-echo; then
2830
  # used as fallback echo
2831
  shift
2832
  cat <<_LT_EOF
2833
[$]*
2834
_LT_EOF
2835
  exit 0
2836
fi
2837
2838
# The HP-UX ksh and POSIX shell print the target directory to stdout
2839
# if CDPATH is set.
2840
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2841
2842
if test -z "$lt_ECHO"; then
2843
  if test "X${echo_test_string+set}" != Xset; then
2844
    # find a string as large as possible, as long as the shell can cope with it
2845
    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2846
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2847
      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
2848
	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
2849
      then
2850
        break
2851
      fi
2852
    done
2853
  fi
2854
2855
  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2856
     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2857
     test "X$echo_testing_string" = "X$echo_test_string"; then
2858
    :
2859
  else
2860
    # The Solaris, AIX, and Digital Unix default echo programs unquote
2861
    # backslashes.  This makes it impossible to quote backslashes using
2862
    #   echo "$something" | sed 's/\\/\\\\/g'
2863
    #
2864
    # So, first we look for a working echo in the user's PATH.
2865
2866
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2867
    for dir in $PATH /usr/ucb; do
2868
      IFS="$lt_save_ifs"
2869
      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2870
         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2871
         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2872
         test "X$echo_testing_string" = "X$echo_test_string"; then
2873
        ECHO="$dir/echo"
2874
        break
2875
      fi
2876
    done
2877
    IFS="$lt_save_ifs"
2878
2879
    if test "X$ECHO" = Xecho; then
2880
      # We didn't find a better echo, so look for alternatives.
2881
      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
2882
         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
2883
         test "X$echo_testing_string" = "X$echo_test_string"; then
2884
        # This shell has a builtin print -r that does the trick.
2885
        ECHO='print -r'
2886
      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
2887
	   test "X$CONFIG_SHELL" != X/bin/ksh; then
2888
        # If we have ksh, try running configure again with it.
2889
        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2890
        export ORIGINAL_CONFIG_SHELL
2891
        CONFIG_SHELL=/bin/ksh
2892
        export CONFIG_SHELL
2893
        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2894
      else
2895
        # Try using printf.
2896
        ECHO='printf %s\n'
2897
        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2898
	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2899
	   test "X$echo_testing_string" = "X$echo_test_string"; then
2900
	  # Cool, printf works
2901
	  :
2902
        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2903
	     test "X$echo_testing_string" = 'X\t' &&
2904
	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2905
	     test "X$echo_testing_string" = "X$echo_test_string"; then
2906
	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2907
	  export CONFIG_SHELL
2908
	  SHELL="$CONFIG_SHELL"
2909
	  export SHELL
2910
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2911
        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2912
	     test "X$echo_testing_string" = 'X\t' &&
2913
	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2914
	     test "X$echo_testing_string" = "X$echo_test_string"; then
2915
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2916
        else
2917
	  # maybe with a smaller string...
2918
	  prev=:
2919
2920
	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2921
	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2922
	    then
2923
	      break
2924
	    fi
2925
	    prev="$cmd"
2926
	  done
2927
2928
	  if test "$prev" != 'sed 50q "[$]0"'; then
2929
	    echo_test_string=`eval $prev`
2930
	    export echo_test_string
2931
	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2932
	  else
2933
	    # Oops.  We lost completely, so just stick with echo.
2934
	    ECHO=echo
2935
	  fi
2936
        fi
2937
      fi
2938
    fi
2939
  fi
2940
fi
2941
2942
# Copy echo and quote the copy suitably for passing to libtool from
2943
# the Makefile, instead of quoting the original, which is used later.
2944
lt_ECHO=$ECHO
2945
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2946
   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2947
fi
2948
2949
AC_SUBST(lt_ECHO)
2950
])
2951
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2952
_LT_DECL([], [ECHO], [1],
2953
    [An echo program that does not interpret backslashes])
2954
])# _LT_PROG_ECHO_BACKSLASH
2955
2956
2957
# _LT_ENABLE_LOCK
2958
# ---------------
2959
m4_defun([_LT_ENABLE_LOCK],
2960
[AC_ARG_ENABLE([libtool-lock],
2961
  [AS_HELP_STRING([--disable-libtool-lock],
2962
    [avoid locking (might break parallel builds)])])
2963
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2964
2965
# Some flags need to be propagated to the compiler or linker for good
2966
# libtool support.
2967
case $host in
2968
ia64-*-hpux*)
2969
  # Find out which ABI we are using.
2970
  echo 'int i;' > conftest.$ac_ext
2971
  if AC_TRY_EVAL(ac_compile); then
2972
    case `/usr/bin/file conftest.$ac_objext` in
2973
      *ELF-32*)
2974
	HPUX_IA64_MODE="32"
2975
	;;
2976
      *ELF-64*)
2977
	HPUX_IA64_MODE="64"
2978
	;;
2979
    esac
2980
  fi
2981
  rm -rf conftest*
2982
  ;;
2983
*-*-irix6*)
2984
  # Find out which ABI we are using.
2985
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2986
  if AC_TRY_EVAL(ac_compile); then
2987
    if test "$lt_cv_prog_gnu_ld" = yes; then
2988
      case `/usr/bin/file conftest.$ac_objext` in
2989
	*32-bit*)
2990
	  LD="${LD-ld} -melf32bsmip"
2991
	  ;;
2992
	*N32*)
2993
	  LD="${LD-ld} -melf32bmipn32"
2994
	  ;;
2995
	*64-bit*)
2996
	  LD="${LD-ld} -melf64bmip"
2997
	;;
2998
      esac
2999
    else
3000
      case `/usr/bin/file conftest.$ac_objext` in
3001
	*32-bit*)
3002
	  LD="${LD-ld} -32"
3003
	  ;;
3004
	*N32*)
3005
	  LD="${LD-ld} -n32"
3006
	  ;;
3007
	*64-bit*)
3008
	  LD="${LD-ld} -64"
3009
	  ;;
3010
      esac
3011
    fi
3012
  fi
3013
  rm -rf conftest*
3014
  ;;
3015
3016
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3017
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3018
  # Find out which ABI we are using.
3019
  echo 'int i;' > conftest.$ac_ext
3020
  if AC_TRY_EVAL(ac_compile); then
3021
    case `/usr/bin/file conftest.o` in
3022
      *32-bit*)
3023
	case $host in
3024
	  x86_64-*kfreebsd*-gnu)
3025
	    LD="${LD-ld} -m elf_i386_fbsd"
3026
	    ;;
3027
	  x86_64-*linux*)
3028
	    LD="${LD-ld} -m elf_i386"
3029
	    ;;
3030
	  ppc64-*linux*|powerpc64-*linux*)
3031
	    LD="${LD-ld} -m elf32ppclinux"
3032
	    ;;
3033
	  s390x-*linux*)
3034
	    LD="${LD-ld} -m elf_s390"
3035
	    ;;
3036
	  sparc64-*linux*)
3037
	    LD="${LD-ld} -m elf32_sparc"
3038
	    ;;
3039
	esac
3040
	;;
3041
      *64-bit*)
3042
	case $host in
3043
	  x86_64-*kfreebsd*-gnu)
3044
	    LD="${LD-ld} -m elf_x86_64_fbsd"
3045
	    ;;
3046
	  x86_64-*linux*)
3047
	    LD="${LD-ld} -m elf_x86_64"
3048
	    ;;
3049
	  ppc*-*linux*|powerpc*-*linux*)
3050
	    LD="${LD-ld} -m elf64ppc"
3051
	    ;;
3052
	  s390*-*linux*|s390*-*tpf*)
3053
	    LD="${LD-ld} -m elf64_s390"
3054
	    ;;
3055
	  sparc*-*linux*)
3056
	    LD="${LD-ld} -m elf64_sparc"
3057
	    ;;
3058
	esac
3059
	;;
3060
    esac
3061
  fi
3062
  rm -rf conftest*
3063
  ;;
3064
3065
*-*-sco3.2v5*)
3066
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3067
  SAVE_CFLAGS="$CFLAGS"
3068
  CFLAGS="$CFLAGS -belf"
3069
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3070
    [AC_LANG_PUSH(C)
3071
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3072
     AC_LANG_POP])
3073
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3074
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3075
    CFLAGS="$SAVE_CFLAGS"
3076
  fi
3077
  ;;
3078
sparc*-*solaris*)
3079
  # Find out which ABI we are using.
3080
  echo 'int i;' > conftest.$ac_ext
3081
  if AC_TRY_EVAL(ac_compile); then
3082
    case `/usr/bin/file conftest.o` in
3083
    *64-bit*)
3084
      case $lt_cv_prog_gnu_ld in
3085
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
3086
      *)
3087
	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3088
	  LD="${LD-ld} -64"
3089
	fi
3090
	;;
3091
      esac
3092
      ;;
3093
    esac
3094
  fi
3095
  rm -rf conftest*
3096
  ;;
3097
esac
3098
3099
need_locks="$enable_libtool_lock"
3100
])# _LT_ENABLE_LOCK
3101
3102
3103
# _LT_CMD_OLD_ARCHIVE
3104
# -------------------
3105
m4_defun([_LT_CMD_OLD_ARCHIVE],
3106
[AC_CHECK_TOOL(AR, ar, false)
3107
test -z "$AR" && AR=ar
3108
test -z "$AR_FLAGS" && AR_FLAGS=cru
3109
_LT_DECL([], [AR], [1], [The archiver])
3110
_LT_DECL([], [AR_FLAGS], [1])
3111
3112
AC_CHECK_TOOL(STRIP, strip, :)
3113
test -z "$STRIP" && STRIP=:
3114
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3115
3116
AC_CHECK_TOOL(RANLIB, ranlib, :)
3117
test -z "$RANLIB" && RANLIB=:
3118
_LT_DECL([], [RANLIB], [1],
3119
    [Commands used to install an old-style archive])
3120
3121
# Determine commands to create old-style static archives.
3122
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3123
old_postinstall_cmds='chmod 644 $oldlib'
3124
old_postuninstall_cmds=
3125
3126
if test -n "$RANLIB"; then
3127
  case $host_os in
3128
  openbsd*)
3129
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3130
    ;;
3131
  *)
3132
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3133
    ;;
3134
  esac
3135
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3136
fi
3137
_LT_DECL([], [old_postinstall_cmds], [2])
3138
_LT_DECL([], [old_postuninstall_cmds], [2])
3139
_LT_TAGDECL([], [old_archive_cmds], [2],
3140
    [Commands used to build an old-style archive])
3141
])# _LT_CMD_OLD_ARCHIVE
3142
3143
3144
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3145
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3146
# ----------------------------------------------------------------
3147
# Check whether the given compiler option works
3148
AC_DEFUN([_LT_COMPILER_OPTION],
3149
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3150
m4_require([_LT_DECL_SED])dnl
3151
AC_CACHE_CHECK([$1], [$2],
3152
  [$2=no
3153
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3154
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3155
   lt_compiler_flag="$3"
3156
   # Insert the option either (1) after the last *FLAGS variable, or
3157
   # (2) before a word containing "conftest.", or (3) at the end.
3158
   # Note that $ac_compile itself does not contain backslashes and begins
3159
   # with a dollar sign (not a hyphen), so the echo should work correctly.
3160
   # The option is referenced via a variable to avoid confusing sed.
3161
   lt_compile=`echo "$ac_compile" | $SED \
3162
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3163
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3164
   -e 's:$: $lt_compiler_flag:'`
3165
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3166
   (eval "$lt_compile" 2>conftest.err)
3167
   ac_status=$?
3168
   cat conftest.err >&AS_MESSAGE_LOG_FD
3169
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3170
   if (exit $ac_status) && test -s "$ac_outfile"; then
3171
     # The compiler can only warn and ignore the option if not recognized
3172
     # So say no if there are warnings other than the usual output.
3173
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
3174
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3175
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3176
       $2=yes
3177
     fi
3178
   fi
3179
   $RM conftest*
3180
])
3181
3182
if test x"[$]$2" = xyes; then
3183
    m4_if([$5], , :, [$5])
3184
else
3185
    m4_if([$6], , :, [$6])
3186
fi
3187
])# _LT_COMPILER_OPTION
3188
3189
# Old name:
3190
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3191
dnl aclocal-1.4 backwards compatibility:
3192
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3193
3194
3195
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3196
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
3197
# ----------------------------------------------------
3198
# Check whether the given linker option works
3199
AC_DEFUN([_LT_LINKER_OPTION],
3200
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3201
m4_require([_LT_DECL_SED])dnl
3202
AC_CACHE_CHECK([$1], [$2],
3203
  [$2=no
3204
   save_LDFLAGS="$LDFLAGS"
3205
   LDFLAGS="$LDFLAGS $3"
3206
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
3207
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3208
     # The linker can only warn and ignore the option if not recognized
3209
     # So say no if there are warnings
3210
     if test -s conftest.err; then
3211
       # Append any errors to the config.log.
3212
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
3213
       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
3214
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3215
       if diff conftest.exp conftest.er2 >/dev/null; then
3216
         $2=yes
3217
       fi
3218
     else
3219
       $2=yes
3220
     fi
3221
   fi
3222
   $RM -r conftest*
3223
   LDFLAGS="$save_LDFLAGS"
3224
])
3225
3226
if test x"[$]$2" = xyes; then
3227
    m4_if([$4], , :, [$4])
3228
else
3229
    m4_if([$5], , :, [$5])
3230
fi
3231
])# _LT_LINKER_OPTION
3232
3233
# Old name:
3234
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3235
dnl aclocal-1.4 backwards compatibility:
3236
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3237
3238
3239
# LT_CMD_MAX_LEN
3240
#---------------
3241
AC_DEFUN([LT_CMD_MAX_LEN],
3242
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3243
# find the maximum length of command line arguments
3244
AC_MSG_CHECKING([the maximum length of command line arguments])
3245
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3246
  i=0
3247
  teststring="ABCD"
3248
3249
  case $build_os in
3250
  msdosdjgpp*)
3251
    # On DJGPP, this test can blow up pretty badly due to problems in libc
3252
    # (any single argument exceeding 2000 bytes causes a buffer overrun
3253
    # during glob expansion).  Even if it were fixed, the result of this
3254
    # check would be larger than it should be.
3255
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3256
    ;;
3257
3258
  gnu*)
3259
    # Under GNU Hurd, this test is not required because there is
3260
    # no limit to the length of command line arguments.
3261
    # Libtool will interpret -1 as no limit whatsoever
3262
    lt_cv_sys_max_cmd_len=-1;
3263
    ;;
3264
3265
  cygwin* | mingw* | cegcc*)
3266
    # On Win9x/ME, this test blows up -- it succeeds, but takes
3267
    # about 5 minutes as the teststring grows exponentially.
3268
    # Worse, since 9x/ME are not pre-emptively multitasking,
3269
    # you end up with a "frozen" computer, even though with patience
3270
    # the test eventually succeeds (with a max line length of 256k).
3271
    # Instead, let's just punt: use the minimum linelength reported by
3272
    # all of the supported platforms: 8192 (on NT/2K/XP).
3273
    lt_cv_sys_max_cmd_len=8192;
3274
    ;;
3275
3276
  amigaos*)
3277
    # On AmigaOS with pdksh, this test takes hours, literally.
3278
    # So we just punt and use a minimum line length of 8192.
3279
    lt_cv_sys_max_cmd_len=8192;
3280
    ;;
3281
3282
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3283
    # This has been around since 386BSD, at least.  Likely further.
3284
    if test -x /sbin/sysctl; then
3285
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3286
    elif test -x /usr/sbin/sysctl; then
3287
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3288
    else
3289
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
3290
    fi
3291
    # And add a safety zone
3292
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3293
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3294
    ;;
3295
3296
  interix*)
3297
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
3298
    lt_cv_sys_max_cmd_len=196608
3299
    ;;
3300
3301
  osf*)
3302
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3303
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3304
    # nice to cause kernel panics so lets avoid the loop below.
3305
    # First set a reasonable default.
3306
    lt_cv_sys_max_cmd_len=16384
3307
    #
3308
    if test -x /sbin/sysconfig; then
3309
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3310
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
3311
      esac
3312
    fi
3313
    ;;
3314
  sco3.2v5*)
3315
    lt_cv_sys_max_cmd_len=102400
3316
    ;;
3317
  sysv5* | sco5v6* | sysv4.2uw2*)
3318
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3319
    if test -n "$kargmax"; then
3320
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
3321
    else
3322
      lt_cv_sys_max_cmd_len=32768
3323
    fi
3324
    ;;
3325
  *)
3326
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3327
    if test -n "$lt_cv_sys_max_cmd_len"; then
3328
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3329
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3330
    else
3331
      # Make teststring a little bigger before we do anything with it.
3332
      # a 1K string should be a reasonable start.
3333
      for i in 1 2 3 4 5 6 7 8 ; do
3334
        teststring=$teststring$teststring
3335
      done
3336
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3337
      # If test is not a shell built-in, we'll probably end up computing a
3338
      # maximum length that is only half of the actual maximum length, but
3339
      # we can't tell.
3340
      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
3341
	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
3342
	      test $i != 17 # 1/2 MB should be enough
3343
      do
3344
        i=`expr $i + 1`
3345
        teststring=$teststring$teststring
3346
      done
3347
      # Only check the string length outside the loop.
3348
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3349
      teststring=
3350
      # Add a significant safety factor because C++ compilers can tack on
3351
      # massive amounts of additional arguments before passing them to the
3352
      # linker.  It appears as though 1/2 is a usable value.
3353
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3354
    fi
3355
    ;;
3356
  esac
3357
])
3358
if test -n $lt_cv_sys_max_cmd_len ; then
3359
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3360
else
3361
  AC_MSG_RESULT(none)
3362
fi
3363
max_cmd_len=$lt_cv_sys_max_cmd_len
3364
_LT_DECL([], [max_cmd_len], [0],
3365
    [What is the maximum length of a command?])
3366
])# LT_CMD_MAX_LEN
3367
3368
# Old name:
3369
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3370
dnl aclocal-1.4 backwards compatibility:
3371
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3372
3373
3374
# _LT_HEADER_DLFCN
3375
# ----------------
3376
m4_defun([_LT_HEADER_DLFCN],
3377
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3378
])# _LT_HEADER_DLFCN
3379
3380
3381
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3382
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3383
# ----------------------------------------------------------------
3384
m4_defun([_LT_TRY_DLOPEN_SELF],
3385
[m4_require([_LT_HEADER_DLFCN])dnl
3386
if test "$cross_compiling" = yes; then :
3387
  [$4]
3388
else
3389
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3390
  lt_status=$lt_dlunknown
3391
  cat > conftest.$ac_ext <<_LT_EOF
3392
[#line __oline__ "configure"
3393
#include "confdefs.h"
3394
3395
#if HAVE_DLFCN_H
3396
#include <dlfcn.h>
3397
#endif
3398
3399
#include <stdio.h>
3400
3401
#ifdef RTLD_GLOBAL
3402
#  define LT_DLGLOBAL		RTLD_GLOBAL
3403
#else
3404
#  ifdef DL_GLOBAL
3405
#    define LT_DLGLOBAL		DL_GLOBAL
3406
#  else
3407
#    define LT_DLGLOBAL		0
3408
#  endif
3409
#endif
3410
3411
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3412
   find out it does not work in some platform. */
3413
#ifndef LT_DLLAZY_OR_NOW
3414
#  ifdef RTLD_LAZY
3415
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
3416
#  else
3417
#    ifdef DL_LAZY
3418
#      define LT_DLLAZY_OR_NOW		DL_LAZY
3419
#    else
3420
#      ifdef RTLD_NOW
3421
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
3422
#      else
3423
#        ifdef DL_NOW
3424
#          define LT_DLLAZY_OR_NOW	DL_NOW
3425
#        else
3426
#          define LT_DLLAZY_OR_NOW	0
3427
#        endif
3428
#      endif
3429
#    endif
3430
#  endif
3431
#endif
3432
3433
void fnord() { int i=42;}
3434
int main ()
3435
{
3436
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3437
  int status = $lt_dlunknown;
3438
3439
  if (self)
3440
    {
3441
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3442
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3443
      /* dlclose (self); */
3444
    }
3445
  else
3446
    puts (dlerror ());
3447
3448
  return status;
3449
}]
3450
_LT_EOF
3451
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3452
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3453
    lt_status=$?
3454
    case x$lt_status in
3455
      x$lt_dlno_uscore) $1 ;;
3456
      x$lt_dlneed_uscore) $2 ;;
3457
      x$lt_dlunknown|x*) $3 ;;
3458
    esac
3459
  else :
3460
    # compilation failed
3461
    $3
3462
  fi
3463
fi
3464
rm -fr conftest*
3465
])# _LT_TRY_DLOPEN_SELF
3466
3467
3468
# LT_SYS_DLOPEN_SELF
3469
# ------------------
3470
AC_DEFUN([LT_SYS_DLOPEN_SELF],
3471
[m4_require([_LT_HEADER_DLFCN])dnl
3472
if test "x$enable_dlopen" != xyes; then
3473
  enable_dlopen=unknown
3474
  enable_dlopen_self=unknown
3475
  enable_dlopen_self_static=unknown
3476
else
3477
  lt_cv_dlopen=no
3478
  lt_cv_dlopen_libs=
3479
3480
  case $host_os in
3481
  beos*)
3482
    lt_cv_dlopen="load_add_on"
3483
    lt_cv_dlopen_libs=
3484
    lt_cv_dlopen_self=yes
3485
    ;;
3486
3487
  mingw* | pw32* | cegcc*)
3488
    lt_cv_dlopen="LoadLibrary"
3489
    lt_cv_dlopen_libs=
3490
    ;;
3491
3492
  cygwin*)
3493
    lt_cv_dlopen="dlopen"
3494
    lt_cv_dlopen_libs=
3495
    ;;
3496
3497
  darwin*)
3498
  # if libdl is installed we need to link against it
3499
    AC_CHECK_LIB([dl], [dlopen],
3500
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3501
    lt_cv_dlopen="dyld"
3502
    lt_cv_dlopen_libs=
3503
    lt_cv_dlopen_self=yes
3504
    ])
3505
    ;;
3506
3507
  *)
3508
    AC_CHECK_FUNC([shl_load],
3509
	  [lt_cv_dlopen="shl_load"],
3510
      [AC_CHECK_LIB([dld], [shl_load],
3511
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3512
	[AC_CHECK_FUNC([dlopen],
3513
	      [lt_cv_dlopen="dlopen"],
3514
	  [AC_CHECK_LIB([dl], [dlopen],
3515
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3516
	    [AC_CHECK_LIB([svld], [dlopen],
3517
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3518
	      [AC_CHECK_LIB([dld], [dld_link],
3519
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3520
	      ])
3521
	    ])
3522
	  ])
3523
	])
3524
      ])
3525
    ;;
3526
  esac
3527
3528
  if test "x$lt_cv_dlopen" != xno; then
3529
    enable_dlopen=yes
3530
  else
3531
    enable_dlopen=no
3532
  fi
3533
3534
  case $lt_cv_dlopen in
3535
  dlopen)
3536
    save_CPPFLAGS="$CPPFLAGS"
3537
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3538
3539
    save_LDFLAGS="$LDFLAGS"
3540
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3541
3542
    save_LIBS="$LIBS"
3543
    LIBS="$lt_cv_dlopen_libs $LIBS"
3544
3545
    AC_CACHE_CHECK([whether a program can dlopen itself],
3546
	  lt_cv_dlopen_self, [dnl
3547
	  _LT_TRY_DLOPEN_SELF(
3548
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3549
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3550
    ])
3551
3552
    if test "x$lt_cv_dlopen_self" = xyes; then
3553
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3554
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3555
	  lt_cv_dlopen_self_static, [dnl
3556
	  _LT_TRY_DLOPEN_SELF(
3557
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3558
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3559
      ])
3560
    fi
3561
3562
    CPPFLAGS="$save_CPPFLAGS"
3563
    LDFLAGS="$save_LDFLAGS"
3564
    LIBS="$save_LIBS"
3565
    ;;
3566
  esac
3567
3568
  case $lt_cv_dlopen_self in
3569
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3570
  *) enable_dlopen_self=unknown ;;
3571
  esac
3572
3573
  case $lt_cv_dlopen_self_static in
3574
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3575
  *) enable_dlopen_self_static=unknown ;;
3576
  esac
3577
fi
3578
_LT_DECL([dlopen_support], [enable_dlopen], [0],
3579
	 [Whether dlopen is supported])
3580
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3581
	 [Whether dlopen of programs is supported])
3582
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3583
	 [Whether dlopen of statically linked programs is supported])
3584
])# LT_SYS_DLOPEN_SELF
3585
3586
# Old name:
3587
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3588
dnl aclocal-1.4 backwards compatibility:
3589
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3590
3591
3592
# _LT_COMPILER_C_O([TAGNAME])
3593
# ---------------------------
3594
# Check to see if options -c and -o are simultaneously supported by compiler.
3595
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3596
m4_defun([_LT_COMPILER_C_O],
3597
[m4_require([_LT_DECL_SED])dnl
3598
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3599
m4_require([_LT_TAG_COMPILER])dnl
3600
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3601
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3602
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3603
   $RM -r conftest 2>/dev/null
3604
   mkdir conftest
3605
   cd conftest
3606
   mkdir out
3607
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3608
3609
   lt_compiler_flag="-o out/conftest2.$ac_objext"
3610
   # Insert the option either (1) after the last *FLAGS variable, or
3611
   # (2) before a word containing "conftest.", or (3) at the end.
3612
   # Note that $ac_compile itself does not contain backslashes and begins
3613
   # with a dollar sign (not a hyphen), so the echo should work correctly.
3614
   lt_compile=`echo "$ac_compile" | $SED \
3615
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3616
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3617
   -e 's:$: $lt_compiler_flag:'`
3618
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3619
   (eval "$lt_compile" 2>out/conftest.err)
3620
   ac_status=$?
3621
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
3622
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3623
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
3624
   then
3625
     # The compiler can only warn and ignore the option if not recognized
3626
     # So say no if there are warnings
3627
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
3628
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3629
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3630
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3631
     fi
3632
   fi
3633
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
3634
   $RM conftest*
3635
   # SGI C++ compiler will create directory out/ii_files/ for
3636
   # template instantiation
3637
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3638
   $RM out/* && rmdir out
3639
   cd ..
3640
   $RM -r conftest
3641
   $RM conftest*
3642
])
3643
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3644
	[Does compiler simultaneously support -c and -o options?])
3645
])# _LT_COMPILER_C_O
3646
3647
3648
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3649
# ----------------------------------
3650
# Check to see if we can do hard links to lock some files if needed
3651
m4_defun([_LT_COMPILER_FILE_LOCKS],
3652
[m4_require([_LT_ENABLE_LOCK])dnl
3653
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3654
_LT_COMPILER_C_O([$1])
3655
3656
hard_links="nottested"
3657
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3658
  # do not overwrite the value of need_locks provided by the user
3659
  AC_MSG_CHECKING([if we can lock with hard links])
3660
  hard_links=yes
3661
  $RM conftest*
3662
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3663
  touch conftest.a
3664
  ln conftest.a conftest.b 2>&5 || hard_links=no
3665
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3666
  AC_MSG_RESULT([$hard_links])
3667
  if test "$hard_links" = no; then
3668
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3669
    need_locks=warn
3670
  fi
3671
else
3672
  need_locks=no
3673
fi
3674
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3675
])# _LT_COMPILER_FILE_LOCKS
3676
3677
3678
# _LT_CHECK_OBJDIR
3679
# ----------------
3680
m4_defun([_LT_CHECK_OBJDIR],
3681
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3682
[rm -f .libs 2>/dev/null
3683
mkdir .libs 2>/dev/null
3684
if test -d .libs; then
3685
  lt_cv_objdir=.libs
3686
else
3687
  # MS-DOS does not allow filenames that begin with a dot.
3688
  lt_cv_objdir=_libs
3689
fi
3690
rmdir .libs 2>/dev/null])
3691
objdir=$lt_cv_objdir
3692
_LT_DECL([], [objdir], [0],
3693
         [The name of the directory that contains temporary libtool files])dnl
3694
m4_pattern_allow([LT_OBJDIR])dnl
3695
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3696
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
3697
])# _LT_CHECK_OBJDIR
3698
3699
3700
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3701
# --------------------------------------
3702
# Check hardcoding attributes.
3703
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3704
[AC_MSG_CHECKING([how to hardcode library paths into programs])
3705
_LT_TAGVAR(hardcode_action, $1)=
3706
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3707
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3708
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3709
3710
  # We can hardcode non-existent directories.
3711
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3712
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3713
     # have to relink, otherwise we might link with an installed library
3714
     # when we should be linking with a yet-to-be-installed one
3715
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3716
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3717
    # Linking always hardcodes the temporary library directory.
3718
    _LT_TAGVAR(hardcode_action, $1)=relink
3719
  else
3720
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3721
    _LT_TAGVAR(hardcode_action, $1)=immediate
3722
  fi
3723
else
3724
  # We cannot hardcode anything, or else we can only hardcode existing
3725
  # directories.
3726
  _LT_TAGVAR(hardcode_action, $1)=unsupported
3727
fi
3728
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3729
3730
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3731
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3732
  # Fast installation is not supported
3733
  enable_fast_install=no
3734
elif test "$shlibpath_overrides_runpath" = yes ||
3735
     test "$enable_shared" = no; then
3736
  # Fast installation is not necessary
3737
  enable_fast_install=needless
3738
fi
3739
_LT_TAGDECL([], [hardcode_action], [0],
3740
    [How to hardcode a shared library path into an executable])
3741
])# _LT_LINKER_HARDCODE_LIBPATH
3742
3743
3744
# _LT_CMD_STRIPLIB
3745
# ----------------
3746
m4_defun([_LT_CMD_STRIPLIB],
3747
[m4_require([_LT_DECL_EGREP])
3748
striplib=
3749
old_striplib=
3750
AC_MSG_CHECKING([whether stripping libraries is possible])
3751
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3752
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3753
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3754
  AC_MSG_RESULT([yes])
3755
else
3756
# FIXME - insert some real tests, host_os isn't really good enough
3757
  case $host_os in
3758
  darwin*)
3759
    if test -n "$STRIP" ; then
3760
      striplib="$STRIP -x"
3761
      old_striplib="$STRIP -S"
3762
      AC_MSG_RESULT([yes])
3763
    else
3764
      AC_MSG_RESULT([no])
3765
    fi
3766
    ;;
3767
  *)
3768
    AC_MSG_RESULT([no])
3769
    ;;
3770
  esac
3771
fi
3772
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3773
_LT_DECL([], [striplib], [1])
3774
])# _LT_CMD_STRIPLIB
3775
3776
3777
# _LT_SYS_DYNAMIC_LINKER([TAG])
3778
# -----------------------------
3779
# PORTME Fill in your ld.so characteristics
3780
m4_defun([_LT_SYS_DYNAMIC_LINKER],
3781
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3782
m4_require([_LT_DECL_EGREP])dnl
3783
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3784
m4_require([_LT_DECL_OBJDUMP])dnl
3785
m4_require([_LT_DECL_SED])dnl
3786
AC_MSG_CHECKING([dynamic linker characteristics])
3787
m4_if([$1],
3788
	[], [
3789
if test "$GCC" = yes; then
3790
  case $host_os in
3791
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3792
    *) lt_awk_arg="/^libraries:/" ;;
3793
  esac
3794
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3795
  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
3796
    # if the path contains ";" then we assume it to be the separator
3797
    # otherwise default to the standard path separator (i.e. ":") - it is
3798
    # assumed that no part of a normal pathname contains ";" but that should
3799
    # okay in the real world where ";" in dirpaths is itself problematic.
3800
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
3801
  else
3802
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3803
  fi
3804
  # Ok, now we have the path, separated by spaces, we can step through it
3805
  # and add multilib dir if necessary.
3806
  lt_tmp_lt_search_path_spec=
3807
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3808
  for lt_sys_path in $lt_search_path_spec; do
3809
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3810
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3811
    else
3812
      test -d "$lt_sys_path" && \
3813
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3814
    fi
3815
  done
3816
  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
3817
BEGIN {RS=" "; FS="/|\n";} {
3818
  lt_foo="";
3819
  lt_count=0;
3820
  for (lt_i = NF; lt_i > 0; lt_i--) {
3821
    if ($lt_i != "" && $lt_i != ".") {
3822
      if ($lt_i == "..") {
3823
        lt_count++;
3824
      } else {
3825
        if (lt_count == 0) {
3826
          lt_foo="/" $lt_i lt_foo;
3827
        } else {
3828
          lt_count--;
3829
        }
3830
      }
3831
    }
3832
  }
3833
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3834
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3835
}'`
3836
  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
3837
else
3838
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3839
fi])
3840
library_names_spec=
3841
libname_spec='lib$name'
3842
soname_spec=
3843
shrext_cmds=".so"
3844
postinstall_cmds=
3845
postuninstall_cmds=
3846
finish_cmds=
3847
finish_eval=
3848
shlibpath_var=
3849
shlibpath_overrides_runpath=unknown
3850
version_type=none
3851
dynamic_linker="$host_os ld.so"
3852
sys_lib_dlsearch_path_spec="/lib /usr/lib"
3853
need_lib_prefix=unknown
3854
hardcode_into_libs=no
3855
3856
# when you set need_version to no, make sure it does not cause -set_version
3857
# flags to be left without arguments
3858
need_version=unknown
3859
3860
case $host_os in
3861
aix3*)
3862
  version_type=linux
3863
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3864
  shlibpath_var=LIBPATH
3865
3866
  # AIX 3 has no versioning support, so we append a major version to the name.
3867
  soname_spec='${libname}${release}${shared_ext}$major'
3868
  ;;
3869
3870
aix[[4-9]]*)
3871
  version_type=linux
3872
  need_lib_prefix=no
3873
  need_version=no
3874
  hardcode_into_libs=yes
3875
  if test "$host_cpu" = ia64; then
3876
    # AIX 5 supports IA64
3877
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3878
    shlibpath_var=LD_LIBRARY_PATH
3879
  else
3880
    # With GCC up to 2.95.x, collect2 would create an import file
3881
    # for dependence libraries.  The import file would start with
3882
    # the line `#! .'.  This would cause the generated library to
3883
    # depend on `.', always an invalid library.  This was fixed in
3884
    # development snapshots of GCC prior to 3.0.
3885
    case $host_os in
3886
      aix4 | aix4.[[01]] | aix4.[[01]].*)
3887
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3888
	   echo ' yes '
3889
	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3890
	:
3891
      else
3892
	can_build_shared=no
3893
      fi
3894
      ;;
3895
    esac
3896
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3897
    # soname into executable. Probably we can add versioning support to
3898
    # collect2, so additional links can be useful in future.
3899
    if test "$aix_use_runtimelinking" = yes; then
3900
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3901
      # instead of lib<name>.a to let people know that these are not
3902
      # typical AIX shared libraries.
3903
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3904
    else
3905
      # We preserve .a as extension for shared libraries through AIX4.2
3906
      # and later when we are not doing run time linking.
3907
      library_names_spec='${libname}${release}.a $libname.a'
3908
      soname_spec='${libname}${release}${shared_ext}$major'
3909
    fi
3910
    shlibpath_var=LIBPATH
3911
  fi
3912
  ;;
3913
3914
amigaos*)
3915
  case $host_cpu in
3916
  powerpc)
3917
    # Since July 2007 AmigaOS4 officially supports .so libraries.
3918
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3919
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3920
    ;;
3921
  m68k)
3922
    library_names_spec='$libname.ixlibrary $libname.a'
3923
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3924
    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'
3925
    ;;
3926
  esac
3927
  ;;
3928
3929
beos*)
3930
  library_names_spec='${libname}${shared_ext}'
3931
  dynamic_linker="$host_os ld.so"
3932
  shlibpath_var=LIBRARY_PATH
3933
  ;;
3934
3935
bsdi[[45]]*)
3936
  version_type=linux
3937
  need_version=no
3938
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3939
  soname_spec='${libname}${release}${shared_ext}$major'
3940
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3941
  shlibpath_var=LD_LIBRARY_PATH
3942
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3943
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3944
  # the default ld.so.conf also contains /usr/contrib/lib and
3945
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3946
  # libtool to hard-code these into programs
3947
  ;;
3948
3949
cygwin* | mingw* | pw32* | cegcc*)
3950
  version_type=windows
3951
  shrext_cmds=".dll"
3952
  need_version=no
3953
  need_lib_prefix=no
3954
3955
  case $GCC,$host_os in
3956
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3957
    library_names_spec='$libname.dll.a'
3958
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3959
    postinstall_cmds='base_file=`basename \${file}`~
3960
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3961
      dldir=$destdir/`dirname \$dlpath`~
3962
      test -d \$dldir || mkdir -p \$dldir~
3963
      $install_prog $dir/$dlname \$dldir/$dlname~
3964
      chmod a+x \$dldir/$dlname~
3965
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3966
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3967
      fi'
3968
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3969
      dlpath=$dir/\$dldll~
3970
       $RM \$dlpath'
3971
    shlibpath_overrides_runpath=yes
3972
3973
    case $host_os in
3974
    cygwin*)
3975
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3976
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3977
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3978
      ;;
3979
    mingw* | cegcc*)
3980
      # MinGW DLLs use traditional 'lib' prefix
3981
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3982
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3983
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3984
        # It is most probably a Windows format PATH printed by
3985
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
3986
        # path with ; separators, and with drive letters. We can handle the
3987
        # drive letters (cygwin fileutils understands them), so leave them,
3988
        # especially as we might pass files found there to a mingw objdump,
3989
        # which wouldn't understand a cygwinified path. Ahh.
3990
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3991
      else
3992
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3993
      fi
3994
      ;;
3995
    pw32*)
3996
      # pw32 DLLs use 'pw' prefix rather than 'lib'
3997
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3998
      ;;
3999
    esac
4000
    ;;
4001
4002
  *)
4003
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4004
    ;;
4005
  esac
4006
  dynamic_linker='Win32 ld.exe'
4007
  # FIXME: first we should search . and the directory the executable is in
4008
  shlibpath_var=PATH
4009
  ;;
4010
4011
darwin* | rhapsody*)
4012
  dynamic_linker="$host_os dyld"
4013
  version_type=darwin
4014
  need_lib_prefix=no
4015
  need_version=no
4016
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4017
  soname_spec='${libname}${release}${major}$shared_ext'
4018
  shlibpath_overrides_runpath=yes
4019
  shlibpath_var=DYLD_LIBRARY_PATH
4020
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4021
m4_if([$1], [],[
4022
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4023
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4024
  ;;
4025
4026
dgux*)
4027
  version_type=linux
4028
  need_lib_prefix=no
4029
  need_version=no
4030
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4031
  soname_spec='${libname}${release}${shared_ext}$major'
4032
  shlibpath_var=LD_LIBRARY_PATH
4033
  ;;
4034
4035
freebsd1*)
4036
  dynamic_linker=no
4037
  ;;
4038
4039
freebsd* | dragonfly*)
4040
  # DragonFly does not have aout.  When/if they implement a new
4041
  # versioning mechanism, adjust this.
4042
  if test -x /usr/bin/objformat; then
4043
    objformat=`/usr/bin/objformat`
4044
  else
4045
    case $host_os in
4046
    freebsd[[123]]*) objformat=aout ;;
4047
    *) objformat=elf ;;
4048
    esac
4049
  fi
4050
  version_type=freebsd-$objformat
4051
  case $version_type in
4052
    freebsd-elf*)
4053
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4054
      need_version=no
4055
      need_lib_prefix=no
4056
      ;;
4057
    freebsd-*)
4058
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4059
      need_version=yes
4060
      ;;
4061
  esac
4062
  shlibpath_var=LD_LIBRARY_PATH
4063
  case $host_os in
4064
  freebsd2*)
4065
    shlibpath_overrides_runpath=yes
4066
    ;;
4067
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4068
    shlibpath_overrides_runpath=yes
4069
    hardcode_into_libs=yes
4070
    ;;
4071
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4072
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4073
    shlibpath_overrides_runpath=no
4074
    hardcode_into_libs=yes
4075
    ;;
4076
  *) # from 4.6 on, and DragonFly
4077
    shlibpath_overrides_runpath=yes
4078
    hardcode_into_libs=yes
4079
    ;;
4080
  esac
4081
  ;;
4082
4083
gnu*)
4084
  version_type=linux
4085
  need_lib_prefix=no
4086
  need_version=no
4087
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4088
  soname_spec='${libname}${release}${shared_ext}$major'
4089
  shlibpath_var=LD_LIBRARY_PATH
4090
  hardcode_into_libs=yes
4091
  ;;
4092
4093
hpux9* | hpux10* | hpux11*)
4094
  # Give a soname corresponding to the major version so that dld.sl refuses to
4095
  # link against other versions.
4096
  version_type=sunos
4097
  need_lib_prefix=no
4098
  need_version=no
4099
  case $host_cpu in
4100
  ia64*)
4101
    shrext_cmds='.so'
4102
    hardcode_into_libs=yes
4103
    dynamic_linker="$host_os dld.so"
4104
    shlibpath_var=LD_LIBRARY_PATH
4105
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4106
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4107
    soname_spec='${libname}${release}${shared_ext}$major'
4108
    if test "X$HPUX_IA64_MODE" = X32; then
4109
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4110
    else
4111
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4112
    fi
4113
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4114
    ;;
4115
  hppa*64*)
4116
    shrext_cmds='.sl'
4117
    hardcode_into_libs=yes
4118
    dynamic_linker="$host_os dld.sl"
4119
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4120
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4121
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4122
    soname_spec='${libname}${release}${shared_ext}$major'
4123
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4124
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4125
    ;;
4126
  *)
4127
    shrext_cmds='.sl'
4128
    dynamic_linker="$host_os dld.sl"
4129
    shlibpath_var=SHLIB_PATH
4130
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4131
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4132
    soname_spec='${libname}${release}${shared_ext}$major'
4133
    ;;
4134
  esac
4135
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
4136
  postinstall_cmds='chmod 555 $lib'
4137
  ;;
4138
4139
interix[[3-9]]*)
4140
  version_type=linux
4141
  need_lib_prefix=no
4142
  need_version=no
4143
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4144
  soname_spec='${libname}${release}${shared_ext}$major'
4145
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4146
  shlibpath_var=LD_LIBRARY_PATH
4147
  shlibpath_overrides_runpath=no
4148
  hardcode_into_libs=yes
4149
  ;;
4150
4151
irix5* | irix6* | nonstopux*)
4152
  case $host_os in
4153
    nonstopux*) version_type=nonstopux ;;
4154
    *)
4155
	if test "$lt_cv_prog_gnu_ld" = yes; then
4156
		version_type=linux
4157
	else
4158
		version_type=irix
4159
	fi ;;
4160
  esac
4161
  need_lib_prefix=no
4162
  need_version=no
4163
  soname_spec='${libname}${release}${shared_ext}$major'
4164
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4165
  case $host_os in
4166
  irix5* | nonstopux*)
4167
    libsuff= shlibsuff=
4168
    ;;
4169
  *)
4170
    case $LD in # libtool.m4 will add one of these switches to LD
4171
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4172
      libsuff= shlibsuff= libmagic=32-bit;;
4173
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4174
      libsuff=32 shlibsuff=N32 libmagic=N32;;
4175
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4176
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4177
    *) libsuff= shlibsuff= libmagic=never-match;;
4178
    esac
4179
    ;;
4180
  esac
4181
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4182
  shlibpath_overrides_runpath=no
4183
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4184
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4185
  hardcode_into_libs=yes
4186
  ;;
4187
4188
# No shared lib support for Linux oldld, aout, or coff.
4189
linux*oldld* | linux*aout* | linux*coff*)
4190
  dynamic_linker=no
4191
  ;;
4192
4193
# This must be Linux ELF.
4194
linux* | k*bsd*-gnu)
4195
  version_type=linux
4196
  need_lib_prefix=no
4197
  need_version=no
4198
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4199
  soname_spec='${libname}${release}${shared_ext}$major'
4200
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4201
  shlibpath_var=LD_LIBRARY_PATH
4202
  shlibpath_overrides_runpath=no
4203
  # Some binutils ld are patched to set DT_RUNPATH
4204
  save_LDFLAGS=$LDFLAGS
4205
  save_libdir=$libdir
4206
  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4207
       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4208
  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4209
    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4210
       [shlibpath_overrides_runpath=yes])])
4211
  LDFLAGS=$save_LDFLAGS
4212
  libdir=$save_libdir
4213
4214
  # This implies no fast_install, which is unacceptable.
4215
  # Some rework will be needed to allow for fast_install
4216
  # before this can be enabled.
4217
  hardcode_into_libs=yes
4218
4219
  # Append ld.so.conf contents to the search path
4220
  if test -f /etc/ld.so.conf; then
4221
    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' ' '`
4222
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4223
  fi
4224
4225
  # We used to test for /lib/ld.so.1 and disable shared libraries on
4226
  # powerpc, because MkLinux only supported shared libraries with the
4227
  # GNU dynamic linker.  Since this was broken with cross compilers,
4228
  # most powerpc-linux boxes support dynamic linking these days and
4229
  # people can always --disable-shared, the test was removed, and we
4230
  # assume the GNU/Linux dynamic linker is in use.
4231
  dynamic_linker='GNU/Linux ld.so'
4232
  ;;
4233
4234
netbsdelf*-gnu)
4235
  version_type=linux
4236
  need_lib_prefix=no
4237
  need_version=no
4238
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4239
  soname_spec='${libname}${release}${shared_ext}$major'
4240
  shlibpath_var=LD_LIBRARY_PATH
4241
  shlibpath_overrides_runpath=no
4242
  hardcode_into_libs=yes
4243
  dynamic_linker='NetBSD ld.elf_so'
4244
  ;;
4245
4246
netbsd*)
4247
  version_type=sunos
4248
  need_lib_prefix=no
4249
  need_version=no
4250
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4251
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4252
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4253
    dynamic_linker='NetBSD (a.out) ld.so'
4254
  else
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
    dynamic_linker='NetBSD ld.elf_so'
4258
  fi
4259
  shlibpath_var=LD_LIBRARY_PATH
4260
  shlibpath_overrides_runpath=yes
4261
  hardcode_into_libs=yes
4262
  ;;
4263
4264
newsos6)
4265
  version_type=linux
4266
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4267
  shlibpath_var=LD_LIBRARY_PATH
4268
  shlibpath_overrides_runpath=yes
4269
  ;;
4270
4271
*nto* | *qnx*)
4272
  version_type=qnx
4273
  need_lib_prefix=no
4274
  need_version=no
4275
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4276
  soname_spec='${libname}${release}${shared_ext}$major'
4277
  shlibpath_var=LD_LIBRARY_PATH
4278
  shlibpath_overrides_runpath=no
4279
  hardcode_into_libs=yes
4280
  dynamic_linker='ldqnx.so'
4281
  ;;
4282
4283
openbsd*)
4284
  version_type=sunos
4285
  sys_lib_dlsearch_path_spec="/usr/lib"
4286
  need_lib_prefix=no
4287
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4288
  case $host_os in
4289
    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
4290
    *)				need_version=no  ;;
4291
  esac
4292
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4293
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4294
  shlibpath_var=LD_LIBRARY_PATH
4295
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4296
    case $host_os in
4297
      openbsd2.[[89]] | openbsd2.[[89]].*)
4298
	shlibpath_overrides_runpath=no
4299
	;;
4300
      *)
4301
	shlibpath_overrides_runpath=yes
4302
	;;
4303
      esac
4304
  else
4305
    shlibpath_overrides_runpath=yes
4306
  fi
4307
  ;;
4308
4309
os2*)
4310
  libname_spec='$name'
4311
  shrext_cmds=".dll"
4312
  need_lib_prefix=no
4313
  library_names_spec='$libname${shared_ext} $libname.a'
4314
  dynamic_linker='OS/2 ld.exe'
4315
  shlibpath_var=LIBPATH
4316
  ;;
4317
4318
osf3* | osf4* | osf5*)
4319
  version_type=osf
4320
  need_lib_prefix=no
4321
  need_version=no
4322
  soname_spec='${libname}${release}${shared_ext}$major'
4323
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4324
  shlibpath_var=LD_LIBRARY_PATH
4325
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4326
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4327
  ;;
4328
4329
rdos*)
4330
  dynamic_linker=no
4331
  ;;
4332
4333
solaris*)
4334
  version_type=linux
4335
  need_lib_prefix=no
4336
  need_version=no
4337
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4338
  soname_spec='${libname}${release}${shared_ext}$major'
4339
  shlibpath_var=LD_LIBRARY_PATH
4340
  shlibpath_overrides_runpath=yes
4341
  hardcode_into_libs=yes
4342
  # ldd complains unless libraries are executable
4343
  postinstall_cmds='chmod +x $lib'
4344
  ;;
4345
4346
sunos4*)
4347
  version_type=sunos
4348
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4349
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4350
  shlibpath_var=LD_LIBRARY_PATH
4351
  shlibpath_overrides_runpath=yes
4352
  if test "$with_gnu_ld" = yes; then
4353
    need_lib_prefix=no
4354
  fi
4355
  need_version=yes
4356
  ;;
4357
4358
sysv4 | sysv4.3*)
4359
  version_type=linux
4360
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4361
  soname_spec='${libname}${release}${shared_ext}$major'
4362
  shlibpath_var=LD_LIBRARY_PATH
4363
  case $host_vendor in
4364
    sni)
4365
      shlibpath_overrides_runpath=no
4366
      need_lib_prefix=no
4367
      runpath_var=LD_RUN_PATH
4368
      ;;
4369
    siemens)
4370
      need_lib_prefix=no
4371
      ;;
4372
    motorola)
4373
      need_lib_prefix=no
4374
      need_version=no
4375
      shlibpath_overrides_runpath=no
4376
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4377
      ;;
4378
  esac
4379
  ;;
4380
4381
sysv4*MP*)
4382
  if test -d /usr/nec ;then
4383
    version_type=linux
4384
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4385
    soname_spec='$libname${shared_ext}.$major'
4386
    shlibpath_var=LD_LIBRARY_PATH
4387
  fi
4388
  ;;
4389
4390
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4391
  version_type=freebsd-elf
4392
  need_lib_prefix=no
4393
  need_version=no
4394
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4395
  soname_spec='${libname}${release}${shared_ext}$major'
4396
  shlibpath_var=LD_LIBRARY_PATH
4397
  shlibpath_overrides_runpath=yes
4398
  hardcode_into_libs=yes
4399
  if test "$with_gnu_ld" = yes; then
4400
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4401
  else
4402
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4403
    case $host_os in
4404
      sco3.2v5*)
4405
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4406
	;;
4407
    esac
4408
  fi
4409
  sys_lib_dlsearch_path_spec='/usr/lib'
4410
  ;;
4411
4412
tpf*)
4413
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4414
  version_type=linux
4415
  need_lib_prefix=no
4416
  need_version=no
4417
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4418
  shlibpath_var=LD_LIBRARY_PATH
4419
  shlibpath_overrides_runpath=no
4420
  hardcode_into_libs=yes
4421
  ;;
4422
4423
uts4*)
4424
  version_type=linux
4425
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4426
  soname_spec='${libname}${release}${shared_ext}$major'
4427
  shlibpath_var=LD_LIBRARY_PATH
4428
  ;;
4429
4430
*)
4431
  dynamic_linker=no
4432
  ;;
4433
esac
4434
AC_MSG_RESULT([$dynamic_linker])
4435
test "$dynamic_linker" = no && can_build_shared=no
4436
4437
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4438
if test "$GCC" = yes; then
4439
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4440
fi
4441
4442
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4443
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4444
fi
4445
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4446
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4447
fi
4448
4449
_LT_DECL([], [variables_saved_for_relink], [1],
4450
    [Variables whose values should be saved in libtool wrapper scripts and
4451
    restored at link time])
4452
_LT_DECL([], [need_lib_prefix], [0],
4453
    [Do we need the "lib" prefix for modules?])
4454
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4455
_LT_DECL([], [version_type], [0], [Library versioning type])
4456
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4457
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4458
_LT_DECL([], [shlibpath_overrides_runpath], [0],
4459
    [Is shlibpath searched before the hard-coded library search path?])
4460
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4461
_LT_DECL([], [library_names_spec], [1],
4462
    [[List of archive names.  First name is the real one, the rest are links.
4463
    The last name is the one that the linker finds with -lNAME]])
4464
_LT_DECL([], [soname_spec], [1],
4465
    [[The coded name of the library, if different from the real name]])
4466
_LT_DECL([], [postinstall_cmds], [2],
4467
    [Command to use after installation of a shared archive])
4468
_LT_DECL([], [postuninstall_cmds], [2],
4469
    [Command to use after uninstallation of a shared archive])
4470
_LT_DECL([], [finish_cmds], [2],
4471
    [Commands used to finish a libtool library installation in a directory])
4472
_LT_DECL([], [finish_eval], [1],
4473
    [[As "finish_cmds", except a single script fragment to be evaled but
4474
    not shown]])
4475
_LT_DECL([], [hardcode_into_libs], [0],
4476
    [Whether we should hardcode library paths into libraries])
4477
_LT_DECL([], [sys_lib_search_path_spec], [2],
4478
    [Compile-time system search path for libraries])
4479
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4480
    [Run-time system search path for libraries])
4481
])# _LT_SYS_DYNAMIC_LINKER
4482
4483
4484
# _LT_PATH_TOOL_PREFIX(TOOL)
4485
# --------------------------
4486
# find a file program which can recognize shared library
4487
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4488
[m4_require([_LT_DECL_EGREP])dnl
4489
AC_MSG_CHECKING([for $1])
4490
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4491
[case $MAGIC_CMD in
4492
[[\\/*] |  ?:[\\/]*])
4493
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4494
  ;;
4495
*)
4496
  lt_save_MAGIC_CMD="$MAGIC_CMD"
4497
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4498
dnl $ac_dummy forces splitting on constant user-supplied paths.
4499
dnl POSIX.2 word splitting is done only on the output of word expansions,
4500
dnl not every word.  This closes a longstanding sh security hole.
4501
  ac_dummy="m4_if([$2], , $PATH, [$2])"
4502
  for ac_dir in $ac_dummy; do
4503
    IFS="$lt_save_ifs"
4504
    test -z "$ac_dir" && ac_dir=.
4505
    if test -f $ac_dir/$1; then
4506
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4507
      if test -n "$file_magic_test_file"; then
4508
	case $deplibs_check_method in
4509
	"file_magic "*)
4510
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4511
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4512
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4513
	    $EGREP "$file_magic_regex" > /dev/null; then
4514
	    :
4515
	  else
4516
	    cat <<_LT_EOF 1>&2
4517
4518
*** Warning: the command libtool uses to detect shared libraries,
4519
*** $file_magic_cmd, produces output that libtool cannot recognize.
4520
*** The result is that libtool may fail to recognize shared libraries
4521
*** as such.  This will affect the creation of libtool libraries that
4522
*** depend on shared libraries, but programs linked with such libtool
4523
*** libraries will work regardless of this problem.  Nevertheless, you
4524
*** may want to report the problem to your system manager and/or to
4525
*** bug-libtool@gnu.org
4526
4527
_LT_EOF
4528
	  fi ;;
4529
	esac
4530
      fi
4531
      break
4532
    fi
4533
  done
4534
  IFS="$lt_save_ifs"
4535
  MAGIC_CMD="$lt_save_MAGIC_CMD"
4536
  ;;
4537
esac])
4538
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4539
if test -n "$MAGIC_CMD"; then
4540
  AC_MSG_RESULT($MAGIC_CMD)
4541
else
4542
  AC_MSG_RESULT(no)
4543
fi
4544
_LT_DECL([], [MAGIC_CMD], [0],
4545
	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4546
])# _LT_PATH_TOOL_PREFIX
4547
4548
# Old name:
4549
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4550
dnl aclocal-1.4 backwards compatibility:
4551
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4552
4553
4554
# _LT_PATH_MAGIC
4555
# --------------
4556
# find a file program which can recognize a shared library
4557
m4_defun([_LT_PATH_MAGIC],
4558
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4559
if test -z "$lt_cv_path_MAGIC_CMD"; then
4560
  if test -n "$ac_tool_prefix"; then
4561
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4562
  else
4563
    MAGIC_CMD=:
4564
  fi
4565
fi
4566
])# _LT_PATH_MAGIC
4567
4568
4569
# LT_PATH_LD
4570
# ----------
4571
# find the pathname to the GNU or non-GNU linker
4572
AC_DEFUN([LT_PATH_LD],
4573
[AC_REQUIRE([AC_PROG_CC])dnl
4574
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4575
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4576
m4_require([_LT_DECL_SED])dnl
4577
m4_require([_LT_DECL_EGREP])dnl
4578
4579
AC_ARG_WITH([gnu-ld],
4580
    [AS_HELP_STRING([--with-gnu-ld],
4581
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4582
    [test "$withval" = no || with_gnu_ld=yes],
4583
    [with_gnu_ld=no])dnl
4584
4585
ac_prog=ld
4586
if test "$GCC" = yes; then
4587
  # Check if gcc -print-prog-name=ld gives a path.
4588
  AC_MSG_CHECKING([for ld used by $CC])
4589
  case $host in
4590
  *-*-mingw*)
4591
    # gcc leaves a trailing carriage return which upsets mingw
4592
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4593
  *)
4594
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4595
  esac
4596
  case $ac_prog in
4597
    # Accept absolute paths.
4598
    [[\\/]]* | ?:[[\\/]]*)
4599
      re_direlt='/[[^/]][[^/]]*/\.\./'
4600
      # Canonicalize the pathname of ld
4601
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4602
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4603
	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4604
      done
4605
      test -z "$LD" && LD="$ac_prog"
4606
      ;;
4607
  "")
4608
    # If it fails, then pretend we aren't using GCC.
4609
    ac_prog=ld
4610
    ;;
4611
  *)
4612
    # If it is relative, then search for the first ld in PATH.
4613
    with_gnu_ld=unknown
4614
    ;;
4615
  esac
4616
elif test "$with_gnu_ld" = yes; then
4617
  AC_MSG_CHECKING([for GNU ld])
4618
else
4619
  AC_MSG_CHECKING([for non-GNU ld])
4620
fi
4621
AC_CACHE_VAL(lt_cv_path_LD,
4622
[if test -z "$LD"; then
4623
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4624
  for ac_dir in $PATH; do
4625
    IFS="$lt_save_ifs"
4626
    test -z "$ac_dir" && ac_dir=.
4627
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4628
      lt_cv_path_LD="$ac_dir/$ac_prog"
4629
      # Check to see if the program is GNU ld.  I'd rather use --version,
4630
      # but apparently some variants of GNU ld only accept -v.
4631
      # Break only if it was the GNU/non-GNU ld that we prefer.
4632
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4633
      *GNU* | *'with BFD'*)
4634
	test "$with_gnu_ld" != no && break
4635
	;;
4636
      *)
4637
	test "$with_gnu_ld" != yes && break
4638
	;;
4639
      esac
4640
    fi
4641
  done
4642
  IFS="$lt_save_ifs"
4643
else
4644
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4645
fi])
4646
LD="$lt_cv_path_LD"
4647
if test -n "$LD"; then
4648
  AC_MSG_RESULT($LD)
4649
else
4650
  AC_MSG_RESULT(no)
4651
fi
4652
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4653
_LT_PATH_LD_GNU
4654
AC_SUBST([LD])
4655
4656
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4657
])# LT_PATH_LD
4658
4659
# Old names:
4660
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4661
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4662
dnl aclocal-1.4 backwards compatibility:
4663
dnl AC_DEFUN([AM_PROG_LD], [])
4664
dnl AC_DEFUN([AC_PROG_LD], [])
4665
4666
4667
# _LT_PATH_LD_GNU
4668
#- --------------
4669
m4_defun([_LT_PATH_LD_GNU],
4670
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4671
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4672
case `$LD -v 2>&1 </dev/null` in
4673
*GNU* | *'with BFD'*)
4674
  lt_cv_prog_gnu_ld=yes
4675
  ;;
4676
*)
4677
  lt_cv_prog_gnu_ld=no
4678
  ;;
4679
esac])
4680
with_gnu_ld=$lt_cv_prog_gnu_ld
4681
])# _LT_PATH_LD_GNU
4682
4683
4684
# _LT_CMD_RELOAD
4685
# --------------
4686
# find reload flag for linker
4687
#   -- PORTME Some linkers may need a different reload flag.
4688
m4_defun([_LT_CMD_RELOAD],
4689
[AC_CACHE_CHECK([for $LD option to reload object files],
4690
  lt_cv_ld_reload_flag,
4691
  [lt_cv_ld_reload_flag='-r'])
4692
reload_flag=$lt_cv_ld_reload_flag
4693
case $reload_flag in
4694
"" | " "*) ;;
4695
*) reload_flag=" $reload_flag" ;;
4696
esac
4697
reload_cmds='$LD$reload_flag -o $output$reload_objs'
4698
case $host_os in
4699
  darwin*)
4700
    if test "$GCC" = yes; then
4701
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4702
    else
4703
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4704
    fi
4705
    ;;
4706
esac
4707
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4708
_LT_DECL([], [reload_cmds], [2])dnl
4709
])# _LT_CMD_RELOAD
4710
4711
4712
# _LT_CHECK_MAGIC_METHOD
4713
# ----------------------
4714
# how to check for library dependencies
4715
#  -- PORTME fill in with the dynamic library characteristics
4716
m4_defun([_LT_CHECK_MAGIC_METHOD],
4717
[m4_require([_LT_DECL_EGREP])
4718
m4_require([_LT_DECL_OBJDUMP])
4719
AC_CACHE_CHECK([how to recognize dependent libraries],
4720
lt_cv_deplibs_check_method,
4721
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4722
lt_cv_file_magic_test_file=
4723
lt_cv_deplibs_check_method='unknown'
4724
# Need to set the preceding variable on all platforms that support
4725
# interlibrary dependencies.
4726
# 'none' -- dependencies not supported.
4727
# `unknown' -- same as none, but documents that we really don't know.
4728
# 'pass_all' -- all dependencies passed with no checks.
4729
# 'test_compile' -- check by making test program.
4730
# 'file_magic [[regex]]' -- check by looking for files in library path
4731
# which responds to the $file_magic_cmd with a given extended regex.
4732
# If you have `file' or equivalent on your system and you're not sure
4733
# whether `pass_all' will *always* work, you probably want this one.
4734
4735
case $host_os in
4736
aix[[4-9]]*)
4737
  lt_cv_deplibs_check_method=pass_all
4738
  ;;
4739
4740
beos*)
4741
  lt_cv_deplibs_check_method=pass_all
4742
  ;;
4743
4744
bsdi[[45]]*)
4745
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4746
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4747
  lt_cv_file_magic_test_file=/shlib/libc.so
4748
  ;;
4749
4750
cygwin*)
4751
  # func_win32_libid is a shell function defined in ltmain.sh
4752
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4753
  lt_cv_file_magic_cmd='func_win32_libid'
4754
  ;;
4755
4756
mingw* | pw32*)
4757
  # Base MSYS/MinGW do not provide the 'file' command needed by
4758
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4759
  # unless we find 'file', for example because we are cross-compiling.
4760
  if ( file / ) >/dev/null 2>&1; then
4761
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4762
    lt_cv_file_magic_cmd='func_win32_libid'
4763
  else
4764
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4765
    lt_cv_file_magic_cmd='$OBJDUMP -f'
4766
  fi
4767
  ;;
4768
4769
cegcc)
4770
  # use the weaker test based on 'objdump'. See mingw*.
4771
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4772
  lt_cv_file_magic_cmd='$OBJDUMP -f'
4773
  ;;
4774
4775
darwin* | rhapsody*)
4776
  lt_cv_deplibs_check_method=pass_all
4777
  ;;
4778
4779
freebsd* | dragonfly*)
4780
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4781
    case $host_cpu in
4782
    i*86 )
4783
      # Not sure whether the presence of OpenBSD here was a mistake.
4784
      # Let's accept both of them until this is cleared up.
4785
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4786
      lt_cv_file_magic_cmd=/usr/bin/file
4787
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4788
      ;;
4789
    esac
4790
  else
4791
    lt_cv_deplibs_check_method=pass_all
4792
  fi
4793
  ;;
4794
4795
gnu*)
4796
  lt_cv_deplibs_check_method=pass_all
4797
  ;;
4798
4799
hpux10.20* | hpux11*)
4800
  lt_cv_file_magic_cmd=/usr/bin/file
4801
  case $host_cpu in
4802
  ia64*)
4803
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4804
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4805
    ;;
4806
  hppa*64*)
4807
    [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]']
4808
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4809
    ;;
4810
  *)
4811
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4812
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4813
    ;;
4814
  esac
4815
  ;;
4816
4817
interix[[3-9]]*)
4818
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4819
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4820
  ;;
4821
4822
irix5* | irix6* | nonstopux*)
4823
  case $LD in
4824
  *-32|*"-32 ") libmagic=32-bit;;
4825
  *-n32|*"-n32 ") libmagic=N32;;
4826
  *-64|*"-64 ") libmagic=64-bit;;
4827
  *) libmagic=never-match;;
4828
  esac
4829
  lt_cv_deplibs_check_method=pass_all
4830
  ;;
4831
4832
# This must be Linux ELF.
4833
linux* | k*bsd*-gnu)
4834
  lt_cv_deplibs_check_method=pass_all
4835
  ;;
4836
4837
netbsd* | netbsdelf*-gnu)
4838
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4839
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4840
  else
4841
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4842
  fi
4843
  ;;
4844
4845
newos6*)
4846
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4847
  lt_cv_file_magic_cmd=/usr/bin/file
4848
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4849
  ;;
4850
4851
*nto* | *qnx*)
4852
  lt_cv_deplibs_check_method=pass_all
4853
  ;;
4854
4855
openbsd*)
4856
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4857
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4858
  else
4859
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4860
  fi
4861
  ;;
4862
4863
osf3* | osf4* | osf5*)
4864
  lt_cv_deplibs_check_method=pass_all
4865
  ;;
4866
4867
rdos*)
4868
  lt_cv_deplibs_check_method=pass_all
4869
  ;;
4870
4871
solaris*)
4872
  lt_cv_deplibs_check_method=pass_all
4873
  ;;
4874
4875
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4876
  lt_cv_deplibs_check_method=pass_all
4877
  ;;
4878
4879
sysv4 | sysv4.3*)
4880
  case $host_vendor in
4881
  motorola)
4882
    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]]'
4883
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4884
    ;;
4885
  ncr)
4886
    lt_cv_deplibs_check_method=pass_all
4887
    ;;
4888
  sequent)
4889
    lt_cv_file_magic_cmd='/bin/file'
4890
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4891
    ;;
4892
  sni)
4893
    lt_cv_file_magic_cmd='/bin/file'
4894
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4895
    lt_cv_file_magic_test_file=/lib/libc.so
4896
    ;;
4897
  siemens)
4898
    lt_cv_deplibs_check_method=pass_all
4899
    ;;
4900
  pc)
4901
    lt_cv_deplibs_check_method=pass_all
4902
    ;;
4903
  esac
4904
  ;;
4905
4906
tpf*)
4907
  lt_cv_deplibs_check_method=pass_all
4908
  ;;
4909
esac
4910
])
4911
file_magic_cmd=$lt_cv_file_magic_cmd
4912
deplibs_check_method=$lt_cv_deplibs_check_method
4913
test -z "$deplibs_check_method" && deplibs_check_method=unknown
4914
4915
_LT_DECL([], [deplibs_check_method], [1],
4916
    [Method to check whether dependent libraries are shared objects])
4917
_LT_DECL([], [file_magic_cmd], [1],
4918
    [Command to use when deplibs_check_method == "file_magic"])
4919
])# _LT_CHECK_MAGIC_METHOD
4920
4921
4922
# LT_PATH_NM
4923
# ----------
4924
# find the pathname to a BSD- or MS-compatible name lister
4925
AC_DEFUN([LT_PATH_NM],
4926
[AC_REQUIRE([AC_PROG_CC])dnl
4927
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4928
[if test -n "$NM"; then
4929
  # Let the user override the test.
4930
  lt_cv_path_NM="$NM"
4931
else
4932
  lt_nm_to_check="${ac_tool_prefix}nm"
4933
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4934
    lt_nm_to_check="$lt_nm_to_check nm"
4935
  fi
4936
  for lt_tmp_nm in $lt_nm_to_check; do
4937
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4938
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4939
      IFS="$lt_save_ifs"
4940
      test -z "$ac_dir" && ac_dir=.
4941
      tmp_nm="$ac_dir/$lt_tmp_nm"
4942
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4943
	# Check to see if the nm accepts a BSD-compat flag.
4944
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4945
	#   nm: unknown option "B" ignored
4946
	# Tru64's nm complains that /dev/null is an invalid object file
4947
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4948
	*/dev/null* | *'Invalid file or object type'*)
4949
	  lt_cv_path_NM="$tmp_nm -B"
4950
	  break
4951
	  ;;
4952
	*)
4953
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4954
	  */dev/null*)
4955
	    lt_cv_path_NM="$tmp_nm -p"
4956
	    break
4957
	    ;;
4958
	  *)
4959
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4960
	    continue # so that we can try to find one that supports BSD flags
4961
	    ;;
4962
	  esac
4963
	  ;;
4964
	esac
4965
      fi
4966
    done
4967
    IFS="$lt_save_ifs"
4968
  done
4969
  : ${lt_cv_path_NM=no}
4970
fi])
4971
if test "$lt_cv_path_NM" != "no"; then
4972
  NM="$lt_cv_path_NM"
4973
else
4974
  # Didn't find any BSD compatible name lister, look for dumpbin.
4975
  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4976
  AC_SUBST([DUMPBIN])
4977
  if test "$DUMPBIN" != ":"; then
4978
    NM="$DUMPBIN"
4979
  fi
4980
fi
4981
test -z "$NM" && NM=nm
4982
AC_SUBST([NM])
4983
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4984
4985
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4986
  [lt_cv_nm_interface="BSD nm"
4987
  echo "int some_variable = 0;" > conftest.$ac_ext
4988
  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4989
  (eval "$ac_compile" 2>conftest.err)
4990
  cat conftest.err >&AS_MESSAGE_LOG_FD
4991
  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4992
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4993
  cat conftest.err >&AS_MESSAGE_LOG_FD
4994
  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4995
  cat conftest.out >&AS_MESSAGE_LOG_FD
4996
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4997
    lt_cv_nm_interface="MS dumpbin"
4998
  fi
4999
  rm -f conftest*])
5000
])# LT_PATH_NM
5001
5002
# Old names:
5003
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5004
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5005
dnl aclocal-1.4 backwards compatibility:
5006
dnl AC_DEFUN([AM_PROG_NM], [])
5007
dnl AC_DEFUN([AC_PROG_NM], [])
5008
5009
5010
# LT_LIB_M
5011
# --------
5012
# check for math library
5013
AC_DEFUN([LT_LIB_M],
5014
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5015
LIBM=
5016
case $host in
5017
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
5018
  # These system don't have libm, or don't need it
5019
  ;;
5020
*-ncr-sysv4.3*)
5021
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5022
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5023
  ;;
5024
*)
5025
  AC_CHECK_LIB(m, cos, LIBM="-lm")
5026
  ;;
5027
esac
5028
AC_SUBST([LIBM])
5029
])# LT_LIB_M
5030
5031
# Old name:
5032
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5033
dnl aclocal-1.4 backwards compatibility:
5034
dnl AC_DEFUN([AC_CHECK_LIBM], [])
5035
5036
5037
# _LT_COMPILER_NO_RTTI([TAGNAME])
5038
# -------------------------------
5039
m4_defun([_LT_COMPILER_NO_RTTI],
5040
[m4_require([_LT_TAG_COMPILER])dnl
5041
5042
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5043
5044
if test "$GCC" = yes; then
5045
  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5046
5047
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5048
    lt_cv_prog_compiler_rtti_exceptions,
5049
    [-fno-rtti -fno-exceptions], [],
5050
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5051
fi
5052
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5053
	[Compiler flag to turn off builtin functions])
5054
])# _LT_COMPILER_NO_RTTI
5055
5056
5057
# _LT_CMD_GLOBAL_SYMBOLS
5058
# ----------------------
5059
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5060
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5061
AC_REQUIRE([AC_PROG_CC])dnl
5062
AC_REQUIRE([LT_PATH_NM])dnl
5063
AC_REQUIRE([LT_PATH_LD])dnl
5064
m4_require([_LT_DECL_SED])dnl
5065
m4_require([_LT_DECL_EGREP])dnl
5066
m4_require([_LT_TAG_COMPILER])dnl
5067
5068
# Check for command to grab the raw symbol name followed by C symbol from nm.
5069
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5070
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5071
[
5072
# These are sane defaults that work on at least a few old systems.
5073
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5074
5075
# Character class describing NM global symbol codes.
5076
symcode='[[BCDEGRST]]'
5077
5078
# Regexp to match symbols that can be accessed directly from C.
5079
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5080
5081
# Define system-specific variables.
5082
case $host_os in
5083
aix*)
5084
  symcode='[[BCDT]]'
5085
  ;;
5086
cygwin* | mingw* | pw32* | cegcc*)
5087
  symcode='[[ABCDGISTW]]'
5088
  ;;
5089
hpux*)
5090
  if test "$host_cpu" = ia64; then
5091
    symcode='[[ABCDEGRST]]'
5092
  fi
5093
  ;;
5094
irix* | nonstopux*)
5095
  symcode='[[BCDEGRST]]'
5096
  ;;
5097
osf*)
5098
  symcode='[[BCDEGQRST]]'
5099
  ;;
5100
solaris*)
5101
  symcode='[[BDRT]]'
5102
  ;;
5103
sco3.2v5*)
5104
  symcode='[[DT]]'
5105
  ;;
5106
sysv4.2uw2*)
5107
  symcode='[[DT]]'
5108
  ;;
5109
sysv5* | sco5v6* | unixware* | OpenUNIX*)
5110
  symcode='[[ABDT]]'
5111
  ;;
5112
sysv4)
5113
  symcode='[[DFNSTU]]'
5114
  ;;
5115
esac
5116
5117
# If we're using GNU nm, then use its standard symbol codes.
5118
case `$NM -V 2>&1` in
5119
*GNU* | *'with BFD'*)
5120
  symcode='[[ABCDGIRSTW]]' ;;
5121
esac
5122
5123
# Transform an extracted symbol line into a proper C declaration.
5124
# Some systems (esp. on ia64) link data and code symbols differently,
5125
# so use this general approach.
5126
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5127
5128
# Transform an extracted symbol line into symbol name and symbol address
5129
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5130
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'"
5131
5132
# Handle CRLF in mingw tool chain
5133
opt_cr=
5134
case $build_os in
5135
mingw*)
5136
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5137
  ;;
5138
esac
5139
5140
# Try without a prefix underscore, then with it.
5141
for ac_symprfx in "" "_"; do
5142
5143
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5144
  symxfrm="\\1 $ac_symprfx\\2 \\2"
5145
5146
  # Write the raw and C identifiers.
5147
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5148
    # Fake it for dumpbin and say T for any non-static function
5149
    # and D for any global variable.
5150
    # Also find C++ and __fastcall symbols from MSVC++,
5151
    # which start with @ or ?.
5152
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
5153
"     {last_section=section; section=\$ 3};"\
5154
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5155
"     \$ 0!~/External *\|/{next};"\
5156
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5157
"     {if(hide[section]) next};"\
5158
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5159
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5160
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5161
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5162
"     ' prfx=^$ac_symprfx]"
5163
  else
5164
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5165
  fi
5166
5167
  # Check to see that the pipe works correctly.
5168
  pipe_works=no
5169
5170
  rm -f conftest*
5171
  cat > conftest.$ac_ext <<_LT_EOF
5172
#ifdef __cplusplus
5173
extern "C" {
5174
#endif
5175
char nm_test_var;
5176
void nm_test_func(void);
5177
void nm_test_func(void){}
5178
#ifdef __cplusplus
5179
}
5180
#endif
5181
int main(){nm_test_var='a';nm_test_func();return(0);}
5182
_LT_EOF
5183
5184
  if AC_TRY_EVAL(ac_compile); then
5185
    # Now try to grab the symbols.
5186
    nlist=conftest.nm
5187
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5188
      # Try sorting and uniquifying the output.
5189
      if sort "$nlist" | uniq > "$nlist"T; then
5190
	mv -f "$nlist"T "$nlist"
5191
      else
5192
	rm -f "$nlist"T
5193
      fi
5194
5195
      # Make sure that we snagged all the symbols we need.
5196
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5197
	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5198
	  cat <<_LT_EOF > conftest.$ac_ext
5199
#ifdef __cplusplus
5200
extern "C" {
5201
#endif
5202
5203
_LT_EOF
5204
	  # Now generate the symbol file.
5205
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5206
5207
	  cat <<_LT_EOF >> conftest.$ac_ext
5208
5209
/* The mapping between symbol names and symbols.  */
5210
const struct {
5211
  const char *name;
5212
  void       *address;
5213
}
5214
lt__PROGRAM__LTX_preloaded_symbols[[]] =
5215
{
5216
  { "@PROGRAM@", (void *) 0 },
5217
_LT_EOF
5218
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5219
	  cat <<\_LT_EOF >> conftest.$ac_ext
5220
  {0, (void *) 0}
5221
};
5222
5223
/* This works around a problem in FreeBSD linker */
5224
#ifdef FREEBSD_WORKAROUND
5225
static const void *lt_preloaded_setup() {
5226
  return lt__PROGRAM__LTX_preloaded_symbols;
5227
}
5228
#endif
5229
5230
#ifdef __cplusplus
5231
}
5232
#endif
5233
_LT_EOF
5234
	  # Now try linking the two files.
5235
	  mv conftest.$ac_objext conftstm.$ac_objext
5236
	  lt_save_LIBS="$LIBS"
5237
	  lt_save_CFLAGS="$CFLAGS"
5238
	  LIBS="conftstm.$ac_objext"
5239
	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5240
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5241
	    pipe_works=yes
5242
	  fi
5243
	  LIBS="$lt_save_LIBS"
5244
	  CFLAGS="$lt_save_CFLAGS"
5245
	else
5246
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5247
	fi
5248
      else
5249
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5250
      fi
5251
    else
5252
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5253
    fi
5254
  else
5255
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5256
    cat conftest.$ac_ext >&5
5257
  fi
5258
  rm -rf conftest* conftst*
5259
5260
  # Do not use the global_symbol_pipe unless it works.
5261
  if test "$pipe_works" = yes; then
5262
    break
5263
  else
5264
    lt_cv_sys_global_symbol_pipe=
5265
  fi
5266
done
5267
])
5268
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5269
  lt_cv_sys_global_symbol_to_cdecl=
5270
fi
5271
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5272
  AC_MSG_RESULT(failed)
5273
else
5274
  AC_MSG_RESULT(ok)
5275
fi
5276
5277
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5278
    [Take the output of nm and produce a listing of raw symbols and C names])
5279
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5280
    [Transform the output of nm in a proper C declaration])
5281
_LT_DECL([global_symbol_to_c_name_address],
5282
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
5283
    [Transform the output of nm in a C name address pair])
5284
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5285
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5286
    [Transform the output of nm in a C name address pair when lib prefix is needed])
5287
]) # _LT_CMD_GLOBAL_SYMBOLS
5288
5289
5290
# _LT_COMPILER_PIC([TAGNAME])
5291
# ---------------------------
5292
m4_defun([_LT_COMPILER_PIC],
5293
[m4_require([_LT_TAG_COMPILER])dnl
5294
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5295
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5296
_LT_TAGVAR(lt_prog_compiler_static, $1)=
5297
5298
AC_MSG_CHECKING([for $compiler option to produce PIC])
5299
m4_if([$1], [CXX], [
5300
  # C++ specific cases for pic, static, wl, etc.
5301
  if test "$GXX" = yes; then
5302
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5303
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5304
5305
    case $host_os in
5306
    aix*)
5307
      # All AIX code is PIC.
5308
      if test "$host_cpu" = ia64; then
5309
	# AIX 5 now supports IA64 processor
5310
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5311
      fi
5312
      ;;
5313
5314
    amigaos*)
5315
      case $host_cpu in
5316
      powerpc)
5317
            # see comment about AmigaOS4 .so support
5318
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5319
        ;;
5320
      m68k)
5321
            # FIXME: we need at least 68020 code to build shared libraries, but
5322
            # adding the `-m68020' flag to GCC prevents building anything better,
5323
            # like `-m68040'.
5324
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5325
        ;;
5326
      esac
5327
      ;;
5328
5329
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5330
      # PIC is the default for these OSes.
5331
      ;;
5332
    mingw* | cygwin* | os2* | pw32* | cegcc*)
5333
      # This hack is so that the source file can tell whether it is being
5334
      # built for inclusion in a dll (and should export symbols for example).
5335
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5336
      # (--disable-auto-import) libraries
5337
      m4_if([$1], [GCJ], [],
5338
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5339
      ;;
5340
    darwin* | rhapsody*)
5341
      # PIC is the default on this platform
5342
      # Common symbols not allowed in MH_DYLIB files
5343
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5344
      ;;
5345
    *djgpp*)
5346
      # DJGPP does not support shared libraries at all
5347
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5348
      ;;
5349
    interix[[3-9]]*)
5350
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5351
      # Instead, we relocate shared libraries at runtime.
5352
      ;;
5353
    sysv4*MP*)
5354
      if test -d /usr/nec; then
5355
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5356
      fi
5357
      ;;
5358
    hpux*)
5359
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5360
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5361
      # sets the default TLS model and affects inlining.
5362
      case $host_cpu in
5363
      hppa*64*)
5364
	;;
5365
      *)
5366
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5367
	;;
5368
      esac
5369
      ;;
5370
    *qnx* | *nto*)
5371
      # QNX uses GNU C++, but need to define -shared option too, otherwise
5372
      # it will coredump.
5373
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5374
      ;;
5375
    *)
5376
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5377
      ;;
5378
    esac
5379
  else
5380
    case $host_os in
5381
      aix[[4-9]]*)
5382
	# All AIX code is PIC.
5383
	if test "$host_cpu" = ia64; then
5384
	  # AIX 5 now supports IA64 processor
5385
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5386
	else
5387
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5388
	fi
5389
	;;
5390
      chorus*)
5391
	case $cc_basename in
5392
	cxch68*)
5393
	  # Green Hills C++ Compiler
5394
	  # _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"
5395
	  ;;
5396
	esac
5397
	;;
5398
      dgux*)
5399
	case $cc_basename in
5400
	  ec++*)
5401
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5402
	    ;;
5403
	  ghcx*)
5404
	    # Green Hills C++ Compiler
5405
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5406
	    ;;
5407
	  *)
5408
	    ;;
5409
	esac
5410
	;;
5411
      freebsd* | dragonfly*)
5412
	# FreeBSD uses GNU C++
5413
	;;
5414
      hpux9* | hpux10* | hpux11*)
5415
	case $cc_basename in
5416
	  CC*)
5417
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5418
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5419
	    if test "$host_cpu" != ia64; then
5420
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5421
	    fi
5422
	    ;;
5423
	  aCC*)
5424
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5425
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5426
	    case $host_cpu in
5427
	    hppa*64*|ia64*)
5428
	      # +Z the default
5429
	      ;;
5430
	    *)
5431
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5432
	      ;;
5433
	    esac
5434
	    ;;
5435
	  *)
5436
	    ;;
5437
	esac
5438
	;;
5439
      interix*)
5440
	# This is c89, which is MS Visual C++ (no shared libs)
5441
	# Anyone wants to do a port?
5442
	;;
5443
      irix5* | irix6* | nonstopux*)
5444
	case $cc_basename in
5445
	  CC*)
5446
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5447
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5448
	    # CC pic flag -KPIC is the default.
5449
	    ;;
5450
	  *)
5451
	    ;;
5452
	esac
5453
	;;
5454
      linux* | k*bsd*-gnu)
5455
	case $cc_basename in
5456
	  KCC*)
5457
	    # KAI C++ Compiler
5458
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5459
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5460
	    ;;
5461
	  ecpc* )
5462
	    # old Intel C++ for x86_64 which still supported -KPIC.
5463
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5464
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5465
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5466
	    ;;
5467
	  icpc* )
5468
	    # Intel C++, used to be incompatible with GCC.
5469
	    # ICC 10 doesn't accept -KPIC any more.
5470
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5471
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5472
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5473
	    ;;
5474
	  pgCC* | pgcpp*)
5475
	    # Portland Group C++ compiler
5476
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5477
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5478
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5479
	    ;;
5480
	  cxx*)
5481
	    # Compaq C++
5482
	    # Make sure the PIC flag is empty.  It appears that all Alpha
5483
	    # Linux and Compaq Tru64 Unix objects are PIC.
5484
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5485
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5486
	    ;;
5487
	  xlc* | xlC*)
5488
	    # IBM XL 8.0 on PPC
5489
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5490
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5491
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5492
	    ;;
5493
	  *)
5494
	    case `$CC -V 2>&1 | sed 5q` in
5495
	    *Sun\ C*)
5496
	      # Sun C++ 5.9
5497
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5498
	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5499
	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5500
	      ;;
5501
	    esac
5502
	    ;;
5503
	esac
5504
	;;
5505
      lynxos*)
5506
	;;
5507
      m88k*)
5508
	;;
5509
      mvs*)
5510
	case $cc_basename in
5511
	  cxx*)
5512
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5513
	    ;;
5514
	  *)
5515
	    ;;
5516
	esac
5517
	;;
5518
      netbsd* | netbsdelf*-gnu)
5519
	;;
5520
      *qnx* | *nto*)
5521
        # QNX uses GNU C++, but need to define -shared option too, otherwise
5522
        # it will coredump.
5523
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5524
        ;;
5525
      osf3* | osf4* | osf5*)
5526
	case $cc_basename in
5527
	  KCC*)
5528
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5529
	    ;;
5530
	  RCC*)
5531
	    # Rational C++ 2.4.1
5532
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5533
	    ;;
5534
	  cxx*)
5535
	    # Digital/Compaq C++
5536
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5537
	    # Make sure the PIC flag is empty.  It appears that all Alpha
5538
	    # Linux and Compaq Tru64 Unix objects are PIC.
5539
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5540
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5541
	    ;;
5542
	  *)
5543
	    ;;
5544
	esac
5545
	;;
5546
      psos*)
5547
	;;
5548
      solaris*)
5549
	case $cc_basename in
5550
	  CC*)
5551
	    # Sun C++ 4.2, 5.x and Centerline C++
5552
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5553
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5554
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5555
	    ;;
5556
	  gcx*)
5557
	    # Green Hills C++ Compiler
5558
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5559
	    ;;
5560
	  *)
5561
	    ;;
5562
	esac
5563
	;;
5564
      sunos4*)
5565
	case $cc_basename in
5566
	  CC*)
5567
	    # Sun C++ 4.x
5568
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5569
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5570
	    ;;
5571
	  lcc*)
5572
	    # Lucid
5573
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5574
	    ;;
5575
	  *)
5576
	    ;;
5577
	esac
5578
	;;
5579
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5580
	case $cc_basename in
5581
	  CC*)
5582
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5583
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5584
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5585
	    ;;
5586
	esac
5587
	;;
5588
      tandem*)
5589
	case $cc_basename in
5590
	  NCC*)
5591
	    # NonStop-UX NCC 3.20
5592
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5593
	    ;;
5594
	  *)
5595
	    ;;
5596
	esac
5597
	;;
5598
      vxworks*)
5599
	;;
5600
      *)
5601
	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5602
	;;
5603
    esac
5604
  fi
5605
],
5606
[
5607
  if test "$GCC" = yes; then
5608
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5609
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5610
5611
    case $host_os in
5612
      aix*)
5613
      # All AIX code is PIC.
5614
      if test "$host_cpu" = ia64; then
5615
	# AIX 5 now supports IA64 processor
5616
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5617
      fi
5618
      ;;
5619
5620
    amigaos*)
5621
      case $host_cpu in
5622
      powerpc)
5623
            # see comment about AmigaOS4 .so support
5624
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5625
        ;;
5626
      m68k)
5627
            # FIXME: we need at least 68020 code to build shared libraries, but
5628
            # adding the `-m68020' flag to GCC prevents building anything better,
5629
            # like `-m68040'.
5630
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5631
        ;;
5632
      esac
5633
      ;;
5634
5635
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5636
      # PIC is the default for these OSes.
5637
      ;;
5638
5639
    mingw* | cygwin* | pw32* | os2* | cegcc*)
5640
      # This hack is so that the source file can tell whether it is being
5641
      # built for inclusion in a dll (and should export symbols for example).
5642
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5643
      # (--disable-auto-import) libraries
5644
      m4_if([$1], [GCJ], [],
5645
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5646
      ;;
5647
5648
    darwin* | rhapsody*)
5649
      # PIC is the default on this platform
5650
      # Common symbols not allowed in MH_DYLIB files
5651
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5652
      ;;
5653
5654
    hpux*)
5655
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5656
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5657
      # sets the default TLS model and affects inlining.
5658
      case $host_cpu in
5659
      hppa*64*)
5660
	# +Z the default
5661
	;;
5662
      *)
5663
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5664
	;;
5665
      esac
5666
      ;;
5667
5668
    interix[[3-9]]*)
5669
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5670
      # Instead, we relocate shared libraries at runtime.
5671
      ;;
5672
5673
    msdosdjgpp*)
5674
      # Just because we use GCC doesn't mean we suddenly get shared libraries
5675
      # on systems that don't support them.
5676
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5677
      enable_shared=no
5678
      ;;
5679
5680
    *nto* | *qnx*)
5681
      # QNX uses GNU C++, but need to define -shared option too, otherwise
5682
      # it will coredump.
5683
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5684
      ;;
5685
5686
    sysv4*MP*)
5687
      if test -d /usr/nec; then
5688
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5689
      fi
5690
      ;;
5691
5692
    *)
5693
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5694
      ;;
5695
    esac
5696
  else
5697
    # PORTME Check for flag to pass linker flags through the system compiler.
5698
    case $host_os in
5699
    aix*)
5700
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5701
      if test "$host_cpu" = ia64; then
5702
	# AIX 5 now supports IA64 processor
5703
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5704
      else
5705
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5706
      fi
5707
      ;;
5708
5709
    mingw* | cygwin* | pw32* | os2* | cegcc*)
5710
      # This hack is so that the source file can tell whether it is being
5711
      # built for inclusion in a dll (and should export symbols for example).
5712
      m4_if([$1], [GCJ], [],
5713
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5714
      ;;
5715
5716
    hpux9* | hpux10* | hpux11*)
5717
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5718
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5719
      # not for PA HP-UX.
5720
      case $host_cpu in
5721
      hppa*64*|ia64*)
5722
	# +Z the default
5723
	;;
5724
      *)
5725
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5726
	;;
5727
      esac
5728
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5729
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5730
      ;;
5731
5732
    irix5* | irix6* | nonstopux*)
5733
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5734
      # PIC (with -KPIC) is the default.
5735
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5736
      ;;
5737
5738
    linux* | k*bsd*-gnu)
5739
      case $cc_basename in
5740
      # old Intel for x86_64 which still supported -KPIC.
5741
      ecc*)
5742
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5743
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5744
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5745
        ;;
5746
      # icc used to be incompatible with GCC.
5747
      # ICC 10 doesn't accept -KPIC any more.
5748
      icc* | ifort*)
5749
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5750
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5751
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5752
        ;;
5753
      # Lahey Fortran 8.1.
5754
      lf95*)
5755
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5756
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5757
	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5758
	;;
5759
      pgcc* | pgf77* | pgf90* | pgf95*)
5760
        # Portland Group compilers (*not* the Pentium gcc compiler,
5761
	# which looks to be a dead project)
5762
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5763
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5764
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5765
        ;;
5766
      ccc*)
5767
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5768
        # All Alpha code is PIC.
5769
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5770
        ;;
5771
      xl*)
5772
	# IBM XL C 8.0/Fortran 10.1 on PPC
5773
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5774
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5775
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5776
	;;
5777
      *)
5778
	case `$CC -V 2>&1 | sed 5q` in
5779
	*Sun\ C*)
5780
	  # Sun C 5.9
5781
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5782
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5783
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5784
	  ;;
5785
	*Sun\ F*)
5786
	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5787
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5788
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5789
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5790
	  ;;
5791
	esac
5792
	;;
5793
      esac
5794
      ;;
5795
5796
    newsos6)
5797
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5798
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5799
      ;;
5800
5801
    *nto* | *qnx*)
5802
      # QNX uses GNU C++, but need to define -shared option too, otherwise
5803
      # it will coredump.
5804
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5805
      ;;
5806
5807
    osf3* | osf4* | osf5*)
5808
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5809
      # All OSF/1 code is PIC.
5810
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5811
      ;;
5812
5813
    rdos*)
5814
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5815
      ;;
5816
5817
    solaris*)
5818
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5819
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5820
      case $cc_basename in
5821
      f77* | f90* | f95*)
5822
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5823
      *)
5824
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5825
      esac
5826
      ;;
5827
5828
    sunos4*)
5829
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5830
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5831
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5832
      ;;
5833
5834
    sysv4 | sysv4.2uw2* | sysv4.3*)
5835
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5836
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5837
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5838
      ;;
5839
5840
    sysv4*MP*)
5841
      if test -d /usr/nec ;then
5842
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5843
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5844
      fi
5845
      ;;
5846
5847
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5848
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5849
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5850
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5851
      ;;
5852
5853
    unicos*)
5854
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5855
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5856
      ;;
5857
5858
    uts4*)
5859
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5860
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5861
      ;;
5862
5863
    *)
5864
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5865
      ;;
5866
    esac
5867
  fi
5868
])
5869
case $host_os in
5870
  # For platforms which do not support PIC, -DPIC is meaningless:
5871
  *djgpp*)
5872
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5873
    ;;
5874
  *)
5875
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5876
    ;;
5877
esac
5878
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5879
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5880
	[How to pass a linker flag through the compiler])
5881
5882
#
5883
# Check to make sure the PIC flag actually works.
5884
#
5885
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5886
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5887
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5888
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5889
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5890
     "" | " "*) ;;
5891
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5892
     esac],
5893
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5894
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5895
fi
5896
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5897
	[Additional compiler flags for building library objects])
5898
5899
#
5900
# Check to make sure the static flag actually works.
5901
#
5902
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5903
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5904
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5905
  $lt_tmp_static_flag,
5906
  [],
5907
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5908
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5909
	[Compiler flag to prevent dynamic linking])
5910
])# _LT_COMPILER_PIC
5911
5912
5913
# _LT_LINKER_SHLIBS([TAGNAME])
5914
# ----------------------------
5915
# See if the linker supports building shared libraries.
5916
m4_defun([_LT_LINKER_SHLIBS],
5917
[AC_REQUIRE([LT_PATH_LD])dnl
5918
AC_REQUIRE([LT_PATH_NM])dnl
5919
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5920
m4_require([_LT_DECL_EGREP])dnl
5921
m4_require([_LT_DECL_SED])dnl
5922
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5923
m4_require([_LT_TAG_COMPILER])dnl
5924
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5925
m4_if([$1], [CXX], [
5926
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5927
  case $host_os in
5928
  aix[[4-9]]*)
5929
    # If we're using GNU nm, then we don't want the "-C" option.
5930
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5931
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5932
      _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'
5933
    else
5934
      _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'
5935
    fi
5936
    ;;
5937
  pw32*)
5938
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5939
  ;;
5940
  cygwin* | mingw* | cegcc*)
5941
    _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'
5942
  ;;
5943
  linux* | k*bsd*-gnu)
5944
    _LT_TAGVAR(link_all_deplibs, $1)=no
5945
  ;;
5946
  *)
5947
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5948
  ;;
5949
  esac
5950
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5951
], [
5952
  runpath_var=
5953
  _LT_TAGVAR(allow_undefined_flag, $1)=
5954
  _LT_TAGVAR(always_export_symbols, $1)=no
5955
  _LT_TAGVAR(archive_cmds, $1)=
5956
  _LT_TAGVAR(archive_expsym_cmds, $1)=
5957
  _LT_TAGVAR(compiler_needs_object, $1)=no
5958
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5959
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5960
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5961
  _LT_TAGVAR(hardcode_automatic, $1)=no
5962
  _LT_TAGVAR(hardcode_direct, $1)=no
5963
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5964
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5965
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5966
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5967
  _LT_TAGVAR(hardcode_minus_L, $1)=no
5968
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5969
  _LT_TAGVAR(inherit_rpath, $1)=no
5970
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5971
  _LT_TAGVAR(module_cmds, $1)=
5972
  _LT_TAGVAR(module_expsym_cmds, $1)=
5973
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5974
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5975
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5976
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5977
  # include_expsyms should be a list of space-separated symbols to be *always*
5978
  # included in the symbol list
5979
  _LT_TAGVAR(include_expsyms, $1)=
5980
  # exclude_expsyms can be an extended regexp of symbols to exclude
5981
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5982
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5983
  # as well as any symbol that contains `d'.
5984
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5985
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5986
  # platforms (ab)use it in PIC code, but their linkers get confused if
5987
  # the symbol is explicitly referenced.  Since portable code cannot
5988
  # rely on this symbol name, it's probably fine to never include it in
5989
  # preloaded symbol tables.
5990
  # Exclude shared library initialization/finalization symbols.
5991
dnl Note also adjust exclude_expsyms for C++ above.
5992
  extract_expsyms_cmds=
5993
5994
  case $host_os in
5995
  cygwin* | mingw* | pw32* | cegcc*)
5996
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5997
    # When not using gcc, we currently assume that we are using
5998
    # Microsoft Visual C++.
5999
    if test "$GCC" != yes; then
6000
      with_gnu_ld=no
6001
    fi
6002
    ;;
6003
  interix*)
6004
    # we just hope/assume this is gcc and not c89 (= MSVC++)
6005
    with_gnu_ld=yes
6006
    ;;
6007
  openbsd*)
6008
    with_gnu_ld=no
6009
    ;;
6010
  linux* | k*bsd*-gnu)
6011
    _LT_TAGVAR(link_all_deplibs, $1)=no
6012
    ;;
6013
  esac
6014
6015
  _LT_TAGVAR(ld_shlibs, $1)=yes
6016
  if test "$with_gnu_ld" = yes; then
6017
    # If archive_cmds runs LD, not CC, wlarc should be empty
6018
    wlarc='${wl}'
6019
6020
    # Set some defaults for GNU ld with shared library support. These
6021
    # are reset later if shared libraries are not supported. Putting them
6022
    # here allows them to be overridden if necessary.
6023
    runpath_var=LD_RUN_PATH
6024
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6025
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6026
    # ancient GNU ld didn't support --whole-archive et. al.
6027
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6028
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6029
    else
6030
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6031
    fi
6032
    supports_anon_versioning=no
6033
    case `$LD -v 2>&1` in
6034
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6035
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6036
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6037
      *\ 2.11.*) ;; # other 2.11 versions
6038
      *) supports_anon_versioning=yes ;;
6039
    esac
6040
6041
    # See if GNU ld supports shared libraries.
6042
    case $host_os in
6043
    aix[[3-9]]*)
6044
      # On AIX/PPC, the GNU linker is very broken
6045
      if test "$host_cpu" != ia64; then
6046
	_LT_TAGVAR(ld_shlibs, $1)=no
6047
	cat <<_LT_EOF 1>&2
6048
6049
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6050
*** to be unable to reliably create shared libraries on AIX.
6051
*** Therefore, libtool is disabling shared libraries support.  If you
6052
*** really care for shared libraries, you may want to modify your PATH
6053
*** so that a non-GNU linker is found, and then restart.
6054
6055
_LT_EOF
6056
      fi
6057
      ;;
6058
6059
    amigaos*)
6060
      case $host_cpu in
6061
      powerpc)
6062
            # see comment about AmigaOS4 .so support
6063
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6064
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6065
        ;;
6066
      m68k)
6067
            _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)'
6068
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6069
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6070
        ;;
6071
      esac
6072
      ;;
6073
6074
    beos*)
6075
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6076
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6077
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6078
	# support --undefined.  This deserves some investigation.  FIXME
6079
	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6080
      else
6081
	_LT_TAGVAR(ld_shlibs, $1)=no
6082
      fi
6083
      ;;
6084
6085
    cygwin* | mingw* | pw32* | cegcc*)
6086
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6087
      # as there is no search path for DLLs.
6088
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6089
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6090
      _LT_TAGVAR(always_export_symbols, $1)=no
6091
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6092
      _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'
6093
6094
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6095
        _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'
6096
	# If the export-symbols file already is a .def file (1st line
6097
	# is EXPORTS), use it as is; otherwise, prepend...
6098
	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6099
	  cp $export_symbols $output_objdir/$soname.def;
6100
	else
6101
	  echo EXPORTS > $output_objdir/$soname.def;
6102
	  cat $export_symbols >> $output_objdir/$soname.def;
6103
	fi~
6104
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6105
      else
6106
	_LT_TAGVAR(ld_shlibs, $1)=no
6107
      fi
6108
      ;;
6109
6110
    interix[[3-9]]*)
6111
      _LT_TAGVAR(hardcode_direct, $1)=no
6112
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6113
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6114
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6115
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6116
      # Instead, shared libraries are loaded at an image base (0x10000000 by
6117
      # default) and relocated if they conflict, which is a slow very memory
6118
      # consuming and fragmenting process.  To avoid this, we pick a random,
6119
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6120
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6121
      _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'
6122
      _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'
6123
      ;;
6124
6125
    gnu* | linux* | tpf* | k*bsd*-gnu)
6126
      tmp_diet=no
6127
      if test "$host_os" = linux-dietlibc; then
6128
	case $cc_basename in
6129
	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
6130
	esac
6131
      fi
6132
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6133
	 && test "$tmp_diet" = no
6134
      then
6135
	tmp_addflag=
6136
	tmp_sharedflag='-shared'
6137
	case $cc_basename,$host_cpu in
6138
        pgcc*)				# Portland Group C compiler
6139
	  _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'
6140
	  tmp_addflag=' $pic_flag'
6141
	  ;;
6142
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
6143
	  _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'
6144
	  tmp_addflag=' $pic_flag -Mnomain' ;;
6145
	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
6146
	  tmp_addflag=' -i_dynamic' ;;
6147
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6148
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6149
	ifc* | ifort*)			# Intel Fortran compiler
6150
	  tmp_addflag=' -nofor_main' ;;
6151
	lf95*)				# Lahey Fortran 8.1
6152
	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6153
	  tmp_sharedflag='--shared' ;;
6154
	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
6155
	  tmp_sharedflag='-qmkshrobj'
6156
	  tmp_addflag= ;;
6157
	esac
6158
	case `$CC -V 2>&1 | sed 5q` in
6159
	*Sun\ C*)			# Sun C 5.9
6160
	  _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'
6161
	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6162
	  tmp_sharedflag='-G' ;;
6163
	*Sun\ F*)			# Sun Fortran 8.3
6164
	  tmp_sharedflag='-G' ;;
6165
	esac
6166
	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6167
6168
        if test "x$supports_anon_versioning" = xyes; then
6169
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6170
	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6171
	    echo "local: *; };" >> $output_objdir/$libname.ver~
6172
	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6173
        fi
6174
6175
	case $cc_basename in
6176
	xlf*)
6177
	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6178
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6179
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6180
	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6181
	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
6182
	  if test "x$supports_anon_versioning" = xyes; then
6183
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6184
	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6185
	      echo "local: *; };" >> $output_objdir/$libname.ver~
6186
	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6187
	  fi
6188
	  ;;
6189
	esac
6190
      else
6191
        _LT_TAGVAR(ld_shlibs, $1)=no
6192
      fi
6193
      ;;
6194
6195
    netbsd* | netbsdelf*-gnu)
6196
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6197
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6198
	wlarc=
6199
      else
6200
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6201
	_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'
6202
      fi
6203
      ;;
6204
6205
    solaris*)
6206
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6207
	_LT_TAGVAR(ld_shlibs, $1)=no
6208
	cat <<_LT_EOF 1>&2
6209
6210
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6211
*** create shared libraries on Solaris systems.  Therefore, libtool
6212
*** is disabling shared libraries support.  We urge you to upgrade GNU
6213
*** binutils to release 2.9.1 or newer.  Another option is to modify
6214
*** your PATH or compiler configuration so that the native linker is
6215
*** used, and then restart.
6216
6217
_LT_EOF
6218
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6219
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6220
	_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'
6221
      else
6222
	_LT_TAGVAR(ld_shlibs, $1)=no
6223
      fi
6224
      ;;
6225
6226
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6227
      case `$LD -v 2>&1` in
6228
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6229
	_LT_TAGVAR(ld_shlibs, $1)=no
6230
	cat <<_LT_EOF 1>&2
6231
6232
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6233
*** reliably create shared libraries on SCO systems.  Therefore, libtool
6234
*** is disabling shared libraries support.  We urge you to upgrade GNU
6235
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6236
*** your PATH or compiler configuration so that the native linker is
6237
*** used, and then restart.
6238
6239
_LT_EOF
6240
	;;
6241
	*)
6242
	  # For security reasons, it is highly recommended that you always
6243
	  # use absolute paths for naming shared libraries, and exclude the
6244
	  # DT_RUNPATH tag from executables and libraries.  But doing so
6245
	  # requires that you compile everything twice, which is a pain.
6246
	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6247
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6248
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6249
	    _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'
6250
	  else
6251
	    _LT_TAGVAR(ld_shlibs, $1)=no
6252
	  fi
6253
	;;
6254
      esac
6255
      ;;
6256
6257
    sunos4*)
6258
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6259
      wlarc=
6260
      _LT_TAGVAR(hardcode_direct, $1)=yes
6261
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6262
      ;;
6263
6264
    *)
6265
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6266
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6267
	_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'
6268
      else
6269
	_LT_TAGVAR(ld_shlibs, $1)=no
6270
      fi
6271
      ;;
6272
    esac
6273
6274
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6275
      runpath_var=
6276
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6277
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6278
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6279
    fi
6280
  else
6281
    # PORTME fill in a description of your system's linker (not GNU ld)
6282
    case $host_os in
6283
    aix3*)
6284
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6285
      _LT_TAGVAR(always_export_symbols, $1)=yes
6286
      _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'
6287
      # Note: this linker hardcodes the directories in LIBPATH if there
6288
      # are no directories specified by -L.
6289
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6290
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6291
	# Neither direct hardcoding nor static linking is supported with a
6292
	# broken collect2.
6293
	_LT_TAGVAR(hardcode_direct, $1)=unsupported
6294
      fi
6295
      ;;
6296
6297
    aix[[4-9]]*)
6298
      if test "$host_cpu" = ia64; then
6299
	# On IA64, the linker does run time linking by default, so we don't
6300
	# have to do anything special.
6301
	aix_use_runtimelinking=no
6302
	exp_sym_flag='-Bexport'
6303
	no_entry_flag=""
6304
      else
6305
	# If we're using GNU nm, then we don't want the "-C" option.
6306
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6307
	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6308
	  _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'
6309
	else
6310
	  _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'
6311
	fi
6312
	aix_use_runtimelinking=no
6313
6314
	# Test if we are trying to use run time linking or normal
6315
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6316
	# need to do runtime linking.
6317
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6318
	  for ld_flag in $LDFLAGS; do
6319
	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6320
	    aix_use_runtimelinking=yes
6321
	    break
6322
	  fi
6323
	  done
6324
	  ;;
6325
	esac
6326
6327
	exp_sym_flag='-bexport'
6328
	no_entry_flag='-bnoentry'
6329
      fi
6330
6331
      # When large executables or shared objects are built, AIX ld can
6332
      # have problems creating the table of contents.  If linking a library
6333
      # or program results in "error TOC overflow" add -mminimal-toc to
6334
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6335
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6336
6337
      _LT_TAGVAR(archive_cmds, $1)=''
6338
      _LT_TAGVAR(hardcode_direct, $1)=yes
6339
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6340
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6341
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6342
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6343
6344
      if test "$GCC" = yes; then
6345
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6346
	# We only want to do this on AIX 4.2 and lower, the check
6347
	# below for broken collect2 doesn't work under 4.3+
6348
	  collect2name=`${CC} -print-prog-name=collect2`
6349
	  if test -f "$collect2name" &&
6350
	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6351
	  then
6352
	  # We have reworked collect2
6353
	  :
6354
	  else
6355
	  # We have old collect2
6356
	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
6357
	  # It fails to find uninstalled libraries when the uninstalled
6358
	  # path is not listed in the libpath.  Setting hardcode_minus_L
6359
	  # to unsupported forces relinking
6360
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6361
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6362
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6363
	  fi
6364
	  ;;
6365
	esac
6366
	shared_flag='-shared'
6367
	if test "$aix_use_runtimelinking" = yes; then
6368
	  shared_flag="$shared_flag "'${wl}-G'
6369
	fi
6370
	_LT_TAGVAR(link_all_deplibs, $1)=no
6371
      else
6372
	# not using gcc
6373
	if test "$host_cpu" = ia64; then
6374
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6375
	# chokes on -Wl,-G. The following line is correct:
6376
	  shared_flag='-G'
6377
	else
6378
	  if test "$aix_use_runtimelinking" = yes; then
6379
	    shared_flag='${wl}-G'
6380
	  else
6381
	    shared_flag='${wl}-bM:SRE'
6382
	  fi
6383
	fi
6384
      fi
6385
6386
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6387
      # It seems that -bexpall does not export symbols beginning with
6388
      # underscore (_), so it is better to generate a list of symbols to export.
6389
      _LT_TAGVAR(always_export_symbols, $1)=yes
6390
      if test "$aix_use_runtimelinking" = yes; then
6391
	# Warning - without using the other runtime loading flags (-brtl),
6392
	# -berok will link without error, but may produce a broken library.
6393
	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6394
        # Determine the default libpath from the value encoded in an
6395
        # empty executable.
6396
        _LT_SYS_MODULE_PATH_AIX
6397
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6398
        _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"
6399
      else
6400
	if test "$host_cpu" = ia64; then
6401
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6402
	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6403
	  _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"
6404
	else
6405
	 # Determine the default libpath from the value encoded in an
6406
	 # empty executable.
6407
	 _LT_SYS_MODULE_PATH_AIX
6408
	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6409
	  # Warning - without using the other run time loading flags,
6410
	  # -berok will link without error, but may produce a broken library.
6411
	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6412
	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6413
	  # Exported symbols can be pulled into shared objects from archives
6414
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6415
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6416
	  # This is similar to how AIX traditionally builds its shared libraries.
6417
	  _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'
6418
	fi
6419
      fi
6420
      ;;
6421
6422
    amigaos*)
6423
      case $host_cpu in
6424
      powerpc)
6425
            # see comment about AmigaOS4 .so support
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)=''
6428
        ;;
6429
      m68k)
6430
            _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)'
6431
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6432
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6433
        ;;
6434
      esac
6435
      ;;
6436
6437
    bsdi[[45]]*)
6438
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6439
      ;;
6440
6441
    cygwin* | mingw* | pw32* | cegcc*)
6442
      # When not using gcc, we currently assume that we are using
6443
      # Microsoft Visual C++.
6444
      # hardcode_libdir_flag_spec is actually meaningless, as there is
6445
      # no search path for DLLs.
6446
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6447
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6448
      # Tell ltmain to make .lib files, not .a files.
6449
      libext=lib
6450
      # Tell ltmain to make .dll files, not .so files.
6451
      shrext_cmds=".dll"
6452
      # FIXME: Setting linknames here is a bad hack.
6453
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6454
      # The linker will automatically build a .lib file if we build a DLL.
6455
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6456
      # FIXME: Should let the user specify the lib program.
6457
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6458
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6459
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6460
      ;;
6461
6462
    darwin* | rhapsody*)
6463
      _LT_DARWIN_LINKER_FEATURES($1)
6464
      ;;
6465
6466
    dgux*)
6467
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6468
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6469
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6470
      ;;
6471
6472
    freebsd1*)
6473
      _LT_TAGVAR(ld_shlibs, $1)=no
6474
      ;;
6475
6476
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6477
    # support.  Future versions do this automatically, but an explicit c++rt0.o
6478
    # does not break anything, and helps significantly (at the cost of a little
6479
    # extra space).
6480
    freebsd2.2*)
6481
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6482
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6483
      _LT_TAGVAR(hardcode_direct, $1)=yes
6484
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6485
      ;;
6486
6487
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6488
    freebsd2*)
6489
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6490
      _LT_TAGVAR(hardcode_direct, $1)=yes
6491
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6492
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6493
      ;;
6494
6495
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6496
    freebsd* | dragonfly*)
6497
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6498
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6499
      _LT_TAGVAR(hardcode_direct, $1)=yes
6500
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6501
      ;;
6502
6503
    hpux9*)
6504
      if test "$GCC" = yes; then
6505
	_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'
6506
      else
6507
	_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'
6508
      fi
6509
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6510
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6511
      _LT_TAGVAR(hardcode_direct, $1)=yes
6512
6513
      # hardcode_minus_L: Not really in the search PATH,
6514
      # but as the default location of the library.
6515
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6516
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6517
      ;;
6518
6519
    hpux10*)
6520
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6521
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6522
      else
6523
	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6524
      fi
6525
      if test "$with_gnu_ld" = no; then
6526
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6527
	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6528
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6529
	_LT_TAGVAR(hardcode_direct, $1)=yes
6530
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6531
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6532
	# hardcode_minus_L: Not really in the search PATH,
6533
	# but as the default location of the library.
6534
	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6535
      fi
6536
      ;;
6537
6538
    hpux11*)
6539
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6540
	case $host_cpu in
6541
	hppa*64*)
6542
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6543
	  ;;
6544
	ia64*)
6545
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6546
	  ;;
6547
	*)
6548
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6549
	  ;;
6550
	esac
6551
      else
6552
	case $host_cpu in
6553
	hppa*64*)
6554
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6555
	  ;;
6556
	ia64*)
6557
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6558
	  ;;
6559
	*)
6560
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6561
	  ;;
6562
	esac
6563
      fi
6564
      if test "$with_gnu_ld" = no; then
6565
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6566
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6567
6568
	case $host_cpu in
6569
	hppa*64*|ia64*)
6570
	  _LT_TAGVAR(hardcode_direct, $1)=no
6571
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6572
	  ;;
6573
	*)
6574
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6575
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6576
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6577
6578
	  # hardcode_minus_L: Not really in the search PATH,
6579
	  # but as the default location of the library.
6580
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6581
	  ;;
6582
	esac
6583
      fi
6584
      ;;
6585
6586
    irix5* | irix6* | nonstopux*)
6587
      if test "$GCC" = yes; then
6588
	_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'
6589
	# Try to use the -exported_symbol ld option, if it does not
6590
	# work, assume that -exports_file does not work either and
6591
	# implicitly export all symbols.
6592
        save_LDFLAGS="$LDFLAGS"
6593
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6594
        AC_LINK_IFELSE(int foo(void) {},
6595
          _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'
6596
        )
6597
        LDFLAGS="$save_LDFLAGS"
6598
      else
6599
	_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'
6600
	_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'
6601
      fi
6602
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6603
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6604
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6605
      _LT_TAGVAR(inherit_rpath, $1)=yes
6606
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6607
      ;;
6608
6609
    netbsd* | netbsdelf*-gnu)
6610
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6611
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6612
      else
6613
	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6614
      fi
6615
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6616
      _LT_TAGVAR(hardcode_direct, $1)=yes
6617
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6618
      ;;
6619
6620
    newsos6)
6621
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6622
      _LT_TAGVAR(hardcode_direct, $1)=yes
6623
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6624
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6625
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6626
      ;;
6627
6628
    *nto* | *qnx*)
6629
      ;;
6630
6631
    openbsd*)
6632
      if test -f /usr/libexec/ld.so; then
6633
	_LT_TAGVAR(hardcode_direct, $1)=yes
6634
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6635
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6636
	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6637
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6638
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6639
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6640
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6641
	else
6642
	  case $host_os in
6643
	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6644
	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6645
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6646
	     ;;
6647
	   *)
6648
	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6649
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6650
	     ;;
6651
	  esac
6652
	fi
6653
      else
6654
	_LT_TAGVAR(ld_shlibs, $1)=no
6655
      fi
6656
      ;;
6657
6658
    os2*)
6659
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6660
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6661
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6662
      _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'
6663
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6664
      ;;
6665
6666
    osf3*)
6667
      if test "$GCC" = yes; then
6668
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6669
	_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'
6670
      else
6671
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6672
	_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'
6673
      fi
6674
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6675
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6676
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6677
      ;;
6678
6679
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6680
      if test "$GCC" = yes; then
6681
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6682
	_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'
6683
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6684
      else
6685
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6686
	_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'
6687
	_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~
6688
	$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'
6689
6690
	# Both c and cxx compiler support -rpath directly
6691
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6692
      fi
6693
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6694
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6695
      ;;
6696
6697
    solaris*)
6698
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6699
      if test "$GCC" = yes; then
6700
	wlarc='${wl}'
6701
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6702
	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6703
	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6704
      else
6705
	case `$CC -V 2>&1` in
6706
	*"Compilers 5.0"*)
6707
	  wlarc=''
6708
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6709
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6710
	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6711
	  ;;
6712
	*)
6713
	  wlarc='${wl}'
6714
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6715
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6716
	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6717
	  ;;
6718
	esac
6719
      fi
6720
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6721
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6722
      case $host_os in
6723
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6724
      *)
6725
	# The compiler driver will combine and reorder linker options,
6726
	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6727
	# but is careful enough not to reorder.
6728
	# Supported since Solaris 2.6 (maybe 2.5.1?)
6729
	if test "$GCC" = yes; then
6730
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6731
	else
6732
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6733
	fi
6734
	;;
6735
      esac
6736
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6737
      ;;
6738
6739
    sunos4*)
6740
      if test "x$host_vendor" = xsequent; then
6741
	# Use $CC to link under sequent, because it throws in some extra .o
6742
	# files that make .init and .fini sections work.
6743
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6744
      else
6745
	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6746
      fi
6747
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6748
      _LT_TAGVAR(hardcode_direct, $1)=yes
6749
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6750
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6751
      ;;
6752
6753
    sysv4)
6754
      case $host_vendor in
6755
	sni)
6756
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6757
	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6758
	;;
6759
	siemens)
6760
	  ## LD is ld it makes a PLAMLIB
6761
	  ## CC just makes a GrossModule.
6762
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6763
	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6764
	  _LT_TAGVAR(hardcode_direct, $1)=no
6765
        ;;
6766
	motorola)
6767
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6768
	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6769
	;;
6770
      esac
6771
      runpath_var='LD_RUN_PATH'
6772
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6773
      ;;
6774
6775
    sysv4.3*)
6776
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6777
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6778
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6779
      ;;
6780
6781
    sysv4*MP*)
6782
      if test -d /usr/nec; then
6783
	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6784
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6785
	runpath_var=LD_RUN_PATH
6786
	hardcode_runpath_var=yes
6787
	_LT_TAGVAR(ld_shlibs, $1)=yes
6788
      fi
6789
      ;;
6790
6791
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6792
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6793
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6794
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6795
      runpath_var='LD_RUN_PATH'
6796
6797
      if test "$GCC" = yes; then
6798
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6799
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6800
      else
6801
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6802
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6803
      fi
6804
      ;;
6805
6806
    sysv5* | sco3.2v5* | sco5v6*)
6807
      # Note: We can NOT use -z defs as we might desire, because we do not
6808
      # link with -lc, and that would cause any symbols used from libc to
6809
      # always be unresolved, which means just about no library would
6810
      # ever link correctly.  If we're not using GNU ld we use -z text
6811
      # though, which does catch some bad symbols but isn't as heavy-handed
6812
      # as -z defs.
6813
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6814
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6815
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6816
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6817
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6818
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6819
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6820
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6821
      runpath_var='LD_RUN_PATH'
6822
6823
      if test "$GCC" = yes; then
6824
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6825
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6826
      else
6827
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6828
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6829
      fi
6830
      ;;
6831
6832
    uts4*)
6833
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6834
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6835
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6836
      ;;
6837
6838
    *)
6839
      _LT_TAGVAR(ld_shlibs, $1)=no
6840
      ;;
6841
    esac
6842
6843
    if test x$host_vendor = xsni; then
6844
      case $host in
6845
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6846
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6847
	;;
6848
      esac
6849
    fi
6850
  fi
6851
])
6852
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6853
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6854
6855
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6856
6857
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6858
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6859
_LT_DECL([], [extract_expsyms_cmds], [2],
6860
    [The commands to extract the exported symbol list from a shared archive])
6861
6862
#
6863
# Do we need to explicitly link libc?
6864
#
6865
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6866
x|xyes)
6867
  # Assume -lc should be added
6868
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6869
6870
  if test "$enable_shared" = yes && test "$GCC" = yes; then
6871
    case $_LT_TAGVAR(archive_cmds, $1) in
6872
    *'~'*)
6873
      # FIXME: we may have to deal with multi-command sequences.
6874
      ;;
6875
    '$CC '*)
6876
      # Test whether the compiler implicitly links with -lc since on some
6877
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6878
      # to ld, don't add -lc before -lgcc.
6879
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6880
      $RM conftest*
6881
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6882
6883
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6884
        soname=conftest
6885
        lib=conftest
6886
        libobjs=conftest.$ac_objext
6887
        deplibs=
6888
        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6889
	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6890
        compiler_flags=-v
6891
        linker_flags=-v
6892
        verstring=
6893
        output_objdir=.
6894
        libname=conftest
6895
        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6896
        _LT_TAGVAR(allow_undefined_flag, $1)=
6897
        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6898
        then
6899
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6900
        else
6901
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6902
        fi
6903
        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6904
      else
6905
        cat conftest.err 1>&5
6906
      fi
6907
      $RM conftest*
6908
      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
6909
      ;;
6910
    esac
6911
  fi
6912
  ;;
6913
esac
6914
6915
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6916
    [Whether or not to add -lc for building shared libraries])
6917
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6918
    [enable_shared_with_static_runtimes], [0],
6919
    [Whether or not to disallow shared libs when runtime libs are static])
6920
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6921
    [Compiler flag to allow reflexive dlopens])
6922
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6923
    [Compiler flag to generate shared objects directly from archives])
6924
_LT_TAGDECL([], [compiler_needs_object], [1],
6925
    [Whether the compiler copes with passing no objects directly])
6926
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6927
    [Create an old-style archive from a shared archive])
6928
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6929
    [Create a temporary old-style archive to link instead of a shared archive])
6930
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6931
_LT_TAGDECL([], [archive_expsym_cmds], [2])
6932
_LT_TAGDECL([], [module_cmds], [2],
6933
    [Commands used to build a loadable module if different from building
6934
    a shared archive.])
6935
_LT_TAGDECL([], [module_expsym_cmds], [2])
6936
_LT_TAGDECL([], [with_gnu_ld], [1],
6937
    [Whether we are building with GNU ld or not])
6938
_LT_TAGDECL([], [allow_undefined_flag], [1],
6939
    [Flag that allows shared libraries with undefined symbols to be built])
6940
_LT_TAGDECL([], [no_undefined_flag], [1],
6941
    [Flag that enforces no undefined symbols])
6942
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6943
    [Flag to hardcode $libdir into a binary during linking.
6944
    This must work even if $libdir does not exist])
6945
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6946
    [[If ld is used when linking, flag to hardcode $libdir into a binary
6947
    during linking.  This must work even if $libdir does not exist]])
6948
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6949
    [Whether we need a single "-rpath" flag with a separated argument])
6950
_LT_TAGDECL([], [hardcode_direct], [0],
6951
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6952
    DIR into the resulting binary])
6953
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6954
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6955
    DIR into the resulting binary and the resulting library dependency is
6956
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6957
    library is relocated])
6958
_LT_TAGDECL([], [hardcode_minus_L], [0],
6959
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6960
    into the resulting binary])
6961
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6962
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6963
    into the resulting binary])
6964
_LT_TAGDECL([], [hardcode_automatic], [0],
6965
    [Set to "yes" if building a shared library automatically hardcodes DIR
6966
    into the library and all subsequent libraries and executables linked
6967
    against it])
6968
_LT_TAGDECL([], [inherit_rpath], [0],
6969
    [Set to yes if linker adds runtime paths of dependent libraries
6970
    to runtime path list])
6971
_LT_TAGDECL([], [link_all_deplibs], [0],
6972
    [Whether libtool must link a program against all its dependency libraries])
6973
_LT_TAGDECL([], [fix_srcfile_path], [1],
6974
    [Fix the shell variable $srcfile for the compiler])
6975
_LT_TAGDECL([], [always_export_symbols], [0],
6976
    [Set to "yes" if exported symbols are required])
6977
_LT_TAGDECL([], [export_symbols_cmds], [2],
6978
    [The commands to list exported symbols])
6979
_LT_TAGDECL([], [exclude_expsyms], [1],
6980
    [Symbols that should not be listed in the preloaded symbols])
6981
_LT_TAGDECL([], [include_expsyms], [1],
6982
    [Symbols that must always be exported])
6983
_LT_TAGDECL([], [prelink_cmds], [2],
6984
    [Commands necessary for linking programs (against libraries) with templates])
6985
_LT_TAGDECL([], [file_list_spec], [1],
6986
    [Specify filename containing input files])
6987
dnl FIXME: Not yet implemented
6988
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6989
dnl    [Compiler flag to generate thread safe objects])
6990
])# _LT_LINKER_SHLIBS
6991
6992
6993
# _LT_LANG_C_CONFIG([TAG])
6994
# ------------------------
6995
# Ensure that the configuration variables for a C compiler are suitably
6996
# defined.  These variables are subsequently used by _LT_CONFIG to write
6997
# the compiler configuration to `libtool'.
6998
m4_defun([_LT_LANG_C_CONFIG],
6999
[m4_require([_LT_DECL_EGREP])dnl
7000
lt_save_CC="$CC"
7001
AC_LANG_PUSH(C)
7002
7003
# Source file extension for C test sources.
7004
ac_ext=c
7005
7006
# Object file extension for compiled C test sources.
7007
objext=o
7008
_LT_TAGVAR(objext, $1)=$objext
7009
7010
# Code to be used in simple compile tests
7011
lt_simple_compile_test_code="int some_variable = 0;"
7012
7013
# Code to be used in simple link tests
7014
lt_simple_link_test_code='int main(){return(0);}'
7015
7016
_LT_TAG_COMPILER
7017
# Save the default compiler, since it gets overwritten when the other
7018
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7019
compiler_DEFAULT=$CC
7020
7021
# save warnings/boilerplate of simple test code
7022
_LT_COMPILER_BOILERPLATE
7023
_LT_LINKER_BOILERPLATE
7024
7025
if test -n "$compiler"; then
7026
  _LT_COMPILER_NO_RTTI($1)
7027
  _LT_COMPILER_PIC($1)
7028
  _LT_COMPILER_C_O($1)
7029
  _LT_COMPILER_FILE_LOCKS($1)
7030
  _LT_LINKER_SHLIBS($1)
7031
  _LT_SYS_DYNAMIC_LINKER($1)
7032
  _LT_LINKER_HARDCODE_LIBPATH($1)
7033
  LT_SYS_DLOPEN_SELF
7034
  _LT_CMD_STRIPLIB
7035
7036
  # Report which library types will actually be built
7037
  AC_MSG_CHECKING([if libtool supports shared libraries])
7038
  AC_MSG_RESULT([$can_build_shared])
7039
7040
  AC_MSG_CHECKING([whether to build shared libraries])
7041
  test "$can_build_shared" = "no" && enable_shared=no
7042
7043
  # On AIX, shared libraries and static libraries use the same namespace, and
7044
  # are all built from PIC.
7045
  case $host_os in
7046
  aix3*)
7047
    test "$enable_shared" = yes && enable_static=no
7048
    if test -n "$RANLIB"; then
7049
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
7050
      postinstall_cmds='$RANLIB $lib'
7051
    fi
7052
    ;;
7053
7054
  aix[[4-9]]*)
7055
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7056
      test "$enable_shared" = yes && enable_static=no
7057
    fi
7058
    ;;
7059
  esac
7060
  AC_MSG_RESULT([$enable_shared])
7061
7062
  AC_MSG_CHECKING([whether to build static libraries])
7063
  # Make sure either enable_shared or enable_static is yes.
7064
  test "$enable_shared" = yes || enable_static=yes
7065
  AC_MSG_RESULT([$enable_static])
7066
7067
  _LT_CONFIG($1)
7068
fi
7069
AC_LANG_POP
7070
CC="$lt_save_CC"
7071
])# _LT_LANG_C_CONFIG
7072
7073
7074
# _LT_PROG_CXX
7075
# ------------
7076
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
7077
# compiler, we have our own version here.
7078
m4_defun([_LT_PROG_CXX],
7079
[
7080
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
7081
AC_PROG_CXX
7082
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7083
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7084
    (test "X$CXX" != "Xg++"))) ; then
7085
  AC_PROG_CXXCPP
7086
else
7087
  _lt_caught_CXX_error=yes
7088
fi
7089
popdef([AC_MSG_ERROR])
7090
])# _LT_PROG_CXX
7091
7092
dnl aclocal-1.4 backwards compatibility:
7093
dnl AC_DEFUN([_LT_PROG_CXX], [])
7094
7095
7096
# _LT_LANG_CXX_CONFIG([TAG])
7097
# --------------------------
7098
# Ensure that the configuration variables for a C++ compiler are suitably
7099
# defined.  These variables are subsequently used by _LT_CONFIG to write
7100
# the compiler configuration to `libtool'.
7101
m4_defun([_LT_LANG_CXX_CONFIG],
7102
[AC_REQUIRE([_LT_PROG_CXX])dnl
7103
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7104
m4_require([_LT_DECL_EGREP])dnl
7105
7106
AC_LANG_PUSH(C++)
7107
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7108
_LT_TAGVAR(allow_undefined_flag, $1)=
7109
_LT_TAGVAR(always_export_symbols, $1)=no
7110
_LT_TAGVAR(archive_expsym_cmds, $1)=
7111
_LT_TAGVAR(compiler_needs_object, $1)=no
7112
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7113
_LT_TAGVAR(hardcode_direct, $1)=no
7114
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7115
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7116
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7117
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7118
_LT_TAGVAR(hardcode_minus_L, $1)=no
7119
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7120
_LT_TAGVAR(hardcode_automatic, $1)=no
7121
_LT_TAGVAR(inherit_rpath, $1)=no
7122
_LT_TAGVAR(module_cmds, $1)=
7123
_LT_TAGVAR(module_expsym_cmds, $1)=
7124
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7125
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7126
_LT_TAGVAR(no_undefined_flag, $1)=
7127
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7128
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7129
7130
# Source file extension for C++ test sources.
7131
ac_ext=cpp
7132
7133
# Object file extension for compiled C++ test sources.
7134
objext=o
7135
_LT_TAGVAR(objext, $1)=$objext
7136
7137
# No sense in running all these tests if we already determined that
7138
# the CXX compiler isn't working.  Some variables (like enable_shared)
7139
# are currently assumed to apply to all compilers on this platform,
7140
# and will be corrupted by setting them based on a non-working compiler.
7141
if test "$_lt_caught_CXX_error" != yes; then
7142
  # Code to be used in simple compile tests
7143
  lt_simple_compile_test_code="int some_variable = 0;"
7144
7145
  # Code to be used in simple link tests
7146
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7147
7148
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7149
  _LT_TAG_COMPILER
7150
7151
  # save warnings/boilerplate of simple test code
7152
  _LT_COMPILER_BOILERPLATE
7153
  _LT_LINKER_BOILERPLATE
7154
7155
  # Allow CC to be a program name with arguments.
7156
  lt_save_CC=$CC
7157
  lt_save_LD=$LD
7158
  lt_save_GCC=$GCC
7159
  GCC=$GXX
7160
  lt_save_with_gnu_ld=$with_gnu_ld
7161
  lt_save_path_LD=$lt_cv_path_LD
7162
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7163
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7164
  else
7165
    $as_unset lt_cv_prog_gnu_ld
7166
  fi
7167
  if test -n "${lt_cv_path_LDCXX+set}"; then
7168
    lt_cv_path_LD=$lt_cv_path_LDCXX
7169
  else
7170
    $as_unset lt_cv_path_LD
7171
  fi
7172
  test -z "${LDCXX+set}" || LD=$LDCXX
7173
  CC=${CXX-"c++"}
7174
  compiler=$CC
7175
  _LT_TAGVAR(compiler, $1)=$CC
7176
  _LT_CC_BASENAME([$compiler])
7177
7178
  if test -n "$compiler"; then
7179
    # We don't want -fno-exception when compiling C++ code, so set the
7180
    # no_builtin_flag separately
7181
    if test "$GXX" = yes; then
7182
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7183
    else
7184
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7185
    fi
7186
7187
    if test "$GXX" = yes; then
7188
      # Set up default GNU C++ configuration
7189
7190
      LT_PATH_LD
7191
7192
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
7193
      # archiving commands below assume that GNU ld is being used.
7194
      if test "$with_gnu_ld" = yes; then
7195
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7196
        _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'
7197
7198
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7199
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7200
7201
        # If archive_cmds runs LD, not CC, wlarc should be empty
7202
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7203
        #     investigate it a little bit more. (MM)
7204
        wlarc='${wl}'
7205
7206
        # ancient GNU ld didn't support --whole-archive et. al.
7207
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7208
	  $GREP 'no-whole-archive' > /dev/null; then
7209
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7210
        else
7211
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
7212
        fi
7213
      else
7214
        with_gnu_ld=no
7215
        wlarc=
7216
7217
        # A generic and very simple default shared library creation
7218
        # command for GNU C++ for the case where it uses the native
7219
        # linker, instead of GNU ld.  If possible, this setting should
7220
        # overridden to take advantage of the native linker features on
7221
        # the platform it is being used on.
7222
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7223
      fi
7224
7225
      # Commands to make compiler produce verbose output that lists
7226
      # what "hidden" libraries, object files and flags are used when
7227
      # linking a shared library.
7228
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7229
7230
    else
7231
      GXX=no
7232
      with_gnu_ld=no
7233
      wlarc=
7234
    fi
7235
7236
    # PORTME: fill in a description of your system's C++ link characteristics
7237
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7238
    _LT_TAGVAR(ld_shlibs, $1)=yes
7239
    case $host_os in
7240
      aix3*)
7241
        # FIXME: insert proper C++ library support
7242
        _LT_TAGVAR(ld_shlibs, $1)=no
7243
        ;;
7244
      aix[[4-9]]*)
7245
        if test "$host_cpu" = ia64; then
7246
          # On IA64, the linker does run time linking by default, so we don't
7247
          # have to do anything special.
7248
          aix_use_runtimelinking=no
7249
          exp_sym_flag='-Bexport'
7250
          no_entry_flag=""
7251
        else
7252
          aix_use_runtimelinking=no
7253
7254
          # Test if we are trying to use run time linking or normal
7255
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7256
          # need to do runtime linking.
7257
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7258
	    for ld_flag in $LDFLAGS; do
7259
	      case $ld_flag in
7260
	      *-brtl*)
7261
	        aix_use_runtimelinking=yes
7262
	        break
7263
	        ;;
7264
	      esac
7265
	    done
7266
	    ;;
7267
          esac
7268
7269
          exp_sym_flag='-bexport'
7270
          no_entry_flag='-bnoentry'
7271
        fi
7272
7273
        # When large executables or shared objects are built, AIX ld can
7274
        # have problems creating the table of contents.  If linking a library
7275
        # or program results in "error TOC overflow" add -mminimal-toc to
7276
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7277
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7278
7279
        _LT_TAGVAR(archive_cmds, $1)=''
7280
        _LT_TAGVAR(hardcode_direct, $1)=yes
7281
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7282
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7283
        _LT_TAGVAR(link_all_deplibs, $1)=yes
7284
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7285
7286
        if test "$GXX" = yes; then
7287
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
7288
          # We only want to do this on AIX 4.2 and lower, the check
7289
          # below for broken collect2 doesn't work under 4.3+
7290
	  collect2name=`${CC} -print-prog-name=collect2`
7291
	  if test -f "$collect2name" &&
7292
	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7293
	  then
7294
	    # We have reworked collect2
7295
	    :
7296
	  else
7297
	    # We have old collect2
7298
	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
7299
	    # It fails to find uninstalled libraries when the uninstalled
7300
	    # path is not listed in the libpath.  Setting hardcode_minus_L
7301
	    # to unsupported forces relinking
7302
	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
7303
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7304
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7305
	  fi
7306
          esac
7307
          shared_flag='-shared'
7308
	  if test "$aix_use_runtimelinking" = yes; then
7309
	    shared_flag="$shared_flag "'${wl}-G'
7310
	  fi
7311
        else
7312
          # not using gcc
7313
          if test "$host_cpu" = ia64; then
7314
	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7315
	  # chokes on -Wl,-G. The following line is correct:
7316
	  shared_flag='-G'
7317
          else
7318
	    if test "$aix_use_runtimelinking" = yes; then
7319
	      shared_flag='${wl}-G'
7320
	    else
7321
	      shared_flag='${wl}-bM:SRE'
7322
	    fi
7323
          fi
7324
        fi
7325
7326
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7327
        # It seems that -bexpall does not export symbols beginning with
7328
        # underscore (_), so it is better to generate a list of symbols to
7329
	# export.
7330
        _LT_TAGVAR(always_export_symbols, $1)=yes
7331
        if test "$aix_use_runtimelinking" = yes; then
7332
          # Warning - without using the other runtime loading flags (-brtl),
7333
          # -berok will link without error, but may produce a broken library.
7334
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7335
          # Determine the default libpath from the value encoded in an empty
7336
          # executable.
7337
          _LT_SYS_MODULE_PATH_AIX
7338
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7339
7340
          _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"
7341
        else
7342
          if test "$host_cpu" = ia64; then
7343
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7344
	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7345
	    _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"
7346
          else
7347
	    # Determine the default libpath from the value encoded in an
7348
	    # empty executable.
7349
	    _LT_SYS_MODULE_PATH_AIX
7350
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7351
	    # Warning - without using the other run time loading flags,
7352
	    # -berok will link without error, but may produce a broken library.
7353
	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7354
	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7355
	    # Exported symbols can be pulled into shared objects from archives
7356
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7357
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7358
	    # This is similar to how AIX traditionally builds its shared
7359
	    # libraries.
7360
	    _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'
7361
          fi
7362
        fi
7363
        ;;
7364
7365
      beos*)
7366
	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7367
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7368
	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7369
	  # support --undefined.  This deserves some investigation.  FIXME
7370
	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7371
	else
7372
	  _LT_TAGVAR(ld_shlibs, $1)=no
7373
	fi
7374
	;;
7375
7376
      chorus*)
7377
        case $cc_basename in
7378
          *)
7379
	  # FIXME: insert proper C++ library support
7380
	  _LT_TAGVAR(ld_shlibs, $1)=no
7381
	  ;;
7382
        esac
7383
        ;;
7384
7385
      cygwin* | mingw* | pw32* | cegcc*)
7386
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7387
        # as there is no search path for DLLs.
7388
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7389
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7390
        _LT_TAGVAR(always_export_symbols, $1)=no
7391
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7392
7393
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7394
          _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'
7395
          # If the export-symbols file already is a .def file (1st line
7396
          # is EXPORTS), use it as is; otherwise, prepend...
7397
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7398
	    cp $export_symbols $output_objdir/$soname.def;
7399
          else
7400
	    echo EXPORTS > $output_objdir/$soname.def;
7401
	    cat $export_symbols >> $output_objdir/$soname.def;
7402
          fi~
7403
          $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'
7404
        else
7405
          _LT_TAGVAR(ld_shlibs, $1)=no
7406
        fi
7407
        ;;
7408
      darwin* | rhapsody*)
7409
        _LT_DARWIN_LINKER_FEATURES($1)
7410
	;;
7411
7412
      dgux*)
7413
        case $cc_basename in
7414
          ec++*)
7415
	    # FIXME: insert proper C++ library support
7416
	    _LT_TAGVAR(ld_shlibs, $1)=no
7417
	    ;;
7418
          ghcx*)
7419
	    # Green Hills C++ Compiler
7420
	    # FIXME: insert proper C++ library support
7421
	    _LT_TAGVAR(ld_shlibs, $1)=no
7422
	    ;;
7423
          *)
7424
	    # FIXME: insert proper C++ library support
7425
	    _LT_TAGVAR(ld_shlibs, $1)=no
7426
	    ;;
7427
        esac
7428
        ;;
7429
7430
      freebsd[[12]]*)
7431
        # C++ shared libraries reported to be fairly broken before
7432
	# switch to ELF
7433
        _LT_TAGVAR(ld_shlibs, $1)=no
7434
        ;;
7435
7436
      freebsd-elf*)
7437
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7438
        ;;
7439
7440
      freebsd* | dragonfly*)
7441
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7442
        # conventions
7443
        _LT_TAGVAR(ld_shlibs, $1)=yes
7444
        ;;
7445
7446
      gnu*)
7447
        ;;
7448
7449
      hpux9*)
7450
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7451
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7452
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7453
        _LT_TAGVAR(hardcode_direct, $1)=yes
7454
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7455
				             # but as the default
7456
				             # location of the library.
7457
7458
        case $cc_basename in
7459
          CC*)
7460
            # FIXME: insert proper C++ library support
7461
            _LT_TAGVAR(ld_shlibs, $1)=no
7462
            ;;
7463
          aCC*)
7464
            _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'
7465
            # Commands to make compiler produce verbose output that lists
7466
            # what "hidden" libraries, object files and flags are used when
7467
            # linking a shared library.
7468
            #
7469
            # There doesn't appear to be a way to prevent this compiler from
7470
            # explicitly linking system object files so we need to strip them
7471
            # from the output so that they don't get included in the library
7472
            # dependencies.
7473
            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'
7474
            ;;
7475
          *)
7476
            if test "$GXX" = yes; then
7477
              _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'
7478
            else
7479
              # FIXME: insert proper C++ library support
7480
              _LT_TAGVAR(ld_shlibs, $1)=no
7481
            fi
7482
            ;;
7483
        esac
7484
        ;;
7485
7486
      hpux10*|hpux11*)
7487
        if test $with_gnu_ld = no; then
7488
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7489
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7490
7491
          case $host_cpu in
7492
            hppa*64*|ia64*)
7493
              ;;
7494
            *)
7495
	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7496
              ;;
7497
          esac
7498
        fi
7499
        case $host_cpu in
7500
          hppa*64*|ia64*)
7501
            _LT_TAGVAR(hardcode_direct, $1)=no
7502
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7503
            ;;
7504
          *)
7505
            _LT_TAGVAR(hardcode_direct, $1)=yes
7506
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7507
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7508
					         # but as the default
7509
					         # location of the library.
7510
            ;;
7511
        esac
7512
7513
        case $cc_basename in
7514
          CC*)
7515
	    # FIXME: insert proper C++ library support
7516
	    _LT_TAGVAR(ld_shlibs, $1)=no
7517
	    ;;
7518
          aCC*)
7519
	    case $host_cpu in
7520
	      hppa*64*)
7521
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7522
	        ;;
7523
	      ia64*)
7524
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7525
	        ;;
7526
	      *)
7527
	        _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'
7528
	        ;;
7529
	    esac
7530
	    # Commands to make compiler produce verbose output that lists
7531
	    # what "hidden" libraries, object files and flags are used when
7532
	    # linking a shared library.
7533
	    #
7534
	    # There doesn't appear to be a way to prevent this compiler from
7535
	    # explicitly linking system object files so we need to strip them
7536
	    # from the output so that they don't get included in the library
7537
	    # dependencies.
7538
	    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'
7539
	    ;;
7540
          *)
7541
	    if test "$GXX" = yes; then
7542
	      if test $with_gnu_ld = no; then
7543
	        case $host_cpu in
7544
	          hppa*64*)
7545
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7546
	            ;;
7547
	          ia64*)
7548
	            _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'
7549
	            ;;
7550
	          *)
7551
	            _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'
7552
	            ;;
7553
	        esac
7554
	      fi
7555
	    else
7556
	      # FIXME: insert proper C++ library support
7557
	      _LT_TAGVAR(ld_shlibs, $1)=no
7558
	    fi
7559
	    ;;
7560
        esac
7561
        ;;
7562
7563
      interix[[3-9]]*)
7564
	_LT_TAGVAR(hardcode_direct, $1)=no
7565
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7566
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7567
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7568
	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7569
	# Instead, shared libraries are loaded at an image base (0x10000000 by
7570
	# default) and relocated if they conflict, which is a slow very memory
7571
	# consuming and fragmenting process.  To avoid this, we pick a random,
7572
	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7573
	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7574
	_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'
7575
	_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'
7576
	;;
7577
      irix5* | irix6*)
7578
        case $cc_basename in
7579
          CC*)
7580
	    # SGI C++
7581
	    _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'
7582
7583
	    # Archives containing C++ object files must be created using
7584
	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7585
	    # necessary to make sure instantiated templates are included
7586
	    # in the archive.
7587
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7588
	    ;;
7589
          *)
7590
	    if test "$GXX" = yes; then
7591
	      if test "$with_gnu_ld" = no; then
7592
	        _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'
7593
	      else
7594
	        _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'
7595
	      fi
7596
	    fi
7597
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7598
	    ;;
7599
        esac
7600
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7601
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7602
        _LT_TAGVAR(inherit_rpath, $1)=yes
7603
        ;;
7604
7605
      linux* | k*bsd*-gnu)
7606
        case $cc_basename in
7607
          KCC*)
7608
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7609
7610
	    # KCC will only create a shared library if the output file
7611
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7612
	    # to its proper name (with version) after linking.
7613
	    _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'
7614
	    _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'
7615
	    # Commands to make compiler produce verbose output that lists
7616
	    # what "hidden" libraries, object files and flags are used when
7617
	    # linking a shared library.
7618
	    #
7619
	    # There doesn't appear to be a way to prevent this compiler from
7620
	    # explicitly linking system object files so we need to strip them
7621
	    # from the output so that they don't get included in the library
7622
	    # dependencies.
7623
	    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'
7624
7625
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7626
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7627
7628
	    # Archives containing C++ object files must be created using
7629
	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7630
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7631
	    ;;
7632
	  icpc* | ecpc* )
7633
	    # Intel C++
7634
	    with_gnu_ld=yes
7635
	    # version 8.0 and above of icpc choke on multiply defined symbols
7636
	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7637
	    # earlier do not add the objects themselves.
7638
	    case `$CC -V 2>&1` in
7639
	      *"Version 7."*)
7640
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7641
		_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'
7642
		;;
7643
	      *)  # Version 8.0 or newer
7644
	        tmp_idyn=
7645
	        case $host_cpu in
7646
		  ia64*) tmp_idyn=' -i_dynamic';;
7647
		esac
7648
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7649
		_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'
7650
		;;
7651
	    esac
7652
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7653
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7654
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7655
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7656
	    ;;
7657
          pgCC* | pgcpp*)
7658
            # Portland Group C++ compiler
7659
	    case `$CC -V` in
7660
	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
7661
	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7662
		rm -rf $tpldir~
7663
		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7664
		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
7665
	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7666
		rm -rf $tpldir~
7667
		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7668
		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
7669
		$RANLIB $oldlib'
7670
	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7671
		rm -rf $tpldir~
7672
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7673
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7674
	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7675
		rm -rf $tpldir~
7676
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7677
		$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'
7678
	      ;;
7679
	    *) # Version 6 will use weak symbols
7680
	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7681
	      _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'
7682
	      ;;
7683
	    esac
7684
7685
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7686
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7687
	    _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'
7688
            ;;
7689
	  cxx*)
7690
	    # Compaq C++
7691
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7692
	    _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'
7693
7694
	    runpath_var=LD_RUN_PATH
7695
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7696
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7697
7698
	    # Commands to make compiler produce verbose output that lists
7699
	    # what "hidden" libraries, object files and flags are used when
7700
	    # linking a shared library.
7701
	    #
7702
	    # There doesn't appear to be a way to prevent this compiler from
7703
	    # explicitly linking system object files so we need to strip them
7704
	    # from the output so that they don't get included in the library
7705
	    # dependencies.
7706
	    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'
7707
	    ;;
7708
	  xl*)
7709
	    # IBM XL 8.0 on PPC, with GNU ld
7710
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7711
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7712
	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7713
	    if test "x$supports_anon_versioning" = xyes; then
7714
	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7715
		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7716
		echo "local: *; };" >> $output_objdir/$libname.ver~
7717
		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7718
	    fi
7719
	    ;;
7720
	  *)
7721
	    case `$CC -V 2>&1 | sed 5q` in
7722
	    *Sun\ C*)
7723
	      # Sun C++ 5.9
7724
	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7725
	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7726
	      _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'
7727
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7728
	      _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'
7729
	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7730
7731
	      # Not sure whether something based on
7732
	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7733
	      # would be better.
7734
	      output_verbose_link_cmd='echo'
7735
7736
	      # Archives containing C++ object files must be created using
7737
	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7738
	      # necessary to make sure instantiated templates are included
7739
	      # in the archive.
7740
	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7741
	      ;;
7742
	    esac
7743
	    ;;
7744
	esac
7745
	;;
7746
7747
      lynxos*)
7748
        # FIXME: insert proper C++ library support
7749
	_LT_TAGVAR(ld_shlibs, $1)=no
7750
	;;
7751
7752
      m88k*)
7753
        # FIXME: insert proper C++ library support
7754
        _LT_TAGVAR(ld_shlibs, $1)=no
7755
	;;
7756
7757
      mvs*)
7758
        case $cc_basename in
7759
          cxx*)
7760
	    # FIXME: insert proper C++ library support
7761
	    _LT_TAGVAR(ld_shlibs, $1)=no
7762
	    ;;
7763
	  *)
7764
	    # FIXME: insert proper C++ library support
7765
	    _LT_TAGVAR(ld_shlibs, $1)=no
7766
	    ;;
7767
	esac
7768
	;;
7769
7770
      netbsd*)
7771
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7772
	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7773
	  wlarc=
7774
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7775
	  _LT_TAGVAR(hardcode_direct, $1)=yes
7776
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7777
	fi
7778
	# Workaround some broken pre-1.5 toolchains
7779
	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7780
	;;
7781
7782
      *nto* | *qnx*)
7783
        _LT_TAGVAR(ld_shlibs, $1)=yes
7784
	;;
7785
7786
      openbsd2*)
7787
        # C++ shared libraries are fairly broken
7788
	_LT_TAGVAR(ld_shlibs, $1)=no
7789
	;;
7790
7791
      openbsd*)
7792
	if test -f /usr/libexec/ld.so; then
7793
	  _LT_TAGVAR(hardcode_direct, $1)=yes
7794
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7795
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7796
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7797
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7798
	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7799
	    _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'
7800
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7801
	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7802
	  fi
7803
	  output_verbose_link_cmd=echo
7804
	else
7805
	  _LT_TAGVAR(ld_shlibs, $1)=no
7806
	fi
7807
	;;
7808
7809
      osf3* | osf4* | osf5*)
7810
        case $cc_basename in
7811
          KCC*)
7812
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7813
7814
	    # KCC will only create a shared library if the output file
7815
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7816
	    # to its proper name (with version) after linking.
7817
	    _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'
7818
7819
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7820
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7821
7822
	    # Archives containing C++ object files must be created using
7823
	    # the KAI C++ compiler.
7824
	    case $host in
7825
	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7826
	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7827
	    esac
7828
	    ;;
7829
          RCC*)
7830
	    # Rational C++ 2.4.1
7831
	    # FIXME: insert proper C++ library support
7832
	    _LT_TAGVAR(ld_shlibs, $1)=no
7833
	    ;;
7834
          cxx*)
7835
	    case $host in
7836
	      osf3*)
7837
	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7838
	        _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'
7839
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7840
		;;
7841
	      *)
7842
	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7843
	        _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'
7844
	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7845
	          echo "-hidden">> $lib.exp~
7846
	          $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~
7847
	          $RM $lib.exp'
7848
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7849
		;;
7850
	    esac
7851
7852
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7853
7854
	    # Commands to make compiler produce verbose output that lists
7855
	    # what "hidden" libraries, object files and flags are used when
7856
	    # linking a shared library.
7857
	    #
7858
	    # There doesn't appear to be a way to prevent this compiler from
7859
	    # explicitly linking system object files so we need to strip them
7860
	    # from the output so that they don't get included in the library
7861
	    # dependencies.
7862
	    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'
7863
	    ;;
7864
	  *)
7865
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7866
	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7867
	      case $host in
7868
	        osf3*)
7869
	          _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'
7870
		  ;;
7871
	        *)
7872
	          _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'
7873
		  ;;
7874
	      esac
7875
7876
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7877
	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7878
7879
	      # Commands to make compiler produce verbose output that lists
7880
	      # what "hidden" libraries, object files and flags are used when
7881
	      # linking a shared library.
7882
	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7883
7884
	    else
7885
	      # FIXME: insert proper C++ library support
7886
	      _LT_TAGVAR(ld_shlibs, $1)=no
7887
	    fi
7888
	    ;;
7889
        esac
7890
        ;;
7891
7892
      psos*)
7893
        # FIXME: insert proper C++ library support
7894
        _LT_TAGVAR(ld_shlibs, $1)=no
7895
        ;;
7896
7897
      sunos4*)
7898
        case $cc_basename in
7899
          CC*)
7900
	    # Sun C++ 4.x
7901
	    # FIXME: insert proper C++ library support
7902
	    _LT_TAGVAR(ld_shlibs, $1)=no
7903
	    ;;
7904
          lcc*)
7905
	    # Lucid
7906
	    # FIXME: insert proper C++ library support
7907
	    _LT_TAGVAR(ld_shlibs, $1)=no
7908
	    ;;
7909
          *)
7910
	    # FIXME: insert proper C++ library support
7911
	    _LT_TAGVAR(ld_shlibs, $1)=no
7912
	    ;;
7913
        esac
7914
        ;;
7915
7916
      solaris*)
7917
        case $cc_basename in
7918
          CC*)
7919
	    # Sun C++ 4.2, 5.x and Centerline C++
7920
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7921
	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7922
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7923
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7924
	      $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'
7925
7926
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7927
	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7928
	    case $host_os in
7929
	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7930
	      *)
7931
		# The compiler driver will combine and reorder linker options,
7932
		# but understands `-z linker_flag'.
7933
	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7934
		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7935
	        ;;
7936
	    esac
7937
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7938
7939
	    output_verbose_link_cmd='echo'
7940
7941
	    # Archives containing C++ object files must be created using
7942
	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7943
	    # necessary to make sure instantiated templates are included
7944
	    # in the archive.
7945
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7946
	    ;;
7947
          gcx*)
7948
	    # Green Hills C++ Compiler
7949
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7950
7951
	    # The C++ compiler must be used to create the archive.
7952
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7953
	    ;;
7954
          *)
7955
	    # GNU C++ compiler with Solaris linker
7956
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7957
	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7958
	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7959
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7960
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7961
		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7962
7963
	        # Commands to make compiler produce verbose output that lists
7964
	        # what "hidden" libraries, object files and flags are used when
7965
	        # linking a shared library.
7966
	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7967
	      else
7968
	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7969
	        # platform.
7970
	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7971
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7972
		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7973
7974
	        # Commands to make compiler produce verbose output that lists
7975
	        # what "hidden" libraries, object files and flags are used when
7976
	        # linking a shared library.
7977
	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7978
	      fi
7979
7980
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7981
	      case $host_os in
7982
		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7983
		*)
7984
		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7985
		  ;;
7986
	      esac
7987
	    fi
7988
	    ;;
7989
        esac
7990
        ;;
7991
7992
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7993
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7994
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7995
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7996
      runpath_var='LD_RUN_PATH'
7997
7998
      case $cc_basename in
7999
        CC*)
8000
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8001
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8002
	  ;;
8003
	*)
8004
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8005
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8006
	  ;;
8007
      esac
8008
      ;;
8009
8010
      sysv5* | sco3.2v5* | sco5v6*)
8011
	# Note: We can NOT use -z defs as we might desire, because we do not
8012
	# link with -lc, and that would cause any symbols used from libc to
8013
	# always be unresolved, which means just about no library would
8014
	# ever link correctly.  If we're not using GNU ld we use -z text
8015
	# though, which does catch some bad symbols but isn't as heavy-handed
8016
	# as -z defs.
8017
	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8018
	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8019
	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8020
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8021
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8022
	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8023
	_LT_TAGVAR(link_all_deplibs, $1)=yes
8024
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8025
	runpath_var='LD_RUN_PATH'
8026
8027
	case $cc_basename in
8028
          CC*)
8029
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8030
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8031
	    ;;
8032
	  *)
8033
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8034
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8035
	    ;;
8036
	esac
8037
      ;;
8038
8039
      tandem*)
8040
        case $cc_basename in
8041
          NCC*)
8042
	    # NonStop-UX NCC 3.20
8043
	    # FIXME: insert proper C++ library support
8044
	    _LT_TAGVAR(ld_shlibs, $1)=no
8045
	    ;;
8046
          *)
8047
	    # FIXME: insert proper C++ library support
8048
	    _LT_TAGVAR(ld_shlibs, $1)=no
8049
	    ;;
8050
        esac
8051
        ;;
8052
8053
      vxworks*)
8054
        # FIXME: insert proper C++ library support
8055
        _LT_TAGVAR(ld_shlibs, $1)=no
8056
        ;;
8057
8058
      *)
8059
        # FIXME: insert proper C++ library support
8060
        _LT_TAGVAR(ld_shlibs, $1)=no
8061
        ;;
8062
    esac
8063
8064
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8065
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8066
8067
    _LT_TAGVAR(GCC, $1)="$GXX"
8068
    _LT_TAGVAR(LD, $1)="$LD"
8069
8070
    ## CAVEAT EMPTOR:
8071
    ## There is no encapsulation within the following macros, do not change
8072
    ## the running order or otherwise move them around unless you know exactly
8073
    ## what you are doing...
8074
    _LT_SYS_HIDDEN_LIBDEPS($1)
8075
    _LT_COMPILER_PIC($1)
8076
    _LT_COMPILER_C_O($1)
8077
    _LT_COMPILER_FILE_LOCKS($1)
8078
    _LT_LINKER_SHLIBS($1)
8079
    _LT_SYS_DYNAMIC_LINKER($1)
8080
    _LT_LINKER_HARDCODE_LIBPATH($1)
8081
8082
    _LT_CONFIG($1)
8083
  fi # test -n "$compiler"
8084
8085
  CC=$lt_save_CC
8086
  LDCXX=$LD
8087
  LD=$lt_save_LD
8088
  GCC=$lt_save_GCC
8089
  with_gnu_ld=$lt_save_with_gnu_ld
8090
  lt_cv_path_LDCXX=$lt_cv_path_LD
8091
  lt_cv_path_LD=$lt_save_path_LD
8092
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8093
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8094
fi # test "$_lt_caught_CXX_error" != yes
8095
8096
AC_LANG_POP
8097
])# _LT_LANG_CXX_CONFIG
8098
8099
8100
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8101
# ---------------------------------
8102
# Figure out "hidden" library dependencies from verbose
8103
# compiler output when linking a shared library.
8104
# Parse the compiler output and extract the necessary
8105
# objects, libraries and library flags.
8106
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8107
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8108
# Dependencies to place before and after the object being linked:
8109
_LT_TAGVAR(predep_objects, $1)=
8110
_LT_TAGVAR(postdep_objects, $1)=
8111
_LT_TAGVAR(predeps, $1)=
8112
_LT_TAGVAR(postdeps, $1)=
8113
_LT_TAGVAR(compiler_lib_search_path, $1)=
8114
8115
dnl we can't use the lt_simple_compile_test_code here,
8116
dnl because it contains code intended for an executable,
8117
dnl not a library.  It's possible we should let each
8118
dnl tag define a new lt_????_link_test_code variable,
8119
dnl but it's only used here...
8120
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8121
int a;
8122
void foo (void) { a = 0; }
8123
_LT_EOF
8124
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8125
class Foo
8126
{
8127
public:
8128
  Foo (void) { a = 0; }
8129
private:
8130
  int a;
8131
};
8132
_LT_EOF
8133
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8134
      subroutine foo
8135
      implicit none
8136
      integer*4 a
8137
      a=0
8138
      return
8139
      end
8140
_LT_EOF
8141
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8142
      subroutine foo
8143
      implicit none
8144
      integer a
8145
      a=0
8146
      return
8147
      end
8148
_LT_EOF
8149
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8150
public class foo {
8151
  private int a;
8152
  public void bar (void) {
8153
    a = 0;
8154
  }
8155
};
8156
_LT_EOF
8157
])
8158
dnl Parse the compiler output and extract the necessary
8159
dnl objects, libraries and library flags.
8160
if AC_TRY_EVAL(ac_compile); then
8161
  # Parse the compiler output and extract the necessary
8162
  # objects, libraries and library flags.
8163
8164
  # Sentinel used to keep track of whether or not we are before
8165
  # the conftest object file.
8166
  pre_test_object_deps_done=no
8167
8168
  for p in `eval "$output_verbose_link_cmd"`; do
8169
    case $p in
8170
8171
    -L* | -R* | -l*)
8172
       # Some compilers place space between "-{L,R}" and the path.
8173
       # Remove the space.
8174
       if test $p = "-L" ||
8175
          test $p = "-R"; then
8176
	 prev=$p
8177
	 continue
8178
       else
8179
	 prev=
8180
       fi
8181
8182
       if test "$pre_test_object_deps_done" = no; then
8183
	 case $p in
8184
	 -L* | -R*)
8185
	   # Internal compiler library paths should come after those
8186
	   # provided the user.  The postdeps already come after the
8187
	   # user supplied libs so there is no need to process them.
8188
	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8189
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8190
	   else
8191
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8192
	   fi
8193
	   ;;
8194
	 # The "-l" case would never come before the object being
8195
	 # linked, so don't bother handling this case.
8196
	 esac
8197
       else
8198
	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8199
	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8200
	 else
8201
	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8202
	 fi
8203
       fi
8204
       ;;
8205
8206
    *.$objext)
8207
       # This assumes that the test object file only shows up
8208
       # once in the compiler output.
8209
       if test "$p" = "conftest.$objext"; then
8210
	 pre_test_object_deps_done=yes
8211
	 continue
8212
       fi
8213
8214
       if test "$pre_test_object_deps_done" = no; then
8215
	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8216
	   _LT_TAGVAR(predep_objects, $1)="$p"
8217
	 else
8218
	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8219
	 fi
8220
       else
8221
	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8222
	   _LT_TAGVAR(postdep_objects, $1)="$p"
8223
	 else
8224
	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8225
	 fi
8226
       fi
8227
       ;;
8228
8229
    *) ;; # Ignore the rest.
8230
8231
    esac
8232
  done
8233
8234
  # Clean up.
8235
  rm -f a.out a.exe
8236
else
8237
  echo "libtool.m4: error: problem compiling $1 test program"
8238
fi
8239
8240
$RM -f confest.$objext
8241
8242
# PORTME: override above test on systems where it is broken
8243
m4_if([$1], [CXX],
8244
[case $host_os in
8245
interix[[3-9]]*)
8246
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8247
  # hack all around it, let's just trust "g++" to DTRT.
8248
  _LT_TAGVAR(predep_objects,$1)=
8249
  _LT_TAGVAR(postdep_objects,$1)=
8250
  _LT_TAGVAR(postdeps,$1)=
8251
  ;;
8252
8253
linux*)
8254
  case `$CC -V 2>&1 | sed 5q` in
8255
  *Sun\ C*)
8256
    # Sun C++ 5.9
8257
8258
    # The more standards-conforming stlport4 library is
8259
    # incompatible with the Cstd library. Avoid specifying
8260
    # it if it's in CXXFLAGS. Ignore libCrun as
8261
    # -library=stlport4 depends on it.
8262
    case " $CXX $CXXFLAGS " in
8263
    *" -library=stlport4 "*)
8264
      solaris_use_stlport4=yes
8265
      ;;
8266
    esac
8267
8268
    if test "$solaris_use_stlport4" != yes; then
8269
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8270
    fi
8271
    ;;
8272
  esac
8273
  ;;
8274
8275
solaris*)
8276
  case $cc_basename in
8277
  CC*)
8278
    # The more standards-conforming stlport4 library is
8279
    # incompatible with the Cstd library. Avoid specifying
8280
    # it if it's in CXXFLAGS. Ignore libCrun as
8281
    # -library=stlport4 depends on it.
8282
    case " $CXX $CXXFLAGS " in
8283
    *" -library=stlport4 "*)
8284
      solaris_use_stlport4=yes
8285
      ;;
8286
    esac
8287
8288
    # Adding this requires a known-good setup of shared libraries for
8289
    # Sun compiler versions before 5.6, else PIC objects from an old
8290
    # archive will be linked into the output, leading to subtle bugs.
8291
    if test "$solaris_use_stlport4" != yes; then
8292
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8293
    fi
8294
    ;;
8295
  esac
8296
  ;;
8297
esac
8298
])
8299
8300
case " $_LT_TAGVAR(postdeps, $1) " in
8301
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8302
esac
8303
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8304
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8305
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8306
fi
8307
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8308
    [The directories searched by this compiler when creating a shared library])
8309
_LT_TAGDECL([], [predep_objects], [1],
8310
    [Dependencies to place before and after the objects being linked to
8311
    create a shared library])
8312
_LT_TAGDECL([], [postdep_objects], [1])
8313
_LT_TAGDECL([], [predeps], [1])
8314
_LT_TAGDECL([], [postdeps], [1])
8315
_LT_TAGDECL([], [compiler_lib_search_path], [1],
8316
    [The library search path used internally by the compiler when linking
8317
    a shared library])
8318
])# _LT_SYS_HIDDEN_LIBDEPS
8319
8320
8321
# _LT_PROG_F77
8322
# ------------
8323
# Since AC_PROG_F77 is broken, in that it returns the empty string
8324
# if there is no fortran compiler, we have our own version here.
8325
m4_defun([_LT_PROG_F77],
8326
[
8327
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
8328
AC_PROG_F77
8329
if test -z "$F77" || test "X$F77" = "Xno"; then
8330
  _lt_disable_F77=yes
8331
fi
8332
popdef([AC_MSG_ERROR])
8333
])# _LT_PROG_F77
8334
8335
dnl aclocal-1.4 backwards compatibility:
8336
dnl AC_DEFUN([_LT_PROG_F77], [])
8337
8338
8339
# _LT_LANG_F77_CONFIG([TAG])
8340
# --------------------------
8341
# Ensure that the configuration variables for a Fortran 77 compiler are
8342
# suitably defined.  These variables are subsequently used by _LT_CONFIG
8343
# to write the compiler configuration to `libtool'.
8344
m4_defun([_LT_LANG_F77_CONFIG],
8345
[AC_REQUIRE([_LT_PROG_F77])dnl
8346
AC_LANG_PUSH(Fortran 77)
8347
8348
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8349
_LT_TAGVAR(allow_undefined_flag, $1)=
8350
_LT_TAGVAR(always_export_symbols, $1)=no
8351
_LT_TAGVAR(archive_expsym_cmds, $1)=
8352
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8353
_LT_TAGVAR(hardcode_direct, $1)=no
8354
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8355
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8356
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8357
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8358
_LT_TAGVAR(hardcode_minus_L, $1)=no
8359
_LT_TAGVAR(hardcode_automatic, $1)=no
8360
_LT_TAGVAR(inherit_rpath, $1)=no
8361
_LT_TAGVAR(module_cmds, $1)=
8362
_LT_TAGVAR(module_expsym_cmds, $1)=
8363
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8364
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8365
_LT_TAGVAR(no_undefined_flag, $1)=
8366
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8367
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8368
8369
# Source file extension for f77 test sources.
8370
ac_ext=f
8371
8372
# Object file extension for compiled f77 test sources.
8373
objext=o
8374
_LT_TAGVAR(objext, $1)=$objext
8375
8376
# No sense in running all these tests if we already determined that
8377
# the F77 compiler isn't working.  Some variables (like enable_shared)
8378
# are currently assumed to apply to all compilers on this platform,
8379
# and will be corrupted by setting them based on a non-working compiler.
8380
if test "$_lt_disable_F77" != yes; then
8381
  # Code to be used in simple compile tests
8382
  lt_simple_compile_test_code="\
8383
      subroutine t
8384
      return
8385
      end
8386
"
8387
8388
  # Code to be used in simple link tests
8389
  lt_simple_link_test_code="\
8390
      program t
8391
      end
8392
"
8393
8394
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8395
  _LT_TAG_COMPILER
8396
8397
  # save warnings/boilerplate of simple test code
8398
  _LT_COMPILER_BOILERPLATE
8399
  _LT_LINKER_BOILERPLATE
8400
8401
  # Allow CC to be a program name with arguments.
8402
  lt_save_CC="$CC"
8403
  lt_save_GCC=$GCC
8404
  CC=${F77-"f77"}
8405
  compiler=$CC
8406
  _LT_TAGVAR(compiler, $1)=$CC
8407
  _LT_CC_BASENAME([$compiler])
8408
  GCC=$G77
8409
  if test -n "$compiler"; then
8410
    AC_MSG_CHECKING([if libtool supports shared libraries])
8411
    AC_MSG_RESULT([$can_build_shared])
8412
8413
    AC_MSG_CHECKING([whether to build shared libraries])
8414
    test "$can_build_shared" = "no" && enable_shared=no
8415
8416
    # On AIX, shared libraries and static libraries use the same namespace, and
8417
    # are all built from PIC.
8418
    case $host_os in
8419
      aix3*)
8420
        test "$enable_shared" = yes && enable_static=no
8421
        if test -n "$RANLIB"; then
8422
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8423
          postinstall_cmds='$RANLIB $lib'
8424
        fi
8425
        ;;
8426
      aix[[4-9]]*)
8427
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8428
	  test "$enable_shared" = yes && enable_static=no
8429
	fi
8430
        ;;
8431
    esac
8432
    AC_MSG_RESULT([$enable_shared])
8433
8434
    AC_MSG_CHECKING([whether to build static libraries])
8435
    # Make sure either enable_shared or enable_static is yes.
8436
    test "$enable_shared" = yes || enable_static=yes
8437
    AC_MSG_RESULT([$enable_static])
8438
8439
    _LT_TAGVAR(GCC, $1)="$G77"
8440
    _LT_TAGVAR(LD, $1)="$LD"
8441
8442
    ## CAVEAT EMPTOR:
8443
    ## There is no encapsulation within the following macros, do not change
8444
    ## the running order or otherwise move them around unless you know exactly
8445
    ## what you are doing...
8446
    _LT_COMPILER_PIC($1)
8447
    _LT_COMPILER_C_O($1)
8448
    _LT_COMPILER_FILE_LOCKS($1)
8449
    _LT_LINKER_SHLIBS($1)
8450
    _LT_SYS_DYNAMIC_LINKER($1)
8451
    _LT_LINKER_HARDCODE_LIBPATH($1)
8452
8453
    _LT_CONFIG($1)
8454
  fi # test -n "$compiler"
8455
8456
  GCC=$lt_save_GCC
8457
  CC="$lt_save_CC"
8458
fi # test "$_lt_disable_F77" != yes
8459
8460
AC_LANG_POP
8461
])# _LT_LANG_F77_CONFIG
8462
8463
8464
# _LT_PROG_FC
8465
# -----------
8466
# Since AC_PROG_FC is broken, in that it returns the empty string
8467
# if there is no fortran compiler, we have our own version here.
8468
m4_defun([_LT_PROG_FC],
8469
[
8470
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
8471
AC_PROG_FC
8472
if test -z "$FC" || test "X$FC" = "Xno"; then
8473
  _lt_disable_FC=yes
8474
fi
8475
popdef([AC_MSG_ERROR])
8476
])# _LT_PROG_FC
8477
8478
dnl aclocal-1.4 backwards compatibility:
8479
dnl AC_DEFUN([_LT_PROG_FC], [])
8480
8481
8482
# _LT_LANG_FC_CONFIG([TAG])
8483
# -------------------------
8484
# Ensure that the configuration variables for a Fortran compiler are
8485
# suitably defined.  These variables are subsequently used by _LT_CONFIG
8486
# to write the compiler configuration to `libtool'.
8487
m4_defun([_LT_LANG_FC_CONFIG],
8488
[AC_REQUIRE([_LT_PROG_FC])dnl
8489
AC_LANG_PUSH(Fortran)
8490
8491
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8492
_LT_TAGVAR(allow_undefined_flag, $1)=
8493
_LT_TAGVAR(always_export_symbols, $1)=no
8494
_LT_TAGVAR(archive_expsym_cmds, $1)=
8495
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8496
_LT_TAGVAR(hardcode_direct, $1)=no
8497
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8498
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8499
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8500
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8501
_LT_TAGVAR(hardcode_minus_L, $1)=no
8502
_LT_TAGVAR(hardcode_automatic, $1)=no
8503
_LT_TAGVAR(inherit_rpath, $1)=no
8504
_LT_TAGVAR(module_cmds, $1)=
8505
_LT_TAGVAR(module_expsym_cmds, $1)=
8506
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8507
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8508
_LT_TAGVAR(no_undefined_flag, $1)=
8509
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8510
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8511
8512
# Source file extension for fc test sources.
8513
ac_ext=${ac_fc_srcext-f}
8514
8515
# Object file extension for compiled fc test sources.
8516
objext=o
8517
_LT_TAGVAR(objext, $1)=$objext
8518
8519
# No sense in running all these tests if we already determined that
8520
# the FC compiler isn't working.  Some variables (like enable_shared)
8521
# are currently assumed to apply to all compilers on this platform,
8522
# and will be corrupted by setting them based on a non-working compiler.
8523
if test "$_lt_disable_FC" != yes; then
8524
  # Code to be used in simple compile tests
8525
  lt_simple_compile_test_code="\
8526
      subroutine t
8527
      return
8528
      end
8529
"
8530
8531
  # Code to be used in simple link tests
8532
  lt_simple_link_test_code="\
8533
      program t
8534
      end
8535
"
8536
8537
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8538
  _LT_TAG_COMPILER
8539
8540
  # save warnings/boilerplate of simple test code
8541
  _LT_COMPILER_BOILERPLATE
8542
  _LT_LINKER_BOILERPLATE
8543
8544
  # Allow CC to be a program name with arguments.
8545
  lt_save_CC="$CC"
8546
  lt_save_GCC=$GCC
8547
  CC=${FC-"f95"}
8548
  compiler=$CC
8549
  GCC=$ac_cv_fc_compiler_gnu
8550
8551
  _LT_TAGVAR(compiler, $1)=$CC
8552
  _LT_CC_BASENAME([$compiler])
8553
8554
  if test -n "$compiler"; then
8555
    AC_MSG_CHECKING([if libtool supports shared libraries])
8556
    AC_MSG_RESULT([$can_build_shared])
8557
8558
    AC_MSG_CHECKING([whether to build shared libraries])
8559
    test "$can_build_shared" = "no" && enable_shared=no
8560
8561
    # On AIX, shared libraries and static libraries use the same namespace, and
8562
    # are all built from PIC.
8563
    case $host_os in
8564
      aix3*)
8565
        test "$enable_shared" = yes && enable_static=no
8566
        if test -n "$RANLIB"; then
8567
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8568
          postinstall_cmds='$RANLIB $lib'
8569
        fi
8570
        ;;
8571
      aix[[4-9]]*)
8572
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8573
	  test "$enable_shared" = yes && enable_static=no
8574
	fi
8575
        ;;
8576
    esac
8577
    AC_MSG_RESULT([$enable_shared])
8578
8579
    AC_MSG_CHECKING([whether to build static libraries])
8580
    # Make sure either enable_shared or enable_static is yes.
8581
    test "$enable_shared" = yes || enable_static=yes
8582
    AC_MSG_RESULT([$enable_static])
8583
8584
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8585
    _LT_TAGVAR(LD, $1)="$LD"
8586
8587
    ## CAVEAT EMPTOR:
8588
    ## There is no encapsulation within the following macros, do not change
8589
    ## the running order or otherwise move them around unless you know exactly
8590
    ## what you are doing...
8591
    _LT_SYS_HIDDEN_LIBDEPS($1)
8592
    _LT_COMPILER_PIC($1)
8593
    _LT_COMPILER_C_O($1)
8594
    _LT_COMPILER_FILE_LOCKS($1)
8595
    _LT_LINKER_SHLIBS($1)
8596
    _LT_SYS_DYNAMIC_LINKER($1)
8597
    _LT_LINKER_HARDCODE_LIBPATH($1)
8598
8599
    _LT_CONFIG($1)
8600
  fi # test -n "$compiler"
8601
8602
  GCC=$lt_save_GCC
8603
  CC="$lt_save_CC"
8604
fi # test "$_lt_disable_FC" != yes
8605
8606
AC_LANG_POP
8607
])# _LT_LANG_FC_CONFIG
8608
8609
8610
# _LT_LANG_GCJ_CONFIG([TAG])
8611
# --------------------------
8612
# Ensure that the configuration variables for the GNU Java Compiler compiler
8613
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8614
# to write the compiler configuration to `libtool'.
8615
m4_defun([_LT_LANG_GCJ_CONFIG],
8616
[AC_REQUIRE([LT_PROG_GCJ])dnl
8617
AC_LANG_SAVE
8618
8619
# Source file extension for Java test sources.
8620
ac_ext=java
8621
8622
# Object file extension for compiled Java test sources.
8623
objext=o
8624
_LT_TAGVAR(objext, $1)=$objext
8625
8626
# Code to be used in simple compile tests
8627
lt_simple_compile_test_code="class foo {}"
8628
8629
# Code to be used in simple link tests
8630
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8631
8632
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8633
_LT_TAG_COMPILER
8634
8635
# save warnings/boilerplate of simple test code
8636
_LT_COMPILER_BOILERPLATE
8637
_LT_LINKER_BOILERPLATE
8638
8639
# Allow CC to be a program name with arguments.
8640
lt_save_CC="$CC"
8641
lt_save_GCC=$GCC
8642
GCC=yes
8643
CC=${GCJ-"gcj"}
8644
compiler=$CC
8645
_LT_TAGVAR(compiler, $1)=$CC
8646
_LT_TAGVAR(LD, $1)="$LD"
8647
_LT_CC_BASENAME([$compiler])
8648
8649
# GCJ did not exist at the time GCC didn't implicitly link libc in.
8650
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8651
8652
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8653
8654
if test -n "$compiler"; then
8655
  _LT_COMPILER_NO_RTTI($1)
8656
  _LT_COMPILER_PIC($1)
8657
  _LT_COMPILER_C_O($1)
8658
  _LT_COMPILER_FILE_LOCKS($1)
8659
  _LT_LINKER_SHLIBS($1)
8660
  _LT_LINKER_HARDCODE_LIBPATH($1)
8661
8662
  _LT_CONFIG($1)
8663
fi
8664
8665
AC_LANG_RESTORE
8666
8667
GCC=$lt_save_GCC
8668
CC="$lt_save_CC"
8669
])# _LT_LANG_GCJ_CONFIG
8670
8671
8672
# _LT_LANG_RC_CONFIG([TAG])
8673
# -------------------------
8674
# Ensure that the configuration variables for the Windows resource compiler
8675
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8676
# to write the compiler configuration to `libtool'.
8677
m4_defun([_LT_LANG_RC_CONFIG],
8678
[AC_REQUIRE([LT_PROG_RC])dnl
8679
AC_LANG_SAVE
8680
8681
# Source file extension for RC test sources.
8682
ac_ext=rc
8683
8684
# Object file extension for compiled RC test sources.
8685
objext=o
8686
_LT_TAGVAR(objext, $1)=$objext
8687
8688
# Code to be used in simple compile tests
8689
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8690
8691
# Code to be used in simple link tests
8692
lt_simple_link_test_code="$lt_simple_compile_test_code"
8693
8694
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8695
_LT_TAG_COMPILER
8696
8697
# save warnings/boilerplate of simple test code
8698
_LT_COMPILER_BOILERPLATE
8699
_LT_LINKER_BOILERPLATE
8700
8701
# Allow CC to be a program name with arguments.
8702
lt_save_CC="$CC"
8703
lt_save_GCC=$GCC
8704
GCC=
8705
CC=${RC-"windres"}
8706
compiler=$CC
8707
_LT_TAGVAR(compiler, $1)=$CC
8708
_LT_CC_BASENAME([$compiler])
8709
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8710
8711
if test -n "$compiler"; then
8712
  :
8713
  _LT_CONFIG($1)
8714
fi
8715
8716
GCC=$lt_save_GCC
8717
AC_LANG_RESTORE
8718
CC="$lt_save_CC"
8719
])# _LT_LANG_RC_CONFIG
8720
8721
8722
# LT_PROG_GCJ
8723
# -----------
8724
AC_DEFUN([LT_PROG_GCJ],
8725
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8726
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8727
    [AC_CHECK_TOOL(GCJ, gcj,)
8728
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8729
      AC_SUBST(GCJFLAGS)])])[]dnl
8730
])
8731
8732
# Old name:
8733
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8734
dnl aclocal-1.4 backwards compatibility:
8735
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8736
8737
8738
# LT_PROG_RC
8739
# ----------
8740
AC_DEFUN([LT_PROG_RC],
8741
[AC_CHECK_TOOL(RC, windres,)
8742
])
8743
8744
# Old name:
8745
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8746
dnl aclocal-1.4 backwards compatibility:
8747
dnl AC_DEFUN([LT_AC_PROG_RC], [])
8748
8749
8750
# _LT_DECL_EGREP
8751
# --------------
8752
# If we don't have a new enough Autoconf to choose the best grep
8753
# available, choose the one first in the user's PATH.
8754
m4_defun([_LT_DECL_EGREP],
8755
[AC_REQUIRE([AC_PROG_EGREP])dnl
8756
AC_REQUIRE([AC_PROG_FGREP])dnl
8757
test -z "$GREP" && GREP=grep
8758
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8759
_LT_DECL([], [EGREP], [1], [An ERE matcher])
8760
_LT_DECL([], [FGREP], [1], [A literal string matcher])
8761
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8762
AC_SUBST([GREP])
8763
])
8764
8765
8766
# _LT_DECL_OBJDUMP
8767
# --------------
8768
# If we don't have a new enough Autoconf to choose the best objdump
8769
# available, choose the one first in the user's PATH.
8770
m4_defun([_LT_DECL_OBJDUMP],
8771
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8772
test -z "$OBJDUMP" && OBJDUMP=objdump
8773
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8774
AC_SUBST([OBJDUMP])
8775
])
8776
8777
8778
# _LT_DECL_SED
8779
# ------------
8780
# Check for a fully-functional sed program, that truncates
8781
# as few characters as possible.  Prefer GNU sed if found.
8782
m4_defun([_LT_DECL_SED],
8783
[AC_PROG_SED
8784
test -z "$SED" && SED=sed
8785
Xsed="$SED -e 1s/^X//"
8786
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8787
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8788
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8789
])# _LT_DECL_SED
8790
8791
m4_ifndef([AC_PROG_SED], [
8792
# NOTE: This macro has been submitted for inclusion into   #
8793
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8794
#  a released version of Autoconf we should remove this    #
8795
#  macro and use it instead.                               #
8796
8797
m4_defun([AC_PROG_SED],
8798
[AC_MSG_CHECKING([for a sed that does not truncate output])
8799
AC_CACHE_VAL(lt_cv_path_SED,
8800
[# Loop through the user's path and test for sed and gsed.
8801
# Then use that list of sed's as ones to test for truncation.
8802
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8803
for as_dir in $PATH
8804
do
8805
  IFS=$as_save_IFS
8806
  test -z "$as_dir" && as_dir=.
8807
  for lt_ac_prog in sed gsed; do
8808
    for ac_exec_ext in '' $ac_executable_extensions; do
8809
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8810
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8811
      fi
8812
    done
8813
  done
8814
done
8815
IFS=$as_save_IFS
8816
lt_ac_max=0
8817
lt_ac_count=0
8818
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8819
# along with /bin/sed that truncates output.
8820
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8821
  test ! -f $lt_ac_sed && continue
8822
  cat /dev/null > conftest.in
8823
  lt_ac_count=0
8824
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8825
  # Check for GNU sed and select it if it is found.
8826
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8827
    lt_cv_path_SED=$lt_ac_sed
8828
    break
8829
  fi
8830
  while true; do
8831
    cat conftest.in conftest.in >conftest.tmp
8832
    mv conftest.tmp conftest.in
8833
    cp conftest.in conftest.nl
8834
    echo >>conftest.nl
8835
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8836
    cmp -s conftest.out conftest.nl || break
8837
    # 10000 chars as input seems more than enough
8838
    test $lt_ac_count -gt 10 && break
8839
    lt_ac_count=`expr $lt_ac_count + 1`
8840
    if test $lt_ac_count -gt $lt_ac_max; then
8841
      lt_ac_max=$lt_ac_count
8842
      lt_cv_path_SED=$lt_ac_sed
8843
    fi
8844
  done
8845
done
8846
])
8847
SED=$lt_cv_path_SED
8848
AC_SUBST([SED])
8849
AC_MSG_RESULT([$SED])
8850
])#AC_PROG_SED
8851
])#m4_ifndef
8852
8853
# Old name:
8854
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8855
dnl aclocal-1.4 backwards compatibility:
8856
dnl AC_DEFUN([LT_AC_PROG_SED], [])
8857
8858
8859
# _LT_CHECK_SHELL_FEATURES
8860
# ------------------------
8861
# Find out whether the shell is Bourne or XSI compatible,
8862
# or has some other useful features.
8863
m4_defun([_LT_CHECK_SHELL_FEATURES],
8864
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8865
# Try some XSI features
8866
xsi_shell=no
8867
( _lt_dummy="a/b/c"
8868
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8869
      = c,a/b,, \
8870
    && eval 'test $(( 1 + 1 )) -eq 2 \
8871
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8872
  && xsi_shell=yes
8873
AC_MSG_RESULT([$xsi_shell])
8874
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8875
8876
AC_MSG_CHECKING([whether the shell understands "+="])
8877
lt_shell_append=no
8878
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8879
    >/dev/null 2>&1 \
8880
  && lt_shell_append=yes
8881
AC_MSG_RESULT([$lt_shell_append])
8882
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8883
8884
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8885
  lt_unset=unset
8886
else
8887
  lt_unset=false
8888
fi
8889
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8890
8891
# test EBCDIC or ASCII
8892
case `echo X|tr X '\101'` in
8893
 A) # ASCII based system
8894
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8895
  lt_SP2NL='tr \040 \012'
8896
  lt_NL2SP='tr \015\012 \040\040'
8897
  ;;
8898
 *) # EBCDIC based system
8899
  lt_SP2NL='tr \100 \n'
8900
  lt_NL2SP='tr \r\n \100\100'
8901
  ;;
8902
esac
8903
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8904
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8905
])# _LT_CHECK_SHELL_FEATURES
8906
8907
8908
# _LT_PROG_XSI_SHELLFNS
8909
# ---------------------
8910
# Bourne and XSI compatible variants of some useful shell functions.
8911
m4_defun([_LT_PROG_XSI_SHELLFNS],
8912
[case $xsi_shell in
8913
  yes)
8914
    cat << \_LT_EOF >> "$cfgfile"
8915
8916
# func_dirname file append nondir_replacement
8917
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8918
# otherwise set result to NONDIR_REPLACEMENT.
8919
func_dirname ()
8920
{
8921
  case ${1} in
8922
    */*) func_dirname_result="${1%/*}${2}" ;;
8923
    *  ) func_dirname_result="${3}" ;;
8924
  esac
8925
}
8926
8927
# func_basename file
8928
func_basename ()
8929
{
8930
  func_basename_result="${1##*/}"
8931
}
8932
8933
# func_dirname_and_basename file append nondir_replacement
8934
# perform func_basename and func_dirname in a single function
8935
# call:
8936
#   dirname:  Compute the dirname of FILE.  If nonempty,
8937
#             add APPEND to the result, otherwise set result
8938
#             to NONDIR_REPLACEMENT.
8939
#             value returned in "$func_dirname_result"
8940
#   basename: Compute filename of FILE.
8941
#             value retuned in "$func_basename_result"
8942
# Implementation must be kept synchronized with func_dirname
8943
# and func_basename. For efficiency, we do not delegate to
8944
# those functions but instead duplicate the functionality here.
8945
func_dirname_and_basename ()
8946
{
8947
  case ${1} in
8948
    */*) func_dirname_result="${1%/*}${2}" ;;
8949
    *  ) func_dirname_result="${3}" ;;
8950
  esac
8951
  func_basename_result="${1##*/}"
8952
}
8953
8954
# func_stripname prefix suffix name
8955
# strip PREFIX and SUFFIX off of NAME.
8956
# PREFIX and SUFFIX must not contain globbing or regex special
8957
# characters, hashes, percent signs, but SUFFIX may contain a leading
8958
# dot (in which case that matches only a dot).
8959
func_stripname ()
8960
{
8961
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8962
  # positional parameters, so assign one to ordinary parameter first.
8963
  func_stripname_result=${3}
8964
  func_stripname_result=${func_stripname_result#"${1}"}
8965
  func_stripname_result=${func_stripname_result%"${2}"}
8966
}
8967
8968
# func_opt_split
8969
func_opt_split ()
8970
{
8971
  func_opt_split_opt=${1%%=*}
8972
  func_opt_split_arg=${1#*=}
8973
}
8974
8975
# func_lo2o object
8976
func_lo2o ()
8977
{
8978
  case ${1} in
8979
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8980
    *)    func_lo2o_result=${1} ;;
8981
  esac
8982
}
8983
8984
# func_xform libobj-or-source
8985
func_xform ()
8986
{
8987
  func_xform_result=${1%.*}.lo
8988
}
8989
8990
# func_arith arithmetic-term...
8991
func_arith ()
8992
{
8993
  func_arith_result=$(( $[*] ))
8994
}
8995
8996
# func_len string
8997
# STRING may not start with a hyphen.
8998
func_len ()
8999
{
9000
  func_len_result=${#1}
9001
}
9002
9003
_LT_EOF
9004
    ;;
9005
  *) # Bourne compatible functions.
9006
    cat << \_LT_EOF >> "$cfgfile"
9007
9008
# func_dirname file append nondir_replacement
9009
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9010
# otherwise set result to NONDIR_REPLACEMENT.
9011
func_dirname ()
9012
{
9013
  # Extract subdirectory from the argument.
9014
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
9015
  if test "X$func_dirname_result" = "X${1}"; then
9016
    func_dirname_result="${3}"
9017
  else
9018
    func_dirname_result="$func_dirname_result${2}"
9019
  fi
9020
}
9021
9022
# func_basename file
9023
func_basename ()
9024
{
9025
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
9026
}
9027
9028
dnl func_dirname_and_basename
9029
dnl A portable version of this function is already defined in general.m4sh
9030
dnl so there is no need for it here.
9031
9032
# func_stripname prefix suffix name
9033
# strip PREFIX and SUFFIX off of NAME.
9034
# PREFIX and SUFFIX must not contain globbing or regex special
9035
# characters, hashes, percent signs, but SUFFIX may contain a leading
9036
# dot (in which case that matches only a dot).
9037
# func_strip_suffix prefix name
9038
func_stripname ()
9039
{
9040
  case ${2} in
9041
    .*) func_stripname_result=`$ECHO "X${3}" \
9042
           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
9043
    *)  func_stripname_result=`$ECHO "X${3}" \
9044
           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
9045
  esac
9046
}
9047
9048
# sed scripts:
9049
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
9050
my_sed_long_arg='1s/^-[[^=]]*=//'
9051
9052
# func_opt_split
9053
func_opt_split ()
9054
{
9055
  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
9056
  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
9057
}
9058
9059
# func_lo2o object
9060
func_lo2o ()
9061
{
9062
  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
9063
}
9064
9065
# func_xform libobj-or-source
9066
func_xform ()
9067
{
9068
  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
9069
}
9070
9071
# func_arith arithmetic-term...
9072
func_arith ()
9073
{
9074
  func_arith_result=`expr "$[@]"`
9075
}
9076
9077
# func_len string
9078
# STRING may not start with a hyphen.
9079
func_len ()
9080
{
9081
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9082
}
9083
9084
_LT_EOF
9085
esac
9086
9087
case $lt_shell_append in
9088
  yes)
9089
    cat << \_LT_EOF >> "$cfgfile"
9090
9091
# func_append var value
9092
# Append VALUE to the end of shell variable VAR.
9093
func_append ()
9094
{
9095
  eval "$[1]+=\$[2]"
9096
}
9097
_LT_EOF
9098
    ;;
9099
  *)
9100
    cat << \_LT_EOF >> "$cfgfile"
9101
9102
# func_append var value
9103
# Append VALUE to the end of shell variable VAR.
9104
func_append ()
9105
{
9106
  eval "$[1]=\$$[1]\$[2]"
9107
}
9108
9109
_LT_EOF
9110
    ;;
9111
  esac
9112
])
9113
9114
# Helper functions for option handling.                    -*- Autoconf -*-
9115
#
9116
#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9117
#   Written by Gary V. Vaughan, 2004
9118
#
9119
# This file is free software; the Free Software Foundation gives
9120
# unlimited permission to copy and/or distribute it, with or without
9121
# modifications, as long as this notice is preserved.
9122
9123
# serial 6 ltoptions.m4
9124
9125
# This is to help aclocal find these macros, as it can't see m4_define.
9126
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9127
9128
9129
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9130
# ------------------------------------------
9131
m4_define([_LT_MANGLE_OPTION],
9132
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9133
9134
9135
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9136
# ---------------------------------------
9137
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9138
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9139
# saved as a flag.
9140
m4_define([_LT_SET_OPTION],
9141
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9142
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9143
        _LT_MANGLE_DEFUN([$1], [$2]),
9144
    [m4_warning([Unknown $1 option `$2'])])[]dnl
9145
])
9146
9147
9148
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9149
# ------------------------------------------------------------
9150
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9151
m4_define([_LT_IF_OPTION],
9152
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9153
9154
9155
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9156
# -------------------------------------------------------
9157
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9158
# are set.
9159
m4_define([_LT_UNLESS_OPTIONS],
9160
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9161
	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9162
		      [m4_define([$0_found])])])[]dnl
9163
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9164
])[]dnl
9165
])
9166
9167
9168
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9169
# ----------------------------------------
9170
# OPTION-LIST is a space-separated list of Libtool options associated
9171
# with MACRO-NAME.  If any OPTION has a matching handler declared with
9172
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9173
# the unknown option and exit.
9174
m4_defun([_LT_SET_OPTIONS],
9175
[# Set options
9176
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9177
    [_LT_SET_OPTION([$1], _LT_Option)])
9178
9179
m4_if([$1],[LT_INIT],[
9180
  dnl
9181
  dnl Simply set some default values (i.e off) if boolean options were not
9182
  dnl specified:
9183
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9184
  ])
9185
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9186
  ])
9187
  dnl
9188
  dnl If no reference was made to various pairs of opposing options, then
9189
  dnl we run the default mode handler for the pair.  For example, if neither
9190
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
9191
  dnl archives by default:
9192
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9193
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9194
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9195
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9196
  		   [_LT_ENABLE_FAST_INSTALL])
9197
  ])
9198
])# _LT_SET_OPTIONS
9199
9200
9201
9202
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9203
# -----------------------------------------
9204
m4_define([_LT_MANGLE_DEFUN],
9205
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9206
9207
9208
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9209
# -----------------------------------------------
9210
m4_define([LT_OPTION_DEFINE],
9211
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9212
])# LT_OPTION_DEFINE
9213
9214
9215
# dlopen
9216
# ------
9217
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9218
])
9219
9220
AU_DEFUN([AC_LIBTOOL_DLOPEN],
9221
[_LT_SET_OPTION([LT_INIT], [dlopen])
9222
AC_DIAGNOSE([obsolete],
9223
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9224
put the `dlopen' option into LT_INIT's first parameter.])
9225
])
9226
9227
dnl aclocal-1.4 backwards compatibility:
9228
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9229
9230
9231
# win32-dll
9232
# ---------
9233
# Declare package support for building win32 dll's.
9234
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9235
[enable_win32_dll=yes
9236
9237
case $host in
9238
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
9239
  AC_CHECK_TOOL(AS, as, false)
9240
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9241
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9242
  ;;
9243
esac
9244
9245
test -z "$AS" && AS=as
9246
_LT_DECL([], [AS],      [0], [Assembler program])dnl
9247
9248
test -z "$DLLTOOL" && DLLTOOL=dlltool
9249
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
9250
9251
test -z "$OBJDUMP" && OBJDUMP=objdump
9252
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
9253
])# win32-dll
9254
9255
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9256
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9257
_LT_SET_OPTION([LT_INIT], [win32-dll])
9258
AC_DIAGNOSE([obsolete],
9259
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9260
put the `win32-dll' option into LT_INIT's first parameter.])
9261
])
9262
9263
dnl aclocal-1.4 backwards compatibility:
9264
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9265
9266
9267
# _LT_ENABLE_SHARED([DEFAULT])
9268
# ----------------------------
9269
# implement the --enable-shared flag, and supports the `shared' and
9270
# `disable-shared' LT_INIT options.
9271
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9272
m4_define([_LT_ENABLE_SHARED],
9273
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9274
AC_ARG_ENABLE([shared],
9275
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9276
	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9277
    [p=${PACKAGE-default}
9278
    case $enableval in
9279
    yes) enable_shared=yes ;;
9280
    no) enable_shared=no ;;
9281
    *)
9282
      enable_shared=no
9283
      # Look at the argument we got.  We use all the common list separators.
9284
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9285
      for pkg in $enableval; do
9286
	IFS="$lt_save_ifs"
9287
	if test "X$pkg" = "X$p"; then
9288
	  enable_shared=yes
9289
	fi
9290
      done
9291
      IFS="$lt_save_ifs"
9292
      ;;
9293
    esac],
9294
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9295
9296
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9297
	[Whether or not to build shared libraries])
9298
])# _LT_ENABLE_SHARED
9299
9300
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9301
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9302
9303
# Old names:
9304
AC_DEFUN([AC_ENABLE_SHARED],
9305
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9306
])
9307
9308
AC_DEFUN([AC_DISABLE_SHARED],
9309
[_LT_SET_OPTION([LT_INIT], [disable-shared])
9310
])
9311
9312
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9313
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9314
9315
dnl aclocal-1.4 backwards compatibility:
9316
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9317
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9318
9319
9320
9321
# _LT_ENABLE_STATIC([DEFAULT])
9322
# ----------------------------
9323
# implement the --enable-static flag, and support the `static' and
9324
# `disable-static' LT_INIT options.
9325
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9326
m4_define([_LT_ENABLE_STATIC],
9327
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9328
AC_ARG_ENABLE([static],
9329
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9330
	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9331
    [p=${PACKAGE-default}
9332
    case $enableval in
9333
    yes) enable_static=yes ;;
9334
    no) enable_static=no ;;
9335
    *)
9336
     enable_static=no
9337
      # Look at the argument we got.  We use all the common list separators.
9338
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9339
      for pkg in $enableval; do
9340
	IFS="$lt_save_ifs"
9341
	if test "X$pkg" = "X$p"; then
9342
	  enable_static=yes
9343
	fi
9344
      done
9345
      IFS="$lt_save_ifs"
9346
      ;;
9347
    esac],
9348
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9349
9350
    _LT_DECL([build_old_libs], [enable_static], [0],
9351
	[Whether or not to build static libraries])
9352
])# _LT_ENABLE_STATIC
9353
9354
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9355
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9356
9357
# Old names:
9358
AC_DEFUN([AC_ENABLE_STATIC],
9359
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9360
])
9361
9362
AC_DEFUN([AC_DISABLE_STATIC],
9363
[_LT_SET_OPTION([LT_INIT], [disable-static])
9364
])
9365
9366
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9367
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9368
9369
dnl aclocal-1.4 backwards compatibility:
9370
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9371
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9372
9373
9374
9375
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9376
# ----------------------------------
9377
# implement the --enable-fast-install flag, and support the `fast-install'
9378
# and `disable-fast-install' LT_INIT options.
9379
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9380
m4_define([_LT_ENABLE_FAST_INSTALL],
9381
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9382
AC_ARG_ENABLE([fast-install],
9383
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9384
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9385
    [p=${PACKAGE-default}
9386
    case $enableval in
9387
    yes) enable_fast_install=yes ;;
9388
    no) enable_fast_install=no ;;
9389
    *)
9390
      enable_fast_install=no
9391
      # Look at the argument we got.  We use all the common list separators.
9392
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9393
      for pkg in $enableval; do
9394
	IFS="$lt_save_ifs"
9395
	if test "X$pkg" = "X$p"; then
9396
	  enable_fast_install=yes
9397
	fi
9398
      done
9399
      IFS="$lt_save_ifs"
9400
      ;;
9401
    esac],
9402
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9403
9404
_LT_DECL([fast_install], [enable_fast_install], [0],
9405
	 [Whether or not to optimize for fast installation])dnl
9406
])# _LT_ENABLE_FAST_INSTALL
9407
9408
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9409
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9410
9411
# Old names:
9412
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9413
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9414
AC_DIAGNOSE([obsolete],
9415
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9416
the `fast-install' option into LT_INIT's first parameter.])
9417
])
9418
9419
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9420
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9421
AC_DIAGNOSE([obsolete],
9422
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9423
the `disable-fast-install' option into LT_INIT's first parameter.])
9424
])
9425
9426
dnl aclocal-1.4 backwards compatibility:
9427
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9428
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9429
9430
9431
# _LT_WITH_PIC([MODE])
9432
# --------------------
9433
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9434
# LT_INIT options.
9435
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9436
m4_define([_LT_WITH_PIC],
9437
[AC_ARG_WITH([pic],
9438
    [AS_HELP_STRING([--with-pic],
9439
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9440
    [pic_mode="$withval"],
9441
    [pic_mode=default])
9442
9443
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9444
9445
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9446
])# _LT_WITH_PIC
9447
9448
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9449
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9450
9451
# Old name:
9452
AU_DEFUN([AC_LIBTOOL_PICMODE],
9453
[_LT_SET_OPTION([LT_INIT], [pic-only])
9454
AC_DIAGNOSE([obsolete],
9455
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9456
put the `pic-only' option into LT_INIT's first parameter.])
9457
])
9458
9459
dnl aclocal-1.4 backwards compatibility:
9460
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9461
9462
9463
m4_define([_LTDL_MODE], [])
9464
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9465
		 [m4_define([_LTDL_MODE], [nonrecursive])])
9466
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9467
		 [m4_define([_LTDL_MODE], [recursive])])
9468
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9469
		 [m4_define([_LTDL_MODE], [subproject])])
9470
9471
m4_define([_LTDL_TYPE], [])
9472
LT_OPTION_DEFINE([LTDL_INIT], [installable],
9473
		 [m4_define([_LTDL_TYPE], [installable])])
9474
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9475
		 [m4_define([_LTDL_TYPE], [convenience])])
9476
9477
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9478
#
9479
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9480
# Written by Gary V. Vaughan, 2004
9481
#
9482
# This file is free software; the Free Software Foundation gives
9483
# unlimited permission to copy and/or distribute it, with or without
9484
# modifications, as long as this notice is preserved.
9485
9486
# serial 6 ltsugar.m4
9487
9488
# This is to help aclocal find these macros, as it can't see m4_define.
9489
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9490
9491
9492
# lt_join(SEP, ARG1, [ARG2...])
9493
# -----------------------------
9494
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9495
# associated separator.
9496
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9497
# versions in m4sugar had bugs.
9498
m4_define([lt_join],
9499
[m4_if([$#], [1], [],
9500
       [$#], [2], [[$2]],
9501
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9502
m4_define([_lt_join],
9503
[m4_if([$#$2], [2], [],
9504
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9505
9506
9507
# lt_car(LIST)
9508
# lt_cdr(LIST)
9509
# ------------
9510
# Manipulate m4 lists.
9511
# These macros are necessary as long as will still need to support
9512
# Autoconf-2.59 which quotes differently.
9513
m4_define([lt_car], [[$1]])
9514
m4_define([lt_cdr],
9515
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9516
       [$#], 1, [],
9517
       [m4_dquote(m4_shift($@))])])
9518
m4_define([lt_unquote], $1)
9519
9520
9521
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9522
# ------------------------------------------
9523
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9524
# Note that neither SEPARATOR nor STRING are expanded; they are appended
9525
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9526
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9527
# than defined and empty).
9528
#
9529
# This macro is needed until we can rely on Autoconf 2.62, since earlier
9530
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9531
m4_define([lt_append],
9532
[m4_define([$1],
9533
	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9534
9535
9536
9537
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9538
# ----------------------------------------------------------
9539
# Produce a SEP delimited list of all paired combinations of elements of
9540
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9541
# has the form PREFIXmINFIXSUFFIXn.
9542
# Needed until we can rely on m4_combine added in Autoconf 2.62.
9543
m4_define([lt_combine],
9544
[m4_if(m4_eval([$# > 3]), [1],
9545
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9546
[[m4_foreach([_Lt_prefix], [$2],
9547
	     [m4_foreach([_Lt_suffix],
9548
		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9549
	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9550
9551
9552
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9553
# -----------------------------------------------------------------------
9554
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9555
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9556
m4_define([lt_if_append_uniq],
9557
[m4_ifdef([$1],
9558
	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9559
		 [lt_append([$1], [$2], [$3])$4],
9560
		 [$5])],
9561
	  [lt_append([$1], [$2], [$3])$4])])
9562
9563
9564
# lt_dict_add(DICT, KEY, VALUE)
9565
# -----------------------------
9566
m4_define([lt_dict_add],
9567
[m4_define([$1($2)], [$3])])
9568
9569
9570
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9571
# --------------------------------------------
9572
m4_define([lt_dict_add_subkey],
9573
[m4_define([$1($2:$3)], [$4])])
9574
9575
9576
# lt_dict_fetch(DICT, KEY, [SUBKEY])
9577
# ----------------------------------
9578
m4_define([lt_dict_fetch],
9579
[m4_ifval([$3],
9580
	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9581
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9582
9583
9584
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9585
# -----------------------------------------------------------------
9586
m4_define([lt_if_dict_fetch],
9587
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9588
	[$5],
9589
    [$6])])
9590
9591
9592
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9593
# --------------------------------------------------------------
9594
m4_define([lt_dict_filter],
9595
[m4_if([$5], [], [],
9596
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9597
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9598
		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9599
])
9600
9601
# ltversion.m4 -- version numbers			-*- Autoconf -*-
9602
#
9603
#   Copyright (C) 2004 Free Software Foundation, Inc.
9604
#   Written by Scott James Remnant, 2004
9605
#
9606
# This file is free software; the Free Software Foundation gives
9607
# unlimited permission to copy and/or distribute it, with or without
9608
# modifications, as long as this notice is preserved.
9609
9610
# Generated from ltversion.in.
9611
9612
# serial 3012 ltversion.m4
9613
# This file is part of GNU Libtool
9614
9615
m4_define([LT_PACKAGE_VERSION], [2.2.6])
9616
m4_define([LT_PACKAGE_REVISION], [1.3012])
9617
9618
AC_DEFUN([LTVERSION_VERSION],
9619
[macro_version='2.2.6'
9620
macro_revision='1.3012'
9621
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9622
_LT_DECL(, macro_revision, 0)
9623
])
9624
9625
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9626
#
9627
#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
9628
#   Written by Scott James Remnant, 2004.
9629
#
9630
# This file is free software; the Free Software Foundation gives
9631
# unlimited permission to copy and/or distribute it, with or without
9632
# modifications, as long as this notice is preserved.
9633
9634
# serial 4 lt~obsolete.m4
9635
9636
# These exist entirely to fool aclocal when bootstrapping libtool.
9637
#
9638
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9639
# which have later been changed to m4_define as they aren't part of the
9640
# exported API, or moved to Autoconf or Automake where they belong.
9641
#
9642
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9643
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9644
# using a macro with the same name in our local m4/libtool.m4 it'll
9645
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9646
# and doesn't know about Autoconf macros at all.)
9647
#
9648
# So we provide this file, which has a silly filename so it's always
9649
# included after everything else.  This provides aclocal with the
9650
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9651
# because those macros already exist, or will be overwritten later.
9652
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9653
#
9654
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9655
# Yes, that means every name once taken will need to remain here until
9656
# we give up compatibility with versions before 1.7, at which point
9657
# we need to keep only those names which we still refer to.
9658
9659
# This is to help aclocal find these macros, as it can't see m4_define.
9660
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9661
9662
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9663
m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9664
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9665
m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9666
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9667
m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9668
m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9669
m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9670
m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9671
m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9672
m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9673
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9674
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9675
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9676
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9677
m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9678
m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9679
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9680
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9681
m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9682
m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9683
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9684
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9685
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9686
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9687
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9688
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9689
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9690
m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9691
m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9692
m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9693
m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9694
m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9695
m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9696
m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9697
m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9698
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9699
m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9700
m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9701
m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9702
m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9703
m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9704
m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
9705
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9706
m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9707
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9708
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9709
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9710
m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9711
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9712
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9713
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9714
m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9715
m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9716
m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9717
9718
# nls.m4 serial 3 (gettext-0.15)
9719
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
9720
dnl This file is free software; the Free Software Foundation
9721
dnl gives unlimited permission to copy and/or distribute it,
9722
dnl with or without modifications, as long as this notice is preserved.
9723
dnl
9724
dnl This file can can be used in projects which are not available under
9725
dnl the GNU General Public License or the GNU Library General Public
9726
dnl License but which still want to provide support for the GNU gettext
9727
dnl functionality.
9728
dnl Please note that the actual code of the GNU gettext library is covered
9729
dnl by the GNU Library General Public License, and the rest of the GNU
9730
dnl gettext package package is covered by the GNU General Public License.
9731
dnl They are *not* in the public domain.
9732
9733
dnl Authors:
9734
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9735
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9736
9737
AC_PREREQ(2.50)
9738
9739
AC_DEFUN([AM_NLS],
9740
[
9741
  AC_MSG_CHECKING([whether NLS is requested])
9742
  dnl Default is enabled NLS
9743
  AC_ARG_ENABLE(nls,
9744
    [  --disable-nls           do not use Native Language Support],
9745
    USE_NLS=$enableval, USE_NLS=yes)
9746
  AC_MSG_RESULT($USE_NLS)
9747
  AC_SUBST(USE_NLS)
9748
])
9749
9750
# po.m4 serial 15 (gettext-0.17)
9751
dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
9752
dnl This file is free software; the Free Software Foundation
9753
dnl gives unlimited permission to copy and/or distribute it,
9754
dnl with or without modifications, as long as this notice is preserved.
9755
dnl
9756
dnl This file can can be used in projects which are not available under
9757
dnl the GNU General Public License or the GNU Library General Public
9758
dnl License but which still want to provide support for the GNU gettext
9759
dnl functionality.
9760
dnl Please note that the actual code of the GNU gettext library is covered
9761
dnl by the GNU Library General Public License, and the rest of the GNU
9762
dnl gettext package package is covered by the GNU General Public License.
9763
dnl They are *not* in the public domain.
9764
9765
dnl Authors:
9766
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9767
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9768
9769
AC_PREREQ(2.50)
9770
9771
dnl Checks for all prerequisites of the po subdirectory.
9772
AC_DEFUN([AM_PO_SUBDIRS],
9773
[
9774
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9775
  AC_REQUIRE([AC_PROG_INSTALL])dnl
9776
  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
9777
  AC_REQUIRE([AM_NLS])dnl
9778
9779
  dnl Release version of the gettext macros. This is used to ensure that
9780
  dnl the gettext macros and po/Makefile.in.in are in sync.
9781
  AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
9782
9783
  dnl Perform the following tests also if --disable-nls has been given,
9784
  dnl because they are needed for "make dist" to work.
9785
9786
  dnl Search for GNU msgfmt in the PATH.
9787
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
9788
  dnl The second test excludes FreeBSD msgfmt.
9789
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
9790
    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
9791
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
9792
    :)
9793
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
9794
9795
  dnl Test whether it is GNU msgfmt >= 0.15.
9796
changequote(,)dnl
9797
  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9798
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
9799
    *) MSGFMT_015=$MSGFMT ;;
9800
  esac
9801
changequote([,])dnl
9802
  AC_SUBST([MSGFMT_015])
9803
changequote(,)dnl
9804
  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9805
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
9806
    *) GMSGFMT_015=$GMSGFMT ;;
9807
  esac
9808
changequote([,])dnl
9809
  AC_SUBST([GMSGFMT_015])
9810
9811
  dnl Search for GNU xgettext 0.12 or newer in the PATH.
9812
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
9813
  dnl The second test excludes FreeBSD xgettext.
9814
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
9815
    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
9816
     (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)],
9817
    :)
9818
  dnl Remove leftover from FreeBSD xgettext call.
9819
  rm -f messages.po
9820
9821
  dnl Test whether it is GNU xgettext >= 0.15.
9822
changequote(,)dnl
9823
  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9824
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
9825
    *) XGETTEXT_015=$XGETTEXT ;;
9826
  esac
9827
changequote([,])dnl
9828
  AC_SUBST([XGETTEXT_015])
9829
9830
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
9831
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
9832
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
9833
9834
  dnl Installation directories.
9835
  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
9836
  dnl have to define it here, so that it can be used in po/Makefile.
9837
  test -n "$localedir" || localedir='${datadir}/locale'
9838
  AC_SUBST([localedir])
9839
9840
  dnl Support for AM_XGETTEXT_OPTION.
9841
  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
9842
  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
9843
9844
  AC_CONFIG_COMMANDS([po-directories], [[
9845
    for ac_file in $CONFIG_FILES; do
9846
      # Support "outfile[:infile[:infile...]]"
9847
      case "$ac_file" in
9848
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9849
      esac
9850
      # PO directories have a Makefile.in generated from Makefile.in.in.
9851
      case "$ac_file" in */Makefile.in)
9852
        # Adjust a relative srcdir.
9853
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9854
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9855
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9856
        # In autoconf-2.13 it is called $ac_given_srcdir.
9857
        # In autoconf-2.50 it is called $srcdir.
9858
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9859
        case "$ac_given_srcdir" in
9860
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9861
          /*) top_srcdir="$ac_given_srcdir" ;;
9862
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
9863
        esac
9864
        # Treat a directory as a PO directory if and only if it has a
9865
        # POTFILES.in file. This allows packages to have multiple PO
9866
        # directories under different names or in different locations.
9867
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9868
          rm -f "$ac_dir/POTFILES"
9869
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9870
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
9871
          POMAKEFILEDEPS="POTFILES.in"
9872
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
9873
          # on $ac_dir but don't depend on user-specified configuration
9874
          # parameters.
9875
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
9876
            # The LINGUAS file contains the set of available languages.
9877
            if test -n "$OBSOLETE_ALL_LINGUAS"; then
9878
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
9879
            fi
9880
            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
9881
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
9882
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
9883
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
9884
          else
9885
            # The set of available languages was given in configure.in.
9886
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
9887
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
9888
          fi
9889
          # Compute POFILES
9890
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
9891
          # Compute UPDATEPOFILES
9892
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
9893
          # Compute DUMMYPOFILES
9894
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
9895
          # Compute GMOFILES
9896
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
9897
          case "$ac_given_srcdir" in
9898
            .) srcdirpre= ;;
9899
            *) srcdirpre='$(srcdir)/' ;;
9900
          esac
9901
          POFILES=
9902
          UPDATEPOFILES=
9903
          DUMMYPOFILES=
9904
          GMOFILES=
9905
          for lang in $ALL_LINGUAS; do
9906
            POFILES="$POFILES $srcdirpre$lang.po"
9907
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
9908
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
9909
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
9910
          done
9911
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
9912
          # environment variable.
9913
          INST_LINGUAS=
9914
          if test -n "$ALL_LINGUAS"; then
9915
            for presentlang in $ALL_LINGUAS; do
9916
              useit=no
9917
              if test "%UNSET%" != "$LINGUAS"; then
9918
                desiredlanguages="$LINGUAS"
9919
              else
9920
                desiredlanguages="$ALL_LINGUAS"
9921
              fi
9922
              for desiredlang in $desiredlanguages; do
9923
                # Use the presentlang catalog if desiredlang is
9924
                #   a. equal to presentlang, or
9925
                #   b. a variant of presentlang (because in this case,
9926
                #      presentlang can be used as a fallback for messages
9927
                #      which are not translated in the desiredlang catalog).
9928
                case "$desiredlang" in
9929
                  "$presentlang"*) useit=yes;;
9930
                esac
9931
              done
9932
              if test $useit = yes; then
9933
                INST_LINGUAS="$INST_LINGUAS $presentlang"
9934
              fi
9935
            done
9936
          fi
9937
          CATALOGS=
9938
          if test -n "$INST_LINGUAS"; then
9939
            for lang in $INST_LINGUAS; do
9940
              CATALOGS="$CATALOGS $lang.gmo"
9941
            done
9942
          fi
9943
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9944
          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"
9945
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
9946
            if test -f "$f"; then
9947
              case "$f" in
9948
                *.orig | *.bak | *~) ;;
9949
                *) cat "$f" >> "$ac_dir/Makefile" ;;
9950
              esac
9951
            fi
9952
          done
9953
        fi
9954
        ;;
9955
      esac
9956
    done]],
9957
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
9958
    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
9959
    # from automake < 1.5.
9960
    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
9961
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
9962
    LINGUAS="${LINGUAS-%UNSET%}"
9963
   ])
9964
])
9965
9966
dnl Postprocesses a Makefile in a directory containing PO files.
9967
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
9968
[
9969
  # When this code is run, in config.status, two variables have already been
9970
  # set:
9971
  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
9972
  # - LINGUAS is the value of the environment variable LINGUAS at configure
9973
  #   time.
9974
9975
changequote(,)dnl
9976
  # Adjust a relative srcdir.
9977
  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9978
  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9979
  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9980
  # In autoconf-2.13 it is called $ac_given_srcdir.
9981
  # In autoconf-2.50 it is called $srcdir.
9982
  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9983
  case "$ac_given_srcdir" in
9984
    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9985
    /*) top_srcdir="$ac_given_srcdir" ;;
9986
    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
9987
  esac
9988
9989
  # Find a way to echo strings without interpreting backslash.
9990
  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
9991
    gt_echo='echo'
9992
  else
9993
    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
9994
      gt_echo='printf %s\n'
9995
    else
9996
      echo_func () {
9997
        cat <<EOT
9998
$*
9999
EOT
10000
      }
10001
      gt_echo='echo_func'
10002
    fi
10003
  fi
10004
10005
  # A sed script that extracts the value of VARIABLE from a Makefile.
10006
  sed_x_variable='
10007
# Test if the hold space is empty.
10008
x
10009
s/P/P/
10010
x
10011
ta
10012
# Yes it was empty. Look if we have the expected variable definition.
10013
/^[	 ]*VARIABLE[	 ]*=/{
10014
  # Seen the first line of the variable definition.
10015
  s/^[	 ]*VARIABLE[	 ]*=//
10016
  ba
10017
}
10018
bd
10019
:a
10020
# Here we are processing a line from the variable definition.
10021
# Remove comment, more precisely replace it with a space.
10022
s/#.*$/ /
10023
# See if the line ends in a backslash.
10024
tb
10025
:b
10026
s/\\$//
10027
# Print the line, without the trailing backslash.
10028
p
10029
tc
10030
# There was no trailing backslash. The end of the variable definition is
10031
# reached. Clear the hold space.
10032
s/^.*$//
10033
x
10034
bd
10035
:c
10036
# A trailing backslash means that the variable definition continues in the
10037
# next line. Put a nonempty string into the hold space to indicate this.
10038
s/^.*$/P/
10039
x
10040
:d
10041
'
10042
changequote([,])dnl
10043
10044
  # Set POTFILES to the value of the Makefile variable POTFILES.
10045
  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
10046
  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
10047
  # Compute POTFILES_DEPS as
10048
  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
10049
  POTFILES_DEPS=
10050
  for file in $POTFILES; do
10051
    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
10052
  done
10053
  POMAKEFILEDEPS=""
10054
10055
  if test -n "$OBSOLETE_ALL_LINGUAS"; then
10056
    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
10057
  fi
10058
  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
10059
    # The LINGUAS file contains the set of available languages.
10060
    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
10061
    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
10062
  else
10063
    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
10064
    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
10065
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
10066
  fi
10067
  # Hide the ALL_LINGUAS assigment from automake < 1.5.
10068
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
10069
  # Compute POFILES
10070
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
10071
  # Compute UPDATEPOFILES
10072
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
10073
  # Compute DUMMYPOFILES
10074
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
10075
  # Compute GMOFILES
10076
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
10077
  # Compute PROPERTIESFILES
10078
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
10079
  # Compute CLASSFILES
10080
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
10081
  # Compute QMFILES
10082
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
10083
  # Compute MSGFILES
10084
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
10085
  # Compute RESOURCESDLLFILES
10086
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
10087
  case "$ac_given_srcdir" in
10088
    .) srcdirpre= ;;
10089
    *) srcdirpre='$(srcdir)/' ;;
10090
  esac
10091
  POFILES=
10092
  UPDATEPOFILES=
10093
  DUMMYPOFILES=
10094
  GMOFILES=
10095
  PROPERTIESFILES=
10096
  CLASSFILES=
10097
  QMFILES=
10098
  MSGFILES=
10099
  RESOURCESDLLFILES=
10100
  for lang in $ALL_LINGUAS; do
10101
    POFILES="$POFILES $srcdirpre$lang.po"
10102
    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
10103
    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
10104
    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
10105
    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
10106
    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
10107
    QMFILES="$QMFILES $srcdirpre$lang.qm"
10108
    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10109
    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
10110
    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/'`
10111
    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
10112
  done
10113
  # CATALOGS depends on both $ac_dir and the user's LINGUAS
10114
  # environment variable.
10115
  INST_LINGUAS=
10116
  if test -n "$ALL_LINGUAS"; then
10117
    for presentlang in $ALL_LINGUAS; do
10118
      useit=no
10119
      if test "%UNSET%" != "$LINGUAS"; then
10120
        desiredlanguages="$LINGUAS"
10121
      else
10122
        desiredlanguages="$ALL_LINGUAS"
10123
      fi
10124
      for desiredlang in $desiredlanguages; do
10125
        # Use the presentlang catalog if desiredlang is
10126
        #   a. equal to presentlang, or
10127
        #   b. a variant of presentlang (because in this case,
10128
        #      presentlang can be used as a fallback for messages
10129
        #      which are not translated in the desiredlang catalog).
10130
        case "$desiredlang" in
10131
          "$presentlang"*) useit=yes;;
10132
        esac
10133
      done
10134
      if test $useit = yes; then
10135
        INST_LINGUAS="$INST_LINGUAS $presentlang"
10136
      fi
10137
    done
10138
  fi
10139
  CATALOGS=
10140
  JAVACATALOGS=
10141
  QTCATALOGS=
10142
  TCLCATALOGS=
10143
  CSHARPCATALOGS=
10144
  if test -n "$INST_LINGUAS"; then
10145
    for lang in $INST_LINGUAS; do
10146
      CATALOGS="$CATALOGS $lang.gmo"
10147
      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
10148
      QTCATALOGS="$QTCATALOGS $lang.qm"
10149
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10150
      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
10151
      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/'`
10152
      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
10153
    done
10154
  fi
10155
10156
  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"
10157
  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
10158
    # Add dependencies that cannot be formulated as a simple suffix rule.
10159
    for lang in $ALL_LINGUAS; do
10160
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10161
      cat >> "$ac_file.tmp" <<EOF
10162
$frobbedlang.msg: $lang.po
10163
	@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
10164
	\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
10165
EOF
10166
    done
10167
  fi
10168
  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
10169
    # Add dependencies that cannot be formulated as a simple suffix rule.
10170
    for lang in $ALL_LINGUAS; do
10171
      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/'`
10172
      cat >> "$ac_file.tmp" <<EOF
10173
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
10174
	@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
10175
	\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
10176
EOF
10177
    done
10178
  fi
10179
  if test -n "$POMAKEFILEDEPS"; then
10180
    cat >> "$ac_file.tmp" <<EOF
10181
Makefile: $POMAKEFILEDEPS
10182
EOF
10183
  fi
10184
  mv "$ac_file.tmp" "$ac_file"
10185
])
10186
10187
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
10188
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
10189
[
10190
  XGETTEXT_EXTRA_OPTIONS=
10191
])
10192
10193
dnl Registers an option to be passed to xgettext in the po subdirectory.
10194
AC_DEFUN([AM_XGETTEXT_OPTION],
10195
[
10196
  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
10197
  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
10198
])
10199
10200
# progtest.m4 serial 4 (gettext-0.14.2)
10201
dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
10202
dnl This file is free software; the Free Software Foundation
10203
dnl gives unlimited permission to copy and/or distribute it,
10204
dnl with or without modifications, as long as this notice is preserved.
10205
dnl
10206
dnl This file can can be used in projects which are not available under
10207
dnl the GNU General Public License or the GNU Library General Public
10208
dnl License but which still want to provide support for the GNU gettext
10209
dnl functionality.
10210
dnl Please note that the actual code of the GNU gettext library is covered
10211
dnl by the GNU Library General Public License, and the rest of the GNU
10212
dnl gettext package package is covered by the GNU General Public License.
10213
dnl They are *not* in the public domain.
10214
10215
dnl Authors:
10216
dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
10217
10218
AC_PREREQ(2.50)
10219
10220
# Search path for a program which passes the given test.
10221
10222
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
10223
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
10224
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
10225
[
10226
# Prepare PATH_SEPARATOR.
10227
# The user is always right.
10228
if test "${PATH_SEPARATOR+set}" != set; then
10229
  echo "#! /bin/sh" >conf$$.sh
10230
  echo  "exit 0"   >>conf$$.sh
10231
  chmod +x conf$$.sh
10232
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10233
    PATH_SEPARATOR=';'
10234
  else
10235
    PATH_SEPARATOR=:
10236
  fi
10237
  rm -f conf$$.sh
10238
fi
10239
10240
# Find out how to test for executable files. Don't use a zero-byte file,
10241
# as systems may use methods other than mode bits to determine executability.
10242
cat >conf$$.file <<_ASEOF
10243
#! /bin/sh
10244
exit 0
10245
_ASEOF
10246
chmod +x conf$$.file
10247
if test -x conf$$.file >/dev/null 2>&1; then
10248
  ac_executable_p="test -x"
10249
else
10250
  ac_executable_p="test -f"
10251
fi
10252
rm -f conf$$.file
10253
10254
# Extract the first word of "$2", so it can be a program name with args.
10255
set dummy $2; ac_word=[$]2
10256
AC_MSG_CHECKING([for $ac_word])
10257
AC_CACHE_VAL(ac_cv_path_$1,
10258
[case "[$]$1" in
10259
  [[\\/]]* | ?:[[\\/]]*)
10260
    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
10261
    ;;
10262
  *)
10263
    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
10264
    for ac_dir in ifelse([$5], , $PATH, [$5]); do
10265
      IFS="$ac_save_IFS"
10266
      test -z "$ac_dir" && ac_dir=.
10267
      for ac_exec_ext in '' $ac_executable_extensions; do
10268
        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
10269
          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
10270
          if [$3]; then
10271
            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
10272
            break 2
10273
          fi
10274
        fi
10275
      done
10276
    done
10277
    IFS="$ac_save_IFS"
10278
dnl If no 4th arg is given, leave the cache variable unset,
10279
dnl so AC_PATH_PROGS will keep looking.
10280
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
10281
])dnl
10282
    ;;
10283
esac])dnl
10284
$1="$ac_cv_path_$1"
10285
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
10286
  AC_MSG_RESULT([$]$1)
10287
else
10288
  AC_MSG_RESULT(no)
10289
fi
10290
AC_SUBST($1)dnl
10291
])
10292
10293
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
10294
#
10295
# This file is free software; the Free Software Foundation
10296
# gives unlimited permission to copy and/or distribute it,
10297
# with or without modifications, as long as this notice is preserved.
10298
10299
# AM_AUTOMAKE_VERSION(VERSION)
10300
# ----------------------------
10301
# Automake X.Y traces this macro to ensure aclocal.m4 has been
10302
# generated from the m4 files accompanying Automake X.Y.
10303
# (This private macro should not be called outside this file.)
10304
AC_DEFUN([AM_AUTOMAKE_VERSION],
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10305
[am__api_version='1.11'
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10306
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10307
dnl require some minimum version.  Point them to the right macro.
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10308
m4_if([$1], [1.11], [],
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10309
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10310
])
10311
10312
# _AM_AUTOCONF_VERSION(VERSION)
10313
# -----------------------------
10314
# aclocal traces this macro to find the Autoconf version.
10315
# This is a private macro too.  Using m4_define simplifies
10316
# the logic in aclocal, which can simply ignore this definition.
10317
m4_define([_AM_AUTOCONF_VERSION], [])
10318
10319
# AM_SET_CURRENT_AUTOMAKE_VERSION
10320
# -------------------------------
10321
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10322
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
10323
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10324
[AM_AUTOMAKE_VERSION([1.11])dnl
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10325
m4_ifndef([AC_AUTOCONF_VERSION],
10326
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10327
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10328
10329
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
10330
10331
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10332
#
10333
# This file is free software; the Free Software Foundation
10334
# gives unlimited permission to copy and/or distribute it,
10335
# with or without modifications, as long as this notice is preserved.
10336
10337
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10338
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
10339
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
10340
#
10341
# Of course, Automake must honor this variable whenever it calls a
10342
# tool from the auxiliary directory.  The problem is that $srcdir (and
10343
# therefore $ac_aux_dir as well) can be either absolute or relative,
10344
# depending on how configure is run.  This is pretty annoying, since
10345
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
10346
# source directory, any form will work fine, but in subdirectories a
10347
# relative path needs to be adjusted first.
10348
#
10349
# $ac_aux_dir/missing
10350
#    fails when called from a subdirectory if $ac_aux_dir is relative
10351
# $top_srcdir/$ac_aux_dir/missing
10352
#    fails if $ac_aux_dir is absolute,
10353
#    fails when called from a subdirectory in a VPATH build with
10354
#          a relative $ac_aux_dir
10355
#
10356
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10357
# are both prefixed by $srcdir.  In an in-source build this is usually
10358
# harmless because $srcdir is `.', but things will broke when you
10359
# start a VPATH build or use an absolute $srcdir.
10360
#
10361
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10362
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
10363
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10364
# and then we would define $MISSING as
10365
#   MISSING="\${SHELL} $am_aux_dir/missing"
10366
# This will work as long as MISSING is not called from configure, because
10367
# unfortunately $(top_srcdir) has no meaning in configure.
10368
# However there are other variables, like CC, which are often used in
10369
# configure, and could therefore not use this "fixed" $ac_aux_dir.
10370
#
10371
# Another solution, used here, is to always expand $ac_aux_dir to an
10372
# absolute PATH.  The drawback is that using absolute paths prevent a
10373
# configured tree to be moved without reconfiguration.
10374
10375
AC_DEFUN([AM_AUX_DIR_EXPAND],
10376
[dnl Rely on autoconf to set up CDPATH properly.
10377
AC_PREREQ([2.50])dnl
10378
# expand $ac_aux_dir to an absolute path
10379
am_aux_dir=`cd $ac_aux_dir && pwd`
10380
])
10381
10382
# AM_CONDITIONAL                                            -*- Autoconf -*-
10383
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10384
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10385
# Free Software Foundation, Inc.
10386
#
10387
# This file is free software; the Free Software Foundation
10388
# gives unlimited permission to copy and/or distribute it,
10389
# with or without modifications, as long as this notice is preserved.
10390
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10391
# serial 9
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10392
10393
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
10394
# -------------------------------------
10395
# Define a conditional.
10396
AC_DEFUN([AM_CONDITIONAL],
10397
[AC_PREREQ(2.52)dnl
10398
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
10399
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10400
AC_SUBST([$1_TRUE])dnl
10401
AC_SUBST([$1_FALSE])dnl
10402
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
10403
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10404
m4_define([_AM_COND_VALUE_$1], [$2])dnl
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10405
if $2; then
10406
  $1_TRUE=
10407
  $1_FALSE='#'
10408
else
10409
  $1_TRUE='#'
10410
  $1_FALSE=
10411
fi
10412
AC_CONFIG_COMMANDS_PRE(
10413
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10414
  AC_MSG_ERROR([[conditional "$1" was never defined.
10415
Usually this means the macro was only invoked conditionally.]])
10416
fi])])
10417
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10418
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10419
# Free Software Foundation, Inc.
10420
#
10421
# This file is free software; the Free Software Foundation
10422
# gives unlimited permission to copy and/or distribute it,
10423
# with or without modifications, as long as this notice is preserved.
10424
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10425
# serial 10
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10426
10427
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
10428
# written in clear, in which case automake, when reading aclocal.m4,
10429
# will think it sees a *use*, and therefore will trigger all it's
10430
# C support machinery.  Also note that it means that autoscan, seeing
10431
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10432
10433
10434
# _AM_DEPENDENCIES(NAME)
10435
# ----------------------
10436
# See how the compiler implements dependency checking.
10437
# NAME is "CC", "CXX", "GCJ", or "OBJC".
10438
# We try a few techniques and use that to set a single cache variable.
10439
#
10440
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10441
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10442
# dependency, and given that the user is not expected to run this macro,
10443
# just rely on AC_PROG_CC.
10444
AC_DEFUN([_AM_DEPENDENCIES],
10445
[AC_REQUIRE([AM_SET_DEPDIR])dnl
10446
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10447
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10448
AC_REQUIRE([AM_DEP_TRACK])dnl
10449
10450
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
10451
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
10452
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10453
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
10454
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
10455
                   [depcc="$$1"   am_compiler_list=])
10456
10457
AC_CACHE_CHECK([dependency style of $depcc],
10458
               [am_cv_$1_dependencies_compiler_type],
10459
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10460
  # We make a subdir and do the tests there.  Otherwise we can end up
10461
  # making bogus files that we don't know about and never remove.  For
10462
  # instance it was reported that on HP-UX the gcc test will end up
10463
  # making a dummy file named `D' -- because `-MD' means `put the output
10464
  # in D'.
10465
  mkdir conftest.dir
10466
  # Copy depcomp to subdir because otherwise we won't find it if we're
10467
  # using a relative directory.
10468
  cp "$am_depcomp" conftest.dir
10469
  cd conftest.dir
10470
  # We will build objects and dependencies in a subdirectory because
10471
  # it helps to detect inapplicable dependency modes.  For instance
10472
  # both Tru64's cc and ICC support -MD to output dependencies as a
10473
  # side effect of compilation, but ICC will put the dependencies in
10474
  # the current directory while Tru64 will put them in the object
10475
  # directory.
10476
  mkdir sub
10477
10478
  am_cv_$1_dependencies_compiler_type=none
10479
  if test "$am_compiler_list" = ""; then
10480
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10481
  fi
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10482
  am__universal=false
10483
  m4_case([$1], [CC],
10484
    [case " $depcc " in #(
10485
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
10486
     esac],
10487
    [CXX],
10488
    [case " $depcc " in #(
10489
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
10490
     esac])
10491
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10492
  for depmode in $am_compiler_list; do
10493
    # Setup a source with many dependencies, because some compilers
10494
    # like to wrap large dependency lists on column 80 (with \), and
10495
    # we should not choose a depcomp mode which is confused by this.
10496
    #
10497
    # We need to recreate these files for each test, as the compiler may
10498
    # overwrite some of them when testing with obscure command lines.
10499
    # This happens at least with the AIX C compiler.
10500
    : > sub/conftest.c
10501
    for i in 1 2 3 4 5 6; do
10502
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
10503
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
10504
      # Solaris 8's {/usr,}/bin/sh.
10505
      touch sub/conftst$i.h
10506
    done
10507
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10508
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10509
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
10510
    # mode.  It turns out that the SunPro C++ compiler does not properly
10511
    # handle `-M -o', and we need to detect this.  Also, some Intel
10512
    # versions had trouble with output in subdirs
10513
    am__obj=sub/conftest.${OBJEXT-o}
10514
    am__minus_obj="-o $am__obj"
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10515
    case $depmode in
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10516
    gcc)
10517
      # This depmode causes a compiler race in universal mode.
10518
      test "$am__universal" = false || continue
10519
      ;;
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10520
    nosideeffect)
10521
      # after this tag, mechanisms are not by side-effect, so they'll
10522
      # only be used when explicitly requested
10523
      if test "x$enable_dependency_tracking" = xyes; then
10524
	continue
10525
      else
10526
	break
10527
      fi
10528
      ;;
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10529
    msvisualcpp | msvcmsys)
10530
      # This compiler won't grok `-c -o', but also, the minuso test has
10531
      # not run yet.  These depmodes are late enough in the game, and
10532
      # so weak that their functioning should not be impacted.
10533
      am__obj=conftest.${OBJEXT-o}
10534
      am__minus_obj=
10535
      ;;
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10536
    none) break ;;
10537
    esac
10538
    if depmode=$depmode \
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10539
       source=sub/conftest.c object=$am__obj \
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10540
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10541
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10542
         >/dev/null 2>conftest.err &&
10543
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10544
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10545
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10546
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10547
      # icc doesn't choke on unknown options, it will just issue warnings
10548
      # or remarks (even with -Werror).  So we grep stderr for any message
10549
      # that says an option was ignored or not supported.
10550
      # When given -MP, icc 7.0 and 7.1 complain thusly:
10551
      #   icc: Command line warning: ignoring option '-M'; no argument required
10552
      # The diagnosis changed in icc 8.0:
10553
      #   icc: Command line remark: option '-MP' not supported
10554
      if (grep 'ignoring option' conftest.err ||
10555
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10556
        am_cv_$1_dependencies_compiler_type=$depmode
10557
        break
10558
      fi
10559
    fi
10560
  done
10561
10562
  cd ..
10563
  rm -rf conftest.dir
10564
else
10565
  am_cv_$1_dependencies_compiler_type=none
10566
fi
10567
])
10568
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10569
AM_CONDITIONAL([am__fastdep$1], [
10570
  test "x$enable_dependency_tracking" != xno \
10571
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10572
])
10573
10574
10575
# AM_SET_DEPDIR
10576
# -------------
10577
# Choose a directory name for dependency files.
10578
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
10579
AC_DEFUN([AM_SET_DEPDIR],
10580
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10581
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10582
])
10583
10584
10585
# AM_DEP_TRACK
10586
# ------------
10587
AC_DEFUN([AM_DEP_TRACK],
10588
[AC_ARG_ENABLE(dependency-tracking,
10589
[  --disable-dependency-tracking  speeds up one-time build
10590
  --enable-dependency-tracking   do not reject slow dependency extractors])
10591
if test "x$enable_dependency_tracking" != xno; then
10592
  am_depcomp="$ac_aux_dir/depcomp"
10593
  AMDEPBACKSLASH='\'
10594
fi
10595
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10596
AC_SUBST([AMDEPBACKSLASH])dnl
10597
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10598
])
10599
10600
# Generate code to set up dependency tracking.              -*- Autoconf -*-
10601
10602
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10603
# Free Software Foundation, Inc.
10604
#
10605
# This file is free software; the Free Software Foundation
10606
# gives unlimited permission to copy and/or distribute it,
10607
# with or without modifications, as long as this notice is preserved.
10608
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10609
#serial 5
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10610
10611
# _AM_OUTPUT_DEPENDENCY_COMMANDS
10612
# ------------------------------
10613
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10614
[{
10615
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
10616
  # are listed without --file.  Let's play safe and only enable the eval
10617
  # if we detect the quoting.
10618
  case $CONFIG_FILES in
10619
  *\'*) eval set x "$CONFIG_FILES" ;;
10620
  *)   set x $CONFIG_FILES ;;
10621
  esac
10622
  shift
10623
  for mf
10624
  do
10625
    # Strip MF so we end up with the name of the file.
10626
    mf=`echo "$mf" | sed -e 's/:.*$//'`
10627
    # Check whether this is an Automake generated Makefile or not.
10628
    # We used to match only the files named `Makefile.in', but
10629
    # some people rename them; so instead we look at the file content.
10630
    # Grep'ing the first line is not enough: some people post-process
10631
    # each Makefile.in and add a new line on top of each file to say so.
10632
    # Grep'ing the whole file is not good either: AIX grep has a line
10633
    # limit of 2048, but all sed's we know have understand at least 4000.
10634
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10635
      dirpart=`AS_DIRNAME("$mf")`
10636
    else
10637
      continue
10638
    fi
10639
    # Extract the definition of DEPDIR, am__include, and am__quote
10640
    # from the Makefile without running `make'.
10641
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10642
    test -z "$DEPDIR" && continue
10643
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
10644
    test -z "am__include" && continue
10645
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10646
    # When using ansi2knr, U may be empty or an underscore; expand it
10647
    U=`sed -n 's/^U = //p' < "$mf"`
10648
    # Find all dependency output files, they are included files with
10649
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
10650
    # simplest approach to changing $(DEPDIR) to its actual value in the
10651
    # expansion.
10652
    for file in `sed -n "
10653
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10654
	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
10655
      # Make sure the directory exists.
10656
      test -f "$dirpart/$file" && continue
10657
      fdir=`AS_DIRNAME(["$file"])`
10658
      AS_MKDIR_P([$dirpart/$fdir])
10659
      # echo "creating $dirpart/$file"
10660
      echo '# dummy' > "$dirpart/$file"
10661
    done
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10662
  done
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10663
}
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10664
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10665
10666
10667
# AM_OUTPUT_DEPENDENCY_COMMANDS
10668
# -----------------------------
10669
# This macro should only be invoked once -- use via AC_REQUIRE.
10670
#
10671
# This code is only required when automatic dependency tracking
10672
# is enabled.  FIXME.  This creates each `.P' file that we will
10673
# need in order to bootstrap the dependency handling code.
10674
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10675
[AC_CONFIG_COMMANDS([depfiles],
10676
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10677
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10678
])
10679
10680
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
10681
# Free Software Foundation, Inc.
10682
#
10683
# This file is free software; the Free Software Foundation
10684
# gives unlimited permission to copy and/or distribute it,
10685
# with or without modifications, as long as this notice is preserved.
10686
10687
# serial 8
10688
10689
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
10690
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
10691
10692
# Do all the work for Automake.                             -*- Autoconf -*-
10693
10694
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10695
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10696
#
10697
# This file is free software; the Free Software Foundation
10698
# gives unlimited permission to copy and/or distribute it,
10699
# with or without modifications, as long as this notice is preserved.
10700
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10701
# serial 16
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10702
10703
# This macro actually does too much.  Some checks are only needed if
10704
# your package does certain things.  But this isn't really a big deal.
10705
10706
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10707
# AM_INIT_AUTOMAKE([OPTIONS])
10708
# -----------------------------------------------
10709
# The call with PACKAGE and VERSION arguments is the old style
10710
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
10711
# and VERSION should now be passed to AC_INIT and removed from
10712
# the call to AM_INIT_AUTOMAKE.
10713
# We support both call styles for the transition.  After
10714
# the next Automake release, Autoconf can make the AC_INIT
10715
# arguments mandatory, and then we can depend on a new Autoconf
10716
# release and drop the old call support.
10717
AC_DEFUN([AM_INIT_AUTOMAKE],
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10718
[AC_PREREQ([2.62])dnl
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10719
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10720
dnl the ones we care about.
10721
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10722
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10723
AC_REQUIRE([AC_PROG_INSTALL])dnl
10724
if test "`cd $srcdir && pwd`" != "`pwd`"; then
10725
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10726
  # is not polluted with repeated "-I."
10727
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10728
  # test to see if srcdir already configured
10729
  if test -f $srcdir/config.status; then
10730
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10731
  fi
10732
fi
10733
10734
# test whether we have cygpath
10735
if test -z "$CYGPATH_W"; then
10736
  if (cygpath --version) >/dev/null 2>/dev/null; then
10737
    CYGPATH_W='cygpath -w'
10738
  else
10739
    CYGPATH_W=echo
10740
  fi
10741
fi
10742
AC_SUBST([CYGPATH_W])
10743
10744
# Define the identity of the package.
10745
dnl Distinguish between old-style and new-style calls.
10746
m4_ifval([$2],
10747
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10748
 AC_SUBST([PACKAGE], [$1])dnl
10749
 AC_SUBST([VERSION], [$2])],
10750
[_AM_SET_OPTIONS([$1])dnl
10751
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10752
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
10753
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10754
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10755
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10756
10757
_AM_IF_OPTION([no-define],,
10758
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10759
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10760
10761
# Some tools Automake needs.
10762
AC_REQUIRE([AM_SANITY_CHECK])dnl
10763
AC_REQUIRE([AC_ARG_PROGRAM])dnl
10764
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10765
AM_MISSING_PROG(AUTOCONF, autoconf)
10766
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10767
AM_MISSING_PROG(AUTOHEADER, autoheader)
10768
AM_MISSING_PROG(MAKEINFO, makeinfo)
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10769
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10770
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10771
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
10772
# We need awk for the "check" target.  The system "awk" is bad on
10773
# some platforms.
10774
AC_REQUIRE([AC_PROG_AWK])dnl
10775
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10776
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10777
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10778
	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10779
			     [_AM_PROG_TAR([v7])])])
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10780
_AM_IF_OPTION([no-dependencies],,
10781
[AC_PROVIDE_IFELSE([AC_PROG_CC],
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10782
		  [_AM_DEPENDENCIES(CC)],
10783
		  [define([AC_PROG_CC],
10784
			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10785
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10786
		  [_AM_DEPENDENCIES(CXX)],
10787
		  [define([AC_PROG_CXX],
10788
			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10789
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10790
		  [_AM_DEPENDENCIES(OBJC)],
10791
		  [define([AC_PROG_OBJC],
10792
			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
10793
])
10794
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
10795
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
10796
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
10797
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
10798
AC_CONFIG_COMMANDS_PRE(dnl
10799
[m4_provide_if([_AM_COMPILER_EXEEXT],
10800
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10801
])
10802
10803
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10804
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10805
dnl mangled by Autoconf and run in a shell conditional statement.
10806
m4_define([_AC_COMPILER_EXEEXT],
10807
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10808
10809
10810
# When config.status generates a header, we must update the stamp-h file.
10811
# This file resides in the same directory as the config header
10812
# that is generated.  The stamp files are numbered to have different names.
10813
10814
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10815
# loop where config.status creates the headers, so we can generate
10816
# our stamp files there.
10817
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10818
[# Compute $1's index in $config_headers.
10819
_am_arg=$1
10820
_am_stamp_count=1
10821
for _am_header in $config_headers :; do
10822
  case $_am_header in
10823
    $_am_arg | $_am_arg:* )
10824
      break ;;
10825
    * )
10826
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10827
  esac
10828
done
10829
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10830
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10831
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10832
#
10833
# This file is free software; the Free Software Foundation
10834
# gives unlimited permission to copy and/or distribute it,
10835
# with or without modifications, as long as this notice is preserved.
10836
10837
# AM_PROG_INSTALL_SH
10838
# ------------------
10839
# Define $install_sh.
10840
AC_DEFUN([AM_PROG_INSTALL_SH],
10841
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10842
if test x"${install_sh}" != xset; then
10843
  case $am_aux_dir in
10844
  *\ * | *\	*)
10845
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10846
  *)
10847
    install_sh="\${SHELL} $am_aux_dir/install-sh"
10848
  esac
10849
fi
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10850
AC_SUBST(install_sh)])
10851
10852
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
10853
#
10854
# This file is free software; the Free Software Foundation
10855
# gives unlimited permission to copy and/or distribute it,
10856
# with or without modifications, as long as this notice is preserved.
10857
10858
# serial 2
10859
10860
# Check whether the underlying file-system supports filenames
10861
# with a leading dot.  For instance MS-DOS doesn't.
10862
AC_DEFUN([AM_SET_LEADING_DOT],
10863
[rm -rf .tst 2>/dev/null
10864
mkdir .tst 2>/dev/null
10865
if test -d .tst; then
10866
  am__leading_dot=.
10867
else
10868
  am__leading_dot=_
10869
fi
10870
rmdir .tst 2>/dev/null
10871
AC_SUBST([am__leading_dot])])
10872
10873
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
10874
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10875
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10876
#
10877
# This file is free software; the Free Software Foundation
10878
# gives unlimited permission to copy and/or distribute it,
10879
# with or without modifications, as long as this notice is preserved.
10880
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10881
# serial 4
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10882
10883
# AM_MAKE_INCLUDE()
10884
# -----------------
10885
# Check to see how make treats includes.
10886
AC_DEFUN([AM_MAKE_INCLUDE],
10887
[am_make=${MAKE-make}
10888
cat > confinc << 'END'
10889
am__doit:
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10890
	@echo this is the am__doit target
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10891
.PHONY: am__doit
10892
END
10893
# If we don't find an include directive, just comment out the code.
10894
AC_MSG_CHECKING([for style of include used by $am_make])
10895
am__include="#"
10896
am__quote=
10897
_am_result=none
10898
# First try GNU make style include.
10899
echo "include confinc" > confmf
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10900
# Ignore all kinds of additional output from `make'.
10901
case `$am_make -s -f confmf 2> /dev/null` in #(
10902
*the\ am__doit\ target*)
10903
  am__include=include
10904
  am__quote=
10905
  _am_result=GNU
10906
  ;;
10907
esac
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10908
# Now try BSD make style include.
10909
if test "$am__include" = "#"; then
10910
   echo '.include "confinc"' > confmf
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10911
   case `$am_make -s -f confmf 2> /dev/null` in #(
10912
   *the\ am__doit\ target*)
10913
     am__include=.include
10914
     am__quote="\""
10915
     _am_result=BSD
10916
     ;;
10917
   esac
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10918
fi
10919
AC_SUBST([am__include])
10920
AC_SUBST([am__quote])
10921
AC_MSG_RESULT([$_am_result])
10922
rm -f confinc confmf
10923
])
10924
10925
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
10926
# Free Software Foundation, Inc.
10927
#
10928
# This file is free software; the Free Software Foundation
10929
# gives unlimited permission to copy and/or distribute it,
10930
# with or without modifications, as long as this notice is preserved.
10931
10932
# serial 6
10933
10934
# AM_PROG_CC_C_O
10935
# --------------
10936
# Like AC_PROG_CC_C_O, but changed for automake.
10937
AC_DEFUN([AM_PROG_CC_C_O],
10938
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
10939
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10940
AC_REQUIRE_AUX_FILE([compile])dnl
10941
# FIXME: we rely on the cache variable name because
10942
# there is no other way.
10943
set dummy $CC
10944
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
10945
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
10946
if test "$am_t" != yes; then
10947
   # Losing compiler, so override with the script.
10948
   # FIXME: It is wrong to rewrite CC.
10949
   # But if we don't then we get into trouble of one sort or another.
10950
   # A longer-term fix would be to have automake use am__CC in this case,
10951
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
10952
   CC="$am_aux_dir/compile $CC"
10953
fi
10954
dnl Make sure AC_PROG_CC is never called again, or it will override our
10955
dnl setting of CC.
10956
m4_define([AC_PROG_CC],
10957
          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
10958
])
10959
10960
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10961
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10962
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10963
# Free Software Foundation, Inc.
10964
#
10965
# This file is free software; the Free Software Foundation
10966
# gives unlimited permission to copy and/or distribute it,
10967
# with or without modifications, as long as this notice is preserved.
10968
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10969
# serial 6
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10970
10971
# AM_MISSING_PROG(NAME, PROGRAM)
10972
# ------------------------------
10973
AC_DEFUN([AM_MISSING_PROG],
10974
[AC_REQUIRE([AM_MISSING_HAS_RUN])
10975
$1=${$1-"${am_missing_run}$2"}
10976
AC_SUBST($1)])
10977
10978
10979
# AM_MISSING_HAS_RUN
10980
# ------------------
10981
# Define MISSING if not defined so far and test if it supports --run.
10982
# If it does, set am_missing_run to use it, otherwise, to nothing.
10983
AC_DEFUN([AM_MISSING_HAS_RUN],
10984
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10985
AC_REQUIRE_AUX_FILE([missing])dnl
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
10986
if test x"${MISSING+set}" != xset; then
10987
  case $am_aux_dir in
10988
  *\ * | *\	*)
10989
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10990
  *)
10991
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
10992
  esac
10993
fi
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
10994
# Use eval to expand $SHELL
10995
if eval "$MISSING --run true"; then
10996
  am_missing_run="$MISSING --run "
10997
else
10998
  am_missing_run=
10999
  AC_MSG_WARN([`missing' script is too old or missing])
11000
fi
11001
])
11002
11003
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
11004
#
11005
# This file is free software; the Free Software Foundation
11006
# gives unlimited permission to copy and/or distribute it,
11007
# with or without modifications, as long as this notice is preserved.
11008
11009
# AM_PROG_MKDIR_P
11010
# ---------------
11011
# Check for `mkdir -p'.
11012
AC_DEFUN([AM_PROG_MKDIR_P],
11013
[AC_PREREQ([2.60])dnl
11014
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
11015
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
11016
dnl while keeping a definition of mkdir_p for backward compatibility.
11017
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
11018
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
11019
dnl Makefile.ins that do not define MKDIR_P, so we do our own
11020
dnl adjustment using top_builddir (which is defined more often than
11021
dnl MKDIR_P).
11022
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
11023
case $mkdir_p in
11024
  [[\\/$]]* | ?:[[\\/]]*) ;;
11025
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
11026
esac
11027
])
11028
11029
# Helper functions for option handling.                     -*- Autoconf -*-
11030
11031
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
11032
#
11033
# This file is free software; the Free Software Foundation
11034
# gives unlimited permission to copy and/or distribute it,
11035
# with or without modifications, as long as this notice is preserved.
11036
11037
# serial 4
11038
11039
# _AM_MANGLE_OPTION(NAME)
11040
# -----------------------
11041
AC_DEFUN([_AM_MANGLE_OPTION],
11042
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
11043
11044
# _AM_SET_OPTION(NAME)
11045
# ------------------------------
11046
# Set option NAME.  Presently that only means defining a flag for this option.
11047
AC_DEFUN([_AM_SET_OPTION],
11048
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
11049
11050
# _AM_SET_OPTIONS(OPTIONS)
11051
# ----------------------------------
11052
# OPTIONS is a space-separated list of Automake options.
11053
AC_DEFUN([_AM_SET_OPTIONS],
11054
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
11055
11056
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
11057
# -------------------------------------------
11058
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
11059
AC_DEFUN([_AM_IF_OPTION],
11060
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
11061
11062
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
11063
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
11064
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
11065
# Free Software Foundation, Inc.
11066
#
11067
# This file is free software; the Free Software Foundation
11068
# gives unlimited permission to copy and/or distribute it,
11069
# with or without modifications, as long as this notice is preserved.
11070
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
11071
# serial 5
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
11072
11073
# AM_SANITY_CHECK
11074
# ---------------
11075
AC_DEFUN([AM_SANITY_CHECK],
11076
[AC_MSG_CHECKING([whether build environment is sane])
11077
# Just in case
11078
sleep 1
11079
echo timestamp > conftest.file
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
11080
# Reject unsafe characters in $srcdir or the absolute working directory
11081
# name.  Accept space and tab only in the latter.
11082
am_lf='
11083
'
11084
case `pwd` in
11085
  *[[\\\"\#\$\&\'\`$am_lf]]*)
11086
    AC_MSG_ERROR([unsafe absolute working directory name]);;
11087
esac
11088
case $srcdir in
11089
  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
11090
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
11091
esac
11092
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
11093
# Do `set' in a subshell so we don't clobber the current shell's
11094
# arguments.  Must try -L first in case configure is actually a
11095
# symlink; some systems play weird games with the mod time of symlinks
11096
# (eg FreeBSD returns the mod time of the symlink's containing
11097
# directory).
11098
if (
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
11099
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
11100
   if test "$[*]" = "X"; then
11101
      # -L didn't work.
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
11102
      set X `ls -t "$srcdir/configure" conftest.file`
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
11103
   fi
11104
   rm -f conftest.file
11105
   if test "$[*]" != "X $srcdir/configure conftest.file" \
11106
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
11107
11108
      # If neither matched, then we have a broken ls.  This can happen
11109
      # if, for instance, CONFIG_SHELL is bash and it inherits a
11110
      # broken ls alias from the environment.  This has actually
11111
      # happened.  Such a system could not be considered "sane".
11112
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
11113
alias in your environment])
11114
   fi
11115
11116
   test "$[2]" = conftest.file
11117
   )
11118
then
11119
   # Ok.
11120
   :
11121
else
11122
   AC_MSG_ERROR([newly created file is older than distributed files!
11123
Check your system clock])
11124
fi
11125
AC_MSG_RESULT(yes)])
11126
11127
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
11128
#
11129
# This file is free software; the Free Software Foundation
11130
# gives unlimited permission to copy and/or distribute it,
11131
# with or without modifications, as long as this notice is preserved.
11132
11133
# AM_PROG_INSTALL_STRIP
11134
# ---------------------
11135
# One issue with vendor `install' (even GNU) is that you can't
11136
# specify the program used to strip binaries.  This is especially
11137
# annoying in cross-compiling environments, where the build's strip
11138
# is unlikely to handle the host's binaries.
11139
# Fortunately install-sh will honor a STRIPPROG variable, so we
11140
# always use install-sh in `make install-strip', and initialize
11141
# STRIPPROG with the value of the STRIP variable (set by the user).
11142
AC_DEFUN([AM_PROG_INSTALL_STRIP],
11143
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11144
# Installed binaries are usually stripped using `strip' when the user
11145
# run `make install-strip'.  However `strip' might not be the right
11146
# tool to use in cross-compilation environments, therefore Automake
11147
# will honor the `STRIP' environment variable to overrule this program.
11148
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
11149
if test "$cross_compiling" != no; then
11150
  AC_CHECK_TOOL([STRIP], [strip], :)
11151
fi
11152
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
11153
AC_SUBST([INSTALL_STRIP_PROGRAM])])
11154
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
11155
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
11156
#
11157
# This file is free software; the Free Software Foundation
11158
# gives unlimited permission to copy and/or distribute it,
11159
# with or without modifications, as long as this notice is preserved.
11160
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
11161
# serial 2
11162
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
11163
# _AM_SUBST_NOTMAKE(VARIABLE)
11164
# ---------------------------
11165
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
11166
# This macro is traced by Automake.
11167
AC_DEFUN([_AM_SUBST_NOTMAKE])
11168
1.3.2 by Jonas Meurer
Import upstream version 1.1.0~rc2
11169
# AM_SUBST_NOTMAKE(VARIABLE)
11170
# ---------------------------
11171
# Public sister of _AM_SUBST_NOTMAKE.
11172
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
11173
1.2.9 by Jonas Meurer
Import upstream version 1.0.7~rc1
11174
# Check how to create a tarball.                            -*- Autoconf -*-
11175
11176
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
11177
#
11178
# This file is free software; the Free Software Foundation
11179
# gives unlimited permission to copy and/or distribute it,
11180
# with or without modifications, as long as this notice is preserved.
11181
11182
# serial 2
11183
11184
# _AM_PROG_TAR(FORMAT)
11185
# --------------------
11186
# Check how to create a tarball in format FORMAT.
11187
# FORMAT should be one of `v7', `ustar', or `pax'.
11188
#
11189
# Substitute a variable $(am__tar) that is a command
11190
# writing to stdout a FORMAT-tarball containing the directory
11191
# $tardir.
11192
#     tardir=directory && $(am__tar) > result.tar
11193
#
11194
# Substitute a variable $(am__untar) that extract such
11195
# a tarball read from stdin.
11196
#     $(am__untar) < result.tar
11197
AC_DEFUN([_AM_PROG_TAR],
11198
[# Always define AMTAR for backward compatibility.
11199
AM_MISSING_PROG([AMTAR], [tar])
11200
m4_if([$1], [v7],
11201
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
11202
     [m4_case([$1], [ustar],, [pax],,
11203
              [m4_fatal([Unknown tar format])])
11204
AC_MSG_CHECKING([how to create a $1 tar archive])
11205
# Loop over all known methods to create a tar archive until one works.
11206
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11207
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
11208
# Do not fold the above two line into one, because Tru64 sh and
11209
# Solaris sh will not grok spaces in the rhs of `-'.
11210
for _am_tool in $_am_tools
11211
do
11212
  case $_am_tool in
11213
  gnutar)
11214
    for _am_tar in tar gnutar gtar;
11215
    do
11216
      AM_RUN_LOG([$_am_tar --version]) && break
11217
    done
11218
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11219
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11220
    am__untar="$_am_tar -xf -"
11221
    ;;
11222
  plaintar)
11223
    # Must skip GNU tar: if it does not support --format= it doesn't create
11224
    # ustar tarball either.
11225
    (tar --version) >/dev/null 2>&1 && continue
11226
    am__tar='tar chf - "$$tardir"'
11227
    am__tar_='tar chf - "$tardir"'
11228
    am__untar='tar xf -'
11229
    ;;
11230
  pax)
11231
    am__tar='pax -L -x $1 -w "$$tardir"'
11232
    am__tar_='pax -L -x $1 -w "$tardir"'
11233
    am__untar='pax -r'
11234
    ;;
11235
  cpio)
11236
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11237
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11238
    am__untar='cpio -i -H $1 -d'
11239
    ;;
11240
  none)
11241
    am__tar=false
11242
    am__tar_=false
11243
    am__untar=false
11244
    ;;
11245
  esac
11246
11247
  # If the value was cached, stop now.  We just wanted to have am__tar
11248
  # and am__untar set.
11249
  test -n "${am_cv_prog_tar_$1}" && break
11250
11251
  # tar/untar a dummy directory, and stop if the command works
11252
  rm -rf conftest.dir
11253
  mkdir conftest.dir
11254
  echo GrepMe > conftest.dir/file
11255
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11256
  rm -rf conftest.dir
11257
  if test -s conftest.tar; then
11258
    AM_RUN_LOG([$am__untar <conftest.tar])
11259
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11260
  fi
11261
done
11262
rm -rf conftest.dir
11263
11264
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11265
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11266
AC_SUBST([am__tar])
11267
AC_SUBST([am__untar])
11268
]) # _AM_PROG_TAR
11269
11270
m4_include([acinclude.m4])