~ubuntu-branches/ubuntu/maverick/strongswan/maverick

« back to all changes in this revision

Viewing changes to src/charon/plugins/nm/gnome/aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2008-12-05 17:21:42 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20081205172142-9g77wgyzcj0blq7p
* New upstream release, fixes a MOBIKE issue.
  Closes: #507542: strongswan: endless loop
* Explicitly enable compilation with libcurl for CRL fetching
  Closes: #497756: strongswan: not compiled with curl support; crl 
                   fetching not available
* Enable compilation with SSH agent support.

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