~ubuntu-branches/ubuntu/trusty/uim/trusty

« back to all changes in this revision

Viewing changes to .pc/ppc64el.diff/aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-03-28 14:30:55 UTC
  • mfrom: (15.1.26 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20140328143055-5j14c7vicvlxvkh6
Tags: 1:1.8.6-4ubuntu1
* Build using autotools-dev.
* Patch aclocal.m4 and configure for ppc64el.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
 
5
# Inc.
 
6
# This file is free software; the Free Software Foundation
 
7
# gives unlimited permission to copy and/or distribute it,
 
8
# with or without modifications, as long as this notice is preserved.
 
9
 
 
10
# This program is distributed in the hope that it will be useful,
 
11
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
12
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
13
# PARTICULAR PURPOSE.
 
14
 
 
15
m4_ifndef([AC_AUTOCONF_VERSION],
 
16
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
17
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
 
18
[m4_warning([this file was generated for autoconf 2.68.
 
19
You have another version of autoconf.  It may work, but is not guaranteed to.
 
20
If you have problems, you may need to regenerate the build system entirely.
 
21
To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
22
 
 
23
# intlmacosx.m4 serial 3 (gettext-0.18)
 
24
dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
 
25
dnl This file is free software; the Free Software Foundation
 
26
dnl gives unlimited permission to copy and/or distribute it,
 
27
dnl with or without modifications, as long as this notice is preserved.
 
28
dnl
 
29
dnl This file can can be used in projects which are not available under
 
30
dnl the GNU General Public License or the GNU Library General Public
 
31
dnl License but which still want to provide support for the GNU gettext
 
32
dnl functionality.
 
33
dnl Please note that the actual code of the GNU gettext library is covered
 
34
dnl by the GNU Library General Public License, and the rest of the GNU
 
35
dnl gettext package package is covered by the GNU General Public License.
 
36
dnl They are *not* in the public domain.
 
37
 
 
38
dnl Checks for special options needed on MacOS X.
 
39
dnl Defines INTL_MACOSX_LIBS.
 
40
AC_DEFUN([gt_INTL_MACOSX],
 
41
[
 
42
  dnl Check for API introduced in MacOS X 10.2.
 
43
  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
 
44
    [gt_cv_func_CFPreferencesCopyAppValue],
 
45
    [gt_save_LIBS="$LIBS"
 
46
     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
 
47
     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
 
48
       [CFPreferencesCopyAppValue(NULL, NULL)],
 
49
       [gt_cv_func_CFPreferencesCopyAppValue=yes],
 
50
       [gt_cv_func_CFPreferencesCopyAppValue=no])
 
51
     LIBS="$gt_save_LIBS"])
 
52
  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
 
53
    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
 
54
      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
 
55
  fi
 
56
  dnl Check for API introduced in MacOS X 10.3.
 
57
  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
 
58
    [gt_save_LIBS="$LIBS"
 
59
     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
 
60
     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
 
61
       [gt_cv_func_CFLocaleCopyCurrent=yes],
 
62
       [gt_cv_func_CFLocaleCopyCurrent=no])
 
63
     LIBS="$gt_save_LIBS"])
 
64
  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 
65
    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
 
66
      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
 
67
  fi
 
68
  INTL_MACOSX_LIBS=
 
69
  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 
70
    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
 
71
  fi
 
72
  AC_SUBST([INTL_MACOSX_LIBS])
 
73
])
 
74
 
 
75
 
 
76
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
77
# serial 40 IT_PROG_INTLTOOL
 
78
AC_DEFUN([IT_PROG_INTLTOOL], [
 
79
AC_PREREQ([2.50])dnl
 
80
AC_REQUIRE([AM_NLS])dnl
 
81
 
 
82
case "$am__api_version" in
 
83
    1.[01234])
 
84
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
85
    ;;
 
86
    *)
 
87
    ;;
 
88
esac
 
89
 
 
90
if test -n "$1"; then
 
91
    AC_MSG_CHECKING([for intltool >= $1])
 
92
 
 
93
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
94
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
95
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
96
    ]
 
97
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
98
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
99
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
100
fi
 
101
 
 
102
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
103
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
104
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
105
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
106
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
107
fi
 
108
 
 
109
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
110
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
111
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
112
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
113
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
114
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
115
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
116
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
117
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
118
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
119
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
120
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
121
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
122
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
123
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
124
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
125
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
126
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
127
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
128
 
 
129
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
 
130
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 
131
_IT_SUBST(INTLTOOL_KEYS_RULE)
 
132
_IT_SUBST(INTLTOOL_PROP_RULE)
 
133
_IT_SUBST(INTLTOOL_OAF_RULE)
 
134
_IT_SUBST(INTLTOOL_PONG_RULE)
 
135
_IT_SUBST(INTLTOOL_SERVER_RULE)
 
136
_IT_SUBST(INTLTOOL_SHEET_RULE)
 
137
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
138
_IT_SUBST(INTLTOOL_UI_RULE)
 
139
_IT_SUBST(INTLTOOL_XAM_RULE)
 
140
_IT_SUBST(INTLTOOL_KBD_RULE)
 
141
_IT_SUBST(INTLTOOL_XML_RULE)
 
142
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
143
_IT_SUBST(INTLTOOL_CAVES_RULE)
 
144
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 
145
_IT_SUBST(INTLTOOL_THEME_RULE)
 
146
_IT_SUBST(INTLTOOL_SERVICE_RULE)
 
147
_IT_SUBST(INTLTOOL_POLICY_RULE)
 
148
 
 
149
# Check the gettext tools to make sure they are GNU
 
150
AC_PATH_PROG(XGETTEXT, xgettext)
 
151
AC_PATH_PROG(MSGMERGE, msgmerge)
 
152
AC_PATH_PROG(MSGFMT, msgfmt)
 
153
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
154
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
155
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
156
fi
 
157
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
158
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
159
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
160
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
161
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
162
fi
 
163
 
 
164
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
165
if test -z "$INTLTOOL_PERL"; then
 
166
   AC_MSG_ERROR([perl not found])
 
167
fi
 
168
AC_MSG_CHECKING([for perl >= 5.8.1])
 
169
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 
170
if test $? -ne 0; then
 
171
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 
172
else
 
173
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
 
174
   AC_MSG_RESULT([$IT_PERL_VERSION])
 
175
fi
 
176
if test "x$2" != "xno-xml"; then
 
177
   AC_MSG_CHECKING([for XML::Parser])
 
178
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
179
       AC_MSG_RESULT([ok])
 
180
   else
 
181
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
182
   fi
 
183
fi
 
184
 
 
185
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
186
AC_SUBST(ALL_LINGUAS)
 
187
 
 
188
# Set DATADIRNAME correctly if it is not set yet
 
189
# (copied from glib-gettext.m4)
 
190
if test -z "$DATADIRNAME"; then
 
191
  AC_LINK_IFELSE(
 
192
    [AC_LANG_PROGRAM([[]],
 
193
                     [[extern int _nl_msg_cat_cntr;
 
194
                       return _nl_msg_cat_cntr]])],
 
195
    [DATADIRNAME=share],
 
196
    [case $host in
 
197
    *-*-solaris*)
 
198
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
199
    dnl GNU format message catalog is always supported,
 
200
    dnl since both are added to the libc all together.
 
201
    dnl Hence, we'd like to go with DATADIRNAME=share
 
202
    dnl in this case.
 
203
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
204
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
205
    ;;
 
206
    *)
 
207
    [DATADIRNAME=lib]
 
208
    ;;
 
209
    esac])
 
210
fi
 
211
AC_SUBST(DATADIRNAME)
 
212
 
 
213
IT_PO_SUBDIR([po])
 
214
 
 
215
])
 
216
 
 
217
 
 
218
# IT_PO_SUBDIR(DIRNAME)
 
219
# ---------------------
 
220
# All po subdirs have to be declared with this macro; the subdir "po" is
 
221
# declared by IT_PROG_INTLTOOL.
 
222
#
 
223
AC_DEFUN([IT_PO_SUBDIR],
 
224
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
225
dnl
 
226
dnl The following CONFIG_COMMANDS should be executed at the very end
 
227
dnl of config.status.
 
228
AC_CONFIG_COMMANDS_PRE([
 
229
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
230
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 
231
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
232
    fi
 
233
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
234
    >"$1/stamp-it.tmp"
 
235
    [sed '/^#/d
 
236
         s/^[[].*] *//
 
237
         /^[    ]*$/d
 
238
        '"s|^|  $ac_top_srcdir/|" \
 
239
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
240
    ]
 
241
    [sed '/^POTFILES =/,/[^\\]$/ {
 
242
                /^POTFILES =/!d
 
243
                r $1/POTFILES
 
244
          }
 
245
         ' "$1/Makefile.in" >"$1/Makefile"]
 
246
    rm -f "$1/Makefile.tmp"
 
247
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
248
  ])
 
249
])dnl
 
250
])
 
251
 
 
252
# _IT_SUBST(VARIABLE)
 
253
# -------------------
 
254
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
255
#
 
256
AC_DEFUN([_IT_SUBST],
 
257
[
 
258
AC_SUBST([$1])
 
259
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
260
]
 
261
)
 
262
 
 
263
# deprecated macros
 
264
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
265
# A hint is needed for aclocal from Automake <= 1.9.4:
 
266
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
267
 
 
268
 
 
269
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
270
#
 
271
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 
272
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 
273
#                 Inc.
 
274
#   Written by Gordon Matzigkeit, 1996
 
275
#
 
276
# This file is free software; the Free Software Foundation gives
 
277
# unlimited permission to copy and/or distribute it, with or without
 
278
# modifications, as long as this notice is preserved.
 
279
 
 
280
m4_define([_LT_COPYING], [dnl
 
281
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 
282
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 
283
#                 Inc.
 
284
#   Written by Gordon Matzigkeit, 1996
 
285
#
 
286
#   This file is part of GNU Libtool.
 
287
#
 
288
# GNU Libtool is free software; you can redistribute it and/or
 
289
# modify it under the terms of the GNU General Public License as
 
290
# published by the Free Software Foundation; either version 2 of
 
291
# the License, or (at your option) any later version.
 
292
#
 
293
# As a special exception to the GNU General Public License,
 
294
# if you distribute this file as part of a program or library that
 
295
# is built using GNU Libtool, you may include this file under the
 
296
# same distribution terms that you use for the rest of that program.
 
297
#
 
298
# GNU Libtool is distributed in the hope that it will be useful,
 
299
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
300
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
301
# GNU General Public License for more details.
 
302
#
 
303
# You should have received a copy of the GNU General Public License
 
304
# along with GNU Libtool; see the file COPYING.  If not, a copy
 
305
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
 
306
# obtained by writing to the Free Software Foundation, Inc.,
 
307
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
308
])
 
309
 
 
310
# serial 57 LT_INIT
 
311
 
 
312
 
 
313
# LT_PREREQ(VERSION)
 
314
# ------------------
 
315
# Complain and exit if this libtool version is less that VERSION.
 
316
m4_defun([LT_PREREQ],
 
317
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
 
318
       [m4_default([$3],
 
319
                   [m4_fatal([Libtool version $1 or higher is required],
 
320
                             63)])],
 
321
       [$2])])
 
322
 
 
323
 
 
324
# _LT_CHECK_BUILDDIR
 
325
# ------------------
 
326
# Complain if the absolute build directory name contains unusual characters
 
327
m4_defun([_LT_CHECK_BUILDDIR],
 
328
[case `pwd` in
 
329
  *\ * | *\     *)
 
330
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
 
331
esac
 
332
])
 
333
 
 
334
 
 
335
# LT_INIT([OPTIONS])
 
336
# ------------------
 
337
AC_DEFUN([LT_INIT],
 
338
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
 
339
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 
340
AC_BEFORE([$0], [LT_LANG])dnl
 
341
AC_BEFORE([$0], [LT_OUTPUT])dnl
 
342
AC_BEFORE([$0], [LTDL_INIT])dnl
 
343
m4_require([_LT_CHECK_BUILDDIR])dnl
 
344
 
 
345
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
 
346
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
 
347
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
 
348
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
 
349
dnl unless we require an AC_DEFUNed macro:
 
350
AC_REQUIRE([LTOPTIONS_VERSION])dnl
 
351
AC_REQUIRE([LTSUGAR_VERSION])dnl
 
352
AC_REQUIRE([LTVERSION_VERSION])dnl
 
353
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
 
354
m4_require([_LT_PROG_LTMAIN])dnl
 
355
 
 
356
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
 
357
 
 
358
dnl Parse OPTIONS
 
359
_LT_SET_OPTIONS([$0], [$1])
 
360
 
 
361
# This can be used to rebuild libtool when needed
 
362
LIBTOOL_DEPS="$ltmain"
 
363
 
 
364
# Always use our own libtool.
 
365
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
366
AC_SUBST(LIBTOOL)dnl
 
367
 
 
368
_LT_SETUP
 
369
 
 
370
# Only expand once:
 
371
m4_define([LT_INIT])
 
372
])# LT_INIT
 
373
 
 
374
# Old names:
 
375
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
 
376
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
 
377
dnl aclocal-1.4 backwards compatibility:
 
378
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 
379
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
380
 
 
381
 
 
382
# _LT_CC_BASENAME(CC)
 
383
# -------------------
 
384
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 
385
m4_defun([_LT_CC_BASENAME],
 
386
[for cc_temp in $1""; do
 
387
  case $cc_temp in
 
388
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
 
389
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
 
390
    \-*) ;;
 
391
    *) break;;
 
392
  esac
 
393
done
 
394
cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 
395
])
 
396
 
 
397
 
 
398
# _LT_FILEUTILS_DEFAULTS
 
399
# ----------------------
 
400
# It is okay to use these file commands and assume they have been set
 
401
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
 
402
m4_defun([_LT_FILEUTILS_DEFAULTS],
 
403
[: ${CP="cp -f"}
 
404
: ${MV="mv -f"}
 
405
: ${RM="rm -f"}
 
406
])# _LT_FILEUTILS_DEFAULTS
 
407
 
 
408
 
 
409
# _LT_SETUP
 
410
# ---------
 
411
m4_defun([_LT_SETUP],
 
412
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
413
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
414
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
 
415
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
 
416
 
 
417
_LT_DECL([], [host_alias], [0], [The host system])dnl
 
418
_LT_DECL([], [host], [0])dnl
 
419
_LT_DECL([], [host_os], [0])dnl
 
420
dnl
 
421
_LT_DECL([], [build_alias], [0], [The build system])dnl
 
422
_LT_DECL([], [build], [0])dnl
 
423
_LT_DECL([], [build_os], [0])dnl
 
424
dnl
 
425
AC_REQUIRE([AC_PROG_CC])dnl
 
426
AC_REQUIRE([LT_PATH_LD])dnl
 
427
AC_REQUIRE([LT_PATH_NM])dnl
 
428
dnl
 
429
AC_REQUIRE([AC_PROG_LN_S])dnl
 
430
test -z "$LN_S" && LN_S="ln -s"
 
431
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
 
432
dnl
 
433
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
 
434
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
 
435
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 
436
dnl
 
437
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
438
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 
439
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
 
440
m4_require([_LT_CMD_RELOAD])dnl
 
441
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 
442
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 
443
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 
444
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 
445
m4_require([_LT_WITH_SYSROOT])dnl
 
446
 
 
447
_LT_CONFIG_LIBTOOL_INIT([
 
448
# See if we are running on zsh, and set the options which allow our
 
449
# commands through without removal of \ escapes INIT.
 
450
if test -n "\${ZSH_VERSION+set}" ; then
 
451
   setopt NO_GLOB_SUBST
 
452
fi
 
453
])
 
454
if test -n "${ZSH_VERSION+set}" ; then
 
455
   setopt NO_GLOB_SUBST
 
456
fi
 
457
 
 
458
_LT_CHECK_OBJDIR
 
459
 
 
460
m4_require([_LT_TAG_COMPILER])dnl
 
461
 
 
462
case $host_os in
 
463
aix3*)
 
464
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
465
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
466
  # vanish in a puff of smoke.
 
467
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
468
    COLLECT_NAMES=
 
469
    export COLLECT_NAMES
 
470
  fi
 
471
  ;;
 
472
esac
 
473
 
 
474
# Global variables:
 
475
ofile=libtool
 
476
can_build_shared=yes
 
477
 
 
478
# All known linkers require a `.a' archive for static linking (except MSVC,
 
479
# which needs '.lib').
 
480
libext=a
 
481
 
 
482
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
483
 
 
484
old_CC="$CC"
 
485
old_CFLAGS="$CFLAGS"
 
486
 
 
487
# Set sane defaults for various variables
 
488
test -z "$CC" && CC=cc
 
489
test -z "$LTCC" && LTCC=$CC
 
490
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 
491
test -z "$LD" && LD=ld
 
492
test -z "$ac_objext" && ac_objext=o
 
493
 
 
494
_LT_CC_BASENAME([$compiler])
 
495
 
 
496
# Only perform the check for file, if the check method requires it
 
497
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
498
case $deplibs_check_method in
 
499
file_magic*)
 
500
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
501
    _LT_PATH_MAGIC
 
502
  fi
 
503
  ;;
 
504
esac
 
505
 
 
506
# Use C for the default configuration in the libtool script
 
507
LT_SUPPORTED_TAG([CC])
 
508
_LT_LANG_C_CONFIG
 
509
_LT_LANG_DEFAULT_CONFIG
 
510
_LT_CONFIG_COMMANDS
 
511
])# _LT_SETUP
 
512
 
 
513
 
 
514
# _LT_PREPARE_SED_QUOTE_VARS
 
515
# --------------------------
 
516
# Define a few sed substitution that help us do robust quoting.
 
517
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
 
518
[# Backslashify metacharacters that are still active within
 
519
# double-quoted strings.
 
520
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
 
521
 
 
522
# Same as above, but do not quote variable references.
 
523
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
 
524
 
 
525
# Sed substitution to delay expansion of an escaped shell variable in a
 
526
# double_quote_subst'ed string.
 
527
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
528
 
 
529
# Sed substitution to delay expansion of an escaped single quote.
 
530
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
531
 
 
532
# Sed substitution to avoid accidental globbing in evaled expressions
 
533
no_glob_subst='s/\*/\\\*/g'
 
534
])
 
535
 
 
536
# _LT_PROG_LTMAIN
 
537
# ---------------
 
538
# Note that this code is called both from `configure', and `config.status'
 
539
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
 
540
# `config.status' has no value for ac_aux_dir unless we are using Automake,
 
541
# so we pass a copy along to make sure it has a sensible value anyway.
 
542
m4_defun([_LT_PROG_LTMAIN],
 
543
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
 
544
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
 
545
ltmain="$ac_aux_dir/ltmain.sh"
 
546
])# _LT_PROG_LTMAIN
 
547
 
 
548
 
 
549
 
 
550
# So that we can recreate a full libtool script including additional
 
551
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
 
552
# in macros and then make a single call at the end using the `libtool'
 
553
# label.
 
554
 
 
555
 
 
556
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
 
557
# ----------------------------------------
 
558
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
559
m4_define([_LT_CONFIG_LIBTOOL_INIT],
 
560
[m4_ifval([$1],
 
561
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
 
562
                     [$1
 
563
])])])
 
564
 
 
565
# Initialize.
 
566
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
 
567
 
 
568
 
 
569
# _LT_CONFIG_LIBTOOL([COMMANDS])
 
570
# ------------------------------
 
571
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
572
m4_define([_LT_CONFIG_LIBTOOL],
 
573
[m4_ifval([$1],
 
574
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
 
575
                     [$1
 
576
])])])
 
577
 
 
578
# Initialize.
 
579
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
 
580
 
 
581
 
 
582
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
 
583
# -----------------------------------------------------
 
584
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
 
585
[_LT_CONFIG_LIBTOOL([$1])
 
586
_LT_CONFIG_LIBTOOL_INIT([$2])
 
587
])
 
588
 
 
589
 
 
590
# _LT_FORMAT_COMMENT([COMMENT])
 
591
# -----------------------------
 
592
# Add leading comment marks to the start of each line, and a trailing
 
593
# full-stop to the whole comment if one is not present already.
 
594
m4_define([_LT_FORMAT_COMMENT],
 
595
[m4_ifval([$1], [
 
596
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
 
597
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
 
598
)])
 
599
 
 
600
 
 
601
 
 
602
 
 
603
 
 
604
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
 
605
# -------------------------------------------------------------------
 
606
# CONFIGNAME is the name given to the value in the libtool script.
 
607
# VARNAME is the (base) name used in the configure script.
 
608
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
 
609
# VARNAME.  Any other value will be used directly.
 
610
m4_define([_LT_DECL],
 
611
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
 
612
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
 
613
        [m4_ifval([$1], [$1], [$2])])
 
614
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
 
615
    m4_ifval([$4],
 
616
        [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
 
617
    lt_dict_add_subkey([lt_decl_dict], [$2],
 
618
        [tagged?], [m4_ifval([$5], [yes], [no])])])
 
619
])
 
620
 
 
621
 
 
622
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
 
623
# --------------------------------------------------------
 
624
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
 
625
 
 
626
 
 
627
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
 
628
# ------------------------------------------------
 
629
m4_define([lt_decl_tag_varnames],
 
630
[_lt_decl_filter([tagged?], [yes], $@)])
 
631
 
 
632
 
 
633
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
 
634
# ---------------------------------------------------------
 
635
m4_define([_lt_decl_filter],
 
636
[m4_case([$#],
 
637
  [0], [m4_fatal([$0: too few arguments: $#])],
 
638
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
 
639
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
 
640
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
 
641
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
 
642
])
 
643
 
 
644
 
 
645
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
 
646
# --------------------------------------------------
 
647
m4_define([lt_decl_quote_varnames],
 
648
[_lt_decl_filter([value], [1], $@)])
 
649
 
 
650
 
 
651
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
 
652
# ---------------------------------------------------
 
653
m4_define([lt_decl_dquote_varnames],
 
654
[_lt_decl_filter([value], [2], $@)])
 
655
 
 
656
 
 
657
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
 
658
# ---------------------------------------------------
 
659
m4_define([lt_decl_varnames_tagged],
 
660
[m4_assert([$# <= 2])dnl
 
661
_$0(m4_quote(m4_default([$1], [[, ]])),
 
662
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
 
663
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
 
664
m4_define([_lt_decl_varnames_tagged],
 
665
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
 
666
 
 
667
 
 
668
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
 
669
# ------------------------------------------------
 
670
m4_define([lt_decl_all_varnames],
 
671
[_$0(m4_quote(m4_default([$1], [[, ]])),
 
672
     m4_if([$2], [],
 
673
           m4_quote(lt_decl_varnames),
 
674
        m4_quote(m4_shift($@))))[]dnl
 
675
])
 
676
m4_define([_lt_decl_all_varnames],
 
677
[lt_join($@, lt_decl_varnames_tagged([$1],
 
678
                        lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
 
679
])
 
680
 
 
681
 
 
682
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
 
683
# ------------------------------------
 
684
# Quote a variable value, and forward it to `config.status' so that its
 
685
# declaration there will have the same value as in `configure'.  VARNAME
 
686
# must have a single quote delimited value for this to work.
 
687
m4_define([_LT_CONFIG_STATUS_DECLARE],
 
688
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
 
689
 
 
690
 
 
691
# _LT_CONFIG_STATUS_DECLARATIONS
 
692
# ------------------------------
 
693
# We delimit libtool config variables with single quotes, so when
 
694
# we write them to config.status, we have to be sure to quote all
 
695
# embedded single quotes properly.  In configure, this macro expands
 
696
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
 
697
#
 
698
#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
 
699
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 
700
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
 
701
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
 
702
 
 
703
 
 
704
# _LT_LIBTOOL_TAGS
 
705
# ----------------
 
706
# Output comment and list of tags supported by the script
 
707
m4_defun([_LT_LIBTOOL_TAGS],
 
708
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
 
709
available_tags="_LT_TAGS"dnl
 
710
])
 
711
 
 
712
 
 
713
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
 
714
# -----------------------------------
 
715
# Extract the dictionary values for VARNAME (optionally with TAG) and
 
716
# expand to a commented shell variable setting:
 
717
#
 
718
#    # Some comment about what VAR is for.
 
719
#    visible_name=$lt_internal_name
 
720
m4_define([_LT_LIBTOOL_DECLARE],
 
721
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
 
722
                                           [description])))[]dnl
 
723
m4_pushdef([_libtool_name],
 
724
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
 
725
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
 
726
    [0], [_libtool_name=[$]$1],
 
727
    [1], [_libtool_name=$lt_[]$1],
 
728
    [2], [_libtool_name=$lt_[]$1],
 
729
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
 
730
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
 
731
])
 
732
 
 
733
 
 
734
# _LT_LIBTOOL_CONFIG_VARS
 
735
# -----------------------
 
736
# Produce commented declarations of non-tagged libtool config variables
 
737
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
 
738
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
 
739
# section) are produced by _LT_LIBTOOL_TAG_VARS.
 
740
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
 
741
[m4_foreach([_lt_var],
 
742
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
 
743
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
 
744
 
 
745
 
 
746
# _LT_LIBTOOL_TAG_VARS(TAG)
 
747
# -------------------------
 
748
m4_define([_LT_LIBTOOL_TAG_VARS],
 
749
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
 
750
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
 
751
 
 
752
 
 
753
# _LT_TAGVAR(VARNAME, [TAGNAME])
 
754
# ------------------------------
 
755
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
 
756
 
 
757
 
 
758
# _LT_CONFIG_COMMANDS
 
759
# -------------------
 
760
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
 
761
# variables for single and double quote escaping we saved from calls
 
762
# to _LT_DECL, we can put quote escaped variables declarations
 
763
# into `config.status', and then the shell code to quote escape them in
 
764
# for loops in `config.status'.  Finally, any additional code accumulated
 
765
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
 
766
m4_defun([_LT_CONFIG_COMMANDS],
 
767
[AC_PROVIDE_IFELSE([LT_OUTPUT],
 
768
        dnl If the libtool generation code has been placed in $CONFIG_LT,
 
769
        dnl instead of duplicating it all over again into config.status,
 
770
        dnl then we will have config.status run $CONFIG_LT later, so it
 
771
        dnl needs to know what name is stored there:
 
772
        [AC_CONFIG_COMMANDS([libtool],
 
773
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
 
774
    dnl If the libtool generation code is destined for config.status,
 
775
    dnl expand the accumulated commands and init code now:
 
776
    [AC_CONFIG_COMMANDS([libtool],
 
777
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
 
778
])#_LT_CONFIG_COMMANDS
 
779
 
 
780
 
 
781
# Initialize.
 
782
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
 
783
[
 
784
 
 
785
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
786
# if CDPATH is set.
 
787
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
788
 
 
789
sed_quote_subst='$sed_quote_subst'
 
790
double_quote_subst='$double_quote_subst'
 
791
delay_variable_subst='$delay_variable_subst'
 
792
_LT_CONFIG_STATUS_DECLARATIONS
 
793
LTCC='$LTCC'
 
794
LTCFLAGS='$LTCFLAGS'
 
795
compiler='$compiler_DEFAULT'
 
796
 
 
797
# A function that is used when there is no print builtin or printf.
 
798
func_fallback_echo ()
 
799
{
 
800
  eval 'cat <<_LTECHO_EOF
 
801
\$[]1
 
802
_LTECHO_EOF'
 
803
}
 
804
 
 
805
# Quote evaled strings.
 
806
for var in lt_decl_all_varnames([[ \
 
807
]], lt_decl_quote_varnames); do
 
808
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
 
809
    *[[\\\\\\\`\\"\\\$]]*)
 
810
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
 
811
      ;;
 
812
    *)
 
813
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
 
814
      ;;
 
815
    esac
 
816
done
 
817
 
 
818
# Double-quote double-evaled strings.
 
819
for var in lt_decl_all_varnames([[ \
 
820
]], lt_decl_dquote_varnames); do
 
821
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
 
822
    *[[\\\\\\\`\\"\\\$]]*)
 
823
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
 
824
      ;;
 
825
    *)
 
826
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
 
827
      ;;
 
828
    esac
 
829
done
 
830
 
 
831
_LT_OUTPUT_LIBTOOL_INIT
 
832
])
 
833
 
 
834
# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
 
835
# ------------------------------------
 
836
# Generate a child script FILE with all initialization necessary to
 
837
# reuse the environment learned by the parent script, and make the
 
838
# file executable.  If COMMENT is supplied, it is inserted after the
 
839
# `#!' sequence but before initialization text begins.  After this
 
840
# macro, additional text can be appended to FILE to form the body of
 
841
# the child script.  The macro ends with non-zero status if the
 
842
# file could not be fully written (such as if the disk is full).
 
843
m4_ifdef([AS_INIT_GENERATED],
 
844
[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
 
845
[m4_defun([_LT_GENERATED_FILE_INIT],
 
846
[m4_require([AS_PREPARE])]dnl
 
847
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
 
848
[lt_write_fail=0
 
849
cat >$1 <<_ASEOF || lt_write_fail=1
 
850
#! $SHELL
 
851
# Generated by $as_me.
 
852
$2
 
853
SHELL=\${CONFIG_SHELL-$SHELL}
 
854
export SHELL
 
855
_ASEOF
 
856
cat >>$1 <<\_ASEOF || lt_write_fail=1
 
857
AS_SHELL_SANITIZE
 
858
_AS_PREPARE
 
859
exec AS_MESSAGE_FD>&1
 
860
_ASEOF
 
861
test $lt_write_fail = 0 && chmod +x $1[]dnl
 
862
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
863
 
 
864
# LT_OUTPUT
 
865
# ---------
 
866
# This macro allows early generation of the libtool script (before
 
867
# AC_OUTPUT is called), incase it is used in configure for compilation
 
868
# tests.
 
869
AC_DEFUN([LT_OUTPUT],
 
870
[: ${CONFIG_LT=./config.lt}
 
871
AC_MSG_NOTICE([creating $CONFIG_LT])
 
872
_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
 
873
[# Run this file to recreate a libtool stub with the current configuration.])
 
874
 
 
875
cat >>"$CONFIG_LT" <<\_LTEOF
 
876
lt_cl_silent=false
 
877
exec AS_MESSAGE_LOG_FD>>config.log
 
878
{
 
879
  echo
 
880
  AS_BOX([Running $as_me.])
 
881
} >&AS_MESSAGE_LOG_FD
 
882
 
 
883
lt_cl_help="\
 
884
\`$as_me' creates a local libtool stub from the current configuration,
 
885
for use in further configure time tests before the real libtool is
 
886
generated.
 
887
 
 
888
Usage: $[0] [[OPTIONS]]
 
889
 
 
890
  -h, --help      print this help, then exit
 
891
  -V, --version   print version number, then exit
 
892
  -q, --quiet     do not print progress messages
 
893
  -d, --debug     don't remove temporary files
 
894
 
 
895
Report bugs to <bug-libtool@gnu.org>."
 
896
 
 
897
lt_cl_version="\
 
898
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 
899
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 
900
configured by $[0], generated by m4_PACKAGE_STRING.
 
901
 
 
902
Copyright (C) 2010 Free Software Foundation, Inc.
 
903
This config.lt script is free software; the Free Software Foundation
 
904
gives unlimited permision to copy, distribute and modify it."
 
905
 
 
906
while test $[#] != 0
 
907
do
 
908
  case $[1] in
 
909
    --version | --v* | -V )
 
910
      echo "$lt_cl_version"; exit 0 ;;
 
911
    --help | --h* | -h )
 
912
      echo "$lt_cl_help"; exit 0 ;;
 
913
    --debug | --d* | -d )
 
914
      debug=: ;;
 
915
    --quiet | --q* | --silent | --s* | -q )
 
916
      lt_cl_silent=: ;;
 
917
 
 
918
    -*) AC_MSG_ERROR([unrecognized option: $[1]
 
919
Try \`$[0] --help' for more information.]) ;;
 
920
 
 
921
    *) AC_MSG_ERROR([unrecognized argument: $[1]
 
922
Try \`$[0] --help' for more information.]) ;;
 
923
  esac
 
924
  shift
 
925
done
 
926
 
 
927
if $lt_cl_silent; then
 
928
  exec AS_MESSAGE_FD>/dev/null
 
929
fi
 
930
_LTEOF
 
931
 
 
932
cat >>"$CONFIG_LT" <<_LTEOF
 
933
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
 
934
_LTEOF
 
935
 
 
936
cat >>"$CONFIG_LT" <<\_LTEOF
 
937
AC_MSG_NOTICE([creating $ofile])
 
938
_LT_OUTPUT_LIBTOOL_COMMANDS
 
939
AS_EXIT(0)
 
940
_LTEOF
 
941
chmod +x "$CONFIG_LT"
 
942
 
 
943
# configure is writing to config.log, but config.lt does its own redirection,
 
944
# appending to config.log, which fails on DOS, as config.log is still kept
 
945
# open by configure.  Here we exec the FD to /dev/null, effectively closing
 
946
# config.log, so it can be properly (re)opened and appended to by config.lt.
 
947
lt_cl_success=:
 
948
test "$silent" = yes &&
 
949
  lt_config_lt_args="$lt_config_lt_args --quiet"
 
950
exec AS_MESSAGE_LOG_FD>/dev/null
 
951
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
 
952
exec AS_MESSAGE_LOG_FD>>config.log
 
953
$lt_cl_success || AS_EXIT(1)
 
954
])# LT_OUTPUT
 
955
 
 
956
 
 
957
# _LT_CONFIG(TAG)
 
958
# ---------------
 
959
# If TAG is the built-in tag, create an initial libtool script with a
 
960
# default configuration from the untagged config vars.  Otherwise add code
 
961
# to config.status for appending the configuration named by TAG from the
 
962
# matching tagged config vars.
 
963
m4_defun([_LT_CONFIG],
 
964
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
965
_LT_CONFIG_SAVE_COMMANDS([
 
966
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
 
967
  m4_if(_LT_TAG, [C], [
 
968
    # See if we are running on zsh, and set the options which allow our
 
969
    # commands through without removal of \ escapes.
 
970
    if test -n "${ZSH_VERSION+set}" ; then
 
971
      setopt NO_GLOB_SUBST
 
972
    fi
 
973
 
 
974
    cfgfile="${ofile}T"
 
975
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
 
976
    $RM "$cfgfile"
 
977
 
 
978
    cat <<_LT_EOF >> "$cfgfile"
 
979
#! $SHELL
 
980
 
 
981
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
982
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
 
983
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
984
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
985
#
 
986
_LT_COPYING
 
987
_LT_LIBTOOL_TAGS
 
988
 
 
989
# ### BEGIN LIBTOOL CONFIG
 
990
_LT_LIBTOOL_CONFIG_VARS
 
991
_LT_LIBTOOL_TAG_VARS
 
992
# ### END LIBTOOL CONFIG
 
993
 
 
994
_LT_EOF
 
995
 
 
996
  case $host_os in
 
997
  aix3*)
 
998
    cat <<\_LT_EOF >> "$cfgfile"
 
999
# AIX sometimes has problems with the GCC collect2 program.  For some
 
1000
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
1001
# vanish in a puff of smoke.
 
1002
if test "X${COLLECT_NAMES+set}" != Xset; then
 
1003
  COLLECT_NAMES=
 
1004
  export COLLECT_NAMES
 
1005
fi
 
1006
_LT_EOF
 
1007
    ;;
 
1008
  esac
 
1009
 
 
1010
  _LT_PROG_LTMAIN
 
1011
 
 
1012
  # We use sed instead of cat because bash on DJGPP gets confused if
 
1013
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
1014
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
1015
  # is reportedly fixed, but why not run on old versions too?
 
1016
  sed '$q' "$ltmain" >> "$cfgfile" \
 
1017
     || (rm -f "$cfgfile"; exit 1)
 
1018
 
 
1019
  _LT_PROG_REPLACE_SHELLFNS
 
1020
 
 
1021
   mv -f "$cfgfile" "$ofile" ||
 
1022
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
1023
  chmod +x "$ofile"
 
1024
],
 
1025
[cat <<_LT_EOF >> "$ofile"
 
1026
 
 
1027
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
 
1028
dnl in a comment (ie after a #).
 
1029
# ### BEGIN LIBTOOL TAG CONFIG: $1
 
1030
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
 
1031
# ### END LIBTOOL TAG CONFIG: $1
 
1032
_LT_EOF
 
1033
])dnl /m4_if
 
1034
],
 
1035
[m4_if([$1], [], [
 
1036
    PACKAGE='$PACKAGE'
 
1037
    VERSION='$VERSION'
 
1038
    TIMESTAMP='$TIMESTAMP'
 
1039
    RM='$RM'
 
1040
    ofile='$ofile'], [])
 
1041
])dnl /_LT_CONFIG_SAVE_COMMANDS
 
1042
])# _LT_CONFIG
 
1043
 
 
1044
 
 
1045
# LT_SUPPORTED_TAG(TAG)
 
1046
# ---------------------
 
1047
# Trace this macro to discover what tags are supported by the libtool
 
1048
# --tag option, using:
 
1049
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
 
1050
AC_DEFUN([LT_SUPPORTED_TAG], [])
 
1051
 
 
1052
 
 
1053
# C support is built-in for now
 
1054
m4_define([_LT_LANG_C_enabled], [])
 
1055
m4_define([_LT_TAGS], [])
 
1056
 
 
1057
 
 
1058
# LT_LANG(LANG)
 
1059
# -------------
 
1060
# Enable libtool support for the given language if not already enabled.
 
1061
AC_DEFUN([LT_LANG],
 
1062
[AC_BEFORE([$0], [LT_OUTPUT])dnl
 
1063
m4_case([$1],
 
1064
  [C],                  [_LT_LANG(C)],
 
1065
  [C++],                [_LT_LANG(CXX)],
 
1066
  [Java],               [_LT_LANG(GCJ)],
 
1067
  [Fortran 77],         [_LT_LANG(F77)],
 
1068
  [Fortran],            [_LT_LANG(FC)],
 
1069
  [Windows Resource],   [_LT_LANG(RC)],
 
1070
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
 
1071
    [_LT_LANG($1)],
 
1072
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
 
1073
])# LT_LANG
 
1074
 
 
1075
 
 
1076
# _LT_LANG(LANGNAME)
 
1077
# ------------------
 
1078
m4_defun([_LT_LANG],
 
1079
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
 
1080
  [LT_SUPPORTED_TAG([$1])dnl
 
1081
  m4_append([_LT_TAGS], [$1 ])dnl
 
1082
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
 
1083
  _LT_LANG_$1_CONFIG($1)])dnl
 
1084
])# _LT_LANG
 
1085
 
 
1086
 
 
1087
# _LT_LANG_DEFAULT_CONFIG
 
1088
# -----------------------
 
1089
m4_defun([_LT_LANG_DEFAULT_CONFIG],
 
1090
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
1091
  [LT_LANG(CXX)],
 
1092
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
 
1093
 
 
1094
AC_PROVIDE_IFELSE([AC_PROG_F77],
 
1095
  [LT_LANG(F77)],
 
1096
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
 
1097
 
 
1098
AC_PROVIDE_IFELSE([AC_PROG_FC],
 
1099
  [LT_LANG(FC)],
 
1100
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
 
1101
 
 
1102
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
 
1103
dnl pulling things in needlessly.
 
1104
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
1105
  [LT_LANG(GCJ)],
 
1106
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
1107
    [LT_LANG(GCJ)],
 
1108
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
 
1109
      [LT_LANG(GCJ)],
 
1110
      [m4_ifdef([AC_PROG_GCJ],
 
1111
        [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
 
1112
       m4_ifdef([A][M_PROG_GCJ],
 
1113
        [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
 
1114
       m4_ifdef([LT_PROG_GCJ],
 
1115
        [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
1116
 
 
1117
AC_PROVIDE_IFELSE([LT_PROG_RC],
 
1118
  [LT_LANG(RC)],
 
1119
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
 
1120
])# _LT_LANG_DEFAULT_CONFIG
 
1121
 
 
1122
# Obsolete macros:
 
1123
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 
1124
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 
1125
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
 
1126
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
 
1127
AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
 
1128
dnl aclocal-1.4 backwards compatibility:
 
1129
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
 
1130
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
 
1131
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
 
1132
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
 
1133
dnl AC_DEFUN([AC_LIBTOOL_RC], [])
 
1134
 
 
1135
 
 
1136
# _LT_TAG_COMPILER
 
1137
# ----------------
 
1138
m4_defun([_LT_TAG_COMPILER],
 
1139
[AC_REQUIRE([AC_PROG_CC])dnl
 
1140
 
 
1141
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
 
1142
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
 
1143
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
 
1144
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
 
1145
 
 
1146
# If no C compiler was specified, use CC.
 
1147
LTCC=${LTCC-"$CC"}
 
1148
 
 
1149
# If no C compiler flags were specified, use CFLAGS.
 
1150
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
1151
 
 
1152
# Allow CC to be a program name with arguments.
 
1153
compiler=$CC
 
1154
])# _LT_TAG_COMPILER
 
1155
 
 
1156
 
 
1157
# _LT_COMPILER_BOILERPLATE
 
1158
# ------------------------
 
1159
# Check for compiler boilerplate output or warnings with
 
1160
# the simple compiler test code.
 
1161
m4_defun([_LT_COMPILER_BOILERPLATE],
 
1162
[m4_require([_LT_DECL_SED])dnl
 
1163
ac_outfile=conftest.$ac_objext
 
1164
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
 
1165
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
1166
_lt_compiler_boilerplate=`cat conftest.err`
 
1167
$RM conftest*
 
1168
])# _LT_COMPILER_BOILERPLATE
 
1169
 
 
1170
 
 
1171
# _LT_LINKER_BOILERPLATE
 
1172
# ----------------------
 
1173
# Check for linker boilerplate output or warnings with
 
1174
# the simple link test code.
 
1175
m4_defun([_LT_LINKER_BOILERPLATE],
 
1176
[m4_require([_LT_DECL_SED])dnl
 
1177
ac_outfile=conftest.$ac_objext
 
1178
echo "$lt_simple_link_test_code" >conftest.$ac_ext
 
1179
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
1180
_lt_linker_boilerplate=`cat conftest.err`
 
1181
$RM -r conftest*
 
1182
])# _LT_LINKER_BOILERPLATE
 
1183
 
 
1184
# _LT_REQUIRED_DARWIN_CHECKS
 
1185
# -------------------------
 
1186
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 
1187
  case $host_os in
 
1188
    rhapsody* | darwin*)
 
1189
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
 
1190
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
 
1191
    AC_CHECK_TOOL([LIPO], [lipo], [:])
 
1192
    AC_CHECK_TOOL([OTOOL], [otool], [:])
 
1193
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
 
1194
    _LT_DECL([], [DSYMUTIL], [1],
 
1195
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
 
1196
    _LT_DECL([], [NMEDIT], [1],
 
1197
      [Tool to change global to local symbols on Mac OS X])
 
1198
    _LT_DECL([], [LIPO], [1],
 
1199
      [Tool to manipulate fat objects and archives on Mac OS X])
 
1200
    _LT_DECL([], [OTOOL], [1],
 
1201
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
 
1202
    _LT_DECL([], [OTOOL64], [1],
 
1203
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
 
1204
 
 
1205
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
 
1206
      [lt_cv_apple_cc_single_mod=no
 
1207
      if test -z "${LT_MULTI_MODULE}"; then
 
1208
        # By default we will add the -single_module flag. You can override
 
1209
        # by either setting the environment variable LT_MULTI_MODULE
 
1210
        # non-empty at configure time, or by adding -multi_module to the
 
1211
        # link flags.
 
1212
        rm -rf libconftest.dylib*
 
1213
        echo "int foo(void){return 1;}" > conftest.c
 
1214
        echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 
1215
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
 
1216
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 
1217
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
 
1218
        _lt_result=$?
 
1219
        if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
 
1220
          lt_cv_apple_cc_single_mod=yes
 
1221
        else
 
1222
          cat conftest.err >&AS_MESSAGE_LOG_FD
 
1223
        fi
 
1224
        rm -rf libconftest.dylib*
 
1225
        rm -f conftest.*
 
1226
      fi])
 
1227
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
 
1228
      [lt_cv_ld_exported_symbols_list],
 
1229
      [lt_cv_ld_exported_symbols_list=no
 
1230
      save_LDFLAGS=$LDFLAGS
 
1231
      echo "_main" > conftest.sym
 
1232
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
 
1233
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
1234
        [lt_cv_ld_exported_symbols_list=yes],
 
1235
        [lt_cv_ld_exported_symbols_list=no])
 
1236
        LDFLAGS="$save_LDFLAGS"
 
1237
    ])
 
1238
    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
 
1239
      [lt_cv_ld_force_load=no
 
1240
      cat > conftest.c << _LT_EOF
 
1241
int forced_loaded() { return 2;}
 
1242
_LT_EOF
 
1243
      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
 
1244
      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
 
1245
      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
 
1246
      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
 
1247
      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
 
1248
      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
 
1249
      cat > conftest.c << _LT_EOF
 
1250
int main() { return 0;}
 
1251
_LT_EOF
 
1252
      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
 
1253
      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
 
1254
      _lt_result=$?
 
1255
      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
 
1256
        lt_cv_ld_force_load=yes
 
1257
      else
 
1258
        cat conftest.err >&AS_MESSAGE_LOG_FD
 
1259
      fi
 
1260
        rm -f conftest.err libconftest.a conftest conftest.c
 
1261
        rm -rf conftest.dSYM
 
1262
    ])
 
1263
    case $host_os in
 
1264
    rhapsody* | darwin1.[[012]])
 
1265
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
 
1266
    darwin1.*)
 
1267
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
1268
    darwin*) # darwin 5.x on
 
1269
      # if running on 10.5 or later, the deployment target defaults
 
1270
      # to the OS version, if on x86, and 10.4, the deployment
 
1271
      # target defaults to 10.4. Don't you love it?
 
1272
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 
1273
        10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
 
1274
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
1275
        10.[[012]]*)
 
1276
          _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
1277
        10.*)
 
1278
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
1279
      esac
 
1280
    ;;
 
1281
  esac
 
1282
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
 
1283
      _lt_dar_single_mod='$single_module'
 
1284
    fi
 
1285
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
 
1286
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
 
1287
    else
 
1288
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
1289
    fi
 
1290
    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
 
1291
      _lt_dsymutil='~$DSYMUTIL $lib || :'
 
1292
    else
 
1293
      _lt_dsymutil=
 
1294
    fi
 
1295
    ;;
 
1296
  esac
 
1297
])
 
1298
 
 
1299
 
 
1300
# _LT_DARWIN_LINKER_FEATURES
 
1301
# --------------------------
 
1302
# Checks for linker and compiler features on darwin
 
1303
m4_defun([_LT_DARWIN_LINKER_FEATURES],
 
1304
[
 
1305
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
 
1306
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
1307
  _LT_TAGVAR(hardcode_direct, $1)=no
 
1308
  _LT_TAGVAR(hardcode_automatic, $1)=yes
 
1309
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
1310
  if test "$lt_cv_ld_force_load" = "yes"; then
 
1311
    _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\"`'
 
1312
  else
 
1313
    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
 
1314
  fi
 
1315
  _LT_TAGVAR(link_all_deplibs, $1)=yes
 
1316
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
 
1317
  case $cc_basename in
 
1318
     ifort*) _lt_dar_can_shared=yes ;;
 
1319
     *) _lt_dar_can_shared=$GCC ;;
 
1320
  esac
 
1321
  if test "$_lt_dar_can_shared" = "yes"; then
 
1322
    output_verbose_link_cmd=func_echo_all
 
1323
    _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}"
 
1324
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
 
1325
    _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}"
 
1326
    _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}"
 
1327
    m4_if([$1], [CXX],
 
1328
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
 
1329
      _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}"
 
1330
      _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}"
 
1331
    fi
 
1332
],[])
 
1333
  else
 
1334
  _LT_TAGVAR(ld_shlibs, $1)=no
 
1335
  fi
 
1336
])
 
1337
 
 
1338
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
 
1339
# ----------------------------------
 
1340
# Links a minimal program and checks the executable
 
1341
# for the system default hardcoded library path. In most cases,
 
1342
# this is /usr/lib:/lib, but when the MPI compilers are used
 
1343
# the location of the communication and MPI libs are included too.
 
1344
# If we don't find anything, use the default library path according
 
1345
# to the aix ld manual.
 
1346
# Store the results from the different compilers for each TAGNAME.
 
1347
# Allow to override them for all tags through lt_cv_aix_libpath.
 
1348
m4_defun([_LT_SYS_MODULE_PATH_AIX],
 
1349
[m4_require([_LT_DECL_SED])dnl
 
1350
if test "${lt_cv_aix_libpath+set}" = set; then
 
1351
  aix_libpath=$lt_cv_aix_libpath
 
1352
else
 
1353
  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
 
1354
  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
 
1355
  lt_aix_libpath_sed='[
 
1356
      /Import File Strings/,/^$/ {
 
1357
          /^0/ {
 
1358
              s/^0  *\([^ ]*\) *$/\1/
 
1359
              p
 
1360
          }
 
1361
      }]'
 
1362
  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
1363
  # Check for a 64-bit object if we didn't find anything.
 
1364
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
 
1365
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
1366
  fi],[])
 
1367
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
 
1368
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
 
1369
  fi
 
1370
  ])
 
1371
  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
 
1372
fi
 
1373
])# _LT_SYS_MODULE_PATH_AIX
 
1374
 
 
1375
 
 
1376
# _LT_SHELL_INIT(ARG)
 
1377
# -------------------
 
1378
m4_define([_LT_SHELL_INIT],
 
1379
[m4_divert_text([M4SH-INIT], [$1
 
1380
])])# _LT_SHELL_INIT
 
1381
 
 
1382
 
 
1383
 
 
1384
# _LT_PROG_ECHO_BACKSLASH
 
1385
# -----------------------
 
1386
# Find how we can fake an echo command that does not interpret backslash.
 
1387
# In particular, with Autoconf 2.60 or later we add some code to the start
 
1388
# of the generated configure script which will find a shell with a builtin
 
1389
# printf (which we can use as an echo command).
 
1390
m4_defun([_LT_PROG_ECHO_BACKSLASH],
 
1391
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 
1392
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 
1393
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
1394
 
 
1395
AC_MSG_CHECKING([how to print strings])
 
1396
# Test print first, because it will be a builtin if present.
 
1397
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
 
1398
   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
 
1399
  ECHO='print -r --'
 
1400
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
 
1401
  ECHO='printf %s\n'
 
1402
else
 
1403
  # Use this function as a fallback that always works.
 
1404
  func_fallback_echo ()
 
1405
  {
 
1406
    eval 'cat <<_LTECHO_EOF
 
1407
$[]1
 
1408
_LTECHO_EOF'
 
1409
  }
 
1410
  ECHO='func_fallback_echo'
 
1411
fi
 
1412
 
 
1413
# func_echo_all arg...
 
1414
# Invoke $ECHO with all args, space-separated.
 
1415
func_echo_all ()
 
1416
{
 
1417
    $ECHO "$*" 
 
1418
}
 
1419
 
 
1420
case "$ECHO" in
 
1421
  printf*) AC_MSG_RESULT([printf]) ;;
 
1422
  print*) AC_MSG_RESULT([print -r]) ;;
 
1423
  *) AC_MSG_RESULT([cat]) ;;
 
1424
esac
 
1425
 
 
1426
m4_ifdef([_AS_DETECT_SUGGESTED],
 
1427
[_AS_DETECT_SUGGESTED([
 
1428
  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
 
1429
    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 
1430
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
 
1431
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
 
1432
    PATH=/empty FPATH=/empty; export PATH FPATH
 
1433
    test "X`printf %s $ECHO`" = "X$ECHO" \
 
1434
      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
 
1435
 
 
1436
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
 
1437
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 
1438
])# _LT_PROG_ECHO_BACKSLASH
 
1439
 
 
1440
 
 
1441
# _LT_WITH_SYSROOT
 
1442
# ----------------
 
1443
AC_DEFUN([_LT_WITH_SYSROOT],
 
1444
[AC_MSG_CHECKING([for sysroot])
 
1445
AC_ARG_WITH([sysroot],
 
1446
[  --with-sysroot[=DIR] Search for dependent libraries within DIR
 
1447
                        (or the compiler's sysroot if not specified).],
 
1448
[], [with_sysroot=no])
 
1449
 
 
1450
dnl lt_sysroot will always be passed unquoted.  We quote it here
 
1451
dnl in case the user passed a directory name.
 
1452
lt_sysroot=
 
1453
case ${with_sysroot} in #(
 
1454
 yes)
 
1455
   if test "$GCC" = yes; then
 
1456
     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
 
1457
   fi
 
1458
   ;; #(
 
1459
 /*)
 
1460
   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
 
1461
   ;; #(
 
1462
 no|'')
 
1463
   ;; #(
 
1464
 *)
 
1465
   AC_MSG_RESULT([${with_sysroot}])
 
1466
   AC_MSG_ERROR([The sysroot must be an absolute path.])
 
1467
   ;;
 
1468
esac
 
1469
 
 
1470
 AC_MSG_RESULT([${lt_sysroot:-no}])
 
1471
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
 
1472
[dependent libraries, and in which our libraries should be installed.])])
 
1473
 
 
1474
# _LT_ENABLE_LOCK
 
1475
# ---------------
 
1476
m4_defun([_LT_ENABLE_LOCK],
 
1477
[AC_ARG_ENABLE([libtool-lock],
 
1478
  [AS_HELP_STRING([--disable-libtool-lock],
 
1479
    [avoid locking (might break parallel builds)])])
 
1480
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
1481
 
 
1482
# Some flags need to be propagated to the compiler or linker for good
 
1483
# libtool support.
 
1484
case $host in
 
1485
ia64-*-hpux*)
 
1486
  # Find out which ABI we are using.
 
1487
  echo 'int i;' > conftest.$ac_ext
 
1488
  if AC_TRY_EVAL(ac_compile); then
 
1489
    case `/usr/bin/file conftest.$ac_objext` in
 
1490
      *ELF-32*)
 
1491
        HPUX_IA64_MODE="32"
 
1492
        ;;
 
1493
      *ELF-64*)
 
1494
        HPUX_IA64_MODE="64"
 
1495
        ;;
 
1496
    esac
 
1497
  fi
 
1498
  rm -rf conftest*
 
1499
  ;;
 
1500
*-*-irix6*)
 
1501
  # Find out which ABI we are using.
 
1502
  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
 
1503
  if AC_TRY_EVAL(ac_compile); then
 
1504
    if test "$lt_cv_prog_gnu_ld" = yes; then
 
1505
      case `/usr/bin/file conftest.$ac_objext` in
 
1506
        *32-bit*)
 
1507
          LD="${LD-ld} -melf32bsmip"
 
1508
          ;;
 
1509
        *N32*)
 
1510
          LD="${LD-ld} -melf32bmipn32"
 
1511
          ;;
 
1512
        *64-bit*)
 
1513
          LD="${LD-ld} -melf64bmip"
 
1514
        ;;
 
1515
      esac
 
1516
    else
 
1517
      case `/usr/bin/file conftest.$ac_objext` in
 
1518
        *32-bit*)
 
1519
          LD="${LD-ld} -32"
 
1520
          ;;
 
1521
        *N32*)
 
1522
          LD="${LD-ld} -n32"
 
1523
          ;;
 
1524
        *64-bit*)
 
1525
          LD="${LD-ld} -64"
 
1526
          ;;
 
1527
      esac
 
1528
    fi
 
1529
  fi
 
1530
  rm -rf conftest*
 
1531
  ;;
 
1532
 
 
1533
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
 
1534
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
1535
  # Find out which ABI we are using.
 
1536
  echo 'int i;' > conftest.$ac_ext
 
1537
  if AC_TRY_EVAL(ac_compile); then
 
1538
    case `/usr/bin/file conftest.o` in
 
1539
      *32-bit*)
 
1540
        case $host in
 
1541
          x86_64-*kfreebsd*-gnu)
 
1542
            LD="${LD-ld} -m elf_i386_fbsd"
 
1543
            ;;
 
1544
          x86_64-*linux*)
 
1545
            LD="${LD-ld} -m elf_i386"
 
1546
            ;;
 
1547
          ppc64-*linux*|powerpc64-*linux*)
 
1548
            LD="${LD-ld} -m elf32ppclinux"
 
1549
            ;;
 
1550
          s390x-*linux*)
 
1551
            LD="${LD-ld} -m elf_s390"
 
1552
            ;;
 
1553
          sparc64-*linux*)
 
1554
            LD="${LD-ld} -m elf32_sparc"
 
1555
            ;;
 
1556
        esac
 
1557
        ;;
 
1558
      *64-bit*)
 
1559
        case $host in
 
1560
          x86_64-*kfreebsd*-gnu)
 
1561
            LD="${LD-ld} -m elf_x86_64_fbsd"
 
1562
            ;;
 
1563
          x86_64-*linux*)
 
1564
            LD="${LD-ld} -m elf_x86_64"
 
1565
            ;;
 
1566
          ppc*-*linux*|powerpc*-*linux*)
 
1567
            LD="${LD-ld} -m elf64ppc"
 
1568
            ;;
 
1569
          s390*-*linux*|s390*-*tpf*)
 
1570
            LD="${LD-ld} -m elf64_s390"
 
1571
            ;;
 
1572
          sparc*-*linux*)
 
1573
            LD="${LD-ld} -m elf64_sparc"
 
1574
            ;;
 
1575
        esac
 
1576
        ;;
 
1577
    esac
 
1578
  fi
 
1579
  rm -rf conftest*
 
1580
  ;;
 
1581
 
 
1582
*-*-sco3.2v5*)
 
1583
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
1584
  SAVE_CFLAGS="$CFLAGS"
 
1585
  CFLAGS="$CFLAGS -belf"
 
1586
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
1587
    [AC_LANG_PUSH(C)
 
1588
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
1589
     AC_LANG_POP])
 
1590
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
1591
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
1592
    CFLAGS="$SAVE_CFLAGS"
 
1593
  fi
 
1594
  ;;
 
1595
sparc*-*solaris*)
 
1596
  # Find out which ABI we are using.
 
1597
  echo 'int i;' > conftest.$ac_ext
 
1598
  if AC_TRY_EVAL(ac_compile); then
 
1599
    case `/usr/bin/file conftest.o` in
 
1600
    *64-bit*)
 
1601
      case $lt_cv_prog_gnu_ld in
 
1602
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
 
1603
      *)
 
1604
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 
1605
          LD="${LD-ld} -64"
 
1606
        fi
 
1607
        ;;
 
1608
      esac
 
1609
      ;;
 
1610
    esac
 
1611
  fi
 
1612
  rm -rf conftest*
 
1613
  ;;
 
1614
esac
 
1615
 
 
1616
need_locks="$enable_libtool_lock"
 
1617
])# _LT_ENABLE_LOCK
 
1618
 
 
1619
 
 
1620
# _LT_PROG_AR
 
1621
# -----------
 
1622
m4_defun([_LT_PROG_AR],
 
1623
[AC_CHECK_TOOLS(AR, [ar], false)
 
1624
: ${AR=ar}
 
1625
: ${AR_FLAGS=cru}
 
1626
_LT_DECL([], [AR], [1], [The archiver])
 
1627
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
 
1628
 
 
1629
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
 
1630
  [lt_cv_ar_at_file=no
 
1631
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
 
1632
     [echo conftest.$ac_objext > conftest.lst
 
1633
      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
 
1634
      AC_TRY_EVAL([lt_ar_try])
 
1635
      if test "$ac_status" -eq 0; then
 
1636
        # Ensure the archiver fails upon bogus file names.
 
1637
        rm -f conftest.$ac_objext libconftest.a
 
1638
        AC_TRY_EVAL([lt_ar_try])
 
1639
        if test "$ac_status" -ne 0; then
 
1640
          lt_cv_ar_at_file=@
 
1641
        fi
 
1642
      fi
 
1643
      rm -f conftest.* libconftest.a
 
1644
     ])
 
1645
  ])
 
1646
 
 
1647
if test "x$lt_cv_ar_at_file" = xno; then
 
1648
  archiver_list_spec=
 
1649
else
 
1650
  archiver_list_spec=$lt_cv_ar_at_file
 
1651
fi
 
1652
_LT_DECL([], [archiver_list_spec], [1],
 
1653
  [How to feed a file listing to the archiver])
 
1654
])# _LT_PROG_AR
 
1655
 
 
1656
 
 
1657
# _LT_CMD_OLD_ARCHIVE
 
1658
# -------------------
 
1659
m4_defun([_LT_CMD_OLD_ARCHIVE],
 
1660
[_LT_PROG_AR
 
1661
 
 
1662
AC_CHECK_TOOL(STRIP, strip, :)
 
1663
test -z "$STRIP" && STRIP=:
 
1664
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
 
1665
 
 
1666
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
1667
test -z "$RANLIB" && RANLIB=:
 
1668
_LT_DECL([], [RANLIB], [1],
 
1669
    [Commands used to install an old-style archive])
 
1670
 
 
1671
# Determine commands to create old-style static archives.
 
1672
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
 
1673
old_postinstall_cmds='chmod 644 $oldlib'
 
1674
old_postuninstall_cmds=
 
1675
 
 
1676
if test -n "$RANLIB"; then
 
1677
  case $host_os in
 
1678
  openbsd*)
 
1679
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
 
1680
    ;;
 
1681
  *)
 
1682
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
 
1683
    ;;
 
1684
  esac
 
1685
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
1686
fi
 
1687
 
 
1688
case $host_os in
 
1689
  darwin*)
 
1690
    lock_old_archive_extraction=yes ;;
 
1691
  *)
 
1692
    lock_old_archive_extraction=no ;;
 
1693
esac
 
1694
_LT_DECL([], [old_postinstall_cmds], [2])
 
1695
_LT_DECL([], [old_postuninstall_cmds], [2])
 
1696
_LT_TAGDECL([], [old_archive_cmds], [2],
 
1697
    [Commands used to build an old-style archive])
 
1698
_LT_DECL([], [lock_old_archive_extraction], [0],
 
1699
    [Whether to use a lock for old archive extraction])
 
1700
])# _LT_CMD_OLD_ARCHIVE
 
1701
 
 
1702
 
 
1703
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
1704
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
1705
# ----------------------------------------------------------------
 
1706
# Check whether the given compiler option works
 
1707
AC_DEFUN([_LT_COMPILER_OPTION],
 
1708
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
1709
m4_require([_LT_DECL_SED])dnl
 
1710
AC_CACHE_CHECK([$1], [$2],
 
1711
  [$2=no
 
1712
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
1713
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
1714
   lt_compiler_flag="$3"
 
1715
   # Insert the option either (1) after the last *FLAGS variable, or
 
1716
   # (2) before a word containing "conftest.", or (3) at the end.
 
1717
   # Note that $ac_compile itself does not contain backslashes and begins
 
1718
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
1719
   # The option is referenced via a variable to avoid confusing sed.
 
1720
   lt_compile=`echo "$ac_compile" | $SED \
 
1721
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
1722
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
1723
   -e 's:$: $lt_compiler_flag:'`
 
1724
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
1725
   (eval "$lt_compile" 2>conftest.err)
 
1726
   ac_status=$?
 
1727
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
1728
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1729
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
1730
     # The compiler can only warn and ignore the option if not recognized
 
1731
     # So say no if there are warnings other than the usual output.
 
1732
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
 
1733
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
1734
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
 
1735
       $2=yes
 
1736
     fi
 
1737
   fi
 
1738
   $RM conftest*
 
1739
])
 
1740
 
 
1741
if test x"[$]$2" = xyes; then
 
1742
    m4_if([$5], , :, [$5])
 
1743
else
 
1744
    m4_if([$6], , :, [$6])
 
1745
fi
 
1746
])# _LT_COMPILER_OPTION
 
1747
 
 
1748
# Old name:
 
1749
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
 
1750
dnl aclocal-1.4 backwards compatibility:
 
1751
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
 
1752
 
 
1753
 
 
1754
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
1755
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
 
1756
# ----------------------------------------------------
 
1757
# Check whether the given linker option works
 
1758
AC_DEFUN([_LT_LINKER_OPTION],
 
1759
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
1760
m4_require([_LT_DECL_SED])dnl
 
1761
AC_CACHE_CHECK([$1], [$2],
 
1762
  [$2=no
 
1763
   save_LDFLAGS="$LDFLAGS"
 
1764
   LDFLAGS="$LDFLAGS $3"
 
1765
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
 
1766
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
1767
     # The linker can only warn and ignore the option if not recognized
 
1768
     # So say no if there are warnings
 
1769
     if test -s conftest.err; then
 
1770
       # Append any errors to the config.log.
 
1771
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
1772
       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
 
1773
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
1774
       if diff conftest.exp conftest.er2 >/dev/null; then
 
1775
         $2=yes
 
1776
       fi
 
1777
     else
 
1778
       $2=yes
 
1779
     fi
 
1780
   fi
 
1781
   $RM -r conftest*
 
1782
   LDFLAGS="$save_LDFLAGS"
 
1783
])
 
1784
 
 
1785
if test x"[$]$2" = xyes; then
 
1786
    m4_if([$4], , :, [$4])
 
1787
else
 
1788
    m4_if([$5], , :, [$5])
 
1789
fi
 
1790
])# _LT_LINKER_OPTION
 
1791
 
 
1792
# Old name:
 
1793
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
 
1794
dnl aclocal-1.4 backwards compatibility:
 
1795
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
 
1796
 
 
1797
 
 
1798
# LT_CMD_MAX_LEN
 
1799
#---------------
 
1800
AC_DEFUN([LT_CMD_MAX_LEN],
 
1801
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
1802
# find the maximum length of command line arguments
 
1803
AC_MSG_CHECKING([the maximum length of command line arguments])
 
1804
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
1805
  i=0
 
1806
  teststring="ABCD"
 
1807
 
 
1808
  case $build_os in
 
1809
  msdosdjgpp*)
 
1810
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
1811
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
1812
    # during glob expansion).  Even if it were fixed, the result of this
 
1813
    # check would be larger than it should be.
 
1814
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
1815
    ;;
 
1816
 
 
1817
  gnu*)
 
1818
    # Under GNU Hurd, this test is not required because there is
 
1819
    # no limit to the length of command line arguments.
 
1820
    # Libtool will interpret -1 as no limit whatsoever
 
1821
    lt_cv_sys_max_cmd_len=-1;
 
1822
    ;;
 
1823
 
 
1824
  cygwin* | mingw* | cegcc*)
 
1825
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
1826
    # about 5 minutes as the teststring grows exponentially.
 
1827
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
1828
    # you end up with a "frozen" computer, even though with patience
 
1829
    # the test eventually succeeds (with a max line length of 256k).
 
1830
    # Instead, let's just punt: use the minimum linelength reported by
 
1831
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
1832
    lt_cv_sys_max_cmd_len=8192;
 
1833
    ;;
 
1834
 
 
1835
  mint*)
 
1836
    # On MiNT this can take a long time and run out of memory.
 
1837
    lt_cv_sys_max_cmd_len=8192;
 
1838
    ;;
 
1839
 
 
1840
  amigaos*)
 
1841
    # On AmigaOS with pdksh, this test takes hours, literally.
 
1842
    # So we just punt and use a minimum line length of 8192.
 
1843
    lt_cv_sys_max_cmd_len=8192;
 
1844
    ;;
 
1845
 
 
1846
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
 
1847
    # This has been around since 386BSD, at least.  Likely further.
 
1848
    if test -x /sbin/sysctl; then
 
1849
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
1850
    elif test -x /usr/sbin/sysctl; then
 
1851
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
1852
    else
 
1853
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
 
1854
    fi
 
1855
    # And add a safety zone
 
1856
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
1857
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
1858
    ;;
 
1859
 
 
1860
  interix*)
 
1861
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
 
1862
    lt_cv_sys_max_cmd_len=196608
 
1863
    ;;
 
1864
 
 
1865
  osf*)
 
1866
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
 
1867
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
 
1868
    # nice to cause kernel panics so lets avoid the loop below.
 
1869
    # First set a reasonable default.
 
1870
    lt_cv_sys_max_cmd_len=16384
 
1871
    #
 
1872
    if test -x /sbin/sysconfig; then
 
1873
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
 
1874
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
 
1875
      esac
 
1876
    fi
 
1877
    ;;
 
1878
  sco3.2v5*)
 
1879
    lt_cv_sys_max_cmd_len=102400
 
1880
    ;;
 
1881
  sysv5* | sco5v6* | sysv4.2uw2*)
 
1882
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
 
1883
    if test -n "$kargmax"; then
 
1884
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
 
1885
    else
 
1886
      lt_cv_sys_max_cmd_len=32768
 
1887
    fi
 
1888
    ;;
 
1889
  *)
 
1890
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
 
1891
    if test -n "$lt_cv_sys_max_cmd_len"; then
 
1892
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
1893
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
1894
    else
 
1895
      # Make teststring a little bigger before we do anything with it.
 
1896
      # a 1K string should be a reasonable start.
 
1897
      for i in 1 2 3 4 5 6 7 8 ; do
 
1898
        teststring=$teststring$teststring
 
1899
      done
 
1900
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
1901
      # If test is not a shell built-in, we'll probably end up computing a
 
1902
      # maximum length that is only half of the actual maximum length, but
 
1903
      # we can't tell.
 
1904
      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
 
1905
                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
 
1906
              test $i != 17 # 1/2 MB should be enough
 
1907
      do
 
1908
        i=`expr $i + 1`
 
1909
        teststring=$teststring$teststring
 
1910
      done
 
1911
      # Only check the string length outside the loop.
 
1912
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
 
1913
      teststring=
 
1914
      # Add a significant safety factor because C++ compilers can tack on
 
1915
      # massive amounts of additional arguments before passing them to the
 
1916
      # linker.  It appears as though 1/2 is a usable value.
 
1917
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
1918
    fi
 
1919
    ;;
 
1920
  esac
 
1921
])
 
1922
if test -n $lt_cv_sys_max_cmd_len ; then
 
1923
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
1924
else
 
1925
  AC_MSG_RESULT(none)
 
1926
fi
 
1927
max_cmd_len=$lt_cv_sys_max_cmd_len
 
1928
_LT_DECL([], [max_cmd_len], [0],
 
1929
    [What is the maximum length of a command?])
 
1930
])# LT_CMD_MAX_LEN
 
1931
 
 
1932
# Old name:
 
1933
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
 
1934
dnl aclocal-1.4 backwards compatibility:
 
1935
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
 
1936
 
 
1937
 
 
1938
# _LT_HEADER_DLFCN
 
1939
# ----------------
 
1940
m4_defun([_LT_HEADER_DLFCN],
 
1941
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
 
1942
])# _LT_HEADER_DLFCN
 
1943
 
 
1944
 
 
1945
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
1946
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
1947
# ----------------------------------------------------------------
 
1948
m4_defun([_LT_TRY_DLOPEN_SELF],
 
1949
[m4_require([_LT_HEADER_DLFCN])dnl
 
1950
if test "$cross_compiling" = yes; then :
 
1951
  [$4]
 
1952
else
 
1953
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
1954
  lt_status=$lt_dlunknown
 
1955
  cat > conftest.$ac_ext <<_LT_EOF
 
1956
[#line $LINENO "configure"
 
1957
#include "confdefs.h"
 
1958
 
 
1959
#if HAVE_DLFCN_H
 
1960
#include <dlfcn.h>
 
1961
#endif
 
1962
 
 
1963
#include <stdio.h>
 
1964
 
 
1965
#ifdef RTLD_GLOBAL
 
1966
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
1967
#else
 
1968
#  ifdef DL_GLOBAL
 
1969
#    define LT_DLGLOBAL         DL_GLOBAL
 
1970
#  else
 
1971
#    define LT_DLGLOBAL         0
 
1972
#  endif
 
1973
#endif
 
1974
 
 
1975
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
1976
   find out it does not work in some platform. */
 
1977
#ifndef LT_DLLAZY_OR_NOW
 
1978
#  ifdef RTLD_LAZY
 
1979
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
1980
#  else
 
1981
#    ifdef DL_LAZY
 
1982
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
1983
#    else
 
1984
#      ifdef RTLD_NOW
 
1985
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
1986
#      else
 
1987
#        ifdef DL_NOW
 
1988
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
1989
#        else
 
1990
#          define LT_DLLAZY_OR_NOW      0
 
1991
#        endif
 
1992
#      endif
 
1993
#    endif
 
1994
#  endif
 
1995
#endif
 
1996
 
 
1997
/* When -fvisbility=hidden is used, assume the code has been annotated
 
1998
   correspondingly for the symbols needed.  */
 
1999
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 
2000
int fnord () __attribute__((visibility("default")));
 
2001
#endif
 
2002
 
 
2003
int fnord () { return 42; }
 
2004
int main ()
 
2005
{
 
2006
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
2007
  int status = $lt_dlunknown;
 
2008
 
 
2009
  if (self)
 
2010
    {
 
2011
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
2012
      else
 
2013
        {
 
2014
          if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
 
2015
          else puts (dlerror ());
 
2016
        }
 
2017
      /* dlclose (self); */
 
2018
    }
 
2019
  else
 
2020
    puts (dlerror ());
 
2021
 
 
2022
  return status;
 
2023
}]
 
2024
_LT_EOF
 
2025
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
2026
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
 
2027
    lt_status=$?
 
2028
    case x$lt_status in
 
2029
      x$lt_dlno_uscore) $1 ;;
 
2030
      x$lt_dlneed_uscore) $2 ;;
 
2031
      x$lt_dlunknown|x*) $3 ;;
 
2032
    esac
 
2033
  else :
 
2034
    # compilation failed
 
2035
    $3
 
2036
  fi
 
2037
fi
 
2038
rm -fr conftest*
 
2039
])# _LT_TRY_DLOPEN_SELF
 
2040
 
 
2041
 
 
2042
# LT_SYS_DLOPEN_SELF
 
2043
# ------------------
 
2044
AC_DEFUN([LT_SYS_DLOPEN_SELF],
 
2045
[m4_require([_LT_HEADER_DLFCN])dnl
 
2046
if test "x$enable_dlopen" != xyes; then
 
2047
  enable_dlopen=unknown
 
2048
  enable_dlopen_self=unknown
 
2049
  enable_dlopen_self_static=unknown
 
2050
else
 
2051
  lt_cv_dlopen=no
 
2052
  lt_cv_dlopen_libs=
 
2053
 
 
2054
  case $host_os in
 
2055
  beos*)
 
2056
    lt_cv_dlopen="load_add_on"
 
2057
    lt_cv_dlopen_libs=
 
2058
    lt_cv_dlopen_self=yes
 
2059
    ;;
 
2060
 
 
2061
  mingw* | pw32* | cegcc*)
 
2062
    lt_cv_dlopen="LoadLibrary"
 
2063
    lt_cv_dlopen_libs=
 
2064
    ;;
 
2065
 
 
2066
  cygwin*)
 
2067
    lt_cv_dlopen="dlopen"
 
2068
    lt_cv_dlopen_libs=
 
2069
    ;;
 
2070
 
 
2071
  darwin*)
 
2072
  # if libdl is installed we need to link against it
 
2073
    AC_CHECK_LIB([dl], [dlopen],
 
2074
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
2075
    lt_cv_dlopen="dyld"
 
2076
    lt_cv_dlopen_libs=
 
2077
    lt_cv_dlopen_self=yes
 
2078
    ])
 
2079
    ;;
 
2080
 
 
2081
  *)
 
2082
    AC_CHECK_FUNC([shl_load],
 
2083
          [lt_cv_dlopen="shl_load"],
 
2084
      [AC_CHECK_LIB([dld], [shl_load],
 
2085
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
 
2086
        [AC_CHECK_FUNC([dlopen],
 
2087
              [lt_cv_dlopen="dlopen"],
 
2088
          [AC_CHECK_LIB([dl], [dlopen],
 
2089
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
2090
            [AC_CHECK_LIB([svld], [dlopen],
 
2091
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
2092
              [AC_CHECK_LIB([dld], [dld_link],
 
2093
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
 
2094
              ])
 
2095
            ])
 
2096
          ])
 
2097
        ])
 
2098
      ])
 
2099
    ;;
 
2100
  esac
 
2101
 
 
2102
  if test "x$lt_cv_dlopen" != xno; then
 
2103
    enable_dlopen=yes
 
2104
  else
 
2105
    enable_dlopen=no
 
2106
  fi
 
2107
 
 
2108
  case $lt_cv_dlopen in
 
2109
  dlopen)
 
2110
    save_CPPFLAGS="$CPPFLAGS"
 
2111
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
2112
 
 
2113
    save_LDFLAGS="$LDFLAGS"
 
2114
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
2115
 
 
2116
    save_LIBS="$LIBS"
 
2117
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
2118
 
 
2119
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
2120
          lt_cv_dlopen_self, [dnl
 
2121
          _LT_TRY_DLOPEN_SELF(
 
2122
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
2123
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
2124
    ])
 
2125
 
 
2126
    if test "x$lt_cv_dlopen_self" = xyes; then
 
2127
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
 
2128
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
2129
          lt_cv_dlopen_self_static, [dnl
 
2130
          _LT_TRY_DLOPEN_SELF(
 
2131
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
2132
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
2133
      ])
 
2134
    fi
 
2135
 
 
2136
    CPPFLAGS="$save_CPPFLAGS"
 
2137
    LDFLAGS="$save_LDFLAGS"
 
2138
    LIBS="$save_LIBS"
 
2139
    ;;
 
2140
  esac
 
2141
 
 
2142
  case $lt_cv_dlopen_self in
 
2143
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
2144
  *) enable_dlopen_self=unknown ;;
 
2145
  esac
 
2146
 
 
2147
  case $lt_cv_dlopen_self_static in
 
2148
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
2149
  *) enable_dlopen_self_static=unknown ;;
 
2150
  esac
 
2151
fi
 
2152
_LT_DECL([dlopen_support], [enable_dlopen], [0],
 
2153
         [Whether dlopen is supported])
 
2154
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
 
2155
         [Whether dlopen of programs is supported])
 
2156
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
 
2157
         [Whether dlopen of statically linked programs is supported])
 
2158
])# LT_SYS_DLOPEN_SELF
 
2159
 
 
2160
# Old name:
 
2161
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
 
2162
dnl aclocal-1.4 backwards compatibility:
 
2163
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
 
2164
 
 
2165
 
 
2166
# _LT_COMPILER_C_O([TAGNAME])
 
2167
# ---------------------------
 
2168
# Check to see if options -c and -o are simultaneously supported by compiler.
 
2169
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
 
2170
m4_defun([_LT_COMPILER_C_O],
 
2171
[m4_require([_LT_DECL_SED])dnl
 
2172
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2173
m4_require([_LT_TAG_COMPILER])dnl
 
2174
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
2175
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
2176
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
2177
   $RM -r conftest 2>/dev/null
 
2178
   mkdir conftest
 
2179
   cd conftest
 
2180
   mkdir out
 
2181
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
2182
 
 
2183
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
2184
   # Insert the option either (1) after the last *FLAGS variable, or
 
2185
   # (2) before a word containing "conftest.", or (3) at the end.
 
2186
   # Note that $ac_compile itself does not contain backslashes and begins
 
2187
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
2188
   lt_compile=`echo "$ac_compile" | $SED \
 
2189
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
2190
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
2191
   -e 's:$: $lt_compiler_flag:'`
 
2192
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
2193
   (eval "$lt_compile" 2>out/conftest.err)
 
2194
   ac_status=$?
 
2195
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
2196
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
2197
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
2198
   then
 
2199
     # The compiler can only warn and ignore the option if not recognized
 
2200
     # So say no if there are warnings
 
2201
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
 
2202
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
 
2203
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
 
2204
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
2205
     fi
 
2206
   fi
 
2207
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
 
2208
   $RM conftest*
 
2209
   # SGI C++ compiler will create directory out/ii_files/ for
 
2210
   # template instantiation
 
2211
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
 
2212
   $RM out/* && rmdir out
 
2213
   cd ..
 
2214
   $RM -r conftest
 
2215
   $RM conftest*
 
2216
])
 
2217
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
 
2218
        [Does compiler simultaneously support -c and -o options?])
 
2219
])# _LT_COMPILER_C_O
 
2220
 
 
2221
 
 
2222
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
 
2223
# ----------------------------------
 
2224
# Check to see if we can do hard links to lock some files if needed
 
2225
m4_defun([_LT_COMPILER_FILE_LOCKS],
 
2226
[m4_require([_LT_ENABLE_LOCK])dnl
 
2227
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2228
_LT_COMPILER_C_O([$1])
 
2229
 
 
2230
hard_links="nottested"
 
2231
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
2232
  # do not overwrite the value of need_locks provided by the user
 
2233
  AC_MSG_CHECKING([if we can lock with hard links])
 
2234
  hard_links=yes
 
2235
  $RM conftest*
 
2236
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
2237
  touch conftest.a
 
2238
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
2239
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
2240
  AC_MSG_RESULT([$hard_links])
 
2241
  if test "$hard_links" = no; then
 
2242
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
2243
    need_locks=warn
 
2244
  fi
 
2245
else
 
2246
  need_locks=no
 
2247
fi
 
2248
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
 
2249
])# _LT_COMPILER_FILE_LOCKS
 
2250
 
 
2251
 
 
2252
# _LT_CHECK_OBJDIR
 
2253
# ----------------
 
2254
m4_defun([_LT_CHECK_OBJDIR],
 
2255
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
2256
[rm -f .libs 2>/dev/null
 
2257
mkdir .libs 2>/dev/null
 
2258
if test -d .libs; then
 
2259
  lt_cv_objdir=.libs
 
2260
else
 
2261
  # MS-DOS does not allow filenames that begin with a dot.
 
2262
  lt_cv_objdir=_libs
 
2263
fi
 
2264
rmdir .libs 2>/dev/null])
 
2265
objdir=$lt_cv_objdir
 
2266
_LT_DECL([], [objdir], [0],
 
2267
         [The name of the directory that contains temporary libtool files])dnl
 
2268
m4_pattern_allow([LT_OBJDIR])dnl
 
2269
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
 
2270
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
 
2271
])# _LT_CHECK_OBJDIR
 
2272
 
 
2273
 
 
2274
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
 
2275
# --------------------------------------
 
2276
# Check hardcoding attributes.
 
2277
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
 
2278
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
2279
_LT_TAGVAR(hardcode_action, $1)=
 
2280
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
 
2281
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
 
2282
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
2283
 
 
2284
  # We can hardcode non-existent directories.
 
2285
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
 
2286
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
2287
     # have to relink, otherwise we might link with an installed library
 
2288
     # when we should be linking with a yet-to-be-installed one
 
2289
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
2290
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
 
2291
    # Linking always hardcodes the temporary library directory.
 
2292
    _LT_TAGVAR(hardcode_action, $1)=relink
 
2293
  else
 
2294
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
2295
    _LT_TAGVAR(hardcode_action, $1)=immediate
 
2296
  fi
 
2297
else
 
2298
  # We cannot hardcode anything, or else we can only hardcode existing
 
2299
  # directories.
 
2300
  _LT_TAGVAR(hardcode_action, $1)=unsupported
 
2301
fi
 
2302
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
2303
 
 
2304
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
 
2305
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
 
2306
  # Fast installation is not supported
 
2307
  enable_fast_install=no
 
2308
elif test "$shlibpath_overrides_runpath" = yes ||
 
2309
     test "$enable_shared" = no; then
 
2310
  # Fast installation is not necessary
 
2311
  enable_fast_install=needless
 
2312
fi
 
2313
_LT_TAGDECL([], [hardcode_action], [0],
 
2314
    [How to hardcode a shared library path into an executable])
 
2315
])# _LT_LINKER_HARDCODE_LIBPATH
 
2316
 
 
2317
 
 
2318
# _LT_CMD_STRIPLIB
 
2319
# ----------------
 
2320
m4_defun([_LT_CMD_STRIPLIB],
 
2321
[m4_require([_LT_DECL_EGREP])
 
2322
striplib=
 
2323
old_striplib=
 
2324
AC_MSG_CHECKING([whether stripping libraries is possible])
 
2325
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
 
2326
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
2327
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
2328
  AC_MSG_RESULT([yes])
 
2329
else
 
2330
# FIXME - insert some real tests, host_os isn't really good enough
 
2331
  case $host_os in
 
2332
  darwin*)
 
2333
    if test -n "$STRIP" ; then
 
2334
      striplib="$STRIP -x"
 
2335
      old_striplib="$STRIP -S"
 
2336
      AC_MSG_RESULT([yes])
 
2337
    else
 
2338
      AC_MSG_RESULT([no])
 
2339
    fi
 
2340
    ;;
 
2341
  *)
 
2342
    AC_MSG_RESULT([no])
 
2343
    ;;
 
2344
  esac
 
2345
fi
 
2346
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
 
2347
_LT_DECL([], [striplib], [1])
 
2348
])# _LT_CMD_STRIPLIB
 
2349
 
 
2350
 
 
2351
# _LT_SYS_DYNAMIC_LINKER([TAG])
 
2352
# -----------------------------
 
2353
# PORTME Fill in your ld.so characteristics
 
2354
m4_defun([_LT_SYS_DYNAMIC_LINKER],
 
2355
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2356
m4_require([_LT_DECL_EGREP])dnl
 
2357
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 
2358
m4_require([_LT_DECL_OBJDUMP])dnl
 
2359
m4_require([_LT_DECL_SED])dnl
 
2360
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 
2361
AC_MSG_CHECKING([dynamic linker characteristics])
 
2362
m4_if([$1],
 
2363
        [], [
 
2364
if test "$GCC" = yes; then
 
2365
  case $host_os in
 
2366
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
 
2367
    *) lt_awk_arg="/^libraries:/" ;;
 
2368
  esac
 
2369
  case $host_os in
 
2370
    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
 
2371
    *) lt_sed_strip_eq="s,=/,/,g" ;;
 
2372
  esac
 
2373
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
 
2374
  case $lt_search_path_spec in
 
2375
  *\;*)
 
2376
    # if the path contains ";" then we assume it to be the separator
 
2377
    # otherwise default to the standard path separator (i.e. ":") - it is
 
2378
    # assumed that no part of a normal pathname contains ";" but that should
 
2379
    # okay in the real world where ";" in dirpaths is itself problematic.
 
2380
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
 
2381
    ;;
 
2382
  *)
 
2383
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
 
2384
    ;;
 
2385
  esac
 
2386
  # Ok, now we have the path, separated by spaces, we can step through it
 
2387
  # and add multilib dir if necessary.
 
2388
  lt_tmp_lt_search_path_spec=
 
2389
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
 
2390
  for lt_sys_path in $lt_search_path_spec; do
 
2391
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
 
2392
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
 
2393
    else
 
2394
      test -d "$lt_sys_path" && \
 
2395
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
 
2396
    fi
 
2397
  done
 
2398
  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
 
2399
BEGIN {RS=" "; FS="/|\n";} {
 
2400
  lt_foo="";
 
2401
  lt_count=0;
 
2402
  for (lt_i = NF; lt_i > 0; lt_i--) {
 
2403
    if ($lt_i != "" && $lt_i != ".") {
 
2404
      if ($lt_i == "..") {
 
2405
        lt_count++;
 
2406
      } else {
 
2407
        if (lt_count == 0) {
 
2408
          lt_foo="/" $lt_i lt_foo;
 
2409
        } else {
 
2410
          lt_count--;
 
2411
        }
 
2412
      }
 
2413
    }
 
2414
  }
 
2415
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
 
2416
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 
2417
}'`
 
2418
  # AWK program above erroneously prepends '/' to C:/dos/paths
 
2419
  # for these hosts.
 
2420
  case $host_os in
 
2421
    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
 
2422
      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
 
2423
  esac
 
2424
  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 
2425
else
 
2426
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
2427
fi])
 
2428
library_names_spec=
 
2429
libname_spec='lib$name'
 
2430
soname_spec=
 
2431
shrext_cmds=".so"
 
2432
postinstall_cmds=
 
2433
postuninstall_cmds=
 
2434
finish_cmds=
 
2435
finish_eval=
 
2436
shlibpath_var=
 
2437
shlibpath_overrides_runpath=unknown
 
2438
version_type=none
 
2439
dynamic_linker="$host_os ld.so"
 
2440
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
2441
need_lib_prefix=unknown
 
2442
hardcode_into_libs=no
 
2443
 
 
2444
# when you set need_version to no, make sure it does not cause -set_version
 
2445
# flags to be left without arguments
 
2446
need_version=unknown
 
2447
 
 
2448
case $host_os in
 
2449
aix3*)
 
2450
  version_type=linux
 
2451
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 
2452
  shlibpath_var=LIBPATH
 
2453
 
 
2454
  # AIX 3 has no versioning support, so we append a major version to the name.
 
2455
  soname_spec='${libname}${release}${shared_ext}$major'
 
2456
  ;;
 
2457
 
 
2458
aix[[4-9]]*)
 
2459
  version_type=linux
 
2460
  need_lib_prefix=no
 
2461
  need_version=no
 
2462
  hardcode_into_libs=yes
 
2463
  if test "$host_cpu" = ia64; then
 
2464
    # AIX 5 supports IA64
 
2465
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 
2466
    shlibpath_var=LD_LIBRARY_PATH
 
2467
  else
 
2468
    # With GCC up to 2.95.x, collect2 would create an import file
 
2469
    # for dependence libraries.  The import file would start with
 
2470
    # the line `#! .'.  This would cause the generated library to
 
2471
    # depend on `.', always an invalid library.  This was fixed in
 
2472
    # development snapshots of GCC prior to 3.0.
 
2473
    case $host_os in
 
2474
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
2475
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
2476
           echo ' yes '
 
2477
           echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 
2478
        :
 
2479
      else
 
2480
        can_build_shared=no
 
2481
      fi
 
2482
      ;;
 
2483
    esac
 
2484
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
2485
    # soname into executable. Probably we can add versioning support to
 
2486
    # collect2, so additional links can be useful in future.
 
2487
    if test "$aix_use_runtimelinking" = yes; then
 
2488
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
2489
      # instead of lib<name>.a to let people know that these are not
 
2490
      # typical AIX shared libraries.
 
2491
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2492
    else
 
2493
      # We preserve .a as extension for shared libraries through AIX4.2
 
2494
      # and later when we are not doing run time linking.
 
2495
      library_names_spec='${libname}${release}.a $libname.a'
 
2496
      soname_spec='${libname}${release}${shared_ext}$major'
 
2497
    fi
 
2498
    shlibpath_var=LIBPATH
 
2499
  fi
 
2500
  ;;
 
2501
 
 
2502
amigaos*)
 
2503
  case $host_cpu in
 
2504
  powerpc)
 
2505
    # Since July 2007 AmigaOS4 officially supports .so libraries.
 
2506
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
 
2507
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2508
    ;;
 
2509
  m68k)
 
2510
    library_names_spec='$libname.ixlibrary $libname.a'
 
2511
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
2512
    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'
 
2513
    ;;
 
2514
  esac
 
2515
  ;;
 
2516
 
 
2517
beos*)
 
2518
  library_names_spec='${libname}${shared_ext}'
 
2519
  dynamic_linker="$host_os ld.so"
 
2520
  shlibpath_var=LIBRARY_PATH
 
2521
  ;;
 
2522
 
 
2523
bsdi[[45]]*)
 
2524
  version_type=linux
 
2525
  need_version=no
 
2526
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2527
  soname_spec='${libname}${release}${shared_ext}$major'
 
2528
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
2529
  shlibpath_var=LD_LIBRARY_PATH
 
2530
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
2531
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
2532
  # the default ld.so.conf also contains /usr/contrib/lib and
 
2533
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
2534
  # libtool to hard-code these into programs
 
2535
  ;;
 
2536
 
 
2537
cygwin* | mingw* | pw32* | cegcc*)
 
2538
  version_type=windows
 
2539
  shrext_cmds=".dll"
 
2540
  need_version=no
 
2541
  need_lib_prefix=no
 
2542
 
 
2543
  case $GCC,$cc_basename in
 
2544
  yes,*)
 
2545
    # gcc
 
2546
    library_names_spec='$libname.dll.a'
 
2547
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
2548
    postinstall_cmds='base_file=`basename \${file}`~
 
2549
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
 
2550
      dldir=$destdir/`dirname \$dlpath`~
 
2551
      test -d \$dldir || mkdir -p \$dldir~
 
2552
      $install_prog $dir/$dlname \$dldir/$dlname~
 
2553
      chmod a+x \$dldir/$dlname~
 
2554
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
 
2555
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
 
2556
      fi'
 
2557
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
2558
      dlpath=$dir/\$dldll~
 
2559
       $RM \$dlpath'
 
2560
    shlibpath_overrides_runpath=yes
 
2561
 
 
2562
    case $host_os in
 
2563
    cygwin*)
 
2564
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
2565
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
2566
m4_if([$1], [],[
 
2567
      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
 
2568
      ;;
 
2569
    mingw* | cegcc*)
 
2570
      # MinGW DLLs use traditional 'lib' prefix
 
2571
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
2572
      ;;
 
2573
    pw32*)
 
2574
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
2575
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
2576
      ;;
 
2577
    esac
 
2578
    dynamic_linker='Win32 ld.exe'
 
2579
    ;;
 
2580
 
 
2581
  *,cl*)
 
2582
    # Native MSVC
 
2583
    libname_spec='$name'
 
2584
    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
2585
    library_names_spec='${libname}.dll.lib'
 
2586
 
 
2587
    case $build_os in
 
2588
    mingw*)
 
2589
      sys_lib_search_path_spec=
 
2590
      lt_save_ifs=$IFS
 
2591
      IFS=';'
 
2592
      for lt_path in $LIB
 
2593
      do
 
2594
        IFS=$lt_save_ifs
 
2595
        # Let DOS variable expansion print the short 8.3 style file name.
 
2596
        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
 
2597
        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
 
2598
      done
 
2599
      IFS=$lt_save_ifs
 
2600
      # Convert to MSYS style.
 
2601
      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
 
2602
      ;;
 
2603
    cygwin*)
 
2604
      # Convert to unix form, then to dos form, then back to unix form
 
2605
      # but this time dos style (no spaces!) so that the unix form looks
 
2606
      # like /cygdrive/c/PROGRA~1:/cygdr...
 
2607
      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
 
2608
      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
 
2609
      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
 
2610
      ;;
 
2611
    *)
 
2612
      sys_lib_search_path_spec="$LIB"
 
2613
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
 
2614
        # It is most probably a Windows format PATH.
 
2615
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
2616
      else
 
2617
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
 
2618
      fi
 
2619
      # FIXME: find the short name or the path components, as spaces are
 
2620
      # common. (e.g. "Program Files" -> "PROGRA~1")
 
2621
      ;;
 
2622
    esac
 
2623
 
 
2624
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
2625
    postinstall_cmds='base_file=`basename \${file}`~
 
2626
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
 
2627
      dldir=$destdir/`dirname \$dlpath`~
 
2628
      test -d \$dldir || mkdir -p \$dldir~
 
2629
      $install_prog $dir/$dlname \$dldir/$dlname'
 
2630
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
2631
      dlpath=$dir/\$dldll~
 
2632
       $RM \$dlpath'
 
2633
    shlibpath_overrides_runpath=yes
 
2634
    dynamic_linker='Win32 link.exe'
 
2635
    ;;
 
2636
 
 
2637
  *)
 
2638
    # Assume MSVC wrapper
 
2639
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
2640
    dynamic_linker='Win32 ld.exe'
 
2641
    ;;
 
2642
  esac
 
2643
  # FIXME: first we should search . and the directory the executable is in
 
2644
  shlibpath_var=PATH
 
2645
  ;;
 
2646
 
 
2647
darwin* | rhapsody*)
 
2648
  dynamic_linker="$host_os dyld"
 
2649
  version_type=darwin
 
2650
  need_lib_prefix=no
 
2651
  need_version=no
 
2652
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
2653
  soname_spec='${libname}${release}${major}$shared_ext'
 
2654
  shlibpath_overrides_runpath=yes
 
2655
  shlibpath_var=DYLD_LIBRARY_PATH
 
2656
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 
2657
m4_if([$1], [],[
 
2658
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
 
2659
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
2660
  ;;
 
2661
 
 
2662
dgux*)
 
2663
  version_type=linux
 
2664
  need_lib_prefix=no
 
2665
  need_version=no
 
2666
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
2667
  soname_spec='${libname}${release}${shared_ext}$major'
 
2668
  shlibpath_var=LD_LIBRARY_PATH
 
2669
  ;;
 
2670
 
 
2671
freebsd1*)
 
2672
  dynamic_linker=no
 
2673
  ;;
 
2674
 
 
2675
freebsd* | dragonfly*)
 
2676
  # DragonFly does not have aout.  When/if they implement a new
 
2677
  # versioning mechanism, adjust this.
 
2678
  if test -x /usr/bin/objformat; then
 
2679
    objformat=`/usr/bin/objformat`
 
2680
  else
 
2681
    case $host_os in
 
2682
    freebsd[[123]]*) objformat=aout ;;
 
2683
    *) objformat=elf ;;
 
2684
    esac
 
2685
  fi
 
2686
  version_type=freebsd-$objformat
 
2687
  case $version_type in
 
2688
    freebsd-elf*)
 
2689
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
2690
      need_version=no
 
2691
      need_lib_prefix=no
 
2692
      ;;
 
2693
    freebsd-*)
 
2694
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 
2695
      need_version=yes
 
2696
      ;;
 
2697
  esac
 
2698
  shlibpath_var=LD_LIBRARY_PATH
 
2699
  case $host_os in
 
2700
  freebsd2*)
 
2701
    shlibpath_overrides_runpath=yes
 
2702
    ;;
 
2703
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
 
2704
    shlibpath_overrides_runpath=yes
 
2705
    hardcode_into_libs=yes
 
2706
    ;;
 
2707
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
 
2708
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
 
2709
    shlibpath_overrides_runpath=no
 
2710
    hardcode_into_libs=yes
 
2711
    ;;
 
2712
  *) # from 4.6 on, and DragonFly
 
2713
    shlibpath_overrides_runpath=yes
 
2714
    hardcode_into_libs=yes
 
2715
    ;;
 
2716
  esac
 
2717
  ;;
 
2718
 
 
2719
gnu*)
 
2720
  version_type=linux
 
2721
  need_lib_prefix=no
 
2722
  need_version=no
 
2723
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
2724
  soname_spec='${libname}${release}${shared_ext}$major'
 
2725
  shlibpath_var=LD_LIBRARY_PATH
 
2726
  hardcode_into_libs=yes
 
2727
  ;;
 
2728
 
 
2729
haiku*)
 
2730
  version_type=linux
 
2731
  need_lib_prefix=no
 
2732
  need_version=no
 
2733
  dynamic_linker="$host_os runtime_loader"
 
2734
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
2735
  soname_spec='${libname}${release}${shared_ext}$major'
 
2736
  shlibpath_var=LIBRARY_PATH
 
2737
  shlibpath_overrides_runpath=yes
 
2738
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
 
2739
  hardcode_into_libs=yes
 
2740
  ;;
 
2741
 
 
2742
hpux9* | hpux10* | hpux11*)
 
2743
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
2744
  # link against other versions.
 
2745
  version_type=sunos
 
2746
  need_lib_prefix=no
 
2747
  need_version=no
 
2748
  case $host_cpu in
 
2749
  ia64*)
 
2750
    shrext_cmds='.so'
 
2751
    hardcode_into_libs=yes
 
2752
    dynamic_linker="$host_os dld.so"
 
2753
    shlibpath_var=LD_LIBRARY_PATH
 
2754
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
2755
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2756
    soname_spec='${libname}${release}${shared_ext}$major'
 
2757
    if test "X$HPUX_IA64_MODE" = X32; then
 
2758
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
2759
    else
 
2760
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
2761
    fi
 
2762
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
2763
    ;;
 
2764
  hppa*64*)
 
2765
    shrext_cmds='.sl'
 
2766
    hardcode_into_libs=yes
 
2767
    dynamic_linker="$host_os dld.sl"
 
2768
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
2769
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
2770
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2771
    soname_spec='${libname}${release}${shared_ext}$major'
 
2772
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
2773
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
2774
    ;;
 
2775
  *)
 
2776
    shrext_cmds='.sl'
 
2777
    dynamic_linker="$host_os dld.sl"
 
2778
    shlibpath_var=SHLIB_PATH
 
2779
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
2780
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2781
    soname_spec='${libname}${release}${shared_ext}$major'
 
2782
    ;;
 
2783
  esac
 
2784
  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
 
2785
  postinstall_cmds='chmod 555 $lib'
 
2786
  # or fails outright, so override atomically:
 
2787
  install_override_mode=555
 
2788
  ;;
 
2789
 
 
2790
interix[[3-9]]*)
 
2791
  version_type=linux
 
2792
  need_lib_prefix=no
 
2793
  need_version=no
 
2794
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
2795
  soname_spec='${libname}${release}${shared_ext}$major'
 
2796
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
 
2797
  shlibpath_var=LD_LIBRARY_PATH
 
2798
  shlibpath_overrides_runpath=no
 
2799
  hardcode_into_libs=yes
 
2800
  ;;
 
2801
 
 
2802
irix5* | irix6* | nonstopux*)
 
2803
  case $host_os in
 
2804
    nonstopux*) version_type=nonstopux ;;
 
2805
    *)
 
2806
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
2807
                version_type=linux
 
2808
        else
 
2809
                version_type=irix
 
2810
        fi ;;
 
2811
  esac
 
2812
  need_lib_prefix=no
 
2813
  need_version=no
 
2814
  soname_spec='${libname}${release}${shared_ext}$major'
 
2815
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 
2816
  case $host_os in
 
2817
  irix5* | nonstopux*)
 
2818
    libsuff= shlibsuff=
 
2819
    ;;
 
2820
  *)
 
2821
    case $LD in # libtool.m4 will add one of these switches to LD
 
2822
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
2823
      libsuff= shlibsuff= libmagic=32-bit;;
 
2824
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
2825
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
2826
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
2827
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
2828
    *) libsuff= shlibsuff= libmagic=never-match;;
 
2829
    esac
 
2830
    ;;
 
2831
  esac
 
2832
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
2833
  shlibpath_overrides_runpath=no
 
2834
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
2835
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
2836
  hardcode_into_libs=yes
 
2837
  ;;
 
2838
 
 
2839
# No shared lib support for Linux oldld, aout, or coff.
 
2840
linux*oldld* | linux*aout* | linux*coff*)
 
2841
  dynamic_linker=no
 
2842
  ;;
 
2843
 
 
2844
# This must be Linux ELF.
 
2845
linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
2846
  version_type=linux
 
2847
  need_lib_prefix=no
 
2848
  need_version=no
 
2849
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2850
  soname_spec='${libname}${release}${shared_ext}$major'
 
2851
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
2852
  shlibpath_var=LD_LIBRARY_PATH
 
2853
  shlibpath_overrides_runpath=no
 
2854
 
 
2855
  # Some binutils ld are patched to set DT_RUNPATH
 
2856
  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
 
2857
    [lt_cv_shlibpath_overrides_runpath=no
 
2858
    save_LDFLAGS=$LDFLAGS
 
2859
    save_libdir=$libdir
 
2860
    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
 
2861
         LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
 
2862
    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
2863
      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
 
2864
         [lt_cv_shlibpath_overrides_runpath=yes])])
 
2865
    LDFLAGS=$save_LDFLAGS
 
2866
    libdir=$save_libdir
 
2867
    ])
 
2868
  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
2869
 
 
2870
  # This implies no fast_install, which is unacceptable.
 
2871
  # Some rework will be needed to allow for fast_install
 
2872
  # before this can be enabled.
 
2873
  hardcode_into_libs=yes
 
2874
 
 
2875
  # Add ABI-specific directories to the system library path.
 
2876
  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
 
2877
 
 
2878
  # Append ld.so.conf contents to the search path
 
2879
  if test -f /etc/ld.so.conf; then
 
2880
    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' ' '`
 
2881
    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
 
2882
 
 
2883
  fi
 
2884
 
 
2885
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
2886
  # powerpc, because MkLinux only supported shared libraries with the
 
2887
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
2888
  # most powerpc-linux boxes support dynamic linking these days and
 
2889
  # people can always --disable-shared, the test was removed, and we
 
2890
  # assume the GNU/Linux dynamic linker is in use.
 
2891
  dynamic_linker='GNU/Linux ld.so'
 
2892
  ;;
 
2893
 
 
2894
netbsd*)
 
2895
  version_type=sunos
 
2896
  need_lib_prefix=no
 
2897
  need_version=no
 
2898
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
2899
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
2900
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
2901
    dynamic_linker='NetBSD (a.out) ld.so'
 
2902
  else
 
2903
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
2904
    soname_spec='${libname}${release}${shared_ext}$major'
 
2905
    dynamic_linker='NetBSD ld.elf_so'
 
2906
  fi
 
2907
  shlibpath_var=LD_LIBRARY_PATH
 
2908
  shlibpath_overrides_runpath=yes
 
2909
  hardcode_into_libs=yes
 
2910
  ;;
 
2911
 
 
2912
newsos6)
 
2913
  version_type=linux
 
2914
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2915
  shlibpath_var=LD_LIBRARY_PATH
 
2916
  shlibpath_overrides_runpath=yes
 
2917
  ;;
 
2918
 
 
2919
*nto* | *qnx*)
 
2920
  version_type=qnx
 
2921
  need_lib_prefix=no
 
2922
  need_version=no
 
2923
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2924
  soname_spec='${libname}${release}${shared_ext}$major'
 
2925
  shlibpath_var=LD_LIBRARY_PATH
 
2926
  shlibpath_overrides_runpath=no
 
2927
  hardcode_into_libs=yes
 
2928
  dynamic_linker='ldqnx.so'
 
2929
  ;;
 
2930
 
 
2931
openbsd*)
 
2932
  version_type=sunos
 
2933
  sys_lib_dlsearch_path_spec="/usr/lib"
 
2934
  need_lib_prefix=no
 
2935
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 
2936
  case $host_os in
 
2937
    openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
 
2938
    *)                          need_version=no  ;;
 
2939
  esac
 
2940
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
2941
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
2942
  shlibpath_var=LD_LIBRARY_PATH
 
2943
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
2944
    case $host_os in
 
2945
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
2946
        shlibpath_overrides_runpath=no
 
2947
        ;;
 
2948
      *)
 
2949
        shlibpath_overrides_runpath=yes
 
2950
        ;;
 
2951
      esac
 
2952
  else
 
2953
    shlibpath_overrides_runpath=yes
 
2954
  fi
 
2955
  ;;
 
2956
 
 
2957
os2*)
 
2958
  libname_spec='$name'
 
2959
  shrext_cmds=".dll"
 
2960
  need_lib_prefix=no
 
2961
  library_names_spec='$libname${shared_ext} $libname.a'
 
2962
  dynamic_linker='OS/2 ld.exe'
 
2963
  shlibpath_var=LIBPATH
 
2964
  ;;
 
2965
 
 
2966
osf3* | osf4* | osf5*)
 
2967
  version_type=osf
 
2968
  need_lib_prefix=no
 
2969
  need_version=no
 
2970
  soname_spec='${libname}${release}${shared_ext}$major'
 
2971
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2972
  shlibpath_var=LD_LIBRARY_PATH
 
2973
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
2974
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
2975
  ;;
 
2976
 
 
2977
rdos*)
 
2978
  dynamic_linker=no
 
2979
  ;;
 
2980
 
 
2981
solaris*)
 
2982
  version_type=linux
 
2983
  need_lib_prefix=no
 
2984
  need_version=no
 
2985
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2986
  soname_spec='${libname}${release}${shared_ext}$major'
 
2987
  shlibpath_var=LD_LIBRARY_PATH
 
2988
  shlibpath_overrides_runpath=yes
 
2989
  hardcode_into_libs=yes
 
2990
  # ldd complains unless libraries are executable
 
2991
  postinstall_cmds='chmod +x $lib'
 
2992
  ;;
 
2993
 
 
2994
sunos4*)
 
2995
  version_type=sunos
 
2996
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
2997
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
2998
  shlibpath_var=LD_LIBRARY_PATH
 
2999
  shlibpath_overrides_runpath=yes
 
3000
  if test "$with_gnu_ld" = yes; then
 
3001
    need_lib_prefix=no
 
3002
  fi
 
3003
  need_version=yes
 
3004
  ;;
 
3005
 
 
3006
sysv4 | sysv4.3*)
 
3007
  version_type=linux
 
3008
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3009
  soname_spec='${libname}${release}${shared_ext}$major'
 
3010
  shlibpath_var=LD_LIBRARY_PATH
 
3011
  case $host_vendor in
 
3012
    sni)
 
3013
      shlibpath_overrides_runpath=no
 
3014
      need_lib_prefix=no
 
3015
      runpath_var=LD_RUN_PATH
 
3016
      ;;
 
3017
    siemens)
 
3018
      need_lib_prefix=no
 
3019
      ;;
 
3020
    motorola)
 
3021
      need_lib_prefix=no
 
3022
      need_version=no
 
3023
      shlibpath_overrides_runpath=no
 
3024
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
3025
      ;;
 
3026
  esac
 
3027
  ;;
 
3028
 
 
3029
sysv4*MP*)
 
3030
  if test -d /usr/nec ;then
 
3031
    version_type=linux
 
3032
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
3033
    soname_spec='$libname${shared_ext}.$major'
 
3034
    shlibpath_var=LD_LIBRARY_PATH
 
3035
  fi
 
3036
  ;;
 
3037
 
 
3038
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
3039
  version_type=freebsd-elf
 
3040
  need_lib_prefix=no
 
3041
  need_version=no
 
3042
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
3043
  soname_spec='${libname}${release}${shared_ext}$major'
 
3044
  shlibpath_var=LD_LIBRARY_PATH
 
3045
  shlibpath_overrides_runpath=yes
 
3046
  hardcode_into_libs=yes
 
3047
  if test "$with_gnu_ld" = yes; then
 
3048
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
 
3049
  else
 
3050
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
 
3051
    case $host_os in
 
3052
      sco3.2v5*)
 
3053
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
 
3054
        ;;
 
3055
    esac
 
3056
  fi
 
3057
  sys_lib_dlsearch_path_spec='/usr/lib'
 
3058
  ;;
 
3059
 
 
3060
tpf*)
 
3061
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
 
3062
  version_type=linux
 
3063
  need_lib_prefix=no
 
3064
  need_version=no
 
3065
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3066
  shlibpath_var=LD_LIBRARY_PATH
 
3067
  shlibpath_overrides_runpath=no
 
3068
  hardcode_into_libs=yes
 
3069
  ;;
 
3070
 
 
3071
uts4*)
 
3072
  version_type=linux
 
3073
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3074
  soname_spec='${libname}${release}${shared_ext}$major'
 
3075
  shlibpath_var=LD_LIBRARY_PATH
 
3076
  ;;
 
3077
 
 
3078
*)
 
3079
  dynamic_linker=no
 
3080
  ;;
 
3081
esac
 
3082
AC_MSG_RESULT([$dynamic_linker])
 
3083
test "$dynamic_linker" = no && can_build_shared=no
 
3084
 
 
3085
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
3086
if test "$GCC" = yes; then
 
3087
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
3088
fi
 
3089
 
 
3090
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
 
3091
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
 
3092
fi
 
3093
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
 
3094
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 
3095
fi
 
3096
 
 
3097
_LT_DECL([], [variables_saved_for_relink], [1],
 
3098
    [Variables whose values should be saved in libtool wrapper scripts and
 
3099
    restored at link time])
 
3100
_LT_DECL([], [need_lib_prefix], [0],
 
3101
    [Do we need the "lib" prefix for modules?])
 
3102
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
 
3103
_LT_DECL([], [version_type], [0], [Library versioning type])
 
3104
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
 
3105
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
 
3106
_LT_DECL([], [shlibpath_overrides_runpath], [0],
 
3107
    [Is shlibpath searched before the hard-coded library search path?])
 
3108
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
 
3109
_LT_DECL([], [library_names_spec], [1],
 
3110
    [[List of archive names.  First name is the real one, the rest are links.
 
3111
    The last name is the one that the linker finds with -lNAME]])
 
3112
_LT_DECL([], [soname_spec], [1],
 
3113
    [[The coded name of the library, if different from the real name]])
 
3114
_LT_DECL([], [install_override_mode], [1],
 
3115
    [Permission mode override for installation of shared libraries])
 
3116
_LT_DECL([], [postinstall_cmds], [2],
 
3117
    [Command to use after installation of a shared archive])
 
3118
_LT_DECL([], [postuninstall_cmds], [2],
 
3119
    [Command to use after uninstallation of a shared archive])
 
3120
_LT_DECL([], [finish_cmds], [2],
 
3121
    [Commands used to finish a libtool library installation in a directory])
 
3122
_LT_DECL([], [finish_eval], [1],
 
3123
    [[As "finish_cmds", except a single script fragment to be evaled but
 
3124
    not shown]])
 
3125
_LT_DECL([], [hardcode_into_libs], [0],
 
3126
    [Whether we should hardcode library paths into libraries])
 
3127
_LT_DECL([], [sys_lib_search_path_spec], [2],
 
3128
    [Compile-time system search path for libraries])
 
3129
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
 
3130
    [Run-time system search path for libraries])
 
3131
])# _LT_SYS_DYNAMIC_LINKER
 
3132
 
 
3133
 
 
3134
# _LT_PATH_TOOL_PREFIX(TOOL)
 
3135
# --------------------------
 
3136
# find a file program which can recognize shared library
 
3137
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
 
3138
[m4_require([_LT_DECL_EGREP])dnl
 
3139
AC_MSG_CHECKING([for $1])
 
3140
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
3141
[case $MAGIC_CMD in
 
3142
[[\\/*] |  ?:[\\/]*])
 
3143
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
3144
  ;;
 
3145
*)
 
3146
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
3147
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3148
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
3149
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
3150
dnl not every word.  This closes a longstanding sh security hole.
 
3151
  ac_dummy="m4_if([$2], , $PATH, [$2])"
 
3152
  for ac_dir in $ac_dummy; do
 
3153
    IFS="$lt_save_ifs"
 
3154
    test -z "$ac_dir" && ac_dir=.
 
3155
    if test -f $ac_dir/$1; then
 
3156
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
3157
      if test -n "$file_magic_test_file"; then
 
3158
        case $deplibs_check_method in
 
3159
        "file_magic "*)
 
3160
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 
3161
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
3162
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
3163
            $EGREP "$file_magic_regex" > /dev/null; then
 
3164
            :
 
3165
          else
 
3166
            cat <<_LT_EOF 1>&2
 
3167
 
 
3168
*** Warning: the command libtool uses to detect shared libraries,
 
3169
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
3170
*** The result is that libtool may fail to recognize shared libraries
 
3171
*** as such.  This will affect the creation of libtool libraries that
 
3172
*** depend on shared libraries, but programs linked with such libtool
 
3173
*** libraries will work regardless of this problem.  Nevertheless, you
 
3174
*** may want to report the problem to your system manager and/or to
 
3175
*** bug-libtool@gnu.org
 
3176
 
 
3177
_LT_EOF
 
3178
          fi ;;
 
3179
        esac
 
3180
      fi
 
3181
      break
 
3182
    fi
 
3183
  done
 
3184
  IFS="$lt_save_ifs"
 
3185
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
3186
  ;;
 
3187
esac])
 
3188
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
3189
if test -n "$MAGIC_CMD"; then
 
3190
  AC_MSG_RESULT($MAGIC_CMD)
 
3191
else
 
3192
  AC_MSG_RESULT(no)
 
3193
fi
 
3194
_LT_DECL([], [MAGIC_CMD], [0],
 
3195
         [Used to examine libraries when file_magic_cmd begins with "file"])dnl
 
3196
])# _LT_PATH_TOOL_PREFIX
 
3197
 
 
3198
# Old name:
 
3199
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
 
3200
dnl aclocal-1.4 backwards compatibility:
 
3201
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
3202
 
 
3203
 
 
3204
# _LT_PATH_MAGIC
 
3205
# --------------
 
3206
# find a file program which can recognize a shared library
 
3207
m4_defun([_LT_PATH_MAGIC],
 
3208
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
3209
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
3210
  if test -n "$ac_tool_prefix"; then
 
3211
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
3212
  else
 
3213
    MAGIC_CMD=:
 
3214
  fi
 
3215
fi
 
3216
])# _LT_PATH_MAGIC
 
3217
 
 
3218
 
 
3219
# LT_PATH_LD
 
3220
# ----------
 
3221
# find the pathname to the GNU or non-GNU linker
 
3222
AC_DEFUN([LT_PATH_LD],
 
3223
[AC_REQUIRE([AC_PROG_CC])dnl
 
3224
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3225
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
3226
m4_require([_LT_DECL_SED])dnl
 
3227
m4_require([_LT_DECL_EGREP])dnl
 
3228
m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 
3229
 
 
3230
AC_ARG_WITH([gnu-ld],
 
3231
    [AS_HELP_STRING([--with-gnu-ld],
 
3232
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
3233
    [test "$withval" = no || with_gnu_ld=yes],
 
3234
    [with_gnu_ld=no])dnl
 
3235
 
 
3236
ac_prog=ld
 
3237
if test "$GCC" = yes; then
 
3238
  # Check if gcc -print-prog-name=ld gives a path.
 
3239
  AC_MSG_CHECKING([for ld used by $CC])
 
3240
  case $host in
 
3241
  *-*-mingw*)
 
3242
    # gcc leaves a trailing carriage return which upsets mingw
 
3243
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
3244
  *)
 
3245
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
3246
  esac
 
3247
  case $ac_prog in
 
3248
    # Accept absolute paths.
 
3249
    [[\\/]]* | ?:[[\\/]]*)
 
3250
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
3251
      # Canonicalize the pathname of ld
 
3252
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
 
3253
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 
3254
        ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
 
3255
      done
 
3256
      test -z "$LD" && LD="$ac_prog"
 
3257
      ;;
 
3258
  "")
 
3259
    # If it fails, then pretend we aren't using GCC.
 
3260
    ac_prog=ld
 
3261
    ;;
 
3262
  *)
 
3263
    # If it is relative, then search for the first ld in PATH.
 
3264
    with_gnu_ld=unknown
 
3265
    ;;
 
3266
  esac
 
3267
elif test "$with_gnu_ld" = yes; then
 
3268
  AC_MSG_CHECKING([for GNU ld])
 
3269
else
 
3270
  AC_MSG_CHECKING([for non-GNU ld])
 
3271
fi
 
3272
AC_CACHE_VAL(lt_cv_path_LD,
 
3273
[if test -z "$LD"; then
 
3274
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3275
  for ac_dir in $PATH; do
 
3276
    IFS="$lt_save_ifs"
 
3277
    test -z "$ac_dir" && ac_dir=.
 
3278
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
3279
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
3280
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
3281
      # but apparently some variants of GNU ld only accept -v.
 
3282
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
3283
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
3284
      *GNU* | *'with BFD'*)
 
3285
        test "$with_gnu_ld" != no && break
 
3286
        ;;
 
3287
      *)
 
3288
        test "$with_gnu_ld" != yes && break
 
3289
        ;;
 
3290
      esac
 
3291
    fi
 
3292
  done
 
3293
  IFS="$lt_save_ifs"
 
3294
else
 
3295
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
3296
fi])
 
3297
LD="$lt_cv_path_LD"
 
3298
if test -n "$LD"; then
 
3299
  AC_MSG_RESULT($LD)
 
3300
else
 
3301
  AC_MSG_RESULT(no)
 
3302
fi
 
3303
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
3304
_LT_PATH_LD_GNU
 
3305
AC_SUBST([LD])
 
3306
 
 
3307
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
 
3308
])# LT_PATH_LD
 
3309
 
 
3310
# Old names:
 
3311
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
 
3312
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
 
3313
dnl aclocal-1.4 backwards compatibility:
 
3314
dnl AC_DEFUN([AM_PROG_LD], [])
 
3315
dnl AC_DEFUN([AC_PROG_LD], [])
 
3316
 
 
3317
 
 
3318
# _LT_PATH_LD_GNU
 
3319
#- --------------
 
3320
m4_defun([_LT_PATH_LD_GNU],
 
3321
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
3322
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 
3323
case `$LD -v 2>&1 </dev/null` in
 
3324
*GNU* | *'with BFD'*)
 
3325
  lt_cv_prog_gnu_ld=yes
 
3326
  ;;
 
3327
*)
 
3328
  lt_cv_prog_gnu_ld=no
 
3329
  ;;
 
3330
esac])
 
3331
with_gnu_ld=$lt_cv_prog_gnu_ld
 
3332
])# _LT_PATH_LD_GNU
 
3333
 
 
3334
 
 
3335
# _LT_CMD_RELOAD
 
3336
# --------------
 
3337
# find reload flag for linker
 
3338
#   -- PORTME Some linkers may need a different reload flag.
 
3339
m4_defun([_LT_CMD_RELOAD],
 
3340
[AC_CACHE_CHECK([for $LD option to reload object files],
 
3341
  lt_cv_ld_reload_flag,
 
3342
  [lt_cv_ld_reload_flag='-r'])
 
3343
reload_flag=$lt_cv_ld_reload_flag
 
3344
case $reload_flag in
 
3345
"" | " "*) ;;
 
3346
*) reload_flag=" $reload_flag" ;;
 
3347
esac
 
3348
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
3349
case $host_os in
 
3350
  cygwin* | mingw* | pw32* | cegcc*)
 
3351
    if test "$GCC" != yes; then
 
3352
      reload_cmds=false
 
3353
    fi
 
3354
    ;;
 
3355
  darwin*)
 
3356
    if test "$GCC" = yes; then
 
3357
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
 
3358
    else
 
3359
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
3360
    fi
 
3361
    ;;
 
3362
esac
 
3363
_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
 
3364
_LT_TAGDECL([], [reload_cmds], [2])dnl
 
3365
])# _LT_CMD_RELOAD
 
3366
 
 
3367
 
 
3368
# _LT_CHECK_MAGIC_METHOD
 
3369
# ----------------------
 
3370
# how to check for library dependencies
 
3371
#  -- PORTME fill in with the dynamic library characteristics
 
3372
m4_defun([_LT_CHECK_MAGIC_METHOD],
 
3373
[m4_require([_LT_DECL_EGREP])
 
3374
m4_require([_LT_DECL_OBJDUMP])
 
3375
AC_CACHE_CHECK([how to recognize dependent libraries],
 
3376
lt_cv_deplibs_check_method,
 
3377
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
3378
lt_cv_file_magic_test_file=
 
3379
lt_cv_deplibs_check_method='unknown'
 
3380
# Need to set the preceding variable on all platforms that support
 
3381
# interlibrary dependencies.
 
3382
# 'none' -- dependencies not supported.
 
3383
# `unknown' -- same as none, but documents that we really don't know.
 
3384
# 'pass_all' -- all dependencies passed with no checks.
 
3385
# 'test_compile' -- check by making test program.
 
3386
# 'file_magic [[regex]]' -- check by looking for files in library path
 
3387
# which responds to the $file_magic_cmd with a given extended regex.
 
3388
# If you have `file' or equivalent on your system and you're not sure
 
3389
# whether `pass_all' will *always* work, you probably want this one.
 
3390
 
 
3391
case $host_os in
 
3392
aix[[4-9]]*)
 
3393
  lt_cv_deplibs_check_method=pass_all
 
3394
  ;;
 
3395
 
 
3396
beos*)
 
3397
  lt_cv_deplibs_check_method=pass_all
 
3398
  ;;
 
3399
 
 
3400
bsdi[[45]]*)
 
3401
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
3402
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
3403
  lt_cv_file_magic_test_file=/shlib/libc.so
 
3404
  ;;
 
3405
 
 
3406
cygwin*)
 
3407
  # func_win32_libid is a shell function defined in ltmain.sh
 
3408
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
3409
  lt_cv_file_magic_cmd='func_win32_libid'
 
3410
  ;;
 
3411
 
 
3412
mingw* | pw32*)
 
3413
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
3414
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
 
3415
  # unless we find 'file', for example because we are cross-compiling.
 
3416
  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
 
3417
  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
 
3418
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
3419
    lt_cv_file_magic_cmd='func_win32_libid'
 
3420
  else
 
3421
    # Keep this pattern in sync with the one in func_win32_libid.
 
3422
    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
 
3423
    lt_cv_file_magic_cmd='$OBJDUMP -f'
 
3424
  fi
 
3425
  ;;
 
3426
 
 
3427
cegcc*)
 
3428
  # use the weaker test based on 'objdump'. See mingw*.
 
3429
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
 
3430
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
3431
  ;;
 
3432
 
 
3433
darwin* | rhapsody*)
 
3434
  lt_cv_deplibs_check_method=pass_all
 
3435
  ;;
 
3436
 
 
3437
freebsd* | dragonfly*)
 
3438
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
3439
    case $host_cpu in
 
3440
    i*86 )
 
3441
      # Not sure whether the presence of OpenBSD here was a mistake.
 
3442
      # Let's accept both of them until this is cleared up.
 
3443
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
 
3444
      lt_cv_file_magic_cmd=/usr/bin/file
 
3445
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
3446
      ;;
 
3447
    esac
 
3448
  else
 
3449
    lt_cv_deplibs_check_method=pass_all
 
3450
  fi
 
3451
  ;;
 
3452
 
 
3453
gnu*)
 
3454
  lt_cv_deplibs_check_method=pass_all
 
3455
  ;;
 
3456
 
 
3457
haiku*)
 
3458
  lt_cv_deplibs_check_method=pass_all
 
3459
  ;;
 
3460
 
 
3461
hpux10.20* | hpux11*)
 
3462
  lt_cv_file_magic_cmd=/usr/bin/file
 
3463
  case $host_cpu in
 
3464
  ia64*)
 
3465
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
3466
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
3467
    ;;
 
3468
  hppa*64*)
 
3469
    [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]']
 
3470
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
3471
    ;;
 
3472
  *)
 
3473
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
 
3474
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
3475
    ;;
 
3476
  esac
 
3477
  ;;
 
3478
 
 
3479
interix[[3-9]]*)
 
3480
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
 
3481
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
 
3482
  ;;
 
3483
 
 
3484
irix5* | irix6* | nonstopux*)
 
3485
  case $LD in
 
3486
  *-32|*"-32 ") libmagic=32-bit;;
 
3487
  *-n32|*"-n32 ") libmagic=N32;;
 
3488
  *-64|*"-64 ") libmagic=64-bit;;
 
3489
  *) libmagic=never-match;;
 
3490
  esac
 
3491
  lt_cv_deplibs_check_method=pass_all
 
3492
  ;;
 
3493
 
 
3494
# This must be Linux ELF.
 
3495
linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
3496
  lt_cv_deplibs_check_method=pass_all
 
3497
  ;;
 
3498
 
 
3499
netbsd*)
 
3500
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
3501
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
3502
  else
 
3503
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
3504
  fi
 
3505
  ;;
 
3506
 
 
3507
newos6*)
 
3508
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
3509
  lt_cv_file_magic_cmd=/usr/bin/file
 
3510
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
3511
  ;;
 
3512
 
 
3513
*nto* | *qnx*)
 
3514
  lt_cv_deplibs_check_method=pass_all
 
3515
  ;;
 
3516
 
 
3517
openbsd*)
 
3518
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3519
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
 
3520
  else
 
3521
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
3522
  fi
 
3523
  ;;
 
3524
 
 
3525
osf3* | osf4* | osf5*)
 
3526
  lt_cv_deplibs_check_method=pass_all
 
3527
  ;;
 
3528
 
 
3529
rdos*)
 
3530
  lt_cv_deplibs_check_method=pass_all
 
3531
  ;;
 
3532
 
 
3533
solaris*)
 
3534
  lt_cv_deplibs_check_method=pass_all
 
3535
  ;;
 
3536
 
 
3537
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
3538
  lt_cv_deplibs_check_method=pass_all
 
3539
  ;;
 
3540
 
 
3541
sysv4 | sysv4.3*)
 
3542
  case $host_vendor in
 
3543
  motorola)
 
3544
    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]]'
 
3545
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
3546
    ;;
 
3547
  ncr)
 
3548
    lt_cv_deplibs_check_method=pass_all
 
3549
    ;;
 
3550
  sequent)
 
3551
    lt_cv_file_magic_cmd='/bin/file'
 
3552
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
3553
    ;;
 
3554
  sni)
 
3555
    lt_cv_file_magic_cmd='/bin/file'
 
3556
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
3557
    lt_cv_file_magic_test_file=/lib/libc.so
 
3558
    ;;
 
3559
  siemens)
 
3560
    lt_cv_deplibs_check_method=pass_all
 
3561
    ;;
 
3562
  pc)
 
3563
    lt_cv_deplibs_check_method=pass_all
 
3564
    ;;
 
3565
  esac
 
3566
  ;;
 
3567
 
 
3568
tpf*)
 
3569
  lt_cv_deplibs_check_method=pass_all
 
3570
  ;;
 
3571
esac
 
3572
])
 
3573
 
 
3574
file_magic_glob=
 
3575
want_nocaseglob=no
 
3576
if test "$build" = "$host"; then
 
3577
  case $host_os in
 
3578
  mingw* | pw32*)
 
3579
    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
 
3580
      want_nocaseglob=yes
 
3581
    else
 
3582
      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
 
3583
    fi
 
3584
    ;;
 
3585
  esac
 
3586
fi
 
3587
 
 
3588
file_magic_cmd=$lt_cv_file_magic_cmd
 
3589
deplibs_check_method=$lt_cv_deplibs_check_method
 
3590
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
3591
 
 
3592
_LT_DECL([], [deplibs_check_method], [1],
 
3593
    [Method to check whether dependent libraries are shared objects])
 
3594
_LT_DECL([], [file_magic_cmd], [1],
 
3595
    [Command to use when deplibs_check_method = "file_magic"])
 
3596
_LT_DECL([], [file_magic_glob], [1],
 
3597
    [How to find potential files when deplibs_check_method = "file_magic"])
 
3598
_LT_DECL([], [want_nocaseglob], [1],
 
3599
    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
 
3600
])# _LT_CHECK_MAGIC_METHOD
 
3601
 
 
3602
 
 
3603
# LT_PATH_NM
 
3604
# ----------
 
3605
# find the pathname to a BSD- or MS-compatible name lister
 
3606
AC_DEFUN([LT_PATH_NM],
 
3607
[AC_REQUIRE([AC_PROG_CC])dnl
 
3608
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 
3609
[if test -n "$NM"; then
 
3610
  # Let the user override the test.
 
3611
  lt_cv_path_NM="$NM"
 
3612
else
 
3613
  lt_nm_to_check="${ac_tool_prefix}nm"
 
3614
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
 
3615
    lt_nm_to_check="$lt_nm_to_check nm"
 
3616
  fi
 
3617
  for lt_tmp_nm in $lt_nm_to_check; do
 
3618
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3619
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
 
3620
      IFS="$lt_save_ifs"
 
3621
      test -z "$ac_dir" && ac_dir=.
 
3622
      tmp_nm="$ac_dir/$lt_tmp_nm"
 
3623
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
3624
        # Check to see if the nm accepts a BSD-compat flag.
 
3625
        # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
3626
        #   nm: unknown option "B" ignored
 
3627
        # Tru64's nm complains that /dev/null is an invalid object file
 
3628
        case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
3629
        */dev/null* | *'Invalid file or object type'*)
 
3630
          lt_cv_path_NM="$tmp_nm -B"
 
3631
          break
 
3632
          ;;
 
3633
        *)
 
3634
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
3635
          */dev/null*)
 
3636
            lt_cv_path_NM="$tmp_nm -p"
 
3637
            break
 
3638
            ;;
 
3639
          *)
 
3640
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
3641
            continue # so that we can try to find one that supports BSD flags
 
3642
            ;;
 
3643
          esac
 
3644
          ;;
 
3645
        esac
 
3646
      fi
 
3647
    done
 
3648
    IFS="$lt_save_ifs"
 
3649
  done
 
3650
  : ${lt_cv_path_NM=no}
 
3651
fi])
 
3652
if test "$lt_cv_path_NM" != "no"; then
 
3653
  NM="$lt_cv_path_NM"
 
3654
else
 
3655
  # Didn't find any BSD compatible name lister, look for dumpbin.
 
3656
  if test -n "$DUMPBIN"; then :
 
3657
    # Let the user override the test.
 
3658
  else
 
3659
    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
 
3660
    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
 
3661
    *COFF*)
 
3662
      DUMPBIN="$DUMPBIN -symbols"
 
3663
      ;;
 
3664
    *)
 
3665
      DUMPBIN=:
 
3666
      ;;
 
3667
    esac
 
3668
  fi
 
3669
  AC_SUBST([DUMPBIN])
 
3670
  if test "$DUMPBIN" != ":"; then
 
3671
    NM="$DUMPBIN"
 
3672
  fi
 
3673
fi
 
3674
test -z "$NM" && NM=nm
 
3675
AC_SUBST([NM])
 
3676
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
 
3677
 
 
3678
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
 
3679
  [lt_cv_nm_interface="BSD nm"
 
3680
  echo "int some_variable = 0;" > conftest.$ac_ext
 
3681
  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
 
3682
  (eval "$ac_compile" 2>conftest.err)
 
3683
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
3684
  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
 
3685
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
 
3686
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
3687
  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
 
3688
  cat conftest.out >&AS_MESSAGE_LOG_FD
 
3689
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
 
3690
    lt_cv_nm_interface="MS dumpbin"
 
3691
  fi
 
3692
  rm -f conftest*])
 
3693
])# LT_PATH_NM
 
3694
 
 
3695
# Old names:
 
3696
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
 
3697
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
 
3698
dnl aclocal-1.4 backwards compatibility:
 
3699
dnl AC_DEFUN([AM_PROG_NM], [])
 
3700
dnl AC_DEFUN([AC_PROG_NM], [])
 
3701
 
 
3702
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
 
3703
# --------------------------------
 
3704
# how to determine the name of the shared library
 
3705
# associated with a specific link library.
 
3706
#  -- PORTME fill in with the dynamic library characteristics
 
3707
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
 
3708
[m4_require([_LT_DECL_EGREP])
 
3709
m4_require([_LT_DECL_OBJDUMP])
 
3710
m4_require([_LT_DECL_DLLTOOL])
 
3711
AC_CACHE_CHECK([how to associate runtime and link libraries],
 
3712
lt_cv_sharedlib_from_linklib_cmd,
 
3713
[lt_cv_sharedlib_from_linklib_cmd='unknown'
 
3714
 
 
3715
case $host_os in
 
3716
cygwin* | mingw* | pw32* | cegcc*)
 
3717
  # two different shell functions defined in ltmain.sh
 
3718
  # decide which to use based on capabilities of $DLLTOOL
 
3719
  case `$DLLTOOL --help 2>&1` in
 
3720
  *--identify-strict*)
 
3721
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
 
3722
    ;;
 
3723
  *)
 
3724
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
 
3725
    ;;
 
3726
  esac
 
3727
  ;;
 
3728
*)
 
3729
  # fallback: assume linklib IS sharedlib
 
3730
  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
 
3731
  ;;
 
3732
esac
 
3733
])
 
3734
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
 
3735
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
 
3736
 
 
3737
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
 
3738
    [Command to associate shared and link libraries])
 
3739
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
 
3740
 
 
3741
 
 
3742
# _LT_PATH_MANIFEST_TOOL
 
3743
# ----------------------
 
3744
# locate the manifest tool
 
3745
m4_defun([_LT_PATH_MANIFEST_TOOL],
 
3746
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
 
3747
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
 
3748
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
 
3749
  [lt_cv_path_mainfest_tool=no
 
3750
  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
 
3751
  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
 
3752
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
3753
  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
 
3754
    lt_cv_path_mainfest_tool=yes
 
3755
  fi
 
3756
  rm -f conftest*])
 
3757
if test "x$lt_cv_path_mainfest_tool" != xyes; then
 
3758
  MANIFEST_TOOL=:
 
3759
fi
 
3760
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
 
3761
])# _LT_PATH_MANIFEST_TOOL
 
3762
 
 
3763
 
 
3764
# LT_LIB_M
 
3765
# --------
 
3766
# check for math library
 
3767
AC_DEFUN([LT_LIB_M],
 
3768
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3769
LIBM=
 
3770
case $host in
 
3771
*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
 
3772
  # These system don't have libm, or don't need it
 
3773
  ;;
 
3774
*-ncr-sysv4.3*)
 
3775
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
3776
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
3777
  ;;
 
3778
*)
 
3779
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
3780
  ;;
 
3781
esac
 
3782
AC_SUBST([LIBM])
 
3783
])# LT_LIB_M
 
3784
 
 
3785
# Old name:
 
3786
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
 
3787
dnl aclocal-1.4 backwards compatibility:
 
3788
dnl AC_DEFUN([AC_CHECK_LIBM], [])
 
3789
 
 
3790
 
 
3791
# _LT_COMPILER_NO_RTTI([TAGNAME])
 
3792
# -------------------------------
 
3793
m4_defun([_LT_COMPILER_NO_RTTI],
 
3794
[m4_require([_LT_TAG_COMPILER])dnl
 
3795
 
 
3796
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
3797
 
 
3798
if test "$GCC" = yes; then
 
3799
  case $cc_basename in
 
3800
  nvcc*)
 
3801
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
 
3802
  *)
 
3803
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
 
3804
  esac
 
3805
 
 
3806
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
3807
    lt_cv_prog_compiler_rtti_exceptions,
 
3808
    [-fno-rtti -fno-exceptions], [],
 
3809
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
3810
fi
 
3811
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
 
3812
        [Compiler flag to turn off builtin functions])
 
3813
])# _LT_COMPILER_NO_RTTI
 
3814
 
 
3815
 
 
3816
# _LT_CMD_GLOBAL_SYMBOLS
 
3817
# ----------------------
 
3818
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
 
3819
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3820
AC_REQUIRE([AC_PROG_CC])dnl
 
3821
AC_REQUIRE([AC_PROG_AWK])dnl
 
3822
AC_REQUIRE([LT_PATH_NM])dnl
 
3823
AC_REQUIRE([LT_PATH_LD])dnl
 
3824
m4_require([_LT_DECL_SED])dnl
 
3825
m4_require([_LT_DECL_EGREP])dnl
 
3826
m4_require([_LT_TAG_COMPILER])dnl
 
3827
 
 
3828
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
3829
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
3830
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
3831
[
 
3832
# These are sane defaults that work on at least a few old systems.
 
3833
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
3834
 
 
3835
# Character class describing NM global symbol codes.
 
3836
symcode='[[BCDEGRST]]'
 
3837
 
 
3838
# Regexp to match symbols that can be accessed directly from C.
 
3839
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
3840
 
 
3841
# Define system-specific variables.
 
3842
case $host_os in
 
3843
aix*)
 
3844
  symcode='[[BCDT]]'
 
3845
  ;;
 
3846
cygwin* | mingw* | pw32* | cegcc*)
 
3847
  symcode='[[ABCDGISTW]]'
 
3848
  ;;
 
3849
hpux*)
 
3850
  if test "$host_cpu" = ia64; then
 
3851
    symcode='[[ABCDEGRST]]'
 
3852
  fi
 
3853
  ;;
 
3854
irix* | nonstopux*)
 
3855
  symcode='[[BCDEGRST]]'
 
3856
  ;;
 
3857
osf*)
 
3858
  symcode='[[BCDEGQRST]]'
 
3859
  ;;
 
3860
solaris*)
 
3861
  symcode='[[BDRT]]'
 
3862
  ;;
 
3863
sco3.2v5*)
 
3864
  symcode='[[DT]]'
 
3865
  ;;
 
3866
sysv4.2uw2*)
 
3867
  symcode='[[DT]]'
 
3868
  ;;
 
3869
sysv5* | sco5v6* | unixware* | OpenUNIX*)
 
3870
  symcode='[[ABDT]]'
 
3871
  ;;
 
3872
sysv4)
 
3873
  symcode='[[DFNSTU]]'
 
3874
  ;;
 
3875
esac
 
3876
 
 
3877
# If we're using GNU nm, then use its standard symbol codes.
 
3878
case `$NM -V 2>&1` in
 
3879
*GNU* | *'with BFD'*)
 
3880
  symcode='[[ABCDGIRSTW]]' ;;
 
3881
esac
 
3882
 
 
3883
# Transform an extracted symbol line into a proper C declaration.
 
3884
# Some systems (esp. on ia64) link data and code symbols differently,
 
3885
# so use this general approach.
 
3886
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
3887
 
 
3888
# Transform an extracted symbol line into symbol name and symbol address
 
3889
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
 
3890
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'"
 
3891
 
 
3892
# Handle CRLF in mingw tool chain
 
3893
opt_cr=
 
3894
case $build_os in
 
3895
mingw*)
 
3896
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
3897
  ;;
 
3898
esac
 
3899
 
 
3900
# Try without a prefix underscore, then with it.
 
3901
for ac_symprfx in "" "_"; do
 
3902
 
 
3903
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
 
3904
  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
3905
 
 
3906
  # Write the raw and C identifiers.
 
3907
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
 
3908
    # Fake it for dumpbin and say T for any non-static function
 
3909
    # and D for any global variable.
 
3910
    # Also find C++ and __fastcall symbols from MSVC++,
 
3911
    # which start with @ or ?.
 
3912
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
 
3913
"     {last_section=section; section=\$ 3};"\
 
3914
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 
3915
"     \$ 0!~/External *\|/{next};"\
 
3916
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 
3917
"     {if(hide[section]) next};"\
 
3918
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
 
3919
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
 
3920
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
 
3921
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
 
3922
"     ' prfx=^$ac_symprfx]"
 
3923
  else
 
3924
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
3925
  fi
 
3926
  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
3927
 
 
3928
  # Check to see that the pipe works correctly.
 
3929
  pipe_works=no
 
3930
 
 
3931
  rm -f conftest*
 
3932
  cat > conftest.$ac_ext <<_LT_EOF
 
3933
#ifdef __cplusplus
 
3934
extern "C" {
 
3935
#endif
 
3936
char nm_test_var;
 
3937
void nm_test_func(void);
 
3938
void nm_test_func(void){}
 
3939
#ifdef __cplusplus
 
3940
}
 
3941
#endif
 
3942
int main(){nm_test_var='a';nm_test_func();return(0);}
 
3943
_LT_EOF
 
3944
 
 
3945
  if AC_TRY_EVAL(ac_compile); then
 
3946
    # Now try to grab the symbols.
 
3947
    nlist=conftest.nm
 
3948
    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
 
3949
      # Try sorting and uniquifying the output.
 
3950
      if sort "$nlist" | uniq > "$nlist"T; then
 
3951
        mv -f "$nlist"T "$nlist"
 
3952
      else
 
3953
        rm -f "$nlist"T
 
3954
      fi
 
3955
 
 
3956
      # Make sure that we snagged all the symbols we need.
 
3957
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 
3958
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 
3959
          cat <<_LT_EOF > conftest.$ac_ext
 
3960
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
 
3961
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
 
3962
/* DATA imports from DLLs on WIN32 con't be const, because runtime
 
3963
   relocations are performed -- see ld's documentation on pseudo-relocs.  */
 
3964
# define LT@&t@_DLSYM_CONST
 
3965
#elif defined(__osf__)
 
3966
/* This system does not cope well with relocations in const data.  */
 
3967
# define LT@&t@_DLSYM_CONST
 
3968
#else
 
3969
# define LT@&t@_DLSYM_CONST const
 
3970
#endif
 
3971
 
 
3972
#ifdef __cplusplus
 
3973
extern "C" {
 
3974
#endif
 
3975
 
 
3976
_LT_EOF
 
3977
          # Now generate the symbol file.
 
3978
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
3979
 
 
3980
          cat <<_LT_EOF >> conftest.$ac_ext
 
3981
 
 
3982
/* The mapping between symbol names and symbols.  */
 
3983
LT@&t@_DLSYM_CONST struct {
 
3984
  const char *name;
 
3985
  void       *address;
 
3986
}
 
3987
lt__PROGRAM__LTX_preloaded_symbols[[]] =
 
3988
{
 
3989
  { "@PROGRAM@", (void *) 0 },
 
3990
_LT_EOF
 
3991
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 
3992
          cat <<\_LT_EOF >> conftest.$ac_ext
 
3993
  {0, (void *) 0}
 
3994
};
 
3995
 
 
3996
/* This works around a problem in FreeBSD linker */
 
3997
#ifdef FREEBSD_WORKAROUND
 
3998
static const void *lt_preloaded_setup() {
 
3999
  return lt__PROGRAM__LTX_preloaded_symbols;
 
4000
}
 
4001
#endif
 
4002
 
 
4003
#ifdef __cplusplus
 
4004
}
 
4005
#endif
 
4006
_LT_EOF
 
4007
          # Now try linking the two files.
 
4008
          mv conftest.$ac_objext conftstm.$ac_objext
 
4009
          lt_globsym_save_LIBS=$LIBS
 
4010
          lt_globsym_save_CFLAGS=$CFLAGS
 
4011
          LIBS="conftstm.$ac_objext"
 
4012
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
4013
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
4014
            pipe_works=yes
 
4015
          fi
 
4016
          LIBS=$lt_globsym_save_LIBS
 
4017
          CFLAGS=$lt_globsym_save_CFLAGS
 
4018
        else
 
4019
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
4020
        fi
 
4021
      else
 
4022
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
4023
      fi
 
4024
    else
 
4025
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
4026
    fi
 
4027
  else
 
4028
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
4029
    cat conftest.$ac_ext >&5
 
4030
  fi
 
4031
  rm -rf conftest* conftst*
 
4032
 
 
4033
  # Do not use the global_symbol_pipe unless it works.
 
4034
  if test "$pipe_works" = yes; then
 
4035
    break
 
4036
  else
 
4037
    lt_cv_sys_global_symbol_pipe=
 
4038
  fi
 
4039
done
 
4040
])
 
4041
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
4042
  lt_cv_sys_global_symbol_to_cdecl=
 
4043
fi
 
4044
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
4045
  AC_MSG_RESULT(failed)
 
4046
else
 
4047
  AC_MSG_RESULT(ok)
 
4048
fi
 
4049
 
 
4050
# Response file support.
 
4051
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
 
4052
  nm_file_list_spec='@'
 
4053
elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
 
4054
  nm_file_list_spec='@'
 
4055
fi
 
4056
 
 
4057
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
 
4058
    [Take the output of nm and produce a listing of raw symbols and C names])
 
4059
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
 
4060
    [Transform the output of nm in a proper C declaration])
 
4061
_LT_DECL([global_symbol_to_c_name_address],
 
4062
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
 
4063
    [Transform the output of nm in a C name address pair])
 
4064
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
 
4065
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
 
4066
    [Transform the output of nm in a C name address pair when lib prefix is needed])
 
4067
_LT_DECL([], [nm_file_list_spec], [1],
 
4068
    [Specify filename containing input files for $NM])
 
4069
]) # _LT_CMD_GLOBAL_SYMBOLS
 
4070
 
 
4071
 
 
4072
# _LT_COMPILER_PIC([TAGNAME])
 
4073
# ---------------------------
 
4074
m4_defun([_LT_COMPILER_PIC],
 
4075
[m4_require([_LT_TAG_COMPILER])dnl
 
4076
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
 
4077
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
 
4078
_LT_TAGVAR(lt_prog_compiler_static, $1)=
 
4079
 
 
4080
m4_if([$1], [CXX], [
 
4081
  # C++ specific cases for pic, static, wl, etc.
 
4082
  if test "$GXX" = yes; then
 
4083
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4084
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4085
 
 
4086
    case $host_os in
 
4087
    aix*)
 
4088
      # All AIX code is PIC.
 
4089
      if test "$host_cpu" = ia64; then
 
4090
        # AIX 5 now supports IA64 processor
 
4091
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4092
      fi
 
4093
      ;;
 
4094
 
 
4095
    amigaos*)
 
4096
      case $host_cpu in
 
4097
      powerpc)
 
4098
            # see comment about AmigaOS4 .so support
 
4099
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4100
        ;;
 
4101
      m68k)
 
4102
            # FIXME: we need at least 68020 code to build shared libraries, but
 
4103
            # adding the `-m68020' flag to GCC prevents building anything better,
 
4104
            # like `-m68040