~ubuntu-branches/debian/jessie/gsmlib/jessie

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2006-05-20 21:54:42 UTC
  • mfrom: (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20060520215442-nb9iiu95mzkqfejf
Tags: 1.10-10
FTBFS with G++ 4.1: extra qualifications (Closes: #356109)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2
2
 
3
 
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
 
# Free Software Foundation, Inc.
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005  Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
7
7
# with or without modifications, as long as this notice is preserved.
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
14
 
 
15
 
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
16
 
 
17
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
18
 
 
19
 
# This program is free software; you can redistribute it and/or modify
20
 
# it under the terms of the GNU General Public License as published by
21
 
# the Free Software Foundation; either version 2, or (at your option)
22
 
# any later version.
23
 
 
24
 
# This program is distributed in the hope that it will be useful,
25
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
26
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27
 
# GNU General Public License for more details.
28
 
 
29
 
# You should have received a copy of the GNU General Public License
30
 
# along with this program; if not, write to the Free Software
31
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
32
 
# 02111-1307, USA.
33
 
 
34
 
AC_PREREQ([2.52])
35
 
 
36
 
# serial 6
37
 
 
38
 
# When config.status generates a header, we must update the stamp-h file.
39
 
# This file resides in the same directory as the config header
40
 
# that is generated.  We must strip everything past the first ":",
41
 
# and everything past the last "/".
42
 
 
43
 
# _AM_DIRNAME(PATH)
44
 
# -----------------
45
 
# Like AS_DIRNAME, only do it during macro expansion
46
 
AC_DEFUN([_AM_DIRNAME],
47
 
       [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
48
 
              m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
49
 
                    m4_if(regexp([$1], [^/.*]), -1,
50
 
                          [.],
51
 
                          patsubst([$1], [^\(/\).*], [\1])),
52
 
                    patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
53
 
              patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
54
 
])# _AM_DIRNAME
55
 
 
56
 
 
57
 
# The stamp files are numbered to have different names.
58
 
# We could number them on a directory basis, but that's additional
59
 
# complications, let's have a unique counter.
60
 
m4_define([_AM_STAMP_Count], [0])
61
 
 
62
 
 
63
 
# _AM_STAMP(HEADER)
64
 
# -----------------
65
 
# The name of the stamp file for HEADER.
66
 
AC_DEFUN([_AM_STAMP],
67
 
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
68
 
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
69
 
                               [:.*])))/stamp-h[]_AM_STAMP_Count])
70
 
 
71
 
 
72
 
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
73
 
# ------------------------------------------------------------
74
 
# We used to try to get a real timestamp in stamp-h.  But the fear is that
75
 
# that will cause unnecessary cvs conflicts.
76
 
AC_DEFUN([_AM_CONFIG_HEADER],
77
 
[# Add the stamp file to the list of files AC keeps track of,
78
 
# along with our hook.
79
 
AC_CONFIG_HEADERS([$1],
80
 
                  [# update the timestamp
81
 
echo 'timestamp for $1' >"_AM_STAMP([$1])"
82
 
$2],
83
 
                  [$3])
84
 
])# _AM_CONFIG_HEADER
85
 
 
86
 
 
87
 
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
88
 
# --------------------------------------------------------------
89
 
AC_DEFUN([AM_CONFIG_HEADER],
90
 
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
91
 
])# AM_CONFIG_HEADER
92
 
 
93
 
# Do all the work for Automake.                            -*- Autoconf -*-
94
 
 
95
 
# This macro actually does too much some checks are only needed if
96
 
# your package does certain things.  But this isn't really a big deal.
97
 
 
98
 
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
99
 
# Free Software Foundation, Inc.
100
 
 
101
 
# This program is free software; you can redistribute it and/or modify
102
 
# it under the terms of the GNU General Public License as published by
103
 
# the Free Software Foundation; either version 2, or (at your option)
104
 
# any later version.
105
 
 
106
 
# This program is distributed in the hope that it will be useful,
107
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
108
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
109
 
# GNU General Public License for more details.
110
 
 
111
 
# You should have received a copy of the GNU General Public License
112
 
# along with this program; if not, write to the Free Software
113
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
114
 
# 02111-1307, USA.
115
 
 
116
 
# serial 8
117
 
 
118
 
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
119
 
# written in clear, in which case automake, when reading aclocal.m4,
120
 
# will think it sees a *use*, and therefore will trigger all it's
121
 
# C support machinery.  Also note that it means that autoscan, seeing
122
 
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
123
 
 
124
 
 
125
 
AC_PREREQ([2.52])
126
 
 
127
 
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
128
 
# the ones we care about.
129
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
130
 
 
131
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
132
 
# AM_INIT_AUTOMAKE([OPTIONS])
133
 
# -----------------------------------------------
134
 
# The call with PACKAGE and VERSION arguments is the old style
135
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
136
 
# and VERSION should now be passed to AC_INIT and removed from
137
 
# the call to AM_INIT_AUTOMAKE.
138
 
# We support both call styles for the transition.  After
139
 
# the next Automake release, Autoconf can make the AC_INIT
140
 
# arguments mandatory, and then we can depend on a new Autoconf
141
 
# release and drop the old call support.
142
 
AC_DEFUN([AM_INIT_AUTOMAKE],
143
 
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
144
 
 AC_REQUIRE([AC_PROG_INSTALL])dnl
145
 
# test to see if srcdir already configured
146
 
if test "`cd $srcdir && pwd`" != "`pwd`" &&
147
 
   test -f $srcdir/config.status; then
148
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
149
 
fi
150
 
 
151
 
# Define the identity of the package.
152
 
dnl Distinguish between old-style and new-style calls.
153
 
m4_ifval([$2],
154
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
155
 
 AC_SUBST([PACKAGE], [$1])dnl
156
 
 AC_SUBST([VERSION], [$2])],
157
 
[_AM_SET_OPTIONS([$1])dnl
158
 
 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
159
 
 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
160
 
 
161
 
_AM_IF_OPTION([no-define],,
162
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
163
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
164
 
 
165
 
# Some tools Automake needs.
166
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
167
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
168
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
169
 
AM_MISSING_PROG(AUTOCONF, autoconf)
170
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
171
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
172
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
173
 
AM_MISSING_PROG(AMTAR, tar)
174
 
AM_PROG_INSTALL_SH
175
 
AM_PROG_INSTALL_STRIP
176
 
# We need awk for the "check" target.  The system "awk" is bad on
177
 
# some platforms.
178
 
AC_REQUIRE([AC_PROG_AWK])dnl
179
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
180
 
 
181
 
_AM_IF_OPTION([no-dependencies],,
182
 
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
183
 
                  [_AM_DEPENDENCIES(CC)],
184
 
                  [define([AC_PROG_][CC],
185
 
                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
186
 
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
187
 
                  [_AM_DEPENDENCIES(CXX)],
188
 
                  [define([AC_PROG_][CXX],
189
 
                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
190
 
])
191
 
])
192
 
 
193
 
# Copyright 2002  Free Software Foundation, Inc.
194
 
 
195
 
# This program is free software; you can redistribute it and/or modify
196
 
# it under the terms of the GNU General Public License as published by
197
 
# the Free Software Foundation; either version 2, or (at your option)
198
 
# any later version.
199
 
 
200
 
# This program is distributed in the hope that it will be useful,
201
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
202
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
203
 
# GNU General Public License for more details.
204
 
 
205
 
# You should have received a copy of the GNU General Public License
206
 
# along with this program; if not, write to the Free Software
207
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
208
 
 
209
 
# AM_AUTOMAKE_VERSION(VERSION)
210
 
# ----------------------------
211
 
# Automake X.Y traces this macro to ensure aclocal.m4 has been
212
 
# generated from the m4 files accompanying Automake X.Y.
213
 
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
214
 
 
215
 
# AM_SET_CURRENT_AUTOMAKE_VERSION
216
 
# -------------------------------
217
 
# Call AM_AUTOMAKE_VERSION so it can be traced.
218
 
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
219
 
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
220
 
         [AM_AUTOMAKE_VERSION([1.6.3])])
221
 
 
222
 
# Helper functions for option handling.                    -*- Autoconf -*-
223
 
 
224
 
# Copyright 2001, 2002  Free Software Foundation, Inc.
225
 
 
226
 
# This program is free software; you can redistribute it and/or modify
227
 
# it under the terms of the GNU General Public License as published by
228
 
# the Free Software Foundation; either version 2, or (at your option)
229
 
# any later version.
230
 
 
231
 
# This program is distributed in the hope that it will be useful,
232
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
233
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
234
 
# GNU General Public License for more details.
235
 
 
236
 
# You should have received a copy of the GNU General Public License
237
 
# along with this program; if not, write to the Free Software
238
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
239
 
# 02111-1307, USA.
240
 
 
241
 
# serial 2
242
 
 
243
 
# _AM_MANGLE_OPTION(NAME)
244
 
# -----------------------
245
 
AC_DEFUN([_AM_MANGLE_OPTION],
246
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
247
 
 
248
 
# _AM_SET_OPTION(NAME)
249
 
# ------------------------------
250
 
# Set option NAME.  Presently that only means defining a flag for this option.
251
 
AC_DEFUN([_AM_SET_OPTION],
252
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
253
 
 
254
 
# _AM_SET_OPTIONS(OPTIONS)
255
 
# ----------------------------------
256
 
# OPTIONS is a space-separated list of Automake options.
257
 
AC_DEFUN([_AM_SET_OPTIONS],
258
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
259
 
 
260
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
261
 
# -------------------------------------------
262
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
263
 
AC_DEFUN([_AM_IF_OPTION],
264
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
265
 
 
266
 
#
267
 
# Check to make sure that the build environment is sane.
268
 
#
269
 
 
270
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
271
 
 
272
 
# This program is free software; you can redistribute it and/or modify
273
 
# it under the terms of the GNU General Public License as published by
274
 
# the Free Software Foundation; either version 2, or (at your option)
275
 
# any later version.
276
 
 
277
 
# This program is distributed in the hope that it will be useful,
278
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
279
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
280
 
# GNU General Public License for more details.
281
 
 
282
 
# You should have received a copy of the GNU General Public License
283
 
# along with this program; if not, write to the Free Software
284
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
285
 
# 02111-1307, USA.
286
 
 
287
 
# serial 3
288
 
 
289
 
# AM_SANITY_CHECK
 
14
# codeset.m4 serial AM1 (gettext-0.10.40)
 
15
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
16
dnl This file is free software; the Free Software Foundation
 
17
dnl gives unlimited permission to copy and/or distribute it,
 
18
dnl with or without modifications, as long as this notice is preserved.
 
19
 
 
20
dnl From Bruno Haible.
 
21
 
 
22
AC_DEFUN([AM_LANGINFO_CODESET],
 
23
[
 
24
  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
 
25
    [AC_TRY_LINK([#include <langinfo.h>],
 
26
      [char* cs = nl_langinfo(CODESET);],
 
27
      am_cv_langinfo_codeset=yes,
 
28
      am_cv_langinfo_codeset=no)
 
29
    ])
 
30
  if test $am_cv_langinfo_codeset = yes; then
 
31
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
 
32
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
 
33
  fi
 
34
])
 
35
 
 
36
# gettext.m4 serial 37 (gettext-0.14.4)
 
37
dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
 
38
dnl This file is free software; the Free Software Foundation
 
39
dnl gives unlimited permission to copy and/or distribute it,
 
40
dnl with or without modifications, as long as this notice is preserved.
 
41
dnl
 
42
dnl This file can can be used in projects which are not available under
 
43
dnl the GNU General Public License or the GNU Library General Public
 
44
dnl License but which still want to provide support for the GNU gettext
 
45
dnl functionality.
 
46
dnl Please note that the actual code of the GNU gettext library is covered
 
47
dnl by the GNU Library General Public License, and the rest of the GNU
 
48
dnl gettext package package is covered by the GNU General Public License.
 
49
dnl They are *not* in the public domain.
 
50
 
 
51
dnl Authors:
 
52
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
53
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
54
 
 
55
dnl Macro to add for using GNU gettext.
 
56
 
 
57
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
 
58
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
 
59
dnl    default (if it is not specified or empty) is 'no-libtool'.
 
60
dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
 
61
dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
 
62
dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
 
63
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
 
64
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
 
65
dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
 
66
dnl    $(top_builddir)/intl/libintl.a will be created.
 
67
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
 
68
dnl    implementations (in libc or libintl) without the ngettext() function
 
69
dnl    will be ignored.  If NEEDSYMBOL is specified and is
 
70
dnl    'need-formatstring-macros', then GNU gettext implementations that don't
 
71
dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
 
72
dnl INTLDIR is used to find the intl libraries.  If empty,
 
73
dnl    the value `$(top_builddir)/intl/' is used.
 
74
dnl
 
75
dnl The result of the configuration is one of three cases:
 
76
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
 
77
dnl    and used.
 
78
dnl    Catalog format: GNU --> install in $(datadir)
 
79
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
80
dnl 2) GNU gettext has been found in the system's C library.
 
81
dnl    Catalog format: GNU --> install in $(datadir)
 
82
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
83
dnl 3) No internationalization, always use English msgid.
 
84
dnl    Catalog format: none
 
85
dnl    Catalog extension: none
 
86
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
 
87
dnl The use of .gmo is historical (it was needed to avoid overwriting the
 
88
dnl GNU format catalogs when building on a platform with an X/Open gettext),
 
89
dnl but we keep it in order not to force irrelevant filename changes on the
 
90
dnl maintainers.
 
91
dnl
 
92
AC_DEFUN([AM_GNU_GETTEXT],
 
93
[
 
94
  dnl Argument checking.
 
95
  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
 
96
    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
 
97
])])])])])
 
98
  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
 
99
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
 
100
])])])])
 
101
  define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
 
102
  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
 
103
 
 
104
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
 
105
  ifelse(gt_included_intl, yes, [
 
106
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
 
107
  ])
 
108
 
 
109
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
110
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
111
  AC_REQUIRE([AC_LIB_RPATH])
 
112
 
 
113
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
 
114
  dnl Ideally we would do this search only after the
 
115
  dnl      if test "$USE_NLS" = "yes"; then
 
116
  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
 
117
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
 
118
  dnl the configure script would need to contain the same shell code
 
119
  dnl again, outside any 'if'. There are two solutions:
 
120
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
 
121
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
 
122
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
 
123
  dnl documented, we avoid it.
 
124
  ifelse(gt_included_intl, yes, , [
 
125
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
 
126
  ])
 
127
 
 
128
  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
 
129
  gt_INTL_MACOSX
 
130
 
 
131
  dnl Set USE_NLS.
 
132
  AM_NLS
 
133
 
 
134
  ifelse(gt_included_intl, yes, [
 
135
    BUILD_INCLUDED_LIBINTL=no
 
136
    USE_INCLUDED_LIBINTL=no
 
137
  ])
 
138
  LIBINTL=
 
139
  LTLIBINTL=
 
140
  POSUB=
 
141
 
 
142
  dnl If we use NLS figure out what method
 
143
  if test "$USE_NLS" = "yes"; then
 
144
    gt_use_preinstalled_gnugettext=no
 
145
    ifelse(gt_included_intl, yes, [
 
146
      AC_MSG_CHECKING([whether included gettext is requested])
 
147
      AC_ARG_WITH(included-gettext,
 
148
        [  --with-included-gettext use the GNU gettext library included here],
 
149
        nls_cv_force_use_gnu_gettext=$withval,
 
150
        nls_cv_force_use_gnu_gettext=no)
 
151
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
 
152
 
 
153
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
 
154
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
 
155
    ])
 
156
        dnl User does not insist on using GNU NLS library.  Figure out what
 
157
        dnl to use.  If GNU gettext is available we use this.  Else we have
 
158
        dnl to fall back to GNU NLS library.
 
159
 
 
160
        dnl Add a version number to the cache macros.
 
161
        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
 
162
        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
 
163
        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
 
164
 
 
165
        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
 
166
         [AC_TRY_LINK([#include <libintl.h>
 
167
]ifelse([$2], [need-formatstring-macros],
 
168
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 
169
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 
170
#endif
 
171
changequote(,)dnl
 
172
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
 
173
changequote([,])dnl
 
174
], [])[extern int _nl_msg_cat_cntr;
 
175
extern int *_nl_domain_bindings;],
 
176
            [bindtextdomain ("", "");
 
177
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
 
178
            gt_cv_func_gnugettext_libc=yes,
 
179
            gt_cv_func_gnugettext_libc=no)])
 
180
 
 
181
        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
 
182
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
 
183
          ifelse(gt_included_intl, yes, , [
 
184
            AM_ICONV_LINK
 
185
          ])
 
186
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
 
187
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
 
188
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
 
189
          dnl even if libiconv doesn't exist.
 
190
          AC_LIB_LINKFLAGS_BODY([intl])
 
191
          AC_CACHE_CHECK([for GNU gettext in libintl],
 
192
            gt_cv_func_gnugettext_libintl,
 
193
           [gt_save_CPPFLAGS="$CPPFLAGS"
 
194
            CPPFLAGS="$CPPFLAGS $INCINTL"
 
195
            gt_save_LIBS="$LIBS"
 
196
            LIBS="$LIBS $LIBINTL"
 
197
            dnl Now see whether libintl exists and does not depend on libiconv.
 
198
            AC_TRY_LINK([#include <libintl.h>
 
199
]ifelse([$2], [need-formatstring-macros],
 
200
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 
201
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 
202
#endif
 
203
changequote(,)dnl
 
204
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
 
205
changequote([,])dnl
 
206
], [])[extern int _nl_msg_cat_cntr;
 
207
extern
 
208
#ifdef __cplusplus
 
209
"C"
 
210
#endif
 
211
const char *_nl_expand_alias (const char *);],
 
212
              [bindtextdomain ("", "");
 
213
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
 
214
              gt_cv_func_gnugettext_libintl=yes,
 
215
              gt_cv_func_gnugettext_libintl=no)
 
216
            dnl Now see whether libintl exists and depends on libiconv.
 
217
            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
 
218
              LIBS="$LIBS $LIBICONV"
 
219
              AC_TRY_LINK([#include <libintl.h>
 
220
]ifelse([$2], [need-formatstring-macros],
 
221
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 
222
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 
223
#endif
 
224
changequote(,)dnl
 
225
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
 
226
changequote([,])dnl
 
227
], [])[extern int _nl_msg_cat_cntr;
 
228
extern
 
229
#ifdef __cplusplus
 
230
"C"
 
231
#endif
 
232
const char *_nl_expand_alias (const char *);],
 
233
                [bindtextdomain ("", "");
 
234
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
 
235
               [LIBINTL="$LIBINTL $LIBICONV"
 
236
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
 
237
                gt_cv_func_gnugettext_libintl=yes
 
238
               ])
 
239
            fi
 
240
            CPPFLAGS="$gt_save_CPPFLAGS"
 
241
            LIBS="$gt_save_LIBS"])
 
242
        fi
 
243
 
 
244
        dnl If an already present or preinstalled GNU gettext() is found,
 
245
        dnl use it.  But if this macro is used in GNU gettext, and GNU
 
246
        dnl gettext is already preinstalled in libintl, we update this
 
247
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
 
248
        if test "$gt_cv_func_gnugettext_libc" = "yes" \
 
249
           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
 
250
                && test "$PACKAGE" != gettext-runtime \
 
251
                && test "$PACKAGE" != gettext-tools; }; then
 
252
          gt_use_preinstalled_gnugettext=yes
 
253
        else
 
254
          dnl Reset the values set by searching for libintl.
 
255
          LIBINTL=
 
256
          LTLIBINTL=
 
257
          INCINTL=
 
258
        fi
 
259
 
 
260
    ifelse(gt_included_intl, yes, [
 
261
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
 
262
          dnl GNU gettext is not found in the C library.
 
263
          dnl Fall back on included GNU gettext library.
 
264
          nls_cv_use_gnu_gettext=yes
 
265
        fi
 
266
      fi
 
267
 
 
268
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
 
269
        dnl Mark actions used to generate GNU NLS library.
 
270
        BUILD_INCLUDED_LIBINTL=yes
 
271
        USE_INCLUDED_LIBINTL=yes
 
272
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
 
273
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
 
274
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
 
275
      fi
 
276
 
 
277
      CATOBJEXT=
 
278
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
279
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
280
        dnl Mark actions to use GNU gettext tools.
 
281
        CATOBJEXT=.gmo
 
282
      fi
 
283
    ])
 
284
 
 
285
    if test -n "$INTL_MACOSX_LIBS"; then
 
286
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
287
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
288
        dnl Some extra flags are needed during linking.
 
289
        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
 
290
        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
 
291
      fi
 
292
    fi
 
293
 
 
294
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
295
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
296
      AC_DEFINE(ENABLE_NLS, 1,
 
297
        [Define to 1 if translation of program messages to the user's native language
 
298
   is requested.])
 
299
    else
 
300
      USE_NLS=no
 
301
    fi
 
302
  fi
 
303
 
 
304
  AC_MSG_CHECKING([whether to use NLS])
 
305
  AC_MSG_RESULT([$USE_NLS])
 
306
  if test "$USE_NLS" = "yes"; then
 
307
    AC_MSG_CHECKING([where the gettext function comes from])
 
308
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
 
309
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
 
310
        gt_source="external libintl"
 
311
      else
 
312
        gt_source="libc"
 
313
      fi
 
314
    else
 
315
      gt_source="included intl directory"
 
316
    fi
 
317
    AC_MSG_RESULT([$gt_source])
 
318
  fi
 
319
 
 
320
  if test "$USE_NLS" = "yes"; then
 
321
 
 
322
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
 
323
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
 
324
        AC_MSG_CHECKING([how to link with libintl])
 
325
        AC_MSG_RESULT([$LIBINTL])
 
326
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
 
327
      fi
 
328
 
 
329
      dnl For backward compatibility. Some packages may be using this.
 
330
      AC_DEFINE(HAVE_GETTEXT, 1,
 
331
       [Define if the GNU gettext() function is already present or preinstalled.])
 
332
      AC_DEFINE(HAVE_DCGETTEXT, 1,
 
333
       [Define if the GNU dcgettext() function is already present or preinstalled.])
 
334
    fi
 
335
 
 
336
    dnl We need to process the po/ directory.
 
337
    POSUB=po
 
338
  fi
 
339
 
 
340
  ifelse(gt_included_intl, yes, [
 
341
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
 
342
    dnl to 'yes' because some of the testsuite requires it.
 
343
    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
 
344
      BUILD_INCLUDED_LIBINTL=yes
 
345
    fi
 
346
 
 
347
    dnl Make all variables we use known to autoconf.
 
348
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
 
349
    AC_SUBST(USE_INCLUDED_LIBINTL)
 
350
    AC_SUBST(CATOBJEXT)
 
351
 
 
352
    dnl For backward compatibility. Some configure.ins may be using this.
 
353
    nls_cv_header_intl=
 
354
    nls_cv_header_libgt=
 
355
 
 
356
    dnl For backward compatibility. Some Makefiles may be using this.
 
357
    DATADIRNAME=share
 
358
    AC_SUBST(DATADIRNAME)
 
359
 
 
360
    dnl For backward compatibility. Some Makefiles may be using this.
 
361
    INSTOBJEXT=.mo
 
362
    AC_SUBST(INSTOBJEXT)
 
363
 
 
364
    dnl For backward compatibility. Some Makefiles may be using this.
 
365
    GENCAT=gencat
 
366
    AC_SUBST(GENCAT)
 
367
 
 
368
    dnl For backward compatibility. Some Makefiles may be using this.
 
369
    INTLOBJS=
 
370
    if test "$USE_INCLUDED_LIBINTL" = yes; then
 
371
      INTLOBJS="\$(GETTOBJS)"
 
372
    fi
 
373
    AC_SUBST(INTLOBJS)
 
374
 
 
375
    dnl Enable libtool support if the surrounding package wishes it.
 
376
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
 
377
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
 
378
  ])
 
379
 
 
380
  dnl For backward compatibility. Some Makefiles may be using this.
 
381
  INTLLIBS="$LIBINTL"
 
382
  AC_SUBST(INTLLIBS)
 
383
 
 
384
  dnl Make all documented variables known to autoconf.
 
385
  AC_SUBST(LIBINTL)
 
386
  AC_SUBST(LTLIBINTL)
 
387
  AC_SUBST(POSUB)
 
388
])
 
389
 
 
390
 
 
391
dnl Checks for all prerequisites of the intl subdirectory,
 
392
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
 
393
dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
 
394
AC_DEFUN([AM_INTL_SUBDIR],
 
395
[
 
396
  AC_REQUIRE([AC_PROG_INSTALL])dnl
 
397
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
 
398
  AC_REQUIRE([AC_PROG_CC])dnl
 
399
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
400
  AC_REQUIRE([gt_GLIBC2])dnl
 
401
  AC_REQUIRE([AC_PROG_RANLIB])dnl
 
402
  AC_REQUIRE([AC_ISC_POSIX])dnl
 
403
  AC_REQUIRE([AC_HEADER_STDC])dnl
 
404
  AC_REQUIRE([AC_C_CONST])dnl
 
405
  AC_REQUIRE([bh_C_SIGNED])dnl
 
406
  AC_REQUIRE([AC_C_INLINE])dnl
 
407
  AC_REQUIRE([AC_TYPE_OFF_T])dnl
 
408
  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
 
409
  AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
 
410
  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
 
411
  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
 
412
  AC_REQUIRE([gt_TYPE_WINT_T])dnl
 
413
  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
 
414
  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
 
415
  AC_REQUIRE([gt_TYPE_INTMAX_T])
 
416
  AC_REQUIRE([gt_PRINTF_POSIX])
 
417
  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 
418
  AC_REQUIRE([AC_FUNC_MMAP])dnl
 
419
  AC_REQUIRE([gl_GLIBC21])dnl
 
420
  AC_REQUIRE([gt_INTDIV0])dnl
 
421
  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
 
422
  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
 
423
  AC_REQUIRE([gt_INTTYPES_PRI])dnl
 
424
  AC_REQUIRE([gl_XSIZE])dnl
 
425
  AC_REQUIRE([gt_INTL_MACOSX])dnl
 
426
 
 
427
  AC_CHECK_TYPE([ptrdiff_t], ,
 
428
    [AC_DEFINE([ptrdiff_t], [long],
 
429
       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
 
430
    ])
 
431
  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
 
432
stdlib.h string.h unistd.h sys/param.h])
 
433
  AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
 
434
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
 
435
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
 
436
__fsetlocking])
 
437
 
 
438
  dnl Use the _snprintf function only if it is declared (because on NetBSD it
 
439
  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
 
440
  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
 
441
  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
 
442
 
 
443
  dnl Use the *_unlocked functions only if they are declared.
 
444
  dnl (because some of them were defined without being declared in Solaris
 
445
  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
 
446
  dnl on Solaris 2.5.1 to run on Solaris 2.6).
 
447
  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
 
448
  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
 
449
  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
 
450
  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
 
451
 
 
452
  case $gt_cv_func_printf_posix in
 
453
    *yes) HAVE_POSIX_PRINTF=1 ;;
 
454
    *) HAVE_POSIX_PRINTF=0 ;;
 
455
  esac
 
456
  AC_SUBST([HAVE_POSIX_PRINTF])
 
457
  if test "$ac_cv_func_asprintf" = yes; then
 
458
    HAVE_ASPRINTF=1
 
459
  else
 
460
    HAVE_ASPRINTF=0
 
461
  fi
 
462
  AC_SUBST([HAVE_ASPRINTF])
 
463
  if test "$ac_cv_func_snprintf" = yes; then
 
464
    HAVE_SNPRINTF=1
 
465
  else
 
466
    HAVE_SNPRINTF=0
 
467
  fi
 
468
  AC_SUBST([HAVE_SNPRINTF])
 
469
  if test "$ac_cv_func_wprintf" = yes; then
 
470
    HAVE_WPRINTF=1
 
471
  else
 
472
    HAVE_WPRINTF=0
 
473
  fi
 
474
  AC_SUBST([HAVE_WPRINTF])
 
475
 
 
476
  AM_ICONV
 
477
  AM_LANGINFO_CODESET
 
478
  if test $ac_cv_header_locale_h = yes; then
 
479
    gt_LC_MESSAGES
 
480
  fi
 
481
 
 
482
  if test -n "$INTL_MACOSX_LIBS"; then
 
483
    CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
 
484
  fi
 
485
 
 
486
  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
 
487
  dnl because plural.y uses bison specific features. It requires at least
 
488
  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
 
489
  dnl compile.
 
490
  dnl bison is only needed for the maintainer (who touches plural.y). But in
 
491
  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
 
492
  dnl the rule in general Makefile. Now, some people carelessly touch the
 
493
  dnl files or have a broken "make" program, hence the plural.c rule will
 
494
  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
 
495
  dnl present or too old.
 
496
  AC_CHECK_PROGS([INTLBISON], [bison])
 
497
  if test -z "$INTLBISON"; then
 
498
    ac_verc_fail=yes
 
499
  else
 
500
    dnl Found it, now check the version.
 
501
    AC_MSG_CHECKING([version of bison])
 
502
changequote(<<,>>)dnl
 
503
    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
 
504
    case $ac_prog_version in
 
505
      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
 
506
      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
 
507
changequote([,])dnl
 
508
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
 
509
      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
510
    esac
 
511
    AC_MSG_RESULT([$ac_prog_version])
 
512
  fi
 
513
  if test $ac_verc_fail = yes; then
 
514
    INTLBISON=:
 
515
  fi
 
516
])
 
517
 
 
518
 
 
519
dnl Checks for special options needed on MacOS X.
 
520
dnl Defines INTL_MACOSX_LIBS.
 
521
AC_DEFUN([gt_INTL_MACOSX],
 
522
[
 
523
  dnl Check for API introduced in MacOS X 10.2.
 
524
  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
 
525
    gt_cv_func_CFPreferencesCopyAppValue,
 
526
    [gt_save_CPPFLAGS="$CPPFLAGS"
 
527
     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
 
528
     gt_save_LIBS="$LIBS"
 
529
     LIBS="$LIBS -framework CoreFoundation"
 
530
     AC_TRY_LINK([#include <CFPreferences.h>],
 
531
       [CFPreferencesCopyAppValue(NULL, NULL)],
 
532
       [gt_cv_func_CFPreferencesCopyAppValue=yes],
 
533
       [gt_cv_func_CFPreferencesCopyAppValue=no])
 
534
     CPPFLAGS="$gt_save_CPPFLAGS"
 
535
     LIBS="$gt_save_LIBS"])
 
536
  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
 
537
    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
 
538
      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
 
539
  fi
 
540
  dnl Check for API introduced in MacOS X 10.3.
 
541
  AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
 
542
    [gt_save_CPPFLAGS="$CPPFLAGS"
 
543
     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
 
544
     gt_save_LIBS="$LIBS"
 
545
     LIBS="$LIBS -framework CoreFoundation"
 
546
     AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
 
547
       [gt_cv_func_CFLocaleCopyCurrent=yes],
 
548
       [gt_cv_func_CFLocaleCopyCurrent=no])
 
549
     CPPFLAGS="$gt_save_CPPFLAGS"
 
550
     LIBS="$gt_save_LIBS"])
 
551
  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 
552
    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
 
553
      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
 
554
  fi
 
555
  INTL_MACOSX_LIBS=
 
556
  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 
557
    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
 
558
  fi
 
559
  AC_SUBST([INTL_MACOSX_LIBS])
 
560
])
 
561
 
 
562
 
 
563
dnl gt_CHECK_DECL(FUNC, INCLUDES)
 
564
dnl Check whether a function is declared.
 
565
AC_DEFUN([gt_CHECK_DECL],
 
566
[
 
567
  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
 
568
    [AC_TRY_COMPILE([$2], [
 
569
#ifndef $1
 
570
  char *p = (char *) $1;
 
571
#endif
 
572
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
 
573
  if test $ac_cv_have_decl_$1 = yes; then
 
574
    gt_value=1
 
575
  else
 
576
    gt_value=0
 
577
  fi
 
578
  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
 
579
    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
 
580
])
 
581
 
 
582
 
 
583
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
 
584
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
 
585
 
 
586
# glibc2.m4 serial 1
 
587
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
 
588
dnl This file is free software; the Free Software Foundation
 
589
dnl gives unlimited permission to copy and/or distribute it,
 
590
dnl with or without modifications, as long as this notice is preserved.
 
591
 
 
592
# Test for the GNU C Library, version 2.0 or newer.
 
593
# From Bruno Haible.
 
594
 
 
595
AC_DEFUN([gt_GLIBC2],
 
596
  [
 
597
    AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
 
598
      ac_cv_gnu_library_2,
 
599
      [AC_EGREP_CPP([Lucky GNU user],
 
600
        [
 
601
#include <features.h>
 
602
#ifdef __GNU_LIBRARY__
 
603
 #if (__GLIBC__ >= 2)
 
604
  Lucky GNU user
 
605
 #endif
 
606
#endif
 
607
        ],
 
608
        ac_cv_gnu_library_2=yes,
 
609
        ac_cv_gnu_library_2=no)
 
610
      ]
 
611
    )
 
612
    AC_SUBST(GLIBC2)
 
613
    GLIBC2="$ac_cv_gnu_library_2"
 
614
  ]
 
615
)
 
616
 
 
617
# glibc21.m4 serial 3
 
618
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
 
619
dnl This file is free software; the Free Software Foundation
 
620
dnl gives unlimited permission to copy and/or distribute it,
 
621
dnl with or without modifications, as long as this notice is preserved.
 
622
 
 
623
# Test for the GNU C Library, version 2.1 or newer.
 
624
# From Bruno Haible.
 
625
 
 
626
AC_DEFUN([gl_GLIBC21],
 
627
  [
 
628
    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
 
629
      ac_cv_gnu_library_2_1,
 
630
      [AC_EGREP_CPP([Lucky GNU user],
 
631
        [
 
632
#include <features.h>
 
633
#ifdef __GNU_LIBRARY__
 
634
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
 
635
  Lucky GNU user
 
636
 #endif
 
637
#endif
 
638
        ],
 
639
        ac_cv_gnu_library_2_1=yes,
 
640
        ac_cv_gnu_library_2_1=no)
 
641
      ]
 
642
    )
 
643
    AC_SUBST(GLIBC21)
 
644
    GLIBC21="$ac_cv_gnu_library_2_1"
 
645
  ]
 
646
)
 
647
 
 
648
# iconv.m4 serial AM4 (gettext-0.11.3)
 
649
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
650
dnl This file is free software; the Free Software Foundation
 
651
dnl gives unlimited permission to copy and/or distribute it,
 
652
dnl with or without modifications, as long as this notice is preserved.
 
653
 
 
654
dnl From Bruno Haible.
 
655
 
 
656
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
 
657
[
 
658
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
659
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
660
  AC_REQUIRE([AC_LIB_RPATH])
 
661
 
 
662
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
663
  dnl accordingly.
 
664
  AC_LIB_LINKFLAGS_BODY([iconv])
 
665
])
 
666
 
 
667
AC_DEFUN([AM_ICONV_LINK],
 
668
[
 
669
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
 
670
  dnl those with the standalone portable GNU libiconv installed).
 
671
 
 
672
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
673
  dnl accordingly.
 
674
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
 
675
 
 
676
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
 
677
  dnl because if the user has installed libiconv and not disabled its use
 
678
  dnl via --without-libiconv-prefix, he wants to use it. The first
 
679
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
 
680
  am_save_CPPFLAGS="$CPPFLAGS"
 
681
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
 
682
 
 
683
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
 
684
    am_cv_func_iconv="no, consider installing GNU libiconv"
 
685
    am_cv_lib_iconv=no
 
686
    AC_TRY_LINK([#include <stdlib.h>
 
687
#include <iconv.h>],
 
688
      [iconv_t cd = iconv_open("","");
 
689
       iconv(cd,NULL,NULL,NULL,NULL);
 
690
       iconv_close(cd);],
 
691
      am_cv_func_iconv=yes)
 
692
    if test "$am_cv_func_iconv" != yes; then
 
693
      am_save_LIBS="$LIBS"
 
694
      LIBS="$LIBS $LIBICONV"
 
695
      AC_TRY_LINK([#include <stdlib.h>
 
696
#include <iconv.h>],
 
697
        [iconv_t cd = iconv_open("","");
 
698
         iconv(cd,NULL,NULL,NULL,NULL);
 
699
         iconv_close(cd);],
 
700
        am_cv_lib_iconv=yes
 
701
        am_cv_func_iconv=yes)
 
702
      LIBS="$am_save_LIBS"
 
703
    fi
 
704
  ])
 
705
  if test "$am_cv_func_iconv" = yes; then
 
706
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
 
707
  fi
 
708
  if test "$am_cv_lib_iconv" = yes; then
 
709
    AC_MSG_CHECKING([how to link with libiconv])
 
710
    AC_MSG_RESULT([$LIBICONV])
 
711
  else
 
712
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
 
713
    dnl either.
 
714
    CPPFLAGS="$am_save_CPPFLAGS"
 
715
    LIBICONV=
 
716
    LTLIBICONV=
 
717
  fi
 
718
  AC_SUBST(LIBICONV)
 
719
  AC_SUBST(LTLIBICONV)
 
720
])
 
721
 
 
722
AC_DEFUN([AM_ICONV],
 
723
[
 
724
  AM_ICONV_LINK
 
725
  if test "$am_cv_func_iconv" = yes; then
 
726
    AC_MSG_CHECKING([for iconv declaration])
 
727
    AC_CACHE_VAL(am_cv_proto_iconv, [
 
728
      AC_TRY_COMPILE([
 
729
#include <stdlib.h>
 
730
#include <iconv.h>
 
731
extern
 
732
#ifdef __cplusplus
 
733
"C"
 
734
#endif
 
735
#if defined(__STDC__) || defined(__cplusplus)
 
736
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
 
737
#else
 
738
size_t iconv();
 
739
#endif
 
740
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
 
741
      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
 
742
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
 
743
    AC_MSG_RESULT([$]{ac_t:-
 
744
         }[$]am_cv_proto_iconv)
 
745
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
 
746
      [Define as const if the declaration of iconv() needs const.])
 
747
  fi
 
748
])
 
749
 
 
750
# intdiv0.m4 serial 1 (gettext-0.11.3)
 
751
dnl Copyright (C) 2002 Free Software Foundation, Inc.
 
752
dnl This file is free software; the Free Software Foundation
 
753
dnl gives unlimited permission to copy and/or distribute it,
 
754
dnl with or without modifications, as long as this notice is preserved.
 
755
 
 
756
dnl From Bruno Haible.
 
757
 
 
758
AC_DEFUN([gt_INTDIV0],
 
759
[
 
760
  AC_REQUIRE([AC_PROG_CC])dnl
 
761
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
762
 
 
763
  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
 
764
    gt_cv_int_divbyzero_sigfpe,
 
765
    [
 
766
      AC_TRY_RUN([
 
767
#include <stdlib.h>
 
768
#include <signal.h>
 
769
 
 
770
static void
 
771
#ifdef __cplusplus
 
772
sigfpe_handler (int sig)
 
773
#else
 
774
sigfpe_handler (sig) int sig;
 
775
#endif
 
776
{
 
777
  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
 
778
  exit (sig != SIGFPE);
 
779
}
 
780
 
 
781
int x = 1;
 
782
int y = 0;
 
783
int z;
 
784
int nan;
 
785
 
 
786
int main ()
 
787
{
 
788
  signal (SIGFPE, sigfpe_handler);
 
789
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
 
790
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
 
791
  signal (SIGTRAP, sigfpe_handler);
 
792
#endif
 
793
/* Linux/SPARC yields signal SIGILL.  */
 
794
#if defined (__sparc__) && defined (__linux__)
 
795
  signal (SIGILL, sigfpe_handler);
 
796
#endif
 
797
 
 
798
  z = x / y;
 
799
  nan = y / y;
 
800
  exit (1);
 
801
}
 
802
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
 
803
        [
 
804
          # Guess based on the CPU.
 
805
          case "$host_cpu" in
 
806
            alpha* | i[34567]86 | m68k | s390*)
 
807
              gt_cv_int_divbyzero_sigfpe="guessing yes";;
 
808
            *)
 
809
              gt_cv_int_divbyzero_sigfpe="guessing no";;
 
810
          esac
 
811
        ])
 
812
    ])
 
813
  case "$gt_cv_int_divbyzero_sigfpe" in
 
814
    *yes) value=1;;
 
815
    *) value=0;;
 
816
  esac
 
817
  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
 
818
    [Define if integer division by zero raises signal SIGFPE.])
 
819
])
 
820
 
 
821
# intmax.m4 serial 2 (gettext-0.14.2)
 
822
dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
 
823
dnl This file is free software; the Free Software Foundation
 
824
dnl gives unlimited permission to copy and/or distribute it,
 
825
dnl with or without modifications, as long as this notice is preserved.
 
826
 
 
827
dnl From Bruno Haible.
 
828
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
 
829
dnl find a replacement if it is lacking.
 
830
 
 
831
AC_DEFUN([gt_TYPE_INTMAX_T],
 
832
[
 
833
  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
 
834
  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
 
835
  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
 
836
    [AC_TRY_COMPILE([
 
837
#include <stddef.h>
 
838
#include <stdlib.h>
 
839
#if HAVE_STDINT_H_WITH_UINTMAX
 
840
#include <stdint.h>
 
841
#endif
 
842
#if HAVE_INTTYPES_H_WITH_UINTMAX
 
843
#include <inttypes.h>
 
844
#endif
 
845
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
 
846
  if test $gt_cv_c_intmax_t = yes; then
 
847
    AC_DEFINE(HAVE_INTMAX_T, 1,
 
848
      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
 
849
  fi
 
850
])
 
851
 
 
852
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
 
853
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
 
854
dnl This file is free software; the Free Software Foundation
 
855
dnl gives unlimited permission to copy and/or distribute it,
 
856
dnl with or without modifications, as long as this notice is preserved.
 
857
 
 
858
dnl From Bruno Haible.
 
859
 
 
860
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
 
861
# macros to non-string values.  This is the case on AIX 4.3.3.
 
862
 
 
863
AC_DEFUN([gt_INTTYPES_PRI],
 
864
[
 
865
  AC_REQUIRE([gt_HEADER_INTTYPES_H])
 
866
  if test $gt_cv_header_inttypes_h = yes; then
 
867
    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
 
868
      gt_cv_inttypes_pri_broken,
 
869
      [
 
870
        AC_TRY_COMPILE([#include <inttypes.h>
 
871
#ifdef PRId32
 
872
char *p = PRId32;
 
873
#endif
 
874
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
 
875
      ])
 
876
  fi
 
877
  if test "$gt_cv_inttypes_pri_broken" = yes; then
 
878
    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
 
879
      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
 
880
  fi
 
881
])
 
882
 
 
883
# inttypes.m4 serial 1 (gettext-0.11.4)
 
884
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
 
885
dnl This file is free software; the Free Software Foundation
 
886
dnl gives unlimited permission to copy and/or distribute it,
 
887
dnl with or without modifications, as long as this notice is preserved.
 
888
 
 
889
dnl From Paul Eggert.
 
890
 
 
891
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
 
892
# <sys/types.h>.
 
893
 
 
894
AC_DEFUN([gt_HEADER_INTTYPES_H],
 
895
[
 
896
  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
 
897
  [
 
898
    AC_TRY_COMPILE(
 
899
      [#include <sys/types.h>
 
900
#include <inttypes.h>],
 
901
      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
 
902
  ])
 
903
  if test $gt_cv_header_inttypes_h = yes; then
 
904
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
 
905
      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
 
906
  fi
 
907
])
 
908
 
 
909
# inttypes_h.m4 serial 6
 
910
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
 
911
dnl This file is free software; the Free Software Foundation
 
912
dnl gives unlimited permission to copy and/or distribute it,
 
913
dnl with or without modifications, as long as this notice is preserved.
 
914
 
 
915
dnl From Paul Eggert.
 
916
 
 
917
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
 
918
# doesn't clash with <sys/types.h>, and declares uintmax_t.
 
919
 
 
920
AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
 
921
[
 
922
  AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
 
923
  [AC_TRY_COMPILE(
 
924
    [#include <sys/types.h>
 
925
#include <inttypes.h>],
 
926
    [uintmax_t i = (uintmax_t) -1;],
 
927
    gl_cv_header_inttypes_h=yes,
 
928
    gl_cv_header_inttypes_h=no)])
 
929
  if test $gl_cv_header_inttypes_h = yes; then
 
930
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
 
931
      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
 
932
       and declares uintmax_t. ])
 
933
  fi
 
934
])
 
935
 
 
936
# lcmessage.m4 serial 4 (gettext-0.14.2)
 
937
dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
 
938
dnl This file is free software; the Free Software Foundation
 
939
dnl gives unlimited permission to copy and/or distribute it,
 
940
dnl with or without modifications, as long as this notice is preserved.
 
941
dnl
 
942
dnl This file can can be used in projects which are not available under
 
943
dnl the GNU General Public License or the GNU Library General Public
 
944
dnl License but which still want to provide support for the GNU gettext
 
945
dnl functionality.
 
946
dnl Please note that the actual code of the GNU gettext library is covered
 
947
dnl by the GNU Library General Public License, and the rest of the GNU
 
948
dnl gettext package package is covered by the GNU General Public License.
 
949
dnl They are *not* in the public domain.
 
950
 
 
951
dnl Authors:
 
952
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
 
953
 
 
954
# Check whether LC_MESSAGES is available in <locale.h>.
 
955
 
 
956
AC_DEFUN([gt_LC_MESSAGES],
 
957
[
 
958
  AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
 
959
    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
960
       gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
 
961
  if test $gt_cv_val_LC_MESSAGES = yes; then
 
962
    AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
963
      [Define if your <locale.h> file defines LC_MESSAGES.])
 
964
  fi
 
965
])
 
966
 
 
967
# lib-ld.m4 serial 3 (gettext-0.13)
 
968
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
 
969
dnl This file is free software; the Free Software Foundation
 
970
dnl gives unlimited permission to copy and/or distribute it,
 
971
dnl with or without modifications, as long as this notice is preserved.
 
972
 
 
973
dnl Subroutines of libtool.m4,
 
974
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
 
975
dnl with libtool.m4.
 
976
 
 
977
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
 
978
AC_DEFUN([AC_LIB_PROG_LD_GNU],
 
979
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
 
980
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
981
case `$LD -v 2>&1 </dev/null` in
 
982
*GNU* | *'with BFD'*)
 
983
  acl_cv_prog_gnu_ld=yes ;;
 
984
*)
 
985
  acl_cv_prog_gnu_ld=no ;;
 
986
esac])
 
987
with_gnu_ld=$acl_cv_prog_gnu_ld
 
988
])
 
989
 
 
990
dnl From libtool-1.4. Sets the variable LD.
 
991
AC_DEFUN([AC_LIB_PROG_LD],
 
992
[AC_ARG_WITH(gnu-ld,
 
993
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 
994
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 
995
AC_REQUIRE([AC_PROG_CC])dnl
 
996
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
997
# Prepare PATH_SEPARATOR.
 
998
# The user is always right.
 
999
if test "${PATH_SEPARATOR+set}" != set; then
 
1000
  echo "#! /bin/sh" >conf$$.sh
 
1001
  echo  "exit 0"   >>conf$$.sh
 
1002
  chmod +x conf$$.sh
 
1003
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
1004
    PATH_SEPARATOR=';'
 
1005
  else
 
1006
    PATH_SEPARATOR=:
 
1007
  fi
 
1008
  rm -f conf$$.sh
 
1009
fi
 
1010
ac_prog=ld
 
1011
if test "$GCC" = yes; then
 
1012
  # Check if gcc -print-prog-name=ld gives a path.
 
1013
  AC_MSG_CHECKING([for ld used by GCC])
 
1014
  case $host in
 
1015
  *-*-mingw*)
 
1016
    # gcc leaves a trailing carriage return which upsets mingw
 
1017
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
1018
  *)
 
1019
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
1020
  esac
 
1021
  case $ac_prog in
 
1022
    # Accept absolute paths.
 
1023
    [[\\/]* | [A-Za-z]:[\\/]*)]
 
1024
      [re_direlt='/[^/][^/]*/\.\./']
 
1025
      # Canonicalize the path of ld
 
1026
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 
1027
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
1028
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 
1029
      done
 
1030
      test -z "$LD" && LD="$ac_prog"
 
1031
      ;;
 
1032
  "")
 
1033
    # If it fails, then pretend we aren't using GCC.
 
1034
    ac_prog=ld
 
1035
    ;;
 
1036
  *)
 
1037
    # If it is relative, then search for the first ld in PATH.
 
1038
    with_gnu_ld=unknown
 
1039
    ;;
 
1040
  esac
 
1041
elif test "$with_gnu_ld" = yes; then
 
1042
  AC_MSG_CHECKING([for GNU ld])
 
1043
else
 
1044
  AC_MSG_CHECKING([for non-GNU ld])
 
1045
fi
 
1046
AC_CACHE_VAL(acl_cv_path_LD,
 
1047
[if test -z "$LD"; then
 
1048
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
1049
  for ac_dir in $PATH; do
 
1050
    test -z "$ac_dir" && ac_dir=.
 
1051
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
1052
      acl_cv_path_LD="$ac_dir/$ac_prog"
 
1053
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
1054
      # but apparently some GNU ld's only accept -v.
 
1055
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
1056
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
 
1057
      *GNU* | *'with BFD'*)
 
1058
        test "$with_gnu_ld" != no && break ;;
 
1059
      *)
 
1060
        test "$with_gnu_ld" != yes && break ;;
 
1061
      esac
 
1062
    fi
 
1063
  done
 
1064
  IFS="$ac_save_ifs"
 
1065
else
 
1066
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
 
1067
fi])
 
1068
LD="$acl_cv_path_LD"
 
1069
if test -n "$LD"; then
 
1070
  AC_MSG_RESULT($LD)
 
1071
else
 
1072
  AC_MSG_RESULT(no)
 
1073
fi
 
1074
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
1075
AC_LIB_PROG_LD_GNU
 
1076
])
 
1077
 
 
1078
# lib-link.m4 serial 6 (gettext-0.14.3)
 
1079
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
 
1080
dnl This file is free software; the Free Software Foundation
 
1081
dnl gives unlimited permission to copy and/or distribute it,
 
1082
dnl with or without modifications, as long as this notice is preserved.
 
1083
 
 
1084
dnl From Bruno Haible.
 
1085
 
 
1086
AC_PREREQ(2.50)
 
1087
 
 
1088
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 
1089
dnl the libraries corresponding to explicit and implicit dependencies.
 
1090
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 
1091
dnl augments the CPPFLAGS variable.
 
1092
AC_DEFUN([AC_LIB_LINKFLAGS],
 
1093
[
 
1094
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
1095
  AC_REQUIRE([AC_LIB_RPATH])
 
1096
  define([Name],[translit([$1],[./-], [___])])
 
1097
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1098
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1099
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
 
1100
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
1101
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
 
1102
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
 
1103
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
 
1104
  ])
 
1105
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
 
1106
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
 
1107
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
 
1108
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
1109
  AC_SUBST([LIB]NAME)
 
1110
  AC_SUBST([LTLIB]NAME)
 
1111
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
 
1112
  dnl results of this search when this library appears as a dependency.
 
1113
  HAVE_LIB[]NAME=yes
 
1114
  undefine([Name])
 
1115
  undefine([NAME])
 
1116
])
 
1117
 
 
1118
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
 
1119
dnl searches for libname and the libraries corresponding to explicit and
 
1120
dnl implicit dependencies, together with the specified include files and
 
1121
dnl the ability to compile and link the specified testcode. If found, it
 
1122
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
 
1123
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 
1124
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 
1125
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
 
1126
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 
1127
[
 
1128
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
1129
  AC_REQUIRE([AC_LIB_RPATH])
 
1130
  define([Name],[translit([$1],[./-], [___])])
 
1131
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1132
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1133
 
 
1134
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
 
1135
  dnl accordingly.
 
1136
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
1137
 
 
1138
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
 
1139
  dnl because if the user has installed lib[]Name and not disabled its use
 
1140
  dnl via --without-lib[]Name-prefix, he wants to use it.
 
1141
  ac_save_CPPFLAGS="$CPPFLAGS"
 
1142
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
1143
 
 
1144
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
 
1145
    ac_save_LIBS="$LIBS"
 
1146
    LIBS="$LIBS $LIB[]NAME"
 
1147
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
 
1148
    LIBS="$ac_save_LIBS"
 
1149
  ])
 
1150
  if test "$ac_cv_lib[]Name" = yes; then
 
1151
    HAVE_LIB[]NAME=yes
 
1152
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
 
1153
    AC_MSG_CHECKING([how to link with lib[]$1])
 
1154
    AC_MSG_RESULT([$LIB[]NAME])
 
1155
  else
 
1156
    HAVE_LIB[]NAME=no
 
1157
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
 
1158
    dnl $INC[]NAME either.
 
1159
    CPPFLAGS="$ac_save_CPPFLAGS"
 
1160
    LIB[]NAME=
 
1161
    LTLIB[]NAME=
 
1162
  fi
 
1163
  AC_SUBST([HAVE_LIB]NAME)
 
1164
  AC_SUBST([LIB]NAME)
 
1165
  AC_SUBST([LTLIB]NAME)
 
1166
  undefine([Name])
 
1167
  undefine([NAME])
 
1168
])
 
1169
 
 
1170
dnl Determine the platform dependent parameters needed to use rpath:
 
1171
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
 
1172
dnl hardcode_direct, hardcode_minus_L.
 
1173
AC_DEFUN([AC_LIB_RPATH],
 
1174
[
 
1175
  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
 
1176
  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
 
1177
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
 
1178
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
 
1179
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
 
1180
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
 
1181
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
 
1182
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
 
1183
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
 
1184
    . ./conftest.sh
 
1185
    rm -f ./conftest.sh
 
1186
    acl_cv_rpath=done
 
1187
  ])
 
1188
  wl="$acl_cv_wl"
 
1189
  libext="$acl_cv_libext"
 
1190
  shlibext="$acl_cv_shlibext"
 
1191
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
 
1192
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
 
1193
  hardcode_direct="$acl_cv_hardcode_direct"
 
1194
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
 
1195
  dnl Determine whether the user wants rpath handling at all.
 
1196
  AC_ARG_ENABLE(rpath,
 
1197
    [  --disable-rpath         do not hardcode runtime library paths],
 
1198
    :, enable_rpath=yes)
 
1199
])
 
1200
 
 
1201
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 
1202
dnl the libraries corresponding to explicit and implicit dependencies.
 
1203
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
 
1204
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 
1205
[
 
1206
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1207
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1208
  dnl By default, look in $includedir and $libdir.
 
1209
  use_additional=yes
 
1210
  AC_LIB_WITH_FINAL_PREFIX([
 
1211
    eval additional_includedir=\"$includedir\"
 
1212
    eval additional_libdir=\"$libdir\"
 
1213
  ])
 
1214
  AC_LIB_ARG_WITH([lib$1-prefix],
 
1215
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
 
1216
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
 
1217
[
 
1218
    if test "X$withval" = "Xno"; then
 
1219
      use_additional=no
 
1220
    else
 
1221
      if test "X$withval" = "X"; then
 
1222
        AC_LIB_WITH_FINAL_PREFIX([
 
1223
          eval additional_includedir=\"$includedir\"
 
1224
          eval additional_libdir=\"$libdir\"
 
1225
        ])
 
1226
      else
 
1227
        additional_includedir="$withval/include"
 
1228
        additional_libdir="$withval/lib"
 
1229
      fi
 
1230
    fi
 
1231
])
 
1232
  dnl Search the library and its dependencies in $additional_libdir and
 
1233
  dnl $LDFLAGS. Using breadth-first-seach.
 
1234
  LIB[]NAME=
 
1235
  LTLIB[]NAME=
 
1236
  INC[]NAME=
 
1237
  rpathdirs=
 
1238
  ltrpathdirs=
 
1239
  names_already_handled=
 
1240
  names_next_round='$1 $2'
 
1241
  while test -n "$names_next_round"; do
 
1242
    names_this_round="$names_next_round"
 
1243
    names_next_round=
 
1244
    for name in $names_this_round; do
 
1245
      already_handled=
 
1246
      for n in $names_already_handled; do
 
1247
        if test "$n" = "$name"; then
 
1248
          already_handled=yes
 
1249
          break
 
1250
        fi
 
1251
      done
 
1252
      if test -z "$already_handled"; then
 
1253
        names_already_handled="$names_already_handled $name"
 
1254
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
 
1255
        dnl or AC_LIB_HAVE_LINKFLAGS call.
 
1256
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
 
1257
        eval value=\"\$HAVE_LIB$uppername\"
 
1258
        if test -n "$value"; then
 
1259
          if test "$value" = yes; then
 
1260
            eval value=\"\$LIB$uppername\"
 
1261
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
 
1262
            eval value=\"\$LTLIB$uppername\"
 
1263
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
 
1264
          else
 
1265
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
 
1266
            dnl that this library doesn't exist. So just drop it.
 
1267
            :
 
1268
          fi
 
1269
        else
 
1270
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
 
1271
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
 
1272
          found_dir=
 
1273
          found_la=
 
1274
          found_so=
 
1275
          found_a=
 
1276
          if test $use_additional = yes; then
 
1277
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
 
1278
              found_dir="$additional_libdir"
 
1279
              found_so="$additional_libdir/lib$name.$shlibext"
 
1280
              if test -f "$additional_libdir/lib$name.la"; then
 
1281
                found_la="$additional_libdir/lib$name.la"
 
1282
              fi
 
1283
            else
 
1284
              if test -f "$additional_libdir/lib$name.$libext"; then
 
1285
                found_dir="$additional_libdir"
 
1286
                found_a="$additional_libdir/lib$name.$libext"
 
1287
                if test -f "$additional_libdir/lib$name.la"; then
 
1288
                  found_la="$additional_libdir/lib$name.la"
 
1289
                fi
 
1290
              fi
 
1291
            fi
 
1292
          fi
 
1293
          if test "X$found_dir" = "X"; then
 
1294
            for x in $LDFLAGS $LTLIB[]NAME; do
 
1295
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1296
              case "$x" in
 
1297
                -L*)
 
1298
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
 
1299
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
 
1300
                    found_dir="$dir"
 
1301
                    found_so="$dir/lib$name.$shlibext"
 
1302
                    if test -f "$dir/lib$name.la"; then
 
1303
                      found_la="$dir/lib$name.la"
 
1304
                    fi
 
1305
                  else
 
1306
                    if test -f "$dir/lib$name.$libext"; then
 
1307
                      found_dir="$dir"
 
1308
                      found_a="$dir/lib$name.$libext"
 
1309
                      if test -f "$dir/lib$name.la"; then
 
1310
                        found_la="$dir/lib$name.la"
 
1311
                      fi
 
1312
                    fi
 
1313
                  fi
 
1314
                  ;;
 
1315
              esac
 
1316
              if test "X$found_dir" != "X"; then
 
1317
                break
 
1318
              fi
 
1319
            done
 
1320
          fi
 
1321
          if test "X$found_dir" != "X"; then
 
1322
            dnl Found the library.
 
1323
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
 
1324
            if test "X$found_so" != "X"; then
 
1325
              dnl Linking with a shared library. We attempt to hardcode its
 
1326
              dnl directory into the executable's runpath, unless it's the
 
1327
              dnl standard /usr/lib.
 
1328
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
 
1329
                dnl No hardcoding is needed.
 
1330
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1331
              else
 
1332
                dnl Use an explicit option to hardcode DIR into the resulting
 
1333
                dnl binary.
 
1334
                dnl Potentially add DIR to ltrpathdirs.
 
1335
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
1336
                haveit=
 
1337
                for x in $ltrpathdirs; do
 
1338
                  if test "X$x" = "X$found_dir"; then
 
1339
                    haveit=yes
 
1340
                    break
 
1341
                  fi
 
1342
                done
 
1343
                if test -z "$haveit"; then
 
1344
                  ltrpathdirs="$ltrpathdirs $found_dir"
 
1345
                fi
 
1346
                dnl The hardcoding into $LIBNAME is system dependent.
 
1347
                if test "$hardcode_direct" = yes; then
 
1348
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
 
1349
                  dnl resulting binary.
 
1350
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1351
                else
 
1352
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
 
1353
                    dnl Use an explicit option to hardcode DIR into the resulting
 
1354
                    dnl binary.
 
1355
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1356
                    dnl Potentially add DIR to rpathdirs.
 
1357
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
 
1358
                    haveit=
 
1359
                    for x in $rpathdirs; do
 
1360
                      if test "X$x" = "X$found_dir"; then
 
1361
                        haveit=yes
 
1362
                        break
 
1363
                      fi
 
1364
                    done
 
1365
                    if test -z "$haveit"; then
 
1366
                      rpathdirs="$rpathdirs $found_dir"
 
1367
                    fi
 
1368
                  else
 
1369
                    dnl Rely on "-L$found_dir".
 
1370
                    dnl But don't add it if it's already contained in the LDFLAGS
 
1371
                    dnl or the already constructed $LIBNAME
 
1372
                    haveit=
 
1373
                    for x in $LDFLAGS $LIB[]NAME; do
 
1374
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1375
                      if test "X$x" = "X-L$found_dir"; then
 
1376
                        haveit=yes
 
1377
                        break
 
1378
                      fi
 
1379
                    done
 
1380
                    if test -z "$haveit"; then
 
1381
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
 
1382
                    fi
 
1383
                    if test "$hardcode_minus_L" != no; then
 
1384
                      dnl FIXME: Not sure whether we should use
 
1385
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
1386
                      dnl here.
 
1387
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1388
                    else
 
1389
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
 
1390
                      dnl here, because this doesn't fit in flags passed to the
 
1391
                      dnl compiler. So give up. No hardcoding. This affects only
 
1392
                      dnl very old systems.
 
1393
                      dnl FIXME: Not sure whether we should use
 
1394
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
1395
                      dnl here.
 
1396
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
1397
                    fi
 
1398
                  fi
 
1399
                fi
 
1400
              fi
 
1401
            else
 
1402
              if test "X$found_a" != "X"; then
 
1403
                dnl Linking with a static library.
 
1404
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
 
1405
              else
 
1406
                dnl We shouldn't come here, but anyway it's good to have a
 
1407
                dnl fallback.
 
1408
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
 
1409
              fi
 
1410
            fi
 
1411
            dnl Assume the include files are nearby.
 
1412
            additional_includedir=
 
1413
            case "$found_dir" in
 
1414
              */lib | */lib/)
 
1415
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
 
1416
                additional_includedir="$basedir/include"
 
1417
                ;;
 
1418
            esac
 
1419
            if test "X$additional_includedir" != "X"; then
 
1420
              dnl Potentially add $additional_includedir to $INCNAME.
 
1421
              dnl But don't add it
 
1422
              dnl   1. if it's the standard /usr/include,
 
1423
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
 
1424
              dnl   3. if it's already present in $CPPFLAGS or the already
 
1425
              dnl      constructed $INCNAME,
 
1426
              dnl   4. if it doesn't exist as a directory.
 
1427
              if test "X$additional_includedir" != "X/usr/include"; then
 
1428
                haveit=
 
1429
                if test "X$additional_includedir" = "X/usr/local/include"; then
 
1430
                  if test -n "$GCC"; then
 
1431
                    case $host_os in
 
1432
                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 
1433
                    esac
 
1434
                  fi
 
1435
                fi
 
1436
                if test -z "$haveit"; then
 
1437
                  for x in $CPPFLAGS $INC[]NAME; do
 
1438
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1439
                    if test "X$x" = "X-I$additional_includedir"; then
 
1440
                      haveit=yes
 
1441
                      break
 
1442
                    fi
 
1443
                  done
 
1444
                  if test -z "$haveit"; then
 
1445
                    if test -d "$additional_includedir"; then
 
1446
                      dnl Really add $additional_includedir to $INCNAME.
 
1447
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
 
1448
                    fi
 
1449
                  fi
 
1450
                fi
 
1451
              fi
 
1452
            fi
 
1453
            dnl Look for dependencies.
 
1454
            if test -n "$found_la"; then
 
1455
              dnl Read the .la file. It defines the variables
 
1456
              dnl dlname, library_names, old_library, dependency_libs, current,
 
1457
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
 
1458
              save_libdir="$libdir"
 
1459
              case "$found_la" in
 
1460
                */* | *\\*) . "$found_la" ;;
 
1461
                *) . "./$found_la" ;;
 
1462
              esac
 
1463
              libdir="$save_libdir"
 
1464
              dnl We use only dependency_libs.
 
1465
              for dep in $dependency_libs; do
 
1466
                case "$dep" in
 
1467
                  -L*)
 
1468
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
 
1469
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
 
1470
                    dnl But don't add it
 
1471
                    dnl   1. if it's the standard /usr/lib,
 
1472
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
 
1473
                    dnl   3. if it's already present in $LDFLAGS or the already
 
1474
                    dnl      constructed $LIBNAME,
 
1475
                    dnl   4. if it doesn't exist as a directory.
 
1476
                    if test "X$additional_libdir" != "X/usr/lib"; then
 
1477
                      haveit=
 
1478
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
 
1479
                        if test -n "$GCC"; then
 
1480
                          case $host_os in
 
1481
                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 
1482
                          esac
 
1483
                        fi
 
1484
                      fi
 
1485
                      if test -z "$haveit"; then
 
1486
                        haveit=
 
1487
                        for x in $LDFLAGS $LIB[]NAME; do
 
1488
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1489
                          if test "X$x" = "X-L$additional_libdir"; then
 
1490
                            haveit=yes
 
1491
                            break
 
1492
                          fi
 
1493
                        done
 
1494
                        if test -z "$haveit"; then
 
1495
                          if test -d "$additional_libdir"; then
 
1496
                            dnl Really add $additional_libdir to $LIBNAME.
 
1497
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
 
1498
                          fi
 
1499
                        fi
 
1500
                        haveit=
 
1501
                        for x in $LDFLAGS $LTLIB[]NAME; do
 
1502
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1503
                          if test "X$x" = "X-L$additional_libdir"; then
 
1504
                            haveit=yes
 
1505
                            break
 
1506
                          fi
 
1507
                        done
 
1508
                        if test -z "$haveit"; then
 
1509
                          if test -d "$additional_libdir"; then
 
1510
                            dnl Really add $additional_libdir to $LTLIBNAME.
 
1511
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
 
1512
                          fi
 
1513
                        fi
 
1514
                      fi
 
1515
                    fi
 
1516
                    ;;
 
1517
                  -R*)
 
1518
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
 
1519
                    if test "$enable_rpath" != no; then
 
1520
                      dnl Potentially add DIR to rpathdirs.
 
1521
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
 
1522
                      haveit=
 
1523
                      for x in $rpathdirs; do
 
1524
                        if test "X$x" = "X$dir"; then
 
1525
                          haveit=yes
 
1526
                          break
 
1527
                        fi
 
1528
                      done
 
1529
                      if test -z "$haveit"; then
 
1530
                        rpathdirs="$rpathdirs $dir"
 
1531
                      fi
 
1532
                      dnl Potentially add DIR to ltrpathdirs.
 
1533
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
1534
                      haveit=
 
1535
                      for x in $ltrpathdirs; do
 
1536
                        if test "X$x" = "X$dir"; then
 
1537
                          haveit=yes
 
1538
                          break
 
1539
                        fi
 
1540
                      done
 
1541
                      if test -z "$haveit"; then
 
1542
                        ltrpathdirs="$ltrpathdirs $dir"
 
1543
                      fi
 
1544
                    fi
 
1545
                    ;;
 
1546
                  -l*)
 
1547
                    dnl Handle this in the next round.
 
1548
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
 
1549
                    ;;
 
1550
                  *.la)
 
1551
                    dnl Handle this in the next round. Throw away the .la's
 
1552
                    dnl directory; it is already contained in a preceding -L
 
1553
                    dnl option.
 
1554
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
 
1555
                    ;;
 
1556
                  *)
 
1557
                    dnl Most likely an immediate library name.
 
1558
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
 
1559
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
 
1560
                    ;;
 
1561
                esac
 
1562
              done
 
1563
            fi
 
1564
          else
 
1565
            dnl Didn't find the library; assume it is in the system directories
 
1566
            dnl known to the linker and runtime loader. (All the system
 
1567
            dnl directories known to the linker should also be known to the
 
1568
            dnl runtime loader, otherwise the system is severely misconfigured.)
 
1569
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
1570
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
 
1571
          fi
 
1572
        fi
 
1573
      fi
 
1574
    done
 
1575
  done
 
1576
  if test "X$rpathdirs" != "X"; then
 
1577
    if test -n "$hardcode_libdir_separator"; then
 
1578
      dnl Weird platform: only the last -rpath option counts, the user must
 
1579
      dnl pass all path elements in one option. We can arrange that for a
 
1580
      dnl single library, but not when more than one $LIBNAMEs are used.
 
1581
      alldirs=
 
1582
      for found_dir in $rpathdirs; do
 
1583
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
 
1584
      done
 
1585
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
 
1586
      acl_save_libdir="$libdir"
 
1587
      libdir="$alldirs"
 
1588
      eval flag=\"$hardcode_libdir_flag_spec\"
 
1589
      libdir="$acl_save_libdir"
 
1590
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
1591
    else
 
1592
      dnl The -rpath options are cumulative.
 
1593
      for found_dir in $rpathdirs; do
 
1594
        acl_save_libdir="$libdir"
 
1595
        libdir="$found_dir"
 
1596
        eval flag=\"$hardcode_libdir_flag_spec\"
 
1597
        libdir="$acl_save_libdir"
 
1598
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
1599
      done
 
1600
    fi
 
1601
  fi
 
1602
  if test "X$ltrpathdirs" != "X"; then
 
1603
    dnl When using libtool, the option that works for both libraries and
 
1604
    dnl executables is -R. The -R options are cumulative.
 
1605
    for found_dir in $ltrpathdirs; do
 
1606
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
 
1607
    done
 
1608
  fi
 
1609
])
 
1610
 
 
1611
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
 
1612
dnl unless already present in VAR.
 
1613
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
 
1614
dnl contains two or three consecutive elements that belong together.
 
1615
AC_DEFUN([AC_LIB_APPENDTOVAR],
 
1616
[
 
1617
  for element in [$2]; do
 
1618
    haveit=
 
1619
    for x in $[$1]; do
 
1620
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1621
      if test "X$x" = "X$element"; then
 
1622
        haveit=yes
 
1623
        break
 
1624
      fi
 
1625
    done
 
1626
    if test -z "$haveit"; then
 
1627
      [$1]="${[$1]}${[$1]:+ }$element"
 
1628
    fi
 
1629
  done
 
1630
])
 
1631
 
 
1632
# lib-prefix.m4 serial 4 (gettext-0.14.2)
 
1633
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
 
1634
dnl This file is free software; the Free Software Foundation
 
1635
dnl gives unlimited permission to copy and/or distribute it,
 
1636
dnl with or without modifications, as long as this notice is preserved.
 
1637
 
 
1638
dnl From Bruno Haible.
 
1639
 
 
1640
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
 
1641
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
 
1642
dnl require excessive bracketing.
 
1643
ifdef([AC_HELP_STRING],
 
1644
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
 
1645
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
 
1646
 
 
1647
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
 
1648
dnl to access previously installed libraries. The basic assumption is that
 
1649
dnl a user will want packages to use other packages he previously installed
 
1650
dnl with the same --prefix option.
 
1651
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
 
1652
dnl libraries, but is otherwise very convenient.
 
1653
AC_DEFUN([AC_LIB_PREFIX],
 
1654
[
 
1655
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
 
1656
  AC_REQUIRE([AC_PROG_CC])
 
1657
  AC_REQUIRE([AC_CANONICAL_HOST])
 
1658
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
1659
  dnl By default, look in $includedir and $libdir.
 
1660
  use_additional=yes
 
1661
  AC_LIB_WITH_FINAL_PREFIX([
 
1662
    eval additional_includedir=\"$includedir\"
 
1663
    eval additional_libdir=\"$libdir\"
 
1664
  ])
 
1665
  AC_LIB_ARG_WITH([lib-prefix],
 
1666
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
 
1667
  --without-lib-prefix    don't search for libraries in includedir and libdir],
 
1668
[
 
1669
    if test "X$withval" = "Xno"; then
 
1670
      use_additional=no
 
1671
    else
 
1672
      if test "X$withval" = "X"; then
 
1673
        AC_LIB_WITH_FINAL_PREFIX([
 
1674
          eval additional_includedir=\"$includedir\"
 
1675
          eval additional_libdir=\"$libdir\"
 
1676
        ])
 
1677
      else
 
1678
        additional_includedir="$withval/include"
 
1679
        additional_libdir="$withval/lib"
 
1680
      fi
 
1681
    fi
 
1682
])
 
1683
  if test $use_additional = yes; then
 
1684
    dnl Potentially add $additional_includedir to $CPPFLAGS.
 
1685
    dnl But don't add it
 
1686
    dnl   1. if it's the standard /usr/include,
 
1687
    dnl   2. if it's already present in $CPPFLAGS,
 
1688
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
 
1689
    dnl   4. if it doesn't exist as a directory.
 
1690
    if test "X$additional_includedir" != "X/usr/include"; then
 
1691
      haveit=
 
1692
      for x in $CPPFLAGS; do
 
1693
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1694
        if test "X$x" = "X-I$additional_includedir"; then
 
1695
          haveit=yes
 
1696
          break
 
1697
        fi
 
1698
      done
 
1699
      if test -z "$haveit"; then
 
1700
        if test "X$additional_includedir" = "X/usr/local/include"; then
 
1701
          if test -n "$GCC"; then
 
1702
            case $host_os in
 
1703
              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 
1704
            esac
 
1705
          fi
 
1706
        fi
 
1707
        if test -z "$haveit"; then
 
1708
          if test -d "$additional_includedir"; then
 
1709
            dnl Really add $additional_includedir to $CPPFLAGS.
 
1710
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
 
1711
          fi
 
1712
        fi
 
1713
      fi
 
1714
    fi
 
1715
    dnl Potentially add $additional_libdir to $LDFLAGS.
 
1716
    dnl But don't add it
 
1717
    dnl   1. if it's the standard /usr/lib,
 
1718
    dnl   2. if it's already present in $LDFLAGS,
 
1719
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
 
1720
    dnl   4. if it doesn't exist as a directory.
 
1721
    if test "X$additional_libdir" != "X/usr/lib"; then
 
1722
      haveit=
 
1723
      for x in $LDFLAGS; do
 
1724
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1725
        if test "X$x" = "X-L$additional_libdir"; then
 
1726
          haveit=yes
 
1727
          break
 
1728
        fi
 
1729
      done
 
1730
      if test -z "$haveit"; then
 
1731
        if test "X$additional_libdir" = "X/usr/local/lib"; then
 
1732
          if test -n "$GCC"; then
 
1733
            case $host_os in
 
1734
              linux*) haveit=yes;;
 
1735
            esac
 
1736
          fi
 
1737
        fi
 
1738
        if test -z "$haveit"; then
 
1739
          if test -d "$additional_libdir"; then
 
1740
            dnl Really add $additional_libdir to $LDFLAGS.
 
1741
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
 
1742
          fi
 
1743
        fi
 
1744
      fi
 
1745
    fi
 
1746
  fi
 
1747
])
 
1748
 
 
1749
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
 
1750
dnl acl_final_exec_prefix, containing the values to which $prefix and
 
1751
dnl $exec_prefix will expand at the end of the configure script.
 
1752
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
 
1753
[
 
1754
  dnl Unfortunately, prefix and exec_prefix get only finally determined
 
1755
  dnl at the end of configure.
 
1756
  if test "X$prefix" = "XNONE"; then
 
1757
    acl_final_prefix="$ac_default_prefix"
 
1758
  else
 
1759
    acl_final_prefix="$prefix"
 
1760
  fi
 
1761
  if test "X$exec_prefix" = "XNONE"; then
 
1762
    acl_final_exec_prefix='${prefix}'
 
1763
  else
 
1764
    acl_final_exec_prefix="$exec_prefix"
 
1765
  fi
 
1766
  acl_save_prefix="$prefix"
 
1767
  prefix="$acl_final_prefix"
 
1768
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
 
1769
  prefix="$acl_save_prefix"
 
1770
])
 
1771
 
 
1772
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
 
1773
dnl variables prefix and exec_prefix bound to the values they will have
 
1774
dnl at the end of the configure script.
 
1775
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
 
1776
[
 
1777
  acl_save_prefix="$prefix"
 
1778
  prefix="$acl_final_prefix"
 
1779
  acl_save_exec_prefix="$exec_prefix"
 
1780
  exec_prefix="$acl_final_exec_prefix"
 
1781
  $1
 
1782
  exec_prefix="$acl_save_exec_prefix"
 
1783
  prefix="$acl_save_prefix"
 
1784
])
 
1785
 
 
1786
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
1787
 
 
1788
# serial 47 Debian 1.5.20-2 AC_PROG_LIBTOOL
 
1789
 
 
1790
 
 
1791
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
 
1792
# -----------------------------------------------------------
 
1793
# If this macro is not defined by Autoconf, define it here.
 
1794
m4_ifdef([AC_PROVIDE_IFELSE],
 
1795
         [],
 
1796
         [m4_define([AC_PROVIDE_IFELSE],
 
1797
                 [m4_ifdef([AC_PROVIDE_$1],
 
1798
                           [$2], [$3])])])
 
1799
 
 
1800
 
 
1801
# AC_PROG_LIBTOOL
290
1802
# ---------------
291
 
AC_DEFUN([AM_SANITY_CHECK],
292
 
[AC_MSG_CHECKING([whether build environment is sane])
293
 
# Just in case
294
 
sleep 1
295
 
echo timestamp > conftest.file
296
 
# Do `set' in a subshell so we don't clobber the current shell's
297
 
# arguments.  Must try -L first in case configure is actually a
298
 
# symlink; some systems play weird games with the mod time of symlinks
299
 
# (eg FreeBSD returns the mod time of the symlink's containing
300
 
# directory).
301
 
if (
302
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
303
 
   if test "$[*]" = "X"; then
304
 
      # -L didn't work.
305
 
      set X `ls -t $srcdir/configure conftest.file`
306
 
   fi
307
 
   rm -f conftest.file
308
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
309
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
310
 
 
311
 
      # If neither matched, then we have a broken ls.  This can happen
312
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
313
 
      # broken ls alias from the environment.  This has actually
314
 
      # happened.  Such a system could not be considered "sane".
315
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
316
 
alias in your environment])
317
 
   fi
318
 
 
319
 
   test "$[2]" = conftest.file
320
 
   )
321
 
then
322
 
   # Ok.
323
 
   :
324
 
else
325
 
   AC_MSG_ERROR([newly created file is older than distributed files!
326
 
Check your system clock])
327
 
fi
328
 
AC_MSG_RESULT(yes)])
329
 
 
330
 
#  -*- Autoconf -*-
331
 
 
332
 
 
333
 
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
334
 
 
335
 
# This program is free software; you can redistribute it and/or modify
336
 
# it under the terms of the GNU General Public License as published by
337
 
# the Free Software Foundation; either version 2, or (at your option)
338
 
# any later version.
339
 
 
340
 
# This program is distributed in the hope that it will be useful,
341
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
342
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
343
 
# GNU General Public License for more details.
344
 
 
345
 
# You should have received a copy of the GNU General Public License
346
 
# along with this program; if not, write to the Free Software
347
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
348
 
# 02111-1307, USA.
349
 
 
350
 
# serial 3
351
 
 
352
 
# AM_MISSING_PROG(NAME, PROGRAM)
353
 
# ------------------------------
354
 
AC_DEFUN([AM_MISSING_PROG],
355
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
356
 
$1=${$1-"${am_missing_run}$2"}
357
 
AC_SUBST($1)])
358
 
 
359
 
 
360
 
# AM_MISSING_HAS_RUN
361
 
# ------------------
362
 
# Define MISSING if not defined so far and test if it supports --run.
363
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
364
 
AC_DEFUN([AM_MISSING_HAS_RUN],
365
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
366
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
367
 
# Use eval to expand $SHELL
368
 
if eval "$MISSING --run true"; then
369
 
  am_missing_run="$MISSING --run "
370
 
else
371
 
  am_missing_run=
372
 
  AC_MSG_WARN([`missing' script is too old or missing])
373
 
fi
374
 
])
375
 
 
376
 
# AM_AUX_DIR_EXPAND
377
 
 
378
 
# Copyright 2001 Free Software Foundation, Inc.
379
 
 
380
 
# This program is free software; you can redistribute it and/or modify
381
 
# it under the terms of the GNU General Public License as published by
382
 
# the Free Software Foundation; either version 2, or (at your option)
383
 
# any later version.
384
 
 
385
 
# This program is distributed in the hope that it will be useful,
386
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
387
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
388
 
# GNU General Public License for more details.
389
 
 
390
 
# You should have received a copy of the GNU General Public License
391
 
# along with this program; if not, write to the Free Software
392
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
393
 
# 02111-1307, USA.
394
 
 
395
 
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
396
 
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
397
 
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
398
 
#
399
 
# Of course, Automake must honor this variable whenever it calls a
400
 
# tool from the auxiliary directory.  The problem is that $srcdir (and
401
 
# therefore $ac_aux_dir as well) can be either absolute or relative,
402
 
# depending on how configure is run.  This is pretty annoying, since
403
 
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
404
 
# source directory, any form will work fine, but in subdirectories a
405
 
# relative path needs to be adjusted first.
406
 
#
407
 
# $ac_aux_dir/missing
408
 
#    fails when called from a subdirectory if $ac_aux_dir is relative
409
 
# $top_srcdir/$ac_aux_dir/missing
410
 
#    fails if $ac_aux_dir is absolute,
411
 
#    fails when called from a subdirectory in a VPATH build with
412
 
#          a relative $ac_aux_dir
413
 
#
414
 
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
415
 
# are both prefixed by $srcdir.  In an in-source build this is usually
416
 
# harmless because $srcdir is `.', but things will broke when you
417
 
# start a VPATH build or use an absolute $srcdir.
418
 
#
419
 
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
420
 
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
421
 
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
422
 
# and then we would define $MISSING as
423
 
#   MISSING="\${SHELL} $am_aux_dir/missing"
424
 
# This will work as long as MISSING is not called from configure, because
425
 
# unfortunately $(top_srcdir) has no meaning in configure.
426
 
# However there are other variables, like CC, which are often used in
427
 
# configure, and could therefore not use this "fixed" $ac_aux_dir.
428
 
#
429
 
# Another solution, used here, is to always expand $ac_aux_dir to an
430
 
# absolute PATH.  The drawback is that using absolute paths prevent a
431
 
# configured tree to be moved without reconfiguration.
432
 
 
433
 
# Rely on autoconf to set up CDPATH properly.
434
 
AC_PREREQ([2.50])
435
 
 
436
 
AC_DEFUN([AM_AUX_DIR_EXPAND], [
437
 
# expand $ac_aux_dir to an absolute path
438
 
am_aux_dir=`cd $ac_aux_dir && pwd`
439
 
])
440
 
 
441
 
# AM_PROG_INSTALL_SH
442
 
# ------------------
443
 
# Define $install_sh.
444
 
 
445
 
# Copyright 2001 Free Software Foundation, Inc.
446
 
 
447
 
# This program is free software; you can redistribute it and/or modify
448
 
# it under the terms of the GNU General Public License as published by
449
 
# the Free Software Foundation; either version 2, or (at your option)
450
 
# any later version.
451
 
 
452
 
# This program is distributed in the hope that it will be useful,
453
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
454
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
455
 
# GNU General Public License for more details.
456
 
 
457
 
# You should have received a copy of the GNU General Public License
458
 
# along with this program; if not, write to the Free Software
459
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
460
 
# 02111-1307, USA.
461
 
 
462
 
AC_DEFUN([AM_PROG_INSTALL_SH],
463
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
464
 
install_sh=${install_sh-"$am_aux_dir/install-sh"}
465
 
AC_SUBST(install_sh)])
466
 
 
467
 
# AM_PROG_INSTALL_STRIP
468
 
 
469
 
# Copyright 2001 Free Software Foundation, Inc.
470
 
 
471
 
# This program is free software; you can redistribute it and/or modify
472
 
# it under the terms of the GNU General Public License as published by
473
 
# the Free Software Foundation; either version 2, or (at your option)
474
 
# any later version.
475
 
 
476
 
# This program is distributed in the hope that it will be useful,
477
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
478
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
479
 
# GNU General Public License for more details.
480
 
 
481
 
# You should have received a copy of the GNU General Public License
482
 
# along with this program; if not, write to the Free Software
483
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
484
 
# 02111-1307, USA.
485
 
 
486
 
# One issue with vendor `install' (even GNU) is that you can't
487
 
# specify the program used to strip binaries.  This is especially
488
 
# annoying in cross-compiling environments, where the build's strip
489
 
# is unlikely to handle the host's binaries.
490
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
491
 
# always use install-sh in `make install-strip', and initialize
492
 
# STRIPPROG with the value of the STRIP variable (set by the user).
493
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
494
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
495
 
# Installed binaries are usually stripped using `strip' when the user
496
 
# run `make install-strip'.  However `strip' might not be the right
497
 
# tool to use in cross-compilation environments, therefore Automake
498
 
# will honor the `STRIP' environment variable to overrule this program.
499
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
500
 
if test "$cross_compiling" != no; then
501
 
  AC_CHECK_TOOL([STRIP], [strip], :)
502
 
fi
503
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
504
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
505
 
 
506
 
# serial 4                                              -*- Autoconf -*-
507
 
 
508
 
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
509
 
 
510
 
# This program is free software; you can redistribute it and/or modify
511
 
# it under the terms of the GNU General Public License as published by
512
 
# the Free Software Foundation; either version 2, or (at your option)
513
 
# any later version.
514
 
 
515
 
# This program is distributed in the hope that it will be useful,
516
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
517
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
518
 
# GNU General Public License for more details.
519
 
 
520
 
# You should have received a copy of the GNU General Public License
521
 
# along with this program; if not, write to the Free Software
522
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
523
 
# 02111-1307, USA.
524
 
 
525
 
 
526
 
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
527
 
# written in clear, in which case automake, when reading aclocal.m4,
528
 
# will think it sees a *use*, and therefore will trigger all it's
529
 
# C support machinery.  Also note that it means that autoscan, seeing
530
 
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
531
 
 
532
 
 
533
 
 
534
 
# _AM_DEPENDENCIES(NAME)
535
 
# ----------------------
536
 
# See how the compiler implements dependency checking.
537
 
# NAME is "CC", "CXX", "GCJ", or "OBJC".
538
 
# We try a few techniques and use that to set a single cache variable.
539
 
#
540
 
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
541
 
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
542
 
# dependency, and given that the user is not expected to run this macro,
543
 
# just rely on AC_PROG_CC.
544
 
AC_DEFUN([_AM_DEPENDENCIES],
545
 
[AC_REQUIRE([AM_SET_DEPDIR])dnl
546
 
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
547
 
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
548
 
AC_REQUIRE([AM_DEP_TRACK])dnl
549
 
 
550
 
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
551
 
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
552
 
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
553
 
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
554
 
                   [depcc="$$1"   am_compiler_list=])
555
 
 
556
 
AC_CACHE_CHECK([dependency style of $depcc],
557
 
               [am_cv_$1_dependencies_compiler_type],
558
 
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
559
 
  # We make a subdir and do the tests there.  Otherwise we can end up
560
 
  # making bogus files that we don't know about and never remove.  For
561
 
  # instance it was reported that on HP-UX the gcc test will end up
562
 
  # making a dummy file named `D' -- because `-MD' means `put the output
563
 
  # in D'.
564
 
  mkdir conftest.dir
565
 
  # Copy depcomp to subdir because otherwise we won't find it if we're
566
 
  # using a relative directory.
567
 
  cp "$am_depcomp" conftest.dir
568
 
  cd conftest.dir
569
 
 
570
 
  am_cv_$1_dependencies_compiler_type=none
571
 
  if test "$am_compiler_list" = ""; then
572
 
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
573
 
  fi
574
 
  for depmode in $am_compiler_list; do
575
 
    # We need to recreate these files for each test, as the compiler may
576
 
    # overwrite some of them when testing with obscure command lines.
577
 
    # This happens at least with the AIX C compiler.
578
 
    echo '#include "conftest.h"' > conftest.c
579
 
    echo 'int i;' > conftest.h
580
 
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
581
 
 
582
 
    case $depmode in
583
 
    nosideeffect)
584
 
      # after this tag, mechanisms are not by side-effect, so they'll
585
 
      # only be used when explicitly requested
586
 
      if test "x$enable_dependency_tracking" = xyes; then
587
 
        continue
588
 
      else
589
 
        break
590
 
      fi
591
 
      ;;
592
 
    none) break ;;
593
 
    esac
594
 
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
595
 
    # mode.  It turns out that the SunPro C++ compiler does not properly
596
 
    # handle `-M -o', and we need to detect this.
597
 
    if depmode=$depmode \
598
 
       source=conftest.c object=conftest.o \
599
 
       depfile=conftest.Po tmpdepfile=conftest.TPo \
600
 
       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
601
 
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
602
 
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
603
 
      am_cv_$1_dependencies_compiler_type=$depmode
604
 
      break
605
 
    fi
606
 
  done
607
 
 
608
 
  cd ..
609
 
  rm -rf conftest.dir
610
 
else
611
 
  am_cv_$1_dependencies_compiler_type=none
612
 
fi
613
 
])
614
 
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
615
 
])
616
 
 
617
 
 
618
 
# AM_SET_DEPDIR
619
 
# -------------
620
 
# Choose a directory name for dependency files.
621
 
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
622
 
AC_DEFUN([AM_SET_DEPDIR],
623
 
[rm -f .deps 2>/dev/null
624
 
mkdir .deps 2>/dev/null
625
 
if test -d .deps; then
626
 
  DEPDIR=.deps
627
 
else
628
 
  # MS-DOS does not allow filenames that begin with a dot.
629
 
  DEPDIR=_deps
630
 
fi
631
 
rmdir .deps 2>/dev/null
632
 
AC_SUBST([DEPDIR])
633
 
])
634
 
 
635
 
 
636
 
# AM_DEP_TRACK
637
 
# ------------
638
 
AC_DEFUN([AM_DEP_TRACK],
639
 
[AC_ARG_ENABLE(dependency-tracking,
640
 
[  --disable-dependency-tracking Speeds up one-time builds
641
 
  --enable-dependency-tracking  Do not reject slow dependency extractors])
642
 
if test "x$enable_dependency_tracking" != xno; then
643
 
  am_depcomp="$ac_aux_dir/depcomp"
644
 
  AMDEPBACKSLASH='\'
645
 
fi
646
 
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
647
 
AC_SUBST([AMDEPBACKSLASH])
648
 
])
649
 
 
650
 
# Generate code to set up dependency tracking.   -*- Autoconf -*-
651
 
 
652
 
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
653
 
 
654
 
# This program is free software; you can redistribute it and/or modify
655
 
# it under the terms of the GNU General Public License as published by
656
 
# the Free Software Foundation; either version 2, or (at your option)
657
 
# any later version.
658
 
 
659
 
# This program is distributed in the hope that it will be useful,
660
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
661
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
662
 
# GNU General Public License for more details.
663
 
 
664
 
# You should have received a copy of the GNU General Public License
665
 
# along with this program; if not, write to the Free Software
666
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
667
 
# 02111-1307, USA.
668
 
 
669
 
#serial 2
670
 
 
671
 
# _AM_OUTPUT_DEPENDENCY_COMMANDS
672
 
# ------------------------------
673
 
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
674
 
[for mf in $CONFIG_FILES; do
675
 
  # Strip MF so we end up with the name of the file.
676
 
  mf=`echo "$mf" | sed -e 's/:.*$//'`
677
 
  # Check whether this is an Automake generated Makefile or not.
678
 
  # We used to match only the files named `Makefile.in', but
679
 
  # some people rename them; so instead we look at the file content.
680
 
  # Grep'ing the first line is not enough: some people post-process
681
 
  # each Makefile.in and add a new line on top of each file to say so.
682
 
  # So let's grep whole file.
683
 
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
684
 
    dirpart=`AS_DIRNAME("$mf")`
685
 
  else
686
 
    continue
687
 
  fi
688
 
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
689
 
  # Extract the definition of DEP_FILES from the Makefile without
690
 
  # running `make'.
691
 
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
692
 
  test -z "$DEPDIR" && continue
693
 
  # When using ansi2knr, U may be empty or an underscore; expand it
694
 
  U=`sed -n -e '/^U = / s///p' < "$mf"`
695
 
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
696
 
  # We invoke sed twice because it is the simplest approach to
697
 
  # changing $(DEPDIR) to its actual value in the expansion.
698
 
  for file in `sed -n -e '
699
 
    /^DEP_FILES = .*\\\\$/ {
700
 
      s/^DEP_FILES = //
701
 
      :loop
702
 
        s/\\\\$//
703
 
        p
704
 
        n
705
 
        /\\\\$/ b loop
706
 
      p
707
 
    }
708
 
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
709
 
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
710
 
    # Make sure the directory exists.
711
 
    test -f "$dirpart/$file" && continue
712
 
    fdir=`AS_DIRNAME(["$file"])`
713
 
    AS_MKDIR_P([$dirpart/$fdir])
714
 
    # echo "creating $dirpart/$file"
715
 
    echo '# dummy' > "$dirpart/$file"
716
 
  done
717
 
done
718
 
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
719
 
 
720
 
 
721
 
# AM_OUTPUT_DEPENDENCY_COMMANDS
722
 
# -----------------------------
723
 
# This macro should only be invoked once -- use via AC_REQUIRE.
724
 
#
725
 
# This code is only required when automatic dependency tracking
726
 
# is enabled.  FIXME.  This creates each `.P' file that we will
727
 
# need in order to bootstrap the dependency handling code.
728
 
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
729
 
[AC_CONFIG_COMMANDS([depfiles],
730
 
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
731
 
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
732
 
])
733
 
 
734
 
# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
735
 
 
736
 
# This program is free software; you can redistribute it and/or modify
737
 
# it under the terms of the GNU General Public License as published by
738
 
# the Free Software Foundation; either version 2, or (at your option)
739
 
# any later version.
740
 
 
741
 
# This program is distributed in the hope that it will be useful,
742
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
743
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
744
 
# GNU General Public License for more details.
745
 
 
746
 
# You should have received a copy of the GNU General Public License
747
 
# along with this program; if not, write to the Free Software
748
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
749
 
# 02111-1307, USA.
750
 
 
751
 
# serial 2
752
 
 
753
 
# AM_MAKE_INCLUDE()
754
 
# -----------------
755
 
# Check to see how make treats includes.
756
 
AC_DEFUN([AM_MAKE_INCLUDE],
757
 
[am_make=${MAKE-make}
758
 
cat > confinc << 'END'
759
 
doit:
760
 
        @echo done
761
 
END
762
 
# If we don't find an include directive, just comment out the code.
763
 
AC_MSG_CHECKING([for style of include used by $am_make])
764
 
am__include="#"
765
 
am__quote=
766
 
_am_result=none
767
 
# First try GNU make style include.
768
 
echo "include confinc" > confmf
769
 
# We grep out `Entering directory' and `Leaving directory'
770
 
# messages which can occur if `w' ends up in MAKEFLAGS.
771
 
# In particular we don't look at `^make:' because GNU make might
772
 
# be invoked under some other name (usually "gmake"), in which
773
 
# case it prints its new name instead of `make'.
774
 
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
775
 
   am__include=include
776
 
   am__quote=
777
 
   _am_result=GNU
778
 
fi
779
 
# Now try BSD make style include.
780
 
if test "$am__include" = "#"; then
781
 
   echo '.include "confinc"' > confmf
782
 
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
783
 
      am__include=.include
784
 
      am__quote="\""
785
 
      _am_result=BSD
786
 
   fi
787
 
fi
788
 
AC_SUBST(am__include)
789
 
AC_SUBST(am__quote)
790
 
AC_MSG_RESULT($_am_result)
791
 
rm -f confinc confmf
792
 
])
793
 
 
794
 
# AM_CONDITIONAL                                              -*- Autoconf -*-
795
 
 
796
 
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
797
 
 
798
 
# This program is free software; you can redistribute it and/or modify
799
 
# it under the terms of the GNU General Public License as published by
800
 
# the Free Software Foundation; either version 2, or (at your option)
801
 
# any later version.
802
 
 
803
 
# This program is distributed in the hope that it will be useful,
804
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
805
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
806
 
# GNU General Public License for more details.
807
 
 
808
 
# You should have received a copy of the GNU General Public License
809
 
# along with this program; if not, write to the Free Software
810
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
811
 
# 02111-1307, USA.
812
 
 
813
 
# serial 5
814
 
 
815
 
AC_PREREQ(2.52)
816
 
 
817
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
818
 
# -------------------------------------
819
 
# Define a conditional.
820
 
AC_DEFUN([AM_CONDITIONAL],
821
 
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
822
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
823
 
AC_SUBST([$1_TRUE])
824
 
AC_SUBST([$1_FALSE])
825
 
if $2; then
826
 
  $1_TRUE=
827
 
  $1_FALSE='#'
828
 
else
829
 
  $1_TRUE='#'
830
 
  $1_FALSE=
831
 
fi
832
 
AC_CONFIG_COMMANDS_PRE(
833
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
834
 
  AC_MSG_ERROR([conditional \"$1\" was never defined.
835
 
Usually this means the macro was only invoked conditionally.])
836
 
fi])])
837
 
 
838
 
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
839
 
 
840
 
# serial 46 AC_PROG_LIBTOOL
841
 
 
842
1803
AC_DEFUN([AC_PROG_LIBTOOL],
 
1804
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
 
1805
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
 
1806
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
 
1807
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
1808
    [AC_LIBTOOL_CXX],
 
1809
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
 
1810
  ])])
 
1811
dnl And a similar setup for Fortran 77 support
 
1812
  AC_PROVIDE_IFELSE([AC_PROG_F77],
 
1813
    [AC_LIBTOOL_F77],
 
1814
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
 
1815
])])
 
1816
 
 
1817
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
 
1818
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
 
1819
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
 
1820
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
1821
    [AC_LIBTOOL_GCJ],
 
1822
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
1823
      [AC_LIBTOOL_GCJ],
 
1824
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
 
1825
        [AC_LIBTOOL_GCJ],
 
1826
      [ifdef([AC_PROG_GCJ],
 
1827
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
1828
       ifdef([A][M_PROG_GCJ],
 
1829
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
1830
       ifdef([LT_AC_PROG_GCJ],
 
1831
             [define([LT_AC_PROG_GCJ],
 
1832
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
 
1833
])])# AC_PROG_LIBTOOL
 
1834
 
 
1835
 
 
1836
# _AC_PROG_LIBTOOL
 
1837
# ----------------
 
1838
AC_DEFUN([_AC_PROG_LIBTOOL],
843
1839
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
 
1840
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
 
1841
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
 
1842
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
844
1843
 
845
1844
# This can be used to rebuild libtool when needed
846
1845
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
851
1850
 
852
1851
# Prevent multiple expansion
853
1852
define([AC_PROG_LIBTOOL], [])
854
 
])
855
 
 
 
1853
])# _AC_PROG_LIBTOOL
 
1854
 
 
1855
 
 
1856
# AC_LIBTOOL_SETUP
 
1857
# ----------------
856
1858
AC_DEFUN([AC_LIBTOOL_SETUP],
857
 
[AC_PREREQ(2.13)dnl
 
1859
[AC_PREREQ(2.50)dnl
858
1860
AC_REQUIRE([AC_ENABLE_SHARED])dnl
859
1861
AC_REQUIRE([AC_ENABLE_STATIC])dnl
860
1862
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
864
1866
AC_REQUIRE([AC_PROG_LD])dnl
865
1867
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
866
1868
AC_REQUIRE([AC_PROG_NM])dnl
 
1869
 
867
1870
AC_REQUIRE([AC_PROG_LN_S])dnl
868
1871
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 
1872
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
869
1873
AC_REQUIRE([AC_OBJEXT])dnl
870
1874
AC_REQUIRE([AC_EXEEXT])dnl
871
1875
dnl
872
1876
 
 
1877
AC_LIBTOOL_SYS_MAX_CMD_LEN
 
1878
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
1879
AC_LIBTOOL_OBJDIR
 
1880
 
 
1881
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
873
1882
_LT_AC_PROG_ECHO_BACKSLASH
 
1883
 
 
1884
case $host_os in
 
1885
aix3*)
 
1886
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
1887
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
1888
  # vanish in a puff of smoke.
 
1889
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
1890
    COLLECT_NAMES=
 
1891
    export COLLECT_NAMES
 
1892
  fi
 
1893
  ;;
 
1894
esac
 
1895
 
 
1896
# Sed substitution that helps us do robust quoting.  It backslashifies
 
1897
# metacharacters that are still active within double-quoted strings.
 
1898
Xsed='sed -e 1s/^X//'
 
1899
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
1900
 
 
1901
# Same as above, but do not quote variable references.
 
1902
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
1903
 
 
1904
# Sed substitution to delay expansion of an escaped shell variable in a
 
1905
# double_quote_subst'ed string.
 
1906
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
1907
 
 
1908
# Sed substitution to avoid accidental globbing in evaled expressions
 
1909
no_glob_subst='s/\*/\\\*/g'
 
1910
 
 
1911
# Constants:
 
1912
rm="rm -f"
 
1913
 
 
1914
# Global variables:
 
1915
default_ofile=libtool
 
1916
can_build_shared=yes
 
1917
 
 
1918
# All known linkers require a `.a' archive for static linking (except MSVC,
 
1919
# which needs '.lib').
 
1920
libext=a
 
1921
ltmain="$ac_aux_dir/ltmain.sh"
 
1922
ofile="$default_ofile"
 
1923
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
1924
 
 
1925
AC_CHECK_TOOL(AR, ar, false)
 
1926
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
1927
AC_CHECK_TOOL(STRIP, strip, :)
 
1928
 
 
1929
old_CC="$CC"
 
1930
old_CFLAGS="$CFLAGS"
 
1931
 
 
1932
# Set sane defaults for various variables
 
1933
test -z "$AR" && AR=ar
 
1934
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
1935
test -z "$AS" && AS=as
 
1936
test -z "$CC" && CC=cc
 
1937
test -z "$LTCC" && LTCC=$CC
 
1938
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
1939
test -z "$LD" && LD=ld
 
1940
test -z "$LN_S" && LN_S="ln -s"
 
1941
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
1942
test -z "$NM" && NM=nm
 
1943
test -z "$SED" && SED=sed
 
1944
test -z "$OBJDUMP" && OBJDUMP=objdump
 
1945
test -z "$RANLIB" && RANLIB=:
 
1946
test -z "$STRIP" && STRIP=:
 
1947
test -z "$ac_objext" && ac_objext=o
 
1948
 
 
1949
# Determine commands to create old-style static archives.
 
1950
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
1951
old_postinstall_cmds='chmod 644 $oldlib'
 
1952
old_postuninstall_cmds=
 
1953
 
 
1954
if test -n "$RANLIB"; then
 
1955
  case $host_os in
 
1956
  openbsd*)
 
1957
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
1958
    ;;
 
1959
  *)
 
1960
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
1961
    ;;
 
1962
  esac
 
1963
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
1964
fi
 
1965
 
 
1966
_LT_CC_BASENAME([$compiler])
 
1967
 
874
1968
# Only perform the check for file, if the check method requires it
875
1969
case $deplibs_check_method in
876
1970
file_magic*)
880
1974
  ;;
881
1975
esac
882
1976
 
883
 
AC_CHECK_TOOL(RANLIB, ranlib, :)
884
 
AC_CHECK_TOOL(STRIP, strip, :)
885
 
 
886
 
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
887
 
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
 
1977
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 
1978
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
888
1979
enable_win32_dll=yes, enable_win32_dll=no)
889
1980
 
890
 
AC_ARG_ENABLE(libtool-lock,
891
 
  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
 
1981
AC_ARG_ENABLE([libtool-lock],
 
1982
    [AC_HELP_STRING([--disable-libtool-lock],
 
1983
        [avoid locking (might break parallel builds)])])
892
1984
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
893
1985
 
894
 
# Some flags need to be propagated to the compiler or linker for good
895
 
# libtool support.
896
 
case $host in
897
 
*-*-irix6*)
898
 
  # Find out which ABI we are using.
899
 
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
900
 
  if AC_TRY_EVAL(ac_compile); then
901
 
    case `/usr/bin/file conftest.$ac_objext` in
902
 
    *32-bit*)
903
 
      LD="${LD-ld} -32"
904
 
      ;;
905
 
    *N32*)
906
 
      LD="${LD-ld} -n32"
907
 
      ;;
908
 
    *64-bit*)
909
 
      LD="${LD-ld} -64"
910
 
      ;;
911
 
    esac
912
 
  fi
913
 
  rm -rf conftest*
914
 
  ;;
915
 
 
916
 
*-*-sco3.2v5*)
917
 
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
918
 
  SAVE_CFLAGS="$CFLAGS"
919
 
  CFLAGS="$CFLAGS -belf"
920
 
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
921
 
    [AC_LANG_SAVE
922
 
     AC_LANG_C
923
 
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
924
 
     AC_LANG_RESTORE])
925
 
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
926
 
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
927
 
    CFLAGS="$SAVE_CFLAGS"
928
 
  fi
929
 
  ;;
930
 
 
931
 
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
932
 
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
933
 
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
934
 
  AC_CHECK_TOOL(AS, as, false)
935
 
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
936
 
 
937
 
  # recent cygwin and mingw systems supply a stub DllMain which the user
938
 
  # can override, but on older systems we have to supply one
939
 
  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
940
 
    [AC_TRY_LINK([],
941
 
      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
942
 
      DllMain (0, 0, 0);],
943
 
      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
944
 
 
945
 
  case $host/$CC in
946
 
  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
947
 
    # old mingw systems require "-dll" to link a DLL, while more recent ones
948
 
    # require "-mdll"
949
 
    SAVE_CFLAGS="$CFLAGS"
950
 
    CFLAGS="$CFLAGS -mdll"
951
 
    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
952
 
      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
953
 
    CFLAGS="$SAVE_CFLAGS" ;;
954
 
  *-*-cygwin* | *-*-pw32*)
955
 
    # cygwin systems need to pass --dll to the linker, and not link
956
 
    # crt.o which will require a WinMain@16 definition.
957
 
    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
 
1986
AC_ARG_WITH([pic],
 
1987
    [AC_HELP_STRING([--with-pic],
 
1988
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
1989
    [pic_mode="$withval"],
 
1990
    [pic_mode=default])
 
1991
test -z "$pic_mode" && pic_mode=default
 
1992
 
 
1993
# Use C for the default configuration in the libtool script
 
1994
tagname=
 
1995
AC_LIBTOOL_LANG_C_CONFIG
 
1996
_LT_AC_TAGCONFIG
 
1997
])# AC_LIBTOOL_SETUP
 
1998
 
 
1999
 
 
2000
# _LT_AC_SYS_COMPILER
 
2001
# -------------------
 
2002
AC_DEFUN([_LT_AC_SYS_COMPILER],
 
2003
[AC_REQUIRE([AC_PROG_CC])dnl
 
2004
 
 
2005
# If no C compiler was specified, use CC.
 
2006
LTCC=${LTCC-"$CC"}
 
2007
 
 
2008
# Allow CC to be a program name with arguments.
 
2009
compiler=$CC
 
2010
])# _LT_AC_SYS_COMPILER
 
2011
 
 
2012
 
 
2013
# _LT_CC_BASENAME(CC)
 
2014
# -------------------
 
2015
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 
2016
AC_DEFUN([_LT_CC_BASENAME],
 
2017
[for cc_temp in $1""; do
 
2018
  case $cc_temp in
 
2019
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
 
2020
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
 
2021
    \-*) ;;
 
2022
    *) break;;
958
2023
  esac
959
 
  ;;
960
 
  ])
961
 
esac
962
 
 
963
 
_LT_AC_LTCONFIG_HACK
964
 
 
 
2024
done
 
2025
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
965
2026
])
966
2027
 
967
 
# AC_LIBTOOL_HEADER_ASSERT
 
2028
 
 
2029
# _LT_COMPILER_BOILERPLATE
968
2030
# ------------------------
969
 
AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
970
 
[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
971
 
    [lt_cv_func_assert_works],
972
 
    [case $host in
973
 
    *-*-solaris*)
974
 
      if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
975
 
        case `$CC --version 2>/dev/null` in
976
 
        [[12]].*) lt_cv_func_assert_works=no ;;
977
 
        *)        lt_cv_func_assert_works=yes ;;
978
 
        esac
979
 
      fi
980
 
      ;;
981
 
    esac])
982
 
 
983
 
if test "x$lt_cv_func_assert_works" = xyes; then
984
 
  AC_CHECK_HEADERS(assert.h)
985
 
fi
986
 
])# AC_LIBTOOL_HEADER_ASSERT
987
 
 
988
 
# _LT_AC_CHECK_DLFCN
989
 
# --------------------
990
 
AC_DEFUN([_LT_AC_CHECK_DLFCN],
991
 
[AC_CHECK_HEADERS(dlfcn.h)
992
 
])# _LT_AC_CHECK_DLFCN
993
 
 
994
 
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
995
 
# ---------------------------------
996
 
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
997
 
[AC_REQUIRE([AC_CANONICAL_HOST])
998
 
AC_REQUIRE([AC_PROG_NM])
999
 
AC_REQUIRE([AC_OBJEXT])
1000
 
# Check for command to grab the raw symbol name followed by C symbol from nm.
1001
 
AC_MSG_CHECKING([command to parse $NM output])
1002
 
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1003
 
 
1004
 
# These are sane defaults that work on at least a few old systems.
1005
 
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
1006
 
 
1007
 
# Character class describing NM global symbol codes.
1008
 
symcode='[[BCDEGRST]]'
1009
 
 
1010
 
# Regexp to match symbols that can be accessed directly from C.
1011
 
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1012
 
 
1013
 
# Transform the above into a raw symbol and a C symbol.
1014
 
symxfrm='\1 \2\3 \3'
1015
 
 
1016
 
# Transform an extracted symbol line into a proper C declaration
1017
 
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1018
 
 
1019
 
# Transform an extracted symbol line into symbol name and symbol address
1020
 
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
1021
 
 
1022
 
# Define system-specific variables.
1023
 
case $host_os in
1024
 
aix*)
1025
 
  symcode='[[BCDT]]'
1026
 
  ;;
1027
 
cygwin* | mingw* | pw32*)
1028
 
  symcode='[[ABCDGISTW]]'
1029
 
  ;;
1030
 
hpux*) # Its linker distinguishes data from code symbols
1031
 
  lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1032
 
  lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
1033
 
  ;;
1034
 
irix*)
1035
 
  symcode='[[BCDEGRST]]'
1036
 
  ;;
1037
 
solaris* | sysv5*)
1038
 
  symcode='[[BDT]]'
1039
 
  ;;
1040
 
sysv4)
1041
 
  symcode='[[DFNSTU]]'
1042
 
  ;;
1043
 
esac
1044
 
 
1045
 
# Handle CRLF in mingw tool chain
1046
 
opt_cr=
1047
 
case $host_os in
1048
 
mingw*)
1049
 
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1050
 
  ;;
1051
 
esac
1052
 
 
1053
 
# If we're using GNU nm, then use its standard symbol codes.
1054
 
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1055
 
  symcode='[[ABCDGISTW]]'
1056
 
fi
1057
 
 
1058
 
# Try without a prefix undercore, then with it.
1059
 
for ac_symprfx in "" "_"; do
1060
 
 
1061
 
  # Write the raw and C identifiers.
1062
 
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[        ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1063
 
 
1064
 
  # Check to see that the pipe works correctly.
1065
 
  pipe_works=no
1066
 
  rm -f conftest*
1067
 
  cat > conftest.$ac_ext <<EOF
1068
 
#ifdef __cplusplus
1069
 
extern "C" {
1070
 
#endif
1071
 
char nm_test_var;
1072
 
void nm_test_func(){}
1073
 
#ifdef __cplusplus
1074
 
}
1075
 
#endif
1076
 
int main(){nm_test_var='a';nm_test_func();return(0);}
1077
 
EOF
1078
 
 
1079
 
  if AC_TRY_EVAL(ac_compile); then
1080
 
    # Now try to grab the symbols.
1081
 
    nlist=conftest.nm
1082
 
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1083
 
      # Try sorting and uniquifying the output.
1084
 
      if sort "$nlist" | uniq > "$nlist"T; then
1085
 
        mv -f "$nlist"T "$nlist"
1086
 
      else
1087
 
        rm -f "$nlist"T
1088
 
      fi
1089
 
 
1090
 
      # Make sure that we snagged all the symbols we need.
1091
 
      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1092
 
        if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1093
 
          cat <<EOF > conftest.$ac_ext
1094
 
#ifdef __cplusplus
1095
 
extern "C" {
1096
 
#endif
1097
 
 
1098
 
EOF
1099
 
          # Now generate the symbol file.
1100
 
          eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1101
 
 
1102
 
          cat <<EOF >> conftest.$ac_ext
1103
 
#if defined (__STDC__) && __STDC__
1104
 
# define lt_ptr void *
1105
 
#else
1106
 
# define lt_ptr char *
1107
 
# define const
1108
 
#endif
1109
 
 
1110
 
/* The mapping between symbol names and symbols. */
1111
 
const struct {
1112
 
  const char *name;
1113
 
  lt_ptr address;
1114
 
}
1115
 
lt_preloaded_symbols[[]] =
1116
 
{
1117
 
EOF
1118
 
          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1119
 
          cat <<\EOF >> conftest.$ac_ext
1120
 
  {0, (lt_ptr) 0}
1121
 
};
1122
 
 
1123
 
#ifdef __cplusplus
1124
 
}
1125
 
#endif
1126
 
EOF
1127
 
          # Now try linking the two files.
1128
 
          mv conftest.$ac_objext conftstm.$ac_objext
1129
 
          save_LIBS="$LIBS"
1130
 
          save_CFLAGS="$CFLAGS"
1131
 
          LIBS="conftstm.$ac_objext"
1132
 
          CFLAGS="$CFLAGS$no_builtin_flag"
1133
 
          if AC_TRY_EVAL(ac_link) && test -s conftest; then
1134
 
            pipe_works=yes
1135
 
          fi
1136
 
          LIBS="$save_LIBS"
1137
 
          CFLAGS="$save_CFLAGS"
1138
 
        else
1139
 
          echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1140
 
        fi
1141
 
      else
1142
 
        echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1143
 
      fi
1144
 
    else
1145
 
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1146
 
    fi
1147
 
  else
1148
 
    echo "$progname: failed program was:" >&AC_FD_CC
1149
 
    cat conftest.$ac_ext >&5
1150
 
  fi
1151
 
  rm -f conftest* conftst*
1152
 
 
1153
 
  # Do not use the global_symbol_pipe unless it works.
1154
 
  if test "$pipe_works" = yes; then
1155
 
    break
1156
 
  else
1157
 
    lt_cv_sys_global_symbol_pipe=
1158
 
  fi
1159
 
done
1160
 
])
1161
 
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1162
 
if test -z "$lt_cv_sys_global_symbol_pipe"; then
1163
 
  global_symbol_to_cdecl=
1164
 
  global_symbol_to_c_name_address=
1165
 
else
1166
 
  global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1167
 
  global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1168
 
fi
1169
 
if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1170
 
then
1171
 
  AC_MSG_RESULT(failed)
1172
 
else
1173
 
  AC_MSG_RESULT(ok)
1174
 
fi
1175
 
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1176
 
 
1177
 
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1178
 
# ---------------------------------
1179
 
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1180
 
[# Find the correct PATH separator.  Usually this is `:', but
1181
 
# DJGPP uses `;' like DOS.
1182
 
if test "X${PATH_SEPARATOR+set}" != Xset; then
1183
 
  UNAME=${UNAME-`uname 2>/dev/null`}
1184
 
  case X$UNAME in
1185
 
    *-DOS) lt_cv_sys_path_separator=';' ;;
1186
 
    *)     lt_cv_sys_path_separator=':' ;;
1187
 
  esac
1188
 
  PATH_SEPARATOR=$lt_cv_sys_path_separator
1189
 
fi
1190
 
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
 
2031
# Check for compiler boilerplate output or warnings with
 
2032
# the simple compiler test code.
 
2033
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
 
2034
[ac_outfile=conftest.$ac_objext
 
2035
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
 
2036
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
 
2037
_lt_compiler_boilerplate=`cat conftest.err`
 
2038
$rm conftest*
 
2039
])# _LT_COMPILER_BOILERPLATE
 
2040
 
 
2041
 
 
2042
# _LT_LINKER_BOILERPLATE
 
2043
# ----------------------
 
2044
# Check for linker boilerplate output or warnings with
 
2045
# the simple link test code.
 
2046
AC_DEFUN([_LT_LINKER_BOILERPLATE],
 
2047
[ac_outfile=conftest.$ac_objext
 
2048
printf "$lt_simple_link_test_code" >conftest.$ac_ext
 
2049
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
 
2050
_lt_linker_boilerplate=`cat conftest.err`
 
2051
$rm conftest*
 
2052
])# _LT_LINKER_BOILERPLATE
 
2053
 
 
2054
 
 
2055
# _LT_AC_SYS_LIBPATH_AIX
 
2056
# ----------------------
 
2057
# Links a minimal program and checks the executable
 
2058
# for the system default hardcoded library path. In most cases,
 
2059
# this is /usr/lib:/lib, but when the MPI compilers are used
 
2060
# the location of the communication and MPI libs are included too.
 
2061
# If we don't find anything, use the default library path according
 
2062
# to the aix ld manual.
 
2063
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
 
2064
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
2065
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
2066
}'`
 
2067
# Check for a 64-bit object if we didn't find anything.
 
2068
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
2069
}'`; fi],[])
 
2070
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
2071
])# _LT_AC_SYS_LIBPATH_AIX
 
2072
 
 
2073
 
 
2074
# _LT_AC_SHELL_INIT(ARG)
 
2075
# ----------------------
 
2076
AC_DEFUN([_LT_AC_SHELL_INIT],
 
2077
[ifdef([AC_DIVERSION_NOTICE],
 
2078
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
2079
         [AC_DIVERT_PUSH(NOTICE)])
 
2080
$1
 
2081
AC_DIVERT_POP
 
2082
])# _LT_AC_SHELL_INIT
 
2083
 
1191
2084
 
1192
2085
# _LT_AC_PROG_ECHO_BACKSLASH
1193
2086
# --------------------------
1194
2087
# Add some code to the start of the generated configure script which
1195
2088
# will find an echo command which doesn't interpret backslashes.
1196
2089
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1197
 
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1198
 
                              [AC_DIVERT_PUSH(NOTICE)])
1199
 
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1200
 
 
 
2090
[_LT_AC_SHELL_INIT([
1201
2091
# Check that we are running under the correct shell.
1202
2092
SHELL=${CONFIG_SHELL-/bin/sh}
1203
2093
 
1215
2105
elif test "X[$]1" = X--fallback-echo; then
1216
2106
  # Avoid inline document here, it may be left over
1217
2107
  :
1218
 
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
 
2108
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1219
2109
  # Yippee, $echo works!
1220
2110
  :
1221
2111
else
1227
2117
  # used as fallback echo
1228
2118
  shift
1229
2119
  cat <<EOF
1230
 
$*
 
2120
[$]*
1231
2121
EOF
1232
2122
  exit 0
1233
2123
fi
1234
2124
 
1235
2125
# The HP-UX ksh and POSIX shell print the target directory to stdout
1236
2126
# if CDPATH is set.
1237
 
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
2127
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1238
2128
 
1239
2129
if test -z "$ECHO"; then
1240
2130
if test "X${echo_test_string+set}" != Xset; then
1241
2131
# find a string as large as possible, as long as the shell can cope with it
1242
2132
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1243
2133
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1244
 
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1245
 
       echo_test_string="`eval $cmd`" &&
 
2134
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
 
2135
       echo_test_string=`eval $cmd` &&
1246
2136
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1247
2137
    then
1248
2138
      break
1261
2151
  #
1262
2152
  # So, first we look for a working echo in the user's PATH.
1263
2153
 
1264
 
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2154
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1265
2155
  for dir in $PATH /usr/ucb; do
 
2156
    IFS="$lt_save_ifs"
1266
2157
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1267
2158
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1268
2159
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1271
2162
      break
1272
2163
    fi
1273
2164
  done
1274
 
  IFS="$save_ifs"
 
2165
  IFS="$lt_save_ifs"
1275
2166
 
1276
2167
  if test "X$echo" = Xecho; then
1277
2168
    # We didn't find a better echo, so look for alternatives.
1344
2235
fi
1345
2236
 
1346
2237
AC_SUBST(ECHO)
1347
 
AC_DIVERT_POP
1348
 
])# _LT_AC_PROG_ECHO_BACKSLASH
 
2238
])])# _LT_AC_PROG_ECHO_BACKSLASH
 
2239
 
 
2240
 
 
2241
# _LT_AC_LOCK
 
2242
# -----------
 
2243
AC_DEFUN([_LT_AC_LOCK],
 
2244
[AC_ARG_ENABLE([libtool-lock],
 
2245
    [AC_HELP_STRING([--disable-libtool-lock],
 
2246
        [avoid locking (might break parallel builds)])])
 
2247
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
2248
 
 
2249
# Some flags need to be propagated to the compiler or linker for good
 
2250
# libtool support.
 
2251
case $host in
 
2252
ia64-*-hpux*)
 
2253
  # Find out which ABI we are using.
 
2254
  echo 'int i;' > conftest.$ac_ext
 
2255
  if AC_TRY_EVAL(ac_compile); then
 
2256
    case `/usr/bin/file conftest.$ac_objext` in
 
2257
    *ELF-32*)
 
2258
      HPUX_IA64_MODE="32"
 
2259
      ;;
 
2260
    *ELF-64*)
 
2261
      HPUX_IA64_MODE="64"
 
2262
      ;;
 
2263
    esac
 
2264
  fi
 
2265
  rm -rf conftest*
 
2266
  ;;
 
2267
*-*-irix6*)
 
2268
  # Find out which ABI we are using.
 
2269
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
2270
  if AC_TRY_EVAL(ac_compile); then
 
2271
   if test "$lt_cv_prog_gnu_ld" = yes; then
 
2272
    case `/usr/bin/file conftest.$ac_objext` in
 
2273
    *32-bit*)
 
2274
      LD="${LD-ld} -melf32bsmip"
 
2275
      ;;
 
2276
    *N32*)
 
2277
      LD="${LD-ld} -melf32bmipn32"
 
2278
      ;;
 
2279
    *64-bit*)
 
2280
      LD="${LD-ld} -melf64bmip"
 
2281
      ;;
 
2282
    esac
 
2283
   else
 
2284
    case `/usr/bin/file conftest.$ac_objext` in
 
2285
    *32-bit*)
 
2286
      LD="${LD-ld} -32"
 
2287
      ;;
 
2288
    *N32*)
 
2289
      LD="${LD-ld} -n32"
 
2290
      ;;
 
2291
    *64-bit*)
 
2292
      LD="${LD-ld} -64"
 
2293
      ;;
 
2294
    esac
 
2295
   fi
 
2296
  fi
 
2297
  rm -rf conftest*
 
2298
  ;;
 
2299
 
 
2300
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
 
2301
  # Find out which ABI we are using.
 
2302
  echo 'int i;' > conftest.$ac_ext
 
2303
  if AC_TRY_EVAL(ac_compile); then
 
2304
    case `/usr/bin/file conftest.o` in
 
2305
    *32-bit*)
 
2306
      case $host in
 
2307
        x86_64-*linux*)
 
2308
          LD="${LD-ld} -m elf_i386"
 
2309
          ;;
 
2310
        ppc64-*linux*|powerpc64-*linux*)
 
2311
          LD="${LD-ld} -m elf32ppclinux"
 
2312
          ;;
 
2313
        s390x-*linux*)
 
2314
          LD="${LD-ld} -m elf_s390"
 
2315
          ;;
 
2316
        sparc64-*linux*)
 
2317
          LD="${LD-ld} -m elf32_sparc"
 
2318
          ;;
 
2319
      esac
 
2320
      ;;
 
2321
    *64-bit*)
 
2322
      case $host in
 
2323
        x86_64-*linux*)
 
2324
          LD="${LD-ld} -m elf_x86_64"
 
2325
          ;;
 
2326
        ppc*-*linux*|powerpc*-*linux*)
 
2327
          LD="${LD-ld} -m elf64ppc"
 
2328
          ;;
 
2329
        s390*-*linux*)
 
2330
          LD="${LD-ld} -m elf64_s390"
 
2331
          ;;
 
2332
        sparc*-*linux*)
 
2333
          LD="${LD-ld} -m elf64_sparc"
 
2334
          ;;
 
2335
      esac
 
2336
      ;;
 
2337
    esac
 
2338
  fi
 
2339
  rm -rf conftest*
 
2340
  ;;
 
2341
 
 
2342
*-*-sco3.2v5*)
 
2343
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
2344
  SAVE_CFLAGS="$CFLAGS"
 
2345
  CFLAGS="$CFLAGS -belf"
 
2346
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
2347
    [AC_LANG_PUSH(C)
 
2348
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
2349
     AC_LANG_POP])
 
2350
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
2351
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
2352
    CFLAGS="$SAVE_CFLAGS"
 
2353
  fi
 
2354
  ;;
 
2355
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
2356
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
 
2357
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
2358
  AC_CHECK_TOOL(AS, as, false)
 
2359
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
2360
  ;;
 
2361
  ])
 
2362
esac
 
2363
 
 
2364
need_locks="$enable_libtool_lock"
 
2365
 
 
2366
])# _LT_AC_LOCK
 
2367
 
 
2368
 
 
2369
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
2370
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
2371
# ----------------------------------------------------------------
 
2372
# Check whether the given compiler option works
 
2373
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
 
2374
[AC_REQUIRE([LT_AC_PROG_SED])
 
2375
AC_CACHE_CHECK([$1], [$2],
 
2376
  [$2=no
 
2377
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
2378
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
2379
   lt_compiler_flag="$3"
 
2380
   # Insert the option either (1) after the last *FLAGS variable, or
 
2381
   # (2) before a word containing "conftest.", or (3) at the end.
 
2382
   # Note that $ac_compile itself does not contain backslashes and begins
 
2383
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
2384
   # The option is referenced via a variable to avoid confusing sed.
 
2385
   lt_compile=`echo "$ac_compile" | $SED \
 
2386
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
2387
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
2388
   -e 's:$: $lt_compiler_flag:'`
 
2389
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
2390
   (eval "$lt_compile" 2>conftest.err)
 
2391
   ac_status=$?
 
2392
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
2393
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
2394
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
2395
     # The compiler can only warn and ignore the option if not recognized
 
2396
     # So say no if there are warnings other than the usual output.
 
2397
     $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
 
2398
     $SED '/^$/d' conftest.err >conftest.er2
 
2399
     if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
 
2400
       $2=yes
 
2401
     fi
 
2402
   fi
 
2403
   $rm conftest*
 
2404
])
 
2405
 
 
2406
if test x"[$]$2" = xyes; then
 
2407
    ifelse([$5], , :, [$5])
 
2408
else
 
2409
    ifelse([$6], , :, [$6])
 
2410
fi
 
2411
])# AC_LIBTOOL_COMPILER_OPTION
 
2412
 
 
2413
 
 
2414
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
2415
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
 
2416
# ------------------------------------------------------------
 
2417
# Check whether the given compiler option works
 
2418
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
 
2419
[AC_CACHE_CHECK([$1], [$2],
 
2420
  [$2=no
 
2421
   save_LDFLAGS="$LDFLAGS"
 
2422
   LDFLAGS="$LDFLAGS $3"
 
2423
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
 
2424
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
2425
     # The linker can only warn and ignore the option if not recognized
 
2426
     # So say no if there are warnings
 
2427
     if test -s conftest.err; then
 
2428
       # Append any errors to the config.log.
 
2429
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
2430
       $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
 
2431
       $SED '/^$/d' conftest.err >conftest.er2
 
2432
       if diff conftest.exp conftest.er2 >/dev/null; then
 
2433
         $2=yes
 
2434
       fi
 
2435
     else
 
2436
       $2=yes
 
2437
     fi
 
2438
   fi
 
2439
   $rm conftest*
 
2440
   LDFLAGS="$save_LDFLAGS"
 
2441
])
 
2442
 
 
2443
if test x"[$]$2" = xyes; then
 
2444
    ifelse([$4], , :, [$4])
 
2445
else
 
2446
    ifelse([$5], , :, [$5])
 
2447
fi
 
2448
])# AC_LIBTOOL_LINKER_OPTION
 
2449
 
 
2450
 
 
2451
# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
2452
# --------------------------
 
2453
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
 
2454
[# find the maximum length of command line arguments
 
2455
AC_MSG_CHECKING([the maximum length of command line arguments])
 
2456
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
2457
  i=0
 
2458
  teststring="ABCD"
 
2459
 
 
2460
  case $build_os in
 
2461
  msdosdjgpp*)
 
2462
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
2463
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
2464
    # during glob expansion).  Even if it were fixed, the result of this
 
2465
    # check would be larger than it should be.
 
2466
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
2467
    ;;
 
2468
 
 
2469
  gnu*)
 
2470
    # Under GNU Hurd, this test is not required because there is
 
2471
    # no limit to the length of command line arguments.
 
2472
    # Libtool will interpret -1 as no limit whatsoever
 
2473
    lt_cv_sys_max_cmd_len=-1;
 
2474
    ;;
 
2475
 
 
2476
  cygwin* | mingw*)
 
2477
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
2478
    # about 5 minutes as the teststring grows exponentially.
 
2479
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
2480
    # you end up with a "frozen" computer, even though with patience
 
2481
    # the test eventually succeeds (with a max line length of 256k).
 
2482
    # Instead, let's just punt: use the minimum linelength reported by
 
2483
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
2484
    lt_cv_sys_max_cmd_len=8192;
 
2485
    ;;
 
2486
 
 
2487
  amigaos*)
 
2488
    # On AmigaOS with pdksh, this test takes hours, literally.
 
2489
    # So we just punt and use a minimum line length of 8192.
 
2490
    lt_cv_sys_max_cmd_len=8192;
 
2491
    ;;
 
2492
 
 
2493
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
 
2494
    # This has been around since 386BSD, at least.  Likely further.
 
2495
    if test -x /sbin/sysctl; then
 
2496
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
2497
    elif test -x /usr/sbin/sysctl; then
 
2498
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
2499
    else
 
2500
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
 
2501
    fi
 
2502
    # And add a safety zone
 
2503
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
2504
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
2505
    ;;
 
2506
  osf*)
 
2507
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
 
2508
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
 
2509
    # nice to cause kernel panics so lets avoid the loop below.
 
2510
    # First set a reasonable default.
 
2511
    lt_cv_sys_max_cmd_len=16384
 
2512
    #
 
2513
    if test -x /sbin/sysconfig; then
 
2514
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
 
2515
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
 
2516
      esac
 
2517
    fi
 
2518
    ;;
 
2519
  *)
 
2520
    # If test is not a shell built-in, we'll probably end up computing a
 
2521
    # maximum length that is only half of the actual maximum length, but
 
2522
    # we can't tell.
 
2523
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
2524
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
 
2525
               = "XX$teststring") >/dev/null 2>&1 &&
 
2526
            new_result=`expr "X$teststring" : ".*" 2>&1` &&
 
2527
            lt_cv_sys_max_cmd_len=$new_result &&
 
2528
            test $i != 17 # 1/2 MB should be enough
 
2529
    do
 
2530
      i=`expr $i + 1`
 
2531
      teststring=$teststring$teststring
 
2532
    done
 
2533
    teststring=
 
2534
    # Add a significant safety factor because C++ compilers can tack on massive
 
2535
    # amounts of additional arguments before passing them to the linker.
 
2536
    # It appears as though 1/2 is a usable value.
 
2537
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
2538
    ;;
 
2539
  esac
 
2540
])
 
2541
if test -n $lt_cv_sys_max_cmd_len ; then
 
2542
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
2543
else
 
2544
  AC_MSG_RESULT(none)
 
2545
fi
 
2546
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
2547
 
 
2548
 
 
2549
# _LT_AC_CHECK_DLFCN
 
2550
# --------------------
 
2551
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
2552
[AC_CHECK_HEADERS(dlfcn.h)dnl
 
2553
])# _LT_AC_CHECK_DLFCN
 
2554
 
1349
2555
 
1350
2556
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1351
2557
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1352
2558
# ------------------------------------------------------------------
1353
2559
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1354
 
[if test "$cross_compiling" = yes; then :
 
2560
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
2561
if test "$cross_compiling" = yes; then :
1355
2562
  [$4]
1356
2563
else
1357
 
  AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1358
2564
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1359
2565
  lt_status=$lt_dlunknown
1360
2566
  cat > conftest.$ac_ext <<EOF
1420
2626
}]
1421
2627
EOF
1422
2628
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1423
 
    (./conftest; exit; ) 2>/dev/null
 
2629
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1424
2630
    lt_status=$?
1425
2631
    case x$lt_status in
1426
2632
      x$lt_dlno_uscore) $1 ;;
1435
2641
rm -fr conftest*
1436
2642
])# _LT_AC_TRY_DLOPEN_SELF
1437
2643
 
 
2644
 
1438
2645
# AC_LIBTOOL_DLOPEN_SELF
1439
2646
# -------------------
1440
2647
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1441
 
[if test "x$enable_dlopen" != xyes; then
 
2648
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
2649
if test "x$enable_dlopen" != xyes; then
1442
2650
  enable_dlopen=unknown
1443
2651
  enable_dlopen_self=unknown
1444
2652
  enable_dlopen_self_static=unknown
1453
2661
    lt_cv_dlopen_self=yes
1454
2662
    ;;
1455
2663
 
1456
 
  cygwin* | mingw* | pw32*)
 
2664
  mingw* | pw32*)
1457
2665
    lt_cv_dlopen="LoadLibrary"
1458
2666
    lt_cv_dlopen_libs=
1459
2667
   ;;
1460
2668
 
 
2669
  cygwin*)
 
2670
    lt_cv_dlopen="dlopen"
 
2671
    lt_cv_dlopen_libs=
 
2672
   ;;
 
2673
 
 
2674
  darwin*)
 
2675
  # if libdl is installed we need to link against it
 
2676
    AC_CHECK_LIB([dl], [dlopen],
 
2677
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
2678
    lt_cv_dlopen="dyld"
 
2679
    lt_cv_dlopen_libs=
 
2680
    lt_cv_dlopen_self=yes
 
2681
    ])
 
2682
   ;;
 
2683
 
1461
2684
  *)
1462
2685
    AC_CHECK_FUNC([shl_load],
1463
 
          [lt_cv_dlopen="shl_load"],
 
2686
          [lt_cv_dlopen="shl_load"],
1464
2687
      [AC_CHECK_LIB([dld], [shl_load],
1465
 
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
2688
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1466
2689
        [AC_CHECK_FUNC([dlopen],
1467
2690
              [lt_cv_dlopen="dlopen"],
1468
2691
          [AC_CHECK_LIB([dl], [dlopen],
1469
 
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
2692
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1470
2693
            [AC_CHECK_LIB([svld], [dlopen],
1471
 
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
2694
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1472
2695
              [AC_CHECK_LIB([dld], [dld_link],
1473
 
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
2696
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1474
2697
              ])
1475
2698
            ])
1476
2699
          ])
1488
2711
  case $lt_cv_dlopen in
1489
2712
  dlopen)
1490
2713
    save_CPPFLAGS="$CPPFLAGS"
1491
 
    AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1492
2714
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1493
2715
 
1494
2716
    save_LDFLAGS="$LDFLAGS"
1532
2754
fi
1533
2755
])# AC_LIBTOOL_DLOPEN_SELF
1534
2756
 
1535
 
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1536
 
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1537
 
# Sed substitution that helps us do robust quoting.  It backslashifies
1538
 
# metacharacters that are still active within double-quoted strings.
1539
 
Xsed='sed -e s/^X//'
1540
 
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1541
 
 
1542
 
# Same as above, but do not quote variable references.
1543
 
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1544
 
 
1545
 
# Sed substitution to delay expansion of an escaped shell variable in a
1546
 
# double_quote_subst'ed string.
1547
 
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1548
 
 
1549
 
# Constants:
1550
 
rm="rm -f"
1551
 
 
1552
 
# Global variables:
1553
 
default_ofile=libtool
1554
 
can_build_shared=yes
1555
 
 
1556
 
# All known linkers require a `.a' archive for static linking (except M$VC,
1557
 
# which needs '.lib').
1558
 
libext=a
1559
 
ltmain="$ac_aux_dir/ltmain.sh"
1560
 
ofile="$default_ofile"
1561
 
with_gnu_ld="$lt_cv_prog_gnu_ld"
1562
 
need_locks="$enable_libtool_lock"
1563
 
 
1564
 
old_CC="$CC"
1565
 
old_CFLAGS="$CFLAGS"
1566
 
 
1567
 
# Set sane defaults for various variables
1568
 
test -z "$AR" && AR=ar
1569
 
test -z "$AR_FLAGS" && AR_FLAGS=cru
1570
 
test -z "$AS" && AS=as
1571
 
test -z "$CC" && CC=cc
1572
 
test -z "$DLLTOOL" && DLLTOOL=dlltool
1573
 
test -z "$LD" && LD=ld
1574
 
test -z "$LN_S" && LN_S="ln -s"
1575
 
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1576
 
test -z "$NM" && NM=nm
1577
 
test -z "$OBJDUMP" && OBJDUMP=objdump
1578
 
test -z "$RANLIB" && RANLIB=:
1579
 
test -z "$STRIP" && STRIP=:
1580
 
test -z "$ac_objext" && ac_objext=o
1581
 
 
1582
 
if test x"$host" != x"$build"; then
1583
 
  ac_tool_prefix=${host_alias}-
1584
 
else
1585
 
  ac_tool_prefix=
1586
 
fi
1587
 
 
1588
 
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1589
 
case $host_os in
1590
 
linux-gnu*) ;;
1591
 
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1592
 
esac
1593
 
 
1594
 
case $host_os in
1595
 
aix3*)
1596
 
  # AIX sometimes has problems with the GCC collect2 program.  For some
1597
 
  # reason, if we set the COLLECT_NAMES environment variable, the problems
1598
 
  # vanish in a puff of smoke.
1599
 
  if test "X${COLLECT_NAMES+set}" != Xset; then
1600
 
    COLLECT_NAMES=
1601
 
    export COLLECT_NAMES
1602
 
  fi
1603
 
  ;;
1604
 
esac
1605
 
 
1606
 
# Determine commands to create old-style static archives.
1607
 
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1608
 
old_postinstall_cmds='chmod 644 $oldlib'
1609
 
old_postuninstall_cmds=
1610
 
 
1611
 
if test -n "$RANLIB"; then
1612
 
  case $host_os in
1613
 
  openbsd*)
1614
 
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1615
 
    ;;
1616
 
  *)
1617
 
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1618
 
    ;;
1619
 
  esac
1620
 
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1621
 
fi
1622
 
 
1623
 
# Allow CC to be a program name with arguments.
1624
 
set dummy $CC
1625
 
compiler="[$]2"
1626
 
 
1627
 
AC_MSG_CHECKING([for objdir])
1628
 
rm -f .libs 2>/dev/null
1629
 
mkdir .libs 2>/dev/null
1630
 
if test -d .libs; then
1631
 
  objdir=.libs
1632
 
else
1633
 
  # MS-DOS does not allow filenames that begin with a dot.
1634
 
  objdir=_libs
1635
 
fi
1636
 
rmdir .libs 2>/dev/null
1637
 
AC_MSG_RESULT($objdir)
1638
 
 
1639
 
 
1640
 
AC_ARG_WITH(pic,
1641
 
[  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
1642
 
pic_mode="$withval", pic_mode=default)
1643
 
test -z "$pic_mode" && pic_mode=default
1644
 
 
1645
 
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1646
 
# in isolation, and that seeing it set (from the cache) indicates that
1647
 
# the associated values are set (in the cache) correctly too.
1648
 
AC_MSG_CHECKING([for $compiler option to produce PIC])
1649
 
AC_CACHE_VAL(lt_cv_prog_cc_pic,
1650
 
[ lt_cv_prog_cc_pic=
1651
 
  lt_cv_prog_cc_shlib=
1652
 
  lt_cv_prog_cc_wl=
1653
 
  lt_cv_prog_cc_static=
1654
 
  lt_cv_prog_cc_no_builtin=
1655
 
  lt_cv_prog_cc_can_build_shared=$can_build_shared
1656
 
 
1657
 
  if test "$GCC" = yes; then
1658
 
    lt_cv_prog_cc_wl='-Wl,'
1659
 
    lt_cv_prog_cc_static='-static'
1660
 
 
1661
 
    case $host_os in
1662
 
    aix*)
1663
 
      # Below there is a dirty hack to force normal static linking with -ldl
1664
 
      # The problem is because libdl dynamically linked with both libc and
1665
 
      # libC (AIX C++ library), which obviously doesn't included in libraries
1666
 
      # list by gcc. This cause undefined symbols with -static flags.
1667
 
      # This hack allows C programs to be linked with "-static -ldl", but
1668
 
      # not sure about C++ programs.
1669
 
      lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1670
 
      ;;
1671
 
    amigaos*)
1672
 
      # FIXME: we need at least 68020 code to build shared libraries, but
1673
 
      # adding the `-m68020' flag to GCC prevents building anything better,
1674
 
      # like `-m68040'.
1675
 
      lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1676
 
      ;;
1677
 
    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1678
 
      # PIC is the default for these OSes.
1679
 
      ;;
1680
 
    darwin* | rhapsody*)
1681
 
      # PIC is the default on this platform
1682
 
      # Common symbols not allowed in MH_DYLIB files
1683
 
      lt_cv_prog_cc_pic='-fno-common'
1684
 
      ;;
1685
 
    cygwin* | mingw* | pw32* | os2*)
1686
 
      # This hack is so that the source file can tell whether it is being
1687
 
      # built for inclusion in a dll (and should export symbols for example).
1688
 
      lt_cv_prog_cc_pic='-DDLL_EXPORT'
1689
 
      ;;
1690
 
    sysv4*MP*)
1691
 
      if test -d /usr/nec; then
1692
 
         lt_cv_prog_cc_pic=-Kconform_pic
1693
 
      fi
1694
 
      ;;
1695
 
    *)
1696
 
      lt_cv_prog_cc_pic='-fPIC'
1697
 
      ;;
1698
 
    esac
1699
 
  else
1700
 
    # PORTME Check for PIC flags for the system compiler.
1701
 
    case $host_os in
1702
 
    aix3* | aix4* | aix5*)
1703
 
      lt_cv_prog_cc_wl='-Wl,'
1704
 
      # All AIX code is PIC.
1705
 
      if test "$host_cpu" = ia64; then
1706
 
        # AIX 5 now supports IA64 processor
1707
 
        lt_cv_prog_cc_static='-Bstatic'
1708
 
      else
1709
 
        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1710
 
      fi
1711
 
      ;;
1712
 
 
1713
 
    hpux9* | hpux10* | hpux11*)
1714
 
      # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1715
 
      lt_cv_prog_cc_wl='-Wl,'
1716
 
      lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1717
 
      lt_cv_prog_cc_pic='+Z'
1718
 
      ;;
1719
 
 
1720
 
    irix5* | irix6*)
1721
 
      lt_cv_prog_cc_wl='-Wl,'
1722
 
      lt_cv_prog_cc_static='-non_shared'
1723
 
      # PIC (with -KPIC) is the default.
1724
 
      ;;
1725
 
 
1726
 
    cygwin* | mingw* | pw32* | os2*)
1727
 
      # This hack is so that the source file can tell whether it is being
1728
 
      # built for inclusion in a dll (and should export symbols for example).
1729
 
      lt_cv_prog_cc_pic='-DDLL_EXPORT'
1730
 
      ;;
1731
 
 
1732
 
    newsos6)
1733
 
      lt_cv_prog_cc_pic='-KPIC'
1734
 
      lt_cv_prog_cc_static='-Bstatic'
1735
 
      ;;
1736
 
 
1737
 
    osf3* | osf4* | osf5*)
1738
 
      # All OSF/1 code is PIC.
1739
 
      lt_cv_prog_cc_wl='-Wl,'
1740
 
      lt_cv_prog_cc_static='-non_shared'
1741
 
      ;;
1742
 
 
1743
 
    sco3.2v5*)
1744
 
      lt_cv_prog_cc_pic='-Kpic'
1745
 
      lt_cv_prog_cc_static='-dn'
1746
 
      lt_cv_prog_cc_shlib='-belf'
1747
 
      ;;
1748
 
 
1749
 
    solaris*)
1750
 
      lt_cv_prog_cc_pic='-KPIC'
1751
 
      lt_cv_prog_cc_static='-Bstatic'
1752
 
      lt_cv_prog_cc_wl='-Wl,'
1753
 
      ;;
1754
 
 
1755
 
    sunos4*)
1756
 
      lt_cv_prog_cc_pic='-PIC'
1757
 
      lt_cv_prog_cc_static='-Bstatic'
1758
 
      lt_cv_prog_cc_wl='-Qoption ld '
1759
 
      ;;
1760
 
 
1761
 
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1762
 
      lt_cv_prog_cc_pic='-KPIC'
1763
 
      lt_cv_prog_cc_static='-Bstatic'
1764
 
      if test "x$host_vendor" = xsni; then
1765
 
        lt_cv_prog_cc_wl='-LD'
1766
 
      else
1767
 
        lt_cv_prog_cc_wl='-Wl,'
1768
 
      fi
1769
 
      ;;
1770
 
 
1771
 
    uts4*)
1772
 
      lt_cv_prog_cc_pic='-pic'
1773
 
      lt_cv_prog_cc_static='-Bstatic'
1774
 
      ;;
1775
 
 
1776
 
    sysv4*MP*)
1777
 
      if test -d /usr/nec ;then
1778
 
        lt_cv_prog_cc_pic='-Kconform_pic'
1779
 
        lt_cv_prog_cc_static='-Bstatic'
1780
 
      fi
1781
 
      ;;
1782
 
 
1783
 
    *)
1784
 
      lt_cv_prog_cc_can_build_shared=no
1785
 
      ;;
1786
 
    esac
1787
 
  fi
1788
 
])
1789
 
if test -z "$lt_cv_prog_cc_pic"; then
1790
 
  AC_MSG_RESULT([none])
1791
 
else
1792
 
  AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1793
 
 
1794
 
  # Check to make sure the pic_flag actually works.
1795
 
  AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1796
 
  AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1797
 
    save_CFLAGS="$CFLAGS"
1798
 
    CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1799
 
    AC_TRY_COMPILE([], [], [dnl
1800
 
      case $host_os in
1801
 
      hpux9* | hpux10* | hpux11*)
1802
 
        # On HP-UX, both CC and GCC only warn that PIC is supported... then
1803
 
        # they create non-PIC objects.  So, if there were any warnings, we
1804
 
        # assume that PIC is not supported.
1805
 
        if test -s conftest.err; then
1806
 
          lt_cv_prog_cc_pic_works=no
1807
 
        else
1808
 
          lt_cv_prog_cc_pic_works=yes
1809
 
        fi
1810
 
        ;;
1811
 
      *)
1812
 
        lt_cv_prog_cc_pic_works=yes
1813
 
        ;;
1814
 
      esac
1815
 
    ], [dnl
1816
 
      lt_cv_prog_cc_pic_works=no
1817
 
    ])
1818
 
    CFLAGS="$save_CFLAGS"
1819
 
  ])
1820
 
 
1821
 
  if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1822
 
    lt_cv_prog_cc_pic=
1823
 
    lt_cv_prog_cc_can_build_shared=no
1824
 
  else
1825
 
    lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1826
 
  fi
1827
 
 
1828
 
  AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1829
 
fi
1830
 
 
1831
 
# Check for any special shared library compilation flags.
1832
 
if test -n "$lt_cv_prog_cc_shlib"; then
1833
 
  AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1834
 
  if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$lt_cv_prog_cc_shlib[[        ]]" >/dev/null; then :
1835
 
  else
1836
 
   AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1837
 
    lt_cv_prog_cc_can_build_shared=no
1838
 
  fi
1839
 
fi
1840
 
 
1841
 
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1842
 
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1843
 
  lt_cv_prog_cc_static_works=no
1844
 
  save_LDFLAGS="$LDFLAGS"
1845
 
  LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1846
 
  AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1847
 
  LDFLAGS="$save_LDFLAGS"
1848
 
])
1849
 
 
1850
 
# Belt *and* braces to stop my trousers falling down:
1851
 
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1852
 
AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1853
 
 
1854
 
pic_flag="$lt_cv_prog_cc_pic"
1855
 
special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1856
 
wl="$lt_cv_prog_cc_wl"
1857
 
link_static_flag="$lt_cv_prog_cc_static"
1858
 
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1859
 
can_build_shared="$lt_cv_prog_cc_can_build_shared"
1860
 
 
1861
 
 
1862
 
# Check to see if options -o and -c are simultaneously supported by compiler
1863
 
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1864
 
AC_CACHE_VAL([lt_cv_compiler_c_o], [
1865
 
$rm -r conftest 2>/dev/null
1866
 
mkdir conftest
1867
 
cd conftest
1868
 
echo "int some_variable = 0;" > conftest.$ac_ext
1869
 
mkdir out
1870
 
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1871
 
# that will create temporary files in the current directory regardless of
1872
 
# the output directory.  Thus, making CWD read-only will cause this test
1873
 
# to fail, enabling locking or at least warning the user not to do parallel
1874
 
# builds.
1875
 
chmod -w .
1876
 
save_CFLAGS="$CFLAGS"
1877
 
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1878
 
compiler_c_o=no
1879
 
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1880
 
  # The compiler can only warn and ignore the option if not recognized
1881
 
  # So say no if there are warnings
1882
 
  if test -s out/conftest.err; then
1883
 
    lt_cv_compiler_c_o=no
1884
 
  else
1885
 
    lt_cv_compiler_c_o=yes
1886
 
  fi
1887
 
else
1888
 
  # Append any errors to the config.log.
1889
 
  cat out/conftest.err 1>&AC_FD_CC
1890
 
  lt_cv_compiler_c_o=no
1891
 
fi
1892
 
CFLAGS="$save_CFLAGS"
1893
 
chmod u+w .
1894
 
$rm conftest* out/*
1895
 
rmdir out
1896
 
cd ..
1897
 
rmdir conftest
1898
 
$rm -r conftest 2>/dev/null
1899
 
])
1900
 
compiler_c_o=$lt_cv_compiler_c_o
1901
 
AC_MSG_RESULT([$compiler_c_o])
1902
 
 
1903
 
if test x"$compiler_c_o" = x"yes"; then
1904
 
  # Check to see if we can write to a .lo
1905
 
  AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1906
 
  AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1907
 
  lt_cv_compiler_o_lo=no
1908
 
  save_CFLAGS="$CFLAGS"
1909
 
  CFLAGS="$CFLAGS -c -o conftest.lo"
1910
 
  save_objext="$ac_objext"
1911
 
  ac_objext=lo
1912
 
  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1913
 
    # The compiler can only warn and ignore the option if not recognized
1914
 
    # So say no if there are warnings
1915
 
    if test -s conftest.err; then
1916
 
      lt_cv_compiler_o_lo=no
1917
 
    else
1918
 
      lt_cv_compiler_o_lo=yes
1919
 
    fi
1920
 
  ])
1921
 
  ac_objext="$save_objext"
1922
 
  CFLAGS="$save_CFLAGS"
1923
 
  ])
1924
 
  compiler_o_lo=$lt_cv_compiler_o_lo
1925
 
  AC_MSG_RESULT([$compiler_o_lo])
1926
 
else
1927
 
  compiler_o_lo=no
1928
 
fi
1929
 
 
 
2757
 
 
2758
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
 
2759
# ---------------------------------
 
2760
# Check to see if options -c and -o are simultaneously supported by compiler
 
2761
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
 
2762
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
2763
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
2764
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
2765
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
2766
   $rm -r conftest 2>/dev/null
 
2767
   mkdir conftest
 
2768
   cd conftest
 
2769
   mkdir out
 
2770
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
2771
 
 
2772
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
2773
   # Insert the option either (1) after the last *FLAGS variable, or
 
2774
   # (2) before a word containing "conftest.", or (3) at the end.
 
2775
   # Note that $ac_compile itself does not contain backslashes and begins
 
2776
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
2777
   lt_compile=`echo "$ac_compile" | $SED \
 
2778
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
2779
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
2780
   -e 's:$: $lt_compiler_flag:'`
 
2781
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
2782
   (eval "$lt_compile" 2>out/conftest.err)
 
2783
   ac_status=$?
 
2784
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
2785
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
2786
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
2787
   then
 
2788
     # The compiler can only warn and ignore the option if not recognized
 
2789
     # So say no if there are warnings
 
2790
     $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
 
2791
     $SED '/^$/d' out/conftest.err >out/conftest.er2
 
2792
     if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
 
2793
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
2794
     fi
 
2795
   fi
 
2796
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
 
2797
   $rm conftest*
 
2798
   # SGI C++ compiler will create directory out/ii_files/ for
 
2799
   # template instantiation
 
2800
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
 
2801
   $rm out/* && rmdir out
 
2802
   cd ..
 
2803
   rmdir conftest
 
2804
   $rm conftest*
 
2805
])
 
2806
])# AC_LIBTOOL_PROG_CC_C_O
 
2807
 
 
2808
 
 
2809
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
 
2810
# -----------------------------------------
1930
2811
# Check to see if we can do hard links to lock some files if needed
 
2812
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
 
2813
[AC_REQUIRE([_LT_AC_LOCK])dnl
 
2814
 
1931
2815
hard_links="nottested"
1932
 
if test "$compiler_c_o" = no && test "$need_locks" != no; then
 
2816
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1933
2817
  # do not overwrite the value of need_locks provided by the user
1934
2818
  AC_MSG_CHECKING([if we can lock with hard links])
1935
2819
  hard_links=yes
1940
2824
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1941
2825
  AC_MSG_RESULT([$hard_links])
1942
2826
  if test "$hard_links" = no; then
1943
 
    AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
 
2827
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1944
2828
    need_locks=warn
1945
2829
  fi
1946
2830
else
1947
2831
  need_locks=no
1948
2832
fi
1949
 
 
1950
 
if test "$GCC" = yes; then
1951
 
  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1952
 
  AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1953
 
  echo "int some_variable = 0;" > conftest.$ac_ext
1954
 
  save_CFLAGS="$CFLAGS"
1955
 
  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1956
 
  compiler_rtti_exceptions=no
1957
 
  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1958
 
    # The compiler can only warn and ignore the option if not recognized
1959
 
    # So say no if there are warnings
1960
 
    if test -s conftest.err; then
1961
 
      compiler_rtti_exceptions=no
1962
 
    else
1963
 
      compiler_rtti_exceptions=yes
1964
 
    fi
1965
 
  ])
1966
 
  CFLAGS="$save_CFLAGS"
1967
 
  AC_MSG_RESULT([$compiler_rtti_exceptions])
1968
 
 
1969
 
  if test "$compiler_rtti_exceptions" = "yes"; then
1970
 
    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1971
 
  else
1972
 
    no_builtin_flag=' -fno-builtin'
1973
 
  fi
1974
 
fi
1975
 
 
1976
 
# See if the linker supports building shared libraries.
1977
 
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1978
 
 
1979
 
allow_undefined_flag=
1980
 
no_undefined_flag=
1981
 
need_lib_prefix=unknown
1982
 
need_version=unknown
1983
 
# when you set need_version to no, make sure it does not cause -set_version
1984
 
# flags to be left without arguments
1985
 
archive_cmds=
1986
 
archive_expsym_cmds=
1987
 
old_archive_from_new_cmds=
1988
 
old_archive_from_expsyms_cmds=
1989
 
export_dynamic_flag_spec=
1990
 
whole_archive_flag_spec=
1991
 
thread_safe_flag_spec=
1992
 
hardcode_into_libs=no
1993
 
hardcode_libdir_flag_spec=
1994
 
hardcode_libdir_separator=
1995
 
hardcode_direct=no
1996
 
hardcode_minus_L=no
1997
 
hardcode_shlibpath_var=unsupported
1998
 
runpath_var=
1999
 
link_all_deplibs=unknown
2000
 
always_export_symbols=no
2001
 
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2002
 
# include_expsyms should be a list of space-separated symbols to be *always*
2003
 
# included in the symbol list
2004
 
include_expsyms=
2005
 
# exclude_expsyms can be an egrep regular expression of symbols to exclude
2006
 
# it will be wrapped by ` (' and `)$', so one must not match beginning or
2007
 
# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2008
 
# as well as any symbol that contains `d'.
2009
 
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2010
 
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2011
 
# platforms (ab)use it in PIC code, but their linkers get confused if
2012
 
# the symbol is explicitly referenced.  Since portable code cannot
2013
 
# rely on this symbol name, it's probably fine to never include it in
2014
 
# preloaded symbol tables.
2015
 
extract_expsyms_cmds=
2016
 
 
2017
 
case $host_os in
2018
 
cygwin* | mingw* | pw32*)
2019
 
  # FIXME: the MSVC++ port hasn't been tested in a loooong time
2020
 
  # When not using gcc, we currently assume that we are using
2021
 
  # Microsoft Visual C++.
2022
 
  if test "$GCC" != yes; then
2023
 
    with_gnu_ld=no
2024
 
  fi
2025
 
  ;;
2026
 
openbsd*)
2027
 
  with_gnu_ld=no
2028
 
  ;;
2029
 
esac
2030
 
 
2031
 
ld_shlibs=yes
2032
 
if test "$with_gnu_ld" = yes; then
2033
 
  # If archive_cmds runs LD, not CC, wlarc should be empty
2034
 
  wlarc='${wl}'
2035
 
 
2036
 
  # See if GNU ld supports shared libraries.
2037
 
  case $host_os in
2038
 
  aix3* | aix4* | aix5*)
2039
 
    # On AIX, the GNU linker is very broken
2040
 
    # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2041
 
    ld_shlibs=no
2042
 
    cat <<EOF 1>&2
2043
 
 
2044
 
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
2045
 
*** to be unable to reliably create shared libraries on AIX.
2046
 
*** Therefore, libtool is disabling shared libraries support.  If you
2047
 
*** really care for shared libraries, you may want to modify your PATH
2048
 
*** so that a non-GNU linker is found, and then restart.
2049
 
 
2050
 
EOF
2051
 
    ;;
2052
 
 
2053
 
  amigaos*)
2054
 
    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
2055
 
    hardcode_libdir_flag_spec='-L$libdir'
2056
 
    hardcode_minus_L=yes
2057
 
 
2058
 
    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2059
 
    # that the semantics of dynamic libraries on AmigaOS, at least up
2060
 
    # to version 4, is to share data among multiple programs linked
2061
 
    # with the same dynamic library.  Since this doesn't match the
2062
 
    # behavior of shared libraries on other platforms, we can use
2063
 
    # them.
2064
 
    ld_shlibs=no
2065
 
    ;;
2066
 
 
2067
 
  beos*)
2068
 
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2069
 
      allow_undefined_flag=unsupported
2070
 
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2071
 
      # support --undefined.  This deserves some investigation.  FIXME
2072
 
      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2073
 
    else
2074
 
      ld_shlibs=no
2075
 
    fi
2076
 
    ;;
2077
 
 
2078
 
  cygwin* | mingw* | pw32*)
2079
 
    # hardcode_libdir_flag_spec is actually meaningless, as there is
2080
 
    # no search path for DLLs.
2081
 
    hardcode_libdir_flag_spec='-L$libdir'
2082
 
    allow_undefined_flag=unsupported
2083
 
    always_export_symbols=yes
2084
 
 
2085
 
    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2086
 
      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2087
 
      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2088
 
      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2089
 
      else $CC -o impgen impgen.c ; fi)~
2090
 
      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2091
 
 
2092
 
    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2093
 
 
2094
 
    # cygwin and mingw dlls have different entry points and sets of symbols
2095
 
    # to exclude.
2096
 
    # FIXME: what about values for MSVC?
2097
 
    dll_entry=__cygwin_dll_entry@12
2098
 
    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2099
 
    case $host_os in
2100
 
    mingw*)
2101
 
      # mingw values
2102
 
      dll_entry=_DllMainCRTStartup@12
2103
 
      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2104
 
      ;;
2105
 
    esac
2106
 
 
2107
 
    # mingw and cygwin differ, and it's simplest to just exclude the union
2108
 
    # of the two symbol sets.
2109
 
    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2110
 
 
2111
 
    # recent cygwin and mingw systems supply a stub DllMain which the user
2112
 
    # can override, but on older systems we have to supply one (in ltdll.c)
2113
 
    if test "x$lt_cv_need_dllmain" = "xyes"; then
2114
 
      ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2115
 
      ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
2116
 
        test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2117
 
    else
2118
 
      ltdll_obj=
2119
 
      ltdll_cmds=
2120
 
    fi
2121
 
 
2122
 
    # Extract the symbol export list from an `--export-all' def file,
2123
 
    # then regenerate the def file from the symbol export list, so that
2124
 
    # the compiled dll only exports the symbol export list.
2125
 
    # Be careful not to strip the DATA tag left be newer dlltools.
2126
 
    export_symbols_cmds="$ltdll_cmds"'
2127
 
      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2128
 
      sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2129
 
 
2130
 
    # If the export-symbols file already is a .def file (1st line
2131
 
    # is EXPORTS), use it as is.
2132
 
    # If DATA tags from a recent dlltool are present, honour them!
2133
 
    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
2134
 
        cp $export_symbols $output_objdir/$soname-def;
2135
 
      else
2136
 
        echo EXPORTS > $output_objdir/$soname-def;
2137
 
        _lt_hint=1;
2138
 
        cat $export_symbols | while read symbol; do
2139
 
         set dummy \$symbol;
2140
 
         case \[$]# in
2141
 
           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2142
 
           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2143
 
         esac;
2144
 
         _lt_hint=`expr 1 + \$_lt_hint`;
2145
 
        done;
2146
 
      fi~
2147
 
      '"$ltdll_cmds"'
2148
 
      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2149
 
      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
2150
 
      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2151
 
      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
2152
 
      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2153
 
    ;;
2154
 
 
2155
 
  netbsd*)
2156
 
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2157
 
      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2158
 
      wlarc=
2159
 
    else
2160
 
      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2161
 
      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2162
 
    fi
2163
 
    ;;
2164
 
 
2165
 
  solaris* | sysv5*)
2166
 
    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2167
 
      ld_shlibs=no
2168
 
      cat <<EOF 1>&2
2169
 
 
2170
 
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
2171
 
*** create shared libraries on Solaris systems.  Therefore, libtool
2172
 
*** is disabling shared libraries support.  We urge you to upgrade GNU
2173
 
*** binutils to release 2.9.1 or newer.  Another option is to modify
2174
 
*** your PATH or compiler configuration so that the native linker is
2175
 
*** used, and then restart.
2176
 
 
2177
 
EOF
2178
 
    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2179
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2180
 
      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2181
 
    else
2182
 
      ld_shlibs=no
2183
 
    fi
2184
 
    ;;
2185
 
 
2186
 
  sunos4*)
2187
 
    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2188
 
    wlarc=
2189
 
    hardcode_direct=yes
2190
 
    hardcode_shlibpath_var=no
2191
 
    ;;
2192
 
 
2193
 
  *)
2194
 
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2195
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2196
 
      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2197
 
    else
2198
 
      ld_shlibs=no
2199
 
    fi
2200
 
    ;;
2201
 
  esac
2202
 
 
2203
 
  if test "$ld_shlibs" = yes; then
2204
 
    runpath_var=LD_RUN_PATH
2205
 
    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2206
 
    export_dynamic_flag_spec='${wl}--export-dynamic'
2207
 
    case $host_os in
2208
 
    cygwin* | mingw* | pw32*)
2209
 
      # dlltool doesn't understand --whole-archive et. al.
2210
 
      whole_archive_flag_spec=
2211
 
      ;;
2212
 
    *)
2213
 
      # ancient GNU ld didn't support --whole-archive et. al.
2214
 
      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2215
 
        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2216
 
      else
2217
 
        whole_archive_flag_spec=
2218
 
      fi
2219
 
      ;;
2220
 
    esac
2221
 
  fi
 
2833
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
2834
 
 
2835
 
 
2836
# AC_LIBTOOL_OBJDIR
 
2837
# -----------------
 
2838
AC_DEFUN([AC_LIBTOOL_OBJDIR],
 
2839
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
2840
[rm -f .libs 2>/dev/null
 
2841
mkdir .libs 2>/dev/null
 
2842
if test -d .libs; then
 
2843
  lt_cv_objdir=.libs
2222
2844
else
2223
 
  # PORTME fill in a description of your system's linker (not GNU ld)
2224
 
  case $host_os in
2225
 
  aix3*)
2226
 
    allow_undefined_flag=unsupported
2227
 
    always_export_symbols=yes
2228
 
    archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
2229
 
    # Note: this linker hardcodes the directories in LIBPATH if there
2230
 
    # are no directories specified by -L.
2231
 
    hardcode_minus_L=yes
2232
 
    if test "$GCC" = yes && test -z "$link_static_flag"; then
2233
 
      # Neither direct hardcoding nor static linking is supported with a
2234
 
      # broken collect2.
2235
 
      hardcode_direct=unsupported
2236
 
    fi
2237
 
    ;;
2238
 
 
2239
 
  aix4* | aix5*)
2240
 
    if test "$host_cpu" = ia64; then
2241
 
      # On IA64, the linker does run time linking by default, so we don't
2242
 
      # have to do anything special.
2243
 
      aix_use_runtimelinking=no
2244
 
      exp_sym_flag='-Bexport'
2245
 
      no_entry_flag=""
2246
 
    else
2247
 
      aix_use_runtimelinking=no
2248
 
 
2249
 
      # Test if we are trying to use run time linking or normal
2250
 
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2251
 
      # need to do runtime linking.
2252
 
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2253
 
        for ld_flag in $LDFLAGS; do
2254
 
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2255
 
            aix_use_runtimelinking=yes
2256
 
            break
2257
 
          fi
2258
 
        done
2259
 
      esac
2260
 
 
2261
 
      exp_sym_flag='-bexport'
2262
 
      no_entry_flag='-bnoentry'
2263
 
    fi
2264
 
 
2265
 
    # When large executables or shared objects are built, AIX ld can
2266
 
    # have problems creating the table of contents.  If linking a library
2267
 
    # or program results in "error TOC overflow" add -mminimal-toc to
2268
 
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2269
 
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2270
 
 
2271
 
    hardcode_direct=yes
2272
 
    archive_cmds=''
2273
 
    hardcode_libdir_separator=':'
2274
 
    if test "$GCC" = yes; then
2275
 
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2276
 
        collect2name=`${CC} -print-prog-name=collect2`
2277
 
        if test -f "$collect2name" && \
2278
 
          strings "$collect2name" | grep resolve_lib_name >/dev/null
2279
 
        then
2280
 
          # We have reworked collect2
2281
 
          hardcode_direct=yes
2282
 
        else
2283
 
          # We have old collect2
2284
 
          hardcode_direct=unsupported
2285
 
          # It fails to find uninstalled libraries when the uninstalled
2286
 
          # path is not listed in the libpath.  Setting hardcode_minus_L
2287
 
          # to unsupported forces relinking
2288
 
          hardcode_minus_L=yes
2289
 
          hardcode_libdir_flag_spec='-L$libdir'
2290
 
          hardcode_libdir_separator=
2291
 
        fi
2292
 
      esac
2293
 
 
2294
 
      shared_flag='-shared'
2295
 
    else
2296
 
      # not using gcc
2297
 
      if test "$host_cpu" = ia64; then
2298
 
        shared_flag='${wl}-G'
2299
 
      else
2300
 
        if test "$aix_use_runtimelinking" = yes; then
2301
 
          shared_flag='${wl}-G'
2302
 
        else
2303
 
          shared_flag='${wl}-bM:SRE'
2304
 
        fi
2305
 
      fi
2306
 
    fi
2307
 
 
2308
 
    # It seems that -bexpall can do strange things, so it is better to
2309
 
    # generate a list of symbols to export.
2310
 
    always_export_symbols=yes
2311
 
    if test "$aix_use_runtimelinking" = yes; then
2312
 
      # Warning - without using the other runtime loading flags (-brtl),
2313
 
      # -berok will link without error, but may produce a broken library.
2314
 
      allow_undefined_flag='-berok'
2315
 
      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2316
 
      archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2317
 
    else
2318
 
      if test "$host_cpu" = ia64; then
2319
 
        hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2320
 
        allow_undefined_flag="-z nodefs"
2321
 
        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2322
 
      else
2323
 
        hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2324
 
        # Warning - without using the other run time loading flags,
2325
 
        # -berok will link without error, but may produce a broken library.
2326
 
        allow_undefined_flag='${wl}-berok'
2327
 
        # This is a bit strange, but is similar to how AIX traditionally builds
2328
 
        # it's shared libraries.
2329
 
        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2330
 
      fi
2331
 
    fi
2332
 
    ;;
2333
 
 
2334
 
  amigaos*)
2335
 
    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
2336
 
    hardcode_libdir_flag_spec='-L$libdir'
2337
 
    hardcode_minus_L=yes
2338
 
    # see comment about different semantics on the GNU ld section
2339
 
    ld_shlibs=no
2340
 
    ;;
2341
 
 
2342
 
  cygwin* | mingw* | pw32*)
2343
 
    # When not using gcc, we currently assume that we are using
2344
 
    # Microsoft Visual C++.
2345
 
    # hardcode_libdir_flag_spec is actually meaningless, as there is
2346
 
    # no search path for DLLs.
2347
 
    hardcode_libdir_flag_spec=' '
2348
 
    allow_undefined_flag=unsupported
2349
 
    # Tell ltmain to make .lib files, not .a files.
2350
 
    libext=lib
2351
 
    # FIXME: Setting linknames here is a bad hack.
2352
 
    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2353
 
    # The linker will automatically build a .lib file if we build a DLL.
2354
 
    old_archive_from_new_cmds='true'
2355
 
    # FIXME: Should let the user specify the lib program.
2356
 
    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2357
 
    fix_srcfile_path='`cygpath -w "$srcfile"`'
2358
 
    ;;
2359
 
 
2360
 
  darwin* | rhapsody*)
2361
 
    case "$host_os" in
2362
 
    rhapsody* | darwin1.[[012]])
2363
 
      allow_undefined_flag='-undefined suppress'
2364
 
      ;;
2365
 
    *) # Darwin 1.3 on
2366
 
      allow_undefined_flag='-flat_namespace -undefined suppress'
2367
 
      ;;
2368
 
    esac
2369
 
    # FIXME: Relying on posixy $() will cause problems for
2370
 
    #        cross-compilation, but unfortunately the echo tests do not
2371
 
    #        yet detect zsh echo's removal of \ escapes.
2372
 
    archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
2373
 
    # We need to add '_' to the symbols in $export_symbols first
2374
 
    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2375
 
    hardcode_direct=yes
2376
 
    hardcode_shlibpath_var=no
2377
 
    whole_archive_flag_spec='-all_load $convenience'
2378
 
    ;;
2379
 
 
2380
 
  freebsd1*)
2381
 
    ld_shlibs=no
2382
 
    ;;
2383
 
 
2384
 
  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2385
 
  # support.  Future versions do this automatically, but an explicit c++rt0.o
2386
 
  # does not break anything, and helps significantly (at the cost of a little
2387
 
  # extra space).
2388
 
  freebsd2.2*)
2389
 
    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2390
 
    hardcode_libdir_flag_spec='-R$libdir'
2391
 
    hardcode_direct=yes
2392
 
    hardcode_shlibpath_var=no
2393
 
    ;;
2394
 
 
2395
 
  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2396
 
  freebsd2*)
2397
 
    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2398
 
    hardcode_direct=yes
2399
 
    hardcode_minus_L=yes
2400
 
    hardcode_shlibpath_var=no
2401
 
    ;;
2402
 
 
2403
 
  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2404
 
  freebsd*)
2405
 
    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2406
 
    hardcode_libdir_flag_spec='-R$libdir'
2407
 
    hardcode_direct=yes
2408
 
    hardcode_shlibpath_var=no
2409
 
    ;;
2410
 
 
2411
 
  hpux9* | hpux10* | hpux11*)
2412
 
    case $host_os in
2413
 
    hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
2414
 
    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2415
 
    esac
2416
 
    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2417
 
    hardcode_libdir_separator=:
2418
 
    hardcode_direct=yes
2419
 
    hardcode_minus_L=yes # Not in the search PATH, but as the default
2420
 
                         # location of the library.
2421
 
    export_dynamic_flag_spec='${wl}-E'
2422
 
    ;;
2423
 
 
2424
 
  irix5* | irix6*)
2425
 
    if test "$GCC" = yes; then
2426
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2427
 
    else
2428
 
      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2429
 
    fi
2430
 
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2431
 
    hardcode_libdir_separator=:
2432
 
    link_all_deplibs=yes
2433
 
    ;;
2434
 
 
2435
 
  netbsd*)
2436
 
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2437
 
      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
2438
 
    else
2439
 
      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
2440
 
    fi
2441
 
    hardcode_libdir_flag_spec='-R$libdir'
2442
 
    hardcode_direct=yes
2443
 
    hardcode_shlibpath_var=no
2444
 
    ;;
2445
 
 
2446
 
  newsos6)
2447
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2448
 
    hardcode_direct=yes
2449
 
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2450
 
    hardcode_libdir_separator=:
2451
 
    hardcode_shlibpath_var=no
2452
 
    ;;
2453
 
 
2454
 
  openbsd*)
2455
 
    hardcode_direct=yes
2456
 
    hardcode_shlibpath_var=no
2457
 
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2458
 
      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2459
 
      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2460
 
      export_dynamic_flag_spec='${wl}-E'
2461
 
    else
2462
 
      case "$host_os" in
2463
 
      openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2464
 
        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2465
 
        hardcode_libdir_flag_spec='-R$libdir'
2466
 
        ;;
2467
 
      *)
2468
 
        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2469
 
        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2470
 
        ;;
2471
 
      esac
2472
 
    fi
2473
 
    ;;
2474
 
 
2475
 
  os2*)
2476
 
    hardcode_libdir_flag_spec='-L$libdir'
2477
 
    hardcode_minus_L=yes
2478
 
    allow_undefined_flag=unsupported
2479
 
    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
2480
 
    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2481
 
    ;;
2482
 
 
2483
 
  osf3*)
2484
 
    if test "$GCC" = yes; then
2485
 
      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2486
 
      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2487
 
    else
2488
 
      allow_undefined_flag=' -expect_unresolved \*'
2489
 
      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2490
 
    fi
2491
 
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2492
 
    hardcode_libdir_separator=:
2493
 
    ;;
2494
 
 
2495
 
  osf4* | osf5*)        # as osf3* with the addition of -msym flag
2496
 
    if test "$GCC" = yes; then
2497
 
      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2498
 
      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2499
 
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2500
 
    else
2501
 
      allow_undefined_flag=' -expect_unresolved \*'
2502
 
      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2503
 
      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2504
 
      $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
2505
 
 
2506
 
      #Both c and cxx compiler support -rpath directly
2507
 
      hardcode_libdir_flag_spec='-rpath $libdir'
2508
 
    fi
2509
 
    hardcode_libdir_separator=:
2510
 
    ;;
2511
 
 
2512
 
  sco3.2v5*)
2513
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2514
 
    hardcode_shlibpath_var=no
2515
 
    runpath_var=LD_RUN_PATH
2516
 
    hardcode_runpath_var=yes
2517
 
    export_dynamic_flag_spec='${wl}-Bexport'
2518
 
    ;;
2519
 
 
2520
 
  solaris*)
2521
 
    # gcc --version < 3.0 without binutils cannot create self contained
2522
 
    # shared libraries reliably, requiring libgcc.a to resolve some of
2523
 
    # the object symbols generated in some cases.  Libraries that use
2524
 
    # assert need libgcc.a to resolve __eprintf, for example.  Linking
2525
 
    # a copy of libgcc.a into every shared library to guarantee resolving
2526
 
    # such symbols causes other problems:  According to Tim Van Holder
2527
 
    # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2528
 
    # (to the application) exception stack for one thing.
2529
 
    no_undefined_flag=' -z defs'
2530
 
    if test "$GCC" = yes; then
2531
 
      case `$CC --version 2>/dev/null` in
2532
 
      [[12]].*)
2533
 
        cat <<EOF 1>&2
2534
 
 
2535
 
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2536
 
*** create self contained shared libraries on Solaris systems, without
2537
 
*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
2538
 
*** -no-undefined support, which will at least allow you to build shared
2539
 
*** libraries.  However, you may find that when you link such libraries
2540
 
*** into an application without using GCC, you have to manually add
2541
 
*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
2542
 
*** upgrade to a newer version of GCC.  Another option is to rebuild your
2543
 
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2544
 
 
2545
 
EOF
2546
 
        no_undefined_flag=
2547
 
        ;;
2548
 
      esac
2549
 
    fi
2550
 
    # $CC -shared without GNU ld will not create a library from C++
2551
 
    # object files and a static libstdc++, better avoid it by now
2552
 
    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2553
 
    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2554
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2555
 
    hardcode_libdir_flag_spec='-R$libdir'
2556
 
    hardcode_shlibpath_var=no
2557
 
    case $host_os in
2558
 
    solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2559
 
    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2560
 
      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2561
 
    esac
2562
 
    link_all_deplibs=yes
2563
 
    ;;
2564
 
 
2565
 
  sunos4*)
2566
 
    if test "x$host_vendor" = xsequent; then
2567
 
      # Use $CC to link under sequent, because it throws in some extra .o
2568
 
      # files that make .init and .fini sections work.
2569
 
      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2570
 
    else
2571
 
      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2572
 
    fi
2573
 
    hardcode_libdir_flag_spec='-L$libdir'
2574
 
    hardcode_direct=yes
2575
 
    hardcode_minus_L=yes
2576
 
    hardcode_shlibpath_var=no
2577
 
    ;;
2578
 
 
2579
 
  sysv4)
2580
 
    if test "x$host_vendor" = xsno; then
2581
 
      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2582
 
      hardcode_direct=yes # is this really true???
2583
 
    else
2584
 
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2585
 
      hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2586
 
    fi
2587
 
    runpath_var='LD_RUN_PATH'
2588
 
    hardcode_shlibpath_var=no
2589
 
    ;;
2590
 
 
2591
 
  sysv4.3*)
2592
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2593
 
    hardcode_shlibpath_var=no
2594
 
    export_dynamic_flag_spec='-Bexport'
2595
 
    ;;
2596
 
 
2597
 
  sysv5*)
2598
 
    no_undefined_flag=' -z text'
2599
 
    # $CC -shared without GNU ld will not create a library from C++
2600
 
    # object files and a static libstdc++, better avoid it by now
2601
 
    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2602
 
    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2603
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2604
 
    hardcode_libdir_flag_spec=
2605
 
    hardcode_shlibpath_var=no
2606
 
    runpath_var='LD_RUN_PATH'
2607
 
    ;;
2608
 
 
2609
 
  uts4*)
2610
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2611
 
    hardcode_libdir_flag_spec='-L$libdir'
2612
 
    hardcode_shlibpath_var=no
2613
 
    ;;
2614
 
 
2615
 
  dgux*)
2616
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2617
 
    hardcode_libdir_flag_spec='-L$libdir'
2618
 
    hardcode_shlibpath_var=no
2619
 
    ;;
2620
 
 
2621
 
  sysv4*MP*)
2622
 
    if test -d /usr/nec; then
2623
 
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2624
 
      hardcode_shlibpath_var=no
2625
 
      runpath_var=LD_RUN_PATH
2626
 
      hardcode_runpath_var=yes
2627
 
      ld_shlibs=yes
2628
 
    fi
2629
 
    ;;
2630
 
 
2631
 
  sysv4.2uw2*)
2632
 
    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2633
 
    hardcode_direct=yes
2634
 
    hardcode_minus_L=no
2635
 
    hardcode_shlibpath_var=no
2636
 
    hardcode_runpath_var=yes
2637
 
    runpath_var=LD_RUN_PATH
2638
 
    ;;
2639
 
 
2640
 
  sysv5uw7* | unixware7*)
2641
 
    no_undefined_flag='${wl}-z ${wl}text'
2642
 
    if test "$GCC" = yes; then
2643
 
      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2644
 
    else
2645
 
      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2646
 
    fi
2647
 
    runpath_var='LD_RUN_PATH'
2648
 
    hardcode_shlibpath_var=no
2649
 
    ;;
2650
 
 
2651
 
  *)
2652
 
    ld_shlibs=no
2653
 
    ;;
2654
 
  esac
 
2845
  # MS-DOS does not allow filenames that begin with a dot.
 
2846
  lt_cv_objdir=_libs
2655
2847
fi
2656
 
AC_MSG_RESULT([$ld_shlibs])
2657
 
test "$ld_shlibs" = no && can_build_shared=no
2658
 
 
 
2848
rmdir .libs 2>/dev/null])
 
2849
objdir=$lt_cv_objdir
 
2850
])# AC_LIBTOOL_OBJDIR
 
2851
 
 
2852
 
 
2853
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
 
2854
# ----------------------------------------------
2659
2855
# Check hardcoding attributes.
2660
 
AC_MSG_CHECKING([how to hardcode library paths into programs])
2661
 
hardcode_action=
2662
 
if test -n "$hardcode_libdir_flag_spec" || \
2663
 
   test -n "$runpath_var"; then
 
2856
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
 
2857
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
2858
_LT_AC_TAGVAR(hardcode_action, $1)=
 
2859
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
 
2860
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
 
2861
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2664
2862
 
2665
2863
  # We can hardcode non-existant directories.
2666
 
  if test "$hardcode_direct" != no &&
 
2864
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2667
2865
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2668
2866
     # have to relink, otherwise we might link with an installed library
2669
2867
     # when we should be linking with a yet-to-be-installed one
2670
 
     ## test "$hardcode_shlibpath_var" != no &&
2671
 
     test "$hardcode_minus_L" != no; then
 
2868
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
2869
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2672
2870
    # Linking always hardcodes the temporary library directory.
2673
 
    hardcode_action=relink
 
2871
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2674
2872
  else
2675
2873
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2676
 
    hardcode_action=immediate
 
2874
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2677
2875
  fi
2678
2876
else
2679
2877
  # We cannot hardcode anything, or else we can only hardcode existing
2680
2878
  # directories.
2681
 
  hardcode_action=unsupported
2682
 
fi
2683
 
AC_MSG_RESULT([$hardcode_action])
2684
 
 
2685
 
striplib=
 
2879
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 
2880
fi
 
2881
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
2882
 
 
2883
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
 
2884
  # Fast installation is not supported
 
2885
  enable_fast_install=no
 
2886
elif test "$shlibpath_overrides_runpath" = yes ||
 
2887
     test "$enable_shared" = no; then
 
2888
  # Fast installation is not necessary
 
2889
  enable_fast_install=needless
 
2890
fi
 
2891
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
2892
 
 
2893
 
 
2894
# AC_LIBTOOL_SYS_LIB_STRIP
 
2895
# ------------------------
 
2896
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
 
2897
[striplib=
2686
2898
old_striplib=
2687
2899
AC_MSG_CHECKING([whether stripping libraries is possible])
2688
2900
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2690
2902
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2691
2903
  AC_MSG_RESULT([yes])
2692
2904
else
2693
 
  AC_MSG_RESULT([no])
2694
 
fi
2695
 
 
2696
 
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2697
 
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2698
 
 
 
2905
# FIXME - insert some real tests, host_os isn't really good enough
 
2906
  case $host_os in
 
2907
   darwin*)
 
2908
       if test -n "$STRIP" ; then
 
2909
         striplib="$STRIP -x"
 
2910
         AC_MSG_RESULT([yes])
 
2911
       else
 
2912
  AC_MSG_RESULT([no])
 
2913
fi
 
2914
       ;;
 
2915
   *)
 
2916
  AC_MSG_RESULT([no])
 
2917
    ;;
 
2918
  esac
 
2919
fi
 
2920
])# AC_LIBTOOL_SYS_LIB_STRIP
 
2921
 
 
2922
 
 
2923
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
2924
# -----------------------------
2699
2925
# PORTME Fill in your ld.so characteristics
2700
 
AC_MSG_CHECKING([dynamic linker characteristics])
 
2926
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 
2927
[AC_MSG_CHECKING([dynamic linker characteristics])
2701
2928
library_names_spec=
2702
2929
libname_spec='lib$name'
2703
2930
soname_spec=
 
2931
shrext_cmds=".so"
2704
2932
postinstall_cmds=
2705
2933
postuninstall_cmds=
2706
2934
finish_cmds=
2710
2938
version_type=none
2711
2939
dynamic_linker="$host_os ld.so"
2712
2940
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2713
 
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
2941
if test "$GCC" = yes; then
 
2942
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
2943
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
 
2944
    # if the path contains ";" then we assume it to be the separator
 
2945
    # otherwise default to the standard path separator (i.e. ":") - it is
 
2946
    # assumed that no part of a normal pathname contains ";" but that should
 
2947
    # okay in the real world where ";" in dirpaths is itself problematic.
 
2948
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
2949
  else
 
2950
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
2951
  fi
 
2952
else
 
2953
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
2954
fi
 
2955
need_lib_prefix=unknown
 
2956
hardcode_into_libs=no
 
2957
 
 
2958
# when you set need_version to no, make sure it does not cause -set_version
 
2959
# flags to be left without arguments
 
2960
need_version=unknown
2714
2961
 
2715
2962
case $host_os in
2716
2963
aix3*)
2717
2964
  version_type=linux
2718
 
  library_names_spec='${libname}${release}.so$versuffix $libname.a'
 
2965
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2719
2966
  shlibpath_var=LIBPATH
2720
2967
 
2721
 
  # AIX has no versioning support, so we append a major version to the name.
2722
 
  soname_spec='${libname}${release}.so$major'
 
2968
  # AIX 3 has no versioning support, so we append a major version to the name.
 
2969
  soname_spec='${libname}${release}${shared_ext}$major'
2723
2970
  ;;
2724
2971
 
2725
2972
aix4* | aix5*)
2726
2973
  version_type=linux
 
2974
  need_lib_prefix=no
 
2975
  need_version=no
 
2976
  hardcode_into_libs=yes
2727
2977
  if test "$host_cpu" = ia64; then
2728
2978
    # AIX 5 supports IA64
2729
 
    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
 
2979
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2730
2980
    shlibpath_var=LD_LIBRARY_PATH
2731
2981
  else
2732
2982
    # With GCC up to 2.95.x, collect2 would create an import file
2736
2986
    # development snapshots of GCC prior to 3.0.
2737
2987
    case $host_os in
2738
2988
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2739
 
        if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2740
 
             echo ' yes '
2741
 
             echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2742
 
          :
2743
 
        else
2744
 
          can_build_shared=no
2745
 
        fi
2746
 
        ;;
 
2989
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
2990
           echo ' yes '
 
2991
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 
2992
        :
 
2993
      else
 
2994
        can_build_shared=no
 
2995
      fi
 
2996
      ;;
2747
2997
    esac
2748
 
    # AIX (on Power*) has no versioning support, so currently we can
2749
 
    # not hardcode correct soname into executable. Probably we can
2750
 
    # add versioning support to collect2, so additional links can
2751
 
    # be useful in future.
 
2998
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
2999
    # soname into executable. Probably we can add versioning support to
 
3000
    # collect2, so additional links can be useful in future.
2752
3001
    if test "$aix_use_runtimelinking" = yes; then
2753
3002
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2754
3003
      # instead of lib<name>.a to let people know that these are not
2755
3004
      # typical AIX shared libraries.
2756
 
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
3005
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2757
3006
    else
2758
3007
      # We preserve .a as extension for shared libraries through AIX4.2
2759
3008
      # and later when we are not doing run time linking.
2760
3009
      library_names_spec='${libname}${release}.a $libname.a'
2761
 
      soname_spec='${libname}${release}.so$major'
 
3010
      soname_spec='${libname}${release}${shared_ext}$major'
2762
3011
    fi
2763
3012
    shlibpath_var=LIBPATH
2764
3013
  fi
2767
3016
amigaos*)
2768
3017
  library_names_spec='$libname.ixlibrary $libname.a'
2769
3018
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2770
 
  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
 
3019
  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2771
3020
  ;;
2772
3021
 
2773
3022
beos*)
2774
 
  library_names_spec='${libname}.so'
 
3023
  library_names_spec='${libname}${shared_ext}'
2775
3024
  dynamic_linker="$host_os ld.so"
2776
3025
  shlibpath_var=LIBRARY_PATH
2777
3026
  ;;
2778
3027
 
2779
 
bsdi4*)
 
3028
bsdi[[45]]*)
2780
3029
  version_type=linux
2781
3030
  need_version=no
2782
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2783
 
  soname_spec='${libname}${release}.so$major'
 
3031
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3032
  soname_spec='${libname}${release}${shared_ext}$major'
2784
3033
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2785
3034
  shlibpath_var=LD_LIBRARY_PATH
2786
3035
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2787
3036
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2788
 
  export_dynamic_flag_spec=-rdynamic
2789
3037
  # the default ld.so.conf also contains /usr/contrib/lib and
2790
3038
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2791
3039
  # libtool to hard-code these into programs
2793
3041
 
2794
3042
cygwin* | mingw* | pw32*)
2795
3043
  version_type=windows
 
3044
  shrext_cmds=".dll"
2796
3045
  need_version=no
2797
3046
  need_lib_prefix=no
 
3047
 
2798
3048
  case $GCC,$host_os in
2799
 
  yes,cygwin*)
 
3049
  yes,cygwin* | yes,mingw* | yes,pw32*)
2800
3050
    library_names_spec='$libname.dll.a'
2801
 
    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2802
 
    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
 
3051
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
3052
    postinstall_cmds='base_file=`basename \${file}`~
 
3053
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2803
3054
      dldir=$destdir/`dirname \$dlpath`~
2804
3055
      test -d \$dldir || mkdir -p \$dldir~
2805
 
      $install_prog .libs/$dlname \$dldir/$dlname'
2806
 
    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
3056
      $install_prog $dir/$dlname \$dldir/$dlname~
 
3057
      chmod a+x \$dldir/$dlname'
 
3058
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2807
3059
      dlpath=$dir/\$dldll~
2808
3060
       $rm \$dlpath'
2809
 
    ;;
2810
 
  yes,mingw*)
2811
 
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2812
 
    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2813
 
    ;;
2814
 
  yes,pw32*)
2815
 
    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2816
 
    ;;
 
3061
    shlibpath_overrides_runpath=yes
 
3062
 
 
3063
    case $host_os in
 
3064
    cygwin*)
 
3065
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
3066
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
3067
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
3068
      ;;
 
3069
    mingw*)
 
3070
      # MinGW DLLs use traditional 'lib' prefix
 
3071
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
3072
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
3073
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
 
3074
        # It is most probably a Windows format PATH printed by
 
3075
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
3076
        # path with ; separators, and with drive letters. We can handle the
 
3077
        # drive letters (cygwin fileutils understands them), so leave them,
 
3078
        # especially as we might pass files found there to a mingw objdump,
 
3079
        # which wouldn't understand a cygwinified path. Ahh.
 
3080
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
3081
      else
 
3082
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
3083
      fi
 
3084
      ;;
 
3085
    pw32*)
 
3086
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
3087
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
3088
      ;;
 
3089
    esac
 
3090
    ;;
 
3091
 
2817
3092
  *)
2818
 
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
 
3093
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2819
3094
    ;;
2820
3095
  esac
2821
3096
  dynamic_linker='Win32 ld.exe'
2828
3103
  version_type=darwin
2829
3104
  need_lib_prefix=no
2830
3105
  need_version=no
2831
 
  # FIXME: Relying on posixy $() will cause problems for
2832
 
  #        cross-compilation, but unfortunately the echo tests do not
2833
 
  #        yet detect zsh echo's removal of \ escapes.
2834
 
  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
2835
 
  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
 
3106
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
3107
  soname_spec='${libname}${release}${major}$shared_ext'
2836
3108
  shlibpath_overrides_runpath=yes
2837
3109
  shlibpath_var=DYLD_LIBRARY_PATH
 
3110
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 
3111
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
 
3112
  if test "$GCC" = yes; then
 
3113
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
 
3114
  else
 
3115
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
 
3116
  fi
 
3117
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
3118
  ;;
 
3119
 
 
3120
dgux*)
 
3121
  version_type=linux
 
3122
  need_lib_prefix=no
 
3123
  need_version=no
 
3124
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
3125
  soname_spec='${libname}${release}${shared_ext}$major'
 
3126
  shlibpath_var=LD_LIBRARY_PATH
2838
3127
  ;;
2839
3128
 
2840
3129
freebsd1*)
2841
3130
  dynamic_linker=no
2842
3131
  ;;
2843
3132
 
2844
 
freebsd*)
2845
 
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
3133
kfreebsd*-gnu)
 
3134
  version_type=linux
 
3135
  need_lib_prefix=no
 
3136
  need_version=no
 
3137
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
3138
  soname_spec='${libname}${release}${shared_ext}$major'
 
3139
  shlibpath_var=LD_LIBRARY_PATH
 
3140
  shlibpath_overrides_runpath=no
 
3141
  hardcode_into_libs=yes
 
3142
  dynamic_linker='GNU ld.so'
 
3143
  ;;
 
3144
 
 
3145
freebsd* | dragonfly*)
 
3146
  # DragonFly does not have aout.  When/if they implement a new
 
3147
  # versioning mechanism, adjust this.
 
3148
  if test -x /usr/bin/objformat; then
 
3149
    objformat=`/usr/bin/objformat`
 
3150
  else
 
3151
    case $host_os in
 
3152
    freebsd[[123]]*) objformat=aout ;;
 
3153
    *) objformat=elf ;;
 
3154
    esac
 
3155
  fi
2846
3156
  version_type=freebsd-$objformat
2847
3157
  case $version_type in
2848
3158
    freebsd-elf*)
2849
 
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
3159
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2850
3160
      need_version=no
2851
3161
      need_lib_prefix=no
2852
3162
      ;;
2853
3163
    freebsd-*)
2854
 
      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
 
3164
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2855
3165
      need_version=yes
2856
3166
      ;;
2857
3167
  esac
2860
3170
  freebsd2*)
2861
3171
    shlibpath_overrides_runpath=yes
2862
3172
    ;;
2863
 
  *)
 
3173
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
 
3174
    shlibpath_overrides_runpath=yes
 
3175
    hardcode_into_libs=yes
 
3176
    ;;
 
3177
  *) # from 3.2 on
2864
3178
    shlibpath_overrides_runpath=no
2865
3179
    hardcode_into_libs=yes
2866
3180
    ;;
2871
3185
  version_type=linux
2872
3186
  need_lib_prefix=no
2873
3187
  need_version=no
2874
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2875
 
  soname_spec='${libname}${release}.so$major'
 
3188
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
3189
  soname_spec='${libname}${release}${shared_ext}$major'
2876
3190
  shlibpath_var=LD_LIBRARY_PATH
2877
3191
  hardcode_into_libs=yes
2878
3192
  ;;
2880
3194
hpux9* | hpux10* | hpux11*)
2881
3195
  # Give a soname corresponding to the major version so that dld.sl refuses to
2882
3196
  # link against other versions.
2883
 
  dynamic_linker="$host_os dld.sl"
2884
3197
  version_type=sunos
2885
3198
  need_lib_prefix=no
2886
3199
  need_version=no
2887
 
  shlibpath_var=SHLIB_PATH
2888
 
  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2889
 
  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2890
 
  soname_spec='${libname}${release}.sl$major'
 
3200
  case $host_cpu in
 
3201
  ia64*)
 
3202
    shrext_cmds='.so'
 
3203
    hardcode_into_libs=yes
 
3204
    dynamic_linker="$host_os dld.so"
 
3205
    shlibpath_var=LD_LIBRARY_PATH
 
3206
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
3207
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3208
    soname_spec='${libname}${release}${shared_ext}$major'
 
3209
    if test "X$HPUX_IA64_MODE" = X32; then
 
3210
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
3211
    else
 
3212
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
3213
    fi
 
3214
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
3215
    ;;
 
3216
   hppa*64*)
 
3217
     shrext_cmds='.sl'
 
3218
     hardcode_into_libs=yes
 
3219
     dynamic_linker="$host_os dld.sl"
 
3220
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
3221
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
3222
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3223
     soname_spec='${libname}${release}${shared_ext}$major'
 
3224
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
3225
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
3226
     ;;
 
3227
   *)
 
3228
    shrext_cmds='.sl'
 
3229
    dynamic_linker="$host_os dld.sl"
 
3230
    shlibpath_var=SHLIB_PATH
 
3231
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
3232
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3233
    soname_spec='${libname}${release}${shared_ext}$major'
 
3234
    ;;
 
3235
  esac
2891
3236
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2892
3237
  postinstall_cmds='chmod 555 $lib'
2893
3238
  ;;
2894
3239
 
2895
 
irix5* | irix6*)
2896
 
  version_type=irix
 
3240
irix5* | irix6* | nonstopux*)
 
3241
  case $host_os in
 
3242
    nonstopux*) version_type=nonstopux ;;
 
3243
    *)
 
3244
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
3245
                version_type=linux
 
3246
        else
 
3247
                version_type=irix
 
3248
        fi ;;
 
3249
  esac
2897
3250
  need_lib_prefix=no
2898
3251
  need_version=no
2899
 
  soname_spec='${libname}${release}.so$major'
2900
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
 
3252
  soname_spec='${libname}${release}${shared_ext}$major'
 
3253
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2901
3254
  case $host_os in
2902
 
  irix5*)
 
3255
  irix5* | nonstopux*)
2903
3256
    libsuff= shlibsuff=
2904
3257
    ;;
2905
3258
  *)
2906
3259
    case $LD in # libtool.m4 will add one of these switches to LD
2907
 
    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2908
 
    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2909
 
    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
3260
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
3261
      libsuff= shlibsuff= libmagic=32-bit;;
 
3262
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
3263
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
3264
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
3265
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2910
3266
    *) libsuff= shlibsuff= libmagic=never-match;;
2911
3267
    esac
2912
3268
    ;;
2915
3271
  shlibpath_overrides_runpath=no
2916
3272
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2917
3273
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
3274
  hardcode_into_libs=yes
2918
3275
  ;;
2919
3276
 
2920
3277
# No shared lib support for Linux oldld, aout, or coff.
2921
 
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
 
3278
linux*oldld* | linux*aout* | linux*coff*)
2922
3279
  dynamic_linker=no
2923
3280
  ;;
2924
3281
 
2925
3282
# This must be Linux ELF.
2926
 
linux-gnu*)
 
3283
linux*)
2927
3284
  version_type=linux
2928
3285
  need_lib_prefix=no
2929
3286
  need_version=no
2930
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2931
 
  soname_spec='${libname}${release}.so$major'
 
3287
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3288
  soname_spec='${libname}${release}${shared_ext}$major'
2932
3289
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2933
3290
  shlibpath_var=LD_LIBRARY_PATH
2934
3291
  shlibpath_overrides_runpath=no
2937
3294
  # before this can be enabled.
2938
3295
  hardcode_into_libs=yes
2939
3296
 
 
3297
  # Append ld.so.conf contents to the search path
 
3298
  if test -f /etc/ld.so.conf; then
 
3299
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,    ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
 
3300
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
3301
  fi
 
3302
 
2940
3303
  # We used to test for /lib/ld.so.1 and disable shared libraries on
2941
3304
  # powerpc, because MkLinux only supported shared libraries with the
2942
3305
  # GNU dynamic linker.  Since this was broken with cross compilers,
2946
3309
  dynamic_linker='GNU/Linux ld.so'
2947
3310
  ;;
2948
3311
 
 
3312
netbsdelf*-gnu)
 
3313
  version_type=linux
 
3314
  need_lib_prefix=no
 
3315
  need_version=no
 
3316
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
3317
  soname_spec='${libname}${release}${shared_ext}$major'
 
3318
  shlibpath_var=LD_LIBRARY_PATH
 
3319
  shlibpath_overrides_runpath=no
 
3320
  hardcode_into_libs=yes
 
3321
  dynamic_linker='NetBSD ld.elf_so'
 
3322
  ;;
 
3323
 
 
3324
knetbsd*-gnu)
 
3325
  version_type=linux
 
3326
  need_lib_prefix=no
 
3327
  need_version=no
 
3328
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
3329
  soname_spec='${libname}${release}${shared_ext}$major'
 
3330
  shlibpath_var=LD_LIBRARY_PATH
 
3331
  shlibpath_overrides_runpath=no
 
3332
  hardcode_into_libs=yes
 
3333
  dynamic_linker='GNU ld.so'
 
3334
  ;;
 
3335
 
2949
3336
netbsd*)
2950
3337
  version_type=sunos
2951
3338
  need_lib_prefix=no
2952
3339
  need_version=no
2953
3340
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2954
 
    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
3341
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2955
3342
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2956
3343
    dynamic_linker='NetBSD (a.out) ld.so'
2957
3344
  else
2958
 
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2959
 
    soname_spec='${libname}${release}.so$major'
 
3345
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
3346
    soname_spec='${libname}${release}${shared_ext}$major'
2960
3347
    dynamic_linker='NetBSD ld.elf_so'
2961
3348
  fi
2962
3349
  shlibpath_var=LD_LIBRARY_PATH
2966
3353
 
2967
3354
newsos6)
2968
3355
  version_type=linux
2969
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
3356
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3357
  shlibpath_var=LD_LIBRARY_PATH
 
3358
  shlibpath_overrides_runpath=yes
 
3359
  ;;
 
3360
 
 
3361
nto-qnx*)
 
3362
  version_type=linux
 
3363
  need_lib_prefix=no
 
3364
  need_version=no
 
3365
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3366
  soname_spec='${libname}${release}${shared_ext}$major'
2970
3367
  shlibpath_var=LD_LIBRARY_PATH
2971
3368
  shlibpath_overrides_runpath=yes
2972
3369
  ;;
2974
3371
openbsd*)
2975
3372
  version_type=sunos
2976
3373
  need_lib_prefix=no
2977
 
  need_version=no
2978
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2979
 
    case "$host_os" in
2980
 
    openbsd2.[[89]] | openbsd2.[[89]].*)
2981
 
      shlibpath_overrides_runpath=no
2982
 
      ;;
2983
 
    *)
2984
 
      shlibpath_overrides_runpath=yes
2985
 
      ;;
2986
 
    esac
2987
 
  else
2988
 
    shlibpath_overrides_runpath=yes
2989
 
  fi
2990
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
3374
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 
3375
  case $host_os in
 
3376
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
 
3377
    *)                         need_version=no  ;;
 
3378
  esac
 
3379
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2991
3380
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2992
3381
  shlibpath_var=LD_LIBRARY_PATH
 
3382
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3383
    case $host_os in
 
3384
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
3385
        shlibpath_overrides_runpath=no
 
3386
        ;;
 
3387
      *)
 
3388
        shlibpath_overrides_runpath=yes
 
3389
        ;;
 
3390
      esac
 
3391
  else
 
3392
    shlibpath_overrides_runpath=yes
 
3393
  fi
2993
3394
  ;;
2994
3395
 
2995
3396
os2*)
2996
3397
  libname_spec='$name'
 
3398
  shrext_cmds=".dll"
2997
3399
  need_lib_prefix=no
2998
 
  library_names_spec='$libname.dll $libname.a'
 
3400
  library_names_spec='$libname${shared_ext} $libname.a'
2999
3401
  dynamic_linker='OS/2 ld.exe'
3000
3402
  shlibpath_var=LIBPATH
3001
3403
  ;;
3002
3404
 
3003
3405
osf3* | osf4* | osf5*)
3004
3406
  version_type=osf
 
3407
  need_lib_prefix=no
3005
3408
  need_version=no
3006
 
  soname_spec='${libname}${release}.so'
3007
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
3409
  soname_spec='${libname}${release}${shared_ext}$major'
 
3410
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3008
3411
  shlibpath_var=LD_LIBRARY_PATH
3009
3412
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3010
3413
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3012
3415
 
3013
3416
sco3.2v5*)
3014
3417
  version_type=osf
3015
 
  soname_spec='${libname}${release}.so$major'
3016
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
3418
  soname_spec='${libname}${release}${shared_ext}$major'
 
3419
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3017
3420
  shlibpath_var=LD_LIBRARY_PATH
3018
3421
  ;;
3019
3422
 
3021
3424
  version_type=linux
3022
3425
  need_lib_prefix=no
3023
3426
  need_version=no
3024
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3025
 
  soname_spec='${libname}${release}.so$major'
 
3427
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3428
  soname_spec='${libname}${release}${shared_ext}$major'
3026
3429
  shlibpath_var=LD_LIBRARY_PATH
3027
3430
  shlibpath_overrides_runpath=yes
3028
3431
  hardcode_into_libs=yes
3032
3435
 
3033
3436
sunos4*)
3034
3437
  version_type=sunos
3035
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
3438
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3036
3439
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3037
3440
  shlibpath_var=LD_LIBRARY_PATH
3038
3441
  shlibpath_overrides_runpath=yes
3044
3447
 
3045
3448
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3046
3449
  version_type=linux
3047
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3048
 
  soname_spec='${libname}${release}.so$major'
 
3450
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3451
  soname_spec='${libname}${release}${shared_ext}$major'
3049
3452
  shlibpath_var=LD_LIBRARY_PATH
3050
3453
  case $host_vendor in
3051
3454
    sni)
3052
3455
      shlibpath_overrides_runpath=no
 
3456
      need_lib_prefix=no
 
3457
      export_dynamic_flag_spec='${wl}-Blargedynsym'
 
3458
      runpath_var=LD_RUN_PATH
 
3459
      ;;
 
3460
    siemens)
 
3461
      need_lib_prefix=no
3053
3462
      ;;
3054
3463
    motorola)
3055
3464
      need_lib_prefix=no
3060
3469
  esac
3061
3470
  ;;
3062
3471
 
3063
 
uts4*)
3064
 
  version_type=linux
3065
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3066
 
  soname_spec='${libname}${release}.so$major'
3067
 
  shlibpath_var=LD_LIBRARY_PATH
3068
 
  ;;
3069
 
 
3070
 
dgux*)
3071
 
  version_type=linux
3072
 
  need_lib_prefix=no
3073
 
  need_version=no
3074
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3075
 
  soname_spec='${libname}${release}.so$major'
3076
 
  shlibpath_var=LD_LIBRARY_PATH
3077
 
  ;;
3078
 
 
3079
3472
sysv4*MP*)
3080
3473
  if test -d /usr/nec ;then
3081
3474
    version_type=linux
3082
 
    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3083
 
    soname_spec='$libname.so.$major'
 
3475
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
3476
    soname_spec='$libname${shared_ext}.$major'
3084
3477
    shlibpath_var=LD_LIBRARY_PATH
3085
3478
  fi
3086
3479
  ;;
3087
3480
 
 
3481
uts4*)
 
3482
  version_type=linux
 
3483
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
3484
  soname_spec='${libname}${release}${shared_ext}$major'
 
3485
  shlibpath_var=LD_LIBRARY_PATH
 
3486
  ;;
 
3487
 
3088
3488
*)
3089
3489
  dynamic_linker=no
3090
3490
  ;;
3091
3491
esac
3092
3492
AC_MSG_RESULT([$dynamic_linker])
3093
3493
test "$dynamic_linker" = no && can_build_shared=no
3094
 
 
3095
 
# Report the final consequences.
3096
 
AC_MSG_CHECKING([if libtool supports shared libraries])
3097
 
AC_MSG_RESULT([$can_build_shared])
3098
 
 
3099
 
AC_MSG_CHECKING([whether to build shared libraries])
3100
 
test "$can_build_shared" = "no" && enable_shared=no
3101
 
 
3102
 
# On AIX, shared libraries and static libraries use the same namespace, and
3103
 
# are all built from PIC.
3104
 
case "$host_os" in
3105
 
aix3*)
3106
 
  test "$enable_shared" = yes && enable_static=no
3107
 
  if test -n "$RANLIB"; then
3108
 
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3109
 
    postinstall_cmds='$RANLIB $lib'
3110
 
  fi
3111
 
  ;;
3112
 
 
3113
 
aix4*)
3114
 
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3115
 
    test "$enable_shared" = yes && enable_static=no
3116
 
  fi
3117
 
  ;;
3118
 
esac
3119
 
AC_MSG_RESULT([$enable_shared])
3120
 
 
3121
 
AC_MSG_CHECKING([whether to build static libraries])
3122
 
# Make sure either enable_shared or enable_static is yes.
3123
 
test "$enable_shared" = yes || enable_static=yes
3124
 
AC_MSG_RESULT([$enable_static])
3125
 
 
3126
 
if test "$hardcode_action" = relink; then
3127
 
  # Fast installation is not supported
3128
 
  enable_fast_install=no
3129
 
elif test "$shlibpath_overrides_runpath" = yes ||
3130
 
     test "$enable_shared" = no; then
3131
 
  # Fast installation is not necessary
3132
 
  enable_fast_install=needless
3133
 
fi
3134
 
 
3135
 
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3136
 
if test "$GCC" = yes; then
3137
 
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3138
 
fi
3139
 
 
3140
 
AC_LIBTOOL_DLOPEN_SELF
3141
 
 
3142
 
if test "$enable_shared" = yes && test "$GCC" = yes; then
3143
 
  case $archive_cmds in
3144
 
  *'~'*)
3145
 
    # FIXME: we may have to deal with multi-command sequences.
3146
 
    ;;
3147
 
  '$CC '*)
3148
 
    # Test whether the compiler implicitly links with -lc since on some
3149
 
    # systems, -lgcc has to come before -lc. If gcc already passes -lc
3150
 
    # to ld, don't add -lc before -lgcc.
3151
 
    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3152
 
    AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3153
 
    [$rm conftest*
3154
 
    echo 'static int dummy;' > conftest.$ac_ext
3155
 
 
3156
 
    if AC_TRY_EVAL(ac_compile); then
3157
 
      soname=conftest
3158
 
      lib=conftest
3159
 
      libobjs=conftest.$ac_objext
3160
 
      deplibs=
3161
 
      wl=$lt_cv_prog_cc_wl
3162
 
      compiler_flags=-v
3163
 
      linker_flags=-v
3164
 
      verstring=
3165
 
      output_objdir=.
3166
 
      libname=conftest
3167
 
      save_allow_undefined_flag=$allow_undefined_flag
3168
 
      allow_undefined_flag=
3169
 
      if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3170
 
      then
3171
 
        lt_cv_archive_cmds_need_lc=no
3172
 
      else
3173
 
        lt_cv_archive_cmds_need_lc=yes
3174
 
      fi
3175
 
      allow_undefined_flag=$save_allow_undefined_flag
 
3494
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
3495
 
 
3496
 
 
3497
# _LT_AC_TAGCONFIG
 
3498
# ----------------
 
3499
AC_DEFUN([_LT_AC_TAGCONFIG],
 
3500
[AC_ARG_WITH([tags],
 
3501
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
 
3502
        [include additional configurations @<:@automatic@:>@])],
 
3503
    [tagnames="$withval"])
 
3504
 
 
3505
if test -f "$ltmain" && test -n "$tagnames"; then
 
3506
  if test ! -f "${ofile}"; then
 
3507
    AC_MSG_WARN([output file `$ofile' does not exist])
 
3508
  fi
 
3509
 
 
3510
  if test -z "$LTCC"; then
 
3511
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
 
3512
    if test -z "$LTCC"; then
 
3513
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3176
3514
    else
3177
 
      cat conftest.err 1>&5
 
3515
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
 
3516
    fi
 
3517
  fi
 
3518
 
 
3519
  # Extract list of available tagged configurations in $ofile.
 
3520
  # Note that this assumes the entire list is on one line.
 
3521
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
3522
 
 
3523
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
3524
  for tagname in $tagnames; do
 
3525
    IFS="$lt_save_ifs"
 
3526
    # Check whether tagname contains only valid characters
 
3527
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
 
3528
    "") ;;
 
3529
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
 
3530
        ;;
 
3531
    esac
 
3532
 
 
3533
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
 
3534
    then
 
3535
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
 
3536
    fi
 
3537
 
 
3538
    # Update the list of available tags.
 
3539
    if test -n "$tagname"; then
 
3540
      echo appending configuration tag \"$tagname\" to $ofile
 
3541
 
 
3542
      case $tagname in
 
3543
      CXX)
 
3544
        if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
3545
            ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
3546
            (test "X$CXX" != "Xg++"))) ; then
 
3547
          AC_LIBTOOL_LANG_CXX_CONFIG
 
3548
        else
 
3549
          tagname=""
 
3550
        fi
 
3551
        ;;
 
3552
 
 
3553
      F77)
 
3554
        if test -n "$F77" && test "X$F77" != "Xno"; then
 
3555
          AC_LIBTOOL_LANG_F77_CONFIG
 
3556
        else
 
3557
          tagname=""
 
3558
        fi
 
3559
        ;;
 
3560
 
 
3561
      GCJ)
 
3562
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
3563
          AC_LIBTOOL_LANG_GCJ_CONFIG
 
3564
        else
 
3565
          tagname=""
 
3566
        fi
 
3567
        ;;
 
3568
 
 
3569
      RC)
 
3570
        AC_LIBTOOL_LANG_RC_CONFIG
 
3571
        ;;
 
3572
 
 
3573
      *)
 
3574
        AC_MSG_ERROR([Unsupported tag name: $tagname])
 
3575
        ;;
 
3576
      esac
 
3577
 
 
3578
      # Append the new tag name to the list of available tags.
 
3579
      if test -n "$tagname" ; then
 
3580
      available_tags="$available_tags $tagname"
 
3581
    fi
 
3582
    fi
 
3583
  done
 
3584
  IFS="$lt_save_ifs"
 
3585
 
 
3586
  # Now substitute the updated list of available tags.
 
3587
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
 
3588
    mv "${ofile}T" "$ofile"
 
3589
    chmod +x "$ofile"
 
3590
  else
 
3591
    rm -f "${ofile}T"
 
3592
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
 
3593
  fi
 
3594
fi
 
3595
])# _LT_AC_TAGCONFIG
 
3596
 
 
3597
 
 
3598
# AC_LIBTOOL_DLOPEN
 
3599
# -----------------
 
3600
# enable checks for dlopen support
 
3601
AC_DEFUN([AC_LIBTOOL_DLOPEN],
 
3602
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
 
3603
])# AC_LIBTOOL_DLOPEN
 
3604
 
 
3605
 
 
3606
# AC_LIBTOOL_WIN32_DLL
 
3607
# --------------------
 
3608
# declare package support for building win32 DLLs
 
3609
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
3610
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
 
3611
])# AC_LIBTOOL_WIN32_DLL
 
3612
 
 
3613
 
 
3614
# AC_ENABLE_SHARED([DEFAULT])
 
3615
# ---------------------------
 
3616
# implement the --enable-shared flag
 
3617
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
3618
AC_DEFUN([AC_ENABLE_SHARED],
 
3619
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
 
3620
AC_ARG_ENABLE([shared],
 
3621
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
3622
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
 
3623
    [p=${PACKAGE-default}
 
3624
    case $enableval in
 
3625
    yes) enable_shared=yes ;;
 
3626
    no) enable_shared=no ;;
 
3627
    *)
 
3628
      enable_shared=no
 
3629
      # Look at the argument we got.  We use all the common list separators.
 
3630
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
3631
      for pkg in $enableval; do
 
3632
        IFS="$lt_save_ifs"
 
3633
        if test "X$pkg" = "X$p"; then
 
3634
          enable_shared=yes
 
3635
        fi
 
3636
      done
 
3637
      IFS="$lt_save_ifs"
 
3638
      ;;
 
3639
    esac],
 
3640
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
 
3641
])# AC_ENABLE_SHARED
 
3642
 
 
3643
 
 
3644
# AC_DISABLE_SHARED
 
3645
# -----------------
 
3646
#- set the default shared flag to --disable-shared
 
3647
AC_DEFUN([AC_DISABLE_SHARED],
 
3648
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3649
AC_ENABLE_SHARED(no)
 
3650
])# AC_DISABLE_SHARED
 
3651
 
 
3652
 
 
3653
# AC_ENABLE_STATIC([DEFAULT])
 
3654
# ---------------------------
 
3655
# implement the --enable-static flag
 
3656
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
3657
AC_DEFUN([AC_ENABLE_STATIC],
 
3658
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
 
3659
AC_ARG_ENABLE([static],
 
3660
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
3661
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
 
3662
    [p=${PACKAGE-default}
 
3663
    case $enableval in
 
3664
    yes) enable_static=yes ;;
 
3665
    no) enable_static=no ;;
 
3666
    *)
 
3667
     enable_static=no
 
3668
      # Look at the argument we got.  We use all the common list separators.
 
3669
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
3670
      for pkg in $enableval; do
 
3671
        IFS="$lt_save_ifs"
 
3672
        if test "X$pkg" = "X$p"; then
 
3673
          enable_static=yes
 
3674
        fi
 
3675
      done
 
3676
      IFS="$lt_save_ifs"
 
3677
      ;;
 
3678
    esac],
 
3679
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
 
3680
])# AC_ENABLE_STATIC
 
3681
 
 
3682
 
 
3683
# AC_DISABLE_STATIC
 
3684
# -----------------
 
3685
# set the default static flag to --disable-static
 
3686
AC_DEFUN([AC_DISABLE_STATIC],
 
3687
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3688
AC_ENABLE_STATIC(no)
 
3689
])# AC_DISABLE_STATIC
 
3690
 
 
3691
 
 
3692
# AC_ENABLE_FAST_INSTALL([DEFAULT])
 
3693
# ---------------------------------
 
3694
# implement the --enable-fast-install flag
 
3695
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
3696
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
 
3697
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
 
3698
AC_ARG_ENABLE([fast-install],
 
3699
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
3700
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
3701
    [p=${PACKAGE-default}
 
3702
    case $enableval in
 
3703
    yes) enable_fast_install=yes ;;
 
3704
    no) enable_fast_install=no ;;
 
3705
    *)
 
3706
      enable_fast_install=no
 
3707
      # Look at the argument we got.  We use all the common list separators.
 
3708
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
3709
      for pkg in $enableval; do
 
3710
        IFS="$lt_save_ifs"
 
3711
        if test "X$pkg" = "X$p"; then
 
3712
          enable_fast_install=yes
 
3713
        fi
 
3714
      done
 
3715
      IFS="$lt_save_ifs"
 
3716
      ;;
 
3717
    esac],
 
3718
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
 
3719
])# AC_ENABLE_FAST_INSTALL
 
3720
 
 
3721
 
 
3722
# AC_DISABLE_FAST_INSTALL
 
3723
# -----------------------
 
3724
# set the default to --disable-fast-install
 
3725
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
 
3726
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3727
AC_ENABLE_FAST_INSTALL(no)
 
3728
])# AC_DISABLE_FAST_INSTALL
 
3729
 
 
3730
 
 
3731
# AC_LIBTOOL_PICMODE([MODE])
 
3732
# --------------------------
 
3733
# implement the --with-pic flag
 
3734
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
3735
AC_DEFUN([AC_LIBTOOL_PICMODE],
 
3736
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3737
pic_mode=ifelse($#,1,$1,default)
 
3738
])# AC_LIBTOOL_PICMODE
 
3739
 
 
3740
 
 
3741
# AC_PROG_EGREP
 
3742
# -------------
 
3743
# This is predefined starting with Autoconf 2.54, so this conditional
 
3744
# definition can be removed once we require Autoconf 2.54 or later.
 
3745
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
 
3746
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
 
3747
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
 
3748
    then ac_cv_prog_egrep='grep -E'
 
3749
    else ac_cv_prog_egrep='egrep'
3178
3750
    fi])
3179
 
    AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3180
 
    ;;
3181
 
  esac
3182
 
fi
3183
 
need_lc=${lt_cv_archive_cmds_need_lc-yes}
3184
 
 
3185
 
# The second clause should only fire when bootstrapping the
 
3751
 EGREP=$ac_cv_prog_egrep
 
3752
 AC_SUBST([EGREP])
 
3753
])])
 
3754
 
 
3755
 
 
3756
# AC_PATH_TOOL_PREFIX
 
3757
# -------------------
 
3758
# find a file program which can recognise shared library
 
3759
AC_DEFUN([AC_PATH_TOOL_PREFIX],
 
3760
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
3761
AC_MSG_CHECKING([for $1])
 
3762
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
3763
[case $MAGIC_CMD in
 
3764
[[\\/*] |  ?:[\\/]*])
 
3765
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
3766
  ;;
 
3767
*)
 
3768
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
3769
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3770
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
3771
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
3772
dnl not every word.  This closes a longstanding sh security hole.
 
3773
  ac_dummy="ifelse([$2], , $PATH, [$2])"
 
3774
  for ac_dir in $ac_dummy; do
 
3775
    IFS="$lt_save_ifs"
 
3776
    test -z "$ac_dir" && ac_dir=.
 
3777
    if test -f $ac_dir/$1; then
 
3778
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
3779
      if test -n "$file_magic_test_file"; then
 
3780
        case $deplibs_check_method in
 
3781
        "file_magic "*)
 
3782
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 
3783
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
3784
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
3785
            $EGREP "$file_magic_regex" > /dev/null; then
 
3786
            :
 
3787
          else
 
3788
            cat <<EOF 1>&2
 
3789
 
 
3790
*** Warning: the command libtool uses to detect shared libraries,
 
3791
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
3792
*** The result is that libtool may fail to recognize shared libraries
 
3793
*** as such.  This will affect the creation of libtool libraries that
 
3794
*** depend on shared libraries, but programs linked with such libtool
 
3795
*** libraries will work regardless of this problem.  Nevertheless, you
 
3796
*** may want to report the problem to your system manager and/or to
 
3797
*** bug-libtool@gnu.org
 
3798
 
 
3799
EOF
 
3800
          fi ;;
 
3801
        esac
 
3802
      fi
 
3803
      break
 
3804
    fi
 
3805
  done
 
3806
  IFS="$lt_save_ifs"
 
3807
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
3808
  ;;
 
3809
esac])
 
3810
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
3811
if test -n "$MAGIC_CMD"; then
 
3812
  AC_MSG_RESULT($MAGIC_CMD)
 
3813
else
 
3814
  AC_MSG_RESULT(no)
 
3815
fi
 
3816
])# AC_PATH_TOOL_PREFIX
 
3817
 
 
3818
 
 
3819
# AC_PATH_MAGIC
 
3820
# -------------
 
3821
# find a file program which can recognise a shared library
 
3822
AC_DEFUN([AC_PATH_MAGIC],
 
3823
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
3824
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
3825
  if test -n "$ac_tool_prefix"; then
 
3826
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
3827
  else
 
3828
    MAGIC_CMD=:
 
3829
  fi
 
3830
fi
 
3831
])# AC_PATH_MAGIC
 
3832
 
 
3833
 
 
3834
# AC_PROG_LD
 
3835
# ----------
 
3836
# find the pathname to the GNU or non-GNU linker
 
3837
AC_DEFUN([AC_PROG_LD],
 
3838
[AC_ARG_WITH([gnu-ld],
 
3839
    [AC_HELP_STRING([--with-gnu-ld],
 
3840
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
3841
    [test "$withval" = no || with_gnu_ld=yes],
 
3842
    [with_gnu_ld=no])
 
3843
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
3844
AC_REQUIRE([AC_PROG_CC])dnl
 
3845
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3846
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
3847
ac_prog=ld
 
3848
if test "$GCC" = yes; then
 
3849
  # Check if gcc -print-prog-name=ld gives a path.
 
3850
  AC_MSG_CHECKING([for ld used by $CC])
 
3851
  case $host in
 
3852
  *-*-mingw*)
 
3853
    # gcc leaves a trailing carriage return which upsets mingw
 
3854
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
3855
  *)
 
3856
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
3857
  esac
 
3858
  case $ac_prog in
 
3859
    # Accept absolute paths.
 
3860
    [[\\/]]* | ?:[[\\/]]*)
 
3861
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
3862
      # Canonicalize the pathname of ld
 
3863
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
 
3864
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
3865
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
 
3866
      done
 
3867
      test -z "$LD" && LD="$ac_prog"
 
3868
      ;;
 
3869
  "")
 
3870
    # If it fails, then pretend we aren't using GCC.
 
3871
    ac_prog=ld
 
3872
    ;;
 
3873
  *)
 
3874
    # If it is relative, then search for the first ld in PATH.
 
3875
    with_gnu_ld=unknown
 
3876
    ;;
 
3877
  esac
 
3878
elif test "$with_gnu_ld" = yes; then
 
3879
  AC_MSG_CHECKING([for GNU ld])
 
3880
else
 
3881
  AC_MSG_CHECKING([for non-GNU ld])
 
3882
fi
 
3883
AC_CACHE_VAL(lt_cv_path_LD,
 
3884
[if test -z "$LD"; then
 
3885
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3886
  for ac_dir in $PATH; do
 
3887
    IFS="$lt_save_ifs"
 
3888
    test -z "$ac_dir" && ac_dir=.
 
3889
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
3890
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
3891
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
3892
      # but apparently some variants of GNU ld only accept -v.
 
3893
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
3894
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
3895
      *GNU* | *'with BFD'*)
 
3896
        test "$with_gnu_ld" != no && break
 
3897
        ;;
 
3898
      *)
 
3899
        test "$with_gnu_ld" != yes && break
 
3900
        ;;
 
3901
      esac
 
3902
    fi
 
3903
  done
 
3904
  IFS="$lt_save_ifs"
 
3905
else
 
3906
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
3907
fi])
 
3908
LD="$lt_cv_path_LD"
 
3909
if test -n "$LD"; then
 
3910
  AC_MSG_RESULT($LD)
 
3911
else
 
3912
  AC_MSG_RESULT(no)
 
3913
fi
 
3914
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
3915
AC_PROG_LD_GNU
 
3916
])# AC_PROG_LD
 
3917
 
 
3918
 
 
3919
# AC_PROG_LD_GNU
 
3920
# --------------
 
3921
AC_DEFUN([AC_PROG_LD_GNU],
 
3922
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
3923
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
3924
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 
3925
case `$LD -v 2>&1 </dev/null` in
 
3926
*GNU* | *'with BFD'*)
 
3927
  lt_cv_prog_gnu_ld=yes
 
3928
  ;;
 
3929
*)
 
3930
  lt_cv_prog_gnu_ld=no
 
3931
  ;;
 
3932
esac])
 
3933
with_gnu_ld=$lt_cv_prog_gnu_ld
 
3934
])# AC_PROG_LD_GNU
 
3935
 
 
3936
 
 
3937
# AC_PROG_LD_RELOAD_FLAG
 
3938
# ----------------------
 
3939
# find reload flag for linker
 
3940
#   -- PORTME Some linkers may need a different reload flag.
 
3941
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
 
3942
[AC_CACHE_CHECK([for $LD option to reload object files],
 
3943
  lt_cv_ld_reload_flag,
 
3944
  [lt_cv_ld_reload_flag='-r'])
 
3945
reload_flag=$lt_cv_ld_reload_flag
 
3946
case $reload_flag in
 
3947
"" | " "*) ;;
 
3948
*) reload_flag=" $reload_flag" ;;
 
3949
esac
 
3950
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
3951
case $host_os in
 
3952
  darwin*)
 
3953
    if test "$GCC" = yes; then
 
3954
      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
 
3955
    else
 
3956
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
3957
    fi
 
3958
    ;;
 
3959
esac
 
3960
])# AC_PROG_LD_RELOAD_FLAG
 
3961
 
 
3962
 
 
3963
# AC_DEPLIBS_CHECK_METHOD
 
3964
# -----------------------
 
3965
# how to check for library dependencies
 
3966
#  -- PORTME fill in with the dynamic library characteristics
 
3967
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
 
3968
[AC_CACHE_CHECK([how to recognise dependent libraries],
 
3969
lt_cv_deplibs_check_method,
 
3970
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
3971
lt_cv_file_magic_test_file=
 
3972
lt_cv_deplibs_check_method='unknown'
 
3973
# Need to set the preceding variable on all platforms that support
 
3974
# interlibrary dependencies.
 
3975
# 'none' -- dependencies not supported.
 
3976
# `unknown' -- same as none, but documents that we really don't know.
 
3977
# 'pass_all' -- all dependencies passed with no checks.
 
3978
# 'test_compile' -- check by making test program.
 
3979
# 'file_magic [[regex]]' -- check by looking for files in library path
 
3980
# which responds to the $file_magic_cmd with a given extended regex.
 
3981
# If you have `file' or equivalent on your system and you're not sure
 
3982
# whether `pass_all' will *always* work, you probably want this one.
 
3983
 
 
3984
case $host_os in
 
3985
aix4* | aix5*)
 
3986
  lt_cv_deplibs_check_method=pass_all
 
3987
  ;;
 
3988
 
 
3989
beos*)
 
3990
  lt_cv_deplibs_check_method=pass_all
 
3991
  ;;
 
3992
 
 
3993
bsdi[[45]]*)
 
3994
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
3995
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
3996
  lt_cv_file_magic_test_file=/shlib/libc.so
 
3997
  ;;
 
3998
 
 
3999
cygwin*)
 
4000
  # func_win32_libid is a shell function defined in ltmain.sh
 
4001
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
4002
  lt_cv_file_magic_cmd='func_win32_libid'
 
4003
  ;;
 
4004
 
 
4005
mingw* | pw32*)
 
4006
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
4007
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
 
4008
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
4009
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
4010
  ;;
 
4011
 
 
4012
darwin* | rhapsody*)
 
4013
  lt_cv_deplibs_check_method=pass_all
 
4014
  ;;
 
4015
 
 
4016
freebsd* | kfreebsd*-gnu | dragonfly*)
 
4017
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
4018
    case $host_cpu in
 
4019
    i*86 )
 
4020
      # Not sure whether the presence of OpenBSD here was a mistake.
 
4021
      # Let's accept both of them until this is cleared up.
 
4022
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
 
4023
      lt_cv_file_magic_cmd=/usr/bin/file
 
4024
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
4025
      ;;
 
4026
    esac
 
4027
  else
 
4028
    lt_cv_deplibs_check_method=pass_all
 
4029
  fi
 
4030
  ;;
 
4031
 
 
4032
gnu*)
 
4033
  lt_cv_deplibs_check_method=pass_all
 
4034
  ;;
 
4035
 
 
4036
hpux10.20* | hpux11*)
 
4037
  lt_cv_file_magic_cmd=/usr/bin/file
 
4038
  case $host_cpu in
 
4039
  ia64*)
 
4040
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
4041
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
4042
    ;;
 
4043
  hppa*64*)
 
4044
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
 
4045
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
4046
    ;;
 
4047
  *)
 
4048
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
4049
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
4050
    ;;
 
4051
  esac
 
4052
  ;;
 
4053
 
 
4054
irix5* | irix6* | nonstopux*)
 
4055
  case $LD in
 
4056
  *-32|*"-32 ") libmagic=32-bit;;
 
4057
  *-n32|*"-n32 ") libmagic=N32;;
 
4058
  *-64|*"-64 ") libmagic=64-bit;;
 
4059
  *) libmagic=never-match;;
 
4060
  esac
 
4061
  lt_cv_deplibs_check_method=pass_all
 
4062
  ;;
 
4063
 
 
4064
# This must be Linux ELF.
 
4065
linux*)
 
4066
  lt_cv_deplibs_check_method=pass_all
 
4067
  ;;
 
4068
 
 
4069
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
4070
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
4071
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
4072
  else
 
4073
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
4074
  fi
 
4075
  ;;
 
4076
 
 
4077
newos6*)
 
4078
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
4079
  lt_cv_file_magic_cmd=/usr/bin/file
 
4080
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
4081
  ;;
 
4082
 
 
4083
nto-qnx*)
 
4084
  lt_cv_deplibs_check_method=unknown
 
4085
  ;;
 
4086
 
 
4087
openbsd*)
 
4088
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
4089
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
 
4090
  else
 
4091
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
4092
  fi
 
4093
  ;;
 
4094
 
 
4095
osf3* | osf4* | osf5*)
 
4096
  lt_cv_deplibs_check_method=pass_all
 
4097
  ;;
 
4098
 
 
4099
sco3.2v5*)
 
4100
  lt_cv_deplibs_check_method=pass_all
 
4101
  ;;
 
4102
 
 
4103
solaris*)
 
4104
  lt_cv_deplibs_check_method=pass_all
 
4105
  ;;
 
4106
 
 
4107
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
4108
  case $host_vendor in
 
4109
  motorola)
 
4110
    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]]'
 
4111
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
4112
    ;;
 
4113
  ncr)
 
4114
    lt_cv_deplibs_check_method=pass_all
 
4115
    ;;
 
4116
  sequent)
 
4117
    lt_cv_file_magic_cmd='/bin/file'
 
4118
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
4119
    ;;
 
4120
  sni)
 
4121
    lt_cv_file_magic_cmd='/bin/file'
 
4122
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
4123
    lt_cv_file_magic_test_file=/lib/libc.so
 
4124
    ;;
 
4125
  siemens)
 
4126
    lt_cv_deplibs_check_method=pass_all
 
4127
    ;;
 
4128
  esac
 
4129
  ;;
 
4130
 
 
4131
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
 
4132
  lt_cv_deplibs_check_method=pass_all
 
4133
  ;;
 
4134
esac
 
4135
])
 
4136
file_magic_cmd=$lt_cv_file_magic_cmd
 
4137
deplibs_check_method=$lt_cv_deplibs_check_method
 
4138
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
4139
])# AC_DEPLIBS_CHECK_METHOD
 
4140
 
 
4141
 
 
4142
# AC_PROG_NM
 
4143
# ----------
 
4144
# find the pathname to a BSD-compatible name lister
 
4145
AC_DEFUN([AC_PROG_NM],
 
4146
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
 
4147
[if test -n "$NM"; then
 
4148
  # Let the user override the test.
 
4149
  lt_cv_path_NM="$NM"
 
4150
else
 
4151
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
4152
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
 
4153
    IFS="$lt_save_ifs"
 
4154
    test -z "$ac_dir" && ac_dir=.
 
4155
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
 
4156
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
4157
      # Check to see if the nm accepts a BSD-compat flag.
 
4158
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
4159
      #   nm: unknown option "B" ignored
 
4160
      # Tru64's nm complains that /dev/null is an invalid object file
 
4161
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
4162
      */dev/null* | *'Invalid file or object type'*)
 
4163
        lt_cv_path_NM="$tmp_nm -B"
 
4164
        break
 
4165
        ;;
 
4166
      *)
 
4167
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
4168
        */dev/null*)
 
4169
          lt_cv_path_NM="$tmp_nm -p"
 
4170
          break
 
4171
          ;;
 
4172
        *)
 
4173
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
4174
          continue # so that we can try to find one that supports BSD flags
 
4175
          ;;
 
4176
        esac
 
4177
      esac
 
4178
    fi
 
4179
  done
 
4180
  IFS="$lt_save_ifs"
 
4181
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 
4182
fi])
 
4183
NM="$lt_cv_path_NM"
 
4184
])# AC_PROG_NM
 
4185
 
 
4186
 
 
4187
# AC_CHECK_LIBM
 
4188
# -------------
 
4189
# check for math library
 
4190
AC_DEFUN([AC_CHECK_LIBM],
 
4191
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
4192
LIBM=
 
4193
case $host in
 
4194
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
4195
  # These system don't have libm, or don't need it
 
4196
  ;;
 
4197
*-ncr-sysv4.3*)
 
4198
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
4199
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
4200
  ;;
 
4201
*)
 
4202
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
4203
  ;;
 
4204
esac
 
4205
])# AC_CHECK_LIBM
 
4206
 
 
4207
 
 
4208
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
 
4209
# -----------------------------------
 
4210
# sets LIBLTDL to the link flags for the libltdl convenience library and
 
4211
# LTDLINCL to the include flags for the libltdl header and adds
 
4212
# --enable-ltdl-convenience to the configure arguments.  Note that
 
4213
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
4214
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
 
4215
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
 
4216
# (note the single quotes!).  If your package is not flat and you're not
 
4217
# using automake, define top_builddir and top_srcdir appropriately in
 
4218
# the Makefiles.
 
4219
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 
4220
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
4221
  case $enable_ltdl_convenience in
 
4222
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
 
4223
  "") enable_ltdl_convenience=yes
 
4224
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
 
4225
  esac
 
4226
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
 
4227
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
4228
  # For backwards non-gettext consistent compatibility...
 
4229
  INCLTDL="$LTDLINCL"
 
4230
])# AC_LIBLTDL_CONVENIENCE
 
4231
 
 
4232
 
 
4233
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
 
4234
# -----------------------------------
 
4235
# sets LIBLTDL to the link flags for the libltdl installable library and
 
4236
# LTDLINCL to the include flags for the libltdl header and adds
 
4237
# --enable-ltdl-install to the configure arguments.  Note that
 
4238
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
4239
# and an installed libltdl is not found, it is assumed to be `libltdl'.
 
4240
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
 
4241
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
4242
# flat and you're not using automake, define top_builddir and top_srcdir
 
4243
# appropriately in the Makefiles.
 
4244
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
 
4245
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 
4246
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
4247
  AC_CHECK_LIB(ltdl, lt_dlinit,
 
4248
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
 
4249
  [if test x"$enable_ltdl_install" = xno; then
 
4250
     AC_MSG_WARN([libltdl not installed, but installation disabled])
 
4251
   else
 
4252
     enable_ltdl_install=yes
 
4253
   fi
 
4254
  ])
 
4255
  if test x"$enable_ltdl_install" = x"yes"; then
 
4256
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
 
4257
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
 
4258
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
4259
  else
 
4260
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
 
4261
    LIBLTDL="-lltdl"
 
4262
    LTDLINCL=
 
4263
  fi
 
4264
  # For backwards non-gettext consistent compatibility...
 
4265
  INCLTDL="$LTDLINCL"
 
4266
])# AC_LIBLTDL_INSTALLABLE
 
4267
 
 
4268
 
 
4269
# AC_LIBTOOL_CXX
 
4270
# --------------
 
4271
# enable support for C++ libraries
 
4272
AC_DEFUN([AC_LIBTOOL_CXX],
 
4273
[AC_REQUIRE([_LT_AC_LANG_CXX])
 
4274
])# AC_LIBTOOL_CXX
 
4275
 
 
4276
 
 
4277
# _LT_AC_LANG_CXX
 
4278
# ---------------
 
4279
AC_DEFUN([_LT_AC_LANG_CXX],
 
4280
[AC_REQUIRE([AC_PROG_CXX])
 
4281
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
4282
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
 
4283
])# _LT_AC_LANG_CXX
 
4284
 
 
4285
# _LT_AC_PROG_CXXCPP
 
4286
# ---------------
 
4287
AC_DEFUN([_LT_AC_PROG_CXXCPP],
 
4288
[
 
4289
AC_REQUIRE([AC_PROG_CXX])
 
4290
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
4291
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
4292
    (test "X$CXX" != "Xg++"))) ; then
 
4293
  AC_PROG_CXXCPP
 
4294
fi
 
4295
])# _LT_AC_PROG_CXXCPP
 
4296
 
 
4297
# AC_LIBTOOL_F77
 
4298
# --------------
 
4299
# enable support for Fortran 77 libraries
 
4300
AC_DEFUN([AC_LIBTOOL_F77],
 
4301
[AC_REQUIRE([_LT_AC_LANG_F77])
 
4302
])# AC_LIBTOOL_F77
 
4303
 
 
4304
 
 
4305
# _LT_AC_LANG_F77
 
4306
# ---------------
 
4307
AC_DEFUN([_LT_AC_LANG_F77],
 
4308
[AC_REQUIRE([AC_PROG_F77])
 
4309
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
 
4310
])# _LT_AC_LANG_F77
 
4311
 
 
4312
 
 
4313
# AC_LIBTOOL_GCJ
 
4314
# --------------
 
4315
# enable support for GCJ libraries
 
4316
AC_DEFUN([AC_LIBTOOL_GCJ],
 
4317
[AC_REQUIRE([_LT_AC_LANG_GCJ])
 
4318
])# AC_LIBTOOL_GCJ
 
4319
 
 
4320
 
 
4321
# _LT_AC_LANG_GCJ
 
4322
# ---------------
 
4323
AC_DEFUN([_LT_AC_LANG_GCJ],
 
4324
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
 
4325
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
 
4326
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
 
4327
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
 
4328
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
 
4329
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
 
4330
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
 
4331
])# _LT_AC_LANG_GCJ
 
4332
 
 
4333
 
 
4334
# AC_LIBTOOL_RC
 
4335
# --------------
 
4336
# enable support for Windows resource files
 
4337
AC_DEFUN([AC_LIBTOOL_RC],
 
4338
[AC_REQUIRE([LT_AC_PROG_RC])
 
4339
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
 
4340
])# AC_LIBTOOL_RC
 
4341
 
 
4342
 
 
4343
# AC_LIBTOOL_LANG_C_CONFIG
 
4344
# ------------------------
 
4345
# Ensure that the configuration vars for the C compiler are
 
4346
# suitably defined.  Those variables are subsequently used by
 
4347
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
4348
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
 
4349
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
 
4350
[lt_save_CC="$CC"
 
4351
AC_LANG_PUSH(C)
 
4352
 
 
4353
# Source file extension for C test sources.
 
4354
ac_ext=c
 
4355
 
 
4356
# Object file extension for compiled C test sources.
 
4357
objext=o
 
4358
_LT_AC_TAGVAR(objext, $1)=$objext
 
4359
 
 
4360
# Code to be used in simple compile tests
 
4361
lt_simple_compile_test_code="int some_variable = 0;\n"
 
4362
 
 
4363
# Code to be used in simple link tests
 
4364
lt_simple_link_test_code='int main(){return(0);}\n'
 
4365
 
 
4366
_LT_AC_SYS_COMPILER
 
4367
 
 
4368
# save warnings/boilerplate of simple test code
 
4369
_LT_COMPILER_BOILERPLATE
 
4370
_LT_LINKER_BOILERPLATE
 
4371
 
 
4372
#
 
4373
# Check for any special shared library compilation flags.
 
4374
#
 
4375
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
 
4376
if test "$GCC" = no; then
 
4377
  case $host_os in
 
4378
  sco3.2v5*)
 
4379
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
 
4380
    ;;
 
4381
  esac
 
4382
fi
 
4383
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
 
4384
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
 
4385
  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
 
4386
  else
 
4387
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
 
4388
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
 
4389
  fi
 
4390
fi
 
4391
 
 
4392
 
 
4393
#
 
4394
# Check to make sure the static flag actually works.
 
4395
#
 
4396
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
 
4397
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
4398
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
 
4399
  [],
 
4400
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
4401
 
 
4402
 
 
4403
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
4404
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
4405
AC_LIBTOOL_PROG_CC_C_O($1)
 
4406
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
4407
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
4408
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
4409
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
4410
AC_LIBTOOL_SYS_LIB_STRIP
 
4411
AC_LIBTOOL_DLOPEN_SELF($1)
 
4412
 
 
4413
# Report which librarie types wil actually be built
 
4414
AC_MSG_CHECKING([if libtool supports shared libraries])
 
4415
AC_MSG_RESULT([$can_build_shared])
 
4416
 
 
4417
AC_MSG_CHECKING([whether to build shared libraries])
 
4418
test "$can_build_shared" = "no" && enable_shared=no
 
4419
 
 
4420
# On AIX, shared libraries and static libraries use the same namespace, and
 
4421
# are all built from PIC.
 
4422
case $host_os in
 
4423
aix3*)
 
4424
  test "$enable_shared" = yes && enable_static=no
 
4425
  if test -n "$RANLIB"; then
 
4426
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
4427
    postinstall_cmds='$RANLIB $lib'
 
4428
  fi
 
4429
  ;;
 
4430
 
 
4431
aix4* | aix5*)
 
4432
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
4433
    test "$enable_shared" = yes && enable_static=no
 
4434
  fi
 
4435
    ;;
 
4436
esac
 
4437
AC_MSG_RESULT([$enable_shared])
 
4438
 
 
4439
AC_MSG_CHECKING([whether to build static libraries])
 
4440
# Make sure either enable_shared or enable_static is yes.
 
4441
test "$enable_shared" = yes || enable_static=yes
 
4442
AC_MSG_RESULT([$enable_static])
 
4443
 
 
4444
AC_LIBTOOL_CONFIG($1)
 
4445
 
 
4446
AC_LANG_POP
 
4447
CC="$lt_save_CC"
 
4448
])# AC_LIBTOOL_LANG_C_CONFIG
 
4449
 
 
4450
 
 
4451
# AC_LIBTOOL_LANG_CXX_CONFIG
 
4452
# --------------------------
 
4453
# Ensure that the configuration vars for the C compiler are
 
4454
# suitably defined.  Those variables are subsequently used by
 
4455
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
4456
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
 
4457
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
 
4458
[AC_LANG_PUSH(C++)
 
4459
AC_REQUIRE([AC_PROG_CXX])
 
4460
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
4461
 
 
4462
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4463
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
4464
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
4465
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
4466
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
4467
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4468
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
4469
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
4470
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
4471
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
4472
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
4473
_LT_AC_TAGVAR(module_cmds, $1)=
 
4474
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
4475
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
4476
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
4477
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
4478
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
4479
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
4480
 
 
4481
# Dependencies to place before and after the object being linked:
 
4482
_LT_AC_TAGVAR(predep_objects, $1)=
 
4483
_LT_AC_TAGVAR(postdep_objects, $1)=
 
4484
_LT_AC_TAGVAR(predeps, $1)=
 
4485
_LT_AC_TAGVAR(postdeps, $1)=
 
4486
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
4487
 
 
4488
# Source file extension for C++ test sources.
 
4489
ac_ext=cpp
 
4490
 
 
4491
# Object file extension for compiled C++ test sources.
 
4492
objext=o
 
4493
_LT_AC_TAGVAR(objext, $1)=$objext
 
4494
 
 
4495
# Code to be used in simple compile tests
 
4496
lt_simple_compile_test_code="int some_variable = 0;\n"
 
4497
 
 
4498
# Code to be used in simple link tests
 
4499
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
 
4500
 
 
4501
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
4502
_LT_AC_SYS_COMPILER
 
4503
 
 
4504
# save warnings/boilerplate of simple test code
 
4505
_LT_COMPILER_BOILERPLATE
 
4506
_LT_LINKER_BOILERPLATE
 
4507
 
 
4508
# Allow CC to be a program name with arguments.
 
4509
lt_save_CC=$CC
 
4510
lt_save_LD=$LD
 
4511
lt_save_GCC=$GCC
 
4512
GCC=$GXX
 
4513
lt_save_with_gnu_ld=$with_gnu_ld
 
4514
lt_save_path_LD=$lt_cv_path_LD
 
4515
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
4516
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
4517
else
 
4518
  unset lt_cv_prog_gnu_ld
 
4519
fi
 
4520
if test -n "${lt_cv_path_LDCXX+set}"; then
 
4521
  lt_cv_path_LD=$lt_cv_path_LDCXX
 
4522
else
 
4523
  unset lt_cv_path_LD
 
4524
fi
 
4525
test -z "${LDCXX+set}" || LD=$LDCXX
 
4526
CC=${CXX-"c++"}
 
4527
compiler=$CC
 
4528
_LT_AC_TAGVAR(compiler, $1)=$CC
 
4529
_LT_CC_BASENAME([$compiler])
 
4530
 
 
4531
# We don't want -fno-exception wen compiling C++ code, so set the
 
4532
# no_builtin_flag separately
 
4533
if test "$GXX" = yes; then
 
4534
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
4535
else
 
4536
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
4537
fi
 
4538
 
 
4539
if test "$GXX" = yes; then
 
4540
  # Set up default GNU C++ configuration
 
4541
 
 
4542
  AC_PROG_LD
 
4543
 
 
4544
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
4545
  # archiving commands below assume that GNU ld is being used.
 
4546
  if test "$with_gnu_ld" = yes; then
 
4547
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4548
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4549
 
 
4550
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
4551
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
4552
 
 
4553
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
4554
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
4555
    #     investigate it a little bit more. (MM)
 
4556
    wlarc='${wl}'
 
4557
 
 
4558
    # ancient GNU ld didn't support --whole-archive et. al.
 
4559
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
 
4560
        grep 'no-whole-archive' > /dev/null; then
 
4561
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
4562
    else
 
4563
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
4564
    fi
 
4565
  else
 
4566
    with_gnu_ld=no
 
4567
    wlarc=
 
4568
 
 
4569
    # A generic and very simple default shared library creation
 
4570
    # command for GNU C++ for the case where it uses the native
 
4571
    # linker, instead of GNU ld.  If possible, this setting should
 
4572
    # overridden to take advantage of the native linker features on
 
4573
    # the platform it is being used on.
 
4574
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
4575
  fi
 
4576
 
 
4577
  # Commands to make compiler produce verbose output that lists
 
4578
  # what "hidden" libraries, object files and flags are used when
 
4579
  # linking a shared library.
 
4580
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
4581
 
 
4582
else
 
4583
  GXX=no
 
4584
  with_gnu_ld=no
 
4585
  wlarc=
 
4586
fi
 
4587
 
 
4588
# PORTME: fill in a description of your system's C++ link characteristics
 
4589
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
4590
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
4591
case $host_os in
 
4592
  aix3*)
 
4593
    # FIXME: insert proper C++ library support
 
4594
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4595
    ;;
 
4596
  aix4* | aix5*)
 
4597
    if test "$host_cpu" = ia64; then
 
4598
      # On IA64, the linker does run time linking by default, so we don't
 
4599
      # have to do anything special.
 
4600
      aix_use_runtimelinking=no
 
4601
      exp_sym_flag='-Bexport'
 
4602
      no_entry_flag=""
 
4603
    else
 
4604
      aix_use_runtimelinking=no
 
4605
 
 
4606
      # Test if we are trying to use run time linking or normal
 
4607
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
4608
      # need to do runtime linking.
 
4609
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
4610
        for ld_flag in $LDFLAGS; do
 
4611
          case $ld_flag in
 
4612
          *-brtl*)
 
4613
            aix_use_runtimelinking=yes
 
4614
            break
 
4615
            ;;
 
4616
          esac
 
4617
        done
 
4618
      esac
 
4619
 
 
4620
      exp_sym_flag='-bexport'
 
4621
      no_entry_flag='-bnoentry'
 
4622
    fi
 
4623
 
 
4624
    # When large executables or shared objects are built, AIX ld can
 
4625
    # have problems creating the table of contents.  If linking a library
 
4626
    # or program results in "error TOC overflow" add -mminimal-toc to
 
4627
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
4628
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
4629
 
 
4630
    _LT_AC_TAGVAR(archive_cmds, $1)=''
 
4631
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4632
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
4633
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
4634
 
 
4635
    if test "$GXX" = yes; then
 
4636
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
4637
      # We only want to do this on AIX 4.2 and lower, the check
 
4638
      # below for broken collect2 doesn't work under 4.3+
 
4639
        collect2name=`${CC} -print-prog-name=collect2`
 
4640
        if test -f "$collect2name" && \
 
4641
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
4642
        then
 
4643
          # We have reworked collect2
 
4644
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4645
        else
 
4646
          # We have old collect2
 
4647
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
4648
          # It fails to find uninstalled libraries when the uninstalled
 
4649
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
4650
          # to unsupported forces relinking
 
4651
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
4652
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
4653
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
4654
        fi
 
4655
      esac
 
4656
      shared_flag='-shared'
 
4657
      if test "$aix_use_runtimelinking" = yes; then
 
4658
        shared_flag="$shared_flag "'${wl}-G'
 
4659
      fi
 
4660
    else
 
4661
      # not using gcc
 
4662
      if test "$host_cpu" = ia64; then
 
4663
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
4664
        # chokes on -Wl,-G. The following line is correct:
 
4665
        shared_flag='-G'
 
4666
      else
 
4667
        if test "$aix_use_runtimelinking" = yes; then
 
4668
          shared_flag='${wl}-G'
 
4669
        else
 
4670
          shared_flag='${wl}-bM:SRE'
 
4671
        fi
 
4672
      fi
 
4673
    fi
 
4674
 
 
4675
    # It seems that -bexpall does not export symbols beginning with
 
4676
    # underscore (_), so it is better to generate a list of symbols to export.
 
4677
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
4678
    if test "$aix_use_runtimelinking" = yes; then
 
4679
      # Warning - without using the other runtime loading flags (-brtl),
 
4680
      # -berok will link without error, but may produce a broken library.
 
4681
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
4682
      # Determine the default libpath from the value encoded in an empty executable.
 
4683
      _LT_AC_SYS_LIBPATH_AIX
 
4684
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
4685
 
 
4686
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
4687
     else
 
4688
      if test "$host_cpu" = ia64; then
 
4689
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
4690
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
4691
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
4692
      else
 
4693
        # Determine the default libpath from the value encoded in an empty executable.
 
4694
        _LT_AC_SYS_LIBPATH_AIX
 
4695
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
4696
        # Warning - without using the other run time loading flags,
 
4697
        # -berok will link without error, but may produce a broken library.
 
4698
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
4699
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
4700
        # -bexpall does not export symbols beginning with underscore (_)
 
4701
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
4702
        # Exported symbols can be pulled into shared objects from archives
 
4703
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
4704
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
4705
        # This is similar to how AIX traditionally builds its shared libraries.
 
4706
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
4707
      fi
 
4708
    fi
 
4709
    ;;
 
4710
  chorus*)
 
4711
    case $cc_basename in
 
4712
      *)
 
4713
        # FIXME: insert proper C++ library support
 
4714
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4715
        ;;
 
4716
    esac
 
4717
    ;;
 
4718
 
 
4719
 
 
4720
  cygwin* | mingw* | pw32*)
 
4721
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
4722
    # as there is no search path for DLLs.
 
4723
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
4724
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
4725
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
4726
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
4727
 
 
4728
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
4729
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
4730
      # If the export-symbols file already is a .def file (1st line
 
4731
      # is EXPORTS), use it as is; otherwise, prepend...
 
4732
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
4733
        cp $export_symbols $output_objdir/$soname.def;
 
4734
      else
 
4735
        echo EXPORTS > $output_objdir/$soname.def;
 
4736
        cat $export_symbols >> $output_objdir/$soname.def;
 
4737
      fi~
 
4738
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
4739
    else
 
4740
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4741
    fi
 
4742
  ;;
 
4743
      darwin* | rhapsody*)
 
4744
        case $host_os in
 
4745
        rhapsody* | darwin1.[[012]])
 
4746
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
4747
         ;;
 
4748
       *) # Darwin 1.3 on
 
4749
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
4750
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
4751
         else
 
4752
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
4753
             10.[[012]])
 
4754
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
4755
               ;;
 
4756
             10.*)
 
4757
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
4758
               ;;
 
4759
           esac
 
4760
         fi
 
4761
         ;;
 
4762
        esac
 
4763
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4764
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4765
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
4766
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
4767
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
4768
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
4769
 
 
4770
    if test "$GXX" = yes ; then
 
4771
      lt_int_apple_cc_single_mod=no
 
4772
      output_verbose_link_cmd='echo'
 
4773
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
 
4774
       lt_int_apple_cc_single_mod=yes
 
4775
      fi
 
4776
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
4777
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
4778
      else
 
4779
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
4780
        fi
 
4781
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
4782
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
4783
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
4784
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
4785
          else
 
4786
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
4787
          fi
 
4788
            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
4789
      else
 
4790
      case $cc_basename in
 
4791
        xlc*)
 
4792
         output_verbose_link_cmd='echo'
 
4793
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
 
4794
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
4795
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
4796
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
4797
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
4798
          ;;
 
4799
       *)
 
4800
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4801
          ;;
 
4802
      esac
 
4803
      fi
 
4804
        ;;
 
4805
 
 
4806
  dgux*)
 
4807
    case $cc_basename in
 
4808
      ec++*)
 
4809
        # FIXME: insert proper C++ library support
 
4810
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4811
        ;;
 
4812
      ghcx*)
 
4813
        # Green Hills C++ Compiler
 
4814
        # FIXME: insert proper C++ library support
 
4815
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4816
        ;;
 
4817
      *)
 
4818
        # FIXME: insert proper C++ library support
 
4819
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4820
        ;;
 
4821
    esac
 
4822
    ;;
 
4823
  freebsd[[12]]*)
 
4824
    # C++ shared libraries reported to be fairly broken before switch to ELF
 
4825
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4826
    ;;
 
4827
  freebsd-elf*)
 
4828
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4829
    ;;
 
4830
  freebsd* | kfreebsd*-gnu | dragonfly*)
 
4831
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
4832
    # conventions
 
4833
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
4834
    ;;
 
4835
  gnu*)
 
4836
    ;;
 
4837
  hpux9*)
 
4838
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
4839
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4840
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
4841
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4842
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
4843
                                # but as the default
 
4844
                                # location of the library.
 
4845
 
 
4846
    case $cc_basename in
 
4847
    CC*)
 
4848
      # FIXME: insert proper C++ library support
 
4849
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4850
      ;;
 
4851
    aCC*)
 
4852
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
4853
      # Commands to make compiler produce verbose output that lists
 
4854
      # what "hidden" libraries, object files and flags are used when
 
4855
      # linking a shared library.
 
4856
      #
 
4857
      # There doesn't appear to be a way to prevent this compiler from
 
4858
      # explicitly linking system object files so we need to strip them
 
4859
      # from the output so that they don't get included in the library
 
4860
      # dependencies.
 
4861
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
4862
      ;;
 
4863
    *)
 
4864
      if test "$GXX" = yes; then
 
4865
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
4866
      else
 
4867
        # FIXME: insert proper C++ library support
 
4868
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4869
      fi
 
4870
      ;;
 
4871
    esac
 
4872
    ;;
 
4873
  hpux10*|hpux11*)
 
4874
    if test $with_gnu_ld = no; then
 
4875
      case $host_cpu in
 
4876
      hppa*64*)
 
4877
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
4878
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
4879
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4880
        ;;
 
4881
      ia64*)
 
4882
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
4883
        ;;
 
4884
      *)
 
4885
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
4886
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4887
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
4888
        ;;
 
4889
      esac
 
4890
    fi
 
4891
    case $host_cpu in
 
4892
    hppa*64*)
 
4893
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4894
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4895
      ;;
 
4896
    ia64*)
 
4897
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4898
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4899
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
4900
                                              # but as the default
 
4901
                                              # location of the library.
 
4902
      ;;
 
4903
    *)
 
4904
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4905
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
4906
                                              # but as the default
 
4907
                                              # location of the library.
 
4908
      ;;
 
4909
    esac
 
4910
 
 
4911
    case $cc_basename in
 
4912
      CC*)
 
4913
        # FIXME: insert proper C++ library support
 
4914
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4915
        ;;
 
4916
      aCC*)
 
4917
        case $host_cpu in
 
4918
        hppa*64*|ia64*)
 
4919
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
4920
          ;;
 
4921
        *)
 
4922
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
4923
          ;;
 
4924
        esac
 
4925
        # Commands to make compiler produce verbose output that lists
 
4926
        # what "hidden" libraries, object files and flags are used when
 
4927
        # linking a shared library.
 
4928
        #
 
4929
        # There doesn't appear to be a way to prevent this compiler from
 
4930
        # explicitly linking system object files so we need to strip them
 
4931
        # from the output so that they don't get included in the library
 
4932
        # dependencies.
 
4933
        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
4934
        ;;
 
4935
      *)
 
4936
        if test "$GXX" = yes; then
 
4937
          if test $with_gnu_ld = no; then
 
4938
            case $host_cpu in
 
4939
            ia64*|hppa*64*)
 
4940
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
4941
              ;;
 
4942
            *)
 
4943
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
4944
              ;;
 
4945
            esac
 
4946
          fi
 
4947
        else
 
4948
          # FIXME: insert proper C++ library support
 
4949
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4950
        fi
 
4951
        ;;
 
4952
    esac
 
4953
    ;;
 
4954
  irix5* | irix6*)
 
4955
    case $cc_basename in
 
4956
      CC*)
 
4957
        # SGI C++
 
4958
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
4959
 
 
4960
        # Archives containing C++ object files must be created using
 
4961
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
4962
        # necessary to make sure instantiated templates are included
 
4963
        # in the archive.
 
4964
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
4965
        ;;
 
4966
      *)
 
4967
        if test "$GXX" = yes; then
 
4968
          if test "$with_gnu_ld" = no; then
 
4969
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
4970
          else
 
4971
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
 
4972
          fi
 
4973
        fi
 
4974
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
4975
        ;;
 
4976
    esac
 
4977
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
4978
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4979
    ;;
 
4980
  linux*)
 
4981
    case $cc_basename in
 
4982
      KCC*)
 
4983
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
4984
 
 
4985
        # KCC will only create a shared library if the output file
 
4986
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
4987
        # to its proper name (with version) after linking.
 
4988
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
4989
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 
4990
        # Commands to make compiler produce verbose output that lists
 
4991
        # what "hidden" libraries, object files and flags are used when
 
4992
        # linking a shared library.
 
4993
        #
 
4994
        # There doesn't appear to be a way to prevent this compiler from
 
4995
        # explicitly linking system object files so we need to strip them
 
4996
        # from the output so that they don't get included in the library
 
4997
        # dependencies.
 
4998
        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
4999
 
 
5000
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
 
5001
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
5002
 
 
5003
        # Archives containing C++ object files must be created using
 
5004
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
5005
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
5006
        ;;
 
5007
      icpc*)
 
5008
        # Intel C++
 
5009
        with_gnu_ld=yes
 
5010
        # version 8.0 and above of icpc choke on multiply defined symbols
 
5011
        # if we add $predep_objects and $postdep_objects, however 7.1 and
 
5012
        # earlier do not add the objects themselves.
 
5013
        case `$CC -V 2>&1` in
 
5014
        *"Version 7."*)
 
5015
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5016
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5017
          ;;
 
5018
        *)  # Version 8.0 or newer
 
5019
          tmp_idyn=
 
5020
          case $host_cpu in
 
5021
            ia64*) tmp_idyn=' -i_dynamic';;
 
5022
          esac
 
5023
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5024
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
5025
          ;;
 
5026
        esac
 
5027
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5028
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5029
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
5030
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
5031
        ;;
 
5032
      pgCC*)
 
5033
        # Portland Group C++ compiler
 
5034
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
5035
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 
5036
 
 
5037
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
5038
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
5039
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
5040
        ;;
 
5041
      cxx*)
 
5042
        # Compaq C++
 
5043
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5044
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
5045
 
 
5046
        runpath_var=LD_RUN_PATH
 
5047
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
5048
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5049
 
 
5050
        # Commands to make compiler produce verbose output that lists
 
5051
        # what "hidden" libraries, object files and flags are used when
 
5052
        # linking a shared library.
 
5053
        #
 
5054
        # There doesn't appear to be a way to prevent this compiler from
 
5055
        # explicitly linking system object files so we need to strip them
 
5056
        # from the output so that they don't get included in the library
 
5057
        # dependencies.
 
5058
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
5059
        ;;
 
5060
    esac
 
5061
    ;;
 
5062
  lynxos*)
 
5063
    # FIXME: insert proper C++ library support
 
5064
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5065
    ;;
 
5066
  m88k*)
 
5067
    # FIXME: insert proper C++ library support
 
5068
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5069
    ;;
 
5070
  mvs*)
 
5071
    case $cc_basename in
 
5072
      cxx*)
 
5073
        # FIXME: insert proper C++ library support
 
5074
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5075
        ;;
 
5076
      *)
 
5077
        # FIXME: insert proper C++ library support
 
5078
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5079
        ;;
 
5080
    esac
 
5081
    ;;
 
5082
  netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
5083
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
5084
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
5085
      wlarc=
 
5086
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5087
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5088
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5089
    fi
 
5090
    # Workaround some broken pre-1.5 toolchains
 
5091
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
5092
    ;;
 
5093
  openbsd2*)
 
5094
    # C++ shared libraries are fairly broken
 
5095
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5096
    ;;
 
5097
  openbsd*)
 
5098
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5099
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5100
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
5101
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5102
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
5103
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
 
5104
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5105
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
5106
    fi
 
5107
    output_verbose_link_cmd='echo'
 
5108
    ;;
 
5109
  osf3*)
 
5110
    case $cc_basename in
 
5111
      KCC*)
 
5112
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
5113
 
 
5114
        # KCC will only create a shared library if the output file
 
5115
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
5116
        # to its proper name (with version) after linking.
 
5117
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
5118
 
 
5119
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5120
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5121
 
 
5122
        # Archives containing C++ object files must be created using
 
5123
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
5124
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
5125
 
 
5126
        ;;
 
5127
      RCC*)
 
5128
        # Rational C++ 2.4.1
 
5129
        # FIXME: insert proper C++ library support
 
5130
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5131
        ;;
 
5132
      cxx*)
 
5133
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
5134
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
5135
 
 
5136
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5137
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5138
 
 
5139
        # Commands to make compiler produce verbose output that lists
 
5140
        # what "hidden" libraries, object files and flags are used when
 
5141
        # linking a shared library.
 
5142
        #
 
5143
        # There doesn't appear to be a way to prevent this compiler from
 
5144
        # explicitly linking system object files so we need to strip them
 
5145
        # from the output so that they don't get included in the library
 
5146
        # dependencies.
 
5147
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
5148
        ;;
 
5149
      *)
 
5150
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
5151
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
5152
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5153
 
 
5154
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5155
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5156
 
 
5157
          # Commands to make compiler produce verbose output that lists
 
5158
          # what "hidden" libraries, object files and flags are used when
 
5159
          # linking a shared library.
 
5160
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
5161
 
 
5162
        else
 
5163
          # FIXME: insert proper C++ library support
 
5164
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5165
        fi
 
5166
        ;;
 
5167
    esac
 
5168
    ;;
 
5169
  osf4* | osf5*)
 
5170
    case $cc_basename in
 
5171
      KCC*)
 
5172
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
5173
 
 
5174
        # KCC will only create a shared library if the output file
 
5175
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
5176
        # to its proper name (with version) after linking.
 
5177
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
5178
 
 
5179
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5180
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5181
 
 
5182
        # Archives containing C++ object files must be created using
 
5183
        # the KAI C++ compiler.
 
5184
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 
5185
        ;;
 
5186
      RCC*)
 
5187
        # Rational C++ 2.4.1
 
5188
        # FIXME: insert proper C++ library support
 
5189
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5190
        ;;
 
5191
      cxx*)
 
5192
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
5193
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
5194
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
5195
          echo "-hidden">> $lib.exp~
 
5196
          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
 
5197
          $rm $lib.exp'
 
5198
 
 
5199
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
5200
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5201
 
 
5202
        # Commands to make compiler produce verbose output that lists
 
5203
        # what "hidden" libraries, object files and flags are used when
 
5204
        # linking a shared library.
 
5205
        #
 
5206
        # There doesn't appear to be a way to prevent this compiler from
 
5207
        # explicitly linking system object files so we need to strip them
 
5208
        # from the output so that they don't get included in the library
 
5209
        # dependencies.
 
5210
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
5211
        ;;
 
5212
      *)
 
5213
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
5214
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
5215
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
5216
 
 
5217
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5218
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5219
 
 
5220
          # Commands to make compiler produce verbose output that lists
 
5221
          # what "hidden" libraries, object files and flags are used when
 
5222
          # linking a shared library.
 
5223
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
5224
 
 
5225
        else
 
5226
          # FIXME: insert proper C++ library support
 
5227
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5228
        fi
 
5229
        ;;
 
5230
    esac
 
5231
    ;;
 
5232
  psos*)
 
5233
    # FIXME: insert proper C++ library support
 
5234
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5235
    ;;
 
5236
  sco*)
 
5237
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5238
    case $cc_basename in
 
5239
      CC*)
 
5240
        # FIXME: insert proper C++ library support
 
5241
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5242
        ;;
 
5243
      *)
 
5244
        # FIXME: insert proper C++ library support
 
5245
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5246
        ;;
 
5247
    esac
 
5248
    ;;
 
5249
  sunos4*)
 
5250
    case $cc_basename in
 
5251
      CC*)
 
5252
        # Sun C++ 4.x
 
5253
        # FIXME: insert proper C++ library support
 
5254
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5255
        ;;
 
5256
      lcc*)
 
5257
        # Lucid
 
5258
        # FIXME: insert proper C++ library support
 
5259
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5260
        ;;
 
5261
      *)
 
5262
        # FIXME: insert proper C++ library support
 
5263
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5264
        ;;
 
5265
    esac
 
5266
    ;;
 
5267
  solaris*)
 
5268
    case $cc_basename in
 
5269
      CC*)
 
5270
        # Sun C++ 4.2, 5.x and Centerline C++
 
5271
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
 
5272
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
5273
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
5274
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5275
        $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
5276
 
 
5277
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5278
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5279
        case $host_os in
 
5280
          solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
5281
          *)
 
5282
            # The C++ compiler is used as linker so we must use $wl
 
5283
            # flag to pass the commands to the underlying system
 
5284
            # linker. We must also pass each convience library through
 
5285
            # to the system linker between allextract/defaultextract.
 
5286
            # The C++ compiler will combine linker options so we
 
5287
            # cannot just pass the convience library names through
 
5288
            # without $wl.
 
5289
            # Supported since Solaris 2.6 (maybe 2.5.1?)
 
5290
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
 
5291
            ;;
 
5292
        esac
 
5293
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5294
 
 
5295
        output_verbose_link_cmd='echo'
 
5296
 
 
5297
        # Archives containing C++ object files must be created using
 
5298
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
5299
        # necessary to make sure instantiated templates are included
 
5300
        # in the archive.
 
5301
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
5302
        ;;
 
5303
      gcx*)
 
5304
        # Green Hills C++ Compiler
 
5305
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
5306
 
 
5307
        # The C++ compiler must be used to create the archive.
 
5308
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
5309
        ;;
 
5310
      *)
 
5311
        # GNU C++ compiler with Solaris linker
 
5312
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
5313
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
5314
          if $CC --version | grep -v '^2\.7' > /dev/null; then
 
5315
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
5316
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5317
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
5318
 
 
5319
            # Commands to make compiler produce verbose output that lists
 
5320
            # what "hidden" libraries, object files and flags are used when
 
5321
            # linking a shared library.
 
5322
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
5323
          else
 
5324
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
5325
            # platform.
 
5326
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
5327
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5328
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
5329
 
 
5330
            # Commands to make compiler produce verbose output that lists
 
5331
            # what "hidden" libraries, object files and flags are used when
 
5332
            # linking a shared library.
 
5333
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
5334
          fi
 
5335
 
 
5336
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
5337
        fi
 
5338
        ;;
 
5339
    esac
 
5340
    ;;
 
5341
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
 
5342
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5343
    ;;
 
5344
  tandem*)
 
5345
    case $cc_basename in
 
5346
      NCC*)
 
5347
        # NonStop-UX NCC 3.20
 
5348
        # FIXME: insert proper C++ library support
 
5349
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5350
        ;;
 
5351
      *)
 
5352
        # FIXME: insert proper C++ library support
 
5353
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5354
        ;;
 
5355
    esac
 
5356
    ;;
 
5357
  vxworks*)
 
5358
    # FIXME: insert proper C++ library support
 
5359
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5360
    ;;
 
5361
  *)
 
5362
    # FIXME: insert proper C++ library support
 
5363
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5364
    ;;
 
5365
esac
 
5366
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
5367
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
5368
 
 
5369
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
5370
_LT_AC_TAGVAR(LD, $1)="$LD"
 
5371
 
 
5372
AC_LIBTOOL_POSTDEP_PREDEP($1)
 
5373
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
5374
AC_LIBTOOL_PROG_CC_C_O($1)
 
5375
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
5376
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
5377
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
5378
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
5379
AC_LIBTOOL_SYS_LIB_STRIP
 
5380
AC_LIBTOOL_DLOPEN_SELF($1)
 
5381
 
 
5382
AC_LIBTOOL_CONFIG($1)
 
5383
 
 
5384
AC_LANG_POP
 
5385
CC=$lt_save_CC
 
5386
LDCXX=$LD
 
5387
LD=$lt_save_LD
 
5388
GCC=$lt_save_GCC
 
5389
with_gnu_ldcxx=$with_gnu_ld
 
5390
with_gnu_ld=$lt_save_with_gnu_ld
 
5391
lt_cv_path_LDCXX=$lt_cv_path_LD
 
5392
lt_cv_path_LD=$lt_save_path_LD
 
5393
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
5394
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
5395
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
5396
 
 
5397
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
 
5398
# ------------------------
 
5399
# Figure out "hidden" library dependencies from verbose
 
5400
# compiler output when linking a shared library.
 
5401
# Parse the compiler output and extract the necessary
 
5402
# objects, libraries and library flags.
 
5403
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
 
5404
dnl we can't use the lt_simple_compile_test_code here,
 
5405
dnl because it contains code intended for an executable,
 
5406
dnl not a library.  It's possible we should let each
 
5407
dnl tag define a new lt_????_link_test_code variable,
 
5408
dnl but it's only used here...
 
5409
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
 
5410
int a;
 
5411
void foo (void) { a = 0; }
 
5412
EOF
 
5413
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
 
5414
class Foo
 
5415
{
 
5416
public:
 
5417
  Foo (void) { a = 0; }
 
5418
private:
 
5419
  int a;
 
5420
};
 
5421
EOF
 
5422
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
 
5423
      subroutine foo
 
5424
      implicit none
 
5425
      integer*4 a
 
5426
      a=0
 
5427
      return
 
5428
      end
 
5429
EOF
 
5430
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
 
5431
public class foo {
 
5432
  private int a;
 
5433
  public void bar (void) {
 
5434
    a = 0;
 
5435
  }
 
5436
};
 
5437
EOF
 
5438
])
 
5439
dnl Parse the compiler output and extract the necessary
 
5440
dnl objects, libraries and library flags.
 
5441
if AC_TRY_EVAL(ac_compile); then
 
5442
  # Parse the compiler output and extract the necessary
 
5443
  # objects, libraries and library flags.
 
5444
 
 
5445
  # Sentinel used to keep track of whether or not we are before
 
5446
  # the conftest object file.
 
5447
  pre_test_object_deps_done=no
 
5448
 
 
5449
  # The `*' in the case matches for architectures that use `case' in
 
5450
  # $output_verbose_cmd can trigger glob expansion during the loop
 
5451
  # eval without this substitution.
 
5452
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
 
5453
 
 
5454
  for p in `eval $output_verbose_link_cmd`; do
 
5455
    case $p in
 
5456
 
 
5457
    -L* | -R* | -l*)
 
5458
       # Some compilers place space between "-{L,R}" and the path.
 
5459
       # Remove the space.
 
5460
       if test $p = "-L" \
 
5461
          || test $p = "-R"; then
 
5462
         prev=$p
 
5463
         continue
 
5464
       else
 
5465
         prev=
 
5466
       fi
 
5467
 
 
5468
       if test "$pre_test_object_deps_done" = no; then
 
5469
         case $p in
 
5470
         -L* | -R*)
 
5471
           # Internal compiler library paths should come after those
 
5472
           # provided the user.  The postdeps already come after the
 
5473
           # user supplied libs so there is no need to process them.
 
5474
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
5475
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
5476
           else
 
5477
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
5478
           fi
 
5479
           ;;
 
5480
         # The "-l" case would never come before the object being
 
5481
         # linked, so don't bother handling this case.
 
5482
         esac
 
5483
       else
 
5484
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
 
5485
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
 
5486
         else
 
5487
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
 
5488
         fi
 
5489
       fi
 
5490
       ;;
 
5491
 
 
5492
    *.$objext)
 
5493
       # This assumes that the test object file only shows up
 
5494
       # once in the compiler output.
 
5495
       if test "$p" = "conftest.$objext"; then
 
5496
         pre_test_object_deps_done=yes
 
5497
         continue
 
5498
       fi
 
5499
 
 
5500
       if test "$pre_test_object_deps_done" = no; then
 
5501
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
 
5502
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
 
5503
         else
 
5504
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
 
5505
         fi
 
5506
       else
 
5507
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
 
5508
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
 
5509
         else
 
5510
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
 
5511
         fi
 
5512
       fi
 
5513
       ;;
 
5514
 
 
5515
    *) ;; # Ignore the rest.
 
5516
 
 
5517
    esac
 
5518
  done
 
5519
 
 
5520
  # Clean up.
 
5521
  rm -f a.out a.exe
 
5522
else
 
5523
  echo "libtool.m4: error: problem compiling $1 test program"
 
5524
fi
 
5525
 
 
5526
$rm -f confest.$objext
 
5527
 
 
5528
# PORTME: override above test on systems where it is broken
 
5529
ifelse([$1],[CXX],
 
5530
[case $host_os in
 
5531
solaris*)
 
5532
  case $cc_basename in
 
5533
  CC*)
 
5534
    # Adding this requires a known-good setup of shared libraries for
 
5535
    # Sun compiler versions before 5.6, else PIC objects from an old
 
5536
    # archive will be linked into the output, leading to subtle bugs.
 
5537
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
 
5538
    ;;
 
5539
  esac
 
5540
esac
 
5541
])
 
5542
 
 
5543
case " $_LT_AC_TAGVAR(postdeps, $1) " in
 
5544
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
5545
esac
 
5546
])# AC_LIBTOOL_POSTDEP_PREDEP
 
5547
 
 
5548
# AC_LIBTOOL_LANG_F77_CONFIG
 
5549
# ------------------------
 
5550
# Ensure that the configuration vars for the C compiler are
 
5551
# suitably defined.  Those variables are subsequently used by
 
5552
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
5553
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
 
5554
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
 
5555
[AC_REQUIRE([AC_PROG_F77])
 
5556
AC_LANG_PUSH(Fortran 77)
 
5557
 
 
5558
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5559
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
5560
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
5561
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
5562
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
5563
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5564
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5565
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
5566
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
5567
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
5568
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
5569
_LT_AC_TAGVAR(module_cmds, $1)=
 
5570
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
5571
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
5572
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
5573
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
5574
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5575
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
5576
 
 
5577
# Source file extension for f77 test sources.
 
5578
ac_ext=f
 
5579
 
 
5580
# Object file extension for compiled f77 test sources.
 
5581
objext=o
 
5582
_LT_AC_TAGVAR(objext, $1)=$objext
 
5583
 
 
5584
# Code to be used in simple compile tests
 
5585
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
5586
 
 
5587
# Code to be used in simple link tests
 
5588
lt_simple_link_test_code="      program t\n      end\n"
 
5589
 
 
5590
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
5591
_LT_AC_SYS_COMPILER
 
5592
 
 
5593
# save warnings/boilerplate of simple test code
 
5594
_LT_COMPILER_BOILERPLATE
 
5595
_LT_LINKER_BOILERPLATE
 
5596
 
 
5597
# Allow CC to be a program name with arguments.
 
5598
lt_save_CC="$CC"
 
5599
CC=${F77-"f77"}
 
5600
compiler=$CC
 
5601
_LT_AC_TAGVAR(compiler, $1)=$CC
 
5602
_LT_CC_BASENAME([$compiler])
 
5603
 
 
5604
AC_MSG_CHECKING([if libtool supports shared libraries])
 
5605
AC_MSG_RESULT([$can_build_shared])
 
5606
 
 
5607
AC_MSG_CHECKING([whether to build shared libraries])
 
5608
test "$can_build_shared" = "no" && enable_shared=no
 
5609
 
 
5610
# On AIX, shared libraries and static libraries use the same namespace, and
 
5611
# are all built from PIC.
 
5612
case $host_os in
 
5613
aix3*)
 
5614
  test "$enable_shared" = yes && enable_static=no
 
5615
  if test -n "$RANLIB"; then
 
5616
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
5617
    postinstall_cmds='$RANLIB $lib'
 
5618
  fi
 
5619
  ;;
 
5620
aix4* | aix5*)
 
5621
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
5622
    test "$enable_shared" = yes && enable_static=no
 
5623
  fi
 
5624
  ;;
 
5625
esac
 
5626
AC_MSG_RESULT([$enable_shared])
 
5627
 
 
5628
AC_MSG_CHECKING([whether to build static libraries])
 
5629
# Make sure either enable_shared or enable_static is yes.
 
5630
test "$enable_shared" = yes || enable_static=yes
 
5631
AC_MSG_RESULT([$enable_static])
 
5632
 
 
5633
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
5634
 
 
5635
_LT_AC_TAGVAR(GCC, $1)="$G77"
 
5636
_LT_AC_TAGVAR(LD, $1)="$LD"
 
5637
 
 
5638
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
5639
AC_LIBTOOL_PROG_CC_C_O($1)
 
5640
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
5641
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
5642
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
5643
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
5644
AC_LIBTOOL_SYS_LIB_STRIP
 
5645
 
 
5646
 
 
5647
AC_LIBTOOL_CONFIG($1)
 
5648
 
 
5649
AC_LANG_POP
 
5650
CC="$lt_save_CC"
 
5651
])# AC_LIBTOOL_LANG_F77_CONFIG
 
5652
 
 
5653
 
 
5654
# AC_LIBTOOL_LANG_GCJ_CONFIG
 
5655
# --------------------------
 
5656
# Ensure that the configuration vars for the C compiler are
 
5657
# suitably defined.  Those variables are subsequently used by
 
5658
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
5659
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
 
5660
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
 
5661
[AC_LANG_SAVE
 
5662
 
 
5663
# Source file extension for Java test sources.
 
5664
ac_ext=java
 
5665
 
 
5666
# Object file extension for compiled Java test sources.
 
5667
objext=o
 
5668
_LT_AC_TAGVAR(objext, $1)=$objext
 
5669
 
 
5670
# Code to be used in simple compile tests
 
5671
lt_simple_compile_test_code="class foo {}\n"
 
5672
 
 
5673
# Code to be used in simple link tests
 
5674
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
 
5675
 
 
5676
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
5677
_LT_AC_SYS_COMPILER
 
5678
 
 
5679
# save warnings/boilerplate of simple test code
 
5680
_LT_COMPILER_BOILERPLATE
 
5681
_LT_LINKER_BOILERPLATE
 
5682
 
 
5683
# Allow CC to be a program name with arguments.
 
5684
lt_save_CC="$CC"
 
5685
CC=${GCJ-"gcj"}
 
5686
compiler=$CC
 
5687
_LT_AC_TAGVAR(compiler, $1)=$CC
 
5688
_LT_CC_BASENAME([$compiler])
 
5689
 
 
5690
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
5691
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5692
 
 
5693
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
5694
 
 
5695
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
5696
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
5697
AC_LIBTOOL_PROG_CC_C_O($1)
 
5698
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
5699
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
5700
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
5701
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
5702
AC_LIBTOOL_SYS_LIB_STRIP
 
5703
AC_LIBTOOL_DLOPEN_SELF($1)
 
5704
 
 
5705
AC_LIBTOOL_CONFIG($1)
 
5706
 
 
5707
AC_LANG_RESTORE
 
5708
CC="$lt_save_CC"
 
5709
])# AC_LIBTOOL_LANG_GCJ_CONFIG
 
5710
 
 
5711
 
 
5712
# AC_LIBTOOL_LANG_RC_CONFIG
 
5713
# --------------------------
 
5714
# Ensure that the configuration vars for the Windows resource compiler are
 
5715
# suitably defined.  Those variables are subsequently used by
 
5716
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
5717
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
 
5718
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
 
5719
[AC_LANG_SAVE
 
5720
 
 
5721
# Source file extension for RC test sources.
 
5722
ac_ext=rc
 
5723
 
 
5724
# Object file extension for compiled RC test sources.
 
5725
objext=o
 
5726
_LT_AC_TAGVAR(objext, $1)=$objext
 
5727
 
 
5728
# Code to be used in simple compile tests
 
5729
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
5730
 
 
5731
# Code to be used in simple link tests
 
5732
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
5733
 
 
5734
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
5735
_LT_AC_SYS_COMPILER
 
5736
 
 
5737
# save warnings/boilerplate of simple test code
 
5738
_LT_COMPILER_BOILERPLATE
 
5739
_LT_LINKER_BOILERPLATE
 
5740
 
 
5741
# Allow CC to be a program name with arguments.
 
5742
lt_save_CC="$CC"
 
5743
CC=${RC-"windres"}
 
5744
compiler=$CC
 
5745
_LT_AC_TAGVAR(compiler, $1)=$CC
 
5746
_LT_CC_BASENAME([$compiler])
 
5747
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
5748
 
 
5749
AC_LIBTOOL_CONFIG($1)
 
5750
 
 
5751
AC_LANG_RESTORE
 
5752
CC="$lt_save_CC"
 
5753
])# AC_LIBTOOL_LANG_RC_CONFIG
 
5754
 
 
5755
 
 
5756
# AC_LIBTOOL_CONFIG([TAGNAME])
 
5757
# ----------------------------
 
5758
# If TAGNAME is not passed, then create an initial libtool script
 
5759
# with a default configuration from the untagged config vars.  Otherwise
 
5760
# add code to config.status for appending the configuration named by
 
5761
# TAGNAME from the matching tagged config vars.
 
5762
AC_DEFUN([AC_LIBTOOL_CONFIG],
 
5763
[# The else clause should only fire when bootstrapping the
3186
5764
# libtool distribution, otherwise you forgot to ship ltmain.sh
3187
5765
# with your package, and you will get complaints that there are
3188
5766
# no rules to generate ltmain.sh.
3189
5767
if test -f "$ltmain"; then
3190
 
  :
3191
 
else
3192
 
  # If there is no Makefile yet, we rely on a make rule to execute
3193
 
  # `config.status --recheck' to rerun these tests and create the
3194
 
  # libtool script then.
3195
 
  test -f Makefile && make "$ltmain"
3196
 
fi
3197
 
 
3198
 
if test -f "$ltmain"; then
3199
 
  trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3200
 
  $rm -f "${ofile}T"
3201
 
 
3202
 
  echo creating $ofile
3203
 
 
 
5768
  # See if we are running on zsh, and set the options which allow our commands through
 
5769
  # without removal of \ escapes.
 
5770
  if test -n "${ZSH_VERSION+set}" ; then
 
5771
    setopt NO_GLOB_SUBST
 
5772
  fi
3204
5773
  # Now quote all the things that may contain metacharacters while being
3205
5774
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
3206
5775
  # variables and quote the copies for generation of the libtool script.
3207
 
  for var in echo old_CC old_CFLAGS \
3208
 
    AR AR_FLAGS CC LD LN_S NM SHELL \
3209
 
    reload_flag reload_cmds wl \
3210
 
    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3211
 
    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3212
 
    library_names_spec soname_spec \
3213
 
    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3214
 
    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3215
 
    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3216
 
    old_striplib striplib file_magic_cmd export_symbols_cmds \
3217
 
    deplibs_check_method allow_undefined_flag no_undefined_flag \
3218
 
    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3219
 
    global_symbol_to_c_name_address \
3220
 
    hardcode_libdir_flag_spec hardcode_libdir_separator  \
 
5776
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
 
5777
    SED SHELL STRIP \
 
5778
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 
5779
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 
5780
    deplibs_check_method reload_flag reload_cmds need_locks \
 
5781
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 
5782
    lt_cv_sys_global_symbol_to_c_name_address \
3221
5783
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3222
 
    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
 
5784
    old_postinstall_cmds old_postuninstall_cmds \
 
5785
    _LT_AC_TAGVAR(compiler, $1) \
 
5786
    _LT_AC_TAGVAR(CC, $1) \
 
5787
    _LT_AC_TAGVAR(LD, $1) \
 
5788
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
 
5789
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
 
5790
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
 
5791
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
 
5792
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
 
5793
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
 
5794
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
 
5795
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
 
5796
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
 
5797
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
 
5798
    _LT_AC_TAGVAR(predep_objects, $1) \
 
5799
    _LT_AC_TAGVAR(postdep_objects, $1) \
 
5800
    _LT_AC_TAGVAR(predeps, $1) \
 
5801
    _LT_AC_TAGVAR(postdeps, $1) \
 
5802
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
 
5803
    _LT_AC_TAGVAR(archive_cmds, $1) \
 
5804
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
 
5805
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
 
5806
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
 
5807
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
 
5808
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
 
5809
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
 
5810
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
 
5811
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
 
5812
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
 
5813
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
 
5814
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
 
5815
    _LT_AC_TAGVAR(module_cmds, $1) \
 
5816
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
 
5817
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
 
5818
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
 
5819
    _LT_AC_TAGVAR(include_expsyms, $1); do
3223
5820
 
3224
5821
    case $var in
3225
 
    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
 
5822
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
 
5823
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
 
5824
    _LT_AC_TAGVAR(archive_cmds, $1) | \
 
5825
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
 
5826
    _LT_AC_TAGVAR(module_cmds, $1) | \
 
5827
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
 
5828
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
 
5829
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
 
5830
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 
5831
    postinstall_cmds | postuninstall_cmds | \
3226
5832
    old_postinstall_cmds | old_postuninstall_cmds | \
3227
 
    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3228
 
    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3229
 
    postinstall_cmds | postuninstall_cmds | \
3230
 
    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 
5833
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3231
5834
      # Double-quote double-evaled strings.
3232
5835
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3233
5836
      ;;
3237
5840
    esac
3238
5841
  done
3239
5842
 
3240
 
  cat <<__EOF__ > "${ofile}T"
3241
 
#! $SHELL
3242
 
 
3243
 
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
5843
  case $lt_echo in
 
5844
  *'\[$]0 --fallback-echo"')
 
5845
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
 
5846
    ;;
 
5847
  esac
 
5848
 
 
5849
ifelse([$1], [],
 
5850
  [cfgfile="${ofile}T"
 
5851
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
 
5852
  $rm -f "$cfgfile"
 
5853
  AC_MSG_NOTICE([creating $ofile])],
 
5854
  [cfgfile="$ofile"])
 
5855
 
 
5856
  cat <<__EOF__ >> "$cfgfile"
 
5857
ifelse([$1], [],
 
5858
[#! $SHELL
 
5859
 
 
5860
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3244
5861
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3245
5862
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3246
5863
#
3247
 
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
 
5864
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
 
5865
# Free Software Foundation, Inc.
 
5866
#
 
5867
# This file is part of GNU Libtool:
3248
5868
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3249
5869
#
3250
5870
# This program is free software; you can redistribute it and/or modify
3259
5879
#
3260
5880
# You should have received a copy of the GNU General Public License
3261
5881
# along with this program; if not, write to the Free Software
3262
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
5882
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3263
5883
#
3264
5884
# As a special exception to the GNU General Public License, if you
3265
5885
# distribute this file as part of a program that contains a
3266
5886
# configuration script generated by Autoconf, you may include it under
3267
5887
# the same distribution terms that you use for the rest of that program.
3268
5888
 
 
5889
# A sed program that does not truncate output.
 
5890
SED=$lt_SED
 
5891
 
3269
5892
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3270
 
Xsed="sed -e s/^X//"
 
5893
Xsed="$SED -e 1s/^X//"
3271
5894
 
3272
5895
# The HP-UX ksh and POSIX shell print the target directory to stdout
3273
5896
# if CDPATH is set.
3274
 
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3275
 
 
3276
 
# ### BEGIN LIBTOOL CONFIG
 
5897
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
5898
 
 
5899
# The names of the tagged configurations supported by this script.
 
5900
available_tags=
 
5901
 
 
5902
# ### BEGIN LIBTOOL CONFIG],
 
5903
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
3277
5904
 
3278
5905
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3279
5906
 
3287
5914
build_old_libs=$enable_static
3288
5915
 
3289
5916
# Whether or not to add -lc for building shared libraries.
3290
 
build_libtool_need_lc=$need_lc
 
5917
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
 
5918
 
 
5919
# Whether or not to disallow shared libs when runtime libs are static
 
5920
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
3291
5921
 
3292
5922
# Whether or not to optimize for fast installation.
3293
5923
fast_install=$enable_fast_install
3295
5925
# The host system.
3296
5926
host_alias=$host_alias
3297
5927
host=$host
 
5928
host_os=$host_os
 
5929
 
 
5930
# The build system.
 
5931
build_alias=$build_alias
 
5932
build=$build
 
5933
build_os=$build_os
3298
5934
 
3299
5935
# An echo program that does not interpret backslashes.
3300
5936
echo=$lt_echo
3303
5939
AR=$lt_AR
3304
5940
AR_FLAGS=$lt_AR_FLAGS
3305
5941
 
3306
 
# The default C compiler.
3307
 
CC=$lt_CC
 
5942
# A C compiler.
 
5943
LTCC=$lt_LTCC
 
5944
 
 
5945
# A language-specific compiler.
 
5946
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
3308
5947
 
3309
5948
# Is the compiler the GNU C compiler?
3310
 
with_gcc=$GCC
 
5949
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
5950
 
 
5951
# An ERE matcher.
 
5952
EGREP=$lt_EGREP
3311
5953
 
3312
5954
# The linker used to build libraries.
3313
 
LD=$lt_LD
 
5955
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
3314
5956
 
3315
5957
# Whether we need hard or soft links.
3316
5958
LN_S=$lt_LN_S
3319
5961
NM=$lt_NM
3320
5962
 
3321
5963
# A symbol stripping program
3322
 
STRIP=$STRIP
 
5964
STRIP=$lt_STRIP
3323
5965
 
3324
5966
# Used to examine libraries when file_magic_cmd begins "file"
3325
5967
MAGIC_CMD=$MAGIC_CMD
3341
5983
reload_cmds=$lt_reload_cmds
3342
5984
 
3343
5985
# How to pass a linker flag through the compiler.
3344
 
wl=$lt_wl
 
5986
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
3345
5987
 
3346
5988
# Object file suffix (normally "o").
3347
5989
objext="$ac_objext"
3349
5991
# Old archive suffix (normally "a").
3350
5992
libext="$libext"
3351
5993
 
 
5994
# Shared library suffix (normally ".so").
 
5995
shrext_cmds='$shrext_cmds'
 
5996
 
3352
5997
# Executable file suffix (normally "").
3353
5998
exeext="$exeext"
3354
5999
 
3355
6000
# Additional compiler flags for building library objects.
3356
 
pic_flag=$lt_pic_flag
 
6001
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
3357
6002
pic_mode=$pic_mode
3358
6003
 
 
6004
# What is the maximum length of a command?
 
6005
max_cmd_len=$lt_cv_sys_max_cmd_len
 
6006
 
3359
6007
# Does compiler simultaneously support -c and -o options?
3360
 
compiler_c_o=$lt_compiler_c_o
3361
 
 
3362
 
# Can we write directly to a .lo ?
3363
 
compiler_o_lo=$lt_compiler_o_lo
3364
 
 
3365
 
# Must we lock files when doing compilation ?
 
6008
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
 
6009
 
 
6010
# Must we lock files when doing compilation?
3366
6011
need_locks=$lt_need_locks
3367
6012
 
3368
6013
# Do we need the lib prefix for modules?
3381
6026
dlopen_self_static=$enable_dlopen_self_static
3382
6027
 
3383
6028
# Compiler flag to prevent dynamic linking.
3384
 
link_static_flag=$lt_link_static_flag
 
6029
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
3385
6030
 
3386
6031
# Compiler flag to turn off builtin functions.
3387
 
no_builtin_flag=$lt_no_builtin_flag
 
6032
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
3388
6033
 
3389
6034
# Compiler flag to allow reflexive dlopens.
3390
 
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
 
6035
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
3391
6036
 
3392
6037
# Compiler flag to generate shared objects directly from archives.
3393
 
whole_archive_flag_spec=$lt_whole_archive_flag_spec
 
6038
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
3394
6039
 
3395
6040
# Compiler flag to generate thread-safe objects.
3396
 
thread_safe_flag_spec=$lt_thread_safe_flag_spec
 
6041
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
3397
6042
 
3398
6043
# Library versioning type.
3399
6044
version_type=$version_type
3410
6055
 
3411
6056
# Commands used to build and install an old-style archive.
3412
6057
RANLIB=$lt_RANLIB
3413
 
old_archive_cmds=$lt_old_archive_cmds
 
6058
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
3414
6059
old_postinstall_cmds=$lt_old_postinstall_cmds
3415
6060
old_postuninstall_cmds=$lt_old_postuninstall_cmds
3416
6061
 
3417
6062
# Create an old-style archive from a shared archive.
3418
 
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
 
6063
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
3419
6064
 
3420
6065
# Create a temporary old-style archive to link instead of a shared archive.
3421
 
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
 
6066
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
3422
6067
 
3423
6068
# Commands used to build and install a shared archive.
3424
 
archive_cmds=$lt_archive_cmds
3425
 
archive_expsym_cmds=$lt_archive_expsym_cmds
 
6069
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
 
6070
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
3426
6071
postinstall_cmds=$lt_postinstall_cmds
3427
6072
postuninstall_cmds=$lt_postuninstall_cmds
3428
6073
 
 
6074
# Commands used to build a loadable module (assumed same as above if empty)
 
6075
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
 
6076
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
 
6077
 
3429
6078
# Commands to strip libraries.
3430
6079
old_striplib=$lt_old_striplib
3431
6080
striplib=$lt_striplib
3432
6081
 
 
6082
# Dependencies to place before the objects being linked to create a
 
6083
# shared library.
 
6084
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
6085
 
 
6086
# Dependencies to place after the objects being linked to create a
 
6087
# shared library.
 
6088
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
6089
 
 
6090
# Dependencies to place before the objects being linked to create a
 
6091
# shared library.
 
6092
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 
6093
 
 
6094
# Dependencies to place after the objects being linked to create a
 
6095
# shared library.
 
6096
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
6097
 
 
6098
# The library search path used internally by the compiler when linking
 
6099
# a shared library.
 
6100
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
6101
 
3433
6102
# Method to check whether dependent libraries are shared objects.
3434
6103
deplibs_check_method=$lt_deplibs_check_method
3435
6104
 
3437
6106
file_magic_cmd=$lt_file_magic_cmd
3438
6107
 
3439
6108
# Flag that allows shared libraries with undefined symbols to be built.
3440
 
allow_undefined_flag=$lt_allow_undefined_flag
 
6109
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
3441
6110
 
3442
6111
# Flag that forces no undefined symbols.
3443
 
no_undefined_flag=$lt_no_undefined_flag
 
6112
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
3444
6113
 
3445
6114
# Commands used to finish a libtool library installation in a directory.
3446
6115
finish_cmds=$lt_finish_cmds
3449
6118
finish_eval=$lt_finish_eval
3450
6119
 
3451
6120
# Take the output of nm and produce a listing of raw symbols and C names.
3452
 
global_symbol_pipe=$lt_global_symbol_pipe
 
6121
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
3453
6122
 
3454
6123
# Transform the output of nm in a proper C declaration
3455
 
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
 
6124
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
3456
6125
 
3457
6126
# Transform the output of nm in a C name address pair
3458
 
global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
 
6127
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
3459
6128
 
3460
6129
# This is the shared library runtime path variable.
3461
6130
runpath_var=$runpath_var
3467
6136
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3468
6137
 
3469
6138
# How to hardcode a shared library path into an executable.
3470
 
hardcode_action=$hardcode_action
 
6139
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
3471
6140
 
3472
6141
# Whether we should hardcode library paths into libraries.
3473
6142
hardcode_into_libs=$hardcode_into_libs
3474
6143
 
3475
6144
# Flag to hardcode \$libdir into a binary during linking.
3476
6145
# This must work even if \$libdir does not exist.
3477
 
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
6146
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
 
6147
 
 
6148
# If ld is used when linking, flag to hardcode \$libdir into
 
6149
# a binary during linking. This must work even if \$libdir does
 
6150
# not exist.
 
6151
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
3478
6152
 
3479
6153
# Whether we need a single -rpath flag with a separated argument.
3480
 
hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
6154
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
3481
6155
 
3482
 
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
 
6156
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
3483
6157
# resulting binary.
3484
 
hardcode_direct=$hardcode_direct
 
6158
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
3485
6159
 
3486
6160
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3487
6161
# resulting binary.
3488
 
hardcode_minus_L=$hardcode_minus_L
 
6162
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
3489
6163
 
3490
6164
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3491
6165
# the resulting binary.
3492
 
hardcode_shlibpath_var=$hardcode_shlibpath_var
 
6166
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
 
6167
 
 
6168
# Set to yes if building a shared library automatically hardcodes DIR into the library
 
6169
# and all subsequent libraries and executables linked against it.
 
6170
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
3493
6171
 
3494
6172
# Variables whose values should be saved in libtool wrapper scripts and
3495
6173
# restored at relink time.
3496
6174
variables_saved_for_relink="$variables_saved_for_relink"
3497
6175
 
3498
6176
# Whether libtool must link a program against all its dependency libraries.
3499
 
link_all_deplibs=$link_all_deplibs
 
6177
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
3500
6178
 
3501
6179
# Compile-time system search path for libraries
3502
6180
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3505
6183
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3506
6184
 
3507
6185
# Fix the shell variable \$srcfile for the compiler.
3508
 
fix_srcfile_path="$fix_srcfile_path"
 
6186
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
3509
6187
 
3510
6188
# Set to yes if exported symbols are required.
3511
 
always_export_symbols=$always_export_symbols
 
6189
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
3512
6190
 
3513
6191
# The commands to list exported symbols.
3514
 
export_symbols_cmds=$lt_export_symbols_cmds
 
6192
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
3515
6193
 
3516
6194
# The commands to extract the exported symbol list from a shared archive.
3517
6195
extract_expsyms_cmds=$lt_extract_expsyms_cmds
3518
6196
 
3519
6197
# Symbols that should not be listed in the preloaded symbols.
3520
 
exclude_expsyms=$lt_exclude_expsyms
 
6198
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
3521
6199
 
3522
6200
# Symbols that must always be exported.
3523
 
include_expsyms=$lt_include_expsyms
 
6201
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
3524
6202
 
3525
 
# ### END LIBTOOL CONFIG
 
6203
ifelse([$1],[],
 
6204
[# ### END LIBTOOL CONFIG],
 
6205
[# ### END LIBTOOL TAG CONFIG: $tagname])
3526
6206
 
3527
6207
__EOF__
3528
6208
 
 
6209
ifelse([$1],[], [
3529
6210
  case $host_os in
3530
6211
  aix3*)
3531
 
    cat <<\EOF >> "${ofile}T"
 
6212
    cat <<\EOF >> "$cfgfile"
3532
6213
 
3533
6214
# AIX sometimes has problems with the GCC collect2 program.  For some
3534
6215
# reason, if we set the COLLECT_NAMES environment variable, the problems
3541
6222
    ;;
3542
6223
  esac
3543
6224
 
3544
 
  case $host_os in
3545
 
  cygwin* | mingw* | pw32* | os2*)
3546
 
    cat <<'EOF' >> "${ofile}T"
3547
 
      # This is a source program that is used to create dlls on Windows
3548
 
      # Don't remove nor modify the starting and closing comments
 
6225
  # We use sed instead of cat because bash on DJGPP gets confused if
 
6226
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
6227
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
6228
  # is reportedly fixed, but why not run on old versions too?
 
6229
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
6230
 
 
6231
  mv -f "$cfgfile" "$ofile" || \
 
6232
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
6233
  chmod +x "$ofile"
 
6234
])
 
6235
else
 
6236
  # If there is no Makefile yet, we rely on a make rule to execute
 
6237
  # `config.status --recheck' to rerun these tests and create the
 
6238
  # libtool script then.
 
6239
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
 
6240
  if test -f "$ltmain_in"; then
 
6241
    test -f Makefile && make "$ltmain"
 
6242
  fi
 
6243
fi
 
6244
])# AC_LIBTOOL_CONFIG
 
6245
 
 
6246
 
 
6247
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
 
6248
# -------------------------------------------
 
6249
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
 
6250
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
6251
 
 
6252
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
6253
 
 
6254
if test "$GCC" = yes; then
 
6255
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
6256
 
 
6257
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
6258
    lt_cv_prog_compiler_rtti_exceptions,
 
6259
    [-fno-rtti -fno-exceptions], [],
 
6260
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
6261
fi
 
6262
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
6263
 
 
6264
 
 
6265
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
6266
# ---------------------------------
 
6267
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
6268
[AC_REQUIRE([AC_CANONICAL_HOST])
 
6269
AC_REQUIRE([AC_PROG_NM])
 
6270
AC_REQUIRE([AC_OBJEXT])
 
6271
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
6272
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
6273
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
6274
[
 
6275
# These are sane defaults that work on at least a few old systems.
 
6276
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
6277
 
 
6278
# Character class describing NM global symbol codes.
 
6279
symcode='[[BCDEGRST]]'
 
6280
 
 
6281
# Regexp to match symbols that can be accessed directly from C.
 
6282
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
6283
 
 
6284
# Transform an extracted symbol line into a proper C declaration
 
6285
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
6286
 
 
6287
# Transform an extracted symbol line into symbol name and symbol address
 
6288
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
6289
 
 
6290
# Define system-specific variables.
 
6291
case $host_os in
 
6292
aix*)
 
6293
  symcode='[[BCDT]]'
 
6294
  ;;
 
6295
cygwin* | mingw* | pw32*)
 
6296
  symcode='[[ABCDGISTW]]'
 
6297
  ;;
 
6298
hpux*) # Its linker distinguishes data from code symbols
 
6299
  if test "$host_cpu" = ia64; then
 
6300
    symcode='[[ABCDEGRST]]'
 
6301
  fi
 
6302
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
6303
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
6304
  ;;
 
6305
linux*)
 
6306
  if test "$host_cpu" = ia64; then
 
6307
    symcode='[[ABCDGIRSTW]]'
 
6308
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
6309
    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
6310
  fi
 
6311
  ;;
 
6312
irix* | nonstopux*)
 
6313
  symcode='[[BCDEGRST]]'
 
6314
  ;;
 
6315
osf*)
 
6316
  symcode='[[BCDEGQRST]]'
 
6317
  ;;
 
6318
solaris* | sysv5*)
 
6319
  symcode='[[BDRT]]'
 
6320
  ;;
 
6321
sysv4)
 
6322
  symcode='[[DFNSTU]]'
 
6323
  ;;
 
6324
esac
 
6325
 
 
6326
# Handle CRLF in mingw tool chain
 
6327
opt_cr=
 
6328
case $build_os in
 
6329
mingw*)
 
6330
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
6331
  ;;
 
6332
esac
 
6333
 
 
6334
# If we're using GNU nm, then use its standard symbol codes.
 
6335
case `$NM -V 2>&1` in
 
6336
*GNU* | *'with BFD'*)
 
6337
  symcode='[[ABCDGIRSTW]]' ;;
 
6338
esac
 
6339
 
 
6340
# Try without a prefix undercore, then with it.
 
6341
for ac_symprfx in "" "_"; do
 
6342
 
 
6343
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
 
6344
  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
6345
 
 
6346
  # Write the raw and C identifiers.
 
6347
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
6348
 
 
6349
  # Check to see that the pipe works correctly.
 
6350
  pipe_works=no
 
6351
 
 
6352
  rm -f conftest*
 
6353
  cat > conftest.$ac_ext <<EOF
 
6354
#ifdef __cplusplus
 
6355
extern "C" {
 
6356
#endif
 
6357
char nm_test_var;
 
6358
void nm_test_func(){}
 
6359
#ifdef __cplusplus
 
6360
}
 
6361
#endif
 
6362
int main(){nm_test_var='a';nm_test_func();return(0);}
 
6363
EOF
 
6364
 
 
6365
  if AC_TRY_EVAL(ac_compile); then
 
6366
    # Now try to grab the symbols.
 
6367
    nlist=conftest.nm
 
6368
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
6369
      # Try sorting and uniquifying the output.
 
6370
      if sort "$nlist" | uniq > "$nlist"T; then
 
6371
        mv -f "$nlist"T "$nlist"
 
6372
      else
 
6373
        rm -f "$nlist"T
 
6374
      fi
 
6375
 
 
6376
      # Make sure that we snagged all the symbols we need.
 
6377
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
 
6378
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
 
6379
          cat <<EOF > conftest.$ac_ext
 
6380
#ifdef __cplusplus
 
6381
extern "C" {
 
6382
#endif
 
6383
 
 
6384
EOF
 
6385
          # Now generate the symbol file.
 
6386
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
6387
 
 
6388
          cat <<EOF >> conftest.$ac_ext
 
6389
#if defined (__STDC__) && __STDC__
 
6390
# define lt_ptr_t void *
 
6391
#else
 
6392
# define lt_ptr_t char *
 
6393
# define const
 
6394
#endif
 
6395
 
 
6396
/* The mapping between symbol names and symbols. */
 
6397
const struct {
 
6398
  const char *name;
 
6399
  lt_ptr_t address;
 
6400
}
 
6401
lt_preloaded_symbols[[]] =
 
6402
{
 
6403
EOF
 
6404
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 
6405
          cat <<\EOF >> conftest.$ac_ext
 
6406
  {0, (lt_ptr_t) 0}
 
6407
};
 
6408
 
 
6409
#ifdef __cplusplus
 
6410
}
 
6411
#endif
 
6412
EOF
 
6413
          # Now try linking the two files.
 
6414
          mv conftest.$ac_objext conftstm.$ac_objext
 
6415
          lt_save_LIBS="$LIBS"
 
6416
          lt_save_CFLAGS="$CFLAGS"
 
6417
          LIBS="conftstm.$ac_objext"
 
6418
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
6419
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
6420
            pipe_works=yes
 
6421
          fi
 
6422
          LIBS="$lt_save_LIBS"
 
6423
          CFLAGS="$lt_save_CFLAGS"
 
6424
        else
 
6425
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
6426
        fi
 
6427
      else
 
6428
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
6429
      fi
 
6430
    else
 
6431
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
6432
    fi
 
6433
  else
 
6434
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
6435
    cat conftest.$ac_ext >&5
 
6436
  fi
 
6437
  rm -f conftest* conftst*
 
6438
 
 
6439
  # Do not use the global_symbol_pipe unless it works.
 
6440
  if test "$pipe_works" = yes; then
 
6441
    break
 
6442
  else
 
6443
    lt_cv_sys_global_symbol_pipe=
 
6444
  fi
 
6445
done
 
6446
])
 
6447
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
6448
  lt_cv_sys_global_symbol_to_cdecl=
 
6449
fi
 
6450
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
6451
  AC_MSG_RESULT(failed)
 
6452
else
 
6453
  AC_MSG_RESULT(ok)
 
6454
fi
 
6455
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
6456
 
 
6457
 
 
6458
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
 
6459
# ---------------------------------------
 
6460
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 
6461
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
 
6462
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
6463
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
6464
 
 
6465
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
6466
 ifelse([$1],[CXX],[
 
6467
  # C++ specific cases for pic, static, wl, etc.
 
6468
  if test "$GXX" = yes; then
 
6469
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6470
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
6471
 
 
6472
    case $host_os in
 
6473
    aix*)
 
6474
      # All AIX code is PIC.
 
6475
      if test "$host_cpu" = ia64; then
 
6476
        # AIX 5 now supports IA64 processor
 
6477
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6478
      fi
 
6479
      ;;
 
6480
    amigaos*)
 
6481
      # FIXME: we need at least 68020 code to build shared libraries, but
 
6482
      # adding the `-m68020' flag to GCC prevents building anything better,
 
6483
      # like `-m68040'.
 
6484
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
6485
      ;;
 
6486
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
6487
      # PIC is the default for these OSes.
 
6488
      ;;
 
6489
    mingw* | os2* | pw32*)
 
6490
      # This hack is so that the source file can tell whether it is being
 
6491
      # built for inclusion in a dll (and should export symbols for example).
 
6492
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
6493
      ;;
 
6494
    darwin* | rhapsody*)
 
6495
      # PIC is the default on this platform
 
6496
      # Common symbols not allowed in MH_DYLIB files
 
6497
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
6498
      ;;
 
6499
    *djgpp*)
 
6500
      # DJGPP does not support shared libraries at all
 
6501
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
6502
      ;;
 
6503
    sysv4*MP*)
 
6504
      if test -d /usr/nec; then
 
6505
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
6506
      fi
 
6507
      ;;
 
6508
    hpux*)
 
6509
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
6510
      # not for PA HP-UX.
 
6511
      case $host_cpu in
 
6512
      hppa*64*|ia64*)
 
6513
        ;;
 
6514
      *)
 
6515
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
6516
        ;;
 
6517
      esac
 
6518
      ;;
 
6519
    *)
 
6520
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
6521
      ;;
 
6522
    esac
 
6523
  else
 
6524
    case $host_os in
 
6525
      aix4* | aix5*)
 
6526
        # All AIX code is PIC.
 
6527
        if test "$host_cpu" = ia64; then
 
6528
          # AIX 5 now supports IA64 processor
 
6529
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6530
        else
 
6531
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
6532
        fi
 
6533
        ;;
 
6534
      chorus*)
 
6535
        case $cc_basename in
 
6536
        cxch68*)
 
6537
          # Green Hills C++ Compiler
 
6538
          # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
 
6539
          ;;
 
6540
        esac
 
6541
        ;;
 
6542
       darwin*)
 
6543
         # PIC is the default on this platform
 
6544
         # Common symbols not allowed in MH_DYLIB files
 
6545
         case $cc_basename in
 
6546
           xlc*)
 
6547
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
6548
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6549
           ;;
 
6550
         esac
 
6551
       ;;
 
6552
      dgux*)
 
6553
        case $cc_basename in
 
6554
          ec++*)
 
6555
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6556
            ;;
 
6557
          ghcx*)
 
6558
            # Green Hills C++ Compiler
 
6559
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
6560
            ;;
 
6561
          *)
 
6562
            ;;
 
6563
        esac
 
6564
        ;;
 
6565
      freebsd* | kfreebsd*-gnu | dragonfly*)
 
6566
        # FreeBSD uses GNU C++
 
6567
        ;;
 
6568
      hpux9* | hpux10* | hpux11*)
 
6569
        case $cc_basename in
 
6570
          CC*)
 
6571
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6572
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
6573
            if test "$host_cpu" != ia64; then
 
6574
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
6575
            fi
 
6576
            ;;
 
6577
          aCC*)
 
6578
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6579
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
6580
            case $host_cpu in
 
6581
            hppa*64*|ia64*)
 
6582
              # +Z the default
 
6583
              ;;
 
6584
            *)
 
6585
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
6586
              ;;
 
6587
            esac
 
6588
            ;;
 
6589
          *)
 
6590
            ;;
 
6591
        esac
 
6592
        ;;
 
6593
      irix5* | irix6* | nonstopux*)
 
6594
        case $cc_basename in
 
6595
          CC*)
 
6596
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6597
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
6598
            # CC pic flag -KPIC is the default.
 
6599
            ;;
 
6600
          *)
 
6601
            ;;
 
6602
        esac
 
6603
        ;;
 
6604
      linux*)
 
6605
        case $cc_basename in
 
6606
          KCC*)
 
6607
            # KAI C++ Compiler
 
6608
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
6609
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
6610
            ;;
 
6611
          icpc* | ecpc*)
 
6612
            # Intel C++
 
6613
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6614
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6615
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
6616
            ;;
 
6617
          pgCC*)
 
6618
            # Portland Group C++ compiler.
 
6619
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6620
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
6621
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6622
            ;;
 
6623
          cxx*)
 
6624
            # Compaq C++
 
6625
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
6626
            # Linux and Compaq Tru64 Unix objects are PIC.
 
6627
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
6628
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
6629
            ;;
 
6630
          *)
 
6631
            ;;
 
6632
        esac
 
6633
        ;;
 
6634
      lynxos*)
 
6635
        ;;
 
6636
      m88k*)
 
6637
        ;;
 
6638
      mvs*)
 
6639
        case $cc_basename in
 
6640
          cxx*)
 
6641
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
6642
            ;;
 
6643
          *)
 
6644
            ;;
 
6645
        esac
 
6646
        ;;
 
6647
      netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
6648
        ;;
 
6649
      osf3* | osf4* | osf5*)
 
6650
        case $cc_basename in
 
6651
          KCC*)
 
6652
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
6653
            ;;
 
6654
          RCC*)
 
6655
            # Rational C++ 2.4.1
 
6656
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
6657
            ;;
 
6658
          cxx*)
 
6659
            # Digital/Compaq C++
 
6660
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6661
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
6662
            # Linux and Compaq Tru64 Unix objects are PIC.
 
6663
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
6664
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
6665
            ;;
 
6666
          *)
 
6667
            ;;
 
6668
        esac
 
6669
        ;;
 
6670
      psos*)
 
6671
        ;;
 
6672
      sco*)
 
6673
        case $cc_basename in
 
6674
          CC*)
 
6675
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
6676
            ;;
 
6677
          *)
 
6678
            ;;
 
6679
        esac
 
6680
        ;;
 
6681
      solaris*)
 
6682
        case $cc_basename in
 
6683
          CC*)
 
6684
            # Sun C++ 4.2, 5.x and Centerline C++
 
6685
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6686
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6687
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
6688
            ;;
 
6689
          gcx*)
 
6690
            # Green Hills C++ Compiler
 
6691
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
6692
            ;;
 
6693
          *)
 
6694
            ;;
 
6695
        esac
 
6696
        ;;
 
6697
      sunos4*)
 
6698
        case $cc_basename in
 
6699
          CC*)
 
6700
            # Sun C++ 4.x
 
6701
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
6702
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6703
            ;;
 
6704
          lcc*)
 
6705
            # Lucid
 
6706
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
6707
            ;;
 
6708
          *)
 
6709
            ;;
 
6710
        esac
 
6711
        ;;
 
6712
      tandem*)
 
6713
        case $cc_basename in
 
6714
          NCC*)
 
6715
            # NonStop-UX NCC 3.20
 
6716
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6717
            ;;
 
6718
          *)
 
6719
            ;;
 
6720
        esac
 
6721
        ;;
 
6722
      unixware*)
 
6723
        ;;
 
6724
      vxworks*)
 
6725
        ;;
 
6726
      *)
 
6727
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
6728
        ;;
 
6729
    esac
 
6730
  fi
 
6731
],
 
6732
[
 
6733
  if test "$GCC" = yes; then
 
6734
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6735
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
6736
 
 
6737
    case $host_os in
 
6738
      aix*)
 
6739
      # All AIX code is PIC.
 
6740
      if test "$host_cpu" = ia64; then
 
6741
        # AIX 5 now supports IA64 processor
 
6742
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6743
      fi
 
6744
      ;;
 
6745
 
 
6746
    amigaos*)
 
6747
      # FIXME: we need at least 68020 code to build shared libraries, but
 
6748
      # adding the `-m68020' flag to GCC prevents building anything better,
 
6749
      # like `-m68040'.
 
6750
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
6751
      ;;
 
6752
 
 
6753
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
6754
      # PIC is the default for these OSes.
 
6755
      ;;
 
6756
 
 
6757
    mingw* | pw32* | os2*)
 
6758
      # This hack is so that the source file can tell whether it is being
 
6759
      # built for inclusion in a dll (and should export symbols for example).
 
6760
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
6761
      ;;
 
6762
 
 
6763
    darwin* | rhapsody*)
 
6764
      # PIC is the default on this platform
 
6765
      # Common symbols not allowed in MH_DYLIB files
 
6766
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
6767
      ;;
 
6768
 
 
6769
    msdosdjgpp*)
 
6770
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
6771
      # on systems that don't support them.
 
6772
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
6773
      enable_shared=no
 
6774
      ;;
 
6775
 
 
6776
    sysv4*MP*)
 
6777
      if test -d /usr/nec; then
 
6778
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
6779
      fi
 
6780
      ;;
 
6781
 
 
6782
    hpux*)
 
6783
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
6784
      # not for PA HP-UX.
 
6785
      case $host_cpu in
 
6786
      hppa*64*|ia64*)
 
6787
        # +Z the default
 
6788
        ;;
 
6789
      *)
 
6790
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
6791
        ;;
 
6792
      esac
 
6793
      ;;
 
6794
 
 
6795
    *)
 
6796
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
6797
      ;;
 
6798
    esac
 
6799
  else
 
6800
    # PORTME Check for flag to pass linker flags through the system compiler.
 
6801
    case $host_os in
 
6802
    aix*)
 
6803
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6804
      if test "$host_cpu" = ia64; then
 
6805
        # AIX 5 now supports IA64 processor
 
6806
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6807
      else
 
6808
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
6809
      fi
 
6810
      ;;
 
6811
      darwin*)
 
6812
        # PIC is the default on this platform
 
6813
        # Common symbols not allowed in MH_DYLIB files
 
6814
       case $cc_basename in
 
6815
         xlc*)
 
6816
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
6817
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6818
         ;;
 
6819
       esac
 
6820
       ;;
 
6821
 
 
6822
    mingw* | pw32* | os2*)
 
6823
      # This hack is so that the source file can tell whether it is being
 
6824
      # built for inclusion in a dll (and should export symbols for example).
 
6825
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
6826
      ;;
 
6827
 
 
6828
    hpux9* | hpux10* | hpux11*)
 
6829
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6830
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
6831
      # not for PA HP-UX.
 
6832
      case $host_cpu in
 
6833
      hppa*64*|ia64*)
 
6834
        # +Z the default
 
6835
        ;;
 
6836
      *)
 
6837
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
6838
        ;;
 
6839
      esac
 
6840
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
6841
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
6842
      ;;
 
6843
 
 
6844
    irix5* | irix6* | nonstopux*)
 
6845
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6846
      # PIC (with -KPIC) is the default.
 
6847
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
6848
      ;;
 
6849
 
 
6850
    newsos6)
 
6851
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6852
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6853
      ;;
 
6854
 
 
6855
    linux*)
 
6856
      case $cc_basename in
 
6857
      icc* | ecc*)
 
6858
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6859
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6860
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
6861
        ;;
 
6862
      pgcc* | pgf77* | pgf90* | pgf95*)
 
6863
        # Portland Group compilers (*not* the Pentium gcc compiler,
 
6864
        # which looks to be a dead project)
 
6865
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6866
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
6867
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6868
        ;;
 
6869
      ccc*)
 
6870
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6871
        # All Alpha code is PIC.
 
6872
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
6873
        ;;
 
6874
      esac
 
6875
      ;;
 
6876
 
 
6877
    osf3* | osf4* | osf5*)
 
6878
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6879
      # All OSF/1 code is PIC.
 
6880
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
6881
      ;;
 
6882
 
 
6883
    sco3.2v5*)
 
6884
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
 
6885
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
 
6886
      ;;
 
6887
 
 
6888
    solaris*)
 
6889
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6890
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6891
      case $cc_basename in
 
6892
      f77* | f90* | f95*)
 
6893
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
 
6894
      *)
 
6895
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
 
6896
      esac
 
6897
      ;;
 
6898
 
 
6899
    sunos4*)
 
6900
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
6901
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
6902
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6903
      ;;
 
6904
 
 
6905
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
6906
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6907
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6908
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6909
      ;;
 
6910
 
 
6911
    sysv4*MP*)
 
6912
      if test -d /usr/nec ;then
 
6913
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
6914
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6915
      fi
 
6916
      ;;
 
6917
 
 
6918
    unicos*)
 
6919
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6920
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
6921
      ;;
 
6922
 
 
6923
    uts4*)
 
6924
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
6925
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6926
      ;;
 
6927
 
 
6928
    *)
 
6929
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
6930
      ;;
 
6931
    esac
 
6932
  fi
 
6933
])
 
6934
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
6935
 
 
6936
#
 
6937
# Check to make sure the PIC flag actually works.
 
6938
#
 
6939
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
6940
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
 
6941
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
 
6942
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
 
6943
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
 
6944
     "" | " "*) ;;
 
6945
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
6946
     esac],
 
6947
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
6948
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
6949
fi
 
6950
case $host_os in
 
6951
  # For platforms which do not support PIC, -DPIC is meaningless:
 
6952
  *djgpp*)
 
6953
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
6954
    ;;
 
6955
  *)
 
6956
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
 
6957
    ;;
 
6958
esac
 
6959
])
 
6960
 
 
6961
 
 
6962
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
 
6963
# ------------------------------------
 
6964
# See if the linker supports building shared libraries.
 
6965
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 
6966
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
6967
ifelse([$1],[CXX],[
 
6968
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
6969
  case $host_os in
 
6970
  aix4* | aix5*)
 
6971
    # If we're using GNU nm, then we don't want the "-C" option.
 
6972
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
6973
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
6974
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
6975
    else
 
6976
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
6977
    fi
 
6978
    ;;
 
6979
  pw32*)
 
6980
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
6981
  ;;
 
6982
  cygwin* | mingw*)
 
6983
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
6984
  ;;
 
6985
  linux*)
 
6986
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
 
6987
  ;;
 
6988
  *)
 
6989
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
6990
  ;;
 
6991
  esac
 
6992
],[
 
6993
  runpath_var=
 
6994
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
6995
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
6996
  _LT_AC_TAGVAR(archive_cmds, $1)=
 
6997
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
6998
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
 
6999
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
7000
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
7001
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
7002
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
 
7003
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7004
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
7005
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
7006
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
7007
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
7008
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
7009
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
7010
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
7011
  _LT_AC_TAGVAR(module_cmds, $1)=
 
7012
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
7013
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
7014
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
7015
  # include_expsyms should be a list of space-separated symbols to be *always*
 
7016
  # included in the symbol list
 
7017
  _LT_AC_TAGVAR(include_expsyms, $1)=
 
7018
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
7019
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
7020
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
7021
  # as well as any symbol that contains `d'.
 
7022
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
7023
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
7024
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
7025
  # the symbol is explicitly referenced.  Since portable code cannot
 
7026
  # rely on this symbol name, it's probably fine to never include it in
 
7027
  # preloaded symbol tables.
 
7028
  extract_expsyms_cmds=
 
7029
  # Just being paranoid about ensuring that cc_basename is set.
 
7030
  _LT_CC_BASENAME([$compiler])
 
7031
  case $host_os in
 
7032
  cygwin* | mingw* | pw32*)
 
7033
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
7034
    # When not using gcc, we currently assume that we are using
 
7035
    # Microsoft Visual C++.
 
7036
    if test "$GCC" != yes; then
 
7037
      with_gnu_ld=no
 
7038
    fi
 
7039
    ;;
 
7040
  openbsd*)
 
7041
    with_gnu_ld=no
 
7042
    ;;
 
7043
  esac
 
7044
 
 
7045
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
7046
  if test "$with_gnu_ld" = yes; then
 
7047
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
7048
    wlarc='${wl}'
 
7049
 
 
7050
    # Set some defaults for GNU ld with shared library support. These
 
7051
    # are reset later if shared libraries are not supported. Putting them
 
7052
    # here allows them to be overridden if necessary.
 
7053
    runpath_var=LD_RUN_PATH
 
7054
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
7055
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
7056
    # ancient GNU ld didn't support --whole-archive et. al.
 
7057
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
 
7058
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
7059
      else
 
7060
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
7061
    fi
 
7062
    supports_anon_versioning=no
 
7063
    case `$LD -v 2>/dev/null` in
 
7064
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
7065
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
7066
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
7067
      *\ 2.11.*) ;; # other 2.11 versions
 
7068
      *) supports_anon_versioning=yes ;;
 
7069
    esac
 
7070
 
 
7071
    # See if GNU ld supports shared libraries.
 
7072
    case $host_os in
 
7073
    aix3* | aix4* | aix5*)
 
7074
      # On AIX/PPC, the GNU linker is very broken
 
7075
      if test "$host_cpu" != ia64; then
 
7076
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7077
        cat <<EOF 1>&2
 
7078
 
 
7079
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
7080
*** to be unable to reliably create shared libraries on AIX.
 
7081
*** Therefore, libtool is disabling shared libraries support.  If you
 
7082
*** really care for shared libraries, you may want to modify your PATH
 
7083
*** so that a non-GNU linker is found, and then restart.
 
7084
 
 
7085
EOF
 
7086
      fi
 
7087
      ;;
 
7088
 
 
7089
    amigaos*)
 
7090
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
7091
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7092
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7093
 
 
7094
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
7095
      # that the semantics of dynamic libraries on AmigaOS, at least up
 
7096
      # to version 4, is to share data among multiple programs linked
 
7097
      # with the same dynamic library.  Since this doesn't match the
 
7098
      # behavior of shared libraries on other platforms, we can't use
 
7099
      # them.
 
7100
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7101
      ;;
 
7102
 
 
7103
    beos*)
 
7104
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
7105
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
7106
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
7107
        # support --undefined.  This deserves some investigation.  FIXME
 
7108
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7109
      else
 
7110
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7111
      fi
 
7112
      ;;
 
7113
 
 
7114
    cygwin* | mingw* | pw32*)
 
7115
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
7116
      # as there is no search path for DLLs.
 
7117
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7118
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
7119
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
7120
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
7121
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
7122
 
 
7123
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
7124
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
7125
        # If the export-symbols file already is a .def file (1st line
 
7126
        # is EXPORTS), use it as is; otherwise, prepend...
 
7127
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
7128
          cp $export_symbols $output_objdir/$soname.def;
 
7129
        else
 
7130
          echo EXPORTS > $output_objdir/$soname.def;
 
7131
          cat $export_symbols >> $output_objdir/$soname.def;
 
7132
        fi~
 
7133
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
 
7134
      else
 
7135
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7136
      fi
 
7137
      ;;
 
7138
 
 
7139
    linux*)
 
7140
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
7141
        tmp_addflag=
 
7142
        case $cc_basename,$host_cpu in
 
7143
        pgcc*)                          # Portland Group C compiler
 
7144
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
7145
          tmp_addflag=' $pic_flag'
 
7146
          ;;
 
7147
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
 
7148
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
7149
          tmp_addflag=' $pic_flag -Mnomain' ;;
 
7150
        ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
 
7151
          tmp_addflag=' -i_dynamic' ;;
 
7152
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
 
7153
          tmp_addflag=' -i_dynamic -nofor_main' ;;
 
7154
        ifc* | ifort*)                  # Intel Fortran compiler
 
7155
          tmp_addflag=' -nofor_main' ;;
 
7156
        esac
 
7157
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7158
 
 
7159
        if test $supports_anon_versioning = yes; then
 
7160
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
 
7161
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
7162
  $echo "local: *; };" >> $output_objdir/$libname.ver~
 
7163
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
7164
        fi
 
7165
        _LT_AC_TAGVAR(link_all_deplibs, $1)=no
 
7166
      else
 
7167
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7168
      fi
 
7169
      ;;
 
7170
 
 
7171
    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
7172
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
7173
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
7174
        wlarc=
 
7175
      else
 
7176
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7177
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
7178
      fi
 
7179
      ;;
 
7180
 
 
7181
    solaris* | sysv5*)
 
7182
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 
7183
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7184
        cat <<EOF 1>&2
 
7185
 
 
7186
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
7187
*** create shared libraries on Solaris systems.  Therefore, libtool
 
7188
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
7189
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
7190
*** your PATH or compiler configuration so that the native linker is
 
7191
*** used, and then restart.
 
7192
 
 
7193
EOF
 
7194
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
7195
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7196
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
7197
      else
 
7198
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7199
      fi
 
7200
      ;;
 
7201
 
 
7202
    sunos4*)
 
7203
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
7204
      wlarc=
 
7205
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7206
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7207
      ;;
 
7208
 
 
7209
    *)
 
7210
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
7211
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
7212
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
7213
      else
 
7214
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7215
      fi
 
7216
      ;;
 
7217
    esac
 
7218
 
 
7219
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
 
7220
      runpath_var=
 
7221
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7222
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
7223
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
7224
    fi
 
7225
  else
 
7226
    # PORTME fill in a description of your system's linker (not GNU ld)
 
7227
    case $host_os in
 
7228
    aix3*)
 
7229
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
7230
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
7231
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
 
7232
      # Note: this linker hardcodes the directories in LIBPATH if there
 
7233
      # are no directories specified by -L.
 
7234
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7235
      if test "$GCC" = yes && test -z "$link_static_flag"; then
 
7236
        # Neither direct hardcoding nor static linking is supported with a
 
7237
        # broken collect2.
 
7238
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
7239
      fi
 
7240
      ;;
 
7241
 
 
7242
    aix4* | aix5*)
 
7243
      if test "$host_cpu" = ia64; then
 
7244
        # On IA64, the linker does run time linking by default, so we don't
 
7245
        # have to do anything special.
 
7246
        aix_use_runtimelinking=no
 
7247
        exp_sym_flag='-Bexport'
 
7248
        no_entry_flag=""
 
7249
      else
 
7250
        # If we're using GNU nm, then we don't want the "-C" option.
 
7251
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
7252
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
7253
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
7254
        else
 
7255
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
7256
        fi
 
7257
        aix_use_runtimelinking=no
 
7258
 
 
7259
        # Test if we are trying to use run time linking or normal
 
7260
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
7261
        # need to do runtime linking.
 
7262
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
7263
          for ld_flag in $LDFLAGS; do
 
7264
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
7265
            aix_use_runtimelinking=yes
 
7266
            break
 
7267
          fi
 
7268
          done
 
7269
        esac
 
7270
 
 
7271
        exp_sym_flag='-bexport'
 
7272
        no_entry_flag='-bnoentry'
 
7273
      fi
 
7274
 
 
7275
      # When large executables or shared objects are built, AIX ld can
 
7276
      # have problems creating the table of contents.  If linking a library
 
7277
      # or program results in "error TOC overflow" add -mminimal-toc to
 
7278
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
7279
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
7280
 
 
7281
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
7282
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7283
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
7284
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
7285
 
 
7286
      if test "$GCC" = yes; then
 
7287
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
7288
        # We only want to do this on AIX 4.2 and lower, the check
 
7289
        # below for broken collect2 doesn't work under 4.3+
 
7290
          collect2name=`${CC} -print-prog-name=collect2`
 
7291
          if test -f "$collect2name" && \
 
7292
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
7293
          then
 
7294
          # We have reworked collect2
 
7295
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7296
          else
 
7297
          # We have old collect2
 
7298
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
7299
          # It fails to find uninstalled libraries when the uninstalled
 
7300
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
7301
          # to unsupported forces relinking
 
7302
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7303
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7304
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
7305
          fi
 
7306
        esac
 
7307
        shared_flag='-shared'
 
7308
        if test "$aix_use_runtimelinking" = yes; then
 
7309
          shared_flag="$shared_flag "'${wl}-G'
 
7310
        fi
 
7311
      else
 
7312
        # not using gcc
 
7313
        if test "$host_cpu" = ia64; then
 
7314
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
7315
        # chokes on -Wl,-G. The following line is correct:
 
7316
          shared_flag='-G'
 
7317
        else
 
7318
        if test "$aix_use_runtimelinking" = yes; then
 
7319
            shared_flag='${wl}-G'
 
7320
          else
 
7321
            shared_flag='${wl}-bM:SRE'
 
7322
        fi
 
7323
        fi
 
7324
      fi
 
7325
 
 
7326
      # It seems that -bexpall does not export symbols beginning with
 
7327
      # underscore (_), so it is better to generate a list of symbols to export.
 
7328
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
7329
      if test "$aix_use_runtimelinking" = yes; then
 
7330
        # Warning - without using the other runtime loading flags (-brtl),
 
7331
        # -berok will link without error, but may produce a broken library.
 
7332
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
7333
       # Determine the default libpath from the value encoded in an empty executable.
 
7334
       _LT_AC_SYS_LIBPATH_AIX
 
7335
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
7336
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
7337
       else
 
7338
        if test "$host_cpu" = ia64; then
 
7339
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
7340
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
7341
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
7342
        else
 
7343
         # Determine the default libpath from the value encoded in an empty executable.
 
7344
         _LT_AC_SYS_LIBPATH_AIX
 
7345
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
7346
          # Warning - without using the other run time loading flags,
 
7347
          # -berok will link without error, but may produce a broken library.
 
7348
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
7349
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
7350
          # -bexpall does not export symbols beginning with underscore (_)
 
7351
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
7352
          # Exported symbols can be pulled into shared objects from archives
 
7353
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
7354
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
7355
          # This is similar to how AIX traditionally builds its shared libraries.
 
7356
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
7357
        fi
 
7358
      fi
 
7359
      ;;
 
7360
 
 
7361
    amigaos*)
 
7362
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
7363
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7364
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7365
      # see comment about different semantics on the GNU ld section
 
7366
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7367
      ;;
 
7368
 
 
7369
    bsdi[[45]]*)
 
7370
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
7371
      ;;
 
7372
 
 
7373
    cygwin* | mingw* | pw32*)
 
7374
      # When not using gcc, we currently assume that we are using
 
7375
      # Microsoft Visual C++.
 
7376
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
7377
      # no search path for DLLs.
 
7378
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
7379
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
7380
      # Tell ltmain to make .lib files, not .a files.
 
7381
      libext=lib
 
7382
      # Tell ltmain to make .dll files, not .so files.
 
7383
      shrext_cmds=".dll"
 
7384
      # FIXME: Setting linknames here is a bad hack.
 
7385
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
7386
      # The linker will automatically build a .lib file if we build a DLL.
 
7387
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
 
7388
      # FIXME: Should let the user specify the lib program.
 
7389
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
7390
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
 
7391
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
7392
      ;;
 
7393
 
 
7394
    darwin* | rhapsody*)
 
7395
      case $host_os in
 
7396
        rhapsody* | darwin1.[[012]])
 
7397
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
7398
         ;;
 
7399
       *) # Darwin 1.3 on
 
7400
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
7401
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
7402
         else
 
7403
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
7404
             10.[[012]])
 
7405
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
7406
               ;;
 
7407
             10.*)
 
7408
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
7409
               ;;
 
7410
           esac
 
7411
         fi
 
7412
         ;;
 
7413
      esac
 
7414
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
7415
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
7416
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
7417
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
7418
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
7419
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
7420
    if test "$GCC" = yes ; then
 
7421
        output_verbose_link_cmd='echo'
 
7422
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
7423
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
7424
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
7425
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
7426
      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
7427
    else
 
7428
      case $cc_basename in
 
7429
        xlc*)
 
7430
         output_verbose_link_cmd='echo'
 
7431
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
 
7432
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
7433
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
7434
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
7435
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
7436
          ;;
 
7437
       *)
 
7438
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7439
          ;;
 
7440
      esac
 
7441
    fi
 
7442
      ;;
 
7443
 
 
7444
    dgux*)
 
7445
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7446
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7447
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7448
      ;;
 
7449
 
 
7450
    freebsd1*)
 
7451
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7452
      ;;
 
7453
 
 
7454
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
7455
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
7456
    # does not break anything, and helps significantly (at the cost of a little
 
7457
    # extra space).
 
7458
    freebsd2.2*)
 
7459
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
7460
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7461
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7462
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7463
      ;;
 
7464
 
 
7465
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
7466
    freebsd2*)
 
7467
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
7468
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7469
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7470
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7471
      ;;
 
7472
 
 
7473
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
7474
    freebsd* | kfreebsd*-gnu | dragonfly*)
 
7475
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
7476
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7477
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7478
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7479
      ;;
 
7480
 
 
7481
    hpux9*)
 
7482
      if test "$GCC" = yes; then
 
7483
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
7484
      else
 
7485
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
7486
      fi
 
7487
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
7488
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
7489
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7490
 
 
7491
      # hardcode_minus_L: Not really in the search PATH,
 
7492
      # but as the default location of the library.
 
7493
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7494
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7495
      ;;
 
7496
 
 
7497
    hpux10* | hpux11*)
 
7498
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
7499
        case $host_cpu in
 
7500
        hppa*64*|ia64*)
 
7501
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7502
          ;;
 
7503
        *)
 
7504
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
7505
          ;;
 
7506
        esac
 
7507
      else
 
7508
        case $host_cpu in
 
7509
        hppa*64*|ia64*)
 
7510
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7511
          ;;
 
7512
        *)
 
7513
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
7514
          ;;
 
7515
        esac
 
7516
      fi
 
7517
      if test "$with_gnu_ld" = no; then
 
7518
        case $host_cpu in
 
7519
        hppa*64*)
 
7520
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
7521
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
7522
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
7523
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
7524
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7525
          ;;
 
7526
        ia64*)
 
7527
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7528
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
7529
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7530
 
 
7531
          # hardcode_minus_L: Not really in the search PATH,
 
7532
          # but as the default location of the library.
 
7533
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7534
          ;;
 
7535
        *)
 
7536
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
7537
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
7538
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7539
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7540
 
 
7541
          # hardcode_minus_L: Not really in the search PATH,
 
7542
          # but as the default location of the library.
 
7543
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7544
          ;;
 
7545
        esac
 
7546
      fi
 
7547
      ;;
 
7548
 
 
7549
    irix5* | irix6* | nonstopux*)
 
7550
      if test "$GCC" = yes; then
 
7551
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
7552
      else
 
7553
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
7554
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
7555
      fi
 
7556
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7557
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
7558
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
7559
      ;;
 
7560
 
 
7561
    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
 
7562
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
7563
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
7564
      else
 
7565
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
7566
      fi
 
7567
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7568
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7569
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7570
      ;;
 
7571
 
 
7572
    newsos6)
 
7573
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7574
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7575
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7576
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
7577
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7578
      ;;
 
7579
 
 
7580
    openbsd*)
 
7581
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7582
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7583
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
7584
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
7585
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 
7586
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7587
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
7588
      else
 
7589
       case $host_os in
 
7590
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
7591
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
7592
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7593
           ;;
 
7594
         *)
 
7595
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
7596
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
7597
           ;;
 
7598
       esac
 
7599
      fi
 
7600
      ;;
 
7601
 
 
7602
    os2*)
 
7603
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7604
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7605
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
7606
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 
7607
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
7608
      ;;
 
7609
 
 
7610
    osf3*)
 
7611
      if test "$GCC" = yes; then
 
7612
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
7613
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
7614
      else
 
7615
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
7616
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
7617
      fi
 
7618
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7619
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
7620
      ;;
 
7621
 
 
7622
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
7623
      if test "$GCC" = yes; then
 
7624
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
7625
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
7626
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
7627
      else
 
7628
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
7629
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
7630
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 
7631
        $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
 
7632
 
 
7633
        # Both c and cxx compiler support -rpath directly
 
7634
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
7635
      fi
 
7636
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
7637
      ;;
 
7638
 
 
7639
    sco3.2v5*)
 
7640
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7641
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7642
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
7643
      runpath_var=LD_RUN_PATH
 
7644
      hardcode_runpath_var=yes
 
7645
      ;;
 
7646
 
 
7647
    solaris*)
 
7648
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
7649
      if test "$GCC" = yes; then
 
7650
        wlarc='${wl}'
 
7651
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7652
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
7653
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
7654
      else
 
7655
        wlarc=''
 
7656
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7657
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
7658
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
7659
      fi
 
7660
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
7661
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7662
      case $host_os in
 
7663
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
7664
      *)
 
7665
        # The compiler driver will combine linker options so we
 
7666
        # cannot just pass the convience library names through
 
7667
        # without $wl, iff we do not link with $LD.
 
7668
        # Luckily, gcc supports the same syntax we need for Sun Studio.
 
7669
        # Supported since Solaris 2.6 (maybe 2.5.1?)
 
7670
        case $wlarc in
 
7671
        '')
 
7672
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
7673
        *)
 
7674
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
 
7675
        esac ;;
 
7676
      esac
 
7677
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
7678
      ;;
 
7679
 
 
7680
    sunos4*)
 
7681
      if test "x$host_vendor" = xsequent; then
 
7682
        # Use $CC to link under sequent, because it throws in some extra .o
 
7683
        # files that make .init and .fini sections work.
 
7684
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
7685
      else
 
7686
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
7687
      fi
 
7688
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7689
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7690
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
7691
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7692
      ;;
 
7693
 
 
7694
    sysv4)
 
7695
      case $host_vendor in
 
7696
        sni)
 
7697
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7698
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
7699
        ;;
 
7700
        siemens)
 
7701
          ## LD is ld it makes a PLAMLIB
 
7702
          ## CC just makes a GrossModule.
 
7703
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
7704
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
7705
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
7706
        ;;
 
7707
        motorola)
 
7708
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7709
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
7710
        ;;
 
7711
      esac
 
7712
      runpath_var='LD_RUN_PATH'
 
7713
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7714
      ;;
 
7715
 
 
7716
    sysv4.3*)
 
7717
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7718
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7719
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
7720
      ;;
 
7721
 
 
7722
    sysv4*MP*)
 
7723
      if test -d /usr/nec; then
 
7724
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7725
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7726
        runpath_var=LD_RUN_PATH
 
7727
        hardcode_runpath_var=yes
 
7728
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
7729
      fi
 
7730
      ;;
 
7731
 
 
7732
    sysv4.2uw2*)
 
7733
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
7734
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
7735
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
7736
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7737
      hardcode_runpath_var=yes
 
7738
      runpath_var=LD_RUN_PATH
 
7739
      ;;
 
7740
 
 
7741
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
 
7742
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
 
7743
      if test "$GCC" = yes; then
 
7744
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7745
      else
 
7746
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7747
      fi
 
7748
      runpath_var='LD_RUN_PATH'
 
7749
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7750
      ;;
 
7751
 
 
7752
    sysv5*)
 
7753
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
7754
      # $CC -shared without GNU ld will not create a library from C++
 
7755
      # object files and a static libstdc++, better avoid it by now
 
7756
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7757
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
7758
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
7759
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
7760
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7761
      runpath_var='LD_RUN_PATH'
 
7762
      ;;
 
7763
 
 
7764
    uts4*)
 
7765
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
7766
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
7767
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7768
      ;;
 
7769
 
 
7770
    *)
 
7771
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
7772
      ;;
 
7773
    esac
 
7774
  fi
 
7775
])
 
7776
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
7777
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
7778
 
 
7779
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
7780
if test "$GCC" = yes; then
 
7781
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
7782
fi
 
7783
 
 
7784
#
 
7785
# Do we need to explicitly link libc?
 
7786
#
 
7787
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
 
7788
x|xyes)
 
7789
  # Assume -lc should be added
 
7790
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
7791
 
 
7792
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
7793
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
7794
    *'~'*)
 
7795
      # FIXME: we may have to deal with multi-command sequences.
 
7796
      ;;
 
7797
    '$CC '*)
 
7798
      # Test whether the compiler implicitly links with -lc since on some
 
7799
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
7800
      # to ld, don't add -lc before -lgcc.
 
7801
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
7802
      $rm conftest*
 
7803
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
7804
 
 
7805
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
7806
        soname=conftest
 
7807
        lib=conftest
 
7808
        libobjs=conftest.$ac_objext
 
7809
        deplibs=
 
7810
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
7811
        compiler_flags=-v
 
7812
        linker_flags=-v
 
7813
        verstring=
 
7814
        output_objdir=.
 
7815
        libname=conftest
 
7816
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
7817
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
7818
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
7819
        then
 
7820
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
7821
        else
 
7822
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
7823
        fi
 
7824
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
7825
      else
 
7826
        cat conftest.err 1>&5
 
7827
      fi
 
7828
      $rm conftest*
 
7829
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
7830
      ;;
 
7831
    esac
 
7832
  fi
 
7833
  ;;
 
7834
esac
 
7835
])# AC_LIBTOOL_PROG_LD_SHLIBS
 
7836
 
 
7837
 
 
7838
# _LT_AC_FILE_LTDLL_C
 
7839
# -------------------
 
7840
# Be careful that the start marker always follows a newline.
 
7841
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
3549
7842
# /* ltdll.c starts here */
3550
7843
# #define WIN32_LEAN_AND_MEAN
3551
7844
# #include <windows.h>
3579
7872
#   return TRUE;
3580
7873
# }
3581
7874
# /* ltdll.c ends here */
3582
 
        # This is a source program that is used to create import libraries
3583
 
        # on Windows for dlls which lack them. Don't remove nor modify the
3584
 
        # starting and closing comments
3585
 
# /* impgen.c starts here */
3586
 
# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
3587
 
#
3588
 
#  This file is part of GNU libtool.
3589
 
#
3590
 
#  This program is free software; you can redistribute it and/or modify
3591
 
#  it under the terms of the GNU General Public License as published by
3592
 
#  the Free Software Foundation; either version 2 of the License, or
3593
 
#  (at your option) any later version.
3594
 
#
3595
 
#  This program is distributed in the hope that it will be useful,
3596
 
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
3597
 
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3598
 
#  GNU General Public License for more details.
3599
 
#
3600
 
#  You should have received a copy of the GNU General Public License
3601
 
#  along with this program; if not, write to the Free Software
3602
 
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3603
 
#  */
3604
 
#
3605
 
# #include <stdio.h>            /* for printf() */
3606
 
# #include <unistd.h>           /* for open(), lseek(), read() */
3607
 
# #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
3608
 
# #include <string.h>           /* for strdup() */
3609
 
#
3610
 
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3611
 
# #ifndef O_BINARY
3612
 
# #define O_BINARY 0
3613
 
# #endif
3614
 
#
3615
 
# static unsigned int
3616
 
# pe_get16 (fd, offset)
3617
 
#      int fd;
3618
 
#      int offset;
3619
 
# {
3620
 
#   unsigned char b[2];
3621
 
#   lseek (fd, offset, SEEK_SET);
3622
 
#   read (fd, b, 2);
3623
 
#   return b[0] + (b[1]<<8);
3624
 
# }
3625
 
#
3626
 
# static unsigned int
3627
 
# pe_get32 (fd, offset)
3628
 
#     int fd;
3629
 
#     int offset;
3630
 
# {
3631
 
#   unsigned char b[4];
3632
 
#   lseek (fd, offset, SEEK_SET);
3633
 
#   read (fd, b, 4);
3634
 
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3635
 
# }
3636
 
#
3637
 
# static unsigned int
3638
 
# pe_as32 (ptr)
3639
 
#      void *ptr;
3640
 
# {
3641
 
#   unsigned char *b = ptr;
3642
 
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3643
 
# }
3644
 
#
3645
 
# int
3646
 
# main (argc, argv)
3647
 
#     int argc;
3648
 
#     char *argv[];
3649
 
# {
3650
 
#     int dll;
3651
 
#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3652
 
#     unsigned long export_rva, export_size, nsections, secptr, expptr;
3653
 
#     unsigned long name_rvas, nexp;
3654
 
#     unsigned char *expdata, *erva;
3655
 
#     char *filename, *dll_name;
3656
 
#
3657
 
#     filename = argv[1];
3658
 
#
3659
 
#     dll = open(filename, O_RDONLY|O_BINARY);
3660
 
#     if (dll < 1)
3661
 
#       return 1;
3662
 
#
3663
 
#     dll_name = filename;
3664
 
#
3665
 
#     for (i=0; filename[i]; i++)
3666
 
#       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
3667
 
#           dll_name = filename + i +1;
3668
 
#
3669
 
#     pe_header_offset = pe_get32 (dll, 0x3c);
3670
 
#     opthdr_ofs = pe_header_offset + 4 + 20;
3671
 
#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
3672
 
#
3673
 
#     if (num_entries < 1) /* no exports */
3674
 
#       return 1;
3675
 
#
3676
 
#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
3677
 
#     export_size = pe_get32 (dll, opthdr_ofs + 100);
3678
 
#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3679
 
#     secptr = (pe_header_offset + 4 + 20 +
3680
 
#             pe_get16 (dll, pe_header_offset + 4 + 16));
3681
 
#
3682
 
#     expptr = 0;
3683
 
#     for (i = 0; i < nsections; i++)
3684
 
#     {
3685
 
#       char sname[8];
3686
 
#       unsigned long secptr1 = secptr + 40 * i;
3687
 
#       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3688
 
#       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3689
 
#       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3690
 
#       lseek(dll, secptr1, SEEK_SET);
3691
 
#       read(dll, sname, 8);
3692
 
#       if (vaddr <= export_rva && vaddr+vsize > export_rva)
3693
 
#       {
3694
 
#           expptr = fptr + (export_rva - vaddr);
3695
 
#           if (export_rva + export_size > vaddr + vsize)
3696
 
#               export_size = vsize - (export_rva - vaddr);
3697
 
#           break;
3698
 
#       }
3699
 
#     }
3700
 
#
3701
 
#     expdata = (unsigned char*)malloc(export_size);
3702
 
#     lseek (dll, expptr, SEEK_SET);
3703
 
#     read (dll, expdata, export_size);
3704
 
#     erva = expdata - export_rva;
3705
 
#
3706
 
#     nexp = pe_as32 (expdata+24);
3707
 
#     name_rvas = pe_as32 (expdata+32);
3708
 
#
3709
 
#     printf ("EXPORTS\n");
3710
 
#     for (i = 0; i<nexp; i++)
3711
 
#     {
3712
 
#       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3713
 
#       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3714
 
#     }
3715
 
#
3716
 
#     return 0;
3717
 
# }
3718
 
# /* impgen.c ends here */
3719
 
 
3720
 
EOF
3721
 
    ;;
3722
 
  esac
3723
 
 
3724
 
  # We use sed instead of cat because bash on DJGPP gets confused if
3725
 
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3726
 
  # text mode, it properly converts lines to CR/LF.  This bash problem
3727
 
  # is reportedly fixed, but why not run on old versions too?
3728
 
  sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3729
 
 
3730
 
  mv -f "${ofile}T" "$ofile" || \
3731
 
    (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3732
 
  chmod +x "$ofile"
3733
 
fi
3734
 
 
3735
 
])# _LT_AC_LTCONFIG_HACK
3736
 
 
3737
 
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3738
 
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3739
 
 
3740
 
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3741
 
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3742
 
 
3743
 
# AC_ENABLE_SHARED - implement the --enable-shared flag
3744
 
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3745
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3746
 
#   `yes'.
3747
 
AC_DEFUN([AC_ENABLE_SHARED],
3748
 
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3749
 
AC_ARG_ENABLE(shared,
3750
 
changequote(<<, >>)dnl
3751
 
<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3752
 
changequote([, ])dnl
3753
 
[p=${PACKAGE-default}
3754
 
case $enableval in
3755
 
yes) enable_shared=yes ;;
3756
 
no) enable_shared=no ;;
3757
 
*)
3758
 
  enable_shared=no
3759
 
  # Look at the argument we got.  We use all the common list separators.
3760
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3761
 
  for pkg in $enableval; do
3762
 
    if test "X$pkg" = "X$p"; then
3763
 
      enable_shared=yes
3764
 
    fi
3765
 
  done
3766
 
  IFS="$ac_save_ifs"
3767
 
  ;;
3768
 
esac],
3769
 
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3770
 
])
3771
 
 
3772
 
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3773
 
AC_DEFUN([AC_DISABLE_SHARED],
3774
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3775
 
AC_ENABLE_SHARED(no)])
3776
 
 
3777
 
# AC_ENABLE_STATIC - implement the --enable-static flag
3778
 
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3779
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3780
 
#   `yes'.
3781
 
AC_DEFUN([AC_ENABLE_STATIC],
3782
 
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3783
 
AC_ARG_ENABLE(static,
3784
 
changequote(<<, >>)dnl
3785
 
<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3786
 
changequote([, ])dnl
3787
 
[p=${PACKAGE-default}
3788
 
case $enableval in
3789
 
yes) enable_static=yes ;;
3790
 
no) enable_static=no ;;
3791
 
*)
3792
 
  enable_static=no
3793
 
  # Look at the argument we got.  We use all the common list separators.
3794
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3795
 
  for pkg in $enableval; do
3796
 
    if test "X$pkg" = "X$p"; then
3797
 
      enable_static=yes
3798
 
    fi
3799
 
  done
3800
 
  IFS="$ac_save_ifs"
3801
 
  ;;
3802
 
esac],
3803
 
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3804
 
])
3805
 
 
3806
 
# AC_DISABLE_STATIC - set the default static flag to --disable-static
3807
 
AC_DEFUN([AC_DISABLE_STATIC],
3808
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3809
 
AC_ENABLE_STATIC(no)])
3810
 
 
3811
 
 
3812
 
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3813
 
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3814
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3815
 
#   `yes'.
3816
 
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3817
 
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3818
 
AC_ARG_ENABLE(fast-install,
3819
 
changequote(<<, >>)dnl
3820
 
<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3821
 
changequote([, ])dnl
3822
 
[p=${PACKAGE-default}
3823
 
case $enableval in
3824
 
yes) enable_fast_install=yes ;;
3825
 
no) enable_fast_install=no ;;
3826
 
*)
3827
 
  enable_fast_install=no
3828
 
  # Look at the argument we got.  We use all the common list separators.
3829
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3830
 
  for pkg in $enableval; do
3831
 
    if test "X$pkg" = "X$p"; then
3832
 
      enable_fast_install=yes
3833
 
    fi
3834
 
  done
3835
 
  IFS="$ac_save_ifs"
3836
 
  ;;
3837
 
esac],
3838
 
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3839
 
])
3840
 
 
3841
 
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3842
 
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3843
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3844
 
AC_ENABLE_FAST_INSTALL(no)])
3845
 
 
3846
 
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3847
 
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3848
 
#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
3849
 
#   `both'.
3850
 
AC_DEFUN([AC_LIBTOOL_PICMODE],
3851
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3852
 
pic_mode=ifelse($#,1,$1,default)])
3853
 
 
3854
 
 
3855
 
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3856
 
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3857
 
[AC_MSG_CHECKING([for $1])
3858
 
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3859
 
[case $MAGIC_CMD in
3860
 
  /*)
3861
 
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3862
 
  ;;
3863
 
  ?:/*)
3864
 
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3865
 
  ;;
3866
 
  *)
3867
 
  ac_save_MAGIC_CMD="$MAGIC_CMD"
3868
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3869
 
dnl $ac_dummy forces splitting on constant user-supplied paths.
3870
 
dnl POSIX.2 word splitting is done only on the output of word expansions,
3871
 
dnl not every word.  This closes a longstanding sh security hole.
3872
 
  ac_dummy="ifelse([$2], , $PATH, [$2])"
3873
 
  for ac_dir in $ac_dummy; do
3874
 
    test -z "$ac_dir" && ac_dir=.
3875
 
    if test -f $ac_dir/$1; then
3876
 
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3877
 
      if test -n "$file_magic_test_file"; then
3878
 
        case $deplibs_check_method in
3879
 
        "file_magic "*)
3880
 
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3881
 
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3882
 
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3883
 
            egrep "$file_magic_regex" > /dev/null; then
3884
 
            :
3885
 
          else
3886
 
            cat <<EOF 1>&2
3887
 
 
3888
 
*** Warning: the command libtool uses to detect shared libraries,
3889
 
*** $file_magic_cmd, produces output that libtool cannot recognize.
3890
 
*** The result is that libtool may fail to recognize shared libraries
3891
 
*** as such.  This will affect the creation of libtool libraries that
3892
 
*** depend on shared libraries, but programs linked with such libtool
3893
 
*** libraries will work regardless of this problem.  Nevertheless, you
3894
 
*** may want to report the problem to your system manager and/or to
3895
 
*** bug-libtool@gnu.org
3896
 
 
3897
 
EOF
3898
 
          fi ;;
3899
 
        esac
3900
 
      fi
3901
 
      break
3902
 
    fi
3903
 
  done
3904
 
  IFS="$ac_save_ifs"
3905
 
  MAGIC_CMD="$ac_save_MAGIC_CMD"
3906
 
  ;;
3907
 
esac])
3908
 
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3909
 
if test -n "$MAGIC_CMD"; then
3910
 
  AC_MSG_RESULT($MAGIC_CMD)
3911
 
else
3912
 
  AC_MSG_RESULT(no)
3913
 
fi
3914
 
])
3915
 
 
3916
 
 
3917
 
# AC_PATH_MAGIC - find a file program which can recognise a shared library
3918
 
AC_DEFUN([AC_PATH_MAGIC],
3919
 
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3920
 
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3921
 
if test -z "$lt_cv_path_MAGIC_CMD"; then
3922
 
  if test -n "$ac_tool_prefix"; then
3923
 
    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3924
 
  else
3925
 
    MAGIC_CMD=:
3926
 
  fi
3927
 
fi
3928
 
])
3929
 
 
3930
 
 
3931
 
# AC_PROG_LD - find the path to the GNU or non-GNU linker
3932
 
AC_DEFUN([AC_PROG_LD],
3933
 
[AC_ARG_WITH(gnu-ld,
3934
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
3935
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3936
 
AC_REQUIRE([AC_PROG_CC])dnl
3937
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3938
 
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3939
 
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3940
 
ac_prog=ld
3941
 
if test "$GCC" = yes; then
3942
 
  # Check if gcc -print-prog-name=ld gives a path.
3943
 
  AC_MSG_CHECKING([for ld used by GCC])
3944
 
  case $host in
3945
 
  *-*-mingw*)
3946
 
    # gcc leaves a trailing carriage return which upsets mingw
3947
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3948
 
  *)
3949
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3950
 
  esac
3951
 
  case $ac_prog in
3952
 
    # Accept absolute paths.
3953
 
    [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3954
 
      re_direlt='/[[^/]][[^/]]*/\.\./'
3955
 
      # Canonicalize the path of ld
3956
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3957
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3958
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3959
 
      done
3960
 
      test -z "$LD" && LD="$ac_prog"
3961
 
      ;;
3962
 
  "")
3963
 
    # If it fails, then pretend we aren't using GCC.
3964
 
    ac_prog=ld
3965
 
    ;;
3966
 
  *)
3967
 
    # If it is relative, then search for the first ld in PATH.
3968
 
    with_gnu_ld=unknown
3969
 
    ;;
3970
 
  esac
3971
 
elif test "$with_gnu_ld" = yes; then
3972
 
  AC_MSG_CHECKING([for GNU ld])
3973
 
else
3974
 
  AC_MSG_CHECKING([for non-GNU ld])
3975
 
fi
3976
 
AC_CACHE_VAL(lt_cv_path_LD,
3977
 
[if test -z "$LD"; then
3978
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3979
 
  for ac_dir in $PATH; do
3980
 
    test -z "$ac_dir" && ac_dir=.
3981
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3982
 
      lt_cv_path_LD="$ac_dir/$ac_prog"
3983
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
3984
 
      # but apparently some GNU ld's only accept -v.
3985
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
3986
 
      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3987
 
        test "$with_gnu_ld" != no && break
3988
 
      else
3989
 
        test "$with_gnu_ld" != yes && break
3990
 
      fi
3991
 
    fi
3992
 
  done
3993
 
  IFS="$ac_save_ifs"
3994
 
else
3995
 
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3996
 
fi])
3997
 
LD="$lt_cv_path_LD"
3998
 
if test -n "$LD"; then
3999
 
  AC_MSG_RESULT($LD)
4000
 
else
4001
 
  AC_MSG_RESULT(no)
4002
 
fi
4003
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4004
 
AC_PROG_LD_GNU
4005
 
])
4006
 
 
4007
 
# AC_PROG_LD_GNU -
4008
 
AC_DEFUN([AC_PROG_LD_GNU],
4009
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4010
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4011
 
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4012
 
  lt_cv_prog_gnu_ld=yes
4013
 
else
4014
 
  lt_cv_prog_gnu_ld=no
4015
 
fi])
4016
 
with_gnu_ld=$lt_cv_prog_gnu_ld
4017
 
])
4018
 
 
4019
 
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4020
 
#   -- PORTME Some linkers may need a different reload flag.
4021
 
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4022
 
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4023
 
[lt_cv_ld_reload_flag='-r'])
4024
 
reload_flag=$lt_cv_ld_reload_flag
4025
 
test -n "$reload_flag" && reload_flag=" $reload_flag"
4026
 
])
4027
 
 
4028
 
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4029
 
#  -- PORTME fill in with the dynamic library characteristics
4030
 
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4031
 
[AC_CACHE_CHECK([how to recognise dependant libraries],
4032
 
lt_cv_deplibs_check_method,
4033
 
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4034
 
lt_cv_file_magic_test_file=
4035
 
lt_cv_deplibs_check_method='unknown'
4036
 
# Need to set the preceding variable on all platforms that support
4037
 
# interlibrary dependencies.
4038
 
# 'none' -- dependencies not supported.
4039
 
# `unknown' -- same as none, but documents that we really don't know.
4040
 
# 'pass_all' -- all dependencies passed with no checks.
4041
 
# 'test_compile' -- check by making test program.
4042
 
# 'file_magic [[regex]]' -- check by looking for files in library path
4043
 
# which responds to the $file_magic_cmd with a given egrep regex.
4044
 
# If you have `file' or equivalent on your system and you're not sure
4045
 
# whether `pass_all' will *always* work, you probably want this one.
4046
 
 
4047
 
case $host_os in
4048
 
aix4* | aix5*)
4049
 
  lt_cv_deplibs_check_method=pass_all
4050
 
  ;;
4051
 
 
4052
 
beos*)
4053
 
  lt_cv_deplibs_check_method=pass_all
4054
 
  ;;
4055
 
 
4056
 
bsdi4*)
4057
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4058
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4059
 
  lt_cv_file_magic_test_file=/shlib/libc.so
4060
 
  ;;
4061
 
 
4062
 
cygwin* | mingw* | pw32*)
4063
 
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4064
 
  lt_cv_file_magic_cmd='$OBJDUMP -f'
4065
 
  ;;
4066
 
 
4067
 
darwin* | rhapsody*)
4068
 
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4069
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4070
 
  case "$host_os" in
4071
 
  rhapsody* | darwin1.[[012]])
4072
 
    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4073
 
    ;;
4074
 
  *) # Darwin 1.3 on
4075
 
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4076
 
    ;;
4077
 
  esac
4078
 
  ;;
4079
 
 
4080
 
freebsd*)
4081
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4082
 
    case $host_cpu in
4083
 
    i*86 )
4084
 
      # Not sure whether the presence of OpenBSD here was a mistake.
4085
 
      # Let's accept both of them until this is cleared up.
4086
 
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4087
 
      lt_cv_file_magic_cmd=/usr/bin/file
4088
 
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4089
 
      ;;
4090
 
    esac
4091
 
  else
4092
 
    lt_cv_deplibs_check_method=pass_all
4093
 
  fi
4094
 
  ;;
4095
 
 
4096
 
gnu*)
4097
 
  lt_cv_deplibs_check_method=pass_all
4098
 
  ;;
4099
 
 
4100
 
hpux10.20*|hpux11*)
4101
 
  lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4102
 
  lt_cv_file_magic_cmd=/usr/bin/file
4103
 
  lt_cv_file_magic_test_file=/usr/lib/libc.sl
4104
 
  ;;
4105
 
 
4106
 
irix5* | irix6*)
4107
 
  case $host_os in
4108
 
  irix5*)
4109
 
    # this will be overridden with pass_all, but let us keep it just in case
4110
 
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4111
 
    ;;
4112
 
  *)
4113
 
    case $LD in
4114
 
    *-32|*"-32 ") libmagic=32-bit;;
4115
 
    *-n32|*"-n32 ") libmagic=N32;;
4116
 
    *-64|*"-64 ") libmagic=64-bit;;
4117
 
    *) libmagic=never-match;;
4118
 
    esac
4119
 
    # this will be overridden with pass_all, but let us keep it just in case
4120
 
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4121
 
    ;;
4122
 
  esac
4123
 
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4124
 
  lt_cv_deplibs_check_method=pass_all
4125
 
  ;;
4126
 
 
4127
 
# This must be Linux ELF.
4128
 
linux-gnu*)
4129
 
  case $host_cpu in
4130
 
  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
4131
 
    lt_cv_deplibs_check_method=pass_all ;;
4132
 
  *)
4133
 
    # glibc up to 2.1.1 does not perform some relocations on ARM
4134
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4135
 
  esac
4136
 
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4137
 
  ;;
4138
 
 
4139
 
netbsd*)
4140
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4141
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4142
 
  else
4143
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4144
 
  fi
4145
 
  ;;
4146
 
 
4147
 
newos6*)
4148
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4149
 
  lt_cv_file_magic_cmd=/usr/bin/file
4150
 
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4151
 
  ;;
4152
 
 
4153
 
openbsd*)
4154
 
  lt_cv_file_magic_cmd=/usr/bin/file
4155
 
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4156
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4157
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4158
 
  else
4159
 
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4160
 
  fi
4161
 
  ;;
4162
 
 
4163
 
osf3* | osf4* | osf5*)
4164
 
  # this will be overridden with pass_all, but let us keep it just in case
4165
 
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4166
 
  lt_cv_file_magic_test_file=/shlib/libc.so
4167
 
  lt_cv_deplibs_check_method=pass_all
4168
 
  ;;
4169
 
 
4170
 
sco3.2v5*)
4171
 
  lt_cv_deplibs_check_method=pass_all
4172
 
  ;;
4173
 
 
4174
 
solaris*)
4175
 
  lt_cv_deplibs_check_method=pass_all
4176
 
  lt_cv_file_magic_test_file=/lib/libc.so
4177
 
  ;;
4178
 
 
4179
 
sysv5uw[[78]]* | sysv4*uw2*)
4180
 
  lt_cv_deplibs_check_method=pass_all
4181
 
  ;;
4182
 
 
4183
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4184
 
  case $host_vendor in
4185
 
  motorola)
4186
 
    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]]'
4187
 
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4188
 
    ;;
4189
 
  ncr)
4190
 
    lt_cv_deplibs_check_method=pass_all
4191
 
    ;;
4192
 
  sequent)
4193
 
    lt_cv_file_magic_cmd='/bin/file'
4194
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4195
 
    ;;
4196
 
  sni)
4197
 
    lt_cv_file_magic_cmd='/bin/file'
4198
 
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4199
 
    lt_cv_file_magic_test_file=/lib/libc.so
4200
 
    ;;
4201
 
  esac
4202
 
  ;;
4203
 
esac
4204
 
])
4205
 
file_magic_cmd=$lt_cv_file_magic_cmd
4206
 
deplibs_check_method=$lt_cv_deplibs_check_method
4207
 
])
4208
 
 
4209
 
 
4210
 
# AC_PROG_NM - find the path to a BSD-compatible name lister
4211
 
AC_DEFUN([AC_PROG_NM],
4212
 
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4213
 
AC_MSG_CHECKING([for BSD-compatible nm])
4214
 
AC_CACHE_VAL(lt_cv_path_NM,
4215
 
[if test -n "$NM"; then
4216
 
  # Let the user override the test.
4217
 
  lt_cv_path_NM="$NM"
4218
 
else
4219
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4220
 
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4221
 
    test -z "$ac_dir" && ac_dir=.
4222
 
    tmp_nm=$ac_dir/${ac_tool_prefix}nm
4223
 
    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4224
 
      # Check to see if the nm accepts a BSD-compat flag.
4225
 
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4226
 
      #   nm: unknown option "B" ignored
4227
 
      # Tru64's nm complains that /dev/null is an invalid object file
4228
 
      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4229
 
        lt_cv_path_NM="$tmp_nm -B"
4230
 
        break
4231
 
      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4232
 
        lt_cv_path_NM="$tmp_nm -p"
4233
 
        break
4234
 
      else
4235
 
        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4236
 
        continue # so that we can try to find one that supports BSD flags
4237
 
      fi
4238
 
    fi
4239
 
  done
4240
 
  IFS="$ac_save_ifs"
4241
 
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4242
 
fi])
4243
 
NM="$lt_cv_path_NM"
4244
 
AC_MSG_RESULT([$NM])
4245
 
])
4246
 
 
4247
 
# AC_CHECK_LIBM - check for math library
4248
 
AC_DEFUN([AC_CHECK_LIBM],
4249
 
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4250
 
LIBM=
4251
 
case $host in
4252
 
*-*-beos* | *-*-cygwin* | *-*-pw32*)
4253
 
  # These system don't have libm
4254
 
  ;;
4255
 
*-ncr-sysv4.3*)
4256
 
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4257
 
  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4258
 
  ;;
4259
 
*)
4260
 
  AC_CHECK_LIB(m, main, LIBM="-lm")
4261
 
  ;;
4262
 
esac
4263
 
])
4264
 
 
4265
 
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4266
 
# the libltdl convenience library and INCLTDL to the include flags for
4267
 
# the libltdl header and adds --enable-ltdl-convenience to the
4268
 
# configure arguments.  Note that LIBLTDL and INCLTDL are not
4269
 
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
4270
 
# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
4271
 
# with '${top_builddir}/' and INCLTDL will be prefixed with
4272
 
# '${top_srcdir}/' (note the single quotes!).  If your package is not
4273
 
# flat and you're not using automake, define top_builddir and
4274
 
# top_srcdir appropriately in the Makefiles.
4275
 
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4276
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4277
 
  case $enable_ltdl_convenience in
4278
 
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4279
 
  "") enable_ltdl_convenience=yes
4280
 
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4281
 
  esac
4282
 
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4283
 
  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4284
 
])
4285
 
 
4286
 
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4287
 
# the libltdl installable library and INCLTDL to the include flags for
4288
 
# the libltdl header and adds --enable-ltdl-install to the configure
4289
 
# arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4290
 
# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
4291
 
# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
4292
 
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4293
 
# with '${top_srcdir}/' (note the single quotes!).  If your package is
4294
 
# not flat and you're not using automake, define top_builddir and
4295
 
# top_srcdir appropriately in the Makefiles.
4296
 
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4297
 
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4298
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4299
 
  AC_CHECK_LIB(ltdl, main,
4300
 
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4301
 
  [if test x"$enable_ltdl_install" = xno; then
4302
 
     AC_MSG_WARN([libltdl not installed, but installation disabled])
4303
 
   else
4304
 
     enable_ltdl_install=yes
4305
 
   fi
4306
 
  ])
4307
 
  if test x"$enable_ltdl_install" = x"yes"; then
4308
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
4309
 
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4310
 
    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4311
 
  else
4312
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4313
 
    LIBLTDL="-lltdl"
4314
 
    INCLTDL=
4315
 
  fi
4316
 
])
 
7875
])# _LT_AC_FILE_LTDLL_C
 
7876
 
 
7877
 
 
7878
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
 
7879
# ---------------------------------
 
7880
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
7881
 
4317
7882
 
4318
7883
# old names
4319
7884
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
4327
7892
# This is just to silence aclocal about the macro not being used
4328
7893
ifelse([AC_DISABLE_FAST_INSTALL])
4329
7894
 
4330
 
# gettext.m4 serial 16 (gettext-0.11.4)
4331
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
4332
 
dnl This file is free software, distributed under the terms of the GNU
4333
 
dnl General Public License.  As a special exception to the GNU General
4334
 
dnl Public License, this file may be distributed as part of a program
4335
 
dnl that contains a configuration script generated by Autoconf, under
4336
 
dnl the same distribution terms as the rest of that program.
 
7895
AC_DEFUN([LT_AC_PROG_GCJ],
 
7896
[AC_CHECK_TOOL(GCJ, gcj, no)
 
7897
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
7898
  AC_SUBST(GCJFLAGS)
 
7899
])
 
7900
 
 
7901
AC_DEFUN([LT_AC_PROG_RC],
 
7902
[AC_CHECK_TOOL(RC, windres, no)
 
7903
])
 
7904
 
 
7905
# NOTE: This macro has been submitted for inclusion into   #
 
7906
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
7907
#  a released version of Autoconf we should remove this    #
 
7908
#  macro and use it instead.                               #
 
7909
# LT_AC_PROG_SED
 
7910
# --------------
 
7911
# Check for a fully-functional sed program, that truncates
 
7912
# as few characters as possible.  Prefer GNU sed if found.
 
7913
AC_DEFUN([LT_AC_PROG_SED],
 
7914
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
7915
AC_CACHE_VAL(lt_cv_path_SED,
 
7916
[# Loop through the user's path and test for sed and gsed.
 
7917
# Then use that list of sed's as ones to test for truncation.
 
7918
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
7919
for as_dir in $PATH
 
7920
do
 
7921
  IFS=$as_save_IFS
 
7922
  test -z "$as_dir" && as_dir=.
 
7923
  for lt_ac_prog in sed gsed; do
 
7924
    for ac_exec_ext in '' $ac_executable_extensions; do
 
7925
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
7926
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
 
7927
      fi
 
7928
    done
 
7929
  done
 
7930
done
 
7931
lt_ac_max=0
 
7932
lt_ac_count=0
 
7933
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
7934
# along with /bin/sed that truncates output.
 
7935
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
7936
  test ! -f $lt_ac_sed && continue
 
7937
  cat /dev/null > conftest.in
 
7938
  lt_ac_count=0
 
7939
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
7940
  # Check for GNU sed and select it if it is found.
 
7941
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
7942
    lt_cv_path_SED=$lt_ac_sed
 
7943
    break
 
7944
  fi
 
7945
  while true; do
 
7946
    cat conftest.in conftest.in >conftest.tmp
 
7947
    mv conftest.tmp conftest.in
 
7948
    cp conftest.in conftest.nl
 
7949
    echo >>conftest.nl
 
7950
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
7951
    cmp -s conftest.out conftest.nl || break
 
7952
    # 10000 chars as input seems more than enough
 
7953
    test $lt_ac_count -gt 10 && break
 
7954
    lt_ac_count=`expr $lt_ac_count + 1`
 
7955
    if test $lt_ac_count -gt $lt_ac_max; then
 
7956
      lt_ac_max=$lt_ac_count
 
7957
      lt_cv_path_SED=$lt_ac_sed
 
7958
    fi
 
7959
  done
 
7960
done
 
7961
])
 
7962
SED=$lt_cv_path_SED
 
7963
AC_MSG_RESULT([$SED])
 
7964
])
 
7965
 
 
7966
# longdouble.m4 serial 1 (gettext-0.12)
 
7967
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
7968
dnl This file is free software; the Free Software Foundation
 
7969
dnl gives unlimited permission to copy and/or distribute it,
 
7970
dnl with or without modifications, as long as this notice is preserved.
 
7971
 
 
7972
dnl From Bruno Haible.
 
7973
dnl Test whether the compiler supports the 'long double' type.
 
7974
dnl Prerequisite: AC_PROG_CC
 
7975
 
 
7976
AC_DEFUN([gt_TYPE_LONGDOUBLE],
 
7977
[
 
7978
  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
 
7979
    [if test "$GCC" = yes; then
 
7980
       gt_cv_c_long_double=yes
 
7981
     else
 
7982
       AC_TRY_COMPILE([
 
7983
         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
 
7984
         long double foo = 0.0;
 
7985
         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
 
7986
         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
 
7987
         ], ,
 
7988
         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
 
7989
     fi])
 
7990
  if test $gt_cv_c_long_double = yes; then
 
7991
    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
 
7992
  fi
 
7993
])
 
7994
 
 
7995
# longlong.m4 serial 5
 
7996
dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
 
7997
dnl This file is free software; the Free Software Foundation
 
7998
dnl gives unlimited permission to copy and/or distribute it,
 
7999
dnl with or without modifications, as long as this notice is preserved.
 
8000
 
 
8001
dnl From Paul Eggert.
 
8002
 
 
8003
# Define HAVE_LONG_LONG if 'long long' works.
 
8004
 
 
8005
AC_DEFUN([gl_AC_TYPE_LONG_LONG],
 
8006
[
 
8007
  AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
 
8008
  [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
 
8009
    [long long llmax = (long long) -1;
 
8010
     return ll << i | ll >> i | llmax / ll | llmax % ll;],
 
8011
    ac_cv_type_long_long=yes,
 
8012
    ac_cv_type_long_long=no)])
 
8013
  if test $ac_cv_type_long_long = yes; then
 
8014
    AC_DEFINE(HAVE_LONG_LONG, 1,
 
8015
      [Define if you have the 'long long' type.])
 
8016
  fi
 
8017
])
 
8018
 
 
8019
# nls.m4 serial 2 (gettext-0.14.3)
 
8020
dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
 
8021
dnl This file is free software; the Free Software Foundation
 
8022
dnl gives unlimited permission to copy and/or distribute it,
 
8023
dnl with or without modifications, as long as this notice is preserved.
4337
8024
dnl
4338
8025
dnl This file can can be used in projects which are not available under
4339
8026
dnl the GNU General Public License or the GNU Library General Public
4346
8033
 
4347
8034
dnl Authors:
4348
8035
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
4349
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2002.
4350
 
 
4351
 
dnl Macro to add for using GNU gettext.
4352
 
 
4353
 
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
4354
 
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
4355
 
dnl    default (if it is not specified or empty) is 'no-libtool'.
4356
 
dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
4357
 
dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
4358
 
dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
4359
 
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
4360
 
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
4361
 
dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
4362
 
dnl    $(top_builddir)/intl/libintl.a will be created.
4363
 
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
4364
 
dnl    implementations (in libc or libintl) without the ngettext() function
4365
 
dnl    will be ignored.  If NEEDSYMBOL is specified and is
4366
 
dnl    'need-formatstring-macros', then GNU gettext implementations that don't
4367
 
dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
4368
 
dnl INTLDIR is used to find the intl libraries.  If empty,
4369
 
dnl    the value `$(top_builddir)/intl/' is used.
4370
 
dnl
4371
 
dnl The result of the configuration is one of three cases:
4372
 
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
4373
 
dnl    and used.
4374
 
dnl    Catalog format: GNU --> install in $(datadir)
4375
 
dnl    Catalog extension: .mo after installation, .gmo in source tree
4376
 
dnl 2) GNU gettext has been found in the system's C library.
4377
 
dnl    Catalog format: GNU --> install in $(datadir)
4378
 
dnl    Catalog extension: .mo after installation, .gmo in source tree
4379
 
dnl 3) No internationalization, always use English msgid.
4380
 
dnl    Catalog format: none
4381
 
dnl    Catalog extension: none
4382
 
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
4383
 
dnl The use of .gmo is historical (it was needed to avoid overwriting the
4384
 
dnl GNU format catalogs when building on a platform with an X/Open gettext),
4385
 
dnl but we keep it in order not to force irrelevant filename changes on the
4386
 
dnl maintainers.
4387
 
dnl
4388
 
AC_DEFUN([AM_GNU_GETTEXT],
 
8036
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
8037
 
 
8038
AC_PREREQ(2.50)
 
8039
 
 
8040
AC_DEFUN([AM_NLS],
4389
8041
[
4390
 
  dnl Argument checking.
4391
 
  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
4392
 
    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
4393
 
])])])])])
4394
 
  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
4395
 
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
4396
 
])])])])
4397
 
  define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
4398
 
  define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
4399
 
 
4400
 
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
4401
 
  ifelse(gt_included_intl, yes, [
4402
 
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
4403
 
  ])
4404
 
 
4405
 
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
4406
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4407
 
  AC_REQUIRE([AC_LIB_RPATH])
4408
 
 
4409
 
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
4410
 
  dnl Ideally we would do this search only after the
4411
 
  dnl      if test "$USE_NLS" = "yes"; then
4412
 
  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
4413
 
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
4414
 
  dnl the configure script would need to contain the same shell code
4415
 
  dnl again, outside any 'if'. There are two solutions:
4416
 
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
4417
 
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
4418
 
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
4419
 
  dnl documented, we avoid it.
4420
 
  ifelse(gt_included_intl, yes, , [
4421
 
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
4422
 
  ])
4423
 
 
4424
8042
  AC_MSG_CHECKING([whether NLS is requested])
4425
8043
  dnl Default is enabled NLS
4426
8044
  AC_ARG_ENABLE(nls,
4428
8046
    USE_NLS=$enableval, USE_NLS=yes)
4429
8047
  AC_MSG_RESULT($USE_NLS)
4430
8048
  AC_SUBST(USE_NLS)
4431
 
 
4432
 
  ifelse(gt_included_intl, yes, [
4433
 
    BUILD_INCLUDED_LIBINTL=no
4434
 
    USE_INCLUDED_LIBINTL=no
4435
 
  ])
4436
 
  LIBINTL=
4437
 
  LTLIBINTL=
4438
 
  POSUB=
4439
 
 
4440
 
  dnl If we use NLS figure out what method
4441
 
  if test "$USE_NLS" = "yes"; then
4442
 
    gt_use_preinstalled_gnugettext=no
4443
 
    ifelse(gt_included_intl, yes, [
4444
 
      AC_MSG_CHECKING([whether included gettext is requested])
4445
 
      AC_ARG_WITH(included-gettext,
4446
 
        [  --with-included-gettext use the GNU gettext library included here],
4447
 
        nls_cv_force_use_gnu_gettext=$withval,
4448
 
        nls_cv_force_use_gnu_gettext=no)
4449
 
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
4450
 
 
4451
 
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
4452
 
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
4453
 
    ])
4454
 
        dnl User does not insist on using GNU NLS library.  Figure out what
4455
 
        dnl to use.  If GNU gettext is available we use this.  Else we have
4456
 
        dnl to fall back to GNU NLS library.
4457
 
 
4458
 
        dnl Add a version number to the cache macros.
4459
 
        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
4460
 
        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
4461
 
        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
4462
 
 
4463
 
        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
4464
 
         [AC_TRY_LINK([#include <libintl.h>
4465
 
]ifelse([$2], [need-formatstring-macros],
4466
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
4467
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
4468
 
#endif
4469
 
changequote(,)dnl
4470
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
4471
 
changequote([,])dnl
4472
 
], [])[extern int _nl_msg_cat_cntr;
4473
 
extern int *_nl_domain_bindings;],
4474
 
            [bindtextdomain ("", "");
4475
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
4476
 
            gt_cv_func_gnugettext_libc=yes,
4477
 
            gt_cv_func_gnugettext_libc=no)])
4478
 
 
4479
 
        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
4480
 
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
4481
 
          ifelse(gt_included_intl, yes, , [
4482
 
            AM_ICONV_LINK
4483
 
          ])
4484
 
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
4485
 
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
4486
 
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
4487
 
          dnl even if libiconv doesn't exist.
4488
 
          AC_LIB_LINKFLAGS_BODY([intl])
4489
 
          AC_CACHE_CHECK([for GNU gettext in libintl],
4490
 
            gt_cv_func_gnugettext_libintl,
4491
 
           [gt_save_CPPFLAGS="$CPPFLAGS"
4492
 
            CPPFLAGS="$CPPFLAGS $INCINTL"
4493
 
            gt_save_LIBS="$LIBS"
4494
 
            LIBS="$LIBS $LIBINTL"
4495
 
            dnl Now see whether libintl exists and does not depend on libiconv.
4496
 
            AC_TRY_LINK([#include <libintl.h>
4497
 
]ifelse([$2], [need-formatstring-macros],
4498
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
4499
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
4500
 
#endif
4501
 
changequote(,)dnl
4502
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
4503
 
changequote([,])dnl
4504
 
], [])[extern int _nl_msg_cat_cntr;
4505
 
extern
4506
 
#ifdef __cplusplus
4507
 
"C"
4508
 
#endif
4509
 
const char *_nl_expand_alias ();],
4510
 
              [bindtextdomain ("", "");
4511
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
4512
 
              gt_cv_func_gnugettext_libintl=yes,
4513
 
              gt_cv_func_gnugettext_libintl=no)
4514
 
            dnl Now see whether libintl exists and depends on libiconv.
4515
 
            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
4516
 
              LIBS="$LIBS $LIBICONV"
4517
 
              AC_TRY_LINK([#include <libintl.h>
4518
 
]ifelse([$2], [need-formatstring-macros],
4519
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
4520
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
4521
 
#endif
4522
 
changequote(,)dnl
4523
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
4524
 
changequote([,])dnl
4525
 
], [])[extern int _nl_msg_cat_cntr;
4526
 
extern
4527
 
#ifdef __cplusplus
4528
 
"C"
4529
 
#endif
4530
 
const char *_nl_expand_alias ();],
4531
 
                [bindtextdomain ("", "");
4532
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
4533
 
               [LIBINTL="$LIBINTL $LIBICONV"
4534
 
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
4535
 
                gt_cv_func_gnugettext_libintl=yes
4536
 
               ])
4537
 
            fi
4538
 
            CPPFLAGS="$gt_save_CPPFLAGS"
4539
 
            LIBS="$gt_save_LIBS"])
4540
 
        fi
4541
 
 
4542
 
        dnl If an already present or preinstalled GNU gettext() is found,
4543
 
        dnl use it.  But if this macro is used in GNU gettext, and GNU
4544
 
        dnl gettext is already preinstalled in libintl, we update this
4545
 
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
4546
 
        if test "$gt_cv_func_gnugettext_libc" = "yes" \
4547
 
           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
4548
 
                && test "$PACKAGE" != gettext; }; then
4549
 
          gt_use_preinstalled_gnugettext=yes
4550
 
        else
4551
 
          dnl Reset the values set by searching for libintl.
4552
 
          LIBINTL=
4553
 
          LTLIBINTL=
4554
 
          INCINTL=
4555
 
        fi
4556
 
 
4557
 
    ifelse(gt_included_intl, yes, [
4558
 
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
4559
 
          dnl GNU gettext is not found in the C library.
4560
 
          dnl Fall back on included GNU gettext library.
4561
 
          nls_cv_use_gnu_gettext=yes
4562
 
        fi
4563
 
      fi
4564
 
 
4565
 
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
4566
 
        dnl Mark actions used to generate GNU NLS library.
4567
 
        INTLOBJS="\$(GETTOBJS)"
4568
 
        BUILD_INCLUDED_LIBINTL=yes
4569
 
        USE_INCLUDED_LIBINTL=yes
4570
 
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
4571
 
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
4572
 
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
4573
 
      fi
4574
 
 
4575
 
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
4576
 
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
4577
 
        dnl Mark actions to use GNU gettext tools.
4578
 
        CATOBJEXT=.gmo
4579
 
      fi
4580
 
    ])
4581
 
 
4582
 
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
4583
 
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
4584
 
      AC_DEFINE(ENABLE_NLS, 1,
4585
 
        [Define to 1 if translation of program messages to the user's native language
4586
 
   is requested.])
4587
 
    else
4588
 
      USE_NLS=no
4589
 
    fi
4590
 
  fi
4591
 
 
4592
 
  if test "$USE_NLS" = "yes"; then
4593
 
 
4594
 
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
4595
 
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
4596
 
        AC_MSG_CHECKING([how to link with libintl])
4597
 
        AC_MSG_RESULT([$LIBINTL])
4598
 
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
4599
 
      fi
4600
 
 
4601
 
      dnl For backward compatibility. Some packages may be using this.
4602
 
      AC_DEFINE(HAVE_GETTEXT, 1,
4603
 
       [Define if the GNU gettext() function is already present or preinstalled.])
4604
 
      AC_DEFINE(HAVE_DCGETTEXT, 1,
4605
 
       [Define if the GNU dcgettext() function is already present or preinstalled.])
4606
 
    fi
4607
 
 
4608
 
    dnl We need to process the po/ directory.
4609
 
    POSUB=po
4610
 
  fi
4611
 
 
4612
 
  ifelse(gt_included_intl, yes, [
4613
 
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
4614
 
    dnl to 'yes' because some of the testsuite requires it.
4615
 
    if test "$PACKAGE" = gettext; then
4616
 
      BUILD_INCLUDED_LIBINTL=yes
4617
 
    fi
4618
 
 
4619
 
    dnl Make all variables we use known to autoconf.
4620
 
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
4621
 
    AC_SUBST(USE_INCLUDED_LIBINTL)
4622
 
    AC_SUBST(CATOBJEXT)
4623
 
    AC_SUBST(INTLOBJS)
4624
 
 
4625
 
    dnl For backward compatibility. Some configure.ins may be using this.
4626
 
    nls_cv_header_intl=
4627
 
    nls_cv_header_libgt=
4628
 
 
4629
 
    dnl For backward compatibility. Some Makefiles may be using this.
4630
 
    DATADIRNAME=share
4631
 
    AC_SUBST(DATADIRNAME)
4632
 
 
4633
 
    dnl For backward compatibility. Some Makefiles may be using this.
4634
 
    INSTOBJEXT=.mo
4635
 
    AC_SUBST(INSTOBJEXT)
4636
 
 
4637
 
    dnl For backward compatibility. Some Makefiles may be using this.
4638
 
    GENCAT=gencat
4639
 
    AC_SUBST(GENCAT)
4640
 
 
4641
 
    dnl Enable libtool support if the surrounding package wishes it.
4642
 
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
4643
 
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
4644
 
  ])
4645
 
 
4646
 
  dnl For backward compatibility. Some Makefiles may be using this.
4647
 
  INTLLIBS="$LIBINTL"
4648
 
  AC_SUBST(INTLLIBS)
4649
 
 
4650
 
  dnl Make all documented variables known to autoconf.
4651
 
  AC_SUBST(LIBINTL)
4652
 
  AC_SUBST(LTLIBINTL)
4653
 
  AC_SUBST(POSUB)
4654
 
])
4655
 
 
4656
 
 
4657
 
dnl Checks for all prerequisites of the po subdirectory,
4658
 
dnl except for USE_NLS.
 
8049
])
 
8050
 
 
8051
AC_DEFUN([AM_MKINSTALLDIRS],
 
8052
[
 
8053
  dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
 
8054
  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
 
8055
  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
8056
  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
 
8057
  dnl Try to locate it.
 
8058
  MKINSTALLDIRS=
 
8059
  if test -n "$ac_aux_dir"; then
 
8060
    case "$ac_aux_dir" in
 
8061
      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
 
8062
      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
 
8063
    esac
 
8064
  fi
 
8065
  if test -z "$MKINSTALLDIRS"; then
 
8066
    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
8067
  fi
 
8068
  AC_SUBST(MKINSTALLDIRS)
 
8069
])
 
8070
 
 
8071
# po.m4 serial 7 (gettext-0.14.3)
 
8072
dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
 
8073
dnl This file is free software; the Free Software Foundation
 
8074
dnl gives unlimited permission to copy and/or distribute it,
 
8075
dnl with or without modifications, as long as this notice is preserved.
 
8076
dnl
 
8077
dnl This file can can be used in projects which are not available under
 
8078
dnl the GNU General Public License or the GNU Library General Public
 
8079
dnl License but which still want to provide support for the GNU gettext
 
8080
dnl functionality.
 
8081
dnl Please note that the actual code of the GNU gettext library is covered
 
8082
dnl by the GNU Library General Public License, and the rest of the GNU
 
8083
dnl gettext package package is covered by the GNU General Public License.
 
8084
dnl They are *not* in the public domain.
 
8085
 
 
8086
dnl Authors:
 
8087
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
8088
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
8089
 
 
8090
AC_PREREQ(2.50)
 
8091
 
 
8092
dnl Checks for all prerequisites of the po subdirectory.
4659
8093
AC_DEFUN([AM_PO_SUBDIRS],
4660
8094
[
4661
8095
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
4662
8096
  AC_REQUIRE([AC_PROG_INSTALL])dnl
4663
8097
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
 
8098
  AC_REQUIRE([AM_NLS])dnl
4664
8099
 
4665
8100
  dnl Perform the following tests also if --disable-nls has been given,
4666
8101
  dnl because they are needed for "make dist" to work.
4669
8104
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
4670
8105
  dnl The second test excludes FreeBSD msgfmt.
4671
8106
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
4672
 
    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
 
8107
    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
4673
8108
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
4674
8109
    :)
4675
8110
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
4676
8111
 
4677
 
  dnl Search for GNU xgettext 0.11 or newer in the PATH.
 
8112
  dnl Search for GNU xgettext 0.12 or newer in the PATH.
4678
8113
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
4679
8114
  dnl The second test excludes FreeBSD xgettext.
4680
8115
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
4681
 
    [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
4682
 
     (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 
8116
    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
 
8117
     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
4683
8118
    :)
4684
8119
  dnl Remove leftover from FreeBSD xgettext call.
4685
8120
  rm -f messages.po
4686
8121
 
4687
8122
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
4688
8123
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
4689
 
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
 
8124
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
4690
8125
 
4691
8126
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
4692
8127
  dnl Test whether we really found GNU msgfmt.
4709
8144
  if test "$XGETTEXT" != ":"; then
4710
8145
    dnl If it is no GNU xgettext we define it as : so that the
4711
8146
    dnl Makefiles still can work.
4712
 
    if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
4713
 
       (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
 
8147
    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
 
8148
       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
4714
8149
      : ;
4715
8150
    else
4716
8151
      AC_MSG_RESULT(
4741
8176
          /*) top_srcdir="$ac_given_srcdir" ;;
4742
8177
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
4743
8178
        esac
 
8179
        # Treat a directory as a PO directory if and only if it has a
 
8180
        # POTFILES.in file. This allows packages to have multiple PO
 
8181
        # directories under different names or in different locations.
4744
8182
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
4745
8183
          rm -f "$ac_dir/POTFILES"
4746
8184
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
4747
8185
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
4748
 
          # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
 
8186
          POMAKEFILEDEPS="POTFILES.in"
 
8187
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
4749
8188
          # on $ac_dir but don't depend on user-specified configuration
4750
8189
          # parameters.
4751
8190
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
4752
8191
            # The LINGUAS file contains the set of available languages.
4753
 
            if test -n "$ALL_LINGUAS"; then
 
8192
            if test -n "$OBSOLETE_ALL_LINGUAS"; then
4754
8193
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
4755
8194
            fi
4756
 
            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
8195
            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
4757
8196
            # Hide the ALL_LINGUAS assigment from automake.
4758
8197
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 
8198
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 
8199
          else
 
8200
            # The set of available languages was given in configure.in.
 
8201
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
4759
8202
          fi
 
8203
          # Compute POFILES
 
8204
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 
8205
          # Compute UPDATEPOFILES
 
8206
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 
8207
          # Compute DUMMYPOFILES
 
8208
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 
8209
          # Compute GMOFILES
 
8210
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
4760
8211
          case "$ac_given_srcdir" in
4761
8212
            .) srcdirpre= ;;
4762
8213
            *) srcdirpre='$(srcdir)/' ;;
4763
8214
          esac
4764
8215
          POFILES=
4765
 
          GMOFILES=
4766
8216
          UPDATEPOFILES=
4767
8217
          DUMMYPOFILES=
 
8218
          GMOFILES=
4768
8219
          for lang in $ALL_LINGUAS; do
4769
8220
            POFILES="$POFILES $srcdirpre$lang.po"
4770
 
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
4771
8221
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
4772
8222
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 
8223
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
4773
8224
          done
4774
8225
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
4775
8226
          # environment variable.
4804
8255
            done
4805
8256
          fi
4806
8257
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
4807
 
          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
 
8258
          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
4808
8259
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
4809
8260
            if test -f "$f"; then
4810
8261
              case "$f" in
4817
8268
        ;;
4818
8269
      esac
4819
8270
    done],
4820
 
   [# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
4821
 
    # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
 
8271
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
 
8272
    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
4822
8273
    # from automake.
4823
 
    eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
 
8274
    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
4824
8275
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
4825
8276
    LINGUAS="${LINGUAS-%UNSET%}"
4826
8277
   ])
4827
8278
])
4828
8279
 
4829
 
 
4830
 
dnl Checks for all prerequisites of the intl subdirectory,
4831
 
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
4832
 
dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
4833
 
AC_DEFUN([AM_INTL_SUBDIR],
 
8280
dnl Postprocesses a Makefile in a directory containing PO files.
 
8281
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
4834
8282
[
4835
 
  AC_REQUIRE([AC_PROG_INSTALL])dnl
4836
 
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
4837
 
  AC_REQUIRE([AC_PROG_CC])dnl
4838
 
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
4839
 
  AC_REQUIRE([AC_PROG_RANLIB])dnl
4840
 
  AC_REQUIRE([AC_ISC_POSIX])dnl
4841
 
  AC_REQUIRE([AC_HEADER_STDC])dnl
4842
 
  AC_REQUIRE([AC_C_CONST])dnl
4843
 
  AC_REQUIRE([AC_C_INLINE])dnl
4844
 
  AC_REQUIRE([AC_TYPE_OFF_T])dnl
4845
 
  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
4846
 
  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
4847
 
  AC_REQUIRE([AC_FUNC_MMAP])dnl
4848
 
  AC_REQUIRE([jm_GLIBC21])dnl
4849
 
  AC_REQUIRE([gt_INTDIV0])dnl
4850
 
  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
4851
 
  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
4852
 
  AC_REQUIRE([gt_INTTYPES_PRI])dnl
4853
 
 
4854
 
  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
4855
 
stdlib.h string.h unistd.h sys/param.h])
4856
 
  AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
4857
 
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
4858
 
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
4859
 
 
4860
 
  AM_ICONV
4861
 
  AM_LANGINFO_CODESET
4862
 
  if test $ac_cv_header_locale_h = yes; then
4863
 
    AM_LC_MESSAGES
 
8283
  # When this code is run, in config.status, two variables have already been
 
8284
  # set:
 
8285
  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
 
8286
  # - LINGUAS is the value of the environment variable LINGUAS at configure
 
8287
  #   time.
 
8288
 
 
8289
changequote(,)dnl
 
8290
  # Adjust a relative srcdir.
 
8291
  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 
8292
  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
8293
  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 
8294
  # In autoconf-2.13 it is called $ac_given_srcdir.
 
8295
  # In autoconf-2.50 it is called $srcdir.
 
8296
  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 
8297
  case "$ac_given_srcdir" in
 
8298
    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 
8299
    /*) top_srcdir="$ac_given_srcdir" ;;
 
8300
    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
8301
  esac
 
8302
 
 
8303
  # Find a way to echo strings without interpreting backslash.
 
8304
  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
 
8305
    gt_echo='echo'
 
8306
  else
 
8307
    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
 
8308
      gt_echo='printf %s\n'
 
8309
    else
 
8310
      echo_func () {
 
8311
        cat <<EOT
 
8312
$*
 
8313
EOT
 
8314
      }
 
8315
      gt_echo='echo_func'
 
8316
    fi
4864
8317
  fi
4865
8318
 
4866
 
  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
4867
 
  dnl because plural.y uses bison specific features. It requires at least
4868
 
  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
4869
 
  dnl compile.
4870
 
  dnl bison is only needed for the maintainer (who touches plural.y). But in
4871
 
  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
4872
 
  dnl the rule in general Makefile. Now, some people carelessly touch the
4873
 
  dnl files or have a broken "make" program, hence the plural.c rule will
4874
 
  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
4875
 
  dnl present or too old.
4876
 
  AC_CHECK_PROGS([INTLBISON], [bison])
4877
 
  if test -z "$INTLBISON"; then
4878
 
    ac_verc_fail=yes
4879
 
  else
4880
 
    dnl Found it, now check the version.
4881
 
    AC_MSG_CHECKING([version of bison])
4882
 
changequote(<<,>>)dnl
4883
 
    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
4884
 
    case $ac_prog_version in
4885
 
      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
4886
 
      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
 
8319
  # A sed script that extracts the value of VARIABLE from a Makefile.
 
8320
  sed_x_variable='
 
8321
# Test if the hold space is empty.
 
8322
x
 
8323
s/P/P/
 
8324
x
 
8325
ta
 
8326
# Yes it was empty. Look if we have the expected variable definition.
 
8327
/^[      ]*VARIABLE[     ]*=/{
 
8328
  # Seen the first line of the variable definition.
 
8329
  s/^[   ]*VARIABLE[     ]*=//
 
8330
  ba
 
8331
}
 
8332
bd
 
8333
:a
 
8334
# Here we are processing a line from the variable definition.
 
8335
# Remove comment, more precisely replace it with a space.
 
8336
s/#.*$/ /
 
8337
# See if the line ends in a backslash.
 
8338
tb
 
8339
:b
 
8340
s/\\$//
 
8341
# Print the line, without the trailing backslash.
 
8342
p
 
8343
tc
 
8344
# There was no trailing backslash. The end of the variable definition is
 
8345
# reached. Clear the hold space.
 
8346
s/^.*$//
 
8347
x
 
8348
bd
 
8349
:c
 
8350
# A trailing backslash means that the variable definition continues in the
 
8351
# next line. Put a nonempty string into the hold space to indicate this.
 
8352
s/^.*$/P/
 
8353
x
 
8354
:d
 
8355
'
4887
8356
changequote([,])dnl
4888
 
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
4889
 
      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
4890
 
    esac
4891
 
    AC_MSG_RESULT([$ac_prog_version])
4892
 
  fi
4893
 
  if test $ac_verc_fail = yes; then
4894
 
    INTLBISON=:
4895
 
  fi
4896
 
])
4897
 
 
4898
 
 
4899
 
AC_DEFUN([AM_MKINSTALLDIRS],
4900
 
[
4901
 
  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
4902
 
  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
4903
 
  dnl Try to locate is.
4904
 
  MKINSTALLDIRS=
4905
 
  if test -n "$ac_aux_dir"; then
4906
 
    MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
4907
 
  fi
4908
 
  if test -z "$MKINSTALLDIRS"; then
4909
 
    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
4910
 
  fi
4911
 
  AC_SUBST(MKINSTALLDIRS)
4912
 
])
4913
 
 
4914
 
 
4915
 
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
4916
 
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
4917
 
 
4918
 
# lib-prefix.m4 serial 1 (gettext-0.11)
4919
 
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
4920
 
dnl This file is free software, distributed under the terms of the GNU
4921
 
dnl General Public License.  As a special exception to the GNU General
4922
 
dnl Public License, this file may be distributed as part of a program
4923
 
dnl that contains a configuration script generated by Autoconf, under
4924
 
dnl the same distribution terms as the rest of that program.
 
8357
 
 
8358
  # Set POTFILES to the value of the Makefile variable POTFILES.
 
8359
  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
 
8360
  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
 
8361
  # Compute POTFILES_DEPS as
 
8362
  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
 
8363
  POTFILES_DEPS=
 
8364
  for file in $POTFILES; do
 
8365
    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
 
8366
  done
 
8367
  POMAKEFILEDEPS=""
 
8368
 
 
8369
  if test -n "$OBSOLETE_ALL_LINGUAS"; then
 
8370
    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 
8371
  fi
 
8372
  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 
8373
    # The LINGUAS file contains the set of available languages.
 
8374
    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
8375
    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 
8376
  else
 
8377
    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
 
8378
    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
 
8379
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
 
8380
  fi
 
8381
  # Hide the ALL_LINGUAS assigment from automake.
 
8382
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 
8383
  # Compute POFILES
 
8384
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 
8385
  # Compute UPDATEPOFILES
 
8386
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 
8387
  # Compute DUMMYPOFILES
 
8388
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 
8389
  # Compute GMOFILES
 
8390
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
 
8391
  # Compute PROPERTIESFILES
 
8392
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
 
8393
  # Compute CLASSFILES
 
8394
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
 
8395
  # Compute QMFILES
 
8396
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
 
8397
  # Compute MSGFILES
 
8398
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
 
8399
  # Compute RESOURCESDLLFILES
 
8400
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
 
8401
  case "$ac_given_srcdir" in
 
8402
    .) srcdirpre= ;;
 
8403
    *) srcdirpre='$(srcdir)/' ;;
 
8404
  esac
 
8405
  POFILES=
 
8406
  UPDATEPOFILES=
 
8407
  DUMMYPOFILES=
 
8408
  GMOFILES=
 
8409
  PROPERTIESFILES=
 
8410
  CLASSFILES=
 
8411
  QMFILES=
 
8412
  MSGFILES=
 
8413
  RESOURCESDLLFILES=
 
8414
  for lang in $ALL_LINGUAS; do
 
8415
    POFILES="$POFILES $srcdirpre$lang.po"
 
8416
    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 
8417
    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 
8418
    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 
8419
    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
 
8420
    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
 
8421
    QMFILES="$QMFILES $srcdirpre$lang.qm"
 
8422
    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
8423
    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
 
8424
    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
 
8425
    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
 
8426
  done
 
8427
  # CATALOGS depends on both $ac_dir and the user's LINGUAS
 
8428
  # environment variable.
 
8429
  INST_LINGUAS=
 
8430
  if test -n "$ALL_LINGUAS"; then
 
8431
    for presentlang in $ALL_LINGUAS; do
 
8432
      useit=no
 
8433
      if test "%UNSET%" != "$LINGUAS"; then
 
8434
        desiredlanguages="$LINGUAS"
 
8435
      else
 
8436
        desiredlanguages="$ALL_LINGUAS"
 
8437
      fi
 
8438
      for desiredlang in $desiredlanguages; do
 
8439
        # Use the presentlang catalog if desiredlang is
 
8440
        #   a. equal to presentlang, or
 
8441
        #   b. a variant of presentlang (because in this case,
 
8442
        #      presentlang can be used as a fallback for messages
 
8443
        #      which are not translated in the desiredlang catalog).
 
8444
        case "$desiredlang" in
 
8445
          "$presentlang"*) useit=yes;;
 
8446
        esac
 
8447
      done
 
8448
      if test $useit = yes; then
 
8449
        INST_LINGUAS="$INST_LINGUAS $presentlang"
 
8450
      fi
 
8451
    done
 
8452
  fi
 
8453
  CATALOGS=
 
8454
  JAVACATALOGS=
 
8455
  QTCATALOGS=
 
8456
  TCLCATALOGS=
 
8457
  CSHARPCATALOGS=
 
8458
  if test -n "$INST_LINGUAS"; then
 
8459
    for lang in $INST_LINGUAS; do
 
8460
      CATALOGS="$CATALOGS $lang.gmo"
 
8461
      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
 
8462
      QTCATALOGS="$QTCATALOGS $lang.qm"
 
8463
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
8464
      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
 
8465
      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
 
8466
      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
 
8467
    done
 
8468
  fi
 
8469
 
 
8470
  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
 
8471
  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
 
8472
    # Add dependencies that cannot be formulated as a simple suffix rule.
 
8473
    for lang in $ALL_LINGUAS; do
 
8474
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
8475
      cat >> "$ac_file.tmp" <<EOF
 
8476
$frobbedlang.msg: $lang.po
 
8477
        @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
 
8478
        \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
8479
EOF
 
8480
    done
 
8481
  fi
 
8482
  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
 
8483
    # Add dependencies that cannot be formulated as a simple suffix rule.
 
8484
    for lang in $ALL_LINGUAS; do
 
8485
      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
 
8486
      cat >> "$ac_file.tmp" <<EOF
 
8487
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
 
8488
        @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
 
8489
        \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
8490
EOF
 
8491
    done
 
8492
  fi
 
8493
  if test -n "$POMAKEFILEDEPS"; then
 
8494
    cat >> "$ac_file.tmp" <<EOF
 
8495
Makefile: $POMAKEFILEDEPS
 
8496
EOF
 
8497
  fi
 
8498
  mv "$ac_file.tmp" "$ac_file"
 
8499
])
 
8500
 
 
8501
# printf-posix.m4 serial 2 (gettext-0.13.1)
 
8502
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
8503
dnl This file is free software; the Free Software Foundation
 
8504
dnl gives unlimited permission to copy and/or distribute it,
 
8505
dnl with or without modifications, as long as this notice is preserved.
4925
8506
 
4926
8507
dnl From Bruno Haible.
 
8508
dnl Test whether the printf() function supports POSIX/XSI format strings with
 
8509
dnl positions.
4927
8510
 
4928
 
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
4929
 
dnl to access previously installed libraries. The basic assumption is that
4930
 
dnl a user will want packages to use other packages he previously installed
4931
 
dnl with the same --prefix option.
4932
 
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
4933
 
dnl libraries, but is otherwise very convenient.
4934
 
AC_DEFUN([AC_LIB_PREFIX],
 
8511
AC_DEFUN([gt_PRINTF_POSIX],
4935
8512
[
4936
 
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
4937
8513
  AC_REQUIRE([AC_PROG_CC])
4938
 
  AC_REQUIRE([AC_CANONICAL_HOST])
4939
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4940
 
  dnl By default, look in $includedir and $libdir.
4941
 
  use_additional=yes
4942
 
  AC_LIB_WITH_FINAL_PREFIX([
4943
 
    eval additional_includedir=\"$includedir\"
4944
 
    eval additional_libdir=\"$libdir\"
4945
 
  ])
4946
 
  AC_ARG_WITH([lib-prefix],
4947
 
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
4948
 
  --without-lib-prefix    don't search for libraries in includedir and libdir],
4949
 
[
4950
 
    if test "X$withval" = "Xno"; then
4951
 
      use_additional=no
4952
 
    else
4953
 
      if test "X$withval" = "X"; then
4954
 
        AC_LIB_WITH_FINAL_PREFIX([
4955
 
          eval additional_includedir=\"$includedir\"
4956
 
          eval additional_libdir=\"$libdir\"
4957
 
        ])
4958
 
      else
4959
 
        additional_includedir="$withval/include"
4960
 
        additional_libdir="$withval/lib"
4961
 
      fi
4962
 
    fi
4963
 
])
4964
 
  if test $use_additional = yes; then
4965
 
    dnl Potentially add $additional_includedir to $CPPFLAGS.
4966
 
    dnl But don't add it
4967
 
    dnl   1. if it's the standard /usr/include,
4968
 
    dnl   2. if it's already present in $CPPFLAGS,
4969
 
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
4970
 
    dnl   4. if it doesn't exist as a directory.
4971
 
    if test "X$additional_includedir" != "X/usr/include"; then
4972
 
      haveit=
4973
 
      for x in $CPPFLAGS; do
4974
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4975
 
        if test "X$x" = "X-I$additional_includedir"; then
4976
 
          haveit=yes
4977
 
          break
4978
 
        fi
4979
 
      done
4980
 
      if test -z "$haveit"; then
4981
 
        if test "X$additional_includedir" = "X/usr/local/include"; then
4982
 
          if test -n "$GCC"; then
4983
 
            case $host_os in
4984
 
              linux*) haveit=yes;;
4985
 
            esac
4986
 
          fi
4987
 
        fi
4988
 
        if test -z "$haveit"; then
4989
 
          if test -d "$additional_includedir"; then
4990
 
            dnl Really add $additional_includedir to $CPPFLAGS.
4991
 
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
4992
 
          fi
4993
 
        fi
4994
 
      fi
4995
 
    fi
4996
 
    dnl Potentially add $additional_libdir to $LDFLAGS.
4997
 
    dnl But don't add it
4998
 
    dnl   1. if it's the standard /usr/lib,
4999
 
    dnl   2. if it's already present in $LDFLAGS,
5000
 
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
5001
 
    dnl   4. if it doesn't exist as a directory.
5002
 
    if test "X$additional_libdir" != "X/usr/lib"; then
5003
 
      haveit=
5004
 
      for x in $LDFLAGS; do
5005
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5006
 
        if test "X$x" = "X-L$additional_libdir"; then
5007
 
          haveit=yes
5008
 
          break
5009
 
        fi
5010
 
      done
5011
 
      if test -z "$haveit"; then
5012
 
        if test "X$additional_libdir" = "X/usr/local/lib"; then
5013
 
          if test -n "$GCC"; then
5014
 
            case $host_os in
5015
 
              linux*) haveit=yes;;
5016
 
            esac
5017
 
          fi
5018
 
        fi
5019
 
        if test -z "$haveit"; then
5020
 
          if test -d "$additional_libdir"; then
5021
 
            dnl Really add $additional_libdir to $LDFLAGS.
5022
 
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
5023
 
          fi
5024
 
        fi
5025
 
      fi
5026
 
    fi
5027
 
  fi
5028
 
])
5029
 
 
5030
 
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
5031
 
dnl acl_final_exec_prefix, containing the values to which $prefix and
5032
 
dnl $exec_prefix will expand at the end of the configure script.
5033
 
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
5034
 
[
5035
 
  dnl Unfortunately, prefix and exec_prefix get only finally determined
5036
 
  dnl at the end of configure.
5037
 
  if test "X$prefix" = "XNONE"; then
5038
 
    acl_final_prefix="$ac_default_prefix"
5039
 
  else
5040
 
    acl_final_prefix="$prefix"
5041
 
  fi
5042
 
  if test "X$exec_prefix" = "XNONE"; then
5043
 
    acl_final_exec_prefix='${prefix}'
5044
 
  else
5045
 
    acl_final_exec_prefix="$exec_prefix"
5046
 
  fi
5047
 
  acl_save_prefix="$prefix"
5048
 
  prefix="$acl_final_prefix"
5049
 
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
5050
 
  prefix="$acl_save_prefix"
5051
 
])
5052
 
 
5053
 
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
5054
 
dnl variables prefix and exec_prefix bound to the values they will have
5055
 
dnl at the end of the configure script.
5056
 
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
5057
 
[
5058
 
  acl_save_prefix="$prefix"
5059
 
  prefix="$acl_final_prefix"
5060
 
  acl_save_exec_prefix="$exec_prefix"
5061
 
  exec_prefix="$acl_final_exec_prefix"
5062
 
  $1
5063
 
  exec_prefix="$acl_save_exec_prefix"
5064
 
  prefix="$acl_save_prefix"
5065
 
])
5066
 
 
5067
 
# lib-link.m4 serial 3 (gettext-0.11.3)
5068
 
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
5069
 
dnl This file is free software, distributed under the terms of the GNU
5070
 
dnl General Public License.  As a special exception to the GNU General
5071
 
dnl Public License, this file may be distributed as part of a program
5072
 
dnl that contains a configuration script generated by Autoconf, under
5073
 
dnl the same distribution terms as the rest of that program.
5074
 
 
5075
 
dnl From Bruno Haible.
5076
 
 
5077
 
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
5078
 
dnl the libraries corresponding to explicit and implicit dependencies.
5079
 
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
5080
 
dnl augments the CPPFLAGS variable.
5081
 
AC_DEFUN([AC_LIB_LINKFLAGS],
5082
 
[
5083
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
5084
 
  AC_REQUIRE([AC_LIB_RPATH])
5085
 
  define([Name],[translit([$1],[./-], [___])])
5086
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
5087
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
5088
 
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
5089
 
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
5090
 
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
5091
 
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
5092
 
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
5093
 
  ])
5094
 
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
5095
 
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
5096
 
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
5097
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
5098
 
  AC_SUBST([LIB]NAME)
5099
 
  AC_SUBST([LTLIB]NAME)
5100
 
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
5101
 
  dnl results of this search when this library appears as a dependency.
5102
 
  HAVE_LIB[]NAME=yes
5103
 
  undefine([Name])
5104
 
  undefine([NAME])
5105
 
])
5106
 
 
5107
 
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
5108
 
dnl searches for libname and the libraries corresponding to explicit and
5109
 
dnl implicit dependencies, together with the specified include files and
5110
 
dnl the ability to compile and link the specified testcode. If found, it
5111
 
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
5112
 
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
5113
 
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
5114
 
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
5115
 
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
5116
 
[
5117
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
5118
 
  AC_REQUIRE([AC_LIB_RPATH])
5119
 
  define([Name],[translit([$1],[./-], [___])])
5120
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
5121
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
5122
 
 
5123
 
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
5124
 
  dnl accordingly.
5125
 
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
5126
 
 
5127
 
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
5128
 
  dnl because if the user has installed lib[]Name and not disabled its use
5129
 
  dnl via --without-lib[]Name-prefix, he wants to use it.
5130
 
  ac_save_CPPFLAGS="$CPPFLAGS"
5131
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
5132
 
 
5133
 
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
5134
 
    ac_save_LIBS="$LIBS"
5135
 
    LIBS="$LIBS $LIB[]NAME"
5136
 
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
5137
 
    LIBS="$ac_save_LIBS"
5138
 
  ])
5139
 
  if test "$ac_cv_lib[]Name" = yes; then
5140
 
    HAVE_LIB[]NAME=yes
5141
 
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
5142
 
    AC_MSG_CHECKING([how to link with lib[]$1])
5143
 
    AC_MSG_RESULT([$LIB[]NAME])
5144
 
  else
5145
 
    HAVE_LIB[]NAME=no
5146
 
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
5147
 
    dnl $INC[]NAME either.
5148
 
    CPPFLAGS="$ac_save_CPPFLAGS"
5149
 
    LIB[]NAME=
5150
 
    LTLIB[]NAME=
5151
 
  fi
5152
 
  AC_SUBST([HAVE_LIB]NAME)
5153
 
  AC_SUBST([LIB]NAME)
5154
 
  AC_SUBST([LTLIB]NAME)
5155
 
  undefine([Name])
5156
 
  undefine([NAME])
5157
 
])
5158
 
 
5159
 
dnl Determine the platform dependent parameters needed to use rpath:
5160
 
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
5161
 
dnl hardcode_direct, hardcode_minus_L,
5162
 
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
5163
 
AC_DEFUN([AC_LIB_RPATH],
5164
 
[
5165
 
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
5166
 
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
5167
 
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
5168
 
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
5169
 
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
5170
 
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
5171
 
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
5172
 
    . ./conftest.sh
5173
 
    rm -f ./conftest.sh
5174
 
    acl_cv_rpath=done
5175
 
  ])
5176
 
  wl="$acl_cv_wl"
5177
 
  libext="$acl_cv_libext"
5178
 
  shlibext="$acl_cv_shlibext"
5179
 
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
5180
 
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
5181
 
  hardcode_direct="$acl_cv_hardcode_direct"
5182
 
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
5183
 
  sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
5184
 
  sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
5185
 
  dnl Determine whether the user wants rpath handling at all.
5186
 
  AC_ARG_ENABLE(rpath,
5187
 
    [  --disable-rpath         do not hardcode runtime library paths],
5188
 
    :, enable_rpath=yes)
5189
 
])
5190
 
 
5191
 
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
5192
 
dnl the libraries corresponding to explicit and implicit dependencies.
5193
 
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
5194
 
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
5195
 
[
5196
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
5197
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
5198
 
  dnl By default, look in $includedir and $libdir.
5199
 
  use_additional=yes
5200
 
  AC_LIB_WITH_FINAL_PREFIX([
5201
 
    eval additional_includedir=\"$includedir\"
5202
 
    eval additional_libdir=\"$libdir\"
5203
 
  ])
5204
 
  AC_ARG_WITH([lib$1-prefix],
5205
 
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
5206
 
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
5207
 
[
5208
 
    if test "X$withval" = "Xno"; then
5209
 
      use_additional=no
5210
 
    else
5211
 
      if test "X$withval" = "X"; then
5212
 
        AC_LIB_WITH_FINAL_PREFIX([
5213
 
          eval additional_includedir=\"$includedir\"
5214
 
          eval additional_libdir=\"$libdir\"
5215
 
        ])
5216
 
      else
5217
 
        additional_includedir="$withval/include"
5218
 
        additional_libdir="$withval/lib"
5219
 
      fi
5220
 
    fi
5221
 
])
5222
 
  dnl Search the library and its dependencies in $additional_libdir and
5223
 
  dnl $LDFLAGS. Using breadth-first-seach.
5224
 
  LIB[]NAME=
5225
 
  LTLIB[]NAME=
5226
 
  INC[]NAME=
5227
 
  rpathdirs=
5228
 
  ltrpathdirs=
5229
 
  names_already_handled=
5230
 
  names_next_round='$1 $2'
5231
 
  while test -n "$names_next_round"; do
5232
 
    names_this_round="$names_next_round"
5233
 
    names_next_round=
5234
 
    for name in $names_this_round; do
5235
 
      already_handled=
5236
 
      for n in $names_already_handled; do
5237
 
        if test "$n" = "$name"; then
5238
 
          already_handled=yes
5239
 
          break
5240
 
        fi
5241
 
      done
5242
 
      if test -z "$already_handled"; then
5243
 
        names_already_handled="$names_already_handled $name"
5244
 
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
5245
 
        dnl or AC_LIB_HAVE_LINKFLAGS call.
5246
 
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
5247
 
        eval value=\"\$HAVE_LIB$uppername\"
5248
 
        if test -n "$value"; then
5249
 
          if test "$value" = yes; then
5250
 
            eval value=\"\$LIB$uppername\"
5251
 
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
5252
 
            eval value=\"\$LTLIB$uppername\"
5253
 
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
5254
 
          else
5255
 
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
5256
 
            dnl that this library doesn't exist. So just drop it.
5257
 
            :
5258
 
          fi
5259
 
        else
5260
 
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
5261
 
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
5262
 
          found_dir=
5263
 
          found_la=
5264
 
          found_so=
5265
 
          found_a=
5266
 
          if test $use_additional = yes; then
5267
 
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
5268
 
              found_dir="$additional_libdir"
5269
 
              found_so="$additional_libdir/lib$name.$shlibext"
5270
 
              if test -f "$additional_libdir/lib$name.la"; then
5271
 
                found_la="$additional_libdir/lib$name.la"
5272
 
              fi
5273
 
            else
5274
 
              if test -f "$additional_libdir/lib$name.$libext"; then
5275
 
                found_dir="$additional_libdir"
5276
 
                found_a="$additional_libdir/lib$name.$libext"
5277
 
                if test -f "$additional_libdir/lib$name.la"; then
5278
 
                  found_la="$additional_libdir/lib$name.la"
5279
 
                fi
5280
 
              fi
5281
 
            fi
5282
 
          fi
5283
 
          if test "X$found_dir" = "X"; then
5284
 
            for x in $LDFLAGS $LTLIB[]NAME; do
5285
 
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5286
 
              case "$x" in
5287
 
                -L*)
5288
 
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
5289
 
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
5290
 
                    found_dir="$dir"
5291
 
                    found_so="$dir/lib$name.$shlibext"
5292
 
                    if test -f "$dir/lib$name.la"; then
5293
 
                      found_la="$dir/lib$name.la"
5294
 
                    fi
5295
 
                  else
5296
 
                    if test -f "$dir/lib$name.$libext"; then
5297
 
                      found_dir="$dir"
5298
 
                      found_a="$dir/lib$name.$libext"
5299
 
                      if test -f "$dir/lib$name.la"; then
5300
 
                        found_la="$dir/lib$name.la"
5301
 
                      fi
5302
 
                    fi
5303
 
                  fi
5304
 
                  ;;
5305
 
              esac
5306
 
              if test "X$found_dir" != "X"; then
5307
 
                break
5308
 
              fi
5309
 
            done
5310
 
          fi
5311
 
          if test "X$found_dir" != "X"; then
5312
 
            dnl Found the library.
5313
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
5314
 
            if test "X$found_so" != "X"; then
5315
 
              dnl Linking with a shared library. We attempt to hardcode its
5316
 
              dnl directory into the executable's runpath, unless it's the
5317
 
              dnl standard /usr/lib.
5318
 
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
5319
 
                dnl No hardcoding is needed.
5320
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5321
 
              else
5322
 
                dnl Use an explicit option to hardcode DIR into the resulting
5323
 
                dnl binary.
5324
 
                dnl Potentially add DIR to ltrpathdirs.
5325
 
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
5326
 
                haveit=
5327
 
                for x in $ltrpathdirs; do
5328
 
                  if test "X$x" = "X$found_dir"; then
5329
 
                    haveit=yes
5330
 
                    break
5331
 
                  fi
5332
 
                done
5333
 
                if test -z "$haveit"; then
5334
 
                  ltrpathdirs="$ltrpathdirs $found_dir"
5335
 
                fi
5336
 
                dnl The hardcoding into $LIBNAME is system dependent.
5337
 
                if test "$hardcode_direct" = yes; then
5338
 
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
5339
 
                  dnl resulting binary.
5340
 
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5341
 
                else
5342
 
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
5343
 
                    dnl Use an explicit option to hardcode DIR into the resulting
5344
 
                    dnl binary.
5345
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5346
 
                    dnl Potentially add DIR to rpathdirs.
5347
 
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
5348
 
                    haveit=
5349
 
                    for x in $rpathdirs; do
5350
 
                      if test "X$x" = "X$found_dir"; then
5351
 
                        haveit=yes
5352
 
                        break
5353
 
                      fi
5354
 
                    done
5355
 
                    if test -z "$haveit"; then
5356
 
                      rpathdirs="$rpathdirs $found_dir"
5357
 
                    fi
5358
 
                  else
5359
 
                    dnl Rely on "-L$found_dir".
5360
 
                    dnl But don't add it if it's already contained in the LDFLAGS
5361
 
                    dnl or the already constructed $LIBNAME
5362
 
                    haveit=
5363
 
                    for x in $LDFLAGS $LIB[]NAME; do
5364
 
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5365
 
                      if test "X$x" = "X-L$found_dir"; then
5366
 
                        haveit=yes
5367
 
                        break
5368
 
                      fi
5369
 
                    done
5370
 
                    if test -z "$haveit"; then
5371
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
5372
 
                    fi
5373
 
                    if test "$hardcode_minus_L" != no; then
5374
 
                      dnl FIXME: Not sure whether we should use
5375
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
5376
 
                      dnl here.
5377
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
5378
 
                    else
5379
 
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
5380
 
                      dnl here, because this doesn't fit in flags passed to the
5381
 
                      dnl compiler. So give up. No hardcoding. This affects only
5382
 
                      dnl very old systems.
5383
 
                      dnl FIXME: Not sure whether we should use
5384
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
5385
 
                      dnl here.
5386
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
5387
 
                    fi
5388
 
                  fi
5389
 
                fi
5390
 
              fi
5391
 
            else
5392
 
              if test "X$found_a" != "X"; then
5393
 
                dnl Linking with a static library.
5394
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
5395
 
              else
5396
 
                dnl We shouldn't come here, but anyway it's good to have a
5397
 
                dnl fallback.
5398
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
5399
 
              fi
5400
 
            fi
5401
 
            dnl Assume the include files are nearby.
5402
 
            additional_includedir=
5403
 
            case "$found_dir" in
5404
 
              */lib | */lib/)
5405
 
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
5406
 
                additional_includedir="$basedir/include"
5407
 
                ;;
5408
 
            esac
5409
 
            if test "X$additional_includedir" != "X"; then
5410
 
              dnl Potentially add $additional_includedir to $INCNAME.
5411
 
              dnl But don't add it
5412
 
              dnl   1. if it's the standard /usr/include,
5413
 
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
5414
 
              dnl   3. if it's already present in $CPPFLAGS or the already
5415
 
              dnl      constructed $INCNAME,
5416
 
              dnl   4. if it doesn't exist as a directory.
5417
 
              if test "X$additional_includedir" != "X/usr/include"; then
5418
 
                haveit=
5419
 
                if test "X$additional_includedir" = "X/usr/local/include"; then
5420
 
                  if test -n "$GCC"; then
5421
 
                    case $host_os in
5422
 
                      linux*) haveit=yes;;
5423
 
                    esac
5424
 
                  fi
5425
 
                fi
5426
 
                if test -z "$haveit"; then
5427
 
                  for x in $CPPFLAGS $INC[]NAME; do
5428
 
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5429
 
                    if test "X$x" = "X-I$additional_includedir"; then
5430
 
                      haveit=yes
5431
 
                      break
5432
 
                    fi
5433
 
                  done
5434
 
                  if test -z "$haveit"; then
5435
 
                    if test -d "$additional_includedir"; then
5436
 
                      dnl Really add $additional_includedir to $INCNAME.
5437
 
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
5438
 
                    fi
5439
 
                  fi
5440
 
                fi
5441
 
              fi
5442
 
            fi
5443
 
            dnl Look for dependencies.
5444
 
            if test -n "$found_la"; then
5445
 
              dnl Read the .la file. It defines the variables
5446
 
              dnl dlname, library_names, old_library, dependency_libs, current,
5447
 
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
5448
 
              save_libdir="$libdir"
5449
 
              case "$found_la" in
5450
 
                */* | *\\*) . "$found_la" ;;
5451
 
                *) . "./$found_la" ;;
5452
 
              esac
5453
 
              libdir="$save_libdir"
5454
 
              dnl We use only dependency_libs.
5455
 
              for dep in $dependency_libs; do
5456
 
                case "$dep" in
5457
 
                  -L*)
5458
 
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
5459
 
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
5460
 
                    dnl But don't add it
5461
 
                    dnl   1. if it's the standard /usr/lib,
5462
 
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
5463
 
                    dnl   3. if it's already present in $LDFLAGS or the already
5464
 
                    dnl      constructed $LIBNAME,
5465
 
                    dnl   4. if it doesn't exist as a directory.
5466
 
                    if test "X$additional_libdir" != "X/usr/lib"; then
5467
 
                      haveit=
5468
 
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
5469
 
                        if test -n "$GCC"; then
5470
 
                          case $host_os in
5471
 
                            linux*) haveit=yes;;
5472
 
                          esac
5473
 
                        fi
5474
 
                      fi
5475
 
                      if test -z "$haveit"; then
5476
 
                        haveit=
5477
 
                        for x in $LDFLAGS $LIB[]NAME; do
5478
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5479
 
                          if test "X$x" = "X-L$additional_libdir"; then
5480
 
                            haveit=yes
5481
 
                            break
5482
 
                          fi
5483
 
                        done
5484
 
                        if test -z "$haveit"; then
5485
 
                          if test -d "$additional_libdir"; then
5486
 
                            dnl Really add $additional_libdir to $LIBNAME.
5487
 
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
5488
 
                          fi
5489
 
                        fi
5490
 
                        haveit=
5491
 
                        for x in $LDFLAGS $LTLIB[]NAME; do
5492
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5493
 
                          if test "X$x" = "X-L$additional_libdir"; then
5494
 
                            haveit=yes
5495
 
                            break
5496
 
                          fi
5497
 
                        done
5498
 
                        if test -z "$haveit"; then
5499
 
                          if test -d "$additional_libdir"; then
5500
 
                            dnl Really add $additional_libdir to $LTLIBNAME.
5501
 
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
5502
 
                          fi
5503
 
                        fi
5504
 
                      fi
5505
 
                    fi
5506
 
                    ;;
5507
 
                  -R*)
5508
 
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
5509
 
                    if test "$enable_rpath" != no; then
5510
 
                      dnl Potentially add DIR to rpathdirs.
5511
 
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
5512
 
                      haveit=
5513
 
                      for x in $rpathdirs; do
5514
 
                        if test "X$x" = "X$dir"; then
5515
 
                          haveit=yes
5516
 
                          break
5517
 
                        fi
5518
 
                      done
5519
 
                      if test -z "$haveit"; then
5520
 
                        rpathdirs="$rpathdirs $dir"
5521
 
                      fi
5522
 
                      dnl Potentially add DIR to ltrpathdirs.
5523
 
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
5524
 
                      haveit=
5525
 
                      for x in $ltrpathdirs; do
5526
 
                        if test "X$x" = "X$dir"; then
5527
 
                          haveit=yes
5528
 
                          break
5529
 
                        fi
5530
 
                      done
5531
 
                      if test -z "$haveit"; then
5532
 
                        ltrpathdirs="$ltrpathdirs $dir"
5533
 
                      fi
5534
 
                    fi
5535
 
                    ;;
5536
 
                  -l*)
5537
 
                    dnl Handle this in the next round.
5538
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
5539
 
                    ;;
5540
 
                  *.la)
5541
 
                    dnl Handle this in the next round. Throw away the .la's
5542
 
                    dnl directory; it is already contained in a preceding -L
5543
 
                    dnl option.
5544
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
5545
 
                    ;;
5546
 
                  *)
5547
 
                    dnl Most likely an immediate library name.
5548
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
5549
 
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
5550
 
                    ;;
5551
 
                esac
5552
 
              done
5553
 
            fi
5554
 
          else
5555
 
            dnl Didn't find the library; assume it is in the system directories
5556
 
            dnl known to the linker and runtime loader. (All the system
5557
 
            dnl directories known to the linker should also be known to the
5558
 
            dnl runtime loader, otherwise the system is severely misconfigured.)
5559
 
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
5560
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
5561
 
          fi
5562
 
        fi
5563
 
      fi
5564
 
    done
5565
 
  done
5566
 
  if test "X$rpathdirs" != "X"; then
5567
 
    if test -n "$hardcode_libdir_separator"; then
5568
 
      dnl Weird platform: only the last -rpath option counts, the user must
5569
 
      dnl pass all path elements in one option. We can arrange that for a
5570
 
      dnl single library, but not when more than one $LIBNAMEs are used.
5571
 
      alldirs=
5572
 
      for found_dir in $rpathdirs; do
5573
 
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
5574
 
      done
5575
 
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
5576
 
      acl_save_libdir="$libdir"
5577
 
      libdir="$alldirs"
5578
 
      eval flag=\"$hardcode_libdir_flag_spec\"
5579
 
      libdir="$acl_save_libdir"
5580
 
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
5581
 
    else
5582
 
      dnl The -rpath options are cumulative.
5583
 
      for found_dir in $rpathdirs; do
5584
 
        acl_save_libdir="$libdir"
5585
 
        libdir="$found_dir"
5586
 
        eval flag=\"$hardcode_libdir_flag_spec\"
5587
 
        libdir="$acl_save_libdir"
5588
 
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
5589
 
      done
5590
 
    fi
5591
 
  fi
5592
 
  if test "X$ltrpathdirs" != "X"; then
5593
 
    dnl When using libtool, the option that works for both libraries and
5594
 
    dnl executables is -R. The -R options are cumulative.
5595
 
    for found_dir in $ltrpathdirs; do
5596
 
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
5597
 
    done
5598
 
  fi
5599
 
])
5600
 
 
5601
 
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
5602
 
dnl unless already present in VAR.
5603
 
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
5604
 
dnl contains two or three consecutive elements that belong together.
5605
 
AC_DEFUN([AC_LIB_APPENDTOVAR],
5606
 
[
5607
 
  for element in [$2]; do
5608
 
    haveit=
5609
 
    for x in $[$1]; do
5610
 
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
5611
 
      if test "X$x" = "X$element"; then
5612
 
        haveit=yes
5613
 
        break
5614
 
      fi
5615
 
    done
5616
 
    if test -z "$haveit"; then
5617
 
      [$1]="${[$1]}${[$1]:+ }$element"
5618
 
    fi
5619
 
  done
5620
 
])
5621
 
 
5622
 
# lib-ld.m4 serial 1 (gettext-0.11)
5623
 
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
5624
 
dnl This file is free software, distributed under the terms of the GNU
5625
 
dnl General Public License.  As a special exception to the GNU General
5626
 
dnl Public License, this file may be distributed as part of a program
5627
 
dnl that contains a configuration script generated by Autoconf, under
5628
 
dnl the same distribution terms as the rest of that program.
5629
 
 
5630
 
dnl Subroutines of libtool.m4,
5631
 
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
5632
 
dnl with libtool.m4.
5633
 
 
5634
 
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
5635
 
AC_DEFUN([AC_LIB_PROG_LD_GNU],
5636
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
5637
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
5638
 
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
5639
 
  acl_cv_prog_gnu_ld=yes
5640
 
else
5641
 
  acl_cv_prog_gnu_ld=no
5642
 
fi])
5643
 
with_gnu_ld=$acl_cv_prog_gnu_ld
5644
 
])
5645
 
 
5646
 
dnl From libtool-1.4. Sets the variable LD.
5647
 
AC_DEFUN([AC_LIB_PROG_LD],
5648
 
[AC_ARG_WITH(gnu-ld,
5649
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
5650
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
5651
 
AC_REQUIRE([AC_PROG_CC])dnl
5652
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5653
 
ac_prog=ld
5654
 
if test "$GCC" = yes; then
5655
 
  # Check if gcc -print-prog-name=ld gives a path.
5656
 
  AC_MSG_CHECKING([for ld used by GCC])
5657
 
  case $host in
5658
 
  *-*-mingw*)
5659
 
    # gcc leaves a trailing carriage return which upsets mingw
5660
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5661
 
  *)
5662
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5663
 
  esac
5664
 
  case $ac_prog in
5665
 
    # Accept absolute paths.
5666
 
    [[\\/]* | [A-Za-z]:[\\/]*)]
5667
 
      [re_direlt='/[^/][^/]*/\.\./']
5668
 
      # Canonicalize the path of ld
5669
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
5670
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5671
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
5672
 
      done
5673
 
      test -z "$LD" && LD="$ac_prog"
 
8514
  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
 
8515
    gt_cv_func_printf_posix,
 
8516
    [
 
8517
      AC_TRY_RUN([
 
8518
#include <stdio.h>
 
8519
#include <string.h>
 
8520
/* The string "%2$d %1$d", with dollar characters protected from the shell's
 
8521
   dollar expansion (possibly an autoconf bug).  */
 
8522
static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
 
8523
static char buf[100];
 
8524
int main ()
 
8525
{
 
8526
  sprintf (buf, format, 33, 55);
 
8527
  return (strcmp (buf, "55 33") != 0);
 
8528
}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
 
8529
      [
 
8530
        AC_EGREP_CPP(notposix, [
 
8531
#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
 
8532
  notposix
 
8533
#endif
 
8534
        ], gt_cv_func_printf_posix="guessing no",
 
8535
           gt_cv_func_printf_posix="guessing yes")
 
8536
      ])
 
8537
    ])
 
8538
  case $gt_cv_func_printf_posix in
 
8539
    *yes)
 
8540
      AC_DEFINE(HAVE_POSIX_PRINTF, 1,
 
8541
        [Define if your printf() function supports format strings with positions.])
5674
8542
      ;;
5675
 
  "")
5676
 
    # If it fails, then pretend we aren't using GCC.
5677
 
    ac_prog=ld
5678
 
    ;;
5679
 
  *)
5680
 
    # If it is relative, then search for the first ld in PATH.
5681
 
    with_gnu_ld=unknown
5682
 
    ;;
5683
8543
  esac
5684
 
elif test "$with_gnu_ld" = yes; then
5685
 
  AC_MSG_CHECKING([for GNU ld])
5686
 
else
5687
 
  AC_MSG_CHECKING([for non-GNU ld])
5688
 
fi
5689
 
AC_CACHE_VAL(acl_cv_path_LD,
5690
 
[if test -z "$LD"; then
5691
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5692
 
  for ac_dir in $PATH; do
5693
 
    test -z "$ac_dir" && ac_dir=.
5694
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5695
 
      acl_cv_path_LD="$ac_dir/$ac_prog"
5696
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
5697
 
      # but apparently some GNU ld's only accept -v.
5698
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
5699
 
      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
5700
 
        test "$with_gnu_ld" != no && break
5701
 
      else
5702
 
        test "$with_gnu_ld" != yes && break
5703
 
      fi
5704
 
    fi
5705
 
  done
5706
 
  IFS="$ac_save_ifs"
5707
 
else
5708
 
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
5709
 
fi])
5710
 
LD="$acl_cv_path_LD"
5711
 
if test -n "$LD"; then
5712
 
  AC_MSG_RESULT($LD)
5713
 
else
5714
 
  AC_MSG_RESULT(no)
5715
 
fi
5716
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5717
 
AC_LIB_PROG_LD_GNU
5718
 
])
5719
 
 
5720
 
# iconv.m4 serial AM4 (gettext-0.11.3)
5721
 
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5722
 
dnl This file is free software, distributed under the terms of the GNU
5723
 
dnl General Public License.  As a special exception to the GNU General
5724
 
dnl Public License, this file may be distributed as part of a program
5725
 
dnl that contains a configuration script generated by Autoconf, under
5726
 
dnl the same distribution terms as the rest of that program.
5727
 
 
5728
 
dnl From Bruno Haible.
5729
 
 
5730
 
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
5731
 
[
5732
 
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
5733
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
5734
 
  AC_REQUIRE([AC_LIB_RPATH])
5735
 
 
5736
 
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
5737
 
  dnl accordingly.
5738
 
  AC_LIB_LINKFLAGS_BODY([iconv])
5739
 
])
5740
 
 
5741
 
AC_DEFUN([AM_ICONV_LINK],
5742
 
[
5743
 
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
5744
 
  dnl those with the standalone portable GNU libiconv installed).
5745
 
 
5746
 
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
5747
 
  dnl accordingly.
5748
 
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
5749
 
 
5750
 
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
5751
 
  dnl because if the user has installed libiconv and not disabled its use
5752
 
  dnl via --without-libiconv-prefix, he wants to use it. The first
5753
 
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
5754
 
  am_save_CPPFLAGS="$CPPFLAGS"
5755
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
5756
 
 
5757
 
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
5758
 
    am_cv_func_iconv="no, consider installing GNU libiconv"
5759
 
    am_cv_lib_iconv=no
5760
 
    AC_TRY_LINK([#include <stdlib.h>
5761
 
#include <iconv.h>],
5762
 
      [iconv_t cd = iconv_open("","");
5763
 
       iconv(cd,NULL,NULL,NULL,NULL);
5764
 
       iconv_close(cd);],
5765
 
      am_cv_func_iconv=yes)
5766
 
    if test "$am_cv_func_iconv" != yes; then
5767
 
      am_save_LIBS="$LIBS"
5768
 
      LIBS="$LIBS $LIBICONV"
5769
 
      AC_TRY_LINK([#include <stdlib.h>
5770
 
#include <iconv.h>],
5771
 
        [iconv_t cd = iconv_open("","");
5772
 
         iconv(cd,NULL,NULL,NULL,NULL);
5773
 
         iconv_close(cd);],
5774
 
        am_cv_lib_iconv=yes
5775
 
        am_cv_func_iconv=yes)
5776
 
      LIBS="$am_save_LIBS"
5777
 
    fi
5778
 
  ])
5779
 
  if test "$am_cv_func_iconv" = yes; then
5780
 
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
5781
 
  fi
5782
 
  if test "$am_cv_lib_iconv" = yes; then
5783
 
    AC_MSG_CHECKING([how to link with libiconv])
5784
 
    AC_MSG_RESULT([$LIBICONV])
5785
 
  else
5786
 
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
5787
 
    dnl either.
5788
 
    CPPFLAGS="$am_save_CPPFLAGS"
5789
 
    LIBICONV=
5790
 
    LTLIBICONV=
5791
 
  fi
5792
 
  AC_SUBST(LIBICONV)
5793
 
  AC_SUBST(LTLIBICONV)
5794
 
])
5795
 
 
5796
 
AC_DEFUN([AM_ICONV],
5797
 
[
5798
 
  AM_ICONV_LINK
5799
 
  if test "$am_cv_func_iconv" = yes; then
5800
 
    AC_MSG_CHECKING([for iconv declaration])
5801
 
    AC_CACHE_VAL(am_cv_proto_iconv, [
5802
 
      AC_TRY_COMPILE([
5803
 
#include <stdlib.h>
5804
 
#include <iconv.h>
5805
 
extern
5806
 
#ifdef __cplusplus
5807
 
"C"
5808
 
#endif
5809
 
#if defined(__STDC__) || defined(__cplusplus)
5810
 
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5811
 
#else
5812
 
size_t iconv();
5813
 
#endif
5814
 
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
5815
 
      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
5816
 
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5817
 
    AC_MSG_RESULT([$]{ac_t:-
5818
 
         }[$]am_cv_proto_iconv)
5819
 
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
5820
 
      [Define as const if the declaration of iconv() needs const.])
5821
 
  fi
5822
 
])
5823
 
 
5824
 
# progtest.m4 serial 2 (gettext-0.10.40)
5825
 
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
5826
 
dnl This file is free software, distributed under the terms of the GNU
5827
 
dnl General Public License.  As a special exception to the GNU General
5828
 
dnl Public License, this file may be distributed as part of a program
5829
 
dnl that contains a configuration script generated by Autoconf, under
5830
 
dnl the same distribution terms as the rest of that program.
 
8544
])
 
8545
 
 
8546
# progtest.m4 serial 4 (gettext-0.14.2)
 
8547
dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
 
8548
dnl This file is free software; the Free Software Foundation
 
8549
dnl gives unlimited permission to copy and/or distribute it,
 
8550
dnl with or without modifications, as long as this notice is preserved.
5831
8551
dnl
5832
8552
dnl This file can can be used in projects which are not available under
5833
8553
dnl the GNU General Public License or the GNU Library General Public
5841
8561
dnl Authors:
5842
8562
dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
5843
8563
 
 
8564
AC_PREREQ(2.50)
 
8565
 
5844
8566
# Search path for a program which passes the given test.
5845
8567
 
5846
8568
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
5847
8569
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
5848
8570
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
5849
 
[# Extract the first word of "$2", so it can be a program name with args.
 
8571
[
 
8572
# Prepare PATH_SEPARATOR.
 
8573
# The user is always right.
 
8574
if test "${PATH_SEPARATOR+set}" != set; then
 
8575
  echo "#! /bin/sh" >conf$$.sh
 
8576
  echo  "exit 0"   >>conf$$.sh
 
8577
  chmod +x conf$$.sh
 
8578
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
8579
    PATH_SEPARATOR=';'
 
8580
  else
 
8581
    PATH_SEPARATOR=:
 
8582
  fi
 
8583
  rm -f conf$$.sh
 
8584
fi
 
8585
 
 
8586
# Find out how to test for executable files. Don't use a zero-byte file,
 
8587
# as systems may use methods other than mode bits to determine executability.
 
8588
cat >conf$$.file <<_ASEOF
 
8589
#! /bin/sh
 
8590
exit 0
 
8591
_ASEOF
 
8592
chmod +x conf$$.file
 
8593
if test -x conf$$.file >/dev/null 2>&1; then
 
8594
  ac_executable_p="test -x"
 
8595
else
 
8596
  ac_executable_p="test -f"
 
8597
fi
 
8598
rm -f conf$$.file
 
8599
 
 
8600
# Extract the first word of "$2", so it can be a program name with args.
5850
8601
set dummy $2; ac_word=[$]2
5851
8602
AC_MSG_CHECKING([for $ac_word])
5852
8603
AC_CACHE_VAL(ac_cv_path_$1,
5853
8604
[case "[$]$1" in
5854
 
  /*)
5855
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
5856
 
  ;;
 
8605
  [[\\/]]* | ?:[[\\/]]*)
 
8606
    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
8607
    ;;
5857
8608
  *)
5858
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5859
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
5860
 
    test -z "$ac_dir" && ac_dir=.
5861
 
    if test -f $ac_dir/$ac_word; then
5862
 
      if [$3]; then
5863
 
        ac_cv_path_$1="$ac_dir/$ac_word"
5864
 
        break
5865
 
      fi
5866
 
    fi
5867
 
  done
5868
 
  IFS="$ac_save_ifs"
 
8609
    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
 
8610
    for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
8611
      IFS="$ac_save_IFS"
 
8612
      test -z "$ac_dir" && ac_dir=.
 
8613
      for ac_exec_ext in '' $ac_executable_extensions; do
 
8614
        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
 
8615
          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
 
8616
          if [$3]; then
 
8617
            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
 
8618
            break 2
 
8619
          fi
 
8620
        fi
 
8621
      done
 
8622
    done
 
8623
    IFS="$ac_save_IFS"
5869
8624
dnl If no 4th arg is given, leave the cache variable unset,
5870
8625
dnl so AC_PATH_PROGS will keep looking.
5871
8626
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
5872
8627
])dnl
5873
 
  ;;
 
8628
    ;;
5874
8629
esac])dnl
5875
8630
$1="$ac_cv_path_$1"
5876
8631
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
5881
8636
AC_SUBST($1)dnl
5882
8637
])
5883
8638
 
5884
 
# isc-posix.m4 serial 2 (gettext-0.11.2)
5885
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
5886
 
dnl This file is free software, distributed under the terms of the GNU
5887
 
dnl General Public License.  As a special exception to the GNU General
5888
 
dnl Public License, this file may be distributed as part of a program
5889
 
dnl that contains a configuration script generated by Autoconf, under
5890
 
dnl the same distribution terms as the rest of that program.
5891
 
 
5892
 
# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
5893
 
 
5894
 
# This test replaces the one in autoconf.
5895
 
# Currently this macro should have the same name as the autoconf macro
5896
 
# because gettext's gettext.m4 (distributed in the automake package)
5897
 
# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
5898
 
# give these diagnostics:
5899
 
#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
5900
 
#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
5901
 
 
5902
 
undefine([AC_ISC_POSIX])
5903
 
 
5904
 
AC_DEFUN([AC_ISC_POSIX],
5905
 
  [
5906
 
    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
5907
 
    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
5908
 
  ]
5909
 
)
5910
 
 
5911
 
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
5912
 
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5913
 
dnl This file is free software, distributed under the terms of the GNU
5914
 
dnl General Public License.  As a special exception to the GNU General
5915
 
dnl Public License, this file may be distributed as part of a program
5916
 
dnl that contains a configuration script generated by Autoconf, under
5917
 
dnl the same distribution terms as the rest of that program.
5918
 
 
5919
 
# Test for the GNU C Library, version 2.1 or newer.
5920
 
# From Bruno Haible.
5921
 
 
5922
 
AC_DEFUN([jm_GLIBC21],
5923
 
  [
5924
 
    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
5925
 
      ac_cv_gnu_library_2_1,
5926
 
      [AC_EGREP_CPP([Lucky GNU user],
5927
 
        [
5928
 
#include <features.h>
5929
 
#ifdef __GNU_LIBRARY__
5930
 
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5931
 
  Lucky GNU user
5932
 
 #endif
5933
 
#endif
5934
 
        ],
5935
 
        ac_cv_gnu_library_2_1=yes,
5936
 
        ac_cv_gnu_library_2_1=no)
5937
 
      ]
5938
 
    )
5939
 
    AC_SUBST(GLIBC21)
5940
 
    GLIBC21="$ac_cv_gnu_library_2_1"
5941
 
  ]
5942
 
)
5943
 
 
5944
 
# intdiv0.m4 serial 1 (gettext-0.11.3)
5945
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
5946
 
dnl This file is free software, distributed under the terms of the GNU
5947
 
dnl General Public License.  As a special exception to the GNU General
5948
 
dnl Public License, this file may be distributed as part of a program
5949
 
dnl that contains a configuration script generated by Autoconf, under
5950
 
dnl the same distribution terms as the rest of that program.
5951
 
 
5952
 
dnl From Bruno Haible.
5953
 
 
5954
 
AC_DEFUN([gt_INTDIV0],
5955
 
[
5956
 
  AC_REQUIRE([AC_PROG_CC])dnl
5957
 
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
5958
 
 
5959
 
  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
5960
 
    gt_cv_int_divbyzero_sigfpe,
5961
 
    [
5962
 
      AC_TRY_RUN([
5963
 
#include <stdlib.h>
5964
 
#include <signal.h>
5965
 
 
5966
 
static void
5967
 
#ifdef __cplusplus
5968
 
sigfpe_handler (int sig)
5969
 
#else
5970
 
sigfpe_handler (sig) int sig;
5971
 
#endif
5972
 
{
5973
 
  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
5974
 
  exit (sig != SIGFPE);
5975
 
}
5976
 
 
5977
 
int x = 1;
5978
 
int y = 0;
5979
 
int z;
5980
 
int nan;
5981
 
 
5982
 
int main ()
5983
 
{
5984
 
  signal (SIGFPE, sigfpe_handler);
5985
 
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
5986
 
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
5987
 
  signal (SIGTRAP, sigfpe_handler);
5988
 
#endif
5989
 
/* Linux/SPARC yields signal SIGILL.  */
5990
 
#if defined (__sparc__) && defined (__linux__)
5991
 
  signal (SIGILL, sigfpe_handler);
5992
 
#endif
5993
 
 
5994
 
  z = x / y;
5995
 
  nan = y / y;
5996
 
  exit (1);
5997
 
}
5998
 
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
5999
 
        [
6000
 
          # Guess based on the CPU.
6001
 
          case "$host_cpu" in
6002
 
            alpha* | i[34567]86 | m68k | s390*)
6003
 
              gt_cv_int_divbyzero_sigfpe="guessing yes";;
6004
 
            *)
6005
 
              gt_cv_int_divbyzero_sigfpe="guessing no";;
6006
 
          esac
6007
 
        ])
6008
 
    ])
6009
 
  case "$gt_cv_int_divbyzero_sigfpe" in
6010
 
    *yes) value=1;;
6011
 
    *) value=0;;
6012
 
  esac
6013
 
  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
6014
 
    [Define if integer division by zero raises signal SIGFPE.])
6015
 
])
6016
 
 
6017
 
# uintmax_t.m4 serial 6 (gettext-0.11)
6018
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6019
 
dnl This file is free software, distributed under the terms of the GNU
6020
 
dnl General Public License.  As a special exception to the GNU General
6021
 
dnl Public License, this file may be distributed as part of a program
6022
 
dnl that contains a configuration script generated by Autoconf, under
6023
 
dnl the same distribution terms as the rest of that program.
 
8639
# signed.m4 serial 1 (gettext-0.10.40)
 
8640
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
8641
dnl This file is free software; the Free Software Foundation
 
8642
dnl gives unlimited permission to copy and/or distribute it,
 
8643
dnl with or without modifications, as long as this notice is preserved.
 
8644
 
 
8645
dnl From Bruno Haible.
 
8646
 
 
8647
AC_DEFUN([bh_C_SIGNED],
 
8648
[
 
8649
  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
 
8650
   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
 
8651
  if test $bh_cv_c_signed = no; then
 
8652
    AC_DEFINE(signed, ,
 
8653
              [Define to empty if the C compiler doesn't support this keyword.])
 
8654
  fi
 
8655
])
 
8656
 
 
8657
# size_max.m4 serial 2
 
8658
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
8659
dnl This file is free software; the Free Software Foundation
 
8660
dnl gives unlimited permission to copy and/or distribute it,
 
8661
dnl with or without modifications, as long as this notice is preserved.
 
8662
 
 
8663
dnl From Bruno Haible.
 
8664
 
 
8665
AC_DEFUN([gl_SIZE_MAX],
 
8666
[
 
8667
  AC_CHECK_HEADERS(stdint.h)
 
8668
  dnl First test whether the system already has SIZE_MAX.
 
8669
  AC_MSG_CHECKING([for SIZE_MAX])
 
8670
  result=
 
8671
  AC_EGREP_CPP([Found it], [
 
8672
#include <limits.h>
 
8673
#if HAVE_STDINT_H
 
8674
#include <stdint.h>
 
8675
#endif
 
8676
#ifdef SIZE_MAX
 
8677
Found it
 
8678
#endif
 
8679
], result=yes)
 
8680
  if test -z "$result"; then
 
8681
    dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
 
8682
    dnl than the type 'unsigned long'.
 
8683
    dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
 
8684
    dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
 
8685
    _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
 
8686
      [#include <stddef.h>], result=?)
 
8687
    _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
 
8688
      [#include <stddef.h>], result=?)
 
8689
    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
 
8690
      [#include <stddef.h>], result=?)
 
8691
    if test "$fits_in_uint" = 1; then
 
8692
      dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
 
8693
      dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
 
8694
      AC_TRY_COMPILE([#include <stddef.h>
 
8695
        extern size_t foo;
 
8696
        extern unsigned long foo;
 
8697
        ], [], fits_in_uint=0)
 
8698
    fi
 
8699
    if test -z "$result"; then
 
8700
      if test "$fits_in_uint" = 1; then
 
8701
        result="$res_hi$res_lo"U
 
8702
      else
 
8703
        result="$res_hi$res_lo"UL
 
8704
      fi
 
8705
    else
 
8706
      dnl Shouldn't happen, but who knows...
 
8707
      result='~(size_t)0'
 
8708
    fi
 
8709
  fi
 
8710
  AC_MSG_RESULT([$result])
 
8711
  if test "$result" != yes; then
 
8712
    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
 
8713
      [Define as the maximum value of type 'size_t', if the system doesn't define it.])
 
8714
  fi
 
8715
])
 
8716
 
 
8717
# stdint_h.m4 serial 5
 
8718
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
 
8719
dnl This file is free software; the Free Software Foundation
 
8720
dnl gives unlimited permission to copy and/or distribute it,
 
8721
dnl with or without modifications, as long as this notice is preserved.
 
8722
 
 
8723
dnl From Paul Eggert.
 
8724
 
 
8725
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
 
8726
# doesn't clash with <sys/types.h>, and declares uintmax_t.
 
8727
 
 
8728
AC_DEFUN([gl_AC_HEADER_STDINT_H],
 
8729
[
 
8730
  AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
 
8731
  [AC_TRY_COMPILE(
 
8732
    [#include <sys/types.h>
 
8733
#include <stdint.h>],
 
8734
    [uintmax_t i = (uintmax_t) -1;],
 
8735
    gl_cv_header_stdint_h=yes,
 
8736
    gl_cv_header_stdint_h=no)])
 
8737
  if test $gl_cv_header_stdint_h = yes; then
 
8738
    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
 
8739
      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
 
8740
       and declares uintmax_t. ])
 
8741
  fi
 
8742
])
 
8743
 
 
8744
# uintmax_t.m4 serial 9
 
8745
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
 
8746
dnl This file is free software; the Free Software Foundation
 
8747
dnl gives unlimited permission to copy and/or distribute it,
 
8748
dnl with or without modifications, as long as this notice is preserved.
6024
8749
 
6025
8750
dnl From Paul Eggert.
6026
8751
 
6027
8752
AC_PREREQ(2.13)
6028
8753
 
6029
 
# Define uintmax_t to `unsigned long' or `unsigned long long'
6030
 
# if <inttypes.h> does not exist.
 
8754
# Define uintmax_t to 'unsigned long' or 'unsigned long long'
 
8755
# if it is not already defined in <stdint.h> or <inttypes.h>.
6031
8756
 
6032
 
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
 
8757
AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
6033
8758
[
6034
 
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
6035
 
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
6036
 
  if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
6037
 
    AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
 
8759
  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
 
8760
  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
 
8761
  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
 
8762
    AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
6038
8763
    test $ac_cv_type_unsigned_long_long = yes \
6039
8764
      && ac_type='unsigned long long' \
6040
8765
      || ac_type='unsigned long'
6041
8766
    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
6042
 
  [Define to unsigned long or unsigned long long
6043
 
   if <inttypes.h> and <stdint.h> don't define.])
6044
 
  fi
6045
 
])
6046
 
 
6047
 
# inttypes_h.m4 serial 4 (gettext-0.11.4)
6048
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6049
 
dnl This file is free software, distributed under the terms of the GNU
6050
 
dnl General Public License.  As a special exception to the GNU General
6051
 
dnl Public License, this file may be distributed as part of a program
6052
 
dnl that contains a configuration script generated by Autoconf, under
6053
 
dnl the same distribution terms as the rest of that program.
6054
 
 
6055
 
dnl From Paul Eggert.
6056
 
 
6057
 
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
6058
 
# doesn't clash with <sys/types.h>, and declares uintmax_t.
6059
 
 
6060
 
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
6061
 
[
6062
 
  AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
6063
 
  [AC_TRY_COMPILE(
6064
 
    [#include <sys/types.h>
6065
 
#include <inttypes.h>],
6066
 
    [uintmax_t i = (uintmax_t) -1;],
6067
 
    jm_ac_cv_header_inttypes_h=yes,
6068
 
    jm_ac_cv_header_inttypes_h=no)])
6069
 
  if test $jm_ac_cv_header_inttypes_h = yes; then
6070
 
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
6071
 
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
6072
 
   and declares uintmax_t. ])
6073
 
  fi
6074
 
])
6075
 
 
6076
 
# stdint_h.m4 serial 2 (gettext-0.11.4)
6077
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6078
 
dnl This file is free software, distributed under the terms of the GNU
6079
 
dnl General Public License.  As a special exception to the GNU General
6080
 
dnl Public License, this file may be distributed as part of a program
6081
 
dnl that contains a configuration script generated by Autoconf, under
6082
 
dnl the same distribution terms as the rest of that program.
6083
 
 
6084
 
dnl From Paul Eggert.
6085
 
 
6086
 
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
6087
 
# doesn't clash with <sys/types.h>, and declares uintmax_t.
6088
 
 
6089
 
AC_DEFUN([jm_AC_HEADER_STDINT_H],
6090
 
[
6091
 
  AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
6092
 
  [AC_TRY_COMPILE(
6093
 
    [#include <sys/types.h>
6094
 
#include <stdint.h>],
6095
 
    [uintmax_t i = (uintmax_t) -1;],
6096
 
    jm_ac_cv_header_stdint_h=yes,
6097
 
    jm_ac_cv_header_stdint_h=no)])
6098
 
  if test $jm_ac_cv_header_stdint_h = yes; then
6099
 
    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
6100
 
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
6101
 
   and declares uintmax_t. ])
6102
 
  fi
6103
 
])
6104
 
 
6105
 
# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
6106
 
dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
6107
 
dnl This file is free software, distributed under the terms of the GNU
6108
 
dnl General Public License.  As a special exception to the GNU General
6109
 
dnl Public License, this file may be distributed as part of a program
6110
 
dnl that contains a configuration script generated by Autoconf, under
6111
 
dnl the same distribution terms as the rest of that program.
6112
 
 
6113
 
dnl From Paul Eggert.
6114
 
 
6115
 
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
 
8767
      [Define to unsigned long or unsigned long long
 
8768
       if <stdint.h> and <inttypes.h> don't define.])
 
8769
  else
 
8770
    AC_DEFINE(HAVE_UINTMAX_T, 1,
 
8771
      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
 
8772
  fi
 
8773
])
 
8774
 
 
8775
# ulonglong.m4 serial 4
 
8776
dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
 
8777
dnl This file is free software; the Free Software Foundation
 
8778
dnl gives unlimited permission to copy and/or distribute it,
 
8779
dnl with or without modifications, as long as this notice is preserved.
 
8780
 
 
8781
dnl From Paul Eggert.
 
8782
 
 
8783
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
 
8784
 
 
8785
AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
6116
8786
[
6117
8787
  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
6118
 
  [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
 
8788
  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
6119
8789
    [unsigned long long ullmax = (unsigned long long) -1;
6120
8790
     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
6121
8791
    ac_cv_type_unsigned_long_long=yes,
6122
8792
    ac_cv_type_unsigned_long_long=no)])
6123
8793
  if test $ac_cv_type_unsigned_long_long = yes; then
6124
8794
    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
6125
 
      [Define if you have the unsigned long long type.])
6126
 
  fi
6127
 
])
6128
 
 
6129
 
# inttypes.m4 serial 1 (gettext-0.11.4)
6130
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6131
 
dnl This file is free software, distributed under the terms of the GNU
6132
 
dnl General Public License.  As a special exception to the GNU General
6133
 
dnl Public License, this file may be distributed as part of a program
6134
 
dnl that contains a configuration script generated by Autoconf, under
6135
 
dnl the same distribution terms as the rest of that program.
6136
 
 
6137
 
dnl From Paul Eggert.
6138
 
 
6139
 
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
6140
 
# <sys/types.h>.
6141
 
 
6142
 
AC_DEFUN([gt_HEADER_INTTYPES_H],
6143
 
[
6144
 
  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
6145
 
  [
6146
 
    AC_TRY_COMPILE(
6147
 
      [#include <sys/types.h>
6148
 
#include <inttypes.h>],
6149
 
      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
6150
 
  ])
6151
 
  if test $gt_cv_header_inttypes_h = yes; then
6152
 
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
6153
 
      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
6154
 
  fi
6155
 
])
6156
 
 
6157
 
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
6158
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6159
 
dnl This file is free software, distributed under the terms of the GNU
6160
 
dnl General Public License.  As a special exception to the GNU General
6161
 
dnl Public License, this file may be distributed as part of a program
6162
 
dnl that contains a configuration script generated by Autoconf, under
6163
 
dnl the same distribution terms as the rest of that program.
6164
 
 
6165
 
dnl From Bruno Haible.
6166
 
 
6167
 
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
6168
 
# macros to non-string values.  This is the case on AIX 4.3.3.
6169
 
 
6170
 
AC_DEFUN([gt_INTTYPES_PRI],
6171
 
[
6172
 
  AC_REQUIRE([gt_HEADER_INTTYPES_H])
6173
 
  if test $gt_cv_header_inttypes_h = yes; then
6174
 
    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
6175
 
      gt_cv_inttypes_pri_broken,
6176
 
      [
6177
 
        AC_TRY_COMPILE([#include <inttypes.h>
6178
 
#ifdef PRId32
6179
 
char *p = PRId32;
6180
 
#endif
6181
 
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
6182
 
      ])
6183
 
  fi
6184
 
  if test "$gt_cv_inttypes_pri_broken" = yes; then
6185
 
    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
6186
 
      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
6187
 
  fi
6188
 
])
6189
 
 
6190
 
# codeset.m4 serial AM1 (gettext-0.10.40)
6191
 
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
6192
 
dnl This file is free software, distributed under the terms of the GNU
6193
 
dnl General Public License.  As a special exception to the GNU General
6194
 
dnl Public License, this file may be distributed as part of a program
6195
 
dnl that contains a configuration script generated by Autoconf, under
6196
 
dnl the same distribution terms as the rest of that program.
6197
 
 
6198
 
dnl From Bruno Haible.
6199
 
 
6200
 
AC_DEFUN([AM_LANGINFO_CODESET],
6201
 
[
6202
 
  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
6203
 
    [AC_TRY_LINK([#include <langinfo.h>],
6204
 
      [char* cs = nl_langinfo(CODESET);],
6205
 
      am_cv_langinfo_codeset=yes,
6206
 
      am_cv_langinfo_codeset=no)
6207
 
    ])
6208
 
  if test $am_cv_langinfo_codeset = yes; then
6209
 
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
6210
 
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
6211
 
  fi
6212
 
])
6213
 
 
6214
 
# lcmessage.m4 serial 3 (gettext-0.11.3)
6215
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
6216
 
dnl This file is free software, distributed under the terms of the GNU
6217
 
dnl General Public License.  As a special exception to the GNU General
6218
 
dnl Public License, this file may be distributed as part of a program
6219
 
dnl that contains a configuration script generated by Autoconf, under
6220
 
dnl the same distribution terms as the rest of that program.
6221
 
dnl
6222
 
dnl This file can can be used in projects which are not available under
6223
 
dnl the GNU General Public License or the GNU Library General Public
6224
 
dnl License but which still want to provide support for the GNU gettext
6225
 
dnl functionality.
6226
 
dnl Please note that the actual code of the GNU gettext library is covered
6227
 
dnl by the GNU Library General Public License, and the rest of the GNU
6228
 
dnl gettext package package is covered by the GNU General Public License.
6229
 
dnl They are *not* in the public domain.
6230
 
 
6231
 
dnl Authors:
6232
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
6233
 
 
6234
 
# Check whether LC_MESSAGES is available in <locale.h>.
6235
 
 
6236
 
AC_DEFUN([AM_LC_MESSAGES],
6237
 
[
6238
 
  AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
6239
 
    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
6240
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
6241
 
  if test $am_cv_val_LC_MESSAGES = yes; then
6242
 
    AC_DEFINE(HAVE_LC_MESSAGES, 1,
6243
 
      [Define if your <locale.h> file defines LC_MESSAGES.])
6244
 
  fi
6245
 
])
6246
 
 
 
8795
      [Define if you have the 'unsigned long long' type.])
 
8796
  fi
 
8797
])
 
8798
 
 
8799
# wchar_t.m4 serial 1 (gettext-0.12)
 
8800
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
8801
dnl This file is free software; the Free Software Foundation
 
8802
dnl gives unlimited permission to copy and/or distribute it,
 
8803
dnl with or without modifications, as long as this notice is preserved.
 
8804
 
 
8805
dnl From Bruno Haible.
 
8806
dnl Test whether <stddef.h> has the 'wchar_t' type.
 
8807
dnl Prerequisite: AC_PROG_CC
 
8808
 
 
8809
AC_DEFUN([gt_TYPE_WCHAR_T],
 
8810
[
 
8811
  AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
 
8812
    [AC_TRY_COMPILE([#include <stddef.h>
 
8813
       wchar_t foo = (wchar_t)'\0';], ,
 
8814
       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
 
8815
  if test $gt_cv_c_wchar_t = yes; then
 
8816
    AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
 
8817
  fi
 
8818
])
 
8819
 
 
8820
# wint_t.m4 serial 1 (gettext-0.12)
 
8821
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
8822
dnl This file is free software; the Free Software Foundation
 
8823
dnl gives unlimited permission to copy and/or distribute it,
 
8824
dnl with or without modifications, as long as this notice is preserved.
 
8825
 
 
8826
dnl From Bruno Haible.
 
8827
dnl Test whether <wchar.h> has the 'wint_t' type.
 
8828
dnl Prerequisite: AC_PROG_CC
 
8829
 
 
8830
AC_DEFUN([gt_TYPE_WINT_T],
 
8831
[
 
8832
  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
 
8833
    [AC_TRY_COMPILE([#include <wchar.h>
 
8834
       wint_t foo = (wchar_t)'\0';], ,
 
8835
       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
 
8836
  if test $gt_cv_c_wint_t = yes; then
 
8837
    AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
 
8838
  fi
 
8839
])
 
8840
 
 
8841
# xsize.m4 serial 3
 
8842
dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
 
8843
dnl This file is free software; the Free Software Foundation
 
8844
dnl gives unlimited permission to copy and/or distribute it,
 
8845
dnl with or without modifications, as long as this notice is preserved.
 
8846
 
 
8847
AC_DEFUN([gl_XSIZE],
 
8848
[
 
8849
  dnl Prerequisites of lib/xsize.h.
 
8850
  AC_REQUIRE([gl_SIZE_MAX])
 
8851
  AC_REQUIRE([AC_C_INLINE])
 
8852
  AC_CHECK_HEADERS(stdint.h)
 
8853
])
 
8854
 
 
8855
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 
8856
#
 
8857
# This file is free software; the Free Software Foundation
 
8858
# gives unlimited permission to copy and/or distribute it,
 
8859
# with or without modifications, as long as this notice is preserved.
 
8860
 
 
8861
# AM_AUTOMAKE_VERSION(VERSION)
 
8862
# ----------------------------
 
8863
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
8864
# generated from the m4 files accompanying Automake X.Y.
 
8865
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
8866
 
 
8867
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
8868
# -------------------------------
 
8869
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
8870
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
8871
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
8872
         [AM_AUTOMAKE_VERSION([1.9.6])])
 
8873
 
 
8874
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
8875
 
 
8876
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
8877
#
 
8878
# This file is free software; the Free Software Foundation
 
8879
# gives unlimited permission to copy and/or distribute it,
 
8880
# with or without modifications, as long as this notice is preserved.
 
8881
 
 
8882
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
8883
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
8884
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
8885
#
 
8886
# Of course, Automake must honor this variable whenever it calls a
 
8887
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
8888
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
8889
# depending on how configure is run.  This is pretty annoying, since
 
8890
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
8891
# source directory, any form will work fine, but in subdirectories a
 
8892
# relative path needs to be adjusted first.
 
8893
#
 
8894
# $ac_aux_dir/missing
 
8895
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
8896
# $top_srcdir/$ac_aux_dir/missing
 
8897
#    fails if $ac_aux_dir is absolute,
 
8898
#    fails when called from a subdirectory in a VPATH build with
 
8899
#          a relative $ac_aux_dir
 
8900
#
 
8901
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
8902
# are both prefixed by $srcdir.  In an in-source build this is usually
 
8903
# harmless because $srcdir is `.', but things will broke when you
 
8904
# start a VPATH build or use an absolute $srcdir.
 
8905
#
 
8906
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
8907
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
8908
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
8909
# and then we would define $MISSING as
 
8910
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
8911
# This will work as long as MISSING is not called from configure, because
 
8912
# unfortunately $(top_srcdir) has no meaning in configure.
 
8913
# However there are other variables, like CC, which are often used in
 
8914
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
8915
#
 
8916
# Another solution, used here, is to always expand $ac_aux_dir to an
 
8917
# absolute PATH.  The drawback is that using absolute paths prevent a
 
8918
# configured tree to be moved without reconfiguration.
 
8919
 
 
8920
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
8921
[dnl Rely on autoconf to set up CDPATH properly.
 
8922
AC_PREREQ([2.50])dnl
 
8923
# expand $ac_aux_dir to an absolute path
 
8924
am_aux_dir=`cd $ac_aux_dir && pwd`
 
8925
])
 
8926
 
 
8927
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
8928
 
 
8929
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
 
8930
# Free Software Foundation, Inc.
 
8931
#
 
8932
# This file is free software; the Free Software Foundation
 
8933
# gives unlimited permission to copy and/or distribute it,
 
8934
# with or without modifications, as long as this notice is preserved.
 
8935
 
 
8936
# serial 7
 
8937
 
 
8938
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
8939
# -------------------------------------
 
8940
# Define a conditional.
 
8941
AC_DEFUN([AM_CONDITIONAL],
 
8942
[AC_PREREQ(2.52)dnl
 
8943
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
8944
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
8945
AC_SUBST([$1_TRUE])
 
8946
AC_SUBST([$1_FALSE])
 
8947
if $2; then
 
8948
  $1_TRUE=
 
8949
  $1_FALSE='#'
 
8950
else
 
8951
  $1_TRUE='#'
 
8952
  $1_FALSE=
 
8953
fi
 
8954
AC_CONFIG_COMMANDS_PRE(
 
8955
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
8956
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
8957
Usually this means the macro was only invoked conditionally.]])
 
8958
fi])])
 
8959
 
 
8960
 
 
8961
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
8962
# Free Software Foundation, Inc.
 
8963
#
 
8964
# This file is free software; the Free Software Foundation
 
8965
# gives unlimited permission to copy and/or distribute it,
 
8966
# with or without modifications, as long as this notice is preserved.
 
8967
 
 
8968
# serial 8
 
8969
 
 
8970
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
8971
# written in clear, in which case automake, when reading aclocal.m4,
 
8972
# will think it sees a *use*, and therefore will trigger all it's
 
8973
# C support machinery.  Also note that it means that autoscan, seeing
 
8974
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
8975
 
 
8976
 
 
8977
# _AM_DEPENDENCIES(NAME)
 
8978
# ----------------------
 
8979
# See how the compiler implements dependency checking.
 
8980
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
8981
# We try a few techniques and use that to set a single cache variable.
 
8982
#
 
8983
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
8984
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
8985
# dependency, and given that the user is not expected to run this macro,
 
8986
# just rely on AC_PROG_CC.
 
8987
AC_DEFUN([_AM_DEPENDENCIES],
 
8988
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
8989
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
8990
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
8991
AC_REQUIRE([AM_DEP_TRACK])dnl
 
8992
 
 
8993
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
8994
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
8995
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
8996
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
8997
                   [depcc="$$1"   am_compiler_list=])
 
8998
 
 
8999
AC_CACHE_CHECK([dependency style of $depcc],
 
9000
               [am_cv_$1_dependencies_compiler_type],
 
9001
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
9002
  # We make a subdir and do the tests there.  Otherwise we can end up
 
9003
  # making bogus files that we don't know about and never remove.  For
 
9004
  # instance it was reported that on HP-UX the gcc test will end up
 
9005
  # making a dummy file named `D' -- because `-MD' means `put the output
 
9006
  # in D'.
 
9007
  mkdir conftest.dir
 
9008
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
9009
  # using a relative directory.
 
9010
  cp "$am_depcomp" conftest.dir
 
9011
  cd conftest.dir
 
9012
  # We will build objects and dependencies in a subdirectory because
 
9013
  # it helps to detect inapplicable dependency modes.  For instance
 
9014
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
9015
  # side effect of compilation, but ICC will put the dependencies in
 
9016
  # the current directory while Tru64 will put them in the object
 
9017
  # directory.
 
9018
  mkdir sub
 
9019
 
 
9020
  am_cv_$1_dependencies_compiler_type=none
 
9021
  if test "$am_compiler_list" = ""; then
 
9022
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
9023
  fi
 
9024
  for depmode in $am_compiler_list; do
 
9025
    # Setup a source with many dependencies, because some compilers
 
9026
    # like to wrap large dependency lists on column 80 (with \), and
 
9027
    # we should not choose a depcomp mode which is confused by this.
 
9028
    #
 
9029
    # We need to recreate these files for each test, as the compiler may
 
9030
    # overwrite some of them when testing with obscure command lines.
 
9031
    # This happens at least with the AIX C compiler.
 
9032
    : > sub/conftest.c
 
9033
    for i in 1 2 3 4 5 6; do
 
9034
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
9035
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
9036
      # Solaris 8's {/usr,}/bin/sh.
 
9037
      touch sub/conftst$i.h
 
9038
    done
 
9039
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
9040
 
 
9041
    case $depmode in
 
9042
    nosideeffect)
 
9043
      # after this tag, mechanisms are not by side-effect, so they'll
 
9044
      # only be used when explicitly requested
 
9045
      if test "x$enable_dependency_tracking" = xyes; then
 
9046
        continue
 
9047
      else
 
9048
        break
 
9049
      fi
 
9050
      ;;
 
9051
    none) break ;;
 
9052
    esac
 
9053
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
9054
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
9055
    # handle `-M -o', and we need to detect this.
 
9056
    if depmode=$depmode \
 
9057
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
9058
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
9059
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
9060
         >/dev/null 2>conftest.err &&
 
9061
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
9062
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
9063
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
9064
      # icc doesn't choke on unknown options, it will just issue warnings
 
9065
      # or remarks (even with -Werror).  So we grep stderr for any message
 
9066
      # that says an option was ignored or not supported.
 
9067
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
9068
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
9069
      # The diagnosis changed in icc 8.0:
 
9070
      #   icc: Command line remark: option '-MP' not supported
 
9071
      if (grep 'ignoring option' conftest.err ||
 
9072
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
9073
        am_cv_$1_dependencies_compiler_type=$depmode
 
9074
        break
 
9075
      fi
 
9076
    fi
 
9077
  done
 
9078
 
 
9079
  cd ..
 
9080
  rm -rf conftest.dir
 
9081
else
 
9082
  am_cv_$1_dependencies_compiler_type=none
 
9083
fi
 
9084
])
 
9085
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
9086
AM_CONDITIONAL([am__fastdep$1], [
 
9087
  test "x$enable_dependency_tracking" != xno \
 
9088
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
9089
])
 
9090
 
 
9091
 
 
9092
# AM_SET_DEPDIR
 
9093
# -------------
 
9094
# Choose a directory name for dependency files.
 
9095
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
9096
AC_DEFUN([AM_SET_DEPDIR],
 
9097
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
9098
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
9099
])
 
9100
 
 
9101
 
 
9102
# AM_DEP_TRACK
 
9103
# ------------
 
9104
AC_DEFUN([AM_DEP_TRACK],
 
9105
[AC_ARG_ENABLE(dependency-tracking,
 
9106
[  --disable-dependency-tracking  speeds up one-time build
 
9107
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
9108
if test "x$enable_dependency_tracking" != xno; then
 
9109
  am_depcomp="$ac_aux_dir/depcomp"
 
9110
  AMDEPBACKSLASH='\'
 
9111
fi
 
9112
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
9113
AC_SUBST([AMDEPBACKSLASH])
 
9114
])
 
9115
 
 
9116
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
9117
 
 
9118
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
9119
# Free Software Foundation, Inc.
 
9120
#
 
9121
# This file is free software; the Free Software Foundation
 
9122
# gives unlimited permission to copy and/or distribute it,
 
9123
# with or without modifications, as long as this notice is preserved.
 
9124
 
 
9125
#serial 3
 
9126
 
 
9127
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
9128
# ------------------------------
 
9129
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
9130
[for mf in $CONFIG_FILES; do
 
9131
  # Strip MF so we end up with the name of the file.
 
9132
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
9133
  # Check whether this is an Automake generated Makefile or not.
 
9134
  # We used to match only the files named `Makefile.in', but
 
9135
  # some people rename them; so instead we look at the file content.
 
9136
  # Grep'ing the first line is not enough: some people post-process
 
9137
  # each Makefile.in and add a new line on top of each file to say so.
 
9138
  # So let's grep whole file.
 
9139
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
9140
    dirpart=`AS_DIRNAME("$mf")`
 
9141
  else
 
9142
    continue
 
9143
  fi
 
9144
  # Extract the definition of DEPDIR, am__include, and am__quote
 
9145
  # from the Makefile without running `make'.
 
9146
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
9147
  test -z "$DEPDIR" && continue
 
9148
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
9149
  test -z "am__include" && continue
 
9150
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
9151
  # When using ansi2knr, U may be empty or an underscore; expand it
 
9152
  U=`sed -n 's/^U = //p' < "$mf"`
 
9153
  # Find all dependency output files, they are included files with
 
9154
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
9155
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
9156
  # expansion.
 
9157
  for file in `sed -n "
 
9158
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
9159
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
9160
    # Make sure the directory exists.
 
9161
    test -f "$dirpart/$file" && continue
 
9162
    fdir=`AS_DIRNAME(["$file"])`
 
9163
    AS_MKDIR_P([$dirpart/$fdir])
 
9164
    # echo "creating $dirpart/$file"
 
9165
    echo '# dummy' > "$dirpart/$file"
 
9166
  done
 
9167
done
 
9168
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
9169
 
 
9170
 
 
9171
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
9172
# -----------------------------
 
9173
# This macro should only be invoked once -- use via AC_REQUIRE.
 
9174
#
 
9175
# This code is only required when automatic dependency tracking
 
9176
# is enabled.  FIXME.  This creates each `.P' file that we will
 
9177
# need in order to bootstrap the dependency handling code.
 
9178
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
9179
[AC_CONFIG_COMMANDS([depfiles],
 
9180
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
9181
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
9182
])
 
9183
 
 
9184
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
9185
# Free Software Foundation, Inc.
 
9186
#
 
9187
# This file is free software; the Free Software Foundation
 
9188
# gives unlimited permission to copy and/or distribute it,
 
9189
# with or without modifications, as long as this notice is preserved.
 
9190
 
 
9191
# serial 8
 
9192
 
 
9193
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
9194
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
9195
 
 
9196
# Do all the work for Automake.                             -*- Autoconf -*-
 
9197
 
 
9198
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
9199
# Free Software Foundation, Inc.
 
9200
#
 
9201
# This file is free software; the Free Software Foundation
 
9202
# gives unlimited permission to copy and/or distribute it,
 
9203
# with or without modifications, as long as this notice is preserved.
 
9204
 
 
9205
# serial 12
 
9206
 
 
9207
# This macro actually does too much.  Some checks are only needed if
 
9208
# your package does certain things.  But this isn't really a big deal.
 
9209
 
 
9210
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
9211
# AM_INIT_AUTOMAKE([OPTIONS])
 
9212
# -----------------------------------------------
 
9213
# The call with PACKAGE and VERSION arguments is the old style
 
9214
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
9215
# and VERSION should now be passed to AC_INIT and removed from
 
9216
# the call to AM_INIT_AUTOMAKE.
 
9217
# We support both call styles for the transition.  After
 
9218
# the next Automake release, Autoconf can make the AC_INIT
 
9219
# arguments mandatory, and then we can depend on a new Autoconf
 
9220
# release and drop the old call support.
 
9221
AC_DEFUN([AM_INIT_AUTOMAKE],
 
9222
[AC_PREREQ([2.58])dnl
 
9223
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
9224
dnl the ones we care about.
 
9225
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
9226
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
9227
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
9228
# test to see if srcdir already configured
 
9229
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
9230
   test -f $srcdir/config.status; then
 
9231
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
9232
fi
 
9233
 
 
9234
# test whether we have cygpath
 
9235
if test -z "$CYGPATH_W"; then
 
9236
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
9237
    CYGPATH_W='cygpath -w'
 
9238
  else
 
9239
    CYGPATH_W=echo
 
9240
  fi
 
9241
fi
 
9242
AC_SUBST([CYGPATH_W])
 
9243
 
 
9244
# Define the identity of the package.
 
9245
dnl Distinguish between old-style and new-style calls.
 
9246
m4_ifval([$2],
 
9247
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
9248
 AC_SUBST([PACKAGE], [$1])dnl
 
9249
 AC_SUBST([VERSION], [$2])],
 
9250
[_AM_SET_OPTIONS([$1])dnl
 
9251
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
9252
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
9253
 
 
9254
_AM_IF_OPTION([no-define],,
 
9255
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
9256
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
9257
 
 
9258
# Some tools Automake needs.
 
9259
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
9260
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
9261
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
9262
AM_MISSING_PROG(AUTOCONF, autoconf)
 
9263
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
9264
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
9265
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
9266
AM_PROG_INSTALL_SH
 
9267
AM_PROG_INSTALL_STRIP
 
9268
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
9269
# We need awk for the "check" target.  The system "awk" is bad on
 
9270
# some platforms.
 
9271
AC_REQUIRE([AC_PROG_AWK])dnl
 
9272
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
9273
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
9274
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
9275
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
9276
                             [_AM_PROG_TAR([v7])])])
 
9277
_AM_IF_OPTION([no-dependencies],,
 
9278
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
9279
                  [_AM_DEPENDENCIES(CC)],
 
9280
                  [define([AC_PROG_CC],
 
9281
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
9282
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
9283
                  [_AM_DEPENDENCIES(CXX)],
 
9284
                  [define([AC_PROG_CXX],
 
9285
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
9286
])
 
9287
])
 
9288
 
 
9289
 
 
9290
# When config.status generates a header, we must update the stamp-h file.
 
9291
# This file resides in the same directory as the config header
 
9292
# that is generated.  The stamp files are numbered to have different names.
 
9293
 
 
9294
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
9295
# loop where config.status creates the headers, so we can generate
 
9296
# our stamp files there.
 
9297
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
9298
[# Compute $1's index in $config_headers.
 
9299
_am_stamp_count=1
 
9300
for _am_header in $config_headers :; do
 
9301
  case $_am_header in
 
9302
    $1 | $1:* )
 
9303
      break ;;
 
9304
    * )
 
9305
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
9306
  esac
 
9307
done
 
9308
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
9309
 
 
9310
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
9311
#
 
9312
# This file is free software; the Free Software Foundation
 
9313
# gives unlimited permission to copy and/or distribute it,
 
9314
# with or without modifications, as long as this notice is preserved.
 
9315
 
 
9316
# AM_PROG_INSTALL_SH
 
9317
# ------------------
 
9318
# Define $install_sh.
 
9319
AC_DEFUN([AM_PROG_INSTALL_SH],
 
9320
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
9321
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
9322
AC_SUBST(install_sh)])
 
9323
 
 
9324
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
9325
#
 
9326
# This file is free software; the Free Software Foundation
 
9327
# gives unlimited permission to copy and/or distribute it,
 
9328
# with or without modifications, as long as this notice is preserved.
 
9329
 
 
9330
# serial 2
 
9331
 
 
9332
# Check whether the underlying file-system supports filenames
 
9333
# with a leading dot.  For instance MS-DOS doesn't.
 
9334
AC_DEFUN([AM_SET_LEADING_DOT],
 
9335
[rm -rf .tst 2>/dev/null
 
9336
mkdir .tst 2>/dev/null
 
9337
if test -d .tst; then
 
9338
  am__leading_dot=.
 
9339
else
 
9340
  am__leading_dot=_
 
9341
fi
 
9342
rmdir .tst 2>/dev/null
 
9343
AC_SUBST([am__leading_dot])])
 
9344
 
 
9345
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
9346
 
 
9347
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
9348
#
 
9349
# This file is free software; the Free Software Foundation
 
9350
# gives unlimited permission to copy and/or distribute it,
 
9351
# with or without modifications, as long as this notice is preserved.
 
9352
 
 
9353
# serial 3
 
9354
 
 
9355
# AM_MAKE_INCLUDE()
 
9356
# -----------------
 
9357
# Check to see how make treats includes.
 
9358
AC_DEFUN([AM_MAKE_INCLUDE],
 
9359
[am_make=${MAKE-make}
 
9360
cat > confinc << 'END'
 
9361
am__doit:
 
9362
        @echo done
 
9363
.PHONY: am__doit
 
9364
END
 
9365
# If we don't find an include directive, just comment out the code.
 
9366
AC_MSG_CHECKING([for style of include used by $am_make])
 
9367
am__include="#"
 
9368
am__quote=
 
9369
_am_result=none
 
9370
# First try GNU make style include.
 
9371
echo "include confinc" > confmf
 
9372
# We grep out `Entering directory' and `Leaving directory'
 
9373
# messages which can occur if `w' ends up in MAKEFLAGS.
 
9374
# In particular we don't look at `^make:' because GNU make might
 
9375
# be invoked under some other name (usually "gmake"), in which
 
9376
# case it prints its new name instead of `make'.
 
9377
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
 
9378
   am__include=include
 
9379
   am__quote=
 
9380
   _am_result=GNU
 
9381
fi
 
9382
# Now try BSD make style include.
 
9383
if test "$am__include" = "#"; then
 
9384
   echo '.include "confinc"' > confmf
 
9385
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
9386
      am__include=.include
 
9387
      am__quote="\""
 
9388
      _am_result=BSD
 
9389
   fi
 
9390
fi
 
9391
AC_SUBST([am__include])
 
9392
AC_SUBST([am__quote])
 
9393
AC_MSG_RESULT([$_am_result])
 
9394
rm -f confinc confmf
 
9395
])
 
9396
 
 
9397
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
9398
 
 
9399
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
 
9400
# Free Software Foundation, Inc.
 
9401
#
 
9402
# This file is free software; the Free Software Foundation
 
9403
# gives unlimited permission to copy and/or distribute it,
 
9404
# with or without modifications, as long as this notice is preserved.
 
9405
 
 
9406
# serial 4
 
9407
 
 
9408
# AM_MISSING_PROG(NAME, PROGRAM)
 
9409
# ------------------------------
 
9410
AC_DEFUN([AM_MISSING_PROG],
 
9411
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
9412
$1=${$1-"${am_missing_run}$2"}
 
9413
AC_SUBST($1)])
 
9414
 
 
9415
 
 
9416
# AM_MISSING_HAS_RUN
 
9417
# ------------------
 
9418
# Define MISSING if not defined so far and test if it supports --run.
 
9419
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
9420
AC_DEFUN([AM_MISSING_HAS_RUN],
 
9421
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
9422
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
9423
# Use eval to expand $SHELL
 
9424
if eval "$MISSING --run true"; then
 
9425
  am_missing_run="$MISSING --run "
 
9426
else
 
9427
  am_missing_run=
 
9428
  AC_MSG_WARN([`missing' script is too old or missing])
 
9429
fi
 
9430
])
 
9431
 
 
9432
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
9433
#
 
9434
# This file is free software; the Free Software Foundation
 
9435
# gives unlimited permission to copy and/or distribute it,
 
9436
# with or without modifications, as long as this notice is preserved.
 
9437
 
 
9438
# AM_PROG_MKDIR_P
 
9439
# ---------------
 
9440
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
 
9441
#
 
9442
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 
9443
# created by `make install' are always world readable, even if the
 
9444
# installer happens to have an overly restrictive umask (e.g. 077).
 
9445
# This was a mistake.  There are at least two reasons why we must not
 
9446
# use `-m 0755':
 
9447
#   - it causes special bits like SGID to be ignored,
 
9448
#   - it may be too restrictive (some setups expect 775 directories).
 
9449
#
 
9450
# Do not use -m 0755 and let people choose whatever they expect by
 
9451
# setting umask.
 
9452
#
 
9453
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
 
9454
# Some implementations (such as Solaris 8's) are not thread-safe: if a
 
9455
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 
9456
# concurrently, both version can detect that a/ is missing, but only
 
9457
# one can create it and the other will error out.  Consequently we
 
9458
# restrict ourselves to GNU make (using the --version option ensures
 
9459
# this.)
 
9460
AC_DEFUN([AM_PROG_MKDIR_P],
 
9461
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
 
9462
  # We used to keeping the `.' as first argument, in order to
 
9463
  # allow $(mkdir_p) to be used without argument.  As in
 
9464
  #   $(mkdir_p) $(somedir)
 
9465
  # where $(somedir) is conditionally defined.  However this is wrong
 
9466
  # for two reasons:
 
9467
  #  1. if the package is installed by a user who cannot write `.'
 
9468
  #     make install will fail,
 
9469
  #  2. the above comment should most certainly read
 
9470
  #     $(mkdir_p) $(DESTDIR)$(somedir)
 
9471
  #     so it does not work when $(somedir) is undefined and
 
9472
  #     $(DESTDIR) is not.
 
9473
  #  To support the latter case, we have to write
 
9474
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
 
9475
  #  so the `.' trick is pointless.
 
9476
  mkdir_p='mkdir -p --'
 
9477
else
 
9478
  # On NextStep and OpenStep, the `mkdir' command does not
 
9479
  # recognize any option.  It will interpret all options as
 
9480
  # directories to create, and then abort because `.' already
 
9481
  # exists.
 
9482
  for d in ./-p ./--version;
 
9483
  do
 
9484
    test -d $d && rmdir $d
 
9485
  done
 
9486
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
 
9487
  if test -f "$ac_aux_dir/mkinstalldirs"; then
 
9488
    mkdir_p='$(mkinstalldirs)'
 
9489
  else
 
9490
    mkdir_p='$(install_sh) -d'
 
9491
  fi
 
9492
fi
 
9493
AC_SUBST([mkdir_p])])
 
9494
 
 
9495
# Helper functions for option handling.                     -*- Autoconf -*-
 
9496
 
 
9497
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
9498
#
 
9499
# This file is free software; the Free Software Foundation
 
9500
# gives unlimited permission to copy and/or distribute it,
 
9501
# with or without modifications, as long as this notice is preserved.
 
9502
 
 
9503
# serial 3
 
9504
 
 
9505
# _AM_MANGLE_OPTION(NAME)
 
9506
# -----------------------
 
9507
AC_DEFUN([_AM_MANGLE_OPTION],
 
9508
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
9509
 
 
9510
# _AM_SET_OPTION(NAME)
 
9511
# ------------------------------
 
9512
# Set option NAME.  Presently that only means defining a flag for this option.
 
9513
AC_DEFUN([_AM_SET_OPTION],
 
9514
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
9515
 
 
9516
# _AM_SET_OPTIONS(OPTIONS)
 
9517
# ----------------------------------
 
9518
# OPTIONS is a space-separated list of Automake options.
 
9519
AC_DEFUN([_AM_SET_OPTIONS],
 
9520
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
9521
 
 
9522
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
9523
# -------------------------------------------
 
9524
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
9525
AC_DEFUN([_AM_IF_OPTION],
 
9526
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
9527
 
 
9528
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
9529
 
 
9530
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
9531
# Free Software Foundation, Inc.
 
9532
#
 
9533
# This file is free software; the Free Software Foundation
 
9534
# gives unlimited permission to copy and/or distribute it,
 
9535
# with or without modifications, as long as this notice is preserved.
 
9536
 
 
9537
# serial 4
 
9538
 
 
9539
# AM_SANITY_CHECK
 
9540
# ---------------
 
9541
AC_DEFUN([AM_SANITY_CHECK],
 
9542
[AC_MSG_CHECKING([whether build environment is sane])
 
9543
# Just in case
 
9544
sleep 1
 
9545
echo timestamp > conftest.file
 
9546
# Do `set' in a subshell so we don't clobber the current shell's
 
9547
# arguments.  Must try -L first in case configure is actually a
 
9548
# symlink; some systems play weird games with the mod time of symlinks
 
9549
# (eg FreeBSD returns the mod time of the symlink's containing
 
9550
# directory).
 
9551
if (
 
9552
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
9553
   if test "$[*]" = "X"; then
 
9554
      # -L didn't work.
 
9555
      set X `ls -t $srcdir/configure conftest.file`
 
9556
   fi
 
9557
   rm -f conftest.file
 
9558
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
9559
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
9560
 
 
9561
      # If neither matched, then we have a broken ls.  This can happen
 
9562
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
9563
      # broken ls alias from the environment.  This has actually
 
9564
      # happened.  Such a system could not be considered "sane".
 
9565
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
9566
alias in your environment])
 
9567
   fi
 
9568
 
 
9569
   test "$[2]" = conftest.file
 
9570
   )
 
9571
then
 
9572
   # Ok.
 
9573
   :
 
9574
else
 
9575
   AC_MSG_ERROR([newly created file is older than distributed files!
 
9576
Check your system clock])
 
9577
fi
 
9578
AC_MSG_RESULT(yes)])
 
9579
 
 
9580
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
9581
#
 
9582
# This file is free software; the Free Software Foundation
 
9583
# gives unlimited permission to copy and/or distribute it,
 
9584
# with or without modifications, as long as this notice is preserved.
 
9585
 
 
9586
# AM_PROG_INSTALL_STRIP
 
9587
# ---------------------
 
9588
# One issue with vendor `install' (even GNU) is that you can't
 
9589
# specify the program used to strip binaries.  This is especially
 
9590
# annoying in cross-compiling environments, where the build's strip
 
9591
# is unlikely to handle the host's binaries.
 
9592
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
9593
# always use install-sh in `make install-strip', and initialize
 
9594
# STRIPPROG with the value of the STRIP variable (set by the user).
 
9595
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
9596
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
9597
# Installed binaries are usually stripped using `strip' when the user
 
9598
# run `make install-strip'.  However `strip' might not be the right
 
9599
# tool to use in cross-compilation environments, therefore Automake
 
9600
# will honor the `STRIP' environment variable to overrule this program.
 
9601
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
9602
if test "$cross_compiling" != no; then
 
9603
  AC_CHECK_TOOL([STRIP], [strip], :)
 
9604
fi
 
9605
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
9606
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
9607
 
 
9608
# Check how to create a tarball.                            -*- Autoconf -*-
 
9609
 
 
9610
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
9611
#
 
9612
# This file is free software; the Free Software Foundation
 
9613
# gives unlimited permission to copy and/or distribute it,
 
9614
# with or without modifications, as long as this notice is preserved.
 
9615
 
 
9616
# serial 2
 
9617
 
 
9618
# _AM_PROG_TAR(FORMAT)
 
9619
# --------------------
 
9620
# Check how to create a tarball in format FORMAT.
 
9621
# FORMAT should be one of `v7', `ustar', or `pax'.
 
9622
#
 
9623
# Substitute a variable $(am__tar) that is a command
 
9624
# writing to stdout a FORMAT-tarball containing the directory
 
9625
# $tardir.
 
9626
#     tardir=directory && $(am__tar) > result.tar
 
9627
#
 
9628
# Substitute a variable $(am__untar) that extract such
 
9629
# a tarball read from stdin.
 
9630
#     $(am__untar) < result.tar
 
9631
AC_DEFUN([_AM_PROG_TAR],
 
9632
[# Always define AMTAR for backward compatibility.
 
9633
AM_MISSING_PROG([AMTAR], [tar])
 
9634
m4_if([$1], [v7],
 
9635
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
9636
     [m4_case([$1], [ustar],, [pax],,
 
9637
              [m4_fatal([Unknown tar format])])
 
9638
AC_MSG_CHECKING([how to create a $1 tar archive])
 
9639
# Loop over all known methods to create a tar archive until one works.
 
9640
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
9641
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
9642
# Do not fold the above two line into one, because Tru64 sh and
 
9643
# Solaris sh will not grok spaces in the rhs of `-'.
 
9644
for _am_tool in $_am_tools
 
9645
do
 
9646
  case $_am_tool in
 
9647
  gnutar)
 
9648
    for _am_tar in tar gnutar gtar;
 
9649
    do
 
9650
      AM_RUN_LOG([$_am_tar --version]) && break
 
9651
    done
 
9652
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
9653
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
9654
    am__untar="$_am_tar -xf -"
 
9655
    ;;
 
9656
  plaintar)
 
9657
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
9658
    # ustar tarball either.
 
9659
    (tar --version) >/dev/null 2>&1 && continue
 
9660
    am__tar='tar chf - "$$tardir"'
 
9661
    am__tar_='tar chf - "$tardir"'
 
9662
    am__untar='tar xf -'
 
9663
    ;;
 
9664
  pax)
 
9665
    am__tar='pax -L -x $1 -w "$$tardir"'
 
9666
    am__tar_='pax -L -x $1 -w "$tardir"'
 
9667
    am__untar='pax -r'
 
9668
    ;;
 
9669
  cpio)
 
9670
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
9671
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
9672
    am__untar='cpio -i -H $1 -d'
 
9673
    ;;
 
9674
  none)
 
9675
    am__tar=false
 
9676
    am__tar_=false
 
9677
    am__untar=false
 
9678
    ;;
 
9679
  esac
 
9680
 
 
9681
  # If the value was cached, stop now.  We just wanted to have am__tar
 
9682
  # and am__untar set.
 
9683
  test -n "${am_cv_prog_tar_$1}" && break
 
9684
 
 
9685
  # tar/untar a dummy directory, and stop if the command works
 
9686
  rm -rf conftest.dir
 
9687
  mkdir conftest.dir
 
9688
  echo GrepMe > conftest.dir/file
 
9689
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
9690
  rm -rf conftest.dir
 
9691
  if test -s conftest.tar; then
 
9692
    AM_RUN_LOG([$am__untar <conftest.tar])
 
9693
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
9694
  fi
 
9695
done
 
9696
rm -rf conftest.dir
 
9697
 
 
9698
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
9699
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
9700
AC_SUBST([am__tar])
 
9701
AC_SUBST([am__untar])
 
9702
]) # _AM_PROG_TAR
 
9703
 
 
9704
m4_include([acinclude.m4])