~foxtrotgps-team/foxtrotgps/trunk

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Joshua Judson Rosen
  • Date: 2009-09-26 02:35:15 UTC
  • Revision ID: rozzin@geekspace.com-20090926023515-yxl5sg1a45gupuc8
Imported from tangogps-0.9.7 tarball.

Show diffs side-by-side

added added

removed removed

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