~ubuntu-branches/ubuntu/precise/unity-lens-music/precise

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2012-04-12 11:41:51 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20120412114151-hgozvwa4ui27rtcc
Tags: 5.10.0-0ubuntu1
* New upstream release.
  - unity-music-daemon crashed with SIGSEGV in find_term_real() from
    dee_tree_index_lookup() from dee_index_lookup() from
    unity_music_lens_rhythmbox_collection_search() (LP: #963991)
  - unity-music-daemon using a huge amount of ram (LP: #964684)
* debian/control:
  - as there is no more banshee u1 music store, make unity-scope-musicstores
    dep on rhythmbox-ubuntuone (LP: #969271)
  - removing libxml2-dev build-dep
  - bump Standards-Version to latest

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
If you have problems, you may need to regenerate the build system entirely.
21
21
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
22
 
 
23
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
24
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
25
#
 
26
# This file is free software, distributed under the terms of the GNU
 
27
# General Public License.  As a special exception to the GNU General
 
28
# Public License, this file may be distributed as part of a program
 
29
# that contains a configuration script generated by Autoconf, under
 
30
# the same distribution terms as the rest of that program.
 
31
#
 
32
# This file can be copied and used freely without restrictions.  It can
 
33
# be used in projects which are not available under the GNU Public License
 
34
# but which still want to provide support for the GNU gettext functionality.
 
35
#
 
36
# Macro to add for using GNU gettext.
 
37
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
38
#
 
39
# Modified to never use included libintl. 
 
40
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
41
#
 
42
# Major rework to remove unused code
 
43
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
44
#
 
45
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
46
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
47
#
 
48
# Modified to require ngettext
 
49
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
50
#
 
51
# We need this here as well, since someone might use autoconf-2.5x
 
52
# to configure GLib then an older version to configure a package
 
53
# using AM_GLIB_GNU_GETTEXT
 
54
AC_PREREQ(2.53)
 
55
 
 
56
dnl
 
57
dnl We go to great lengths to make sure that aclocal won't 
 
58
dnl try to pull in the installed version of these macros
 
59
dnl when running aclocal in the glib directory.
 
60
dnl
 
61
m4_copy([AC_DEFUN],[glib_DEFUN])
 
62
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
63
dnl
 
64
dnl At the end, if we're not within glib, we'll define the public
 
65
dnl definitions in terms of our private definitions.
 
66
dnl
 
67
 
 
68
# GLIB_LC_MESSAGES
 
69
#--------------------
 
70
glib_DEFUN([GLIB_LC_MESSAGES],
 
71
  [AC_CHECK_HEADERS([locale.h])
 
72
    if test $ac_cv_header_locale_h = yes; then
 
73
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
74
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
75
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
76
    if test $am_cv_val_LC_MESSAGES = yes; then
 
77
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
78
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
79
    fi
 
80
  fi])
 
81
 
 
82
# GLIB_PATH_PROG_WITH_TEST
 
83
#----------------------------
 
84
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
85
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
86
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
87
[# Extract the first word of "$2", so it can be a program name with args.
 
88
set dummy $2; ac_word=[$]2
 
89
AC_MSG_CHECKING([for $ac_word])
 
90
AC_CACHE_VAL(ac_cv_path_$1,
 
91
[case "[$]$1" in
 
92
  /*)
 
93
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
94
  ;;
 
95
  *)
 
96
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
97
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
98
    test -z "$ac_dir" && ac_dir=.
 
99
    if test -f $ac_dir/$ac_word; then
 
100
      if [$3]; then
 
101
        ac_cv_path_$1="$ac_dir/$ac_word"
 
102
        break
 
103
      fi
 
104
    fi
 
105
  done
 
106
  IFS="$ac_save_ifs"
 
107
dnl If no 4th arg is given, leave the cache variable unset,
 
108
dnl so AC_PATH_PROGS will keep looking.
 
109
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
110
])dnl
 
111
  ;;
 
112
esac])dnl
 
113
$1="$ac_cv_path_$1"
 
114
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
115
  AC_MSG_RESULT([$]$1)
 
116
else
 
117
  AC_MSG_RESULT(no)
 
118
fi
 
119
AC_SUBST($1)dnl
 
120
])
 
121
 
 
122
# GLIB_WITH_NLS
 
123
#-----------------
 
124
glib_DEFUN([GLIB_WITH_NLS],
 
125
  dnl NLS is obligatory
 
126
  [USE_NLS=yes
 
127
    AC_SUBST(USE_NLS)
 
128
 
 
129
    gt_cv_have_gettext=no
 
130
 
 
131
    CATOBJEXT=NONE
 
132
    XGETTEXT=:
 
133
    INTLLIBS=
 
134
 
 
135
    AC_CHECK_HEADER(libintl.h,
 
136
     [gt_cv_func_dgettext_libintl="no"
 
137
      libintl_extra_libs=""
 
138
 
 
139
      #
 
140
      # First check in libc
 
141
      #
 
142
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
143
        [AC_TRY_LINK([
 
144
#include <libintl.h>
 
145
],
 
146
         [return !ngettext ("","", 1)],
 
147
          gt_cv_func_ngettext_libc=yes,
 
148
          gt_cv_func_ngettext_libc=no)
 
149
        ])
 
150
  
 
151
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
152
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
153
                [AC_TRY_LINK([
 
154
#include <libintl.h>
 
155
],
 
156
                  [return !dgettext ("","")],
 
157
                  gt_cv_func_dgettext_libc=yes,
 
158
                  gt_cv_func_dgettext_libc=no)
 
159
                ])
 
160
      fi
 
161
  
 
162
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
163
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
164
      fi
 
165
 
 
166
      #
 
167
      # If we don't have everything we want, check in libintl
 
168
      #
 
169
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
170
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
171
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
172
        
 
173
        AC_CHECK_LIB(intl, bindtextdomain,
 
174
            [AC_CHECK_LIB(intl, ngettext,
 
175
                    [AC_CHECK_LIB(intl, dgettext,
 
176
                                  gt_cv_func_dgettext_libintl=yes)])])
 
177
 
 
178
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
179
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
180
          AC_MSG_RESULT([])
 
181
          AC_CHECK_LIB(intl, ngettext,
 
182
                [AC_CHECK_LIB(intl, dcgettext,
 
183
                       [gt_cv_func_dgettext_libintl=yes
 
184
                        libintl_extra_libs=-liconv],
 
185
                        :,-liconv)],
 
186
                :,-liconv)
 
187
        fi
 
188
 
 
189
        #
 
190
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
191
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
192
        # and both have dgettext and ngettext
 
193
        #
 
194
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
195
          glib_save_LIBS="$LIBS"
 
196
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
197
          unset ac_cv_func_bind_textdomain_codeset
 
198
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
199
          LIBS="$glib_save_LIBS"
 
200
 
 
201
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
202
            gt_cv_func_dgettext_libc=no
 
203
          else
 
204
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
205
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
206
              gt_cv_func_dgettext_libintl=no
 
207
            fi
 
208
          fi
 
209
        fi
 
210
      fi
 
211
 
 
212
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
213
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
214
        gt_cv_have_gettext=yes
 
215
      fi
 
216
  
 
217
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
218
        INTLLIBS="-lintl $libintl_extra_libs"
 
219
      fi
 
220
  
 
221
      if test "$gt_cv_have_gettext" = "yes"; then
 
222
        AC_DEFINE(HAVE_GETTEXT,1,
 
223
          [Define if the GNU gettext() function is already present or preinstalled.])
 
224
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
225
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
226
        if test "$MSGFMT" != "no"; then
 
227
          glib_save_LIBS="$LIBS"
 
228
          LIBS="$LIBS $INTLLIBS"
 
229
          AC_CHECK_FUNCS(dcgettext)
 
230
          MSGFMT_OPTS=
 
231
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
232
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
233
msgid ""
 
234
msgstr ""
 
235
"Content-Type: text/plain; charset=UTF-8\n"
 
236
"Project-Id-Version: test 1.0\n"
 
237
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
238
"Last-Translator: test <foo@bar.xx>\n"
 
239
"Language-Team: C <LL@li.org>\n"
 
240
"MIME-Version: 1.0\n"
 
241
"Content-Transfer-Encoding: 8bit\n"
 
242
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
243
          AC_SUBST(MSGFMT_OPTS)
 
244
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
245
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
246
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
247
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
248
                         return _nl_msg_cat_cntr],
 
249
            [CATOBJEXT=.gmo 
 
250
             DATADIRNAME=share],
 
251
            [case $host in
 
252
            *-*-solaris*)
 
253
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
254
            dnl GNU format message catalog is always supported,
 
255
            dnl since both are added to the libc all together.
 
256
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
257
            dnl and CATOBJEXT=.gmo in this case.
 
258
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
259
              [CATOBJEXT=.gmo 
 
260
               DATADIRNAME=share],
 
261
              [CATOBJEXT=.mo
 
262
               DATADIRNAME=lib])
 
263
            ;;
 
264
            *-*-openbsd*)
 
265
            CATOBJEXT=.mo
 
266
            DATADIRNAME=share
 
267
            ;;
 
268
            *)
 
269
            CATOBJEXT=.mo
 
270
            DATADIRNAME=lib
 
271
            ;;
 
272
            esac])
 
273
          LIBS="$glib_save_LIBS"
 
274
          INSTOBJEXT=.mo
 
275
        else
 
276
          gt_cv_have_gettext=no
 
277
        fi
 
278
      fi
 
279
    ])
 
280
 
 
281
    if test "$gt_cv_have_gettext" = "yes" ; then
 
282
      AC_DEFINE(ENABLE_NLS, 1,
 
283
        [always defined to indicate that i18n is enabled])
 
284
    fi
 
285
 
 
286
    dnl Test whether we really found GNU xgettext.
 
287
    if test "$XGETTEXT" != ":"; then
 
288
      dnl If it is not GNU xgettext we define it as : so that the
 
289
      dnl Makefiles still can work.
 
290
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
291
        : ;
 
292
      else
 
293
        AC_MSG_RESULT(
 
294
          [found xgettext program is not GNU xgettext; ignore it])
 
295
        XGETTEXT=":"
 
296
      fi
 
297
    fi
 
298
 
 
299
    # We need to process the po/ directory.
 
300
    POSUB=po
 
301
 
 
302
    AC_OUTPUT_COMMANDS(
 
303
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
304
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
305
      esac])
 
306
 
 
307
    dnl These rules are solely for the distribution goal.  While doing this
 
308
    dnl we only have to keep exactly one list of the available catalogs
 
309
    dnl in configure.ac.
 
310
    for lang in $ALL_LINGUAS; do
 
311
      GMOFILES="$GMOFILES $lang.gmo"
 
312
      POFILES="$POFILES $lang.po"
 
313
    done
 
314
 
 
315
    dnl Make all variables we use known to autoconf.
 
316
    AC_SUBST(CATALOGS)
 
317
    AC_SUBST(CATOBJEXT)
 
318
    AC_SUBST(DATADIRNAME)
 
319
    AC_SUBST(GMOFILES)
 
320
    AC_SUBST(INSTOBJEXT)
 
321
    AC_SUBST(INTLLIBS)
 
322
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
323
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
324
    AC_SUBST(POFILES)
 
325
    AC_SUBST(POSUB)
 
326
  ])
 
327
 
 
328
# AM_GLIB_GNU_GETTEXT
 
329
# -------------------
 
330
# Do checks necessary for use of gettext. If a suitable implementation 
 
331
# of gettext is found in either in libintl or in the C library,
 
332
# it will set INTLLIBS to the libraries needed for use of gettext
 
333
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
334
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
335
# on various variables needed by the Makefile.in.in installed by 
 
336
# glib-gettextize.
 
337
dnl
 
338
glib_DEFUN([GLIB_GNU_GETTEXT],
 
339
  [AC_REQUIRE([AC_PROG_CC])dnl
 
340
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
341
   
 
342
   GLIB_LC_MESSAGES
 
343
   GLIB_WITH_NLS
 
344
 
 
345
   if test "$gt_cv_have_gettext" = "yes"; then
 
346
     if test "x$ALL_LINGUAS" = "x"; then
 
347
       LINGUAS=
 
348
     else
 
349
       AC_MSG_CHECKING(for catalogs to be installed)
 
350
       NEW_LINGUAS=
 
351
       for presentlang in $ALL_LINGUAS; do
 
352
         useit=no
 
353
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
354
           desiredlanguages="$LINGUAS"
 
355
         else
 
356
           desiredlanguages="$ALL_LINGUAS"
 
357
         fi
 
358
         for desiredlang in $desiredlanguages; do
 
359
           # Use the presentlang catalog if desiredlang is
 
360
           #   a. equal to presentlang, or
 
361
           #   b. a variant of presentlang (because in this case,
 
362
           #      presentlang can be used as a fallback for messages
 
363
           #      which are not translated in the desiredlang catalog).
 
364
           case "$desiredlang" in
 
365
             "$presentlang"*) useit=yes;;
 
366
           esac
 
367
         done
 
368
         if test $useit = yes; then
 
369
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
370
         fi
 
371
       done
 
372
       LINGUAS=$NEW_LINGUAS
 
373
       AC_MSG_RESULT($LINGUAS)
 
374
     fi
 
375
 
 
376
     dnl Construct list of names of catalog files to be constructed.
 
377
     if test -n "$LINGUAS"; then
 
378
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
379
     fi
 
380
   fi
 
381
 
 
382
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
383
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
384
   dnl Try to locate is.
 
385
   MKINSTALLDIRS=
 
386
   if test -n "$ac_aux_dir"; then
 
387
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
388
   fi
 
389
   if test -z "$MKINSTALLDIRS"; then
 
390
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
391
   fi
 
392
   AC_SUBST(MKINSTALLDIRS)
 
393
 
 
394
   dnl Generate list of files to be processed by xgettext which will
 
395
   dnl be included in po/Makefile.
 
396
   test -d po || mkdir po
 
397
   if test "x$srcdir" != "x."; then
 
398
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
399
       posrcprefix="$srcdir/"
 
400
     else
 
401
       posrcprefix="../$srcdir/"
 
402
     fi
 
403
   else
 
404
     posrcprefix="../"
 
405
   fi
 
406
   rm -f po/POTFILES
 
407
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
408
        < $srcdir/po/POTFILES.in > po/POTFILES
 
409
  ])
 
410
 
 
411
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
412
# -------------------------------
 
413
# Define VARIABLE to the location where catalog files will
 
414
# be installed by po/Makefile.
 
415
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
416
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
417
glib_save_prefix="$prefix"
 
418
glib_save_exec_prefix="$exec_prefix"
 
419
glib_save_datarootdir="$datarootdir"
 
420
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
421
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
422
datarootdir=`eval echo "${datarootdir}"`
 
423
if test "x$CATOBJEXT" = "x.mo" ; then
 
424
  localedir=`eval echo "${libdir}/locale"`
 
425
else
 
426
  localedir=`eval echo "${datadir}/locale"`
 
427
fi
 
428
prefix="$glib_save_prefix"
 
429
exec_prefix="$glib_save_exec_prefix"
 
430
datarootdir="$glib_save_datarootdir"
 
431
AC_DEFINE_UNQUOTED($1, "$localedir",
 
432
  [Define the location where the catalogs will be installed])
 
433
])
 
434
 
 
435
dnl
 
436
dnl Now the definitions that aclocal will find
 
437
dnl
 
438
ifdef(glib_configure_ac,[],[
 
439
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
440
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
441
])dnl
 
442
 
 
443
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
444
 
445
# Create a temporary file with TEST-FILE as its contents and pass the
 
446
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
447
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
448
AC_DEFUN([GLIB_RUN_PROG],
 
449
[cat >conftest.foo <<_ACEOF
 
450
$2
 
451
_ACEOF
 
452
if AC_RUN_LOG([$1 conftest.foo]); then
 
453
  m4_ifval([$3], [$3], [:])
 
454
m4_ifvaln([$4], [else $4])dnl
 
455
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
456
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
457
fi])
 
458
 
 
459
 
 
460
 
 
461
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
462
# serial 42 IT_PROG_INTLTOOL
 
463
AC_DEFUN([IT_PROG_INTLTOOL], [
 
464
AC_PREREQ([2.50])dnl
 
465
AC_REQUIRE([AM_NLS])dnl
 
466
 
 
467
case "$am__api_version" in
 
468
    1.[01234])
 
469
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
470
    ;;
 
471
    *)
 
472
    ;;
 
473
esac
 
474
 
 
475
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
476
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
477
INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
478
if test -n "$1"; then
 
479
    AC_MSG_CHECKING([for intltool >= $1])
 
480
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
481
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
482
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
483
fi
 
484
 
 
485
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
486
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
487
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
488
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
489
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
490
fi
 
491
 
 
492
if test -z "$AM_DEFAULT_VERBOSITY"; then
 
493
  AM_DEFAULT_VERBOSITY=1
 
494
fi
 
495
AC_SUBST([AM_DEFAULT_VERBOSITY])
 
496
 
 
497
INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
 
498
INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
 
499
INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
 
500
AC_SUBST(INTLTOOL_V_MERGE)
 
501
AC_SUBST(INTLTOOL__v_MERGE_)
 
502
AC_SUBST(INTLTOOL__v_MERGE_0)
 
503
 
 
504
INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
 
505
intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
 
506
intltool__v_merge_options_0='-q'
 
507
AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
 
508
AC_SUBST(intltool__v_merge_options_)
 
509
AC_SUBST(intltool__v_merge_options_0)
 
510
 
 
511
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
512
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
513
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
514
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
515
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
 
516
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
517
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
518
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
519
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
520
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
521
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
522
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
 
523
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
 
524
else
 
525
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
 
526
fi
 
527
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
528
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
529
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
530
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
531
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
532
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
533
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
534
 
 
535
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
 
536
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 
537
_IT_SUBST(INTLTOOL_KEYS_RULE)
 
538
_IT_SUBST(INTLTOOL_PROP_RULE)
 
539
_IT_SUBST(INTLTOOL_OAF_RULE)
 
540
_IT_SUBST(INTLTOOL_PONG_RULE)
 
541
_IT_SUBST(INTLTOOL_SERVER_RULE)
 
542
_IT_SUBST(INTLTOOL_SHEET_RULE)
 
543
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
544
_IT_SUBST(INTLTOOL_UI_RULE)
 
545
_IT_SUBST(INTLTOOL_XAM_RULE)
 
546
_IT_SUBST(INTLTOOL_KBD_RULE)
 
547
_IT_SUBST(INTLTOOL_XML_RULE)
 
548
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
549
_IT_SUBST(INTLTOOL_CAVES_RULE)
 
550
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 
551
_IT_SUBST(INTLTOOL_THEME_RULE)
 
552
_IT_SUBST(INTLTOOL_SERVICE_RULE)
 
553
_IT_SUBST(INTLTOOL_POLICY_RULE)
 
554
 
 
555
# Check the gettext tools to make sure they are GNU
 
556
AC_PATH_PROG(XGETTEXT, xgettext)
 
557
AC_PATH_PROG(MSGMERGE, msgmerge)
 
558
AC_PATH_PROG(MSGFMT, msgfmt)
 
559
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
560
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
561
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
562
fi
 
563
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
564
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
565
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
566
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
567
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
568
fi
 
569
 
 
570
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
571
if test -z "$INTLTOOL_PERL"; then
 
572
   AC_MSG_ERROR([perl not found])
 
573
fi
 
574
AC_MSG_CHECKING([for perl >= 5.8.1])
 
575
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 
576
if test $? -ne 0; then
 
577
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 
578
else
 
579
   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
 
580
   AC_MSG_RESULT([$IT_PERL_VERSION])
 
581
fi
 
582
if test "x$2" != "xno-xml"; then
 
583
   AC_MSG_CHECKING([for XML::Parser])
 
584
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
585
       AC_MSG_RESULT([ok])
 
586
   else
 
587
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
588
   fi
 
589
fi
 
590
 
 
591
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
592
AC_SUBST(ALL_LINGUAS)
 
593
 
 
594
# Set DATADIRNAME correctly if it is not set yet
 
595
# (copied from glib-gettext.m4)
 
596
if test -z "$DATADIRNAME"; then
 
597
  AC_LINK_IFELSE(
 
598
    [AC_LANG_PROGRAM([[]],
 
599
                     [[extern int _nl_msg_cat_cntr;
 
600
                       return _nl_msg_cat_cntr]])],
 
601
    [DATADIRNAME=share],
 
602
    [case $host in
 
603
    *-*-solaris*)
 
604
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
605
    dnl GNU format message catalog is always supported,
 
606
    dnl since both are added to the libc all together.
 
607
    dnl Hence, we'd like to go with DATADIRNAME=share
 
608
    dnl in this case.
 
609
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
610
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
611
    ;;
 
612
    *)
 
613
    [DATADIRNAME=lib]
 
614
    ;;
 
615
    esac])
 
616
fi
 
617
AC_SUBST(DATADIRNAME)
 
618
 
 
619
IT_PO_SUBDIR([po])
 
620
 
 
621
])
 
622
 
 
623
 
 
624
# IT_PO_SUBDIR(DIRNAME)
 
625
# ---------------------
 
626
# All po subdirs have to be declared with this macro; the subdir "po" is
 
627
# declared by IT_PROG_INTLTOOL.
 
628
#
 
629
AC_DEFUN([IT_PO_SUBDIR],
 
630
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
631
dnl
 
632
dnl The following CONFIG_COMMANDS should be executed at the very end
 
633
dnl of config.status.
 
634
AC_CONFIG_COMMANDS_PRE([
 
635
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
636
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 
637
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
638
    fi
 
639
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
640
    >"$1/stamp-it.tmp"
 
641
    [sed '/^#/d
 
642
         s/^[[].*] *//
 
643
         /^[    ]*$/d
 
644
        '"s|^|  $ac_top_srcdir/|" \
 
645
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
646
    ]
 
647
    [sed '/^POTFILES =/,/[^\\]$/ {
 
648
                /^POTFILES =/!d
 
649
                r $1/POTFILES
 
650
          }
 
651
         ' "$1/Makefile.in" >"$1/Makefile"]
 
652
    rm -f "$1/Makefile.tmp"
 
653
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
654
  ])
 
655
])dnl
 
656
])
 
657
 
 
658
# _IT_SUBST(VARIABLE)
 
659
# -------------------
 
660
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
661
#
 
662
AC_DEFUN([_IT_SUBST],
 
663
[
 
664
AC_SUBST([$1])
 
665
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
666
]
 
667
)
 
668
 
 
669
# deprecated macros
 
670
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
671
# A hint is needed for aclocal from Automake <= 1.9.4:
 
672
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
673
 
 
674
 
 
675
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
676
#
 
677
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 
678
#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 
679
#                 Foundation, Inc.
 
680
#   Written by Gordon Matzigkeit, 1996
 
681
#
 
682
# This file is free software; the Free Software Foundation gives
 
683
# unlimited permission to copy and/or distribute it, with or without
 
684
# modifications, as long as this notice is preserved.
 
685
 
 
686
m4_define([_LT_COPYING], [dnl
 
687
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 
688
#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 
689
#                 Foundation, Inc.
 
690
#   Written by Gordon Matzigkeit, 1996
 
691
#
 
692
#   This file is part of GNU Libtool.
 
693
#
 
694
# GNU Libtool is free software; you can redistribute it and/or
 
695
# modify it under the terms of the GNU General Public License as
 
696
# published by the Free Software Foundation; either version 2 of
 
697
# the License, or (at your option) any later version.
 
698
#
 
699
# As a special exception to the GNU General Public License,
 
700
# if you distribute this file as part of a program or library that
 
701
# is built using GNU Libtool, you may include this file under the
 
702
# same distribution terms that you use for the rest of that program.
 
703
#
 
704
# GNU Libtool is distributed in the hope that it will be useful,
 
705
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
706
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
707
# GNU General Public License for more details.
 
708
#
 
709
# You should have received a copy of the GNU General Public License
 
710
# along with GNU Libtool; see the file COPYING.  If not, a copy
 
711
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
 
712
# obtained by writing to the Free Software Foundation, Inc.,
 
713
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
714
])
 
715
 
 
716
# serial 57 LT_INIT
 
717
 
 
718
 
 
719
# LT_PREREQ(VERSION)
 
720
# ------------------
 
721
# Complain and exit if this libtool version is less that VERSION.
 
722
m4_defun([LT_PREREQ],
 
723
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
 
724
       [m4_default([$3],
 
725
                   [m4_fatal([Libtool version $1 or higher is required],
 
726
                             63)])],
 
727
       [$2])])
 
728
 
 
729
 
 
730
# _LT_CHECK_BUILDDIR
 
731
# ------------------
 
732
# Complain if the absolute build directory name contains unusual characters
 
733
m4_defun([_LT_CHECK_BUILDDIR],
 
734
[case `pwd` in
 
735
  *\ * | *\     *)
 
736
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
 
737
esac
 
738
])
 
739
 
 
740
 
 
741
# LT_INIT([OPTIONS])
 
742
# ------------------
 
743
AC_DEFUN([LT_INIT],
 
744
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
 
745
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 
746
AC_BEFORE([$0], [LT_LANG])dnl
 
747
AC_BEFORE([$0], [LT_OUTPUT])dnl
 
748
AC_BEFORE([$0], [LTDL_INIT])dnl
 
749
m4_require([_LT_CHECK_BUILDDIR])dnl
 
750
 
 
751
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
 
752
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
 
753
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
 
754
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
 
755
dnl unless we require an AC_DEFUNed macro:
 
756
AC_REQUIRE([LTOPTIONS_VERSION])dnl
 
757
AC_REQUIRE([LTSUGAR_VERSION])dnl
 
758
AC_REQUIRE([LTVERSION_VERSION])dnl
 
759
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
 
760
m4_require([_LT_PROG_LTMAIN])dnl
 
761
 
 
762
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
 
763
 
 
764
dnl Parse OPTIONS
 
765
_LT_SET_OPTIONS([$0], [$1])
 
766
 
 
767
# This can be used to rebuild libtool when needed
 
768
LIBTOOL_DEPS="$ltmain"
 
769
 
 
770
# Always use our own libtool.
 
771
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
772
AC_SUBST(LIBTOOL)dnl
 
773
 
 
774
_LT_SETUP
 
775
 
 
776
# Only expand once:
 
777
m4_define([LT_INIT])
 
778
])# LT_INIT
 
779
 
 
780
# Old names:
 
781
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
 
782
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
 
783
dnl aclocal-1.4 backwards compatibility:
 
784
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 
785
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
786
 
 
787
 
 
788
# _LT_CC_BASENAME(CC)
 
789
# -------------------
 
790
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 
791
m4_defun([_LT_CC_BASENAME],
 
792
[for cc_temp in $1""; do
 
793
  case $cc_temp in
 
794
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
 
795
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
 
796
    \-*) ;;
 
797
    *) break;;
 
798
  esac
 
799
done
 
800
cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 
801
])
 
802
 
 
803
 
 
804
# _LT_FILEUTILS_DEFAULTS
 
805
# ----------------------
 
806
# It is okay to use these file commands and assume they have been set
 
807
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
 
808
m4_defun([_LT_FILEUTILS_DEFAULTS],
 
809
[: ${CP="cp -f"}
 
810
: ${MV="mv -f"}
 
811
: ${RM="rm -f"}
 
812
])# _LT_FILEUTILS_DEFAULTS
 
813
 
 
814
 
 
815
# _LT_SETUP
 
816
# ---------
 
817
m4_defun([_LT_SETUP],
 
818
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
819
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
820
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
 
821
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
 
822
 
 
823
_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
 
824
dnl
 
825
_LT_DECL([], [host_alias], [0], [The host system])dnl
 
826
_LT_DECL([], [host], [0])dnl
 
827
_LT_DECL([], [host_os], [0])dnl
 
828
dnl
 
829
_LT_DECL([], [build_alias], [0], [The build system])dnl
 
830
_LT_DECL([], [build], [0])dnl
 
831
_LT_DECL([], [build_os], [0])dnl
 
832
dnl
 
833
AC_REQUIRE([AC_PROG_CC])dnl
 
834
AC_REQUIRE([LT_PATH_LD])dnl
 
835
AC_REQUIRE([LT_PATH_NM])dnl
 
836
dnl
 
837
AC_REQUIRE([AC_PROG_LN_S])dnl
 
838
test -z "$LN_S" && LN_S="ln -s"
 
839
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
 
840
dnl
 
841
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
 
842
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
 
843
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 
844
dnl
 
845
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
846
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 
847
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
 
848
m4_require([_LT_CMD_RELOAD])dnl
 
849
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 
850
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 
851
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 
852
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
853
m4_require([_LT_WITH_SYSROOT])dnl
 
854
 
 
855
_LT_CONFIG_LIBTOOL_INIT([
 
856
# See if we are running on zsh, and set the options which allow our
 
857
# commands through without removal of \ escapes INIT.
 
858
if test -n "\${ZSH_VERSION+set}" ; then
 
859
   setopt NO_GLOB_SUBST
 
860
fi
 
861
])
 
862
if test -n "${ZSH_VERSION+set}" ; then
 
863
   setopt NO_GLOB_SUBST
 
864
fi
 
865
 
 
866
_LT_CHECK_OBJDIR
 
867
 
 
868
m4_require([_LT_TAG_COMPILER])dnl
 
869
 
 
870
case $host_os in
 
871
aix3*)
 
872
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
873
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
874
  # vanish in a puff of smoke.
 
875
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
876
    COLLECT_NAMES=
 
877
    export COLLECT_NAMES
 
878
  fi
 
879
  ;;
 
880
esac
 
881
 
 
882
# Global variables:
 
883
ofile=libtool
 
884
can_build_shared=yes
 
885
 
 
886
# All known linkers require a `.a' archive for static linking (except MSVC,
 
887
# which needs '.lib').
 
888
libext=a
 
889
 
 
890
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
891
 
 
892
old_CC="$CC"
 
893
old_CFLAGS="$CFLAGS"
 
894
 
 
895
# Set sane defaults for various variables
 
896
test -z "$CC" && CC=cc
 
897
test -z "$LTCC" && LTCC=$CC
 
898
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 
899
test -z "$LD" && LD=ld
 
900
test -z "$ac_objext" && ac_objext=o
 
901
 
 
902
_LT_CC_BASENAME([$compiler])
 
903
 
 
904
# Only perform the check for file, if the check method requires it
 
905
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
906
case $deplibs_check_method in
 
907
file_magic*)
 
908
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
909
    _LT_PATH_MAGIC
 
910
  fi
 
911
  ;;
 
912
esac
 
913
 
 
914
# Use C for the default configuration in the libtool script
 
915
LT_SUPPORTED_TAG([CC])
 
916
_LT_LANG_C_CONFIG
 
917
_LT_LANG_DEFAULT_CONFIG
 
918
_LT_CONFIG_COMMANDS
 
919
])# _LT_SETUP
 
920
 
 
921
 
 
922
# _LT_PREPARE_SED_QUOTE_VARS
 
923
# --------------------------
 
924
# Define a few sed substitution that help us do robust quoting.
 
925
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
 
926
[# Backslashify metacharacters that are still active within
 
927
# double-quoted strings.
 
928
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
 
929
 
 
930
# Same as above, but do not quote variable references.
 
931
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
 
932
 
 
933
# Sed substitution to delay expansion of an escaped shell variable in a
 
934
# double_quote_subst'ed string.
 
935
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
936
 
 
937
# Sed substitution to delay expansion of an escaped single quote.
 
938
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
939
 
 
940
# Sed substitution to avoid accidental globbing in evaled expressions
 
941
no_glob_subst='s/\*/\\\*/g'
 
942
])
 
943
 
 
944
# _LT_PROG_LTMAIN
 
945
# ---------------
 
946
# Note that this code is called both from `configure', and `config.status'
 
947
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
 
948
# `config.status' has no value for ac_aux_dir unless we are using Automake,
 
949
# so we pass a copy along to make sure it has a sensible value anyway.
 
950
m4_defun([_LT_PROG_LTMAIN],
 
951
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
 
952
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
 
953
ltmain="$ac_aux_dir/ltmain.sh"
 
954
])# _LT_PROG_LTMAIN
 
955
 
 
956
 
 
957
 
 
958
# So that we can recreate a full libtool script including additional
 
959
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
 
960
# in macros and then make a single call at the end using the `libtool'
 
961
# label.
 
962
 
 
963
 
 
964
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
 
965
# ----------------------------------------
 
966
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
967
m4_define([_LT_CONFIG_LIBTOOL_INIT],
 
968
[m4_ifval([$1],
 
969
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
 
970
                     [$1
 
971
])])])
 
972
 
 
973
# Initialize.
 
974
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
 
975
 
 
976
 
 
977
# _LT_CONFIG_LIBTOOL([COMMANDS])
 
978
# ------------------------------
 
979
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
980
m4_define([_LT_CONFIG_LIBTOOL],
 
981
[m4_ifval([$1],
 
982
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
 
983
                     [$1
 
984
])])])
 
985
 
 
986
# Initialize.
 
987
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
 
988
 
 
989
 
 
990
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
 
991
# -----------------------------------------------------
 
992
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
 
993
[_LT_CONFIG_LIBTOOL([$1])
 
994
_LT_CONFIG_LIBTOOL_INIT([$2])
 
995
])
 
996
 
 
997
 
 
998
# _LT_FORMAT_COMMENT([COMMENT])
 
999
# -----------------------------
 
1000
# Add leading comment marks to the start of each line, and a trailing
 
1001
# full-stop to the whole comment if one is not present already.
 
1002
m4_define([_LT_FORMAT_COMMENT],
 
1003
[m4_ifval([$1], [
 
1004
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
 
1005
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
 
1006
)])
 
1007
 
 
1008
 
 
1009
 
 
1010
 
 
1011
 
 
1012
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
 
1013
# -------------------------------------------------------------------
 
1014
# CONFIGNAME is the name given to the value in the libtool script.
 
1015
# VARNAME is the (base) name used in the configure script.
 
1016
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
 
1017
# VARNAME.  Any other value will be used directly.
 
1018
m4_define([_LT_DECL],
 
1019
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
 
1020
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
 
1021
        [m4_ifval([$1], [$1], [$2])])
 
1022
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
 
1023
    m4_ifval([$4],
 
1024
        [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
 
1025
    lt_dict_add_subkey([lt_decl_dict], [$2],
 
1026
        [tagged?], [m4_ifval([$5], [yes], [no])])])
 
1027
])
 
1028
 
 
1029
 
 
1030
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
 
1031
# --------------------------------------------------------
 
1032
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
 
1033
 
 
1034
 
 
1035
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
 
1036
# ------------------------------------------------
 
1037
m4_define([lt_decl_tag_varnames],
 
1038
[_lt_decl_filter([tagged?], [yes], $@)])
 
1039
 
 
1040
 
 
1041
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
 
1042
# ---------------------------------------------------------
 
1043
m4_define([_lt_decl_filter],
 
1044
[m4_case([$#],
 
1045
  [0], [m4_fatal([$0: too few arguments: $#])],
 
1046
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
 
1047
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
 
1048
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
 
1049
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
 
1050
])
 
1051
 
 
1052
 
 
1053
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
 
1054
# --------------------------------------------------
 
1055
m4_define([lt_decl_quote_varnames],
 
1056
[_lt_decl_filter([value], [1], $@)])
 
1057
 
 
1058
 
 
1059
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
 
1060
# ---------------------------------------------------
 
1061
m4_define([lt_decl_dquote_varnames],
 
1062
[_lt_decl_filter([value], [2], $@)])
 
1063
 
 
1064
 
 
1065
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
 
1066
# ---------------------------------------------------
 
1067
m4_define([lt_decl_varnames_tagged],
 
1068
[m4_assert([$# <= 2])dnl
 
1069
_$0(m4_quote(m4_default([$1], [[, ]])),
 
1070
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
 
1071
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
 
1072
m4_define([_lt_decl_varnames_tagged],
 
1073
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
 
1074
 
 
1075
 
 
1076
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
 
1077
# ------------------------------------------------
 
1078
m4_define([lt_decl_all_varnames],
 
1079
[_$0(m4_quote(m4_default([$1], [[, ]])),
 
1080
     m4_if([$2], [],
 
1081
           m4_quote(lt_decl_varnames),
 
1082
        m4_quote(m4_shift($@))))[]dnl
 
1083
])
 
1084
m4_define([_lt_decl_all_varnames],
 
1085
[lt_join($@, lt_decl_varnames_tagged([$1],
 
1086
                        lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
 
1087
])
 
1088
 
 
1089
 
 
1090
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
 
1091
# ------------------------------------
 
1092
# Quote a variable value, and forward it to `config.status' so that its
 
1093
# declaration there will have the same value as in `configure'.  VARNAME
 
1094
# must have a single quote delimited value for this to work.
 
1095
m4_define([_LT_CONFIG_STATUS_DECLARE],
 
1096
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
 
1097
 
 
1098
 
 
1099
# _LT_CONFIG_STATUS_DECLARATIONS
 
1100
# ------------------------------
 
1101
# We delimit libtool config variables with single quotes, so when
 
1102
# we write them to config.status, we have to be sure to quote all
 
1103
# embedded single quotes properly.  In configure, this macro expands
 
1104
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
 
1105
#
 
1106
#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
 
1107
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 
1108
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
 
1109
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
 
1110
 
 
1111
 
 
1112
# _LT_LIBTOOL_TAGS
 
1113
# ----------------
 
1114
# Output comment and list of tags supported by the script
 
1115
m4_defun([_LT_LIBTOOL_TAGS],
 
1116
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
 
1117
available_tags="_LT_TAGS"dnl
 
1118
])
 
1119
 
 
1120
 
 
1121
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
 
1122
# -----------------------------------
 
1123
# Extract the dictionary values for VARNAME (optionally with TAG) and
 
1124
# expand to a commented shell variable setting:
 
1125
#
 
1126
#    # Some comment about what VAR is for.
 
1127
#    visible_name=$lt_internal_name
 
1128
m4_define([_LT_LIBTOOL_DECLARE],
 
1129
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
 
1130
                                           [description])))[]dnl
 
1131
m4_pushdef([_libtool_name],
 
1132
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
 
1133
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
 
1134
    [0], [_libtool_name=[$]$1],
 
1135
    [1], [_libtool_name=$lt_[]$1],
 
1136
    [2], [_libtool_name=$lt_[]$1],
 
1137
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
 
1138
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
 
1139
])
 
1140
 
 
1141
 
 
1142
# _LT_LIBTOOL_CONFIG_VARS
 
1143
# -----------------------
 
1144
# Produce commented declarations of non-tagged libtool config variables
 
1145
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
 
1146
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
 
1147
# section) are produced by _LT_LIBTOOL_TAG_VARS.
 
1148
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
 
1149
[m4_foreach([_lt_var],
 
1150
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
 
1151
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
 
1152
 
 
1153
 
 
1154
# _LT_LIBTOOL_TAG_VARS(TAG)
 
1155
# -------------------------
 
1156
m4_define([_LT_LIBTOOL_TAG_VARS],
 
1157
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
 
1158
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
 
1159
 
 
1160
 
 
1161
# _LT_TAGVAR(VARNAME, [TAGNAME])
 
1162
# ------------------------------
 
1163
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
 
1164
 
 
1165
 
 
1166
# _LT_CONFIG_COMMANDS
 
1167
# -------------------
 
1168
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
 
1169
# variables for single and double quote escaping we saved from calls
 
1170
# to _LT_DECL, we can put quote escaped variables declarations
 
1171
# into `config.status', and then the shell code to quote escape them in
 
1172
# for loops in `config.status'.  Finally, any additional code accumulated
 
1173
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
 
1174
m4_defun([_LT_CONFIG_COMMANDS],
 
1175
[AC_PROVIDE_IFELSE([LT_OUTPUT],
 
1176
        dnl If the libtool generation code has been placed in $CONFIG_LT,
 
1177
        dnl instead of duplicating it all over again into config.status,
 
1178
        dnl then we will have config.status run $CONFIG_LT later, so it
 
1179
        dnl needs to know what name is stored there:
 
1180
        [AC_CONFIG_COMMANDS([libtool],
 
1181
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
 
1182
    dnl If the libtool generation code is destined for config.status,
 
1183
    dnl expand the accumulated commands and init code now:
 
1184
    [AC_CONFIG_COMMANDS([libtool],
 
1185
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
 
1186
])#_LT_CONFIG_COMMANDS
 
1187
 
 
1188
 
 
1189
# Initialize.
 
1190
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
 
1191
[
 
1192
 
 
1193
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
1194
# if CDPATH is set.
 
1195
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
1196
 
 
1197
sed_quote_subst='$sed_quote_subst'
 
1198
double_quote_subst='$double_quote_subst'
 
1199
delay_variable_subst='$delay_variable_subst'
 
1200
_LT_CONFIG_STATUS_DECLARATIONS
 
1201
LTCC='$LTCC'
 
1202
LTCFLAGS='$LTCFLAGS'
 
1203
compiler='$compiler_DEFAULT'
 
1204
 
 
1205
# A function that is used when there is no print builtin or printf.
 
1206
func_fallback_echo ()
 
1207
{
 
1208
  eval 'cat <<_LTECHO_EOF
 
1209
\$[]1
 
1210
_LTECHO_EOF'
 
1211
}
 
1212
 
 
1213
# Quote evaled strings.
 
1214
for var in lt_decl_all_varnames([[ \
 
1215
]], lt_decl_quote_varnames); do
 
1216
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
 
1217
    *[[\\\\\\\`\\"\\\$]]*)
 
1218
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
 
1219
      ;;
 
1220
    *)
 
1221
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
 
1222
      ;;
 
1223
    esac
 
1224
done
 
1225
 
 
1226
# Double-quote double-evaled strings.
 
1227
for var in lt_decl_all_varnames([[ \
 
1228
]], lt_decl_dquote_varnames); do
 
1229
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
 
1230
    *[[\\\\\\\`\\"\\\$]]*)
 
1231
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
 
1232
      ;;
 
1233
    *)
 
1234
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
 
1235
      ;;
 
1236
    esac
 
1237
done
 
1238
 
 
1239
_LT_OUTPUT_LIBTOOL_INIT
 
1240
])
 
1241
 
 
1242
# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
 
1243
# ------------------------------------
 
1244
# Generate a child script FILE with all initialization necessary to
 
1245
# reuse the environment learned by the parent script, and make the
 
1246
# file executable.  If COMMENT is supplied, it is inserted after the
 
1247
# `#!' sequence but before initialization text begins.  After this
 
1248
# macro, additional text can be appended to FILE to form the body of
 
1249
# the child script.  The macro ends with non-zero status if the
 
1250
# file could not be fully written (such as if the disk is full).
 
1251
m4_ifdef([AS_INIT_GENERATED],
 
1252
[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
 
1253
[m4_defun([_LT_GENERATED_FILE_INIT],
 
1254
[m4_require([AS_PREPARE])]dnl
 
1255
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
 
1256
[lt_write_fail=0
 
1257
cat >$1 <<_ASEOF || lt_write_fail=1
 
1258
#! $SHELL
 
1259
# Generated by $as_me.
 
1260
$2
 
1261
SHELL=\${CONFIG_SHELL-$SHELL}
 
1262
export SHELL
 
1263
_ASEOF
 
1264
cat >>$1 <<\_ASEOF || lt_write_fail=1
 
1265
AS_SHELL_SANITIZE
 
1266
_AS_PREPARE
 
1267
exec AS_MESSAGE_FD>&1
 
1268
_ASEOF
 
1269
test $lt_write_fail = 0 && chmod +x $1[]dnl
 
1270
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
1271
 
 
1272
# LT_OUTPUT
 
1273
# ---------
 
1274
# This macro allows early generation of the libtool script (before
 
1275
# AC_OUTPUT is called), incase it is used in configure for compilation
 
1276
# tests.
 
1277
AC_DEFUN([LT_OUTPUT],
 
1278
[: ${CONFIG_LT=./config.lt}
 
1279
AC_MSG_NOTICE([creating $CONFIG_LT])
 
1280
_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
 
1281
[# Run this file to recreate a libtool stub with the current configuration.])
 
1282
 
 
1283
cat >>"$CONFIG_LT" <<\_LTEOF
 
1284
lt_cl_silent=false
 
1285
exec AS_MESSAGE_LOG_FD>>config.log
 
1286
{
 
1287
  echo
 
1288
  AS_BOX([Running $as_me.])
 
1289
} >&AS_MESSAGE_LOG_FD
 
1290
 
 
1291
lt_cl_help="\
 
1292
\`$as_me' creates a local libtool stub from the current configuration,
 
1293
for use in further configure time tests before the real libtool is
 
1294
generated.
 
1295
 
 
1296
Usage: $[0] [[OPTIONS]]
 
1297
 
 
1298
  -h, --help      print this help, then exit
 
1299
  -V, --version   print version number, then exit
 
1300
  -q, --quiet     do not print progress messages
 
1301
  -d, --debug     don't remove temporary files
 
1302
 
 
1303
Report bugs to <bug-libtool@gnu.org>."
 
1304
 
 
1305
lt_cl_version="\
 
1306
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 
1307
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 
1308
configured by $[0], generated by m4_PACKAGE_STRING.
 
1309
 
 
1310
Copyright (C) 2011 Free Software Foundation, Inc.
 
1311
This config.lt script is free software; the Free Software Foundation
 
1312
gives unlimited permision to copy, distribute and modify it."
 
1313
 
 
1314
while test $[#] != 0
 
1315
do
 
1316
  case $[1] in
 
1317
    --version | --v* | -V )
 
1318
      echo "$lt_cl_version"; exit 0 ;;
 
1319
    --help | --h* | -h )
 
1320
      echo "$lt_cl_help"; exit 0 ;;
 
1321
    --debug | --d* | -d )
 
1322
      debug=: ;;
 
1323
    --quiet | --q* | --silent | --s* | -q )
 
1324
      lt_cl_silent=: ;;
 
1325
 
 
1326
    -*) AC_MSG_ERROR([unrecognized option: $[1]
 
1327
Try \`$[0] --help' for more information.]) ;;
 
1328
 
 
1329
    *) AC_MSG_ERROR([unrecognized argument: $[1]
 
1330
Try \`$[0] --help' for more information.]) ;;
 
1331
  esac
 
1332
  shift
 
1333
done
 
1334
 
 
1335
if $lt_cl_silent; then
 
1336
  exec AS_MESSAGE_FD>/dev/null
 
1337
fi
 
1338
_LTEOF
 
1339
 
 
1340
cat >>"$CONFIG_LT" <<_LTEOF
 
1341
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
 
1342
_LTEOF
 
1343
 
 
1344
cat >>"$CONFIG_LT" <<\_LTEOF
 
1345
AC_MSG_NOTICE([creating $ofile])
 
1346
_LT_OUTPUT_LIBTOOL_COMMANDS
 
1347
AS_EXIT(0)
 
1348
_LTEOF
 
1349
chmod +x "$CONFIG_LT"
 
1350
 
 
1351
# configure is writing to config.log, but config.lt does its own redirection,
 
1352
# appending to config.log, which fails on DOS, as config.log is still kept
 
1353
# open by configure.  Here we exec the FD to /dev/null, effectively closing
 
1354
# config.log, so it can be properly (re)opened and appended to by config.lt.
 
1355
lt_cl_success=:
 
1356
test "$silent" = yes &&
 
1357
  lt_config_lt_args="$lt_config_lt_args --quiet"
 
1358
exec AS_MESSAGE_LOG_FD>/dev/null
 
1359
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
 
1360
exec AS_MESSAGE_LOG_FD>>config.log
 
1361
$lt_cl_success || AS_EXIT(1)
 
1362
])# LT_OUTPUT
 
1363
 
 
1364
 
 
1365
# _LT_CONFIG(TAG)
 
1366
# ---------------
 
1367
# If TAG is the built-in tag, create an initial libtool script with a
 
1368
# default configuration from the untagged config vars.  Otherwise add code
 
1369
# to config.status for appending the configuration named by TAG from the
 
1370
# matching tagged config vars.
 
1371
m4_defun([_LT_CONFIG],
 
1372
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
1373
_LT_CONFIG_SAVE_COMMANDS([
 
1374
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
 
1375
  m4_if(_LT_TAG, [C], [
 
1376
    # See if we are running on zsh, and set the options which allow our
 
1377
    # commands through without removal of \ escapes.
 
1378
    if test -n "${ZSH_VERSION+set}" ; then
 
1379
      setopt NO_GLOB_SUBST
 
1380
    fi
 
1381
 
 
1382
    cfgfile="${ofile}T"
 
1383
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
 
1384
    $RM "$cfgfile"
 
1385
 
 
1386
    cat <<_LT_EOF >> "$cfgfile"
 
1387
#! $SHELL
 
1388
 
 
1389
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
1390
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
 
1391
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
1392
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
1393
#
 
1394
_LT_COPYING
 
1395
_LT_LIBTOOL_TAGS
 
1396
 
 
1397
# ### BEGIN LIBTOOL CONFIG
 
1398
_LT_LIBTOOL_CONFIG_VARS
 
1399
_LT_LIBTOOL_TAG_VARS
 
1400
# ### END LIBTOOL CONFIG
 
1401
 
 
1402
_LT_EOF
 
1403
 
 
1404
  case $host_os in
 
1405
  aix3*)
 
1406
    cat <<\_LT_EOF >> "$cfgfile"
 
1407
# AIX sometimes has problems with the GCC collect2 program.  For some
 
1408
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
1409
# vanish in a puff of smoke.
 
1410
if test "X${COLLECT_NAMES+set}" != Xset; then
 
1411
  COLLECT_NAMES=
 
1412
  export COLLECT_NAMES
 
1413
fi
 
1414
_LT_EOF
 
1415
    ;;
 
1416
  esac
 
1417
 
 
1418
  _LT_PROG_LTMAIN
 
1419
 
 
1420
  # We use sed instead of cat because bash on DJGPP gets confused if
 
1421
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
1422
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
1423
  # is reportedly fixed, but why not run on old versions too?
 
1424
  sed '$q' "$ltmain" >> "$cfgfile" \
 
1425
     || (rm -f "$cfgfile"; exit 1)
 
1426
 
 
1427
  _LT_PROG_REPLACE_SHELLFNS
 
1428
 
 
1429
   mv -f "$cfgfile" "$ofile" ||
 
1430
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
1431
  chmod +x "$ofile"
 
1432
],
 
1433
[cat <<_LT_EOF >> "$ofile"
 
1434
 
 
1435
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
 
1436
dnl in a comment (ie after a #).
 
1437
# ### BEGIN LIBTOOL TAG CONFIG: $1
 
1438
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
 
1439
# ### END LIBTOOL TAG CONFIG: $1
 
1440
_LT_EOF
 
1441
])dnl /m4_if
 
1442
],
 
1443
[m4_if([$1], [], [
 
1444
    PACKAGE='$PACKAGE'
 
1445
    VERSION='$VERSION'
 
1446
    TIMESTAMP='$TIMESTAMP'
 
1447
    RM='$RM'
 
1448
    ofile='$ofile'], [])
 
1449
])dnl /_LT_CONFIG_SAVE_COMMANDS
 
1450
])# _LT_CONFIG
 
1451
 
 
1452
 
 
1453
# LT_SUPPORTED_TAG(TAG)
 
1454
# ---------------------
 
1455
# Trace this macro to discover what tags are supported by the libtool
 
1456
# --tag option, using:
 
1457
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
 
1458
AC_DEFUN([LT_SUPPORTED_TAG], [])
 
1459
 
 
1460
 
 
1461
# C support is built-in for now
 
1462
m4_define([_LT_LANG_C_enabled], [])
 
1463
m4_define([_LT_TAGS], [])
 
1464
 
 
1465
 
 
1466
# LT_LANG(LANG)
 
1467
# -------------
 
1468
# Enable libtool support for the given language if not already enabled.
 
1469
AC_DEFUN([LT_LANG],
 
1470
[AC_BEFORE([$0], [LT_OUTPUT])dnl
 
1471
m4_case([$1],
 
1472
  [C],                  [_LT_LANG(C)],
 
1473
  [C++],                [_LT_LANG(CXX)],
 
1474
  [Go],                 [_LT_LANG(GO)],
 
1475
  [Java],               [_LT_LANG(GCJ)],
 
1476
  [Fortran 77],         [_LT_LANG(F77)],
 
1477
  [Fortran],            [_LT_LANG(FC)],
 
1478
  [Windows Resource],   [_LT_LANG(RC)],
 
1479
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
 
1480
    [_LT_LANG($1)],
 
1481
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
 
1482
])# LT_LANG
 
1483
 
 
1484
 
 
1485
# _LT_LANG(LANGNAME)
 
1486
# ------------------
 
1487
m4_defun([_LT_LANG],
 
1488
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
 
1489
  [LT_SUPPORTED_TAG([$1])dnl
 
1490
  m4_append([_LT_TAGS], [$1 ])dnl
 
1491
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
 
1492
  _LT_LANG_$1_CONFIG($1)])dnl
 
1493
])# _LT_LANG
 
1494
 
 
1495
 
 
1496
m4_ifndef([AC_PROG_GO], [
 
1497
# NOTE: This macro has been submitted for inclusion into   #
 
1498
#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
 
1499
#  a released version of Autoconf we should remove this    #
 
1500
#  macro and use it instead.                               #
 
1501
m4_defun([AC_PROG_GO],
 
1502
[AC_LANG_PUSH(Go)dnl
 
1503
AC_ARG_VAR([GOC],     [Go compiler command])dnl
 
1504
AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
 
1505
_AC_ARG_VAR_LDFLAGS()dnl
 
1506
AC_CHECK_TOOL(GOC, gccgo)
 
1507
if test -z "$GOC"; then
 
1508
  if test -n "$ac_tool_prefix"; then
 
1509
    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
 
1510
  fi
 
1511
fi
 
1512
if test -z "$GOC"; then
 
1513
  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
 
1514
fi
 
1515
])#m4_defun
 
1516
])#m4_ifndef
 
1517
 
 
1518
 
 
1519
# _LT_LANG_DEFAULT_CONFIG
 
1520
# -----------------------
 
1521
m4_defun([_LT_LANG_DEFAULT_CONFIG],
 
1522
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
1523
  [LT_LANG(CXX)],
 
1524
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
 
1525
 
 
1526
AC_PROVIDE_IFELSE([AC_PROG_F77],
 
1527
  [LT_LANG(F77)],
 
1528
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
 
1529
 
 
1530
AC_PROVIDE_IFELSE([AC_PROG_FC],
 
1531
  [LT_LANG(FC)],
 
1532
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
 
1533
 
 
1534
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
 
1535
dnl pulling things in needlessly.
 
1536
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
1537
  [LT_LANG(GCJ)],
 
1538
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
1539
    [LT_LANG(GCJ)],
 
1540
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
 
1541
      [LT_LANG(GCJ)],
 
1542
      [m4_ifdef([AC_PROG_GCJ],
 
1543
        [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
 
1544
       m4_ifdef([A][M_PROG_GCJ],
 
1545
        [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
 
1546
       m4_ifdef([LT_PROG_GCJ],
 
1547
        [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
1548
 
 
1549
AC_PROVIDE_IFELSE([AC_PROG_GO],
 
1550
  [LT_LANG(GO)],
 
1551
  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
 
1552
 
 
1553
AC_PROVIDE_IFELSE([LT_PROG_RC],
 
1554
  [LT_LANG(RC)],
 
1555
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
 
1556
])# _LT_LANG_DEFAULT_CONFIG
 
1557
 
 
1558
# Obsolete macros:
 
1559
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 
1560
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 
1561
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
 
1562
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
 
1563
AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
 
1564
dnl aclocal-1.4 backwards compatibility:
 
1565
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
 
1566
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
 
1567
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
 
1568
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
 
1569
dnl AC_DEFUN([AC_LIBTOOL_RC], [])
 
1570
 
 
1571
 
 
1572
# _LT_TAG_COMPILER
 
1573
# ----------------
 
1574
m4_defun([_LT_TAG_COMPILER],
 
1575
[AC_REQUIRE([AC_PROG_CC])dnl
 
1576
 
 
1577
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
 
1578
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
 
1579
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
 
1580
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
 
1581
 
 
1582
# If no C compiler was specified, use CC.
 
1583
LTCC=${LTCC-"$CC"}
 
1584
 
 
1585
# If no C compiler flags were specified, use CFLAGS.
 
1586
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
1587
 
 
1588
# Allow CC to be a program name with arguments.
 
1589
compiler=$CC
 
1590
])# _LT_TAG_COMPILER
 
1591
 
 
1592
 
 
1593
# _LT_COMPILER_BOILERPLATE
 
1594
# ------------------------
 
1595
# Check for compiler boilerplate output or warnings with
 
1596
# the simple compiler test code.
 
1597
m4_defun([_LT_COMPILER_BOILERPLATE],
 
1598
[m4_require([_LT_DECL_SED])dnl
 
1599
ac_outfile=conftest.$ac_objext
 
1600
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
 
1601
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
1602
_lt_compiler_boilerplate=`cat conftest.err`
 
1603
$RM conftest*
 
1604
])# _LT_COMPILER_BOILERPLATE
 
1605
 
 
1606
 
 
1607
# _LT_LINKER_BOILERPLATE
 
1608
# ----------------------
 
1609
# Check for linker boilerplate output or warnings with
 
1610
# the simple link test code.
 
1611
m4_defun([_LT_LINKER_BOILERPLATE],
 
1612
[m4_require([_LT_DECL_SED])dnl
 
1613
ac_outfile=conftest.$ac_objext
 
1614
echo "$lt_simple_link_test_code" >conftest.$ac_ext
 
1615
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
1616
_lt_linker_boilerplate=`cat conftest.err`
 
1617
$RM -r conftest*
 
1618
])# _LT_LINKER_BOILERPLATE
 
1619
 
 
1620
# _LT_REQUIRED_DARWIN_CHECKS
 
1621
# -------------------------
 
1622
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 
1623
  case $host_os in
 
1624
    rhapsody* | darwin*)
 
1625
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
 
1626
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
 
1627
    AC_CHECK_TOOL([LIPO], [lipo], [:])
 
1628
    AC_CHECK_TOOL([OTOOL], [otool], [:])
 
1629
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
 
1630
    _LT_DECL([], [DSYMUTIL], [1],
 
1631
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
 
1632
    _LT_DECL([], [NMEDIT], [1],
 
1633
      [Tool to change global to local symbols on Mac OS X])
 
1634
    _LT_DECL([], [LIPO], [1],
 
1635
      [Tool to manipulate fat objects and archives on Mac OS X])
 
1636
    _LT_DECL([], [OTOOL], [1],
 
1637
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
 
1638
    _LT_DECL([], [OTOOL64], [1],
 
1639
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
 
1640
 
 
1641
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
 
1642
      [lt_cv_apple_cc_single_mod=no
 
1643
      if test -z "${LT_MULTI_MODULE}"; then
 
1644
        # By default we will add the -single_module flag. You can override
 
1645
        # by either setting the environment variable LT_MULTI_MODULE
 
1646
        # non-empty at configure time, or by adding -multi_module to the
 
1647
        # link flags.
 
1648
        rm -rf libconftest.dylib*
 
1649
        echo "int foo(void){return 1;}" > conftest.c
 
1650
        echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 
1651
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
 
1652
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 
1653
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
 
1654
        _lt_result=$?
 
1655
        # If there is a non-empty error log, and "single_module"
 
1656
        # appears in it, assume the flag caused a linker warning
 
1657
        if test -s conftest.err && $GREP single_module conftest.err; then
 
1658
          cat conftest.err >&AS_MESSAGE_LOG_FD
 
1659
        # Otherwise, if the output was created with a 0 exit code from
 
1660
        # the compiler, it worked.
 
1661
        elif test -f libconftest.dylib && test $_lt_result -eq 0; then
 
1662
          lt_cv_apple_cc_single_mod=yes
 
1663
        else
 
1664
          cat conftest.err >&AS_MESSAGE_LOG_FD
 
1665
        fi
 
1666
        rm -rf libconftest.dylib*
 
1667
        rm -f conftest.*
 
1668
      fi])
 
1669
 
 
1670
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
 
1671
      [lt_cv_ld_exported_symbols_list],
 
1672
      [lt_cv_ld_exported_symbols_list=no
 
1673
      save_LDFLAGS=$LDFLAGS
 
1674
      echo "_main" > conftest.sym
 
1675
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
 
1676
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
1677
        [lt_cv_ld_exported_symbols_list=yes],
 
1678
        [lt_cv_ld_exported_symbols_list=no])
 
1679
        LDFLAGS="$save_LDFLAGS"
 
1680
    ])
 
1681
 
 
1682
    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
 
1683
      [lt_cv_ld_force_load=no
 
1684
      cat > conftest.c << _LT_EOF
 
1685
int forced_loaded() { return 2;}
 
1686
_LT_EOF
 
1687
      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
 
1688
      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
 
1689
      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
 
1690
      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
 
1691
      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
 
1692
      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
 
1693
      cat > conftest.c << _LT_EOF
 
1694
int main() { return 0;}
 
1695
_LT_EOF
 
1696
      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
 
1697
      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
 
1698
      _lt_result=$?
 
1699
      if test -s conftest.err && $GREP force_load conftest.err; then
 
1700
        cat conftest.err >&AS_MESSAGE_LOG_FD
 
1701
      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
 
1702
        lt_cv_ld_force_load=yes
 
1703
      else
 
1704
        cat conftest.err >&AS_MESSAGE_LOG_FD
 
1705
      fi
 
1706
        rm -f conftest.err libconftest.a conftest conftest.c
 
1707
        rm -rf conftest.dSYM
 
1708
    ])
 
1709
    case $host_os in
 
1710
    rhapsody* | darwin1.[[012]])
 
1711
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
 
1712
    darwin1.*)
 
1713
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
1714
    darwin*) # darwin 5.x on
 
1715
      # if running on 10.5 or later, the deployment target defaults
 
1716
      # to the OS version, if on x86, and 10.4, the deployment
 
1717
      # target defaults to 10.4. Don't you love it?
 
1718
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 
1719
        10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
 
1720
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
1721
        10.[[012]]*)
 
1722
          _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
1723
        10.*)
 
1724
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
1725
      esac
 
1726
    ;;
 
1727
  esac
 
1728
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
 
1729
      _lt_dar_single_mod='$single_module'
 
1730
    fi
 
1731
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
 
1732
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
 
1733
    else
 
1734
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
1735
    fi
 
1736
    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
 
1737
      _lt_dsymutil='~$DSYMUTIL $lib || :'
 
1738
    else
 
1739
      _lt_dsymutil=
 
1740
    fi
 
1741
    ;;
 
1742
  esac
 
1743
])
 
1744
 
 
1745
 
 
1746
# _LT_DARWIN_LINKER_FEATURES([TAG])
 
1747
# ---------------------------------
 
1748
# Checks for linker and compiler features on darwin
 
1749
m4_defun([_LT_DARWIN_LINKER_FEATURES],
 
1750
[
 
1751
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
 
1752
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
1753
  _LT_TAGVAR(hardcode_direct, $1)=no
 
1754
  _LT_TAGVAR(hardcode_automatic, $1)=yes
 
1755
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
1756
  if test "$lt_cv_ld_force_load" = "yes"; then
 
1757
    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
 
1758
    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
 
1759
                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
 
1760
  else
 
1761
    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
 
1762
  fi
 
1763
  _LT_TAGVAR(link_all_deplibs, $1)=yes
 
1764
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
 
1765
  case $cc_basename in
 
1766
     ifort*) _lt_dar_can_shared=yes ;;
 
1767
     *) _lt_dar_can_shared=$GCC ;;
 
1768
  esac
 
1769
  if test "$_lt_dar_can_shared" = "yes"; then
 
1770
    output_verbose_link_cmd=func_echo_all
 
1771
    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
 
1772
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
 
1773
    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
 
1774
    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
1775
    m4_if([$1], [CXX],
 
1776
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
 
1777
      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
 
1778
      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
 
1779
    fi
 
1780
],[])
 
1781
  else
 
1782
  _LT_TAGVAR(ld_shlibs, $1)=no
 
1783
  fi
 
1784
])
 
1785
 
 
1786
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
 
1787
# ----------------------------------
 
1788
# Links a minimal program and checks the executable
 
1789
# for the system default hardcoded library path. In most cases,
 
1790
# this is /usr/lib:/lib, but when the MPI compilers are used
 
1791
# the location of the communication and MPI libs are included too.
 
1792
# If we don't find anything, use the default library path according
 
1793
# to the aix ld manual.
 
1794
# Store the results from the different compilers for each TAGNAME.
 
1795
# Allow to override them for all tags through lt_cv_aix_libpath.
 
1796
m4_defun([_LT_SYS_MODULE_PATH_AIX],
 
1797
[m4_require([_LT_DECL_SED])dnl
 
1798
if test "${lt_cv_aix_libpath+set}" = set; then
 
1799
  aix_libpath=$lt_cv_aix_libpath
 
1800
else
 
1801
  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
 
1802
  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
 
1803
  lt_aix_libpath_sed='[
 
1804
      /Import File Strings/,/^$/ {
 
1805
          /^0/ {
 
1806
              s/^0  *\([^ ]*\) *$/\1/
 
1807
              p
 
1808
          }
 
1809
      }]'
 
1810
  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
1811
  # Check for a 64-bit object if we didn't find anything.
 
1812
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
 
1813
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
1814
  fi],[])
 
1815
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
 
1816
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
 
1817
  fi
 
1818
  ])
 
1819
  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
 
1820
fi
 
1821
])# _LT_SYS_MODULE_PATH_AIX
 
1822
 
 
1823
 
 
1824
# _LT_SHELL_INIT(ARG)
 
1825
# -------------------
 
1826
m4_define([_LT_SHELL_INIT],
 
1827
[m4_divert_text([M4SH-INIT], [$1
 
1828
])])# _LT_SHELL_INIT
 
1829
 
 
1830
 
 
1831
 
 
1832
# _LT_PROG_ECHO_BACKSLASH
 
1833
# -----------------------
 
1834
# Find how we can fake an echo command that does not interpret backslash.
 
1835
# In particular, with Autoconf 2.60 or later we add some code to the start
 
1836
# of the generated configure script which will find a shell with a builtin
 
1837
# printf (which we can use as an echo command).
 
1838
m4_defun([_LT_PROG_ECHO_BACKSLASH],
 
1839
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 
1840
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 
1841
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
1842
 
 
1843
AC_MSG_CHECKING([how to print strings])
 
1844
# Test print first, because it will be a builtin if present.
 
1845
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
 
1846
   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
 
1847
  ECHO='print -r --'
 
1848
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
 
1849
  ECHO='printf %s\n'
 
1850
else
 
1851
  # Use this function as a fallback that always works.
 
1852
  func_fallback_echo ()
 
1853
  {
 
1854
    eval 'cat <<_LTECHO_EOF
 
1855
$[]1
 
1856
_LTECHO_EOF'
 
1857
  }
 
1858
  ECHO='func_fallback_echo'
 
1859
fi
 
1860
 
 
1861
# func_echo_all arg...
 
1862
# Invoke $ECHO with all args, space-separated.
 
1863
func_echo_all ()
 
1864
{
 
1865
    $ECHO "$*" 
 
1866
}
 
1867
 
 
1868
case "$ECHO" in
 
1869
  printf*) AC_MSG_RESULT([printf]) ;;
 
1870
  print*) AC_MSG_RESULT([print -r]) ;;
 
1871
  *) AC_MSG_RESULT([cat]) ;;
 
1872
esac
 
1873
 
 
1874
m4_ifdef([_AS_DETECT_SUGGESTED],
 
1875
[_AS_DETECT_SUGGESTED([
 
1876
  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
 
1877
    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 
1878
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 
1879
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
1880
    PATH=/empty FPATH=/empty; export PATH FPATH
 
1881
    test "X`printf %s $ECHO`" = "X$ECHO" \
 
1882
      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
 
1883
 
 
1884
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
 
1885
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 
1886
])# _LT_PROG_ECHO_BACKSLASH
 
1887
 
 
1888
 
 
1889
# _LT_WITH_SYSROOT
 
1890
# ----------------
 
1891
AC_DEFUN([_LT_WITH_SYSROOT],
 
1892
[AC_MSG_CHECKING([for sysroot])
 
1893
AC_ARG_WITH([sysroot],
 
1894
[  --with-sysroot[=DIR] Search for dependent libraries within DIR
 
1895
                        (or the compiler's sysroot if not specified).],
 
1896
[], [with_sysroot=no])
 
1897
 
 
1898
dnl lt_sysroot will always be passed unquoted.  We quote it here
 
1899
dnl in case the user passed a directory name.
 
1900
lt_sysroot=
 
1901
case ${with_sysroot} in #(
 
1902
 yes)
 
1903
   if test "$GCC" = yes; then
 
1904
     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
 
1905
   fi
 
1906
   ;; #(
 
1907
 /*)
 
1908
   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
 
1909
   ;; #(
 
1910
 no|'')
 
1911
   ;; #(
 
1912
 *)
 
1913
   AC_MSG_RESULT([${with_sysroot}])
 
1914
   AC_MSG_ERROR([The sysroot must be an absolute path.])
 
1915
   ;;
 
1916
esac
 
1917
 
 
1918
 AC_MSG_RESULT([${lt_sysroot:-no}])
 
1919
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
 
1920
[dependent libraries, and in which our libraries should be installed.])])
 
1921
 
 
1922
# _LT_ENABLE_LOCK
 
1923
# ---------------
 
1924
m4_defun([_LT_ENABLE_LOCK],
 
1925
[AC_ARG_ENABLE([libtool-lock],
 
1926
  [AS_HELP_STRING([--disable-libtool-lock],
 
1927
    [avoid locking (might break parallel builds)])])
 
1928
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
1929
 
 
1930
# Some flags need to be propagated to the compiler or linker for good
 
1931
# libtool support.
 
1932
case $host in
 
1933
ia64-*-hpux*)
 
1934
  # Find out which ABI we are using.
 
1935
  echo 'int i;' > conftest.$ac_ext
 
1936
  if AC_TRY_EVAL(ac_compile); then
 
1937
    case `/usr/bin/file conftest.$ac_objext` in
 
1938
      *ELF-32*)
 
1939
        HPUX_IA64_MODE="32"
 
1940
        ;;
 
1941
      *ELF-64*)
 
1942
        HPUX_IA64_MODE="64"
 
1943
        ;;
 
1944
    esac
 
1945
  fi
 
1946
  rm -rf conftest*
 
1947
  ;;
 
1948
*-*-irix6*)
 
1949
  # Find out which ABI we are using.
 
1950
  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
 
1951
  if AC_TRY_EVAL(ac_compile); then
 
1952
    if test "$lt_cv_prog_gnu_ld" = yes; then
 
1953
      case `/usr/bin/file conftest.$ac_objext` in
 
1954
        *32-bit*)
 
1955
          LD="${LD-ld} -melf32bsmip"
 
1956
          ;;
 
1957
        *N32*)
 
1958
          LD="${LD-ld} -melf32bmipn32"
 
1959
          ;;
 
1960
        *64-bit*)
 
1961
          LD="${LD-ld} -melf64bmip"
 
1962
        ;;
 
1963
      esac
 
1964
    else
 
1965
      case `/usr/bin/file conftest.$ac_objext` in
 
1966
        *32-bit*)
 
1967
          LD="${LD-ld} -32"
 
1968
          ;;
 
1969
        *N32*)
 
1970
          LD="${LD-ld} -n32"
 
1971
          ;;
 
1972
        *64-bit*)
 
1973
          LD="${LD-ld} -64"
 
1974
          ;;
 
1975
      esac
 
1976
    fi
 
1977
  fi
 
1978
  rm -rf conftest*
 
1979
  ;;
 
1980
 
 
1981
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
 
1982
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
1983
  # Find out which ABI we are using.
 
1984
  echo 'int i;' > conftest.$ac_ext
 
1985
  if AC_TRY_EVAL(ac_compile); then
 
1986
    case `/usr/bin/file conftest.o` in
 
1987
      *32-bit*)
 
1988
        case $host in
 
1989
          x86_64-*kfreebsd*-gnu)
 
1990
            LD="${LD-ld} -m elf_i386_fbsd"
 
1991
            ;;
 
1992
          x86_64-*linux*)
 
1993
            LD="${LD-ld} -m elf_i386"
 
1994
            ;;
 
1995
          ppc64-*linux*|powerpc64-*linux*)
 
1996
            LD="${LD-ld} -m elf32ppclinux"
 
1997
            ;;
 
1998
          s390x-*linux*)
 
1999
            LD="${LD-ld} -m elf_s390"
 
2000
            ;;
 
2001
          sparc64-*linux*)
 
2002
            LD="${LD-ld} -m elf32_sparc"
 
2003
            ;;
 
2004
        esac
 
2005
        ;;
 
2006
      *64-bit*)
 
2007
        case $host in
 
2008
          x86_64-*kfreebsd*-gnu)
 
2009
            LD="${LD-ld} -m elf_x86_64_fbsd"
 
2010
            ;;
 
2011
          x86_64-*linux*)
 
2012
            LD="${LD-ld} -m elf_x86_64"
 
2013
            ;;
 
2014
          ppc*-*linux*|powerpc*-*linux*)
 
2015
            LD="${LD-ld} -m elf64ppc"
 
2016
            ;;
 
2017
          s390*-*linux*|s390*-*tpf*)
 
2018
            LD="${LD-ld} -m elf64_s390"
 
2019
            ;;
 
2020
          sparc*-*linux*)
 
2021
            LD="${LD-ld} -m elf64_sparc"
 
2022
            ;;
 
2023
        esac
 
2024
        ;;
 
2025
    esac
 
2026
  fi
 
2027
  rm -rf conftest*
 
2028
  ;;
 
2029
 
 
2030
*-*-sco3.2v5*)
 
2031
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
2032
  SAVE_CFLAGS="$CFLAGS"
 
2033
  CFLAGS="$CFLAGS -belf"
 
2034
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
2035
    [AC_LANG_PUSH(C)
 
2036
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
2037
     AC_LANG_POP])
 
2038
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
2039
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
2040
    CFLAGS="$SAVE_CFLAGS"
 
2041
  fi
 
2042
  ;;
 
2043
*-*solaris*)
 
2044
  # Find out which ABI we are using.
 
2045
  echo 'int i;' > conftest.$ac_ext
 
2046
  if AC_TRY_EVAL(ac_compile); then
 
2047
    case `/usr/bin/file conftest.o` in
 
2048
    *64-bit*)
 
2049
      case $lt_cv_prog_gnu_ld in
 
2050
      yes*)
 
2051
        case $host in
 
2052
        i?86-*-solaris*)
 
2053
          LD="${LD-ld} -m elf_x86_64"
 
2054
          ;;
 
2055
        sparc*-*-solaris*)
 
2056
          LD="${LD-ld} -m elf64_sparc"
 
2057
          ;;
 
2058
        esac
 
2059
        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
 
2060
        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
 
2061
          LD="${LD-ld}_sol2"
 
2062
        fi
 
2063
        ;;
 
2064
      *)
 
2065
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 
2066
          LD="${LD-ld} -64"
 
2067
        fi
 
2068
        ;;
 
2069
      esac
 
2070
      ;;
 
2071
    esac
 
2072
  fi
 
2073
  rm -rf conftest*
 
2074
  ;;
 
2075
esac
 
2076
 
 
2077
need_locks="$enable_libtool_lock"
 
2078
])# _LT_ENABLE_LOCK
 
2079
 
 
2080
 
 
2081
# _LT_PROG_AR
 
2082
# -----------
 
2083
m4_defun([_LT_PROG_AR],
 
2084
[AC_CHECK_TOOLS(AR, [ar], false)
 
2085
: ${AR=ar}
 
2086
: ${AR_FLAGS=cru}
 
2087
_LT_DECL([], [AR], [1], [The archiver])
 
2088
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
 
2089
 
 
2090
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
 
2091
  [lt_cv_ar_at_file=no
 
2092
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
 
2093
     [echo conftest.$ac_objext > conftest.lst
 
2094
      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
 
2095
      AC_TRY_EVAL([lt_ar_try])
 
2096
      if test "$ac_status" -eq 0; then
 
2097
        # Ensure the archiver fails upon bogus file names.
 
2098
        rm -f conftest.$ac_objext libconftest.a
 
2099
        AC_TRY_EVAL([lt_ar_try])
 
2100
        if test "$ac_status" -ne 0; then
 
2101
          lt_cv_ar_at_file=@
 
2102
        fi
 
2103
      fi
 
2104
      rm -f conftest.* libconftest.a
 
2105
     ])
 
2106
  ])
 
2107
 
 
2108
if test "x$lt_cv_ar_at_file" = xno; then
 
2109
  archiver_list_spec=
 
2110
else
 
2111
  archiver_list_spec=$lt_cv_ar_at_file
 
2112
fi
 
2113
_LT_DECL([], [archiver_list_spec], [1],
 
2114
  [How to feed a file listing to the archiver])
 
2115
])# _LT_PROG_AR
 
2116
 
 
2117
 
 
2118
# _LT_CMD_OLD_ARCHIVE
 
2119
# -------------------
 
2120
m4_defun([_LT_CMD_OLD_ARCHIVE],
 
2121
[_LT_PROG_AR
 
2122
 
 
2123
AC_CHECK_TOOL(STRIP, strip, :)
 
2124
test -z "$STRIP" && STRIP=:
 
2125
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
 
2126
 
 
2127
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
2128
test -z "$RANLIB" && RANLIB=:
 
2129
_LT_DECL([], [RANLIB], [1],
 
2130
    [Commands used to install an old-style archive])
 
2131
 
 
2132
# Determine commands to create old-style static archives.
 
2133
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
 
2134
old_postinstall_cmds='chmod 644 $oldlib'
 
2135
old_postuninstall_cmds=
 
2136
 
 
2137
if test -n "$RANLIB"; then
 
2138
  case $host_os in
 
2139
  openbsd*)
 
2140
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
 
2141
    ;;
 
2142
  *)
 
2143
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
 
2144
    ;;
 
2145
  esac
 
2146
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 
2147
fi
 
2148
 
 
2149
case $host_os in
 
2150
  darwin*)
 
2151
    lock_old_archive_extraction=yes ;;
 
2152
  *)
 
2153
    lock_old_archive_extraction=no ;;
 
2154
esac
 
2155
_LT_DECL([], [old_postinstall_cmds], [2])
 
2156
_LT_DECL([], [old_postuninstall_cmds], [2])
 
2157
_LT_TAGDECL([], [old_archive_cmds], [2],
 
2158
    [Commands used to build an old-style archive])
 
2159
_LT_DECL([], [lock_old_archive_extraction], [0],
 
2160
    [Whether to use a lock for old archive extraction])
 
2161
])# _LT_CMD_OLD_ARCHIVE
 
2162
 
 
2163
 
 
2164
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
2165
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
2166
# ----------------------------------------------------------------
 
2167
# Check whether the given compiler option works
 
2168
AC_DEFUN([_LT_COMPILER_OPTION],
 
2169
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2170
m4_require([_LT_DECL_SED])dnl
 
2171
AC_CACHE_CHECK([$1], [$2],
 
2172
  [$2=no
 
2173
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
2174
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
2175
   lt_compiler_flag="$3"
 
2176
   # Insert the option either (1) after the last *FLAGS variable, or
 
2177
   # (2) before a word containing "conftest.", or (3) at the end.
 
2178
   # Note that $ac_compile itself does not contain backslashes and begins
 
2179
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
2180
   # The option is referenced via a variable to avoid confusing sed.
 
2181
   lt_compile=`echo "$ac_compile" | $SED \
 
2182
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
2183
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
2184
   -e 's:$: $lt_compiler_flag:'`
 
2185
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
2186
   (eval "$lt_compile" 2>conftest.err)
 
2187
   ac_status=$?
 
2188
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
2189
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
2190
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
2191
     # The compiler can only warn and ignore the option if not recognized
 
2192
     # So say no if there are warnings other than the usual output.
 
2193
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
 
2194
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
2195
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
 
2196
       $2=yes
 
2197
     fi
 
2198
   fi
 
2199
   $RM conftest*
 
2200
])
 
2201
 
 
2202
if test x"[$]$2" = xyes; then
 
2203
    m4_if([$5], , :, [$5])
 
2204
else
 
2205
    m4_if([$6], , :, [$6])
 
2206
fi
 
2207
])# _LT_COMPILER_OPTION
 
2208
 
 
2209
# Old name:
 
2210
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
 
2211
dnl aclocal-1.4 backwards compatibility:
 
2212
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
 
2213
 
 
2214
 
 
2215
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
2216
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
 
2217
# ----------------------------------------------------
 
2218
# Check whether the given linker option works
 
2219
AC_DEFUN([_LT_LINKER_OPTION],
 
2220
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2221
m4_require([_LT_DECL_SED])dnl
 
2222
AC_CACHE_CHECK([$1], [$2],
 
2223
  [$2=no
 
2224
   save_LDFLAGS="$LDFLAGS"
 
2225
   LDFLAGS="$LDFLAGS $3"
 
2226
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
 
2227
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
2228
     # The linker can only warn and ignore the option if not recognized
 
2229
     # So say no if there are warnings
 
2230
     if test -s conftest.err; then
 
2231
       # Append any errors to the config.log.
 
2232
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
2233
       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
 
2234
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
2235
       if diff conftest.exp conftest.er2 >/dev/null; then
 
2236
         $2=yes
 
2237
       fi
 
2238
     else
 
2239
       $2=yes
 
2240
     fi
 
2241
   fi
 
2242
   $RM -r conftest*
 
2243
   LDFLAGS="$save_LDFLAGS"
 
2244
])
 
2245
 
 
2246
if test x"[$]$2" = xyes; then
 
2247
    m4_if([$4], , :, [$4])
 
2248
else
 
2249
    m4_if([$5], , :, [$5])
 
2250
fi
 
2251
])# _LT_LINKER_OPTION
 
2252
 
 
2253
# Old name:
 
2254
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
 
2255
dnl aclocal-1.4 backwards compatibility:
 
2256
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
 
2257
 
 
2258
 
 
2259
# LT_CMD_MAX_LEN
 
2260
#---------------
 
2261
AC_DEFUN([LT_CMD_MAX_LEN],
 
2262
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2263
# find the maximum length of command line arguments
 
2264
AC_MSG_CHECKING([the maximum length of command line arguments])
 
2265
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
2266
  i=0
 
2267
  teststring="ABCD"
 
2268
 
 
2269
  case $build_os in
 
2270
  msdosdjgpp*)
 
2271
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
2272
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
2273
    # during glob expansion).  Even if it were fixed, the result of this
 
2274
    # check would be larger than it should be.
 
2275
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
2276
    ;;
 
2277
 
 
2278
  gnu*)
 
2279
    # Under GNU Hurd, this test is not required because there is
 
2280
    # no limit to the length of command line arguments.
 
2281
    # Libtool will interpret -1 as no limit whatsoever
 
2282
    lt_cv_sys_max_cmd_len=-1;
 
2283
    ;;
 
2284
 
 
2285
  cygwin* | mingw* | cegcc*)
 
2286
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
2287
    # about 5 minutes as the teststring grows exponentially.
 
2288
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
2289
    # you end up with a "frozen" computer, even though with patience
 
2290
    # the test eventually succeeds (with a max line length of 256k).
 
2291
    # Instead, let's just punt: use the minimum linelength reported by
 
2292
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
2293
    lt_cv_sys_max_cmd_len=8192;
 
2294
    ;;
 
2295
 
 
2296
  mint*)
 
2297
    # On MiNT this can take a long time and run out of memory.
 
2298
    lt_cv_sys_max_cmd_len=8192;
 
2299
    ;;
 
2300
 
 
2301
  amigaos*)
 
2302
    # On AmigaOS with pdksh, this test takes hours, literally.
 
2303
    # So we just punt and use a minimum line length of 8192.
 
2304
    lt_cv_sys_max_cmd_len=8192;
 
2305
    ;;
 
2306
 
 
2307
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
 
2308
    # This has been around since 386BSD, at least.  Likely further.
 
2309
    if test -x /sbin/sysctl; then
 
2310
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
2311
    elif test -x /usr/sbin/sysctl; then
 
2312
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
2313
    else
 
2314
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
 
2315
    fi
 
2316
    # And add a safety zone
 
2317
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
2318
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
2319
    ;;
 
2320
 
 
2321
  interix*)
 
2322
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
 
2323
    lt_cv_sys_max_cmd_len=196608
 
2324
    ;;
 
2325
 
 
2326
  os2*)
 
2327
    # The test takes a long time on OS/2.
 
2328
    lt_cv_sys_max_cmd_len=8192
 
2329
    ;;
 
2330
 
 
2331
  osf*)
 
2332
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
 
2333
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
 
2334
    # nice to cause kernel panics so lets avoid the loop below.
 
2335
    # First set a reasonable default.
 
2336
    lt_cv_sys_max_cmd_len=16384
 
2337
    #
 
2338
    if test -x /sbin/sysconfig; then
 
2339
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
 
2340
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
 
2341
      esac
 
2342
    fi
 
2343
    ;;
 
2344
  sco3.2v5*)
 
2345
    lt_cv_sys_max_cmd_len=102400
 
2346
    ;;
 
2347
  sysv5* | sco5v6* | sysv4.2uw2*)
 
2348
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
 
2349
    if test -n "$kargmax"; then
 
2350
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
 
2351
    else
 
2352
      lt_cv_sys_max_cmd_len=32768
 
2353
    fi
 
2354
    ;;
 
2355
  *)
 
2356
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
 
2357
    if test -n "$lt_cv_sys_max_cmd_len"; then
 
2358
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
2359
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
2360
    else
 
2361
      # Make teststring a little bigger before we do anything with it.
 
2362
      # a 1K string should be a reasonable start.
 
2363
      for i in 1 2 3 4 5 6 7 8 ; do
 
2364
        teststring=$teststring$teststring
 
2365
      done
 
2366
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
2367
      # If test is not a shell built-in, we'll probably end up computing a
 
2368
      # maximum length that is only half of the actual maximum length, but
 
2369
      # we can't tell.
 
2370
      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
 
2371
                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
 
2372
              test $i != 17 # 1/2 MB should be enough
 
2373
      do
 
2374
        i=`expr $i + 1`
 
2375
        teststring=$teststring$teststring
 
2376
      done
 
2377
      # Only check the string length outside the loop.
 
2378
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
 
2379
      teststring=
 
2380
      # Add a significant safety factor because C++ compilers can tack on
 
2381
      # massive amounts of additional arguments before passing them to the
 
2382
      # linker.  It appears as though 1/2 is a usable value.
 
2383
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
2384
    fi
 
2385
    ;;
 
2386
  esac
 
2387
])
 
2388
if test -n $lt_cv_sys_max_cmd_len ; then
 
2389
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
2390
else
 
2391
  AC_MSG_RESULT(none)
 
2392
fi
 
2393
max_cmd_len=$lt_cv_sys_max_cmd_len
 
2394
_LT_DECL([], [max_cmd_len], [0],
 
2395
    [What is the maximum length of a command?])
 
2396
])# LT_CMD_MAX_LEN
 
2397
 
 
2398
# Old name:
 
2399
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
 
2400
dnl aclocal-1.4 backwards compatibility:
 
2401
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
 
2402
 
 
2403
 
 
2404
# _LT_HEADER_DLFCN
 
2405
# ----------------
 
2406
m4_defun([_LT_HEADER_DLFCN],
 
2407
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
 
2408
])# _LT_HEADER_DLFCN
 
2409
 
 
2410
 
 
2411
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
2412
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
2413
# ----------------------------------------------------------------
 
2414
m4_defun([_LT_TRY_DLOPEN_SELF],
 
2415
[m4_require([_LT_HEADER_DLFCN])dnl
 
2416
if test "$cross_compiling" = yes; then :
 
2417
  [$4]
 
2418
else
 
2419
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
2420
  lt_status=$lt_dlunknown
 
2421
  cat > conftest.$ac_ext <<_LT_EOF
 
2422
[#line $LINENO "configure"
 
2423
#include "confdefs.h"
 
2424
 
 
2425
#if HAVE_DLFCN_H
 
2426
#include <dlfcn.h>
 
2427
#endif
 
2428
 
 
2429
#include <stdio.h>
 
2430
 
 
2431
#ifdef RTLD_GLOBAL
 
2432
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
2433
#else
 
2434
#  ifdef DL_GLOBAL
 
2435
#    define LT_DLGLOBAL         DL_GLOBAL
 
2436
#  else
 
2437
#    define LT_DLGLOBAL         0
 
2438
#  endif
 
2439
#endif
 
2440
 
 
2441
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
2442
   find out it does not work in some platform. */
 
2443
#ifndef LT_DLLAZY_OR_NOW
 
2444
#  ifdef RTLD_LAZY
 
2445
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
2446
#  else
 
2447
#    ifdef DL_LAZY
 
2448
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
2449
#    else
 
2450
#      ifdef RTLD_NOW
 
2451
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
2452
#      else
 
2453
#        ifdef DL_NOW
 
2454
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
2455
#        else
 
2456
#          define LT_DLLAZY_OR_NOW      0
 
2457
#        endif
 
2458
#      endif
 
2459
#    endif
 
2460
#  endif
 
2461
#endif
 
2462
 
 
2463
/* When -fvisbility=hidden is used, assume the code has been annotated
 
2464
   correspondingly for the symbols needed.  */
 
2465
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 
2466
int fnord () __attribute__((visibility("default")));
 
2467
#endif
 
2468
 
 
2469
int fnord () { return 42; }
 
2470
int main ()
 
2471
{
 
2472
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
2473
  int status = $lt_dlunknown;
 
2474
 
 
2475
  if (self)
 
2476
    {
 
2477
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
2478
      else
 
2479
        {
 
2480
          if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
 
2481
          else puts (dlerror ());
 
2482
        }
 
2483
      /* dlclose (self); */
 
2484
    }
 
2485
  else
 
2486
    puts (dlerror ());
 
2487
 
 
2488
  return status;
 
2489
}]
 
2490
_LT_EOF
 
2491
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
2492
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
 
2493
    lt_status=$?
 
2494
    case x$lt_status in
 
2495
      x$lt_dlno_uscore) $1 ;;
 
2496
      x$lt_dlneed_uscore) $2 ;;
 
2497
      x$lt_dlunknown|x*) $3 ;;
 
2498
    esac
 
2499
  else :
 
2500
    # compilation failed
 
2501
    $3
 
2502
  fi
 
2503
fi
 
2504
rm -fr conftest*
 
2505
])# _LT_TRY_DLOPEN_SELF
 
2506
 
 
2507
 
 
2508
# LT_SYS_DLOPEN_SELF
 
2509
# ------------------
 
2510
AC_DEFUN([LT_SYS_DLOPEN_SELF],
 
2511
[m4_require([_LT_HEADER_DLFCN])dnl
 
2512
if test "x$enable_dlopen" != xyes; then
 
2513
  enable_dlopen=unknown
 
2514
  enable_dlopen_self=unknown
 
2515
  enable_dlopen_self_static=unknown
 
2516
else
 
2517
  lt_cv_dlopen=no
 
2518
  lt_cv_dlopen_libs=
 
2519
 
 
2520
  case $host_os in
 
2521
  beos*)
 
2522
    lt_cv_dlopen="load_add_on"
 
2523
    lt_cv_dlopen_libs=
 
2524
    lt_cv_dlopen_self=yes
 
2525
    ;;
 
2526
 
 
2527
  mingw* | pw32* | cegcc*)
 
2528
    lt_cv_dlopen="LoadLibrary"
 
2529
    lt_cv_dlopen_libs=
 
2530
    ;;
 
2531
 
 
2532
  cygwin*)
 
2533
    lt_cv_dlopen="dlopen"
 
2534
    lt_cv_dlopen_libs=
 
2535
    ;;
 
2536
 
 
2537
  darwin*)
 
2538
  # if libdl is installed we need to link against it
 
2539
    AC_CHECK_LIB([dl], [dlopen],
 
2540
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
2541
    lt_cv_dlopen="dyld"
 
2542
    lt_cv_dlopen_libs=
 
2543
    lt_cv_dlopen_self=yes
 
2544
    ])
 
2545
    ;;
 
2546
 
 
2547
  *)
 
2548
    AC_CHECK_FUNC([shl_load],
 
2549
          [lt_cv_dlopen="shl_load"],
 
2550
      [AC_CHECK_LIB([dld], [shl_load],
 
2551
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
 
2552
        [AC_CHECK_FUNC([dlopen],
 
2553
              [lt_cv_dlopen="dlopen"],
 
2554
          [AC_CHECK_LIB([dl], [dlopen],
 
2555
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
2556
            [AC_CHECK_LIB([svld], [dlopen],
 
2557
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
2558
              [AC_CHECK_LIB([dld], [dld_link],
 
2559
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
 
2560
              ])
 
2561
            ])
 
2562
          ])
 
2563
        ])
 
2564
      ])
 
2565
    ;;
 
2566
  esac
 
2567
 
 
2568
  if test "x$lt_cv_dlopen" != xno; then
 
2569
    enable_dlopen=yes
 
2570
  else
 
2571
    enable_dlopen=no
 
2572
  fi
 
2573
 
 
2574
  case $lt_cv_dlopen in
 
2575
  dlopen)
 
2576
    save_CPPFLAGS="$CPPFLAGS"
 
2577
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
2578
 
 
2579
    save_LDFLAGS="$LDFLAGS"
 
2580
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
2581
 
 
2582
    save_LIBS="$LIBS"
 
2583
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
2584
 
 
2585
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
2586
          lt_cv_dlopen_self, [dnl
 
2587
          _LT_TRY_DLOPEN_SELF(
 
2588
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
2589
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
2590
    ])
 
2591
 
 
2592
    if test "x$lt_cv_dlopen_self" = xyes; then
 
2593
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
 
2594
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
2595
          lt_cv_dlopen_self_static, [dnl
 
2596
          _LT_TRY_DLOPEN_SELF(
 
2597
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
2598
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
2599
      ])
 
2600
    fi
 
2601
 
 
2602
    CPPFLAGS="$save_CPPFLAGS"
 
2603
    LDFLAGS="$save_LDFLAGS"
 
2604
    LIBS="$save_LIBS"
 
2605
    ;;
 
2606
  esac
 
2607
 
 
2608
  case $lt_cv_dlopen_self in
 
2609
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
2610
  *) enable_dlopen_self=unknown ;;
 
2611
  esac
 
2612
 
 
2613
  case $lt_cv_dlopen_self_static in
 
2614
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
2615
  *) enable_dlopen_self_static=unknown ;;
 
2616
  esac
 
2617
fi
 
2618
_LT_DECL([dlopen_support], [enable_dlopen], [0],
 
2619
         [Whether dlopen is supported])
 
2620
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
 
2621
         [Whether dlopen of programs is supported])
 
2622
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
 
2623
         [Whether dlopen of statically linked programs is supported])
 
2624
])# LT_SYS_DLOPEN_SELF
 
2625
 
 
2626
# Old name:
 
2627
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
 
2628
dnl aclocal-1.4 backwards compatibility:
 
2629
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
 
2630
 
 
2631
 
 
2632
# _LT_COMPILER_C_O([TAGNAME])
 
2633
# ---------------------------
 
2634
# Check to see if options -c and -o are simultaneously supported by compiler.
 
2635
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
 
2636
m4_defun([_LT_COMPILER_C_O],
 
2637
[m4_require([_LT_DECL_SED])dnl
 
2638
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2639
m4_require([_LT_TAG_COMPILER])dnl
 
2640
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
2641
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
2642
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
2643
   $RM -r conftest 2>/dev/null
 
2644
   mkdir conftest
 
2645
   cd conftest
 
2646
   mkdir out
 
2647
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
2648
 
 
2649
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
2650
   # Insert the option either (1) after the last *FLAGS variable, or
 
2651
   # (2) before a word containing "conftest.", or (3) at the end.
 
2652
   # Note that $ac_compile itself does not contain backslashes and begins
 
2653
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
2654
   lt_compile=`echo "$ac_compile" | $SED \
 
2655
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
2656
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
2657
   -e 's:$: $lt_compiler_flag:'`
 
2658
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
2659
   (eval "$lt_compile" 2>out/conftest.err)
 
2660
   ac_status=$?
 
2661
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
2662
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
2663
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
2664
   then
 
2665
     # The compiler can only warn and ignore the option if not recognized
 
2666
     # So say no if there are warnings
 
2667
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
 
2668
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
 
2669
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
 
2670
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
2671
     fi
 
2672
   fi
 
2673
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
 
2674
   $RM conftest*
 
2675
   # SGI C++ compiler will create directory out/ii_files/ for
 
2676
   # template instantiation
 
2677
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
 
2678
   $RM out/* && rmdir out
 
2679
   cd ..
 
2680
   $RM -r conftest
 
2681
   $RM conftest*
 
2682
])
 
2683
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
 
2684
        [Does compiler simultaneously support -c and -o options?])
 
2685
])# _LT_COMPILER_C_O
 
2686
 
 
2687
 
 
2688
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
 
2689
# ----------------------------------
 
2690
# Check to see if we can do hard links to lock some files if needed
 
2691
m4_defun([_LT_COMPILER_FILE_LOCKS],
 
2692
[m4_require([_LT_ENABLE_LOCK])dnl
 
2693
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2694
_LT_COMPILER_C_O([$1])
 
2695
 
 
2696
hard_links="nottested"
 
2697
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
2698
  # do not overwrite the value of need_locks provided by the user
 
2699
  AC_MSG_CHECKING([if we can lock with hard links])
 
2700
  hard_links=yes
 
2701
  $RM conftest*
 
2702
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
2703
  touch conftest.a
 
2704
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
2705
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
2706
  AC_MSG_RESULT([$hard_links])
 
2707
  if test "$hard_links" = no; then
 
2708
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
2709
    need_locks=warn
 
2710
  fi
 
2711
else
 
2712
  need_locks=no
 
2713
fi
 
2714
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
 
2715
])# _LT_COMPILER_FILE_LOCKS
 
2716
 
 
2717
 
 
2718
# _LT_CHECK_OBJDIR
 
2719
# ----------------
 
2720
m4_defun([_LT_CHECK_OBJDIR],
 
2721
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
2722
[rm -f .libs 2>/dev/null
 
2723
mkdir .libs 2>/dev/null
 
2724
if test -d .libs; then
 
2725
  lt_cv_objdir=.libs
 
2726
else
 
2727
  # MS-DOS does not allow filenames that begin with a dot.
 
2728
  lt_cv_objdir=_libs
 
2729
fi
 
2730
rmdir .libs 2>/dev/null])
 
2731
objdir=$lt_cv_objdir
 
2732
_LT_DECL([], [objdir], [0],
 
2733
         [The name of the directory that contains temporary libtool files])dnl
 
2734
m4_pattern_allow([LT_OBJDIR])dnl
 
2735
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
 
2736
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
 
2737
])# _LT_CHECK_OBJDIR
 
2738
 
 
2739
 
 
2740
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
 
2741
# --------------------------------------
 
2742
# Check hardcoding attributes.
 
2743
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
 
2744
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
2745
_LT_TAGVAR(hardcode_action, $1)=
 
2746
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
 
2747
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
 
2748
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
2749
 
 
2750
  # We can hardcode non-existent directories.
 
2751
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
 
2752
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
2753
     # have to relink, otherwise we might link with an installed library
 
2754
     # when we should be linking with a yet-to-be-installed one
 
2755
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
2756
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
 
2757
    # Linking always hardcodes the temporary library directory.
 
2758
    _LT_TAGVAR(hardcode_action, $1)=relink
 
2759
  else
 
2760
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
2761
    _LT_TAGVAR(hardcode_action, $1)=immediate
 
2762
  fi
 
2763
else
 
2764
  # We cannot hardcode anything, or else we can only hardcode existing
 
2765
  # directories.
 
2766
  _LT_TAGVAR(hardcode_action, $1)=unsupported
 
2767
fi
 
2768
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
2769
 
 
2770
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
 
2771
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
 
2772
  # Fast installation is not supported
 
2773
  enable_fast_install=no
 
2774
elif test "$shlibpath_overrides_runpath" = yes ||
 
2775
     test "$enable_shared" = no; then
 
2776
  # Fast installation is not necessary
 
2777
  enable_fast_install=needless
 
2778
fi
 
2779
_LT_TAGDECL([], [hardcode_action], [0],
 
2780
    [How to hardcode a shared library path into an executable])
 
2781
])# _LT_LINKER_HARDCODE_LIBPATH
 
2782
 
 
2783
 
 
2784
# _LT_CMD_STRIPLIB
 
2785
# ----------------
 
2786
m4_defun([_LT_CMD_STRIPLIB],
 
2787
[m4_require([_LT_DECL_EGREP])
 
2788
striplib=
 
2789
old_striplib=
 
2790
AC_MSG_CHECKING([whether stripping libraries is possible])
 
2791
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
 
2792
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
2793
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
2794
  AC_MSG_RESULT([yes])
 
2795
else
 
2796
# FIXME - insert some real tests, host_os isn't really good enough
 
2797
  case $host_os in
 
2798
  darwin*)
 
2799
    if test -n "$STRIP" ; then
 
2800
      striplib="$STRIP -x"
 
2801
      old_striplib="$STRIP -S"
 
2802
      AC_MSG_RESULT([yes])
 
2803
    else
 
2804
      AC_MSG_RESULT([no])
 
2805
    fi
 
2806
    ;;
 
2807
  *)
 
2808
    AC_MSG_RESULT([no])
 
2809
    ;;
 
2810
  esac
 
2811
fi
 
2812
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
 
2813
_LT_DECL([], [striplib], [1])
 
2814
])# _LT_CMD_STRIPLIB
 
2815
 
 
2816
 
 
2817
# _LT_SYS_DYNAMIC_LINKER([TAG])
 
2818
# -----------------------------
 
2819
# PORTME Fill in your ld.so characteristics
 
2820
m4_defun([_LT_SYS_DYNAMIC_LINKER],
 
2821
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2822
m4_require([_LT_DECL_EGREP])dnl
 
2823
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2824
m4_require([_LT_DECL_OBJDUMP])dnl
 
2825
m4_require([_LT_DECL_SED])dnl
 
2826
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 
2827
AC_MSG_CHECKING([dynamic linker characteristics])
 
2828
m4_if([$1],
 
2829
        [], [
 
2830
if test "$GCC" = yes; then
 
2831
  case $host_os in
 
2832
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
 
2833
    *) lt_awk_arg="/^libraries:/" ;;
 
2834
  esac
 
2835
  case $host_os in
 
2836
    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
 
2837
    *) lt_sed_strip_eq="s,=/,/,g" ;;
 
2838
  esac
 
2839
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
 
2840
  case $lt_search_path_spec in
 
2841
  *\;*)
 
2842
    # if the path contains ";" then we assume it to be the separator
 
2843
    # otherwise default to the standard path separator (i.e. ":") - it is
 
2844
    # assumed that no part of a normal pathname contains ";" but that should
 
2845
    # okay in the real world where ";" in dirpaths is itself problematic.
 
2846
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
 
2847
    ;;
 
2848
  *)
 
2849
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
 
2850
    ;;
 
2851
  esac
 
2852
  # Ok, now we have the path, separated by spaces, we can step through it
 
2853
  # and add multilib dir if necessary.
 
2854
  lt_tmp_lt_search_path_spec=
 
2855
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
 
2856
  for lt_sys_path in $lt_search_path_spec; do
 
2857
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
 
2858
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
 
2859
    else
 
2860
      test -d "$lt_sys_path" && \
 
2861
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
 
2862
    fi
 
2863
  done
 
2864
  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
 
2865
BEGIN {RS=" "; FS="/|\n";} {
 
2866
  lt_foo="";
 
2867
  lt_count=0;
 
2868
  for (lt_i = NF; lt_i > 0; lt_i--) {
 
2869
    if ($lt_i != "" && $lt_i != ".") {
 
2870
      if ($lt_i == "..") {
 
2871
        lt_count++;
 
2872
      } else {
 
2873
        if (lt_count == 0) {
 
2874
          lt_foo="/" $lt_i lt_foo;
 
2875
        } else {
 
2876
          lt_count--;
 
2877
        }
 
2878
      }
 
2879
    }
 
2880
  }
 
2881
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
 
2882
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 
2883
}'`
 
2884
  # AWK program above erroneously prepends '/' to C:/dos/paths
 
2885
  # for these hosts.
 
2886
  case $host_os in
 
2887
    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
 
2888
      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
 
2889
  esac
 
2890
  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 
2891
else
 
2892
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
2893
fi])
 
2894
library_names_spec=
 
2895
libname_spec='lib$name'
 
2896
soname_spec=
 
2897
shrext_cmds=".so"
 
2898
postinstall_cmds=
 
2899
postuninstall_cmds=
 
2900
finish_cmds=
 
2901
finish_eval=
 
2902
shlibpath_var=
 
2903
shlibpath_overrides_runpath=unknown
 
2904
version_type=none
 
2905
dynamic_linker="$host_os ld.so"
 
2906
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
2907
need_lib_prefix=unknown
 
2908
hardcode_into_libs=no
 
2909
 
 
2910
# when you set need_version to no, make sure it does not cause -set_version
 
2911
# flags to be left without arguments
 
2912
need_version=unknown
 
2913
 
 
2914
case $host_os in
 
2915
aix3*)
 
2916
  version_type=linux # correct to gnu/linux during the next big refactor
 
2917
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 
2918
  shlibpath_var=LIBPATH
 
2919
 
 
2920
  # AIX 3 has no versioning support, so we append a major version to the name.
 
2921
  soname_spec='${libname}${release}${shared_ext}$major'
 
2922
  ;;
 
2923
 
 
2924
aix[[4-9]]*)
 
2925
  version_type=linux # correct to gnu/linux during the next big refactor
 
2926
  need_lib_prefix=no
 
2927
  need_version=no
 
2928
  hardcode_into_libs=yes
 
2929
  if test "$host_cpu" = ia64; then
 
2930
    # AIX 5 supports IA64
 
2931
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 
2932
    shlibpath_var=LD_LIBRARY_PATH
 
2933
  else
 
2934
    # With GCC up to 2.95.x, collect2 would create an import file
 
2935
    # for dependence libraries.  The import file would start with
 
2936
    # the line `#! .'.  This would cause the generated library to
 
2937
    # depend on `.', always an invalid library.  This was fixed in
 
2938
    # development snapshots of GCC prior to 3.0.
 
2939
    case $host_os in
 
2940
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
2941
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
2942
           echo ' yes '
 
2943
           echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 
2944
        :
 
2945
      else
 
2946
        can_build_shared=no
 
2947
      fi
 
2948
      ;;
 
2949
    esac
 
2950
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
2951
    # soname into executable. Probably we can add versioning support to
 
2952
    # collect2, so additional links can be useful in future.
 
2953
    if test "$aix_use_runtimelinking" = yes; then
 
2954
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
2955
      # instead of lib<name>.a to let people know that these are not
 
2956
      # typical AIX shared libraries.
 
2957
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2958
    else
 
2959
      # We preserve .a as extension for shared libraries through AIX4.2
 
2960
      # and later when we are not doing run time linking.
 
2961
      library_names_spec='${libname}${release}.a $libname.a'
 
2962
      soname_spec='${libname}${release}${shared_ext}$major'
 
2963
    fi
 
2964
    shlibpath_var=LIBPATH
 
2965
  fi
 
2966
  ;;
 
2967
 
 
2968
amigaos*)
 
2969
  case $host_cpu in
 
2970
  powerpc)
 
2971
    # Since July 2007 AmigaOS4 officially supports .so libraries.
 
2972
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
 
2973
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2974
    ;;
 
2975
  m68k)
 
2976
    library_names_spec='$libname.ixlibrary $libname.a'
 
2977
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
2978
    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
 
2979
    ;;
 
2980
  esac
 
2981
  ;;
 
2982
 
 
2983
beos*)
 
2984
  library_names_spec='${libname}${shared_ext}'
 
2985
  dynamic_linker="$host_os ld.so"
 
2986
  shlibpath_var=LIBRARY_PATH
 
2987
  ;;
 
2988
 
 
2989
bsdi[[45]]*)
 
2990
  version_type=linux # correct to gnu/linux during the next big refactor
 
2991
  need_version=no
 
2992
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2993
  soname_spec='${libname}${release}${shared_ext}$major'
 
2994
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
2995
  shlibpath_var=LD_LIBRARY_PATH
 
2996
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
2997
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
2998
  # the default ld.so.conf also contains /usr/contrib/lib and
 
2999
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
3000
  # libtool to hard-code these into programs
 
3001
  ;;
 
3002
 
 
3003
cygwin* | mingw* | pw32* | cegcc*)
 
3004
  version_type=windows
 
3005
  shrext_cmds=".dll"
 
3006
  need_version=no
 
3007
  need_lib_prefix=no
 
3008
 
 
3009
  case $GCC,$cc_basename in
 
3010
  yes,*)
 
3011
    # gcc
 
3012
    library_names_spec='$libname.dll.a'
 
3013
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
3014
    postinstall_cmds='base_file=`basename \${file}`~
 
3015
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
 
3016
      dldir=$destdir/`dirname \$dlpath`~
 
3017
      test -d \$dldir || mkdir -p \$dldir~
 
3018
      $install_prog $dir/$dlname \$dldir/$dlname~
 
3019
      chmod a+x \$dldir/$dlname~
 
3020
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
 
3021
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
 
3022
      fi'
 
3023
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
3024
      dlpath=$dir/\$dldll~
 
3025
       $RM \$dlpath'
 
3026
    shlibpath_overrides_runpath=yes
 
3027
 
 
3028
    case $host_os in
 
3029
    cygwin*)
 
3030
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
3031
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
3032
m4_if([$1], [],[
 
3033
      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
 
3034
      ;;
 
3035
    mingw* | cegcc*)
 
3036
      # MinGW DLLs use traditional 'lib' prefix
 
3037
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
3038
      ;;
 
3039
    pw32*)
 
3040
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
3041
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
3042
      ;;
 
3043
    esac
 
3044
    dynamic_linker='Win32 ld.exe'
 
3045
    ;;
 
3046
 
 
3047
  *,cl*)
 
3048
    # Native MSVC
 
3049
    libname_spec='$name'
 
3050
    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
3051
    library_names_spec='${libname}.dll.lib'
 
3052
 
 
3053
    case $build_os in
 
3054
    mingw*)
 
3055
      sys_lib_search_path_spec=
 
3056
      lt_save_ifs=$IFS
 
3057
      IFS=';'
 
3058
      for lt_path in $LIB
 
3059
      do
 
3060
        IFS=$lt_save_ifs
 
3061
        # Let DOS variable expansion print the short 8.3 style file name.
 
3062
        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
 
3063
        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
 
3064
      done
 
3065
      IFS=$lt_save_ifs
 
3066
      # Convert to MSYS style.
 
3067
      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
 
3068
      ;;
 
3069
    cygwin*)
 
3070
      # Convert to unix form, then to dos form, then back to unix form
 
3071
      # but this time dos style (no spaces!) so that the unix form looks
 
3072
      # like /cygdrive/c/PROGRA~1:/cygdr...
 
3073
      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
 
3074
      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
 
3075
      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
 
3076
      ;;
 
3077
    *)
 
3078
      sys_lib_search_path_spec="$LIB"
 
3079
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
 
3080
        # It is most probably a Windows format PATH.
 
3081
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
3082
      else
 
3083
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
 
3084
      fi
 
3085
      # FIXME: find the short name or the path components, as spaces are
 
3086
      # common. (e.g. "Program Files" -> "PROGRA~1")
 
3087
      ;;
 
3088
    esac
 
3089
 
 
3090
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
3091
    postinstall_cmds='base_file=`basename \${file}`~
 
3092
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
 
3093
      dldir=$destdir/`dirname \$dlpath`~
 
3094
      test -d \$dldir || mkdir -p \$dldir~
 
3095
      $install_prog $dir/$dlname \$dldir/$dlname'
 
3096
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
3097
      dlpath=$dir/\$dldll~
 
3098
       $RM \$dlpath'
 
3099
    shlibpath_overrides_runpath=yes
 
3100
    dynamic_linker='Win32 link.exe'
 
3101
    ;;
 
3102
 
 
3103
  *)
 
3104
    # Assume MSVC wrapper
 
3105
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
3106
    dynamic_linker='Win32 ld.exe'
 
3107
    ;;
 
3108
  esac
 
3109
  # FIXME: first we should search . and the directory the executable is in
 
3110
  shlibpath_var=PATH
 
3111
  ;;
 
3112
 
 
3113
darwin* | rhapsody*)
 
3114
  dynamic_linker="$host_os dyld"
 
3115
  version_type=darwin
 
3116
  need_lib_prefix=no
 
3117
  need_version=no
 
3118
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
3119
  soname_spec='${libname}${release}${major}$shared_ext'
 
3120
  shlibpath_overrides_runpath=yes
 
3121
  shlibpath_var=DYLD_LIBRARY_PATH
 
3122
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 
3123
m4_if([$1], [],[
 
3124
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
 
3125
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
3126
  ;;
 
3127
 
 
3128
dgux*)
 
3129
  version_type=linux # correct to gnu/linux during the next big refactor
 
3130
  need_lib_prefix=no
 
3131
  need_version=no
 
3132
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
3133
  soname_spec='${libname}${release}${shared_ext}$major'
 
3134
  shlibpath_var=LD_LIBRARY_PATH
 
3135
  ;;
 
3136
 
 
3137
freebsd* | dragonfly*)
 
3138
  # DragonFly does not have aout.  When/if they implement a new
 
3139
  # versioning mechanism, adjust this.
 
3140
  if test -x /usr/bin/objformat; then
 
3141
    objformat=`/usr/bin/objformat`
 
3142
  else
 
3143
    case $host_os in
 
3144
    freebsd[[23]].*) objformat=aout ;;
 
3145
    *) objformat=elf ;;
 
3146
    esac
 
3147
  fi
 
3148
  version_type=freebsd-$objformat
 
3149
  case $version_type in
 
3150
    freebsd-elf*)
 
3151
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
3152
      need_version=no
 
3153
      need_lib_prefix=no
 
3154
      ;;
 
3155
    freebsd-*)
 
3156
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 
3157
      need_version=yes
 
3158
      ;;
 
3159
  esac
 
3160
  shlibpath_var=LD_LIBRARY_PATH
 
3161
  case $host_os in
 
3162
  freebsd2.*)
 
3163
    shlibpath_overrides_runpath=yes
 
3164
    ;;
 
3165
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
 
3166
    shlibpath_overrides_runpath=yes
 
3167
    hardcode_into_libs=yes
 
3168
    ;;
 
3169
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
 
3170
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
 
3171
    shlibpath_overrides_runpath=no
 
3172
    hardcode_into_libs=yes
 
3173
    ;;
 
3174
  *) # from 4.6 on, and DragonFly
 
3175
    shlibpath_overrides_runpath=yes
 
3176
    hardcode_into_libs=yes
 
3177
    ;;
 
3178
  esac
 
3179
  ;;
 
3180
 
 
3181
gnu*)
 
3182
  version_type=linux # correct to gnu/linux during the next big refactor
 
3183
  need_lib_prefix=no
 
3184
  need_version=no
 
3185
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
3186
  soname_spec='${libname}${release}${shared_ext}$major'
 
3187
  shlibpath_var=LD_LIBRARY_PATH
 
3188
  shlibpath_overrides_runpath=no
 
3189
  hardcode_into_libs=yes
 
3190
  ;;
 
3191
 
 
3192
haiku*)
 
3193
  version_type=linux # correct to gnu/linux during the next big refactor
 
3194
  need_lib_prefix=no
 
3195
  need_version=no
 
3196
  dynamic_linker="$host_os runtime_loader"
 
3197
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
3198
  soname_spec='${libname}${release}${shared_ext}$major'
 
3199
  shlibpath_var=LIBRARY_PATH
 
3200
  shlibpath_overrides_runpath=yes
 
3201
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
 
3202
  hardcode_into_libs=yes
 
3203
  ;;
 
3204
 
 
3205
hpux9* | hpux10* | hpux11*)
 
3206
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
3207
  # link against other versions.
 
3208
  version_type=sunos
 
3209
  need_lib_prefix=no
 
3210
  need_version=no
 
3211
  case $host_cpu in
 
3212
  ia64*)
 
3213
    shrext_cmds='.so'
 
3214
    hardcode_into_libs=yes
 
3215
    dynamic_linker="$host_os dld.so"
 
3216
    shlibpath_var=LD_LIBRARY_PATH
 
3217
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
3218
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3219
    soname_spec='${libname}${release}${shared_ext}$major'
 
3220
    if test "X$HPUX_IA64_MODE" = X32; then
 
3221
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
3222
    else
 
3223
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
3224
    fi
 
3225
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
3226
    ;;
 
3227
  hppa*64*)
 
3228
    shrext_cmds='.sl'
 
3229
    hardcode_into_libs=yes
 
3230
    dynamic_linker="$host_os dld.sl"
 
3231
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
3232
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
3233
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3234
    soname_spec='${libname}${release}${shared_ext}$major'
 
3235
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
3236
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
3237
    ;;
 
3238
  *)
 
3239
    shrext_cmds='.sl'
 
3240
    dynamic_linker="$host_os dld.sl"
 
3241
    shlibpath_var=SHLIB_PATH
 
3242
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
3243
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3244
    soname_spec='${libname}${release}${shared_ext}$major'
 
3245
    ;;
 
3246
  esac
 
3247
  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
 
3248
  postinstall_cmds='chmod 555 $lib'
 
3249
  # or fails outright, so override atomically:
 
3250
  install_override_mode=555
 
3251
  ;;
 
3252
 
 
3253
interix[[3-9]]*)
 
3254
  version_type=linux # correct to gnu/linux during the next big refactor
 
3255
  need_lib_prefix=no
 
3256
  need_version=no
 
3257
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
3258
  soname_spec='${libname}${release}${shared_ext}$major'
 
3259
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
 
3260
  shlibpath_var=LD_LIBRARY_PATH
 
3261
  shlibpath_overrides_runpath=no
 
3262
  hardcode_into_libs=yes
 
3263
  ;;
 
3264
 
 
3265
irix5* | irix6* | nonstopux*)
 
3266
  case $host_os in
 
3267
    nonstopux*) version_type=nonstopux ;;
 
3268
    *)
 
3269
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
3270
                version_type=linux # correct to gnu/linux during the next big refactor
 
3271
        else
 
3272
                version_type=irix
 
3273
        fi ;;
 
3274
  esac
 
3275
  need_lib_prefix=no
 
3276
  need_version=no
 
3277
  soname_spec='${libname}${release}${shared_ext}$major'
 
3278
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 
3279
  case $host_os in
 
3280
  irix5* | nonstopux*)
 
3281
    libsuff= shlibsuff=
 
3282
    ;;
 
3283
  *)
 
3284
    case $LD in # libtool.m4 will add one of these switches to LD
 
3285
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
3286
      libsuff= shlibsuff= libmagic=32-bit;;
 
3287
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
3288
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
3289
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
3290
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
3291
    *) libsuff= shlibsuff= libmagic=never-match;;
 
3292
    esac
 
3293
    ;;
 
3294
  esac
 
3295
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
3296
  shlibpath_overrides_runpath=no
 
3297
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
3298
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
3299
  hardcode_into_libs=yes
 
3300
  ;;
 
3301
 
 
3302
# No shared lib support for Linux oldld, aout, or coff.
 
3303
linux*oldld* | linux*aout* | linux*coff*)
 
3304
  dynamic_linker=no
 
3305
  ;;
 
3306
 
 
3307
# This must be glibc/ELF.
 
3308
linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
3309
  version_type=linux # correct to gnu/linux during the next big refactor
 
3310
  need_lib_prefix=no
 
3311
  need_version=no
 
3312
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3313
  soname_spec='${libname}${release}${shared_ext}$major'
 
3314
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
3315
  shlibpath_var=LD_LIBRARY_PATH
 
3316
  shlibpath_overrides_runpath=no
 
3317
 
 
3318
  # Some binutils ld are patched to set DT_RUNPATH
 
3319
  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
 
3320
    [lt_cv_shlibpath_overrides_runpath=no
 
3321
    save_LDFLAGS=$LDFLAGS
 
3322
    save_libdir=$libdir
 
3323
    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
 
3324
         LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
 
3325
    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
3326
      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
 
3327
         [lt_cv_shlibpath_overrides_runpath=yes])])
 
3328
    LDFLAGS=$save_LDFLAGS
 
3329
    libdir=$save_libdir
 
3330
    ])
 
3331
  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
3332
 
 
3333
  # This implies no fast_install, which is unacceptable.
 
3334
  # Some rework will be needed to allow for fast_install
 
3335
  # before this can be enabled.
 
3336
  hardcode_into_libs=yes
 
3337
 
 
3338
  # Append ld.so.conf contents to the search path
 
3339
  if test -f /etc/ld.so.conf; then
 
3340
    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;s/"//g;/^$/d' | tr '\n' ' '`
 
3341
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
3342
  fi
 
3343
 
 
3344
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
3345
  # powerpc, because MkLinux only supported shared libraries with the
 
3346
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
3347
  # most powerpc-linux boxes support dynamic linking these days and
 
3348
  # people can always --disable-shared, the test was removed, and we
 
3349
  # assume the GNU/Linux dynamic linker is in use.
 
3350
  dynamic_linker='GNU/Linux ld.so'
 
3351
  ;;
 
3352
 
 
3353
netbsdelf*-gnu)
 
3354
  version_type=linux
 
3355
  need_lib_prefix=no
 
3356
  need_version=no
 
3357
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
3358
  soname_spec='${libname}${release}${shared_ext}$major'
 
3359
  shlibpath_var=LD_LIBRARY_PATH
 
3360
  shlibpath_overrides_runpath=no
 
3361
  hardcode_into_libs=yes
 
3362
  dynamic_linker='NetBSD ld.elf_so'
 
3363
  ;;
 
3364
 
 
3365
netbsd*)
 
3366
  version_type=sunos
 
3367
  need_lib_prefix=no
 
3368
  need_version=no
 
3369
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
3370
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
3371
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
3372
    dynamic_linker='NetBSD (a.out) ld.so'
 
3373
  else
 
3374
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
3375
    soname_spec='${libname}${release}${shared_ext}$major'
 
3376
    dynamic_linker='NetBSD ld.elf_so'
 
3377
  fi
 
3378
  shlibpath_var=LD_LIBRARY_PATH
 
3379
  shlibpath_overrides_runpath=yes
 
3380
  hardcode_into_libs=yes
 
3381
  ;;
 
3382
 
 
3383
newsos6)
 
3384
  version_type=linux # correct to gnu/linux during the next big refactor
 
3385
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3386
  shlibpath_var=LD_LIBRARY_PATH
 
3387
  shlibpath_overrides_runpath=yes
 
3388
  ;;
 
3389
 
 
3390
*nto* | *qnx*)
 
3391
  version_type=qnx
 
3392
  need_lib_prefix=no
 
3393
  need_version=no
 
3394
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3395
  soname_spec='${libname}${release}${shared_ext}$major'
 
3396
  shlibpath_var=LD_LIBRARY_PATH
 
3397
  shlibpath_overrides_runpath=no
 
3398
  hardcode_into_libs=yes
 
3399
  dynamic_linker='ldqnx.so'
 
3400
  ;;
 
3401
 
 
3402
openbsd*)
 
3403
  version_type=sunos
 
3404
  sys_lib_dlsearch_path_spec="/usr/lib"
 
3405
  need_lib_prefix=no
 
3406
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 
3407
  case $host_os in
 
3408
    openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
 
3409
    *)                          need_version=no  ;;
 
3410
  esac
 
3411
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
3412
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
3413
  shlibpath_var=LD_LIBRARY_PATH
 
3414
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3415
    case $host_os in
 
3416
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
3417
        shlibpath_overrides_runpath=no
 
3418
        ;;
 
3419
      *)
 
3420
        shlibpath_overrides_runpath=yes
 
3421
        ;;
 
3422
      esac
 
3423
  else
 
3424
    shlibpath_overrides_runpath=yes
 
3425
  fi
 
3426
  ;;
 
3427
 
 
3428
os2*)
 
3429
  libname_spec='$name'
 
3430
  shrext_cmds=".dll"
 
3431
  need_lib_prefix=no
 
3432
  library_names_spec='$libname${shared_ext} $libname.a'
 
3433
  dynamic_linker='OS/2 ld.exe'
 
3434
  shlibpath_var=LIBPATH
 
3435
  ;;
 
3436
 
 
3437
osf3* | osf4* | osf5*)
 
3438
  version_type=osf
 
3439
  need_lib_prefix=no
 
3440
  need_version=no
 
3441
  soname_spec='${libname}${release}${shared_ext}$major'
 
3442
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3443
  shlibpath_var=LD_LIBRARY_PATH
 
3444
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
3445
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
3446
  ;;
 
3447
 
 
3448
rdos*)
 
3449
  dynamic_linker=no
 
3450
  ;;
 
3451
 
 
3452
solaris*)
 
3453
  version_type=linux # correct to gnu/linux during the next big refactor
 
3454
  need_lib_prefix=no
 
3455
  need_version=no
 
3456
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3457
  soname_spec='${libname}${release}${shared_ext}$major'
 
3458
  shlibpath_var=LD_LIBRARY_PATH
 
3459
  shlibpath_overrides_runpath=yes
 
3460
  hardcode_into_libs=yes
 
3461
  # ldd complains unless libraries are executable
 
3462
  postinstall_cmds='chmod +x $lib'
 
3463
  ;;
 
3464
 
 
3465
sunos4*)
 
3466
  version_type=sunos
 
3467
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
3468
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
3469
  shlibpath_var=LD_LIBRARY_PATH
 
3470
  shlibpath_overrides_runpath=yes
 
3471
  if test "$with_gnu_ld" = yes; then
 
3472
    need_lib_prefix=no
 
3473
  fi
 
3474
  need_version=yes
 
3475
  ;;
 
3476
 
 
3477
sysv4 | sysv4.3*)
 
3478
  version_type=linux # correct to gnu/linux during the next big refactor
 
3479
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3480
  soname_spec='${libname}${release}${shared_ext}$major'
 
3481
  shlibpath_var=LD_LIBRARY_PATH
 
3482
  case $host_vendor in
 
3483
    sni)
 
3484
      shlibpath_overrides_runpath=no
 
3485
      need_lib_prefix=no
 
3486
      runpath_var=LD_RUN_PATH
 
3487
      ;;
 
3488
    siemens)
 
3489
      need_lib_prefix=no
 
3490
      ;;
 
3491
    motorola)
 
3492
      need_lib_prefix=no
 
3493
      need_version=no
 
3494
      shlibpath_overrides_runpath=no
 
3495
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
3496
      ;;
 
3497
  esac
 
3498
  ;;
 
3499
 
 
3500
sysv4*MP*)
 
3501
  if test -d /usr/nec ;then
 
3502
    version_type=linux # correct to gnu/linux during the next big refactor
 
3503
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
3504
    soname_spec='$libname${shared_ext}.$major'
 
3505
    shlibpath_var=LD_LIBRARY_PATH
 
3506
  fi
 
3507
  ;;
 
3508
 
 
3509
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
3510
  version_type=freebsd-elf
 
3511
  need_lib_prefix=no
 
3512
  need_version=no
 
3513
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
3514
  soname_spec='${libname}${release}${shared_ext}$major'
 
3515
  shlibpath_var=LD_LIBRARY_PATH
 
3516
  shlibpath_overrides_runpath=yes
 
3517
  hardcode_into_libs=yes
 
3518
  if test "$with_gnu_ld" = yes; then
 
3519
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
 
3520
  else
 
3521
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
 
3522
    case $host_os in
 
3523
      sco3.2v5*)
 
3524
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
 
3525
        ;;
 
3526
    esac
 
3527
  fi
 
3528
  sys_lib_dlsearch_path_spec='/usr/lib'
 
3529
  ;;
 
3530
 
 
3531
tpf*)
 
3532
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
 
3533
  version_type=linux # correct to gnu/linux during the next big refactor
 
3534
  need_lib_prefix=no
 
3535
  need_version=no
 
3536
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3537
  shlibpath_var=LD_LIBRARY_PATH
 
3538
  shlibpath_overrides_runpath=no
 
3539
  hardcode_into_libs=yes
 
3540
  ;;
 
3541
 
 
3542
uts4*)
 
3543
  version_type=linux # correct to gnu/linux during the next big refactor
 
3544
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3545
  soname_spec='${libname}${release}${shared_ext}$major'
 
3546
  shlibpath_var=LD_LIBRARY_PATH
 
3547
  ;;
 
3548
 
 
3549
*)
 
3550
  dynamic_linker=no
 
3551
  ;;
 
3552
esac
 
3553
AC_MSG_RESULT([$dynamic_linker])
 
3554
test "$dynamic_linker" = no && can_build_shared=no
 
3555
 
 
3556
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
3557
if test "$GCC" = yes; then
 
3558
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
3559
fi
 
3560
 
 
3561
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
 
3562
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
 
3563
fi
 
3564
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
 
3565
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 
3566
fi
 
3567
 
 
3568
_LT_DECL([], [variables_saved_for_relink], [1],
 
3569
    [Variables whose values should be saved in libtool wrapper scripts and
 
3570
    restored at link time])
 
3571
_LT_DECL([], [need_lib_prefix], [0],
 
3572
    [Do we need the "lib" prefix for modules?])
 
3573
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
 
3574
_LT_DECL([], [version_type], [0], [Library versioning type])
 
3575
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
 
3576
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
 
3577
_LT_DECL([], [shlibpath_overrides_runpath], [0],
 
3578
    [Is shlibpath searched before the hard-coded library search path?])
 
3579
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
 
3580
_LT_DECL([], [library_names_spec], [1],
 
3581
    [[List of archive names.  First name is the real one, the rest are links.
 
3582
    The last name is the one that the linker finds with -lNAME]])
 
3583
_LT_DECL([], [soname_spec], [1],
 
3584
    [[The coded name of the library, if different from the real name]])
 
3585
_LT_DECL([], [install_override_mode], [1],
 
3586
    [Permission mode override for installation of shared libraries])
 
3587
_LT_DECL([], [postinstall_cmds], [2],
 
3588
    [Command to use after installation of a shared archive])
 
3589
_LT_DECL([], [postuninstall_cmds], [2],
 
3590
    [Command to use after uninstallation of a shared archive])
 
3591
_LT_DECL([], [finish_cmds], [2],
 
3592
    [Commands used to finish a libtool library installation in a directory])
 
3593
_LT_DECL([], [finish_eval], [1],
 
3594
    [[As "finish_cmds", except a single script fragment to be evaled but
 
3595
    not shown]])
 
3596
_LT_DECL([], [hardcode_into_libs], [0],
 
3597
    [Whether we should hardcode library paths into libraries])
 
3598
_LT_DECL([], [sys_lib_search_path_spec], [2],
 
3599
    [Compile-time system search path for libraries])
 
3600
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
 
3601
    [Run-time system search path for libraries])
 
3602
])# _LT_SYS_DYNAMIC_LINKER
 
3603
 
 
3604
 
 
3605
# _LT_PATH_TOOL_PREFIX(TOOL)
 
3606
# --------------------------
 
3607
# find a file program which can recognize shared library
 
3608
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
 
3609
[m4_require([_LT_DECL_EGREP])dnl
 
3610
AC_MSG_CHECKING([for $1])
 
3611
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
3612
[case $MAGIC_CMD in
 
3613
[[\\/*] |  ?:[\\/]*])
 
3614
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
3615
  ;;
 
3616
*)
 
3617
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
3618
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3619
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
3620
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
3621
dnl not every word.  This closes a longstanding sh security hole.
 
3622
  ac_dummy="m4_if([$2], , $PATH, [$2])"
 
3623
  for ac_dir in $ac_dummy; do
 
3624
    IFS="$lt_save_ifs"
 
3625
    test -z "$ac_dir" && ac_dir=.
 
3626
    if test -f $ac_dir/$1; then
 
3627
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
3628
      if test -n "$file_magic_test_file"; then
 
3629
        case $deplibs_check_method in
 
3630
        "file_magic "*)
 
3631
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 
3632
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
3633
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
3634
            $EGREP "$file_magic_regex" > /dev/null; then
 
3635
            :
 
3636
          else
 
3637
            cat <<_LT_EOF 1>&2
 
3638
 
 
3639
*** Warning: the command libtool uses to detect shared libraries,
 
3640
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
3641
*** The result is that libtool may fail to recognize shared libraries
 
3642
*** as such.  This will affect the creation of libtool libraries that
 
3643
*** depend on shared libraries, but programs linked with such libtool
 
3644
*** libraries will work regardless of this problem.  Nevertheless, you
 
3645
*** may want to report the problem to your system manager and/or to
 
3646
*** bug-libtool@gnu.org
 
3647
 
 
3648
_LT_EOF
 
3649
          fi ;;
 
3650
        esac
 
3651
      fi
 
3652
      break
 
3653
    fi
 
3654
  done
 
3655
  IFS="$lt_save_ifs"
 
3656
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
3657
  ;;
 
3658
esac])
 
3659
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
3660
if test -n "$MAGIC_CMD"; then
 
3661
  AC_MSG_RESULT($MAGIC_CMD)
 
3662
else
 
3663
  AC_MSG_RESULT(no)
 
3664
fi
 
3665
_LT_DECL([], [MAGIC_CMD], [0],
 
3666
         [Used to examine libraries when file_magic_cmd begins with "file"])dnl
 
3667
])# _LT_PATH_TOOL_PREFIX
 
3668
 
 
3669
# Old name:
 
3670
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
 
3671
dnl aclocal-1.4 backwards compatibility:
 
3672
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
3673
 
 
3674
 
 
3675
# _LT_PATH_MAGIC
 
3676
# --------------
 
3677
# find a file program which can recognize a shared library
 
3678
m4_defun([_LT_PATH_MAGIC],
 
3679
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
3680
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
3681
  if test -n "$ac_tool_prefix"; then
 
3682
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
3683
  else
 
3684
    MAGIC_CMD=:
 
3685
  fi
 
3686
fi
 
3687
])# _LT_PATH_MAGIC
 
3688
 
 
3689
 
 
3690
# LT_PATH_LD
 
3691
# ----------
 
3692
# find the pathname to the GNU or non-GNU linker
 
3693
AC_DEFUN([LT_PATH_LD],
 
3694
[AC_REQUIRE([AC_PROG_CC])dnl
 
3695
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3696
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
3697
m4_require([_LT_DECL_SED])dnl
 
3698
m4_require([_LT_DECL_EGREP])dnl
 
3699
m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 
3700
 
 
3701
AC_ARG_WITH([gnu-ld],
 
3702
    [AS_HELP_STRING([--with-gnu-ld],
 
3703
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
3704
    [test "$withval" = no || with_gnu_ld=yes],
 
3705
    [with_gnu_ld=no])dnl
 
3706
 
 
3707
ac_prog=ld
 
3708
if test "$GCC" = yes; then
 
3709
  # Check if gcc -print-prog-name=ld gives a path.
 
3710
  AC_MSG_CHECKING([for ld used by $CC])
 
3711
  case $host in
 
3712
  *-*-mingw*)
 
3713
    # gcc leaves a trailing carriage return which upsets mingw
 
3714
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
3715
  *)
 
3716
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
3717
  esac
 
3718
  case $ac_prog in
 
3719
    # Accept absolute paths.
 
3720
    [[\\/]]* | ?:[[\\/]]*)
 
3721
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
3722
      # Canonicalize the pathname of ld
 
3723
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
 
3724
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 
3725
        ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
 
3726
      done
 
3727
      test -z "$LD" && LD="$ac_prog"
 
3728
      ;;
 
3729
  "")
 
3730
    # If it fails, then pretend we aren't using GCC.
 
3731
    ac_prog=ld
 
3732
    ;;
 
3733
  *)
 
3734
    # If it is relative, then search for the first ld in PATH.
 
3735
    with_gnu_ld=unknown
 
3736
    ;;
 
3737
  esac
 
3738
elif test "$with_gnu_ld" = yes; then
 
3739
  AC_MSG_CHECKING([for GNU ld])
 
3740
else
 
3741
  AC_MSG_CHECKING([for non-GNU ld])
 
3742
fi
 
3743
AC_CACHE_VAL(lt_cv_path_LD,
 
3744
[if test -z "$LD"; then
 
3745
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3746
  for ac_dir in $PATH; do
 
3747
    IFS="$lt_save_ifs"
 
3748
    test -z "$ac_dir" && ac_dir=.
 
3749
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
3750
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
3751
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
3752
      # but apparently some variants of GNU ld only accept -v.
 
3753
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
3754
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
3755
      *GNU* | *'with BFD'*)
 
3756
        test "$with_gnu_ld" != no && break
 
3757
        ;;
 
3758
      *)
 
3759
        test "$with_gnu_ld" != yes && break
 
3760
        ;;
 
3761
      esac
 
3762
    fi
 
3763
  done
 
3764
  IFS="$lt_save_ifs"
 
3765
else
 
3766
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
3767
fi])
 
3768
LD="$lt_cv_path_LD"
 
3769
if test -n "$LD"; then
 
3770
  AC_MSG_RESULT($LD)
 
3771
else
 
3772
  AC_MSG_RESULT(no)
 
3773
fi
 
3774
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
3775
_LT_PATH_LD_GNU
 
3776
AC_SUBST([LD])
 
3777
 
 
3778
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
 
3779
])# LT_PATH_LD
 
3780
 
 
3781
# Old names:
 
3782
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
 
3783
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
 
3784
dnl aclocal-1.4 backwards compatibility:
 
3785
dnl AC_DEFUN([AM_PROG_LD], [])
 
3786
dnl AC_DEFUN([AC_PROG_LD], [])
 
3787
 
 
3788
 
 
3789
# _LT_PATH_LD_GNU
 
3790
#- --------------
 
3791
m4_defun([_LT_PATH_LD_GNU],
 
3792
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
3793
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 
3794
case `$LD -v 2>&1 </dev/null` in
 
3795
*GNU* | *'with BFD'*)
 
3796
  lt_cv_prog_gnu_ld=yes
 
3797
  ;;
 
3798
*)
 
3799
  lt_cv_prog_gnu_ld=no
 
3800
  ;;
 
3801
esac])
 
3802
with_gnu_ld=$lt_cv_prog_gnu_ld
 
3803
])# _LT_PATH_LD_GNU
 
3804
 
 
3805
 
 
3806
# _LT_CMD_RELOAD
 
3807
# --------------
 
3808
# find reload flag for linker
 
3809
#   -- PORTME Some linkers may need a different reload flag.
 
3810
m4_defun([_LT_CMD_RELOAD],
 
3811
[AC_CACHE_CHECK([for $LD option to reload object files],
 
3812
  lt_cv_ld_reload_flag,
 
3813
  [lt_cv_ld_reload_flag='-r'])
 
3814
reload_flag=$lt_cv_ld_reload_flag
 
3815
case $reload_flag in
 
3816
"" | " "*) ;;
 
3817
*) reload_flag=" $reload_flag" ;;
 
3818
esac
 
3819
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
3820
case $host_os in
 
3821
  cygwin* | mingw* | pw32* | cegcc*)
 
3822
    if test "$GCC" != yes; then
 
3823
      reload_cmds=false
 
3824
    fi
 
3825
    ;;
 
3826
  darwin*)
 
3827
    if test "$GCC" = yes; then
 
3828
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
 
3829
    else
 
3830
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
3831
    fi
 
3832
    ;;
 
3833
esac
 
3834
_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
 
3835
_LT_TAGDECL([], [reload_cmds], [2])dnl
 
3836
])# _LT_CMD_RELOAD
 
3837
 
 
3838
 
 
3839
# _LT_CHECK_MAGIC_METHOD
 
3840
# ----------------------
 
3841
# how to check for library dependencies
 
3842
#  -- PORTME fill in with the dynamic library characteristics
 
3843
m4_defun([_LT_CHECK_MAGIC_METHOD],
 
3844
[m4_require([_LT_DECL_EGREP])
 
3845
m4_require([_LT_DECL_OBJDUMP])
 
3846
AC_CACHE_CHECK([how to recognize dependent libraries],
 
3847
lt_cv_deplibs_check_method,
 
3848
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
3849
lt_cv_file_magic_test_file=
 
3850
lt_cv_deplibs_check_method='unknown'
 
3851
# Need to set the preceding variable on all platforms that support
 
3852
# interlibrary dependencies.
 
3853
# 'none' -- dependencies not supported.
 
3854
# `unknown' -- same as none, but documents that we really don't know.
 
3855
# 'pass_all' -- all dependencies passed with no checks.
 
3856
# 'test_compile' -- check by making test program.
 
3857
# 'file_magic [[regex]]' -- check by looking for files in library path
 
3858
# which responds to the $file_magic_cmd with a given extended regex.
 
3859
# If you have `file' or equivalent on your system and you're not sure
 
3860
# whether `pass_all' will *always* work, you probably want this one.
 
3861
 
 
3862
case $host_os in
 
3863
aix[[4-9]]*)
 
3864
  lt_cv_deplibs_check_method=pass_all
 
3865
  ;;
 
3866
 
 
3867
beos*)
 
3868
  lt_cv_deplibs_check_method=pass_all
 
3869
  ;;
 
3870
 
 
3871
bsdi[[45]]*)
 
3872
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
3873
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
3874
  lt_cv_file_magic_test_file=/shlib/libc.so
 
3875
  ;;
 
3876
 
 
3877
cygwin*)
 
3878
  # func_win32_libid is a shell function defined in ltmain.sh
 
3879
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
3880
  lt_cv_file_magic_cmd='func_win32_libid'
 
3881
  ;;
 
3882
 
 
3883
mingw* | pw32*)
 
3884
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
3885
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
 
3886
  # unless we find 'file', for example because we are cross-compiling.
 
3887
  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
 
3888
  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
 
3889
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
3890
    lt_cv_file_magic_cmd='func_win32_libid'
 
3891
  else
 
3892
    # Keep this pattern in sync with the one in func_win32_libid.
 
3893
    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
 
3894
    lt_cv_file_magic_cmd='$OBJDUMP -f'
 
3895
  fi
 
3896
  ;;
 
3897
 
 
3898
cegcc*)
 
3899
  # use the weaker test based on 'objdump'. See mingw*.
 
3900
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
 
3901
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
3902
  ;;
 
3903
 
 
3904
darwin* | rhapsody*)
 
3905
  lt_cv_deplibs_check_method=pass_all
 
3906
  ;;
 
3907
 
 
3908
freebsd* | dragonfly*)
 
3909
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
3910
    case $host_cpu in
 
3911
    i*86 )
 
3912
      # Not sure whether the presence of OpenBSD here was a mistake.
 
3913
      # Let's accept both of them until this is cleared up.
 
3914
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
 
3915
      lt_cv_file_magic_cmd=/usr/bin/file
 
3916
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
3917
      ;;
 
3918
    esac
 
3919
  else
 
3920
    lt_cv_deplibs_check_method=pass_all
 
3921
  fi
 
3922
  ;;
 
3923
 
 
3924
gnu*)
 
3925
  lt_cv_deplibs_check_method=pass_all
 
3926
  ;;
 
3927
 
 
3928
haiku*)
 
3929
  lt_cv_deplibs_check_method=pass_all
 
3930
  ;;
 
3931
 
 
3932
hpux10.20* | hpux11*)
 
3933
  lt_cv_file_magic_cmd=/usr/bin/file
 
3934
  case $host_cpu in
 
3935
  ia64*)
 
3936
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
3937
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
3938
    ;;
 
3939
  hppa*64*)
 
3940
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
 
3941
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
3942
    ;;
 
3943
  *)
 
3944
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
 
3945
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
3946
    ;;
 
3947
  esac
 
3948
  ;;
 
3949
 
 
3950
interix[[3-9]]*)
 
3951
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
 
3952
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
 
3953
  ;;
 
3954
 
 
3955
irix5* | irix6* | nonstopux*)
 
3956
  case $LD in
 
3957
  *-32|*"-32 ") libmagic=32-bit;;
 
3958
  *-n32|*"-n32 ") libmagic=N32;;
 
3959
  *-64|*"-64 ") libmagic=64-bit;;
 
3960
  *) libmagic=never-match;;
 
3961
  esac
 
3962
  lt_cv_deplibs_check_method=pass_all
 
3963
  ;;
 
3964
 
 
3965
# This must be glibc/ELF.
 
3966
linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
3967
  lt_cv_deplibs_check_method=pass_all
 
3968
  ;;
 
3969
 
 
3970
netbsd* | netbsdelf*-gnu)
 
3971
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
3972
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
3973
  else
 
3974
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
3975
  fi
 
3976
  ;;
 
3977
 
 
3978
newos6*)
 
3979
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
3980
  lt_cv_file_magic_cmd=/usr/bin/file
 
3981
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
3982
  ;;
 
3983
 
 
3984
*nto* | *qnx*)
 
3985
  lt_cv_deplibs_check_method=pass_all
 
3986
  ;;
 
3987
 
 
3988
openbsd*)
 
3989
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3990
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
 
3991
  else
 
3992
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
3993
  fi
 
3994
  ;;
 
3995
 
 
3996
osf3* | osf4* | osf5*)
 
3997
  lt_cv_deplibs_check_method=pass_all
 
3998
  ;;
 
3999
 
 
4000
rdos*)
 
4001
  lt_cv_deplibs_check_method=pass_all
 
4002
  ;;
 
4003
 
 
4004
solaris*)
 
4005
  lt_cv_deplibs_check_method=pass_all
 
4006
  ;;
 
4007
 
 
4008
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
4009
  lt_cv_deplibs_check_method=pass_all
 
4010
  ;;
 
4011
 
 
4012
sysv4 | sysv4.3*)
 
4013
  case $host_vendor in
 
4014
  motorola)
 
4015
    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]]'
 
4016
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
4017
    ;;
 
4018
  ncr)
 
4019
    lt_cv_deplibs_check_method=pass_all
 
4020
    ;;
 
4021
  sequent)
 
4022
    lt_cv_file_magic_cmd='/bin/file'
 
4023
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
4024
    ;;
 
4025
  sni)
 
4026
    lt_cv_file_magic_cmd='/bin/file'
 
4027
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
4028
    lt_cv_file_magic_test_file=/lib/libc.so
 
4029
    ;;
 
4030
  siemens)
 
4031
    lt_cv_deplibs_check_method=pass_all
 
4032
    ;;
 
4033
  pc)
 
4034
    lt_cv_deplibs_check_method=pass_all
 
4035
    ;;
 
4036
  esac
 
4037
  ;;
 
4038
 
 
4039
tpf*)
 
4040
  lt_cv_deplibs_check_method=pass_all
 
4041
  ;;
 
4042
esac
 
4043
])
 
4044
 
 
4045
file_magic_glob=
 
4046
want_nocaseglob=no
 
4047
if test "$build" = "$host"; then
 
4048
  case $host_os in
 
4049
  mingw* | pw32*)
 
4050
    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
 
4051
      want_nocaseglob=yes
 
4052
    else
 
4053
      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
 
4054
    fi
 
4055
    ;;
 
4056
  esac
 
4057
fi
 
4058
 
 
4059
file_magic_cmd=$lt_cv_file_magic_cmd
 
4060
deplibs_check_method=$lt_cv_deplibs_check_method
 
4061
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
4062
 
 
4063
_LT_DECL([], [deplibs_check_method], [1],
 
4064
    [Method to check whether dependent libraries are shared objects])
 
4065
_LT_DECL([], [file_magic_cmd], [1],
 
4066
    [Command to use when deplibs_check_method = "file_magic"])
 
4067
_LT_DECL([], [file_magic_glob], [1],
 
4068
    [How to find potential files when deplibs_check_method = "file_magic"])
 
4069
_LT_DECL([], [want_nocaseglob], [1],
 
4070
    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
 
4071
])# _LT_CHECK_MAGIC_METHOD
 
4072
 
 
4073
 
 
4074
# LT_PATH_NM
 
4075
# ----------
 
4076
# find the pathname to a BSD- or MS-compatible name lister
 
4077
AC_DEFUN([LT_PATH_NM],
 
4078
[AC_REQUIRE([AC_PROG_CC])dnl
 
4079
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 
4080
[if test -n "$NM"; then
 
4081
  # Let the user override the test.
 
4082
  lt_cv_path_NM="$NM"
 
4083
else
 
4084
  lt_nm_to_check="${ac_tool_prefix}nm"
 
4085
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
 
4086
    lt_nm_to_check="$lt_nm_to_check nm"
 
4087
  fi
 
4088
  for lt_tmp_nm in $lt_nm_to_check; do
 
4089
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
4090
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
 
4091
      IFS="$lt_save_ifs"
 
4092
      test -z "$ac_dir" && ac_dir=.
 
4093
      tmp_nm="$ac_dir/$lt_tmp_nm"
 
4094
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
4095
        # Check to see if the nm accepts a BSD-compat flag.
 
4096
        # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
4097
        #   nm: unknown option "B" ignored
 
4098
        # Tru64's nm complains that /dev/null is an invalid object file
 
4099
        case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
4100
        */dev/null* | *'Invalid file or object type'*)
 
4101
          lt_cv_path_NM="$tmp_nm -B"
 
4102
          break
 
4103
          ;;
 
4104
        *)
 
4105
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
4106
          */dev/null*)
 
4107
            lt_cv_path_NM="$tmp_nm -p"
 
4108
            break
 
4109
            ;;
 
4110
          *)
 
4111
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
4112
            continue # so that we can try to find one that supports BSD flags
 
4113
            ;;
 
4114
          esac
 
4115
          ;;
 
4116
        esac
 
4117
      fi
 
4118
    done
 
4119
    IFS="$lt_save_ifs"
 
4120
  done
 
4121
  : ${lt_cv_path_NM=no}
 
4122
fi])
 
4123
if test "$lt_cv_path_NM" != "no"; then
 
4124
  NM="$lt_cv_path_NM"
 
4125
else
 
4126
  # Didn't find any BSD compatible name lister, look for dumpbin.
 
4127
  if test -n "$DUMPBIN"; then :
 
4128
    # Let the user override the test.
 
4129
  else
 
4130
    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
 
4131
    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
 
4132
    *COFF*)
 
4133
      DUMPBIN="$DUMPBIN -symbols"
 
4134
      ;;
 
4135
    *)
 
4136
      DUMPBIN=:
 
4137
      ;;
 
4138
    esac
 
4139
  fi
 
4140
  AC_SUBST([DUMPBIN])
 
4141
  if test "$DUMPBIN" != ":"; then
 
4142
    NM="$DUMPBIN"
 
4143
  fi
 
4144
fi
 
4145
test -z "$NM" && NM=nm
 
4146
AC_SUBST([NM])
 
4147
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
 
4148
 
 
4149
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
 
4150
  [lt_cv_nm_interface="BSD nm"
 
4151
  echo "int some_variable = 0;" > conftest.$ac_ext
 
4152
  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
 
4153
  (eval "$ac_compile" 2>conftest.err)
 
4154
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
4155
  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
 
4156
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
 
4157
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
4158
  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
 
4159
  cat conftest.out >&AS_MESSAGE_LOG_FD
 
4160
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
 
4161
    lt_cv_nm_interface="MS dumpbin"
 
4162
  fi
 
4163
  rm -f conftest*])
 
4164
])# LT_PATH_NM
 
4165
 
 
4166
# Old names:
 
4167
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
 
4168
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
 
4169
dnl aclocal-1.4 backwards compatibility:
 
4170
dnl AC_DEFUN([AM_PROG_NM], [])
 
4171
dnl AC_DEFUN([AC_PROG_NM], [])
 
4172
 
 
4173
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
 
4174
# --------------------------------
 
4175
# how to determine the name of the shared library
 
4176
# associated with a specific link library.
 
4177
#  -- PORTME fill in with the dynamic library characteristics
 
4178
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
 
4179
[m4_require([_LT_DECL_EGREP])
 
4180
m4_require([_LT_DECL_OBJDUMP])
 
4181
m4_require([_LT_DECL_DLLTOOL])
 
4182
AC_CACHE_CHECK([how to associate runtime and link libraries],
 
4183
lt_cv_sharedlib_from_linklib_cmd,
 
4184
[lt_cv_sharedlib_from_linklib_cmd='unknown'
 
4185
 
 
4186
case $host_os in
 
4187
cygwin* | mingw* | pw32* | cegcc*)
 
4188
  # two different shell functions defined in ltmain.sh
 
4189
  # decide which to use based on capabilities of $DLLTOOL
 
4190
  case `$DLLTOOL --help 2>&1` in
 
4191
  *--identify-strict*)
 
4192
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
 
4193
    ;;
 
4194
  *)
 
4195
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
 
4196
    ;;
 
4197
  esac
 
4198
  ;;
 
4199
*)
 
4200
  # fallback: assume linklib IS sharedlib
 
4201
  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
 
4202
  ;;
 
4203
esac
 
4204
])
 
4205
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
 
4206
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
 
4207
 
 
4208
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
 
4209
    [Command to associate shared and link libraries])
 
4210
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
 
4211
 
 
4212
 
 
4213
# _LT_PATH_MANIFEST_TOOL
 
4214
# ----------------------
 
4215
# locate the manifest tool
 
4216
m4_defun([_LT_PATH_MANIFEST_TOOL],
 
4217
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
 
4218
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
 
4219
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
 
4220
  [lt_cv_path_mainfest_tool=no
 
4221
  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
 
4222
  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
 
4223
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
4224
  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
 
4225
    lt_cv_path_mainfest_tool=yes
 
4226
  fi
 
4227
  rm -f conftest*])
 
4228
if test "x$lt_cv_path_mainfest_tool" != xyes; then
 
4229
  MANIFEST_TOOL=:
 
4230
fi
 
4231
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
 
4232
])# _LT_PATH_MANIFEST_TOOL
 
4233
 
 
4234
 
 
4235
# LT_LIB_M
 
4236
# --------
 
4237
# check for math library
 
4238
AC_DEFUN([LT_LIB_M],
 
4239
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
4240
LIBM=
 
4241
case $host in
 
4242
*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
 
4243
  # These system don't have libm, or don't need it
 
4244
  ;;
 
4245
*-ncr-sysv4.3*)
 
4246
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
4247
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
4248
  ;;
 
4249
*)
 
4250
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
4251
  ;;
 
4252
esac
 
4253
AC_SUBST([LIBM])
 
4254
])# LT_LIB_M
 
4255
 
 
4256
# Old name:
 
4257
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
 
4258
dnl aclocal-1.4 backwards compatibility:
 
4259
dnl AC_DEFUN([AC_CHECK_LIBM], [])
 
4260
 
 
4261
 
 
4262
# _LT_COMPILER_NO_RTTI([TAGNAME])
 
4263
# -------------------------------
 
4264
m4_defun([_LT_COMPILER_NO_RTTI],
 
4265
[m4_require([_LT_TAG_COMPILER])dnl
 
4266
 
 
4267
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
4268
 
 
4269
if test "$GCC" = yes; then
 
4270
  case $cc_basename in
 
4271
  nvcc*)
 
4272
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
 
4273
  *)
 
4274
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
 
4275
  esac
 
4276
 
 
4277
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
4278
    lt_cv_prog_compiler_rtti_exceptions,
 
4279
    [-fno-rtti -fno-exceptions], [],
 
4280
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
4281
fi
 
4282
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
 
4283
        [Compiler flag to turn off builtin functions])
 
4284
])# _LT_COMPILER_NO_RTTI
 
4285
 
 
4286
 
 
4287
# _LT_CMD_GLOBAL_SYMBOLS
 
4288
# ----------------------
 
4289
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
 
4290
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
4291
AC_REQUIRE([AC_PROG_CC])dnl
 
4292
AC_REQUIRE([AC_PROG_AWK])dnl
 
4293
AC_REQUIRE([LT_PATH_NM])dnl
 
4294
AC_REQUIRE([LT_PATH_LD])dnl
 
4295
m4_require([_LT_DECL_SED])dnl
 
4296
m4_require([_LT_DECL_EGREP])dnl
 
4297
m4_require([_LT_TAG_COMPILER])dnl
 
4298
 
 
4299
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
4300
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
4301
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
4302
[
 
4303
# These are sane defaults that work on at least a few old systems.
 
4304
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
4305
 
 
4306
# Character class describing NM global symbol codes.
 
4307
symcode='[[BCDEGRST]]'
 
4308
 
 
4309
# Regexp to match symbols that can be accessed directly from C.
 
4310
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
4311
 
 
4312
# Define system-specific variables.
 
4313
case $host_os in
 
4314
aix*)
 
4315
  symcode='[[BCDT]]'
 
4316
  ;;
 
4317
cygwin* | mingw* | pw32* | cegcc*)
 
4318
  symcode='[[ABCDGISTW]]'
 
4319
  ;;
 
4320
hpux*)
 
4321
  if test "$host_cpu" = ia64; then
 
4322
    symcode='[[ABCDEGRST]]'
 
4323
  fi
 
4324
  ;;
 
4325
irix* | nonstopux*)
 
4326
  symcode='[[BCDEGRST]]'
 
4327
  ;;
 
4328
osf*)
 
4329
  symcode='[[BCDEGQRST]]'
 
4330
  ;;
 
4331
solaris*)
 
4332
  symcode='[[BDRT]]'
 
4333
  ;;
 
4334
sco3.2v5*)
 
4335
  symcode='[[DT]]'
 
4336
  ;;
 
4337
sysv4.2uw2*)
 
4338
  symcode='[[DT]]'
 
4339
  ;;
 
4340
sysv5* | sco5v6* | unixware* | OpenUNIX*)
 
4341
  symcode='[[ABDT]]'
 
4342
  ;;
 
4343
sysv4)
 
4344
  symcode='[[DFNSTU]]'
 
4345
  ;;
 
4346
esac
 
4347
 
 
4348
# If we're using GNU nm, then use its standard symbol codes.
 
4349
case `$NM -V 2>&1` in
 
4350
*GNU* | *'with BFD'*)
 
4351
  symcode='[[ABCDGIRSTW]]' ;;
 
4352
esac
 
4353
 
 
4354
# Transform an extracted symbol line into a proper C declaration.
 
4355
# Some systems (esp. on ia64) link data and code symbols differently,
 
4356
# so use this general approach.
 
4357
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
4358
 
 
4359
# Transform an extracted symbol line into symbol name and symbol address
 
4360
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
 
4361
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
4362
 
 
4363
# Handle CRLF in mingw tool chain
 
4364
opt_cr=
 
4365
case $build_os in
 
4366
mingw*)
 
4367
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
4368
  ;;
 
4369
esac
 
4370
 
 
4371
# Try without a prefix underscore, then with it.
 
4372
for ac_symprfx in "" "_"; do
 
4373
 
 
4374
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
 
4375
  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
4376
 
 
4377
  # Write the raw and C identifiers.
 
4378
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
 
4379
    # Fake it for dumpbin and say T for any non-static function
 
4380
    # and D for any global variable.
 
4381
    # Also find C++ and __fastcall symbols from MSVC++,
 
4382
    # which start with @ or ?.
 
4383
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
 
4384
"     {last_section=section; section=\$ 3};"\
 
4385
"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 
4386
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 
4387
"     \$ 0!~/External *\|/{next};"\
 
4388
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 
4389
"     {if(hide[section]) next};"\
 
4390
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
 
4391
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
 
4392
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
 
4393
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
 
4394
"     ' prfx=^$ac_symprfx]"
 
4395
  else
 
4396
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
4397
  fi
 
4398
  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
4399
 
 
4400
  # Check to see that the pipe works correctly.
 
4401
  pipe_works=no
 
4402
 
 
4403
  rm -f conftest*
 
4404
  cat > conftest.$ac_ext <<_LT_EOF
 
4405
#ifdef __cplusplus
 
4406
extern "C" {
 
4407
#endif
 
4408
char nm_test_var;
 
4409
void nm_test_func(void);
 
4410
void nm_test_func(void){}
 
4411
#ifdef __cplusplus
 
4412
}
 
4413
#endif
 
4414
int main(){nm_test_var='a';nm_test_func();return(0);}
 
4415
_LT_EOF
 
4416
 
 
4417
  if AC_TRY_EVAL(ac_compile); then
 
4418
    # Now try to grab the symbols.
 
4419
    nlist=conftest.nm
 
4420
    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
 
4421
      # Try sorting and uniquifying the output.
 
4422
      if sort "$nlist" | uniq > "$nlist"T; then
 
4423
        mv -f "$nlist"T "$nlist"
 
4424
      else
 
4425
        rm -f "$nlist"T
 
4426
      fi
 
4427
 
 
4428
      # Make sure that we snagged all the symbols we need.
 
4429
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 
4430
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 
4431
          cat <<_LT_EOF > conftest.$ac_ext
 
4432
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
 
4433
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
 
4434
/* DATA imports from DLLs on WIN32 con't be const, because runtime
 
4435
   relocations are performed -- see ld's documentation on pseudo-relocs.  */
 
4436
# define LT@&t@_DLSYM_CONST
 
4437
#elif defined(__osf__)
 
4438
/* This system does not cope well with relocations in const data.  */
 
4439
# define LT@&t@_DLSYM_CONST
 
4440
#else
 
4441
# define LT@&t@_DLSYM_CONST const
 
4442
#endif
 
4443
 
 
4444
#ifdef __cplusplus
 
4445
extern "C" {
 
4446
#endif
 
4447
 
 
4448
_LT_EOF
 
4449
          # Now generate the symbol file.
 
4450
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
4451
 
 
4452
          cat <<_LT_EOF >> conftest.$ac_ext
 
4453
 
 
4454
/* The mapping between symbol names and symbols.  */
 
4455
LT@&t@_DLSYM_CONST struct {
 
4456
  const char *name;
 
4457
  void       *address;
 
4458
}
 
4459
lt__PROGRAM__LTX_preloaded_symbols[[]] =
 
4460
{
 
4461
  { "@PROGRAM@", (void *) 0 },
 
4462
_LT_EOF
 
4463
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 
4464
          cat <<\_LT_EOF >> conftest.$ac_ext
 
4465
  {0, (void *) 0}
 
4466
};
 
4467
 
 
4468
/* This works around a problem in FreeBSD linker */
 
4469
#ifdef FREEBSD_WORKAROUND
 
4470
static const void *lt_preloaded_setup() {
 
4471
  return lt__PROGRAM__LTX_preloaded_symbols;
 
4472
}
 
4473
#endif
 
4474
 
 
4475
#ifdef __cplusplus
 
4476
}
 
4477
#endif
 
4478
_LT_EOF
 
4479
          # Now try linking the two files.
 
4480
          mv conftest.$ac_objext conftstm.$ac_objext
 
4481
          lt_globsym_save_LIBS=$LIBS
 
4482
          lt_globsym_save_CFLAGS=$CFLAGS
 
4483
          LIBS="conftstm.$ac_objext"
 
4484
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
4485
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
4486
            pipe_works=yes
 
4487
          fi
 
4488
          LIBS=$lt_globsym_save_LIBS
 
4489
          CFLAGS=$lt_globsym_save_CFLAGS
 
4490
        else
 
4491
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
4492
        fi
 
4493
      else
 
4494
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
4495
      fi
 
4496
    else
 
4497
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
4498
    fi
 
4499
  else
 
4500
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
4501
    cat conftest.$ac_ext >&5
 
4502
  fi
 
4503
  rm -rf conftest* conftst*
 
4504
 
 
4505
  # Do not use the global_symbol_pipe unless it works.
 
4506
  if test "$pipe_works" = yes; then
 
4507
    break
 
4508
  else
 
4509
    lt_cv_sys_global_symbol_pipe=
 
4510
  fi
 
4511
done
 
4512
])
 
4513
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
4514
  lt_cv_sys_global_symbol_to_cdecl=
 
4515
fi
 
4516
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
4517
  AC_MSG_RESULT(failed)
 
4518
else
 
4519
  AC_MSG_RESULT(ok)
 
4520
fi
 
4521
 
 
4522
# Response file support.
 
4523
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
 
4524
  nm_file_list_spec='@'
 
4525
elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
 
4526
  nm_file_list_spec='@'
 
4527
fi
 
4528
 
 
4529
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
 
4530
    [Take the output of nm and produce a listing of raw symbols and C names])
 
4531
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
 
4532
    [Transform the output of nm in a proper C declaration])
 
4533
_LT_DECL([global_symbol_to_c_name_address],
 
4534
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
 
4535
    [Transform the output of nm in a C name address pair])
 
4536
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
 
4537
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
 
4538
    [Transform the output of nm in a C name address pair when lib prefix is needed])
 
4539
_LT_DECL([], [nm_file_list_spec], [1],
 
4540
    [Specify filename containing input files for $NM])
 
4541
]) # _LT_CMD_GLOBAL_SYMBOLS
 
4542
 
 
4543
 
 
4544
# _LT_COMPILER_PIC([TAGNAME])
 
4545
# ---------------------------
 
4546
m4_defun([_LT_COMPILER_PIC],
 
4547
[m4_require([_LT_TAG_COMPILER])dnl
 
4548
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
 
4549
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
4550
_LT_TAGVAR(lt_prog_compiler_static, $1)=
 
4551
 
 
4552
m4_if([$1], [CXX], [
 
4553
  # C++ specific cases for pic, static, wl, etc.
 
4554
  if test "$GXX" = yes; then
 
4555
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4556
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4557
 
 
4558
    case $host_os in
 
4559
    aix*)
 
4560
      # All AIX code is PIC.
 
4561
      if test "$host_cpu" = ia64; then
 
4562
        # AIX 5 now supports IA64 processor
 
4563
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4564
      fi
 
4565
      ;;
 
4566
 
 
4567
    amigaos*)
 
4568
      case $host_cpu in
 
4569
      powerpc)
 
4570
            # see comment about AmigaOS4 .so support
 
4571
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4572
        ;;
 
4573
      m68k)
 
4574
            # FIXME: we need at least 68020 code to build shared libraries, but
 
4575
            # adding the `-m68020' flag to GCC prevents building anything better,
 
4576
            # like `-m68040'.
 
4577
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
4578
        ;;
 
4579
      esac
 
4580
      ;;
 
4581
 
 
4582
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
4583
      # PIC is the default for these OSes.
 
4584
      ;;
 
4585
    mingw* | cygwin* | os2* | pw32* | cegcc*)
 
4586
      # This hack is so that the source file can tell whether it is being
 
4587
      # built for inclusion in a dll (and should export symbols for example).
 
4588
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
4589
      # (--disable-auto-import) libraries
 
4590
      m4_if([$1], [GCJ], [],
 
4591
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
4592
      ;;
 
4593
    darwin* | rhapsody*)
 
4594
      # PIC is the default on this platform
 
4595
      # Common symbols not allowed in MH_DYLIB files
 
4596
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
4597
      ;;
 
4598
    *djgpp*)
 
4599
      # DJGPP does not support shared libraries at all
 
4600
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
4601
      ;;
 
4602
    haiku*)
 
4603
      # PIC is the default for Haiku.
 
4604
      # The "-static" flag exists, but is broken.
 
4605
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
4606
      ;;
 
4607
    interix[[3-9]]*)
 
4608
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
4609
      # Instead, we relocate shared libraries at runtime.
 
4610
      ;;
 
4611
    sysv4*MP*)
 
4612
      if test -d /usr/nec; then
 
4613
        _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
4614
      fi
 
4615
      ;;
 
4616
    hpux*)
 
4617
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
 
4618
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
 
4619
      # sets the default TLS model and affects inlining.
 
4620
      case $host_cpu in
 
4621
      hppa*64*)
 
4622
        ;;
 
4623
      *)
 
4624
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4625
        ;;
 
4626
      esac
 
4627
      ;;
 
4628
    *qnx* | *nto*)
 
4629
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
4630
      # it will coredump.
 
4631
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
4632
      ;;
 
4633
    *)
 
4634
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4635
      ;;
 
4636
    esac
 
4637
  else
 
4638
    case $host_os in
 
4639
      aix[[4-9]]*)
 
4640
        # All AIX code is PIC.
 
4641
        if test "$host_cpu" = ia64; then
 
4642
          # AIX 5 now supports IA64 processor
 
4643
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4644
        else
 
4645
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
4646
        fi
 
4647
        ;;
 
4648
      chorus*)
 
4649
        case $cc_basename in
 
4650
        cxch68*)
 
4651
          # Green Hills C++ Compiler
 
4652
          # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
 
4653
          ;;
 
4654
        esac
 
4655
        ;;
 
4656
      mingw* | cygwin* | os2* | pw32* | cegcc*)
 
4657
        # This hack is so that the source file can tell whether it is being
 
4658
        # built for inclusion in a dll (and should export symbols for example).
 
4659
        m4_if([$1], [GCJ], [],
 
4660
          [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
4661
        ;;
 
4662
      dgux*)
 
4663
        case $cc_basename in
 
4664
          ec++*)
 
4665
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4666
            ;;
 
4667
          ghcx*)
 
4668
            # Green Hills C++ Compiler
 
4669
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4670
            ;;
 
4671
          *)
 
4672
            ;;
 
4673
        esac
 
4674
        ;;
 
4675
      freebsd* | dragonfly*)
 
4676
        # FreeBSD uses GNU C++
 
4677
        ;;
 
4678
      hpux9* | hpux10* | hpux11*)
 
4679
        case $cc_basename in
 
4680
          CC*)
 
4681
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4682
            _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
4683
            if test "$host_cpu" != ia64; then
 
4684
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
4685
            fi
 
4686
            ;;
 
4687
          aCC*)
 
4688
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4689
            _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
4690
            case $host_cpu in
 
4691
            hppa*64*|ia64*)
 
4692
              # +Z the default
 
4693
              ;;
 
4694
            *)
 
4695
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
4696
              ;;
 
4697
            esac
 
4698
            ;;
 
4699
          *)
 
4700
            ;;
 
4701
        esac
 
4702
        ;;
 
4703
      interix*)
 
4704
        # This is c89, which is MS Visual C++ (no shared libs)
 
4705
        # Anyone wants to do a port?
 
4706
        ;;
 
4707
      irix5* | irix6* | nonstopux*)
 
4708
        case $cc_basename in
 
4709
          CC*)
 
4710
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4711
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4712
            # CC pic flag -KPIC is the default.
 
4713
            ;;
 
4714
          *)
 
4715
            ;;
 
4716
        esac
 
4717
        ;;
 
4718
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
4719
        case $cc_basename in
 
4720
          KCC*)
 
4721
            # KAI C++ Compiler
 
4722
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
4723
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4724
            ;;
 
4725
          ecpc* )
 
4726
            # old Intel C++ for x86_64 which still supported -KPIC.
 
4727
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4728
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4729
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4730
            ;;
 
4731
          icpc* )
 
4732
            # Intel C++, used to be incompatible with GCC.
 
4733
            # ICC 10 doesn't accept -KPIC any more.
 
4734
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4735
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4736
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4737
            ;;
 
4738
          pgCC* | pgcpp*)
 
4739
            # Portland Group C++ compiler
 
4740
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4741
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
4742
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4743
            ;;
 
4744
          cxx*)
 
4745
            # Compaq C++
 
4746
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
4747
            # Linux and Compaq Tru64 Unix objects are PIC.
 
4748
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
4749
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4750
            ;;
 
4751
          xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
 
4752
            # IBM XL 8.0, 9.0 on PPC and BlueGene
 
4753
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4754
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 
4755
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 
4756
            ;;
 
4757
          *)
 
4758
            case `$CC -V 2>&1 | sed 5q` in
 
4759
            *Sun\ C*)
 
4760
              # Sun C++ 5.9
 
4761
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4762
              _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4763
              _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
4764
              ;;
 
4765
            esac
 
4766
            ;;
 
4767
        esac
 
4768
        ;;
 
4769
      lynxos*)
 
4770
        ;;
 
4771
      m88k*)
 
4772
        ;;
 
4773
      mvs*)
 
4774
        case $cc_basename in
 
4775
          cxx*)
 
4776
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
4777
            ;;
 
4778
          *)
 
4779
            ;;
 
4780
        esac
 
4781
        ;;
 
4782
      netbsd* | netbsdelf*-gnu)
 
4783
        ;;
 
4784
      *qnx* | *nto*)
 
4785
        # QNX uses GNU C++, but need to define -shared option too, otherwise
 
4786
        # it will coredump.
 
4787
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
4788
        ;;
 
4789
      osf3* | osf4* | osf5*)
 
4790
        case $cc_basename in
 
4791
          KCC*)
 
4792
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
4793
            ;;
 
4794
          RCC*)
 
4795
            # Rational C++ 2.4.1
 
4796
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4797
            ;;
 
4798
          cxx*)
 
4799
            # Digital/Compaq C++
 
4800
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4801
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
4802
            # Linux and Compaq Tru64 Unix objects are PIC.
 
4803
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
4804
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
4805
            ;;
 
4806
          *)
 
4807
            ;;
 
4808
        esac
 
4809
        ;;
 
4810
      psos*)
 
4811
        ;;
 
4812
      solaris*)
 
4813
        case $cc_basename in
 
4814
          CC* | sunCC*)
 
4815
            # Sun C++ 4.2, 5.x and Centerline C++
 
4816
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4817
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4818
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
4819
            ;;
 
4820
          gcx*)
 
4821
            # Green Hills C++ Compiler
 
4822
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
4823
            ;;
 
4824
          *)
 
4825
            ;;
 
4826
        esac
 
4827
        ;;
 
4828
      sunos4*)
 
4829
        case $cc_basename in
 
4830
          CC*)
 
4831
            # Sun C++ 4.x
 
4832
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4833
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4834
            ;;
 
4835
          lcc*)
 
4836
            # Lucid
 
4837
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
4838
            ;;
 
4839
          *)
 
4840
            ;;
 
4841
        esac
 
4842
        ;;
 
4843
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
4844
        case $cc_basename in
 
4845
          CC*)
 
4846
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4847
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4848
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4849
            ;;
 
4850
        esac
 
4851
        ;;
 
4852
      tandem*)
 
4853
        case $cc_basename in
 
4854
          NCC*)
 
4855
            # NonStop-UX NCC 3.20
 
4856
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
4857
            ;;
 
4858
          *)
 
4859
            ;;
 
4860
        esac
 
4861
        ;;
 
4862
      vxworks*)
 
4863
        ;;
 
4864
      *)
 
4865
        _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
4866
        ;;
 
4867
    esac
 
4868
  fi
 
4869
],
 
4870
[
 
4871
  if test "$GCC" = yes; then
 
4872
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4873
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4874
 
 
4875
    case $host_os in
 
4876
      aix*)
 
4877
      # All AIX code is PIC.
 
4878
      if test "$host_cpu" = ia64; then
 
4879
        # AIX 5 now supports IA64 processor
 
4880
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4881
      fi
 
4882
      ;;
 
4883
 
 
4884
    amigaos*)
 
4885
      case $host_cpu in
 
4886
      powerpc)
 
4887
            # see comment about AmigaOS4 .so support
 
4888
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4889
        ;;
 
4890
      m68k)
 
4891
            # FIXME: we need at least 68020 code to build shared libraries, but
 
4892
            # adding the `-m68020' flag to GCC prevents building anything better,
 
4893
            # like `-m68040'.
 
4894
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
4895
        ;;
 
4896
      esac
 
4897
      ;;
 
4898
 
 
4899
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
4900
      # PIC is the default for these OSes.
 
4901
      ;;
 
4902
 
 
4903
    mingw* | cygwin* | pw32* | os2* | cegcc*)
 
4904
      # This hack is so that the source file can tell whether it is being
 
4905
      # built for inclusion in a dll (and should export symbols for example).
 
4906
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
4907
      # (--disable-auto-import) libraries
 
4908
      m4_if([$1], [GCJ], [],
 
4909
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
4910
      ;;
 
4911
 
 
4912
    darwin* | rhapsody*)
 
4913
      # PIC is the default on this platform
 
4914
      # Common symbols not allowed in MH_DYLIB files
 
4915
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
4916
      ;;
 
4917
 
 
4918
    haiku*)
 
4919
      # PIC is the default for Haiku.
 
4920
      # The "-static" flag exists, but is broken.
 
4921
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
4922
      ;;
 
4923
 
 
4924
    hpux*)
 
4925
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
 
4926
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
 
4927
      # sets the default TLS model and affects inlining.
 
4928
      case $host_cpu in
 
4929
      hppa*64*)
 
4930
        # +Z the default
 
4931
        ;;
 
4932
      *)
 
4933
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4934
        ;;
 
4935
      esac
 
4936
      ;;
 
4937
 
 
4938
    interix[[3-9]]*)
 
4939
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
4940
      # Instead, we relocate shared libraries at runtime.
 
4941
      ;;
 
4942
 
 
4943
    msdosdjgpp*)
 
4944
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
4945
      # on systems that don't support them.
 
4946
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
4947
      enable_shared=no
 
4948
      ;;
 
4949
 
 
4950
    *nto* | *qnx*)
 
4951
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
4952
      # it will coredump.
 
4953
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
4954
      ;;
 
4955
 
 
4956
    sysv4*MP*)
 
4957
      if test -d /usr/nec; then
 
4958
        _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
4959
      fi
 
4960
      ;;
 
4961
 
 
4962
    *)
 
4963
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4964
      ;;
 
4965
    esac
 
4966
 
 
4967
    case $cc_basename in
 
4968
    nvcc*) # Cuda Compiler Driver 2.2
 
4969
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
 
4970
      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
4971
        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
 
4972
      fi
 
4973
      ;;
 
4974
    esac
 
4975
  else
 
4976
    # PORTME Check for flag to pass linker flags through the system compiler.
 
4977
    case $host_os in
 
4978
    aix*)
 
4979
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4980
      if test "$host_cpu" = ia64; then
 
4981
        # AIX 5 now supports IA64 processor
 
4982
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4983
      else
 
4984
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
4985
      fi
 
4986
      ;;
 
4987
 
 
4988
    mingw* | cygwin* | pw32* | os2* | cegcc*)
 
4989
      # This hack is so that the source file can tell whether it is being
 
4990
      # built for inclusion in a dll (and should export symbols for example).
 
4991
      m4_if([$1], [GCJ], [],
 
4992
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
 
4993
      ;;
 
4994
 
 
4995
    hpux9* | hpux10* | hpux11*)
 
4996
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4997
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
4998
      # not for PA HP-UX.
 
4999
      case $host_cpu in
 
5000
      hppa*64*|ia64*)
 
5001
        # +Z the default
 
5002
        ;;
 
5003
      *)
 
5004
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5005
        ;;
 
5006
      esac
 
5007
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
5008
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5009
      ;;
 
5010
 
 
5011
    irix5* | irix6* | nonstopux*)
 
5012
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5013
      # PIC (with -KPIC) is the default.
 
5014
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5015
      ;;
 
5016
 
 
5017
    linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
5018
      case $cc_basename in
 
5019
      # old Intel for x86_64 which still supported -KPIC.
 
5020
      ecc*)
 
5021
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5022
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5023
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5024
        ;;
 
5025
      # icc used to be incompatible with GCC.
 
5026
      # ICC 10 doesn't accept -KPIC any more.
 
5027
      icc* | ifort*)
 
5028
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5029
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5030
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5031
        ;;
 
5032
      # Lahey Fortran 8.1.
 
5033
      lf95*)
 
5034
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5035
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
 
5036
        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
 
5037
        ;;
 
5038
      nagfor*)
 
5039
        # NAG Fortran compiler
 
5040
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
 
5041
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5042
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5043
        ;;
 
5044
      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
 
5045
        # Portland Group compilers (*not* the Pentium gcc compiler,
 
5046
        # which looks to be a dead project)
 
5047
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5048
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5049
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5050
        ;;
 
5051
      ccc*)
 
5052
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5053
        # All Alpha code is PIC.
 
5054
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5055
        ;;
 
5056
      xl* | bgxl* | bgf* | mpixl*)
 
5057
        # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
 
5058
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5059
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 
5060
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 
5061
        ;;
 
5062
      *)
 
5063
        case `$CC -V 2>&1 | sed 5q` in
 
5064
        *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
 
5065
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
 
5066
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5067
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5068
          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
 
5069
          ;;
 
5070
        *Sun\ F* | *Sun*Fortran*)
 
5071
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5072
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5073
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5074
          ;;
 
5075
        *Sun\ C*)
 
5076
          # Sun C 5.9
 
5077
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5078
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5079
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5080
          ;;
 
5081
        *Intel*\ [[CF]]*Compiler*)
 
5082
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5083
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5084
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5085
          ;;
 
5086
        *Portland\ Group*)
 
5087
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5088
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5089
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5090
          ;;
 
5091
        esac
 
5092
        ;;
 
5093
      esac
 
5094
      ;;
 
5095
 
 
5096
    newsos6)
 
5097
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5098
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5099
      ;;
 
5100
 
 
5101
    *nto* | *qnx*)
 
5102
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
5103
      # it will coredump.
 
5104
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
5105
      ;;
 
5106
 
 
5107
    osf3* | osf4* | osf5*)
 
5108
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5109
      # All OSF/1 code is PIC.
 
5110
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5111
      ;;
 
5112
 
 
5113
    rdos*)
 
5114
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5115
      ;;
 
5116
 
 
5117
    solaris*)
 
5118
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5119
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5120
      case $cc_basename in
 
5121
      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
 
5122
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
 
5123
      *)
 
5124
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
 
5125
      esac
 
5126
      ;;
 
5127
 
 
5128
    sunos4*)
 
5129
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5130
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5131
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5132
      ;;
 
5133
 
 
5134
    sysv4 | sysv4.2uw2* | sysv4.3*)
 
5135
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5136
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5137
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5138
      ;;
 
5139
 
 
5140
    sysv4*MP*)
 
5141
      if test -d /usr/nec ;then
 
5142
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
5143
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5144
      fi
 
5145
      ;;
 
5146
 
 
5147
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
5148
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5149
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5150
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5151
      ;;
 
5152
 
 
5153
    unicos*)
 
5154
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5155
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5156
      ;;
 
5157
 
 
5158
    uts4*)
 
5159
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5160
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5161
      ;;
 
5162
 
 
5163
    *)
 
5164
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5165
      ;;
 
5166
    esac
 
5167
  fi
 
5168
])
 
5169
case $host_os in
 
5170
  # For platforms which do not support PIC, -DPIC is meaningless:
 
5171
  *djgpp*)
 
5172
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5173
    ;;
 
5174
  *)
 
5175
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
 
5176
    ;;
 
5177
esac
 
5178
 
 
5179
AC_CACHE_CHECK([for $compiler option to produce PIC],
 
5180
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
 
5181
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
 
5182
_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
 
5183
 
 
5184
#
 
5185
# Check to make sure the PIC flag actually works.
 
5186
#
 
5187
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
5188
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
 
5189
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
 
5190
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
 
5191
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
 
5192
     "" | " "*) ;;
 
5193
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
5194
     esac],
 
5195
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
5196
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
5197
fi
 
5198
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
 
5199
        [Additional compiler flags for building library objects])
 
5200
 
 
5201
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
 
5202
        [How to pass a linker flag through the compiler])
 
5203
#
 
5204
# Check to make sure the static flag actually works.
 
5205
#
 
5206
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
 
5207
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
 
5208
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
 
5209
  $lt_tmp_static_flag,
 
5210
  [],
 
5211
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
 
5212
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
 
5213
        [Compiler flag to prevent dynamic linking])
 
5214
])# _LT_COMPILER_PIC
 
5215
 
 
5216
 
 
5217
# _LT_LINKER_SHLIBS([TAGNAME])
 
5218
# ----------------------------
 
5219
# See if the linker supports building shared libraries.
 
5220
m4_defun([_LT_LINKER_SHLIBS],
 
5221
[AC_REQUIRE([LT_PATH_LD])dnl
 
5222
AC_REQUIRE([LT_PATH_NM])dnl
 
5223
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
 
5224
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
5225
m4_require([_LT_DECL_EGREP])dnl
 
5226
m4_require([_LT_DECL_SED])dnl
 
5227
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
5228
m4_require([_LT_TAG_COMPILER])dnl
 
5229
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
5230
m4_if([$1], [CXX], [
 
5231
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5232
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 
5233
  case $host_os in
 
5234
  aix[[4-9]]*)
 
5235
    # If we're using GNU nm, then we don't want the "-C" option.
 
5236
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5237
    # Also, AIX nm treats weak defined symbols like other global defined
 
5238
    # symbols, whereas GNU nm marks them as "W".
 
5239
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 
5240
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
5241
    else
 
5242
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
5243
    fi
 
5244
    ;;
 
5245
  pw32*)
 
5246
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
5247
    ;;
 
5248
  cygwin* | mingw* | cegcc*)
 
5249
    case $cc_basename in
 
5250
    cl*)
 
5251
      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 
5252
      ;;
 
5253
    *)
 
5254
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
 
5255
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
5256
      ;;
 
5257
    esac
 
5258
    ;;
 
5259
  linux* | k*bsd*-gnu | gnu*)
 
5260
    _LT_TAGVAR(link_all_deplibs, $1)=no
 
5261
    ;;
 
5262
  *)
 
5263
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5264
    ;;
 
5265
  esac
 
5266
], [
 
5267
  runpath_var=
 
5268
  _LT_TAGVAR(allow_undefined_flag, $1)=
 
5269
  _LT_TAGVAR(always_export_symbols, $1)=no
 
5270
  _LT_TAGVAR(archive_cmds, $1)=
 
5271
  _LT_TAGVAR(archive_expsym_cmds, $1)=
 
5272
  _LT_TAGVAR(compiler_needs_object, $1)=no
 
5273
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
5274
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
5275
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5276
  _LT_TAGVAR(hardcode_automatic, $1)=no
 
5277
  _LT_TAGVAR(hardcode_direct, $1)=no
 
5278
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
5279
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5280
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
5281
  _LT_TAGVAR(hardcode_minus_L, $1)=no
 
5282
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
5283
  _LT_TAGVAR(inherit_rpath, $1)=no
 
5284
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
 
5285
  _LT_TAGVAR(module_cmds, $1)=
 
5286
  _LT_TAGVAR(module_expsym_cmds, $1)=
 
5287
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
 
5288
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
5289
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
 
5290
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
5291
  # include_expsyms should be a list of space-separated symbols to be *always*
 
5292
  # included in the symbol list
 
5293
  _LT_TAGVAR(include_expsyms, $1)=
 
5294
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
5295
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
5296
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
5297
  # as well as any symbol that contains `d'.
 
5298
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 
5299
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
5300
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
5301
  # the symbol is explicitly referenced.  Since portable code cannot
 
5302
  # rely on this symbol name, it's probably fine to never include it in
 
5303
  # preloaded symbol tables.
 
5304
  # Exclude shared library initialization/finalization symbols.
 
5305
dnl Note also adjust exclude_expsyms for C++ above.
 
5306
  extract_expsyms_cmds=
 
5307
 
 
5308
  case $host_os in
 
5309
  cygwin* | mingw* | pw32* | cegcc*)
 
5310
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
5311
    # When not using gcc, we currently assume that we are using
 
5312
    # Microsoft Visual C++.
 
5313
    if test "$GCC" != yes; then
 
5314
      with_gnu_ld=no
 
5315
    fi
 
5316
    ;;
 
5317
  interix*)
 
5318
    # we just hope/assume this is gcc and not c89 (= MSVC++)
 
5319
    with_gnu_ld=yes
 
5320
    ;;
 
5321
  openbsd*)
 
5322
    with_gnu_ld=no
 
5323
    ;;
 
5324
  linux* | k*bsd*-gnu | gnu*)
 
5325
    _LT_TAGVAR(link_all_deplibs, $1)=no
 
5326
    ;;
 
5327
  esac
 
5328
 
 
5329
  _LT_TAGVAR(ld_shlibs, $1)=yes
 
5330
 
 
5331
  # On some targets, GNU ld is compatible enough with the native linker
 
5332
  # that we're better off using the native interface for both.
 
5333
  lt_use_gnu_ld_interface=no
 
5334
  if test "$with_gnu_ld" = yes; then
 
5335
    case $host_os in
 
5336
      aix*)
 
5337
        # The AIX port of GNU ld has always aspired to compatibility
 
5338
        # with the native linker.  However, as the warning in the GNU ld
 
5339
        # block says, versions before 2.19.5* couldn't really create working
 
5340
        # shared libraries, regardless of the interface used.
 
5341
        case `$LD -v 2>&1` in
 
5342
          *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
 
5343
          *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
 
5344
          *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
 
5345
          *)
 
5346
            lt_use_gnu_ld_interface=yes
 
5347
            ;;
 
5348
        esac
 
5349
        ;;
 
5350
      *)
 
5351
        lt_use_gnu_ld_interface=yes
 
5352
        ;;
 
5353
    esac
 
5354
  fi
 
5355
 
 
5356
  if test "$lt_use_gnu_ld_interface" = yes; then
 
5357
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
5358
    wlarc='${wl}'
 
5359
 
 
5360
    # Set some defaults for GNU ld with shared library support. These
 
5361
    # are reset later if shared libraries are not supported. Putting them
 
5362
    # here allows them to be overridden if necessary.
 
5363
    runpath_var=LD_RUN_PATH
 
5364
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5365
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
5366
    # ancient GNU ld didn't support --whole-archive et. al.
 
5367
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
 
5368
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
5369
    else
 
5370
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
5371
    fi
 
5372
    supports_anon_versioning=no
 
5373
    case `$LD -v 2>&1` in
 
5374
      *GNU\ gold*) supports_anon_versioning=yes ;;
 
5375
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
5376
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
5377
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
5378
      *\ 2.11.*) ;; # other 2.11 versions
 
5379
      *) supports_anon_versioning=yes ;;
 
5380
    esac
 
5381
 
 
5382
    # See if GNU ld supports shared libraries.
 
5383
    case $host_os in
 
5384
    aix[[3-9]]*)
 
5385
      # On AIX/PPC, the GNU linker is very broken
 
5386
      if test "$host_cpu" != ia64; then
 
5387
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5388
        cat <<_LT_EOF 1>&2
 
5389
 
 
5390
*** Warning: the GNU linker, at least up to release 2.19, is reported
 
5391
*** to be unable to reliably create shared libraries on AIX.
 
5392
*** Therefore, libtool is disabling shared libraries support.  If you
 
5393
*** really care for shared libraries, you may want to install binutils
 
5394
*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
 
5395
*** You will then need to restart the configuration process.
 
5396
 
 
5397
_LT_EOF
 
5398
      fi
 
5399
      ;;
 
5400
 
 
5401
    amigaos*)
 
5402
      case $host_cpu in
 
5403
      powerpc)
 
5404
            # see comment about AmigaOS4 .so support
 
5405
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5406
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
 
5407
        ;;
 
5408
      m68k)
 
5409
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
5410
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5411
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5412
        ;;
 
5413
      esac
 
5414
      ;;
 
5415
 
 
5416
    beos*)
 
5417
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
5418
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5419
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
5420
        # support --undefined.  This deserves some investigation.  FIXME
 
5421
        _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5422
      else
 
5423
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5424
      fi
 
5425
      ;;
 
5426
 
 
5427
    cygwin* | mingw* | pw32* | cegcc*)
 
5428
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
5429
      # as there is no search path for DLLs.
 
5430
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5431
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
 
5432
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5433
      _LT_TAGVAR(always_export_symbols, $1)=no
 
5434
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5435
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
 
5436
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
5437
 
 
5438
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
5439
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
5440
        # If the export-symbols file already is a .def file (1st line
 
5441
        # is EXPORTS), use it as is; otherwise, prepend...
 
5442
        _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
5443
          cp $export_symbols $output_objdir/$soname.def;
 
5444
        else
 
5445
          echo EXPORTS > $output_objdir/$soname.def;
 
5446
          cat $export_symbols >> $output_objdir/$soname.def;
 
5447
        fi~
 
5448
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
5449
      else
 
5450
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5451
      fi
 
5452
      ;;
 
5453
 
 
5454
    haiku*)
 
5455
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5456
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
5457
      ;;
 
5458
 
 
5459
    interix[[3-9]]*)
 
5460
      _LT_TAGVAR(hardcode_direct, $1)=no
 
5461
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5462
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5463
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5464
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
5465
      # Instead, shared libraries are loaded at an image base (0x10000000 by
 
5466
      # default) and relocated if they conflict, which is a slow very memory
 
5467
      # consuming and fragmenting process.  To avoid this, we pick a random,
 
5468
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
5469
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
5470
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
5471
      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
5472
      ;;
 
5473
 
 
5474
    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
 
5475
      tmp_diet=no
 
5476
      if test "$host_os" = linux-dietlibc; then
 
5477
        case $cc_basename in
 
5478
          diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
 
5479
        esac
 
5480
      fi
 
5481
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
 
5482
         && test "$tmp_diet" = no
 
5483
      then
 
5484
        tmp_addflag=' $pic_flag'
 
5485
        tmp_sharedflag='-shared'
 
5486
        case $cc_basename,$host_cpu in
 
5487
        pgcc*)                          # Portland Group C compiler
 
5488
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
5489
          tmp_addflag=' $pic_flag'
 
5490
          ;;
 
5491
        pgf77* | pgf90* | pgf95* | pgfortran*)
 
5492
                                        # Portland Group f77 and f90 compilers
 
5493
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
5494
          tmp_addflag=' $pic_flag -Mnomain' ;;
 
5495
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
 
5496
          tmp_addflag=' -i_dynamic' ;;
 
5497
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
 
5498
          tmp_addflag=' -i_dynamic -nofor_main' ;;
 
5499
        ifc* | ifort*)                  # Intel Fortran compiler
 
5500
          tmp_addflag=' -nofor_main' ;;
 
5501
        lf95*)                          # Lahey Fortran 8.1
 
5502
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
5503
          tmp_sharedflag='--shared' ;;
 
5504
        xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 
5505
          tmp_sharedflag='-qmkshrobj'
 
5506
          tmp_addflag= ;;
 
5507
        nvcc*)  # Cuda Compiler Driver 2.2
 
5508
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
5509
          _LT_TAGVAR(compiler_needs_object, $1)=yes
 
5510
          ;;
 
5511
        esac
 
5512
        case `$CC -V 2>&1 | sed 5q` in
 
5513
        *Sun\ C*)                       # Sun C 5.9
 
5514
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
5515
          _LT_TAGVAR(compiler_needs_object, $1)=yes
 
5516
          tmp_sharedflag='-G' ;;
 
5517
        *Sun\ F*)                       # Sun Fortran 8.3
 
5518
          tmp_sharedflag='-G' ;;
 
5519
        esac
 
5520
        _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5521
 
 
5522
        if test "x$supports_anon_versioning" = xyes; then
 
5523
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
5524
            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
5525
            echo "local: *; };" >> $output_objdir/$libname.ver~
 
5526
            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
5527
        fi
 
5528
 
 
5529
        case $cc_basename in
 
5530
        xlf* | bgf* | bgxlf* | mpixlf*)
 
5531
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 
5532
          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
 
5533
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5534
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 
5535
          if test "x$supports_anon_versioning" = xyes; then
 
5536
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
5537
              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
5538
              echo "local: *; };" >> $output_objdir/$libname.ver~
 
5539
              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 
5540
          fi
 
5541
          ;;
 
5542
        esac
 
5543
      else
 
5544
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5545
      fi
 
5546
      ;;
 
5547
 
 
5548
    netbsd* | netbsdelf*-gnu)
 
5549
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
5550
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
5551
        wlarc=
 
5552
      else
 
5553
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5554
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5555
      fi
 
5556
      ;;
 
5557
 
 
5558
    solaris*)
 
5559
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
 
5560
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5561
        cat <<_LT_EOF 1>&2
 
5562
 
 
5563
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
5564
*** create shared libraries on Solaris systems.  Therefore, libtool
 
5565
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
5566
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
5567
*** your PATH or compiler configuration so that the native linker is
 
5568
*** used, and then restart.
 
5569
 
 
5570
_LT_EOF
 
5571
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
5572
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5573
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5574
      else
 
5575
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5576
      fi
 
5577
      ;;
 
5578
 
 
5579
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
 
5580
      case `$LD -v 2>&1` in
 
5581
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
 
5582
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5583
        cat <<_LT_EOF 1>&2
 
5584
 
 
5585
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
 
5586
*** reliably create shared libraries on SCO systems.  Therefore, libtool
 
5587
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
5588
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
 
5589
*** your PATH or compiler configuration so that the native linker is
 
5590
*** used, and then restart.
 
5591
 
 
5592
_LT_EOF
 
5593
        ;;
 
5594
        *)
 
5595
          # For security reasons, it is highly recommended that you always
 
5596
          # use absolute paths for naming shared libraries, and exclude the
 
5597
          # DT_RUNPATH tag from executables and libraries.  But doing so
 
5598
          # requires that you compile everything twice, which is a pain.
 
5599
          if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
5600
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5601
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5602
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5603
          else
 
5604
            _LT_TAGVAR(ld_shlibs, $1)=no
 
5605
          fi
 
5606
        ;;
 
5607
      esac
 
5608
      ;;
 
5609
 
 
5610
    sunos4*)
 
5611
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
5612
      wlarc=
 
5613
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5614
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5615
      ;;
 
5616
 
 
5617
    *)
 
5618
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
5619
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5620
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5621
      else
 
5622
        _LT_TAGVAR(ld_shlibs, $1)=no
 
5623
      fi
 
5624
      ;;
 
5625
    esac
 
5626
 
 
5627
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
 
5628
      runpath_var=
 
5629
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5630
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
5631
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
5632
    fi
 
5633
  else
 
5634
    # PORTME fill in a description of your system's linker (not GNU ld)
 
5635
    case $host_os in
 
5636
    aix3*)
 
5637
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5638
      _LT_TAGVAR(always_export_symbols, $1)=yes
 
5639
      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
 
5640
      # Note: this linker hardcodes the directories in LIBPATH if there
 
5641
      # are no directories specified by -L.
 
5642
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5643
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
 
5644
        # Neither direct hardcoding nor static linking is supported with a
 
5645
        # broken collect2.
 
5646
        _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
5647
      fi
 
5648
      ;;
 
5649
 
 
5650
    aix[[4-9]]*)
 
5651
      if test "$host_cpu" = ia64; then
 
5652
        # On IA64, the linker does run time linking by default, so we don't
 
5653
        # have to do anything special.
 
5654
        aix_use_runtimelinking=no
 
5655
        exp_sym_flag='-Bexport'
 
5656
        no_entry_flag=""
 
5657
      else
 
5658
        # If we're using GNU nm, then we don't want the "-C" option.
 
5659
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5660
        # Also, AIX nm treats weak defined symbols like other global
 
5661
        # defined symbols, whereas GNU nm marks them as "W".
 
5662
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 
5663
          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
5664
        else
 
5665
          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 
5666
        fi
 
5667
        aix_use_runtimelinking=no
 
5668
 
 
5669
        # Test if we are trying to use run time linking or normal
 
5670
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
5671
        # need to do runtime linking.
 
5672
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 
5673
          for ld_flag in $LDFLAGS; do
 
5674
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
5675
            aix_use_runtimelinking=yes
 
5676
            break
 
5677
          fi
 
5678
          done
 
5679
          ;;
 
5680
        esac
 
5681
 
 
5682
        exp_sym_flag='-bexport'
 
5683
        no_entry_flag='-bnoentry'
 
5684
      fi
 
5685
 
 
5686
      # When large executables or shared objects are built, AIX ld can
 
5687
      # have problems creating the table of contents.  If linking a library
 
5688
      # or program results in "error TOC overflow" add -mminimal-toc to
 
5689
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
5690
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
5691
 
 
5692
      _LT_TAGVAR(archive_cmds, $1)=''
 
5693
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5694
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
5695
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
5696
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
5697
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
5698
 
 
5699
      if test "$GCC" = yes; then
 
5700
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
5701
        # We only want to do this on AIX 4.2 and lower, the check
 
5702
        # below for broken collect2 doesn't work under 4.3+
 
5703
          collect2name=`${CC} -print-prog-name=collect2`
 
5704
          if test -f "$collect2name" &&
 
5705
           strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 
5706
          then
 
5707
          # We have reworked collect2
 
5708
          :
 
5709
          else
 
5710
          # We have old collect2
 
5711
          _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
5712
          # It fails to find uninstalled libraries when the uninstalled
 
5713
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
5714
          # to unsupported forces relinking
 
5715
          _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5716
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5717
          _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
5718
          fi
 
5719
          ;;
 
5720
        esac
 
5721
        shared_flag='-shared'
 
5722
        if test "$aix_use_runtimelinking" = yes; then
 
5723
          shared_flag="$shared_flag "'${wl}-G'
 
5724
        fi
 
5725
        _LT_TAGVAR(link_all_deplibs, $1)=no
 
5726
      else
 
5727
        # not using gcc
 
5728
        if test "$host_cpu" = ia64; then
 
5729
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
5730
        # chokes on -Wl,-G. The following line is correct:
 
5731
          shared_flag='-G'
 
5732
        else
 
5733
          if test "$aix_use_runtimelinking" = yes; then
 
5734
            shared_flag='${wl}-G'
 
5735
          else
 
5736
            shared_flag='${wl}-bM:SRE'
 
5737
          fi
 
5738
        fi
 
5739
      fi
 
5740
 
 
5741
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
 
5742
      # It seems that -bexpall does not export symbols beginning with
 
5743
      # underscore (_), so it is better to generate a list of symbols to export.
 
5744
      _LT_TAGVAR(always_export_symbols, $1)=yes
 
5745
      if test "$aix_use_runtimelinking" = yes; then
 
5746
        # Warning - without using the other runtime loading flags (-brtl),
 
5747
        # -berok will link without error, but may produce a broken library.
 
5748
        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
 
5749
        # Determine the default libpath from the value encoded in an
 
5750
        # empty executable.
 
5751
        _LT_SYS_MODULE_PATH_AIX([$1])
 
5752
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
5753
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
5754
      else
 
5755
        if test "$host_cpu" = ia64; then
 
5756
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
5757
          _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
5758
          _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
 
5759
        else
 
5760
         # Determine the default libpath from the value encoded in an
 
5761
         # empty executable.
 
5762
         _LT_SYS_MODULE_PATH_AIX([$1])
 
5763
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
5764
          # Warning - without using the other run time loading flags,
 
5765
          # -berok will link without error, but may produce a broken library.
 
5766
          _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
5767
          _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
5768
          if test "$with_gnu_ld" = yes; then
 
5769
            # We only use this code for GNU lds that support --whole-archive.
 
5770
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
5771
          else
 
5772
            # Exported symbols can be pulled into shared objects from archives
 
5773
            _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
5774
          fi
 
5775
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
5776
          # This is similar to how AIX traditionally builds its shared libraries.
 
5777
          _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
5778
        fi
 
5779
      fi
 
5780
      ;;
 
5781
 
 
5782
    amigaos*)
 
5783
      case $host_cpu in
 
5784
      powerpc)
 
5785
            # see comment about AmigaOS4 .so support
 
5786
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5787
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
 
5788
        ;;
 
5789
      m68k)
 
5790
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
5791
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5792
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5793
        ;;
 
5794
      esac
 
5795
      ;;
 
5796
 
 
5797
    bsdi[[45]]*)
 
5798
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
5799
      ;;
 
5800
 
 
5801
    cygwin* | mingw* | pw32* | cegcc*)
 
5802
      # When not using gcc, we currently assume that we are using
 
5803
      # Microsoft Visual C++.
 
5804
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
5805
      # no search path for DLLs.
 
5806
      case $cc_basename in
 
5807
      cl*)
 
5808
        # Native MSVC
 
5809
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
5810
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5811
        _LT_TAGVAR(always_export_symbols, $1)=yes
 
5812
        _LT_TAGVAR(file_list_spec, $1)='@'
 
5813
        # Tell ltmain to make .lib files, not .a files.
 
5814
        libext=lib
 
5815
        # Tell ltmain to make .dll files, not .so files.
 
5816
        shrext_cmds=".dll"
 
5817
        # FIXME: Setting linknames here is a bad hack.
 
5818
        _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
 
5819
        _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
5820
            sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
 
5821
          else
 
5822
            sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
 
5823
          fi~
 
5824
          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
 
5825
          linknames='
 
5826
        # The linker will not automatically build a static lib if we build a DLL.
 
5827
        # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
5828
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5829
        _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 
5830
        _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
 
5831
        # Don't use ranlib
 
5832
        _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 
5833
        _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
 
5834
          lt_tool_outputfile="@TOOL_OUTPUT@"~
 
5835
          case $lt_outputfile in
 
5836
            *.exe|*.EXE) ;;
 
5837
            *)
 
5838
              lt_outputfile="$lt_outputfile.exe"
 
5839
              lt_tool_outputfile="$lt_tool_outputfile.exe"
 
5840
              ;;
 
5841
          esac~
 
5842
          if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
 
5843
            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
 
5844
            $RM "$lt_outputfile.manifest";
 
5845
          fi'
 
5846
        ;;
 
5847
      *)
 
5848
        # Assume MSVC wrapper
 
5849
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
5850
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5851
        # Tell ltmain to make .lib files, not .a files.
 
5852
        libext=lib
 
5853
        # Tell ltmain to make .dll files, not .so files.
 
5854
        shrext_cmds=".dll"
 
5855
        # FIXME: Setting linknames here is a bad hack.
 
5856
        _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
 
5857
        # The linker will automatically build a .lib file if we build a DLL.
 
5858
        _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
5859
        # FIXME: Should let the user specify the lib program.
 
5860
        _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
 
5861
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5862
        ;;
 
5863
      esac
 
5864
      ;;
 
5865
 
 
5866
    darwin* | rhapsody*)
 
5867
      _LT_DARWIN_LINKER_FEATURES($1)
 
5868
      ;;
 
5869
 
 
5870
    dgux*)
 
5871
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
5872
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5873
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5874
      ;;
 
5875
 
 
5876
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
5877
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
5878
    # does not break anything, and helps significantly (at the cost of a little
 
5879
    # extra space).
 
5880
    freebsd2.2*)
 
5881
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
5882
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5883
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5884
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5885
      ;;
 
5886
 
 
5887
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
5888
    freebsd2.*)
 
5889
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
5890
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5891
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5892
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5893
      ;;
 
5894
 
 
5895
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
5896
    freebsd* | dragonfly*)
 
5897
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
5898
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5899
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5900
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5901
      ;;
 
5902
 
 
5903
    hpux9*)
 
5904
      if test "$GCC" = yes; then
 
5905
        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
5906
      else
 
5907
        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
5908
      fi
 
5909
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5910
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
5911
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
5912
 
 
5913
      # hardcode_minus_L: Not really in the search PATH,
 
5914
      # but as the default location of the library.
 
5915
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5916
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5917
      ;;
 
5918
 
 
5919
    hpux10*)
 
5920
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
 
5921
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
5922
      else
 
5923
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
5924
      fi
 
5925
      if test "$with_gnu_ld" = no; then
 
5926
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5927
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
5928
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
5929
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
5930
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5931
        # hardcode_minus_L: Not really in the search PATH,
 
5932
        # but as the default location of the library.
 
5933
        _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5934
      fi
 
5935
      ;;
 
5936
 
 
5937
    hpux11*)
 
5938
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
 
5939
        case $host_cpu in
 
5940
        hppa*64*)
 
5941
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5942
          ;;
 
5943
        ia64*)
 
5944
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
5945
          ;;
 
5946
        *)
 
5947
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
5948
          ;;
 
5949
        esac
 
5950
      else
 
5951
        case $host_cpu in
 
5952
        hppa*64*)
 
5953
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
5954
          ;;
 
5955
        ia64*)
 
5956
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
5957
          ;;
 
5958
        *)
 
5959
        m4_if($1, [], [
 
5960
          # Older versions of the 11.00 compiler do not understand -b yet
 
5961
          # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
 
5962
          _LT_LINKER_OPTION([if $CC understands -b],
 
5963
            _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
 
5964
            [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
 
5965
            [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
 
5966
          [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
 
5967
          ;;
 
5968
        esac
 
5969
      fi
 
5970
      if test "$with_gnu_ld" = no; then
 
5971
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
5972
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
5973
 
 
5974
        case $host_cpu in
 
5975
        hppa*64*|ia64*)
 
5976
          _LT_TAGVAR(hardcode_direct, $1)=no
 
5977
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5978
          ;;
 
5979
        *)
 
5980
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
5981
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
5982
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5983
 
 
5984
          # hardcode_minus_L: Not really in the search PATH,
 
5985
          # but as the default location of the library.
 
5986
          _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
5987
          ;;
 
5988
        esac
 
5989
      fi
 
5990
      ;;
 
5991
 
 
5992
    irix5* | irix6* | nonstopux*)
 
5993
      if test "$GCC" = yes; then
 
5994
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5995
        # Try to use the -exported_symbol ld option, if it does not
 
5996
        # work, assume that -exports_file does not work either and
 
5997
        # implicitly export all symbols.
 
5998
        # This should be the same for all languages, so no per-tag cache variable.
 
5999
        AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
 
6000
          [lt_cv_irix_exported_symbol],
 
6001
          [save_LDFLAGS="$LDFLAGS"
 
6002
           LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
 
6003
           AC_LINK_IFELSE(
 
6004
             [AC_LANG_SOURCE(
 
6005
                [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
 
6006
                              [C++], [[int foo (void) { return 0; }]],
 
6007
                              [Fortran 77], [[
 
6008
      subroutine foo
 
6009
      end]],
 
6010
                              [Fortran], [[
 
6011
      subroutine foo
 
6012
      end]])])],
 
6013
              [lt_cv_irix_exported_symbol=yes],
 
6014
              [lt_cv_irix_exported_symbol=no])
 
6015
           LDFLAGS="$save_LDFLAGS"])
 
6016
        if test "$lt_cv_irix_exported_symbol" = yes; then
 
6017
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
6018
        fi
 
6019
      else
 
6020
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
6021
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
 
6022
      fi
 
6023
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
6024
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6025
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6026
      _LT_TAGVAR(inherit_rpath, $1)=yes
 
6027
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6028
      ;;
 
6029
 
 
6030
    netbsd* | netbsdelf*-gnu)
 
6031
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
6032
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
6033
      else
 
6034
        _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
6035
      fi
 
6036
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6037
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6038
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6039
      ;;
 
6040
 
 
6041
    newsos6)
 
6042
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6043
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6044
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6045
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6046
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6047
      ;;
 
6048
 
 
6049
    *nto* | *qnx*)
 
6050
      ;;
 
6051
 
 
6052
    openbsd*)
 
6053
      if test -f /usr/libexec/ld.so; then
 
6054
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
6055
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6056
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6057
        if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
6058
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6059
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 
6060
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6061
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6062
        else
 
6063
          case $host_os in
 
6064
           openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
6065
             _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6066
             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6067
             ;;
 
6068
           *)
 
6069
             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6070
             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6071
             ;;
 
6072
          esac
 
6073
        fi
 
6074
      else
 
6075
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6076
      fi
 
6077
      ;;
 
6078
 
 
6079
    os2*)
 
6080
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6081
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6082
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6083
      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 
6084
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
6085
      ;;
 
6086
 
 
6087
    osf3*)
 
6088
      if test "$GCC" = yes; then
 
6089
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6090
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6091
      else
 
6092
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6093
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
6094
      fi
 
6095
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
6096
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6097
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6098
      ;;
 
6099
 
 
6100
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
6101
      if test "$GCC" = yes; then
 
6102
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6103
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
6104
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6105
      else
 
6106
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6107
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
6108
        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
 
6109
        $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
6110
 
 
6111
        # Both c and cxx compiler support -rpath directly
 
6112
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
6113
      fi
 
6114
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
 
6115
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6116
      ;;
 
6117
 
 
6118
    solaris*)
 
6119
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
 
6120
      if test "$GCC" = yes; then
 
6121
        wlarc='${wl}'
 
6122
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6123
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6124
          $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 
6125
      else
 
6126
        case `$CC -V 2>&1` in
 
6127
        *"Compilers 5.0"*)
 
6128
          wlarc=''
 
6129
          _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6130
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6131
          $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 
6132
          ;;
 
6133
        *)
 
6134
          wlarc='${wl}'
 
6135
          _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
6136
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
6137
          $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 
6138
          ;;
 
6139
        esac
 
6140
      fi
 
6141
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6142
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6143
      case $host_os in
 
6144
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
6145
      *)
 
6146
        # The compiler driver will combine and reorder linker options,
 
6147
        # but understands `-z linker_flag'.  GCC discards it without `$wl',
 
6148
        # but is careful enough not to reorder.
 
6149
        # Supported since Solaris 2.6 (maybe 2.5.1?)
 
6150
        if test "$GCC" = yes; then
 
6151
          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
6152
        else
 
6153
          _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 
6154
        fi
 
6155
        ;;
 
6156
      esac
 
6157
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6158
      ;;
 
6159
 
 
6160
    sunos4*)
 
6161
      if test "x$host_vendor" = xsequent; then
 
6162
        # Use $CC to link under sequent, because it throws in some extra .o
 
6163
        # files that make .init and .fini sections work.
 
6164
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
6165
      else
 
6166
        _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
6167
      fi
 
6168
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6169
      _LT_TAGVAR(hardcode_direct, $1)=yes
 
6170
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6171
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6172
      ;;
 
6173
 
 
6174
    sysv4)
 
6175
      case $host_vendor in
 
6176
        sni)
 
6177
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6178
          _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
6179
        ;;
 
6180
        siemens)
 
6181
          ## LD is ld it makes a PLAMLIB
 
6182
          ## CC just makes a GrossModule.
 
6183
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
6184
          _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
6185
          _LT_TAGVAR(hardcode_direct, $1)=no
 
6186
        ;;
 
6187
        motorola)
 
6188
          _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6189
          _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
6190
        ;;
 
6191
      esac
 
6192
      runpath_var='LD_RUN_PATH'
 
6193
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6194
      ;;
 
6195
 
 
6196
    sysv4.3*)
 
6197
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6198
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6199
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
6200
      ;;
 
6201
 
 
6202
    sysv4*MP*)
 
6203
      if test -d /usr/nec; then
 
6204
        _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6205
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6206
        runpath_var=LD_RUN_PATH
 
6207
        hardcode_runpath_var=yes
 
6208
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
6209
      fi
 
6210
      ;;
 
6211
 
 
6212
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
6213
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
6214
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
6215
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6216
      runpath_var='LD_RUN_PATH'
 
6217
 
 
6218
      if test "$GCC" = yes; then
 
6219
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6220
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6221
      else
 
6222
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6223
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6224
      fi
 
6225
      ;;
 
6226
 
 
6227
    sysv5* | sco3.2v5* | sco5v6*)
 
6228
      # Note: We can NOT use -z defs as we might desire, because we do not
 
6229
      # link with -lc, and that would cause any symbols used from libc to
 
6230
      # always be unresolved, which means just about no library would
 
6231
      # ever link correctly.  If we're not using GNU ld we use -z text
 
6232
      # though, which does catch some bad symbols but isn't as heavy-handed
 
6233
      # as -z defs.
 
6234
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
6235
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
6236
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
6237
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6238
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
 
6239
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
6240
      _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6241
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
6242
      runpath_var='LD_RUN_PATH'
 
6243
 
 
6244
      if test "$GCC" = yes; then
 
6245
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6246
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6247
      else
 
6248
        _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6249
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6250
      fi
 
6251
      ;;
 
6252
 
 
6253
    uts4*)
 
6254
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6255
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6256
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6257
      ;;
 
6258
 
 
6259
    *)
 
6260
      _LT_TAGVAR(ld_shlibs, $1)=no
 
6261
      ;;
 
6262
    esac
 
6263
 
 
6264
    if test x$host_vendor = xsni; then
 
6265
      case $host in
 
6266
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
6267
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
 
6268
        ;;
 
6269
      esac
 
6270
    fi
 
6271
  fi
 
6272
])
 
6273
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
 
6274
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
6275
 
 
6276
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
 
6277
 
 
6278
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
 
6279
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
 
6280
_LT_DECL([], [extract_expsyms_cmds], [2],
 
6281
    [The commands to extract the exported symbol list from a shared archive])
 
6282
 
 
6283
#
 
6284
# Do we need to explicitly link libc?
 
6285
#
 
6286
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
 
6287
x|xyes)
 
6288
  # Assume -lc should be added
 
6289
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6290
 
 
6291
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
6292
    case $_LT_TAGVAR(archive_cmds, $1) in
 
6293
    *'~'*)
 
6294
      # FIXME: we may have to deal with multi-command sequences.
 
6295
      ;;
 
6296
    '$CC '*)
 
6297
      # Test whether the compiler implicitly links with -lc since on some
 
6298
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
6299
      # to ld, don't add -lc before -lgcc.
 
6300
      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
 
6301
        [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
 
6302
        [$RM conftest*
 
6303
        echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6304
 
 
6305
        if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
6306
          soname=conftest
 
6307
          lib=conftest
 
6308
          libobjs=conftest.$ac_objext
 
6309
          deplibs=
 
6310
          wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
 
6311
          pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
 
6312
          compiler_flags=-v
 
6313
          linker_flags=-v
 
6314
          verstring=
 
6315
          output_objdir=.
 
6316
          libname=conftest
 
6317
          lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
 
6318
          _LT_TAGVAR(allow_undefined_flag, $1)=
 
6319
          if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
 
6320
          then
 
6321
            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
6322
          else
 
6323
            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6324
          fi
 
6325
          _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
6326
        else
 
6327
          cat conftest.err 1>&5
 
6328
        fi
 
6329
        $RM conftest*
 
6330
        ])
 
6331
      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
 
6332
      ;;
 
6333
    esac
 
6334
  fi
 
6335
  ;;
 
6336
esac
 
6337
 
 
6338
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
 
6339
    [Whether or not to add -lc for building shared libraries])
 
6340
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
 
6341
    [enable_shared_with_static_runtimes], [0],
 
6342
    [Whether or not to disallow shared libs when runtime libs are static])
 
6343
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
 
6344
    [Compiler flag to allow reflexive dlopens])
 
6345
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
 
6346
    [Compiler flag to generate shared objects directly from archives])
 
6347
_LT_TAGDECL([], [compiler_needs_object], [1],
 
6348
    [Whether the compiler copes with passing no objects directly])
 
6349
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
 
6350
    [Create an old-style archive from a shared archive])
 
6351
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
 
6352
    [Create a temporary old-style archive to link instead of a shared archive])
 
6353
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
 
6354
_LT_TAGDECL([], [archive_expsym_cmds], [2])
 
6355
_LT_TAGDECL([], [module_cmds], [2],
 
6356
    [Commands used to build a loadable module if different from building
 
6357
    a shared archive.])
 
6358
_LT_TAGDECL([], [module_expsym_cmds], [2])
 
6359
_LT_TAGDECL([], [with_gnu_ld], [1],
 
6360
    [Whether we are building with GNU ld or not])
 
6361
_LT_TAGDECL([], [allow_undefined_flag], [1],
 
6362
    [Flag that allows shared libraries with undefined symbols to be built])
 
6363
_LT_TAGDECL([], [no_undefined_flag], [1],
 
6364
    [Flag that enforces no undefined symbols])
 
6365
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
 
6366
    [Flag to hardcode $libdir into a binary during linking.
 
6367
    This must work even if $libdir does not exist])
 
6368
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
 
6369
    [Whether we need a single "-rpath" flag with a separated argument])
 
6370
_LT_TAGDECL([], [hardcode_direct], [0],
 
6371
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
 
6372
    DIR into the resulting binary])
 
6373
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
 
6374
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
 
6375
    DIR into the resulting binary and the resulting library dependency is
 
6376
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
 
6377
    library is relocated])
 
6378
_LT_TAGDECL([], [hardcode_minus_L], [0],
 
6379
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
 
6380
    into the resulting binary])
 
6381
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
 
6382
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
 
6383
    into the resulting binary])
 
6384
_LT_TAGDECL([], [hardcode_automatic], [0],
 
6385
    [Set to "yes" if building a shared library automatically hardcodes DIR
 
6386
    into the library and all subsequent libraries and executables linked
 
6387
    against it])
 
6388
_LT_TAGDECL([], [inherit_rpath], [0],
 
6389
    [Set to yes if linker adds runtime paths of dependent libraries
 
6390
    to runtime path list])
 
6391
_LT_TAGDECL([], [link_all_deplibs], [0],
 
6392
    [Whether libtool must link a program against all its dependency libraries])
 
6393
_LT_TAGDECL([], [always_export_symbols], [0],
 
6394
    [Set to "yes" if exported symbols are required])
 
6395
_LT_TAGDECL([], [export_symbols_cmds], [2],
 
6396
    [The commands to list exported symbols])
 
6397
_LT_TAGDECL([], [exclude_expsyms], [1],
 
6398
    [Symbols that should not be listed in the preloaded symbols])
 
6399
_LT_TAGDECL([], [include_expsyms], [1],
 
6400
    [Symbols that must always be exported])
 
6401
_LT_TAGDECL([], [prelink_cmds], [2],
 
6402
    [Commands necessary for linking programs (against libraries) with templates])
 
6403
_LT_TAGDECL([], [postlink_cmds], [2],
 
6404
    [Commands necessary for finishing linking programs])
 
6405
_LT_TAGDECL([], [file_list_spec], [1],
 
6406
    [Specify filename containing input files])
 
6407
dnl FIXME: Not yet implemented
 
6408
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
 
6409
dnl    [Compiler flag to generate thread safe objects])
 
6410
])# _LT_LINKER_SHLIBS
 
6411
 
 
6412
 
 
6413
# _LT_LANG_C_CONFIG([TAG])
 
6414
# ------------------------
 
6415
# Ensure that the configuration variables for a C compiler are suitably
 
6416
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
6417
# the compiler configuration to `libtool'.
 
6418
m4_defun([_LT_LANG_C_CONFIG],
 
6419
[m4_require([_LT_DECL_EGREP])dnl
 
6420
lt_save_CC="$CC"
 
6421
AC_LANG_PUSH(C)
 
6422
 
 
6423
# Source file extension for C test sources.
 
6424
ac_ext=c
 
6425
 
 
6426
# Object file extension for compiled C test sources.
 
6427
objext=o
 
6428
_LT_TAGVAR(objext, $1)=$objext
 
6429
 
 
6430
# Code to be used in simple compile tests
 
6431
lt_simple_compile_test_code="int some_variable = 0;"
 
6432
 
 
6433
# Code to be used in simple link tests
 
6434
lt_simple_link_test_code='int main(){return(0);}'
 
6435
 
 
6436
_LT_TAG_COMPILER
 
6437
# Save the default compiler, since it gets overwritten when the other
 
6438
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
 
6439
compiler_DEFAULT=$CC
 
6440
 
 
6441
# save warnings/boilerplate of simple test code
 
6442
_LT_COMPILER_BOILERPLATE
 
6443
_LT_LINKER_BOILERPLATE
 
6444
 
 
6445
if test -n "$compiler"; then
 
6446
  _LT_COMPILER_NO_RTTI($1)
 
6447
  _LT_COMPILER_PIC($1)
 
6448
  _LT_COMPILER_C_O($1)
 
6449
  _LT_COMPILER_FILE_LOCKS($1)
 
6450
  _LT_LINKER_SHLIBS($1)
 
6451
  _LT_SYS_DYNAMIC_LINKER($1)
 
6452
  _LT_LINKER_HARDCODE_LIBPATH($1)
 
6453
  LT_SYS_DLOPEN_SELF
 
6454
  _LT_CMD_STRIPLIB
 
6455
 
 
6456
  # Report which library types will actually be built
 
6457
  AC_MSG_CHECKING([if libtool supports shared libraries])
 
6458
  AC_MSG_RESULT([$can_build_shared])
 
6459
 
 
6460
  AC_MSG_CHECKING([whether to build shared libraries])
 
6461
  test "$can_build_shared" = "no" && enable_shared=no
 
6462
 
 
6463
  # On AIX, shared libraries and static libraries use the same namespace, and
 
6464
  # are all built from PIC.
 
6465
  case $host_os in
 
6466
  aix3*)
 
6467
    test "$enable_shared" = yes && enable_static=no
 
6468
    if test -n "$RANLIB"; then
 
6469
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
6470
      postinstall_cmds='$RANLIB $lib'
 
6471
    fi
 
6472
    ;;
 
6473
 
 
6474
  aix[[4-9]]*)
 
6475
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
6476
      test "$enable_shared" = yes && enable_static=no
 
6477
    fi
 
6478
    ;;
 
6479
  esac
 
6480
  AC_MSG_RESULT([$enable_shared])
 
6481
 
 
6482
  AC_MSG_CHECKING([whether to build static libraries])
 
6483
  # Make sure either enable_shared or enable_static is yes.
 
6484
  test "$enable_shared" = yes || enable_static=yes
 
6485
  AC_MSG_RESULT([$enable_static])
 
6486
 
 
6487
  _LT_CONFIG($1)
 
6488
fi
 
6489
AC_LANG_POP
 
6490
CC="$lt_save_CC"
 
6491
])# _LT_LANG_C_CONFIG
 
6492
 
 
6493
 
 
6494
# _LT_LANG_CXX_CONFIG([TAG])
 
6495
# --------------------------
 
6496
# Ensure that the configuration variables for a C++ compiler are suitably
 
6497
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
6498
# the compiler configuration to `libtool'.
 
6499
m4_defun([_LT_LANG_CXX_CONFIG],
 
6500
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
6501
m4_require([_LT_DECL_EGREP])dnl
 
6502
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
 
6503
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
6504
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
6505
    (test "X$CXX" != "Xg++"))) ; then
 
6506
  AC_PROG_CXXCPP
 
6507
else
 
6508
  _lt_caught_CXX_error=yes
 
6509
fi
 
6510
 
 
6511
AC_LANG_PUSH(C++)
 
6512
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
6513
_LT_TAGVAR(allow_undefined_flag, $1)=
 
6514
_LT_TAGVAR(always_export_symbols, $1)=no
 
6515
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
6516
_LT_TAGVAR(compiler_needs_object, $1)=no
 
6517
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
6518
_LT_TAGVAR(hardcode_direct, $1)=no
 
6519
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
6520
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
6521
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
6522
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
6523
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
6524
_LT_TAGVAR(hardcode_automatic, $1)=no
 
6525
_LT_TAGVAR(inherit_rpath, $1)=no
 
6526
_LT_TAGVAR(module_cmds, $1)=
 
6527
_LT_TAGVAR(module_expsym_cmds, $1)=
 
6528
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
6529
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
6530
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
6531
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
6532
_LT_TAGVAR(no_undefined_flag, $1)=
 
6533
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6534
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
6535
 
 
6536
# Source file extension for C++ test sources.
 
6537
ac_ext=cpp
 
6538
 
 
6539
# Object file extension for compiled C++ test sources.
 
6540
objext=o
 
6541
_LT_TAGVAR(objext, $1)=$objext
 
6542
 
 
6543
# No sense in running all these tests if we already determined that
 
6544
# the CXX compiler isn't working.  Some variables (like enable_shared)
 
6545
# are currently assumed to apply to all compilers on this platform,
 
6546
# and will be corrupted by setting them based on a non-working compiler.
 
6547
if test "$_lt_caught_CXX_error" != yes; then
 
6548
  # Code to be used in simple compile tests
 
6549
  lt_simple_compile_test_code="int some_variable = 0;"
 
6550
 
 
6551
  # Code to be used in simple link tests
 
6552
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
 
6553
 
 
6554
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
6555
  _LT_TAG_COMPILER
 
6556
 
 
6557
  # save warnings/boilerplate of simple test code
 
6558
  _LT_COMPILER_BOILERPLATE
 
6559
  _LT_LINKER_BOILERPLATE
 
6560
 
 
6561
  # Allow CC to be a program name with arguments.
 
6562
  lt_save_CC=$CC
 
6563
  lt_save_CFLAGS=$CFLAGS
 
6564
  lt_save_LD=$LD
 
6565
  lt_save_GCC=$GCC
 
6566
  GCC=$GXX
 
6567
  lt_save_with_gnu_ld=$with_gnu_ld
 
6568
  lt_save_path_LD=$lt_cv_path_LD
 
6569
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
6570
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
6571
  else
 
6572
    $as_unset lt_cv_prog_gnu_ld
 
6573
  fi
 
6574
  if test -n "${lt_cv_path_LDCXX+set}"; then
 
6575
    lt_cv_path_LD=$lt_cv_path_LDCXX
 
6576
  else
 
6577
    $as_unset lt_cv_path_LD
 
6578
  fi
 
6579
  test -z "${LDCXX+set}" || LD=$LDCXX
 
6580
  CC=${CXX-"c++"}
 
6581
  CFLAGS=$CXXFLAGS
 
6582
  compiler=$CC
 
6583
  _LT_TAGVAR(compiler, $1)=$CC
 
6584
  _LT_CC_BASENAME([$compiler])
 
6585
 
 
6586
  if test -n "$compiler"; then
 
6587
    # We don't want -fno-exception when compiling C++ code, so set the
 
6588
    # no_builtin_flag separately
 
6589
    if test "$GXX" = yes; then
 
6590
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
6591
    else
 
6592
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
6593
    fi
 
6594
 
 
6595
    if test "$GXX" = yes; then
 
6596
      # Set up default GNU C++ configuration
 
6597
 
 
6598
      LT_PATH_LD
 
6599
 
 
6600
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
6601
      # archiving commands below assume that GNU ld is being used.
 
6602
      if test "$with_gnu_ld" = yes; then
 
6603
        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6604
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
6605
 
 
6606
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6607
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
6608
 
 
6609
        # If archive_cmds runs LD, not CC, wlarc should be empty
 
6610
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
6611
        #     investigate it a little bit more. (MM)
 
6612
        wlarc='${wl}'
 
6613
 
 
6614
        # ancient GNU ld didn't support --whole-archive et. al.
 
6615
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
 
6616
          $GREP 'no-whole-archive' > /dev/null; then
 
6617
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
6618
        else
 
6619
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
 
6620
        fi
 
6621
      else
 
6622
        with_gnu_ld=no
 
6623
        wlarc=
 
6624
 
 
6625
        # A generic and very simple default shared library creation
 
6626
        # command for GNU C++ for the case where it uses the native
 
6627
        # linker, instead of GNU ld.  If possible, this setting should
 
6628
        # overridden to take advantage of the native linker features on
 
6629
        # the platform it is being used on.
 
6630
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
6631
      fi
 
6632
 
 
6633
      # Commands to make compiler produce verbose output that lists
 
6634
      # what "hidden" libraries, object files and flags are used when
 
6635
      # linking a shared library.
 
6636
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
6637
 
 
6638
    else
 
6639
      GXX=no
 
6640
      with_gnu_ld=no
 
6641
      wlarc=
 
6642
    fi
 
6643
 
 
6644
    # PORTME: fill in a description of your system's C++ link characteristics
 
6645
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
6646
    _LT_TAGVAR(ld_shlibs, $1)=yes
 
6647
    case $host_os in
 
6648
      aix3*)
 
6649
        # FIXME: insert proper C++ library support
 
6650
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6651
        ;;
 
6652
      aix[[4-9]]*)
 
6653
        if test "$host_cpu" = ia64; then
 
6654
          # On IA64, the linker does run time linking by default, so we don't
 
6655
          # have to do anything special.
 
6656
          aix_use_runtimelinking=no
 
6657
          exp_sym_flag='-Bexport'
 
6658
          no_entry_flag=""
 
6659
        else
 
6660
          aix_use_runtimelinking=no
 
6661
 
 
6662
          # Test if we are trying to use run time linking or normal
 
6663
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
6664
          # need to do runtime linking.
 
6665
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 
6666
            for ld_flag in $LDFLAGS; do
 
6667
              case $ld_flag in
 
6668
              *-brtl*)
 
6669
                aix_use_runtimelinking=yes
 
6670
                break
 
6671
                ;;
 
6672
              esac
 
6673
            done
 
6674
            ;;
 
6675
          esac
 
6676
 
 
6677
          exp_sym_flag='-bexport'
 
6678
          no_entry_flag='-bnoentry'
 
6679
        fi
 
6680
 
 
6681
        # When large executables or shared objects are built, AIX ld can
 
6682
        # have problems creating the table of contents.  If linking a library
 
6683
        # or program results in "error TOC overflow" add -mminimal-toc to
 
6684
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
6685
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
6686
 
 
6687
        _LT_TAGVAR(archive_cmds, $1)=''
 
6688
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
6689
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6690
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
6691
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6692
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
6693
 
 
6694
        if test "$GXX" = yes; then
 
6695
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
6696
          # We only want to do this on AIX 4.2 and lower, the check
 
6697
          # below for broken collect2 doesn't work under 4.3+
 
6698
          collect2name=`${CC} -print-prog-name=collect2`
 
6699
          if test -f "$collect2name" &&
 
6700
             strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 
6701
          then
 
6702
            # We have reworked collect2
 
6703
            :
 
6704
          else
 
6705
            # We have old collect2
 
6706
            _LT_TAGVAR(hardcode_direct, $1)=unsupported
 
6707
            # It fails to find uninstalled libraries when the uninstalled
 
6708
            # path is not listed in the libpath.  Setting hardcode_minus_L
 
6709
            # to unsupported forces relinking
 
6710
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
 
6711
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6712
            _LT_TAGVAR(hardcode_libdir_separator, $1)=
 
6713
          fi
 
6714
          esac
 
6715
          shared_flag='-shared'
 
6716
          if test "$aix_use_runtimelinking" = yes; then
 
6717
            shared_flag="$shared_flag "'${wl}-G'
 
6718
          fi
 
6719
        else
 
6720
          # not using gcc
 
6721
          if test "$host_cpu" = ia64; then
 
6722
          # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
6723
          # chokes on -Wl,-G. The following line is correct:
 
6724
          shared_flag='-G'
 
6725
          else
 
6726
            if test "$aix_use_runtimelinking" = yes; then
 
6727
              shared_flag='${wl}-G'
 
6728
            else
 
6729
              shared_flag='${wl}-bM:SRE'
 
6730
            fi
 
6731
          fi
 
6732
        fi
 
6733
 
 
6734
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
 
6735
        # It seems that -bexpall does not export symbols beginning with
 
6736
        # underscore (_), so it is better to generate a list of symbols to
 
6737
        # export.
 
6738
        _LT_TAGVAR(always_export_symbols, $1)=yes
 
6739
        if test "$aix_use_runtimelinking" = yes; then
 
6740
          # Warning - without using the other runtime loading flags (-brtl),
 
6741
          # -berok will link without error, but may produce a broken library.
 
6742
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
 
6743
          # Determine the default libpath from the value encoded in an empty
 
6744
          # executable.
 
6745
          _LT_SYS_MODULE_PATH_AIX([$1])
 
6746
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
6747
 
 
6748
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
6749
        else
 
6750
          if test "$host_cpu" = ia64; then
 
6751
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
6752
            _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
6753
            _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
 
6754
          else
 
6755
            # Determine the default libpath from the value encoded in an
 
6756
            # empty executable.
 
6757
            _LT_SYS_MODULE_PATH_AIX([$1])
 
6758
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
6759
            # Warning - without using the other run time loading flags,
 
6760
            # -berok will link without error, but may produce a broken library.
 
6761
            _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
6762
            _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
6763
            if test "$with_gnu_ld" = yes; then
 
6764
              # We only use this code for GNU lds that support --whole-archive.
 
6765
              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
6766
            else
 
6767
              # Exported symbols can be pulled into shared objects from archives
 
6768
              _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
6769
            fi
 
6770
            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6771
            # This is similar to how AIX traditionally builds its shared
 
6772
            # libraries.
 
6773
            _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
6774
          fi
 
6775
        fi
 
6776
        ;;
 
6777
 
 
6778
      beos*)
 
6779
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
6780
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6781
          # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
6782
          # support --undefined.  This deserves some investigation.  FIXME
 
6783
          _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6784
        else
 
6785
          _LT_TAGVAR(ld_shlibs, $1)=no
 
6786
        fi
 
6787
        ;;
 
6788
 
 
6789
      chorus*)
 
6790
        case $cc_basename in
 
6791
          *)
 
6792
          # FIXME: insert proper C++ library support
 
6793
          _LT_TAGVAR(ld_shlibs, $1)=no
 
6794
          ;;
 
6795
        esac
 
6796
        ;;
 
6797
 
 
6798
      cygwin* | mingw* | pw32* | cegcc*)
 
6799
        case $GXX,$cc_basename in
 
6800
        ,cl* | no,cl*)
 
6801
          # Native MSVC
 
6802
          # hardcode_libdir_flag_spec is actually meaningless, as there is
 
6803
          # no search path for DLLs.
 
6804
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
6805
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6806
          _LT_TAGVAR(always_export_symbols, $1)=yes
 
6807
          _LT_TAGVAR(file_list_spec, $1)='@'
 
6808
          # Tell ltmain to make .lib files, not .a files.
 
6809
          libext=lib
 
6810
          # Tell ltmain to make .dll files, not .so files.
 
6811
          shrext_cmds=".dll"
 
6812
          # FIXME: Setting linknames here is a bad hack.
 
6813
          _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
 
6814
          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
6815
              $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
 
6816
            else
 
6817
              $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
 
6818
            fi~
 
6819
            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
 
6820
            linknames='
 
6821
          # The linker will not automatically build a static lib if we build a DLL.
 
6822
          # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
6823
          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6824
          # Don't use ranlib
 
6825
          _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 
6826
          _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
 
6827
            lt_tool_outputfile="@TOOL_OUTPUT@"~
 
6828
            case $lt_outputfile in
 
6829
              *.exe|*.EXE) ;;
 
6830
              *)
 
6831
                lt_outputfile="$lt_outputfile.exe"
 
6832
                lt_tool_outputfile="$lt_tool_outputfile.exe"
 
6833
                ;;
 
6834
            esac~
 
6835
            func_to_tool_file "$lt_outputfile"~
 
6836
            if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
 
6837
              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
 
6838
              $RM "$lt_outputfile.manifest";
 
6839
            fi'
 
6840
          ;;
 
6841
        *)
 
6842
          # g++
 
6843
          # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
6844
          # as there is no search path for DLLs.
 
6845
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6846
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
 
6847
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6848
          _LT_TAGVAR(always_export_symbols, $1)=no
 
6849
          _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6850
 
 
6851
          if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
6852
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
6853
            # If the export-symbols file already is a .def file (1st line
 
6854
            # is EXPORTS), use it as is; otherwise, prepend...
 
6855
            _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
6856
              cp $export_symbols $output_objdir/$soname.def;
 
6857
            else
 
6858
              echo EXPORTS > $output_objdir/$soname.def;
 
6859
              cat $export_symbols >> $output_objdir/$soname.def;
 
6860
            fi~
 
6861
            $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'
 
6862
          else
 
6863
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6864
          fi
 
6865
          ;;
 
6866
        esac
 
6867
        ;;
 
6868
      darwin* | rhapsody*)
 
6869
        _LT_DARWIN_LINKER_FEATURES($1)
 
6870
        ;;
 
6871
 
 
6872
      dgux*)
 
6873
        case $cc_basename in
 
6874
          ec++*)
 
6875
            # FIXME: insert proper C++ library support
 
6876
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6877
            ;;
 
6878
          ghcx*)
 
6879
            # Green Hills C++ Compiler
 
6880
            # FIXME: insert proper C++ library support
 
6881
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6882
            ;;
 
6883
          *)
 
6884
            # FIXME: insert proper C++ library support
 
6885
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6886
            ;;
 
6887
        esac
 
6888
        ;;
 
6889
 
 
6890
      freebsd2.*)
 
6891
        # C++ shared libraries reported to be fairly broken before
 
6892
        # switch to ELF
 
6893
        _LT_TAGVAR(ld_shlibs, $1)=no
 
6894
        ;;
 
6895
 
 
6896
      freebsd-elf*)
 
6897
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
6898
        ;;
 
6899
 
 
6900
      freebsd* | dragonfly*)
 
6901
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
6902
        # conventions
 
6903
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
6904
        ;;
 
6905
 
 
6906
      gnu*)
 
6907
        ;;
 
6908
 
 
6909
      haiku*)
 
6910
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6911
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
6912
        ;;
 
6913
 
 
6914
      hpux9*)
 
6915
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6916
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6917
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6918
        _LT_TAGVAR(hardcode_direct, $1)=yes
 
6919
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
6920
                                             # but as the default
 
6921
                                             # location of the library.
 
6922
 
 
6923
        case $cc_basename in
 
6924
          CC*)
 
6925
            # FIXME: insert proper C++ library support
 
6926
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6927
            ;;
 
6928
          aCC*)
 
6929
            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
6930
            # Commands to make compiler produce verbose output that lists
 
6931
            # what "hidden" libraries, object files and flags are used when
 
6932
            # linking a shared library.
 
6933
            #
 
6934
            # There doesn't appear to be a way to prevent this compiler from
 
6935
            # explicitly linking system object files so we need to strip them
 
6936
            # from the output so that they don't get included in the library
 
6937
            # dependencies.
 
6938
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
6939
            ;;
 
6940
          *)
 
6941
            if test "$GXX" = yes; then
 
6942
              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
 
6943
            else
 
6944
              # FIXME: insert proper C++ library support
 
6945
              _LT_TAGVAR(ld_shlibs, $1)=no
 
6946
            fi
 
6947
            ;;
 
6948
        esac
 
6949
        ;;
 
6950
 
 
6951
      hpux10*|hpux11*)
 
6952
        if test $with_gnu_ld = no; then
 
6953
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6954
          _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
6955
 
 
6956
          case $host_cpu in
 
6957
            hppa*64*|ia64*)
 
6958
              ;;
 
6959
            *)
 
6960
              _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6961
              ;;
 
6962
          esac
 
6963
        fi
 
6964
        case $host_cpu in
 
6965
          hppa*64*|ia64*)
 
6966
            _LT_TAGVAR(hardcode_direct, $1)=no
 
6967
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6968
            ;;
 
6969
          *)
 
6970
            _LT_TAGVAR(hardcode_direct, $1)=yes
 
6971
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
6972
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
6973
                                                 # but as the default
 
6974
                                                 # location of the library.
 
6975
            ;;
 
6976
        esac
 
6977
 
 
6978
        case $cc_basename in
 
6979
          CC*)
 
6980
            # FIXME: insert proper C++ library support
 
6981
            _LT_TAGVAR(ld_shlibs, $1)=no
 
6982
            ;;
 
6983
          aCC*)
 
6984
            case $host_cpu in
 
6985
              hppa*64*)
 
6986
                _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
6987
                ;;
 
6988
              ia64*)
 
6989
                _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
6990
                ;;
 
6991
              *)
 
6992
                _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
6993
                ;;
 
6994
            esac
 
6995
            # Commands to make compiler produce verbose output that lists
 
6996
            # what "hidden" libraries, object files and flags are used when
 
6997
            # linking a shared library.
 
6998
            #
 
6999
            # There doesn't appear to be a way to prevent this compiler from
 
7000
            # explicitly linking system object files so we need to strip them
 
7001
            # from the output so that they don't get included in the library
 
7002
            # dependencies.
 
7003
            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; func_echo_all "$list"'
 
7004
            ;;
 
7005
          *)
 
7006
            if test "$GXX" = yes; then
 
7007
              if test $with_gnu_ld = no; then
 
7008
                case $host_cpu in
 
7009
                  hppa*64*)
 
7010
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7011
                    ;;
 
7012
                  ia64*)
 
7013
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7014
                    ;;
 
7015
                  *)
 
7016
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7017
                    ;;
 
7018
                esac
 
7019
              fi
 
7020
            else
 
7021
              # FIXME: insert proper C++ library support
 
7022
              _LT_TAGVAR(ld_shlibs, $1)=no
 
7023
            fi
 
7024
            ;;
 
7025
        esac
 
7026
        ;;
 
7027
 
 
7028
      interix[[3-9]]*)
 
7029
        _LT_TAGVAR(hardcode_direct, $1)=no
 
7030
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7031
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7032
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7033
        # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
7034
        # Instead, shared libraries are loaded at an image base (0x10000000 by
 
7035
        # default) and relocated if they conflict, which is a slow very memory
 
7036
        # consuming and fragmenting process.  To avoid this, we pick a random,
 
7037
        # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
7038
        # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
7039
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
7040
        _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
7041
        ;;
 
7042
      irix5* | irix6*)
 
7043
        case $cc_basename in
 
7044
          CC*)
 
7045
            # SGI C++
 
7046
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
7047
 
 
7048
            # Archives containing C++ object files must be created using
 
7049
            # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
7050
            # necessary to make sure instantiated templates are included
 
7051
            # in the archive.
 
7052
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
7053
            ;;
 
7054
          *)
 
7055
            if test "$GXX" = yes; then
 
7056
              if test "$with_gnu_ld" = no; then
 
7057
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
7058
              else
 
7059
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
 
7060
              fi
 
7061
            fi
 
7062
            _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7063
            ;;
 
7064
        esac
 
7065
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7066
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7067
        _LT_TAGVAR(inherit_rpath, $1)=yes
 
7068
        ;;
 
7069
 
 
7070
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
7071
        case $cc_basename in
 
7072
          KCC*)
 
7073
            # Kuck and Associates, Inc. (KAI) C++ Compiler
 
7074
 
 
7075
            # KCC will only create a shared library if the output file
 
7076
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
7077
            # to its proper name (with version) after linking.
 
7078
            _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
7079
            _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 
7080
            # Commands to make compiler produce verbose output that lists
 
7081
            # what "hidden" libraries, object files and flags are used when
 
7082
            # linking a shared library.
 
7083
            #
 
7084
            # There doesn't appear to be a way to prevent this compiler from
 
7085
            # explicitly linking system object files so we need to strip them
 
7086
            # from the output so that they don't get included in the library
 
7087
            # dependencies.
 
7088
            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; func_echo_all "$list"'
 
7089
 
 
7090
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7091
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7092
 
 
7093
            # Archives containing C++ object files must be created using
 
7094
            # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
7095
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
7096
            ;;
 
7097
          icpc* | ecpc* )
 
7098
            # Intel C++
 
7099
            with_gnu_ld=yes
 
7100
            # version 8.0 and above of icpc choke on multiply defined symbols
 
7101
            # if we add $predep_objects and $postdep_objects, however 7.1 and
 
7102
            # earlier do not add the objects themselves.
 
7103
            case `$CC -V 2>&1` in
 
7104
              *"Version 7."*)
 
7105
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7106
                _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
7107
                ;;
 
7108
              *)  # Version 8.0 or newer
 
7109
                tmp_idyn=
 
7110
                case $host_cpu in
 
7111
                  ia64*) tmp_idyn=' -i_dynamic';;
 
7112
                esac
 
7113
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7114
                _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
7115
                ;;
 
7116
            esac
 
7117
            _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7118
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7119
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7120
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
7121
            ;;
 
7122
          pgCC* | pgcpp*)
 
7123
            # Portland Group C++ compiler
 
7124
            case `$CC -V` in
 
7125
            *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
 
7126
              _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
 
7127
                rm -rf $tpldir~
 
7128
                $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
 
7129
                compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
 
7130
              _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
 
7131
                rm -rf $tpldir~
 
7132
                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
 
7133
                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
 
7134
                $RANLIB $oldlib'
 
7135
              _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
 
7136
                rm -rf $tpldir~
 
7137
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
 
7138
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
7139
              _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
 
7140
                rm -rf $tpldir~
 
7141
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
 
7142
                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 
7143
              ;;
 
7144
            *) # Version 6 and above use weak symbols
 
7145
              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
7146
              _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 
7147
              ;;
 
7148
            esac
 
7149
 
 
7150
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
7151
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7152
            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
7153
            ;;
 
7154
          cxx*)
 
7155
            # Compaq C++
 
7156
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7157
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
7158
 
 
7159
            runpath_var=LD_RUN_PATH
 
7160
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
7161
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7162
 
 
7163
            # Commands to make compiler produce verbose output that lists
 
7164
            # what "hidden" libraries, object files and flags are used when
 
7165
            # linking a shared library.
 
7166
            #
 
7167
            # There doesn't appear to be a way to prevent this compiler from
 
7168
            # explicitly linking system object files so we need to strip them
 
7169
            # from the output so that they don't get included in the library
 
7170
            # dependencies.
 
7171
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
 
7172
            ;;
 
7173
          xl* | mpixl* | bgxl*)
 
7174
            # IBM XL 8.0 on PPC, with GNU ld
 
7175
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7176
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7177
            _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7178
            if test "x$supports_anon_versioning" = xyes; then
 
7179
              _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 
7180
                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
7181
                echo "local: *; };" >> $output_objdir/$libname.ver~
 
7182
                $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
7183
            fi
 
7184
            ;;
 
7185
          *)
 
7186
            case `$CC -V 2>&1 | sed 5q` in
 
7187
            *Sun\ C*)
 
7188
              # Sun C++ 5.9
 
7189
              _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
7190
              _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7191
              _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
 
7192
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7193
              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 
7194
              _LT_TAGVAR(compiler_needs_object, $1)=yes
 
7195
 
 
7196
              # Not sure whether something based on
 
7197
              # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
 
7198
              # would be better.
 
7199
              output_verbose_link_cmd='func_echo_all'
 
7200
 
 
7201
              # Archives containing C++ object files must be created using
 
7202
              # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
7203
              # necessary to make sure instantiated templates are included
 
7204
              # in the archive.
 
7205
              _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
7206
              ;;
 
7207
            esac
 
7208
            ;;
 
7209
        esac
 
7210
        ;;
 
7211
 
 
7212
      lynxos*)
 
7213
        # FIXME: insert proper C++ library support
 
7214
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7215
        ;;
 
7216
 
 
7217
      m88k*)
 
7218
        # FIXME: insert proper C++ library support
 
7219
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7220
        ;;
 
7221
 
 
7222
      mvs*)
 
7223
        case $cc_basename in
 
7224
          cxx*)
 
7225
            # FIXME: insert proper C++ library support
 
7226
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7227
            ;;
 
7228
          *)
 
7229
            # FIXME: insert proper C++ library support
 
7230
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7231
            ;;
 
7232
        esac
 
7233
        ;;
 
7234
 
 
7235
      netbsd*)
 
7236
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
7237
          _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
7238
          wlarc=
 
7239
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7240
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
7241
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7242
        fi
 
7243
        # Workaround some broken pre-1.5 toolchains
 
7244
        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
7245
        ;;
 
7246
 
 
7247
      *nto* | *qnx*)
 
7248
        _LT_TAGVAR(ld_shlibs, $1)=yes
 
7249
        ;;
 
7250
 
 
7251
      openbsd2*)
 
7252
        # C++ shared libraries are fairly broken
 
7253
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7254
        ;;
 
7255
 
 
7256
      openbsd*)
 
7257
        if test -f /usr/libexec/ld.so; then
 
7258
          _LT_TAGVAR(hardcode_direct, $1)=yes
 
7259
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7260
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 
7261
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
7262
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7263
          if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
7264
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
 
7265
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7266
            _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
7267
          fi
 
7268
          output_verbose_link_cmd=func_echo_all
 
7269
        else
 
7270
          _LT_TAGVAR(ld_shlibs, $1)=no
 
7271
        fi
 
7272
        ;;
 
7273
 
 
7274
      osf3* | osf4* | osf5*)
 
7275
        case $cc_basename in
 
7276
          KCC*)
 
7277
            # Kuck and Associates, Inc. (KAI) C++ Compiler
 
7278
 
 
7279
            # KCC will only create a shared library if the output file
 
7280
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
7281
            # to its proper name (with version) after linking.
 
7282
            _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
7283
 
 
7284
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7285
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7286
 
 
7287
            # Archives containing C++ object files must be created using
 
7288
            # the KAI C++ compiler.
 
7289
            case $host in
 
7290
              osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
 
7291
              *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
 
7292
            esac
 
7293
            ;;
 
7294
          RCC*)
 
7295
            # Rational C++ 2.4.1
 
7296
            # FIXME: insert proper C++ library support
 
7297
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7298
            ;;
 
7299
          cxx*)
 
7300
            case $host in
 
7301
              osf3*)
 
7302
                _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
7303
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
7304
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7305
                ;;
 
7306
              *)
 
7307
                _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
7308
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
7309
                _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
7310
                  echo "-hidden">> $lib.exp~
 
7311
                  $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~
 
7312
                  $RM $lib.exp'
 
7313
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
7314
                ;;
 
7315
            esac
 
7316
 
 
7317
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7318
 
 
7319
            # Commands to make compiler produce verbose output that lists
 
7320
            # what "hidden" libraries, object files and flags are used when
 
7321
            # linking a shared library.
 
7322
            #
 
7323
            # There doesn't appear to be a way to prevent this compiler from
 
7324
            # explicitly linking system object files so we need to strip them
 
7325
            # from the output so that they don't get included in the library
 
7326
            # dependencies.
 
7327
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
 
7328
            ;;
 
7329
          *)
 
7330
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
7331
              _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
7332
              case $host in
 
7333
                osf3*)
 
7334
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
7335
                  ;;
 
7336
                *)
 
7337
                  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
7338
                  ;;
 
7339
              esac
 
7340
 
 
7341
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7342
              _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
7343
 
 
7344
              # Commands to make compiler produce verbose output that lists
 
7345
              # what "hidden" libraries, object files and flags are used when
 
7346
              # linking a shared library.
 
7347
              output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
7348
 
 
7349
            else
 
7350
              # FIXME: insert proper C++ library support
 
7351
              _LT_TAGVAR(ld_shlibs, $1)=no
 
7352
            fi
 
7353
            ;;
 
7354
        esac
 
7355
        ;;
 
7356
 
 
7357
      psos*)
 
7358
        # FIXME: insert proper C++ library support
 
7359
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7360
        ;;
 
7361
 
 
7362
      sunos4*)
 
7363
        case $cc_basename in
 
7364
          CC*)
 
7365
            # Sun C++ 4.x
 
7366
            # FIXME: insert proper C++ library support
 
7367
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7368
            ;;
 
7369
          lcc*)
 
7370
            # Lucid
 
7371
            # FIXME: insert proper C++ library support
 
7372
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7373
            ;;
 
7374
          *)
 
7375
            # FIXME: insert proper C++ library support
 
7376
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7377
            ;;
 
7378
        esac
 
7379
        ;;
 
7380
 
 
7381
      solaris*)
 
7382
        case $cc_basename in
 
7383
          CC* | sunCC*)
 
7384
            # Sun C++ 4.2, 5.x and Centerline C++
 
7385
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
 
7386
            _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
7387
            _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
7388
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
7389
              $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'
 
7390
 
 
7391
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7392
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7393
            case $host_os in
 
7394
              solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
7395
              *)
 
7396
                # The compiler driver will combine and reorder linker options,
 
7397
                # but understands `-z linker_flag'.
 
7398
                # Supported since Solaris 2.6 (maybe 2.5.1?)
 
7399
                _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 
7400
                ;;
 
7401
            esac
 
7402
            _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7403
 
 
7404
            output_verbose_link_cmd='func_echo_all'
 
7405
 
 
7406
            # Archives containing C++ object files must be created using
 
7407
            # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
7408
            # necessary to make sure instantiated templates are included
 
7409
            # in the archive.
 
7410
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
7411
            ;;
 
7412
          gcx*)
 
7413
            # Green Hills C++ Compiler
 
7414
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
7415
 
 
7416
            # The C++ compiler must be used to create the archive.
 
7417
            _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
7418
            ;;
 
7419
          *)
 
7420
            # GNU C++ compiler with Solaris linker
 
7421
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
7422
              _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
7423
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
 
7424
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
7425
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
7426
                  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
7427
 
 
7428
                # Commands to make compiler produce verbose output that lists
 
7429
                # what "hidden" libraries, object files and flags are used when
 
7430
                # linking a shared library.
 
7431
                output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
7432
              else
 
7433
                # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
7434
                # platform.
 
7435
                _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
7436
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
 
7437
                  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
7438
 
 
7439
                # Commands to make compiler produce verbose output that lists
 
7440
                # what "hidden" libraries, object files and flags are used when
 
7441
                # linking a shared library.
 
7442
                output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
7443
              fi
 
7444
 
 
7445
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
7446
              case $host_os in
 
7447
                solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
7448
                *)
 
7449
                  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
7450
                  ;;
 
7451
              esac
 
7452
            fi
 
7453
            ;;
 
7454
        esac
 
7455
        ;;
 
7456
 
 
7457
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
7458
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
7459
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7460
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7461
      runpath_var='LD_RUN_PATH'
 
7462
 
 
7463
      case $cc_basename in
 
7464
        CC*)
 
7465
          _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7466
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7467
          ;;
 
7468
        *)
 
7469
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7470
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7471
          ;;
 
7472
      esac
 
7473
      ;;
 
7474
 
 
7475
      sysv5* | sco3.2v5* | sco5v6*)
 
7476
        # Note: We can NOT use -z defs as we might desire, because we do not
 
7477
        # link with -lc, and that would cause any symbols used from libc to
 
7478
        # always be unresolved, which means just about no library would
 
7479
        # ever link correctly.  If we're not using GNU ld we use -z text
 
7480
        # though, which does catch some bad symbols but isn't as heavy-handed
 
7481
        # as -z defs.
 
7482
        _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
7483
        _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
7484
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7485
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7486
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
 
7487
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 
7488
        _LT_TAGVAR(link_all_deplibs, $1)=yes
 
7489
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
7490
        runpath_var='LD_RUN_PATH'
 
7491
 
 
7492
        case $cc_basename in
 
7493
          CC*)
 
7494
            _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7495
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7496
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
 
7497
              '"$_LT_TAGVAR(old_archive_cmds, $1)"
 
7498
            _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
 
7499
              '"$_LT_TAGVAR(reload_cmds, $1)"
 
7500
            ;;
 
7501
          *)
 
7502
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7503
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7504
            ;;
 
7505
        esac
 
7506
      ;;
 
7507
 
 
7508
      tandem*)
 
7509
        case $cc_basename in
 
7510
          NCC*)
 
7511
            # NonStop-UX NCC 3.20
 
7512
            # FIXME: insert proper C++ library support
 
7513
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7514
            ;;
 
7515
          *)
 
7516
            # FIXME: insert proper C++ library support
 
7517
            _LT_TAGVAR(ld_shlibs, $1)=no
 
7518
            ;;
 
7519
        esac
 
7520
        ;;
 
7521
 
 
7522
      vxworks*)
 
7523
        # FIXME: insert proper C++ library support
 
7524
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7525
        ;;
 
7526
 
 
7527
      *)
 
7528
        # FIXME: insert proper C++ library support
 
7529
        _LT_TAGVAR(ld_shlibs, $1)=no
 
7530
        ;;
 
7531
    esac
 
7532
 
 
7533
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
 
7534
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
7535
 
 
7536
    _LT_TAGVAR(GCC, $1)="$GXX"
 
7537
    _LT_TAGVAR(LD, $1)="$LD"
 
7538
 
 
7539
    ## CAVEAT EMPTOR:
 
7540
    ## There is no encapsulation within the following macros, do not change
 
7541
    ## the running order or otherwise move them around unless you know exactly
 
7542
    ## what you are doing...
 
7543
    _LT_SYS_HIDDEN_LIBDEPS($1)
 
7544
    _LT_COMPILER_PIC($1)
 
7545
    _LT_COMPILER_C_O($1)
 
7546
    _LT_COMPILER_FILE_LOCKS($1)
 
7547
    _LT_LINKER_SHLIBS($1)
 
7548
    _LT_SYS_DYNAMIC_LINKER($1)
 
7549
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
7550
 
 
7551
    _LT_CONFIG($1)
 
7552
  fi # test -n "$compiler"
 
7553
 
 
7554
  CC=$lt_save_CC
 
7555
  CFLAGS=$lt_save_CFLAGS
 
7556
  LDCXX=$LD
 
7557
  LD=$lt_save_LD
 
7558
  GCC=$lt_save_GCC
 
7559
  with_gnu_ld=$lt_save_with_gnu_ld
 
7560
  lt_cv_path_LDCXX=$lt_cv_path_LD
 
7561
  lt_cv_path_LD=$lt_save_path_LD
 
7562
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
7563
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
7564
fi # test "$_lt_caught_CXX_error" != yes
 
7565
 
 
7566
AC_LANG_POP
 
7567
])# _LT_LANG_CXX_CONFIG
 
7568
 
 
7569
 
 
7570
# _LT_FUNC_STRIPNAME_CNF
 
7571
# ----------------------
 
7572
# func_stripname_cnf prefix suffix name
 
7573
# strip PREFIX and SUFFIX off of NAME.
 
7574
# PREFIX and SUFFIX must not contain globbing or regex special
 
7575
# characters, hashes, percent signs, but SUFFIX may contain a leading
 
7576
# dot (in which case that matches only a dot).
 
7577
#
 
7578
# This function is identical to the (non-XSI) version of func_stripname,
 
7579
# except this one can be used by m4 code that may be executed by configure,
 
7580
# rather than the libtool script.
 
7581
m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
 
7582
AC_REQUIRE([_LT_DECL_SED])
 
7583
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
 
7584
func_stripname_cnf ()
 
7585
{
 
7586
  case ${2} in
 
7587
  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
 
7588
  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
 
7589
  esac
 
7590
} # func_stripname_cnf
 
7591
])# _LT_FUNC_STRIPNAME_CNF
 
7592
 
 
7593
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 
7594
# ---------------------------------
 
7595
# Figure out "hidden" library dependencies from verbose
 
7596
# compiler output when linking a shared library.
 
7597
# Parse the compiler output and extract the necessary
 
7598
# objects, libraries and library flags.
 
7599
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
 
7600
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
7601
AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
 
7602
# Dependencies to place before and after the object being linked:
 
7603
_LT_TAGVAR(predep_objects, $1)=
 
7604
_LT_TAGVAR(postdep_objects, $1)=
 
7605
_LT_TAGVAR(predeps, $1)=
 
7606
_LT_TAGVAR(postdeps, $1)=
 
7607
_LT_TAGVAR(compiler_lib_search_path, $1)=
 
7608
 
 
7609
dnl we can't use the lt_simple_compile_test_code here,
 
7610
dnl because it contains code intended for an executable,
 
7611
dnl not a library.  It's possible we should let each
 
7612
dnl tag define a new lt_????_link_test_code variable,
 
7613
dnl but it's only used here...
 
7614
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
 
7615
int a;
 
7616
void foo (void) { a = 0; }
 
7617
_LT_EOF
 
7618
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
 
7619
class Foo
 
7620
{
 
7621
public:
 
7622
  Foo (void) { a = 0; }
 
7623
private:
 
7624
  int a;
 
7625
};
 
7626
_LT_EOF
 
7627
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
 
7628
      subroutine foo
 
7629
      implicit none
 
7630
      integer*4 a
 
7631
      a=0
 
7632
      return
 
7633
      end
 
7634
_LT_EOF
 
7635
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
 
7636
      subroutine foo
 
7637
      implicit none
 
7638
      integer a
 
7639
      a=0
 
7640
      return
 
7641
      end
 
7642
_LT_EOF
 
7643
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
 
7644
public class foo {
 
7645
  private int a;
 
7646
  public void bar (void) {
 
7647
    a = 0;
 
7648
  }
 
7649
};
 
7650
_LT_EOF
 
7651
], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
 
7652
package foo
 
7653
func foo() {
 
7654
}
 
7655
_LT_EOF
 
7656
])
 
7657
 
 
7658
_lt_libdeps_save_CFLAGS=$CFLAGS
 
7659
case "$CC $CFLAGS " in #(
 
7660
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 
7661
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
 
7662
*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
 
7663
esac
 
7664
 
 
7665
dnl Parse the compiler output and extract the necessary
 
7666
dnl objects, libraries and library flags.
 
7667
if AC_TRY_EVAL(ac_compile); then
 
7668
  # Parse the compiler output and extract the necessary
 
7669
  # objects, libraries and library flags.
 
7670
 
 
7671
  # Sentinel used to keep track of whether or not we are before
 
7672
  # the conftest object file.
 
7673
  pre_test_object_deps_done=no
 
7674
 
 
7675
  for p in `eval "$output_verbose_link_cmd"`; do
 
7676
    case ${prev}${p} in
 
7677
 
 
7678
    -L* | -R* | -l*)
 
7679
       # Some compilers place space between "-{L,R}" and the path.
 
7680
       # Remove the space.
 
7681
       if test $p = "-L" ||
 
7682
          test $p = "-R"; then
 
7683
         prev=$p
 
7684
         continue
 
7685
       fi
 
7686
 
 
7687
       # Expand the sysroot to ease extracting the directories later.
 
7688
       if test -z "$prev"; then
 
7689
         case $p in
 
7690
         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
 
7691
         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
 
7692
         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
 
7693
         esac
 
7694
       fi
 
7695
       case $p in
 
7696
       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
 
7697
       esac
 
7698
       if test "$pre_test_object_deps_done" = no; then
 
7699
         case ${prev} in
 
7700
         -L | -R)
 
7701
           # Internal compiler library paths should come after those
 
7702
           # provided the user.  The postdeps already come after the
 
7703
           # user supplied libs so there is no need to process them.
 
7704
           if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
 
7705
             _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
7706
           else
 
7707
             _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
7708
           fi
 
7709
           ;;
 
7710
         # The "-l" case would never come before the object being
 
7711
         # linked, so don't bother handling this case.
 
7712
         esac
 
7713
       else
 
7714
         if test -z "$_LT_TAGVAR(postdeps, $1)"; then
 
7715
           _LT_TAGVAR(postdeps, $1)="${prev}${p}"
 
7716
         else
 
7717
           _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
 
7718
         fi
 
7719
       fi
 
7720
       prev=
 
7721
       ;;
 
7722
 
 
7723
    *.lto.$objext) ;; # Ignore GCC LTO objects
 
7724
    *.$objext)
 
7725
       # This assumes that the test object file only shows up
 
7726
       # once in the compiler output.
 
7727
       if test "$p" = "conftest.$objext"; then
 
7728
         pre_test_object_deps_done=yes
 
7729
         continue
 
7730
       fi
 
7731
 
 
7732
       if test "$pre_test_object_deps_done" = no; then
 
7733
         if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
 
7734
           _LT_TAGVAR(predep_objects, $1)="$p"
 
7735
         else
 
7736
           _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
 
7737
         fi
 
7738
       else
 
7739
         if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
 
7740
           _LT_TAGVAR(postdep_objects, $1)="$p"
 
7741
         else
 
7742
           _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
 
7743
         fi
 
7744
       fi
 
7745
       ;;
 
7746
 
 
7747
    *) ;; # Ignore the rest.
 
7748
 
 
7749
    esac
 
7750
  done
 
7751
 
 
7752
  # Clean up.
 
7753
  rm -f a.out a.exe
 
7754
else
 
7755
  echo "libtool.m4: error: problem compiling $1 test program"
 
7756
fi
 
7757
 
 
7758
$RM -f confest.$objext
 
7759
CFLAGS=$_lt_libdeps_save_CFLAGS
 
7760
 
 
7761
# PORTME: override above test on systems where it is broken
 
7762
m4_if([$1], [CXX],
 
7763
[case $host_os in
 
7764
interix[[3-9]]*)
 
7765
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
 
7766
  # hack all around it, let's just trust "g++" to DTRT.
 
7767
  _LT_TAGVAR(predep_objects,$1)=
 
7768
  _LT_TAGVAR(postdep_objects,$1)=
 
7769
  _LT_TAGVAR(postdeps,$1)=
 
7770
  ;;
 
7771
 
 
7772
linux*)
 
7773
  case `$CC -V 2>&1 | sed 5q` in
 
7774
  *Sun\ C*)
 
7775
    # Sun C++ 5.9
 
7776
 
 
7777
    # The more standards-conforming stlport4 library is
 
7778
    # incompatible with the Cstd library. Avoid specifying
 
7779
    # it if it's in CXXFLAGS. Ignore libCrun as
 
7780
    # -library=stlport4 depends on it.
 
7781
    case " $CXX $CXXFLAGS " in
 
7782
    *" -library=stlport4 "*)
 
7783
      solaris_use_stlport4=yes
 
7784
      ;;
 
7785
    esac
 
7786
 
 
7787
    if test "$solaris_use_stlport4" != yes; then
 
7788
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
7789
    fi
 
7790
    ;;
 
7791
  esac
 
7792
  ;;
 
7793
 
 
7794
solaris*)
 
7795
  case $cc_basename in
 
7796
  CC* | sunCC*)
 
7797
    # The more standards-conforming stlport4 library is
 
7798
    # incompatible with the Cstd library. Avoid specifying
 
7799
    # it if it's in CXXFLAGS. Ignore libCrun as
 
7800
    # -library=stlport4 depends on it.
 
7801
    case " $CXX $CXXFLAGS " in
 
7802
    *" -library=stlport4 "*)
 
7803
      solaris_use_stlport4=yes
 
7804
      ;;
 
7805
    esac
 
7806
 
 
7807
    # Adding this requires a known-good setup of shared libraries for
 
7808
    # Sun compiler versions before 5.6, else PIC objects from an old
 
7809
    # archive will be linked into the output, leading to subtle bugs.
 
7810
    if test "$solaris_use_stlport4" != yes; then
 
7811
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
7812
    fi
 
7813
    ;;
 
7814
  esac
 
7815
  ;;
 
7816
esac
 
7817
])
 
7818
 
 
7819
case " $_LT_TAGVAR(postdeps, $1) " in
 
7820
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
7821
esac
 
7822
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
 
7823
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
 
7824
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
 
7825
fi
 
7826
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
 
7827
    [The directories searched by this compiler when creating a shared library])
 
7828
_LT_TAGDECL([], [predep_objects], [1],
 
7829
    [Dependencies to place before and after the objects being linked to
 
7830
    create a shared library])
 
7831
_LT_TAGDECL([], [postdep_objects], [1])
 
7832
_LT_TAGDECL([], [predeps], [1])
 
7833
_LT_TAGDECL([], [postdeps], [1])
 
7834
_LT_TAGDECL([], [compiler_lib_search_path], [1],
 
7835
    [The library search path used internally by the compiler when linking
 
7836
    a shared library])
 
7837
])# _LT_SYS_HIDDEN_LIBDEPS
 
7838
 
 
7839
 
 
7840
# _LT_LANG_F77_CONFIG([TAG])
 
7841
# --------------------------
 
7842
# Ensure that the configuration variables for a Fortran 77 compiler are
 
7843
# suitably defined.  These variables are subsequently used by _LT_CONFIG
 
7844
# to write the compiler configuration to `libtool'.
 
7845
m4_defun([_LT_LANG_F77_CONFIG],
 
7846
[AC_LANG_PUSH(Fortran 77)
 
7847
if test -z "$F77" || test "X$F77" = "Xno"; then
 
7848
  _lt_disable_F77=yes
 
7849
fi
 
7850
 
 
7851
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7852
_LT_TAGVAR(allow_undefined_flag, $1)=
 
7853
_LT_TAGVAR(always_export_symbols, $1)=no
 
7854
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
7855
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
7856
_LT_TAGVAR(hardcode_direct, $1)=no
 
7857
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
7858
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7859
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
7860
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
7861
_LT_TAGVAR(hardcode_automatic, $1)=no
 
7862
_LT_TAGVAR(inherit_rpath, $1)=no
 
7863
_LT_TAGVAR(module_cmds, $1)=
 
7864
_LT_TAGVAR(module_expsym_cmds, $1)=
 
7865
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
7866
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7867
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
7868
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
7869
_LT_TAGVAR(no_undefined_flag, $1)=
 
7870
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
7871
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
7872
 
 
7873
# Source file extension for f77 test sources.
 
7874
ac_ext=f
 
7875
 
 
7876
# Object file extension for compiled f77 test sources.
 
7877
objext=o
 
7878
_LT_TAGVAR(objext, $1)=$objext
 
7879
 
 
7880
# No sense in running all these tests if we already determined that
 
7881
# the F77 compiler isn't working.  Some variables (like enable_shared)
 
7882
# are currently assumed to apply to all compilers on this platform,
 
7883
# and will be corrupted by setting them based on a non-working compiler.
 
7884
if test "$_lt_disable_F77" != yes; then
 
7885
  # Code to be used in simple compile tests
 
7886
  lt_simple_compile_test_code="\
 
7887
      subroutine t
 
7888
      return
 
7889
      end
 
7890
"
 
7891
 
 
7892
  # Code to be used in simple link tests
 
7893
  lt_simple_link_test_code="\
 
7894
      program t
 
7895
      end
 
7896
"
 
7897
 
 
7898
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
7899
  _LT_TAG_COMPILER
 
7900
 
 
7901
  # save warnings/boilerplate of simple test code
 
7902
  _LT_COMPILER_BOILERPLATE
 
7903
  _LT_LINKER_BOILERPLATE
 
7904
 
 
7905
  # Allow CC to be a program name with arguments.
 
7906
  lt_save_CC="$CC"
 
7907
  lt_save_GCC=$GCC
 
7908
  lt_save_CFLAGS=$CFLAGS
 
7909
  CC=${F77-"f77"}
 
7910
  CFLAGS=$FFLAGS
 
7911
  compiler=$CC
 
7912
  _LT_TAGVAR(compiler, $1)=$CC
 
7913
  _LT_CC_BASENAME([$compiler])
 
7914
  GCC=$G77
 
7915
  if test -n "$compiler"; then
 
7916
    AC_MSG_CHECKING([if libtool supports shared libraries])
 
7917
    AC_MSG_RESULT([$can_build_shared])
 
7918
 
 
7919
    AC_MSG_CHECKING([whether to build shared libraries])
 
7920
    test "$can_build_shared" = "no" && enable_shared=no
 
7921
 
 
7922
    # On AIX, shared libraries and static libraries use the same namespace, and
 
7923
    # are all built from PIC.
 
7924
    case $host_os in
 
7925
      aix3*)
 
7926
        test "$enable_shared" = yes && enable_static=no
 
7927
        if test -n "$RANLIB"; then
 
7928
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
7929
          postinstall_cmds='$RANLIB $lib'
 
7930
        fi
 
7931
        ;;
 
7932
      aix[[4-9]]*)
 
7933
        if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
7934
          test "$enable_shared" = yes && enable_static=no
 
7935
        fi
 
7936
        ;;
 
7937
    esac
 
7938
    AC_MSG_RESULT([$enable_shared])
 
7939
 
 
7940
    AC_MSG_CHECKING([whether to build static libraries])
 
7941
    # Make sure either enable_shared or enable_static is yes.
 
7942
    test "$enable_shared" = yes || enable_static=yes
 
7943
    AC_MSG_RESULT([$enable_static])
 
7944
 
 
7945
    _LT_TAGVAR(GCC, $1)="$G77"
 
7946
    _LT_TAGVAR(LD, $1)="$LD"
 
7947
 
 
7948
    ## CAVEAT EMPTOR:
 
7949
    ## There is no encapsulation within the following macros, do not change
 
7950
    ## the running order or otherwise move them around unless you know exactly
 
7951
    ## what you are doing...
 
7952
    _LT_COMPILER_PIC($1)
 
7953
    _LT_COMPILER_C_O($1)
 
7954
    _LT_COMPILER_FILE_LOCKS($1)
 
7955
    _LT_LINKER_SHLIBS($1)
 
7956
    _LT_SYS_DYNAMIC_LINKER($1)
 
7957
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
7958
 
 
7959
    _LT_CONFIG($1)
 
7960
  fi # test -n "$compiler"
 
7961
 
 
7962
  GCC=$lt_save_GCC
 
7963
  CC="$lt_save_CC"
 
7964
  CFLAGS="$lt_save_CFLAGS"
 
7965
fi # test "$_lt_disable_F77" != yes
 
7966
 
 
7967
AC_LANG_POP
 
7968
])# _LT_LANG_F77_CONFIG
 
7969
 
 
7970
 
 
7971
# _LT_LANG_FC_CONFIG([TAG])
 
7972
# -------------------------
 
7973
# Ensure that the configuration variables for a Fortran compiler are
 
7974
# suitably defined.  These variables are subsequently used by _LT_CONFIG
 
7975
# to write the compiler configuration to `libtool'.
 
7976
m4_defun([_LT_LANG_FC_CONFIG],
 
7977
[AC_LANG_PUSH(Fortran)
 
7978
 
 
7979
if test -z "$FC" || test "X$FC" = "Xno"; then
 
7980
  _lt_disable_FC=yes
 
7981
fi
 
7982
 
 
7983
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
7984
_LT_TAGVAR(allow_undefined_flag, $1)=
 
7985
_LT_TAGVAR(always_export_symbols, $1)=no
 
7986
_LT_TAGVAR(archive_expsym_cmds, $1)=
 
7987
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
 
7988
_LT_TAGVAR(hardcode_direct, $1)=no
 
7989
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
 
7990
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7991
_LT_TAGVAR(hardcode_libdir_separator, $1)=
 
7992
_LT_TAGVAR(hardcode_minus_L, $1)=no
 
7993
_LT_TAGVAR(hardcode_automatic, $1)=no
 
7994
_LT_TAGVAR(inherit_rpath, $1)=no
 
7995
_LT_TAGVAR(module_cmds, $1)=
 
7996
_LT_TAGVAR(module_expsym_cmds, $1)=
 
7997
_LT_TAGVAR(link_all_deplibs, $1)=unknown
 
7998
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
7999
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
8000
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
8001
_LT_TAGVAR(no_undefined_flag, $1)=
 
8002
_LT_TAGVAR(whole_archive_flag_spec, $1)=
 
8003
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
8004
 
 
8005
# Source file extension for fc test sources.
 
8006
ac_ext=${ac_fc_srcext-f}
 
8007
 
 
8008
# Object file extension for compiled fc test sources.
 
8009
objext=o
 
8010
_LT_TAGVAR(objext, $1)=$objext
 
8011
 
 
8012
# No sense in running all these tests if we already determined that
 
8013
# the FC compiler isn't working.  Some variables (like enable_shared)
 
8014
# are currently assumed to apply to all compilers on this platform,
 
8015
# and will be corrupted by setting them based on a non-working compiler.
 
8016
if test "$_lt_disable_FC" != yes; then
 
8017
  # Code to be used in simple compile tests
 
8018
  lt_simple_compile_test_code="\
 
8019
      subroutine t
 
8020
      return
 
8021
      end
 
8022
"
 
8023
 
 
8024
  # Code to be used in simple link tests
 
8025
  lt_simple_link_test_code="\
 
8026
      program t
 
8027
      end
 
8028
"
 
8029
 
 
8030
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8031
  _LT_TAG_COMPILER
 
8032
 
 
8033
  # save warnings/boilerplate of simple test code
 
8034
  _LT_COMPILER_BOILERPLATE
 
8035
  _LT_LINKER_BOILERPLATE
 
8036
 
 
8037
  # Allow CC to be a program name with arguments.
 
8038
  lt_save_CC="$CC"
 
8039
  lt_save_GCC=$GCC
 
8040
  lt_save_CFLAGS=$CFLAGS
 
8041
  CC=${FC-"f95"}
 
8042
  CFLAGS=$FCFLAGS
 
8043
  compiler=$CC
 
8044
  GCC=$ac_cv_fc_compiler_gnu
 
8045
 
 
8046
  _LT_TAGVAR(compiler, $1)=$CC
 
8047
  _LT_CC_BASENAME([$compiler])
 
8048
 
 
8049
  if test -n "$compiler"; then
 
8050
    AC_MSG_CHECKING([if libtool supports shared libraries])
 
8051
    AC_MSG_RESULT([$can_build_shared])
 
8052
 
 
8053
    AC_MSG_CHECKING([whether to build shared libraries])
 
8054
    test "$can_build_shared" = "no" && enable_shared=no
 
8055
 
 
8056
    # On AIX, shared libraries and static libraries use the same namespace, and
 
8057
    # are all built from PIC.
 
8058
    case $host_os in
 
8059
      aix3*)
 
8060
        test "$enable_shared" = yes && enable_static=no
 
8061
        if test -n "$RANLIB"; then
 
8062
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
8063
          postinstall_cmds='$RANLIB $lib'
 
8064
        fi
 
8065
        ;;
 
8066
      aix[[4-9]]*)
 
8067
        if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
8068
          test "$enable_shared" = yes && enable_static=no
 
8069
        fi
 
8070
        ;;
 
8071
    esac
 
8072
    AC_MSG_RESULT([$enable_shared])
 
8073
 
 
8074
    AC_MSG_CHECKING([whether to build static libraries])
 
8075
    # Make sure either enable_shared or enable_static is yes.
 
8076
    test "$enable_shared" = yes || enable_static=yes
 
8077
    AC_MSG_RESULT([$enable_static])
 
8078
 
 
8079
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
 
8080
    _LT_TAGVAR(LD, $1)="$LD"
 
8081
 
 
8082
    ## CAVEAT EMPTOR:
 
8083
    ## There is no encapsulation within the following macros, do not change
 
8084
    ## the running order or otherwise move them around unless you know exactly
 
8085
    ## what you are doing...
 
8086
    _LT_SYS_HIDDEN_LIBDEPS($1)
 
8087
    _LT_COMPILER_PIC($1)
 
8088
    _LT_COMPILER_C_O($1)
 
8089
    _LT_COMPILER_FILE_LOCKS($1)
 
8090
    _LT_LINKER_SHLIBS($1)
 
8091
    _LT_SYS_DYNAMIC_LINKER($1)
 
8092
    _LT_LINKER_HARDCODE_LIBPATH($1)
 
8093
 
 
8094
    _LT_CONFIG($1)
 
8095
  fi # test -n "$compiler"
 
8096
 
 
8097
  GCC=$lt_save_GCC
 
8098
  CC=$lt_save_CC
 
8099
  CFLAGS=$lt_save_CFLAGS
 
8100
fi # test "$_lt_disable_FC" != yes
 
8101
 
 
8102
AC_LANG_POP
 
8103
])# _LT_LANG_FC_CONFIG
 
8104
 
 
8105
 
 
8106
# _LT_LANG_GCJ_CONFIG([TAG])
 
8107
# --------------------------
 
8108
# Ensure that the configuration variables for the GNU Java Compiler compiler
 
8109
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8110
# to write the compiler configuration to `libtool'.
 
8111
m4_defun([_LT_LANG_GCJ_CONFIG],
 
8112
[AC_REQUIRE([LT_PROG_GCJ])dnl
 
8113
AC_LANG_SAVE
 
8114
 
 
8115
# Source file extension for Java test sources.
 
8116
ac_ext=java
 
8117
 
 
8118
# Object file extension for compiled Java test sources.
 
8119
objext=o
 
8120
_LT_TAGVAR(objext, $1)=$objext
 
8121
 
 
8122
# Code to be used in simple compile tests
 
8123
lt_simple_compile_test_code="class foo {}"
 
8124
 
 
8125
# Code to be used in simple link tests
 
8126
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
 
8127
 
 
8128
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8129
_LT_TAG_COMPILER
 
8130
 
 
8131
# save warnings/boilerplate of simple test code
 
8132
_LT_COMPILER_BOILERPLATE
 
8133
_LT_LINKER_BOILERPLATE
 
8134
 
 
8135
# Allow CC to be a program name with arguments.
 
8136
lt_save_CC=$CC
 
8137
lt_save_CFLAGS=$CFLAGS
 
8138
lt_save_GCC=$GCC
 
8139
GCC=yes
 
8140
CC=${GCJ-"gcj"}
 
8141
CFLAGS=$GCJFLAGS
 
8142
compiler=$CC
 
8143
_LT_TAGVAR(compiler, $1)=$CC
 
8144
_LT_TAGVAR(LD, $1)="$LD"
 
8145
_LT_CC_BASENAME([$compiler])
 
8146
 
 
8147
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
8148
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8149
 
 
8150
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8151
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
8152
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
8153
 
 
8154
if test -n "$compiler"; then
 
8155
  _LT_COMPILER_NO_RTTI($1)
 
8156
  _LT_COMPILER_PIC($1)
 
8157
  _LT_COMPILER_C_O($1)
 
8158
  _LT_COMPILER_FILE_LOCKS($1)
 
8159
  _LT_LINKER_SHLIBS($1)
 
8160
  _LT_LINKER_HARDCODE_LIBPATH($1)
 
8161
 
 
8162
  _LT_CONFIG($1)
 
8163
fi
 
8164
 
 
8165
AC_LANG_RESTORE
 
8166
 
 
8167
GCC=$lt_save_GCC
 
8168
CC=$lt_save_CC
 
8169
CFLAGS=$lt_save_CFLAGS
 
8170
])# _LT_LANG_GCJ_CONFIG
 
8171
 
 
8172
 
 
8173
# _LT_LANG_GO_CONFIG([TAG])
 
8174
# --------------------------
 
8175
# Ensure that the configuration variables for the GNU Go compiler
 
8176
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8177
# to write the compiler configuration to `libtool'.
 
8178
m4_defun([_LT_LANG_GO_CONFIG],
 
8179
[AC_REQUIRE([LT_PROG_GO])dnl
 
8180
AC_LANG_SAVE
 
8181
 
 
8182
# Source file extension for Go test sources.
 
8183
ac_ext=go
 
8184
 
 
8185
# Object file extension for compiled Go test sources.
 
8186
objext=o
 
8187
_LT_TAGVAR(objext, $1)=$objext
 
8188
 
 
8189
# Code to be used in simple compile tests
 
8190
lt_simple_compile_test_code="package main; func main() { }"
 
8191
 
 
8192
# Code to be used in simple link tests
 
8193
lt_simple_link_test_code='package main; func main() { }'
 
8194
 
 
8195
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8196
_LT_TAG_COMPILER
 
8197
 
 
8198
# save warnings/boilerplate of simple test code
 
8199
_LT_COMPILER_BOILERPLATE
 
8200
_LT_LINKER_BOILERPLATE
 
8201
 
 
8202
# Allow CC to be a program name with arguments.
 
8203
lt_save_CC=$CC
 
8204
lt_save_CFLAGS=$CFLAGS
 
8205
lt_save_GCC=$GCC
 
8206
GCC=yes
 
8207
CC=${GOC-"gccgo"}
 
8208
CFLAGS=$GOFLAGS
 
8209
compiler=$CC
 
8210
_LT_TAGVAR(compiler, $1)=$CC
 
8211
_LT_TAGVAR(LD, $1)="$LD"
 
8212
_LT_CC_BASENAME([$compiler])
 
8213
 
 
8214
# Go did not exist at the time GCC didn't implicitly link libc in.
 
8215
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8216
 
 
8217
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8218
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
8219
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
8220
 
 
8221
if test -n "$compiler"; then
 
8222
  _LT_COMPILER_NO_RTTI($1)
 
8223
  _LT_COMPILER_PIC($1)
 
8224
  _LT_COMPILER_C_O($1)
 
8225
  _LT_COMPILER_FILE_LOCKS($1)
 
8226
  _LT_LINKER_SHLIBS($1)
 
8227
  _LT_LINKER_HARDCODE_LIBPATH($1)
 
8228
 
 
8229
  _LT_CONFIG($1)
 
8230
fi
 
8231
 
 
8232
AC_LANG_RESTORE
 
8233
 
 
8234
GCC=$lt_save_GCC
 
8235
CC=$lt_save_CC
 
8236
CFLAGS=$lt_save_CFLAGS
 
8237
])# _LT_LANG_GO_CONFIG
 
8238
 
 
8239
 
 
8240
# _LT_LANG_RC_CONFIG([TAG])
 
8241
# -------------------------
 
8242
# Ensure that the configuration variables for the Windows resource compiler
 
8243
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8244
# to write the compiler configuration to `libtool'.
 
8245
m4_defun([_LT_LANG_RC_CONFIG],
 
8246
[AC_REQUIRE([LT_PROG_RC])dnl
 
8247
AC_LANG_SAVE
 
8248
 
 
8249
# Source file extension for RC test sources.
 
8250
ac_ext=rc
 
8251
 
 
8252
# Object file extension for compiled RC test sources.
 
8253
objext=o
 
8254
_LT_TAGVAR(objext, $1)=$objext
 
8255
 
 
8256
# Code to be used in simple compile tests
 
8257
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
8258
 
 
8259
# Code to be used in simple link tests
 
8260
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
8261
 
 
8262
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8263
_LT_TAG_COMPILER
 
8264
 
 
8265
# save warnings/boilerplate of simple test code
 
8266
_LT_COMPILER_BOILERPLATE
 
8267
_LT_LINKER_BOILERPLATE
 
8268
 
 
8269
# Allow CC to be a program name with arguments.
 
8270
lt_save_CC="$CC"
 
8271
lt_save_CFLAGS=$CFLAGS
 
8272
lt_save_GCC=$GCC
 
8273
GCC=
 
8274
CC=${RC-"windres"}
 
8275
CFLAGS=
 
8276
compiler=$CC
 
8277
_LT_TAGVAR(compiler, $1)=$CC
 
8278
_LT_CC_BASENAME([$compiler])
 
8279
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
8280
 
 
8281
if test -n "$compiler"; then
 
8282
  :
 
8283
  _LT_CONFIG($1)
 
8284
fi
 
8285
 
 
8286
GCC=$lt_save_GCC
 
8287
AC_LANG_RESTORE
 
8288
CC=$lt_save_CC
 
8289
CFLAGS=$lt_save_CFLAGS
 
8290
])# _LT_LANG_RC_CONFIG
 
8291
 
 
8292
 
 
8293
# LT_PROG_GCJ
 
8294
# -----------
 
8295
AC_DEFUN([LT_PROG_GCJ],
 
8296
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
 
8297
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
 
8298
    [AC_CHECK_TOOL(GCJ, gcj,)
 
8299
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
8300
      AC_SUBST(GCJFLAGS)])])[]dnl
 
8301
])
 
8302
 
 
8303
# Old name:
 
8304
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
 
8305
dnl aclocal-1.4 backwards compatibility:
 
8306
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
8307
 
 
8308
 
 
8309
# LT_PROG_GO
 
8310
# ----------
 
8311
AC_DEFUN([LT_PROG_GO],
 
8312
[AC_CHECK_TOOL(GOC, gccgo,)
 
8313
])
 
8314
 
 
8315
 
 
8316
# LT_PROG_RC
 
8317
# ----------
 
8318
AC_DEFUN([LT_PROG_RC],
 
8319
[AC_CHECK_TOOL(RC, windres,)
 
8320
])
 
8321
 
 
8322
# Old name:
 
8323
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
 
8324
dnl aclocal-1.4 backwards compatibility:
 
8325
dnl AC_DEFUN([LT_AC_PROG_RC], [])
 
8326
 
 
8327
 
 
8328
# _LT_DECL_EGREP
 
8329
# --------------
 
8330
# If we don't have a new enough Autoconf to choose the best grep
 
8331
# available, choose the one first in the user's PATH.
 
8332
m4_defun([_LT_DECL_EGREP],
 
8333
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
8334
AC_REQUIRE([AC_PROG_FGREP])dnl
 
8335
test -z "$GREP" && GREP=grep
 
8336
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
 
8337
_LT_DECL([], [EGREP], [1], [An ERE matcher])
 
8338
_LT_DECL([], [FGREP], [1], [A literal string matcher])
 
8339
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
 
8340
AC_SUBST([GREP])
 
8341
])
 
8342
 
 
8343
 
 
8344
# _LT_DECL_OBJDUMP
 
8345
# --------------
 
8346
# If we don't have a new enough Autoconf to choose the best objdump
 
8347
# available, choose the one first in the user's PATH.
 
8348
m4_defun([_LT_DECL_OBJDUMP],
 
8349
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
8350
test -z "$OBJDUMP" && OBJDUMP=objdump
 
8351
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
 
8352
AC_SUBST([OBJDUMP])
 
8353
])
 
8354
 
 
8355
# _LT_DECL_DLLTOOL
 
8356
# ----------------
 
8357
# Ensure DLLTOOL variable is set.
 
8358
m4_defun([_LT_DECL_DLLTOOL],
 
8359
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
8360
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
8361
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
 
8362
AC_SUBST([DLLTOOL])
 
8363
])
 
8364
 
 
8365
# _LT_DECL_SED
 
8366
# ------------
 
8367
# Check for a fully-functional sed program, that truncates
 
8368
# as few characters as possible.  Prefer GNU sed if found.
 
8369
m4_defun([_LT_DECL_SED],
 
8370
[AC_PROG_SED
 
8371
test -z "$SED" && SED=sed
 
8372
Xsed="$SED -e 1s/^X//"
 
8373
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
 
8374
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
 
8375
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
 
8376
])# _LT_DECL_SED
 
8377
 
 
8378
m4_ifndef([AC_PROG_SED], [
 
8379
# NOTE: This macro has been submitted for inclusion into   #
 
8380
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
8381
#  a released version of Autoconf we should remove this    #
 
8382
#  macro and use it instead.                               #
 
8383
 
 
8384
m4_defun([AC_PROG_SED],
 
8385
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
8386
AC_CACHE_VAL(lt_cv_path_SED,
 
8387
[# Loop through the user's path and test for sed and gsed.
 
8388
# Then use that list of sed's as ones to test for truncation.
 
8389
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
8390
for as_dir in $PATH
 
8391
do
 
8392
  IFS=$as_save_IFS
 
8393
  test -z "$as_dir" && as_dir=.
 
8394
  for lt_ac_prog in sed gsed; do
 
8395
    for ac_exec_ext in '' $ac_executable_extensions; do
 
8396
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
8397
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
 
8398
      fi
 
8399
    done
 
8400
  done
 
8401
done
 
8402
IFS=$as_save_IFS
 
8403
lt_ac_max=0
 
8404
lt_ac_count=0
 
8405
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
8406
# along with /bin/sed that truncates output.
 
8407
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
8408
  test ! -f $lt_ac_sed && continue
 
8409
  cat /dev/null > conftest.in
 
8410
  lt_ac_count=0
 
8411
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
8412
  # Check for GNU sed and select it if it is found.
 
8413
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
8414
    lt_cv_path_SED=$lt_ac_sed
 
8415
    break
 
8416
  fi
 
8417
  while true; do
 
8418
    cat conftest.in conftest.in >conftest.tmp
 
8419
    mv conftest.tmp conftest.in
 
8420
    cp conftest.in conftest.nl
 
8421
    echo >>conftest.nl
 
8422
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
8423
    cmp -s conftest.out conftest.nl || break
 
8424
    # 10000 chars as input seems more than enough
 
8425
    test $lt_ac_count -gt 10 && break
 
8426
    lt_ac_count=`expr $lt_ac_count + 1`
 
8427
    if test $lt_ac_count -gt $lt_ac_max; then
 
8428
      lt_ac_max=$lt_ac_count
 
8429
      lt_cv_path_SED=$lt_ac_sed
 
8430
    fi
 
8431
  done
 
8432
done
 
8433
])
 
8434
SED=$lt_cv_path_SED
 
8435
AC_SUBST([SED])
 
8436
AC_MSG_RESULT([$SED])
 
8437
])#AC_PROG_SED
 
8438
])#m4_ifndef
 
8439
 
 
8440
# Old name:
 
8441
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
 
8442
dnl aclocal-1.4 backwards compatibility:
 
8443
dnl AC_DEFUN([LT_AC_PROG_SED], [])
 
8444
 
 
8445
 
 
8446
# _LT_CHECK_SHELL_FEATURES
 
8447
# ------------------------
 
8448
# Find out whether the shell is Bourne or XSI compatible,
 
8449
# or has some other useful features.
 
8450
m4_defun([_LT_CHECK_SHELL_FEATURES],
 
8451
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
 
8452
# Try some XSI features
 
8453
xsi_shell=no
 
8454
( _lt_dummy="a/b/c"
 
8455
  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
 
8456
      = c,a/b,b/c, \
 
8457
    && eval 'test $(( 1 + 1 )) -eq 2 \
 
8458
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
 
8459
  && xsi_shell=yes
 
8460
AC_MSG_RESULT([$xsi_shell])
 
8461
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
 
8462
 
 
8463
AC_MSG_CHECKING([whether the shell understands "+="])
 
8464
lt_shell_append=no
 
8465
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
 
8466
    >/dev/null 2>&1 \
 
8467
  && lt_shell_append=yes
 
8468
AC_MSG_RESULT([$lt_shell_append])
 
8469
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
 
8470
 
 
8471
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
 
8472
  lt_unset=unset
 
8473
else
 
8474
  lt_unset=false
 
8475
fi
 
8476
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
 
8477
 
 
8478
# test EBCDIC or ASCII
 
8479
case `echo X|tr X '\101'` in
 
8480
 A) # ASCII based system
 
8481
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
 
8482
  lt_SP2NL='tr \040 \012'
 
8483
  lt_NL2SP='tr \015\012 \040\040'
 
8484
  ;;
 
8485
 *) # EBCDIC based system
 
8486
  lt_SP2NL='tr \100 \n'
 
8487
  lt_NL2SP='tr \r\n \100\100'
 
8488
  ;;
 
8489
esac
 
8490
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
 
8491
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 
8492
])# _LT_CHECK_SHELL_FEATURES
 
8493
 
 
8494
 
 
8495
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
 
8496
# ------------------------------------------------------
 
8497
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
 
8498
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
 
8499
m4_defun([_LT_PROG_FUNCTION_REPLACE],
 
8500
[dnl {
 
8501
sed -e '/^$1 ()$/,/^} # $1 /c\
 
8502
$1 ()\
 
8503
{\
 
8504
m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
 
8505
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
 
8506
  && mv -f "$cfgfile.tmp" "$cfgfile" \
 
8507
    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
 
8508
test 0 -eq $? || _lt_function_replace_fail=:
 
8509
])
 
8510
 
 
8511
 
 
8512
# _LT_PROG_REPLACE_SHELLFNS
 
8513
# -------------------------
 
8514
# Replace existing portable implementations of several shell functions with
 
8515
# equivalent extended shell implementations where those features are available..
 
8516
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
 
8517
[if test x"$xsi_shell" = xyes; then
 
8518
  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
 
8519
    case ${1} in
 
8520
      */*) func_dirname_result="${1%/*}${2}" ;;
 
8521
      *  ) func_dirname_result="${3}" ;;
 
8522
    esac])
 
8523
 
 
8524
  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
 
8525
    func_basename_result="${1##*/}"])
 
8526
 
 
8527
  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
 
8528
    case ${1} in
 
8529
      */*) func_dirname_result="${1%/*}${2}" ;;
 
8530
      *  ) func_dirname_result="${3}" ;;
 
8531
    esac
 
8532
    func_basename_result="${1##*/}"])
 
8533
 
 
8534
  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
 
8535
    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
 
8536
    # positional parameters, so assign one to ordinary parameter first.
 
8537
    func_stripname_result=${3}
 
8538
    func_stripname_result=${func_stripname_result#"${1}"}
 
8539
    func_stripname_result=${func_stripname_result%"${2}"}])
 
8540
 
 
8541
  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
 
8542
    func_split_long_opt_name=${1%%=*}
 
8543
    func_split_long_opt_arg=${1#*=}])
 
8544
 
 
8545
  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
 
8546
    func_split_short_opt_arg=${1#??}
 
8547
    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
 
8548
 
 
8549
  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
 
8550
    case ${1} in
 
8551
      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
 
8552
      *)    func_lo2o_result=${1} ;;
 
8553
    esac])
 
8554
 
 
8555
  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
 
8556
 
 
8557
  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
 
8558
 
 
8559
  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
 
8560
fi
 
8561
 
 
8562
if test x"$lt_shell_append" = xyes; then
 
8563
  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
 
8564
 
 
8565
  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
 
8566
    func_quote_for_eval "${2}"
 
8567
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
 
8568
    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
 
8569
 
 
8570
  # Save a `func_append' function call where possible by direct use of '+='
 
8571
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
 
8572
    && mv -f "$cfgfile.tmp" "$cfgfile" \
 
8573
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
 
8574
  test 0 -eq $? || _lt_function_replace_fail=:
 
8575
else
 
8576
  # Save a `func_append' function call even when '+=' is not available
 
8577
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
 
8578
    && mv -f "$cfgfile.tmp" "$cfgfile" \
 
8579
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
 
8580
  test 0 -eq $? || _lt_function_replace_fail=:
 
8581
fi
 
8582
 
 
8583
if test x"$_lt_function_replace_fail" = x":"; then
 
8584
  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
 
8585
fi
 
8586
])
 
8587
 
 
8588
# _LT_PATH_CONVERSION_FUNCTIONS
 
8589
# -----------------------------
 
8590
# Determine which file name conversion functions should be used by
 
8591
# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
 
8592
# for certain cross-compile configurations and native mingw.
 
8593
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
 
8594
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
8595
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
8596
AC_MSG_CHECKING([how to convert $build file names to $host format])
 
8597
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
 
8598
[case $host in
 
8599
  *-*-mingw* )
 
8600
    case $build in
 
8601
      *-*-mingw* ) # actually msys
 
8602
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
 
8603
        ;;
 
8604
      *-*-cygwin* )
 
8605
        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
 
8606
        ;;
 
8607
      * ) # otherwise, assume *nix
 
8608
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
 
8609
        ;;
 
8610
    esac
 
8611
    ;;
 
8612
  *-*-cygwin* )
 
8613
    case $build in
 
8614
      *-*-mingw* ) # actually msys
 
8615
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
 
8616
        ;;
 
8617
      *-*-cygwin* )
 
8618
        lt_cv_to_host_file_cmd=func_convert_file_noop
 
8619
        ;;
 
8620
      * ) # otherwise, assume *nix
 
8621
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
 
8622
        ;;
 
8623
    esac
 
8624
    ;;
 
8625
  * ) # unhandled hosts (and "normal" native builds)
 
8626
    lt_cv_to_host_file_cmd=func_convert_file_noop
 
8627
    ;;
 
8628
esac
 
8629
])
 
8630
to_host_file_cmd=$lt_cv_to_host_file_cmd
 
8631
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
 
8632
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
 
8633
         [0], [convert $build file names to $host format])dnl
 
8634
 
 
8635
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
 
8636
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
 
8637
[#assume ordinary cross tools, or native build.
 
8638
lt_cv_to_tool_file_cmd=func_convert_file_noop
 
8639
case $host in
 
8640
  *-*-mingw* )
 
8641
    case $build in
 
8642
      *-*-mingw* ) # actually msys
 
8643
        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
 
8644
        ;;
 
8645
    esac
 
8646
    ;;
 
8647
esac
 
8648
])
 
8649
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
 
8650
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
 
8651
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
 
8652
         [0], [convert $build files to toolchain format])dnl
 
8653
])# _LT_PATH_CONVERSION_FUNCTIONS
 
8654
 
 
8655
# Helper functions for option handling.                    -*- Autoconf -*-
 
8656
#
 
8657
#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
 
8658
#   Inc.
 
8659
#   Written by Gary V. Vaughan, 2004
 
8660
#
 
8661
# This file is free software; the Free Software Foundation gives
 
8662
# unlimited permission to copy and/or distribute it, with or without
 
8663
# modifications, as long as this notice is preserved.
 
8664
 
 
8665
# serial 7 ltoptions.m4
 
8666
 
 
8667
# This is to help aclocal find these macros, as it can't see m4_define.
 
8668
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
 
8669
 
 
8670
 
 
8671
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
 
8672
# ------------------------------------------
 
8673
m4_define([_LT_MANGLE_OPTION],
 
8674
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
 
8675
 
 
8676
 
 
8677
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
 
8678
# ---------------------------------------
 
8679
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
 
8680
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
 
8681
# saved as a flag.
 
8682
m4_define([_LT_SET_OPTION],
 
8683
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
 
8684
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
 
8685
        _LT_MANGLE_DEFUN([$1], [$2]),
 
8686
    [m4_warning([Unknown $1 option `$2'])])[]dnl
 
8687
])
 
8688
 
 
8689
 
 
8690
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
 
8691
# ------------------------------------------------------------
 
8692
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
8693
m4_define([_LT_IF_OPTION],
 
8694
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
 
8695
 
 
8696
 
 
8697
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
 
8698
# -------------------------------------------------------
 
8699
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
 
8700
# are set.
 
8701
m4_define([_LT_UNLESS_OPTIONS],
 
8702
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
 
8703
            [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
 
8704
                      [m4_define([$0_found])])])[]dnl
 
8705
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
 
8706
])[]dnl
 
8707
])
 
8708
 
 
8709
 
 
8710
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
 
8711
# ----------------------------------------
 
8712
# OPTION-LIST is a space-separated list of Libtool options associated
 
8713
# with MACRO-NAME.  If any OPTION has a matching handler declared with
 
8714
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
 
8715
# the unknown option and exit.
 
8716
m4_defun([_LT_SET_OPTIONS],
 
8717
[# Set options
 
8718
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
 
8719
    [_LT_SET_OPTION([$1], _LT_Option)])
 
8720
 
 
8721
m4_if([$1],[LT_INIT],[
 
8722
  dnl
 
8723
  dnl Simply set some default values (i.e off) if boolean options were not
 
8724
  dnl specified:
 
8725
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
 
8726
  ])
 
8727
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
 
8728
  ])
 
8729
  dnl
 
8730
  dnl If no reference was made to various pairs of opposing options, then
 
8731
  dnl we run the default mode handler for the pair.  For example, if neither
 
8732
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
 
8733
  dnl archives by default:
 
8734
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
 
8735
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
 
8736
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
 
8737
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
 
8738
                   [_LT_ENABLE_FAST_INSTALL])
 
8739
  ])
 
8740
])# _LT_SET_OPTIONS
 
8741
 
 
8742
 
 
8743
 
 
8744
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
 
8745
# -----------------------------------------
 
8746
m4_define([_LT_MANGLE_DEFUN],
 
8747
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
 
8748
 
 
8749
 
 
8750
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
 
8751
# -----------------------------------------------
 
8752
m4_define([LT_OPTION_DEFINE],
 
8753
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
 
8754
])# LT_OPTION_DEFINE
 
8755
 
 
8756
 
 
8757
# dlopen
 
8758
# ------
 
8759
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
 
8760
])
 
8761
 
 
8762
AU_DEFUN([AC_LIBTOOL_DLOPEN],
 
8763
[_LT_SET_OPTION([LT_INIT], [dlopen])
 
8764
AC_DIAGNOSE([obsolete],
 
8765
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
8766
put the `dlopen' option into LT_INIT's first parameter.])
 
8767
])
 
8768
 
 
8769
dnl aclocal-1.4 backwards compatibility:
 
8770
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
 
8771
 
 
8772
 
 
8773
# win32-dll
 
8774
# ---------
 
8775
# Declare package support for building win32 dll's.
 
8776
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
 
8777
[enable_win32_dll=yes
 
8778
 
 
8779
case $host in
 
8780
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
 
8781
  AC_CHECK_TOOL(AS, as, false)
 
8782
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
8783
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
8784
  ;;
 
8785
esac
 
8786
 
 
8787
test -z "$AS" && AS=as
 
8788
_LT_DECL([], [AS],      [1], [Assembler program])dnl
 
8789
 
 
8790
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
8791
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
 
8792
 
 
8793
test -z "$OBJDUMP" && OBJDUMP=objdump
 
8794
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
 
8795
])# win32-dll
 
8796
 
 
8797
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
8798
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
8799
_LT_SET_OPTION([LT_INIT], [win32-dll])
 
8800
AC_DIAGNOSE([obsolete],
 
8801
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
8802
put the `win32-dll' option into LT_INIT's first parameter.])
 
8803
])
 
8804
 
 
8805
dnl aclocal-1.4 backwards compatibility:
 
8806
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 
8807
 
 
8808
 
 
8809
# _LT_ENABLE_SHARED([DEFAULT])
 
8810
# ----------------------------
 
8811
# implement the --enable-shared flag, and supports the `shared' and
 
8812
# `disable-shared' LT_INIT options.
 
8813
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
8814
m4_define([_LT_ENABLE_SHARED],
 
8815
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
8816
AC_ARG_ENABLE([shared],
 
8817
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
8818
        [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
 
8819
    [p=${PACKAGE-default}
 
8820
    case $enableval in
 
8821
    yes) enable_shared=yes ;;
 
8822
    no) enable_shared=no ;;
 
8823
    *)
 
8824
      enable_shared=no
 
8825
      # Look at the argument we got.  We use all the common list separators.
 
8826
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
8827
      for pkg in $enableval; do
 
8828
        IFS="$lt_save_ifs"
 
8829
        if test "X$pkg" = "X$p"; then
 
8830
          enable_shared=yes
 
8831
        fi
 
8832
      done
 
8833
      IFS="$lt_save_ifs"
 
8834
      ;;
 
8835
    esac],
 
8836
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
 
8837
 
 
8838
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
 
8839
        [Whether or not to build shared libraries])
 
8840
])# _LT_ENABLE_SHARED
 
8841
 
 
8842
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
 
8843
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
 
8844
 
 
8845
# Old names:
 
8846
AC_DEFUN([AC_ENABLE_SHARED],
 
8847
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
 
8848
])
 
8849
 
 
8850
AC_DEFUN([AC_DISABLE_SHARED],
 
8851
[_LT_SET_OPTION([LT_INIT], [disable-shared])
 
8852
])
 
8853
 
 
8854
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
 
8855
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
8856
 
 
8857
dnl aclocal-1.4 backwards compatibility:
 
8858
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
 
8859
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 
8860
 
 
8861
 
 
8862
 
 
8863
# _LT_ENABLE_STATIC([DEFAULT])
 
8864
# ----------------------------
 
8865
# implement the --enable-static flag, and support the `static' and
 
8866
# `disable-static' LT_INIT options.
 
8867
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
8868
m4_define([_LT_ENABLE_STATIC],
 
8869
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
8870
AC_ARG_ENABLE([static],
 
8871
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
8872
        [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
 
8873
    [p=${PACKAGE-default}
 
8874
    case $enableval in
 
8875
    yes) enable_static=yes ;;
 
8876
    no) enable_static=no ;;
 
8877
    *)
 
8878
     enable_static=no
 
8879
      # Look at the argument we got.  We use all the common list separators.
 
8880
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
8881
      for pkg in $enableval; do
 
8882
        IFS="$lt_save_ifs"
 
8883
        if test "X$pkg" = "X$p"; then
 
8884
          enable_static=yes
 
8885
        fi
 
8886
      done
 
8887
      IFS="$lt_save_ifs"
 
8888
      ;;
 
8889
    esac],
 
8890
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
 
8891
 
 
8892
    _LT_DECL([build_old_libs], [enable_static], [0],
 
8893
        [Whether or not to build static libraries])
 
8894
])# _LT_ENABLE_STATIC
 
8895
 
 
8896
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
 
8897
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
 
8898
 
 
8899
# Old names:
 
8900
AC_DEFUN([AC_ENABLE_STATIC],
 
8901
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
 
8902
])
 
8903
 
 
8904
AC_DEFUN([AC_DISABLE_STATIC],
 
8905
[_LT_SET_OPTION([LT_INIT], [disable-static])
 
8906
])
 
8907
 
 
8908
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
 
8909
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
8910
 
 
8911
dnl aclocal-1.4 backwards compatibility:
 
8912
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
 
8913
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 
8914
 
 
8915
 
 
8916
 
 
8917
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
 
8918
# ----------------------------------
 
8919
# implement the --enable-fast-install flag, and support the `fast-install'
 
8920
# and `disable-fast-install' LT_INIT options.
 
8921
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
8922
m4_define([_LT_ENABLE_FAST_INSTALL],
 
8923
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
 
8924
AC_ARG_ENABLE([fast-install],
 
8925
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
8926
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
8927
    [p=${PACKAGE-default}
 
8928
    case $enableval in
 
8929
    yes) enable_fast_install=yes ;;
 
8930
    no) enable_fast_install=no ;;
 
8931
    *)
 
8932
      enable_fast_install=no
 
8933
      # Look at the argument we got.  We use all the common list separators.
 
8934
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
8935
      for pkg in $enableval; do
 
8936
        IFS="$lt_save_ifs"
 
8937
        if test "X$pkg" = "X$p"; then
 
8938
          enable_fast_install=yes
 
8939
        fi
 
8940
      done
 
8941
      IFS="$lt_save_ifs"
 
8942
      ;;
 
8943
    esac],
 
8944
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
 
8945
 
 
8946
_LT_DECL([fast_install], [enable_fast_install], [0],
 
8947
         [Whether or not to optimize for fast installation])dnl
 
8948
])# _LT_ENABLE_FAST_INSTALL
 
8949
 
 
8950
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
 
8951
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
 
8952
 
 
8953
# Old names:
 
8954
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
 
8955
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
 
8956
AC_DIAGNOSE([obsolete],
 
8957
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
 
8958
the `fast-install' option into LT_INIT's first parameter.])
 
8959
])
 
8960
 
 
8961
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
 
8962
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
 
8963
AC_DIAGNOSE([obsolete],
 
8964
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
 
8965
the `disable-fast-install' option into LT_INIT's first parameter.])
 
8966
])
 
8967
 
 
8968
dnl aclocal-1.4 backwards compatibility:
 
8969
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
 
8970
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 
8971
 
 
8972
 
 
8973
# _LT_WITH_PIC([MODE])
 
8974
# --------------------
 
8975
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
 
8976
# LT_INIT options.
 
8977
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
8978
m4_define([_LT_WITH_PIC],
 
8979
[AC_ARG_WITH([pic],
 
8980
    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
 
8981
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
8982
    [lt_p=${PACKAGE-default}
 
8983
    case $withval in
 
8984
    yes|no) pic_mode=$withval ;;
 
8985
    *)
 
8986
      pic_mode=default
 
8987
      # Look at the argument we got.  We use all the common list separators.
 
8988
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
8989
      for lt_pkg in $withval; do
 
8990
        IFS="$lt_save_ifs"
 
8991
        if test "X$lt_pkg" = "X$lt_p"; then
 
8992
          pic_mode=yes
 
8993
        fi
 
8994
      done
 
8995
      IFS="$lt_save_ifs"
 
8996
      ;;
 
8997
    esac],
 
8998
    [pic_mode=default])
 
8999
 
 
9000
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
 
9001
 
 
9002
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
 
9003
])# _LT_WITH_PIC
 
9004
 
 
9005
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
 
9006
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
 
9007
 
 
9008
# Old name:
 
9009
AU_DEFUN([AC_LIBTOOL_PICMODE],
 
9010
[_LT_SET_OPTION([LT_INIT], [pic-only])
 
9011
AC_DIAGNOSE([obsolete],
 
9012
[$0: Remove this warning and the call to _LT_SET_OPTION when you
 
9013
put the `pic-only' option into LT_INIT's first parameter.])
 
9014
])
 
9015
 
 
9016
dnl aclocal-1.4 backwards compatibility:
 
9017
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
 
9018
 
 
9019
 
 
9020
m4_define([_LTDL_MODE], [])
 
9021
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
 
9022
                 [m4_define([_LTDL_MODE], [nonrecursive])])
 
9023
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
 
9024
                 [m4_define([_LTDL_MODE], [recursive])])
 
9025
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
 
9026
                 [m4_define([_LTDL_MODE], [subproject])])
 
9027
 
 
9028
m4_define([_LTDL_TYPE], [])
 
9029
LT_OPTION_DEFINE([LTDL_INIT], [installable],
 
9030
                 [m4_define([_LTDL_TYPE], [installable])])
 
9031
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
 
9032
                 [m4_define([_LTDL_TYPE], [convenience])])
 
9033
 
 
9034
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 
9035
#
 
9036
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
9037
# Written by Gary V. Vaughan, 2004
 
9038
#
 
9039
# This file is free software; the Free Software Foundation gives
 
9040
# unlimited permission to copy and/or distribute it, with or without
 
9041
# modifications, as long as this notice is preserved.
 
9042
 
 
9043
# serial 6 ltsugar.m4
 
9044
 
 
9045
# This is to help aclocal find these macros, as it can't see m4_define.
 
9046
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
 
9047
 
 
9048
 
 
9049
# lt_join(SEP, ARG1, [ARG2...])
 
9050
# -----------------------------
 
9051
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
 
9052
# associated separator.
 
9053
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
 
9054
# versions in m4sugar had bugs.
 
9055
m4_define([lt_join],
 
9056
[m4_if([$#], [1], [],
 
9057
       [$#], [2], [[$2]],
 
9058
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
 
9059
m4_define([_lt_join],
 
9060
[m4_if([$#$2], [2], [],
 
9061
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
 
9062
 
 
9063
 
 
9064
# lt_car(LIST)
 
9065
# lt_cdr(LIST)
 
9066
# ------------
 
9067
# Manipulate m4 lists.
 
9068
# These macros are necessary as long as will still need to support
 
9069
# Autoconf-2.59 which quotes differently.
 
9070
m4_define([lt_car], [[$1]])
 
9071
m4_define([lt_cdr],
 
9072
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
 
9073
       [$#], 1, [],
 
9074
       [m4_dquote(m4_shift($@))])])
 
9075
m4_define([lt_unquote], $1)
 
9076
 
 
9077
 
 
9078
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
 
9079
# ------------------------------------------
 
9080
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
 
9081
# Note that neither SEPARATOR nor STRING are expanded; they are appended
 
9082
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
 
9083
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
 
9084
# than defined and empty).
 
9085
#
 
9086
# This macro is needed until we can rely on Autoconf 2.62, since earlier
 
9087
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
 
9088
m4_define([lt_append],
 
9089
[m4_define([$1],
 
9090
           m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
 
9091
 
 
9092
 
 
9093
 
 
9094
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
 
9095
# ----------------------------------------------------------
 
9096
# Produce a SEP delimited list of all paired combinations of elements of
 
9097
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
 
9098
# has the form PREFIXmINFIXSUFFIXn.
 
9099
# Needed until we can rely on m4_combine added in Autoconf 2.62.
 
9100
m4_define([lt_combine],
 
9101
[m4_if(m4_eval([$# > 3]), [1],
 
9102
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
 
9103
[[m4_foreach([_Lt_prefix], [$2],
 
9104
             [m4_foreach([_Lt_suffix],
 
9105
                ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
 
9106
        [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
 
9107
 
 
9108
 
 
9109
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
 
9110
# -----------------------------------------------------------------------
 
9111
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
 
9112
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
 
9113
m4_define([lt_if_append_uniq],
 
9114
[m4_ifdef([$1],
 
9115
          [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
 
9116
                 [lt_append([$1], [$2], [$3])$4],
 
9117
                 [$5])],
 
9118
          [lt_append([$1], [$2], [$3])$4])])
 
9119
 
 
9120
 
 
9121
# lt_dict_add(DICT, KEY, VALUE)
 
9122
# -----------------------------
 
9123
m4_define([lt_dict_add],
 
9124
[m4_define([$1($2)], [$3])])
 
9125
 
 
9126
 
 
9127
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
 
9128
# --------------------------------------------
 
9129
m4_define([lt_dict_add_subkey],
 
9130
[m4_define([$1($2:$3)], [$4])])
 
9131
 
 
9132
 
 
9133
# lt_dict_fetch(DICT, KEY, [SUBKEY])
 
9134
# ----------------------------------
 
9135
m4_define([lt_dict_fetch],
 
9136
[m4_ifval([$3],
 
9137
        m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
 
9138
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
 
9139
 
 
9140
 
 
9141
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
 
9142
# -----------------------------------------------------------------
 
9143
m4_define([lt_if_dict_fetch],
 
9144
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
 
9145
        [$5],
 
9146
    [$6])])
 
9147
 
 
9148
 
 
9149
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
 
9150
# --------------------------------------------------------------
 
9151
m4_define([lt_dict_filter],
 
9152
[m4_if([$5], [], [],
 
9153
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
 
9154
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
 
9155
                      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
 
9156
])
 
9157
 
 
9158
# ltversion.m4 -- version numbers                       -*- Autoconf -*-
 
9159
#
 
9160
#   Copyright (C) 2004 Free Software Foundation, Inc.
 
9161
#   Written by Scott James Remnant, 2004
 
9162
#
 
9163
# This file is free software; the Free Software Foundation gives
 
9164
# unlimited permission to copy and/or distribute it, with or without
 
9165
# modifications, as long as this notice is preserved.
 
9166
 
 
9167
# @configure_input@
 
9168
 
 
9169
# serial 3337 ltversion.m4
 
9170
# This file is part of GNU Libtool
 
9171
 
 
9172
m4_define([LT_PACKAGE_VERSION], [2.4.2])
 
9173
m4_define([LT_PACKAGE_REVISION], [1.3337])
 
9174
 
 
9175
AC_DEFUN([LTVERSION_VERSION],
 
9176
[macro_version='2.4.2'
 
9177
macro_revision='1.3337'
 
9178
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 
9179
_LT_DECL(, macro_revision, 0)
 
9180
])
 
9181
 
 
9182
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 
9183
#
 
9184
#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
 
9185
#   Written by Scott James Remnant, 2004.
 
9186
#
 
9187
# This file is free software; the Free Software Foundation gives
 
9188
# unlimited permission to copy and/or distribute it, with or without
 
9189
# modifications, as long as this notice is preserved.
 
9190
 
 
9191
# serial 5 lt~obsolete.m4
 
9192
 
 
9193
# These exist entirely to fool aclocal when bootstrapping libtool.
 
9194
#
 
9195
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
 
9196
# which have later been changed to m4_define as they aren't part of the
 
9197
# exported API, or moved to Autoconf or Automake where they belong.
 
9198
#
 
9199
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
 
9200
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
 
9201
# using a macro with the same name in our local m4/libtool.m4 it'll
 
9202
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
 
9203
# and doesn't know about Autoconf macros at all.)
 
9204
#
 
9205
# So we provide this file, which has a silly filename so it's always
 
9206
# included after everything else.  This provides aclocal with the
 
9207
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
 
9208
# because those macros already exist, or will be overwritten later.
 
9209
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
 
9210
#
 
9211
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
 
9212
# Yes, that means every name once taken will need to remain here until
 
9213
# we give up compatibility with versions before 1.7, at which point
 
9214
# we need to keep only those names which we still refer to.
 
9215
 
 
9216
# This is to help aclocal find these macros, as it can't see m4_define.
 
9217
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
 
9218
 
 
9219
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
 
9220
m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
 
9221
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
 
9222
m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
 
9223
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
 
9224
m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
 
9225
m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
 
9226
m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
 
9227
m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
 
9228
m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
 
9229
m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
 
9230
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
 
9231
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
 
9232
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
 
9233
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
 
9234
m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
 
9235
m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
 
9236
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
 
9237
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
 
9238
m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
 
9239
m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
 
9240
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
 
9241
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
 
9242
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
 
9243
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
 
9244
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
 
9245
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
 
9246
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
 
9247
m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
 
9248
m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
 
9249
m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
 
9250
m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
 
9251
m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
 
9252
m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
 
9253
m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
 
9254
m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
 
9255
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
 
9256
m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
 
9257
m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
 
9258
m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
 
9259
m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
 
9260
m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
 
9261
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
 
9262
m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
 
9263
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
 
9264
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
 
9265
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
 
9266
m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
 
9267
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
 
9268
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
 
9269
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
 
9270
m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
 
9271
m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
 
9272
m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
 
9273
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
 
9274
m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
 
9275
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
 
9276
m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
 
9277
m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
 
9278
m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
 
9279
m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
 
9280
 
 
9281
# nls.m4 serial 5 (gettext-0.18)
 
9282
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
 
9283
dnl Inc.
 
9284
dnl This file is free software; the Free Software Foundation
 
9285
dnl gives unlimited permission to copy and/or distribute it,
 
9286
dnl with or without modifications, as long as this notice is preserved.
 
9287
dnl
 
9288
dnl This file can can be used in projects which are not available under
 
9289
dnl the GNU General Public License or the GNU Library General Public
 
9290
dnl License but which still want to provide support for the GNU gettext
 
9291
dnl functionality.
 
9292
dnl Please note that the actual code of the GNU gettext library is covered
 
9293
dnl by the GNU Library General Public License, and the rest of the GNU
 
9294
dnl gettext package package is covered by the GNU General Public License.
 
9295
dnl They are *not* in the public domain.
 
9296
 
 
9297
dnl Authors:
 
9298
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
9299
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
9300
 
 
9301
AC_PREREQ([2.50])
 
9302
 
 
9303
AC_DEFUN([AM_NLS],
 
9304
[
 
9305
  AC_MSG_CHECKING([whether NLS is requested])
 
9306
  dnl Default is enabled NLS
 
9307
  AC_ARG_ENABLE([nls],
 
9308
    [  --disable-nls           do not use Native Language Support],
 
9309
    USE_NLS=$enableval, USE_NLS=yes)
 
9310
  AC_MSG_RESULT([$USE_NLS])
 
9311
  AC_SUBST([USE_NLS])
 
9312
])
 
9313
 
 
9314
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
9315
# serial 1 (pkg-config-0.24)
 
9316
 
9317
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
9318
#
 
9319
# This program is free software; you can redistribute it and/or modify
 
9320
# it under the terms of the GNU General Public License as published by
 
9321
# the Free Software Foundation; either version 2 of the License, or
 
9322
# (at your option) any later version.
 
9323
#
 
9324
# This program is distributed in the hope that it will be useful, but
 
9325
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
9326
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
9327
# General Public License for more details.
 
9328
#
 
9329
# You should have received a copy of the GNU General Public License
 
9330
# along with this program; if not, write to the Free Software
 
9331
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
9332
#
 
9333
# As a special exception to the GNU General Public License, if you
 
9334
# distribute this file as part of a program that contains a
 
9335
# configuration script generated by Autoconf, you may include it under
 
9336
# the same distribution terms that you use for the rest of that program.
 
9337
 
 
9338
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
9339
# ----------------------------------
 
9340
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
9341
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
9342
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
 
9343
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
 
9344
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
9345
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
9346
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
9347
 
 
9348
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
9349
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
9350
fi
 
9351
if test -n "$PKG_CONFIG"; then
 
9352
        _pkg_min_version=m4_default([$1], [0.9.0])
 
9353
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
9354
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
9355
                AC_MSG_RESULT([yes])
 
9356
        else
 
9357
                AC_MSG_RESULT([no])
 
9358
                PKG_CONFIG=""
 
9359
        fi
 
9360
fi[]dnl
 
9361
])# PKG_PROG_PKG_CONFIG
 
9362
 
 
9363
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
9364
#
 
9365
# Check to see whether a particular set of modules exists.  Similar
 
9366
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
9367
#
 
9368
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
9369
# only at the first occurence in configure.ac, so if the first place
 
9370
# it's called might be skipped (such as if it is within an "if", you
 
9371
# have to call PKG_CHECK_EXISTS manually
 
9372
# --------------------------------------------------------------
 
9373
AC_DEFUN([PKG_CHECK_EXISTS],
 
9374
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
9375
if test -n "$PKG_CONFIG" && \
 
9376
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
9377
  m4_default([$2], [:])
 
9378
m4_ifvaln([$3], [else
 
9379
  $3])dnl
 
9380
fi])
 
9381
 
 
9382
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
9383
# ---------------------------------------------
 
9384
m4_define([_PKG_CONFIG],
 
9385
[if test -n "$$1"; then
 
9386
    pkg_cv_[]$1="$$1"
 
9387
 elif test -n "$PKG_CONFIG"; then
 
9388
    PKG_CHECK_EXISTS([$3],
 
9389
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
 
9390
                      test "x$?" != "x0" && pkg_failed=yes ],
 
9391
                     [pkg_failed=yes])
 
9392
 else
 
9393
    pkg_failed=untried
 
9394
fi[]dnl
 
9395
])# _PKG_CONFIG
 
9396
 
 
9397
# _PKG_SHORT_ERRORS_SUPPORTED
 
9398
# -----------------------------
 
9399
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
9400
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
9401
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
9402
        _pkg_short_errors_supported=yes
 
9403
else
 
9404
        _pkg_short_errors_supported=no
 
9405
fi[]dnl
 
9406
])# _PKG_SHORT_ERRORS_SUPPORTED
 
9407
 
 
9408
 
 
9409
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
9410
# [ACTION-IF-NOT-FOUND])
 
9411
#
 
9412
#
 
9413
# Note that if there is a possibility the first call to
 
9414
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
9415
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
9416
#
 
9417
#
 
9418
# --------------------------------------------------------------
 
9419
AC_DEFUN([PKG_CHECK_MODULES],
 
9420
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
9421
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
9422
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
9423
 
 
9424
pkg_failed=no
 
9425
AC_MSG_CHECKING([for $1])
 
9426
 
 
9427
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
9428
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
9429
 
 
9430
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
9431
and $1[]_LIBS to avoid the need to call pkg-config.
 
9432
See the pkg-config man page for more details.])
 
9433
 
 
9434
if test $pkg_failed = yes; then
 
9435
        AC_MSG_RESULT([no])
 
9436
        _PKG_SHORT_ERRORS_SUPPORTED
 
9437
        if test $_pkg_short_errors_supported = yes; then
 
9438
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
 
9439
        else 
 
9440
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
 
9441
        fi
 
9442
        # Put the nasty error message in config.log where it belongs
 
9443
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
9444
 
 
9445
        m4_default([$4], [AC_MSG_ERROR(
 
9446
[Package requirements ($2) were not met:
 
9447
 
 
9448
$$1_PKG_ERRORS
 
9449
 
 
9450
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
9451
installed software in a non-standard prefix.
 
9452
 
 
9453
_PKG_TEXT])[]dnl
 
9454
        ])
 
9455
elif test $pkg_failed = untried; then
 
9456
        AC_MSG_RESULT([no])
 
9457
        m4_default([$4], [AC_MSG_FAILURE(
 
9458
[The pkg-config script could not be found or is too old.  Make sure it
 
9459
is in your PATH or set the PKG_CONFIG environment variable to the full
 
9460
path to pkg-config.
 
9461
 
 
9462
_PKG_TEXT
 
9463
 
 
9464
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 
9465
        ])
 
9466
else
 
9467
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
9468
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
9469
        AC_MSG_RESULT([yes])
 
9470
        $3
 
9471
fi[]dnl
 
9472
])# PKG_CHECK_MODULES
 
9473
 
23
9474
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
24
9475
# Foundation, Inc.
25
9476
#
1131
10582
          AC_MSG_ERROR([Vala $1 not found.])])])])
1132
10583
])
1133
10584
 
1134
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1135
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1136
 
#
1137
 
# This file is free software, distributed under the terms of the GNU
1138
 
# General Public License.  As a special exception to the GNU General
1139
 
# Public License, this file may be distributed as part of a program
1140
 
# that contains a configuration script generated by Autoconf, under
1141
 
# the same distribution terms as the rest of that program.
1142
 
#
1143
 
# This file can be copied and used freely without restrictions.  It can
1144
 
# be used in projects which are not available under the GNU Public License
1145
 
# but which still want to provide support for the GNU gettext functionality.
1146
 
#
1147
 
# Macro to add for using GNU gettext.
1148
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1149
 
#
1150
 
# Modified to never use included libintl. 
1151
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
1152
 
#
1153
 
# Major rework to remove unused code
1154
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
1155
 
#
1156
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
1157
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
1158
 
#
1159
 
# Modified to require ngettext
1160
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
1161
 
#
1162
 
# We need this here as well, since someone might use autoconf-2.5x
1163
 
# to configure GLib then an older version to configure a package
1164
 
# using AM_GLIB_GNU_GETTEXT
1165
 
AC_PREREQ(2.53)
1166
 
 
1167
 
dnl
1168
 
dnl We go to great lengths to make sure that aclocal won't 
1169
 
dnl try to pull in the installed version of these macros
1170
 
dnl when running aclocal in the glib directory.
1171
 
dnl
1172
 
m4_copy([AC_DEFUN],[glib_DEFUN])
1173
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
1174
 
dnl
1175
 
dnl At the end, if we're not within glib, we'll define the public
1176
 
dnl definitions in terms of our private definitions.
1177
 
dnl
1178
 
 
1179
 
# GLIB_LC_MESSAGES
1180
 
#--------------------
1181
 
glib_DEFUN([GLIB_LC_MESSAGES],
1182
 
  [AC_CHECK_HEADERS([locale.h])
1183
 
    if test $ac_cv_header_locale_h = yes; then
1184
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1185
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1186
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1187
 
    if test $am_cv_val_LC_MESSAGES = yes; then
1188
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
1189
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
1190
 
    fi
1191
 
  fi])
1192
 
 
1193
 
# GLIB_PATH_PROG_WITH_TEST
1194
 
#----------------------------
1195
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1196
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1197
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1198
 
[# Extract the first word of "$2", so it can be a program name with args.
1199
 
set dummy $2; ac_word=[$]2
1200
 
AC_MSG_CHECKING([for $ac_word])
1201
 
AC_CACHE_VAL(ac_cv_path_$1,
1202
 
[case "[$]$1" in
1203
 
  /*)
1204
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1205
 
  ;;
1206
 
  *)
1207
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1208
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
1209
 
    test -z "$ac_dir" && ac_dir=.
1210
 
    if test -f $ac_dir/$ac_word; then
1211
 
      if [$3]; then
1212
 
        ac_cv_path_$1="$ac_dir/$ac_word"
1213
 
        break
1214
 
      fi
1215
 
    fi
1216
 
  done
1217
 
  IFS="$ac_save_ifs"
1218
 
dnl If no 4th arg is given, leave the cache variable unset,
1219
 
dnl so AC_PATH_PROGS will keep looking.
1220
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1221
 
])dnl
1222
 
  ;;
1223
 
esac])dnl
1224
 
$1="$ac_cv_path_$1"
1225
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1226
 
  AC_MSG_RESULT([$]$1)
1227
 
else
1228
 
  AC_MSG_RESULT(no)
1229
 
fi
1230
 
AC_SUBST($1)dnl
1231
 
])
1232
 
 
1233
 
# GLIB_WITH_NLS
1234
 
#-----------------
1235
 
glib_DEFUN([GLIB_WITH_NLS],
1236
 
  dnl NLS is obligatory
1237
 
  [USE_NLS=yes
1238
 
    AC_SUBST(USE_NLS)
1239
 
 
1240
 
    gt_cv_have_gettext=no
1241
 
 
1242
 
    CATOBJEXT=NONE
1243
 
    XGETTEXT=:
1244
 
    INTLLIBS=
1245
 
 
1246
 
    AC_CHECK_HEADER(libintl.h,
1247
 
     [gt_cv_func_dgettext_libintl="no"
1248
 
      libintl_extra_libs=""
1249
 
 
1250
 
      #
1251
 
      # First check in libc
1252
 
      #
1253
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1254
 
        [AC_TRY_LINK([
1255
 
#include <libintl.h>
1256
 
],
1257
 
         [return !ngettext ("","", 1)],
1258
 
          gt_cv_func_ngettext_libc=yes,
1259
 
          gt_cv_func_ngettext_libc=no)
1260
 
        ])
1261
 
  
1262
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1263
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1264
 
                [AC_TRY_LINK([
1265
 
#include <libintl.h>
1266
 
],
1267
 
                  [return !dgettext ("","")],
1268
 
                  gt_cv_func_dgettext_libc=yes,
1269
 
                  gt_cv_func_dgettext_libc=no)
1270
 
                ])
1271
 
      fi
1272
 
  
1273
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1274
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
1275
 
      fi
1276
 
 
1277
 
      #
1278
 
      # If we don't have everything we want, check in libintl
1279
 
      #
1280
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
1281
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
1282
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1283
 
        
1284
 
        AC_CHECK_LIB(intl, bindtextdomain,
1285
 
            [AC_CHECK_LIB(intl, ngettext,
1286
 
                    [AC_CHECK_LIB(intl, dgettext,
1287
 
                                  gt_cv_func_dgettext_libintl=yes)])])
1288
 
 
1289
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1290
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
1291
 
          AC_MSG_RESULT([])
1292
 
          AC_CHECK_LIB(intl, ngettext,
1293
 
                [AC_CHECK_LIB(intl, dcgettext,
1294
 
                       [gt_cv_func_dgettext_libintl=yes
1295
 
                        libintl_extra_libs=-liconv],
1296
 
                        :,-liconv)],
1297
 
                :,-liconv)
1298
 
        fi
1299
 
 
1300
 
        #
1301
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
1302
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
1303
 
        # and both have dgettext and ngettext
1304
 
        #
1305
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1306
 
          glib_save_LIBS="$LIBS"
1307
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
1308
 
          unset ac_cv_func_bind_textdomain_codeset
1309
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
1310
 
          LIBS="$glib_save_LIBS"
1311
 
 
1312
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1313
 
            gt_cv_func_dgettext_libc=no
1314
 
          else
1315
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
1316
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
1317
 
              gt_cv_func_dgettext_libintl=no
1318
 
            fi
1319
 
          fi
1320
 
        fi
1321
 
      fi
1322
 
 
1323
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
1324
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
1325
 
        gt_cv_have_gettext=yes
1326
 
      fi
1327
 
  
1328
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1329
 
        INTLLIBS="-lintl $libintl_extra_libs"
1330
 
      fi
1331
 
  
1332
 
      if test "$gt_cv_have_gettext" = "yes"; then
1333
 
        AC_DEFINE(HAVE_GETTEXT,1,
1334
 
          [Define if the GNU gettext() function is already present or preinstalled.])
1335
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1336
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1337
 
        if test "$MSGFMT" != "no"; then
1338
 
          glib_save_LIBS="$LIBS"
1339
 
          LIBS="$LIBS $INTLLIBS"
1340
 
          AC_CHECK_FUNCS(dcgettext)
1341
 
          MSGFMT_OPTS=
1342
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
1343
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1344
 
msgid ""
1345
 
msgstr ""
1346
 
"Content-Type: text/plain; charset=UTF-8\n"
1347
 
"Project-Id-Version: test 1.0\n"
1348
 
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1349
 
"Last-Translator: test <foo@bar.xx>\n"
1350
 
"Language-Team: C <LL@li.org>\n"
1351
 
"MIME-Version: 1.0\n"
1352
 
"Content-Transfer-Encoding: 8bit\n"
1353
 
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1354
 
          AC_SUBST(MSGFMT_OPTS)
1355
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1356
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1357
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1358
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1359
 
                         return _nl_msg_cat_cntr],
1360
 
            [CATOBJEXT=.gmo 
1361
 
             DATADIRNAME=share],
1362
 
            [case $host in
1363
 
            *-*-solaris*)
1364
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
1365
 
            dnl GNU format message catalog is always supported,
1366
 
            dnl since both are added to the libc all together.
1367
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
1368
 
            dnl and CATOBJEXT=.gmo in this case.
1369
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
1370
 
              [CATOBJEXT=.gmo 
1371
 
               DATADIRNAME=share],
1372
 
              [CATOBJEXT=.mo
1373
 
               DATADIRNAME=lib])
1374
 
            ;;
1375
 
            *-*-openbsd*)
1376
 
            CATOBJEXT=.mo
1377
 
            DATADIRNAME=share
1378
 
            ;;
1379
 
            *)
1380
 
            CATOBJEXT=.mo
1381
 
            DATADIRNAME=lib
1382
 
            ;;
1383
 
            esac])
1384
 
          LIBS="$glib_save_LIBS"
1385
 
          INSTOBJEXT=.mo
1386
 
        else
1387
 
          gt_cv_have_gettext=no
1388
 
        fi
1389
 
      fi
1390
 
    ])
1391
 
 
1392
 
    if test "$gt_cv_have_gettext" = "yes" ; then
1393
 
      AC_DEFINE(ENABLE_NLS, 1,
1394
 
        [always defined to indicate that i18n is enabled])
1395
 
    fi
1396
 
 
1397
 
    dnl Test whether we really found GNU xgettext.
1398
 
    if test "$XGETTEXT" != ":"; then
1399
 
      dnl If it is not GNU xgettext we define it as : so that the
1400
 
      dnl Makefiles still can work.
1401
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1402
 
        : ;
1403
 
      else
1404
 
        AC_MSG_RESULT(
1405
 
          [found xgettext program is not GNU xgettext; ignore it])
1406
 
        XGETTEXT=":"
1407
 
      fi
1408
 
    fi
1409
 
 
1410
 
    # We need to process the po/ directory.
1411
 
    POSUB=po
1412
 
 
1413
 
    AC_OUTPUT_COMMANDS(
1414
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
1415
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1416
 
      esac])
1417
 
 
1418
 
    dnl These rules are solely for the distribution goal.  While doing this
1419
 
    dnl we only have to keep exactly one list of the available catalogs
1420
 
    dnl in configure.ac.
1421
 
    for lang in $ALL_LINGUAS; do
1422
 
      GMOFILES="$GMOFILES $lang.gmo"
1423
 
      POFILES="$POFILES $lang.po"
1424
 
    done
1425
 
 
1426
 
    dnl Make all variables we use known to autoconf.
1427
 
    AC_SUBST(CATALOGS)
1428
 
    AC_SUBST(CATOBJEXT)
1429
 
    AC_SUBST(DATADIRNAME)
1430
 
    AC_SUBST(GMOFILES)
1431
 
    AC_SUBST(INSTOBJEXT)
1432
 
    AC_SUBST(INTLLIBS)
1433
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
1434
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
1435
 
    AC_SUBST(POFILES)
1436
 
    AC_SUBST(POSUB)
1437
 
  ])
1438
 
 
1439
 
# AM_GLIB_GNU_GETTEXT
1440
 
# -------------------
1441
 
# Do checks necessary for use of gettext. If a suitable implementation 
1442
 
# of gettext is found in either in libintl or in the C library,
1443
 
# it will set INTLLIBS to the libraries needed for use of gettext
1444
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1445
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1446
 
# on various variables needed by the Makefile.in.in installed by 
1447
 
# glib-gettextize.
1448
 
dnl
1449
 
glib_DEFUN([GLIB_GNU_GETTEXT],
1450
 
  [AC_REQUIRE([AC_PROG_CC])dnl
1451
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
1452
 
   
1453
 
   GLIB_LC_MESSAGES
1454
 
   GLIB_WITH_NLS
1455
 
 
1456
 
   if test "$gt_cv_have_gettext" = "yes"; then
1457
 
     if test "x$ALL_LINGUAS" = "x"; then
1458
 
       LINGUAS=
1459
 
     else
1460
 
       AC_MSG_CHECKING(for catalogs to be installed)
1461
 
       NEW_LINGUAS=
1462
 
       for presentlang in $ALL_LINGUAS; do
1463
 
         useit=no
1464
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1465
 
           desiredlanguages="$LINGUAS"
1466
 
         else
1467
 
           desiredlanguages="$ALL_LINGUAS"
1468
 
         fi
1469
 
         for desiredlang in $desiredlanguages; do
1470
 
           # Use the presentlang catalog if desiredlang is
1471
 
           #   a. equal to presentlang, or
1472
 
           #   b. a variant of presentlang (because in this case,
1473
 
           #      presentlang can be used as a fallback for messages
1474
 
           #      which are not translated in the desiredlang catalog).
1475
 
           case "$desiredlang" in
1476
 
             "$presentlang"*) useit=yes;;
1477
 
           esac
1478
 
         done
1479
 
         if test $useit = yes; then
1480
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1481
 
         fi
1482
 
       done
1483
 
       LINGUAS=$NEW_LINGUAS
1484
 
       AC_MSG_RESULT($LINGUAS)
1485
 
     fi
1486
 
 
1487
 
     dnl Construct list of names of catalog files to be constructed.
1488
 
     if test -n "$LINGUAS"; then
1489
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1490
 
     fi
1491
 
   fi
1492
 
 
1493
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1494
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1495
 
   dnl Try to locate is.
1496
 
   MKINSTALLDIRS=
1497
 
   if test -n "$ac_aux_dir"; then
1498
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1499
 
   fi
1500
 
   if test -z "$MKINSTALLDIRS"; then
1501
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1502
 
   fi
1503
 
   AC_SUBST(MKINSTALLDIRS)
1504
 
 
1505
 
   dnl Generate list of files to be processed by xgettext which will
1506
 
   dnl be included in po/Makefile.
1507
 
   test -d po || mkdir po
1508
 
   if test "x$srcdir" != "x."; then
1509
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1510
 
       posrcprefix="$srcdir/"
1511
 
     else
1512
 
       posrcprefix="../$srcdir/"
1513
 
     fi
1514
 
   else
1515
 
     posrcprefix="../"
1516
 
   fi
1517
 
   rm -f po/POTFILES
1518
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1519
 
        < $srcdir/po/POTFILES.in > po/POTFILES
1520
 
  ])
1521
 
 
1522
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1523
 
# -------------------------------
1524
 
# Define VARIABLE to the location where catalog files will
1525
 
# be installed by po/Makefile.
1526
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1527
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1528
 
glib_save_prefix="$prefix"
1529
 
glib_save_exec_prefix="$exec_prefix"
1530
 
glib_save_datarootdir="$datarootdir"
1531
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1532
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1533
 
datarootdir=`eval echo "${datarootdir}"`
1534
 
if test "x$CATOBJEXT" = "x.mo" ; then
1535
 
  localedir=`eval echo "${libdir}/locale"`
1536
 
else
1537
 
  localedir=`eval echo "${datadir}/locale"`
1538
 
fi
1539
 
prefix="$glib_save_prefix"
1540
 
exec_prefix="$glib_save_exec_prefix"
1541
 
datarootdir="$glib_save_datarootdir"
1542
 
AC_DEFINE_UNQUOTED($1, "$localedir",
1543
 
  [Define the location where the catalogs will be installed])
1544
 
])
1545
 
 
1546
 
dnl
1547
 
dnl Now the definitions that aclocal will find
1548
 
dnl
1549
 
ifdef(glib_configure_ac,[],[
1550
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1551
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1552
 
])dnl
1553
 
 
1554
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1555
 
1556
 
# Create a temporary file with TEST-FILE as its contents and pass the
1557
 
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
1558
 
# 0 and perform ACTION-IF-FAIL for any other exit status.
1559
 
AC_DEFUN([GLIB_RUN_PROG],
1560
 
[cat >conftest.foo <<_ACEOF
1561
 
$2
1562
 
_ACEOF
1563
 
if AC_RUN_LOG([$1 conftest.foo]); then
1564
 
  m4_ifval([$3], [$3], [:])
1565
 
m4_ifvaln([$4], [else $4])dnl
1566
 
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1567
 
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1568
 
fi])
1569
 
 
1570
 
 
1571
 
# nls.m4 serial 5 (gettext-0.18)
1572
 
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1573
 
dnl Inc.
1574
 
dnl This file is free software; the Free Software Foundation
1575
 
dnl gives unlimited permission to copy and/or distribute it,
1576
 
dnl with or without modifications, as long as this notice is preserved.
1577
 
dnl
1578
 
dnl This file can can be used in projects which are not available under
1579
 
dnl the GNU General Public License or the GNU Library General Public
1580
 
dnl License but which still want to provide support for the GNU gettext
1581
 
dnl functionality.
1582
 
dnl Please note that the actual code of the GNU gettext library is covered
1583
 
dnl by the GNU Library General Public License, and the rest of the GNU
1584
 
dnl gettext package package is covered by the GNU General Public License.
1585
 
dnl They are *not* in the public domain.
1586
 
 
1587
 
dnl Authors:
1588
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1589
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1590
 
 
1591
 
AC_PREREQ([2.50])
1592
 
 
1593
 
AC_DEFUN([AM_NLS],
1594
 
[
1595
 
  AC_MSG_CHECKING([whether NLS is requested])
1596
 
  dnl Default is enabled NLS
1597
 
  AC_ARG_ENABLE([nls],
1598
 
    [  --disable-nls           do not use Native Language Support],
1599
 
    USE_NLS=$enableval, USE_NLS=yes)
1600
 
  AC_MSG_RESULT([$USE_NLS])
1601
 
  AC_SUBST([USE_NLS])
1602
 
])
1603
 
 
1604
 
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1605
 
# serial 1 (pkg-config-0.24)
1606
 
1607
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1608
 
#
1609
 
# This program is free software; you can redistribute it and/or modify
1610
 
# it under the terms of the GNU General Public License as published by
1611
 
# the Free Software Foundation; either version 2 of the License, or
1612
 
# (at your option) any later version.
1613
 
#
1614
 
# This program is distributed in the hope that it will be useful, but
1615
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
1616
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1617
 
# General Public License for more details.
1618
 
#
1619
 
# You should have received a copy of the GNU General Public License
1620
 
# along with this program; if not, write to the Free Software
1621
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1622
 
#
1623
 
# As a special exception to the GNU General Public License, if you
1624
 
# distribute this file as part of a program that contains a
1625
 
# configuration script generated by Autoconf, you may include it under
1626
 
# the same distribution terms that you use for the rest of that program.
1627
 
 
1628
 
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1629
 
# ----------------------------------
1630
 
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1631
 
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1632
 
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1633
 
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1634
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1635
 
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1636
 
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1637
 
 
1638
 
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1639
 
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1640
 
fi
1641
 
if test -n "$PKG_CONFIG"; then
1642
 
        _pkg_min_version=m4_default([$1], [0.9.0])
1643
 
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1644
 
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1645
 
                AC_MSG_RESULT([yes])
1646
 
        else
1647
 
                AC_MSG_RESULT([no])
1648
 
                PKG_CONFIG=""
1649
 
        fi
1650
 
fi[]dnl
1651
 
])# PKG_PROG_PKG_CONFIG
1652
 
 
1653
 
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1654
 
#
1655
 
# Check to see whether a particular set of modules exists.  Similar
1656
 
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1657
 
#
1658
 
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1659
 
# only at the first occurence in configure.ac, so if the first place
1660
 
# it's called might be skipped (such as if it is within an "if", you
1661
 
# have to call PKG_CHECK_EXISTS manually
1662
 
# --------------------------------------------------------------
1663
 
AC_DEFUN([PKG_CHECK_EXISTS],
1664
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1665
 
if test -n "$PKG_CONFIG" && \
1666
 
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1667
 
  m4_default([$2], [:])
1668
 
m4_ifvaln([$3], [else
1669
 
  $3])dnl
1670
 
fi])
1671
 
 
1672
 
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1673
 
# ---------------------------------------------
1674
 
m4_define([_PKG_CONFIG],
1675
 
[if test -n "$$1"; then
1676
 
    pkg_cv_[]$1="$$1"
1677
 
 elif test -n "$PKG_CONFIG"; then
1678
 
    PKG_CHECK_EXISTS([$3],
1679
 
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1680
 
                      test "x$?" != "x0" && pkg_failed=yes ],
1681
 
                     [pkg_failed=yes])
1682
 
 else
1683
 
    pkg_failed=untried
1684
 
fi[]dnl
1685
 
])# _PKG_CONFIG
1686
 
 
1687
 
# _PKG_SHORT_ERRORS_SUPPORTED
1688
 
# -----------------------------
1689
 
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1690
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1691
 
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1692
 
        _pkg_short_errors_supported=yes
1693
 
else
1694
 
        _pkg_short_errors_supported=no
1695
 
fi[]dnl
1696
 
])# _PKG_SHORT_ERRORS_SUPPORTED
1697
 
 
1698
 
 
1699
 
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1700
 
# [ACTION-IF-NOT-FOUND])
1701
 
#
1702
 
#
1703
 
# Note that if there is a possibility the first call to
1704
 
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1705
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1706
 
#
1707
 
#
1708
 
# --------------------------------------------------------------
1709
 
AC_DEFUN([PKG_CHECK_MODULES],
1710
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1711
 
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1712
 
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1713
 
 
1714
 
pkg_failed=no
1715
 
AC_MSG_CHECKING([for $1])
1716
 
 
1717
 
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1718
 
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1719
 
 
1720
 
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1721
 
and $1[]_LIBS to avoid the need to call pkg-config.
1722
 
See the pkg-config man page for more details.])
1723
 
 
1724
 
if test $pkg_failed = yes; then
1725
 
        AC_MSG_RESULT([no])
1726
 
        _PKG_SHORT_ERRORS_SUPPORTED
1727
 
        if test $_pkg_short_errors_supported = yes; then
1728
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1729
 
        else 
1730
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1731
 
        fi
1732
 
        # Put the nasty error message in config.log where it belongs
1733
 
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1734
 
 
1735
 
        m4_default([$4], [AC_MSG_ERROR(
1736
 
[Package requirements ($2) were not met:
1737
 
 
1738
 
$$1_PKG_ERRORS
1739
 
 
1740
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1741
 
installed software in a non-standard prefix.
1742
 
 
1743
 
_PKG_TEXT])[]dnl
1744
 
        ])
1745
 
elif test $pkg_failed = untried; then
1746
 
        AC_MSG_RESULT([no])
1747
 
        m4_default([$4], [AC_MSG_FAILURE(
1748
 
[The pkg-config script could not be found or is too old.  Make sure it
1749
 
is in your PATH or set the PKG_CONFIG environment variable to the full
1750
 
path to pkg-config.
1751
 
 
1752
 
_PKG_TEXT
1753
 
 
1754
 
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1755
 
        ])
1756
 
else
1757
 
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1758
 
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1759
 
        AC_MSG_RESULT([yes])
1760
 
        $3
1761
 
fi[]dnl
1762
 
])# PKG_CHECK_MODULES
1763
 
 
1764
 
m4_include([m4/intltool.m4])
1765
 
m4_include([m4/libtool.m4])
1766
 
m4_include([m4/ltoptions.m4])
1767
 
m4_include([m4/ltsugar.m4])
1768
 
m4_include([m4/ltversion.m4])
1769
 
m4_include([m4/lt~obsolete.m4])
1770
10585
m4_include([acinclude.m4])