~ubuntu-branches/ubuntu/maverick/uim/maverick

1.1.10 by Masahito Omote
Import upstream version 1.5.5
1
# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
1 by Masahito Omote
Import upstream version 0.3.9
2
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1.1.8 by Masahito Omote
Import upstream version 1.5.1
4
# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
1 by Masahito Omote
Import upstream version 0.3.9
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
1.1.8 by Masahito Omote
Import upstream version 1.5.1
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1.1.10 by Masahito Omote
Import upstream version 1.5.5
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17
[m4_warning([this file was generated for autoconf 2.63.
1.1.8 by Masahito Omote
Import upstream version 1.5.1
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'.])])
1.1.6 by Masahito Omote
Import upstream version 1.4.1
21
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
22
# gettext.m4 serial 37 (gettext-0.14.4)
23
dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
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
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
37
dnl Authors:
38
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
39
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
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], ifelse([$1], [external], [no], [yes]))
88
  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
89
90
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
91
  ifelse(gt_included_intl, yes, [
92
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
93
  ])
94
95
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
96
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
97
  AC_REQUIRE([AC_LIB_RPATH])
98
99
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
100
  dnl Ideally we would do this search only after the
101
  dnl      if test "$USE_NLS" = "yes"; then
102
  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
103
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
104
  dnl the configure script would need to contain the same shell code
105
  dnl again, outside any 'if'. There are two solutions:
106
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
107
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
108
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
109
  dnl documented, we avoid it.
110
  ifelse(gt_included_intl, yes, , [
111
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
112
  ])
113
114
  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
115
  gt_INTL_MACOSX
116
117
  dnl Set USE_NLS.
118
  AM_NLS
119
120
  ifelse(gt_included_intl, yes, [
121
    BUILD_INCLUDED_LIBINTL=no
122
    USE_INCLUDED_LIBINTL=no
123
  ])
124
  LIBINTL=
125
  LTLIBINTL=
126
  POSUB=
127
128
  dnl If we use NLS figure out what method
129
  if test "$USE_NLS" = "yes"; then
130
    gt_use_preinstalled_gnugettext=no
131
    ifelse(gt_included_intl, yes, [
132
      AC_MSG_CHECKING([whether included gettext is requested])
133
      AC_ARG_WITH(included-gettext,
134
        [  --with-included-gettext use the GNU gettext library included here],
135
        nls_cv_force_use_gnu_gettext=$withval,
136
        nls_cv_force_use_gnu_gettext=no)
137
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
138
139
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
140
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
141
    ])
142
        dnl User does not insist on using GNU NLS library.  Figure out what
143
        dnl to use.  If GNU gettext is available we use this.  Else we have
144
        dnl to fall back to GNU NLS library.
145
146
        dnl Add a version number to the cache macros.
147
        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
148
        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
149
        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
150
151
        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
152
         [AC_TRY_LINK([#include <libintl.h>
153
]ifelse([$2], [need-formatstring-macros],
154
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
155
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
156
#endif
157
changequote(,)dnl
158
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
159
changequote([,])dnl
160
], [])[extern int _nl_msg_cat_cntr;
161
extern int *_nl_domain_bindings;],
162
            [bindtextdomain ("", "");
163
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
164
            gt_cv_func_gnugettext_libc=yes,
165
            gt_cv_func_gnugettext_libc=no)])
166
167
        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
168
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
169
          ifelse(gt_included_intl, yes, , [
170
            AM_ICONV_LINK
171
          ])
172
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
173
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
174
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
175
          dnl even if libiconv doesn't exist.
176
          AC_LIB_LINKFLAGS_BODY([intl])
177
          AC_CACHE_CHECK([for GNU gettext in libintl],
178
            gt_cv_func_gnugettext_libintl,
179
           [gt_save_CPPFLAGS="$CPPFLAGS"
180
            CPPFLAGS="$CPPFLAGS $INCINTL"
181
            gt_save_LIBS="$LIBS"
182
            LIBS="$LIBS $LIBINTL"
183
            dnl Now see whether libintl exists and does not depend on libiconv.
184
            AC_TRY_LINK([#include <libintl.h>
185
]ifelse([$2], [need-formatstring-macros],
186
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
187
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
188
#endif
189
changequote(,)dnl
190
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
191
changequote([,])dnl
192
], [])[extern int _nl_msg_cat_cntr;
193
extern
194
#ifdef __cplusplus
195
"C"
196
#endif
197
const char *_nl_expand_alias (const char *);],
198
              [bindtextdomain ("", "");
199
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
200
              gt_cv_func_gnugettext_libintl=yes,
201
              gt_cv_func_gnugettext_libintl=no)
202
            dnl Now see whether libintl exists and depends on libiconv.
203
            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
204
              LIBS="$LIBS $LIBICONV"
205
              AC_TRY_LINK([#include <libintl.h>
206
]ifelse([$2], [need-formatstring-macros],
207
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
208
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
209
#endif
210
changequote(,)dnl
211
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
212
changequote([,])dnl
213
], [])[extern int _nl_msg_cat_cntr;
214
extern
215
#ifdef __cplusplus
216
"C"
217
#endif
218
const char *_nl_expand_alias (const char *);],
219
                [bindtextdomain ("", "");
220
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
221
               [LIBINTL="$LIBINTL $LIBICONV"
222
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
223
                gt_cv_func_gnugettext_libintl=yes
224
               ])
225
            fi
226
            CPPFLAGS="$gt_save_CPPFLAGS"
227
            LIBS="$gt_save_LIBS"])
228
        fi
229
230
        dnl If an already present or preinstalled GNU gettext() is found,
231
        dnl use it.  But if this macro is used in GNU gettext, and GNU
232
        dnl gettext is already preinstalled in libintl, we update this
233
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
234
        if test "$gt_cv_func_gnugettext_libc" = "yes" \
235
           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
236
                && test "$PACKAGE" != gettext-runtime \
237
                && test "$PACKAGE" != gettext-tools; }; then
238
          gt_use_preinstalled_gnugettext=yes
239
        else
240
          dnl Reset the values set by searching for libintl.
241
          LIBINTL=
242
          LTLIBINTL=
243
          INCINTL=
244
        fi
245
246
    ifelse(gt_included_intl, yes, [
247
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
248
          dnl GNU gettext is not found in the C library.
249
          dnl Fall back on included GNU gettext library.
250
          nls_cv_use_gnu_gettext=yes
251
        fi
252
      fi
253
254
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
255
        dnl Mark actions used to generate GNU NLS library.
256
        BUILD_INCLUDED_LIBINTL=yes
257
        USE_INCLUDED_LIBINTL=yes
258
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
259
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
260
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
261
      fi
262
263
      CATOBJEXT=
264
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
265
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
266
        dnl Mark actions to use GNU gettext tools.
267
        CATOBJEXT=.gmo
268
      fi
269
    ])
270
271
    if test -n "$INTL_MACOSX_LIBS"; then
272
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
273
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
274
        dnl Some extra flags are needed during linking.
275
        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
276
        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
277
      fi
278
    fi
279
280
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
281
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
282
      AC_DEFINE(ENABLE_NLS, 1,
283
        [Define to 1 if translation of program messages to the user's native language
284
   is requested.])
285
    else
286
      USE_NLS=no
287
    fi
288
  fi
289
290
  AC_MSG_CHECKING([whether to use NLS])
291
  AC_MSG_RESULT([$USE_NLS])
292
  if test "$USE_NLS" = "yes"; then
293
    AC_MSG_CHECKING([where the gettext function comes from])
294
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
295
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
296
        gt_source="external libintl"
297
      else
298
        gt_source="libc"
299
      fi
300
    else
301
      gt_source="included intl directory"
302
    fi
303
    AC_MSG_RESULT([$gt_source])
304
  fi
305
306
  if test "$USE_NLS" = "yes"; then
307
308
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
309
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
310
        AC_MSG_CHECKING([how to link with libintl])
311
        AC_MSG_RESULT([$LIBINTL])
312
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
313
      fi
314
315
      dnl For backward compatibility. Some packages may be using this.
316
      AC_DEFINE(HAVE_GETTEXT, 1,
317
       [Define if the GNU gettext() function is already present or preinstalled.])
318
      AC_DEFINE(HAVE_DCGETTEXT, 1,
319
       [Define if the GNU dcgettext() function is already present or preinstalled.])
320
    fi
321
322
    dnl We need to process the po/ directory.
323
    POSUB=po
324
  fi
325
326
  ifelse(gt_included_intl, yes, [
327
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
328
    dnl to 'yes' because some of the testsuite requires it.
329
    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
330
      BUILD_INCLUDED_LIBINTL=yes
331
    fi
332
333
    dnl Make all variables we use known to autoconf.
334
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
335
    AC_SUBST(USE_INCLUDED_LIBINTL)
336
    AC_SUBST(CATOBJEXT)
337
338
    dnl For backward compatibility. Some configure.ins may be using this.
339
    nls_cv_header_intl=
340
    nls_cv_header_libgt=
341
342
    dnl For backward compatibility. Some Makefiles may be using this.
343
    DATADIRNAME=share
344
    AC_SUBST(DATADIRNAME)
345
346
    dnl For backward compatibility. Some Makefiles may be using this.
347
    INSTOBJEXT=.mo
348
    AC_SUBST(INSTOBJEXT)
349
350
    dnl For backward compatibility. Some Makefiles may be using this.
351
    GENCAT=gencat
352
    AC_SUBST(GENCAT)
353
354
    dnl For backward compatibility. Some Makefiles may be using this.
355
    INTLOBJS=
356
    if test "$USE_INCLUDED_LIBINTL" = yes; then
357
      INTLOBJS="\$(GETTOBJS)"
358
    fi
359
    AC_SUBST(INTLOBJS)
360
361
    dnl Enable libtool support if the surrounding package wishes it.
362
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
363
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
364
  ])
365
366
  dnl For backward compatibility. Some Makefiles may be using this.
367
  INTLLIBS="$LIBINTL"
368
  AC_SUBST(INTLLIBS)
369
370
  dnl Make all documented variables known to autoconf.
371
  AC_SUBST(LIBINTL)
372
  AC_SUBST(LTLIBINTL)
373
  AC_SUBST(POSUB)
374
])
375
376
377
dnl Checks for all prerequisites of the intl subdirectory,
378
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
379
dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
380
AC_DEFUN([AM_INTL_SUBDIR],
381
[
382
  AC_REQUIRE([AC_PROG_INSTALL])dnl
383
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
384
  AC_REQUIRE([AC_PROG_CC])dnl
385
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
386
  AC_REQUIRE([gt_GLIBC2])dnl
387
  AC_REQUIRE([AC_PROG_RANLIB])dnl
388
  AC_REQUIRE([AC_ISC_POSIX])dnl
389
  AC_REQUIRE([AC_HEADER_STDC])dnl
390
  AC_REQUIRE([AC_C_CONST])dnl
391
  AC_REQUIRE([bh_C_SIGNED])dnl
392
  AC_REQUIRE([AC_C_INLINE])dnl
393
  AC_REQUIRE([AC_TYPE_OFF_T])dnl
394
  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
395
  AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
396
  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
397
  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
398
  AC_REQUIRE([gt_TYPE_WINT_T])dnl
399
  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
400
  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
401
  AC_REQUIRE([gt_TYPE_INTMAX_T])
402
  AC_REQUIRE([gt_PRINTF_POSIX])
403
  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
404
  AC_REQUIRE([AC_FUNC_MMAP])dnl
405
  AC_REQUIRE([gl_GLIBC21])dnl
406
  AC_REQUIRE([gt_INTDIV0])dnl
407
  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
408
  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
409
  AC_REQUIRE([gt_INTTYPES_PRI])dnl
410
  AC_REQUIRE([gl_XSIZE])dnl
411
  AC_REQUIRE([gt_INTL_MACOSX])dnl
412
413
  AC_CHECK_TYPE([ptrdiff_t], ,
414
    [AC_DEFINE([ptrdiff_t], [long],
415
       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
416
    ])
417
  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
418
stdlib.h string.h unistd.h sys/param.h])
419
  AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
420
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
421
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
422
__fsetlocking])
423
424
  dnl Use the _snprintf function only if it is declared (because on NetBSD it
425
  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
426
  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
427
  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
428
429
  dnl Use the *_unlocked functions only if they are declared.
430
  dnl (because some of them were defined without being declared in Solaris
431
  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
432
  dnl on Solaris 2.5.1 to run on Solaris 2.6).
433
  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
434
  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
435
  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
436
  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
437
438
  case $gt_cv_func_printf_posix in
439
    *yes) HAVE_POSIX_PRINTF=1 ;;
440
    *) HAVE_POSIX_PRINTF=0 ;;
441
  esac
442
  AC_SUBST([HAVE_POSIX_PRINTF])
443
  if test "$ac_cv_func_asprintf" = yes; then
444
    HAVE_ASPRINTF=1
445
  else
446
    HAVE_ASPRINTF=0
447
  fi
448
  AC_SUBST([HAVE_ASPRINTF])
449
  if test "$ac_cv_func_snprintf" = yes; then
450
    HAVE_SNPRINTF=1
451
  else
452
    HAVE_SNPRINTF=0
453
  fi
454
  AC_SUBST([HAVE_SNPRINTF])
455
  if test "$ac_cv_func_wprintf" = yes; then
456
    HAVE_WPRINTF=1
457
  else
458
    HAVE_WPRINTF=0
459
  fi
460
  AC_SUBST([HAVE_WPRINTF])
461
462
  AM_ICONV
463
  AM_LANGINFO_CODESET
464
  if test $ac_cv_header_locale_h = yes; then
465
    gt_LC_MESSAGES
466
  fi
467
468
  if test -n "$INTL_MACOSX_LIBS"; then
469
    CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
470
  fi
471
472
  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
473
  dnl because plural.y uses bison specific features. It requires at least
474
  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
475
  dnl compile.
476
  dnl bison is only needed for the maintainer (who touches plural.y). But in
477
  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
478
  dnl the rule in general Makefile. Now, some people carelessly touch the
479
  dnl files or have a broken "make" program, hence the plural.c rule will
480
  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
481
  dnl present or too old.
482
  AC_CHECK_PROGS([INTLBISON], [bison])
483
  if test -z "$INTLBISON"; then
484
    ac_verc_fail=yes
485
  else
486
    dnl Found it, now check the version.
487
    AC_MSG_CHECKING([version of bison])
488
changequote(<<,>>)dnl
489
    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
490
    case $ac_prog_version in
491
      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
492
      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
493
changequote([,])dnl
494
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
495
      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
496
    esac
497
    AC_MSG_RESULT([$ac_prog_version])
498
  fi
499
  if test $ac_verc_fail = yes; then
500
    INTLBISON=:
501
  fi
502
])
503
504
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
505
dnl Checks for special options needed on MacOS X.
506
dnl Defines INTL_MACOSX_LIBS.
507
AC_DEFUN([gt_INTL_MACOSX],
508
[
509
  dnl Check for API introduced in MacOS X 10.2.
510
  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
511
    gt_cv_func_CFPreferencesCopyAppValue,
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
512
    [gt_save_CPPFLAGS="$CPPFLAGS"
513
     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
514
     gt_save_LIBS="$LIBS"
515
     LIBS="$LIBS -framework CoreFoundation"
516
     AC_TRY_LINK([#include <CFPreferences.h>],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
517
       [CFPreferencesCopyAppValue(NULL, NULL)],
518
       [gt_cv_func_CFPreferencesCopyAppValue=yes],
519
       [gt_cv_func_CFPreferencesCopyAppValue=no])
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
520
     CPPFLAGS="$gt_save_CPPFLAGS"
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
521
     LIBS="$gt_save_LIBS"])
522
  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
523
    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
524
      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
525
  fi
526
  dnl Check for API introduced in MacOS X 10.3.
527
  AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
528
    [gt_save_CPPFLAGS="$CPPFLAGS"
529
     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
530
     gt_save_LIBS="$LIBS"
531
     LIBS="$LIBS -framework CoreFoundation"
532
     AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
533
       [gt_cv_func_CFLocaleCopyCurrent=yes],
534
       [gt_cv_func_CFLocaleCopyCurrent=no])
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
535
     CPPFLAGS="$gt_save_CPPFLAGS"
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
536
     LIBS="$gt_save_LIBS"])
537
  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
538
    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
539
      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
540
  fi
541
  INTL_MACOSX_LIBS=
542
  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
543
    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
544
  fi
545
  AC_SUBST([INTL_MACOSX_LIBS])
546
])
547
1.1.3 by Masahito Omote
Import upstream version 1.0.0
548
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
549
dnl gt_CHECK_DECL(FUNC, INCLUDES)
550
dnl Check whether a function is declared.
551
AC_DEFUN([gt_CHECK_DECL],
552
[
553
  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
554
    [AC_TRY_COMPILE([$2], [
555
#ifndef $1
556
  char *p = (char *) $1;
557
#endif
558
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
559
  if test $ac_cv_have_decl_$1 = yes; then
560
    gt_value=1
561
  else
562
    gt_value=0
563
  fi
564
  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
565
    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
566
])
567
568
569
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
570
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
571
572
1.1.3 by Masahito Omote
Import upstream version 1.0.0
573
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
574
# serial 36 IT_PROG_INTLTOOL
575
AC_DEFUN([IT_PROG_INTLTOOL],
576
[AC_PREREQ([2.50])dnl
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
577
578
case "$am__api_version" in
579
    1.[01234])
580
	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
581
    ;;
582
    *)
583
    ;;
584
esac
1.1.3 by Masahito Omote
Import upstream version 1.0.0
585
586
if test -n "$1"; then
1.1.8 by Masahito Omote
Import upstream version 1.5.1
587
    AC_MSG_CHECKING([for intltool >= $1])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
588
1.1.6 by Masahito Omote
Import upstream version 1.4.1
589
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
590
    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
591
    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
592
    ]
593
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
594
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
595
	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
596
fi
597
598
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
599
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
600
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
601
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
602
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
603
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
604
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
605
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
606
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
607
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
608
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
609
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
610
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
611
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
612
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
613
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
614
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
615
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1.1.8 by Masahito Omote
Import upstream version 1.5.1
616
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
617
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
618
AC_SUBST(INTLTOOL_DESKTOP_RULE)
619
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
620
AC_SUBST(INTLTOOL_KEYS_RULE)
621
AC_SUBST(INTLTOOL_PROP_RULE)
622
AC_SUBST(INTLTOOL_OAF_RULE)
623
AC_SUBST(INTLTOOL_PONG_RULE)
624
AC_SUBST(INTLTOOL_SERVER_RULE)
625
AC_SUBST(INTLTOOL_SHEET_RULE)
626
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
627
AC_SUBST(INTLTOOL_UI_RULE)
628
AC_SUBST(INTLTOOL_XAM_RULE)
629
AC_SUBST(INTLTOOL_KBD_RULE)
630
AC_SUBST(INTLTOOL_XML_RULE)
631
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
632
AC_SUBST(INTLTOOL_CAVES_RULE)
633
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
634
AC_SUBST(INTLTOOL_THEME_RULE)
635
AC_SUBST(INTLTOOL_SERVICE_RULE)
636
AC_SUBST(INTLTOOL_POLICY_RULE)
1.1.8 by Masahito Omote
Import upstream version 1.5.1
637
638
# Check the gettext tools to make sure they are GNU
639
AC_PATH_PROG(XGETTEXT, xgettext)
640
AC_PATH_PROG(MSGMERGE, msgmerge)
641
AC_PATH_PROG(MSGFMT, msgfmt)
642
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
643
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
644
fi
645
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
646
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
647
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
648
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
649
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
650
fi
1.1.3 by Masahito Omote
Import upstream version 1.0.0
651
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
652
# Use the tools built into the package, not the ones that are installed.
653
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
654
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
655
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
656
1.1.3 by Masahito Omote
Import upstream version 1.0.0
657
AC_PATH_PROG(INTLTOOL_PERL, perl)
658
if test -z "$INTLTOOL_PERL"; then
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
659
   AC_MSG_ERROR([perl not found; required for intltool])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
660
fi
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
661
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
662
   AC_MSG_ERROR([perl 5.x required for intltool])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
663
fi
664
if test "x$2" != "xno-xml"; then
665
   AC_MSG_CHECKING([for XML::Parser])
666
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
667
       AC_MSG_RESULT([ok])
668
   else
669
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
670
   fi
671
fi
672
1.1.6 by Masahito Omote
Import upstream version 1.4.1
673
# Substitute ALL_LINGUAS so we can use it in po/Makefile
674
AC_SUBST(ALL_LINGUAS)
675
676
# Set DATADIRNAME correctly if it is not set yet
677
# (copied from glib-gettext.m4)
678
if test -z "$DATADIRNAME"; then
1.1.8 by Masahito Omote
Import upstream version 1.5.1
679
  AC_LINK_IFELSE(
680
    [AC_LANG_PROGRAM([[]],
681
                     [[extern int _nl_msg_cat_cntr;
682
                       return _nl_msg_cat_cntr]])],
1.1.6 by Masahito Omote
Import upstream version 1.4.1
683
    [DATADIRNAME=share],
684
    [case $host in
685
    *-*-solaris*)
686
    dnl On Solaris, if bind_textdomain_codeset is in libc,
687
    dnl GNU format message catalog is always supported,
688
    dnl since both are added to the libc all together.
689
    dnl Hence, we'd like to go with DATADIRNAME=share
690
    dnl in this case.
691
    AC_CHECK_FUNC(bind_textdomain_codeset,
692
      [DATADIRNAME=share], [DATADIRNAME=lib])
693
    ;;
694
    *)
695
    [DATADIRNAME=lib]
696
    ;;
697
    esac])
698
fi
699
AC_SUBST(DATADIRNAME)
700
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
701
IT_PO_SUBDIR([po])
702
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
703
dnl The following is very similar to
704
dnl
705
dnl	AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
706
dnl
707
dnl with the following slight differences:
708
dnl  - the *.in files are in ac_aux_dir,
709
dnl  - if the file haven't changed upon reconfigure, it's not touched,
710
dnl  - the evaluation of the third parameter enables a hack which computes
711
dnl    the actual value of $libdir,
712
dnl  - the user sees "executing intltool commands", instead of
713
dnl    "creating intltool-extract" and such.
714
dnl
715
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
716
dnl a reason for it.
717
718
AC_CONFIG_COMMANDS([intltool], [
719
720
for file in intltool-extract intltool-merge intltool-update; do
721
  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
722
      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
723
      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
724
	< ${ac_aux_dir}/${file}.in > ${file}.out
725
  if cmp -s ${file} ${file}.out 2>/dev/null; then
726
    rm -f ${file}.out
727
  else
728
    mv -f ${file}.out ${file}
729
  fi
730
  chmod ugo+x ${file}
731
  chmod u+w ${file}
732
done
733
734
],
735
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
736
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
737
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
738
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
739
])
740
741
742
# IT_PO_SUBDIR(DIRNAME)
743
# ---------------------
744
# All po subdirs have to be declared with this macro; the subdir "po" is
745
# declared by IT_PROG_INTLTOOL.
746
#
747
AC_DEFUN([IT_PO_SUBDIR],
748
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
749
dnl
750
dnl The following CONFIG_COMMANDS should be exetuted at the very end
751
dnl of config.status.
752
AC_CONFIG_COMMANDS_PRE([
753
  AC_CONFIG_COMMANDS([$1/stamp-it], [
754
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
755
    >"$1/stamp-it.tmp"
756
    [sed '/^#/d
757
	 s/^[[].*] *//
758
	 /^[ 	]*$/d
759
	'"s|^|	$ac_top_srcdir/|" \
760
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
761
    ]
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
762
    if test ! -f "$1/Makefile"; then
763
      AC_MSG_ERROR([$1/Makefile is not ready.])
764
    fi
765
    mv "$1/Makefile" "$1/Makefile.tmp"
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
766
    [sed '/^POTFILES =/,/[^\\]$/ {
767
		/^POTFILES =/!d
768
		r $1/POTFILES
769
	  }
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
770
	 ' "$1/Makefile.tmp" >"$1/Makefile"]
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
771
    rm -f "$1/Makefile.tmp"
772
    mv "$1/stamp-it.tmp" "$1/stamp-it"
773
  ])
774
])dnl
775
])
776
1.1.3 by Masahito Omote
Import upstream version 1.0.0
777
778
# deprecated macros
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
779
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
780
# A hint is needed for aclocal from Automake <= 1.9.4:
781
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1.1.3 by Masahito Omote
Import upstream version 1.0.0
782
1 by Masahito Omote
Import upstream version 0.3.9
783
784
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
785
#
786
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
787
#                 2006, 2007, 2008 Free Software Foundation, Inc.
788
#   Written by Gordon Matzigkeit, 1996
789
#
790
# This file is free software; the Free Software Foundation gives
791
# unlimited permission to copy and/or distribute it, with or without
792
# modifications, as long as this notice is preserved.
793
794
m4_define([_LT_COPYING], [dnl
795
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
796
#                 2006, 2007, 2008 Free Software Foundation, Inc.
797
#   Written by Gordon Matzigkeit, 1996
798
#
799
#   This file is part of GNU Libtool.
800
#
801
# GNU Libtool is free software; you can redistribute it and/or
802
# modify it under the terms of the GNU General Public License as
803
# published by the Free Software Foundation; either version 2 of
804
# the License, or (at your option) any later version.
805
#
806
# As a special exception to the GNU General Public License,
807
# if you distribute this file as part of a program or library that
808
# is built using GNU Libtool, you may include this file under the
809
# same distribution terms that you use for the rest of that program.
810
#
811
# GNU Libtool is distributed in the hope that it will be useful,
812
# but WITHOUT ANY WARRANTY; without even the implied warranty of
813
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
814
# GNU General Public License for more details.
815
#
816
# You should have received a copy of the GNU General Public License
817
# along with GNU Libtool; see the file COPYING.  If not, a copy
818
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
819
# obtained by writing to the Free Software Foundation, Inc.,
820
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
821
])
822
823
# serial 56 LT_INIT
824
825
826
# LT_PREREQ(VERSION)
827
# ------------------
828
# Complain and exit if this libtool version is less that VERSION.
829
m4_defun([LT_PREREQ],
830
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
831
       [m4_default([$3],
832
		   [m4_fatal([Libtool version $1 or higher is required],
833
		             63)])],
834
       [$2])])
835
836
837
# _LT_CHECK_BUILDDIR
838
# ------------------
839
# Complain if the absolute build directory name contains unusual characters
840
m4_defun([_LT_CHECK_BUILDDIR],
841
[case `pwd` in
842
  *\ * | *\	*)
843
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
844
esac
845
])
846
847
848
# LT_INIT([OPTIONS])
849
# ------------------
850
AC_DEFUN([LT_INIT],
851
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
852
AC_BEFORE([$0], [LT_LANG])dnl
853
AC_BEFORE([$0], [LT_OUTPUT])dnl
854
AC_BEFORE([$0], [LTDL_INIT])dnl
855
m4_require([_LT_CHECK_BUILDDIR])dnl
856
857
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
858
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
859
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
860
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
861
dnl unless we require an AC_DEFUNed macro:
862
AC_REQUIRE([LTOPTIONS_VERSION])dnl
863
AC_REQUIRE([LTSUGAR_VERSION])dnl
864
AC_REQUIRE([LTVERSION_VERSION])dnl
865
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
866
m4_require([_LT_PROG_LTMAIN])dnl
867
868
dnl Parse OPTIONS
869
_LT_SET_OPTIONS([$0], [$1])
1 by Masahito Omote
Import upstream version 0.3.9
870
871
# This can be used to rebuild libtool when needed
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
872
LIBTOOL_DEPS="$ltmain"
1 by Masahito Omote
Import upstream version 0.3.9
873
874
# Always use our own libtool.
875
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
876
AC_SUBST(LIBTOOL)dnl
877
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
878
_LT_SETUP
879
880
# Only expand once:
881
m4_define([LT_INIT])
882
])# LT_INIT
883
884
# Old names:
885
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
886
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
887
dnl aclocal-1.4 backwards compatibility:
888
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
889
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
890
891
892
# _LT_CC_BASENAME(CC)
893
# -------------------
894
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
895
m4_defun([_LT_CC_BASENAME],
896
[for cc_temp in $1""; do
897
  case $cc_temp in
898
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
899
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
900
    \-*) ;;
901
    *) break;;
902
  esac
903
done
904
cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
905
])
906
907
908
# _LT_FILEUTILS_DEFAULTS
909
# ----------------------
910
# It is okay to use these file commands and assume they have been set
911
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
912
m4_defun([_LT_FILEUTILS_DEFAULTS],
913
[: ${CP="cp -f"}
914
: ${MV="mv -f"}
915
: ${RM="rm -f"}
916
])# _LT_FILEUTILS_DEFAULTS
917
918
919
# _LT_SETUP
920
# ---------
921
m4_defun([_LT_SETUP],
922
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1 by Masahito Omote
Import upstream version 0.3.9
923
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
924
_LT_DECL([], [host_alias], [0], [The host system])dnl
925
_LT_DECL([], [host], [0])dnl
926
_LT_DECL([], [host_os], [0])dnl
927
dnl
928
_LT_DECL([], [build_alias], [0], [The build system])dnl
929
_LT_DECL([], [build], [0])dnl
930
_LT_DECL([], [build_os], [0])dnl
931
dnl
1 by Masahito Omote
Import upstream version 0.3.9
932
AC_REQUIRE([AC_PROG_CC])dnl
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
933
AC_REQUIRE([LT_PATH_LD])dnl
934
AC_REQUIRE([LT_PATH_NM])dnl
935
dnl
1 by Masahito Omote
Import upstream version 0.3.9
936
AC_REQUIRE([AC_PROG_LN_S])dnl
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
937
test -z "$LN_S" && LN_S="ln -s"
938
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
939
dnl
940
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
941
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
942
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
943
dnl
944
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
945
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
946
m4_require([_LT_CMD_RELOAD])dnl
947
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
948
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
949
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
950
951
_LT_CONFIG_LIBTOOL_INIT([
952
# See if we are running on zsh, and set the options which allow our
953
# commands through without removal of \ escapes INIT.
954
if test -n "\${ZSH_VERSION+set}" ; then
955
   setopt NO_GLOB_SUBST
956
fi
957
])
958
if test -n "${ZSH_VERSION+set}" ; then
959
   setopt NO_GLOB_SUBST
960
fi
961
962
_LT_CHECK_OBJDIR
963
964
m4_require([_LT_TAG_COMPILER])dnl
965
_LT_PROG_ECHO_BACKSLASH
1 by Masahito Omote
Import upstream version 0.3.9
966
967
case $host_os in
968
aix3*)
969
  # AIX sometimes has problems with the GCC collect2 program.  For some
970
  # reason, if we set the COLLECT_NAMES environment variable, the problems
971
  # vanish in a puff of smoke.
972
  if test "X${COLLECT_NAMES+set}" != Xset; then
973
    COLLECT_NAMES=
974
    export COLLECT_NAMES
975
  fi
976
  ;;
977
esac
978
979
# Sed substitution that helps us do robust quoting.  It backslashifies
980
# metacharacters that are still active within double-quoted strings.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
981
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1 by Masahito Omote
Import upstream version 0.3.9
982
983
# Same as above, but do not quote variable references.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
984
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1 by Masahito Omote
Import upstream version 0.3.9
985
986
# Sed substitution to delay expansion of an escaped shell variable in a
987
# double_quote_subst'ed string.
988
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
989
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
990
# Sed substitution to delay expansion of an escaped single quote.
991
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
992
1 by Masahito Omote
Import upstream version 0.3.9
993
# Sed substitution to avoid accidental globbing in evaled expressions
994
no_glob_subst='s/\*/\\\*/g'
995
996
# Global variables:
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
997
ofile=libtool
1 by Masahito Omote
Import upstream version 0.3.9
998
can_build_shared=yes
999
1.1.3 by Masahito Omote
Import upstream version 1.0.0
1000
# All known linkers require a `.a' archive for static linking (except MSVC,
1 by Masahito Omote
Import upstream version 0.3.9
1001
# which needs '.lib').
1002
libext=a
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1003
1 by Masahito Omote
Import upstream version 0.3.9
1004
with_gnu_ld="$lt_cv_prog_gnu_ld"
1005
1006
old_CC="$CC"
1007
old_CFLAGS="$CFLAGS"
1008
1009
# Set sane defaults for various variables
1010
test -z "$CC" && CC=cc
1011
test -z "$LTCC" && LTCC=$CC
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
1012
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1 by Masahito Omote
Import upstream version 0.3.9
1013
test -z "$LD" && LD=ld
1014
test -z "$ac_objext" && ac_objext=o
1015
1.1.3 by Masahito Omote
Import upstream version 1.0.0
1016
_LT_CC_BASENAME([$compiler])
1017
1 by Masahito Omote
Import upstream version 0.3.9
1018
# Only perform the check for file, if the check method requires it
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1019
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1 by Masahito Omote
Import upstream version 0.3.9
1020
case $deplibs_check_method in
1021
file_magic*)
1022
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1023
    _LT_PATH_MAGIC
1 by Masahito Omote
Import upstream version 0.3.9
1024
  fi
1025
  ;;
1026
esac
1027
1028
# Use C for the default configuration in the libtool script
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1029
LT_SUPPORTED_TAG([CC])
1030
_LT_LANG_C_CONFIG
1031
_LT_LANG_DEFAULT_CONFIG
1032
_LT_CONFIG_COMMANDS
1033
])# _LT_SETUP
1034
1035
1036
# _LT_PROG_LTMAIN
1037
# ---------------
1038
# Note that this code is called both from `configure', and `config.status'
1039
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1040
# `config.status' has no value for ac_aux_dir unless we are using Automake,
1041
# so we pass a copy along to make sure it has a sensible value anyway.
1042
m4_defun([_LT_PROG_LTMAIN],
1043
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1044
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1045
ltmain="$ac_aux_dir/ltmain.sh"
1046
])# _LT_PROG_LTMAIN
1047
1048
1049
1050
# So that we can recreate a full libtool script including additional
1051
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1052
# in macros and then make a single call at the end using the `libtool'
1053
# label.
1054
1055
1056
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1057
# ----------------------------------------
1058
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1059
m4_define([_LT_CONFIG_LIBTOOL_INIT],
1060
[m4_ifval([$1],
1061
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1062
                     [$1
1063
])])])
1064
1065
# Initialize.
1066
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1067
1068
1069
# _LT_CONFIG_LIBTOOL([COMMANDS])
1070
# ------------------------------
1071
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1072
m4_define([_LT_CONFIG_LIBTOOL],
1073
[m4_ifval([$1],
1074
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1075
                     [$1
1076
])])])
1077
1078
# Initialize.
1079
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1080
1081
1082
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1083
# -----------------------------------------------------
1084
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1085
[_LT_CONFIG_LIBTOOL([$1])
1086
_LT_CONFIG_LIBTOOL_INIT([$2])
1087
])
1088
1089
1090
# _LT_FORMAT_COMMENT([COMMENT])
1091
# -----------------------------
1092
# Add leading comment marks to the start of each line, and a trailing
1093
# full-stop to the whole comment if one is not present already.
1094
m4_define([_LT_FORMAT_COMMENT],
1095
[m4_ifval([$1], [
1096
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1097
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1098
)])
1099
1100
1101
1102
1103
1104
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1105
# -------------------------------------------------------------------
1106
# CONFIGNAME is the name given to the value in the libtool script.
1107
# VARNAME is the (base) name used in the configure script.
1108
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1109
# VARNAME.  Any other value will be used directly.
1110
m4_define([_LT_DECL],
1111
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1112
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1113
	[m4_ifval([$1], [$1], [$2])])
1114
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1115
    m4_ifval([$4],
1116
	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1117
    lt_dict_add_subkey([lt_decl_dict], [$2],
1118
	[tagged?], [m4_ifval([$5], [yes], [no])])])
1119
])
1120
1121
1122
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1123
# --------------------------------------------------------
1124
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1125
1126
1127
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1128
# ------------------------------------------------
1129
m4_define([lt_decl_tag_varnames],
1130
[_lt_decl_filter([tagged?], [yes], $@)])
1131
1132
1133
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1134
# ---------------------------------------------------------
1135
m4_define([_lt_decl_filter],
1136
[m4_case([$#],
1137
  [0], [m4_fatal([$0: too few arguments: $#])],
1138
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1139
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1140
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1141
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1142
])
1143
1144
1145
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1146
# --------------------------------------------------
1147
m4_define([lt_decl_quote_varnames],
1148
[_lt_decl_filter([value], [1], $@)])
1149
1150
1151
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1152
# ---------------------------------------------------
1153
m4_define([lt_decl_dquote_varnames],
1154
[_lt_decl_filter([value], [2], $@)])
1155
1156
1157
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1158
# ---------------------------------------------------
1159
m4_define([lt_decl_varnames_tagged],
1160
[m4_assert([$# <= 2])dnl
1161
_$0(m4_quote(m4_default([$1], [[, ]])),
1162
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1163
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1164
m4_define([_lt_decl_varnames_tagged],
1165
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1166
1167
1168
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1169
# ------------------------------------------------
1170
m4_define([lt_decl_all_varnames],
1171
[_$0(m4_quote(m4_default([$1], [[, ]])),
1172
     m4_if([$2], [],
1173
	   m4_quote(lt_decl_varnames),
1174
	m4_quote(m4_shift($@))))[]dnl
1175
])
1176
m4_define([_lt_decl_all_varnames],
1177
[lt_join($@, lt_decl_varnames_tagged([$1],
1178
			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1179
])
1180
1181
1182
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1183
# ------------------------------------
1184
# Quote a variable value, and forward it to `config.status' so that its
1185
# declaration there will have the same value as in `configure'.  VARNAME
1186
# must have a single quote delimited value for this to work.
1187
m4_define([_LT_CONFIG_STATUS_DECLARE],
1188
[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1189
1190
1191
# _LT_CONFIG_STATUS_DECLARATIONS
1192
# ------------------------------
1193
# We delimit libtool config variables with single quotes, so when
1194
# we write them to config.status, we have to be sure to quote all
1195
# embedded single quotes properly.  In configure, this macro expands
1196
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1197
#
1198
#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1199
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1200
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1201
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1202
1203
1204
# _LT_LIBTOOL_TAGS
1205
# ----------------
1206
# Output comment and list of tags supported by the script
1207
m4_defun([_LT_LIBTOOL_TAGS],
1208
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1209
available_tags="_LT_TAGS"dnl
1210
])
1211
1212
1213
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1214
# -----------------------------------
1215
# Extract the dictionary values for VARNAME (optionally with TAG) and
1216
# expand to a commented shell variable setting:
1217
#
1218
#    # Some comment about what VAR is for.
1219
#    visible_name=$lt_internal_name
1220
m4_define([_LT_LIBTOOL_DECLARE],
1221
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1222
					   [description])))[]dnl
1223
m4_pushdef([_libtool_name],
1224
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1225
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1226
    [0], [_libtool_name=[$]$1],
1227
    [1], [_libtool_name=$lt_[]$1],
1228
    [2], [_libtool_name=$lt_[]$1],
1229
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1230
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1231
])
1232
1233
1234
# _LT_LIBTOOL_CONFIG_VARS
1235
# -----------------------
1236
# Produce commented declarations of non-tagged libtool config variables
1237
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1238
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1239
# section) are produced by _LT_LIBTOOL_TAG_VARS.
1240
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1241
[m4_foreach([_lt_var],
1242
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1243
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1244
1245
1246
# _LT_LIBTOOL_TAG_VARS(TAG)
1247
# -------------------------
1248
m4_define([_LT_LIBTOOL_TAG_VARS],
1249
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1250
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1251
1252
1253
# _LT_TAGVAR(VARNAME, [TAGNAME])
1254
# ------------------------------
1255
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1256
1257
1258
# _LT_CONFIG_COMMANDS
1 by Masahito Omote
Import upstream version 0.3.9
1259
# -------------------
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1260
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1261
# variables for single and double quote escaping we saved from calls
1262
# to _LT_DECL, we can put quote escaped variables declarations
1263
# into `config.status', and then the shell code to quote escape them in
1264
# for loops in `config.status'.  Finally, any additional code accumulated
1265
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1266
m4_defun([_LT_CONFIG_COMMANDS],
1267
[AC_PROVIDE_IFELSE([LT_OUTPUT],
1268
	dnl If the libtool generation code has been placed in $CONFIG_LT,
1269
	dnl instead of duplicating it all over again into config.status,
1270
	dnl then we will have config.status run $CONFIG_LT later, so it
1271
	dnl needs to know what name is stored there:
1272
        [AC_CONFIG_COMMANDS([libtool],
1273
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1274
    dnl If the libtool generation code is destined for config.status,
1275
    dnl expand the accumulated commands and init code now:
1276
    [AC_CONFIG_COMMANDS([libtool],
1277
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1278
])#_LT_CONFIG_COMMANDS
1279
1280
1281
# Initialize.
1282
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1283
[
1284
1285
# The HP-UX ksh and POSIX shell print the target directory to stdout
1286
# if CDPATH is set.
1287
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1288
1289
sed_quote_subst='$sed_quote_subst'
1290
double_quote_subst='$double_quote_subst'
1291
delay_variable_subst='$delay_variable_subst'
1292
_LT_CONFIG_STATUS_DECLARATIONS
1293
LTCC='$LTCC'
1294
LTCFLAGS='$LTCFLAGS'
1295
compiler='$compiler_DEFAULT'
1296
1297
# Quote evaled strings.
1298
for var in lt_decl_all_varnames([[ \
1299
]], lt_decl_quote_varnames); do
1300
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1301
    *[[\\\\\\\`\\"\\\$]]*)
1302
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1303
      ;;
1304
    *)
1305
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1306
      ;;
1307
    esac
1308
done
1309
1310
# Double-quote double-evaled strings.
1311
for var in lt_decl_all_varnames([[ \
1312
]], lt_decl_dquote_varnames); do
1313
    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1314
    *[[\\\\\\\`\\"\\\$]]*)
1315
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1316
      ;;
1317
    *)
1318
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1319
      ;;
1320
    esac
1321
done
1322
1323
# Fix-up fallback echo if it was mangled by the above quoting rules.
1324
case \$lt_ECHO in
1325
*'\\\[$]0 --fallback-echo"')dnl "
1326
  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1327
  ;;
1328
esac
1329
1330
_LT_OUTPUT_LIBTOOL_INIT
1331
])
1332
1333
1334
# LT_OUTPUT
1335
# ---------
1336
# This macro allows early generation of the libtool script (before
1337
# AC_OUTPUT is called), incase it is used in configure for compilation
1338
# tests.
1339
AC_DEFUN([LT_OUTPUT],
1340
[: ${CONFIG_LT=./config.lt}
1341
AC_MSG_NOTICE([creating $CONFIG_LT])
1342
cat >"$CONFIG_LT" <<_LTEOF
1343
#! $SHELL
1344
# Generated by $as_me.
1345
# Run this file to recreate a libtool stub with the current configuration.
1346
1347
lt_cl_silent=false
1348
SHELL=\${CONFIG_SHELL-$SHELL}
1349
_LTEOF
1350
1351
cat >>"$CONFIG_LT" <<\_LTEOF
1352
AS_SHELL_SANITIZE
1353
_AS_PREPARE
1354
1355
exec AS_MESSAGE_FD>&1
1356
exec AS_MESSAGE_LOG_FD>>config.log
1357
{
1358
  echo
1359
  AS_BOX([Running $as_me.])
1360
} >&AS_MESSAGE_LOG_FD
1361
1362
lt_cl_help="\
1363
\`$as_me' creates a local libtool stub from the current configuration,
1364
for use in further configure time tests before the real libtool is
1365
generated.
1366
1367
Usage: $[0] [[OPTIONS]]
1368
1369
  -h, --help      print this help, then exit
1370
  -V, --version   print version number, then exit
1371
  -q, --quiet     do not print progress messages
1372
  -d, --debug     don't remove temporary files
1373
1374
Report bugs to <bug-libtool@gnu.org>."
1375
1376
lt_cl_version="\
1377
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1378
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1379
configured by $[0], generated by m4_PACKAGE_STRING.
1380
1381
Copyright (C) 2008 Free Software Foundation, Inc.
1382
This config.lt script is free software; the Free Software Foundation
1383
gives unlimited permision to copy, distribute and modify it."
1384
1385
while test $[#] != 0
1386
do
1387
  case $[1] in
1388
    --version | --v* | -V )
1389
      echo "$lt_cl_version"; exit 0 ;;
1390
    --help | --h* | -h )
1391
      echo "$lt_cl_help"; exit 0 ;;
1392
    --debug | --d* | -d )
1393
      debug=: ;;
1394
    --quiet | --q* | --silent | --s* | -q )
1395
      lt_cl_silent=: ;;
1396
1397
    -*) AC_MSG_ERROR([unrecognized option: $[1]
1398
Try \`$[0] --help' for more information.]) ;;
1399
1400
    *) AC_MSG_ERROR([unrecognized argument: $[1]
1401
Try \`$[0] --help' for more information.]) ;;
1402
  esac
1403
  shift
1404
done
1405
1406
if $lt_cl_silent; then
1407
  exec AS_MESSAGE_FD>/dev/null
1408
fi
1409
_LTEOF
1410
1411
cat >>"$CONFIG_LT" <<_LTEOF
1412
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1413
_LTEOF
1414
1415
cat >>"$CONFIG_LT" <<\_LTEOF
1416
AC_MSG_NOTICE([creating $ofile])
1417
_LT_OUTPUT_LIBTOOL_COMMANDS
1418
AS_EXIT(0)
1419
_LTEOF
1420
chmod +x "$CONFIG_LT"
1421
1422
# configure is writing to config.log, but config.lt does its own redirection,
1423
# appending to config.log, which fails on DOS, as config.log is still kept
1424
# open by configure.  Here we exec the FD to /dev/null, effectively closing
1425
# config.log, so it can be properly (re)opened and appended to by config.lt.
1426
if test "$no_create" != yes; then
1427
  lt_cl_success=:
1428
  test "$silent" = yes &&
1429
    lt_config_lt_args="$lt_config_lt_args --quiet"
1430
  exec AS_MESSAGE_LOG_FD>/dev/null
1431
  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1432
  exec AS_MESSAGE_LOG_FD>>config.log
1433
  $lt_cl_success || AS_EXIT(1)
1434
fi
1435
])# LT_OUTPUT
1436
1437
1438
# _LT_CONFIG(TAG)
1439
# ---------------
1440
# If TAG is the built-in tag, create an initial libtool script with a
1441
# default configuration from the untagged config vars.  Otherwise add code
1442
# to config.status for appending the configuration named by TAG from the
1443
# matching tagged config vars.
1444
m4_defun([_LT_CONFIG],
1445
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1446
_LT_CONFIG_SAVE_COMMANDS([
1447
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1448
  m4_if(_LT_TAG, [C], [
1449
    # See if we are running on zsh, and set the options which allow our
1450
    # commands through without removal of \ escapes.
1451
    if test -n "${ZSH_VERSION+set}" ; then
1452
      setopt NO_GLOB_SUBST
1453
    fi
1454
1455
    cfgfile="${ofile}T"
1456
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1457
    $RM "$cfgfile"
1458
1459
    cat <<_LT_EOF >> "$cfgfile"
1460
#! $SHELL
1461
1462
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1463
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1464
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1465
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1466
#
1467
_LT_COPYING
1468
_LT_LIBTOOL_TAGS
1469
1470
# ### BEGIN LIBTOOL CONFIG
1471
_LT_LIBTOOL_CONFIG_VARS
1472
_LT_LIBTOOL_TAG_VARS
1473
# ### END LIBTOOL CONFIG
1474
1475
_LT_EOF
1476
1477
  case $host_os in
1478
  aix3*)
1479
    cat <<\_LT_EOF >> "$cfgfile"
1480
# AIX sometimes has problems with the GCC collect2 program.  For some
1481
# reason, if we set the COLLECT_NAMES environment variable, the problems
1482
# vanish in a puff of smoke.
1483
if test "X${COLLECT_NAMES+set}" != Xset; then
1484
  COLLECT_NAMES=
1485
  export COLLECT_NAMES
1486
fi
1487
_LT_EOF
1488
    ;;
1489
  esac
1490
1491
  _LT_PROG_LTMAIN
1492
1493
  # We use sed instead of cat because bash on DJGPP gets confused if
1494
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1495
  # text mode, it properly converts lines to CR/LF.  This bash problem
1496
  # is reportedly fixed, but why not run on old versions too?
1497
  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1498
    || (rm -f "$cfgfile"; exit 1)
1499
1500
  _LT_PROG_XSI_SHELLFNS
1501
1502
  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1503
    || (rm -f "$cfgfile"; exit 1)
1504
1505
  mv -f "$cfgfile" "$ofile" ||
1506
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1507
  chmod +x "$ofile"
1508
],
1509
[cat <<_LT_EOF >> "$ofile"
1510
1511
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1512
dnl in a comment (ie after a #).
1513
# ### BEGIN LIBTOOL TAG CONFIG: $1
1514
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1515
# ### END LIBTOOL TAG CONFIG: $1
1516
_LT_EOF
1517
])dnl /m4_if
1518
],
1519
[m4_if([$1], [], [
1520
    PACKAGE='$PACKAGE'
1521
    VERSION='$VERSION'
1522
    TIMESTAMP='$TIMESTAMP'
1523
    RM='$RM'
1524
    ofile='$ofile'], [])
1525
])dnl /_LT_CONFIG_SAVE_COMMANDS
1526
])# _LT_CONFIG
1527
1528
1529
# LT_SUPPORTED_TAG(TAG)
1530
# ---------------------
1531
# Trace this macro to discover what tags are supported by the libtool
1532
# --tag option, using:
1533
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1534
AC_DEFUN([LT_SUPPORTED_TAG], [])
1535
1536
1537
# C support is built-in for now
1538
m4_define([_LT_LANG_C_enabled], [])
1539
m4_define([_LT_TAGS], [])
1540
1541
1542
# LT_LANG(LANG)
1543
# -------------
1544
# Enable libtool support for the given language if not already enabled.
1545
AC_DEFUN([LT_LANG],
1546
[AC_BEFORE([$0], [LT_OUTPUT])dnl
1547
m4_case([$1],
1548
  [C],			[_LT_LANG(C)],
1549
  [C++],		[_LT_LANG(CXX)],
1550
  [Java],		[_LT_LANG(GCJ)],
1551
  [Fortran 77],		[_LT_LANG(F77)],
1552
  [Fortran],		[_LT_LANG(FC)],
1553
  [Windows Resource],	[_LT_LANG(RC)],
1554
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1555
    [_LT_LANG($1)],
1556
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1557
])# LT_LANG
1558
1559
1560
# _LT_LANG(LANGNAME)
1561
# ------------------
1562
m4_defun([_LT_LANG],
1563
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1564
  [LT_SUPPORTED_TAG([$1])dnl
1565
  m4_append([_LT_TAGS], [$1 ])dnl
1566
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1567
  _LT_LANG_$1_CONFIG($1)])dnl
1568
])# _LT_LANG
1569
1570
1571
# _LT_LANG_DEFAULT_CONFIG
1572
# -----------------------
1573
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1574
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1575
  [LT_LANG(CXX)],
1576
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1577
1578
AC_PROVIDE_IFELSE([AC_PROG_F77],
1579
  [LT_LANG(F77)],
1580
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1581
1582
AC_PROVIDE_IFELSE([AC_PROG_FC],
1583
  [LT_LANG(FC)],
1584
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1585
1586
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1587
dnl pulling things in needlessly.
1588
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1589
  [LT_LANG(GCJ)],
1590
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1591
    [LT_LANG(GCJ)],
1592
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1593
      [LT_LANG(GCJ)],
1594
      [m4_ifdef([AC_PROG_GCJ],
1595
	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1596
       m4_ifdef([A][M_PROG_GCJ],
1597
	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1598
       m4_ifdef([LT_PROG_GCJ],
1599
	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1600
1601
AC_PROVIDE_IFELSE([LT_PROG_RC],
1602
  [LT_LANG(RC)],
1603
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1604
])# _LT_LANG_DEFAULT_CONFIG
1605
1606
# Obsolete macros:
1607
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1608
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1609
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1610
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1611
dnl aclocal-1.4 backwards compatibility:
1612
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1613
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1614
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1615
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1616
1617
1618
# _LT_TAG_COMPILER
1619
# ----------------
1620
m4_defun([_LT_TAG_COMPILER],
1 by Masahito Omote
Import upstream version 0.3.9
1621
[AC_REQUIRE([AC_PROG_CC])dnl
1622
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1623
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1624
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1625
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1626
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1627
1 by Masahito Omote
Import upstream version 0.3.9
1628
# If no C compiler was specified, use CC.
1629
LTCC=${LTCC-"$CC"}
1630
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
1631
# If no C compiler flags were specified, use CFLAGS.
1632
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1633
1 by Masahito Omote
Import upstream version 0.3.9
1634
# Allow CC to be a program name with arguments.
1635
compiler=$CC
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1636
])# _LT_TAG_COMPILER
1.1.3 by Masahito Omote
Import upstream version 1.0.0
1637
1638
1639
# _LT_COMPILER_BOILERPLATE
1640
# ------------------------
1641
# Check for compiler boilerplate output or warnings with
1642
# the simple compiler test code.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1643
m4_defun([_LT_COMPILER_BOILERPLATE],
1644
[m4_require([_LT_DECL_SED])dnl
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1645
ac_outfile=conftest.$ac_objext
1646
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
1647
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1.1.3 by Masahito Omote
Import upstream version 1.0.0
1648
_lt_compiler_boilerplate=`cat conftest.err`
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1649
$RM conftest*
1.1.3 by Masahito Omote
Import upstream version 1.0.0
1650
])# _LT_COMPILER_BOILERPLATE
1651
1652
1653
# _LT_LINKER_BOILERPLATE
1654
# ----------------------
1655
# Check for linker boilerplate output or warnings with
1656
# the simple link test code.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1657
m4_defun([_LT_LINKER_BOILERPLATE],
1658
[m4_require([_LT_DECL_SED])dnl
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1659
ac_outfile=conftest.$ac_objext
1660
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
1661
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1.1.3 by Masahito Omote
Import upstream version 1.0.0
1662
_lt_linker_boilerplate=`cat conftest.err`
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1663
$RM -r conftest*
1.1.3 by Masahito Omote
Import upstream version 1.0.0
1664
])# _LT_LINKER_BOILERPLATE
1665
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1666
# _LT_REQUIRED_DARWIN_CHECKS
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1667
# -------------------------
1668
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1669
  case $host_os in
1670
    rhapsody* | darwin*)
1671
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1672
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1673
    AC_CHECK_TOOL([LIPO], [lipo], [:])
1674
    AC_CHECK_TOOL([OTOOL], [otool], [:])
1675
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1676
    _LT_DECL([], [DSYMUTIL], [1],
1677
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1678
    _LT_DECL([], [NMEDIT], [1],
1679
      [Tool to change global to local symbols on Mac OS X])
1680
    _LT_DECL([], [LIPO], [1],
1681
      [Tool to manipulate fat objects and archives on Mac OS X])
1682
    _LT_DECL([], [OTOOL], [1],
1683
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1684
    _LT_DECL([], [OTOOL64], [1],
1685
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1686
1687
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1688
      [lt_cv_apple_cc_single_mod=no
1689
      if test -z "${LT_MULTI_MODULE}"; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1690
	# By default we will add the -single_module flag. You can override
1691
	# by either setting the environment variable LT_MULTI_MODULE
1692
	# non-empty at configure time, or by adding -multi_module to the
1693
	# link flags.
1694
	rm -rf libconftest.dylib*
1695
	echo "int foo(void){return 1;}" > conftest.c
1696
	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1697
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1698
	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1699
	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1700
        _lt_result=$?
1701
	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1702
	  lt_cv_apple_cc_single_mod=yes
1703
	else
1704
	  cat conftest.err >&AS_MESSAGE_LOG_FD
1705
	fi
1706
	rm -rf libconftest.dylib*
1707
	rm -f conftest.*
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1708
      fi])
1709
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1710
      [lt_cv_ld_exported_symbols_list],
1711
      [lt_cv_ld_exported_symbols_list=no
1712
      save_LDFLAGS=$LDFLAGS
1713
      echo "_main" > conftest.sym
1714
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1715
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1716
	[lt_cv_ld_exported_symbols_list=yes],
1717
	[lt_cv_ld_exported_symbols_list=no])
1718
	LDFLAGS="$save_LDFLAGS"
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1719
    ])
1720
    case $host_os in
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1721
    rhapsody* | darwin1.[[012]])
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1722
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1723
    darwin1.*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1724
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1725
    darwin*) # darwin 5.x on
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1726
      # if running on 10.5 or later, the deployment target defaults
1727
      # to the OS version, if on x86, and 10.4, the deployment
1728
      # target defaults to 10.4. Don't you love it?
1729
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1730
	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1731
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1732
	10.[[012]]*)
1733
	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1734
	10.*)
1735
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1736
      esac
1737
    ;;
1738
  esac
1739
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1740
      _lt_dar_single_mod='$single_module'
1741
    fi
1742
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1743
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1744
    else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1745
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1746
    fi
1747
    if test "$DSYMUTIL" != ":"; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1748
      _lt_dsymutil='~$DSYMUTIL $lib || :'
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1749
    else
1750
      _lt_dsymutil=
1751
    fi
1752
    ;;
1753
  esac
1754
])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
1755
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1756
1757
# _LT_DARWIN_LINKER_FEATURES
1758
# --------------------------
1759
# Checks for linker and compiler features on darwin
1760
m4_defun([_LT_DARWIN_LINKER_FEATURES],
1761
[
1762
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1763
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1764
  _LT_TAGVAR(hardcode_direct, $1)=no
1765
  _LT_TAGVAR(hardcode_automatic, $1)=yes
1766
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1767
  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1768
  _LT_TAGVAR(link_all_deplibs, $1)=yes
1769
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1770
  case $cc_basename in
1771
     ifort*) _lt_dar_can_shared=yes ;;
1772
     *) _lt_dar_can_shared=$GCC ;;
1773
  esac
1774
  if test "$_lt_dar_can_shared" = "yes"; then
1775
    output_verbose_link_cmd=echo
1776
    _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}"
1777
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1778
    _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}"
1779
    _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}"
1780
    m4_if([$1], [CXX],
1781
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1782
      _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}"
1783
      _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}"
1784
    fi
1785
],[])
1786
  else
1787
  _LT_TAGVAR(ld_shlibs, $1)=no
1788
  fi
1789
])
1790
1791
# _LT_SYS_MODULE_PATH_AIX
1792
# -----------------------
1 by Masahito Omote
Import upstream version 0.3.9
1793
# Links a minimal program and checks the executable
1794
# for the system default hardcoded library path. In most cases,
1795
# this is /usr/lib:/lib, but when the MPI compilers are used
1796
# the location of the communication and MPI libs are included too.
1797
# If we don't find anything, use the default library path according
1798
# to the aix ld manual.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1799
m4_defun([_LT_SYS_MODULE_PATH_AIX],
1800
[m4_require([_LT_DECL_SED])dnl
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1801
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1802
lt_aix_libpath_sed='
1803
    /Import File Strings/,/^$/ {
1804
	/^0/ {
1805
	    s/^0  *\(.*\)$/\1/
1806
	    p
1807
	}
1808
    }'
1809
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1 by Masahito Omote
Import upstream version 0.3.9
1810
# Check for a 64-bit object if we didn't find anything.
1.1.7 by Masahito Omote
Import upstream version 1.4.2
1811
if test -z "$aix_libpath"; then
1812
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1813
fi],[])
1 by Masahito Omote
Import upstream version 0.3.9
1814
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1815
])# _LT_SYS_MODULE_PATH_AIX
1816
1817
1818
# _LT_SHELL_INIT(ARG)
1819
# -------------------
1820
m4_define([_LT_SHELL_INIT],
1 by Masahito Omote
Import upstream version 0.3.9
1821
[ifdef([AC_DIVERSION_NOTICE],
1822
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1823
	 [AC_DIVERT_PUSH(NOTICE)])
1824
$1
1825
AC_DIVERT_POP
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1826
])# _LT_SHELL_INIT
1827
1828
1829
# _LT_PROG_ECHO_BACKSLASH
1830
# -----------------------
1 by Masahito Omote
Import upstream version 0.3.9
1831
# Add some code to the start of the generated configure script which
1832
# will find an echo command which doesn't interpret backslashes.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1833
m4_defun([_LT_PROG_ECHO_BACKSLASH],
1834
[_LT_SHELL_INIT([
1 by Masahito Omote
Import upstream version 0.3.9
1835
# Check that we are running under the correct shell.
1836
SHELL=${CONFIG_SHELL-/bin/sh}
1837
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1838
case X$lt_ECHO in
1 by Masahito Omote
Import upstream version 0.3.9
1839
X*--fallback-echo)
1840
  # Remove one level of quotation (which was required for Make).
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1841
  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1 by Masahito Omote
Import upstream version 0.3.9
1842
  ;;
1843
esac
1844
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1845
ECHO=${lt_ECHO-echo}
1 by Masahito Omote
Import upstream version 0.3.9
1846
if test "X[$]1" = X--no-reexec; then
1847
  # Discard the --no-reexec flag, and continue.
1848
  shift
1849
elif test "X[$]1" = X--fallback-echo; then
1850
  # Avoid inline document here, it may be left over
1851
  :
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1852
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1853
  # Yippee, $ECHO works!
1 by Masahito Omote
Import upstream version 0.3.9
1854
  :
1855
else
1856
  # Restart under the correct shell.
1857
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1858
fi
1859
1860
if test "X[$]1" = X--fallback-echo; then
1861
  # used as fallback echo
1862
  shift
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1863
  cat <<_LT_EOF
1 by Masahito Omote
Import upstream version 0.3.9
1864
[$]*
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1865
_LT_EOF
1 by Masahito Omote
Import upstream version 0.3.9
1866
  exit 0
1867
fi
1868
1869
# The HP-UX ksh and POSIX shell print the target directory to stdout
1870
# if CDPATH is set.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
1871
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1 by Masahito Omote
Import upstream version 0.3.9
1872
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1873
if test -z "$lt_ECHO"; then
1874
  if test "X${echo_test_string+set}" != Xset; then
1875
    # find a string as large as possible, as long as the shell can cope with it
1876
    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1877
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1878
      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1879
	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1880
      then
1881
        break
1882
      fi
1883
    done
1884
  fi
1885
1886
  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1887
     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1888
     test "X$echo_testing_string" = "X$echo_test_string"; then
1889
    :
1890
  else
1891
    # The Solaris, AIX, and Digital Unix default echo programs unquote
1892
    # backslashes.  This makes it impossible to quote backslashes using
1893
    #   echo "$something" | sed 's/\\/\\\\/g'
1894
    #
1895
    # So, first we look for a working echo in the user's PATH.
1896
1897
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1898
    for dir in $PATH /usr/ucb; do
1899
      IFS="$lt_save_ifs"
1900
      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1901
         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1902
         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1903
         test "X$echo_testing_string" = "X$echo_test_string"; then
1904
        ECHO="$dir/echo"
1905
        break
1906
      fi
1907
    done
1 by Masahito Omote
Import upstream version 0.3.9
1908
    IFS="$lt_save_ifs"
1909
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1910
    if test "X$ECHO" = Xecho; then
1911
      # We didn't find a better echo, so look for alternatives.
1912
      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1913
         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1914
         test "X$echo_testing_string" = "X$echo_test_string"; then
1915
        # This shell has a builtin print -r that does the trick.
1916
        ECHO='print -r'
1917
      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1918
	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1919
        # If we have ksh, try running configure again with it.
1920
        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1921
        export ORIGINAL_CONFIG_SHELL
1922
        CONFIG_SHELL=/bin/ksh
1923
        export CONFIG_SHELL
1924
        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1 by Masahito Omote
Import upstream version 0.3.9
1925
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1926
        # Try using printf.
1927
        ECHO='printf %s\n'
1928
        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1929
	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1930
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1931
	  # Cool, printf works
1932
	  :
1933
        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1934
	     test "X$echo_testing_string" = 'X\t' &&
1935
	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1936
	     test "X$echo_testing_string" = "X$echo_test_string"; then
1937
	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1938
	  export CONFIG_SHELL
1939
	  SHELL="$CONFIG_SHELL"
1940
	  export SHELL
1941
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1942
        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1943
	     test "X$echo_testing_string" = 'X\t' &&
1944
	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1945
	     test "X$echo_testing_string" = "X$echo_test_string"; then
1946
	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1947
        else
1948
	  # maybe with a smaller string...
1949
	  prev=:
1950
1951
	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1952
	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1953
	    then
1954
	      break
1955
	    fi
1956
	    prev="$cmd"
1957
	  done
1958
1959
	  if test "$prev" != 'sed 50q "[$]0"'; then
1960
	    echo_test_string=`eval $prev`
1961
	    export echo_test_string
1962
	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1963
	  else
1964
	    # Oops.  We lost completely, so just stick with echo.
1965
	    ECHO=echo
1 by Masahito Omote
Import upstream version 0.3.9
1966
	  fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1967
        fi
1 by Masahito Omote
Import upstream version 0.3.9
1968
      fi
1969
    fi
1970
  fi
1971
fi
1972
1973
# Copy echo and quote the copy suitably for passing to libtool from
1974
# the Makefile, instead of quoting the original, which is used later.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1975
lt_ECHO=$ECHO
1976
if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1977
   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1 by Masahito Omote
Import upstream version 0.3.9
1978
fi
1979
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1980
AC_SUBST(lt_ECHO)
1981
])
1982
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1983
_LT_DECL([], [ECHO], [1],
1984
    [An echo program that does not interpret backslashes])
1985
])# _LT_PROG_ECHO_BACKSLASH
1986
1987
1988
# _LT_ENABLE_LOCK
1989
# ---------------
1990
m4_defun([_LT_ENABLE_LOCK],
1 by Masahito Omote
Import upstream version 0.3.9
1991
[AC_ARG_ENABLE([libtool-lock],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
1992
  [AS_HELP_STRING([--disable-libtool-lock],
1993
    [avoid locking (might break parallel builds)])])
1 by Masahito Omote
Import upstream version 0.3.9
1994
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1995
1996
# Some flags need to be propagated to the compiler or linker for good
1997
# libtool support.
1998
case $host in
1999
ia64-*-hpux*)
2000
  # Find out which ABI we are using.
2001
  echo 'int i;' > conftest.$ac_ext
2002
  if AC_TRY_EVAL(ac_compile); then
2003
    case `/usr/bin/file conftest.$ac_objext` in
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2004
      *ELF-32*)
2005
	HPUX_IA64_MODE="32"
2006
	;;
2007
      *ELF-64*)
2008
	HPUX_IA64_MODE="64"
2009
	;;
1 by Masahito Omote
Import upstream version 0.3.9
2010
    esac
2011
  fi
2012
  rm -rf conftest*
2013
  ;;
2014
*-*-irix6*)
2015
  # Find out which ABI we are using.
2016
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2017
  if AC_TRY_EVAL(ac_compile); then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2018
    if test "$lt_cv_prog_gnu_ld" = yes; then
2019
      case `/usr/bin/file conftest.$ac_objext` in
2020
	*32-bit*)
2021
	  LD="${LD-ld} -melf32bsmip"
2022
	  ;;
2023
	*N32*)
2024
	  LD="${LD-ld} -melf32bmipn32"
2025
	  ;;
2026
	*64-bit*)
2027
	  LD="${LD-ld} -melf64bmip"
2028
	;;
2029
      esac
2030
    else
2031
      case `/usr/bin/file conftest.$ac_objext` in
2032
	*32-bit*)
2033
	  LD="${LD-ld} -32"
2034
	  ;;
2035
	*N32*)
2036
	  LD="${LD-ld} -n32"
2037
	  ;;
2038
	*64-bit*)
2039
	  LD="${LD-ld} -64"
2040
	  ;;
2041
      esac
2042
    fi
1 by Masahito Omote
Import upstream version 0.3.9
2043
  fi
2044
  rm -rf conftest*
2045
  ;;
2046
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2047
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2048
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1 by Masahito Omote
Import upstream version 0.3.9
2049
  # Find out which ABI we are using.
2050
  echo 'int i;' > conftest.$ac_ext
2051
  if AC_TRY_EVAL(ac_compile); then
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2052
    case `/usr/bin/file conftest.o` in
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2053
      *32-bit*)
2054
	case $host in
2055
	  x86_64-*kfreebsd*-gnu)
2056
	    LD="${LD-ld} -m elf_i386_fbsd"
2057
	    ;;
2058
	  x86_64-*linux*)
2059
	    LD="${LD-ld} -m elf_i386"
2060
	    ;;
2061
	  ppc64-*linux*|powerpc64-*linux*)
2062
	    LD="${LD-ld} -m elf32ppclinux"
2063
	    ;;
2064
	  s390x-*linux*)
2065
	    LD="${LD-ld} -m elf_s390"
2066
	    ;;
2067
	  sparc64-*linux*)
2068
	    LD="${LD-ld} -m elf32_sparc"
2069
	    ;;
2070
	esac
2071
	;;
2072
      *64-bit*)
2073
	case $host in
2074
	  x86_64-*kfreebsd*-gnu)
2075
	    LD="${LD-ld} -m elf_x86_64_fbsd"
2076
	    ;;
2077
	  x86_64-*linux*)
2078
	    LD="${LD-ld} -m elf_x86_64"
2079
	    ;;
2080
	  ppc*-*linux*|powerpc*-*linux*)
2081
	    LD="${LD-ld} -m elf64ppc"
2082
	    ;;
2083
	  s390*-*linux*|s390*-*tpf*)
2084
	    LD="${LD-ld} -m elf64_s390"
2085
	    ;;
2086
	  sparc*-*linux*)
2087
	    LD="${LD-ld} -m elf64_sparc"
2088
	    ;;
2089
	esac
2090
	;;
1 by Masahito Omote
Import upstream version 0.3.9
2091
    esac
2092
  fi
2093
  rm -rf conftest*
2094
  ;;
2095
2096
*-*-sco3.2v5*)
2097
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2098
  SAVE_CFLAGS="$CFLAGS"
2099
  CFLAGS="$CFLAGS -belf"
2100
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2101
    [AC_LANG_PUSH(C)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2102
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1 by Masahito Omote
Import upstream version 0.3.9
2103
     AC_LANG_POP])
2104
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2105
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2106
    CFLAGS="$SAVE_CFLAGS"
2107
  fi
2108
  ;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2109
sparc*-*solaris*)
2110
  # Find out which ABI we are using.
2111
  echo 'int i;' > conftest.$ac_ext
2112
  if AC_TRY_EVAL(ac_compile); then
2113
    case `/usr/bin/file conftest.o` in
2114
    *64-bit*)
2115
      case $lt_cv_prog_gnu_ld in
2116
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2117
      *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2118
	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2119
	  LD="${LD-ld} -64"
2120
	fi
2121
	;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2122
      esac
2123
      ;;
2124
    esac
2125
  fi
2126
  rm -rf conftest*
2127
  ;;
1 by Masahito Omote
Import upstream version 0.3.9
2128
esac
2129
2130
need_locks="$enable_libtool_lock"
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2131
])# _LT_ENABLE_LOCK
2132
2133
2134
# _LT_CMD_OLD_ARCHIVE
2135
# -------------------
2136
m4_defun([_LT_CMD_OLD_ARCHIVE],
2137
[AC_CHECK_TOOL(AR, ar, false)
2138
test -z "$AR" && AR=ar
2139
test -z "$AR_FLAGS" && AR_FLAGS=cru
2140
_LT_DECL([], [AR], [1], [The archiver])
2141
_LT_DECL([], [AR_FLAGS], [1])
2142
2143
AC_CHECK_TOOL(STRIP, strip, :)
2144
test -z "$STRIP" && STRIP=:
2145
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2146
2147
AC_CHECK_TOOL(RANLIB, ranlib, :)
2148
test -z "$RANLIB" && RANLIB=:
2149
_LT_DECL([], [RANLIB], [1],
2150
    [Commands used to install an old-style archive])
2151
2152
# Determine commands to create old-style static archives.
2153
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2154
old_postinstall_cmds='chmod 644 $oldlib'
2155
old_postuninstall_cmds=
2156
2157
if test -n "$RANLIB"; then
2158
  case $host_os in
2159
  openbsd*)
2160
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2161
    ;;
2162
  *)
2163
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2164
    ;;
2165
  esac
2166
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2167
fi
2168
_LT_DECL([], [old_postinstall_cmds], [2])
2169
_LT_DECL([], [old_postuninstall_cmds], [2])
2170
_LT_TAGDECL([], [old_archive_cmds], [2],
2171
    [Commands used to build an old-style archive])
2172
])# _LT_CMD_OLD_ARCHIVE
2173
2174
2175
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1 by Masahito Omote
Import upstream version 0.3.9
2176
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2177
# ----------------------------------------------------------------
2178
# Check whether the given compiler option works
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2179
AC_DEFUN([_LT_COMPILER_OPTION],
2180
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2181
m4_require([_LT_DECL_SED])dnl
1 by Masahito Omote
Import upstream version 0.3.9
2182
AC_CACHE_CHECK([$1], [$2],
2183
  [$2=no
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2184
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2185
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1 by Masahito Omote
Import upstream version 0.3.9
2186
   lt_compiler_flag="$3"
2187
   # Insert the option either (1) after the last *FLAGS variable, or
2188
   # (2) before a word containing "conftest.", or (3) at the end.
2189
   # Note that $ac_compile itself does not contain backslashes and begins
2190
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2191
   # The option is referenced via a variable to avoid confusing sed.
2192
   lt_compile=`echo "$ac_compile" | $SED \
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2193
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1 by Masahito Omote
Import upstream version 0.3.9
2194
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2195
   -e 's:$: $lt_compiler_flag:'`
2196
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2197
   (eval "$lt_compile" 2>conftest.err)
2198
   ac_status=$?
2199
   cat conftest.err >&AS_MESSAGE_LOG_FD
2200
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2201
   if (exit $ac_status) && test -s "$ac_outfile"; then
2202
     # The compiler can only warn and ignore the option if not recognized
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2203
     # So say no if there are warnings other than the usual output.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2204
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2205
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2206
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1 by Masahito Omote
Import upstream version 0.3.9
2207
       $2=yes
2208
     fi
2209
   fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2210
   $RM conftest*
1 by Masahito Omote
Import upstream version 0.3.9
2211
])
2212
2213
if test x"[$]$2" = xyes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2214
    m4_if([$5], , :, [$5])
1 by Masahito Omote
Import upstream version 0.3.9
2215
else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2216
    m4_if([$6], , :, [$6])
1 by Masahito Omote
Import upstream version 0.3.9
2217
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2218
])# _LT_COMPILER_OPTION
2219
2220
# Old name:
2221
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2222
dnl aclocal-1.4 backwards compatibility:
2223
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2224
2225
2226
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2227
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2228
# ----------------------------------------------------
2229
# Check whether the given linker option works
2230
AC_DEFUN([_LT_LINKER_OPTION],
2231
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2232
m4_require([_LT_DECL_SED])dnl
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2233
AC_CACHE_CHECK([$1], [$2],
1 by Masahito Omote
Import upstream version 0.3.9
2234
  [$2=no
2235
   save_LDFLAGS="$LDFLAGS"
2236
   LDFLAGS="$LDFLAGS $3"
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2237
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1 by Masahito Omote
Import upstream version 0.3.9
2238
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2239
     # The linker can only warn and ignore the option if not recognized
1 by Masahito Omote
Import upstream version 0.3.9
2240
     # So say no if there are warnings
2241
     if test -s conftest.err; then
2242
       # Append any errors to the config.log.
2243
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2244
       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2245
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2246
       if diff conftest.exp conftest.er2 >/dev/null; then
2247
         $2=yes
2248
       fi
1 by Masahito Omote
Import upstream version 0.3.9
2249
     else
2250
       $2=yes
2251
     fi
2252
   fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2253
   $RM -r conftest*
1 by Masahito Omote
Import upstream version 0.3.9
2254
   LDFLAGS="$save_LDFLAGS"
2255
])
2256
2257
if test x"[$]$2" = xyes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2258
    m4_if([$4], , :, [$4])
1 by Masahito Omote
Import upstream version 0.3.9
2259
else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2260
    m4_if([$5], , :, [$5])
1 by Masahito Omote
Import upstream version 0.3.9
2261
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2262
])# _LT_LINKER_OPTION
2263
2264
# Old name:
2265
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2266
dnl aclocal-1.4 backwards compatibility:
2267
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2268
2269
2270
# LT_CMD_MAX_LEN
2271
#---------------
2272
AC_DEFUN([LT_CMD_MAX_LEN],
2273
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2274
# find the maximum length of command line arguments
1 by Masahito Omote
Import upstream version 0.3.9
2275
AC_MSG_CHECKING([the maximum length of command line arguments])
2276
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2277
  i=0
2278
  teststring="ABCD"
2279
2280
  case $build_os in
2281
  msdosdjgpp*)
2282
    # On DJGPP, this test can blow up pretty badly due to problems in libc
2283
    # (any single argument exceeding 2000 bytes causes a buffer overrun
2284
    # during glob expansion).  Even if it were fixed, the result of this
2285
    # check would be larger than it should be.
2286
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2287
    ;;
2288
2289
  gnu*)
2290
    # Under GNU Hurd, this test is not required because there is
2291
    # no limit to the length of command line arguments.
2292
    # Libtool will interpret -1 as no limit whatsoever
2293
    lt_cv_sys_max_cmd_len=-1;
2294
    ;;
2295
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2296
  cygwin* | mingw* | cegcc*)
1 by Masahito Omote
Import upstream version 0.3.9
2297
    # On Win9x/ME, this test blows up -- it succeeds, but takes
2298
    # about 5 minutes as the teststring grows exponentially.
2299
    # Worse, since 9x/ME are not pre-emptively multitasking,
2300
    # you end up with a "frozen" computer, even though with patience
2301
    # the test eventually succeeds (with a max line length of 256k).
2302
    # Instead, let's just punt: use the minimum linelength reported by
2303
    # all of the supported platforms: 8192 (on NT/2K/XP).
2304
    lt_cv_sys_max_cmd_len=8192;
2305
    ;;
2306
2307
  amigaos*)
2308
    # On AmigaOS with pdksh, this test takes hours, literally.
2309
    # So we just punt and use a minimum line length of 8192.
2310
    lt_cv_sys_max_cmd_len=8192;
2311
    ;;
2312
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2313
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2314
    # This has been around since 386BSD, at least.  Likely further.
2315
    if test -x /sbin/sysctl; then
2316
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2317
    elif test -x /usr/sbin/sysctl; then
2318
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2319
    else
2320
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2321
    fi
2322
    # And add a safety zone
2323
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2324
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2325
    ;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2326
2327
  interix*)
2328
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2329
    lt_cv_sys_max_cmd_len=196608
2330
    ;;
2331
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2332
  osf*)
2333
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2334
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2335
    # nice to cause kernel panics so lets avoid the loop below.
2336
    # First set a reasonable default.
2337
    lt_cv_sys_max_cmd_len=16384
2338
    #
2339
    if test -x /sbin/sysconfig; then
2340
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2341
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2342
      esac
2343
    fi
2344
    ;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2345
  sco3.2v5*)
2346
    lt_cv_sys_max_cmd_len=102400
2347
    ;;
2348
  sysv5* | sco5v6* | sysv4.2uw2*)
2349
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2350
    if test -n "$kargmax"; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2351
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2352
    else
2353
      lt_cv_sys_max_cmd_len=32768
2354
    fi
2355
    ;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2356
  *)
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2357
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2358
    if test -n "$lt_cv_sys_max_cmd_len"; then
2359
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2360
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2361
    else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2362
      # Make teststring a little bigger before we do anything with it.
2363
      # a 1K string should be a reasonable start.
2364
      for i in 1 2 3 4 5 6 7 8 ; do
2365
        teststring=$teststring$teststring
2366
      done
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2367
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2368
      # If test is not a shell built-in, we'll probably end up computing a
2369
      # maximum length that is only half of the actual maximum length, but
2370
      # we can't tell.
2371
      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2372
	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2373
	      test $i != 17 # 1/2 MB should be enough
2374
      do
2375
        i=`expr $i + 1`
2376
        teststring=$teststring$teststring
2377
      done
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2378
      # Only check the string length outside the loop.
2379
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2380
      teststring=
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2381
      # Add a significant safety factor because C++ compilers can tack on
2382
      # massive amounts of additional arguments before passing them to the
2383
      # linker.  It appears as though 1/2 is a usable value.
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2384
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2385
    fi
1 by Masahito Omote
Import upstream version 0.3.9
2386
    ;;
2387
  esac
2388
])
2389
if test -n $lt_cv_sys_max_cmd_len ; then
2390
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2391
else
2392
  AC_MSG_RESULT(none)
2393
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2394
max_cmd_len=$lt_cv_sys_max_cmd_len
2395
_LT_DECL([], [max_cmd_len], [0],
2396
    [What is the maximum length of a command?])
2397
])# LT_CMD_MAX_LEN
2398
2399
# Old name:
2400
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2401
dnl aclocal-1.4 backwards compatibility:
2402
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2403
2404
2405
# _LT_HEADER_DLFCN
2406
# ----------------
2407
m4_defun([_LT_HEADER_DLFCN],
2408
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2409
])# _LT_HEADER_DLFCN
2410
2411
2412
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2413
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2414
# ----------------------------------------------------------------
2415
m4_defun([_LT_TRY_DLOPEN_SELF],
2416
[m4_require([_LT_HEADER_DLFCN])dnl
1 by Masahito Omote
Import upstream version 0.3.9
2417
if test "$cross_compiling" = yes; then :
2418
  [$4]
2419
else
2420
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2421
  lt_status=$lt_dlunknown
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2422
  cat > conftest.$ac_ext <<_LT_EOF
1 by Masahito Omote
Import upstream version 0.3.9
2423
[#line __oline__ "configure"
2424
#include "confdefs.h"
2425
2426
#if HAVE_DLFCN_H
2427
#include <dlfcn.h>
2428
#endif
2429
2430
#include <stdio.h>
2431
2432
#ifdef RTLD_GLOBAL
2433
#  define LT_DLGLOBAL		RTLD_GLOBAL
2434
#else
2435
#  ifdef DL_GLOBAL
2436
#    define LT_DLGLOBAL		DL_GLOBAL
2437
#  else
2438
#    define LT_DLGLOBAL		0
2439
#  endif
2440
#endif
2441
2442
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2443
   find out it does not work in some platform. */
2444
#ifndef LT_DLLAZY_OR_NOW
2445
#  ifdef RTLD_LAZY
2446
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2447
#  else
2448
#    ifdef DL_LAZY
2449
#      define LT_DLLAZY_OR_NOW		DL_LAZY
2450
#    else
2451
#      ifdef RTLD_NOW
2452
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2453
#      else
2454
#        ifdef DL_NOW
2455
#          define LT_DLLAZY_OR_NOW	DL_NOW
2456
#        else
2457
#          define LT_DLLAZY_OR_NOW	0
2458
#        endif
2459
#      endif
2460
#    endif
2461
#  endif
2462
#endif
2463
2464
void fnord() { int i=42;}
2465
int main ()
2466
{
2467
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2468
  int status = $lt_dlunknown;
2469
2470
  if (self)
2471
    {
2472
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2473
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2474
      /* dlclose (self); */
2475
    }
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2476
  else
2477
    puts (dlerror ());
1 by Masahito Omote
Import upstream version 0.3.9
2478
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2479
  return status;
1 by Masahito Omote
Import upstream version 0.3.9
2480
}]
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2481
_LT_EOF
1 by Masahito Omote
Import upstream version 0.3.9
2482
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2483
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1 by Masahito Omote
Import upstream version 0.3.9
2484
    lt_status=$?
2485
    case x$lt_status in
2486
      x$lt_dlno_uscore) $1 ;;
2487
      x$lt_dlneed_uscore) $2 ;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2488
      x$lt_dlunknown|x*) $3 ;;
1 by Masahito Omote
Import upstream version 0.3.9
2489
    esac
2490
  else :
2491
    # compilation failed
2492
    $3
2493
  fi
2494
fi
2495
rm -fr conftest*
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2496
])# _LT_TRY_DLOPEN_SELF
2497
2498
2499
# LT_SYS_DLOPEN_SELF
2500
# ------------------
2501
AC_DEFUN([LT_SYS_DLOPEN_SELF],
2502
[m4_require([_LT_HEADER_DLFCN])dnl
1 by Masahito Omote
Import upstream version 0.3.9
2503
if test "x$enable_dlopen" != xyes; then
2504
  enable_dlopen=unknown
2505
  enable_dlopen_self=unknown
2506
  enable_dlopen_self_static=unknown
2507
else
2508
  lt_cv_dlopen=no
2509
  lt_cv_dlopen_libs=
2510
2511
  case $host_os in
2512
  beos*)
2513
    lt_cv_dlopen="load_add_on"
2514
    lt_cv_dlopen_libs=
2515
    lt_cv_dlopen_self=yes
2516
    ;;
2517
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2518
  mingw* | pw32* | cegcc*)
1 by Masahito Omote
Import upstream version 0.3.9
2519
    lt_cv_dlopen="LoadLibrary"
2520
    lt_cv_dlopen_libs=
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2521
    ;;
1 by Masahito Omote
Import upstream version 0.3.9
2522
2523
  cygwin*)
2524
    lt_cv_dlopen="dlopen"
2525
    lt_cv_dlopen_libs=
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2526
    ;;
1 by Masahito Omote
Import upstream version 0.3.9
2527
2528
  darwin*)
2529
  # if libdl is installed we need to link against it
2530
    AC_CHECK_LIB([dl], [dlopen],
2531
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2532
    lt_cv_dlopen="dyld"
2533
    lt_cv_dlopen_libs=
2534
    lt_cv_dlopen_self=yes
2535
    ])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2536
    ;;
1 by Masahito Omote
Import upstream version 0.3.9
2537
2538
  *)
2539
    AC_CHECK_FUNC([shl_load],
2540
	  [lt_cv_dlopen="shl_load"],
2541
      [AC_CHECK_LIB([dld], [shl_load],
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2542
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1 by Masahito Omote
Import upstream version 0.3.9
2543
	[AC_CHECK_FUNC([dlopen],
2544
	      [lt_cv_dlopen="dlopen"],
2545
	  [AC_CHECK_LIB([dl], [dlopen],
2546
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2547
	    [AC_CHECK_LIB([svld], [dlopen],
2548
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2549
	      [AC_CHECK_LIB([dld], [dld_link],
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2550
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1 by Masahito Omote
Import upstream version 0.3.9
2551
	      ])
2552
	    ])
2553
	  ])
2554
	])
2555
      ])
2556
    ;;
2557
  esac
2558
2559
  if test "x$lt_cv_dlopen" != xno; then
2560
    enable_dlopen=yes
2561
  else
2562
    enable_dlopen=no
2563
  fi
2564
2565
  case $lt_cv_dlopen in
2566
  dlopen)
2567
    save_CPPFLAGS="$CPPFLAGS"
2568
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2569
2570
    save_LDFLAGS="$LDFLAGS"
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2571
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1 by Masahito Omote
Import upstream version 0.3.9
2572
2573
    save_LIBS="$LIBS"
2574
    LIBS="$lt_cv_dlopen_libs $LIBS"
2575
2576
    AC_CACHE_CHECK([whether a program can dlopen itself],
2577
	  lt_cv_dlopen_self, [dnl
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2578
	  _LT_TRY_DLOPEN_SELF(
1 by Masahito Omote
Import upstream version 0.3.9
2579
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2580
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2581
    ])
2582
2583
    if test "x$lt_cv_dlopen_self" = xyes; then
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2584
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1 by Masahito Omote
Import upstream version 0.3.9
2585
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2586
	  lt_cv_dlopen_self_static, [dnl
2587
	  _LT_TRY_DLOPEN_SELF(
1 by Masahito Omote
Import upstream version 0.3.9
2588
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2589
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2590
      ])
2591
    fi
2592
2593
    CPPFLAGS="$save_CPPFLAGS"
2594
    LDFLAGS="$save_LDFLAGS"
2595
    LIBS="$save_LIBS"
2596
    ;;
2597
  esac
2598
2599
  case $lt_cv_dlopen_self in
2600
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2601
  *) enable_dlopen_self=unknown ;;
2602
  esac
2603
2604
  case $lt_cv_dlopen_self_static in
2605
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2606
  *) enable_dlopen_self_static=unknown ;;
2607
  esac
2608
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2609
_LT_DECL([dlopen_support], [enable_dlopen], [0],
2610
	 [Whether dlopen is supported])
2611
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2612
	 [Whether dlopen of programs is supported])
2613
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2614
	 [Whether dlopen of statically linked programs is supported])
2615
])# LT_SYS_DLOPEN_SELF
2616
2617
# Old name:
2618
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2619
dnl aclocal-1.4 backwards compatibility:
2620
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2621
2622
2623
# _LT_COMPILER_C_O([TAGNAME])
2624
# ---------------------------
2625
# Check to see if options -c and -o are simultaneously supported by compiler.
2626
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2627
m4_defun([_LT_COMPILER_C_O],
2628
[m4_require([_LT_DECL_SED])dnl
2629
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2630
m4_require([_LT_TAG_COMPILER])dnl
1 by Masahito Omote
Import upstream version 0.3.9
2631
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2632
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2633
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2634
   $RM -r conftest 2>/dev/null
1 by Masahito Omote
Import upstream version 0.3.9
2635
   mkdir conftest
2636
   cd conftest
2637
   mkdir out
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2638
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1 by Masahito Omote
Import upstream version 0.3.9
2639
2640
   lt_compiler_flag="-o out/conftest2.$ac_objext"
2641
   # Insert the option either (1) after the last *FLAGS variable, or
2642
   # (2) before a word containing "conftest.", or (3) at the end.
2643
   # Note that $ac_compile itself does not contain backslashes and begins
2644
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2645
   lt_compile=`echo "$ac_compile" | $SED \
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2646
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1 by Masahito Omote
Import upstream version 0.3.9
2647
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2648
   -e 's:$: $lt_compiler_flag:'`
2649
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2650
   (eval "$lt_compile" 2>out/conftest.err)
2651
   ac_status=$?
2652
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2653
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2654
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2655
   then
2656
     # The compiler can only warn and ignore the option if not recognized
2657
     # So say no if there are warnings
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2658
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
2659
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2660
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2661
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1 by Masahito Omote
Import upstream version 0.3.9
2662
     fi
2663
   fi
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2664
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2665
   $RM conftest*
1 by Masahito Omote
Import upstream version 0.3.9
2666
   # SGI C++ compiler will create directory out/ii_files/ for
2667
   # template instantiation
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2668
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2669
   $RM out/* && rmdir out
1 by Masahito Omote
Import upstream version 0.3.9
2670
   cd ..
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2671
   $RM -r conftest
2672
   $RM conftest*
1 by Masahito Omote
Import upstream version 0.3.9
2673
])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2674
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2675
	[Does compiler simultaneously support -c and -o options?])
2676
])# _LT_COMPILER_C_O
2677
2678
2679
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2680
# ----------------------------------
1 by Masahito Omote
Import upstream version 0.3.9
2681
# Check to see if we can do hard links to lock some files if needed
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2682
m4_defun([_LT_COMPILER_FILE_LOCKS],
2683
[m4_require([_LT_ENABLE_LOCK])dnl
2684
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2685
_LT_COMPILER_C_O([$1])
1 by Masahito Omote
Import upstream version 0.3.9
2686
2687
hard_links="nottested"
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2688
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1 by Masahito Omote
Import upstream version 0.3.9
2689
  # do not overwrite the value of need_locks provided by the user
2690
  AC_MSG_CHECKING([if we can lock with hard links])
2691
  hard_links=yes
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2692
  $RM conftest*
1 by Masahito Omote
Import upstream version 0.3.9
2693
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2694
  touch conftest.a
2695
  ln conftest.a conftest.b 2>&5 || hard_links=no
2696
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2697
  AC_MSG_RESULT([$hard_links])
2698
  if test "$hard_links" = no; then
2699
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2700
    need_locks=warn
2701
  fi
2702
else
2703
  need_locks=no
2704
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2705
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2706
])# _LT_COMPILER_FILE_LOCKS
2707
2708
2709
# _LT_CHECK_OBJDIR
2710
# ----------------
2711
m4_defun([_LT_CHECK_OBJDIR],
1 by Masahito Omote
Import upstream version 0.3.9
2712
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2713
[rm -f .libs 2>/dev/null
2714
mkdir .libs 2>/dev/null
2715
if test -d .libs; then
2716
  lt_cv_objdir=.libs
2717
else
2718
  # MS-DOS does not allow filenames that begin with a dot.
2719
  lt_cv_objdir=_libs
2720
fi
2721
rmdir .libs 2>/dev/null])
2722
objdir=$lt_cv_objdir
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2723
_LT_DECL([], [objdir], [0],
2724
         [The name of the directory that contains temporary libtool files])dnl
2725
m4_pattern_allow([LT_OBJDIR])dnl
2726
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2727
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2728
])# _LT_CHECK_OBJDIR
2729
2730
2731
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2732
# --------------------------------------
1 by Masahito Omote
Import upstream version 0.3.9
2733
# Check hardcoding attributes.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2734
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1 by Masahito Omote
Import upstream version 0.3.9
2735
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2736
_LT_TAGVAR(hardcode_action, $1)=
2737
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2738
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2739
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1 by Masahito Omote
Import upstream version 0.3.9
2740
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2741
  # We can hardcode non-existent directories.
2742
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1 by Masahito Omote
Import upstream version 0.3.9
2743
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2744
     # have to relink, otherwise we might link with an installed library
2745
     # when we should be linking with a yet-to-be-installed one
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2746
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2747
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1 by Masahito Omote
Import upstream version 0.3.9
2748
    # Linking always hardcodes the temporary library directory.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2749
    _LT_TAGVAR(hardcode_action, $1)=relink
1 by Masahito Omote
Import upstream version 0.3.9
2750
  else
2751
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2752
    _LT_TAGVAR(hardcode_action, $1)=immediate
1 by Masahito Omote
Import upstream version 0.3.9
2753
  fi
2754
else
2755
  # We cannot hardcode anything, or else we can only hardcode existing
2756
  # directories.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2757
  _LT_TAGVAR(hardcode_action, $1)=unsupported
1 by Masahito Omote
Import upstream version 0.3.9
2758
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2759
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1 by Masahito Omote
Import upstream version 0.3.9
2760
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2761
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2762
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
1 by Masahito Omote
Import upstream version 0.3.9
2763
  # Fast installation is not supported
2764
  enable_fast_install=no
2765
elif test "$shlibpath_overrides_runpath" = yes ||
2766
     test "$enable_shared" = no; then
2767
  # Fast installation is not necessary
2768
  enable_fast_install=needless
2769
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2770
_LT_TAGDECL([], [hardcode_action], [0],
2771
    [How to hardcode a shared library path into an executable])
2772
])# _LT_LINKER_HARDCODE_LIBPATH
2773
2774
2775
# _LT_CMD_STRIPLIB
2776
# ----------------
2777
m4_defun([_LT_CMD_STRIPLIB],
2778
[m4_require([_LT_DECL_EGREP])
2779
striplib=
1 by Masahito Omote
Import upstream version 0.3.9
2780
old_striplib=
2781
AC_MSG_CHECKING([whether stripping libraries is possible])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2782
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
1 by Masahito Omote
Import upstream version 0.3.9
2783
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2784
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2785
  AC_MSG_RESULT([yes])
2786
else
2787
# FIXME - insert some real tests, host_os isn't really good enough
2788
  case $host_os in
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2789
  darwin*)
2790
    if test -n "$STRIP" ; then
2791
      striplib="$STRIP -x"
2792
      old_striplib="$STRIP -S"
2793
      AC_MSG_RESULT([yes])
2794
    else
2795
      AC_MSG_RESULT([no])
2796
    fi
2797
    ;;
2798
  *)
2799
    AC_MSG_RESULT([no])
1 by Masahito Omote
Import upstream version 0.3.9
2800
    ;;
2801
  esac
2802
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2803
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2804
_LT_DECL([], [striplib], [1])
2805
])# _LT_CMD_STRIPLIB
2806
2807
2808
# _LT_SYS_DYNAMIC_LINKER([TAG])
1 by Masahito Omote
Import upstream version 0.3.9
2809
# -----------------------------
2810
# PORTME Fill in your ld.so characteristics
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2811
m4_defun([_LT_SYS_DYNAMIC_LINKER],
2812
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2813
m4_require([_LT_DECL_EGREP])dnl
2814
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2815
m4_require([_LT_DECL_OBJDUMP])dnl
2816
m4_require([_LT_DECL_SED])dnl
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2817
AC_MSG_CHECKING([dynamic linker characteristics])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2818
m4_if([$1],
2819
	[], [
1 by Masahito Omote
Import upstream version 0.3.9
2820
if test "$GCC" = yes; then
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2821
  case $host_os in
2822
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2823
    *) lt_awk_arg="/^libraries:/" ;;
2824
  esac
2825
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2826
  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
1 by Masahito Omote
Import upstream version 0.3.9
2827
    # if the path contains ";" then we assume it to be the separator
2828
    # otherwise default to the standard path separator (i.e. ":") - it is
2829
    # assumed that no part of a normal pathname contains ";" but that should
2830
    # okay in the real world where ";" in dirpaths is itself problematic.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2831
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1 by Masahito Omote
Import upstream version 0.3.9
2832
  else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2833
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1 by Masahito Omote
Import upstream version 0.3.9
2834
  fi
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2835
  # Ok, now we have the path, separated by spaces, we can step through it
2836
  # and add multilib dir if necessary.
2837
  lt_tmp_lt_search_path_spec=
2838
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2839
  for lt_sys_path in $lt_search_path_spec; do
2840
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2841
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2842
    else
2843
      test -d "$lt_sys_path" && \
2844
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2845
    fi
2846
  done
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2847
  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2848
BEGIN {RS=" "; FS="/|\n";} {
2849
  lt_foo="";
2850
  lt_count=0;
2851
  for (lt_i = NF; lt_i > 0; lt_i--) {
2852
    if ($lt_i != "" && $lt_i != ".") {
2853
      if ($lt_i == "..") {
2854
        lt_count++;
2855
      } else {
2856
        if (lt_count == 0) {
2857
          lt_foo="/" $lt_i lt_foo;
2858
        } else {
2859
          lt_count--;
2860
        }
2861
      }
2862
    }
2863
  }
2864
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2865
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2866
}'`
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2867
  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
1 by Masahito Omote
Import upstream version 0.3.9
2868
else
2869
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2870
fi])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2871
library_names_spec=
2872
libname_spec='lib$name'
2873
soname_spec=
2874
shrext_cmds=".so"
2875
postinstall_cmds=
2876
postuninstall_cmds=
2877
finish_cmds=
2878
finish_eval=
2879
shlibpath_var=
2880
shlibpath_overrides_runpath=unknown
2881
version_type=none
2882
dynamic_linker="$host_os ld.so"
2883
sys_lib_dlsearch_path_spec="/lib /usr/lib"
1 by Masahito Omote
Import upstream version 0.3.9
2884
need_lib_prefix=unknown
2885
hardcode_into_libs=no
2886
2887
# when you set need_version to no, make sure it does not cause -set_version
2888
# flags to be left without arguments
2889
need_version=unknown
2890
2891
case $host_os in
2892
aix3*)
2893
  version_type=linux
2894
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2895
  shlibpath_var=LIBPATH
2896
2897
  # AIX 3 has no versioning support, so we append a major version to the name.
2898
  soname_spec='${libname}${release}${shared_ext}$major'
2899
  ;;
2900
1.1.7 by Masahito Omote
Import upstream version 1.4.2
2901
aix[[4-9]]*)
1 by Masahito Omote
Import upstream version 0.3.9
2902
  version_type=linux
2903
  need_lib_prefix=no
2904
  need_version=no
2905
  hardcode_into_libs=yes
2906
  if test "$host_cpu" = ia64; then
2907
    # AIX 5 supports IA64
2908
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2909
    shlibpath_var=LD_LIBRARY_PATH
2910
  else
2911
    # With GCC up to 2.95.x, collect2 would create an import file
2912
    # for dependence libraries.  The import file would start with
2913
    # the line `#! .'.  This would cause the generated library to
2914
    # depend on `.', always an invalid library.  This was fixed in
2915
    # development snapshots of GCC prior to 3.0.
2916
    case $host_os in
2917
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2918
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2919
	   echo ' yes '
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2920
	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
1 by Masahito Omote
Import upstream version 0.3.9
2921
	:
2922
      else
2923
	can_build_shared=no
2924
      fi
2925
      ;;
2926
    esac
2927
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2928
    # soname into executable. Probably we can add versioning support to
2929
    # collect2, so additional links can be useful in future.
2930
    if test "$aix_use_runtimelinking" = yes; then
2931
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2932
      # instead of lib<name>.a to let people know that these are not
2933
      # typical AIX shared libraries.
2934
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2935
    else
2936
      # We preserve .a as extension for shared libraries through AIX4.2
2937
      # and later when we are not doing run time linking.
2938
      library_names_spec='${libname}${release}.a $libname.a'
2939
      soname_spec='${libname}${release}${shared_ext}$major'
2940
    fi
2941
    shlibpath_var=LIBPATH
2942
  fi
2943
  ;;
2944
2945
amigaos*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2946
  case $host_cpu in
2947
  powerpc)
2948
    # Since July 2007 AmigaOS4 officially supports .so libraries.
2949
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2950
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2951
    ;;
2952
  m68k)
2953
    library_names_spec='$libname.ixlibrary $libname.a'
2954
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2955
    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'
2956
    ;;
2957
  esac
1 by Masahito Omote
Import upstream version 0.3.9
2958
  ;;
2959
2960
beos*)
2961
  library_names_spec='${libname}${shared_ext}'
2962
  dynamic_linker="$host_os ld.so"
2963
  shlibpath_var=LIBRARY_PATH
2964
  ;;
2965
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2966
bsdi[[45]]*)
1 by Masahito Omote
Import upstream version 0.3.9
2967
  version_type=linux
2968
  need_version=no
2969
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2970
  soname_spec='${libname}${release}${shared_ext}$major'
2971
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2972
  shlibpath_var=LD_LIBRARY_PATH
2973
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2974
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2975
  # the default ld.so.conf also contains /usr/contrib/lib and
2976
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2977
  # libtool to hard-code these into programs
2978
  ;;
2979
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2980
cygwin* | mingw* | pw32* | cegcc*)
1 by Masahito Omote
Import upstream version 0.3.9
2981
  version_type=windows
2982
  shrext_cmds=".dll"
2983
  need_version=no
2984
  need_lib_prefix=no
2985
2986
  case $GCC,$host_os in
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2987
  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
1 by Masahito Omote
Import upstream version 0.3.9
2988
    library_names_spec='$libname.dll.a'
2989
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2990
    postinstall_cmds='base_file=`basename \${file}`~
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2991
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
1 by Masahito Omote
Import upstream version 0.3.9
2992
      dldir=$destdir/`dirname \$dlpath`~
2993
      test -d \$dldir || mkdir -p \$dldir~
1.1.3 by Masahito Omote
Import upstream version 1.0.0
2994
      $install_prog $dir/$dlname \$dldir/$dlname~
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
2995
      chmod a+x \$dldir/$dlname~
2996
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2997
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2998
      fi'
1 by Masahito Omote
Import upstream version 0.3.9
2999
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3000
      dlpath=$dir/\$dldll~
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3001
       $RM \$dlpath'
1 by Masahito Omote
Import upstream version 0.3.9
3002
    shlibpath_overrides_runpath=yes
3003
3004
    case $host_os in
3005
    cygwin*)
3006
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3007
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3008
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3009
      ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3010
    mingw* | cegcc*)
1 by Masahito Omote
Import upstream version 0.3.9
3011
      # MinGW DLLs use traditional 'lib' prefix
3012
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3013
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3014
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
1 by Masahito Omote
Import upstream version 0.3.9
3015
        # It is most probably a Windows format PATH printed by
3016
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
3017
        # path with ; separators, and with drive letters. We can handle the
3018
        # drive letters (cygwin fileutils understands them), so leave them,
3019
        # especially as we might pass files found there to a mingw objdump,
3020
        # which wouldn't understand a cygwinified path. Ahh.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3021
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1 by Masahito Omote
Import upstream version 0.3.9
3022
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3023
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1 by Masahito Omote
Import upstream version 0.3.9
3024
      fi
3025
      ;;
3026
    pw32*)
3027
      # pw32 DLLs use 'pw' prefix rather than 'lib'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3028
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1 by Masahito Omote
Import upstream version 0.3.9
3029
      ;;
3030
    esac
3031
    ;;
3032
3033
  *)
3034
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3035
    ;;
3036
  esac
3037
  dynamic_linker='Win32 ld.exe'
3038
  # FIXME: first we should search . and the directory the executable is in
3039
  shlibpath_var=PATH
3040
  ;;
3041
3042
darwin* | rhapsody*)
3043
  dynamic_linker="$host_os dyld"
3044
  version_type=darwin
3045
  need_lib_prefix=no
3046
  need_version=no
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3047
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1 by Masahito Omote
Import upstream version 0.3.9
3048
  soname_spec='${libname}${release}${major}$shared_ext'
3049
  shlibpath_overrides_runpath=yes
3050
  shlibpath_var=DYLD_LIBRARY_PATH
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3051
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3052
m4_if([$1], [],[
3053
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
1 by Masahito Omote
Import upstream version 0.3.9
3054
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3055
  ;;
3056
3057
dgux*)
3058
  version_type=linux
3059
  need_lib_prefix=no
3060
  need_version=no
3061
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3062
  soname_spec='${libname}${release}${shared_ext}$major'
3063
  shlibpath_var=LD_LIBRARY_PATH
3064
  ;;
3065
3066
freebsd1*)
3067
  dynamic_linker=no
3068
  ;;
3069
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3070
freebsd* | dragonfly*)
3071
  # DragonFly does not have aout.  When/if they implement a new
3072
  # versioning mechanism, adjust this.
3073
  if test -x /usr/bin/objformat; then
3074
    objformat=`/usr/bin/objformat`
3075
  else
3076
    case $host_os in
3077
    freebsd[[123]]*) objformat=aout ;;
3078
    *) objformat=elf ;;
3079
    esac
3080
  fi
1 by Masahito Omote
Import upstream version 0.3.9
3081
  version_type=freebsd-$objformat
3082
  case $version_type in
3083
    freebsd-elf*)
3084
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3085
      need_version=no
3086
      need_lib_prefix=no
3087
      ;;
3088
    freebsd-*)
3089
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3090
      need_version=yes
3091
      ;;
3092
  esac
3093
  shlibpath_var=LD_LIBRARY_PATH
3094
  case $host_os in
3095
  freebsd2*)
3096
    shlibpath_overrides_runpath=yes
3097
    ;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3098
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1 by Masahito Omote
Import upstream version 0.3.9
3099
    shlibpath_overrides_runpath=yes
3100
    hardcode_into_libs=yes
3101
    ;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3102
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3103
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1 by Masahito Omote
Import upstream version 0.3.9
3104
    shlibpath_overrides_runpath=no
3105
    hardcode_into_libs=yes
3106
    ;;
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3107
  *) # from 4.6 on, and DragonFly
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3108
    shlibpath_overrides_runpath=yes
3109
    hardcode_into_libs=yes
3110
    ;;
1 by Masahito Omote
Import upstream version 0.3.9
3111
  esac
3112
  ;;
3113
3114
gnu*)
3115
  version_type=linux
3116
  need_lib_prefix=no
3117
  need_version=no
3118
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3119
  soname_spec='${libname}${release}${shared_ext}$major'
3120
  shlibpath_var=LD_LIBRARY_PATH
3121
  hardcode_into_libs=yes
3122
  ;;
3123
3124
hpux9* | hpux10* | hpux11*)
3125
  # Give a soname corresponding to the major version so that dld.sl refuses to
3126
  # link against other versions.
3127
  version_type=sunos
3128
  need_lib_prefix=no
3129
  need_version=no
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3130
  case $host_cpu in
1 by Masahito Omote
Import upstream version 0.3.9
3131
  ia64*)
3132
    shrext_cmds='.so'
3133
    hardcode_into_libs=yes
3134
    dynamic_linker="$host_os dld.so"
3135
    shlibpath_var=LD_LIBRARY_PATH
3136
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3137
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3138
    soname_spec='${libname}${release}${shared_ext}$major'
3139
    if test "X$HPUX_IA64_MODE" = X32; then
3140
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3141
    else
3142
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3143
    fi
3144
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3145
    ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3146
  hppa*64*)
3147
    shrext_cmds='.sl'
3148
    hardcode_into_libs=yes
3149
    dynamic_linker="$host_os dld.sl"
3150
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3151
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3152
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3153
    soname_spec='${libname}${release}${shared_ext}$major'
3154
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3155
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3156
    ;;
3157
  *)
1 by Masahito Omote
Import upstream version 0.3.9
3158
    shrext_cmds='.sl'
3159
    dynamic_linker="$host_os dld.sl"
3160
    shlibpath_var=SHLIB_PATH
3161
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3162
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3163
    soname_spec='${libname}${release}${shared_ext}$major'
3164
    ;;
3165
  esac
3166
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3167
  postinstall_cmds='chmod 555 $lib'
3168
  ;;
3169
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3170
interix[[3-9]]*)
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3171
  version_type=linux
3172
  need_lib_prefix=no
3173
  need_version=no
3174
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3175
  soname_spec='${libname}${release}${shared_ext}$major'
3176
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3177
  shlibpath_var=LD_LIBRARY_PATH
3178
  shlibpath_overrides_runpath=no
3179
  hardcode_into_libs=yes
3180
  ;;
3181
1 by Masahito Omote
Import upstream version 0.3.9
3182
irix5* | irix6* | nonstopux*)
3183
  case $host_os in
3184
    nonstopux*) version_type=nonstopux ;;
3185
    *)
3186
	if test "$lt_cv_prog_gnu_ld" = yes; then
3187
		version_type=linux
3188
	else
3189
		version_type=irix
3190
	fi ;;
3191
  esac
3192
  need_lib_prefix=no
3193
  need_version=no
3194
  soname_spec='${libname}${release}${shared_ext}$major'
3195
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3196
  case $host_os in
3197
  irix5* | nonstopux*)
3198
    libsuff= shlibsuff=
3199
    ;;
3200
  *)
3201
    case $LD in # libtool.m4 will add one of these switches to LD
3202
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3203
      libsuff= shlibsuff= libmagic=32-bit;;
3204
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3205
      libsuff=32 shlibsuff=N32 libmagic=N32;;
3206
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3207
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3208
    *) libsuff= shlibsuff= libmagic=never-match;;
3209
    esac
3210
    ;;
3211
  esac
3212
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3213
  shlibpath_overrides_runpath=no
3214
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3215
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3216
  hardcode_into_libs=yes
3217
  ;;
3218
3219
# No shared lib support for Linux oldld, aout, or coff.
3220
linux*oldld* | linux*aout* | linux*coff*)
3221
  dynamic_linker=no
3222
  ;;
3223
3224
# This must be Linux ELF.
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3225
linux* | k*bsd*-gnu)
1 by Masahito Omote
Import upstream version 0.3.9
3226
  version_type=linux
3227
  need_lib_prefix=no
3228
  need_version=no
3229
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3230
  soname_spec='${libname}${release}${shared_ext}$major'
3231
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3232
  shlibpath_var=LD_LIBRARY_PATH
3233
  shlibpath_overrides_runpath=no
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3234
  # Some binutils ld are patched to set DT_RUNPATH
3235
  save_LDFLAGS=$LDFLAGS
3236
  save_libdir=$libdir
3237
  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3238
       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3239
  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3240
    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3241
       [shlibpath_overrides_runpath=yes])])
3242
  LDFLAGS=$save_LDFLAGS
3243
  libdir=$save_libdir
3244
1 by Masahito Omote
Import upstream version 0.3.9
3245
  # This implies no fast_install, which is unacceptable.
3246
  # Some rework will be needed to allow for fast_install
3247
  # before this can be enabled.
3248
  hardcode_into_libs=yes
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3249
3250
  # Add ABI-specific directories to the system library path.
3251
  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
1 by Masahito Omote
Import upstream version 0.3.9
3252
3253
  # Append ld.so.conf contents to the search path
3254
  if test -f /etc/ld.so.conf; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3255
    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' ' '`
1.1.9 by Masahito Omote
Import upstream version 1.5.3
3256
    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
1 by Masahito Omote
Import upstream version 0.3.9
3257
  fi
3258
3259
  # We used to test for /lib/ld.so.1 and disable shared libraries on
3260
  # powerpc, because MkLinux only supported shared libraries with the
3261
  # GNU dynamic linker.  Since this was broken with cross compilers,
3262
  # most powerpc-linux boxes support dynamic linking these days and
3263
  # people can always --disable-shared, the test was removed, and we
3264
  # assume the GNU/Linux dynamic linker is in use.
3265
  dynamic_linker='GNU/Linux ld.so'
3266
  ;;
3267
3268
netbsd*)
3269
  version_type=sunos
3270
  need_lib_prefix=no
3271
  need_version=no
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3272
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
1 by Masahito Omote
Import upstream version 0.3.9
3273
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3274
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3275
    dynamic_linker='NetBSD (a.out) ld.so'
3276
  else
3277
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3278
    soname_spec='${libname}${release}${shared_ext}$major'
3279
    dynamic_linker='NetBSD ld.elf_so'
3280
  fi
3281
  shlibpath_var=LD_LIBRARY_PATH
3282
  shlibpath_overrides_runpath=yes
3283
  hardcode_into_libs=yes
3284
  ;;
3285
3286
newsos6)
3287
  version_type=linux
3288
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3289
  shlibpath_var=LD_LIBRARY_PATH
3290
  shlibpath_overrides_runpath=yes
3291
  ;;
3292
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3293
*nto* | *qnx*)
3294
  version_type=qnx
1 by Masahito Omote
Import upstream version 0.3.9
3295
  need_lib_prefix=no
3296
  need_version=no
3297
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3298
  soname_spec='${libname}${release}${shared_ext}$major'
3299
  shlibpath_var=LD_LIBRARY_PATH
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3300
  shlibpath_overrides_runpath=no
3301
  hardcode_into_libs=yes
3302
  dynamic_linker='ldqnx.so'
1 by Masahito Omote
Import upstream version 0.3.9
3303
  ;;
3304
3305
openbsd*)
3306
  version_type=sunos
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3307
  sys_lib_dlsearch_path_spec="/usr/lib"
1 by Masahito Omote
Import upstream version 0.3.9
3308
  need_lib_prefix=no
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3309
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3310
  case $host_os in
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3311
    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3312
    *)				need_version=no  ;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3313
  esac
1 by Masahito Omote
Import upstream version 0.3.9
3314
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3315
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3316
  shlibpath_var=LD_LIBRARY_PATH
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3317
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1 by Masahito Omote
Import upstream version 0.3.9
3318
    case $host_os in
3319
      openbsd2.[[89]] | openbsd2.[[89]].*)
3320
	shlibpath_overrides_runpath=no
3321
	;;
3322
      *)
3323
	shlibpath_overrides_runpath=yes
3324
	;;
3325
      esac
3326
  else
3327
    shlibpath_overrides_runpath=yes
3328
  fi
3329
  ;;
3330
3331
os2*)
3332
  libname_spec='$name'
3333
  shrext_cmds=".dll"
3334
  need_lib_prefix=no
3335
  library_names_spec='$libname${shared_ext} $libname.a'
3336
  dynamic_linker='OS/2 ld.exe'
3337
  shlibpath_var=LIBPATH
3338
  ;;
3339
3340
osf3* | osf4* | osf5*)
3341
  version_type=osf
3342
  need_lib_prefix=no
3343
  need_version=no
3344
  soname_spec='${libname}${release}${shared_ext}$major'
3345
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3346
  shlibpath_var=LD_LIBRARY_PATH
3347
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3348
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3349
  ;;
3350
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3351
rdos*)
3352
  dynamic_linker=no
3353
  ;;
3354
1 by Masahito Omote
Import upstream version 0.3.9
3355
solaris*)
3356
  version_type=linux
3357
  need_lib_prefix=no
3358
  need_version=no
3359
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3360
  soname_spec='${libname}${release}${shared_ext}$major'
3361
  shlibpath_var=LD_LIBRARY_PATH
3362
  shlibpath_overrides_runpath=yes
3363
  hardcode_into_libs=yes
3364
  # ldd complains unless libraries are executable
3365
  postinstall_cmds='chmod +x $lib'
3366
  ;;
3367
3368
sunos4*)
3369
  version_type=sunos
3370
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3371
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3372
  shlibpath_var=LD_LIBRARY_PATH
3373
  shlibpath_overrides_runpath=yes
3374
  if test "$with_gnu_ld" = yes; then
3375
    need_lib_prefix=no
3376
  fi
3377
  need_version=yes
3378
  ;;
3379
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3380
sysv4 | sysv4.3*)
1 by Masahito Omote
Import upstream version 0.3.9
3381
  version_type=linux
3382
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3383
  soname_spec='${libname}${release}${shared_ext}$major'
3384
  shlibpath_var=LD_LIBRARY_PATH
3385
  case $host_vendor in
3386
    sni)
3387
      shlibpath_overrides_runpath=no
3388
      need_lib_prefix=no
3389
      runpath_var=LD_RUN_PATH
3390
      ;;
3391
    siemens)
3392
      need_lib_prefix=no
3393
      ;;
3394
    motorola)
3395
      need_lib_prefix=no
3396
      need_version=no
3397
      shlibpath_overrides_runpath=no
3398
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3399
      ;;
3400
  esac
3401
  ;;
3402
3403
sysv4*MP*)
3404
  if test -d /usr/nec ;then
3405
    version_type=linux
3406
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3407
    soname_spec='$libname${shared_ext}.$major'
3408
    shlibpath_var=LD_LIBRARY_PATH
3409
  fi
3410
  ;;
3411
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3412
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3413
  version_type=freebsd-elf
3414
  need_lib_prefix=no
3415
  need_version=no
3416
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3417
  soname_spec='${libname}${release}${shared_ext}$major'
3418
  shlibpath_var=LD_LIBRARY_PATH
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3419
  shlibpath_overrides_runpath=yes
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3420
  hardcode_into_libs=yes
3421
  if test "$with_gnu_ld" = yes; then
3422
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3423
  else
3424
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3425
    case $host_os in
3426
      sco3.2v5*)
3427
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3428
	;;
3429
    esac
3430
  fi
3431
  sys_lib_dlsearch_path_spec='/usr/lib'
3432
  ;;
3433
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3434
tpf*)
3435
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3436
  version_type=linux
3437
  need_lib_prefix=no
3438
  need_version=no
3439
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3440
  shlibpath_var=LD_LIBRARY_PATH
3441
  shlibpath_overrides_runpath=no
3442
  hardcode_into_libs=yes
3443
  ;;
3444
1 by Masahito Omote
Import upstream version 0.3.9
3445
uts4*)
3446
  version_type=linux
3447
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3448
  soname_spec='${libname}${release}${shared_ext}$major'
3449
  shlibpath_var=LD_LIBRARY_PATH
3450
  ;;
3451
3452
*)
3453
  dynamic_linker=no
3454
  ;;
3455
esac
3456
AC_MSG_RESULT([$dynamic_linker])
3457
test "$dynamic_linker" = no && can_build_shared=no
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3458
3459
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3460
if test "$GCC" = yes; then
3461
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3462
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3463
3464
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3465
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3466
fi
3467
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3468
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3469
fi
3470
3471
_LT_DECL([], [variables_saved_for_relink], [1],
3472
    [Variables whose values should be saved in libtool wrapper scripts and
3473
    restored at link time])
3474
_LT_DECL([], [need_lib_prefix], [0],
3475
    [Do we need the "lib" prefix for modules?])
3476
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3477
_LT_DECL([], [version_type], [0], [Library versioning type])
3478
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3479
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3480
_LT_DECL([], [shlibpath_overrides_runpath], [0],
3481
    [Is shlibpath searched before the hard-coded library search path?])
3482
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3483
_LT_DECL([], [library_names_spec], [1],
3484
    [[List of archive names.  First name is the real one, the rest are links.
3485
    The last name is the one that the linker finds with -lNAME]])
3486
_LT_DECL([], [soname_spec], [1],
3487
    [[The coded name of the library, if different from the real name]])
3488
_LT_DECL([], [postinstall_cmds], [2],
3489
    [Command to use after installation of a shared archive])
3490
_LT_DECL([], [postuninstall_cmds], [2],
3491
    [Command to use after uninstallation of a shared archive])
3492
_LT_DECL([], [finish_cmds], [2],
3493
    [Commands used to finish a libtool library installation in a directory])
3494
_LT_DECL([], [finish_eval], [1],
3495
    [[As "finish_cmds", except a single script fragment to be evaled but
3496
    not shown]])
3497
_LT_DECL([], [hardcode_into_libs], [0],
3498
    [Whether we should hardcode library paths into libraries])
3499
_LT_DECL([], [sys_lib_search_path_spec], [2],
3500
    [Compile-time system search path for libraries])
3501
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3502
    [Run-time system search path for libraries])
3503
])# _LT_SYS_DYNAMIC_LINKER
3504
3505
3506
# _LT_PATH_TOOL_PREFIX(TOOL)
1 by Masahito Omote
Import upstream version 0.3.9
3507
# --------------------------
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3508
# find a file program which can recognize shared library
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3509
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3510
[m4_require([_LT_DECL_EGREP])dnl
1 by Masahito Omote
Import upstream version 0.3.9
3511
AC_MSG_CHECKING([for $1])
3512
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3513
[case $MAGIC_CMD in
3514
[[\\/*] |  ?:[\\/]*])
3515
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3516
  ;;
3517
*)
3518
  lt_save_MAGIC_CMD="$MAGIC_CMD"
3519
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3520
dnl $ac_dummy forces splitting on constant user-supplied paths.
3521
dnl POSIX.2 word splitting is done only on the output of word expansions,
3522
dnl not every word.  This closes a longstanding sh security hole.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3523
  ac_dummy="m4_if([$2], , $PATH, [$2])"
1 by Masahito Omote
Import upstream version 0.3.9
3524
  for ac_dir in $ac_dummy; do
3525
    IFS="$lt_save_ifs"
3526
    test -z "$ac_dir" && ac_dir=.
3527
    if test -f $ac_dir/$1; then
3528
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3529
      if test -n "$file_magic_test_file"; then
3530
	case $deplibs_check_method in
3531
	"file_magic "*)
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3532
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
1 by Masahito Omote
Import upstream version 0.3.9
3533
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3534
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3535
	    $EGREP "$file_magic_regex" > /dev/null; then
3536
	    :
3537
	  else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3538
	    cat <<_LT_EOF 1>&2
1 by Masahito Omote
Import upstream version 0.3.9
3539
3540
*** Warning: the command libtool uses to detect shared libraries,
3541
*** $file_magic_cmd, produces output that libtool cannot recognize.
3542
*** The result is that libtool may fail to recognize shared libraries
3543
*** as such.  This will affect the creation of libtool libraries that
3544
*** depend on shared libraries, but programs linked with such libtool
3545
*** libraries will work regardless of this problem.  Nevertheless, you
3546
*** may want to report the problem to your system manager and/or to
3547
*** bug-libtool@gnu.org
3548
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3549
_LT_EOF
1 by Masahito Omote
Import upstream version 0.3.9
3550
	  fi ;;
3551
	esac
3552
      fi
3553
      break
3554
    fi
3555
  done
3556
  IFS="$lt_save_ifs"
3557
  MAGIC_CMD="$lt_save_MAGIC_CMD"
3558
  ;;
3559
esac])
3560
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3561
if test -n "$MAGIC_CMD"; then
3562
  AC_MSG_RESULT($MAGIC_CMD)
3563
else
3564
  AC_MSG_RESULT(no)
3565
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3566
_LT_DECL([], [MAGIC_CMD], [0],
3567
	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3568
])# _LT_PATH_TOOL_PREFIX
3569
3570
# Old name:
3571
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3572
dnl aclocal-1.4 backwards compatibility:
3573
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3574
3575
3576
# _LT_PATH_MAGIC
3577
# --------------
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3578
# find a file program which can recognize a shared library
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3579
m4_defun([_LT_PATH_MAGIC],
3580
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
1 by Masahito Omote
Import upstream version 0.3.9
3581
if test -z "$lt_cv_path_MAGIC_CMD"; then
3582
  if test -n "$ac_tool_prefix"; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3583
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
1 by Masahito Omote
Import upstream version 0.3.9
3584
  else
3585
    MAGIC_CMD=:
3586
  fi
3587
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3588
])# _LT_PATH_MAGIC
3589
3590
3591
# LT_PATH_LD
1 by Masahito Omote
Import upstream version 0.3.9
3592
# ----------
3593
# find the pathname to the GNU or non-GNU linker
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3594
AC_DEFUN([LT_PATH_LD],
3595
[AC_REQUIRE([AC_PROG_CC])dnl
3596
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3597
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3598
m4_require([_LT_DECL_SED])dnl
3599
m4_require([_LT_DECL_EGREP])dnl
3600
3601
AC_ARG_WITH([gnu-ld],
3602
    [AS_HELP_STRING([--with-gnu-ld],
1 by Masahito Omote
Import upstream version 0.3.9
3603
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3604
    [test "$withval" = no || with_gnu_ld=yes],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3605
    [with_gnu_ld=no])dnl
3606
1 by Masahito Omote
Import upstream version 0.3.9
3607
ac_prog=ld
3608
if test "$GCC" = yes; then
3609
  # Check if gcc -print-prog-name=ld gives a path.
3610
  AC_MSG_CHECKING([for ld used by $CC])
3611
  case $host in
3612
  *-*-mingw*)
3613
    # gcc leaves a trailing carriage return which upsets mingw
3614
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3615
  *)
3616
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3617
  esac
3618
  case $ac_prog in
3619
    # Accept absolute paths.
3620
    [[\\/]]* | ?:[[\\/]]*)
3621
      re_direlt='/[[^/]][[^/]]*/\.\./'
3622
      # Canonicalize the pathname of ld
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3623
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3624
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3625
	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
1 by Masahito Omote
Import upstream version 0.3.9
3626
      done
3627
      test -z "$LD" && LD="$ac_prog"
3628
      ;;
3629
  "")
3630
    # If it fails, then pretend we aren't using GCC.
3631
    ac_prog=ld
3632
    ;;
3633
  *)
3634
    # If it is relative, then search for the first ld in PATH.
3635
    with_gnu_ld=unknown
3636
    ;;
3637
  esac
3638
elif test "$with_gnu_ld" = yes; then
3639
  AC_MSG_CHECKING([for GNU ld])
3640
else
3641
  AC_MSG_CHECKING([for non-GNU ld])
3642
fi
3643
AC_CACHE_VAL(lt_cv_path_LD,
3644
[if test -z "$LD"; then
3645
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3646
  for ac_dir in $PATH; do
3647
    IFS="$lt_save_ifs"
3648
    test -z "$ac_dir" && ac_dir=.
3649
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3650
      lt_cv_path_LD="$ac_dir/$ac_prog"
3651
      # Check to see if the program is GNU ld.  I'd rather use --version,
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3652
      # but apparently some variants of GNU ld only accept -v.
1 by Masahito Omote
Import upstream version 0.3.9
3653
      # Break only if it was the GNU/non-GNU ld that we prefer.
3654
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3655
      *GNU* | *'with BFD'*)
3656
	test "$with_gnu_ld" != no && break
3657
	;;
3658
      *)
3659
	test "$with_gnu_ld" != yes && break
3660
	;;
3661
      esac
3662
    fi
3663
  done
3664
  IFS="$lt_save_ifs"
3665
else
3666
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3667
fi])
3668
LD="$lt_cv_path_LD"
3669
if test -n "$LD"; then
3670
  AC_MSG_RESULT($LD)
3671
else
3672
  AC_MSG_RESULT(no)
3673
fi
3674
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3675
_LT_PATH_LD_GNU
3676
AC_SUBST([LD])
3677
3678
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3679
])# LT_PATH_LD
3680
3681
# Old names:
3682
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3683
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3684
dnl aclocal-1.4 backwards compatibility:
3685
dnl AC_DEFUN([AM_PROG_LD], [])
3686
dnl AC_DEFUN([AC_PROG_LD], [])
3687
3688
3689
# _LT_PATH_LD_GNU
3690
#- --------------
3691
m4_defun([_LT_PATH_LD_GNU],
3692
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3693
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
1 by Masahito Omote
Import upstream version 0.3.9
3694
case `$LD -v 2>&1 </dev/null` in
3695
*GNU* | *'with BFD'*)
3696
  lt_cv_prog_gnu_ld=yes
3697
  ;;
3698
*)
3699
  lt_cv_prog_gnu_ld=no
3700
  ;;
3701
esac])
3702
with_gnu_ld=$lt_cv_prog_gnu_ld
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3703
])# _LT_PATH_LD_GNU
3704
3705
3706
# _LT_CMD_RELOAD
3707
# --------------
1 by Masahito Omote
Import upstream version 0.3.9
3708
# find reload flag for linker
3709
#   -- PORTME Some linkers may need a different reload flag.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3710
m4_defun([_LT_CMD_RELOAD],
1 by Masahito Omote
Import upstream version 0.3.9
3711
[AC_CACHE_CHECK([for $LD option to reload object files],
3712
  lt_cv_ld_reload_flag,
3713
  [lt_cv_ld_reload_flag='-r'])
3714
reload_flag=$lt_cv_ld_reload_flag
3715
case $reload_flag in
3716
"" | " "*) ;;
3717
*) reload_flag=" $reload_flag" ;;
3718
esac
3719
reload_cmds='$LD$reload_flag -o $output$reload_objs'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3720
case $host_os in
3721
  darwin*)
3722
    if test "$GCC" = yes; then
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3723
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3724
    else
3725
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3726
    fi
3727
    ;;
3728
esac
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3729
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3730
_LT_DECL([], [reload_cmds], [2])dnl
3731
])# _LT_CMD_RELOAD
3732
3733
3734
# _LT_CHECK_MAGIC_METHOD
3735
# ----------------------
1 by Masahito Omote
Import upstream version 0.3.9
3736
# how to check for library dependencies
3737
#  -- PORTME fill in with the dynamic library characteristics
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3738
m4_defun([_LT_CHECK_MAGIC_METHOD],
3739
[m4_require([_LT_DECL_EGREP])
3740
m4_require([_LT_DECL_OBJDUMP])
3741
AC_CACHE_CHECK([how to recognize dependent libraries],
1 by Masahito Omote
Import upstream version 0.3.9
3742
lt_cv_deplibs_check_method,
3743
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3744
lt_cv_file_magic_test_file=
3745
lt_cv_deplibs_check_method='unknown'
3746
# Need to set the preceding variable on all platforms that support
3747
# interlibrary dependencies.
3748
# 'none' -- dependencies not supported.
3749
# `unknown' -- same as none, but documents that we really don't know.
3750
# 'pass_all' -- all dependencies passed with no checks.
3751
# 'test_compile' -- check by making test program.
3752
# 'file_magic [[regex]]' -- check by looking for files in library path
3753
# which responds to the $file_magic_cmd with a given extended regex.
3754
# If you have `file' or equivalent on your system and you're not sure
3755
# whether `pass_all' will *always* work, you probably want this one.
3756
3757
case $host_os in
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3758
aix[[4-9]]*)
1 by Masahito Omote
Import upstream version 0.3.9
3759
  lt_cv_deplibs_check_method=pass_all
3760
  ;;
3761
3762
beos*)
3763
  lt_cv_deplibs_check_method=pass_all
3764
  ;;
3765
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3766
bsdi[[45]]*)
1 by Masahito Omote
Import upstream version 0.3.9
3767
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3768
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3769
  lt_cv_file_magic_test_file=/shlib/libc.so
3770
  ;;
3771
3772
cygwin*)
3773
  # func_win32_libid is a shell function defined in ltmain.sh
3774
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3775
  lt_cv_file_magic_cmd='func_win32_libid'
3776
  ;;
3777
3778
mingw* | pw32*)
3779
  # Base MSYS/MinGW do not provide the 'file' command needed by
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3780
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3781
  # unless we find 'file', for example because we are cross-compiling.
3782
  if ( file / ) >/dev/null 2>&1; then
3783
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3784
    lt_cv_file_magic_cmd='func_win32_libid'
3785
  else
3786
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3787
    lt_cv_file_magic_cmd='$OBJDUMP -f'
3788
  fi
1 by Masahito Omote
Import upstream version 0.3.9
3789
  ;;
3790
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3791
cegcc)
3792
  # use the weaker test based on 'objdump'. See mingw*.
3793
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3794
  lt_cv_file_magic_cmd='$OBJDUMP -f'
3795
  ;;
3796
1 by Masahito Omote
Import upstream version 0.3.9
3797
darwin* | rhapsody*)
3798
  lt_cv_deplibs_check_method=pass_all
3799
  ;;
3800
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3801
freebsd* | dragonfly*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3802
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
1 by Masahito Omote
Import upstream version 0.3.9
3803
    case $host_cpu in
3804
    i*86 )
3805
      # Not sure whether the presence of OpenBSD here was a mistake.
3806
      # Let's accept both of them until this is cleared up.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3807
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
1 by Masahito Omote
Import upstream version 0.3.9
3808
      lt_cv_file_magic_cmd=/usr/bin/file
3809
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3810
      ;;
3811
    esac
3812
  else
3813
    lt_cv_deplibs_check_method=pass_all
3814
  fi
3815
  ;;
3816
3817
gnu*)
3818
  lt_cv_deplibs_check_method=pass_all
3819
  ;;
3820
3821
hpux10.20* | hpux11*)
3822
  lt_cv_file_magic_cmd=/usr/bin/file
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3823
  case $host_cpu in
1 by Masahito Omote
Import upstream version 0.3.9
3824
  ia64*)
3825
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3826
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3827
    ;;
3828
  hppa*64*)
3829
    [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]']
3830
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3831
    ;;
3832
  *)
3833
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3834
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3835
    ;;
3836
  esac
3837
  ;;
3838
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3839
interix[[3-9]]*)
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3840
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3841
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3842
  ;;
3843
1 by Masahito Omote
Import upstream version 0.3.9
3844
irix5* | irix6* | nonstopux*)
3845
  case $LD in
3846
  *-32|*"-32 ") libmagic=32-bit;;
3847
  *-n32|*"-n32 ") libmagic=N32;;
3848
  *-64|*"-64 ") libmagic=64-bit;;
3849
  *) libmagic=never-match;;
3850
  esac
3851
  lt_cv_deplibs_check_method=pass_all
3852
  ;;
3853
3854
# This must be Linux ELF.
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3855
linux* | k*bsd*-gnu)
1 by Masahito Omote
Import upstream version 0.3.9
3856
  lt_cv_deplibs_check_method=pass_all
3857
  ;;
3858
1.1.9 by Masahito Omote
Import upstream version 1.5.3
3859
netbsd*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3860
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
1 by Masahito Omote
Import upstream version 0.3.9
3861
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3862
  else
3863
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3864
  fi
3865
  ;;
3866
3867
newos6*)
3868
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3869
  lt_cv_file_magic_cmd=/usr/bin/file
3870
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3871
  ;;
3872
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3873
*nto* | *qnx*)
3874
  lt_cv_deplibs_check_method=pass_all
1 by Masahito Omote
Import upstream version 0.3.9
3875
  ;;
3876
3877
openbsd*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3878
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3879
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
1 by Masahito Omote
Import upstream version 0.3.9
3880
  else
1.1.3 by Masahito Omote
Import upstream version 1.0.0
3881
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
1 by Masahito Omote
Import upstream version 0.3.9
3882
  fi
3883
  ;;
3884
3885
osf3* | osf4* | osf5*)
3886
  lt_cv_deplibs_check_method=pass_all
3887
  ;;
3888
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3889
rdos*)
3890
  lt_cv_deplibs_check_method=pass_all
3891
  ;;
3892
1 by Masahito Omote
Import upstream version 0.3.9
3893
solaris*)
3894
  lt_cv_deplibs_check_method=pass_all
3895
  ;;
3896
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3897
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3898
  lt_cv_deplibs_check_method=pass_all
3899
  ;;
3900
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3901
sysv4 | sysv4.3*)
1 by Masahito Omote
Import upstream version 0.3.9
3902
  case $host_vendor in
3903
  motorola)
3904
    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]]'
3905
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3906
    ;;
3907
  ncr)
3908
    lt_cv_deplibs_check_method=pass_all
3909
    ;;
3910
  sequent)
3911
    lt_cv_file_magic_cmd='/bin/file'
3912
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3913
    ;;
3914
  sni)
3915
    lt_cv_file_magic_cmd='/bin/file'
3916
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3917
    lt_cv_file_magic_test_file=/lib/libc.so
3918
    ;;
3919
  siemens)
3920
    lt_cv_deplibs_check_method=pass_all
3921
    ;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3922
  pc)
3923
    lt_cv_deplibs_check_method=pass_all
3924
    ;;
1 by Masahito Omote
Import upstream version 0.3.9
3925
  esac
3926
  ;;
3927
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3928
tpf*)
1 by Masahito Omote
Import upstream version 0.3.9
3929
  lt_cv_deplibs_check_method=pass_all
3930
  ;;
3931
esac
3932
])
3933
file_magic_cmd=$lt_cv_file_magic_cmd
3934
deplibs_check_method=$lt_cv_deplibs_check_method
3935
test -z "$deplibs_check_method" && deplibs_check_method=unknown
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3936
3937
_LT_DECL([], [deplibs_check_method], [1],
3938
    [Method to check whether dependent libraries are shared objects])
3939
_LT_DECL([], [file_magic_cmd], [1],
3940
    [Command to use when deplibs_check_method == "file_magic"])
3941
])# _LT_CHECK_MAGIC_METHOD
3942
3943
3944
# LT_PATH_NM
1 by Masahito Omote
Import upstream version 0.3.9
3945
# ----------
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3946
# find the pathname to a BSD- or MS-compatible name lister
3947
AC_DEFUN([LT_PATH_NM],
3948
[AC_REQUIRE([AC_PROG_CC])dnl
3949
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
1 by Masahito Omote
Import upstream version 0.3.9
3950
[if test -n "$NM"; then
3951
  # Let the user override the test.
3952
  lt_cv_path_NM="$NM"
3953
else
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3954
  lt_nm_to_check="${ac_tool_prefix}nm"
1.1.7 by Masahito Omote
Import upstream version 1.4.2
3955
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3956
    lt_nm_to_check="$lt_nm_to_check nm"
3957
  fi
3958
  for lt_tmp_nm in $lt_nm_to_check; do
3959
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3960
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3961
      IFS="$lt_save_ifs"
3962
      test -z "$ac_dir" && ac_dir=.
3963
      tmp_nm="$ac_dir/$lt_tmp_nm"
3964
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3965
	# Check to see if the nm accepts a BSD-compat flag.
3966
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3967
	#   nm: unknown option "B" ignored
3968
	# Tru64's nm complains that /dev/null is an invalid object file
3969
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3970
	*/dev/null* | *'Invalid file or object type'*)
3971
	  lt_cv_path_NM="$tmp_nm -B"
1 by Masahito Omote
Import upstream version 0.3.9
3972
	  break
3973
	  ;;
3974
	*)
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3975
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3976
	  */dev/null*)
3977
	    lt_cv_path_NM="$tmp_nm -p"
3978
	    break
3979
	    ;;
3980
	  *)
3981
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3982
	    continue # so that we can try to find one that supports BSD flags
3983
	    ;;
3984
	  esac
1 by Masahito Omote
Import upstream version 0.3.9
3985
	  ;;
3986
	esac
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
3987
      fi
3988
    done
3989
    IFS="$lt_save_ifs"
1 by Masahito Omote
Import upstream version 0.3.9
3990
  done
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3991
  : ${lt_cv_path_NM=no}
1 by Masahito Omote
Import upstream version 0.3.9
3992
fi])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
3993
if test "$lt_cv_path_NM" != "no"; then
3994
  NM="$lt_cv_path_NM"
3995
else
3996
  # Didn't find any BSD compatible name lister, look for dumpbin.
3997
  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3998
  AC_SUBST([DUMPBIN])
3999
  if test "$DUMPBIN" != ":"; then
4000
    NM="$DUMPBIN"
4001
  fi
4002
fi
4003
test -z "$NM" && NM=nm
4004
AC_SUBST([NM])
4005
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4006
4007
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4008
  [lt_cv_nm_interface="BSD nm"
4009
  echo "int some_variable = 0;" > conftest.$ac_ext
4010
  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4011
  (eval "$ac_compile" 2>conftest.err)
4012
  cat conftest.err >&AS_MESSAGE_LOG_FD
4013
  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4014
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4015
  cat conftest.err >&AS_MESSAGE_LOG_FD
4016
  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4017
  cat conftest.out >&AS_MESSAGE_LOG_FD
4018
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4019
    lt_cv_nm_interface="MS dumpbin"
4020
  fi
4021
  rm -f conftest*])
4022
])# LT_PATH_NM
4023
4024
# Old names:
4025
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4026
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4027
dnl aclocal-1.4 backwards compatibility:
4028
dnl AC_DEFUN([AM_PROG_NM], [])
4029
dnl AC_DEFUN([AC_PROG_NM], [])
4030
4031
4032
# LT_LIB_M
4033
# --------
1 by Masahito Omote
Import upstream version 0.3.9
4034
# check for math library
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4035
AC_DEFUN([LT_LIB_M],
1 by Masahito Omote
Import upstream version 0.3.9
4036
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4037
LIBM=
4038
case $host in
4039
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4040
  # These system don't have libm, or don't need it
4041
  ;;
4042
*-ncr-sysv4.3*)
4043
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4044
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4045
  ;;
4046
*)
4047
  AC_CHECK_LIB(m, cos, LIBM="-lm")
4048
  ;;
4049
esac
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4050
AC_SUBST([LIBM])
4051
])# LT_LIB_M
4052
4053
# Old name:
4054
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4055
dnl aclocal-1.4 backwards compatibility:
4056
dnl AC_DEFUN([AC_CHECK_LIBM], [])
4057
4058
4059
# _LT_COMPILER_NO_RTTI([TAGNAME])
4060
# -------------------------------
4061
m4_defun([_LT_COMPILER_NO_RTTI],
4062
[m4_require([_LT_TAG_COMPILER])dnl
4063
4064
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
1 by Masahito Omote
Import upstream version 0.3.9
4065
4066
if test "$GCC" = yes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4067
  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
1 by Masahito Omote
Import upstream version 0.3.9
4068
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4069
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
1 by Masahito Omote
Import upstream version 0.3.9
4070
    lt_cv_prog_compiler_rtti_exceptions,
4071
    [-fno-rtti -fno-exceptions], [],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4072
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
1 by Masahito Omote
Import upstream version 0.3.9
4073
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4074
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4075
	[Compiler flag to turn off builtin functions])
4076
])# _LT_COMPILER_NO_RTTI
4077
4078
4079
# _LT_CMD_GLOBAL_SYMBOLS
4080
# ----------------------
4081
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4082
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4083
AC_REQUIRE([AC_PROG_CC])dnl
4084
AC_REQUIRE([LT_PATH_NM])dnl
4085
AC_REQUIRE([LT_PATH_LD])dnl
4086
m4_require([_LT_DECL_SED])dnl
4087
m4_require([_LT_DECL_EGREP])dnl
4088
m4_require([_LT_TAG_COMPILER])dnl
4089
1 by Masahito Omote
Import upstream version 0.3.9
4090
# Check for command to grab the raw symbol name followed by C symbol from nm.
4091
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4092
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4093
[
4094
# These are sane defaults that work on at least a few old systems.
4095
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4096
4097
# Character class describing NM global symbol codes.
4098
symcode='[[BCDEGRST]]'
4099
4100
# Regexp to match symbols that can be accessed directly from C.
4101
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4102
4103
# Define system-specific variables.
4104
case $host_os in
4105
aix*)
4106
  symcode='[[BCDT]]'
4107
  ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4108
cygwin* | mingw* | pw32* | cegcc*)
1 by Masahito Omote
Import upstream version 0.3.9
4109
  symcode='[[ABCDGISTW]]'
4110
  ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4111
hpux*)
1 by Masahito Omote
Import upstream version 0.3.9
4112
  if test "$host_cpu" = ia64; then
4113
    symcode='[[ABCDEGRST]]'
4114
  fi
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4115
  ;;
1 by Masahito Omote
Import upstream version 0.3.9
4116
irix* | nonstopux*)
4117
  symcode='[[BCDEGRST]]'
4118
  ;;
4119
osf*)
4120
  symcode='[[BCDEGQRST]]'
4121
  ;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
4122
solaris*)
1 by Masahito Omote
Import upstream version 0.3.9
4123
  symcode='[[BDRT]]'
4124
  ;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
4125
sco3.2v5*)
4126
  symcode='[[DT]]'
4127
  ;;
4128
sysv4.2uw2*)
4129
  symcode='[[DT]]'
4130
  ;;
4131
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4132
  symcode='[[ABDT]]'
4133
  ;;
1 by Masahito Omote
Import upstream version 0.3.9
4134
sysv4)
4135
  symcode='[[DFNSTU]]'
4136
  ;;
4137
esac
4138
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4139
# If we're using GNU nm, then use its standard symbol codes.
4140
case `$NM -V 2>&1` in
4141
*GNU* | *'with BFD'*)
4142
  symcode='[[ABCDGIRSTW]]' ;;
4143
esac
4144
4145
# Transform an extracted symbol line into a proper C declaration.
4146
# Some systems (esp. on ia64) link data and code symbols differently,
4147
# so use this general approach.
4148
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4149
4150
# Transform an extracted symbol line into symbol name and symbol address
4151
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4152
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'"
4153
1 by Masahito Omote
Import upstream version 0.3.9
4154
# Handle CRLF in mingw tool chain
4155
opt_cr=
4156
case $build_os in
4157
mingw*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4158
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1 by Masahito Omote
Import upstream version 0.3.9
4159
  ;;
4160
esac
4161
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4162
# Try without a prefix underscore, then with it.
1 by Masahito Omote
Import upstream version 0.3.9
4163
for ac_symprfx in "" "_"; do
4164
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4165
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4166
  symxfrm="\\1 $ac_symprfx\\2 \\2"
4167
1 by Masahito Omote
Import upstream version 0.3.9
4168
  # Write the raw and C identifiers.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4169
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4170
    # Fake it for dumpbin and say T for any non-static function
4171
    # and D for any global variable.
4172
    # Also find C++ and __fastcall symbols from MSVC++,
4173
    # which start with @ or ?.
4174
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4175
"     {last_section=section; section=\$ 3};"\
4176
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4177
"     \$ 0!~/External *\|/{next};"\
4178
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4179
"     {if(hide[section]) next};"\
4180
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4181
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4182
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4183
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4184
"     ' prfx=^$ac_symprfx]"
4185
  else
4186
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4187
  fi
1 by Masahito Omote
Import upstream version 0.3.9
4188
4189
  # Check to see that the pipe works correctly.
4190
  pipe_works=no
4191
4192
  rm -f conftest*
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4193
  cat > conftest.$ac_ext <<_LT_EOF
1 by Masahito Omote
Import upstream version 0.3.9
4194
#ifdef __cplusplus
4195
extern "C" {
4196
#endif
4197
char nm_test_var;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4198
void nm_test_func(void);
4199
void nm_test_func(void){}
1 by Masahito Omote
Import upstream version 0.3.9
4200
#ifdef __cplusplus
4201
}
4202
#endif
4203
int main(){nm_test_var='a';nm_test_func();return(0);}
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4204
_LT_EOF
1 by Masahito Omote
Import upstream version 0.3.9
4205
4206
  if AC_TRY_EVAL(ac_compile); then
4207
    # Now try to grab the symbols.
4208
    nlist=conftest.nm
4209
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4210
      # Try sorting and uniquifying the output.
4211
      if sort "$nlist" | uniq > "$nlist"T; then
4212
	mv -f "$nlist"T "$nlist"
4213
      else
4214
	rm -f "$nlist"T
4215
      fi
4216
4217
      # Make sure that we snagged all the symbols we need.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4218
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4219
	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4220
	  cat <<_LT_EOF > conftest.$ac_ext
1 by Masahito Omote
Import upstream version 0.3.9
4221
#ifdef __cplusplus
4222
extern "C" {
4223
#endif
4224
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4225
_LT_EOF
1 by Masahito Omote
Import upstream version 0.3.9
4226
	  # Now generate the symbol file.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4227
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4228
4229
	  cat <<_LT_EOF >> conftest.$ac_ext
4230
4231
/* The mapping between symbol names and symbols.  */
1 by Masahito Omote
Import upstream version 0.3.9
4232
const struct {
4233
  const char *name;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4234
  void       *address;
1 by Masahito Omote
Import upstream version 0.3.9
4235
}
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4236
lt__PROGRAM__LTX_preloaded_symbols[[]] =
1 by Masahito Omote
Import upstream version 0.3.9
4237
{
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4238
  { "@PROGRAM@", (void *) 0 },
4239
_LT_EOF
4240
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4241
	  cat <<\_LT_EOF >> conftest.$ac_ext
4242
  {0, (void *) 0}
1 by Masahito Omote
Import upstream version 0.3.9
4243
};
4244
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4245
/* This works around a problem in FreeBSD linker */
4246
#ifdef FREEBSD_WORKAROUND
4247
static const void *lt_preloaded_setup() {
4248
  return lt__PROGRAM__LTX_preloaded_symbols;
4249
}
4250
#endif
4251
1 by Masahito Omote
Import upstream version 0.3.9
4252
#ifdef __cplusplus
4253
}
4254
#endif
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4255
_LT_EOF
1 by Masahito Omote
Import upstream version 0.3.9
4256
	  # Now try linking the two files.
4257
	  mv conftest.$ac_objext conftstm.$ac_objext
4258
	  lt_save_LIBS="$LIBS"
4259
	  lt_save_CFLAGS="$CFLAGS"
4260
	  LIBS="conftstm.$ac_objext"
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4261
	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
1 by Masahito Omote
Import upstream version 0.3.9
4262
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4263
	    pipe_works=yes
4264
	  fi
4265
	  LIBS="$lt_save_LIBS"
4266
	  CFLAGS="$lt_save_CFLAGS"
4267
	else
4268
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4269
	fi
4270
      else
4271
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4272
      fi
4273
    else
4274
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4275
    fi
4276
  else
4277
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4278
    cat conftest.$ac_ext >&5
4279
  fi
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4280
  rm -rf conftest* conftst*
1 by Masahito Omote
Import upstream version 0.3.9
4281
4282
  # Do not use the global_symbol_pipe unless it works.
4283
  if test "$pipe_works" = yes; then
4284
    break
4285
  else
4286
    lt_cv_sys_global_symbol_pipe=
4287
  fi
4288
done
4289
])
4290
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4291
  lt_cv_sys_global_symbol_to_cdecl=
4292
fi
4293
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4294
  AC_MSG_RESULT(failed)
4295
else
4296
  AC_MSG_RESULT(ok)
4297
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4298
4299
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4300
    [Take the output of nm and produce a listing of raw symbols and C names])
4301
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4302
    [Transform the output of nm in a proper C declaration])
4303
_LT_DECL([global_symbol_to_c_name_address],
4304
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4305
    [Transform the output of nm in a C name address pair])
4306
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4307
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4308
    [Transform the output of nm in a C name address pair when lib prefix is needed])
4309
]) # _LT_CMD_GLOBAL_SYMBOLS
4310
4311
4312
# _LT_COMPILER_PIC([TAGNAME])
4313
# ---------------------------
4314
m4_defun([_LT_COMPILER_PIC],
4315
[m4_require([_LT_TAG_COMPILER])dnl
4316
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4317
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4318
_LT_TAGVAR(lt_prog_compiler_static, $1)=
1 by Masahito Omote
Import upstream version 0.3.9
4319
4320
AC_MSG_CHECKING([for $compiler option to produce PIC])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4321
m4_if([$1], [CXX], [
1 by Masahito Omote
Import upstream version 0.3.9
4322
  # C++ specific cases for pic, static, wl, etc.
4323
  if test "$GXX" = yes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4324
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4325
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
1 by Masahito Omote
Import upstream version 0.3.9
4326
4327
    case $host_os in
4328
    aix*)
4329
      # All AIX code is PIC.
4330
      if test "$host_cpu" = ia64; then
4331
	# AIX 5 now supports IA64 processor
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4332
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1 by Masahito Omote
Import upstream version 0.3.9
4333
      fi
4334
      ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4335
1 by Masahito Omote
Import upstream version 0.3.9
4336
    amigaos*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4337
      case $host_cpu in
4338
      powerpc)
4339
            # see comment about AmigaOS4 .so support
4340
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4341
        ;;
4342
      m68k)
4343
            # FIXME: we need at least 68020 code to build shared libraries, but
4344
            # adding the `-m68020' flag to GCC prevents building anything better,
4345
            # like `-m68040'.
4346
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4347
        ;;
4348
      esac
1 by Masahito Omote
Import upstream version 0.3.9
4349
      ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4350
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4351
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1 by Masahito Omote
Import upstream version 0.3.9
4352
      # PIC is the default for these OSes.
4353
      ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4354
    mingw* | cygwin* | os2* | pw32* | cegcc*)
1 by Masahito Omote
Import upstream version 0.3.9
4355
      # This hack is so that the source file can tell whether it is being
4356
      # built for inclusion in a dll (and should export symbols for example).
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4357
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4358
      # (--disable-auto-import) libraries
4359
      m4_if([$1], [GCJ], [],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4360
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
1 by Masahito Omote
Import upstream version 0.3.9
4361
      ;;
4362
    darwin* | rhapsody*)
4363
      # PIC is the default on this platform
4364
      # Common symbols not allowed in MH_DYLIB files
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4365
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
1 by Masahito Omote
Import upstream version 0.3.9
4366
      ;;
4367
    *djgpp*)
4368
      # DJGPP does not support shared libraries at all
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4369
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
1 by Masahito Omote
Import upstream version 0.3.9
4370
      ;;
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4371
    interix[[3-9]]*)
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
4372
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4373
      # Instead, we relocate shared libraries at runtime.
4374
      ;;
1 by Masahito Omote
Import upstream version 0.3.9
4375
    sysv4*MP*)
4376
      if test -d /usr/nec; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4377
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
1 by Masahito Omote
Import upstream version 0.3.9
4378
      fi
4379
      ;;
4380
    hpux*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4381
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4382
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4383
      # sets the default TLS model and affects inlining.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4384
      case $host_cpu in
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4385
      hppa*64*)
1 by Masahito Omote
Import upstream version 0.3.9
4386
	;;
4387
      *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4388
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
1 by Masahito Omote
Import upstream version 0.3.9
4389
	;;
4390
      esac
4391
      ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4392
    *qnx* | *nto*)
4393
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4394
      # it will coredump.
4395
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4396
      ;;
1 by Masahito Omote
Import upstream version 0.3.9
4397
    *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4398
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
1 by Masahito Omote
Import upstream version 0.3.9
4399
      ;;
4400
    esac
4401
  else
4402
    case $host_os in
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4403
      aix[[4-9]]*)
1 by Masahito Omote
Import upstream version 0.3.9
4404
	# All AIX code is PIC.
4405
	if test "$host_cpu" = ia64; then
4406
	  # AIX 5 now supports IA64 processor
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4407
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1 by Masahito Omote
Import upstream version 0.3.9
4408
	else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4409
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
1 by Masahito Omote
Import upstream version 0.3.9
4410
	fi
4411
	;;
4412
      chorus*)
4413
	case $cc_basename in
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4414
	cxch68*)
1 by Masahito Omote
Import upstream version 0.3.9
4415
	  # Green Hills C++ Compiler
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4416
	  # _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"
1 by Masahito Omote
Import upstream version 0.3.9
4417
	  ;;
4418
	esac
4419
	;;
4420
      dgux*)
4421
	case $cc_basename in
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4422
	  ec++*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4423
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
1 by Masahito Omote
Import upstream version 0.3.9
4424
	    ;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4425
	  ghcx*)
1 by Masahito Omote
Import upstream version 0.3.9
4426
	    # Green Hills C++ Compiler
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4427
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
1 by Masahito Omote
Import upstream version 0.3.9
4428
	    ;;
4429
	  *)
4430
	    ;;
4431
	esac
4432
	;;
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4433
      freebsd* | dragonfly*)
1 by Masahito Omote
Import upstream version 0.3.9
4434
	# FreeBSD uses GNU C++
4435
	;;
4436
      hpux9* | hpux10* | hpux11*)
4437
	case $cc_basename in
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4438
	  CC*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4439
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4440
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
1 by Masahito Omote
Import upstream version 0.3.9
4441
	    if test "$host_cpu" != ia64; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4442
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
1 by Masahito Omote
Import upstream version 0.3.9
4443
	    fi
4444
	    ;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4445
	  aCC*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4446
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4447
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4448
	    case $host_cpu in
1 by Masahito Omote
Import upstream version 0.3.9
4449
	    hppa*64*|ia64*)
4450
	      # +Z the default
4451
	      ;;
4452
	    *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4453
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
1 by Masahito Omote
Import upstream version 0.3.9
4454
	      ;;
4455
	    esac
4456
	    ;;
4457
	  *)
4458
	    ;;
4459
	esac
4460
	;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
4461
      interix*)
4462
	# This is c89, which is MS Visual C++ (no shared libs)
4463
	# Anyone wants to do a port?
4464
	;;
1 by Masahito Omote
Import upstream version 0.3.9
4465
      irix5* | irix6* | nonstopux*)
4466
	case $cc_basename in
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4467
	  CC*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4468
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4469
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1 by Masahito Omote
Import upstream version 0.3.9
4470
	    # CC pic flag -KPIC is the default.
4471
	    ;;
4472
	  *)
4473
	    ;;
4474
	esac
4475
	;;
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4476
      linux* | k*bsd*-gnu)
1 by Masahito Omote
Import upstream version 0.3.9
4477
	case $cc_basename in
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4478
	  KCC*)
1 by Masahito Omote
Import upstream version 0.3.9
4479
	    # KAI C++ Compiler
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4480
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4481
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4482
	    ;;
4483
	  ecpc* )
4484
	    # old Intel C++ for x86_64 which still supported -KPIC.
4485
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4486
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4487
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4488
	    ;;
4489
	  icpc* )
4490
	    # Intel C++, used to be incompatible with GCC.
4491
	    # ICC 10 doesn't accept -KPIC any more.
4492
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4493
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4494
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
1 by Masahito Omote
Import upstream version 0.3.9
4495
	    ;;
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4496
	  pgCC* | pgcpp*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4497
	    # Portland Group C++ compiler
4498
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4499
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4500
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4501
	    ;;
4502
	  cxx*)
1 by Masahito Omote
Import upstream version 0.3.9
4503
	    # Compaq C++
4504
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4505
	    # Linux and Compaq Tru64 Unix objects are PIC.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4506
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4507
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4508
	    ;;
4509
	  xlc* | xlC*)
4510
	    # IBM XL 8.0 on PPC
4511
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4512
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4513
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
1 by Masahito Omote
Import upstream version 0.3.9
4514
	    ;;
4515
	  *)
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4516
	    case `$CC -V 2>&1 | sed 5q` in
4517
	    *Sun\ C*)
4518
	      # Sun C++ 5.9
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4519
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4520
	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4521
	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4522
	      ;;
4523
	    esac
1 by Masahito Omote
Import upstream version 0.3.9
4524
	    ;;
4525
	esac
4526
	;;
4527
      lynxos*)
4528
	;;
4529
      m88k*)
4530
	;;
4531
      mvs*)
4532
	case $cc_basename in
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4533
	  cxx*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4534
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
1 by Masahito Omote
Import upstream version 0.3.9
4535
	    ;;
4536
	  *)
4537
	    ;;
4538
	esac
4539
	;;
1.1.9 by Masahito Omote
Import upstream version 1.5.3
4540
      netbsd*)
1 by Masahito Omote
Import upstream version 0.3.9
4541
	;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4542
      *qnx* | *nto*)
4543
        # QNX uses GNU C++, but need to define -shared option too, otherwise
4544
        # it will coredump.
4545
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4546
        ;;
1 by Masahito Omote
Import upstream version 0.3.9
4547
      osf3* | osf4* | osf5*)
4548
	case $cc_basename in
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4549
	  KCC*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4550
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
1 by Masahito Omote
Import upstream version 0.3.9
4551
	    ;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4552
	  RCC*)
1 by Masahito Omote
Import upstream version 0.3.9
4553
	    # Rational C++ 2.4.1
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4554
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
1 by Masahito Omote
Import upstream version 0.3.9
4555
	    ;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4556
	  cxx*)
1 by Masahito Omote
Import upstream version 0.3.9
4557
	    # Digital/Compaq C++
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4558
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1 by Masahito Omote
Import upstream version 0.3.9
4559
	    # Make sure the PIC flag is empty.  It appears that all Alpha
4560
	    # Linux and Compaq Tru64 Unix objects are PIC.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4561
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4562
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1 by Masahito Omote
Import upstream version 0.3.9
4563
	    ;;
4564
	  *)
4565
	    ;;
4566
	esac
4567
	;;
4568
      psos*)
4569
	;;
4570
      solaris*)
4571
	case $cc_basename in
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4572
	  CC*)
1 by Masahito Omote
Import upstream version 0.3.9
4573
	    # Sun C++ 4.2, 5.x and Centerline C++
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4574
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4575
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4576
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
1 by Masahito Omote
Import upstream version 0.3.9
4577
	    ;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4578
	  gcx*)
1 by Masahito Omote
Import upstream version 0.3.9
4579
	    # Green Hills C++ Compiler
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4580
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
1 by Masahito Omote
Import upstream version 0.3.9
4581
	    ;;
4582
	  *)
4583
	    ;;
4584
	esac
4585
	;;
4586
      sunos4*)
4587
	case $cc_basename in
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4588
	  CC*)
1 by Masahito Omote
Import upstream version 0.3.9
4589
	    # Sun C++ 4.x
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4590
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4591
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1 by Masahito Omote
Import upstream version 0.3.9
4592
	    ;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4593
	  lcc*)
1 by Masahito Omote
Import upstream version 0.3.9
4594
	    # Lucid
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4595
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
1 by Masahito Omote
Import upstream version 0.3.9
4596
	    ;;
4597
	  *)
4598
	    ;;
4599
	esac
4600
	;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4601
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4602
	case $cc_basename in
4603
	  CC*)
4604
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4605
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4606
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4607
	    ;;
4608
	esac
4609
	;;
1 by Masahito Omote
Import upstream version 0.3.9
4610
      tandem*)
4611
	case $cc_basename in
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4612
	  NCC*)
1 by Masahito Omote
Import upstream version 0.3.9
4613
	    # NonStop-UX NCC 3.20
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4614
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
1 by Masahito Omote
Import upstream version 0.3.9
4615
	    ;;
4616
	  *)
4617
	    ;;
4618
	esac
4619
	;;
4620
      vxworks*)
4621
	;;
4622
      *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4623
	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
4624
	;;
4625
    esac
4626
  fi
4627
],
4628
[
4629
  if test "$GCC" = yes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4630
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4631
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
1 by Masahito Omote
Import upstream version 0.3.9
4632
4633
    case $host_os in
4634
      aix*)
4635
      # All AIX code is PIC.
4636
      if test "$host_cpu" = ia64; then
4637
	# AIX 5 now supports IA64 processor
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4638
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1 by Masahito Omote
Import upstream version 0.3.9
4639
      fi
4640
      ;;
4641
4642
    amigaos*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4643
      case $host_cpu in
4644
      powerpc)
4645
            # see comment about AmigaOS4 .so support
4646
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4647
        ;;
4648
      m68k)
4649
            # FIXME: we need at least 68020 code to build shared libraries, but
4650
            # adding the `-m68020' flag to GCC prevents building anything better,
4651
            # like `-m68040'.
4652
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4653
        ;;
4654
      esac
1 by Masahito Omote
Import upstream version 0.3.9
4655
      ;;
4656
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4657
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1 by Masahito Omote
Import upstream version 0.3.9
4658
      # PIC is the default for these OSes.
4659
      ;;
4660
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4661
    mingw* | cygwin* | pw32* | os2* | cegcc*)
1 by Masahito Omote
Import upstream version 0.3.9
4662
      # This hack is so that the source file can tell whether it is being
4663
      # built for inclusion in a dll (and should export symbols for example).
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4664
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4665
      # (--disable-auto-import) libraries
4666
      m4_if([$1], [GCJ], [],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4667
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
1 by Masahito Omote
Import upstream version 0.3.9
4668
      ;;
4669
4670
    darwin* | rhapsody*)
4671
      # PIC is the default on this platform
4672
      # Common symbols not allowed in MH_DYLIB files
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4673
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4674
      ;;
4675
4676
    hpux*)
4677
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4678
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4679
      # sets the default TLS model and affects inlining.
4680
      case $host_cpu in
4681
      hppa*64*)
4682
	# +Z the default
4683
	;;
4684
      *)
4685
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4686
	;;
4687
      esac
1 by Masahito Omote
Import upstream version 0.3.9
4688
      ;;
4689
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4690
    interix[[3-9]]*)
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
4691
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4692
      # Instead, we relocate shared libraries at runtime.
4693
      ;;
4694
1 by Masahito Omote
Import upstream version 0.3.9
4695
    msdosdjgpp*)
4696
      # Just because we use GCC doesn't mean we suddenly get shared libraries
4697
      # on systems that don't support them.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4698
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
4699
      enable_shared=no
4700
      ;;
4701
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4702
    *nto* | *qnx*)
4703
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4704
      # it will coredump.
4705
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4706
      ;;
4707
1 by Masahito Omote
Import upstream version 0.3.9
4708
    sysv4*MP*)
4709
      if test -d /usr/nec; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4710
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
1 by Masahito Omote
Import upstream version 0.3.9
4711
      fi
4712
      ;;
4713
4714
    *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4715
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
1 by Masahito Omote
Import upstream version 0.3.9
4716
      ;;
4717
    esac
4718
  else
4719
    # PORTME Check for flag to pass linker flags through the system compiler.
4720
    case $host_os in
4721
    aix*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4722
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1 by Masahito Omote
Import upstream version 0.3.9
4723
      if test "$host_cpu" = ia64; then
4724
	# AIX 5 now supports IA64 processor
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4725
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1 by Masahito Omote
Import upstream version 0.3.9
4726
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4727
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
1 by Masahito Omote
Import upstream version 0.3.9
4728
      fi
4729
      ;;
4730
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4731
    mingw* | cygwin* | pw32* | os2* | cegcc*)
1 by Masahito Omote
Import upstream version 0.3.9
4732
      # This hack is so that the source file can tell whether it is being
4733
      # built for inclusion in a dll (and should export symbols for example).
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4734
      m4_if([$1], [GCJ], [],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4735
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
1 by Masahito Omote
Import upstream version 0.3.9
4736
      ;;
4737
4738
    hpux9* | hpux10* | hpux11*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4739
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1 by Masahito Omote
Import upstream version 0.3.9
4740
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4741
      # not for PA HP-UX.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4742
      case $host_cpu in
1 by Masahito Omote
Import upstream version 0.3.9
4743
      hppa*64*|ia64*)
4744
	# +Z the default
4745
	;;
4746
      *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4747
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
1 by Masahito Omote
Import upstream version 0.3.9
4748
	;;
4749
      esac
4750
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4751
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
1 by Masahito Omote
Import upstream version 0.3.9
4752
      ;;
4753
4754
    irix5* | irix6* | nonstopux*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4755
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1 by Masahito Omote
Import upstream version 0.3.9
4756
      # PIC (with -KPIC) is the default.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4757
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1 by Masahito Omote
Import upstream version 0.3.9
4758
      ;;
4759
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4760
    linux* | k*bsd*-gnu)
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4761
      case $cc_basename in
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4762
      # old Intel for x86_64 which still supported -KPIC.
4763
      ecc*)
4764
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4765
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4766
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4767
        ;;
4768
      # icc used to be incompatible with GCC.
4769
      # ICC 10 doesn't accept -KPIC any more.
4770
      icc* | ifort*)
4771
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4772
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4773
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4774
        ;;
4775
      # Lahey Fortran 8.1.
4776
      lf95*)
4777
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4778
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4779
	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4780
	;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4781
      pgcc* | pgf77* | pgf90* | pgf95*)
4782
        # Portland Group compilers (*not* the Pentium gcc compiler,
4783
	# which looks to be a dead project)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4784
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4785
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4786
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4787
        ;;
1 by Masahito Omote
Import upstream version 0.3.9
4788
      ccc*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4789
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1 by Masahito Omote
Import upstream version 0.3.9
4790
        # All Alpha code is PIC.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4791
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1 by Masahito Omote
Import upstream version 0.3.9
4792
        ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4793
      xl*)
4794
	# IBM XL C 8.0/Fortran 10.1 on PPC
4795
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4796
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4797
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4798
	;;
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4799
      *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4800
	case `$CC -V 2>&1 | sed 5q` in
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4801
	*Sun\ C*)
4802
	  # Sun C 5.9
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4803
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4804
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4805
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4806
	  ;;
4807
	*Sun\ F*)
4808
	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4809
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4810
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4811
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4812
	  ;;
4813
	esac
4814
	;;
1 by Masahito Omote
Import upstream version 0.3.9
4815
      esac
4816
      ;;
4817
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4818
    newsos6)
4819
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4820
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4821
      ;;
4822
4823
    *nto* | *qnx*)
4824
      # QNX uses GNU C++, but need to define -shared option too, otherwise
4825
      # it will coredump.
4826
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4827
      ;;
4828
1 by Masahito Omote
Import upstream version 0.3.9
4829
    osf3* | osf4* | osf5*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4830
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
1 by Masahito Omote
Import upstream version 0.3.9
4831
      # All OSF/1 code is PIC.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4832
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1 by Masahito Omote
Import upstream version 0.3.9
4833
      ;;
4834
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4835
    rdos*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4836
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4837
      ;;
4838
1 by Masahito Omote
Import upstream version 0.3.9
4839
    solaris*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4840
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4841
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4842
      case $cc_basename in
4843
      f77* | f90* | f95*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4844
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4845
      *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4846
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4847
      esac
1 by Masahito Omote
Import upstream version 0.3.9
4848
      ;;
4849
4850
    sunos4*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4851
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4852
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4853
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1 by Masahito Omote
Import upstream version 0.3.9
4854
      ;;
4855
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
4856
    sysv4 | sysv4.2uw2* | sysv4.3*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4857
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4858
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4859
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1 by Masahito Omote
Import upstream version 0.3.9
4860
      ;;
4861
4862
    sysv4*MP*)
4863
      if test -d /usr/nec ;then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4864
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4865
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1 by Masahito Omote
Import upstream version 0.3.9
4866
      fi
4867
      ;;
4868
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
4869
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4870
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4871
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4872
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
4873
      ;;
4874
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4875
    unicos*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4876
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4877
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
1.1.3 by Masahito Omote
Import upstream version 1.0.0
4878
      ;;
4879
1 by Masahito Omote
Import upstream version 0.3.9
4880
    uts4*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4881
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4882
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
1 by Masahito Omote
Import upstream version 0.3.9
4883
      ;;
4884
4885
    *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4886
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
4887
      ;;
4888
    esac
4889
  fi
4890
])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4891
case $host_os in
4892
  # For platforms which do not support PIC, -DPIC is meaningless:
4893
  *djgpp*)
4894
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4895
    ;;
4896
  *)
4897
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4898
    ;;
4899
esac
4900
AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4901
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4902
	[How to pass a linker flag through the compiler])
1 by Masahito Omote
Import upstream version 0.3.9
4903
4904
#
4905
# Check to make sure the PIC flag actually works.
4906
#
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4907
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4908
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4909
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4910
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4911
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
1 by Masahito Omote
Import upstream version 0.3.9
4912
     "" | " "*) ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4913
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
1 by Masahito Omote
Import upstream version 0.3.9
4914
     esac],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4915
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4916
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
1 by Masahito Omote
Import upstream version 0.3.9
4917
fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4918
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4919
	[Additional compiler flags for building library objects])
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
4920
4921
#
4922
# Check to make sure the static flag actually works.
4923
#
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4924
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4925
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4926
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
4927
  $lt_tmp_static_flag,
4928
  [],
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4929
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4930
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4931
	[Compiler flag to prevent dynamic linking])
4932
])# _LT_COMPILER_PIC
4933
4934
4935
# _LT_LINKER_SHLIBS([TAGNAME])
4936
# ----------------------------
1 by Masahito Omote
Import upstream version 0.3.9
4937
# See if the linker supports building shared libraries.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4938
m4_defun([_LT_LINKER_SHLIBS],
4939
[AC_REQUIRE([LT_PATH_LD])dnl
4940
AC_REQUIRE([LT_PATH_NM])dnl
4941
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4942
m4_require([_LT_DECL_EGREP])dnl
4943
m4_require([_LT_DECL_SED])dnl
4944
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4945
m4_require([_LT_TAG_COMPILER])dnl
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4946
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4947
m4_if([$1], [CXX], [
4948
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
1 by Masahito Omote
Import upstream version 0.3.9
4949
  case $host_os in
1.1.7 by Masahito Omote
Import upstream version 1.4.2
4950
  aix[[4-9]]*)
1 by Masahito Omote
Import upstream version 0.3.9
4951
    # If we're using GNU nm, then we don't want the "-C" option.
4952
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4953
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4954
      _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'
1 by Masahito Omote
Import upstream version 0.3.9
4955
    else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4956
      _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'
1 by Masahito Omote
Import upstream version 0.3.9
4957
    fi
4958
    ;;
4959
  pw32*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4960
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
1 by Masahito Omote
Import upstream version 0.3.9
4961
  ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4962
  cygwin* | mingw* | cegcc*)
4963
    _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'
1 by Masahito Omote
Import upstream version 0.3.9
4964
  ;;
4965
  *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4966
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
1 by Masahito Omote
Import upstream version 0.3.9
4967
  ;;
4968
  esac
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4969
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4970
], [
1 by Masahito Omote
Import upstream version 0.3.9
4971
  runpath_var=
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4972
  _LT_TAGVAR(allow_undefined_flag, $1)=
4973
  _LT_TAGVAR(always_export_symbols, $1)=no
4974
  _LT_TAGVAR(archive_cmds, $1)=
4975
  _LT_TAGVAR(archive_expsym_cmds, $1)=
4976
  _LT_TAGVAR(compiler_needs_object, $1)=no
4977
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4978
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4979
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4980
  _LT_TAGVAR(hardcode_automatic, $1)=no
4981
  _LT_TAGVAR(hardcode_direct, $1)=no
4982
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4983
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4984
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4985
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4986
  _LT_TAGVAR(hardcode_minus_L, $1)=no
4987
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4988
  _LT_TAGVAR(inherit_rpath, $1)=no
4989
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4990
  _LT_TAGVAR(module_cmds, $1)=
4991
  _LT_TAGVAR(module_expsym_cmds, $1)=
4992
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4993
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4994
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4995
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
1 by Masahito Omote
Import upstream version 0.3.9
4996
  # include_expsyms should be a list of space-separated symbols to be *always*
4997
  # included in the symbol list
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
4998
  _LT_TAGVAR(include_expsyms, $1)=
1 by Masahito Omote
Import upstream version 0.3.9
4999
  # exclude_expsyms can be an extended regexp of symbols to exclude
5000
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5001
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5002
  # as well as any symbol that contains `d'.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5003
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
1 by Masahito Omote
Import upstream version 0.3.9
5004
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5005
  # platforms (ab)use it in PIC code, but their linkers get confused if
5006
  # the symbol is explicitly referenced.  Since portable code cannot
5007
  # rely on this symbol name, it's probably fine to never include it in
5008
  # preloaded symbol tables.
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5009
  # Exclude shared library initialization/finalization symbols.
5010
dnl Note also adjust exclude_expsyms for C++ above.
1 by Masahito Omote
Import upstream version 0.3.9
5011
  extract_expsyms_cmds=
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5012
1 by Masahito Omote
Import upstream version 0.3.9
5013
  case $host_os in
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5014
  cygwin* | mingw* | pw32* | cegcc*)
1 by Masahito Omote
Import upstream version 0.3.9
5015
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5016
    # When not using gcc, we currently assume that we are using
5017
    # Microsoft Visual C++.
5018
    if test "$GCC" != yes; then
5019
      with_gnu_ld=no
5020
    fi
5021
    ;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5022
  interix*)
5023
    # we just hope/assume this is gcc and not c89 (= MSVC++)
5024
    with_gnu_ld=yes
5025
    ;;
1 by Masahito Omote
Import upstream version 0.3.9
5026
  openbsd*)
5027
    with_gnu_ld=no
5028
    ;;
5029
  esac
5030
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5031
  _LT_TAGVAR(ld_shlibs, $1)=yes
1 by Masahito Omote
Import upstream version 0.3.9
5032
  if test "$with_gnu_ld" = yes; then
5033
    # If archive_cmds runs LD, not CC, wlarc should be empty
5034
    wlarc='${wl}'
5035
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5036
    # Set some defaults for GNU ld with shared library support. These
5037
    # are reset later if shared libraries are not supported. Putting them
5038
    # here allows them to be overridden if necessary.
5039
    runpath_var=LD_RUN_PATH
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5040
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5041
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5042
    # ancient GNU ld didn't support --whole-archive et. al.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5043
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5044
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5045
    else
5046
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5047
    fi
5048
    supports_anon_versioning=no
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5049
    case `$LD -v 2>&1` in
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5050
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5051
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5052
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5053
      *\ 2.11.*) ;; # other 2.11 versions
5054
      *) supports_anon_versioning=yes ;;
5055
    esac
5056
1 by Masahito Omote
Import upstream version 0.3.9
5057
    # See if GNU ld supports shared libraries.
5058
    case $host_os in
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5059
    aix[[3-9]]*)
1 by Masahito Omote
Import upstream version 0.3.9
5060
      # On AIX/PPC, the GNU linker is very broken
5061
      if test "$host_cpu" != ia64; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5062
	_LT_TAGVAR(ld_shlibs, $1)=no
5063
	cat <<_LT_EOF 1>&2
1 by Masahito Omote
Import upstream version 0.3.9
5064
5065
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5066
*** to be unable to reliably create shared libraries on AIX.
5067
*** Therefore, libtool is disabling shared libraries support.  If you
5068
*** really care for shared libraries, you may want to modify your PATH
5069
*** so that a non-GNU linker is found, and then restart.
5070
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5071
_LT_EOF
1 by Masahito Omote
Import upstream version 0.3.9
5072
      fi
5073
      ;;
5074
5075
    amigaos*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5076
      case $host_cpu in
5077
      powerpc)
5078
            # see comment about AmigaOS4 .so support
5079
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5080
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5081
        ;;
5082
      m68k)
5083
            _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)'
5084
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5085
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5086
        ;;
5087
      esac
1 by Masahito Omote
Import upstream version 0.3.9
5088
      ;;
5089
5090
    beos*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5091
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5092
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
1 by Masahito Omote
Import upstream version 0.3.9
5093
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5094
	# support --undefined.  This deserves some investigation.  FIXME
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5095
	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1 by Masahito Omote
Import upstream version 0.3.9
5096
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5097
	_LT_TAGVAR(ld_shlibs, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5098
      fi
5099
      ;;
5100
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5101
    cygwin* | mingw* | pw32* | cegcc*)
5102
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
1 by Masahito Omote
Import upstream version 0.3.9
5103
      # as there is no search path for DLLs.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5104
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5105
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5106
      _LT_TAGVAR(always_export_symbols, $1)=no
5107
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5108
      _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'
1 by Masahito Omote
Import upstream version 0.3.9
5109
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5110
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5111
        _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'
1 by Masahito Omote
Import upstream version 0.3.9
5112
	# If the export-symbols file already is a .def file (1st line
5113
	# is EXPORTS), use it as is; otherwise, prepend...
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5114
	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
1 by Masahito Omote
Import upstream version 0.3.9
5115
	  cp $export_symbols $output_objdir/$soname.def;
5116
	else
5117
	  echo EXPORTS > $output_objdir/$soname.def;
5118
	  cat $export_symbols >> $output_objdir/$soname.def;
5119
	fi~
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5120
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1 by Masahito Omote
Import upstream version 0.3.9
5121
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5122
	_LT_TAGVAR(ld_shlibs, $1)=no
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5123
      fi
5124
      ;;
5125
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5126
    interix[[3-9]]*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5127
      _LT_TAGVAR(hardcode_direct, $1)=no
5128
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5129
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5130
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5131
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5132
      # Instead, shared libraries are loaded at an image base (0x10000000 by
5133
      # default) and relocated if they conflict, which is a slow very memory
5134
      # consuming and fragmenting process.  To avoid this, we pick a random,
5135
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5136
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5137
      _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'
5138
      _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'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5139
      ;;
5140
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5141
    gnu* | linux* | tpf* | k*bsd*-gnu)
5142
      tmp_diet=no
5143
      if test "$host_os" = linux-dietlibc; then
5144
	case $cc_basename in
5145
	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5146
	esac
5147
      fi
5148
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5149
	 && test "$tmp_diet" = no
5150
      then
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5151
	tmp_addflag=
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5152
	tmp_sharedflag='-shared'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5153
	case $cc_basename,$host_cpu in
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5154
        pgcc*)				# Portland Group C compiler
5155
	  _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'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5156
	  tmp_addflag=' $pic_flag'
5157
	  ;;
5158
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5159
	  _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'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5160
	  tmp_addflag=' $pic_flag -Mnomain' ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5161
	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5162
	  tmp_addflag=' -i_dynamic' ;;
5163
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5164
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5165
	ifc* | ifort*)			# Intel Fortran compiler
5166
	  tmp_addflag=' -nofor_main' ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5167
	lf95*)				# Lahey Fortran 8.1
5168
	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5169
	  tmp_sharedflag='--shared' ;;
5170
	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
5171
	  tmp_sharedflag='-qmkshrobj'
5172
	  tmp_addflag= ;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5173
	esac
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5174
	case `$CC -V 2>&1 | sed 5q` in
5175
	*Sun\ C*)			# Sun C 5.9
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5176
	  _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'
5177
	  _LT_TAGVAR(compiler_needs_object, $1)=yes
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5178
	  tmp_sharedflag='-G' ;;
5179
	*Sun\ F*)			# Sun Fortran 8.3
5180
	  tmp_sharedflag='-G' ;;
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5181
	esac
5182
	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5183
5184
        if test "x$supports_anon_versioning" = xyes; then
5185
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5186
	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5187
	    echo "local: *; };" >> $output_objdir/$libname.ver~
5188
	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5189
        fi
5190
5191
	case $cc_basename in
5192
	xlf*)
5193
	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5194
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5195
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5196
	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5197
	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5198
	  if test "x$supports_anon_versioning" = xyes; then
5199
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5200
	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5201
	      echo "local: *; };" >> $output_objdir/$libname.ver~
5202
	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5203
	  fi
5204
	  ;;
5205
	esac
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5206
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5207
        _LT_TAGVAR(ld_shlibs, $1)=no
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5208
      fi
5209
      ;;
5210
1.1.9 by Masahito Omote
Import upstream version 1.5.3
5211
    netbsd*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5212
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5213
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1 by Masahito Omote
Import upstream version 0.3.9
5214
	wlarc=
5215
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5216
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5217
	_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'
1 by Masahito Omote
Import upstream version 0.3.9
5218
      fi
5219
      ;;
5220
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5221
    solaris*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5222
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5223
	_LT_TAGVAR(ld_shlibs, $1)=no
5224
	cat <<_LT_EOF 1>&2
1 by Masahito Omote
Import upstream version 0.3.9
5225
5226
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5227
*** create shared libraries on Solaris systems.  Therefore, libtool
5228
*** is disabling shared libraries support.  We urge you to upgrade GNU
5229
*** binutils to release 2.9.1 or newer.  Another option is to modify
5230
*** your PATH or compiler configuration so that the native linker is
5231
*** used, and then restart.
5232
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5233
_LT_EOF
5234
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5235
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5236
	_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'
1 by Masahito Omote
Import upstream version 0.3.9
5237
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5238
	_LT_TAGVAR(ld_shlibs, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5239
      fi
5240
      ;;
5241
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5242
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5243
      case `$LD -v 2>&1` in
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5244
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5245
	_LT_TAGVAR(ld_shlibs, $1)=no
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5246
	cat <<_LT_EOF 1>&2
5247
5248
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5249
*** reliably create shared libraries on SCO systems.  Therefore, libtool
5250
*** is disabling shared libraries support.  We urge you to upgrade GNU
5251
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5252
*** your PATH or compiler configuration so that the native linker is
5253
*** used, and then restart.
5254
5255
_LT_EOF
5256
	;;
5257
	*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5258
	  # For security reasons, it is highly recommended that you always
5259
	  # use absolute paths for naming shared libraries, and exclude the
5260
	  # DT_RUNPATH tag from executables and libraries.  But doing so
5261
	  # requires that you compile everything twice, which is a pain.
5262
	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5263
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5264
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5265
	    _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'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5266
	  else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5267
	    _LT_TAGVAR(ld_shlibs, $1)=no
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5268
	  fi
5269
	;;
5270
      esac
5271
      ;;
5272
1 by Masahito Omote
Import upstream version 0.3.9
5273
    sunos4*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5274
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1 by Masahito Omote
Import upstream version 0.3.9
5275
      wlarc=
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5276
      _LT_TAGVAR(hardcode_direct, $1)=yes
5277
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5278
      ;;
5279
5280
    *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5281
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5282
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5283
	_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'
1 by Masahito Omote
Import upstream version 0.3.9
5284
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5285
	_LT_TAGVAR(ld_shlibs, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5286
      fi
5287
      ;;
5288
    esac
5289
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5290
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5291
      runpath_var=
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5292
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5293
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5294
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
1 by Masahito Omote
Import upstream version 0.3.9
5295
    fi
5296
  else
5297
    # PORTME fill in a description of your system's linker (not GNU ld)
5298
    case $host_os in
5299
    aix3*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5300
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5301
      _LT_TAGVAR(always_export_symbols, $1)=yes
5302
      _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'
1 by Masahito Omote
Import upstream version 0.3.9
5303
      # Note: this linker hardcodes the directories in LIBPATH if there
5304
      # are no directories specified by -L.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5305
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5306
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
1 by Masahito Omote
Import upstream version 0.3.9
5307
	# Neither direct hardcoding nor static linking is supported with a
5308
	# broken collect2.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5309
	_LT_TAGVAR(hardcode_direct, $1)=unsupported
1 by Masahito Omote
Import upstream version 0.3.9
5310
      fi
5311
      ;;
5312
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5313
    aix[[4-9]]*)
1 by Masahito Omote
Import upstream version 0.3.9
5314
      if test "$host_cpu" = ia64; then
5315
	# On IA64, the linker does run time linking by default, so we don't
5316
	# have to do anything special.
5317
	aix_use_runtimelinking=no
5318
	exp_sym_flag='-Bexport'
5319
	no_entry_flag=""
5320
      else
5321
	# If we're using GNU nm, then we don't want the "-C" option.
5322
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5323
	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5324
	  _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'
1 by Masahito Omote
Import upstream version 0.3.9
5325
	else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5326
	  _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'
1 by Masahito Omote
Import upstream version 0.3.9
5327
	fi
5328
	aix_use_runtimelinking=no
5329
5330
	# Test if we are trying to use run time linking or normal
5331
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5332
	# need to do runtime linking.
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5333
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
1 by Masahito Omote
Import upstream version 0.3.9
5334
	  for ld_flag in $LDFLAGS; do
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5335
	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5336
	    aix_use_runtimelinking=yes
5337
	    break
5338
	  fi
1 by Masahito Omote
Import upstream version 0.3.9
5339
	  done
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5340
	  ;;
1 by Masahito Omote
Import upstream version 0.3.9
5341
	esac
5342
5343
	exp_sym_flag='-bexport'
5344
	no_entry_flag='-bnoentry'
5345
      fi
5346
5347
      # When large executables or shared objects are built, AIX ld can
5348
      # have problems creating the table of contents.  If linking a library
5349
      # or program results in "error TOC overflow" add -mminimal-toc to
5350
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5351
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5352
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5353
      _LT_TAGVAR(archive_cmds, $1)=''
5354
      _LT_TAGVAR(hardcode_direct, $1)=yes
5355
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5356
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5357
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5358
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
1 by Masahito Omote
Import upstream version 0.3.9
5359
5360
      if test "$GCC" = yes; then
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5361
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
1 by Masahito Omote
Import upstream version 0.3.9
5362
	# We only want to do this on AIX 4.2 and lower, the check
5363
	# below for broken collect2 doesn't work under 4.3+
5364
	  collect2name=`${CC} -print-prog-name=collect2`
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5365
	  if test -f "$collect2name" &&
5366
	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
1 by Masahito Omote
Import upstream version 0.3.9
5367
	  then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5368
	  # We have reworked collect2
5369
	  :
1 by Masahito Omote
Import upstream version 0.3.9
5370
	  else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5371
	  # We have old collect2
5372
	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5373
	  # It fails to find uninstalled libraries when the uninstalled
5374
	  # path is not listed in the libpath.  Setting hardcode_minus_L
5375
	  # to unsupported forces relinking
5376
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5377
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5378
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
1 by Masahito Omote
Import upstream version 0.3.9
5379
	  fi
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5380
	  ;;
1 by Masahito Omote
Import upstream version 0.3.9
5381
	esac
5382
	shared_flag='-shared'
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5383
	if test "$aix_use_runtimelinking" = yes; then
5384
	  shared_flag="$shared_flag "'${wl}-G'
5385
	fi
1 by Masahito Omote
Import upstream version 0.3.9
5386
      else
5387
	# not using gcc
5388
	if test "$host_cpu" = ia64; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5389
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5390
	# chokes on -Wl,-G. The following line is correct:
1 by Masahito Omote
Import upstream version 0.3.9
5391
	  shared_flag='-G'
5392
	else
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5393
	  if test "$aix_use_runtimelinking" = yes; then
1 by Masahito Omote
Import upstream version 0.3.9
5394
	    shared_flag='${wl}-G'
5395
	  else
5396
	    shared_flag='${wl}-bM:SRE'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5397
	  fi
1 by Masahito Omote
Import upstream version 0.3.9
5398
	fi
5399
      fi
5400
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5401
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
1 by Masahito Omote
Import upstream version 0.3.9
5402
      # It seems that -bexpall does not export symbols beginning with
5403
      # underscore (_), so it is better to generate a list of symbols to export.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5404
      _LT_TAGVAR(always_export_symbols, $1)=yes
1 by Masahito Omote
Import upstream version 0.3.9
5405
      if test "$aix_use_runtimelinking" = yes; then
5406
	# Warning - without using the other runtime loading flags (-brtl),
5407
	# -berok will link without error, but may produce a broken library.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5408
	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5409
        # Determine the default libpath from the value encoded in an
5410
        # empty executable.
5411
        _LT_SYS_MODULE_PATH_AIX
5412
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5413
        _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"
5414
      else
1 by Masahito Omote
Import upstream version 0.3.9
5415
	if test "$host_cpu" = ia64; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5416
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5417
	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5418
	  _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"
1 by Masahito Omote
Import upstream version 0.3.9
5419
	else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5420
	 # Determine the default libpath from the value encoded in an
5421
	 # empty executable.
5422
	 _LT_SYS_MODULE_PATH_AIX
5423
	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
1 by Masahito Omote
Import upstream version 0.3.9
5424
	  # Warning - without using the other run time loading flags,
5425
	  # -berok will link without error, but may produce a broken library.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5426
	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5427
	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
1 by Masahito Omote
Import upstream version 0.3.9
5428
	  # Exported symbols can be pulled into shared objects from archives
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5429
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5430
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5431
	  # This is similar to how AIX traditionally builds its shared libraries.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5432
	  _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'
1 by Masahito Omote
Import upstream version 0.3.9
5433
	fi
5434
      fi
5435
      ;;
5436
5437
    amigaos*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5438
      case $host_cpu in
5439
      powerpc)
5440
            # see comment about AmigaOS4 .so support
5441
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5442
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5443
        ;;
5444
      m68k)
5445
            _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)'
5446
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5447
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5448
        ;;
5449
      esac
1 by Masahito Omote
Import upstream version 0.3.9
5450
      ;;
5451
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5452
    bsdi[[45]]*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5453
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
1 by Masahito Omote
Import upstream version 0.3.9
5454
      ;;
5455
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5456
    cygwin* | mingw* | pw32* | cegcc*)
1 by Masahito Omote
Import upstream version 0.3.9
5457
      # When not using gcc, we currently assume that we are using
5458
      # Microsoft Visual C++.
5459
      # hardcode_libdir_flag_spec is actually meaningless, as there is
5460
      # no search path for DLLs.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5461
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5462
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
1 by Masahito Omote
Import upstream version 0.3.9
5463
      # Tell ltmain to make .lib files, not .a files.
5464
      libext=lib
5465
      # Tell ltmain to make .dll files, not .so files.
5466
      shrext_cmds=".dll"
5467
      # FIXME: Setting linknames here is a bad hack.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5468
      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1 by Masahito Omote
Import upstream version 0.3.9
5469
      # The linker will automatically build a .lib file if we build a DLL.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5470
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
1 by Masahito Omote
Import upstream version 0.3.9
5471
      # FIXME: Should let the user specify the lib program.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5472
      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5473
      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5474
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
1 by Masahito Omote
Import upstream version 0.3.9
5475
      ;;
5476
5477
    darwin* | rhapsody*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5478
      _LT_DARWIN_LINKER_FEATURES($1)
1 by Masahito Omote
Import upstream version 0.3.9
5479
      ;;
5480
5481
    dgux*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5482
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5483
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5484
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5485
      ;;
5486
5487
    freebsd1*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5488
      _LT_TAGVAR(ld_shlibs, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5489
      ;;
5490
5491
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5492
    # support.  Future versions do this automatically, but an explicit c++rt0.o
5493
    # does not break anything, and helps significantly (at the cost of a little
5494
    # extra space).
5495
    freebsd2.2*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5496
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5497
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5498
      _LT_TAGVAR(hardcode_direct, $1)=yes
5499
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5500
      ;;
5501
5502
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5503
    freebsd2*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5504
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5505
      _LT_TAGVAR(hardcode_direct, $1)=yes
5506
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5507
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5508
      ;;
5509
5510
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5511
    freebsd* | dragonfly*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5512
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5513
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5514
      _LT_TAGVAR(hardcode_direct, $1)=yes
5515
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5516
      ;;
5517
5518
    hpux9*)
5519
      if test "$GCC" = yes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5520
	_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'
1 by Masahito Omote
Import upstream version 0.3.9
5521
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5522
	_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'
1 by Masahito Omote
Import upstream version 0.3.9
5523
      fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5524
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5525
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5526
      _LT_TAGVAR(hardcode_direct, $1)=yes
1 by Masahito Omote
Import upstream version 0.3.9
5527
5528
      # hardcode_minus_L: Not really in the search PATH,
5529
      # but as the default location of the library.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5530
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5531
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
1 by Masahito Omote
Import upstream version 0.3.9
5532
      ;;
5533
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5534
    hpux10*)
5535
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5536
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5537
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5538
	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5539
      fi
5540
      if test "$with_gnu_ld" = no; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5541
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5542
	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5543
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5544
	_LT_TAGVAR(hardcode_direct, $1)=yes
5545
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5546
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5547
	# hardcode_minus_L: Not really in the search PATH,
5548
	# but as the default location of the library.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5549
	_LT_TAGVAR(hardcode_minus_L, $1)=yes
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5550
      fi
5551
      ;;
5552
5553
    hpux11*)
1 by Masahito Omote
Import upstream version 0.3.9
5554
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5555
	case $host_cpu in
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5556
	hppa*64*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5557
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
1 by Masahito Omote
Import upstream version 0.3.9
5558
	  ;;
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5559
	ia64*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5560
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5561
	  ;;
1 by Masahito Omote
Import upstream version 0.3.9
5562
	*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5563
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1 by Masahito Omote
Import upstream version 0.3.9
5564
	  ;;
5565
	esac
5566
      else
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5567
	case $host_cpu in
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5568
	hppa*64*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5569
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5570
	  ;;
5571
	ia64*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5572
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
1 by Masahito Omote
Import upstream version 0.3.9
5573
	  ;;
5574
	*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5575
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1 by Masahito Omote
Import upstream version 0.3.9
5576
	  ;;
5577
	esac
5578
      fi
5579
      if test "$with_gnu_ld" = no; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5580
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5581
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5582
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5583
	case $host_cpu in
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5584
	hppa*64*|ia64*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5585
	  _LT_TAGVAR(hardcode_direct, $1)=no
5586
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5587
	  ;;
5588
	*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5589
	  _LT_TAGVAR(hardcode_direct, $1)=yes
5590
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5591
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
1 by Masahito Omote
Import upstream version 0.3.9
5592
5593
	  # hardcode_minus_L: Not really in the search PATH,
5594
	  # but as the default location of the library.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5595
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
1 by Masahito Omote
Import upstream version 0.3.9
5596
	  ;;
5597
	esac
5598
      fi
5599
      ;;
5600
5601
    irix5* | irix6* | nonstopux*)
5602
      if test "$GCC" = yes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5603
	_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'
5604
	# Try to use the -exported_symbol ld option, if it does not
5605
	# work, assume that -exports_file does not work either and
5606
	# implicitly export all symbols.
5607
        save_LDFLAGS="$LDFLAGS"
5608
        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5609
        AC_LINK_IFELSE(int foo(void) {},
5610
          _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'
5611
        )
5612
        LDFLAGS="$save_LDFLAGS"
1 by Masahito Omote
Import upstream version 0.3.9
5613
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5614
	_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'
5615
	_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'
1 by Masahito Omote
Import upstream version 0.3.9
5616
      fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5617
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5618
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5619
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5620
      _LT_TAGVAR(inherit_rpath, $1)=yes
5621
      _LT_TAGVAR(link_all_deplibs, $1)=yes
1 by Masahito Omote
Import upstream version 0.3.9
5622
      ;;
5623
1.1.9 by Masahito Omote
Import upstream version 1.5.3
5624
    netbsd*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5625
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5626
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
1 by Masahito Omote
Import upstream version 0.3.9
5627
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5628
	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
1 by Masahito Omote
Import upstream version 0.3.9
5629
      fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5630
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5631
      _LT_TAGVAR(hardcode_direct, $1)=yes
5632
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5633
      ;;
5634
5635
    newsos6)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5636
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5637
      _LT_TAGVAR(hardcode_direct, $1)=yes
5638
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5639
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5640
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5641
      ;;
5642
5643
    *nto* | *qnx*)
1 by Masahito Omote
Import upstream version 0.3.9
5644
      ;;
5645
5646
    openbsd*)
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5647
      if test -f /usr/libexec/ld.so; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5648
	_LT_TAGVAR(hardcode_direct, $1)=yes
5649
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5650
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5651
	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5652
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5653
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5654
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5655
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5656
	else
5657
	  case $host_os in
5658
	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5659
	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5660
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5661
	     ;;
5662
	   *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5663
	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5664
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5665
	     ;;
5666
	  esac
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5667
	fi
1 by Masahito Omote
Import upstream version 0.3.9
5668
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5669
	_LT_TAGVAR(ld_shlibs, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5670
      fi
5671
      ;;
5672
5673
    os2*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5674
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5675
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5676
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5677
      _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'
5678
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1 by Masahito Omote
Import upstream version 0.3.9
5679
      ;;
5680
5681
    osf3*)
5682
      if test "$GCC" = yes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5683
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5684
	_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'
1 by Masahito Omote
Import upstream version 0.3.9
5685
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5686
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5687
	_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'
1 by Masahito Omote
Import upstream version 0.3.9
5688
      fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5689
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5690
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5691
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
1 by Masahito Omote
Import upstream version 0.3.9
5692
      ;;
5693
5694
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5695
      if test "$GCC" = yes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5696
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5697
	_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'
5698
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
1 by Masahito Omote
Import upstream version 0.3.9
5699
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5700
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5701
	_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'
5702
	_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~
5703
	$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'
1 by Masahito Omote
Import upstream version 0.3.9
5704
5705
	# Both c and cxx compiler support -rpath directly
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5706
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
1 by Masahito Omote
Import upstream version 0.3.9
5707
      fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5708
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5709
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
1 by Masahito Omote
Import upstream version 0.3.9
5710
      ;;
5711
5712
    solaris*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5713
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
1 by Masahito Omote
Import upstream version 0.3.9
5714
      if test "$GCC" = yes; then
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5715
	wlarc='${wl}'
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5716
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5717
	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5718
	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
1 by Masahito Omote
Import upstream version 0.3.9
5719
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5720
	case `$CC -V 2>&1` in
5721
	*"Compilers 5.0"*)
5722
	  wlarc=''
5723
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5724
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5725
	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5726
	  ;;
5727
	*)
5728
	  wlarc='${wl}'
5729
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5730
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5731
	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5732
	  ;;
5733
	esac
1 by Masahito Omote
Import upstream version 0.3.9
5734
      fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5735
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5736
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5737
      case $host_os in
5738
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
1.1.3 by Masahito Omote
Import upstream version 1.0.0
5739
      *)
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5740
	# The compiler driver will combine and reorder linker options,
5741
	# but understands `-z linker_flag'.  GCC discards it without `$wl',
5742
	# but is careful enough not to reorder.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5743
	# Supported since Solaris 2.6 (maybe 2.5.1?)
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5744
	if test "$GCC" = yes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5745
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5746
	else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5747
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5748
	fi
5749
	;;
1 by Masahito Omote
Import upstream version 0.3.9
5750
      esac
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5751
      _LT_TAGVAR(link_all_deplibs, $1)=yes
1 by Masahito Omote
Import upstream version 0.3.9
5752
      ;;
5753
5754
    sunos4*)
5755
      if test "x$host_vendor" = xsequent; then
5756
	# Use $CC to link under sequent, because it throws in some extra .o
5757
	# files that make .init and .fini sections work.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5758
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
1 by Masahito Omote
Import upstream version 0.3.9
5759
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5760
	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1 by Masahito Omote
Import upstream version 0.3.9
5761
      fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5762
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5763
      _LT_TAGVAR(hardcode_direct, $1)=yes
5764
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5765
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5766
      ;;
5767
5768
    sysv4)
5769
      case $host_vendor in
5770
	sni)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5771
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5772
	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
1 by Masahito Omote
Import upstream version 0.3.9
5773
	;;
5774
	siemens)
5775
	  ## LD is ld it makes a PLAMLIB
5776
	  ## CC just makes a GrossModule.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5777
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5778
	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5779
	  _LT_TAGVAR(hardcode_direct, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5780
        ;;
5781
	motorola)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5782
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5783
	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
1 by Masahito Omote
Import upstream version 0.3.9
5784
	;;
5785
      esac
5786
      runpath_var='LD_RUN_PATH'
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5787
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5788
      ;;
5789
5790
    sysv4.3*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5791
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5792
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5793
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
1 by Masahito Omote
Import upstream version 0.3.9
5794
      ;;
5795
5796
    sysv4*MP*)
5797
      if test -d /usr/nec; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5798
	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5799
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5800
	runpath_var=LD_RUN_PATH
5801
	hardcode_runpath_var=yes
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5802
	_LT_TAGVAR(ld_shlibs, $1)=yes
1 by Masahito Omote
Import upstream version 0.3.9
5803
      fi
5804
      ;;
5805
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5806
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5807
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5808
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5809
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5810
      runpath_var='LD_RUN_PATH'
5811
5812
      if test "$GCC" = yes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5813
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5814
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5815
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5816
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5817
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5818
      fi
5819
      ;;
5820
5821
    sysv5* | sco3.2v5* | sco5v6*)
5822
      # Note: We can NOT use -z defs as we might desire, because we do not
5823
      # link with -lc, and that would cause any symbols used from libc to
5824
      # always be unresolved, which means just about no library would
5825
      # ever link correctly.  If we're not using GNU ld we use -z text
5826
      # though, which does catch some bad symbols but isn't as heavy-handed
5827
      # as -z defs.
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5828
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5829
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5830
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5831
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5832
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5833
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5834
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5835
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5836
      runpath_var='LD_RUN_PATH'
5837
5838
      if test "$GCC" = yes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5839
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5840
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5841
      else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5842
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5843
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
5844
      fi
1 by Masahito Omote
Import upstream version 0.3.9
5845
      ;;
5846
5847
    uts4*)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5848
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5849
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5850
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5851
      ;;
5852
5853
    *)
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5854
      _LT_TAGVAR(ld_shlibs, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5855
      ;;
5856
    esac
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5857
5858
    if test x$host_vendor = xsni; then
5859
      case $host in
5860
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5861
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5862
	;;
5863
      esac
5864
    fi
1 by Masahito Omote
Import upstream version 0.3.9
5865
  fi
5866
])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5867
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5868
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5869
5870
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5871
5872
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5873
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5874
_LT_DECL([], [extract_expsyms_cmds], [2],
5875
    [The commands to extract the exported symbol list from a shared archive])
1 by Masahito Omote
Import upstream version 0.3.9
5876
5877
#
5878
# Do we need to explicitly link libc?
5879
#
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5880
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
1 by Masahito Omote
Import upstream version 0.3.9
5881
x|xyes)
5882
  # Assume -lc should be added
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5883
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
1 by Masahito Omote
Import upstream version 0.3.9
5884
5885
  if test "$enable_shared" = yes && test "$GCC" = yes; then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5886
    case $_LT_TAGVAR(archive_cmds, $1) in
1 by Masahito Omote
Import upstream version 0.3.9
5887
    *'~'*)
5888
      # FIXME: we may have to deal with multi-command sequences.
5889
      ;;
5890
    '$CC '*)
5891
      # Test whether the compiler implicitly links with -lc since on some
5892
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5893
      # to ld, don't add -lc before -lgcc.
5894
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5895
      $RM conftest*
1.1.7 by Masahito Omote
Import upstream version 1.4.2
5896
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1 by Masahito Omote
Import upstream version 0.3.9
5897
5898
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5899
        soname=conftest
5900
        lib=conftest
5901
        libobjs=conftest.$ac_objext
5902
        deplibs=
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5903
        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5904
	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
1 by Masahito Omote
Import upstream version 0.3.9
5905
        compiler_flags=-v
5906
        linker_flags=-v
5907
        verstring=
5908
        output_objdir=.
5909
        libname=conftest
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5910
        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5911
        _LT_TAGVAR(allow_undefined_flag, $1)=
5912
        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
1 by Masahito Omote
Import upstream version 0.3.9
5913
        then
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5914
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1 by Masahito Omote
Import upstream version 0.3.9
5915
        else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5916
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
1 by Masahito Omote
Import upstream version 0.3.9
5917
        fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5918
        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
1 by Masahito Omote
Import upstream version 0.3.9
5919
      else
5920
        cat conftest.err 1>&5
5921
      fi
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5922
      $RM conftest*
5923
      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
1 by Masahito Omote
Import upstream version 0.3.9
5924
      ;;
5925
    esac
5926
  fi
5927
  ;;
5928
esac
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
5929
5930
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5931
    [Whether or not to add -lc for building shared libraries])
5932
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5933
    [enable_shared_with_static_runtimes], [0],
5934
    [Whether or not to disallow shared libs when runtime libs are static])
5935
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5936
    [Compiler flag to allow reflexive dlopens])
5937
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5938
    [Compiler flag to generate shared objects directly from archives])
5939
_LT_TAGDECL([], [compiler_needs_object], [1],
5940
    [Whether the compiler copes with passing no objects directly])
5941
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5942
    [Create an old-style archive from a shared archive])
5943
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5944
    [Create a temporary old-style archive to link instead of a shared archive])
5945
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5946
_LT_TAGDECL([], [archive_expsym_cmds], [2])
5947
_LT_TAGDECL([], [module_cmds], [2],
5948
    [Commands used to build a loadable module if different from building
5949
    a shared archive.])
5950
_LT_TAGDECL([], [module_expsym_cmds], [2])
5951
_LT_TAGDECL([], [with_gnu_ld], [1],
5952
    [Whether we are building with GNU ld or not])
5953
_LT_TAGDECL([], [allow_undefined_flag], [1],
5954
    [Flag that allows shared libraries with undefined symbols to be built])
5955
_LT_TAGDECL([], [no_undefined_flag], [1],
5956
    [Flag that enforces no undefined symbols])
5957
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5958
    [Flag to hardcode $libdir into a binary during linking.
5959
    This must work even if $libdir does not exist])
5960
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5961
    [[If ld is used when linking, flag to hardcode $libdir into a binary
5962
    during linking.  This must work even if $libdir does not exist]])
5963
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5964
    [Whether we need a single "-rpath" flag with a separated argument])
5965
_LT_TAGDECL([], [hardcode_direct], [0],
5966
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5967
    DIR into the resulting binary])
5968
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5969
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5970
    DIR into the resulting binary and the resulting library dependency is
5971
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5972
    library is relocated])
5973
_LT_TAGDECL([], [hardcode_minus_L], [0],
5974
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5975
    into the resulting binary])
5976
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5977
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5978
    into the resulting binary])
5979
_LT_TAGDECL([], [hardcode_automatic], [0],
5980
    [Set to "yes" if building a shared library automatically hardcodes DIR
5981
    into the library and all subsequent libraries and executables linked
5982
    against it])
5983
_LT_TAGDECL([], [inherit_rpath], [0],
5984
    [Set to yes if linker adds runtime paths of dependent libraries
5985
    to runtime path list])
5986
_LT_TAGDECL([], [link_all_deplibs], [0],
5987
    [Whether libtool must link a program against all its dependency libraries])
5988
_LT_TAGDECL([], [fix_srcfile_path], [1],
5989
    [Fix the shell variable $srcfile for the compiler])
5990
_LT_TAGDECL([], [always_export_symbols], [0],
5991
    [Set to "yes" if exported symbols are required])
5992
_LT_TAGDECL([], [export_symbols_cmds], [2],
5993
    [The commands to list exported symbols])
5994
_LT_TAGDECL([], [exclude_expsyms], [1],
5995
    [Symbols that should not be listed in the preloaded symbols])
5996
_LT_TAGDECL([], [include_expsyms], [1],
5997
    [Symbols that must always be exported])
5998
_LT_TAGDECL([], [prelink_cmds], [2],
5999
    [Commands necessary for linking programs (against libraries) with templates])
6000
_LT_TAGDECL([], [file_list_spec], [1],
6001
    [Specify filename containing input files])
6002
dnl FIXME: Not yet implemented
6003
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6004
dnl    [Compiler flag to generate thread safe objects])
6005
])# _LT_LINKER_SHLIBS
6006
6007
6008
# _LT_LANG_C_CONFIG([TAG])
6009
# ------------------------
6010
# Ensure that the configuration variables for a C compiler are suitably
6011
# defined.  These variables are subsequently used by _LT_CONFIG to write
6012
# the compiler configuration to `libtool'.
6013
m4_defun([_LT_LANG_C_CONFIG],
6014
[m4_require([_LT_DECL_EGREP])dnl
6015
lt_save_CC="$CC"
6016
AC_LANG_PUSH(C)
6017
6018
# Source file extension for C test sources.
6019
ac_ext=c
6020
6021
# Object file extension for compiled C test sources.
6022
objext=o
6023
_LT_TAGVAR(objext, $1)=$objext
6024
6025
# Code to be used in simple compile tests
6026
lt_simple_compile_test_code="int some_variable = 0;"
6027
6028
# Code to be used in simple link tests
6029
lt_simple_link_test_code='int main(){return(0);}'
6030
6031
_LT_TAG_COMPILER
6032
# Save the default compiler, since it gets overwritten when the other
6033
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6034
compiler_DEFAULT=$CC
6035
6036
# save warnings/boilerplate of simple test code
6037
_LT_COMPILER_BOILERPLATE
6038
_LT_LINKER_BOILERPLATE
6039
6040
if test -n "$compiler"; then
6041
  _LT_COMPILER_NO_RTTI($1)
6042
  _LT_COMPILER_PIC($1)
6043
  _LT_COMPILER_C_O($1)
6044
  _LT_COMPILER_FILE_LOCKS($1)
6045
  _LT_LINKER_SHLIBS($1)
6046
  _LT_SYS_DYNAMIC_LINKER($1)
6047
  _LT_LINKER_HARDCODE_LIBPATH($1)
6048
  LT_SYS_DLOPEN_SELF
6049
  _LT_CMD_STRIPLIB
6050
6051
  # Report which library types will actually be built
6052
  AC_MSG_CHECKING([if libtool supports shared libraries])
6053
  AC_MSG_RESULT([$can_build_shared])
6054
6055
  AC_MSG_CHECKING([whether to build shared libraries])
6056
  test "$can_build_shared" = "no" && enable_shared=no
6057
6058
  # On AIX, shared libraries and static libraries use the same namespace, and
6059
  # are all built from PIC.
6060
  case $host_os in
6061
  aix3*)
6062
    test "$enable_shared" = yes && enable_static=no
6063
    if test -n "$RANLIB"; then
6064
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6065
      postinstall_cmds='$RANLIB $lib'
6066
    fi
6067
    ;;
6068
6069
  aix[[4-9]]*)
6070
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6071
      test "$enable_shared" = yes && enable_static=no
6072
    fi
6073
    ;;
6074
  esac
6075
  AC_MSG_RESULT([$enable_shared])
6076
6077
  AC_MSG_CHECKING([whether to build static libraries])
6078
  # Make sure either enable_shared or enable_static is yes.
6079
  test "$enable_shared" = yes || enable_static=yes
6080
  AC_MSG_RESULT([$enable_static])
6081
6082
  _LT_CONFIG($1)
6083
fi
6084
AC_LANG_POP
6085
CC="$lt_save_CC"
6086
])# _LT_LANG_C_CONFIG
6087
6088
6089
# _LT_PROG_CXX
6090
# ------------
6091
# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6092
# compiler, we have our own version here.
6093
m4_defun([_LT_PROG_CXX],
6094
[
6095
pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6096
AC_PROG_CXX
6097
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6098
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6099
    (test "X$CXX" != "Xg++"))) ; then
6100
  AC_PROG_CXXCPP
6101
else
6102
  _lt_caught_CXX_error=yes
6103
fi
6104
popdef([AC_MSG_ERROR])
6105
])# _LT_PROG_CXX
6106
6107
dnl aclocal-1.4 backwards compatibility:
6108
dnl AC_DEFUN([_LT_PROG_CXX], [])
6109
6110
6111
# _LT_LANG_CXX_CONFIG([TAG])
6112
# --------------------------
6113
# Ensure that the configuration variables for a C++ compiler are suitably
6114
# defined.  These variables are subsequently used by _LT_CONFIG to write
6115
# the compiler configuration to `libtool'.
6116
m4_defun([_LT_LANG_CXX_CONFIG],
6117
[AC_REQUIRE([_LT_PROG_CXX])dnl
6118
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6119
m4_require([_LT_DECL_EGREP])dnl
6120
6121
AC_LANG_PUSH(C++)
6122
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6123
_LT_TAGVAR(allow_undefined_flag, $1)=
6124
_LT_TAGVAR(always_export_symbols, $1)=no
6125
_LT_TAGVAR(archive_expsym_cmds, $1)=
6126
_LT_TAGVAR(compiler_needs_object, $1)=no
6127
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6128
_LT_TAGVAR(hardcode_direct, $1)=no
6129
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6130
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6131
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6132
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6133
_LT_TAGVAR(hardcode_minus_L, $1)=no
6134
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6135
_LT_TAGVAR(hardcode_automatic, $1)=no
6136
_LT_TAGVAR(inherit_rpath, $1)=no
6137
_LT_TAGVAR(module_cmds, $1)=
6138
_LT_TAGVAR(module_expsym_cmds, $1)=
6139
_LT_TAGVAR(link_all_deplibs, $1)=unknown
6140
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6141
_LT_TAGVAR(no_undefined_flag, $1)=
6142
_LT_TAGVAR(whole_archive_flag_spec, $1)=
6143
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6144
6145
# Source file extension for C++ test sources.
6146
ac_ext=cpp
6147
6148
# Object file extension for compiled C++ test sources.
6149
objext=o
6150
_LT_TAGVAR(objext, $1)=$objext
6151
6152
# No sense in running all these tests if we already determined that
6153
# the CXX compiler isn't working.  Some variables (like enable_shared)
6154
# are currently assumed to apply to all compilers on this platform,
6155
# and will be corrupted by setting them based on a non-working compiler.
6156
if test "$_lt_caught_CXX_error" != yes; then
6157
  # Code to be used in simple compile tests
6158
  lt_simple_compile_test_code="int some_variable = 0;"
6159
6160
  # Code to be used in simple link tests
6161
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6162
6163
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6164
  _LT_TAG_COMPILER
6165
6166
  # save warnings/boilerplate of simple test code
6167
  _LT_COMPILER_BOILERPLATE
6168
  _LT_LINKER_BOILERPLATE
6169
6170
  # Allow CC to be a program name with arguments.
6171
  lt_save_CC=$CC
6172
  lt_save_LD=$LD
6173
  lt_save_GCC=$GCC
6174
  GCC=$GXX
6175
  lt_save_with_gnu_ld=$with_gnu_ld
6176
  lt_save_path_LD=$lt_cv_path_LD
6177
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6178
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6179
  else
6180
    $as_unset lt_cv_prog_gnu_ld
6181
  fi
6182
  if test -n "${lt_cv_path_LDCXX+set}"; then
6183
    lt_cv_path_LD=$lt_cv_path_LDCXX
6184
  else
6185
    $as_unset lt_cv_path_LD
6186
  fi
6187
  test -z "${LDCXX+set}" || LD=$LDCXX
6188
  CC=${CXX-"c++"}
6189
  compiler=$CC
6190
  _LT_TAGVAR(compiler, $1)=$CC
6191
  _LT_CC_BASENAME([$compiler])
6192
6193
  if test -n "$compiler"; then
6194
    # We don't want -fno-exception when compiling C++ code, so set the
6195
    # no_builtin_flag separately
6196
    if test "$GXX" = yes; then
6197
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6198
    else
6199
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6200
    fi
6201
6202
    if test "$GXX" = yes; then
6203
      # Set up default GNU C++ configuration
6204
6205
      LT_PATH_LD
6206
6207
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6208
      # archiving commands below assume that GNU ld is being used.
6209
      if test "$with_gnu_ld" = yes; then
6210
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6211
        _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'
6212
6213
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6214
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6215
6216
        # If archive_cmds runs LD, not CC, wlarc should be empty
6217
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6218
        #     investigate it a little bit more. (MM)
6219
        wlarc='${wl}'
6220
6221
        # ancient GNU ld didn't support --whole-archive et. al.
6222
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6223
	  $GREP 'no-whole-archive' > /dev/null; then
6224
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6225
        else
6226
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6227
        fi
6228
      else
6229
        with_gnu_ld=no
6230
        wlarc=
6231
6232
        # A generic and very simple default shared library creation
6233
        # command for GNU C++ for the case where it uses the native
6234
        # linker, instead of GNU ld.  If possible, this setting should
6235
        # overridden to take advantage of the native linker features on
6236
        # the platform it is being used on.
6237
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6238
      fi
6239
6240
      # Commands to make compiler produce verbose output that lists
6241
      # what "hidden" libraries, object files and flags are used when
6242
      # linking a shared library.
6243
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6244
6245
    else
6246
      GXX=no
6247
      with_gnu_ld=no
6248
      wlarc=
6249
    fi
6250
6251
    # PORTME: fill in a description of your system's C++ link characteristics
6252
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6253
    _LT_TAGVAR(ld_shlibs, $1)=yes
6254
    case $host_os in
6255
      aix3*)
6256
        # FIXME: insert proper C++ library support
6257
        _LT_TAGVAR(ld_shlibs, $1)=no
6258
        ;;
6259
      aix[[4-9]]*)
6260
        if test "$host_cpu" = ia64; then
6261
          # On IA64, the linker does run time linking by default, so we don't
6262
          # have to do anything special.
6263
          aix_use_runtimelinking=no
6264
          exp_sym_flag='-Bexport'
6265
          no_entry_flag=""
6266
        else
6267
          aix_use_runtimelinking=no
6268
6269
          # Test if we are trying to use run time linking or normal
6270
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6271
          # need to do runtime linking.
6272
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6273
	    for ld_flag in $LDFLAGS; do
6274
	      case $ld_flag in
6275
	      *-brtl*)
6276
	        aix_use_runtimelinking=yes
6277
	        break
6278
	        ;;
6279
	      esac
6280
	    done
6281
	    ;;
6282
          esac
6283
6284
          exp_sym_flag='-bexport'
6285
          no_entry_flag='-bnoentry'
6286
        fi
6287
6288
        # When large executables or shared objects are built, AIX ld can
6289
        # have problems creating the table of contents.  If linking a library
6290
        # or program results in "error TOC overflow" add -mminimal-toc to
6291
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6292
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6293
6294
        _LT_TAGVAR(archive_cmds, $1)=''
6295
        _LT_TAGVAR(hardcode_direct, $1)=yes
6296
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6297
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6298
        _LT_TAGVAR(link_all_deplibs, $1)=yes
6299
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6300
6301
        if test "$GXX" = yes; then
6302
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6303
          # We only want to do this on AIX 4.2 and lower, the check
6304
          # below for broken collect2 doesn't work under 4.3+
6305
	  collect2name=`${CC} -print-prog-name=collect2`
6306
	  if test -f "$collect2name" &&
6307
	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6308
	  then
6309
	    # We have reworked collect2
6310
	    :
6311
	  else
6312
	    # We have old collect2
6313
	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6314
	    # It fails to find uninstalled libraries when the uninstalled
6315
	    # path is not listed in the libpath.  Setting hardcode_minus_L
6316
	    # to unsupported forces relinking
6317
	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6318
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6319
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6320
	  fi
6321
          esac
6322
          shared_flag='-shared'
6323
	  if test "$aix_use_runtimelinking" = yes; then
6324
	    shared_flag="$shared_flag "'${wl}-G'
6325
	  fi
6326
        else
6327
          # not using gcc
6328
          if test "$host_cpu" = ia64; then
6329
	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6330
	  # chokes on -Wl,-G. The following line is correct:
6331
	  shared_flag='-G'
6332
          else
6333
	    if test "$aix_use_runtimelinking" = yes; then
6334
	      shared_flag='${wl}-G'
6335
	    else
6336
	      shared_flag='${wl}-bM:SRE'
6337
	    fi
6338
          fi
6339
        fi
6340
6341
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6342
        # It seems that -bexpall does not export symbols beginning with
6343
        # underscore (_), so it is better to generate a list of symbols to
6344
	# export.
6345
        _LT_TAGVAR(always_export_symbols, $1)=yes
6346
        if test "$aix_use_runtimelinking" = yes; then
6347
          # Warning - without using the other runtime loading flags (-brtl),
6348
          # -berok will link without error, but may produce a broken library.
6349
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6350
          # Determine the default libpath from the value encoded in an empty
6351
          # executable.
6352
          _LT_SYS_MODULE_PATH_AIX
6353
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6354
6355
          _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"
6356
        else
6357
          if test "$host_cpu" = ia64; then
6358
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6359
	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6360
	    _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"
6361
          else
6362
	    # Determine the default libpath from the value encoded in an
6363
	    # empty executable.
6364
	    _LT_SYS_MODULE_PATH_AIX
6365
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6366
	    # Warning - without using the other run time loading flags,
6367
	    # -berok will link without error, but may produce a broken library.
6368
	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6369
	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6370
	    # Exported symbols can be pulled into shared objects from archives
6371
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6372
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6373
	    # This is similar to how AIX traditionally builds its shared
6374
	    # libraries.
6375
	    _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'
6376
          fi
6377
        fi
6378
        ;;
6379
6380
      beos*)
6381
	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6382
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6383
	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6384
	  # support --undefined.  This deserves some investigation.  FIXME
6385
	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6386
	else
6387
	  _LT_TAGVAR(ld_shlibs, $1)=no
6388
	fi
6389
	;;
6390
6391
      chorus*)
6392
        case $cc_basename in
6393
          *)
6394
	  # FIXME: insert proper C++ library support
6395
	  _LT_TAGVAR(ld_shlibs, $1)=no
6396
	  ;;
6397
        esac
6398
        ;;
6399
6400
      cygwin* | mingw* | pw32* | cegcc*)
6401
        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6402
        # as there is no search path for DLLs.
6403
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6404
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6405
        _LT_TAGVAR(always_export_symbols, $1)=no
6406
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6407
6408
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6409
          _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'
6410
          # If the export-symbols file already is a .def file (1st line
6411
          # is EXPORTS), use it as is; otherwise, prepend...
6412
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6413
	    cp $export_symbols $output_objdir/$soname.def;
6414
          else
6415
	    echo EXPORTS > $output_objdir/$soname.def;
6416
	    cat $export_symbols >> $output_objdir/$soname.def;
6417
          fi~
6418
          $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'
6419
        else
6420
          _LT_TAGVAR(ld_shlibs, $1)=no
6421
        fi
6422
        ;;
6423
      darwin* | rhapsody*)
6424
        _LT_DARWIN_LINKER_FEATURES($1)
6425
	;;
6426
6427
      dgux*)
6428
        case $cc_basename in
6429
          ec++*)
6430
	    # FIXME: insert proper C++ library support
6431
	    _LT_TAGVAR(ld_shlibs, $1)=no
6432
	    ;;
6433
          ghcx*)
6434
	    # Green Hills C++ Compiler
6435
	    # FIXME: insert proper C++ library support
6436
	    _LT_TAGVAR(ld_shlibs, $1)=no
6437
	    ;;
6438
          *)
6439
	    # FIXME: insert proper C++ library support
6440
	    _LT_TAGVAR(ld_shlibs, $1)=no
6441
	    ;;
6442
        esac
6443
        ;;
6444
6445
      freebsd[[12]]*)
6446
        # C++ shared libraries reported to be fairly broken before
6447
	# switch to ELF
6448
        _LT_TAGVAR(ld_shlibs, $1)=no
6449
        ;;
6450
6451
      freebsd-elf*)
6452
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6453
        ;;
6454
6455
      freebsd* | dragonfly*)
6456
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6457
        # conventions
6458
        _LT_TAGVAR(ld_shlibs, $1)=yes
6459
        ;;
6460
6461
      gnu*)
6462
        ;;
6463
6464
      hpux9*)
6465
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6466
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6467
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6468
        _LT_TAGVAR(hardcode_direct, $1)=yes
6469
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6470
				             # but as the default
6471
				             # location of the library.
6472
6473
        case $cc_basename in
6474
          CC*)
6475
            # FIXME: insert proper C++ library support
6476
            _LT_TAGVAR(ld_shlibs, $1)=no
6477
            ;;
6478
          aCC*)
6479
            _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'
6480
            # Commands to make compiler produce verbose output that lists
6481
            # what "hidden" libraries, object files and flags are used when
6482
            # linking a shared library.
6483
            #
6484
            # There doesn't appear to be a way to prevent this compiler from
6485
            # explicitly linking system object files so we need to strip them
6486
            # from the output so that they don't get included in the library
6487
            # dependencies.
6488
            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'
6489
            ;;
6490
          *)
6491
            if test "$GXX" = yes; then
6492
              _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'
6493
            else
6494
              # FIXME: insert proper C++ library support
6495
              _LT_TAGVAR(ld_shlibs, $1)=no
6496
            fi
6497
            ;;
6498
        esac
6499
        ;;
6500
6501
      hpux10*|hpux11*)
6502
        if test $with_gnu_ld = no; then
6503
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6504
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6505
6506
          case $host_cpu in
6507
            hppa*64*|ia64*)
6508
              ;;
6509
            *)
6510
	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6511
              ;;
6512
          esac
6513
        fi
6514
        case $host_cpu in
6515
          hppa*64*|ia64*)
6516
            _LT_TAGVAR(hardcode_direct, $1)=no
6517
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6518
            ;;
6519
          *)
6520
            _LT_TAGVAR(hardcode_direct, $1)=yes
6521
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6522
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6523
					         # but as the default
6524
					         # location of the library.
6525
            ;;
6526
        esac
6527
6528
        case $cc_basename in
6529
          CC*)
6530
	    # FIXME: insert proper C++ library support
6531
	    _LT_TAGVAR(ld_shlibs, $1)=no
6532
	    ;;
6533
          aCC*)
6534
	    case $host_cpu in
6535
	      hppa*64*)
6536
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6537
	        ;;
6538
	      ia64*)
6539
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6540
	        ;;
6541
	      *)
6542
	        _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'
6543
	        ;;
6544
	    esac
6545
	    # Commands to make compiler produce verbose output that lists
6546
	    # what "hidden" libraries, object files and flags are used when
6547
	    # linking a shared library.
6548
	    #
6549
	    # There doesn't appear to be a way to prevent this compiler from
6550
	    # explicitly linking system object files so we need to strip them
6551
	    # from the output so that they don't get included in the library
6552
	    # dependencies.
6553
	    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'
6554
	    ;;
6555
          *)
6556
	    if test "$GXX" = yes; then
6557
	      if test $with_gnu_ld = no; then
6558
	        case $host_cpu in
6559
	          hppa*64*)
6560
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6561
	            ;;
6562
	          ia64*)
6563
	            _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'
6564
	            ;;
6565
	          *)
6566
	            _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'
6567
	            ;;
6568
	        esac
6569
	      fi
6570
	    else
6571
	      # FIXME: insert proper C++ library support
6572
	      _LT_TAGVAR(ld_shlibs, $1)=no
6573
	    fi
6574
	    ;;
6575
        esac
6576
        ;;
6577
6578
      interix[[3-9]]*)
6579
	_LT_TAGVAR(hardcode_direct, $1)=no
6580
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6581
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6582
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6583
	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6584
	# Instead, shared libraries are loaded at an image base (0x10000000 by
6585
	# default) and relocated if they conflict, which is a slow very memory
6586
	# consuming and fragmenting process.  To avoid this, we pick a random,
6587
	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6588
	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6589
	_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'
6590
	_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'
6591
	;;
6592
      irix5* | irix6*)
6593
        case $cc_basename in
6594
          CC*)
6595
	    # SGI C++
6596
	    _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'
6597
6598
	    # Archives containing C++ object files must be created using
6599
	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6600
	    # necessary to make sure instantiated templates are included
6601
	    # in the archive.
6602
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6603
	    ;;
6604
          *)
6605
	    if test "$GXX" = yes; then
6606
	      if test "$with_gnu_ld" = no; then
6607
	        _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'
6608
	      else
6609
	        _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'
6610
	      fi
6611
	    fi
6612
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6613
	    ;;
6614
        esac
6615
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6616
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6617
        _LT_TAGVAR(inherit_rpath, $1)=yes
6618
        ;;
6619
6620
      linux* | k*bsd*-gnu)
6621
        case $cc_basename in
6622
          KCC*)
6623
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6624
6625
	    # KCC will only create a shared library if the output file
6626
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6627
	    # to its proper name (with version) after linking.
6628
	    _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'
6629
	    _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'
6630
	    # Commands to make compiler produce verbose output that lists
6631
	    # what "hidden" libraries, object files and flags are used when
6632
	    # linking a shared library.
6633
	    #
6634
	    # There doesn't appear to be a way to prevent this compiler from
6635
	    # explicitly linking system object files so we need to strip them
6636
	    # from the output so that they don't get included in the library
6637
	    # dependencies.
6638
	    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'
6639
6640
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6641
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6642
6643
	    # Archives containing C++ object files must be created using
6644
	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6645
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6646
	    ;;
6647
	  icpc* | ecpc* )
6648
	    # Intel C++
6649
	    with_gnu_ld=yes
6650
	    # version 8.0 and above of icpc choke on multiply defined symbols
6651
	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6652
	    # earlier do not add the objects themselves.
6653
	    case `$CC -V 2>&1` in
6654
	      *"Version 7."*)
6655
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6656
		_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'
6657
		;;
6658
	      *)  # Version 8.0 or newer
6659
	        tmp_idyn=
6660
	        case $host_cpu in
6661
		  ia64*) tmp_idyn=' -i_dynamic';;
6662
		esac
6663
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6664
		_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'
6665
		;;
6666
	    esac
6667
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6668
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6669
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6670
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6671
	    ;;
6672
          pgCC* | pgcpp*)
6673
            # Portland Group C++ compiler
6674
	    case `$CC -V` in
6675
	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6676
	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6677
		rm -rf $tpldir~
6678
		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6679
		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6680
	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6681
		rm -rf $tpldir~
6682
		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6683
		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6684
		$RANLIB $oldlib'
6685
	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6686
		rm -rf $tpldir~
6687
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6688
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6689
	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6690
		rm -rf $tpldir~
6691
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6692
		$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'
6693
	      ;;
6694
	    *) # Version 6 will use weak symbols
6695
	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6696
	      _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'
6697
	      ;;
6698
	    esac
6699
6700
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6701
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6702
	    _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'
6703
            ;;
6704
	  cxx*)
6705
	    # Compaq C++
6706
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6707
	    _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'
6708
6709
	    runpath_var=LD_RUN_PATH
6710
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6711
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6712
6713
	    # Commands to make compiler produce verbose output that lists
6714
	    # what "hidden" libraries, object files and flags are used when
6715
	    # linking a shared library.
6716
	    #
6717
	    # There doesn't appear to be a way to prevent this compiler from
6718
	    # explicitly linking system object files so we need to strip them
6719
	    # from the output so that they don't get included in the library
6720
	    # dependencies.
6721
	    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'
6722
	    ;;
6723
	  xl*)
6724
	    # IBM XL 8.0 on PPC, with GNU ld
6725
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6726
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6727
	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6728
	    if test "x$supports_anon_versioning" = xyes; then
6729
	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6730
		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6731
		echo "local: *; };" >> $output_objdir/$libname.ver~
6732
		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6733
	    fi
6734
	    ;;
6735
	  *)
6736
	    case `$CC -V 2>&1 | sed 5q` in
6737
	    *Sun\ C*)
6738
	      # Sun C++ 5.9
6739
	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6740
	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6741
	      _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'
6742
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6743
	      _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'
6744
	      _LT_TAGVAR(compiler_needs_object, $1)=yes
6745
6746
	      # Not sure whether something based on
6747
	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6748
	      # would be better.
6749
	      output_verbose_link_cmd='echo'
6750
6751
	      # Archives containing C++ object files must be created using
6752
	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6753
	      # necessary to make sure instantiated templates are included
6754
	      # in the archive.
6755
	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6756
	      ;;
6757
	    esac
6758
	    ;;
6759
	esac
6760
	;;
6761
6762
      lynxos*)
6763
        # FIXME: insert proper C++ library support
6764
	_LT_TAGVAR(ld_shlibs, $1)=no
6765
	;;
6766
6767
      m88k*)
6768
        # FIXME: insert proper C++ library support
6769
        _LT_TAGVAR(ld_shlibs, $1)=no
6770
	;;
6771
6772
      mvs*)
6773
        case $cc_basename in
6774
          cxx*)
6775
	    # FIXME: insert proper C++ library support
6776
	    _LT_TAGVAR(ld_shlibs, $1)=no
6777
	    ;;
6778
	  *)
6779
	    # FIXME: insert proper C++ library support
6780
	    _LT_TAGVAR(ld_shlibs, $1)=no
6781
	    ;;
6782
	esac
6783
	;;
6784
6785
      netbsd*)
6786
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6787
	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6788
	  wlarc=
6789
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6790
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6791
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6792
	fi
6793
	# Workaround some broken pre-1.5 toolchains
6794
	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6795
	;;
6796
6797
      *nto* | *qnx*)
6798
        _LT_TAGVAR(ld_shlibs, $1)=yes
6799
	;;
6800
6801
      openbsd2*)
6802
        # C++ shared libraries are fairly broken
6803
	_LT_TAGVAR(ld_shlibs, $1)=no
6804
	;;
6805
6806
      openbsd*)
6807
	if test -f /usr/libexec/ld.so; then
6808
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6809
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6810
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6811
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6812
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6813
	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6814
	    _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'
6815
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6816
	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6817
	  fi
6818
	  output_verbose_link_cmd=echo
6819
	else
6820
	  _LT_TAGVAR(ld_shlibs, $1)=no
6821
	fi
6822
	;;
6823
6824
      osf3* | osf4* | osf5*)
6825
        case $cc_basename in
6826
          KCC*)
6827
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6828
6829
	    # KCC will only create a shared library if the output file
6830
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6831
	    # to its proper name (with version) after linking.
6832
	    _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'
6833
6834
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6835
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6836
6837
	    # Archives containing C++ object files must be created using
6838
	    # the KAI C++ compiler.
6839
	    case $host in
6840
	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6841
	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6842
	    esac
6843
	    ;;
6844
          RCC*)
6845
	    # Rational C++ 2.4.1
6846
	    # FIXME: insert proper C++ library support
6847
	    _LT_TAGVAR(ld_shlibs, $1)=no
6848
	    ;;
6849
          cxx*)
6850
	    case $host in
6851
	      osf3*)
6852
	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6853
	        _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'
6854
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6855
		;;
6856
	      *)
6857
	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6858
	        _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'
6859
	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6860
	          echo "-hidden">> $lib.exp~
6861
	          $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~
6862
	          $RM $lib.exp'
6863
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6864
		;;
6865
	    esac
6866
6867
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6868
6869
	    # Commands to make compiler produce verbose output that lists
6870
	    # what "hidden" libraries, object files and flags are used when
6871
	    # linking a shared library.
6872
	    #
6873
	    # There doesn't appear to be a way to prevent this compiler from
6874
	    # explicitly linking system object files so we need to strip them
6875
	    # from the output so that they don't get included in the library
6876
	    # dependencies.
6877
	    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'
6878
	    ;;
6879
	  *)
6880
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6881
	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6882
	      case $host in
6883
	        osf3*)
6884
	          _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'
6885
		  ;;
6886
	        *)
6887
	          _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'
6888
		  ;;
6889
	      esac
6890
6891
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6892
	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6893
6894
	      # Commands to make compiler produce verbose output that lists
6895
	      # what "hidden" libraries, object files and flags are used when
6896
	      # linking a shared library.
6897
	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6898
6899
	    else
6900
	      # FIXME: insert proper C++ library support
6901
	      _LT_TAGVAR(ld_shlibs, $1)=no
6902
	    fi
6903
	    ;;
6904
        esac
6905
        ;;
6906
6907
      psos*)
6908
        # FIXME: insert proper C++ library support
6909
        _LT_TAGVAR(ld_shlibs, $1)=no
6910
        ;;
6911
6912
      sunos4*)
6913
        case $cc_basename in
6914
          CC*)
6915
	    # Sun C++ 4.x
6916
	    # FIXME: insert proper C++ library support
6917
	    _LT_TAGVAR(ld_shlibs, $1)=no
6918
	    ;;
6919
          lcc*)
6920
	    # Lucid
6921
	    # FIXME: insert proper C++ library support
6922
	    _LT_TAGVAR(ld_shlibs, $1)=no
6923
	    ;;
6924
          *)
6925
	    # FIXME: insert proper C++ library support
6926
	    _LT_TAGVAR(ld_shlibs, $1)=no
6927
	    ;;
6928
        esac
6929
        ;;
6930
6931
      solaris*)
6932
        case $cc_basename in
6933
          CC*)
6934
	    # Sun C++ 4.2, 5.x and Centerline C++
6935
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6936
	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6937
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6938
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6939
	      $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'
6940
6941
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6942
	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6943
	    case $host_os in
6944
	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6945
	      *)
6946
		# The compiler driver will combine and reorder linker options,
6947
		# but understands `-z linker_flag'.
6948
	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6949
		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6950
	        ;;
6951
	    esac
6952
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6953
6954
	    output_verbose_link_cmd='echo'
6955
6956
	    # Archives containing C++ object files must be created using
6957
	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6958
	    # necessary to make sure instantiated templates are included
6959
	    # in the archive.
6960
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6961
	    ;;
6962
          gcx*)
6963
	    # Green Hills C++ Compiler
6964
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6965
6966
	    # The C++ compiler must be used to create the archive.
6967
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6968
	    ;;
6969
          *)
6970
	    # GNU C++ compiler with Solaris linker
6971
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6972
	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6973
	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6974
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6975
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6976
		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6977
6978
	        # Commands to make compiler produce verbose output that lists
6979
	        # what "hidden" libraries, object files and flags are used when
6980
	        # linking a shared library.
6981
	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6982
	      else
6983
	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6984
	        # platform.
6985
	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6986
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6987
		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6988
6989
	        # Commands to make compiler produce verbose output that lists
6990
	        # what "hidden" libraries, object files and flags are used when
6991
	        # linking a shared library.
6992
	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6993
	      fi
6994
6995
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6996
	      case $host_os in
6997
		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6998
		*)
6999
		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7000
		  ;;
7001
	      esac
7002
	    fi
7003
	    ;;
7004
        esac
7005
        ;;
7006
7007
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7008
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7009
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7010
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7011
      runpath_var='LD_RUN_PATH'
7012
7013
      case $cc_basename in
7014
        CC*)
7015
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7016
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7017
	  ;;
7018
	*)
7019
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7020
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7021
	  ;;
7022
      esac
7023
      ;;
7024
7025
      sysv5* | sco3.2v5* | sco5v6*)
7026
	# Note: We can NOT use -z defs as we might desire, because we do not
7027
	# link with -lc, and that would cause any symbols used from libc to
7028
	# always be unresolved, which means just about no library would
7029
	# ever link correctly.  If we're not using GNU ld we use -z text
7030
	# though, which does catch some bad symbols but isn't as heavy-handed
7031
	# as -z defs.
7032
	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7033
	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7034
	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7035
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7036
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7037
	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7038
	_LT_TAGVAR(link_all_deplibs, $1)=yes
7039
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7040
	runpath_var='LD_RUN_PATH'
7041
7042
	case $cc_basename in
7043
          CC*)
7044
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7045
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7046
	    ;;
7047
	  *)
7048
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7049
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7050
	    ;;
7051
	esac
7052
      ;;
7053
7054
      tandem*)
7055
        case $cc_basename in
7056
          NCC*)
7057
	    # NonStop-UX NCC 3.20
7058
	    # FIXME: insert proper C++ library support
7059
	    _LT_TAGVAR(ld_shlibs, $1)=no
7060
	    ;;
7061
          *)
7062
	    # FIXME: insert proper C++ library support
7063
	    _LT_TAGVAR(ld_shlibs, $1)=no
7064
	    ;;
7065
        esac
7066
        ;;
7067
7068
      vxworks*)
7069
        # FIXME: insert proper C++ library support
7070
        _LT_TAGVAR(ld_shlibs, $1)=no
7071
        ;;
7072
7073
      *)
7074
        # FIXME: insert proper C++ library support
7075
        _LT_TAGVAR(ld_shlibs, $1)=no
7076
        ;;
7077
    esac
7078
7079
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7080
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7081
7082
    _LT_TAGVAR(GCC, $1)="$GXX"
7083
    _LT_TAGVAR(LD, $1)="$LD"
7084
7085
    ## CAVEAT EMPTOR:
7086
    ## There is no encapsulation within the following macros, do not change
7087
    ## the running order or otherwise move them around unless you know exactly
7088
    ## what you are doing...
7089
    _LT_SYS_HIDDEN_LIBDEPS($1)
7090
    _LT_COMPILER_PIC($1)
7091
    _LT_COMPILER_C_O($1)
7092
    _LT_COMPILER_FILE_LOCKS($1)
7093
    _LT_LINKER_SHLIBS($1)
7094
    _LT_SYS_DYNAMIC_LINKER($1)
7095
    _LT_LINKER_HARDCODE_LIBPATH($1)
7096
7097
    _LT_CONFIG($1)
7098
  fi # test -n "$compiler"
7099
7100
  CC=$lt_save_CC
7101
  LDCXX=$LD
7102
  LD=$lt_save_LD
7103
  GCC=$lt_save_GCC
7104
  with_gnu_ld=$lt_save_with_gnu_ld
7105
  lt_cv_path_LDCXX=$lt_cv_path_LD
7106
  lt_cv_path_LD=$lt_save_path_LD
7107
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7108
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7109
fi # test "$_lt_caught_CXX_error" != yes
7110
7111
AC_LANG_POP
7112
])# _LT_LANG_CXX_CONFIG
7113
7114
7115
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
1 by Masahito Omote
Import upstream version 0.3.9
7116
# ---------------------------------
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
7117
# Figure out "hidden" library dependencies from verbose
7118
# compiler output when linking a shared library.
7119
# Parse the compiler output and extract the necessary
7120
# objects, libraries and library flags.
7121
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7122
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7123
# Dependencies to place before and after the object being linked:
7124
_LT_TAGVAR(predep_objects, $1)=
7125
_LT_TAGVAR(postdep_objects, $1)=
7126
_LT_TAGVAR(predeps, $1)=
7127
_LT_TAGVAR(postdeps, $1)=
7128
_LT_TAGVAR(compiler_lib_search_path, $1)=
7129
7130
dnl we can't use the lt_simple_compile_test_code here,
7131
dnl because it contains code intended for an executable,
7132
dnl not a library.  It's possible we should let each
7133
dnl tag define a new lt_????_link_test_code variable,
7134
dnl but it's only used here...
7135
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7136
int a;
7137
void foo (void) { a = 0; }
7138
_LT_EOF
7139
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7140
class Foo
7141
{
7142
public:
7143
  Foo (void) { a = 0; }
7144
private:
7145
  int a;
7146
};
7147
_LT_EOF
7148
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7149
      subroutine foo
7150
      implicit none
7151
      integer*4 a
7152
      a=0
7153
      return
7154
      end
7155
_LT_EOF
7156
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7157
      subroutine foo
7158
      implicit none
7159
      integer a
7160
      a=0
7161
      return
7162
      end
7163
_LT_EOF
7164
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7165
public class foo {
7166
  private int a;
7167
  public void bar (void) {
7168
    a = 0;
7169
  }
7170
};
7171
_LT_EOF
7172
])
7173
dnl Parse the compiler output and extract the necessary
7174
dnl objects, libraries and library flags.
7175
if AC_TRY_EVAL(ac_compile); then
7176
  # Parse the compiler output and extract the necessary
7177
  # objects, libraries and library flags.
7178
7179
  # Sentinel used to keep track of whether or not we are before
7180
  # the conftest object file.
7181
  pre_test_object_deps_done=no
7182
7183
  for p in `eval "$output_verbose_link_cmd"`; do
7184
    case $p in
7185
7186
    -L* | -R* | -l*)
7187
       # Some compilers place space between "-{L,R}" and the path.
7188
       # Remove the space.
7189
       if test $p = "-L" ||
7190
          test $p = "-R"; then
7191
	 prev=$p
7192
	 continue
7193
       else
7194
	 prev=
7195
       fi
7196
7197
       if test "$pre_test_object_deps_done" = no; then
7198
	 case $p in
7199
	 -L* | -R*)
7200
	   # Internal compiler library paths should come after those
7201
	   # provided the user.  The postdeps already come after the
7202
	   # user supplied libs so there is no need to process them.
7203
	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7204
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7205
	   else
7206
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7207
	   fi
7208
	   ;;
7209
	 # The "-l" case would never come before the object being
7210
	 # linked, so don't bother handling this case.
7211
	 esac
7212
       else
7213
	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7214
	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7215
	 else
7216
	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7217
	 fi
7218
       fi
7219
       ;;
7220
7221
    *.$objext)
7222
       # This assumes that the test object file only shows up
7223
       # once in the compiler output.
7224
       if test "$p" = "conftest.$objext"; then
7225
	 pre_test_object_deps_done=yes
7226
	 continue
7227
       fi
7228
7229
       if test "$pre_test_object_deps_done" = no; then
7230
	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7231
	   _LT_TAGVAR(predep_objects, $1)="$p"
7232
	 else
7233
	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7234
	 fi
7235
       else
7236
	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7237
	   _LT_TAGVAR(postdep_objects, $1)="$p"
7238
	 else
7239
	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7240
	 fi
7241
       fi
7242
       ;;
7243
7244
    *) ;; # Ignore the rest.
7245
7246
    esac
7247
  done
7248
7249
  # Clean up.
7250
  rm -f a.out a.exe
1.1.7 by Masahito Omote
Import upstream version 1.4.2
7251
else
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
7252
  echo "libtool.m4: error: problem compiling $1 test program"
7253
fi
7254
7255
$RM -f confest.$objext
7256
7257
# PORTME: override above test on systems where it is broken
7258
m4_if([$1], [CXX],
7259
[case $host_os in
7260
interix[[3-9]]*)
7261
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7262
  # hack all around it, let's just trust "g++" to DTRT.
7263
  _LT_TAGVAR(predep_objects,$1)=
7264
  _LT_TAGVAR(postdep_objects,$1)=
7265
  _LT_TAGVAR(postdeps,$1)=
7266
  ;;
7267
7268
linux*)
7269
  case `$CC -V 2>&1 | sed 5q` in
7270
  *Sun\ C*)
7271
    # Sun C++ 5.9
7272
7273
    # The more standards-conforming stlport4 library is
7274
    # incompatible with the Cstd library. Avoid specifying
7275
    # it if it's in CXXFLAGS. Ignore libCrun as
7276
    # -library=stlport4 depends on it.
7277
    case " $CXX $CXXFLAGS " in
7278
    *" -library=stlport4 "*)
7279
      solaris_use_stlport4=yes
7280
      ;;
7281
    esac
7282
7283
    if test "$solaris_use_stlport4" != yes; then
7284
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7285
    fi
7286
    ;;
7287
  esac
7288
  ;;
7289
7290
solaris*)
7291
  case $cc_basename in
7292
  CC*)
7293
    # The more standards-conforming stlport4 library is
7294
    # incompatible with the Cstd library. Avoid specifying
7295
    # it if it's in CXXFLAGS. Ignore libCrun as
7296
    # -library=stlport4 depends on it.
7297
    case " $CXX $CXXFLAGS " in
7298
    *" -library=stlport4 "*)
7299
      solaris_use_stlport4=yes
7300
      ;;
7301
    esac
7302
7303
    # Adding this requires a known-good setup of shared libraries for
7304
    # Sun compiler versions before 5.6, else PIC objects from an old
7305
    # archive will be linked into the output, leading to subtle bugs.
7306
    if test "$solaris_use_stlport4" != yes; then
7307
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7308
    fi
7309
    ;;
7310
  esac
7311
  ;;
7312
esac
7313
])
7314
7315
case " $_LT_TAGVAR(postdeps, $1) " in
7316
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7317
esac
7318
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7319
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7320
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7321
fi
7322
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7323
    [The directories searched by this compiler when creating a shared library])
7324
_LT_TAGDECL([], [predep_objects], [1],
7325
    [Dependencies to place before and after the objects being linked to
7326
    create a shared library])
7327
_LT_TAGDECL([], [postdep_objects], [1])
7328
_LT_TAGDECL([], [predeps], [1])
7329
_LT_TAGDECL([], [postdeps], [1])
7330
_LT_TAGDECL([], [compiler_lib_search_path], [1],
7331
    [The library search path used internally by the compiler when linking
7332
    a shared library])
7333
])# _LT_SYS_HIDDEN_LIBDEPS
7334
7335
7336
# _LT_PROG_F77
7337
# ------------
7338
# Since AC_PROG_F77 is broken, in that it returns the empty string
7339
# if there is no fortran compiler, we have our own version here.
7340
m4_defun([_LT_PROG_F77],
7341
[
7342
pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7343
AC_PROG_F77
7344
if test -z "$F77" || test "X$F77" = "Xno"; then
7345
  _lt_disable_F77=yes
7346
fi
7347
popdef([AC_MSG_ERROR])
7348
])# _LT_PROG_F77
7349
7350
dnl aclocal-1.4 backwards compatibility:
7351
dnl AC_DEFUN([_LT_PROG_F77], [])
7352
7353
7354
# _LT_LANG_F77_CONFIG([TAG])
7355
# --------------------------
7356
# Ensure that the configuration variables for a Fortran 77 compiler are
7357
# suitably defined.  These variables are subsequently used by _LT_CONFIG
7358
# to write the compiler configuration to `libtool'.
7359
m4_defun([_LT_LANG_F77_CONFIG],
7360
[AC_REQUIRE([_LT_PROG_F77])dnl
7361
AC_LANG_PUSH(Fortran 77)
7362
7363
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7364
_LT_TAGVAR(allow_undefined_flag, $1)=
7365
_LT_TAGVAR(always_export_symbols, $1)=no
7366
_LT_TAGVAR(archive_expsym_cmds, $1)=
7367
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7368
_LT_TAGVAR(hardcode_direct, $1)=no
7369
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7370
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7371
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7372
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7373
_LT_TAGVAR(hardcode_minus_L, $1)=no
7374
_LT_TAGVAR(hardcode_automatic, $1)=no
7375
_LT_TAGVAR(inherit_rpath, $1)=no
7376
_LT_TAGVAR(module_cmds, $1)=
7377
_LT_TAGVAR(module_expsym_cmds, $1)=
7378
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7379
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7380
_LT_TAGVAR(no_undefined_flag, $1)=
7381
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7382
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7383
7384
# Source file extension for f77 test sources.
7385
ac_ext=f
7386
7387
# Object file extension for compiled f77 test sources.
7388
objext=o
7389
_LT_TAGVAR(objext, $1)=$objext
7390
7391
# No sense in running all these tests if we already determined that
7392
# the F77 compiler isn't working.  Some variables (like enable_shared)
7393
# are currently assumed to apply to all compilers on this platform,
7394
# and will be corrupted by setting them based on a non-working compiler.
7395
if test "$_lt_disable_F77" != yes; then
7396
  # Code to be used in simple compile tests
7397
  lt_simple_compile_test_code="\
7398
      subroutine t
7399
      return
7400
      end
7401
"
7402
7403
  # Code to be used in simple link tests
7404
  lt_simple_link_test_code="\
7405
      program t
7406
      end
7407
"
7408
7409
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7410
  _LT_TAG_COMPILER
7411
7412
  # save warnings/boilerplate of simple test code
7413
  _LT_COMPILER_BOILERPLATE
7414
  _LT_LINKER_BOILERPLATE
7415
7416
  # Allow CC to be a program name with arguments.
7417
  lt_save_CC="$CC"
7418
  lt_save_GCC=$GCC
7419
  CC=${F77-"f77"}
7420
  compiler=$CC
7421
  _LT_TAGVAR(compiler, $1)=$CC
7422
  _LT_CC_BASENAME([$compiler])
7423
  GCC=$G77
7424
  if test -n "$compiler"; then
7425
    AC_MSG_CHECKING([if libtool supports shared libraries])
7426
    AC_MSG_RESULT([$can_build_shared])
7427
7428
    AC_MSG_CHECKING([whether to build shared libraries])
7429
    test "$can_build_shared" = "no" && enable_shared=no
7430
7431
    # On AIX, shared libraries and static libraries use the same namespace, and
7432
    # are all built from PIC.
7433
    case $host_os in
7434
      aix3*)
7435
        test "$enable_shared" = yes && enable_static=no
7436
        if test -n "$RANLIB"; then
7437
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7438
          postinstall_cmds='$RANLIB $lib'
7439
        fi
7440
        ;;
7441
      aix[[4-9]]*)
7442
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7443
	  test "$enable_shared" = yes && enable_static=no
7444
	fi
7445
        ;;
7446
    esac
7447
    AC_MSG_RESULT([$enable_shared])
7448
7449
    AC_MSG_CHECKING([whether to build static libraries])
7450
    # Make sure either enable_shared or enable_static is yes.
7451
    test "$enable_shared" = yes || enable_static=yes
7452
    AC_MSG_RESULT([$enable_static])
7453
7454
    _LT_TAGVAR(GCC, $1)="$G77"
7455
    _LT_TAGVAR(LD, $1)="$LD"
7456
7457
    ## CAVEAT EMPTOR:
7458
    ## There is no encapsulation within the following macros, do not change
7459
    ## the running order or otherwise move them around unless you know exactly
7460
    ## what you are doing...
7461
    _LT_COMPILER_PIC($1)
7462
    _LT_COMPILER_C_O($1)
7463
    _LT_COMPILER_FILE_LOCKS($1)
7464
    _LT_LINKER_SHLIBS($1)
7465
    _LT_SYS_DYNAMIC_LINKER($1)
7466
    _LT_LINKER_HARDCODE_LIBPATH($1)
7467
7468
    _LT_CONFIG($1)
7469
  fi # test -n "$compiler"
7470
7471
  GCC=$lt_save_GCC
7472
  CC="$lt_save_CC"
7473
fi # test "$_lt_disable_F77" != yes
7474
7475
AC_LANG_POP
7476
])# _LT_LANG_F77_CONFIG
7477
7478
7479
# _LT_PROG_FC
7480
# -----------
7481
# Since AC_PROG_FC is broken, in that it returns the empty string
7482
# if there is no fortran compiler, we have our own version here.
7483
m4_defun([_LT_PROG_FC],
7484
[
7485
pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7486
AC_PROG_FC
7487
if test -z "$FC" || test "X$FC" = "Xno"; then
7488
  _lt_disable_FC=yes
7489
fi
7490
popdef([AC_MSG_ERROR])
7491
])# _LT_PROG_FC
7492
7493
dnl aclocal-1.4 backwards compatibility:
7494
dnl AC_DEFUN([_LT_PROG_FC], [])
7495
7496
7497
# _LT_LANG_FC_CONFIG([TAG])
7498
# -------------------------
7499
# Ensure that the configuration variables for a Fortran compiler are
7500
# suitably defined.  These variables are subsequently used by _LT_CONFIG
7501
# to write the compiler configuration to `libtool'.
7502
m4_defun([_LT_LANG_FC_CONFIG],
7503
[AC_REQUIRE([_LT_PROG_FC])dnl
7504
AC_LANG_PUSH(Fortran)
7505
7506
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7507
_LT_TAGVAR(allow_undefined_flag, $1)=
7508
_LT_TAGVAR(always_export_symbols, $1)=no
7509
_LT_TAGVAR(archive_expsym_cmds, $1)=
7510
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7511
_LT_TAGVAR(hardcode_direct, $1)=no
7512
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7513
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7514
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7515
_LT_TAGVAR(hardcode_libdir_separator, $1)=
7516
_LT_TAGVAR(hardcode_minus_L, $1)=no
7517
_LT_TAGVAR(hardcode_automatic, $1)=no
7518
_LT_TAGVAR(inherit_rpath, $1)=no
7519
_LT_TAGVAR(module_cmds, $1)=
7520
_LT_TAGVAR(module_expsym_cmds, $1)=
7521
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7522
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7523
_LT_TAGVAR(no_undefined_flag, $1)=
7524
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7525
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7526
7527
# Source file extension for fc test sources.
7528
ac_ext=${ac_fc_srcext-f}
7529
7530
# Object file extension for compiled fc test sources.
7531
objext=o
7532
_LT_TAGVAR(objext, $1)=$objext
7533
7534
# No sense in running all these tests if we already determined that
7535
# the FC compiler isn't working.  Some variables (like enable_shared)
7536
# are currently assumed to apply to all compilers on this platform,
7537
# and will be corrupted by setting them based on a non-working compiler.
7538
if test "$_lt_disable_FC" != yes; then
7539
  # Code to be used in simple compile tests
7540
  lt_simple_compile_test_code="\
7541
      subroutine t
7542
      return
7543
      end
7544
"
7545
7546
  # Code to be used in simple link tests
7547
  lt_simple_link_test_code="\
7548
      program t
7549
      end
7550
"
7551
7552
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7553
  _LT_TAG_COMPILER
7554
7555
  # save warnings/boilerplate of simple test code
7556
  _LT_COMPILER_BOILERPLATE
7557
  _LT_LINKER_BOILERPLATE
7558
7559
  # Allow CC to be a program name with arguments.
7560
  lt_save_CC="$CC"
7561
  lt_save_GCC=$GCC
7562
  CC=${FC-"f95"}
7563
  compiler=$CC
7564
  GCC=$ac_cv_fc_compiler_gnu
7565
7566
  _LT_TAGVAR(compiler, $1)=$CC
7567
  _LT_CC_BASENAME([$compiler])
7568
7569
  if test -n "$compiler"; then
7570
    AC_MSG_CHECKING([if libtool supports shared libraries])
7571
    AC_MSG_RESULT([$can_build_shared])
7572
7573
    AC_MSG_CHECKING([whether to build shared libraries])
7574
    test "$can_build_shared" = "no" && enable_shared=no
7575
7576
    # On AIX, shared libraries and static libraries use the same namespace, and
7577
    # are all built from PIC.
7578
    case $host_os in
7579
      aix3*)
7580
        test "$enable_shared" = yes && enable_static=no
7581
        if test -n "$RANLIB"; then
7582
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7583
          postinstall_cmds='$RANLIB $lib'
7584
        fi
7585
        ;;
7586
      aix[[4-9]]*)
7587
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7588
	  test "$enable_shared" = yes && enable_static=no
7589
	fi
7590
        ;;
7591
    esac
7592
    AC_MSG_RESULT([$enable_shared])
7593
7594
    AC_MSG_CHECKING([whether to build static libraries])
7595
    # Make sure either enable_shared or enable_static is yes.
7596
    test "$enable_shared" = yes || enable_static=yes
7597
    AC_MSG_RESULT([$enable_static])
7598
7599
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7600
    _LT_TAGVAR(LD, $1)="$LD"
7601
7602
    ## CAVEAT EMPTOR:
7603
    ## There is no encapsulation within the following macros, do not change
7604
    ## the running order or otherwise move them around unless you know exactly
7605
    ## what you are doing...
7606
    _LT_SYS_HIDDEN_LIBDEPS($1)
7607
    _LT_COMPILER_PIC($1)
7608
    _LT_COMPILER_C_O($1)
7609
    _LT_COMPILER_FILE_LOCKS($1)
7610
    _LT_LINKER_SHLIBS($1)
7611
    _LT_SYS_DYNAMIC_LINKER($1)
7612
    _LT_LINKER_HARDCODE_LIBPATH($1)
7613
7614
    _LT_CONFIG($1)
7615
  fi # test -n "$compiler"
7616
7617
  GCC=$lt_save_GCC
7618
  CC="$lt_save_CC"
7619
fi # test "$_lt_disable_FC" != yes
7620
7621
AC_LANG_POP
7622
])# _LT_LANG_FC_CONFIG
7623
7624
7625
# _LT_LANG_GCJ_CONFIG([TAG])
7626
# --------------------------
7627
# Ensure that the configuration variables for the GNU Java Compiler compiler
7628
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7629
# to write the compiler configuration to `libtool'.
7630
m4_defun([_LT_LANG_GCJ_CONFIG],
7631
[AC_REQUIRE([LT_PROG_GCJ])dnl
7632
AC_LANG_SAVE
7633
7634
# Source file extension for Java test sources.
7635
ac_ext=java
7636
7637
# Object file extension for compiled Java test sources.
7638
objext=o
7639
_LT_TAGVAR(objext, $1)=$objext
7640
7641
# Code to be used in simple compile tests
7642
lt_simple_compile_test_code="class foo {}"
7643
7644
# Code to be used in simple link tests
7645
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7646
7647
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7648
_LT_TAG_COMPILER
7649
7650
# save warnings/boilerplate of simple test code
7651
_LT_COMPILER_BOILERPLATE
7652
_LT_LINKER_BOILERPLATE
7653
7654
# Allow CC to be a program name with arguments.
7655
lt_save_CC="$CC"
7656
lt_save_GCC=$GCC
7657
GCC=yes
7658
CC=${GCJ-"gcj"}
7659
compiler=$CC
7660
_LT_TAGVAR(compiler, $1)=$CC
7661
_LT_TAGVAR(LD, $1)="$LD"
7662
_LT_CC_BASENAME([$compiler])
7663
7664
# GCJ did not exist at the time GCC didn't implicitly link libc in.
7665
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7666
7667
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7668
7669
if test -n "$compiler"; then
7670
  _LT_COMPILER_NO_RTTI($1)
7671
  _LT_COMPILER_PIC($1)
7672
  _LT_COMPILER_C_O($1)
7673
  _LT_COMPILER_FILE_LOCKS($1)
7674
  _LT_LINKER_SHLIBS($1)
7675
  _LT_LINKER_HARDCODE_LIBPATH($1)
7676
7677
  _LT_CONFIG($1)
7678
fi
7679
7680
AC_LANG_RESTORE
7681
7682
GCC=$lt_save_GCC
7683
CC="$lt_save_CC"
7684
])# _LT_LANG_GCJ_CONFIG
7685
7686
7687
# _LT_LANG_RC_CONFIG([TAG])
7688
# -------------------------
7689
# Ensure that the configuration variables for the Windows resource compiler
7690
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7691
# to write the compiler configuration to `libtool'.
7692
m4_defun([_LT_LANG_RC_CONFIG],
7693
[AC_REQUIRE([LT_PROG_RC])dnl
7694
AC_LANG_SAVE
7695
7696
# Source file extension for RC test sources.
7697
ac_ext=rc
7698
7699
# Object file extension for compiled RC test sources.
7700
objext=o
7701
_LT_TAGVAR(objext, $1)=$objext
7702
7703
# Code to be used in simple compile tests
7704
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7705
7706
# Code to be used in simple link tests
7707
lt_simple_link_test_code="$lt_simple_compile_test_code"
7708
7709
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7710
_LT_TAG_COMPILER
7711
7712
# save warnings/boilerplate of simple test code
7713
_LT_COMPILER_BOILERPLATE
7714
_LT_LINKER_BOILERPLATE
7715
7716
# Allow CC to be a program name with arguments.
7717
lt_save_CC="$CC"
7718
lt_save_GCC=$GCC
7719
GCC=
7720
CC=${RC-"windres"}
7721
compiler=$CC
7722
_LT_TAGVAR(compiler, $1)=$CC
7723
_LT_CC_BASENAME([$compiler])
7724
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7725
7726
if test -n "$compiler"; then
7727
  :
7728
  _LT_CONFIG($1)
7729
fi
7730
7731
GCC=$lt_save_GCC
7732
AC_LANG_RESTORE
7733
CC="$lt_save_CC"
7734
])# _LT_LANG_RC_CONFIG
7735
7736
7737
# LT_PROG_GCJ
7738
# -----------
7739
AC_DEFUN([LT_PROG_GCJ],
7740
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7741
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7742
    [AC_CHECK_TOOL(GCJ, gcj,)
7743
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7744
      AC_SUBST(GCJFLAGS)])])[]dnl
7745
])
7746
7747
# Old name:
7748
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7749
dnl aclocal-1.4 backwards compatibility:
7750
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7751
7752
7753
# LT_PROG_RC
7754
# ----------
7755
AC_DEFUN([LT_PROG_RC],
7756
[AC_CHECK_TOOL(RC, windres,)
7757
])
7758
7759
# Old name:
7760
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7761
dnl aclocal-1.4 backwards compatibility:
7762
dnl AC_DEFUN([LT_AC_PROG_RC], [])
7763
7764
7765
# _LT_DECL_EGREP
7766
# --------------
7767
# If we don't have a new enough Autoconf to choose the best grep
7768
# available, choose the one first in the user's PATH.
7769
m4_defun([_LT_DECL_EGREP],
7770
[AC_REQUIRE([AC_PROG_EGREP])dnl
7771
AC_REQUIRE([AC_PROG_FGREP])dnl
7772
test -z "$GREP" && GREP=grep
7773
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7774
_LT_DECL([], [EGREP], [1], [An ERE matcher])
7775
_LT_DECL([], [FGREP], [1], [A literal string matcher])
7776
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7777
AC_SUBST([GREP])
7778
])
7779
7780
7781
# _LT_DECL_OBJDUMP
7782
# --------------
7783
# If we don't have a new enough Autoconf to choose the best objdump
7784
# available, choose the one first in the user's PATH.
7785
m4_defun([_LT_DECL_OBJDUMP],
7786
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7787
test -z "$OBJDUMP" && OBJDUMP=objdump
7788
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7789
AC_SUBST([OBJDUMP])
7790
])
7791
7792
7793
# _LT_DECL_SED
7794
# ------------
7795
# Check for a fully-functional sed program, that truncates
7796
# as few characters as possible.  Prefer GNU sed if found.
7797
m4_defun([_LT_DECL_SED],
7798
[AC_PROG_SED
7799
test -z "$SED" && SED=sed
7800
Xsed="$SED -e 1s/^X//"
7801
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7802
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7803
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7804
])# _LT_DECL_SED
7805
7806
m4_ifndef([AC_PROG_SED], [
1 by Masahito Omote
Import upstream version 0.3.9
7807
# NOTE: This macro has been submitted for inclusion into   #
7808
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7809
#  a released version of Autoconf we should remove this    #
7810
#  macro and use it instead.                               #
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
7811
7812
m4_defun([AC_PROG_SED],
1 by Masahito Omote
Import upstream version 0.3.9
7813
[AC_MSG_CHECKING([for a sed that does not truncate output])
7814
AC_CACHE_VAL(lt_cv_path_SED,
7815
[# Loop through the user's path and test for sed and gsed.
7816
# Then use that list of sed's as ones to test for truncation.
7817
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7818
for as_dir in $PATH
7819
do
7820
  IFS=$as_save_IFS
7821
  test -z "$as_dir" && as_dir=.
7822
  for lt_ac_prog in sed gsed; do
7823
    for ac_exec_ext in '' $ac_executable_extensions; do
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
7824
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
1 by Masahito Omote
Import upstream version 0.3.9
7825
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7826
      fi
7827
    done
7828
  done
7829
done
1.1.6 by Masahito Omote
Import upstream version 1.4.1
7830
IFS=$as_save_IFS
1 by Masahito Omote
Import upstream version 0.3.9
7831
lt_ac_max=0
7832
lt_ac_count=0
7833
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7834
# along with /bin/sed that truncates output.
7835
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
1.1.3 by Masahito Omote
Import upstream version 1.0.0
7836
  test ! -f $lt_ac_sed && continue
1 by Masahito Omote
Import upstream version 0.3.9
7837
  cat /dev/null > conftest.in
7838
  lt_ac_count=0
7839
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7840
  # Check for GNU sed and select it if it is found.
7841
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7842
    lt_cv_path_SED=$lt_ac_sed
7843
    break
7844
  fi
7845
  while true; do
7846
    cat conftest.in conftest.in >conftest.tmp
7847
    mv conftest.tmp conftest.in
7848
    cp conftest.in conftest.nl
7849
    echo >>conftest.nl
7850
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7851
    cmp -s conftest.out conftest.nl || break
7852
    # 10000 chars as input seems more than enough
7853
    test $lt_ac_count -gt 10 && break
7854
    lt_ac_count=`expr $lt_ac_count + 1`
7855
    if test $lt_ac_count -gt $lt_ac_max; then
7856
      lt_ac_max=$lt_ac_count
7857
      lt_cv_path_SED=$lt_ac_sed
7858
    fi
7859
  done
7860
done
1.1.3 by Masahito Omote
Import upstream version 1.0.0
7861
])
1 by Masahito Omote
Import upstream version 0.3.9
7862
SED=$lt_cv_path_SED
1.1.6 by Masahito Omote
Import upstream version 1.4.1
7863
AC_SUBST([SED])
1 by Masahito Omote
Import upstream version 0.3.9
7864
AC_MSG_RESULT([$SED])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
7865
])#AC_PROG_SED
7866
])#m4_ifndef
7867
7868
# Old name:
7869
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7870
dnl aclocal-1.4 backwards compatibility:
7871
dnl AC_DEFUN([LT_AC_PROG_SED], [])
7872
7873
7874
# _LT_CHECK_SHELL_FEATURES
7875
# ------------------------
7876
# Find out whether the shell is Bourne or XSI compatible,
7877
# or has some other useful features.
7878
m4_defun([_LT_CHECK_SHELL_FEATURES],
7879
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7880
# Try some XSI features
7881
xsi_shell=no
7882
( _lt_dummy="a/b/c"
7883
  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7884
      = c,a/b,, \
7885
    && eval 'test $(( 1 + 1 )) -eq 2 \
7886
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7887
  && xsi_shell=yes
7888
AC_MSG_RESULT([$xsi_shell])
7889
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7890
7891
AC_MSG_CHECKING([whether the shell understands "+="])
7892
lt_shell_append=no
7893
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7894
    >/dev/null 2>&1 \
7895
  && lt_shell_append=yes
7896
AC_MSG_RESULT([$lt_shell_append])
7897
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7898
7899
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7900
  lt_unset=unset
7901
else
7902
  lt_unset=false
7903
fi
7904
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7905
7906
# test EBCDIC or ASCII
7907
case `echo X|tr X '\101'` in
7908
 A) # ASCII based system
7909
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7910
  lt_SP2NL='tr \040 \012'
7911
  lt_NL2SP='tr \015\012 \040\040'
7912
  ;;
7913
 *) # EBCDIC based system
7914
  lt_SP2NL='tr \100 \n'
7915
  lt_NL2SP='tr \r\n \100\100'
7916
  ;;
7917
esac
7918
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7919
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7920
])# _LT_CHECK_SHELL_FEATURES
7921
7922
7923
# _LT_PROG_XSI_SHELLFNS
7924
# ---------------------
7925
# Bourne and XSI compatible variants of some useful shell functions.
7926
m4_defun([_LT_PROG_XSI_SHELLFNS],
7927
[case $xsi_shell in
7928
  yes)
7929
    cat << \_LT_EOF >> "$cfgfile"
7930
7931
# func_dirname file append nondir_replacement
7932
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7933
# otherwise set result to NONDIR_REPLACEMENT.
7934
func_dirname ()
7935
{
7936
  case ${1} in
7937
    */*) func_dirname_result="${1%/*}${2}" ;;
7938
    *  ) func_dirname_result="${3}" ;;
7939
  esac
7940
}
7941
7942
# func_basename file
7943
func_basename ()
7944
{
7945
  func_basename_result="${1##*/}"
7946
}
7947
7948
# func_dirname_and_basename file append nondir_replacement
7949
# perform func_basename and func_dirname in a single function
7950
# call:
7951
#   dirname:  Compute the dirname of FILE.  If nonempty,
7952
#             add APPEND to the result, otherwise set result
7953
#             to NONDIR_REPLACEMENT.
7954
#             value returned in "$func_dirname_result"
7955
#   basename: Compute filename of FILE.
7956
#             value retuned in "$func_basename_result"
7957
# Implementation must be kept synchronized with func_dirname
7958
# and func_basename. For efficiency, we do not delegate to
7959
# those functions but instead duplicate the functionality here.
7960
func_dirname_and_basename ()
7961
{
7962
  case ${1} in
7963
    */*) func_dirname_result="${1%/*}${2}" ;;
7964
    *  ) func_dirname_result="${3}" ;;
7965
  esac
7966
  func_basename_result="${1##*/}"
7967
}
7968
7969
# func_stripname prefix suffix name
7970
# strip PREFIX and SUFFIX off of NAME.
7971
# PREFIX and SUFFIX must not contain globbing or regex special
7972
# characters, hashes, percent signs, but SUFFIX may contain a leading
7973
# dot (in which case that matches only a dot).
7974
func_stripname ()
7975
{
7976
  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7977
  # positional parameters, so assign one to ordinary parameter first.
7978
  func_stripname_result=${3}
7979
  func_stripname_result=${func_stripname_result#"${1}"}
7980
  func_stripname_result=${func_stripname_result%"${2}"}
7981
}
7982
7983
# func_opt_split
7984
func_opt_split ()
7985
{
7986
  func_opt_split_opt=${1%%=*}
7987
  func_opt_split_arg=${1#*=}
7988
}
7989
7990
# func_lo2o object
7991
func_lo2o ()
7992
{
7993
  case ${1} in
7994
    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7995
    *)    func_lo2o_result=${1} ;;
7996
  esac
7997
}
7998
7999
# func_xform libobj-or-source
8000
func_xform ()
8001
{
8002
  func_xform_result=${1%.*}.lo
8003
}
8004
8005
# func_arith arithmetic-term...
8006
func_arith ()
8007
{
8008
  func_arith_result=$(( $[*] ))
8009
}
8010
8011
# func_len string
8012
# STRING may not start with a hyphen.
8013
func_len ()
8014
{
8015
  func_len_result=${#1}
8016
}
8017
8018
_LT_EOF
8019
    ;;
8020
  *) # Bourne compatible functions.
8021
    cat << \_LT_EOF >> "$cfgfile"
8022
8023
# func_dirname file append nondir_replacement
8024
# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8025
# otherwise set result to NONDIR_REPLACEMENT.
8026
func_dirname ()
8027
{
8028
  # Extract subdirectory from the argument.
8029
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8030
  if test "X$func_dirname_result" = "X${1}"; then
8031
    func_dirname_result="${3}"
8032
  else
8033
    func_dirname_result="$func_dirname_result${2}"
8034
  fi
8035
}
8036
8037
# func_basename file
8038
func_basename ()
8039
{
8040
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8041
}
8042
8043
dnl func_dirname_and_basename
8044
dnl A portable version of this function is already defined in general.m4sh
8045
dnl so there is no need for it here.
8046
8047
# func_stripname prefix suffix name
8048
# strip PREFIX and SUFFIX off of NAME.
8049
# PREFIX and SUFFIX must not contain globbing or regex special
8050
# characters, hashes, percent signs, but SUFFIX may contain a leading
8051
# dot (in which case that matches only a dot).
8052
# func_strip_suffix prefix name
8053
func_stripname ()
8054
{
8055
  case ${2} in
8056
    .*) func_stripname_result=`$ECHO "X${3}" \
8057
           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8058
    *)  func_stripname_result=`$ECHO "X${3}" \
8059
           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8060
  esac
8061
}
8062
8063
# sed scripts:
8064
my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8065
my_sed_long_arg='1s/^-[[^=]]*=//'
8066
8067
# func_opt_split
8068
func_opt_split ()
8069
{
8070
  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8071
  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8072
}
8073
8074
# func_lo2o object
8075
func_lo2o ()
8076
{
8077
  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8078
}
8079
8080
# func_xform libobj-or-source
8081
func_xform ()
8082
{
8083
  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8084
}
8085
8086
# func_arith arithmetic-term...
8087
func_arith ()
8088
{
8089
  func_arith_result=`expr "$[@]"`
8090
}
8091
8092
# func_len string
8093
# STRING may not start with a hyphen.
8094
func_len ()
8095
{
8096
  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8097
}
8098
8099
_LT_EOF
8100
esac
8101
8102
case $lt_shell_append in
8103
  yes)
8104
    cat << \_LT_EOF >> "$cfgfile"
8105
8106
# func_append var value
8107
# Append VALUE to the end of shell variable VAR.
8108
func_append ()
8109
{
8110
  eval "$[1]+=\$[2]"
8111
}
8112
_LT_EOF
8113
    ;;
8114
  *)
8115
    cat << \_LT_EOF >> "$cfgfile"
8116
8117
# func_append var value
8118
# Append VALUE to the end of shell variable VAR.
8119
func_append ()
8120
{
8121
  eval "$[1]=\$$[1]\$[2]"
8122
}
8123
8124
_LT_EOF
8125
    ;;
8126
  esac
8127
])
8128
8129
# Helper functions for option handling.                    -*- Autoconf -*-
8130
#
8131
#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8132
#   Written by Gary V. Vaughan, 2004
8133
#
8134
# This file is free software; the Free Software Foundation gives
8135
# unlimited permission to copy and/or distribute it, with or without
8136
# modifications, as long as this notice is preserved.
8137
8138
# serial 6 ltoptions.m4
8139
8140
# This is to help aclocal find these macros, as it can't see m4_define.
8141
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8142
8143
8144
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8145
# ------------------------------------------
8146
m4_define([_LT_MANGLE_OPTION],
8147
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8148
8149
8150
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8151
# ---------------------------------------
8152
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8153
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8154
# saved as a flag.
8155
m4_define([_LT_SET_OPTION],
8156
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8157
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8158
        _LT_MANGLE_DEFUN([$1], [$2]),
8159
    [m4_warning([Unknown $1 option `$2'])])[]dnl
8160
])
8161
8162
8163
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8164
# ------------------------------------------------------------
8165
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8166
m4_define([_LT_IF_OPTION],
8167
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8168
8169
8170
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8171
# -------------------------------------------------------
8172
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8173
# are set.
8174
m4_define([_LT_UNLESS_OPTIONS],
8175
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8176
	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8177
		      [m4_define([$0_found])])])[]dnl
8178
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8179
])[]dnl
8180
])
8181
8182
8183
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8184
# ----------------------------------------
8185
# OPTION-LIST is a space-separated list of Libtool options associated
8186
# with MACRO-NAME.  If any OPTION has a matching handler declared with
8187
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8188
# the unknown option and exit.
8189
m4_defun([_LT_SET_OPTIONS],
8190
[# Set options
8191
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8192
    [_LT_SET_OPTION([$1], _LT_Option)])
8193
8194
m4_if([$1],[LT_INIT],[
8195
  dnl
8196
  dnl Simply set some default values (i.e off) if boolean options were not
8197
  dnl specified:
8198
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8199
  ])
8200
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8201
  ])
8202
  dnl
8203
  dnl If no reference was made to various pairs of opposing options, then
8204
  dnl we run the default mode handler for the pair.  For example, if neither
8205
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8206
  dnl archives by default:
8207
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8208
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8209
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8210
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8211
  		   [_LT_ENABLE_FAST_INSTALL])
8212
  ])
8213
])# _LT_SET_OPTIONS
8214
8215
8216
8217
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8218
# -----------------------------------------
8219
m4_define([_LT_MANGLE_DEFUN],
8220
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8221
8222
8223
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8224
# -----------------------------------------------
8225
m4_define([LT_OPTION_DEFINE],
8226
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8227
])# LT_OPTION_DEFINE
8228
8229
8230
# dlopen
8231
# ------
8232
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8233
])
8234
8235
AU_DEFUN([AC_LIBTOOL_DLOPEN],
8236
[_LT_SET_OPTION([LT_INIT], [dlopen])
8237
AC_DIAGNOSE([obsolete],
8238
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8239
put the `dlopen' option into LT_INIT's first parameter.])
8240
])
8241
8242
dnl aclocal-1.4 backwards compatibility:
8243
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8244
8245
8246
# win32-dll
8247
# ---------
8248
# Declare package support for building win32 dll's.
8249
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8250
[enable_win32_dll=yes
8251
8252
case $host in
8253
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8254
  AC_CHECK_TOOL(AS, as, false)
8255
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8256
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8257
  ;;
8258
esac
8259
8260
test -z "$AS" && AS=as
8261
_LT_DECL([], [AS],      [0], [Assembler program])dnl
8262
8263
test -z "$DLLTOOL" && DLLTOOL=dlltool
8264
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8265
8266
test -z "$OBJDUMP" && OBJDUMP=objdump
8267
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8268
])# win32-dll
8269
8270
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8271
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8272
_LT_SET_OPTION([LT_INIT], [win32-dll])
8273
AC_DIAGNOSE([obsolete],
8274
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8275
put the `win32-dll' option into LT_INIT's first parameter.])
8276
])
8277
8278
dnl aclocal-1.4 backwards compatibility:
8279
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8280
8281
8282
# _LT_ENABLE_SHARED([DEFAULT])
8283
# ----------------------------
8284
# implement the --enable-shared flag, and supports the `shared' and
8285
# `disable-shared' LT_INIT options.
8286
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8287
m4_define([_LT_ENABLE_SHARED],
8288
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8289
AC_ARG_ENABLE([shared],
8290
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8291
	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8292
    [p=${PACKAGE-default}
8293
    case $enableval in
8294
    yes) enable_shared=yes ;;
8295
    no) enable_shared=no ;;
8296
    *)
8297
      enable_shared=no
8298
      # Look at the argument we got.  We use all the common list separators.
8299
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8300
      for pkg in $enableval; do
8301
	IFS="$lt_save_ifs"
8302
	if test "X$pkg" = "X$p"; then
8303
	  enable_shared=yes
8304
	fi
8305
      done
8306
      IFS="$lt_save_ifs"
8307
      ;;
8308
    esac],
8309
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8310
8311
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8312
	[Whether or not to build shared libraries])
8313
])# _LT_ENABLE_SHARED
8314
8315
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8316
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8317
8318
# Old names:
8319
AC_DEFUN([AC_ENABLE_SHARED],
8320
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8321
])
8322
8323
AC_DEFUN([AC_DISABLE_SHARED],
8324
[_LT_SET_OPTION([LT_INIT], [disable-shared])
8325
])
8326
8327
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8328
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8329
8330
dnl aclocal-1.4 backwards compatibility:
8331
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8332
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8333
8334
8335
8336
# _LT_ENABLE_STATIC([DEFAULT])
8337
# ----------------------------
8338
# implement the --enable-static flag, and support the `static' and
8339
# `disable-static' LT_INIT options.
8340
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8341
m4_define([_LT_ENABLE_STATIC],
8342
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8343
AC_ARG_ENABLE([static],
8344
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8345
	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8346
    [p=${PACKAGE-default}
8347
    case $enableval in
8348
    yes) enable_static=yes ;;
8349
    no) enable_static=no ;;
8350
    *)
8351
     enable_static=no
8352
      # Look at the argument we got.  We use all the common list separators.
8353
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8354
      for pkg in $enableval; do
8355
	IFS="$lt_save_ifs"
8356
	if test "X$pkg" = "X$p"; then
8357
	  enable_static=yes
8358
	fi
8359
      done
8360
      IFS="$lt_save_ifs"
8361
      ;;
8362
    esac],
8363
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8364
8365
    _LT_DECL([build_old_libs], [enable_static], [0],
8366
	[Whether or not to build static libraries])
8367
])# _LT_ENABLE_STATIC
8368
8369
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8370
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8371
8372
# Old names:
8373
AC_DEFUN([AC_ENABLE_STATIC],
8374
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8375
])
8376
8377
AC_DEFUN([AC_DISABLE_STATIC],
8378
[_LT_SET_OPTION([LT_INIT], [disable-static])
8379
])
8380
8381
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8382
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8383
8384
dnl aclocal-1.4 backwards compatibility:
8385
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8386
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8387
8388
8389
8390
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8391
# ----------------------------------
8392
# implement the --enable-fast-install flag, and support the `fast-install'
8393
# and `disable-fast-install' LT_INIT options.
8394
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8395
m4_define([_LT_ENABLE_FAST_INSTALL],
8396
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8397
AC_ARG_ENABLE([fast-install],
8398
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8399
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8400
    [p=${PACKAGE-default}
8401
    case $enableval in
8402
    yes) enable_fast_install=yes ;;
8403
    no) enable_fast_install=no ;;
8404
    *)
8405
      enable_fast_install=no
8406
      # Look at the argument we got.  We use all the common list separators.
8407
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8408
      for pkg in $enableval; do
8409
	IFS="$lt_save_ifs"
8410
	if test "X$pkg" = "X$p"; then
8411
	  enable_fast_install=yes
8412
	fi
8413
      done
8414
      IFS="$lt_save_ifs"
8415
      ;;
8416
    esac],
8417
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8418
8419
_LT_DECL([fast_install], [enable_fast_install], [0],
8420
	 [Whether or not to optimize for fast installation])dnl
8421
])# _LT_ENABLE_FAST_INSTALL
8422
8423
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8424
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8425
8426
# Old names:
8427
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8428
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8429
AC_DIAGNOSE([obsolete],
8430
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8431
the `fast-install' option into LT_INIT's first parameter.])
8432
])
8433
8434
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8435
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8436
AC_DIAGNOSE([obsolete],
8437
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8438
the `disable-fast-install' option into LT_INIT's first parameter.])
8439
])
8440
8441
dnl aclocal-1.4 backwards compatibility:
8442
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8443
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8444
8445
8446
# _LT_WITH_PIC([MODE])
8447
# --------------------
8448
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
8449
# LT_INIT options.
8450
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
8451
m4_define([_LT_WITH_PIC],
8452
[AC_ARG_WITH([pic],
8453
    [AS_HELP_STRING([--with-pic],
8454
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8455
    [pic_mode="$withval"],
8456
    [pic_mode=default])
8457
8458
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8459
8460
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8461
])# _LT_WITH_PIC
8462
8463
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8464
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8465
8466
# Old name:
8467
AU_DEFUN([AC_LIBTOOL_PICMODE],
8468
[_LT_SET_OPTION([LT_INIT], [pic-only])
8469
AC_DIAGNOSE([obsolete],
8470
[$0: Remove this warning and the call to _LT_SET_OPTION when you
8471
put the `pic-only' option into LT_INIT's first parameter.])
8472
])
8473
8474
dnl aclocal-1.4 backwards compatibility:
8475
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8476
8477
8478
m4_define([_LTDL_MODE], [])
8479
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8480
		 [m4_define([_LTDL_MODE], [nonrecursive])])
8481
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8482
		 [m4_define([_LTDL_MODE], [recursive])])
8483
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8484
		 [m4_define([_LTDL_MODE], [subproject])])
8485
8486
m4_define([_LTDL_TYPE], [])
8487
LT_OPTION_DEFINE([LTDL_INIT], [installable],
8488
		 [m4_define([_LTDL_TYPE], [installable])])
8489
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8490
		 [m4_define([_LTDL_TYPE], [convenience])])
8491
8492
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8493
#
8494
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8495
# Written by Gary V. Vaughan, 2004
8496
#
8497
# This file is free software; the Free Software Foundation gives
8498
# unlimited permission to copy and/or distribute it, with or without
8499
# modifications, as long as this notice is preserved.
8500
8501
# serial 6 ltsugar.m4
8502
8503
# This is to help aclocal find these macros, as it can't see m4_define.
8504
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8505
8506
8507
# lt_join(SEP, ARG1, [ARG2...])
8508
# -----------------------------
8509
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8510
# associated separator.
8511
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8512
# versions in m4sugar had bugs.
8513
m4_define([lt_join],
8514
[m4_if([$#], [1], [],
8515
       [$#], [2], [[$2]],
8516
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8517
m4_define([_lt_join],
8518
[m4_if([$#$2], [2], [],
8519
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8520
8521
8522
# lt_car(LIST)
8523
# lt_cdr(LIST)
8524
# ------------
8525
# Manipulate m4 lists.
8526
# These macros are necessary as long as will still need to support
8527
# Autoconf-2.59 which quotes differently.
8528
m4_define([lt_car], [[$1]])
8529
m4_define([lt_cdr],
8530
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8531
       [$#], 1, [],
8532
       [m4_dquote(m4_shift($@))])])
8533
m4_define([lt_unquote], $1)
8534
8535
8536
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8537
# ------------------------------------------
8538
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8539
# Note that neither SEPARATOR nor STRING are expanded; they are appended
8540
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8541
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8542
# than defined and empty).
8543
#
8544
# This macro is needed until we can rely on Autoconf 2.62, since earlier
8545
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8546
m4_define([lt_append],
8547
[m4_define([$1],
8548
	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8549
8550
8551
8552
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8553
# ----------------------------------------------------------
8554
# Produce a SEP delimited list of all paired combinations of elements of
8555
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8556
# has the form PREFIXmINFIXSUFFIXn.
8557
# Needed until we can rely on m4_combine added in Autoconf 2.62.
8558
m4_define([lt_combine],
8559
[m4_if(m4_eval([$# > 3]), [1],
8560
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8561
[[m4_foreach([_Lt_prefix], [$2],
8562
	     [m4_foreach([_Lt_suffix],
8563
		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8564
	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8565
8566
8567
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8568
# -----------------------------------------------------------------------
8569
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8570
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8571
m4_define([lt_if_append_uniq],
8572
[m4_ifdef([$1],
8573
	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8574
		 [lt_append([$1], [$2], [$3])$4],
8575
		 [$5])],
8576
	  [lt_append([$1], [$2], [$3])$4])])
8577
8578
8579
# lt_dict_add(DICT, KEY, VALUE)
8580
# -----------------------------
8581
m4_define([lt_dict_add],
8582
[m4_define([$1($2)], [$3])])
8583
8584
8585
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8586
# --------------------------------------------
8587
m4_define([lt_dict_add_subkey],
8588
[m4_define([$1($2:$3)], [$4])])
8589
8590
8591
# lt_dict_fetch(DICT, KEY, [SUBKEY])
8592
# ----------------------------------
8593
m4_define([lt_dict_fetch],
8594
[m4_ifval([$3],
8595
	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8596
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8597
8598
8599
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8600
# -----------------------------------------------------------------
8601
m4_define([lt_if_dict_fetch],
8602
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8603
	[$5],
8604
    [$6])])
8605
8606
8607
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8608
# --------------------------------------------------------------
8609
m4_define([lt_dict_filter],
8610
[m4_if([$5], [], [],
8611
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
8612
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8613
		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8614
])
8615
8616
# ltversion.m4 -- version numbers			-*- Autoconf -*-
8617
#
8618
#   Copyright (C) 2004 Free Software Foundation, Inc.
8619
#   Written by Scott James Remnant, 2004
8620
#
8621
# This file is free software; the Free Software Foundation gives
8622
# unlimited permission to copy and/or distribute it, with or without
8623
# modifications, as long as this notice is preserved.
8624
8625
# Generated from ltversion.in.
8626
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
8627
# serial 3017 ltversion.m4
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
8628
# This file is part of GNU Libtool
8629
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
8630
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
8631
m4_define([LT_PACKAGE_REVISION], [1.3017])
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
8632
8633
AC_DEFUN([LTVERSION_VERSION],
1.2.2 by Kiwamu Okabe
Import upstream version 1.5.7
8634
[macro_version='2.2.6b'
8635
macro_revision='1.3017'
1.1.11 by Fabrice Coutadeur
Import upstream version 1.5.6
8636
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8637
_LT_DECL(, macro_revision, 0)
8638
])
8639
8640
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
8641
#
8642
#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8643
#   Written by Scott James Remnant, 2004.
8644
#
8645
# This file is free software; the Free Software Foundation gives
8646
# unlimited permission to copy and/or distribute it, with or without
8647
# modifications, as long as this notice is preserved.
8648
8649
# serial 4 lt~obsolete.m4
8650
8651
# These exist entirely to fool aclocal when bootstrapping libtool.
8652
#
8653
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8654
# which have later been changed to m4_define as they aren't part of the
8655
# exported API, or moved to Autoconf or Automake where they belong.
8656
#
8657
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
8658
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8659
# using a macro with the same name in our local m4/libtool.m4 it'll
8660
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8661
# and doesn't know about Autoconf macros at all.)
8662
#
8663
# So we provide this file, which has a silly filename so it's always
8664
# included after everything else.  This provides aclocal with the
8665
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8666
# because those macros already exist, or will be overwritten later.
8667
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
8668
#
8669
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8670
# Yes, that means every name once taken will need to remain here until
8671
# we give up compatibility with versions before 1.7, at which point
8672
# we need to keep only those names which we still refer to.
8673
8674
# This is to help aclocal find these macros, as it can't see m4_define.
8675
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8676
8677
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8678
m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
8679
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8680
m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
8681
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8682
m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
8683
m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
8684
m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8685
m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
8686
m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
8687
m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
8688
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8689
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8690
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8691
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8692
m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8693
m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
8694
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8695
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8696
m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
8697
m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
8698
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8699
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8700
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8701
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8702
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8703
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8704
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8705
m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
8706
m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
8707
m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
8708
m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8709
m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8710
m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
8711
m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
8712
m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8713
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8714
m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
8715
m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8716
m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
8717
m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
8718
m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
8719
m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
8720
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8721
m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8722
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8723
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8724
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8725
m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8726
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8727
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8728
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8729
m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8730
m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
8731
m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
1 by Masahito Omote
Import upstream version 0.3.9
8732
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8733
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8734
# 
8735
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8736
#
8737
# This program is free software; you can redistribute it and/or modify
8738
# it under the terms of the GNU General Public License as published by
8739
# the Free Software Foundation; either version 2 of the License, or
8740
# (at your option) any later version.
8741
#
8742
# This program is distributed in the hope that it will be useful, but
8743
# WITHOUT ANY WARRANTY; without even the implied warranty of
8744
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8745
# General Public License for more details.
8746
#
8747
# You should have received a copy of the GNU General Public License
8748
# along with this program; if not, write to the Free Software
8749
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8750
#
8751
# As a special exception to the GNU General Public License, if you
8752
# distribute this file as part of a program that contains a
8753
# configuration script generated by Autoconf, you may include it under
8754
# the same distribution terms that you use for the rest of that program.
8755
8756
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8757
# ----------------------------------
8758
AC_DEFUN([PKG_PROG_PKG_CONFIG],
8759
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8760
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8761
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8762
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8763
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8764
fi
8765
if test -n "$PKG_CONFIG"; then
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8766
	_pkg_min_version=m4_default([$1], [0.9.0])
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8767
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8768
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8769
		AC_MSG_RESULT([yes])
8770
	else
8771
		AC_MSG_RESULT([no])
8772
		PKG_CONFIG=""
8773
	fi
8774
		
8775
fi[]dnl
8776
])# PKG_PROG_PKG_CONFIG
8777
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8778
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8779
#
8780
# Check to see whether a particular set of modules exists.  Similar
8781
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8782
#
8783
#
8784
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8785
# this or PKG_CHECK_MODULES is called, or make sure to call
8786
# PKG_CHECK_EXISTS manually
8787
# --------------------------------------------------------------
8788
AC_DEFUN([PKG_CHECK_EXISTS],
8789
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8790
if test -n "$PKG_CONFIG" && \
8791
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8792
  m4_ifval([$2], [$2], [:])
8793
m4_ifvaln([$3], [else
8794
  $3])dnl
8795
fi])
8796
8797
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8798
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8799
# ---------------------------------------------
8800
m4_define([_PKG_CONFIG],
1.1.10 by Masahito Omote
Import upstream version 1.5.5
8801
[if test -n "$$1"; then
8802
    pkg_cv_[]$1="$$1"
8803
 elif test -n "$PKG_CONFIG"; then
8804
    PKG_CHECK_EXISTS([$3],
8805
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8806
		     [pkg_failed=yes])
8807
 else
8808
    pkg_failed=untried
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8809
fi[]dnl
8810
])# _PKG_CONFIG
8811
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8812
# _PKG_SHORT_ERRORS_SUPPORTED
8813
# -----------------------------
8814
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8815
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8816
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8817
        _pkg_short_errors_supported=yes
8818
else
8819
        _pkg_short_errors_supported=no
8820
fi[]dnl
8821
])# _PKG_SHORT_ERRORS_SUPPORTED
8822
8823
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8824
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8825
# [ACTION-IF-NOT-FOUND])
8826
#
8827
#
8828
# Note that if there is a possibility the first call to
8829
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8830
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8831
#
8832
#
8833
# --------------------------------------------------------------
8834
AC_DEFUN([PKG_CHECK_MODULES],
8835
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8836
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8837
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8838
8839
pkg_failed=no
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8840
AC_MSG_CHECKING([for $1])
8841
8842
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8843
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8844
8845
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8846
and $1[]_LIBS to avoid the need to call pkg-config.
8847
See the pkg-config man page for more details.])
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8848
8849
if test $pkg_failed = yes; then
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8850
        _PKG_SHORT_ERRORS_SUPPORTED
8851
        if test $_pkg_short_errors_supported = yes; then
1.1.10 by Masahito Omote
Import upstream version 1.5.5
8852
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8853
        else 
1.1.10 by Masahito Omote
Import upstream version 1.5.5
8854
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8855
        fi
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8856
	# Put the nasty error message in config.log where it belongs
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8857
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8858
8859
	ifelse([$4], , [AC_MSG_ERROR(dnl
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8860
[Package requirements ($2) were not met:
8861
8862
$$1_PKG_ERRORS
8863
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8864
Consider adjusting the PKG_CONFIG_PATH environment variable if you
8865
installed software in a non-standard prefix.
8866
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8867
_PKG_TEXT
8868
])],
1.1.6 by Masahito Omote
Import upstream version 1.4.1
8869
		[AC_MSG_RESULT([no])
8870
                $4])
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8871
elif test $pkg_failed = untried; then
8872
	ifelse([$4], , [AC_MSG_FAILURE(dnl
8873
[The pkg-config script could not be found or is too old.  Make sure it
8874
is in your PATH or set the PKG_CONFIG environment variable to the full
8875
path to pkg-config.
8876
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8877
_PKG_TEXT
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8878
1.1.7 by Masahito Omote
Import upstream version 1.4.2
8879
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8880
		[$4])
8881
else
8882
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8883
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1.1.4 by Steinar H. Gunderson
Import upstream version 1.1.0
8884
        AC_MSG_RESULT([yes])
1.1.2 by Masahito Omote
Import upstream version 0.4.9.1
8885
	ifelse([$3], , :, [$3])
8886
fi[]dnl
8887
])# PKG_CHECK_MODULES
8888
1.1.10 by Masahito Omote
Import upstream version 1.5.5
8889
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
8890
#
8891
# This file is free software; the Free Software Foundation
8892
# gives unlimited permission to copy and/or distribute it,
8893
# with or without modifications, as long as this notice is preserved.
8894
8895
# AM_AUTOMAKE_VERSION(VERSION)
8896
# ----------------------------
8897
# Automake X.Y traces this macro to ensure aclocal.m4 has been
8898
# generated from the m4 files accompanying Automake X.Y.
1.1.6 by Masahito Omote
Import upstream version 1.4.1
8899
# (This private macro should not be called outside this file.)
8900
AC_DEFUN([AM_AUTOMAKE_VERSION],
8901
[am__api_version='1.10'
8902
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8903
dnl require some minimum version.  Point them to the right macro.
1.1.10 by Masahito Omote
Import upstream version 1.5.5
8904
m4_if([$1], [1.10.2], [],
1.1.6 by Masahito Omote
Import upstream version 1.4.1
8905
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8906
])
8907
8908
# _AM_AUTOCONF_VERSION(VERSION)
8909
# -----------------------------
8910
# aclocal traces this macro to find the Autoconf version.
8911
# This is a private macro too.  Using m4_define simplifies
8912
# the logic in aclocal, which can simply ignore this definition.
8913
m4_define([_AM_AUTOCONF_VERSION], [])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
8914
8915
# AM_SET_CURRENT_AUTOMAKE_VERSION
8916
# -------------------------------
1.1.6 by Masahito Omote
Import upstream version 1.4.1
8917
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1.1.10 by Masahito Omote
Import upstream version 1.5.5
8918
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
8919
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1.1.10 by Masahito Omote
Import upstream version 1.5.5
8920
[AM_AUTOMAKE_VERSION([1.10.2])dnl
1.1.8 by Masahito Omote
Import upstream version 1.5.1
8921
m4_ifndef([AC_AUTOCONF_VERSION],
8922
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1.1.10 by Masahito Omote
Import upstream version 1.5.5
8923
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
8924
8925
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8926
8927
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8928
#
8929
# This file is free software; the Free Software Foundation
8930
# gives unlimited permission to copy and/or distribute it,
8931
# with or without modifications, as long as this notice is preserved.
8932
8933
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8934
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8935
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8936
#
8937
# Of course, Automake must honor this variable whenever it calls a
8938
# tool from the auxiliary directory.  The problem is that $srcdir (and
8939
# therefore $ac_aux_dir as well) can be either absolute or relative,
8940
# depending on how configure is run.  This is pretty annoying, since
8941
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8942
# source directory, any form will work fine, but in subdirectories a
8943
# relative path needs to be adjusted first.
8944
#
8945
# $ac_aux_dir/missing
8946
#    fails when called from a subdirectory if $ac_aux_dir is relative
8947
# $top_srcdir/$ac_aux_dir/missing
8948
#    fails if $ac_aux_dir is absolute,
8949
#    fails when called from a subdirectory in a VPATH build with
8950
#          a relative $ac_aux_dir
8951
#
8952
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8953
# are both prefixed by $srcdir.  In an in-source build this is usually
8954
# harmless because $srcdir is `.', but things will broke when you
8955
# start a VPATH build or use an absolute $srcdir.
8956
#
8957
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8958
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8959
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8960
# and then we would define $MISSING as
8961
#   MISSING="\${SHELL} $am_aux_dir/missing"
8962
# This will work as long as MISSING is not called from configure, because
8963
# unfortunately $(top_srcdir) has no meaning in configure.
8964
# However there are other variables, like CC, which are often used in
8965
# configure, and could therefore not use this "fixed" $ac_aux_dir.
8966
#
8967
# Another solution, used here, is to always expand $ac_aux_dir to an
8968
# absolute PATH.  The drawback is that using absolute paths prevent a
8969
# configured tree to be moved without reconfiguration.
8970
8971
AC_DEFUN([AM_AUX_DIR_EXPAND],
8972
[dnl Rely on autoconf to set up CDPATH properly.
8973
AC_PREREQ([2.50])dnl
8974
# expand $ac_aux_dir to an absolute path
8975
am_aux_dir=`cd $ac_aux_dir && pwd`
8976
])
8977
8978
# AM_CONDITIONAL                                            -*- Autoconf -*-
8979
1.1.6 by Masahito Omote
Import upstream version 1.4.1
8980
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
1.1.3 by Masahito Omote
Import upstream version 1.0.0
8981
# Free Software Foundation, Inc.
8982
#
8983
# This file is free software; the Free Software Foundation
8984
# gives unlimited permission to copy and/or distribute it,
8985
# with or without modifications, as long as this notice is preserved.
8986
1.1.6 by Masahito Omote
Import upstream version 1.4.1
8987
# serial 8
1.1.3 by Masahito Omote
Import upstream version 1.0.0
8988
8989
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8990
# -------------------------------------
8991
# Define a conditional.
8992
AC_DEFUN([AM_CONDITIONAL],
8993
[AC_PREREQ(2.52)dnl
8994
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8995
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1.1.6 by Masahito Omote
Import upstream version 1.4.1
8996
AC_SUBST([$1_TRUE])dnl
8997
AC_SUBST([$1_FALSE])dnl
8998
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8999
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9000
if $2; then
9001
  $1_TRUE=
9002
  $1_FALSE='#'
9003
else
9004
  $1_TRUE='#'
9005
  $1_FALSE=
9006
fi
9007
AC_CONFIG_COMMANDS_PRE(
9008
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9009
  AC_MSG_ERROR([[conditional "$1" was never defined.
9010
Usually this means the macro was only invoked conditionally.]])
9011
fi])])
9012
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9013
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9014
# Free Software Foundation, Inc.
9015
#
9016
# This file is free software; the Free Software Foundation
9017
# gives unlimited permission to copy and/or distribute it,
9018
# with or without modifications, as long as this notice is preserved.
9019
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9020
# serial 9
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9021
9022
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9023
# written in clear, in which case automake, when reading aclocal.m4,
9024
# will think it sees a *use*, and therefore will trigger all it's
9025
# C support machinery.  Also note that it means that autoscan, seeing
9026
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9027
9028
9029
# _AM_DEPENDENCIES(NAME)
9030
# ----------------------
9031
# See how the compiler implements dependency checking.
9032
# NAME is "CC", "CXX", "GCJ", or "OBJC".
9033
# We try a few techniques and use that to set a single cache variable.
9034
#
9035
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9036
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9037
# dependency, and given that the user is not expected to run this macro,
9038
# just rely on AC_PROG_CC.
9039
AC_DEFUN([_AM_DEPENDENCIES],
9040
[AC_REQUIRE([AM_SET_DEPDIR])dnl
9041
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9042
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9043
AC_REQUIRE([AM_DEP_TRACK])dnl
9044
9045
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9046
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9047
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9048
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9049
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9050
                   [depcc="$$1"   am_compiler_list=])
9051
9052
AC_CACHE_CHECK([dependency style of $depcc],
9053
               [am_cv_$1_dependencies_compiler_type],
9054
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9055
  # We make a subdir and do the tests there.  Otherwise we can end up
9056
  # making bogus files that we don't know about and never remove.  For
9057
  # instance it was reported that on HP-UX the gcc test will end up
9058
  # making a dummy file named `D' -- because `-MD' means `put the output
9059
  # in D'.
9060
  mkdir conftest.dir
9061
  # Copy depcomp to subdir because otherwise we won't find it if we're
9062
  # using a relative directory.
9063
  cp "$am_depcomp" conftest.dir
9064
  cd conftest.dir
9065
  # We will build objects and dependencies in a subdirectory because
9066
  # it helps to detect inapplicable dependency modes.  For instance
9067
  # both Tru64's cc and ICC support -MD to output dependencies as a
9068
  # side effect of compilation, but ICC will put the dependencies in
9069
  # the current directory while Tru64 will put them in the object
9070
  # directory.
9071
  mkdir sub
9072
9073
  am_cv_$1_dependencies_compiler_type=none
9074
  if test "$am_compiler_list" = ""; then
9075
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9076
  fi
9077
  for depmode in $am_compiler_list; do
9078
    # Setup a source with many dependencies, because some compilers
9079
    # like to wrap large dependency lists on column 80 (with \), and
9080
    # we should not choose a depcomp mode which is confused by this.
9081
    #
9082
    # We need to recreate these files for each test, as the compiler may
9083
    # overwrite some of them when testing with obscure command lines.
9084
    # This happens at least with the AIX C compiler.
9085
    : > sub/conftest.c
9086
    for i in 1 2 3 4 5 6; do
9087
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9088
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9089
      # Solaris 8's {/usr,}/bin/sh.
9090
      touch sub/conftst$i.h
9091
    done
9092
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9093
9094
    case $depmode in
9095
    nosideeffect)
9096
      # after this tag, mechanisms are not by side-effect, so they'll
9097
      # only be used when explicitly requested
9098
      if test "x$enable_dependency_tracking" = xyes; then
9099
	continue
9100
      else
9101
	break
9102
      fi
9103
      ;;
9104
    none) break ;;
9105
    esac
9106
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
9107
    # mode.  It turns out that the SunPro C++ compiler does not properly
9108
    # handle `-M -o', and we need to detect this.
9109
    if depmode=$depmode \
9110
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
9111
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9112
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
9113
         >/dev/null 2>conftest.err &&
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9114
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9115
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9116
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
9117
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9118
      # icc doesn't choke on unknown options, it will just issue warnings
9119
      # or remarks (even with -Werror).  So we grep stderr for any message
9120
      # that says an option was ignored or not supported.
9121
      # When given -MP, icc 7.0 and 7.1 complain thusly:
9122
      #   icc: Command line warning: ignoring option '-M'; no argument required
9123
      # The diagnosis changed in icc 8.0:
9124
      #   icc: Command line remark: option '-MP' not supported
9125
      if (grep 'ignoring option' conftest.err ||
9126
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9127
        am_cv_$1_dependencies_compiler_type=$depmode
9128
        break
9129
      fi
9130
    fi
9131
  done
9132
9133
  cd ..
9134
  rm -rf conftest.dir
9135
else
9136
  am_cv_$1_dependencies_compiler_type=none
9137
fi
9138
])
9139
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9140
AM_CONDITIONAL([am__fastdep$1], [
9141
  test "x$enable_dependency_tracking" != xno \
9142
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9143
])
9144
9145
9146
# AM_SET_DEPDIR
9147
# -------------
9148
# Choose a directory name for dependency files.
9149
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9150
AC_DEFUN([AM_SET_DEPDIR],
9151
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9152
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9153
])
9154
9155
9156
# AM_DEP_TRACK
9157
# ------------
9158
AC_DEFUN([AM_DEP_TRACK],
9159
[AC_ARG_ENABLE(dependency-tracking,
9160
[  --disable-dependency-tracking  speeds up one-time build
9161
  --enable-dependency-tracking   do not reject slow dependency extractors])
9162
if test "x$enable_dependency_tracking" != xno; then
9163
  am_depcomp="$ac_aux_dir/depcomp"
9164
  AMDEPBACKSLASH='\'
9165
fi
9166
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9167
AC_SUBST([AMDEPBACKSLASH])dnl
9168
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9169
])
9170
9171
# Generate code to set up dependency tracking.              -*- Autoconf -*-
9172
1.1.10 by Masahito Omote
Import upstream version 1.5.5
9173
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9174
# Free Software Foundation, Inc.
9175
#
9176
# This file is free software; the Free Software Foundation
9177
# gives unlimited permission to copy and/or distribute it,
9178
# with or without modifications, as long as this notice is preserved.
9179
1.1.10 by Masahito Omote
Import upstream version 1.5.5
9180
#serial 4
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9181
9182
# _AM_OUTPUT_DEPENDENCY_COMMANDS
9183
# ------------------------------
9184
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1.1.10 by Masahito Omote
Import upstream version 1.5.5
9185
[# Autoconf 2.62 quotes --file arguments for eval, but not when files
9186
# are listed without --file.  Let's play safe and only enable the eval
9187
# if we detect the quoting.
9188
case $CONFIG_FILES in
9189
*\'*) eval set x "$CONFIG_FILES" ;;
9190
*)   set x $CONFIG_FILES ;;
9191
esac
9192
shift
9193
for mf
9194
do
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9195
  # Strip MF so we end up with the name of the file.
9196
  mf=`echo "$mf" | sed -e 's/:.*$//'`
9197
  # Check whether this is an Automake generated Makefile or not.
9198
  # We used to match only the files named `Makefile.in', but
9199
  # some people rename them; so instead we look at the file content.
9200
  # Grep'ing the first line is not enough: some people post-process
9201
  # each Makefile.in and add a new line on top of each file to say so.
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9202
  # Grep'ing the whole file is not good either: AIX grep has a line
9203
  # limit of 2048, but all sed's we know have understand at least 4000.
1.1.8 by Masahito Omote
Import upstream version 1.5.1
9204
  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9205
    dirpart=`AS_DIRNAME("$mf")`
9206
  else
9207
    continue
9208
  fi
9209
  # Extract the definition of DEPDIR, am__include, and am__quote
9210
  # from the Makefile without running `make'.
9211
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9212
  test -z "$DEPDIR" && continue
9213
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
9214
  test -z "am__include" && continue
9215
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9216
  # When using ansi2knr, U may be empty or an underscore; expand it
9217
  U=`sed -n 's/^U = //p' < "$mf"`
9218
  # Find all dependency output files, they are included files with
9219
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
9220
  # simplest approach to changing $(DEPDIR) to its actual value in the
9221
  # expansion.
9222
  for file in `sed -n "
9223
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9224
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9225
    # Make sure the directory exists.
9226
    test -f "$dirpart/$file" && continue
9227
    fdir=`AS_DIRNAME(["$file"])`
9228
    AS_MKDIR_P([$dirpart/$fdir])
9229
    # echo "creating $dirpart/$file"
9230
    echo '# dummy' > "$dirpart/$file"
9231
  done
9232
done
9233
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9234
9235
9236
# AM_OUTPUT_DEPENDENCY_COMMANDS
9237
# -----------------------------
9238
# This macro should only be invoked once -- use via AC_REQUIRE.
9239
#
9240
# This code is only required when automatic dependency tracking
9241
# is enabled.  FIXME.  This creates each `.P' file that we will
9242
# need in order to bootstrap the dependency handling code.
9243
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9244
[AC_CONFIG_COMMANDS([depfiles],
9245
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9246
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9247
])
9248
9249
# Do all the work for Automake.                             -*- Autoconf -*-
9250
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9251
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1.1.8 by Masahito Omote
Import upstream version 1.5.1
9252
# 2005, 2006, 2008 Free Software Foundation, Inc.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9253
#
9254
# This file is free software; the Free Software Foundation
9255
# gives unlimited permission to copy and/or distribute it,
9256
# with or without modifications, as long as this notice is preserved.
9257
1.1.8 by Masahito Omote
Import upstream version 1.5.1
9258
# serial 13
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9259
9260
# This macro actually does too much.  Some checks are only needed if
9261
# your package does certain things.  But this isn't really a big deal.
9262
9263
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9264
# AM_INIT_AUTOMAKE([OPTIONS])
9265
# -----------------------------------------------
9266
# The call with PACKAGE and VERSION arguments is the old style
9267
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9268
# and VERSION should now be passed to AC_INIT and removed from
9269
# the call to AM_INIT_AUTOMAKE.
9270
# We support both call styles for the transition.  After
9271
# the next Automake release, Autoconf can make the AC_INIT
9272
# arguments mandatory, and then we can depend on a new Autoconf
9273
# release and drop the old call support.
9274
AC_DEFUN([AM_INIT_AUTOMAKE],
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9275
[AC_PREREQ([2.60])dnl
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9276
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9277
dnl the ones we care about.
9278
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9279
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9280
AC_REQUIRE([AC_PROG_INSTALL])dnl
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9281
if test "`cd $srcdir && pwd`" != "`pwd`"; then
9282
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9283
  # is not polluted with repeated "-I."
9284
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9285
  # test to see if srcdir already configured
9286
  if test -f $srcdir/config.status; then
9287
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9288
  fi
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9289
fi
9290
9291
# test whether we have cygpath
9292
if test -z "$CYGPATH_W"; then
9293
  if (cygpath --version) >/dev/null 2>/dev/null; then
9294
    CYGPATH_W='cygpath -w'
9295
  else
9296
    CYGPATH_W=echo
9297
  fi
9298
fi
9299
AC_SUBST([CYGPATH_W])
9300
9301
# Define the identity of the package.
9302
dnl Distinguish between old-style and new-style calls.
9303
m4_ifval([$2],
9304
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9305
 AC_SUBST([PACKAGE], [$1])dnl
9306
 AC_SUBST([VERSION], [$2])],
9307
[_AM_SET_OPTIONS([$1])dnl
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9308
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9309
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9310
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9311
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9312
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9313
9314
_AM_IF_OPTION([no-define],,
9315
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9316
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9317
9318
# Some tools Automake needs.
9319
AC_REQUIRE([AM_SANITY_CHECK])dnl
9320
AC_REQUIRE([AC_ARG_PROGRAM])dnl
9321
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9322
AM_MISSING_PROG(AUTOCONF, autoconf)
9323
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9324
AM_MISSING_PROG(AUTOHEADER, autoheader)
9325
AM_MISSING_PROG(MAKEINFO, makeinfo)
9326
AM_PROG_INSTALL_SH
9327
AM_PROG_INSTALL_STRIP
9328
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9329
# We need awk for the "check" target.  The system "awk" is bad on
9330
# some platforms.
9331
AC_REQUIRE([AC_PROG_AWK])dnl
9332
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9333
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9334
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9335
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9336
	      		     [_AM_PROG_TAR([v7])])])
9337
_AM_IF_OPTION([no-dependencies],,
9338
[AC_PROVIDE_IFELSE([AC_PROG_CC],
9339
                  [_AM_DEPENDENCIES(CC)],
9340
                  [define([AC_PROG_CC],
9341
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9342
AC_PROVIDE_IFELSE([AC_PROG_CXX],
9343
                  [_AM_DEPENDENCIES(CXX)],
9344
                  [define([AC_PROG_CXX],
9345
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9346
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9347
                  [_AM_DEPENDENCIES(OBJC)],
9348
                  [define([AC_PROG_OBJC],
9349
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9350
])
9351
])
9352
9353
9354
# When config.status generates a header, we must update the stamp-h file.
9355
# This file resides in the same directory as the config header
9356
# that is generated.  The stamp files are numbered to have different names.
9357
9358
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9359
# loop where config.status creates the headers, so we can generate
9360
# our stamp files there.
9361
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9362
[# Compute $1's index in $config_headers.
1.1.8 by Masahito Omote
Import upstream version 1.5.1
9363
_am_arg=$1
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9364
_am_stamp_count=1
9365
for _am_header in $config_headers :; do
9366
  case $_am_header in
1.1.8 by Masahito Omote
Import upstream version 1.5.1
9367
    $_am_arg | $_am_arg:* )
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9368
      break ;;
9369
    * )
9370
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9371
  esac
9372
done
1.1.8 by Masahito Omote
Import upstream version 1.5.1
9373
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9374
9375
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9376
#
9377
# This file is free software; the Free Software Foundation
9378
# gives unlimited permission to copy and/or distribute it,
9379
# with or without modifications, as long as this notice is preserved.
9380
9381
# AM_PROG_INSTALL_SH
9382
# ------------------
9383
# Define $install_sh.
9384
AC_DEFUN([AM_PROG_INSTALL_SH],
9385
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9386
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9387
AC_SUBST(install_sh)])
9388
9389
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9390
#
9391
# This file is free software; the Free Software Foundation
9392
# gives unlimited permission to copy and/or distribute it,
9393
# with or without modifications, as long as this notice is preserved.
9394
9395
# serial 2
9396
9397
# Check whether the underlying file-system supports filenames
9398
# with a leading dot.  For instance MS-DOS doesn't.
9399
AC_DEFUN([AM_SET_LEADING_DOT],
9400
[rm -rf .tst 2>/dev/null
9401
mkdir .tst 2>/dev/null
9402
if test -d .tst; then
9403
  am__leading_dot=.
9404
else
9405
  am__leading_dot=_
9406
fi
9407
rmdir .tst 2>/dev/null
9408
AC_SUBST([am__leading_dot])])
9409
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9410
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
9411
# 2006  Free Software Foundation, Inc.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9412
#
9413
# This file is free software; the Free Software Foundation
9414
# gives unlimited permission to copy and/or distribute it,
9415
# with or without modifications, as long as this notice is preserved.
9416
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9417
# serial 10
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9418
9419
# AM_PATH_LISPDIR
9420
# ---------------
9421
AC_DEFUN([AM_PATH_LISPDIR],
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9422
[AC_PREREQ([2.60])dnl
9423
 # If set to t, that means we are running in a shell under Emacs.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9424
 # If you have an Emacs named "t", then use the full path.
9425
 test x"$EMACS" = xt && EMACS=
9426
 AC_CHECK_PROGS([EMACS], [emacs xemacs], [no])
9427
 AC_ARG_VAR([EMACS], [the Emacs editor command])
9428
 AC_ARG_VAR([EMACSLOADPATH], [the Emacs library search path])
9429
 AC_ARG_WITH([lispdir],
9430
 [  --with-lispdir          override the default lisp directory],
9431
 [ lispdir="$withval"
9432
   AC_MSG_CHECKING([where .elc files should go])
9433
   AC_MSG_RESULT([$lispdir])],
9434
 [
9435
 AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [
9436
   if test $EMACS != "no"; then
9437
     if test x${lispdir+set} != xset; then
9438
  # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly
9439
  # Some emacsen will start up in interactive mode, requiring C-x C-c to exit,
9440
  #  which is non-obvious for non-emacs users.
9441
  # Redirecting /dev/null should help a bit; pity we can't detect "broken"
9442
  #  emacsen earlier and avoid running this altogether.
9443
  AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
9444
	am_cv_lispdir=`sed -n \
9445
       -e 's,/$,,' \
9446
       -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9447
       -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datarootdir}/\1,;p;q;}' \
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9448
       conftest.out`
9449
       rm conftest.out
9450
     fi
9451
   fi
9452
   test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp'
9453
  ])
9454
  lispdir="$am_cv_lispdir"
9455
])
9456
AC_SUBST([lispdir])
9457
])# AM_PATH_LISPDIR
9458
9459
AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR])
9460
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9461
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
9462
# From Jim Meyering
9463
9464
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
9465
# Free Software Foundation, Inc.
9466
#
9467
# This file is free software; the Free Software Foundation
9468
# gives unlimited permission to copy and/or distribute it,
9469
# with or without modifications, as long as this notice is preserved.
9470
9471
# serial 4
9472
9473
AC_DEFUN([AM_MAINTAINER_MODE],
9474
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
9475
  dnl maintainer-mode is disabled by default
9476
  AC_ARG_ENABLE(maintainer-mode,
9477
[  --enable-maintainer-mode  enable make rules and dependencies not useful
9478
			  (and sometimes confusing) to the casual installer],
9479
      USE_MAINTAINER_MODE=$enableval,
9480
      USE_MAINTAINER_MODE=no)
9481
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9482
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
9483
  MAINT=$MAINTAINER_MODE_TRUE
9484
  AC_SUBST(MAINT)dnl
9485
]
9486
)
9487
9488
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9489
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9490
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
9491
9492
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
9493
#
9494
# This file is free software; the Free Software Foundation
9495
# gives unlimited permission to copy and/or distribute it,
9496
# with or without modifications, as long as this notice is preserved.
9497
9498
# serial 3
9499
9500
# AM_MAKE_INCLUDE()
9501
# -----------------
9502
# Check to see how make treats includes.
9503
AC_DEFUN([AM_MAKE_INCLUDE],
9504
[am_make=${MAKE-make}
9505
cat > confinc << 'END'
9506
am__doit:
9507
	@echo done
9508
.PHONY: am__doit
9509
END
9510
# If we don't find an include directive, just comment out the code.
9511
AC_MSG_CHECKING([for style of include used by $am_make])
9512
am__include="#"
9513
am__quote=
9514
_am_result=none
9515
# First try GNU make style include.
9516
echo "include confinc" > confmf
9517
# We grep out `Entering directory' and `Leaving directory'
9518
# messages which can occur if `w' ends up in MAKEFLAGS.
9519
# In particular we don't look at `^make:' because GNU make might
9520
# be invoked under some other name (usually "gmake"), in which
9521
# case it prints its new name instead of `make'.
9522
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
9523
   am__include=include
9524
   am__quote=
9525
   _am_result=GNU
9526
fi
9527
# Now try BSD make style include.
9528
if test "$am__include" = "#"; then
9529
   echo '.include "confinc"' > confmf
9530
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
9531
      am__include=.include
9532
      am__quote="\""
9533
      _am_result=BSD
9534
   fi
9535
fi
9536
AC_SUBST([am__include])
9537
AC_SUBST([am__quote])
9538
AC_MSG_RESULT([$_am_result])
9539
rm -f confinc confmf
9540
])
9541
9542
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9543
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9544
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9545
# Free Software Foundation, Inc.
9546
#
9547
# This file is free software; the Free Software Foundation
9548
# gives unlimited permission to copy and/or distribute it,
9549
# with or without modifications, as long as this notice is preserved.
9550
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9551
# serial 5
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9552
9553
# AM_MISSING_PROG(NAME, PROGRAM)
9554
# ------------------------------
9555
AC_DEFUN([AM_MISSING_PROG],
9556
[AC_REQUIRE([AM_MISSING_HAS_RUN])
9557
$1=${$1-"${am_missing_run}$2"}
9558
AC_SUBST($1)])
9559
9560
9561
# AM_MISSING_HAS_RUN
9562
# ------------------
9563
# Define MISSING if not defined so far and test if it supports --run.
9564
# If it does, set am_missing_run to use it, otherwise, to nothing.
9565
AC_DEFUN([AM_MISSING_HAS_RUN],
9566
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9567
AC_REQUIRE_AUX_FILE([missing])dnl
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9568
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
9569
# Use eval to expand $SHELL
9570
if eval "$MISSING --run true"; then
9571
  am_missing_run="$MISSING --run "
9572
else
9573
  am_missing_run=
9574
  AC_MSG_WARN([`missing' script is too old or missing])
9575
fi
9576
])
9577
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9578
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9579
#
9580
# This file is free software; the Free Software Foundation
9581
# gives unlimited permission to copy and/or distribute it,
9582
# with or without modifications, as long as this notice is preserved.
9583
9584
# AM_PROG_MKDIR_P
9585
# ---------------
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9586
# Check for `mkdir -p'.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9587
AC_DEFUN([AM_PROG_MKDIR_P],
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9588
[AC_PREREQ([2.60])dnl
9589
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9590
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
9591
dnl while keeping a definition of mkdir_p for backward compatibility.
9592
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9593
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9594
dnl Makefile.ins that do not define MKDIR_P, so we do our own
9595
dnl adjustment using top_builddir (which is defined more often than
9596
dnl MKDIR_P).
9597
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9598
case $mkdir_p in
9599
  [[\\/$]]* | ?:[[\\/]]*) ;;
9600
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9601
esac
9602
])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9603
9604
# Helper functions for option handling.                     -*- Autoconf -*-
9605
1.1.10 by Masahito Omote
Import upstream version 1.5.5
9606
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9607
#
9608
# This file is free software; the Free Software Foundation
9609
# gives unlimited permission to copy and/or distribute it,
9610
# with or without modifications, as long as this notice is preserved.
9611
1.1.10 by Masahito Omote
Import upstream version 1.5.5
9612
# serial 4
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9613
9614
# _AM_MANGLE_OPTION(NAME)
9615
# -----------------------
9616
AC_DEFUN([_AM_MANGLE_OPTION],
9617
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9618
9619
# _AM_SET_OPTION(NAME)
9620
# ------------------------------
9621
# Set option NAME.  Presently that only means defining a flag for this option.
9622
AC_DEFUN([_AM_SET_OPTION],
9623
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9624
9625
# _AM_SET_OPTIONS(OPTIONS)
9626
# ----------------------------------
9627
# OPTIONS is a space-separated list of Automake options.
9628
AC_DEFUN([_AM_SET_OPTIONS],
1.1.10 by Masahito Omote
Import upstream version 1.5.5
9629
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9630
9631
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9632
# -------------------------------------------
9633
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9634
AC_DEFUN([_AM_IF_OPTION],
9635
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9636
9637
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
9638
9639
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9640
# Free Software Foundation, Inc.
9641
#
9642
# This file is free software; the Free Software Foundation
9643
# gives unlimited permission to copy and/or distribute it,
9644
# with or without modifications, as long as this notice is preserved.
9645
9646
# serial 4
9647
9648
# AM_SANITY_CHECK
9649
# ---------------
9650
AC_DEFUN([AM_SANITY_CHECK],
9651
[AC_MSG_CHECKING([whether build environment is sane])
9652
# Just in case
9653
sleep 1
9654
echo timestamp > conftest.file
9655
# Do `set' in a subshell so we don't clobber the current shell's
9656
# arguments.  Must try -L first in case configure is actually a
9657
# symlink; some systems play weird games with the mod time of symlinks
9658
# (eg FreeBSD returns the mod time of the symlink's containing
9659
# directory).
9660
if (
9661
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
9662
   if test "$[*]" = "X"; then
9663
      # -L didn't work.
9664
      set X `ls -t $srcdir/configure conftest.file`
9665
   fi
9666
   rm -f conftest.file
9667
   if test "$[*]" != "X $srcdir/configure conftest.file" \
9668
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
9669
9670
      # If neither matched, then we have a broken ls.  This can happen
9671
      # if, for instance, CONFIG_SHELL is bash and it inherits a
9672
      # broken ls alias from the environment.  This has actually
9673
      # happened.  Such a system could not be considered "sane".
9674
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9675
alias in your environment])
9676
   fi
9677
9678
   test "$[2]" = conftest.file
9679
   )
9680
then
9681
   # Ok.
9682
   :
9683
else
9684
   AC_MSG_ERROR([newly created file is older than distributed files!
9685
Check your system clock])
9686
fi
9687
AC_MSG_RESULT(yes)])
9688
9689
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9690
#
9691
# This file is free software; the Free Software Foundation
9692
# gives unlimited permission to copy and/or distribute it,
9693
# with or without modifications, as long as this notice is preserved.
9694
9695
# AM_PROG_INSTALL_STRIP
9696
# ---------------------
9697
# One issue with vendor `install' (even GNU) is that you can't
9698
# specify the program used to strip binaries.  This is especially
9699
# annoying in cross-compiling environments, where the build's strip
9700
# is unlikely to handle the host's binaries.
9701
# Fortunately install-sh will honor a STRIPPROG variable, so we
9702
# always use install-sh in `make install-strip', and initialize
9703
# STRIPPROG with the value of the STRIP variable (set by the user).
9704
AC_DEFUN([AM_PROG_INSTALL_STRIP],
9705
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9706
# Installed binaries are usually stripped using `strip' when the user
9707
# run `make install-strip'.  However `strip' might not be the right
9708
# tool to use in cross-compilation environments, therefore Automake
9709
# will honor the `STRIP' environment variable to overrule this program.
9710
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9711
if test "$cross_compiling" != no; then
9712
  AC_CHECK_TOOL([STRIP], [strip], :)
9713
fi
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9714
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9715
AC_SUBST([INSTALL_STRIP_PROGRAM])])
9716
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9717
# Copyright (C) 2006  Free Software Foundation, Inc.
9718
#
9719
# This file is free software; the Free Software Foundation
9720
# gives unlimited permission to copy and/or distribute it,
9721
# with or without modifications, as long as this notice is preserved.
9722
9723
# _AM_SUBST_NOTMAKE(VARIABLE)
9724
# ---------------------------
1.1.8 by Masahito Omote
Import upstream version 1.5.1
9725
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9726
# This macro is traced by Automake.
9727
AC_DEFUN([_AM_SUBST_NOTMAKE])
9728
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9729
# Check how to create a tarball.                            -*- Autoconf -*-
9730
9731
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9732
#
9733
# This file is free software; the Free Software Foundation
9734
# gives unlimited permission to copy and/or distribute it,
9735
# with or without modifications, as long as this notice is preserved.
9736
9737
# serial 2
9738
9739
# _AM_PROG_TAR(FORMAT)
9740
# --------------------
9741
# Check how to create a tarball in format FORMAT.
9742
# FORMAT should be one of `v7', `ustar', or `pax'.
9743
#
9744
# Substitute a variable $(am__tar) that is a command
9745
# writing to stdout a FORMAT-tarball containing the directory
9746
# $tardir.
9747
#     tardir=directory && $(am__tar) > result.tar
9748
#
9749
# Substitute a variable $(am__untar) that extract such
9750
# a tarball read from stdin.
9751
#     $(am__untar) < result.tar
9752
AC_DEFUN([_AM_PROG_TAR],
9753
[# Always define AMTAR for backward compatibility.
9754
AM_MISSING_PROG([AMTAR], [tar])
9755
m4_if([$1], [v7],
9756
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9757
     [m4_case([$1], [ustar],, [pax],,
9758
              [m4_fatal([Unknown tar format])])
9759
AC_MSG_CHECKING([how to create a $1 tar archive])
9760
# Loop over all known methods to create a tar archive until one works.
9761
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9762
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9763
# Do not fold the above two line into one, because Tru64 sh and
9764
# Solaris sh will not grok spaces in the rhs of `-'.
9765
for _am_tool in $_am_tools
9766
do
9767
  case $_am_tool in
9768
  gnutar)
9769
    for _am_tar in tar gnutar gtar;
9770
    do
9771
      AM_RUN_LOG([$_am_tar --version]) && break
9772
    done
9773
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9774
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9775
    am__untar="$_am_tar -xf -"
9776
    ;;
9777
  plaintar)
9778
    # Must skip GNU tar: if it does not support --format= it doesn't create
9779
    # ustar tarball either.
9780
    (tar --version) >/dev/null 2>&1 && continue
9781
    am__tar='tar chf - "$$tardir"'
9782
    am__tar_='tar chf - "$tardir"'
9783
    am__untar='tar xf -'
9784
    ;;
9785
  pax)
9786
    am__tar='pax -L -x $1 -w "$$tardir"'
9787
    am__tar_='pax -L -x $1 -w "$tardir"'
9788
    am__untar='pax -r'
9789
    ;;
9790
  cpio)
9791
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9792
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9793
    am__untar='cpio -i -H $1 -d'
9794
    ;;
9795
  none)
9796
    am__tar=false
9797
    am__tar_=false
9798
    am__untar=false
9799
    ;;
9800
  esac
9801
9802
  # If the value was cached, stop now.  We just wanted to have am__tar
9803
  # and am__untar set.
9804
  test -n "${am_cv_prog_tar_$1}" && break
9805
9806
  # tar/untar a dummy directory, and stop if the command works
9807
  rm -rf conftest.dir
9808
  mkdir conftest.dir
9809
  echo GrepMe > conftest.dir/file
9810
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9811
  rm -rf conftest.dir
9812
  if test -s conftest.tar; then
9813
    AM_RUN_LOG([$am__untar <conftest.tar])
9814
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9815
  fi
9816
done
9817
rm -rf conftest.dir
9818
9819
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9820
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9821
AC_SUBST([am__tar])
9822
AC_SUBST([am__untar])
9823
]) # _AM_PROG_TAR
9824
9825
m4_include([m4/ac_cxx_have_stl.m4])
9826
m4_include([m4/ac_cxx_namespace.m4])
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9827
m4_include([m4/ax_cflags_gcc_option.m4])
1.1.8 by Masahito Omote
Import upstream version 1.5.1
9828
m4_include([m4/ax_func_sigsetjmp.m4])
1.1.6 by Masahito Omote
Import upstream version 1.4.1
9829
m4_include([m4/ax_lib_glibc.m4])
1.1.8 by Masahito Omote
Import upstream version 1.5.1
9830
m4_include([m4/ax_path_qmake4.m4])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9831
m4_include([m4/codeset.m4])
1.1.8 by Masahito Omote
Import upstream version 1.5.1
9832
m4_include([m4/eb4.m4])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9833
m4_include([m4/gettext.m4])
9834
m4_include([m4/iconv.m4])
9835
m4_include([m4/lib-ld.m4])
9836
m4_include([m4/lib-link.m4])
9837
m4_include([m4/lib-prefix.m4])
9838
m4_include([m4/nls.m4])
9839
m4_include([m4/po.m4])
9840
m4_include([m4/progtest.m4])
1.1.8 by Masahito Omote
Import upstream version 1.5.1
9841
m4_include([m4/wnn.m4])
1.1.3 by Masahito Omote
Import upstream version 1.0.0
9842
m4_include([m4/xft.m4])