Codebase list ssh-contact / ba1279e
Imported Upstream version 0.4 Jonny Lamb 13 years ago
40 changed file(s) with 16121 addition(s) and 9720 deletion(s). Raw diff Collapse all Expand all
0 Use git log
0 Installation Instructions
1 *************************
2
3 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
4 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5
6 Copying and distribution of this file, with or without modification,
7 are permitted in any medium without royalty provided the copyright
8 notice and this notice are preserved. This file is offered as-is,
9 without warranty of any kind.
10
11 Basic Installation
12 ==================
13
14 Briefly, the shell commands `./configure; make; make install' should
15 configure, build, and install this package. The following
16 more-detailed instructions are generic; see the `README' file for
17 instructions specific to this package. Some packages provide this
18 `INSTALL' file but do not implement all of the features documented
19 below. The lack of an optional feature in a given package is not
20 necessarily a bug. More recommendations for GNU packages can be found
21 in *note Makefile Conventions: (standards)Makefile Conventions.
22
23 The `configure' shell script attempts to guess correct values for
24 various system-dependent variables used during compilation. It uses
25 those values to create a `Makefile' in each directory of the package.
26 It may also create one or more `.h' files containing system-dependent
27 definitions. Finally, it creates a shell script `config.status' that
28 you can run in the future to recreate the current configuration, and a
29 file `config.log' containing compiler output (useful mainly for
30 debugging `configure').
31
32 It can also use an optional file (typically called `config.cache'
33 and enabled with `--cache-file=config.cache' or simply `-C') that saves
34 the results of its tests to speed up reconfiguring. Caching is
35 disabled by default to prevent problems with accidental use of stale
36 cache files.
37
38 If you need to do unusual things to compile the package, please try
39 to figure out how `configure' could check whether to do them, and mail
40 diffs or instructions to the address given in the `README' so they can
41 be considered for the next release. If you are using the cache, and at
42 some point `config.cache' contains results you don't want to keep, you
43 may remove or edit it.
44
45 The file `configure.ac' (or `configure.in') is used to create
46 `configure' by a program called `autoconf'. You need `configure.ac' if
47 you want to change it or regenerate `configure' using a newer version
48 of `autoconf'.
49
50 The simplest way to compile this package is:
51
52 1. `cd' to the directory containing the package's source code and type
53 `./configure' to configure the package for your system.
54
55 Running `configure' might take a while. While running, it prints
56 some messages telling which features it is checking for.
57
58 2. Type `make' to compile the package.
59
60 3. Optionally, type `make check' to run any self-tests that come with
61 the package, generally using the just-built uninstalled binaries.
62
63 4. Type `make install' to install the programs and any data files and
64 documentation. When installing into a prefix owned by root, it is
65 recommended that the package be configured and built as a regular
66 user, and only the `make install' phase executed with root
67 privileges.
68
69 5. Optionally, type `make installcheck' to repeat any self-tests, but
70 this time using the binaries in their final installed location.
71 This target does not install anything. Running this target as a
72 regular user, particularly if the prior `make install' required
73 root privileges, verifies that the installation completed
74 correctly.
75
76 6. You can remove the program binaries and object files from the
77 source code directory by typing `make clean'. To also remove the
78 files that `configure' created (so you can compile the package for
79 a different kind of computer), type `make distclean'. There is
80 also a `make maintainer-clean' target, but that is intended mainly
81 for the package's developers. If you use it, you may have to get
82 all sorts of other programs in order to regenerate files that came
83 with the distribution.
84
85 7. Often, you can also type `make uninstall' to remove the installed
86 files again. In practice, not all packages have tested that
87 uninstallation works correctly, even though it is required by the
88 GNU Coding Standards.
89
90 8. Some packages, particularly those that use Automake, provide `make
91 distcheck', which can by used by developers to test that all other
92 targets like `make install' and `make uninstall' work correctly.
93 This target is generally not run by end users.
94
95 Compilers and Options
96 =====================
97
98 Some systems require unusual options for compilation or linking that
99 the `configure' script does not know about. Run `./configure --help'
100 for details on some of the pertinent environment variables.
101
102 You can give `configure' initial values for configuration parameters
103 by setting variables in the command line or in the environment. Here
104 is an example:
105
106 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
107
108 *Note Defining Variables::, for more details.
109
110 Compiling For Multiple Architectures
111 ====================================
112
113 You can compile the package for more than one kind of computer at the
114 same time, by placing the object files for each architecture in their
115 own directory. To do this, you can use GNU `make'. `cd' to the
116 directory where you want the object files and executables to go and run
117 the `configure' script. `configure' automatically checks for the
118 source code in the directory that `configure' is in and in `..'. This
119 is known as a "VPATH" build.
120
121 With a non-GNU `make', it is safer to compile the package for one
122 architecture at a time in the source code directory. After you have
123 installed the package for one architecture, use `make distclean' before
124 reconfiguring for another architecture.
125
126 On MacOS X 10.5 and later systems, you can create libraries and
127 executables that work on multiple system types--known as "fat" or
128 "universal" binaries--by specifying multiple `-arch' options to the
129 compiler but only a single `-arch' option to the preprocessor. Like
130 this:
131
132 ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
133 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134 CPP="gcc -E" CXXCPP="g++ -E"
135
136 This is not guaranteed to produce working output in all cases, you
137 may have to build one architecture at a time and combine the results
138 using the `lipo' tool if you have problems.
139
140 Installation Names
141 ==================
142
143 By default, `make install' installs the package's commands under
144 `/usr/local/bin', include files under `/usr/local/include', etc. You
145 can specify an installation prefix other than `/usr/local' by giving
146 `configure' the option `--prefix=PREFIX', where PREFIX must be an
147 absolute file name.
148
149 You can specify separate installation prefixes for
150 architecture-specific files and architecture-independent files. If you
151 pass the option `--exec-prefix=PREFIX' to `configure', the package uses
152 PREFIX as the prefix for installing programs and libraries.
153 Documentation and other data files still use the regular prefix.
154
155 In addition, if you use an unusual directory layout you can give
156 options like `--bindir=DIR' to specify different values for particular
157 kinds of files. Run `configure --help' for a list of the directories
158 you can set and what kinds of files go in them. In general, the
159 default for these options is expressed in terms of `${prefix}', so that
160 specifying just `--prefix' will affect all of the other directory
161 specifications that were not explicitly provided.
162
163 The most portable way to affect installation locations is to pass the
164 correct locations to `configure'; however, many packages provide one or
165 both of the following shortcuts of passing variable assignments to the
166 `make install' command line to change installation locations without
167 having to reconfigure or recompile.
168
169 The first method involves providing an override variable for each
170 affected directory. For example, `make install
171 prefix=/alternate/directory' will choose an alternate location for all
172 directory configuration variables that were expressed in terms of
173 `${prefix}'. Any directories that were specified during `configure',
174 but not in terms of `${prefix}', must each be overridden at install
175 time for the entire installation to be relocated. The approach of
176 makefile variable overrides for each directory variable is required by
177 the GNU Coding Standards, and ideally causes no recompilation.
178 However, some platforms have known limitations with the semantics of
179 shared libraries that end up requiring recompilation when using this
180 method, particularly noticeable in packages that use GNU Libtool.
181
182 The second method involves providing the `DESTDIR' variable. For
183 example, `make install DESTDIR=/alternate/directory' will prepend
184 `/alternate/directory' before all installation names. The approach of
185 `DESTDIR' overrides is not required by the GNU Coding Standards, and
186 does not work on platforms that have drive letters. On the other hand,
187 it does better at avoiding recompilation issues, and works well even
188 when some directory options were not specified in terms of `${prefix}'
189 at `configure' time.
190
191 Optional Features
192 =================
193
194 If the package supports it, you can cause programs to be installed
195 with an extra prefix or suffix on their names by giving `configure' the
196 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
197
198 Some packages pay attention to `--enable-FEATURE' options to
199 `configure', where FEATURE indicates an optional part of the package.
200 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
201 is something like `gnu-as' or `x' (for the X Window System). The
202 `README' should mention any `--enable-' and `--with-' options that the
203 package recognizes.
204
205 For packages that use the X Window System, `configure' can usually
206 find the X include and library files automatically, but if it doesn't,
207 you can use the `configure' options `--x-includes=DIR' and
208 `--x-libraries=DIR' to specify their locations.
209
210 Some packages offer the ability to configure how verbose the
211 execution of `make' will be. For these packages, running `./configure
212 --enable-silent-rules' sets the default to minimal output, which can be
213 overridden with `make V=1'; while running `./configure
214 --disable-silent-rules' sets the default to verbose, which can be
215 overridden with `make V=0'.
216
217 Particular systems
218 ==================
219
220 On HP-UX, the default C compiler is not ANSI C compatible. If GNU
221 CC is not installed, it is recommended to use the following options in
222 order to use an ANSI C compiler:
223
224 ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
225
226 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
227
228 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
229 parse its `<wchar.h>' header file. The option `-nodtk' can be used as
230 a workaround. If GNU CC is not installed, it is therefore recommended
231 to try
232
233 ./configure CC="cc"
234
235 and if that doesn't work, try
236
237 ./configure CC="cc -nodtk"
238
239 On Solaris, don't put `/usr/ucb' early in your `PATH'. This
240 directory contains several dysfunctional programs; working variants of
241 these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
242 in your `PATH', put it _after_ `/usr/bin'.
243
244 On Haiku, software installed for all users goes in `/boot/common',
245 not `/usr/local'. It is recommended to use the following options:
246
247 ./configure --prefix=/boot/common
248
249 Specifying the System Type
250 ==========================
251
252 There may be some features `configure' cannot figure out
253 automatically, but needs to determine by the type of machine the package
254 will run on. Usually, assuming the package is built to be run on the
255 _same_ architectures, `configure' can figure that out, but if it prints
256 a message saying it cannot guess the machine type, give it the
257 `--build=TYPE' option. TYPE can either be a short name for the system
258 type, such as `sun4', or a canonical name which has the form:
259
260 CPU-COMPANY-SYSTEM
261
262 where SYSTEM can have one of these forms:
263
264 OS
265 KERNEL-OS
266
267 See the file `config.sub' for the possible values of each field. If
268 `config.sub' isn't included in this package, then this package doesn't
269 need to know the machine type.
270
271 If you are _building_ compiler tools for cross-compiling, you should
272 use the option `--target=TYPE' to select the type of system they will
273 produce code for.
274
275 If you want to _use_ a cross compiler, that generates code for a
276 platform different from the build platform, you should specify the
277 "host" platform (i.e., that on which the generated programs will
278 eventually be run) with `--host=TYPE'.
279
280 Sharing Defaults
281 ================
282
283 If you want to set default values for `configure' scripts to share,
284 you can create a site shell script called `config.site' that gives
285 default values for variables like `CC', `cache_file', and `prefix'.
286 `configure' looks for `PREFIX/share/config.site' if it exists, then
287 `PREFIX/etc/config.site' if it exists. Or, you can set the
288 `CONFIG_SITE' environment variable to the location of the site script.
289 A warning: not all `configure' scripts look for a site script.
290
291 Defining Variables
292 ==================
293
294 Variables not defined in a site shell script can be set in the
295 environment passed to `configure'. However, some packages may run
296 configure again during the build, and the customized values of these
297 variables may be lost. In order to avoid this problem, you should set
298 them in the `configure' command line, using `VAR=value'. For example:
299
300 ./configure CC=/usr/local2/bin/gcc
301
302 causes the specified `gcc' to be used as the C compiler (unless it is
303 overridden in the site shell script).
304
305 Unfortunately, this technique does not work for `CONFIG_SHELL' due to
306 an Autoconf bug. Until the bug is fixed you can use this workaround:
307
308 CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
309
310 `configure' Invocation
311 ======================
312
313 `configure' recognizes the following options to control how it
314 operates.
315
316 `--help'
317 `-h'
318 Print a summary of all of the options to `configure', and exit.
319
320 `--help=short'
321 `--help=recursive'
322 Print a summary of the options unique to this package's
323 `configure', and exit. The `short' variant lists options used
324 only in the top level, while the `recursive' variant lists options
325 also present in any nested packages.
326
327 `--version'
328 `-V'
329 Print the version of Autoconf used to generate the `configure'
330 script, and exit.
331
332 `--cache-file=FILE'
333 Enable the cache: use and save the results of the tests in FILE,
334 traditionally `config.cache'. FILE defaults to `/dev/null' to
335 disable caching.
336
337 `--config-cache'
338 `-C'
339 Alias for `--cache-file=config.cache'.
340
341 `--quiet'
342 `--silent'
343 `-q'
344 Do not print messages saying which checks are being made. To
345 suppress all normal output, redirect it to `/dev/null' (any error
346 messages will still be shown).
347
348 `--srcdir=DIR'
349 Look for the package's source code in directory DIR. Usually
350 `configure' can determine that directory automatically.
351
352 `--prefix=DIR'
353 Use DIR as the installation prefix. *note Installation Names::
354 for more details, including other options available for fine-tuning
355 the installation locations.
356
357 `--no-create'
358 `-n'
359 Run the configure checks, but stop before creating any output
360 files.
361
362 `configure' also accepts some other, not widely useful, options. Run
363 `configure --help' for more details.
364
0 SUBDIRS = src
0 SUBDIRS = src po
11
2 ACLOCAL_AMFLAGS = -I m4
3
3535 subdir = .
3636 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
3737 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
38 $(top_srcdir)/configure AUTHORS COPYING NEWS config.guess \
39 config.sub depcomp install-sh ltmain.sh missing
38 $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
39 config.guess config.sub depcomp install-sh ltmain.sh missing
4040 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
41 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \
42 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
43 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
44 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
4245 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4346 $(ACLOCAL_M4)
4447 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
102105 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
103106 done; \
104107 reldir="$$dir2"
105 DIST_ARCHIVES = $(distdir).tar.gz
108 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
106109 GZIP_ENV = --best
107110 distuninstallcheck_listfiles = find . -type f -print
108111 distcleancheck_listfiles = find . -type f -print
109112 ACLOCAL = @ACLOCAL@
113 ALL_LINGUAS = @ALL_LINGUAS@
110114 AMTAR = @AMTAR@
111115 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
112116 AR = @AR@
114118 AUTOHEADER = @AUTOHEADER@
115119 AUTOMAKE = @AUTOMAKE@
116120 AWK = @AWK@
121 CATALOGS = @CATALOGS@
122 CATOBJEXT = @CATOBJEXT@
117123 CC = @CC@
118124 CCDEPMODE = @CCDEPMODE@
119125 CFLAGS = @CFLAGS@
120126 CPP = @CPP@
121127 CPPFLAGS = @CPPFLAGS@
122128 CYGPATH_W = @CYGPATH_W@
129 DATADIRNAME = @DATADIRNAME@
123130 DEFS = @DEFS@
124131 DEPDIR = @DEPDIR@
125132 DSYMUTIL = @DSYMUTIL@
128135 ECHO_N = @ECHO_N@
129136 ECHO_T = @ECHO_T@
130137 EGREP = @EGREP@
138 ERROR_CFLAGS = @ERROR_CFLAGS@
131139 EXEEXT = @EXEEXT@
132140 FGREP = @FGREP@
141 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
142 GLIB_CFLAGS = @GLIB_CFLAGS@
143 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
144 GLIB_LIBS = @GLIB_LIBS@
145 GLIB_MKENUMS = @GLIB_MKENUMS@
146 GMOFILES = @GMOFILES@
147 GMSGFMT = @GMSGFMT@
148 GOBJECT_QUERY = @GOBJECT_QUERY@
133149 GREP = @GREP@
134150 INSTALL = @INSTALL@
135151 INSTALL_DATA = @INSTALL_DATA@
136152 INSTALL_PROGRAM = @INSTALL_PROGRAM@
137153 INSTALL_SCRIPT = @INSTALL_SCRIPT@
138154 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
155 INSTOBJEXT = @INSTOBJEXT@
156 INTLLIBS = @INTLLIBS@
157 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
158 INTLTOOL_MERGE = @INTLTOOL_MERGE@
159 INTLTOOL_PERL = @INTLTOOL_PERL@
160 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
139161 LD = @LD@
140162 LDFLAGS = @LDFLAGS@
141163 LIBOBJS = @LIBOBJS@
147169 MAINT = @MAINT@
148170 MAKEINFO = @MAKEINFO@
149171 MKDIR_P = @MKDIR_P@
172 MKINSTALLDIRS = @MKINSTALLDIRS@
173 MSGFMT = @MSGFMT@
174 MSGFMT_OPTS = @MSGFMT_OPTS@
175 MSGMERGE = @MSGMERGE@
150176 NM = @NM@
151177 NMEDIT = @NMEDIT@
152178 OBJDUMP = @OBJDUMP@
162188 PACKAGE_VERSION = @PACKAGE_VERSION@
163189 PATH_SEPARATOR = @PATH_SEPARATOR@
164190 PKG_CONFIG = @PKG_CONFIG@
191 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
192 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
193 POFILES = @POFILES@
194 POSUB = @POSUB@
195 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
196 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
165197 RANLIB = @RANLIB@
166198 SED = @SED@
167199 SET_MAKE = @SET_MAKE@
169201 SSH_CONTACT_CFLAGS = @SSH_CONTACT_CFLAGS@
170202 SSH_CONTACT_LIBS = @SSH_CONTACT_LIBS@
171203 STRIP = @STRIP@
204 USE_NLS = @USE_NLS@
172205 VERSION = @VERSION@
206 VINAGRE_CFLAGS = @VINAGRE_CFLAGS@
207 VINAGRE_LIBS = @VINAGRE_LIBS@
208 XGETTEXT = @XGETTEXT@
209 XMKMF = @XMKMF@
210 X_CFLAGS = @X_CFLAGS@
211 X_EXTRA_LIBS = @X_EXTRA_LIBS@
212 X_LIBS = @X_LIBS@
213 X_PRE_LIBS = @X_PRE_LIBS@
173214 abs_builddir = @abs_builddir@
174215 abs_srcdir = @abs_srcdir@
175216 abs_top_builddir = @abs_top_builddir@
222263 top_build_prefix = @top_build_prefix@
223264 top_builddir = @top_builddir@
224265 top_srcdir = @top_srcdir@
225 SUBDIRS = src
266 SUBDIRS = src po
267 ACLOCAL_AMFLAGS = -I m4
226268 all: config.h
227269 $(MAKE) $(AM_MAKEFLAGS) all-recursive
228270
233275 @for dep in $?; do \
234276 case '$(am__configure_deps)' in \
235277 *$$dep*) \
236 echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
237 $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
278 echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
279 $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
238280 && exit 0; \
239281 exit 1;; \
240282 esac; \
241283 done; \
242 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
284 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
243285 $(am__cd) $(top_srcdir) && \
244 $(AUTOMAKE) --foreign Makefile
286 $(AUTOMAKE) --gnu Makefile
245287 .PRECIOUS: Makefile
246288 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
247289 @case '$?' in \
493535 dist-gzip: distdir
494536 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
495537 $(am__remove_distdir)
496
497538 dist-bzip2: distdir
498539 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
499540 $(am__remove_distdir)
521562
522563 dist dist-all: distdir
523564 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
565 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
524566 $(am__remove_distdir)
525567
526568 # This target untars the dist file and tries a VPATH configuration. Then
0 NEW in 0.4
1 ==========
2
3 - Use TpStreamTube new API from telepathy-glib
4 - Correctly Close() channels after usage
5 - Do not depend on gio-unix anymore
6
7 NEW in 0.3
8 ==========
9
10 - Improved CLI
11 - Initial vinagre plugin
12 - More tolerant to any error that can happen
13
014 NEW in 0.2
115 ==========
216
1212
1313 m4_ifndef([AC_AUTOCONF_VERSION],
1414 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
15 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
16 [m4_warning([this file was generated for autoconf 2.65.
15 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
16 [m4_warning([this file was generated for autoconf 2.67.
1717 You have another version of autoconf. It may work, but is not guaranteed to.
1818 If you have problems, you may need to regenerate the build system entirely.
1919 To do so, use the procedure documented by the package, typically `autoreconf'.])])
2020
21 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
22 #
23 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
24 # 2006, 2007, 2008 Free Software Foundation, Inc.
25 # Written by Gordon Matzigkeit, 1996
26 #
27 # This file is free software; the Free Software Foundation gives
28 # unlimited permission to copy and/or distribute it, with or without
29 # modifications, as long as this notice is preserved.
30
31 m4_define([_LT_COPYING], [dnl
32 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
33 # 2006, 2007, 2008 Free Software Foundation, Inc.
34 # Written by Gordon Matzigkeit, 1996
35 #
36 # This file is part of GNU Libtool.
37 #
38 # GNU Libtool is free software; you can redistribute it and/or
39 # modify it under the terms of the GNU General Public License as
40 # published by the Free Software Foundation; either version 2 of
41 # the License, or (at your option) any later version.
42 #
43 # As a special exception to the GNU General Public License,
44 # if you distribute this file as part of a program or library that
45 # is built using GNU Libtool, you may include this file under the
46 # same distribution terms that you use for the rest of that program.
47 #
48 # GNU Libtool is distributed in the hope that it will be useful,
49 # but WITHOUT ANY WARRANTY; without even the implied warranty of
50 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 # GNU General Public License for more details.
52 #
53 # You should have received a copy of the GNU General Public License
54 # along with GNU Libtool; see the file COPYING. If not, a copy
55 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
56 # obtained by writing to the Free Software Foundation, Inc.,
57 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 # Configure paths for GLIB
22 # Owen Taylor 1997-2001
23
24 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
25 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
26 dnl gthread, or gio is specified in MODULES, pass to pkg-config
27 dnl
28 AC_DEFUN([AM_PATH_GLIB_2_0],
29 [dnl
30 dnl Get the cflags and libraries from pkg-config
31 dnl
32 AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
33 , enable_glibtest=yes)
34
35 pkg_config_args=glib-2.0
36 for module in . $4
37 do
38 case "$module" in
39 gmodule)
40 pkg_config_args="$pkg_config_args gmodule-2.0"
41 ;;
42 gmodule-no-export)
43 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
44 ;;
45 gobject)
46 pkg_config_args="$pkg_config_args gobject-2.0"
47 ;;
48 gthread)
49 pkg_config_args="$pkg_config_args gthread-2.0"
50 ;;
51 gio*)
52 pkg_config_args="$pkg_config_args $module-2.0"
53 ;;
54 esac
55 done
56
57 PKG_PROG_PKG_CONFIG([0.16])
58
59 no_glib=""
60
61 if test "x$PKG_CONFIG" = x ; then
62 no_glib=yes
63 PKG_CONFIG=no
64 fi
65
66 min_glib_version=ifelse([$1], ,2.0.0,$1)
67 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
68
69 if test x$PKG_CONFIG != xno ; then
70 ## don't try to run the test against uninstalled libtool libs
71 if $PKG_CONFIG --uninstalled $pkg_config_args; then
72 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
73 enable_glibtest=no
74 fi
75
76 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
77 :
78 else
79 no_glib=yes
80 fi
81 fi
82
83 if test x"$no_glib" = x ; then
84 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
85 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
86 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
87
88 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
89 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
90 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
91 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
92 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
93 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
94 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
95 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
96 if test "x$enable_glibtest" = "xyes" ; then
97 ac_save_CFLAGS="$CFLAGS"
98 ac_save_LIBS="$LIBS"
99 CFLAGS="$CFLAGS $GLIB_CFLAGS"
100 LIBS="$GLIB_LIBS $LIBS"
101 dnl
102 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
103 dnl checks the results of pkg-config to some extent)
104 dnl
105 rm -f conf.glibtest
106 AC_TRY_RUN([
107 #include <glib.h>
108 #include <stdio.h>
109 #include <stdlib.h>
110
111 int
112 main ()
113 {
114 unsigned int major, minor, micro;
115 char *tmp_version;
116
117 fclose (fopen ("conf.glibtest", "w"));
118
119 /* HP/UX 9 (%@#!) writes to sscanf strings */
120 tmp_version = g_strdup("$min_glib_version");
121 if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, &micro) != 3) {
122 printf("%s, bad version string\n", "$min_glib_version");
123 exit(1);
124 }
125
126 if ((glib_major_version != $glib_config_major_version) ||
127 (glib_minor_version != $glib_config_minor_version) ||
128 (glib_micro_version != $glib_config_micro_version))
129 {
130 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
131 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
132 glib_major_version, glib_minor_version, glib_micro_version);
133 printf ("*** was found! If pkg-config was correct, then it is best\n");
134 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
135 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
136 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
137 printf("*** required on your system.\n");
138 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
139 printf("*** to point to the correct configuration files\n");
140 }
141 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
142 (glib_minor_version != GLIB_MINOR_VERSION) ||
143 (glib_micro_version != GLIB_MICRO_VERSION))
144 {
145 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
146 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
147 printf("*** library (version %d.%d.%d)\n",
148 glib_major_version, glib_minor_version, glib_micro_version);
149 }
150 else
151 {
152 if ((glib_major_version > major) ||
153 ((glib_major_version == major) && (glib_minor_version > minor)) ||
154 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
155 {
156 return 0;
157 }
158 else
159 {
160 printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
161 glib_major_version, glib_minor_version, glib_micro_version);
162 printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
163 major, minor, micro);
164 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
165 printf("***\n");
166 printf("*** If you have already installed a sufficiently new version, this error\n");
167 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
168 printf("*** being found. The easiest way to fix this is to remove the old version\n");
169 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
170 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
171 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
172 printf("*** so that the correct libraries are found at run-time))\n");
173 }
174 }
175 return 1;
176 }
177 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
178 CFLAGS="$ac_save_CFLAGS"
179 LIBS="$ac_save_LIBS"
180 fi
181 fi
182 if test "x$no_glib" = x ; then
183 AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
184 ifelse([$2], , :, [$2])
185 else
186 AC_MSG_RESULT(no)
187 if test "$PKG_CONFIG" = "no" ; then
188 echo "*** A new enough version of pkg-config was not found."
189 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
190 else
191 if test -f conf.glibtest ; then
192 :
193 else
194 echo "*** Could not run GLIB test program, checking why..."
195 ac_save_CFLAGS="$CFLAGS"
196 ac_save_LIBS="$LIBS"
197 CFLAGS="$CFLAGS $GLIB_CFLAGS"
198 LIBS="$LIBS $GLIB_LIBS"
199 AC_TRY_LINK([
200 #include <glib.h>
201 #include <stdio.h>
202 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
203 [ echo "*** The test program compiled, but did not run. This usually means"
204 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
205 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
206 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
207 echo "*** to the installed location Also, make sure you have run ldconfig if that"
208 echo "*** is required on your system"
209 echo "***"
210 echo "*** If you have an old version installed, it is best to remove it, although"
211 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
212 [ echo "*** The test program failed to compile or link. See the file config.log for the"
213 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
214 CFLAGS="$ac_save_CFLAGS"
215 LIBS="$ac_save_LIBS"
216 fi
217 fi
218 GLIB_CFLAGS=""
219 GLIB_LIBS=""
220 GLIB_GENMARSHAL=""
221 GOBJECT_QUERY=""
222 GLIB_MKENUMS=""
223 ifelse([$3], , :, [$3])
224 fi
225 AC_SUBST(GLIB_CFLAGS)
226 AC_SUBST(GLIB_LIBS)
227 AC_SUBST(GLIB_GENMARSHAL)
228 AC_SUBST(GOBJECT_QUERY)
229 AC_SUBST(GLIB_MKENUMS)
230 rm -f conf.glibtest
58231 ])
59232
60 # serial 56 LT_INIT
61
62
63 # LT_PREREQ(VERSION)
64 # ------------------
65 # Complain and exit if this libtool version is less that VERSION.
66 m4_defun([LT_PREREQ],
67 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
68 [m4_default([$3],
69 [m4_fatal([Libtool version $1 or higher is required],
70 63)])],
71 [$2])])
72
73
74 # _LT_CHECK_BUILDDIR
75 # ------------------
76 # Complain if the absolute build directory name contains unusual characters
77 m4_defun([_LT_CHECK_BUILDDIR],
78 [case `pwd` in
79 *\ * | *\ *)
80 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
81 esac
233 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
234 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
235 #
236 # This file is free software, distributed under the terms of the GNU
237 # General Public License. As a special exception to the GNU General
238 # Public License, this file may be distributed as part of a program
239 # that contains a configuration script generated by Autoconf, under
240 # the same distribution terms as the rest of that program.
241 #
242 # This file can be copied and used freely without restrictions. It can
243 # be used in projects which are not available under the GNU Public License
244 # but which still want to provide support for the GNU gettext functionality.
245 #
246 # Macro to add for using GNU gettext.
247 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
248 #
249 # Modified to never use included libintl.
250 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
251 #
252 # Major rework to remove unused code
253 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
254 #
255 # Added better handling of ALL_LINGUAS from GNU gettext version
256 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
257 #
258 # Modified to require ngettext
259 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
260 #
261 # We need this here as well, since someone might use autoconf-2.5x
262 # to configure GLib then an older version to configure a package
263 # using AM_GLIB_GNU_GETTEXT
264 AC_PREREQ(2.53)
265
266 dnl
267 dnl We go to great lengths to make sure that aclocal won't
268 dnl try to pull in the installed version of these macros
269 dnl when running aclocal in the glib directory.
270 dnl
271 m4_copy([AC_DEFUN],[glib_DEFUN])
272 m4_copy([AC_REQUIRE],[glib_REQUIRE])
273 dnl
274 dnl At the end, if we're not within glib, we'll define the public
275 dnl definitions in terms of our private definitions.
276 dnl
277
278 # GLIB_LC_MESSAGES
279 #--------------------
280 glib_DEFUN([GLIB_LC_MESSAGES],
281 [AC_CHECK_HEADERS([locale.h])
282 if test $ac_cv_header_locale_h = yes; then
283 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
284 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
285 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
286 if test $am_cv_val_LC_MESSAGES = yes; then
287 AC_DEFINE(HAVE_LC_MESSAGES, 1,
288 [Define if your <locale.h> file defines LC_MESSAGES.])
289 fi
290 fi])
291
292 # GLIB_PATH_PROG_WITH_TEST
293 #----------------------------
294 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
295 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
296 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
297 [# Extract the first word of "$2", so it can be a program name with args.
298 set dummy $2; ac_word=[$]2
299 AC_MSG_CHECKING([for $ac_word])
300 AC_CACHE_VAL(ac_cv_path_$1,
301 [case "[$]$1" in
302 /*)
303 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
304 ;;
305 *)
306 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
307 for ac_dir in ifelse([$5], , $PATH, [$5]); do
308 test -z "$ac_dir" && ac_dir=.
309 if test -f $ac_dir/$ac_word; then
310 if [$3]; then
311 ac_cv_path_$1="$ac_dir/$ac_word"
312 break
313 fi
314 fi
315 done
316 IFS="$ac_save_ifs"
317 dnl If no 4th arg is given, leave the cache variable unset,
318 dnl so AC_PATH_PROGS will keep looking.
319 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
320 ])dnl
321 ;;
322 esac])dnl
323 $1="$ac_cv_path_$1"
324 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
325 AC_MSG_RESULT([$]$1)
326 else
327 AC_MSG_RESULT(no)
328 fi
329 AC_SUBST($1)dnl
82330 ])
83331
84
85 # LT_INIT([OPTIONS])
86 # ------------------
87 AC_DEFUN([LT_INIT],
88 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
89 AC_BEFORE([$0], [LT_LANG])dnl
90 AC_BEFORE([$0], [LT_OUTPUT])dnl
91 AC_BEFORE([$0], [LTDL_INIT])dnl
92 m4_require([_LT_CHECK_BUILDDIR])dnl
93
94 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
95 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
96 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
97 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
98 dnl unless we require an AC_DEFUNed macro:
99 AC_REQUIRE([LTOPTIONS_VERSION])dnl
100 AC_REQUIRE([LTSUGAR_VERSION])dnl
101 AC_REQUIRE([LTVERSION_VERSION])dnl
102 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
103 m4_require([_LT_PROG_LTMAIN])dnl
104
105 dnl Parse OPTIONS
106 _LT_SET_OPTIONS([$0], [$1])
107
108 # This can be used to rebuild libtool when needed
109 LIBTOOL_DEPS="$ltmain"
110
111 # Always use our own libtool.
112 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
113 AC_SUBST(LIBTOOL)dnl
114
115 _LT_SETUP
116
117 # Only expand once:
118 m4_define([LT_INIT])
119 ])# LT_INIT
120
121 # Old names:
122 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
123 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
124 dnl aclocal-1.4 backwards compatibility:
125 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
126 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
127
128
129 # _LT_CC_BASENAME(CC)
130 # -------------------
131 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
132 m4_defun([_LT_CC_BASENAME],
133 [for cc_temp in $1""; do
134 case $cc_temp in
135 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
136 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
137 \-*) ;;
138 *) break;;
139 esac
140 done
141 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
142 ])
143
144
145 # _LT_FILEUTILS_DEFAULTS
146 # ----------------------
147 # It is okay to use these file commands and assume they have been set
148 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
149 m4_defun([_LT_FILEUTILS_DEFAULTS],
150 [: ${CP="cp -f"}
151 : ${MV="mv -f"}
152 : ${RM="rm -f"}
153 ])# _LT_FILEUTILS_DEFAULTS
154
155
156 # _LT_SETUP
157 # ---------
158 m4_defun([_LT_SETUP],
159 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
160 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
161 _LT_DECL([], [host_alias], [0], [The host system])dnl
162 _LT_DECL([], [host], [0])dnl
163 _LT_DECL([], [host_os], [0])dnl
164 dnl
165 _LT_DECL([], [build_alias], [0], [The build system])dnl
166 _LT_DECL([], [build], [0])dnl
167 _LT_DECL([], [build_os], [0])dnl
168 dnl
169 AC_REQUIRE([AC_PROG_CC])dnl
170 AC_REQUIRE([LT_PATH_LD])dnl
171 AC_REQUIRE([LT_PATH_NM])dnl
172 dnl
173 AC_REQUIRE([AC_PROG_LN_S])dnl
174 test -z "$LN_S" && LN_S="ln -s"
175 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
176 dnl
177 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
178 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
179 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
180 dnl
181 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
182 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
183 m4_require([_LT_CMD_RELOAD])dnl
184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
185 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
186 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
187
188 _LT_CONFIG_LIBTOOL_INIT([
189 # See if we are running on zsh, and set the options which allow our
190 # commands through without removal of \ escapes INIT.
191 if test -n "\${ZSH_VERSION+set}" ; then
192 setopt NO_GLOB_SUBST
193 fi
194 ])
195 if test -n "${ZSH_VERSION+set}" ; then
196 setopt NO_GLOB_SUBST
197 fi
198
199 _LT_CHECK_OBJDIR
200
201 m4_require([_LT_TAG_COMPILER])dnl
202 _LT_PROG_ECHO_BACKSLASH
203
204 case $host_os in
205 aix3*)
206 # AIX sometimes has problems with the GCC collect2 program. For some
207 # reason, if we set the COLLECT_NAMES environment variable, the problems
208 # vanish in a puff of smoke.
209 if test "X${COLLECT_NAMES+set}" != Xset; then
210 COLLECT_NAMES=
211 export COLLECT_NAMES
212 fi
213 ;;
214 esac
215
216 # Sed substitution that helps us do robust quoting. It backslashifies
217 # metacharacters that are still active within double-quoted strings.
218 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
219
220 # Same as above, but do not quote variable references.
221 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
222
223 # Sed substitution to delay expansion of an escaped shell variable in a
224 # double_quote_subst'ed string.
225 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
226
227 # Sed substitution to delay expansion of an escaped single quote.
228 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
229
230 # Sed substitution to avoid accidental globbing in evaled expressions
231 no_glob_subst='s/\*/\\\*/g'
232
233 # Global variables:
234 ofile=libtool
235 can_build_shared=yes
236
237 # All known linkers require a `.a' archive for static linking (except MSVC,
238 # which needs '.lib').
239 libext=a
240
241 with_gnu_ld="$lt_cv_prog_gnu_ld"
242
243 old_CC="$CC"
244 old_CFLAGS="$CFLAGS"
245
246 # Set sane defaults for various variables
247 test -z "$CC" && CC=cc
248 test -z "$LTCC" && LTCC=$CC
249 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
250 test -z "$LD" && LD=ld
251 test -z "$ac_objext" && ac_objext=o
252
253 _LT_CC_BASENAME([$compiler])
254
255 # Only perform the check for file, if the check method requires it
256 test -z "$MAGIC_CMD" && MAGIC_CMD=file
257 case $deplibs_check_method in
258 file_magic*)
259 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
260 _LT_PATH_MAGIC
261 fi
262 ;;
263 esac
264
265 # Use C for the default configuration in the libtool script
266 LT_SUPPORTED_TAG([CC])
267 _LT_LANG_C_CONFIG
268 _LT_LANG_DEFAULT_CONFIG
269 _LT_CONFIG_COMMANDS
270 ])# _LT_SETUP
271
272
273 # _LT_PROG_LTMAIN
274 # ---------------
275 # Note that this code is called both from `configure', and `config.status'
276 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
277 # `config.status' has no value for ac_aux_dir unless we are using Automake,
278 # so we pass a copy along to make sure it has a sensible value anyway.
279 m4_defun([_LT_PROG_LTMAIN],
280 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
281 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
282 ltmain="$ac_aux_dir/ltmain.sh"
283 ])# _LT_PROG_LTMAIN
284
285
286
287 # So that we can recreate a full libtool script including additional
288 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
289 # in macros and then make a single call at the end using the `libtool'
290 # label.
291
292
293 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
294 # ----------------------------------------
295 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
296 m4_define([_LT_CONFIG_LIBTOOL_INIT],
297 [m4_ifval([$1],
298 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
299 [$1
300 ])])])
301
302 # Initialize.
303 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
304
305
306 # _LT_CONFIG_LIBTOOL([COMMANDS])
307 # ------------------------------
308 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
309 m4_define([_LT_CONFIG_LIBTOOL],
310 [m4_ifval([$1],
311 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
312 [$1
313 ])])])
314
315 # Initialize.
316 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
317
318
319 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
320 # -----------------------------------------------------
321 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
322 [_LT_CONFIG_LIBTOOL([$1])
323 _LT_CONFIG_LIBTOOL_INIT([$2])
324 ])
325
326
327 # _LT_FORMAT_COMMENT([COMMENT])
328 # -----------------------------
329 # Add leading comment marks to the start of each line, and a trailing
330 # full-stop to the whole comment if one is not present already.
331 m4_define([_LT_FORMAT_COMMENT],
332 [m4_ifval([$1], [
333 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
334 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
335 )])
336
337
338
339
340
341 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
342 # -------------------------------------------------------------------
343 # CONFIGNAME is the name given to the value in the libtool script.
344 # VARNAME is the (base) name used in the configure script.
345 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
346 # VARNAME. Any other value will be used directly.
347 m4_define([_LT_DECL],
348 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
349 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
350 [m4_ifval([$1], [$1], [$2])])
351 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
352 m4_ifval([$4],
353 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
354 lt_dict_add_subkey([lt_decl_dict], [$2],
355 [tagged?], [m4_ifval([$5], [yes], [no])])])
356 ])
357
358
359 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
360 # --------------------------------------------------------
361 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
362
363
364 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
365 # ------------------------------------------------
366 m4_define([lt_decl_tag_varnames],
367 [_lt_decl_filter([tagged?], [yes], $@)])
368
369
370 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
371 # ---------------------------------------------------------
372 m4_define([_lt_decl_filter],
373 [m4_case([$#],
374 [0], [m4_fatal([$0: too few arguments: $#])],
375 [1], [m4_fatal([$0: too few arguments: $#: $1])],
376 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
377 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
378 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
379 ])
380
381
382 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
383 # --------------------------------------------------
384 m4_define([lt_decl_quote_varnames],
385 [_lt_decl_filter([value], [1], $@)])
386
387
388 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
389 # ---------------------------------------------------
390 m4_define([lt_decl_dquote_varnames],
391 [_lt_decl_filter([value], [2], $@)])
392
393
394 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
395 # ---------------------------------------------------
396 m4_define([lt_decl_varnames_tagged],
397 [m4_assert([$# <= 2])dnl
398 _$0(m4_quote(m4_default([$1], [[, ]])),
399 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
400 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
401 m4_define([_lt_decl_varnames_tagged],
402 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
403
404
405 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
406 # ------------------------------------------------
407 m4_define([lt_decl_all_varnames],
408 [_$0(m4_quote(m4_default([$1], [[, ]])),
409 m4_if([$2], [],
410 m4_quote(lt_decl_varnames),
411 m4_quote(m4_shift($@))))[]dnl
412 ])
413 m4_define([_lt_decl_all_varnames],
414 [lt_join($@, lt_decl_varnames_tagged([$1],
415 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
416 ])
417
418
419 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
420 # ------------------------------------
421 # Quote a variable value, and forward it to `config.status' so that its
422 # declaration there will have the same value as in `configure'. VARNAME
423 # must have a single quote delimited value for this to work.
424 m4_define([_LT_CONFIG_STATUS_DECLARE],
425 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
426
427
428 # _LT_CONFIG_STATUS_DECLARATIONS
429 # ------------------------------
430 # We delimit libtool config variables with single quotes, so when
431 # we write them to config.status, we have to be sure to quote all
432 # embedded single quotes properly. In configure, this macro expands
433 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
434 #
435 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
436 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
437 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
438 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
439
440
441 # _LT_LIBTOOL_TAGS
442 # ----------------
443 # Output comment and list of tags supported by the script
444 m4_defun([_LT_LIBTOOL_TAGS],
445 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
446 available_tags="_LT_TAGS"dnl
447 ])
448
449
450 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
451 # -----------------------------------
452 # Extract the dictionary values for VARNAME (optionally with TAG) and
453 # expand to a commented shell variable setting:
454 #
455 # # Some comment about what VAR is for.
456 # visible_name=$lt_internal_name
457 m4_define([_LT_LIBTOOL_DECLARE],
458 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
459 [description])))[]dnl
460 m4_pushdef([_libtool_name],
461 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
462 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
463 [0], [_libtool_name=[$]$1],
464 [1], [_libtool_name=$lt_[]$1],
465 [2], [_libtool_name=$lt_[]$1],
466 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
467 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
468 ])
469
470
471 # _LT_LIBTOOL_CONFIG_VARS
472 # -----------------------
473 # Produce commented declarations of non-tagged libtool config variables
474 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
475 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
476 # section) are produced by _LT_LIBTOOL_TAG_VARS.
477 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
478 [m4_foreach([_lt_var],
479 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
480 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
481
482
483 # _LT_LIBTOOL_TAG_VARS(TAG)
484 # -------------------------
485 m4_define([_LT_LIBTOOL_TAG_VARS],
486 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
487 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
488
489
490 # _LT_TAGVAR(VARNAME, [TAGNAME])
491 # ------------------------------
492 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
493
494
495 # _LT_CONFIG_COMMANDS
496 # -------------------
497 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
498 # variables for single and double quote escaping we saved from calls
499 # to _LT_DECL, we can put quote escaped variables declarations
500 # into `config.status', and then the shell code to quote escape them in
501 # for loops in `config.status'. Finally, any additional code accumulated
502 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
503 m4_defun([_LT_CONFIG_COMMANDS],
504 [AC_PROVIDE_IFELSE([LT_OUTPUT],
505 dnl If the libtool generation code has been placed in $CONFIG_LT,
506 dnl instead of duplicating it all over again into config.status,
507 dnl then we will have config.status run $CONFIG_LT later, so it
508 dnl needs to know what name is stored there:
509 [AC_CONFIG_COMMANDS([libtool],
510 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
511 dnl If the libtool generation code is destined for config.status,
512 dnl expand the accumulated commands and init code now:
513 [AC_CONFIG_COMMANDS([libtool],
514 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
515 ])#_LT_CONFIG_COMMANDS
516
517
518 # Initialize.
519 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
520 [
521
522 # The HP-UX ksh and POSIX shell print the target directory to stdout
523 # if CDPATH is set.
524 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
525
526 sed_quote_subst='$sed_quote_subst'
527 double_quote_subst='$double_quote_subst'
528 delay_variable_subst='$delay_variable_subst'
529 _LT_CONFIG_STATUS_DECLARATIONS
530 LTCC='$LTCC'
531 LTCFLAGS='$LTCFLAGS'
532 compiler='$compiler_DEFAULT'
533
534 # Quote evaled strings.
535 for var in lt_decl_all_varnames([[ \
536 ]], lt_decl_quote_varnames); do
537 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
538 *[[\\\\\\\`\\"\\\$]]*)
539 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
540 ;;
541 *)
542 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
543 ;;
544 esac
545 done
546
547 # Double-quote double-evaled strings.
548 for var in lt_decl_all_varnames([[ \
549 ]], lt_decl_dquote_varnames); do
550 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
551 *[[\\\\\\\`\\"\\\$]]*)
552 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
553 ;;
554 *)
555 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
556 ;;
557 esac
558 done
559
560 # Fix-up fallback echo if it was mangled by the above quoting rules.
561 case \$lt_ECHO in
562 *'\\\[$]0 --fallback-echo"')dnl "
563 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
564 ;;
565 esac
566
567 _LT_OUTPUT_LIBTOOL_INIT
568 ])
569
570
571 # LT_OUTPUT
572 # ---------
573 # This macro allows early generation of the libtool script (before
574 # AC_OUTPUT is called), incase it is used in configure for compilation
575 # tests.
576 AC_DEFUN([LT_OUTPUT],
577 [: ${CONFIG_LT=./config.lt}
578 AC_MSG_NOTICE([creating $CONFIG_LT])
579 cat >"$CONFIG_LT" <<_LTEOF
580 #! $SHELL
581 # Generated by $as_me.
582 # Run this file to recreate a libtool stub with the current configuration.
583
584 lt_cl_silent=false
585 SHELL=\${CONFIG_SHELL-$SHELL}
586 _LTEOF
587
588 cat >>"$CONFIG_LT" <<\_LTEOF
589 AS_SHELL_SANITIZE
590 _AS_PREPARE
591
592 exec AS_MESSAGE_FD>&1
593 exec AS_MESSAGE_LOG_FD>>config.log
594 {
595 echo
596 AS_BOX([Running $as_me.])
597 } >&AS_MESSAGE_LOG_FD
598
599 lt_cl_help="\
600 \`$as_me' creates a local libtool stub from the current configuration,
601 for use in further configure time tests before the real libtool is
602 generated.
603
604 Usage: $[0] [[OPTIONS]]
605
606 -h, --help print this help, then exit
607 -V, --version print version number, then exit
608 -q, --quiet do not print progress messages
609 -d, --debug don't remove temporary files
610
611 Report bugs to <bug-libtool@gnu.org>."
612
613 lt_cl_version="\
614 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
615 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
616 configured by $[0], generated by m4_PACKAGE_STRING.
617
618 Copyright (C) 2008 Free Software Foundation, Inc.
619 This config.lt script is free software; the Free Software Foundation
620 gives unlimited permision to copy, distribute and modify it."
621
622 while test $[#] != 0
623 do
624 case $[1] in
625 --version | --v* | -V )
626 echo "$lt_cl_version"; exit 0 ;;
627 --help | --h* | -h )
628 echo "$lt_cl_help"; exit 0 ;;
629 --debug | --d* | -d )
630 debug=: ;;
631 --quiet | --q* | --silent | --s* | -q )
632 lt_cl_silent=: ;;
633
634 -*) AC_MSG_ERROR([unrecognized option: $[1]
635 Try \`$[0] --help' for more information.]) ;;
636
637 *) AC_MSG_ERROR([unrecognized argument: $[1]
638 Try \`$[0] --help' for more information.]) ;;
639 esac
640 shift
641 done
642
643 if $lt_cl_silent; then
644 exec AS_MESSAGE_FD>/dev/null
645 fi
646 _LTEOF
647
648 cat >>"$CONFIG_LT" <<_LTEOF
649 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
650 _LTEOF
651
652 cat >>"$CONFIG_LT" <<\_LTEOF
653 AC_MSG_NOTICE([creating $ofile])
654 _LT_OUTPUT_LIBTOOL_COMMANDS
655 AS_EXIT(0)
656 _LTEOF
657 chmod +x "$CONFIG_LT"
658
659 # configure is writing to config.log, but config.lt does its own redirection,
660 # appending to config.log, which fails on DOS, as config.log is still kept
661 # open by configure. Here we exec the FD to /dev/null, effectively closing
662 # config.log, so it can be properly (re)opened and appended to by config.lt.
663 if test "$no_create" != yes; then
664 lt_cl_success=:
665 test "$silent" = yes &&
666 lt_config_lt_args="$lt_config_lt_args --quiet"
667 exec AS_MESSAGE_LOG_FD>/dev/null
668 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
669 exec AS_MESSAGE_LOG_FD>>config.log
670 $lt_cl_success || AS_EXIT(1)
671 fi
672 ])# LT_OUTPUT
673
674
675 # _LT_CONFIG(TAG)
676 # ---------------
677 # If TAG is the built-in tag, create an initial libtool script with a
678 # default configuration from the untagged config vars. Otherwise add code
679 # to config.status for appending the configuration named by TAG from the
680 # matching tagged config vars.
681 m4_defun([_LT_CONFIG],
682 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
683 _LT_CONFIG_SAVE_COMMANDS([
684 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
685 m4_if(_LT_TAG, [C], [
686 # See if we are running on zsh, and set the options which allow our
687 # commands through without removal of \ escapes.
688 if test -n "${ZSH_VERSION+set}" ; then
689 setopt NO_GLOB_SUBST
690 fi
691
692 cfgfile="${ofile}T"
693 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
694 $RM "$cfgfile"
695
696 cat <<_LT_EOF >> "$cfgfile"
697 #! $SHELL
698
699 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
700 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
701 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
702 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
703 #
704 _LT_COPYING
705 _LT_LIBTOOL_TAGS
706
707 # ### BEGIN LIBTOOL CONFIG
708 _LT_LIBTOOL_CONFIG_VARS
709 _LT_LIBTOOL_TAG_VARS
710 # ### END LIBTOOL CONFIG
711
712 _LT_EOF
713
714 case $host_os in
715 aix3*)
716 cat <<\_LT_EOF >> "$cfgfile"
717 # AIX sometimes has problems with the GCC collect2 program. For some
718 # reason, if we set the COLLECT_NAMES environment variable, the problems
719 # vanish in a puff of smoke.
720 if test "X${COLLECT_NAMES+set}" != Xset; then
721 COLLECT_NAMES=
722 export COLLECT_NAMES
723 fi
724 _LT_EOF
725 ;;
726 esac
727
728 _LT_PROG_LTMAIN
729
730 # We use sed instead of cat because bash on DJGPP gets confused if
731 # if finds mixed CR/LF and LF-only lines. Since sed operates in
732 # text mode, it properly converts lines to CR/LF. This bash problem
733 # is reportedly fixed, but why not run on old versions too?
734 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
735 || (rm -f "$cfgfile"; exit 1)
736
737 _LT_PROG_XSI_SHELLFNS
738
739 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
740 || (rm -f "$cfgfile"; exit 1)
741
742 mv -f "$cfgfile" "$ofile" ||
743 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
744 chmod +x "$ofile"
332 # GLIB_WITH_NLS
333 #-----------------
334 glib_DEFUN([GLIB_WITH_NLS],
335 dnl NLS is obligatory
336 [USE_NLS=yes
337 AC_SUBST(USE_NLS)
338
339 gt_cv_have_gettext=no
340
341 CATOBJEXT=NONE
342 XGETTEXT=:
343 INTLLIBS=
344
345 AC_CHECK_HEADER(libintl.h,
346 [gt_cv_func_dgettext_libintl="no"
347 libintl_extra_libs=""
348
349 #
350 # First check in libc
351 #
352 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
353 [AC_TRY_LINK([
354 #include <libintl.h>
745355 ],
746 [cat <<_LT_EOF >> "$ofile"
747
748 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
749 dnl in a comment (ie after a #).
750 # ### BEGIN LIBTOOL TAG CONFIG: $1
751 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
752 # ### END LIBTOOL TAG CONFIG: $1
753 _LT_EOF
754 ])dnl /m4_if
356 [return !ngettext ("","", 1)],
357 gt_cv_func_ngettext_libc=yes,
358 gt_cv_func_ngettext_libc=no)
359 ])
360
361 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
362 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
363 [AC_TRY_LINK([
364 #include <libintl.h>
755365 ],
756 [m4_if([$1], [], [
757 PACKAGE='$PACKAGE'
758 VERSION='$VERSION'
759 TIMESTAMP='$TIMESTAMP'
760 RM='$RM'
761 ofile='$ofile'], [])
762 ])dnl /_LT_CONFIG_SAVE_COMMANDS
763 ])# _LT_CONFIG
764
765
766 # LT_SUPPORTED_TAG(TAG)
767 # ---------------------
768 # Trace this macro to discover what tags are supported by the libtool
769 # --tag option, using:
770 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
771 AC_DEFUN([LT_SUPPORTED_TAG], [])
772
773
774 # C support is built-in for now
775 m4_define([_LT_LANG_C_enabled], [])
776 m4_define([_LT_TAGS], [])
777
778
779 # LT_LANG(LANG)
780 # -------------
781 # Enable libtool support for the given language if not already enabled.
782 AC_DEFUN([LT_LANG],
783 [AC_BEFORE([$0], [LT_OUTPUT])dnl
784 m4_case([$1],
785 [C], [_LT_LANG(C)],
786 [C++], [_LT_LANG(CXX)],
787 [Java], [_LT_LANG(GCJ)],
788 [Fortran 77], [_LT_LANG(F77)],
789 [Fortran], [_LT_LANG(FC)],
790 [Windows Resource], [_LT_LANG(RC)],
791 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
792 [_LT_LANG($1)],
793 [m4_fatal([$0: unsupported language: "$1"])])])dnl
794 ])# LT_LANG
795
796
797 # _LT_LANG(LANGNAME)
798 # ------------------
799 m4_defun([_LT_LANG],
800 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
801 [LT_SUPPORTED_TAG([$1])dnl
802 m4_append([_LT_TAGS], [$1 ])dnl
803 m4_define([_LT_LANG_]$1[_enabled], [])dnl
804 _LT_LANG_$1_CONFIG($1)])dnl
805 ])# _LT_LANG
806
807
808 # _LT_LANG_DEFAULT_CONFIG
809 # -----------------------
810 m4_defun([_LT_LANG_DEFAULT_CONFIG],
811 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
812 [LT_LANG(CXX)],
813 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
814
815 AC_PROVIDE_IFELSE([AC_PROG_F77],
816 [LT_LANG(F77)],
817 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
818
819 AC_PROVIDE_IFELSE([AC_PROG_FC],
820 [LT_LANG(FC)],
821 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
822
823 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
824 dnl pulling things in needlessly.
825 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
826 [LT_LANG(GCJ)],
827 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
828 [LT_LANG(GCJ)],
829 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
830 [LT_LANG(GCJ)],
831 [m4_ifdef([AC_PROG_GCJ],
832 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
833 m4_ifdef([A][M_PROG_GCJ],
834 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
835 m4_ifdef([LT_PROG_GCJ],
836 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
837
838 AC_PROVIDE_IFELSE([LT_PROG_RC],
839 [LT_LANG(RC)],
840 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
841 ])# _LT_LANG_DEFAULT_CONFIG
842
843 # Obsolete macros:
844 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
845 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
846 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
847 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
848 dnl aclocal-1.4 backwards compatibility:
849 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
850 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
851 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
852 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
853
854
855 # _LT_TAG_COMPILER
856 # ----------------
857 m4_defun([_LT_TAG_COMPILER],
858 [AC_REQUIRE([AC_PROG_CC])dnl
859
860 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
861 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
862 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
863 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
864
865 # If no C compiler was specified, use CC.
866 LTCC=${LTCC-"$CC"}
867
868 # If no C compiler flags were specified, use CFLAGS.
869 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
870
871 # Allow CC to be a program name with arguments.
872 compiler=$CC
873 ])# _LT_TAG_COMPILER
874
875
876 # _LT_COMPILER_BOILERPLATE
877 # ------------------------
878 # Check for compiler boilerplate output or warnings with
879 # the simple compiler test code.
880 m4_defun([_LT_COMPILER_BOILERPLATE],
881 [m4_require([_LT_DECL_SED])dnl
882 ac_outfile=conftest.$ac_objext
883 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
884 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
885 _lt_compiler_boilerplate=`cat conftest.err`
886 $RM conftest*
887 ])# _LT_COMPILER_BOILERPLATE
888
889
890 # _LT_LINKER_BOILERPLATE
891 # ----------------------
892 # Check for linker boilerplate output or warnings with
893 # the simple link test code.
894 m4_defun([_LT_LINKER_BOILERPLATE],
895 [m4_require([_LT_DECL_SED])dnl
896 ac_outfile=conftest.$ac_objext
897 echo "$lt_simple_link_test_code" >conftest.$ac_ext
898 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
899 _lt_linker_boilerplate=`cat conftest.err`
900 $RM -r conftest*
901 ])# _LT_LINKER_BOILERPLATE
902
903 # _LT_REQUIRED_DARWIN_CHECKS
904 # -------------------------
905 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
906 case $host_os in
907 rhapsody* | darwin*)
908 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
909 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
910 AC_CHECK_TOOL([LIPO], [lipo], [:])
911 AC_CHECK_TOOL([OTOOL], [otool], [:])
912 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
913 _LT_DECL([], [DSYMUTIL], [1],
914 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
915 _LT_DECL([], [NMEDIT], [1],
916 [Tool to change global to local symbols on Mac OS X])
917 _LT_DECL([], [LIPO], [1],
918 [Tool to manipulate fat objects and archives on Mac OS X])
919 _LT_DECL([], [OTOOL], [1],
920 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
921 _LT_DECL([], [OTOOL64], [1],
922 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
923
924 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
925 [lt_cv_apple_cc_single_mod=no
926 if test -z "${LT_MULTI_MODULE}"; then
927 # By default we will add the -single_module flag. You can override
928 # by either setting the environment variable LT_MULTI_MODULE
929 # non-empty at configure time, or by adding -multi_module to the
930 # link flags.
931 rm -rf libconftest.dylib*
932 echo "int foo(void){return 1;}" > conftest.c
933 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
934 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
935 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
936 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
937 _lt_result=$?
938 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
939 lt_cv_apple_cc_single_mod=yes
940 else
941 cat conftest.err >&AS_MESSAGE_LOG_FD
942 fi
943 rm -rf libconftest.dylib*
944 rm -f conftest.*
945 fi])
946 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
947 [lt_cv_ld_exported_symbols_list],
948 [lt_cv_ld_exported_symbols_list=no
949 save_LDFLAGS=$LDFLAGS
950 echo "_main" > conftest.sym
951 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
952 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
953 [lt_cv_ld_exported_symbols_list=yes],
954 [lt_cv_ld_exported_symbols_list=no])
955 LDFLAGS="$save_LDFLAGS"
956 ])
957 case $host_os in
958 rhapsody* | darwin1.[[012]])
959 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
960 darwin1.*)
961 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
962 darwin*) # darwin 5.x on
963 # if running on 10.5 or later, the deployment target defaults
964 # to the OS version, if on x86, and 10.4, the deployment
965 # target defaults to 10.4. Don't you love it?
966 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
967 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
968 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
969 10.[[012]]*)
970 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
971 10.*)
972 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
973 esac
974 ;;
975 esac
976 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
977 _lt_dar_single_mod='$single_module'
978 fi
979 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
980 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
981 else
982 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
983 fi
984 if test "$DSYMUTIL" != ":"; then
985 _lt_dsymutil='~$DSYMUTIL $lib || :'
986 else
987 _lt_dsymutil=
988 fi
989 ;;
990 esac
991 ])
992
993
994 # _LT_DARWIN_LINKER_FEATURES
995 # --------------------------
996 # Checks for linker and compiler features on darwin
997 m4_defun([_LT_DARWIN_LINKER_FEATURES],
998 [
999 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1000 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1001 _LT_TAGVAR(hardcode_direct, $1)=no
1002 _LT_TAGVAR(hardcode_automatic, $1)=yes
1003 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1004 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1005 _LT_TAGVAR(link_all_deplibs, $1)=yes
1006 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1007 case $cc_basename in
1008 ifort*) _lt_dar_can_shared=yes ;;
1009 *) _lt_dar_can_shared=$GCC ;;
1010 esac
1011 if test "$_lt_dar_can_shared" = "yes"; then
1012 output_verbose_link_cmd=echo
1013 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1014 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1015 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1016 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1017 m4_if([$1], [CXX],
1018 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1019 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1020 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1021 fi
1022 ],[])
1023 else
1024 _LT_TAGVAR(ld_shlibs, $1)=no
1025 fi
1026 ])
1027
1028 # _LT_SYS_MODULE_PATH_AIX
1029 # -----------------------
1030 # Links a minimal program and checks the executable
1031 # for the system default hardcoded library path. In most cases,
1032 # this is /usr/lib:/lib, but when the MPI compilers are used
1033 # the location of the communication and MPI libs are included too.
1034 # If we don't find anything, use the default library path according
1035 # to the aix ld manual.
1036 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1037 [m4_require([_LT_DECL_SED])dnl
1038 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1039 lt_aix_libpath_sed='
1040 /Import File Strings/,/^$/ {
1041 /^0/ {
1042 s/^0 *\(.*\)$/\1/
1043 p
1044 }
1045 }'
1046 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1047 # Check for a 64-bit object if we didn't find anything.
1048 if test -z "$aix_libpath"; then
1049 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1050 fi],[])
1051 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1052 ])# _LT_SYS_MODULE_PATH_AIX
1053
1054
1055 # _LT_SHELL_INIT(ARG)
1056 # -------------------
1057 m4_define([_LT_SHELL_INIT],
1058 [ifdef([AC_DIVERSION_NOTICE],
1059 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1060 [AC_DIVERT_PUSH(NOTICE)])
1061 $1
1062 AC_DIVERT_POP
1063 ])# _LT_SHELL_INIT
1064
1065
1066 # _LT_PROG_ECHO_BACKSLASH
1067 # -----------------------
1068 # Add some code to the start of the generated configure script which
1069 # will find an echo command which doesn't interpret backslashes.
1070 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1071 [_LT_SHELL_INIT([
1072 # Check that we are running under the correct shell.
1073 SHELL=${CONFIG_SHELL-/bin/sh}
1074
1075 case X$lt_ECHO in
1076 X*--fallback-echo)
1077 # Remove one level of quotation (which was required for Make).
1078 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1079 ;;
1080 esac
1081
1082 ECHO=${lt_ECHO-echo}
1083 if test "X[$]1" = X--no-reexec; then
1084 # Discard the --no-reexec flag, and continue.
1085 shift
1086 elif test "X[$]1" = X--fallback-echo; then
1087 # Avoid inline document here, it may be left over
1088 :
1089 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1090 # Yippee, $ECHO works!
1091 :
1092 else
1093 # Restart under the correct shell.
1094 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1095 fi
1096
1097 if test "X[$]1" = X--fallback-echo; then
1098 # used as fallback echo
1099 shift
1100 cat <<_LT_EOF
1101 [$]*
1102 _LT_EOF
1103 exit 0
1104 fi
1105
1106 # The HP-UX ksh and POSIX shell print the target directory to stdout
1107 # if CDPATH is set.
1108 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1109
1110 if test -z "$lt_ECHO"; then
1111 if test "X${echo_test_string+set}" != Xset; then
1112 # find a string as large as possible, as long as the shell can cope with it
1113 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1114 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1115 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1116 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1117 then
1118 break
366 [return !dgettext ("","")],
367 gt_cv_func_dgettext_libc=yes,
368 gt_cv_func_dgettext_libc=no)
369 ])
1119370 fi
1120 done
1121 fi
1122
1123 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1124 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1125 test "X$echo_testing_string" = "X$echo_test_string"; then
1126 :
1127 else
1128 # The Solaris, AIX, and Digital Unix default echo programs unquote
1129 # backslashes. This makes it impossible to quote backslashes using
1130 # echo "$something" | sed 's/\\/\\\\/g'
1131 #
1132 # So, first we look for a working echo in the user's PATH.
1133
1134 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1135 for dir in $PATH /usr/ucb; do
1136 IFS="$lt_save_ifs"
1137 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1138 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1139 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1140 test "X$echo_testing_string" = "X$echo_test_string"; then
1141 ECHO="$dir/echo"
1142 break
371
372 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
373 AC_CHECK_FUNCS(bind_textdomain_codeset)
1143374 fi
1144 done
1145 IFS="$lt_save_ifs"
1146
1147 if test "X$ECHO" = Xecho; then
1148 # We didn't find a better echo, so look for alternatives.
1149 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1150 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1151 test "X$echo_testing_string" = "X$echo_test_string"; then
1152 # This shell has a builtin print -r that does the trick.
1153 ECHO='print -r'
1154 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1155 test "X$CONFIG_SHELL" != X/bin/ksh; then
1156 # If we have ksh, try running configure again with it.
1157 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1158 export ORIGINAL_CONFIG_SHELL
1159 CONFIG_SHELL=/bin/ksh
1160 export CONFIG_SHELL
1161 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1162 else
1163 # Try using printf.
1164 ECHO='printf %s\n'
1165 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1166 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1167 test "X$echo_testing_string" = "X$echo_test_string"; then
1168 # Cool, printf works
1169 :
1170 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1171 test "X$echo_testing_string" = 'X\t' &&
1172 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1173 test "X$echo_testing_string" = "X$echo_test_string"; then
1174 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1175 export CONFIG_SHELL
1176 SHELL="$CONFIG_SHELL"
1177 export SHELL
1178 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1179 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1180 test "X$echo_testing_string" = 'X\t' &&
1181 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1182 test "X$echo_testing_string" = "X$echo_test_string"; then
1183 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1184 else
1185 # maybe with a smaller string...
1186 prev=:
1187
1188 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1189 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1190 then
1191 break
1192 fi
1193 prev="$cmd"
1194 done
1195
1196 if test "$prev" != 'sed 50q "[$]0"'; then
1197 echo_test_string=`eval $prev`
1198 export echo_test_string
1199 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1200 else
1201 # Oops. We lost completely, so just stick with echo.
1202 ECHO=echo
1203 fi
375
376 #
377 # If we don't have everything we want, check in libintl
378 #
379 if test "$gt_cv_func_dgettext_libc" != "yes" \
380 || test "$gt_cv_func_ngettext_libc" != "yes" \
381 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
382
383 AC_CHECK_LIB(intl, bindtextdomain,
384 [AC_CHECK_LIB(intl, ngettext,
385 [AC_CHECK_LIB(intl, dgettext,
386 gt_cv_func_dgettext_libintl=yes)])])
387
388 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
389 AC_MSG_CHECKING([if -liconv is needed to use gettext])
390 AC_MSG_RESULT([])
391 AC_CHECK_LIB(intl, ngettext,
392 [AC_CHECK_LIB(intl, dcgettext,
393 [gt_cv_func_dgettext_libintl=yes
394 libintl_extra_libs=-liconv],
395 :,-liconv)],
396 :,-liconv)
397 fi
398
399 #
400 # If we found libintl, then check in it for bind_textdomain_codeset();
401 # we'll prefer libc if neither have bind_textdomain_codeset(),
402 # and both have dgettext and ngettext
403 #
404 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
405 glib_save_LIBS="$LIBS"
406 LIBS="$LIBS -lintl $libintl_extra_libs"
407 unset ac_cv_func_bind_textdomain_codeset
408 AC_CHECK_FUNCS(bind_textdomain_codeset)
409 LIBS="$glib_save_LIBS"
410
411 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
412 gt_cv_func_dgettext_libc=no
413 else
414 if test "$gt_cv_func_dgettext_libc" = "yes" \
415 && test "$gt_cv_func_ngettext_libc" = "yes"; then
416 gt_cv_func_dgettext_libintl=no
417 fi
418 fi
1204419 fi
1205420 fi
421
422 if test "$gt_cv_func_dgettext_libc" = "yes" \
423 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
424 gt_cv_have_gettext=yes
425 fi
426
427 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
428 INTLLIBS="-lintl $libintl_extra_libs"
429 fi
430
431 if test "$gt_cv_have_gettext" = "yes"; then
432 AC_DEFINE(HAVE_GETTEXT,1,
433 [Define if the GNU gettext() function is already present or preinstalled.])
434 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
435 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
436 if test "$MSGFMT" != "no"; then
437 glib_save_LIBS="$LIBS"
438 LIBS="$LIBS $INTLLIBS"
439 AC_CHECK_FUNCS(dcgettext)
440 MSGFMT_OPTS=
441 AC_MSG_CHECKING([if msgfmt accepts -c])
442 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
443 msgid ""
444 msgstr ""
445 "Content-Type: text/plain; charset=UTF-8\n"
446 "Project-Id-Version: test 1.0\n"
447 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
448 "Last-Translator: test <foo@bar.xx>\n"
449 "Language-Team: C <LL@li.org>\n"
450 "MIME-Version: 1.0\n"
451 "Content-Transfer-Encoding: 8bit\n"
452 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
453 AC_SUBST(MSGFMT_OPTS)
454 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
455 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
456 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
457 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
458 return _nl_msg_cat_cntr],
459 [CATOBJEXT=.gmo
460 DATADIRNAME=share],
461 [case $host in
462 *-*-solaris*)
463 dnl On Solaris, if bind_textdomain_codeset is in libc,
464 dnl GNU format message catalog is always supported,
465 dnl since both are added to the libc all together.
466 dnl Hence, we'd like to go with DATADIRNAME=share and
467 dnl and CATOBJEXT=.gmo in this case.
468 AC_CHECK_FUNC(bind_textdomain_codeset,
469 [CATOBJEXT=.gmo
470 DATADIRNAME=share],
471 [CATOBJEXT=.mo
472 DATADIRNAME=lib])
473 ;;
474 *)
475 CATOBJEXT=.mo
476 DATADIRNAME=lib
477 ;;
478 esac])
479 LIBS="$glib_save_LIBS"
480 INSTOBJEXT=.mo
481 else
482 gt_cv_have_gettext=no
483 fi
484 fi
485 ])
486
487 if test "$gt_cv_have_gettext" = "yes" ; then
488 AC_DEFINE(ENABLE_NLS, 1,
489 [always defined to indicate that i18n is enabled])
1206490 fi
1207 fi
1208 fi
1209
1210 # Copy echo and quote the copy suitably for passing to libtool from
1211 # the Makefile, instead of quoting the original, which is used later.
1212 lt_ECHO=$ECHO
1213 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1214 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1215 fi
1216
1217 AC_SUBST(lt_ECHO)
1218 ])
1219 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1220 _LT_DECL([], [ECHO], [1],
1221 [An echo program that does not interpret backslashes])
1222 ])# _LT_PROG_ECHO_BACKSLASH
1223
1224
1225 # _LT_ENABLE_LOCK
1226 # ---------------
1227 m4_defun([_LT_ENABLE_LOCK],
1228 [AC_ARG_ENABLE([libtool-lock],
1229 [AS_HELP_STRING([--disable-libtool-lock],
1230 [avoid locking (might break parallel builds)])])
1231 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1232
1233 # Some flags need to be propagated to the compiler or linker for good
1234 # libtool support.
1235 case $host in
1236 ia64-*-hpux*)
1237 # Find out which ABI we are using.
1238 echo 'int i;' > conftest.$ac_ext
1239 if AC_TRY_EVAL(ac_compile); then
1240 case `/usr/bin/file conftest.$ac_objext` in
1241 *ELF-32*)
1242 HPUX_IA64_MODE="32"
1243 ;;
1244 *ELF-64*)
1245 HPUX_IA64_MODE="64"
1246 ;;
1247 esac
1248 fi
1249 rm -rf conftest*
1250 ;;
1251 *-*-irix6*)
1252 # Find out which ABI we are using.
1253 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1254 if AC_TRY_EVAL(ac_compile); then
1255 if test "$lt_cv_prog_gnu_ld" = yes; then
1256 case `/usr/bin/file conftest.$ac_objext` in
1257 *32-bit*)
1258 LD="${LD-ld} -melf32bsmip"
1259 ;;
1260 *N32*)
1261 LD="${LD-ld} -melf32bmipn32"
1262 ;;
1263 *64-bit*)
1264 LD="${LD-ld} -melf64bmip"
1265 ;;
1266 esac
1267 else
1268 case `/usr/bin/file conftest.$ac_objext` in
1269 *32-bit*)
1270 LD="${LD-ld} -32"
1271 ;;
1272 *N32*)
1273 LD="${LD-ld} -n32"
1274 ;;
1275 *64-bit*)
1276 LD="${LD-ld} -64"
1277 ;;
1278 esac
491
492 dnl Test whether we really found GNU xgettext.
493 if test "$XGETTEXT" != ":"; then
494 dnl If it is not GNU xgettext we define it as : so that the
495 dnl Makefiles still can work.
496 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
497 : ;
498 else
499 AC_MSG_RESULT(
500 [found xgettext program is not GNU xgettext; ignore it])
501 XGETTEXT=":"
502 fi
1279503 fi
1280 fi
1281 rm -rf conftest*
1282 ;;
1283
1284 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1285 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1286 # Find out which ABI we are using.
1287 echo 'int i;' > conftest.$ac_ext
1288 if AC_TRY_EVAL(ac_compile); then
1289 case `/usr/bin/file conftest.o` in
1290 *32-bit*)
1291 case $host in
1292 x86_64-*kfreebsd*-gnu)
1293 LD="${LD-ld} -m elf_i386_fbsd"
1294 ;;
1295 x86_64-*linux*)
1296 LD="${LD-ld} -m elf_i386"
1297 ;;
1298 ppc64-*linux*|powerpc64-*linux*)
1299 LD="${LD-ld} -m elf32ppclinux"
1300 ;;
1301 s390x-*linux*)
1302 LD="${LD-ld} -m elf_s390"
1303 ;;
1304 sparc64-*linux*)
1305 LD="${LD-ld} -m elf32_sparc"
1306 ;;
1307 esac
1308 ;;
1309 *64-bit*)
1310 case $host in
1311 x86_64-*kfreebsd*-gnu)
1312 LD="${LD-ld} -m elf_x86_64_fbsd"
1313 ;;
1314 x86_64-*linux*)
1315 LD="${LD-ld} -m elf_x86_64"
1316 ;;
1317 ppc*-*linux*|powerpc*-*linux*)
1318 LD="${LD-ld} -m elf64ppc"
1319 ;;
1320 s390*-*linux*|s390*-*tpf*)
1321 LD="${LD-ld} -m elf64_s390"
1322 ;;
1323 sparc*-*linux*)
1324 LD="${LD-ld} -m elf64_sparc"
1325 ;;
1326 esac
1327 ;;
1328 esac
1329 fi
1330 rm -rf conftest*
1331 ;;
1332
1333 *-*-sco3.2v5*)
1334 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1335 SAVE_CFLAGS="$CFLAGS"
1336 CFLAGS="$CFLAGS -belf"
1337 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1338 [AC_LANG_PUSH(C)
1339 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1340 AC_LANG_POP])
1341 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1342 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1343 CFLAGS="$SAVE_CFLAGS"
1344 fi
1345 ;;
1346 sparc*-*solaris*)
1347 # Find out which ABI we are using.
1348 echo 'int i;' > conftest.$ac_ext
1349 if AC_TRY_EVAL(ac_compile); then
1350 case `/usr/bin/file conftest.o` in
1351 *64-bit*)
1352 case $lt_cv_prog_gnu_ld in
1353 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1354 *)
1355 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1356 LD="${LD-ld} -64"
1357 fi
1358 ;;
1359 esac
1360 ;;
1361 esac
1362 fi
1363 rm -rf conftest*
1364 ;;
1365 esac
1366
1367 need_locks="$enable_libtool_lock"
1368 ])# _LT_ENABLE_LOCK
1369
1370
1371 # _LT_CMD_OLD_ARCHIVE
504
505 # We need to process the po/ directory.
506 POSUB=po
507
508 AC_OUTPUT_COMMANDS(
509 [case "$CONFIG_FILES" in *po/Makefile.in*)
510 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
511 esac])
512
513 dnl These rules are solely for the distribution goal. While doing this
514 dnl we only have to keep exactly one list of the available catalogs
515 dnl in configure.ac.
516 for lang in $ALL_LINGUAS; do
517 GMOFILES="$GMOFILES $lang.gmo"
518 POFILES="$POFILES $lang.po"
519 done
520
521 dnl Make all variables we use known to autoconf.
522 AC_SUBST(CATALOGS)
523 AC_SUBST(CATOBJEXT)
524 AC_SUBST(DATADIRNAME)
525 AC_SUBST(GMOFILES)
526 AC_SUBST(INSTOBJEXT)
527 AC_SUBST(INTLLIBS)
528 AC_SUBST(PO_IN_DATADIR_TRUE)
529 AC_SUBST(PO_IN_DATADIR_FALSE)
530 AC_SUBST(POFILES)
531 AC_SUBST(POSUB)
532 ])
533
534 # AM_GLIB_GNU_GETTEXT
1372535 # -------------------
1373 m4_defun([_LT_CMD_OLD_ARCHIVE],
1374 [AC_CHECK_TOOL(AR, ar, false)
1375 test -z "$AR" && AR=ar
1376 test -z "$AR_FLAGS" && AR_FLAGS=cru
1377 _LT_DECL([], [AR], [1], [The archiver])
1378 _LT_DECL([], [AR_FLAGS], [1])
1379
1380 AC_CHECK_TOOL(STRIP, strip, :)
1381 test -z "$STRIP" && STRIP=:
1382 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1383
1384 AC_CHECK_TOOL(RANLIB, ranlib, :)
1385 test -z "$RANLIB" && RANLIB=:
1386 _LT_DECL([], [RANLIB], [1],
1387 [Commands used to install an old-style archive])
1388
1389 # Determine commands to create old-style static archives.
1390 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1391 old_postinstall_cmds='chmod 644 $oldlib'
1392 old_postuninstall_cmds=
1393
1394 if test -n "$RANLIB"; then
1395 case $host_os in
1396 openbsd*)
1397 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1398 ;;
1399 *)
1400 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1401 ;;
1402 esac
1403 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1404 fi
1405 _LT_DECL([], [old_postinstall_cmds], [2])
1406 _LT_DECL([], [old_postuninstall_cmds], [2])
1407 _LT_TAGDECL([], [old_archive_cmds], [2],
1408 [Commands used to build an old-style archive])
1409 ])# _LT_CMD_OLD_ARCHIVE
1410
1411
1412 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1413 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1414 # ----------------------------------------------------------------
1415 # Check whether the given compiler option works
1416 AC_DEFUN([_LT_COMPILER_OPTION],
1417 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1418 m4_require([_LT_DECL_SED])dnl
1419 AC_CACHE_CHECK([$1], [$2],
1420 [$2=no
1421 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1422 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1423 lt_compiler_flag="$3"
1424 # Insert the option either (1) after the last *FLAGS variable, or
1425 # (2) before a word containing "conftest.", or (3) at the end.
1426 # Note that $ac_compile itself does not contain backslashes and begins
1427 # with a dollar sign (not a hyphen), so the echo should work correctly.
1428 # The option is referenced via a variable to avoid confusing sed.
1429 lt_compile=`echo "$ac_compile" | $SED \
1430 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1431 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1432 -e 's:$: $lt_compiler_flag:'`
1433 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1434 (eval "$lt_compile" 2>conftest.err)
1435 ac_status=$?
1436 cat conftest.err >&AS_MESSAGE_LOG_FD
1437 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1438 if (exit $ac_status) && test -s "$ac_outfile"; then
1439 # The compiler can only warn and ignore the option if not recognized
1440 # So say no if there are warnings other than the usual output.
1441 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1442 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1443 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1444 $2=yes
536 # Do checks necessary for use of gettext. If a suitable implementation
537 # of gettext is found in either in libintl or in the C library,
538 # it will set INTLLIBS to the libraries needed for use of gettext
539 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
540 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
541 # on various variables needed by the Makefile.in.in installed by
542 # glib-gettextize.
543 dnl
544 glib_DEFUN([GLIB_GNU_GETTEXT],
545 [AC_REQUIRE([AC_PROG_CC])dnl
546 AC_REQUIRE([AC_HEADER_STDC])dnl
547
548 GLIB_LC_MESSAGES
549 GLIB_WITH_NLS
550
551 if test "$gt_cv_have_gettext" = "yes"; then
552 if test "x$ALL_LINGUAS" = "x"; then
553 LINGUAS=
554 else
555 AC_MSG_CHECKING(for catalogs to be installed)
556 NEW_LINGUAS=
557 for presentlang in $ALL_LINGUAS; do
558 useit=no
559 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
560 desiredlanguages="$LINGUAS"
561 else
562 desiredlanguages="$ALL_LINGUAS"
563 fi
564 for desiredlang in $desiredlanguages; do
565 # Use the presentlang catalog if desiredlang is
566 # a. equal to presentlang, or
567 # b. a variant of presentlang (because in this case,
568 # presentlang can be used as a fallback for messages
569 # which are not translated in the desiredlang catalog).
570 case "$desiredlang" in
571 "$presentlang"*) useit=yes;;
572 esac
573 done
574 if test $useit = yes; then
575 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
576 fi
577 done
578 LINGUAS=$NEW_LINGUAS
579 AC_MSG_RESULT($LINGUAS)
580 fi
581
582 dnl Construct list of names of catalog files to be constructed.
583 if test -n "$LINGUAS"; then
584 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1445585 fi
1446586 fi
1447 $RM conftest*
587
588 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
589 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
590 dnl Try to locate is.
591 MKINSTALLDIRS=
592 if test -n "$ac_aux_dir"; then
593 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
594 fi
595 if test -z "$MKINSTALLDIRS"; then
596 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
597 fi
598 AC_SUBST(MKINSTALLDIRS)
599
600 dnl Generate list of files to be processed by xgettext which will
601 dnl be included in po/Makefile.
602 test -d po || mkdir po
603 if test "x$srcdir" != "x."; then
604 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
605 posrcprefix="$srcdir/"
606 else
607 posrcprefix="../$srcdir/"
608 fi
609 else
610 posrcprefix="../"
611 fi
612 rm -f po/POTFILES
613 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
614 < $srcdir/po/POTFILES.in > po/POTFILES
615 ])
616
617 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
618 # -------------------------------
619 # Define VARIABLE to the location where catalog files will
620 # be installed by po/Makefile.
621 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
622 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
623 glib_save_prefix="$prefix"
624 glib_save_exec_prefix="$exec_prefix"
625 glib_save_datarootdir="$datarootdir"
626 test "x$prefix" = xNONE && prefix=$ac_default_prefix
627 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
628 datarootdir=`eval echo "${datarootdir}"`
629 if test "x$CATOBJEXT" = "x.mo" ; then
630 localedir=`eval echo "${libdir}/locale"`
631 else
632 localedir=`eval echo "${datadir}/locale"`
633 fi
634 prefix="$glib_save_prefix"
635 exec_prefix="$glib_save_exec_prefix"
636 datarootdir="$glib_save_datarootdir"
637 AC_DEFINE_UNQUOTED($1, "$localedir",
638 [Define the location where the catalogs will be installed])
1448639 ])
1449640
1450 if test x"[$]$2" = xyes; then
1451 m4_if([$5], , :, [$5])
1452 else
1453 m4_if([$6], , :, [$6])
1454 fi
1455 ])# _LT_COMPILER_OPTION
1456
1457 # Old name:
1458 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1459 dnl aclocal-1.4 backwards compatibility:
1460 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1461
1462
1463 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1464 # [ACTION-SUCCESS], [ACTION-FAILURE])
1465 # ----------------------------------------------------
1466 # Check whether the given linker option works
1467 AC_DEFUN([_LT_LINKER_OPTION],
1468 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1469 m4_require([_LT_DECL_SED])dnl
1470 AC_CACHE_CHECK([$1], [$2],
1471 [$2=no
1472 save_LDFLAGS="$LDFLAGS"
1473 LDFLAGS="$LDFLAGS $3"
1474 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1475 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1476 # The linker can only warn and ignore the option if not recognized
1477 # So say no if there are warnings
1478 if test -s conftest.err; then
1479 # Append any errors to the config.log.
1480 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1481 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1482 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1483 if diff conftest.exp conftest.er2 >/dev/null; then
1484 $2=yes
1485 fi
1486 else
1487 $2=yes
1488 fi
1489 fi
1490 $RM -r conftest*
1491 LDFLAGS="$save_LDFLAGS"
1492 ])
1493
1494 if test x"[$]$2" = xyes; then
1495 m4_if([$4], , :, [$4])
1496 else
1497 m4_if([$5], , :, [$5])
1498 fi
1499 ])# _LT_LINKER_OPTION
1500
1501 # Old name:
1502 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1503 dnl aclocal-1.4 backwards compatibility:
1504 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1505
1506
1507 # LT_CMD_MAX_LEN
1508 #---------------
1509 AC_DEFUN([LT_CMD_MAX_LEN],
1510 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1511 # find the maximum length of command line arguments
1512 AC_MSG_CHECKING([the maximum length of command line arguments])
1513 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1514 i=0
1515 teststring="ABCD"
1516
1517 case $build_os in
1518 msdosdjgpp*)
1519 # On DJGPP, this test can blow up pretty badly due to problems in libc
1520 # (any single argument exceeding 2000 bytes causes a buffer overrun
1521 # during glob expansion). Even if it were fixed, the result of this
1522 # check would be larger than it should be.
1523 lt_cv_sys_max_cmd_len=12288; # 12K is about right
641 dnl
642 dnl Now the definitions that aclocal will find
643 dnl
644 ifdef(glib_configure_ac,[],[
645 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
646 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
647 ])dnl
648
649 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
650 #
651 # Create a temporary file with TEST-FILE as its contents and pass the
652 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
653 # 0 and perform ACTION-IF-FAIL for any other exit status.
654 AC_DEFUN([GLIB_RUN_PROG],
655 [cat >conftest.foo <<_ACEOF
656 $2
657 _ACEOF
658 if AC_RUN_LOG([$1 conftest.foo]); then
659 m4_ifval([$3], [$3], [:])
660 m4_ifvaln([$4], [else $4])dnl
661 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
662 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
663 fi])
664
665
666
667 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
668 # serial 40 IT_PROG_INTLTOOL
669 AC_DEFUN([IT_PROG_INTLTOOL], [
670 AC_PREREQ([2.50])dnl
671 AC_REQUIRE([AM_NLS])dnl
672
673 case "$am__api_version" in
674 1.[01234])
675 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1524676 ;;
1525
1526 gnu*)
1527 # Under GNU Hurd, this test is not required because there is
1528 # no limit to the length of command line arguments.
1529 # Libtool will interpret -1 as no limit whatsoever
1530 lt_cv_sys_max_cmd_len=-1;
1531 ;;
1532
1533 cygwin* | mingw* | cegcc*)
1534 # On Win9x/ME, this test blows up -- it succeeds, but takes
1535 # about 5 minutes as the teststring grows exponentially.
1536 # Worse, since 9x/ME are not pre-emptively multitasking,
1537 # you end up with a "frozen" computer, even though with patience
1538 # the test eventually succeeds (with a max line length of 256k).
1539 # Instead, let's just punt: use the minimum linelength reported by
1540 # all of the supported platforms: 8192 (on NT/2K/XP).
1541 lt_cv_sys_max_cmd_len=8192;
1542 ;;
1543
1544 amigaos*)
1545 # On AmigaOS with pdksh, this test takes hours, literally.
1546 # So we just punt and use a minimum line length of 8192.
1547 lt_cv_sys_max_cmd_len=8192;
1548 ;;
1549
1550 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1551 # This has been around since 386BSD, at least. Likely further.
1552 if test -x /sbin/sysctl; then
1553 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1554 elif test -x /usr/sbin/sysctl; then
1555 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1556 else
1557 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1558 fi
1559 # And add a safety zone
1560 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1561 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1562 ;;
1563
1564 interix*)
1565 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1566 lt_cv_sys_max_cmd_len=196608
1567 ;;
1568
1569 osf*)
1570 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1571 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1572 # nice to cause kernel panics so lets avoid the loop below.
1573 # First set a reasonable default.
1574 lt_cv_sys_max_cmd_len=16384
1575 #
1576 if test -x /sbin/sysconfig; then
1577 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1578 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1579 esac
1580 fi
1581 ;;
1582 sco3.2v5*)
1583 lt_cv_sys_max_cmd_len=102400
1584 ;;
1585 sysv5* | sco5v6* | sysv4.2uw2*)
1586 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1587 if test -n "$kargmax"; then
1588 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1589 else
1590 lt_cv_sys_max_cmd_len=32768
1591 fi
1592 ;;
1593 *)
1594 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1595 if test -n "$lt_cv_sys_max_cmd_len"; then
1596 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1597 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1598 else
1599 # Make teststring a little bigger before we do anything with it.
1600 # a 1K string should be a reasonable start.
1601 for i in 1 2 3 4 5 6 7 8 ; do
1602 teststring=$teststring$teststring
1603 done
1604 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1605 # If test is not a shell built-in, we'll probably end up computing a
1606 # maximum length that is only half of the actual maximum length, but
1607 # we can't tell.
1608 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1609 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1610 test $i != 17 # 1/2 MB should be enough
1611 do
1612 i=`expr $i + 1`
1613 teststring=$teststring$teststring
1614 done
1615 # Only check the string length outside the loop.
1616 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1617 teststring=
1618 # Add a significant safety factor because C++ compilers can tack on
1619 # massive amounts of additional arguments before passing them to the
1620 # linker. It appears as though 1/2 is a usable value.
1621 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1622 fi
1623 ;;
1624 esac
1625 ])
1626 if test -n $lt_cv_sys_max_cmd_len ; then
1627 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1628 else
1629 AC_MSG_RESULT(none)
1630 fi
1631 max_cmd_len=$lt_cv_sys_max_cmd_len
1632 _LT_DECL([], [max_cmd_len], [0],
1633 [What is the maximum length of a command?])
1634 ])# LT_CMD_MAX_LEN
1635
1636 # Old name:
1637 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1638 dnl aclocal-1.4 backwards compatibility:
1639 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1640
1641
1642 # _LT_HEADER_DLFCN
1643 # ----------------
1644 m4_defun([_LT_HEADER_DLFCN],
1645 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1646 ])# _LT_HEADER_DLFCN
1647
1648
1649 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1650 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1651 # ----------------------------------------------------------------
1652 m4_defun([_LT_TRY_DLOPEN_SELF],
1653 [m4_require([_LT_HEADER_DLFCN])dnl
1654 if test "$cross_compiling" = yes; then :
1655 [$4]
1656 else
1657 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1658 lt_status=$lt_dlunknown
1659 cat > conftest.$ac_ext <<_LT_EOF
1660 [#line __oline__ "configure"
1661 #include "confdefs.h"
1662
1663 #if HAVE_DLFCN_H
1664 #include <dlfcn.h>
1665 #endif
1666
1667 #include <stdio.h>
1668
1669 #ifdef RTLD_GLOBAL
1670 # define LT_DLGLOBAL RTLD_GLOBAL
1671 #else
1672 # ifdef DL_GLOBAL
1673 # define LT_DLGLOBAL DL_GLOBAL
1674 # else
1675 # define LT_DLGLOBAL 0
1676 # endif
1677 #endif
1678
1679 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1680 find out it does not work in some platform. */
1681 #ifndef LT_DLLAZY_OR_NOW
1682 # ifdef RTLD_LAZY
1683 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1684 # else
1685 # ifdef DL_LAZY
1686 # define LT_DLLAZY_OR_NOW DL_LAZY
1687 # else
1688 # ifdef RTLD_NOW
1689 # define LT_DLLAZY_OR_NOW RTLD_NOW
1690 # else
1691 # ifdef DL_NOW
1692 # define LT_DLLAZY_OR_NOW DL_NOW
1693 # else
1694 # define LT_DLLAZY_OR_NOW 0
1695 # endif
1696 # endif
1697 # endif
1698 # endif
1699 #endif
1700
1701 void fnord() { int i=42;}
1702 int main ()
1703 {
1704 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1705 int status = $lt_dlunknown;
1706
1707 if (self)
1708 {
1709 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1710 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1711 /* dlclose (self); */
1712 }
1713 else
1714 puts (dlerror ());
1715
1716 return status;
1717 }]
1718 _LT_EOF
1719 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1720 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1721 lt_status=$?
1722 case x$lt_status in
1723 x$lt_dlno_uscore) $1 ;;
1724 x$lt_dlneed_uscore) $2 ;;
1725 x$lt_dlunknown|x*) $3 ;;
1726 esac
1727 else :
1728 # compilation failed
1729 $3
1730 fi
1731 fi
1732 rm -fr conftest*
1733 ])# _LT_TRY_DLOPEN_SELF
1734
1735
1736 # LT_SYS_DLOPEN_SELF
1737 # ------------------
1738 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1739 [m4_require([_LT_HEADER_DLFCN])dnl
1740 if test "x$enable_dlopen" != xyes; then
1741 enable_dlopen=unknown
1742 enable_dlopen_self=unknown
1743 enable_dlopen_self_static=unknown
1744 else
1745 lt_cv_dlopen=no
1746 lt_cv_dlopen_libs=
1747
1748 case $host_os in
1749 beos*)
1750 lt_cv_dlopen="load_add_on"
1751 lt_cv_dlopen_libs=
1752 lt_cv_dlopen_self=yes
1753 ;;
1754
1755 mingw* | pw32* | cegcc*)
1756 lt_cv_dlopen="LoadLibrary"
1757 lt_cv_dlopen_libs=
1758 ;;
1759
1760 cygwin*)
1761 lt_cv_dlopen="dlopen"
1762 lt_cv_dlopen_libs=
1763 ;;
1764
1765 darwin*)
1766 # if libdl is installed we need to link against it
1767 AC_CHECK_LIB([dl], [dlopen],
1768 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1769 lt_cv_dlopen="dyld"
1770 lt_cv_dlopen_libs=
1771 lt_cv_dlopen_self=yes
1772 ])
1773 ;;
1774
1775 *)
1776 AC_CHECK_FUNC([shl_load],
1777 [lt_cv_dlopen="shl_load"],
1778 [AC_CHECK_LIB([dld], [shl_load],
1779 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1780 [AC_CHECK_FUNC([dlopen],
1781 [lt_cv_dlopen="dlopen"],
1782 [AC_CHECK_LIB([dl], [dlopen],
1783 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1784 [AC_CHECK_LIB([svld], [dlopen],
1785 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1786 [AC_CHECK_LIB([dld], [dld_link],
1787 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1788 ])
1789 ])
1790 ])
1791 ])
1792 ])
1793 ;;
1794 esac
1795
1796 if test "x$lt_cv_dlopen" != xno; then
1797 enable_dlopen=yes
1798 else
1799 enable_dlopen=no
1800 fi
1801
1802 case $lt_cv_dlopen in
1803 dlopen)
1804 save_CPPFLAGS="$CPPFLAGS"
1805 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1806
1807 save_LDFLAGS="$LDFLAGS"
1808 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1809
1810 save_LIBS="$LIBS"
1811 LIBS="$lt_cv_dlopen_libs $LIBS"
1812
1813 AC_CACHE_CHECK([whether a program can dlopen itself],
1814 lt_cv_dlopen_self, [dnl
1815 _LT_TRY_DLOPEN_SELF(
1816 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1817 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1818 ])
1819
1820 if test "x$lt_cv_dlopen_self" = xyes; then
1821 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1822 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1823 lt_cv_dlopen_self_static, [dnl
1824 _LT_TRY_DLOPEN_SELF(
1825 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1826 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1827 ])
1828 fi
1829
1830 CPPFLAGS="$save_CPPFLAGS"
1831 LDFLAGS="$save_LDFLAGS"
1832 LIBS="$save_LIBS"
1833 ;;
1834 esac
1835
1836 case $lt_cv_dlopen_self in
1837 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1838 *) enable_dlopen_self=unknown ;;
1839 esac
1840
1841 case $lt_cv_dlopen_self_static in
1842 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1843 *) enable_dlopen_self_static=unknown ;;
1844 esac
1845 fi
1846 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1847 [Whether dlopen is supported])
1848 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1849 [Whether dlopen of programs is supported])
1850 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1851 [Whether dlopen of statically linked programs is supported])
1852 ])# LT_SYS_DLOPEN_SELF
1853
1854 # Old name:
1855 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1856 dnl aclocal-1.4 backwards compatibility:
1857 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1858
1859
1860 # _LT_COMPILER_C_O([TAGNAME])
1861 # ---------------------------
1862 # Check to see if options -c and -o are simultaneously supported by compiler.
1863 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1864 m4_defun([_LT_COMPILER_C_O],
1865 [m4_require([_LT_DECL_SED])dnl
1866 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1867 m4_require([_LT_TAG_COMPILER])dnl
1868 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1869 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1870 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1871 $RM -r conftest 2>/dev/null
1872 mkdir conftest
1873 cd conftest
1874 mkdir out
1875 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1876
1877 lt_compiler_flag="-o out/conftest2.$ac_objext"
1878 # Insert the option either (1) after the last *FLAGS variable, or
1879 # (2) before a word containing "conftest.", or (3) at the end.
1880 # Note that $ac_compile itself does not contain backslashes and begins
1881 # with a dollar sign (not a hyphen), so the echo should work correctly.
1882 lt_compile=`echo "$ac_compile" | $SED \
1883 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1884 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1885 -e 's:$: $lt_compiler_flag:'`
1886 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1887 (eval "$lt_compile" 2>out/conftest.err)
1888 ac_status=$?
1889 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1890 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1891 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1892 then
1893 # The compiler can only warn and ignore the option if not recognized
1894 # So say no if there are warnings
1895 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1896 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1897 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1898 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1899 fi
1900 fi
1901 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1902 $RM conftest*
1903 # SGI C++ compiler will create directory out/ii_files/ for
1904 # template instantiation
1905 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1906 $RM out/* && rmdir out
1907 cd ..
1908 $RM -r conftest
1909 $RM conftest*
1910 ])
1911 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1912 [Does compiler simultaneously support -c and -o options?])
1913 ])# _LT_COMPILER_C_O
1914
1915
1916 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1917 # ----------------------------------
1918 # Check to see if we can do hard links to lock some files if needed
1919 m4_defun([_LT_COMPILER_FILE_LOCKS],
1920 [m4_require([_LT_ENABLE_LOCK])dnl
1921 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1922 _LT_COMPILER_C_O([$1])
1923
1924 hard_links="nottested"
1925 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1926 # do not overwrite the value of need_locks provided by the user
1927 AC_MSG_CHECKING([if we can lock with hard links])
1928 hard_links=yes
1929 $RM conftest*
1930 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1931 touch conftest.a
1932 ln conftest.a conftest.b 2>&5 || hard_links=no
1933 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1934 AC_MSG_RESULT([$hard_links])
1935 if test "$hard_links" = no; then
1936 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1937 need_locks=warn
1938 fi
1939 else
1940 need_locks=no
1941 fi
1942 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1943 ])# _LT_COMPILER_FILE_LOCKS
1944
1945
1946 # _LT_CHECK_OBJDIR
1947 # ----------------
1948 m4_defun([_LT_CHECK_OBJDIR],
1949 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1950 [rm -f .libs 2>/dev/null
1951 mkdir .libs 2>/dev/null
1952 if test -d .libs; then
1953 lt_cv_objdir=.libs
1954 else
1955 # MS-DOS does not allow filenames that begin with a dot.
1956 lt_cv_objdir=_libs
1957 fi
1958 rmdir .libs 2>/dev/null])
1959 objdir=$lt_cv_objdir
1960 _LT_DECL([], [objdir], [0],
1961 [The name of the directory that contains temporary libtool files])dnl
1962 m4_pattern_allow([LT_OBJDIR])dnl
1963 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1964 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1965 ])# _LT_CHECK_OBJDIR
1966
1967
1968 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1969 # --------------------------------------
1970 # Check hardcoding attributes.
1971 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1972 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1973 _LT_TAGVAR(hardcode_action, $1)=
1974 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1975 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1976 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1977
1978 # We can hardcode non-existent directories.
1979 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1980 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1981 # have to relink, otherwise we might link with an installed library
1982 # when we should be linking with a yet-to-be-installed one
1983 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1984 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1985 # Linking always hardcodes the temporary library directory.
1986 _LT_TAGVAR(hardcode_action, $1)=relink
1987 else
1988 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1989 _LT_TAGVAR(hardcode_action, $1)=immediate
1990 fi
1991 else
1992 # We cannot hardcode anything, or else we can only hardcode existing
1993 # directories.
1994 _LT_TAGVAR(hardcode_action, $1)=unsupported
1995 fi
1996 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1997
1998 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1999 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2000 # Fast installation is not supported
2001 enable_fast_install=no
2002 elif test "$shlibpath_overrides_runpath" = yes ||
2003 test "$enable_shared" = no; then
2004 # Fast installation is not necessary
2005 enable_fast_install=needless
2006 fi
2007 _LT_TAGDECL([], [hardcode_action], [0],
2008 [How to hardcode a shared library path into an executable])
2009 ])# _LT_LINKER_HARDCODE_LIBPATH
2010
2011
2012 # _LT_CMD_STRIPLIB
2013 # ----------------
2014 m4_defun([_LT_CMD_STRIPLIB],
2015 [m4_require([_LT_DECL_EGREP])
2016 striplib=
2017 old_striplib=
2018 AC_MSG_CHECKING([whether stripping libraries is possible])
2019 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2020 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2021 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2022 AC_MSG_RESULT([yes])
2023 else
2024 # FIXME - insert some real tests, host_os isn't really good enough
2025 case $host_os in
2026 darwin*)
2027 if test -n "$STRIP" ; then
2028 striplib="$STRIP -x"
2029 old_striplib="$STRIP -S"
2030 AC_MSG_RESULT([yes])
2031 else
2032 AC_MSG_RESULT([no])
2033 fi
2034 ;;
2035 *)
2036 AC_MSG_RESULT([no])
2037 ;;
2038 esac
2039 fi
2040 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2041 _LT_DECL([], [striplib], [1])
2042 ])# _LT_CMD_STRIPLIB
2043
2044
2045 # _LT_SYS_DYNAMIC_LINKER([TAG])
2046 # -----------------------------
2047 # PORTME Fill in your ld.so characteristics
2048 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2049 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2050 m4_require([_LT_DECL_EGREP])dnl
2051 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2052 m4_require([_LT_DECL_OBJDUMP])dnl
2053 m4_require([_LT_DECL_SED])dnl
2054 AC_MSG_CHECKING([dynamic linker characteristics])
2055 m4_if([$1],
2056 [], [
2057 if test "$GCC" = yes; then
2058 case $host_os in
2059 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2060 *) lt_awk_arg="/^libraries:/" ;;
2061 esac
2062 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2063 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2064 # if the path contains ";" then we assume it to be the separator
2065 # otherwise default to the standard path separator (i.e. ":") - it is
2066 # assumed that no part of a normal pathname contains ";" but that should
2067 # okay in the real world where ";" in dirpaths is itself problematic.
2068 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2069 else
2070 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2071 fi
2072 # Ok, now we have the path, separated by spaces, we can step through it
2073 # and add multilib dir if necessary.
2074 lt_tmp_lt_search_path_spec=
2075 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2076 for lt_sys_path in $lt_search_path_spec; do
2077 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2078 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2079 else
2080 test -d "$lt_sys_path" && \
2081 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2082 fi
2083 done
2084 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2085 BEGIN {RS=" "; FS="/|\n";} {
2086 lt_foo="";
2087 lt_count=0;
2088 for (lt_i = NF; lt_i > 0; lt_i--) {
2089 if ($lt_i != "" && $lt_i != ".") {
2090 if ($lt_i == "..") {
2091 lt_count++;
2092 } else {
2093 if (lt_count == 0) {
2094 lt_foo="/" $lt_i lt_foo;
2095 } else {
2096 lt_count--;
2097 }
2098 }
2099 }
2100 }
2101 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2102 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2103 }'`
2104 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2105 else
2106 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2107 fi])
2108 library_names_spec=
2109 libname_spec='lib$name'
2110 soname_spec=
2111 shrext_cmds=".so"
2112 postinstall_cmds=
2113 postuninstall_cmds=
2114 finish_cmds=
2115 finish_eval=
2116 shlibpath_var=
2117 shlibpath_overrides_runpath=unknown
2118 version_type=none
2119 dynamic_linker="$host_os ld.so"
2120 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2121 need_lib_prefix=unknown
2122 hardcode_into_libs=no
2123
2124 # when you set need_version to no, make sure it does not cause -set_version
2125 # flags to be left without arguments
2126 need_version=unknown
2127
2128 case $host_os in
2129 aix3*)
2130 version_type=linux
2131 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2132 shlibpath_var=LIBPATH
2133
2134 # AIX 3 has no versioning support, so we append a major version to the name.
2135 soname_spec='${libname}${release}${shared_ext}$major'
2136 ;;
2137
2138 aix[[4-9]]*)
2139 version_type=linux
2140 need_lib_prefix=no
2141 need_version=no
2142 hardcode_into_libs=yes
2143 if test "$host_cpu" = ia64; then
2144 # AIX 5 supports IA64
2145 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2146 shlibpath_var=LD_LIBRARY_PATH
2147 else
2148 # With GCC up to 2.95.x, collect2 would create an import file
2149 # for dependence libraries. The import file would start with
2150 # the line `#! .'. This would cause the generated library to
2151 # depend on `.', always an invalid library. This was fixed in
2152 # development snapshots of GCC prior to 3.0.
2153 case $host_os in
2154 aix4 | aix4.[[01]] | aix4.[[01]].*)
2155 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2156 echo ' yes '
2157 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2158 :
2159 else
2160 can_build_shared=no
2161 fi
2162 ;;
2163 esac
2164 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2165 # soname into executable. Probably we can add versioning support to
2166 # collect2, so additional links can be useful in future.
2167 if test "$aix_use_runtimelinking" = yes; then
2168 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2169 # instead of lib<name>.a to let people know that these are not
2170 # typical AIX shared libraries.
2171 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2172 else
2173 # We preserve .a as extension for shared libraries through AIX4.2
2174 # and later when we are not doing run time linking.
2175 library_names_spec='${libname}${release}.a $libname.a'
2176 soname_spec='${libname}${release}${shared_ext}$major'
2177 fi
2178 shlibpath_var=LIBPATH
2179 fi
2180 ;;
2181
2182 amigaos*)
2183 case $host_cpu in
2184 powerpc)
2185 # Since July 2007 AmigaOS4 officially supports .so libraries.
2186 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2187 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2188 ;;
2189 m68k)
2190 library_names_spec='$libname.ixlibrary $libname.a'
2191 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2192 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'
2193 ;;
2194 esac
2195 ;;
2196
2197 beos*)
2198 library_names_spec='${libname}${shared_ext}'
2199 dynamic_linker="$host_os ld.so"
2200 shlibpath_var=LIBRARY_PATH
2201 ;;
2202
2203 bsdi[[45]]*)
2204 version_type=linux
2205 need_version=no
2206 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2207 soname_spec='${libname}${release}${shared_ext}$major'
2208 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2209 shlibpath_var=LD_LIBRARY_PATH
2210 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2211 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2212 # the default ld.so.conf also contains /usr/contrib/lib and
2213 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2214 # libtool to hard-code these into programs
2215 ;;
2216
2217 cygwin* | mingw* | pw32* | cegcc*)
2218 version_type=windows
2219 shrext_cmds=".dll"
2220 need_version=no
2221 need_lib_prefix=no
2222
2223 case $GCC,$host_os in
2224 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2225 library_names_spec='$libname.dll.a'
2226 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2227 postinstall_cmds='base_file=`basename \${file}`~
2228 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2229 dldir=$destdir/`dirname \$dlpath`~
2230 test -d \$dldir || mkdir -p \$dldir~
2231 $install_prog $dir/$dlname \$dldir/$dlname~
2232 chmod a+x \$dldir/$dlname~
2233 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2234 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2235 fi'
2236 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2237 dlpath=$dir/\$dldll~
2238 $RM \$dlpath'
2239 shlibpath_overrides_runpath=yes
2240
2241 case $host_os in
2242 cygwin*)
2243 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2244 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2245 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2246 ;;
2247 mingw* | cegcc*)
2248 # MinGW DLLs use traditional 'lib' prefix
2249 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2250 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2251 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2252 # It is most probably a Windows format PATH printed by
2253 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2254 # path with ; separators, and with drive letters. We can handle the
2255 # drive letters (cygwin fileutils understands them), so leave them,
2256 # especially as we might pass files found there to a mingw objdump,
2257 # which wouldn't understand a cygwinified path. Ahh.
2258 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2259 else
2260 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2261 fi
2262 ;;
2263 pw32*)
2264 # pw32 DLLs use 'pw' prefix rather than 'lib'
2265 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2266 ;;
2267 esac
2268 ;;
2269
2270 *)
2271 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2272 ;;
2273 esac
2274 dynamic_linker='Win32 ld.exe'
2275 # FIXME: first we should search . and the directory the executable is in
2276 shlibpath_var=PATH
2277 ;;
2278
2279 darwin* | rhapsody*)
2280 dynamic_linker="$host_os dyld"
2281 version_type=darwin
2282 need_lib_prefix=no
2283 need_version=no
2284 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2285 soname_spec='${libname}${release}${major}$shared_ext'
2286 shlibpath_overrides_runpath=yes
2287 shlibpath_var=DYLD_LIBRARY_PATH
2288 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2289 m4_if([$1], [],[
2290 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2291 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2292 ;;
2293
2294 dgux*)
2295 version_type=linux
2296 need_lib_prefix=no
2297 need_version=no
2298 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2299 soname_spec='${libname}${release}${shared_ext}$major'
2300 shlibpath_var=LD_LIBRARY_PATH
2301 ;;
2302
2303 freebsd1*)
2304 dynamic_linker=no
2305 ;;
2306
2307 freebsd* | dragonfly*)
2308 # DragonFly does not have aout. When/if they implement a new
2309 # versioning mechanism, adjust this.
2310 if test -x /usr/bin/objformat; then
2311 objformat=`/usr/bin/objformat`
2312 else
2313 case $host_os in
2314 freebsd[[123]]*) objformat=aout ;;
2315 *) objformat=elf ;;
2316 esac
2317 fi
2318 version_type=freebsd-$objformat
2319 case $version_type in
2320 freebsd-elf*)
2321 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2322 need_version=no
2323 need_lib_prefix=no
2324 ;;
2325 freebsd-*)
2326 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2327 need_version=yes
2328 ;;
2329 esac
2330 shlibpath_var=LD_LIBRARY_PATH
2331 case $host_os in
2332 freebsd2*)
2333 shlibpath_overrides_runpath=yes
2334 ;;
2335 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2336 shlibpath_overrides_runpath=yes
2337 hardcode_into_libs=yes
2338 ;;
2339 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2340 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2341 shlibpath_overrides_runpath=no
2342 hardcode_into_libs=yes
2343 ;;
2344 *) # from 4.6 on, and DragonFly
2345 shlibpath_overrides_runpath=yes
2346 hardcode_into_libs=yes
2347 ;;
2348 esac
2349 ;;
2350
2351 gnu*)
2352 version_type=linux
2353 need_lib_prefix=no
2354 need_version=no
2355 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2356 soname_spec='${libname}${release}${shared_ext}$major'
2357 shlibpath_var=LD_LIBRARY_PATH
2358 hardcode_into_libs=yes
2359 ;;
2360
2361 hpux9* | hpux10* | hpux11*)
2362 # Give a soname corresponding to the major version so that dld.sl refuses to
2363 # link against other versions.
2364 version_type=sunos
2365 need_lib_prefix=no
2366 need_version=no
2367 case $host_cpu in
2368 ia64*)
2369 shrext_cmds='.so'
2370 hardcode_into_libs=yes
2371 dynamic_linker="$host_os dld.so"
2372 shlibpath_var=LD_LIBRARY_PATH
2373 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2374 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2375 soname_spec='${libname}${release}${shared_ext}$major'
2376 if test "X$HPUX_IA64_MODE" = X32; then
2377 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2378 else
2379 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2380 fi
2381 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2382 ;;
2383 hppa*64*)
2384 shrext_cmds='.sl'
2385 hardcode_into_libs=yes
2386 dynamic_linker="$host_os dld.sl"
2387 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2388 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2389 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2390 soname_spec='${libname}${release}${shared_ext}$major'
2391 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2392 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2393 ;;
2394 *)
2395 shrext_cmds='.sl'
2396 dynamic_linker="$host_os dld.sl"
2397 shlibpath_var=SHLIB_PATH
2398 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2399 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2400 soname_spec='${libname}${release}${shared_ext}$major'
2401 ;;
2402 esac
2403 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2404 postinstall_cmds='chmod 555 $lib'
2405 ;;
2406
2407 interix[[3-9]]*)
2408 version_type=linux
2409 need_lib_prefix=no
2410 need_version=no
2411 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2412 soname_spec='${libname}${release}${shared_ext}$major'
2413 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2414 shlibpath_var=LD_LIBRARY_PATH
2415 shlibpath_overrides_runpath=no
2416 hardcode_into_libs=yes
2417 ;;
2418
2419 irix5* | irix6* | nonstopux*)
2420 case $host_os in
2421 nonstopux*) version_type=nonstopux ;;
2422677 *)
2423 if test "$lt_cv_prog_gnu_ld" = yes; then
2424 version_type=linux
2425 else
2426 version_type=irix
2427 fi ;;
2428 esac
2429 need_lib_prefix=no
2430 need_version=no
2431 soname_spec='${libname}${release}${shared_ext}$major'
2432 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2433 case $host_os in
2434 irix5* | nonstopux*)
2435 libsuff= shlibsuff=
2436 ;;
2437 *)
2438 case $LD in # libtool.m4 will add one of these switches to LD
2439 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2440 libsuff= shlibsuff= libmagic=32-bit;;
2441 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2442 libsuff=32 shlibsuff=N32 libmagic=N32;;
2443 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2444 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2445 *) libsuff= shlibsuff= libmagic=never-match;;
2446 esac
2447 ;;
2448 esac
2449 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2450 shlibpath_overrides_runpath=no
2451 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2452 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2453 hardcode_into_libs=yes
2454 ;;
2455
2456 # No shared lib support for Linux oldld, aout, or coff.
2457 linux*oldld* | linux*aout* | linux*coff*)
2458 dynamic_linker=no
2459 ;;
2460
2461 # This must be Linux ELF.
2462 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2463 version_type=linux
2464 need_lib_prefix=no
2465 need_version=no
2466 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2467 soname_spec='${libname}${release}${shared_ext}$major'
2468 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2469 shlibpath_var=LD_LIBRARY_PATH
2470 shlibpath_overrides_runpath=no
2471 # Some binutils ld are patched to set DT_RUNPATH
2472 save_LDFLAGS=$LDFLAGS
2473 save_libdir=$libdir
2474 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2475 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2476 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2477 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2478 [shlibpath_overrides_runpath=yes])])
2479 LDFLAGS=$save_LDFLAGS
2480 libdir=$save_libdir
2481
2482 # This implies no fast_install, which is unacceptable.
2483 # Some rework will be needed to allow for fast_install
2484 # before this can be enabled.
2485 hardcode_into_libs=yes
2486
2487 # Append ld.so.conf contents to the search path
2488 if test -f /etc/ld.so.conf; then
2489 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2490 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2491 fi
2492
2493 # We used to test for /lib/ld.so.1 and disable shared libraries on
2494 # powerpc, because MkLinux only supported shared libraries with the
2495 # GNU dynamic linker. Since this was broken with cross compilers,
2496 # most powerpc-linux boxes support dynamic linking these days and
2497 # people can always --disable-shared, the test was removed, and we
2498 # assume the GNU/Linux dynamic linker is in use.
2499 dynamic_linker='GNU/Linux ld.so'
2500 ;;
2501
2502 netbsdelf*-gnu)
2503 version_type=linux
2504 need_lib_prefix=no
2505 need_version=no
2506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2507 soname_spec='${libname}${release}${shared_ext}$major'
2508 shlibpath_var=LD_LIBRARY_PATH
2509 shlibpath_overrides_runpath=no
2510 hardcode_into_libs=yes
2511 dynamic_linker='NetBSD ld.elf_so'
2512 ;;
2513
2514 netbsd*)
2515 version_type=sunos
2516 need_lib_prefix=no
2517 need_version=no
2518 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2519 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2520 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2521 dynamic_linker='NetBSD (a.out) ld.so'
2522 else
2523 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2524 soname_spec='${libname}${release}${shared_ext}$major'
2525 dynamic_linker='NetBSD ld.elf_so'
2526 fi
2527 shlibpath_var=LD_LIBRARY_PATH
2528 shlibpath_overrides_runpath=yes
2529 hardcode_into_libs=yes
2530 ;;
2531
2532 newsos6)
2533 version_type=linux
2534 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2535 shlibpath_var=LD_LIBRARY_PATH
2536 shlibpath_overrides_runpath=yes
2537 ;;
2538
2539 *nto* | *qnx*)
2540 version_type=qnx
2541 need_lib_prefix=no
2542 need_version=no
2543 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2544 soname_spec='${libname}${release}${shared_ext}$major'
2545 shlibpath_var=LD_LIBRARY_PATH
2546 shlibpath_overrides_runpath=no
2547 hardcode_into_libs=yes
2548 dynamic_linker='ldqnx.so'
2549 ;;
2550
2551 openbsd*)
2552 version_type=sunos
2553 sys_lib_dlsearch_path_spec="/usr/lib"
2554 need_lib_prefix=no
2555 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2556 case $host_os in
2557 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2558 *) need_version=no ;;
2559 esac
2560 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2561 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2562 shlibpath_var=LD_LIBRARY_PATH
2563 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2564 case $host_os in
2565 openbsd2.[[89]] | openbsd2.[[89]].*)
2566 shlibpath_overrides_runpath=no
2567 ;;
2568 *)
2569 shlibpath_overrides_runpath=yes
2570 ;;
2571 esac
2572 else
2573 shlibpath_overrides_runpath=yes
2574 fi
2575 ;;
2576
2577 os2*)
2578 libname_spec='$name'
2579 shrext_cmds=".dll"
2580 need_lib_prefix=no
2581 library_names_spec='$libname${shared_ext} $libname.a'
2582 dynamic_linker='OS/2 ld.exe'
2583 shlibpath_var=LIBPATH
2584 ;;
2585
2586 osf3* | osf4* | osf5*)
2587 version_type=osf
2588 need_lib_prefix=no
2589 need_version=no
2590 soname_spec='${libname}${release}${shared_ext}$major'
2591 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2592 shlibpath_var=LD_LIBRARY_PATH
2593 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2594 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2595 ;;
2596
2597 rdos*)
2598 dynamic_linker=no
2599 ;;
2600
2601 solaris*)
2602 version_type=linux
2603 need_lib_prefix=no
2604 need_version=no
2605 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2606 soname_spec='${libname}${release}${shared_ext}$major'
2607 shlibpath_var=LD_LIBRARY_PATH
2608 shlibpath_overrides_runpath=yes
2609 hardcode_into_libs=yes
2610 # ldd complains unless libraries are executable
2611 postinstall_cmds='chmod +x $lib'
2612 ;;
2613
2614 sunos4*)
2615 version_type=sunos
2616 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2617 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2618 shlibpath_var=LD_LIBRARY_PATH
2619 shlibpath_overrides_runpath=yes
2620 if test "$with_gnu_ld" = yes; then
2621 need_lib_prefix=no
2622 fi
2623 need_version=yes
2624 ;;
2625
2626 sysv4 | sysv4.3*)
2627 version_type=linux
2628 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2629 soname_spec='${libname}${release}${shared_ext}$major'
2630 shlibpath_var=LD_LIBRARY_PATH
2631 case $host_vendor in
2632 sni)
2633 shlibpath_overrides_runpath=no
2634 need_lib_prefix=no
2635 runpath_var=LD_RUN_PATH
2636 ;;
2637 siemens)
2638 need_lib_prefix=no
2639 ;;
2640 motorola)
2641 need_lib_prefix=no
2642 need_version=no
2643 shlibpath_overrides_runpath=no
2644 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2645 ;;
2646 esac
2647 ;;
2648
2649 sysv4*MP*)
2650 if test -d /usr/nec ;then
2651 version_type=linux
2652 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2653 soname_spec='$libname${shared_ext}.$major'
2654 shlibpath_var=LD_LIBRARY_PATH
2655 fi
2656 ;;
2657
2658 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2659 version_type=freebsd-elf
2660 need_lib_prefix=no
2661 need_version=no
2662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2663 soname_spec='${libname}${release}${shared_ext}$major'
2664 shlibpath_var=LD_LIBRARY_PATH
2665 shlibpath_overrides_runpath=yes
2666 hardcode_into_libs=yes
2667 if test "$with_gnu_ld" = yes; then
2668 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2669 else
2670 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2671 case $host_os in
2672 sco3.2v5*)
2673 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2674 ;;
2675 esac
2676 fi
2677 sys_lib_dlsearch_path_spec='/usr/lib'
2678 ;;
2679
2680 tpf*)
2681 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2682 version_type=linux
2683 need_lib_prefix=no
2684 need_version=no
2685 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2686 shlibpath_var=LD_LIBRARY_PATH
2687 shlibpath_overrides_runpath=no
2688 hardcode_into_libs=yes
2689 ;;
2690
2691 uts4*)
2692 version_type=linux
2693 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2694 soname_spec='${libname}${release}${shared_ext}$major'
2695 shlibpath_var=LD_LIBRARY_PATH
2696 ;;
2697
2698 *)
2699 dynamic_linker=no
2700 ;;
2701 esac
2702 AC_MSG_RESULT([$dynamic_linker])
2703 test "$dynamic_linker" = no && can_build_shared=no
2704
2705 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2706 if test "$GCC" = yes; then
2707 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2708 fi
2709
2710 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2711 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2712 fi
2713 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2714 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2715 fi
2716
2717 _LT_DECL([], [variables_saved_for_relink], [1],
2718 [Variables whose values should be saved in libtool wrapper scripts and
2719 restored at link time])
2720 _LT_DECL([], [need_lib_prefix], [0],
2721 [Do we need the "lib" prefix for modules?])
2722 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2723 _LT_DECL([], [version_type], [0], [Library versioning type])
2724 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2725 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2726 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2727 [Is shlibpath searched before the hard-coded library search path?])
2728 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2729 _LT_DECL([], [library_names_spec], [1],
2730 [[List of archive names. First name is the real one, the rest are links.
2731 The last name is the one that the linker finds with -lNAME]])
2732 _LT_DECL([], [soname_spec], [1],
2733 [[The coded name of the library, if different from the real name]])
2734 _LT_DECL([], [postinstall_cmds], [2],
2735 [Command to use after installation of a shared archive])
2736 _LT_DECL([], [postuninstall_cmds], [2],
2737 [Command to use after uninstallation of a shared archive])
2738 _LT_DECL([], [finish_cmds], [2],
2739 [Commands used to finish a libtool library installation in a directory])
2740 _LT_DECL([], [finish_eval], [1],
2741 [[As "finish_cmds", except a single script fragment to be evaled but
2742 not shown]])
2743 _LT_DECL([], [hardcode_into_libs], [0],
2744 [Whether we should hardcode library paths into libraries])
2745 _LT_DECL([], [sys_lib_search_path_spec], [2],
2746 [Compile-time system search path for libraries])
2747 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2748 [Run-time system search path for libraries])
2749 ])# _LT_SYS_DYNAMIC_LINKER
2750
2751
2752 # _LT_PATH_TOOL_PREFIX(TOOL)
2753 # --------------------------
2754 # find a file program which can recognize shared library
2755 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2756 [m4_require([_LT_DECL_EGREP])dnl
2757 AC_MSG_CHECKING([for $1])
2758 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2759 [case $MAGIC_CMD in
2760 [[\\/*] | ?:[\\/]*])
2761 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2762 ;;
2763 *)
2764 lt_save_MAGIC_CMD="$MAGIC_CMD"
2765 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2766 dnl $ac_dummy forces splitting on constant user-supplied paths.
2767 dnl POSIX.2 word splitting is done only on the output of word expansions,
2768 dnl not every word. This closes a longstanding sh security hole.
2769 ac_dummy="m4_if([$2], , $PATH, [$2])"
2770 for ac_dir in $ac_dummy; do
2771 IFS="$lt_save_ifs"
2772 test -z "$ac_dir" && ac_dir=.
2773 if test -f $ac_dir/$1; then
2774 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2775 if test -n "$file_magic_test_file"; then
2776 case $deplibs_check_method in
2777 "file_magic "*)
2778 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2779 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2780 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2781 $EGREP "$file_magic_regex" > /dev/null; then
2782 :
2783 else
2784 cat <<_LT_EOF 1>&2
2785
2786 *** Warning: the command libtool uses to detect shared libraries,
2787 *** $file_magic_cmd, produces output that libtool cannot recognize.
2788 *** The result is that libtool may fail to recognize shared libraries
2789 *** as such. This will affect the creation of libtool libraries that
2790 *** depend on shared libraries, but programs linked with such libtool
2791 *** libraries will work regardless of this problem. Nevertheless, you
2792 *** may want to report the problem to your system manager and/or to
2793 *** bug-libtool@gnu.org
2794
2795 _LT_EOF
2796 fi ;;
2797 esac
2798 fi
2799 break
2800 fi
2801 done
2802 IFS="$lt_save_ifs"
2803 MAGIC_CMD="$lt_save_MAGIC_CMD"
2804 ;;
2805 esac])
2806 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2807 if test -n "$MAGIC_CMD"; then
2808 AC_MSG_RESULT($MAGIC_CMD)
2809 else
2810 AC_MSG_RESULT(no)
2811 fi
2812 _LT_DECL([], [MAGIC_CMD], [0],
2813 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2814 ])# _LT_PATH_TOOL_PREFIX
2815
2816 # Old name:
2817 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2818 dnl aclocal-1.4 backwards compatibility:
2819 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2820
2821
2822 # _LT_PATH_MAGIC
2823 # --------------
2824 # find a file program which can recognize a shared library
2825 m4_defun([_LT_PATH_MAGIC],
2826 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2827 if test -z "$lt_cv_path_MAGIC_CMD"; then
2828 if test -n "$ac_tool_prefix"; then
2829 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2830 else
2831 MAGIC_CMD=:
2832 fi
2833 fi
2834 ])# _LT_PATH_MAGIC
2835
2836
2837 # LT_PATH_LD
2838 # ----------
2839 # find the pathname to the GNU or non-GNU linker
2840 AC_DEFUN([LT_PATH_LD],
2841 [AC_REQUIRE([AC_PROG_CC])dnl
2842 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2843 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2844 m4_require([_LT_DECL_SED])dnl
2845 m4_require([_LT_DECL_EGREP])dnl
2846
2847 AC_ARG_WITH([gnu-ld],
2848 [AS_HELP_STRING([--with-gnu-ld],
2849 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2850 [test "$withval" = no || with_gnu_ld=yes],
2851 [with_gnu_ld=no])dnl
2852
2853 ac_prog=ld
2854 if test "$GCC" = yes; then
2855 # Check if gcc -print-prog-name=ld gives a path.
2856 AC_MSG_CHECKING([for ld used by $CC])
2857 case $host in
2858 *-*-mingw*)
2859 # gcc leaves a trailing carriage return which upsets mingw
2860 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2861 *)
2862 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2863 esac
2864 case $ac_prog in
2865 # Accept absolute paths.
2866 [[\\/]]* | ?:[[\\/]]*)
2867 re_direlt='/[[^/]][[^/]]*/\.\./'
2868 # Canonicalize the pathname of ld
2869 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2870 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2871 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2872 done
2873 test -z "$LD" && LD="$ac_prog"
2874 ;;
2875 "")
2876 # If it fails, then pretend we aren't using GCC.
2877 ac_prog=ld
2878 ;;
2879 *)
2880 # If it is relative, then search for the first ld in PATH.
2881 with_gnu_ld=unknown
2882 ;;
2883 esac
2884 elif test "$with_gnu_ld" = yes; then
2885 AC_MSG_CHECKING([for GNU ld])
2886 else
2887 AC_MSG_CHECKING([for non-GNU ld])
2888 fi
2889 AC_CACHE_VAL(lt_cv_path_LD,
2890 [if test -z "$LD"; then
2891 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2892 for ac_dir in $PATH; do
2893 IFS="$lt_save_ifs"
2894 test -z "$ac_dir" && ac_dir=.
2895 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2896 lt_cv_path_LD="$ac_dir/$ac_prog"
2897 # Check to see if the program is GNU ld. I'd rather use --version,
2898 # but apparently some variants of GNU ld only accept -v.
2899 # Break only if it was the GNU/non-GNU ld that we prefer.
2900 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2901 *GNU* | *'with BFD'*)
2902 test "$with_gnu_ld" != no && break
2903 ;;
2904 *)
2905 test "$with_gnu_ld" != yes && break
2906 ;;
2907 esac
2908 fi
2909 done
2910 IFS="$lt_save_ifs"
2911 else
2912 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2913 fi])
2914 LD="$lt_cv_path_LD"
2915 if test -n "$LD"; then
2916 AC_MSG_RESULT($LD)
2917 else
2918 AC_MSG_RESULT(no)
2919 fi
2920 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2921 _LT_PATH_LD_GNU
2922 AC_SUBST([LD])
2923
2924 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2925 ])# LT_PATH_LD
2926
2927 # Old names:
2928 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2929 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2930 dnl aclocal-1.4 backwards compatibility:
2931 dnl AC_DEFUN([AM_PROG_LD], [])
2932 dnl AC_DEFUN([AC_PROG_LD], [])
2933
2934
2935 # _LT_PATH_LD_GNU
2936 #- --------------
2937 m4_defun([_LT_PATH_LD_GNU],
2938 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2939 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2940 case `$LD -v 2>&1 </dev/null` in
2941 *GNU* | *'with BFD'*)
2942 lt_cv_prog_gnu_ld=yes
2943 ;;
2944 *)
2945 lt_cv_prog_gnu_ld=no
2946 ;;
2947 esac])
2948 with_gnu_ld=$lt_cv_prog_gnu_ld
2949 ])# _LT_PATH_LD_GNU
2950
2951
2952 # _LT_CMD_RELOAD
2953 # --------------
2954 # find reload flag for linker
2955 # -- PORTME Some linkers may need a different reload flag.
2956 m4_defun([_LT_CMD_RELOAD],
2957 [AC_CACHE_CHECK([for $LD option to reload object files],
2958 lt_cv_ld_reload_flag,
2959 [lt_cv_ld_reload_flag='-r'])
2960 reload_flag=$lt_cv_ld_reload_flag
2961 case $reload_flag in
2962 "" | " "*) ;;
2963 *) reload_flag=" $reload_flag" ;;
2964 esac
2965 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2966 case $host_os in
2967 darwin*)
2968 if test "$GCC" = yes; then
2969 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2970 else
2971 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2972 fi
2973678 ;;
2974679 esac
2975 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2976 _LT_DECL([], [reload_cmds], [2])dnl
2977 ])# _LT_CMD_RELOAD
2978
2979
2980 # _LT_CHECK_MAGIC_METHOD
2981 # ----------------------
2982 # how to check for library dependencies
2983 # -- PORTME fill in with the dynamic library characteristics
2984 m4_defun([_LT_CHECK_MAGIC_METHOD],
2985 [m4_require([_LT_DECL_EGREP])
2986 m4_require([_LT_DECL_OBJDUMP])
2987 AC_CACHE_CHECK([how to recognize dependent libraries],
2988 lt_cv_deplibs_check_method,
2989 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2990 lt_cv_file_magic_test_file=
2991 lt_cv_deplibs_check_method='unknown'
2992 # Need to set the preceding variable on all platforms that support
2993 # interlibrary dependencies.
2994 # 'none' -- dependencies not supported.
2995 # `unknown' -- same as none, but documents that we really don't know.
2996 # 'pass_all' -- all dependencies passed with no checks.
2997 # 'test_compile' -- check by making test program.
2998 # 'file_magic [[regex]]' -- check by looking for files in library path
2999 # which responds to the $file_magic_cmd with a given extended regex.
3000 # If you have `file' or equivalent on your system and you're not sure
3001 # whether `pass_all' will *always* work, you probably want this one.
3002
3003 case $host_os in
3004 aix[[4-9]]*)
3005 lt_cv_deplibs_check_method=pass_all
3006 ;;
3007
3008 beos*)
3009 lt_cv_deplibs_check_method=pass_all
3010 ;;
3011
3012 bsdi[[45]]*)
3013 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3014 lt_cv_file_magic_cmd='/usr/bin/file -L'
3015 lt_cv_file_magic_test_file=/shlib/libc.so
3016 ;;
3017
3018 cygwin*)
3019 # func_win32_libid is a shell function defined in ltmain.sh
3020 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3021 lt_cv_file_magic_cmd='func_win32_libid'
3022 ;;
3023
3024 mingw* | pw32*)
3025 # Base MSYS/MinGW do not provide the 'file' command needed by
3026 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3027 # unless we find 'file', for example because we are cross-compiling.
3028 if ( file / ) >/dev/null 2>&1; then
3029 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3030 lt_cv_file_magic_cmd='func_win32_libid'
3031 else
3032 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3033 lt_cv_file_magic_cmd='$OBJDUMP -f'
3034 fi
3035 ;;
3036
3037 cegcc)
3038 # use the weaker test based on 'objdump'. See mingw*.
3039 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3040 lt_cv_file_magic_cmd='$OBJDUMP -f'
3041 ;;
3042
3043 darwin* | rhapsody*)
3044 lt_cv_deplibs_check_method=pass_all
3045 ;;
3046
3047 freebsd* | dragonfly*)
3048 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3049 case $host_cpu in
3050 i*86 )
3051 # Not sure whether the presence of OpenBSD here was a mistake.
3052 # Let's accept both of them until this is cleared up.
3053 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3054 lt_cv_file_magic_cmd=/usr/bin/file
3055 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3056 ;;
3057 esac
3058 else
3059 lt_cv_deplibs_check_method=pass_all
3060 fi
3061 ;;
3062
3063 gnu*)
3064 lt_cv_deplibs_check_method=pass_all
3065 ;;
3066
3067 hpux10.20* | hpux11*)
3068 lt_cv_file_magic_cmd=/usr/bin/file
3069 case $host_cpu in
3070 ia64*)
3071 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3072 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
680
681 if test -n "$1"; then
682 AC_MSG_CHECKING([for intltool >= $1])
683
684 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
685 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
686 [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
687 ]
688 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
689 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
690 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
691 fi
692
693 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
694 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
695 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
696 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
697 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
698 fi
699
700 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
701 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
702 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
703 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
704 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
705 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
706 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
707 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
708 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
709 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
710 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
711 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
712 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
713 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
714 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
715 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
716 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
717 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
718 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
719
720 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
721 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
722 _IT_SUBST(INTLTOOL_KEYS_RULE)
723 _IT_SUBST(INTLTOOL_PROP_RULE)
724 _IT_SUBST(INTLTOOL_OAF_RULE)
725 _IT_SUBST(INTLTOOL_PONG_RULE)
726 _IT_SUBST(INTLTOOL_SERVER_RULE)
727 _IT_SUBST(INTLTOOL_SHEET_RULE)
728 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
729 _IT_SUBST(INTLTOOL_UI_RULE)
730 _IT_SUBST(INTLTOOL_XAM_RULE)
731 _IT_SUBST(INTLTOOL_KBD_RULE)
732 _IT_SUBST(INTLTOOL_XML_RULE)
733 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
734 _IT_SUBST(INTLTOOL_CAVES_RULE)
735 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
736 _IT_SUBST(INTLTOOL_THEME_RULE)
737 _IT_SUBST(INTLTOOL_SERVICE_RULE)
738 _IT_SUBST(INTLTOOL_POLICY_RULE)
739
740 # Check the gettext tools to make sure they are GNU
741 AC_PATH_PROG(XGETTEXT, xgettext)
742 AC_PATH_PROG(MSGMERGE, msgmerge)
743 AC_PATH_PROG(MSGFMT, msgfmt)
744 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
745 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
746 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
747 fi
748 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
749 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
750 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
751 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
752 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
753 fi
754
755 AC_PATH_PROG(INTLTOOL_PERL, perl)
756 if test -z "$INTLTOOL_PERL"; then
757 AC_MSG_ERROR([perl not found])
758 fi
759 AC_MSG_CHECKING([for perl >= 5.8.1])
760 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
761 if test $? -ne 0; then
762 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
763 else
764 IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
765 AC_MSG_RESULT([$IT_PERL_VERSION])
766 fi
767 if test "x$2" != "xno-xml"; then
768 AC_MSG_CHECKING([for XML::Parser])
769 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
770 AC_MSG_RESULT([ok])
771 else
772 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
773 fi
774 fi
775
776 # Substitute ALL_LINGUAS so we can use it in po/Makefile
777 AC_SUBST(ALL_LINGUAS)
778
779 # Set DATADIRNAME correctly if it is not set yet
780 # (copied from glib-gettext.m4)
781 if test -z "$DATADIRNAME"; then
782 AC_LINK_IFELSE(
783 [AC_LANG_PROGRAM([[]],
784 [[extern int _nl_msg_cat_cntr;
785 return _nl_msg_cat_cntr]])],
786 [DATADIRNAME=share],
787 [case $host in
788 *-*-solaris*)
789 dnl On Solaris, if bind_textdomain_codeset is in libc,
790 dnl GNU format message catalog is always supported,
791 dnl since both are added to the libc all together.
792 dnl Hence, we'd like to go with DATADIRNAME=share
793 dnl in this case.
794 AC_CHECK_FUNC(bind_textdomain_codeset,
795 [DATADIRNAME=share], [DATADIRNAME=lib])
3073796 ;;
3074 hppa*64*)
3075 [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]']
3076 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
797 *)
798 [DATADIRNAME=lib]
3077799 ;;
3078 *)
3079 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3080 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3081 ;;
3082 esac
3083 ;;
3084
3085 interix[[3-9]]*)
3086 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3087 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3088 ;;
3089
3090 irix5* | irix6* | nonstopux*)
3091 case $LD in
3092 *-32|*"-32 ") libmagic=32-bit;;
3093 *-n32|*"-n32 ") libmagic=N32;;
3094 *-64|*"-64 ") libmagic=64-bit;;
3095 *) libmagic=never-match;;
3096 esac
3097 lt_cv_deplibs_check_method=pass_all
3098 ;;
3099
3100 # This must be Linux ELF.
3101 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3102 lt_cv_deplibs_check_method=pass_all
3103 ;;
3104
3105 netbsd* | netbsdelf*-gnu)
3106 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3107 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3108 else
3109 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3110 fi
3111 ;;
3112
3113 newos6*)
3114 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3115 lt_cv_file_magic_cmd=/usr/bin/file
3116 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3117 ;;
3118
3119 *nto* | *qnx*)
3120 lt_cv_deplibs_check_method=pass_all
3121 ;;
3122
3123 openbsd*)
3124 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3125 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3126 else
3127 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3128 fi
3129 ;;
3130
3131 osf3* | osf4* | osf5*)
3132 lt_cv_deplibs_check_method=pass_all
3133 ;;
3134
3135 rdos*)
3136 lt_cv_deplibs_check_method=pass_all
3137 ;;
3138
3139 solaris*)
3140 lt_cv_deplibs_check_method=pass_all
3141 ;;
3142
3143 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3144 lt_cv_deplibs_check_method=pass_all
3145 ;;
3146
3147 sysv4 | sysv4.3*)
3148 case $host_vendor in
3149 motorola)
3150 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]]'
3151 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3152 ;;
3153 ncr)
3154 lt_cv_deplibs_check_method=pass_all
3155 ;;
3156 sequent)
3157 lt_cv_file_magic_cmd='/bin/file'
3158 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3159 ;;
3160 sni)
3161 lt_cv_file_magic_cmd='/bin/file'
3162 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3163 lt_cv_file_magic_test_file=/lib/libc.so
3164 ;;
3165 siemens)
3166 lt_cv_deplibs_check_method=pass_all
3167 ;;
3168 pc)
3169 lt_cv_deplibs_check_method=pass_all
3170 ;;
3171 esac
3172 ;;
3173
3174 tpf*)
3175 lt_cv_deplibs_check_method=pass_all
3176 ;;
3177 esac
800 esac])
801 fi
802 AC_SUBST(DATADIRNAME)
803
804 IT_PO_SUBDIR([po])
805
3178806 ])
3179 file_magic_cmd=$lt_cv_file_magic_cmd
3180 deplibs_check_method=$lt_cv_deplibs_check_method
3181 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3182
3183 _LT_DECL([], [deplibs_check_method], [1],
3184 [Method to check whether dependent libraries are shared objects])
3185 _LT_DECL([], [file_magic_cmd], [1],
3186 [Command to use when deplibs_check_method == "file_magic"])
3187 ])# _LT_CHECK_MAGIC_METHOD
3188
3189
3190 # LT_PATH_NM
3191 # ----------
3192 # find the pathname to a BSD- or MS-compatible name lister
3193 AC_DEFUN([LT_PATH_NM],
3194 [AC_REQUIRE([AC_PROG_CC])dnl
3195 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3196 [if test -n "$NM"; then
3197 # Let the user override the test.
3198 lt_cv_path_NM="$NM"
3199 else
3200 lt_nm_to_check="${ac_tool_prefix}nm"
3201 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3202 lt_nm_to_check="$lt_nm_to_check nm"
3203 fi
3204 for lt_tmp_nm in $lt_nm_to_check; do
3205 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3206 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3207 IFS="$lt_save_ifs"
3208 test -z "$ac_dir" && ac_dir=.
3209 tmp_nm="$ac_dir/$lt_tmp_nm"
3210 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3211 # Check to see if the nm accepts a BSD-compat flag.
3212 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3213 # nm: unknown option "B" ignored
3214 # Tru64's nm complains that /dev/null is an invalid object file
3215 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3216 */dev/null* | *'Invalid file or object type'*)
3217 lt_cv_path_NM="$tmp_nm -B"
3218 break
3219 ;;
3220 *)
3221 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3222 */dev/null*)
3223 lt_cv_path_NM="$tmp_nm -p"
3224 break
3225 ;;
3226 *)
3227 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3228 continue # so that we can try to find one that supports BSD flags
3229 ;;
3230 esac
3231 ;;
3232 esac
3233 fi
3234 done
3235 IFS="$lt_save_ifs"
3236 done
3237 : ${lt_cv_path_NM=no}
3238 fi])
3239 if test "$lt_cv_path_NM" != "no"; then
3240 NM="$lt_cv_path_NM"
3241 else
3242 # Didn't find any BSD compatible name lister, look for dumpbin.
3243 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3244 AC_SUBST([DUMPBIN])
3245 if test "$DUMPBIN" != ":"; then
3246 NM="$DUMPBIN"
3247 fi
3248 fi
3249 test -z "$NM" && NM=nm
3250 AC_SUBST([NM])
3251 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3252
3253 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3254 [lt_cv_nm_interface="BSD nm"
3255 echo "int some_variable = 0;" > conftest.$ac_ext
3256 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3257 (eval "$ac_compile" 2>conftest.err)
3258 cat conftest.err >&AS_MESSAGE_LOG_FD
3259 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3260 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3261 cat conftest.err >&AS_MESSAGE_LOG_FD
3262 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3263 cat conftest.out >&AS_MESSAGE_LOG_FD
3264 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3265 lt_cv_nm_interface="MS dumpbin"
3266 fi
3267 rm -f conftest*])
3268 ])# LT_PATH_NM
3269
3270 # Old names:
3271 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3272 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3273 dnl aclocal-1.4 backwards compatibility:
3274 dnl AC_DEFUN([AM_PROG_NM], [])
3275 dnl AC_DEFUN([AC_PROG_NM], [])
3276
3277
3278 # LT_LIB_M
3279 # --------
3280 # check for math library
3281 AC_DEFUN([LT_LIB_M],
3282 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3283 LIBM=
3284 case $host in
3285 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3286 # These system don't have libm, or don't need it
3287 ;;
3288 *-ncr-sysv4.3*)
3289 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3290 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3291 ;;
3292 *)
3293 AC_CHECK_LIB(m, cos, LIBM="-lm")
3294 ;;
3295 esac
3296 AC_SUBST([LIBM])
3297 ])# LT_LIB_M
3298
3299 # Old name:
3300 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3301 dnl aclocal-1.4 backwards compatibility:
3302 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3303
3304
3305 # _LT_COMPILER_NO_RTTI([TAGNAME])
3306 # -------------------------------
3307 m4_defun([_LT_COMPILER_NO_RTTI],
3308 [m4_require([_LT_TAG_COMPILER])dnl
3309
3310 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3311
3312 if test "$GCC" = yes; then
3313 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3314
3315 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3316 lt_cv_prog_compiler_rtti_exceptions,
3317 [-fno-rtti -fno-exceptions], [],
3318 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3319 fi
3320 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3321 [Compiler flag to turn off builtin functions])
3322 ])# _LT_COMPILER_NO_RTTI
3323
3324
3325 # _LT_CMD_GLOBAL_SYMBOLS
3326 # ----------------------
3327 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3328 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3329 AC_REQUIRE([AC_PROG_CC])dnl
3330 AC_REQUIRE([LT_PATH_NM])dnl
3331 AC_REQUIRE([LT_PATH_LD])dnl
3332 m4_require([_LT_DECL_SED])dnl
3333 m4_require([_LT_DECL_EGREP])dnl
3334 m4_require([_LT_TAG_COMPILER])dnl
3335
3336 # Check for command to grab the raw symbol name followed by C symbol from nm.
3337 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3338 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
807
808
809 # IT_PO_SUBDIR(DIRNAME)
810 # ---------------------
811 # All po subdirs have to be declared with this macro; the subdir "po" is
812 # declared by IT_PROG_INTLTOOL.
813 #
814 AC_DEFUN([IT_PO_SUBDIR],
815 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
816 dnl
817 dnl The following CONFIG_COMMANDS should be executed at the very end
818 dnl of config.status.
819 AC_CONFIG_COMMANDS_PRE([
820 AC_CONFIG_COMMANDS([$1/stamp-it], [
821 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
822 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
823 fi
824 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
825 >"$1/stamp-it.tmp"
826 [sed '/^#/d
827 s/^[[].*] *//
828 /^[ ]*$/d
829 '"s|^| $ac_top_srcdir/|" \
830 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
831 ]
832 [sed '/^POTFILES =/,/[^\\]$/ {
833 /^POTFILES =/!d
834 r $1/POTFILES
835 }
836 ' "$1/Makefile.in" >"$1/Makefile"]
837 rm -f "$1/Makefile.tmp"
838 mv "$1/stamp-it.tmp" "$1/stamp-it"
839 ])
840 ])dnl
841 ])
842
843 # _IT_SUBST(VARIABLE)
844 # -------------------
845 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
846 #
847 AC_DEFUN([_IT_SUBST],
3339848 [
3340 # These are sane defaults that work on at least a few old systems.
3341 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3342
3343 # Character class describing NM global symbol codes.
3344 symcode='[[BCDEGRST]]'
3345
3346 # Regexp to match symbols that can be accessed directly from C.
3347 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3348
3349 # Define system-specific variables.
3350 case $host_os in
3351 aix*)
3352 symcode='[[BCDT]]'
3353 ;;
3354 cygwin* | mingw* | pw32* | cegcc*)
3355 symcode='[[ABCDGISTW]]'
3356 ;;
3357 hpux*)
3358 if test "$host_cpu" = ia64; then
3359 symcode='[[ABCDEGRST]]'
3360 fi
3361 ;;
3362 irix* | nonstopux*)
3363 symcode='[[BCDEGRST]]'
3364 ;;
3365 osf*)
3366 symcode='[[BCDEGQRST]]'
3367 ;;
3368 solaris*)
3369 symcode='[[BDRT]]'
3370 ;;
3371 sco3.2v5*)
3372 symcode='[[DT]]'
3373 ;;
3374 sysv4.2uw2*)
3375 symcode='[[DT]]'
3376 ;;
3377 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3378 symcode='[[ABDT]]'
3379 ;;
3380 sysv4)
3381 symcode='[[DFNSTU]]'
3382 ;;
3383 esac
3384
3385 # If we're using GNU nm, then use its standard symbol codes.
3386 case `$NM -V 2>&1` in
3387 *GNU* | *'with BFD'*)
3388 symcode='[[ABCDGIRSTW]]' ;;
3389 esac
3390
3391 # Transform an extracted symbol line into a proper C declaration.
3392 # Some systems (esp. on ia64) link data and code symbols differently,
3393 # so use this general approach.
3394 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3395
3396 # Transform an extracted symbol line into symbol name and symbol address
3397 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3398 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3399
3400 # Handle CRLF in mingw tool chain
3401 opt_cr=
3402 case $build_os in
3403 mingw*)
3404 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3405 ;;
3406 esac
3407
3408 # Try without a prefix underscore, then with it.
3409 for ac_symprfx in "" "_"; do
3410
3411 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3412 symxfrm="\\1 $ac_symprfx\\2 \\2"
3413
3414 # Write the raw and C identifiers.
3415 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3416 # Fake it for dumpbin and say T for any non-static function
3417 # and D for any global variable.
3418 # Also find C++ and __fastcall symbols from MSVC++,
3419 # which start with @ or ?.
3420 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3421 " {last_section=section; section=\$ 3};"\
3422 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3423 " \$ 0!~/External *\|/{next};"\
3424 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3425 " {if(hide[section]) next};"\
3426 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3427 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3428 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3429 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3430 " ' prfx=^$ac_symprfx]"
3431 else
3432 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3433 fi
3434
3435 # Check to see that the pipe works correctly.
3436 pipe_works=no
3437
3438 rm -f conftest*
3439 cat > conftest.$ac_ext <<_LT_EOF
3440 #ifdef __cplusplus
3441 extern "C" {
3442 #endif
3443 char nm_test_var;
3444 void nm_test_func(void);
3445 void nm_test_func(void){}
3446 #ifdef __cplusplus
3447 }
3448 #endif
3449 int main(){nm_test_var='a';nm_test_func();return(0);}
3450 _LT_EOF
3451
3452 if AC_TRY_EVAL(ac_compile); then
3453 # Now try to grab the symbols.
3454 nlist=conftest.nm
3455 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3456 # Try sorting and uniquifying the output.
3457 if sort "$nlist" | uniq > "$nlist"T; then
3458 mv -f "$nlist"T "$nlist"
3459 else
3460 rm -f "$nlist"T
3461 fi
3462
3463 # Make sure that we snagged all the symbols we need.
3464 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3465 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3466 cat <<_LT_EOF > conftest.$ac_ext
3467 #ifdef __cplusplus
3468 extern "C" {
3469 #endif
3470
3471 _LT_EOF
3472 # Now generate the symbol file.
3473 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3474
3475 cat <<_LT_EOF >> conftest.$ac_ext
3476
3477 /* The mapping between symbol names and symbols. */
3478 const struct {
3479 const char *name;
3480 void *address;
3481 }
3482 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3483 {
3484 { "@PROGRAM@", (void *) 0 },
3485 _LT_EOF
3486 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3487 cat <<\_LT_EOF >> conftest.$ac_ext
3488 {0, (void *) 0}
3489 };
3490
3491 /* This works around a problem in FreeBSD linker */
3492 #ifdef FREEBSD_WORKAROUND
3493 static const void *lt_preloaded_setup() {
3494 return lt__PROGRAM__LTX_preloaded_symbols;
3495 }
3496 #endif
3497
3498 #ifdef __cplusplus
3499 }
3500 #endif
3501 _LT_EOF
3502 # Now try linking the two files.
3503 mv conftest.$ac_objext conftstm.$ac_objext
3504 lt_save_LIBS="$LIBS"
3505 lt_save_CFLAGS="$CFLAGS"
3506 LIBS="conftstm.$ac_objext"
3507 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3508 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3509 pipe_works=yes
3510 fi
3511 LIBS="$lt_save_LIBS"
3512 CFLAGS="$lt_save_CFLAGS"
3513 else
3514 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3515 fi
3516 else
3517 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3518 fi
3519 else
3520 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3521 fi
3522 else
3523 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3524 cat conftest.$ac_ext >&5
3525 fi
3526 rm -rf conftest* conftst*
3527
3528 # Do not use the global_symbol_pipe unless it works.
3529 if test "$pipe_works" = yes; then
3530 break
3531 else
3532 lt_cv_sys_global_symbol_pipe=
3533 fi
3534 done
849 AC_SUBST([$1])
850 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
851 ]
852 )
853
854 # deprecated macros
855 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
856 # A hint is needed for aclocal from Automake <= 1.9.4:
857 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
858
859
860 # nls.m4 serial 5 (gettext-0.18)
861 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
862 dnl Inc.
863 dnl This file is free software; the Free Software Foundation
864 dnl gives unlimited permission to copy and/or distribute it,
865 dnl with or without modifications, as long as this notice is preserved.
866 dnl
867 dnl This file can can be used in projects which are not available under
868 dnl the GNU General Public License or the GNU Library General Public
869 dnl License but which still want to provide support for the GNU gettext
870 dnl functionality.
871 dnl Please note that the actual code of the GNU gettext library is covered
872 dnl by the GNU Library General Public License, and the rest of the GNU
873 dnl gettext package package is covered by the GNU General Public License.
874 dnl They are *not* in the public domain.
875
876 dnl Authors:
877 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
878 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
879
880 AC_PREREQ([2.50])
881
882 AC_DEFUN([AM_NLS],
883 [
884 AC_MSG_CHECKING([whether NLS is requested])
885 dnl Default is enabled NLS
886 AC_ARG_ENABLE([nls],
887 [ --disable-nls do not use Native Language Support],
888 USE_NLS=$enableval, USE_NLS=yes)
889 AC_MSG_RESULT([$USE_NLS])
890 AC_SUBST([USE_NLS])
3535891 ])
3536 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3537 lt_cv_sys_global_symbol_to_cdecl=
3538 fi
3539 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3540 AC_MSG_RESULT(failed)
3541 else
3542 AC_MSG_RESULT(ok)
3543 fi
3544
3545 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3546 [Take the output of nm and produce a listing of raw symbols and C names])
3547 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3548 [Transform the output of nm in a proper C declaration])
3549 _LT_DECL([global_symbol_to_c_name_address],
3550 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3551 [Transform the output of nm in a C name address pair])
3552 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3553 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3554 [Transform the output of nm in a C name address pair when lib prefix is needed])
3555 ]) # _LT_CMD_GLOBAL_SYMBOLS
3556
3557
3558 # _LT_COMPILER_PIC([TAGNAME])
3559 # ---------------------------
3560 m4_defun([_LT_COMPILER_PIC],
3561 [m4_require([_LT_TAG_COMPILER])dnl
3562 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3563 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3564 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3565
3566 AC_MSG_CHECKING([for $compiler option to produce PIC])
3567 m4_if([$1], [CXX], [
3568 # C++ specific cases for pic, static, wl, etc.
3569 if test "$GXX" = yes; then
3570 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3571 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3572
3573 case $host_os in
3574 aix*)
3575 # All AIX code is PIC.
3576 if test "$host_cpu" = ia64; then
3577 # AIX 5 now supports IA64 processor
3578 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3579 fi
3580 ;;
3581
3582 amigaos*)
3583 case $host_cpu in
3584 powerpc)
3585 # see comment about AmigaOS4 .so support
3586 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3587 ;;
3588 m68k)
3589 # FIXME: we need at least 68020 code to build shared libraries, but
3590 # adding the `-m68020' flag to GCC prevents building anything better,
3591 # like `-m68040'.
3592 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3593 ;;
3594 esac
3595 ;;
3596
3597 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3598 # PIC is the default for these OSes.
3599 ;;
3600 mingw* | cygwin* | os2* | pw32* | cegcc*)
3601 # This hack is so that the source file can tell whether it is being
3602 # built for inclusion in a dll (and should export symbols for example).
3603 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3604 # (--disable-auto-import) libraries
3605 m4_if([$1], [GCJ], [],
3606 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3607 ;;
3608 darwin* | rhapsody*)
3609 # PIC is the default on this platform
3610 # Common symbols not allowed in MH_DYLIB files
3611 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3612 ;;
3613 *djgpp*)
3614 # DJGPP does not support shared libraries at all
3615 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3616 ;;
3617 interix[[3-9]]*)
3618 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3619 # Instead, we relocate shared libraries at runtime.
3620 ;;
3621 sysv4*MP*)
3622 if test -d /usr/nec; then
3623 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3624 fi
3625 ;;
3626 hpux*)
3627 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3628 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3629 # sets the default TLS model and affects inlining.
3630 case $host_cpu in
3631 hppa*64*)
3632 ;;
3633 *)
3634 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3635 ;;
3636 esac
3637 ;;
3638 *qnx* | *nto*)
3639 # QNX uses GNU C++, but need to define -shared option too, otherwise
3640 # it will coredump.
3641 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3642 ;;
3643 *)
3644 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3645 ;;
3646 esac
3647 else
3648 case $host_os in
3649 aix[[4-9]]*)
3650 # All AIX code is PIC.
3651 if test "$host_cpu" = ia64; then
3652 # AIX 5 now supports IA64 processor
3653 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3654 else
3655 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3656 fi
3657 ;;
3658 chorus*)
3659 case $cc_basename in
3660 cxch68*)
3661 # Green Hills C++ Compiler
3662 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
3663 ;;
3664 esac
3665 ;;
3666 dgux*)
3667 case $cc_basename in
3668 ec++*)
3669 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3670 ;;
3671 ghcx*)
3672 # Green Hills C++ Compiler
3673 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3674 ;;
3675 *)
3676 ;;
3677 esac
3678 ;;
3679 freebsd* | dragonfly*)
3680 # FreeBSD uses GNU C++
3681 ;;
3682 hpux9* | hpux10* | hpux11*)
3683 case $cc_basename in
3684 CC*)
3685 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3686 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3687 if test "$host_cpu" != ia64; then
3688 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3689 fi
3690 ;;
3691 aCC*)
3692 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3693 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3694 case $host_cpu in
3695 hppa*64*|ia64*)
3696 # +Z the default
3697 ;;
3698 *)
3699 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3700 ;;
3701 esac
3702 ;;
3703 *)
3704 ;;
3705 esac
3706 ;;
3707 interix*)
3708 # This is c89, which is MS Visual C++ (no shared libs)
3709 # Anyone wants to do a port?
3710 ;;
3711 irix5* | irix6* | nonstopux*)
3712 case $cc_basename in
3713 CC*)
3714 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3715 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3716 # CC pic flag -KPIC is the default.
3717 ;;
3718 *)
3719 ;;
3720 esac
3721 ;;
3722 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3723 case $cc_basename in
3724 KCC*)
3725 # KAI C++ Compiler
3726 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3727 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3728 ;;
3729 ecpc* )
3730 # old Intel C++ for x86_64 which still supported -KPIC.
3731 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3732 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3733 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3734 ;;
3735 icpc* )
3736 # Intel C++, used to be incompatible with GCC.
3737 # ICC 10 doesn't accept -KPIC any more.
3738 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3739 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3740 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3741 ;;
3742 pgCC* | pgcpp*)
3743 # Portland Group C++ compiler
3744 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3745 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3746 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3747 ;;
3748 cxx*)
3749 # Compaq C++
3750 # Make sure the PIC flag is empty. It appears that all Alpha
3751 # Linux and Compaq Tru64 Unix objects are PIC.
3752 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3753 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3754 ;;
3755 xlc* | xlC*)
3756 # IBM XL 8.0 on PPC
3757 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3758 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3759 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3760 ;;
3761 *)
3762 case `$CC -V 2>&1 | sed 5q` in
3763 *Sun\ C*)
3764 # Sun C++ 5.9
3765 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3766 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3767 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3768 ;;
3769 esac
3770 ;;
3771 esac
3772 ;;
3773 lynxos*)
3774 ;;
3775 m88k*)
3776 ;;
3777 mvs*)
3778 case $cc_basename in
3779 cxx*)
3780 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3781 ;;
3782 *)
3783 ;;
3784 esac
3785 ;;
3786 netbsd* | netbsdelf*-gnu)
3787 ;;
3788 *qnx* | *nto*)
3789 # QNX uses GNU C++, but need to define -shared option too, otherwise
3790 # it will coredump.
3791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3792 ;;
3793 osf3* | osf4* | osf5*)
3794 case $cc_basename in
3795 KCC*)
3796 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3797 ;;
3798 RCC*)
3799 # Rational C++ 2.4.1
3800 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3801 ;;
3802 cxx*)
3803 # Digital/Compaq C++
3804 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3805 # Make sure the PIC flag is empty. It appears that all Alpha
3806 # Linux and Compaq Tru64 Unix objects are PIC.
3807 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3808 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3809 ;;
3810 *)
3811 ;;
3812 esac
3813 ;;
3814 psos*)
3815 ;;
3816 solaris*)
3817 case $cc_basename in
3818 CC*)
3819 # Sun C++ 4.2, 5.x and Centerline C++
3820 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3821 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3823 ;;
3824 gcx*)
3825 # Green Hills C++ Compiler
3826 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3827 ;;
3828 *)
3829 ;;
3830 esac
3831 ;;
3832 sunos4*)
3833 case $cc_basename in
3834 CC*)
3835 # Sun C++ 4.x
3836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3838 ;;
3839 lcc*)
3840 # Lucid
3841 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3842 ;;
3843 *)
3844 ;;
3845 esac
3846 ;;
3847 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3848 case $cc_basename in
3849 CC*)
3850 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3851 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3852 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3853 ;;
3854 esac
3855 ;;
3856 tandem*)
3857 case $cc_basename in
3858 NCC*)
3859 # NonStop-UX NCC 3.20
3860 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3861 ;;
3862 *)
3863 ;;
3864 esac
3865 ;;
3866 vxworks*)
3867 ;;
3868 *)
3869 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3870 ;;
3871 esac
3872 fi
3873 ],
3874 [
3875 if test "$GCC" = yes; then
3876 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3877 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3878
3879 case $host_os in
3880 aix*)
3881 # All AIX code is PIC.
3882 if test "$host_cpu" = ia64; then
3883 # AIX 5 now supports IA64 processor
3884 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3885 fi
3886 ;;
3887
3888 amigaos*)
3889 case $host_cpu in
3890 powerpc)
3891 # see comment about AmigaOS4 .so support
3892 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3893 ;;
3894 m68k)
3895 # FIXME: we need at least 68020 code to build shared libraries, but
3896 # adding the `-m68020' flag to GCC prevents building anything better,
3897 # like `-m68040'.
3898 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3899 ;;
3900 esac
3901 ;;
3902
3903 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3904 # PIC is the default for these OSes.
3905 ;;
3906
3907 mingw* | cygwin* | pw32* | os2* | cegcc*)
3908 # This hack is so that the source file can tell whether it is being
3909 # built for inclusion in a dll (and should export symbols for example).
3910 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3911 # (--disable-auto-import) libraries
3912 m4_if([$1], [GCJ], [],
3913 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3914 ;;
3915
3916 darwin* | rhapsody*)
3917 # PIC is the default on this platform
3918 # Common symbols not allowed in MH_DYLIB files
3919 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3920 ;;
3921
3922 hpux*)
3923 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3924 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3925 # sets the default TLS model and affects inlining.
3926 case $host_cpu in
3927 hppa*64*)
3928 # +Z the default
3929 ;;
3930 *)
3931 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3932 ;;
3933 esac
3934 ;;
3935
3936 interix[[3-9]]*)
3937 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3938 # Instead, we relocate shared libraries at runtime.
3939 ;;
3940
3941 msdosdjgpp*)
3942 # Just because we use GCC doesn't mean we suddenly get shared libraries
3943 # on systems that don't support them.
3944 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3945 enable_shared=no
3946 ;;
3947
3948 *nto* | *qnx*)
3949 # QNX uses GNU C++, but need to define -shared option too, otherwise
3950 # it will coredump.
3951 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3952 ;;
3953
3954 sysv4*MP*)
3955 if test -d /usr/nec; then
3956 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3957 fi
3958 ;;
3959
3960 *)
3961 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3962 ;;
3963 esac
3964 else
3965 # PORTME Check for flag to pass linker flags through the system compiler.
3966 case $host_os in
3967 aix*)
3968 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3969 if test "$host_cpu" = ia64; then
3970 # AIX 5 now supports IA64 processor
3971 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3972 else
3973 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3974 fi
3975 ;;
3976
3977 mingw* | cygwin* | pw32* | os2* | cegcc*)
3978 # This hack is so that the source file can tell whether it is being
3979 # built for inclusion in a dll (and should export symbols for example).
3980 m4_if([$1], [GCJ], [],
3981 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3982 ;;
3983
3984 hpux9* | hpux10* | hpux11*)
3985 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3986 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3987 # not for PA HP-UX.
3988 case $host_cpu in
3989 hppa*64*|ia64*)
3990 # +Z the default
3991 ;;
3992 *)
3993 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3994 ;;
3995 esac
3996 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3997 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3998 ;;
3999
4000 irix5* | irix6* | nonstopux*)
4001 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4002 # PIC (with -KPIC) is the default.
4003 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4004 ;;
4005
4006 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4007 case $cc_basename in
4008 # old Intel for x86_64 which still supported -KPIC.
4009 ecc*)
4010 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4011 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4012 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4013 ;;
4014 # icc used to be incompatible with GCC.
4015 # ICC 10 doesn't accept -KPIC any more.
4016 icc* | ifort*)
4017 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4018 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4019 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4020 ;;
4021 # Lahey Fortran 8.1.
4022 lf95*)
4023 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4024 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4025 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4026 ;;
4027 pgcc* | pgf77* | pgf90* | pgf95*)
4028 # Portland Group compilers (*not* the Pentium gcc compiler,
4029 # which looks to be a dead project)
4030 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4031 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4032 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4033 ;;
4034 ccc*)
4035 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4036 # All Alpha code is PIC.
4037 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4038 ;;
4039 xl*)
4040 # IBM XL C 8.0/Fortran 10.1 on PPC
4041 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4042 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4043 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4044 ;;
4045 *)
4046 case `$CC -V 2>&1 | sed 5q` in
4047 *Sun\ C*)
4048 # Sun C 5.9
4049 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4050 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4051 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4052 ;;
4053 *Sun\ F*)
4054 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4055 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4056 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4057 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4058 ;;
4059 esac
4060 ;;
4061 esac
4062 ;;
4063
4064 newsos6)
4065 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4066 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4067 ;;
4068
4069 *nto* | *qnx*)
4070 # QNX uses GNU C++, but need to define -shared option too, otherwise
4071 # it will coredump.
4072 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4073 ;;
4074
4075 osf3* | osf4* | osf5*)
4076 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4077 # All OSF/1 code is PIC.
4078 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4079 ;;
4080
4081 rdos*)
4082 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4083 ;;
4084
4085 solaris*)
4086 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4087 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4088 case $cc_basename in
4089 f77* | f90* | f95*)
4090 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4091 *)
4092 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4093 esac
4094 ;;
4095
4096 sunos4*)
4097 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4098 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4099 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4100 ;;
4101
4102 sysv4 | sysv4.2uw2* | sysv4.3*)
4103 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4104 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4105 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4106 ;;
4107
4108 sysv4*MP*)
4109 if test -d /usr/nec ;then
4110 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4111 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4112 fi
4113 ;;
4114
4115 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4116 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4117 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4118 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4119 ;;
4120
4121 unicos*)
4122 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4123 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4124 ;;
4125
4126 uts4*)
4127 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4128 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4129 ;;
4130
4131 *)
4132 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4133 ;;
4134 esac
4135 fi
4136 ])
4137 case $host_os in
4138 # For platforms which do not support PIC, -DPIC is meaningless:
4139 *djgpp*)
4140 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4141 ;;
4142 *)
4143 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4144 ;;
4145 esac
4146 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4147 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4148 [How to pass a linker flag through the compiler])
4149
4150 #
4151 # Check to make sure the PIC flag actually works.
4152 #
4153 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4154 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4155 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4156 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4157 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4158 "" | " "*) ;;
4159 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4160 esac],
4161 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4162 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4163 fi
4164 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4165 [Additional compiler flags for building library objects])
4166
4167 #
4168 # Check to make sure the static flag actually works.
4169 #
4170 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4171 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4172 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4173 $lt_tmp_static_flag,
4174 [],
4175 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4176 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4177 [Compiler flag to prevent dynamic linking])
4178 ])# _LT_COMPILER_PIC
4179
4180
4181 # _LT_LINKER_SHLIBS([TAGNAME])
4182 # ----------------------------
4183 # See if the linker supports building shared libraries.
4184 m4_defun([_LT_LINKER_SHLIBS],
4185 [AC_REQUIRE([LT_PATH_LD])dnl
4186 AC_REQUIRE([LT_PATH_NM])dnl
4187 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4188 m4_require([_LT_DECL_EGREP])dnl
4189 m4_require([_LT_DECL_SED])dnl
4190 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4191 m4_require([_LT_TAG_COMPILER])dnl
4192 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4193 m4_if([$1], [CXX], [
4194 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4195 case $host_os in
4196 aix[[4-9]]*)
4197 # If we're using GNU nm, then we don't want the "-C" option.
4198 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4199 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4200 _LT_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'
4201 else
4202 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4203 fi
4204 ;;
4205 pw32*)
4206 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4207 ;;
4208 cygwin* | mingw* | cegcc*)
4209 _LT_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'
4210 ;;
4211 linux* | k*bsd*-gnu)
4212 _LT_TAGVAR(link_all_deplibs, $1)=no
4213 ;;
4214 *)
4215 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4216 ;;
4217 esac
4218 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4219 ], [
4220 runpath_var=
4221 _LT_TAGVAR(allow_undefined_flag, $1)=
4222 _LT_TAGVAR(always_export_symbols, $1)=no
4223 _LT_TAGVAR(archive_cmds, $1)=
4224 _LT_TAGVAR(archive_expsym_cmds, $1)=
4225 _LT_TAGVAR(compiler_needs_object, $1)=no
4226 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4227 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4228 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4229 _LT_TAGVAR(hardcode_automatic, $1)=no
4230 _LT_TAGVAR(hardcode_direct, $1)=no
4231 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4232 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4233 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4234 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4235 _LT_TAGVAR(hardcode_minus_L, $1)=no
4236 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4237 _LT_TAGVAR(inherit_rpath, $1)=no
4238 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4239 _LT_TAGVAR(module_cmds, $1)=
4240 _LT_TAGVAR(module_expsym_cmds, $1)=
4241 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4242 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4243 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4244 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4245 # include_expsyms should be a list of space-separated symbols to be *always*
4246 # included in the symbol list
4247 _LT_TAGVAR(include_expsyms, $1)=
4248 # exclude_expsyms can be an extended regexp of symbols to exclude
4249 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4250 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4251 # as well as any symbol that contains `d'.
4252 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4253 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4254 # platforms (ab)use it in PIC code, but their linkers get confused if
4255 # the symbol is explicitly referenced. Since portable code cannot
4256 # rely on this symbol name, it's probably fine to never include it in
4257 # preloaded symbol tables.
4258 # Exclude shared library initialization/finalization symbols.
4259 dnl Note also adjust exclude_expsyms for C++ above.
4260 extract_expsyms_cmds=
4261
4262 case $host_os in
4263 cygwin* | mingw* | pw32* | cegcc*)
4264 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4265 # When not using gcc, we currently assume that we are using
4266 # Microsoft Visual C++.
4267 if test "$GCC" != yes; then
4268 with_gnu_ld=no
4269 fi
4270 ;;
4271 interix*)
4272 # we just hope/assume this is gcc and not c89 (= MSVC++)
4273 with_gnu_ld=yes
4274 ;;
4275 openbsd*)
4276 with_gnu_ld=no
4277 ;;
4278 linux* | k*bsd*-gnu)
4279 _LT_TAGVAR(link_all_deplibs, $1)=no
4280 ;;
4281 esac
4282
4283 _LT_TAGVAR(ld_shlibs, $1)=yes
4284 if test "$with_gnu_ld" = yes; then
4285 # If archive_cmds runs LD, not CC, wlarc should be empty
4286 wlarc='${wl}'
4287
4288 # Set some defaults for GNU ld with shared library support. These
4289 # are reset later if shared libraries are not supported. Putting them
4290 # here allows them to be overridden if necessary.
4291 runpath_var=LD_RUN_PATH
4292 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4293 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4294 # ancient GNU ld didn't support --whole-archive et. al.
4295 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4296 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4297 else
4298 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4299 fi
4300 supports_anon_versioning=no
4301 case `$LD -v 2>&1` in
4302 *GNU\ gold*) supports_anon_versioning=yes ;;
4303 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4304 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4305 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4306 *\ 2.11.*) ;; # other 2.11 versions
4307 *) supports_anon_versioning=yes ;;
4308 esac
4309
4310 # See if GNU ld supports shared libraries.
4311 case $host_os in
4312 aix[[3-9]]*)
4313 # On AIX/PPC, the GNU linker is very broken
4314 if test "$host_cpu" != ia64; then
4315 _LT_TAGVAR(ld_shlibs, $1)=no
4316 cat <<_LT_EOF 1>&2
4317
4318 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4319 *** to be unable to reliably create shared libraries on AIX.
4320 *** Therefore, libtool is disabling shared libraries support. If you
4321 *** really care for shared libraries, you may want to modify your PATH
4322 *** so that a non-GNU linker is found, and then restart.
4323
4324 _LT_EOF
4325 fi
4326 ;;
4327
4328 amigaos*)
4329 case $host_cpu in
4330 powerpc)
4331 # see comment about AmigaOS4 .so support
4332 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4333 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4334 ;;
4335 m68k)
4336 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4337 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4338 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4339 ;;
4340 esac
4341 ;;
4342
4343 beos*)
4344 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4345 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4346 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4347 # support --undefined. This deserves some investigation. FIXME
4348 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4349 else
4350 _LT_TAGVAR(ld_shlibs, $1)=no
4351 fi
4352 ;;
4353
4354 cygwin* | mingw* | pw32* | cegcc*)
4355 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4356 # as there is no search path for DLLs.
4357 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4358 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4359 _LT_TAGVAR(always_export_symbols, $1)=no
4360 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4361 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
4362
4363 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4364 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4365 # If the export-symbols file already is a .def file (1st line
4366 # is EXPORTS), use it as is; otherwise, prepend...
4367 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4368 cp $export_symbols $output_objdir/$soname.def;
4369 else
4370 echo EXPORTS > $output_objdir/$soname.def;
4371 cat $export_symbols >> $output_objdir/$soname.def;
4372 fi~
4373 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4374 else
4375 _LT_TAGVAR(ld_shlibs, $1)=no
4376 fi
4377 ;;
4378
4379 interix[[3-9]]*)
4380 _LT_TAGVAR(hardcode_direct, $1)=no
4381 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4382 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4383 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4384 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4385 # Instead, shared libraries are loaded at an image base (0x10000000 by
4386 # default) and relocated if they conflict, which is a slow very memory
4387 # consuming and fragmenting process. To avoid this, we pick a random,
4388 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4389 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4390 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4391 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4392 ;;
4393
4394 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4395 tmp_diet=no
4396 if test "$host_os" = linux-dietlibc; then
4397 case $cc_basename in
4398 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4399 esac
4400 fi
4401 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4402 && test "$tmp_diet" = no
4403 then
4404 tmp_addflag=
4405 tmp_sharedflag='-shared'
4406 case $cc_basename,$host_cpu in
4407 pgcc*) # Portland Group C compiler
4408 _LT_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'
4409 tmp_addflag=' $pic_flag'
4410 ;;
4411 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4412 _LT_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'
4413 tmp_addflag=' $pic_flag -Mnomain' ;;
4414 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4415 tmp_addflag=' -i_dynamic' ;;
4416 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4417 tmp_addflag=' -i_dynamic -nofor_main' ;;
4418 ifc* | ifort*) # Intel Fortran compiler
4419 tmp_addflag=' -nofor_main' ;;
4420 lf95*) # Lahey Fortran 8.1
4421 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4422 tmp_sharedflag='--shared' ;;
4423 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4424 tmp_sharedflag='-qmkshrobj'
4425 tmp_addflag= ;;
4426 esac
4427 case `$CC -V 2>&1 | sed 5q` in
4428 *Sun\ C*) # Sun C 5.9
4429 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4430 _LT_TAGVAR(compiler_needs_object, $1)=yes
4431 tmp_sharedflag='-G' ;;
4432 *Sun\ F*) # Sun Fortran 8.3
4433 tmp_sharedflag='-G' ;;
4434 esac
4435 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4436
4437 if test "x$supports_anon_versioning" = xyes; then
4438 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4439 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4440 echo "local: *; };" >> $output_objdir/$libname.ver~
4441 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4442 fi
4443
4444 case $cc_basename in
4445 xlf*)
4446 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4447 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4448 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4449 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4450 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4451 if test "x$supports_anon_versioning" = xyes; then
4452 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4453 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4454 echo "local: *; };" >> $output_objdir/$libname.ver~
4455 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4456 fi
4457 ;;
4458 esac
4459 else
4460 _LT_TAGVAR(ld_shlibs, $1)=no
4461 fi
4462 ;;
4463
4464 netbsd* | netbsdelf*-gnu)
4465 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4466 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4467 wlarc=
4468 else
4469 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4470 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4471 fi
4472 ;;
4473
4474 solaris*)
4475 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4476 _LT_TAGVAR(ld_shlibs, $1)=no
4477 cat <<_LT_EOF 1>&2
4478
4479 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4480 *** create shared libraries on Solaris systems. Therefore, libtool
4481 *** is disabling shared libraries support. We urge you to upgrade GNU
4482 *** binutils to release 2.9.1 or newer. Another option is to modify
4483 *** your PATH or compiler configuration so that the native linker is
4484 *** used, and then restart.
4485
4486 _LT_EOF
4487 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4488 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4489 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4490 else
4491 _LT_TAGVAR(ld_shlibs, $1)=no
4492 fi
4493 ;;
4494
4495 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4496 case `$LD -v 2>&1` in
4497 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4498 _LT_TAGVAR(ld_shlibs, $1)=no
4499 cat <<_LT_EOF 1>&2
4500
4501 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4502 *** reliably create shared libraries on SCO systems. Therefore, libtool
4503 *** is disabling shared libraries support. We urge you to upgrade GNU
4504 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4505 *** your PATH or compiler configuration so that the native linker is
4506 *** used, and then restart.
4507
4508 _LT_EOF
4509 ;;
4510 *)
4511 # For security reasons, it is highly recommended that you always
4512 # use absolute paths for naming shared libraries, and exclude the
4513 # DT_RUNPATH tag from executables and libraries. But doing so
4514 # requires that you compile everything twice, which is a pain.
4515 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4516 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4517 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4518 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4519 else
4520 _LT_TAGVAR(ld_shlibs, $1)=no
4521 fi
4522 ;;
4523 esac
4524 ;;
4525
4526 sunos4*)
4527 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4528 wlarc=
4529 _LT_TAGVAR(hardcode_direct, $1)=yes
4530 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4531 ;;
4532
4533 *)
4534 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4535 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4536 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4537 else
4538 _LT_TAGVAR(ld_shlibs, $1)=no
4539 fi
4540 ;;
4541 esac
4542
4543 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4544 runpath_var=
4545 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4546 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4547 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4548 fi
4549 else
4550 # PORTME fill in a description of your system's linker (not GNU ld)
4551 case $host_os in
4552 aix3*)
4553 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4554 _LT_TAGVAR(always_export_symbols, $1)=yes
4555 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
4556 # Note: this linker hardcodes the directories in LIBPATH if there
4557 # are no directories specified by -L.
4558 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4559 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4560 # Neither direct hardcoding nor static linking is supported with a
4561 # broken collect2.
4562 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4563 fi
4564 ;;
4565
4566 aix[[4-9]]*)
4567 if test "$host_cpu" = ia64; then
4568 # On IA64, the linker does run time linking by default, so we don't
4569 # have to do anything special.
4570 aix_use_runtimelinking=no
4571 exp_sym_flag='-Bexport'
4572 no_entry_flag=""
4573 else
4574 # If we're using GNU nm, then we don't want the "-C" option.
4575 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4576 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4577 _LT_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'
4578 else
4579 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4580 fi
4581 aix_use_runtimelinking=no
4582
4583 # Test if we are trying to use run time linking or normal
4584 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4585 # need to do runtime linking.
4586 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4587 for ld_flag in $LDFLAGS; do
4588 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4589 aix_use_runtimelinking=yes
4590 break
4591 fi
4592 done
4593 ;;
4594 esac
4595
4596 exp_sym_flag='-bexport'
4597 no_entry_flag='-bnoentry'
4598 fi
4599
4600 # When large executables or shared objects are built, AIX ld can
4601 # have problems creating the table of contents. If linking a library
4602 # or program results in "error TOC overflow" add -mminimal-toc to
4603 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4604 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4605
4606 _LT_TAGVAR(archive_cmds, $1)=''
4607 _LT_TAGVAR(hardcode_direct, $1)=yes
4608 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4609 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4610 _LT_TAGVAR(link_all_deplibs, $1)=yes
4611 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4612
4613 if test "$GCC" = yes; then
4614 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4615 # We only want to do this on AIX 4.2 and lower, the check
4616 # below for broken collect2 doesn't work under 4.3+
4617 collect2name=`${CC} -print-prog-name=collect2`
4618 if test -f "$collect2name" &&
4619 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4620 then
4621 # We have reworked collect2
4622 :
4623 else
4624 # We have old collect2
4625 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4626 # It fails to find uninstalled libraries when the uninstalled
4627 # path is not listed in the libpath. Setting hardcode_minus_L
4628 # to unsupported forces relinking
4629 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4630 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4631 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4632 fi
4633 ;;
4634 esac
4635 shared_flag='-shared'
4636 if test "$aix_use_runtimelinking" = yes; then
4637 shared_flag="$shared_flag "'${wl}-G'
4638 fi
4639 _LT_TAGVAR(link_all_deplibs, $1)=no
4640 else
4641 # not using gcc
4642 if test "$host_cpu" = ia64; then
4643 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4644 # chokes on -Wl,-G. The following line is correct:
4645 shared_flag='-G'
4646 else
4647 if test "$aix_use_runtimelinking" = yes; then
4648 shared_flag='${wl}-G'
4649 else
4650 shared_flag='${wl}-bM:SRE'
4651 fi
4652 fi
4653 fi
4654
4655 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4656 # It seems that -bexpall does not export symbols beginning with
4657 # underscore (_), so it is better to generate a list of symbols to export.
4658 _LT_TAGVAR(always_export_symbols, $1)=yes
4659 if test "$aix_use_runtimelinking" = yes; then
4660 # Warning - without using the other runtime loading flags (-brtl),
4661 # -berok will link without error, but may produce a broken library.
4662 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4663 # Determine the default libpath from the value encoded in an
4664 # empty executable.
4665 _LT_SYS_MODULE_PATH_AIX
4666 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4667 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4668 else
4669 if test "$host_cpu" = ia64; then
4670 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4671 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4672 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
4673 else
4674 # Determine the default libpath from the value encoded in an
4675 # empty executable.
4676 _LT_SYS_MODULE_PATH_AIX
4677 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4678 # Warning - without using the other run time loading flags,
4679 # -berok will link without error, but may produce a broken library.
4680 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4681 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4682 # Exported symbols can be pulled into shared objects from archives
4683 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4684 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4685 # This is similar to how AIX traditionally builds its shared libraries.
4686 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4687 fi
4688 fi
4689 ;;
4690
4691 amigaos*)
4692 case $host_cpu in
4693 powerpc)
4694 # see comment about AmigaOS4 .so support
4695 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4696 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4697 ;;
4698 m68k)
4699 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4701 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4702 ;;
4703 esac
4704 ;;
4705
4706 bsdi[[45]]*)
4707 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4708 ;;
4709
4710 cygwin* | mingw* | pw32* | cegcc*)
4711 # When not using gcc, we currently assume that we are using
4712 # Microsoft Visual C++.
4713 # hardcode_libdir_flag_spec is actually meaningless, as there is
4714 # no search path for DLLs.
4715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4716 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4717 # Tell ltmain to make .lib files, not .a files.
4718 libext=lib
4719 # Tell ltmain to make .dll files, not .so files.
4720 shrext_cmds=".dll"
4721 # FIXME: Setting linknames here is a bad hack.
4722 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4723 # The linker will automatically build a .lib file if we build a DLL.
4724 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4725 # FIXME: Should let the user specify the lib program.
4726 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4727 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4728 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4729 ;;
4730
4731 darwin* | rhapsody*)
4732 _LT_DARWIN_LINKER_FEATURES($1)
4733 ;;
4734
4735 dgux*)
4736 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4737 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4738 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4739 ;;
4740
4741 freebsd1*)
4742 _LT_TAGVAR(ld_shlibs, $1)=no
4743 ;;
4744
4745 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4746 # support. Future versions do this automatically, but an explicit c++rt0.o
4747 # does not break anything, and helps significantly (at the cost of a little
4748 # extra space).
4749 freebsd2.2*)
4750 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4751 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4752 _LT_TAGVAR(hardcode_direct, $1)=yes
4753 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4754 ;;
4755
4756 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4757 freebsd2*)
4758 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4759 _LT_TAGVAR(hardcode_direct, $1)=yes
4760 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4761 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4762 ;;
4763
4764 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4765 freebsd* | dragonfly*)
4766 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4767 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4768 _LT_TAGVAR(hardcode_direct, $1)=yes
4769 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4770 ;;
4771
4772 hpux9*)
4773 if test "$GCC" = yes; then
4774 _LT_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'
4775 else
4776 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4777 fi
4778 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4779 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4780 _LT_TAGVAR(hardcode_direct, $1)=yes
4781
4782 # hardcode_minus_L: Not really in the search PATH,
4783 # but as the default location of the library.
4784 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4785 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4786 ;;
4787
4788 hpux10*)
4789 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4790 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4791 else
4792 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4793 fi
4794 if test "$with_gnu_ld" = no; then
4795 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4796 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4797 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4798 _LT_TAGVAR(hardcode_direct, $1)=yes
4799 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4800 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4801 # hardcode_minus_L: Not really in the search PATH,
4802 # but as the default location of the library.
4803 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4804 fi
4805 ;;
4806
4807 hpux11*)
4808 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4809 case $host_cpu in
4810 hppa*64*)
4811 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4812 ;;
4813 ia64*)
4814 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4815 ;;
4816 *)
4817 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4818 ;;
4819 esac
4820 else
4821 case $host_cpu in
4822 hppa*64*)
4823 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4824 ;;
4825 ia64*)
4826 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4827 ;;
4828 *)
4829 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4830 ;;
4831 esac
4832 fi
4833 if test "$with_gnu_ld" = no; then
4834 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4835 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4836
4837 case $host_cpu in
4838 hppa*64*|ia64*)
4839 _LT_TAGVAR(hardcode_direct, $1)=no
4840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4841 ;;
4842 *)
4843 _LT_TAGVAR(hardcode_direct, $1)=yes
4844 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4845 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4846
4847 # hardcode_minus_L: Not really in the search PATH,
4848 # but as the default location of the library.
4849 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4850 ;;
4851 esac
4852 fi
4853 ;;
4854
4855 irix5* | irix6* | nonstopux*)
4856 if test "$GCC" = yes; then
4857 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4858 # Try to use the -exported_symbol ld option, if it does not
4859 # work, assume that -exports_file does not work either and
4860 # implicitly export all symbols.
4861 save_LDFLAGS="$LDFLAGS"
4862 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4863 AC_LINK_IFELSE(int foo(void) {},
4864 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4865 )
4866 LDFLAGS="$save_LDFLAGS"
4867 else
4868 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4869 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
4870 fi
4871 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4872 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4873 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4874 _LT_TAGVAR(inherit_rpath, $1)=yes
4875 _LT_TAGVAR(link_all_deplibs, $1)=yes
4876 ;;
4877
4878 netbsd* | netbsdelf*-gnu)
4879 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4880 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4881 else
4882 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4883 fi
4884 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4885 _LT_TAGVAR(hardcode_direct, $1)=yes
4886 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4887 ;;
4888
4889 newsos6)
4890 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4891 _LT_TAGVAR(hardcode_direct, $1)=yes
4892 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4893 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4894 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4895 ;;
4896
4897 *nto* | *qnx*)
4898 ;;
4899
4900 openbsd*)
4901 if test -f /usr/libexec/ld.so; then
4902 _LT_TAGVAR(hardcode_direct, $1)=yes
4903 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4904 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4905 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4906 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4907 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4908 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4909 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4910 else
4911 case $host_os in
4912 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4913 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4914 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4915 ;;
4916 *)
4917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4918 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4919 ;;
4920 esac
4921 fi
4922 else
4923 _LT_TAGVAR(ld_shlibs, $1)=no
4924 fi
4925 ;;
4926
4927 os2*)
4928 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4929 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4930 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4931 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
4932 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4933 ;;
4934
4935 osf3*)
4936 if test "$GCC" = yes; then
4937 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4938 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4939 else
4940 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4941 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4942 fi
4943 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4944 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4945 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4946 ;;
4947
4948 osf4* | osf5*) # as osf3* with the addition of -msym flag
4949 if test "$GCC" = yes; then
4950 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4951 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4952 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4953 else
4954 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4955 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4956 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
4957 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
4958
4959 # Both c and cxx compiler support -rpath directly
4960 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4961 fi
4962 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4963 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4964 ;;
4965
4966 solaris*)
4967 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4968 if test "$GCC" = yes; then
4969 wlarc='${wl}'
4970 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4971 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4972 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4973 else
4974 case `$CC -V 2>&1` in
4975 *"Compilers 5.0"*)
4976 wlarc=''
4977 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4978 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4979 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4980 ;;
4981 *)
4982 wlarc='${wl}'
4983 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4984 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4985 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4986 ;;
4987 esac
4988 fi
4989 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4991 case $host_os in
4992 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4993 *)
4994 # The compiler driver will combine and reorder linker options,
4995 # but understands `-z linker_flag'. GCC discards it without `$wl',
4996 # but is careful enough not to reorder.
4997 # Supported since Solaris 2.6 (maybe 2.5.1?)
4998 if test "$GCC" = yes; then
4999 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5000 else
5001 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5002 fi
5003 ;;
5004 esac
5005 _LT_TAGVAR(link_all_deplibs, $1)=yes
5006 ;;
5007
5008 sunos4*)
5009 if test "x$host_vendor" = xsequent; then
5010 # Use $CC to link under sequent, because it throws in some extra .o
5011 # files that make .init and .fini sections work.
5012 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5013 else
5014 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5015 fi
5016 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5017 _LT_TAGVAR(hardcode_direct, $1)=yes
5018 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5019 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5020 ;;
5021
5022 sysv4)
5023 case $host_vendor in
5024 sni)
5025 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5026 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5027 ;;
5028 siemens)
5029 ## LD is ld it makes a PLAMLIB
5030 ## CC just makes a GrossModule.
5031 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5032 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5033 _LT_TAGVAR(hardcode_direct, $1)=no
5034 ;;
5035 motorola)
5036 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5037 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5038 ;;
5039 esac
5040 runpath_var='LD_RUN_PATH'
5041 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5042 ;;
5043
5044 sysv4.3*)
5045 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5046 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5047 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5048 ;;
5049
5050 sysv4*MP*)
5051 if test -d /usr/nec; then
5052 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5054 runpath_var=LD_RUN_PATH
5055 hardcode_runpath_var=yes
5056 _LT_TAGVAR(ld_shlibs, $1)=yes
5057 fi
5058 ;;
5059
5060 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5061 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5062 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5063 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5064 runpath_var='LD_RUN_PATH'
5065
5066 if test "$GCC" = yes; then
5067 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5068 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5069 else
5070 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5071 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5072 fi
5073 ;;
5074
5075 sysv5* | sco3.2v5* | sco5v6*)
5076 # Note: We can NOT use -z defs as we might desire, because we do not
5077 # link with -lc, and that would cause any symbols used from libc to
5078 # always be unresolved, which means just about no library would
5079 # ever link correctly. If we're not using GNU ld we use -z text
5080 # though, which does catch some bad symbols but isn't as heavy-handed
5081 # as -z defs.
5082 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5083 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5084 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5085 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5086 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5087 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5088 _LT_TAGVAR(link_all_deplibs, $1)=yes
5089 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5090 runpath_var='LD_RUN_PATH'
5091
5092 if test "$GCC" = yes; then
5093 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5094 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5095 else
5096 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5097 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5098 fi
5099 ;;
5100
5101 uts4*)
5102 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5103 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5104 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5105 ;;
5106
5107 *)
5108 _LT_TAGVAR(ld_shlibs, $1)=no
5109 ;;
5110 esac
5111
5112 if test x$host_vendor = xsni; then
5113 case $host in
5114 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5115 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5116 ;;
5117 esac
5118 fi
5119 fi
5120 ])
5121 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5122 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5123
5124 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5125
5126 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5127 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5128 _LT_DECL([], [extract_expsyms_cmds], [2],
5129 [The commands to extract the exported symbol list from a shared archive])
5130
5131 #
5132 # Do we need to explicitly link libc?
5133 #
5134 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5135 x|xyes)
5136 # Assume -lc should be added
5137 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5138
5139 if test "$enable_shared" = yes && test "$GCC" = yes; then
5140 case $_LT_TAGVAR(archive_cmds, $1) in
5141 *'~'*)
5142 # FIXME: we may have to deal with multi-command sequences.
5143 ;;
5144 '$CC '*)
5145 # Test whether the compiler implicitly links with -lc since on some
5146 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5147 # to ld, don't add -lc before -lgcc.
5148 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5149 $RM conftest*
5150 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5151
5152 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5153 soname=conftest
5154 lib=conftest
5155 libobjs=conftest.$ac_objext
5156 deplibs=
5157 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5158 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5159 compiler_flags=-v
5160 linker_flags=-v
5161 verstring=
5162 output_objdir=.
5163 libname=conftest
5164 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5165 _LT_TAGVAR(allow_undefined_flag, $1)=
5166 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5167 then
5168 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5169 else
5170 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5171 fi
5172 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5173 else
5174 cat conftest.err 1>&5
5175 fi
5176 $RM conftest*
5177 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5178 ;;
5179 esac
5180 fi
5181 ;;
5182 esac
5183
5184 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5185 [Whether or not to add -lc for building shared libraries])
5186 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5187 [enable_shared_with_static_runtimes], [0],
5188 [Whether or not to disallow shared libs when runtime libs are static])
5189 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5190 [Compiler flag to allow reflexive dlopens])
5191 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5192 [Compiler flag to generate shared objects directly from archives])
5193 _LT_TAGDECL([], [compiler_needs_object], [1],
5194 [Whether the compiler copes with passing no objects directly])
5195 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5196 [Create an old-style archive from a shared archive])
5197 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5198 [Create a temporary old-style archive to link instead of a shared archive])
5199 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5200 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5201 _LT_TAGDECL([], [module_cmds], [2],
5202 [Commands used to build a loadable module if different from building
5203 a shared archive.])
5204 _LT_TAGDECL([], [module_expsym_cmds], [2])
5205 _LT_TAGDECL([], [with_gnu_ld], [1],
5206 [Whether we are building with GNU ld or not])
5207 _LT_TAGDECL([], [allow_undefined_flag], [1],
5208 [Flag that allows shared libraries with undefined symbols to be built])
5209 _LT_TAGDECL([], [no_undefined_flag], [1],
5210 [Flag that enforces no undefined symbols])
5211 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5212 [Flag to hardcode $libdir into a binary during linking.
5213 This must work even if $libdir does not exist])
5214 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5215 [[If ld is used when linking, flag to hardcode $libdir into a binary
5216 during linking. This must work even if $libdir does not exist]])
5217 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5218 [Whether we need a single "-rpath" flag with a separated argument])
5219 _LT_TAGDECL([], [hardcode_direct], [0],
5220 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5221 DIR into the resulting binary])
5222 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5223 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5224 DIR into the resulting binary and the resulting library dependency is
5225 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5226 library is relocated])
5227 _LT_TAGDECL([], [hardcode_minus_L], [0],
5228 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5229 into the resulting binary])
5230 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5231 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5232 into the resulting binary])
5233 _LT_TAGDECL([], [hardcode_automatic], [0],
5234 [Set to "yes" if building a shared library automatically hardcodes DIR
5235 into the library and all subsequent libraries and executables linked
5236 against it])
5237 _LT_TAGDECL([], [inherit_rpath], [0],
5238 [Set to yes if linker adds runtime paths of dependent libraries
5239 to runtime path list])
5240 _LT_TAGDECL([], [link_all_deplibs], [0],
5241 [Whether libtool must link a program against all its dependency libraries])
5242 _LT_TAGDECL([], [fix_srcfile_path], [1],
5243 [Fix the shell variable $srcfile for the compiler])
5244 _LT_TAGDECL([], [always_export_symbols], [0],
5245 [Set to "yes" if exported symbols are required])
5246 _LT_TAGDECL([], [export_symbols_cmds], [2],
5247 [The commands to list exported symbols])
5248 _LT_TAGDECL([], [exclude_expsyms], [1],
5249 [Symbols that should not be listed in the preloaded symbols])
5250 _LT_TAGDECL([], [include_expsyms], [1],
5251 [Symbols that must always be exported])
5252 _LT_TAGDECL([], [prelink_cmds], [2],
5253 [Commands necessary for linking programs (against libraries) with templates])
5254 _LT_TAGDECL([], [file_list_spec], [1],
5255 [Specify filename containing input files])
5256 dnl FIXME: Not yet implemented
5257 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5258 dnl [Compiler flag to generate thread safe objects])
5259 ])# _LT_LINKER_SHLIBS
5260
5261
5262 # _LT_LANG_C_CONFIG([TAG])
5263 # ------------------------
5264 # Ensure that the configuration variables for a C compiler are suitably
5265 # defined. These variables are subsequently used by _LT_CONFIG to write
5266 # the compiler configuration to `libtool'.
5267 m4_defun([_LT_LANG_C_CONFIG],
5268 [m4_require([_LT_DECL_EGREP])dnl
5269 lt_save_CC="$CC"
5270 AC_LANG_PUSH(C)
5271
5272 # Source file extension for C test sources.
5273 ac_ext=c
5274
5275 # Object file extension for compiled C test sources.
5276 objext=o
5277 _LT_TAGVAR(objext, $1)=$objext
5278
5279 # Code to be used in simple compile tests
5280 lt_simple_compile_test_code="int some_variable = 0;"
5281
5282 # Code to be used in simple link tests
5283 lt_simple_link_test_code='int main(){return(0);}'
5284
5285 _LT_TAG_COMPILER
5286 # Save the default compiler, since it gets overwritten when the other
5287 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5288 compiler_DEFAULT=$CC
5289
5290 # save warnings/boilerplate of simple test code
5291 _LT_COMPILER_BOILERPLATE
5292 _LT_LINKER_BOILERPLATE
5293
5294 if test -n "$compiler"; then
5295 _LT_COMPILER_NO_RTTI($1)
5296 _LT_COMPILER_PIC($1)
5297 _LT_COMPILER_C_O($1)
5298 _LT_COMPILER_FILE_LOCKS($1)
5299 _LT_LINKER_SHLIBS($1)
5300 _LT_SYS_DYNAMIC_LINKER($1)
5301 _LT_LINKER_HARDCODE_LIBPATH($1)
5302 LT_SYS_DLOPEN_SELF
5303 _LT_CMD_STRIPLIB
5304
5305 # Report which library types will actually be built
5306 AC_MSG_CHECKING([if libtool supports shared libraries])
5307 AC_MSG_RESULT([$can_build_shared])
5308
5309 AC_MSG_CHECKING([whether to build shared libraries])
5310 test "$can_build_shared" = "no" && enable_shared=no
5311
5312 # On AIX, shared libraries and static libraries use the same namespace, and
5313 # are all built from PIC.
5314 case $host_os in
5315 aix3*)
5316 test "$enable_shared" = yes && enable_static=no
5317 if test -n "$RANLIB"; then
5318 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5319 postinstall_cmds='$RANLIB $lib'
5320 fi
5321 ;;
5322
5323 aix[[4-9]]*)
5324 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5325 test "$enable_shared" = yes && enable_static=no
5326 fi
5327 ;;
5328 esac
5329 AC_MSG_RESULT([$enable_shared])
5330
5331 AC_MSG_CHECKING([whether to build static libraries])
5332 # Make sure either enable_shared or enable_static is yes.
5333 test "$enable_shared" = yes || enable_static=yes
5334 AC_MSG_RESULT([$enable_static])
5335
5336 _LT_CONFIG($1)
5337 fi
5338 AC_LANG_POP
5339 CC="$lt_save_CC"
5340 ])# _LT_LANG_C_CONFIG
5341
5342
5343 # _LT_PROG_CXX
5344 # ------------
5345 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5346 # compiler, we have our own version here.
5347 m4_defun([_LT_PROG_CXX],
5348 [
5349 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5350 AC_PROG_CXX
5351 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5352 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5353 (test "X$CXX" != "Xg++"))) ; then
5354 AC_PROG_CXXCPP
5355 else
5356 _lt_caught_CXX_error=yes
5357 fi
5358 popdef([AC_MSG_ERROR])
5359 ])# _LT_PROG_CXX
5360
5361 dnl aclocal-1.4 backwards compatibility:
5362 dnl AC_DEFUN([_LT_PROG_CXX], [])
5363
5364
5365 # _LT_LANG_CXX_CONFIG([TAG])
5366 # --------------------------
5367 # Ensure that the configuration variables for a C++ compiler are suitably
5368 # defined. These variables are subsequently used by _LT_CONFIG to write
5369 # the compiler configuration to `libtool'.
5370 m4_defun([_LT_LANG_CXX_CONFIG],
5371 [AC_REQUIRE([_LT_PROG_CXX])dnl
5372 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5373 m4_require([_LT_DECL_EGREP])dnl
5374
5375 AC_LANG_PUSH(C++)
5376 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5377 _LT_TAGVAR(allow_undefined_flag, $1)=
5378 _LT_TAGVAR(always_export_symbols, $1)=no
5379 _LT_TAGVAR(archive_expsym_cmds, $1)=
5380 _LT_TAGVAR(compiler_needs_object, $1)=no
5381 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5382 _LT_TAGVAR(hardcode_direct, $1)=no
5383 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5384 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5385 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5386 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5387 _LT_TAGVAR(hardcode_minus_L, $1)=no
5388 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5389 _LT_TAGVAR(hardcode_automatic, $1)=no
5390 _LT_TAGVAR(inherit_rpath, $1)=no
5391 _LT_TAGVAR(module_cmds, $1)=
5392 _LT_TAGVAR(module_expsym_cmds, $1)=
5393 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5394 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5395 _LT_TAGVAR(no_undefined_flag, $1)=
5396 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5397 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5398
5399 # Source file extension for C++ test sources.
5400 ac_ext=cpp
5401
5402 # Object file extension for compiled C++ test sources.
5403 objext=o
5404 _LT_TAGVAR(objext, $1)=$objext
5405
5406 # No sense in running all these tests if we already determined that
5407 # the CXX compiler isn't working. Some variables (like enable_shared)
5408 # are currently assumed to apply to all compilers on this platform,
5409 # and will be corrupted by setting them based on a non-working compiler.
5410 if test "$_lt_caught_CXX_error" != yes; then
5411 # Code to be used in simple compile tests
5412 lt_simple_compile_test_code="int some_variable = 0;"
5413
5414 # Code to be used in simple link tests
5415 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5416
5417 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5418 _LT_TAG_COMPILER
5419
5420 # save warnings/boilerplate of simple test code
5421 _LT_COMPILER_BOILERPLATE
5422 _LT_LINKER_BOILERPLATE
5423
5424 # Allow CC to be a program name with arguments.
5425 lt_save_CC=$CC
5426 lt_save_LD=$LD
5427 lt_save_GCC=$GCC
5428 GCC=$GXX
5429 lt_save_with_gnu_ld=$with_gnu_ld
5430 lt_save_path_LD=$lt_cv_path_LD
5431 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5432 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5433 else
5434 $as_unset lt_cv_prog_gnu_ld
5435 fi
5436 if test -n "${lt_cv_path_LDCXX+set}"; then
5437 lt_cv_path_LD=$lt_cv_path_LDCXX
5438 else
5439 $as_unset lt_cv_path_LD
5440 fi
5441 test -z "${LDCXX+set}" || LD=$LDCXX
5442 CC=${CXX-"c++"}
5443 compiler=$CC
5444 _LT_TAGVAR(compiler, $1)=$CC
5445 _LT_CC_BASENAME([$compiler])
5446
5447 if test -n "$compiler"; then
5448 # We don't want -fno-exception when compiling C++ code, so set the
5449 # no_builtin_flag separately
5450 if test "$GXX" = yes; then
5451 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5452 else
5453 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5454 fi
5455
5456 if test "$GXX" = yes; then
5457 # Set up default GNU C++ configuration
5458
5459 LT_PATH_LD
5460
5461 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5462 # archiving commands below assume that GNU ld is being used.
5463 if test "$with_gnu_ld" = yes; then
5464 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5465 _LT_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'
5466
5467 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5468 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5469
5470 # If archive_cmds runs LD, not CC, wlarc should be empty
5471 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5472 # investigate it a little bit more. (MM)
5473 wlarc='${wl}'
5474
5475 # ancient GNU ld didn't support --whole-archive et. al.
5476 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5477 $GREP 'no-whole-archive' > /dev/null; then
5478 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5479 else
5480 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5481 fi
5482 else
5483 with_gnu_ld=no
5484 wlarc=
5485
5486 # A generic and very simple default shared library creation
5487 # command for GNU C++ for the case where it uses the native
5488 # linker, instead of GNU ld. If possible, this setting should
5489 # overridden to take advantage of the native linker features on
5490 # the platform it is being used on.
5491 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5492 fi
5493
5494 # Commands to make compiler produce verbose output that lists
5495 # what "hidden" libraries, object files and flags are used when
5496 # linking a shared library.
5497 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5498
5499 else
5500 GXX=no
5501 with_gnu_ld=no
5502 wlarc=
5503 fi
5504
5505 # PORTME: fill in a description of your system's C++ link characteristics
5506 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5507 _LT_TAGVAR(ld_shlibs, $1)=yes
5508 case $host_os in
5509 aix3*)
5510 # FIXME: insert proper C++ library support
5511 _LT_TAGVAR(ld_shlibs, $1)=no
5512 ;;
5513 aix[[4-9]]*)
5514 if test "$host_cpu" = ia64; then
5515 # On IA64, the linker does run time linking by default, so we don't
5516 # have to do anything special.
5517 aix_use_runtimelinking=no
5518 exp_sym_flag='-Bexport'
5519 no_entry_flag=""
5520 else
5521 aix_use_runtimelinking=no
5522
5523 # Test if we are trying to use run time linking or normal
5524 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5525 # need to do runtime linking.
5526 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5527 for ld_flag in $LDFLAGS; do
5528 case $ld_flag in
5529 *-brtl*)
5530 aix_use_runtimelinking=yes
5531 break
5532 ;;
5533 esac
5534 done
5535 ;;
5536 esac
5537
5538 exp_sym_flag='-bexport'
5539 no_entry_flag='-bnoentry'
5540 fi
5541
5542 # When large executables or shared objects are built, AIX ld can
5543 # have problems creating the table of contents. If linking a library
5544 # or program results in "error TOC overflow" add -mminimal-toc to
5545 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5546 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5547
5548 _LT_TAGVAR(archive_cmds, $1)=''
5549 _LT_TAGVAR(hardcode_direct, $1)=yes
5550 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5551 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5552 _LT_TAGVAR(link_all_deplibs, $1)=yes
5553 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5554
5555 if test "$GXX" = yes; then
5556 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5557 # We only want to do this on AIX 4.2 and lower, the check
5558 # below for broken collect2 doesn't work under 4.3+
5559 collect2name=`${CC} -print-prog-name=collect2`
5560 if test -f "$collect2name" &&
5561 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5562 then
5563 # We have reworked collect2
5564 :
5565 else
5566 # We have old collect2
5567 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5568 # It fails to find uninstalled libraries when the uninstalled
5569 # path is not listed in the libpath. Setting hardcode_minus_L
5570 # to unsupported forces relinking
5571 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5572 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5573 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5574 fi
5575 esac
5576 shared_flag='-shared'
5577 if test "$aix_use_runtimelinking" = yes; then
5578 shared_flag="$shared_flag "'${wl}-G'
5579 fi
5580 else
5581 # not using gcc
5582 if test "$host_cpu" = ia64; then
5583 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5584 # chokes on -Wl,-G. The following line is correct:
5585 shared_flag='-G'
5586 else
5587 if test "$aix_use_runtimelinking" = yes; then
5588 shared_flag='${wl}-G'
5589 else
5590 shared_flag='${wl}-bM:SRE'
5591 fi
5592 fi
5593 fi
5594
5595 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5596 # It seems that -bexpall does not export symbols beginning with
5597 # underscore (_), so it is better to generate a list of symbols to
5598 # export.
5599 _LT_TAGVAR(always_export_symbols, $1)=yes
5600 if test "$aix_use_runtimelinking" = yes; then
5601 # Warning - without using the other runtime loading flags (-brtl),
5602 # -berok will link without error, but may produce a broken library.
5603 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5604 # Determine the default libpath from the value encoded in an empty
5605 # executable.
5606 _LT_SYS_MODULE_PATH_AIX
5607 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5608
5609 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5610 else
5611 if test "$host_cpu" = ia64; then
5612 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5613 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5614 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5615 else
5616 # Determine the default libpath from the value encoded in an
5617 # empty executable.
5618 _LT_SYS_MODULE_PATH_AIX
5619 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5620 # Warning - without using the other run time loading flags,
5621 # -berok will link without error, but may produce a broken library.
5622 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5623 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5624 # Exported symbols can be pulled into shared objects from archives
5625 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5626 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5627 # This is similar to how AIX traditionally builds its shared
5628 # libraries.
5629 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5630 fi
5631 fi
5632 ;;
5633
5634 beos*)
5635 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5636 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5637 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5638 # support --undefined. This deserves some investigation. FIXME
5639 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5640 else
5641 _LT_TAGVAR(ld_shlibs, $1)=no
5642 fi
5643 ;;
5644
5645 chorus*)
5646 case $cc_basename in
5647 *)
5648 # FIXME: insert proper C++ library support
5649 _LT_TAGVAR(ld_shlibs, $1)=no
5650 ;;
5651 esac
5652 ;;
5653
5654 cygwin* | mingw* | pw32* | cegcc*)
5655 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5656 # as there is no search path for DLLs.
5657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5658 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5659 _LT_TAGVAR(always_export_symbols, $1)=no
5660 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5661
5662 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5663 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5664 # If the export-symbols file already is a .def file (1st line
5665 # is EXPORTS), use it as is; otherwise, prepend...
5666 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5667 cp $export_symbols $output_objdir/$soname.def;
5668 else
5669 echo EXPORTS > $output_objdir/$soname.def;
5670 cat $export_symbols >> $output_objdir/$soname.def;
5671 fi~
5672 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5673 else
5674 _LT_TAGVAR(ld_shlibs, $1)=no
5675 fi
5676 ;;
5677 darwin* | rhapsody*)
5678 _LT_DARWIN_LINKER_FEATURES($1)
5679 ;;
5680
5681 dgux*)
5682 case $cc_basename in
5683 ec++*)
5684 # FIXME: insert proper C++ library support
5685 _LT_TAGVAR(ld_shlibs, $1)=no
5686 ;;
5687 ghcx*)
5688 # Green Hills C++ Compiler
5689 # FIXME: insert proper C++ library support
5690 _LT_TAGVAR(ld_shlibs, $1)=no
5691 ;;
5692 *)
5693 # FIXME: insert proper C++ library support
5694 _LT_TAGVAR(ld_shlibs, $1)=no
5695 ;;
5696 esac
5697 ;;
5698
5699 freebsd[[12]]*)
5700 # C++ shared libraries reported to be fairly broken before
5701 # switch to ELF
5702 _LT_TAGVAR(ld_shlibs, $1)=no
5703 ;;
5704
5705 freebsd-elf*)
5706 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5707 ;;
5708
5709 freebsd* | dragonfly*)
5710 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5711 # conventions
5712 _LT_TAGVAR(ld_shlibs, $1)=yes
5713 ;;
5714
5715 gnu*)
5716 ;;
5717
5718 hpux9*)
5719 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5720 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5721 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5722 _LT_TAGVAR(hardcode_direct, $1)=yes
5723 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5724 # but as the default
5725 # location of the library.
5726
5727 case $cc_basename in
5728 CC*)
5729 # FIXME: insert proper C++ library support
5730 _LT_TAGVAR(ld_shlibs, $1)=no
5731 ;;
5732 aCC*)
5733 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5734 # Commands to make compiler produce verbose output that lists
5735 # what "hidden" libraries, object files and flags are used when
5736 # linking a shared library.
5737 #
5738 # There doesn't appear to be a way to prevent this compiler from
5739 # explicitly linking system object files so we need to strip them
5740 # from the output so that they don't get included in the library
5741 # dependencies.
5742 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5743 ;;
5744 *)
5745 if test "$GXX" = yes; then
5746 _LT_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'
5747 else
5748 # FIXME: insert proper C++ library support
5749 _LT_TAGVAR(ld_shlibs, $1)=no
5750 fi
5751 ;;
5752 esac
5753 ;;
5754
5755 hpux10*|hpux11*)
5756 if test $with_gnu_ld = no; then
5757 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5758 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5759
5760 case $host_cpu in
5761 hppa*64*|ia64*)
5762 ;;
5763 *)
5764 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5765 ;;
5766 esac
5767 fi
5768 case $host_cpu in
5769 hppa*64*|ia64*)
5770 _LT_TAGVAR(hardcode_direct, $1)=no
5771 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5772 ;;
5773 *)
5774 _LT_TAGVAR(hardcode_direct, $1)=yes
5775 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5776 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5777 # but as the default
5778 # location of the library.
5779 ;;
5780 esac
5781
5782 case $cc_basename in
5783 CC*)
5784 # FIXME: insert proper C++ library support
5785 _LT_TAGVAR(ld_shlibs, $1)=no
5786 ;;
5787 aCC*)
5788 case $host_cpu in
5789 hppa*64*)
5790 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5791 ;;
5792 ia64*)
5793 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5794 ;;
5795 *)
5796 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5797 ;;
5798 esac
5799 # Commands to make compiler produce verbose output that lists
5800 # what "hidden" libraries, object files and flags are used when
5801 # linking a shared library.
5802 #
5803 # There doesn't appear to be a way to prevent this compiler from
5804 # explicitly linking system object files so we need to strip them
5805 # from the output so that they don't get included in the library
5806 # dependencies.
5807 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 "X$list" | $Xsed'
5808 ;;
5809 *)
5810 if test "$GXX" = yes; then
5811 if test $with_gnu_ld = no; then
5812 case $host_cpu in
5813 hppa*64*)
5814 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5815 ;;
5816 ia64*)
5817 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5818 ;;
5819 *)
5820 _LT_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'
5821 ;;
5822 esac
5823 fi
5824 else
5825 # FIXME: insert proper C++ library support
5826 _LT_TAGVAR(ld_shlibs, $1)=no
5827 fi
5828 ;;
5829 esac
5830 ;;
5831
5832 interix[[3-9]]*)
5833 _LT_TAGVAR(hardcode_direct, $1)=no
5834 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5836 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5837 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5838 # Instead, shared libraries are loaded at an image base (0x10000000 by
5839 # default) and relocated if they conflict, which is a slow very memory
5840 # consuming and fragmenting process. To avoid this, we pick a random,
5841 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5842 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5844 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5845 ;;
5846 irix5* | irix6*)
5847 case $cc_basename in
5848 CC*)
5849 # SGI C++
5850 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5851
5852 # Archives containing C++ object files must be created using
5853 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5854 # necessary to make sure instantiated templates are included
5855 # in the archive.
5856 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5857 ;;
5858 *)
5859 if test "$GXX" = yes; then
5860 if test "$with_gnu_ld" = no; then
5861 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5862 else
5863 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
5864 fi
5865 fi
5866 _LT_TAGVAR(link_all_deplibs, $1)=yes
5867 ;;
5868 esac
5869 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5870 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5871 _LT_TAGVAR(inherit_rpath, $1)=yes
5872 ;;
5873
5874 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5875 case $cc_basename in
5876 KCC*)
5877 # Kuck and Associates, Inc. (KAI) C++ Compiler
5878
5879 # KCC will only create a shared library if the output file
5880 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5881 # to its proper name (with version) after linking.
5882 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5883 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
5884 # Commands to make compiler produce verbose output that lists
5885 # what "hidden" libraries, object files and flags are used when
5886 # linking a shared library.
5887 #
5888 # There doesn't appear to be a way to prevent this compiler from
5889 # explicitly linking system object files so we need to strip them
5890 # from the output so that they don't get included in the library
5891 # dependencies.
5892 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 "X$list" | $Xsed'
5893
5894 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5895 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5896
5897 # Archives containing C++ object files must be created using
5898 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5899 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5900 ;;
5901 icpc* | ecpc* )
5902 # Intel C++
5903 with_gnu_ld=yes
5904 # version 8.0 and above of icpc choke on multiply defined symbols
5905 # if we add $predep_objects and $postdep_objects, however 7.1 and
5906 # earlier do not add the objects themselves.
5907 case `$CC -V 2>&1` in
5908 *"Version 7."*)
5909 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5910 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5911 ;;
5912 *) # Version 8.0 or newer
5913 tmp_idyn=
5914 case $host_cpu in
5915 ia64*) tmp_idyn=' -i_dynamic';;
5916 esac
5917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5918 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5919 ;;
5920 esac
5921 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5922 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5923 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5924 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5925 ;;
5926 pgCC* | pgcpp*)
5927 # Portland Group C++ compiler
5928 case `$CC -V` in
5929 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5930 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5931 rm -rf $tpldir~
5932 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5933 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5934 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5935 rm -rf $tpldir~
5936 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5937 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5938 $RANLIB $oldlib'
5939 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5940 rm -rf $tpldir~
5941 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5942 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5943 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5944 rm -rf $tpldir~
5945 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5946 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5947 ;;
5948 *) # Version 6 will use weak symbols
5949 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5950 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5951 ;;
5952 esac
5953
5954 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5955 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5956 _LT_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'
5957 ;;
5958 cxx*)
5959 # Compaq C++
5960 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5961 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
5962
5963 runpath_var=LD_RUN_PATH
5964 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5965 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5966
5967 # Commands to make compiler produce verbose output that lists
5968 # what "hidden" libraries, object files and flags are used when
5969 # linking a shared library.
5970 #
5971 # There doesn't appear to be a way to prevent this compiler from
5972 # explicitly linking system object files so we need to strip them
5973 # from the output so that they don't get included in the library
5974 # dependencies.
5975 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
5976 ;;
5977 xl*)
5978 # IBM XL 8.0 on PPC, with GNU ld
5979 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5980 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5981 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5982 if test "x$supports_anon_versioning" = xyes; then
5983 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5984 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5985 echo "local: *; };" >> $output_objdir/$libname.ver~
5986 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5987 fi
5988 ;;
5989 *)
5990 case `$CC -V 2>&1 | sed 5q` in
5991 *Sun\ C*)
5992 # Sun C++ 5.9
5993 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5994 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5995 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
5996 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5997 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5998 _LT_TAGVAR(compiler_needs_object, $1)=yes
5999
6000 # Not sure whether something based on
6001 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6002 # would be better.
6003 output_verbose_link_cmd='echo'
6004
6005 # Archives containing C++ object files must be created using
6006 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6007 # necessary to make sure instantiated templates are included
6008 # in the archive.
6009 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6010 ;;
6011 esac
6012 ;;
6013 esac
6014 ;;
6015
6016 lynxos*)
6017 # FIXME: insert proper C++ library support
6018 _LT_TAGVAR(ld_shlibs, $1)=no
6019 ;;
6020
6021 m88k*)
6022 # FIXME: insert proper C++ library support
6023 _LT_TAGVAR(ld_shlibs, $1)=no
6024 ;;
6025
6026 mvs*)
6027 case $cc_basename in
6028 cxx*)
6029 # FIXME: insert proper C++ library support
6030 _LT_TAGVAR(ld_shlibs, $1)=no
6031 ;;
6032 *)
6033 # FIXME: insert proper C++ library support
6034 _LT_TAGVAR(ld_shlibs, $1)=no
6035 ;;
6036 esac
6037 ;;
6038
6039 netbsd*)
6040 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6041 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6042 wlarc=
6043 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6044 _LT_TAGVAR(hardcode_direct, $1)=yes
6045 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6046 fi
6047 # Workaround some broken pre-1.5 toolchains
6048 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6049 ;;
6050
6051 *nto* | *qnx*)
6052 _LT_TAGVAR(ld_shlibs, $1)=yes
6053 ;;
6054
6055 openbsd2*)
6056 # C++ shared libraries are fairly broken
6057 _LT_TAGVAR(ld_shlibs, $1)=no
6058 ;;
6059
6060 openbsd*)
6061 if test -f /usr/libexec/ld.so; then
6062 _LT_TAGVAR(hardcode_direct, $1)=yes
6063 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6064 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6065 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6066 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6067 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6068 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6069 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6070 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6071 fi
6072 output_verbose_link_cmd=echo
6073 else
6074 _LT_TAGVAR(ld_shlibs, $1)=no
6075 fi
6076 ;;
6077
6078 osf3* | osf4* | osf5*)
6079 case $cc_basename in
6080 KCC*)
6081 # Kuck and Associates, Inc. (KAI) C++ Compiler
6082
6083 # KCC will only create a shared library if the output file
6084 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6085 # to its proper name (with version) after linking.
6086 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6087
6088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6089 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6090
6091 # Archives containing C++ object files must be created using
6092 # the KAI C++ compiler.
6093 case $host in
6094 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6095 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6096 esac
6097 ;;
6098 RCC*)
6099 # Rational C++ 2.4.1
6100 # FIXME: insert proper C++ library support
6101 _LT_TAGVAR(ld_shlibs, $1)=no
6102 ;;
6103 cxx*)
6104 case $host in
6105 osf3*)
6106 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6107 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6108 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6109 ;;
6110 *)
6111 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6112 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6113 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6114 echo "-hidden">> $lib.exp~
6115 $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6116 $RM $lib.exp'
6117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6118 ;;
6119 esac
6120
6121 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6122
6123 # Commands to make compiler produce verbose output that lists
6124 # what "hidden" libraries, object files and flags are used when
6125 # linking a shared library.
6126 #
6127 # There doesn't appear to be a way to prevent this compiler from
6128 # explicitly linking system object files so we need to strip them
6129 # from the output so that they don't get included in the library
6130 # dependencies.
6131 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
6132 ;;
6133 *)
6134 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6135 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6136 case $host in
6137 osf3*)
6138 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6139 ;;
6140 *)
6141 _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6142 ;;
6143 esac
6144
6145 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6146 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6147
6148 # Commands to make compiler produce verbose output that lists
6149 # what "hidden" libraries, object files and flags are used when
6150 # linking a shared library.
6151 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6152
6153 else
6154 # FIXME: insert proper C++ library support
6155 _LT_TAGVAR(ld_shlibs, $1)=no
6156 fi
6157 ;;
6158 esac
6159 ;;
6160
6161 psos*)
6162 # FIXME: insert proper C++ library support
6163 _LT_TAGVAR(ld_shlibs, $1)=no
6164 ;;
6165
6166 sunos4*)
6167 case $cc_basename in
6168 CC*)
6169 # Sun C++ 4.x
6170 # FIXME: insert proper C++ library support
6171 _LT_TAGVAR(ld_shlibs, $1)=no
6172 ;;
6173 lcc*)
6174 # Lucid
6175 # FIXME: insert proper C++ library support
6176 _LT_TAGVAR(ld_shlibs, $1)=no
6177 ;;
6178 *)
6179 # FIXME: insert proper C++ library support
6180 _LT_TAGVAR(ld_shlibs, $1)=no
6181 ;;
6182 esac
6183 ;;
6184
6185 solaris*)
6186 case $cc_basename in
6187 CC*)
6188 # Sun C++ 4.2, 5.x and Centerline C++
6189 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6190 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6191 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6192 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6193 $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'
6194
6195 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6196 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6197 case $host_os in
6198 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6199 *)
6200 # The compiler driver will combine and reorder linker options,
6201 # but understands `-z linker_flag'.
6202 # Supported since Solaris 2.6 (maybe 2.5.1?)
6203 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6204 ;;
6205 esac
6206 _LT_TAGVAR(link_all_deplibs, $1)=yes
6207
6208 output_verbose_link_cmd='echo'
6209
6210 # Archives containing C++ object files must be created using
6211 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6212 # necessary to make sure instantiated templates are included
6213 # in the archive.
6214 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6215 ;;
6216 gcx*)
6217 # Green Hills C++ Compiler
6218 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6219
6220 # The C++ compiler must be used to create the archive.
6221 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6222 ;;
6223 *)
6224 # GNU C++ compiler with Solaris linker
6225 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6226 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6227 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6228 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6229 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6230 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6231
6232 # Commands to make compiler produce verbose output that lists
6233 # what "hidden" libraries, object files and flags are used when
6234 # linking a shared library.
6235 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6236 else
6237 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6238 # platform.
6239 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6240 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6241 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6242
6243 # Commands to make compiler produce verbose output that lists
6244 # what "hidden" libraries, object files and flags are used when
6245 # linking a shared library.
6246 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6247 fi
6248
6249 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6250 case $host_os in
6251 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6252 *)
6253 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6254 ;;
6255 esac
6256 fi
6257 ;;
6258 esac
6259 ;;
6260
6261 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6262 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6263 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6264 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6265 runpath_var='LD_RUN_PATH'
6266
6267 case $cc_basename in
6268 CC*)
6269 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6270 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6271 ;;
6272 *)
6273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6274 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6275 ;;
6276 esac
6277 ;;
6278
6279 sysv5* | sco3.2v5* | sco5v6*)
6280 # Note: We can NOT use -z defs as we might desire, because we do not
6281 # link with -lc, and that would cause any symbols used from libc to
6282 # always be unresolved, which means just about no library would
6283 # ever link correctly. If we're not using GNU ld we use -z text
6284 # though, which does catch some bad symbols but isn't as heavy-handed
6285 # as -z defs.
6286 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6287 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6288 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6289 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6290 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6291 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6292 _LT_TAGVAR(link_all_deplibs, $1)=yes
6293 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6294 runpath_var='LD_RUN_PATH'
6295
6296 case $cc_basename in
6297 CC*)
6298 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6299 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6300 ;;
6301 *)
6302 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6303 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6304 ;;
6305 esac
6306 ;;
6307
6308 tandem*)
6309 case $cc_basename in
6310 NCC*)
6311 # NonStop-UX NCC 3.20
6312 # FIXME: insert proper C++ library support
6313 _LT_TAGVAR(ld_shlibs, $1)=no
6314 ;;
6315 *)
6316 # FIXME: insert proper C++ library support
6317 _LT_TAGVAR(ld_shlibs, $1)=no
6318 ;;
6319 esac
6320 ;;
6321
6322 vxworks*)
6323 # FIXME: insert proper C++ library support
6324 _LT_TAGVAR(ld_shlibs, $1)=no
6325 ;;
6326
6327 *)
6328 # FIXME: insert proper C++ library support
6329 _LT_TAGVAR(ld_shlibs, $1)=no
6330 ;;
6331 esac
6332
6333 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6334 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6335
6336 _LT_TAGVAR(GCC, $1)="$GXX"
6337 _LT_TAGVAR(LD, $1)="$LD"
6338
6339 ## CAVEAT EMPTOR:
6340 ## There is no encapsulation within the following macros, do not change
6341 ## the running order or otherwise move them around unless you know exactly
6342 ## what you are doing...
6343 _LT_SYS_HIDDEN_LIBDEPS($1)
6344 _LT_COMPILER_PIC($1)
6345 _LT_COMPILER_C_O($1)
6346 _LT_COMPILER_FILE_LOCKS($1)
6347 _LT_LINKER_SHLIBS($1)
6348 _LT_SYS_DYNAMIC_LINKER($1)
6349 _LT_LINKER_HARDCODE_LIBPATH($1)
6350
6351 _LT_CONFIG($1)
6352 fi # test -n "$compiler"
6353
6354 CC=$lt_save_CC
6355 LDCXX=$LD
6356 LD=$lt_save_LD
6357 GCC=$lt_save_GCC
6358 with_gnu_ld=$lt_save_with_gnu_ld
6359 lt_cv_path_LDCXX=$lt_cv_path_LD
6360 lt_cv_path_LD=$lt_save_path_LD
6361 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6362 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6363 fi # test "$_lt_caught_CXX_error" != yes
6364
6365 AC_LANG_POP
6366 ])# _LT_LANG_CXX_CONFIG
6367
6368
6369 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6370 # ---------------------------------
6371 # Figure out "hidden" library dependencies from verbose
6372 # compiler output when linking a shared library.
6373 # Parse the compiler output and extract the necessary
6374 # objects, libraries and library flags.
6375 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6376 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6377 # Dependencies to place before and after the object being linked:
6378 _LT_TAGVAR(predep_objects, $1)=
6379 _LT_TAGVAR(postdep_objects, $1)=
6380 _LT_TAGVAR(predeps, $1)=
6381 _LT_TAGVAR(postdeps, $1)=
6382 _LT_TAGVAR(compiler_lib_search_path, $1)=
6383
6384 dnl we can't use the lt_simple_compile_test_code here,
6385 dnl because it contains code intended for an executable,
6386 dnl not a library. It's possible we should let each
6387 dnl tag define a new lt_????_link_test_code variable,
6388 dnl but it's only used here...
6389 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6390 int a;
6391 void foo (void) { a = 0; }
6392 _LT_EOF
6393 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6394 class Foo
6395 {
6396 public:
6397 Foo (void) { a = 0; }
6398 private:
6399 int a;
6400 };
6401 _LT_EOF
6402 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6403 subroutine foo
6404 implicit none
6405 integer*4 a
6406 a=0
6407 return
6408 end
6409 _LT_EOF
6410 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6411 subroutine foo
6412 implicit none
6413 integer a
6414 a=0
6415 return
6416 end
6417 _LT_EOF
6418 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6419 public class foo {
6420 private int a;
6421 public void bar (void) {
6422 a = 0;
6423 }
6424 };
6425 _LT_EOF
6426 ])
6427 dnl Parse the compiler output and extract the necessary
6428 dnl objects, libraries and library flags.
6429 if AC_TRY_EVAL(ac_compile); then
6430 # Parse the compiler output and extract the necessary
6431 # objects, libraries and library flags.
6432
6433 # Sentinel used to keep track of whether or not we are before
6434 # the conftest object file.
6435 pre_test_object_deps_done=no
6436
6437 for p in `eval "$output_verbose_link_cmd"`; do
6438 case $p in
6439
6440 -L* | -R* | -l*)
6441 # Some compilers place space between "-{L,R}" and the path.
6442 # Remove the space.
6443 if test $p = "-L" ||
6444 test $p = "-R"; then
6445 prev=$p
6446 continue
6447 else
6448 prev=
6449 fi
6450
6451 if test "$pre_test_object_deps_done" = no; then
6452 case $p in
6453 -L* | -R*)
6454 # Internal compiler library paths should come after those
6455 # provided the user. The postdeps already come after the
6456 # user supplied libs so there is no need to process them.
6457 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6458 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6459 else
6460 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6461 fi
6462 ;;
6463 # The "-l" case would never come before the object being
6464 # linked, so don't bother handling this case.
6465 esac
6466 else
6467 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6468 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6469 else
6470 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6471 fi
6472 fi
6473 ;;
6474
6475 *.$objext)
6476 # This assumes that the test object file only shows up
6477 # once in the compiler output.
6478 if test "$p" = "conftest.$objext"; then
6479 pre_test_object_deps_done=yes
6480 continue
6481 fi
6482
6483 if test "$pre_test_object_deps_done" = no; then
6484 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6485 _LT_TAGVAR(predep_objects, $1)="$p"
6486 else
6487 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6488 fi
6489 else
6490 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6491 _LT_TAGVAR(postdep_objects, $1)="$p"
6492 else
6493 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6494 fi
6495 fi
6496 ;;
6497
6498 *) ;; # Ignore the rest.
6499
6500 esac
6501 done
6502
6503 # Clean up.
6504 rm -f a.out a.exe
6505 else
6506 echo "libtool.m4: error: problem compiling $1 test program"
6507 fi
6508
6509 $RM -f confest.$objext
6510
6511 # PORTME: override above test on systems where it is broken
6512 m4_if([$1], [CXX],
6513 [case $host_os in
6514 interix[[3-9]]*)
6515 # Interix 3.5 installs completely hosed .la files for C++, so rather than
6516 # hack all around it, let's just trust "g++" to DTRT.
6517 _LT_TAGVAR(predep_objects,$1)=
6518 _LT_TAGVAR(postdep_objects,$1)=
6519 _LT_TAGVAR(postdeps,$1)=
6520 ;;
6521
6522 linux*)
6523 case `$CC -V 2>&1 | sed 5q` in
6524 *Sun\ C*)
6525 # Sun C++ 5.9
6526
6527 # The more standards-conforming stlport4 library is
6528 # incompatible with the Cstd library. Avoid specifying
6529 # it if it's in CXXFLAGS. Ignore libCrun as
6530 # -library=stlport4 depends on it.
6531 case " $CXX $CXXFLAGS " in
6532 *" -library=stlport4 "*)
6533 solaris_use_stlport4=yes
6534 ;;
6535 esac
6536
6537 if test "$solaris_use_stlport4" != yes; then
6538 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6539 fi
6540 ;;
6541 esac
6542 ;;
6543
6544 solaris*)
6545 case $cc_basename in
6546 CC*)
6547 # The more standards-conforming stlport4 library is
6548 # incompatible with the Cstd library. Avoid specifying
6549 # it if it's in CXXFLAGS. Ignore libCrun as
6550 # -library=stlport4 depends on it.
6551 case " $CXX $CXXFLAGS " in
6552 *" -library=stlport4 "*)
6553 solaris_use_stlport4=yes
6554 ;;
6555 esac
6556
6557 # Adding this requires a known-good setup of shared libraries for
6558 # Sun compiler versions before 5.6, else PIC objects from an old
6559 # archive will be linked into the output, leading to subtle bugs.
6560 if test "$solaris_use_stlport4" != yes; then
6561 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6562 fi
6563 ;;
6564 esac
6565 ;;
6566 esac
6567 ])
6568
6569 case " $_LT_TAGVAR(postdeps, $1) " in
6570 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6571 esac
6572 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6573 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6574 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6575 fi
6576 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6577 [The directories searched by this compiler when creating a shared library])
6578 _LT_TAGDECL([], [predep_objects], [1],
6579 [Dependencies to place before and after the objects being linked to
6580 create a shared library])
6581 _LT_TAGDECL([], [postdep_objects], [1])
6582 _LT_TAGDECL([], [predeps], [1])
6583 _LT_TAGDECL([], [postdeps], [1])
6584 _LT_TAGDECL([], [compiler_lib_search_path], [1],
6585 [The library search path used internally by the compiler when linking
6586 a shared library])
6587 ])# _LT_SYS_HIDDEN_LIBDEPS
6588
6589
6590 # _LT_PROG_F77
6591 # ------------
6592 # Since AC_PROG_F77 is broken, in that it returns the empty string
6593 # if there is no fortran compiler, we have our own version here.
6594 m4_defun([_LT_PROG_F77],
6595 [
6596 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6597 AC_PROG_F77
6598 if test -z "$F77" || test "X$F77" = "Xno"; then
6599 _lt_disable_F77=yes
6600 fi
6601 popdef([AC_MSG_ERROR])
6602 ])# _LT_PROG_F77
6603
6604 dnl aclocal-1.4 backwards compatibility:
6605 dnl AC_DEFUN([_LT_PROG_F77], [])
6606
6607
6608 # _LT_LANG_F77_CONFIG([TAG])
6609 # --------------------------
6610 # Ensure that the configuration variables for a Fortran 77 compiler are
6611 # suitably defined. These variables are subsequently used by _LT_CONFIG
6612 # to write the compiler configuration to `libtool'.
6613 m4_defun([_LT_LANG_F77_CONFIG],
6614 [AC_REQUIRE([_LT_PROG_F77])dnl
6615 AC_LANG_PUSH(Fortran 77)
6616
6617 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6618 _LT_TAGVAR(allow_undefined_flag, $1)=
6619 _LT_TAGVAR(always_export_symbols, $1)=no
6620 _LT_TAGVAR(archive_expsym_cmds, $1)=
6621 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6622 _LT_TAGVAR(hardcode_direct, $1)=no
6623 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6624 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6625 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6626 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6627 _LT_TAGVAR(hardcode_minus_L, $1)=no
6628 _LT_TAGVAR(hardcode_automatic, $1)=no
6629 _LT_TAGVAR(inherit_rpath, $1)=no
6630 _LT_TAGVAR(module_cmds, $1)=
6631 _LT_TAGVAR(module_expsym_cmds, $1)=
6632 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6633 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6634 _LT_TAGVAR(no_undefined_flag, $1)=
6635 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6636 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6637
6638 # Source file extension for f77 test sources.
6639 ac_ext=f
6640
6641 # Object file extension for compiled f77 test sources.
6642 objext=o
6643 _LT_TAGVAR(objext, $1)=$objext
6644
6645 # No sense in running all these tests if we already determined that
6646 # the F77 compiler isn't working. Some variables (like enable_shared)
6647 # are currently assumed to apply to all compilers on this platform,
6648 # and will be corrupted by setting them based on a non-working compiler.
6649 if test "$_lt_disable_F77" != yes; then
6650 # Code to be used in simple compile tests
6651 lt_simple_compile_test_code="\
6652 subroutine t
6653 return
6654 end
6655 "
6656
6657 # Code to be used in simple link tests
6658 lt_simple_link_test_code="\
6659 program t
6660 end
6661 "
6662
6663 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6664 _LT_TAG_COMPILER
6665
6666 # save warnings/boilerplate of simple test code
6667 _LT_COMPILER_BOILERPLATE
6668 _LT_LINKER_BOILERPLATE
6669
6670 # Allow CC to be a program name with arguments.
6671 lt_save_CC="$CC"
6672 lt_save_GCC=$GCC
6673 CC=${F77-"f77"}
6674 compiler=$CC
6675 _LT_TAGVAR(compiler, $1)=$CC
6676 _LT_CC_BASENAME([$compiler])
6677 GCC=$G77
6678 if test -n "$compiler"; then
6679 AC_MSG_CHECKING([if libtool supports shared libraries])
6680 AC_MSG_RESULT([$can_build_shared])
6681
6682 AC_MSG_CHECKING([whether to build shared libraries])
6683 test "$can_build_shared" = "no" && enable_shared=no
6684
6685 # On AIX, shared libraries and static libraries use the same namespace, and
6686 # are all built from PIC.
6687 case $host_os in
6688 aix3*)
6689 test "$enable_shared" = yes && enable_static=no
6690 if test -n "$RANLIB"; then
6691 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6692 postinstall_cmds='$RANLIB $lib'
6693 fi
6694 ;;
6695 aix[[4-9]]*)
6696 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6697 test "$enable_shared" = yes && enable_static=no
6698 fi
6699 ;;
6700 esac
6701 AC_MSG_RESULT([$enable_shared])
6702
6703 AC_MSG_CHECKING([whether to build static libraries])
6704 # Make sure either enable_shared or enable_static is yes.
6705 test "$enable_shared" = yes || enable_static=yes
6706 AC_MSG_RESULT([$enable_static])
6707
6708 _LT_TAGVAR(GCC, $1)="$G77"
6709 _LT_TAGVAR(LD, $1)="$LD"
6710
6711 ## CAVEAT EMPTOR:
6712 ## There is no encapsulation within the following macros, do not change
6713 ## the running order or otherwise move them around unless you know exactly
6714 ## what you are doing...
6715 _LT_COMPILER_PIC($1)
6716 _LT_COMPILER_C_O($1)
6717 _LT_COMPILER_FILE_LOCKS($1)
6718 _LT_LINKER_SHLIBS($1)
6719 _LT_SYS_DYNAMIC_LINKER($1)
6720 _LT_LINKER_HARDCODE_LIBPATH($1)
6721
6722 _LT_CONFIG($1)
6723 fi # test -n "$compiler"
6724
6725 GCC=$lt_save_GCC
6726 CC="$lt_save_CC"
6727 fi # test "$_lt_disable_F77" != yes
6728
6729 AC_LANG_POP
6730 ])# _LT_LANG_F77_CONFIG
6731
6732
6733 # _LT_PROG_FC
6734 # -----------
6735 # Since AC_PROG_FC is broken, in that it returns the empty string
6736 # if there is no fortran compiler, we have our own version here.
6737 m4_defun([_LT_PROG_FC],
6738 [
6739 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6740 AC_PROG_FC
6741 if test -z "$FC" || test "X$FC" = "Xno"; then
6742 _lt_disable_FC=yes
6743 fi
6744 popdef([AC_MSG_ERROR])
6745 ])# _LT_PROG_FC
6746
6747 dnl aclocal-1.4 backwards compatibility:
6748 dnl AC_DEFUN([_LT_PROG_FC], [])
6749
6750
6751 # _LT_LANG_FC_CONFIG([TAG])
6752 # -------------------------
6753 # Ensure that the configuration variables for a Fortran compiler are
6754 # suitably defined. These variables are subsequently used by _LT_CONFIG
6755 # to write the compiler configuration to `libtool'.
6756 m4_defun([_LT_LANG_FC_CONFIG],
6757 [AC_REQUIRE([_LT_PROG_FC])dnl
6758 AC_LANG_PUSH(Fortran)
6759
6760 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6761 _LT_TAGVAR(allow_undefined_flag, $1)=
6762 _LT_TAGVAR(always_export_symbols, $1)=no
6763 _LT_TAGVAR(archive_expsym_cmds, $1)=
6764 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6765 _LT_TAGVAR(hardcode_direct, $1)=no
6766 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6767 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6768 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6769 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6770 _LT_TAGVAR(hardcode_minus_L, $1)=no
6771 _LT_TAGVAR(hardcode_automatic, $1)=no
6772 _LT_TAGVAR(inherit_rpath, $1)=no
6773 _LT_TAGVAR(module_cmds, $1)=
6774 _LT_TAGVAR(module_expsym_cmds, $1)=
6775 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6776 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6777 _LT_TAGVAR(no_undefined_flag, $1)=
6778 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6779 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6780
6781 # Source file extension for fc test sources.
6782 ac_ext=${ac_fc_srcext-f}
6783
6784 # Object file extension for compiled fc test sources.
6785 objext=o
6786 _LT_TAGVAR(objext, $1)=$objext
6787
6788 # No sense in running all these tests if we already determined that
6789 # the FC compiler isn't working. Some variables (like enable_shared)
6790 # are currently assumed to apply to all compilers on this platform,
6791 # and will be corrupted by setting them based on a non-working compiler.
6792 if test "$_lt_disable_FC" != yes; then
6793 # Code to be used in simple compile tests
6794 lt_simple_compile_test_code="\
6795 subroutine t
6796 return
6797 end
6798 "
6799
6800 # Code to be used in simple link tests
6801 lt_simple_link_test_code="\
6802 program t
6803 end
6804 "
6805
6806 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6807 _LT_TAG_COMPILER
6808
6809 # save warnings/boilerplate of simple test code
6810 _LT_COMPILER_BOILERPLATE
6811 _LT_LINKER_BOILERPLATE
6812
6813 # Allow CC to be a program name with arguments.
6814 lt_save_CC="$CC"
6815 lt_save_GCC=$GCC
6816 CC=${FC-"f95"}
6817 compiler=$CC
6818 GCC=$ac_cv_fc_compiler_gnu
6819
6820 _LT_TAGVAR(compiler, $1)=$CC
6821 _LT_CC_BASENAME([$compiler])
6822
6823 if test -n "$compiler"; then
6824 AC_MSG_CHECKING([if libtool supports shared libraries])
6825 AC_MSG_RESULT([$can_build_shared])
6826
6827 AC_MSG_CHECKING([whether to build shared libraries])
6828 test "$can_build_shared" = "no" && enable_shared=no
6829
6830 # On AIX, shared libraries and static libraries use the same namespace, and
6831 # are all built from PIC.
6832 case $host_os in
6833 aix3*)
6834 test "$enable_shared" = yes && enable_static=no
6835 if test -n "$RANLIB"; then
6836 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6837 postinstall_cmds='$RANLIB $lib'
6838 fi
6839 ;;
6840 aix[[4-9]]*)
6841 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6842 test "$enable_shared" = yes && enable_static=no
6843 fi
6844 ;;
6845 esac
6846 AC_MSG_RESULT([$enable_shared])
6847
6848 AC_MSG_CHECKING([whether to build static libraries])
6849 # Make sure either enable_shared or enable_static is yes.
6850 test "$enable_shared" = yes || enable_static=yes
6851 AC_MSG_RESULT([$enable_static])
6852
6853 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6854 _LT_TAGVAR(LD, $1)="$LD"
6855
6856 ## CAVEAT EMPTOR:
6857 ## There is no encapsulation within the following macros, do not change
6858 ## the running order or otherwise move them around unless you know exactly
6859 ## what you are doing...
6860 _LT_SYS_HIDDEN_LIBDEPS($1)
6861 _LT_COMPILER_PIC($1)
6862 _LT_COMPILER_C_O($1)
6863 _LT_COMPILER_FILE_LOCKS($1)
6864 _LT_LINKER_SHLIBS($1)
6865 _LT_SYS_DYNAMIC_LINKER($1)
6866 _LT_LINKER_HARDCODE_LIBPATH($1)
6867
6868 _LT_CONFIG($1)
6869 fi # test -n "$compiler"
6870
6871 GCC=$lt_save_GCC
6872 CC="$lt_save_CC"
6873 fi # test "$_lt_disable_FC" != yes
6874
6875 AC_LANG_POP
6876 ])# _LT_LANG_FC_CONFIG
6877
6878
6879 # _LT_LANG_GCJ_CONFIG([TAG])
6880 # --------------------------
6881 # Ensure that the configuration variables for the GNU Java Compiler compiler
6882 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6883 # to write the compiler configuration to `libtool'.
6884 m4_defun([_LT_LANG_GCJ_CONFIG],
6885 [AC_REQUIRE([LT_PROG_GCJ])dnl
6886 AC_LANG_SAVE
6887
6888 # Source file extension for Java test sources.
6889 ac_ext=java
6890
6891 # Object file extension for compiled Java test sources.
6892 objext=o
6893 _LT_TAGVAR(objext, $1)=$objext
6894
6895 # Code to be used in simple compile tests
6896 lt_simple_compile_test_code="class foo {}"
6897
6898 # Code to be used in simple link tests
6899 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6900
6901 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6902 _LT_TAG_COMPILER
6903
6904 # save warnings/boilerplate of simple test code
6905 _LT_COMPILER_BOILERPLATE
6906 _LT_LINKER_BOILERPLATE
6907
6908 # Allow CC to be a program name with arguments.
6909 lt_save_CC="$CC"
6910 lt_save_GCC=$GCC
6911 GCC=yes
6912 CC=${GCJ-"gcj"}
6913 compiler=$CC
6914 _LT_TAGVAR(compiler, $1)=$CC
6915 _LT_TAGVAR(LD, $1)="$LD"
6916 _LT_CC_BASENAME([$compiler])
6917
6918 # GCJ did not exist at the time GCC didn't implicitly link libc in.
6919 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6920
6921 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6922
6923 if test -n "$compiler"; then
6924 _LT_COMPILER_NO_RTTI($1)
6925 _LT_COMPILER_PIC($1)
6926 _LT_COMPILER_C_O($1)
6927 _LT_COMPILER_FILE_LOCKS($1)
6928 _LT_LINKER_SHLIBS($1)
6929 _LT_LINKER_HARDCODE_LIBPATH($1)
6930
6931 _LT_CONFIG($1)
6932 fi
6933
6934 AC_LANG_RESTORE
6935
6936 GCC=$lt_save_GCC
6937 CC="$lt_save_CC"
6938 ])# _LT_LANG_GCJ_CONFIG
6939
6940
6941 # _LT_LANG_RC_CONFIG([TAG])
6942 # -------------------------
6943 # Ensure that the configuration variables for the Windows resource compiler
6944 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6945 # to write the compiler configuration to `libtool'.
6946 m4_defun([_LT_LANG_RC_CONFIG],
6947 [AC_REQUIRE([LT_PROG_RC])dnl
6948 AC_LANG_SAVE
6949
6950 # Source file extension for RC test sources.
6951 ac_ext=rc
6952
6953 # Object file extension for compiled RC test sources.
6954 objext=o
6955 _LT_TAGVAR(objext, $1)=$objext
6956
6957 # Code to be used in simple compile tests
6958 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6959
6960 # Code to be used in simple link tests
6961 lt_simple_link_test_code="$lt_simple_compile_test_code"
6962
6963 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6964 _LT_TAG_COMPILER
6965
6966 # save warnings/boilerplate of simple test code
6967 _LT_COMPILER_BOILERPLATE
6968 _LT_LINKER_BOILERPLATE
6969
6970 # Allow CC to be a program name with arguments.
6971 lt_save_CC="$CC"
6972 lt_save_GCC=$GCC
6973 GCC=
6974 CC=${RC-"windres"}
6975 compiler=$CC
6976 _LT_TAGVAR(compiler, $1)=$CC
6977 _LT_CC_BASENAME([$compiler])
6978 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6979
6980 if test -n "$compiler"; then
6981 :
6982 _LT_CONFIG($1)
6983 fi
6984
6985 GCC=$lt_save_GCC
6986 AC_LANG_RESTORE
6987 CC="$lt_save_CC"
6988 ])# _LT_LANG_RC_CONFIG
6989
6990
6991 # LT_PROG_GCJ
6992 # -----------
6993 AC_DEFUN([LT_PROG_GCJ],
6994 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6995 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6996 [AC_CHECK_TOOL(GCJ, gcj,)
6997 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6998 AC_SUBST(GCJFLAGS)])])[]dnl
6999 ])
7000
7001 # Old name:
7002 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7003 dnl aclocal-1.4 backwards compatibility:
7004 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7005
7006
7007 # LT_PROG_RC
7008 # ----------
7009 AC_DEFUN([LT_PROG_RC],
7010 [AC_CHECK_TOOL(RC, windres,)
7011 ])
7012
7013 # Old name:
7014 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7015 dnl aclocal-1.4 backwards compatibility:
7016 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7017
7018
7019 # _LT_DECL_EGREP
7020 # --------------
7021 # If we don't have a new enough Autoconf to choose the best grep
7022 # available, choose the one first in the user's PATH.
7023 m4_defun([_LT_DECL_EGREP],
7024 [AC_REQUIRE([AC_PROG_EGREP])dnl
7025 AC_REQUIRE([AC_PROG_FGREP])dnl
7026 test -z "$GREP" && GREP=grep
7027 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7028 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7029 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7030 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7031 AC_SUBST([GREP])
7032 ])
7033
7034
7035 # _LT_DECL_OBJDUMP
7036 # --------------
7037 # If we don't have a new enough Autoconf to choose the best objdump
7038 # available, choose the one first in the user's PATH.
7039 m4_defun([_LT_DECL_OBJDUMP],
7040 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7041 test -z "$OBJDUMP" && OBJDUMP=objdump
7042 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7043 AC_SUBST([OBJDUMP])
7044 ])
7045
7046
7047 # _LT_DECL_SED
7048 # ------------
7049 # Check for a fully-functional sed program, that truncates
7050 # as few characters as possible. Prefer GNU sed if found.
7051 m4_defun([_LT_DECL_SED],
7052 [AC_PROG_SED
7053 test -z "$SED" && SED=sed
7054 Xsed="$SED -e 1s/^X//"
7055 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7056 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7057 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7058 ])# _LT_DECL_SED
7059
7060 m4_ifndef([AC_PROG_SED], [
7061 # NOTE: This macro has been submitted for inclusion into #
7062 # GNU Autoconf as AC_PROG_SED. When it is available in #
7063 # a released version of Autoconf we should remove this #
7064 # macro and use it instead. #
7065
7066 m4_defun([AC_PROG_SED],
7067 [AC_MSG_CHECKING([for a sed that does not truncate output])
7068 AC_CACHE_VAL(lt_cv_path_SED,
7069 [# Loop through the user's path and test for sed and gsed.
7070 # Then use that list of sed's as ones to test for truncation.
7071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7072 for as_dir in $PATH
7073 do
7074 IFS=$as_save_IFS
7075 test -z "$as_dir" && as_dir=.
7076 for lt_ac_prog in sed gsed; do
7077 for ac_exec_ext in '' $ac_executable_extensions; do
7078 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7079 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7080 fi
7081 done
7082 done
7083 done
7084 IFS=$as_save_IFS
7085 lt_ac_max=0
7086 lt_ac_count=0
7087 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7088 # along with /bin/sed that truncates output.
7089 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7090 test ! -f $lt_ac_sed && continue
7091 cat /dev/null > conftest.in
7092 lt_ac_count=0
7093 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7094 # Check for GNU sed and select it if it is found.
7095 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7096 lt_cv_path_SED=$lt_ac_sed
7097 break
7098 fi
7099 while true; do
7100 cat conftest.in conftest.in >conftest.tmp
7101 mv conftest.tmp conftest.in
7102 cp conftest.in conftest.nl
7103 echo >>conftest.nl
7104 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7105 cmp -s conftest.out conftest.nl || break
7106 # 10000 chars as input seems more than enough
7107 test $lt_ac_count -gt 10 && break
7108 lt_ac_count=`expr $lt_ac_count + 1`
7109 if test $lt_ac_count -gt $lt_ac_max; then
7110 lt_ac_max=$lt_ac_count
7111 lt_cv_path_SED=$lt_ac_sed
7112 fi
7113 done
7114 done
7115 ])
7116 SED=$lt_cv_path_SED
7117 AC_SUBST([SED])
7118 AC_MSG_RESULT([$SED])
7119 ])#AC_PROG_SED
7120 ])#m4_ifndef
7121
7122 # Old name:
7123 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7124 dnl aclocal-1.4 backwards compatibility:
7125 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7126
7127
7128 # _LT_CHECK_SHELL_FEATURES
7129 # ------------------------
7130 # Find out whether the shell is Bourne or XSI compatible,
7131 # or has some other useful features.
7132 m4_defun([_LT_CHECK_SHELL_FEATURES],
7133 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7134 # Try some XSI features
7135 xsi_shell=no
7136 ( _lt_dummy="a/b/c"
7137 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7138 = c,a/b,, \
7139 && eval 'test $(( 1 + 1 )) -eq 2 \
7140 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7141 && xsi_shell=yes
7142 AC_MSG_RESULT([$xsi_shell])
7143 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7144
7145 AC_MSG_CHECKING([whether the shell understands "+="])
7146 lt_shell_append=no
7147 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7148 >/dev/null 2>&1 \
7149 && lt_shell_append=yes
7150 AC_MSG_RESULT([$lt_shell_append])
7151 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7152
7153 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7154 lt_unset=unset
7155 else
7156 lt_unset=false
7157 fi
7158 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7159
7160 # test EBCDIC or ASCII
7161 case `echo X|tr X '\101'` in
7162 A) # ASCII based system
7163 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7164 lt_SP2NL='tr \040 \012'
7165 lt_NL2SP='tr \015\012 \040\040'
7166 ;;
7167 *) # EBCDIC based system
7168 lt_SP2NL='tr \100 \n'
7169 lt_NL2SP='tr \r\n \100\100'
7170 ;;
7171 esac
7172 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7173 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7174 ])# _LT_CHECK_SHELL_FEATURES
7175
7176
7177 # _LT_PROG_XSI_SHELLFNS
7178 # ---------------------
7179 # Bourne and XSI compatible variants of some useful shell functions.
7180 m4_defun([_LT_PROG_XSI_SHELLFNS],
7181 [case $xsi_shell in
7182 yes)
7183 cat << \_LT_EOF >> "$cfgfile"
7184
7185 # func_dirname file append nondir_replacement
7186 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7187 # otherwise set result to NONDIR_REPLACEMENT.
7188 func_dirname ()
7189 {
7190 case ${1} in
7191 */*) func_dirname_result="${1%/*}${2}" ;;
7192 * ) func_dirname_result="${3}" ;;
7193 esac
7194 }
7195
7196 # func_basename file
7197 func_basename ()
7198 {
7199 func_basename_result="${1##*/}"
7200 }
7201
7202 # func_dirname_and_basename file append nondir_replacement
7203 # perform func_basename and func_dirname in a single function
7204 # call:
7205 # dirname: Compute the dirname of FILE. If nonempty,
7206 # add APPEND to the result, otherwise set result
7207 # to NONDIR_REPLACEMENT.
7208 # value returned in "$func_dirname_result"
7209 # basename: Compute filename of FILE.
7210 # value retuned in "$func_basename_result"
7211 # Implementation must be kept synchronized with func_dirname
7212 # and func_basename. For efficiency, we do not delegate to
7213 # those functions but instead duplicate the functionality here.
7214 func_dirname_and_basename ()
7215 {
7216 case ${1} in
7217 */*) func_dirname_result="${1%/*}${2}" ;;
7218 * ) func_dirname_result="${3}" ;;
7219 esac
7220 func_basename_result="${1##*/}"
7221 }
7222
7223 # func_stripname prefix suffix name
7224 # strip PREFIX and SUFFIX off of NAME.
7225 # PREFIX and SUFFIX must not contain globbing or regex special
7226 # characters, hashes, percent signs, but SUFFIX may contain a leading
7227 # dot (in which case that matches only a dot).
7228 func_stripname ()
7229 {
7230 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7231 # positional parameters, so assign one to ordinary parameter first.
7232 func_stripname_result=${3}
7233 func_stripname_result=${func_stripname_result#"${1}"}
7234 func_stripname_result=${func_stripname_result%"${2}"}
7235 }
7236
7237 # func_opt_split
7238 func_opt_split ()
7239 {
7240 func_opt_split_opt=${1%%=*}
7241 func_opt_split_arg=${1#*=}
7242 }
7243
7244 # func_lo2o object
7245 func_lo2o ()
7246 {
7247 case ${1} in
7248 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7249 *) func_lo2o_result=${1} ;;
7250 esac
7251 }
7252
7253 # func_xform libobj-or-source
7254 func_xform ()
7255 {
7256 func_xform_result=${1%.*}.lo
7257 }
7258
7259 # func_arith arithmetic-term...
7260 func_arith ()
7261 {
7262 func_arith_result=$(( $[*] ))
7263 }
7264
7265 # func_len string
7266 # STRING may not start with a hyphen.
7267 func_len ()
7268 {
7269 func_len_result=${#1}
7270 }
7271
7272 _LT_EOF
7273 ;;
7274 *) # Bourne compatible functions.
7275 cat << \_LT_EOF >> "$cfgfile"
7276
7277 # func_dirname file append nondir_replacement
7278 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7279 # otherwise set result to NONDIR_REPLACEMENT.
7280 func_dirname ()
7281 {
7282 # Extract subdirectory from the argument.
7283 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7284 if test "X$func_dirname_result" = "X${1}"; then
7285 func_dirname_result="${3}"
7286 else
7287 func_dirname_result="$func_dirname_result${2}"
7288 fi
7289 }
7290
7291 # func_basename file
7292 func_basename ()
7293 {
7294 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7295 }
7296
7297 dnl func_dirname_and_basename
7298 dnl A portable version of this function is already defined in general.m4sh
7299 dnl so there is no need for it here.
7300
7301 # func_stripname prefix suffix name
7302 # strip PREFIX and SUFFIX off of NAME.
7303 # PREFIX and SUFFIX must not contain globbing or regex special
7304 # characters, hashes, percent signs, but SUFFIX may contain a leading
7305 # dot (in which case that matches only a dot).
7306 # func_strip_suffix prefix name
7307 func_stripname ()
7308 {
7309 case ${2} in
7310 .*) func_stripname_result=`$ECHO "X${3}" \
7311 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7312 *) func_stripname_result=`$ECHO "X${3}" \
7313 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7314 esac
7315 }
7316
7317 # sed scripts:
7318 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7319 my_sed_long_arg='1s/^-[[^=]]*=//'
7320
7321 # func_opt_split
7322 func_opt_split ()
7323 {
7324 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7325 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7326 }
7327
7328 # func_lo2o object
7329 func_lo2o ()
7330 {
7331 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7332 }
7333
7334 # func_xform libobj-or-source
7335 func_xform ()
7336 {
7337 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7338 }
7339
7340 # func_arith arithmetic-term...
7341 func_arith ()
7342 {
7343 func_arith_result=`expr "$[@]"`
7344 }
7345
7346 # func_len string
7347 # STRING may not start with a hyphen.
7348 func_len ()
7349 {
7350 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7351 }
7352
7353 _LT_EOF
7354 esac
7355
7356 case $lt_shell_append in
7357 yes)
7358 cat << \_LT_EOF >> "$cfgfile"
7359
7360 # func_append var value
7361 # Append VALUE to the end of shell variable VAR.
7362 func_append ()
7363 {
7364 eval "$[1]+=\$[2]"
7365 }
7366 _LT_EOF
7367 ;;
7368 *)
7369 cat << \_LT_EOF >> "$cfgfile"
7370
7371 # func_append var value
7372 # Append VALUE to the end of shell variable VAR.
7373 func_append ()
7374 {
7375 eval "$[1]=\$$[1]\$[2]"
7376 }
7377
7378 _LT_EOF
7379 ;;
7380 esac
7381 ])
7382
7383 # Helper functions for option handling. -*- Autoconf -*-
7384 #
7385 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7386 # Written by Gary V. Vaughan, 2004
7387 #
7388 # This file is free software; the Free Software Foundation gives
7389 # unlimited permission to copy and/or distribute it, with or without
7390 # modifications, as long as this notice is preserved.
7391
7392 # serial 6 ltoptions.m4
7393
7394 # This is to help aclocal find these macros, as it can't see m4_define.
7395 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7396
7397
7398 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7399 # ------------------------------------------
7400 m4_define([_LT_MANGLE_OPTION],
7401 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7402
7403
7404 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7405 # ---------------------------------------
7406 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7407 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
7408 # saved as a flag.
7409 m4_define([_LT_SET_OPTION],
7410 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7411 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7412 _LT_MANGLE_DEFUN([$1], [$2]),
7413 [m4_warning([Unknown $1 option `$2'])])[]dnl
7414 ])
7415
7416
7417 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7418 # ------------------------------------------------------------
7419 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7420 m4_define([_LT_IF_OPTION],
7421 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7422
7423
7424 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7425 # -------------------------------------------------------
7426 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7427 # are set.
7428 m4_define([_LT_UNLESS_OPTIONS],
7429 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7430 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7431 [m4_define([$0_found])])])[]dnl
7432 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7433 ])[]dnl
7434 ])
7435
7436
7437 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7438 # ----------------------------------------
7439 # OPTION-LIST is a space-separated list of Libtool options associated
7440 # with MACRO-NAME. If any OPTION has a matching handler declared with
7441 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7442 # the unknown option and exit.
7443 m4_defun([_LT_SET_OPTIONS],
7444 [# Set options
7445 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7446 [_LT_SET_OPTION([$1], _LT_Option)])
7447
7448 m4_if([$1],[LT_INIT],[
7449 dnl
7450 dnl Simply set some default values (i.e off) if boolean options were not
7451 dnl specified:
7452 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7453 ])
7454 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7455 ])
7456 dnl
7457 dnl If no reference was made to various pairs of opposing options, then
7458 dnl we run the default mode handler for the pair. For example, if neither
7459 dnl `shared' nor `disable-shared' was passed, we enable building of shared
7460 dnl archives by default:
7461 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7462 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7463 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7464 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7465 [_LT_ENABLE_FAST_INSTALL])
7466 ])
7467 ])# _LT_SET_OPTIONS
7468
7469
7470
7471 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7472 # -----------------------------------------
7473 m4_define([_LT_MANGLE_DEFUN],
7474 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
7475
7476
7477 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7478 # -----------------------------------------------
7479 m4_define([LT_OPTION_DEFINE],
7480 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7481 ])# LT_OPTION_DEFINE
7482
7483
7484 # dlopen
7485 # ------
7486 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7487 ])
7488
7489 AU_DEFUN([AC_LIBTOOL_DLOPEN],
7490 [_LT_SET_OPTION([LT_INIT], [dlopen])
7491 AC_DIAGNOSE([obsolete],
7492 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7493 put the `dlopen' option into LT_INIT's first parameter.])
7494 ])
7495
7496 dnl aclocal-1.4 backwards compatibility:
7497 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7498
7499
7500 # win32-dll
7501 # ---------
7502 # Declare package support for building win32 dll's.
7503 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
7504 [enable_win32_dll=yes
7505
7506 case $host in
7507 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7508 AC_CHECK_TOOL(AS, as, false)
7509 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7510 AC_CHECK_TOOL(OBJDUMP, objdump, false)
7511 ;;
7512 esac
7513
7514 test -z "$AS" && AS=as
7515 _LT_DECL([], [AS], [0], [Assembler program])dnl
7516
7517 test -z "$DLLTOOL" && DLLTOOL=dlltool
7518 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7519
7520 test -z "$OBJDUMP" && OBJDUMP=objdump
7521 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7522 ])# win32-dll
7523
7524 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7525 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7526 _LT_SET_OPTION([LT_INIT], [win32-dll])
7527 AC_DIAGNOSE([obsolete],
7528 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7529 put the `win32-dll' option into LT_INIT's first parameter.])
7530 ])
7531
7532 dnl aclocal-1.4 backwards compatibility:
7533 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7534
7535
7536 # _LT_ENABLE_SHARED([DEFAULT])
7537 # ----------------------------
7538 # implement the --enable-shared flag, and supports the `shared' and
7539 # `disable-shared' LT_INIT options.
7540 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7541 m4_define([_LT_ENABLE_SHARED],
7542 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7543 AC_ARG_ENABLE([shared],
7544 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7545 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7546 [p=${PACKAGE-default}
7547 case $enableval in
7548 yes) enable_shared=yes ;;
7549 no) enable_shared=no ;;
7550 *)
7551 enable_shared=no
7552 # Look at the argument we got. We use all the common list separators.
7553 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7554 for pkg in $enableval; do
7555 IFS="$lt_save_ifs"
7556 if test "X$pkg" = "X$p"; then
7557 enable_shared=yes
7558 fi
7559 done
7560 IFS="$lt_save_ifs"
7561 ;;
7562 esac],
7563 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7564
7565 _LT_DECL([build_libtool_libs], [enable_shared], [0],
7566 [Whether or not to build shared libraries])
7567 ])# _LT_ENABLE_SHARED
7568
7569 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7570 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
7571
7572 # Old names:
7573 AC_DEFUN([AC_ENABLE_SHARED],
7574 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7575 ])
7576
7577 AC_DEFUN([AC_DISABLE_SHARED],
7578 [_LT_SET_OPTION([LT_INIT], [disable-shared])
7579 ])
7580
7581 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7582 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7583
7584 dnl aclocal-1.4 backwards compatibility:
7585 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
7586 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
7587
7588
7589
7590 # _LT_ENABLE_STATIC([DEFAULT])
7591 # ----------------------------
7592 # implement the --enable-static flag, and support the `static' and
7593 # `disable-static' LT_INIT options.
7594 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7595 m4_define([_LT_ENABLE_STATIC],
7596 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7597 AC_ARG_ENABLE([static],
7598 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7599 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7600 [p=${PACKAGE-default}
7601 case $enableval in
7602 yes) enable_static=yes ;;
7603 no) enable_static=no ;;
7604 *)
7605 enable_static=no
7606 # Look at the argument we got. We use all the common list separators.
7607 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7608 for pkg in $enableval; do
7609 IFS="$lt_save_ifs"
7610 if test "X$pkg" = "X$p"; then
7611 enable_static=yes
7612 fi
7613 done
7614 IFS="$lt_save_ifs"
7615 ;;
7616 esac],
7617 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7618
7619 _LT_DECL([build_old_libs], [enable_static], [0],
7620 [Whether or not to build static libraries])
7621 ])# _LT_ENABLE_STATIC
7622
7623 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7624 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
7625
7626 # Old names:
7627 AC_DEFUN([AC_ENABLE_STATIC],
7628 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
7629 ])
7630
7631 AC_DEFUN([AC_DISABLE_STATIC],
7632 [_LT_SET_OPTION([LT_INIT], [disable-static])
7633 ])
7634
7635 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7636 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7637
7638 dnl aclocal-1.4 backwards compatibility:
7639 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
7640 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
7641
7642
7643
7644 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
7645 # ----------------------------------
7646 # implement the --enable-fast-install flag, and support the `fast-install'
7647 # and `disable-fast-install' LT_INIT options.
7648 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7649 m4_define([_LT_ENABLE_FAST_INSTALL],
7650 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7651 AC_ARG_ENABLE([fast-install],
7652 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7653 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7654 [p=${PACKAGE-default}
7655 case $enableval in
7656 yes) enable_fast_install=yes ;;
7657 no) enable_fast_install=no ;;
7658 *)
7659 enable_fast_install=no
7660 # Look at the argument we got. We use all the common list separators.
7661 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7662 for pkg in $enableval; do
7663 IFS="$lt_save_ifs"
7664 if test "X$pkg" = "X$p"; then
7665 enable_fast_install=yes
7666 fi
7667 done
7668 IFS="$lt_save_ifs"
7669 ;;
7670 esac],
7671 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7672
7673 _LT_DECL([fast_install], [enable_fast_install], [0],
7674 [Whether or not to optimize for fast installation])dnl
7675 ])# _LT_ENABLE_FAST_INSTALL
7676
7677 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7678 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7679
7680 # Old names:
7681 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
7682 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7683 AC_DIAGNOSE([obsolete],
7684 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7685 the `fast-install' option into LT_INIT's first parameter.])
7686 ])
7687
7688 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
7689 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7690 AC_DIAGNOSE([obsolete],
7691 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7692 the `disable-fast-install' option into LT_INIT's first parameter.])
7693 ])
7694
7695 dnl aclocal-1.4 backwards compatibility:
7696 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7697 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7698
7699
7700 # _LT_WITH_PIC([MODE])
7701 # --------------------
7702 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
7703 # LT_INIT options.
7704 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7705 m4_define([_LT_WITH_PIC],
7706 [AC_ARG_WITH([pic],
7707 [AS_HELP_STRING([--with-pic],
7708 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7709 [pic_mode="$withval"],
7710 [pic_mode=default])
7711
7712 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7713
7714 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7715 ])# _LT_WITH_PIC
7716
7717 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7718 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7719
7720 # Old name:
7721 AU_DEFUN([AC_LIBTOOL_PICMODE],
7722 [_LT_SET_OPTION([LT_INIT], [pic-only])
7723 AC_DIAGNOSE([obsolete],
7724 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7725 put the `pic-only' option into LT_INIT's first parameter.])
7726 ])
7727
7728 dnl aclocal-1.4 backwards compatibility:
7729 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7730
7731
7732 m4_define([_LTDL_MODE], [])
7733 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7734 [m4_define([_LTDL_MODE], [nonrecursive])])
7735 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
7736 [m4_define([_LTDL_MODE], [recursive])])
7737 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
7738 [m4_define([_LTDL_MODE], [subproject])])
7739
7740 m4_define([_LTDL_TYPE], [])
7741 LT_OPTION_DEFINE([LTDL_INIT], [installable],
7742 [m4_define([_LTDL_TYPE], [installable])])
7743 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
7744 [m4_define([_LTDL_TYPE], [convenience])])
7745
7746 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
7747 #
7748 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7749 # Written by Gary V. Vaughan, 2004
7750 #
7751 # This file is free software; the Free Software Foundation gives
7752 # unlimited permission to copy and/or distribute it, with or without
7753 # modifications, as long as this notice is preserved.
7754
7755 # serial 6 ltsugar.m4
7756
7757 # This is to help aclocal find these macros, as it can't see m4_define.
7758 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7759
7760
7761 # lt_join(SEP, ARG1, [ARG2...])
7762 # -----------------------------
7763 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7764 # associated separator.
7765 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7766 # versions in m4sugar had bugs.
7767 m4_define([lt_join],
7768 [m4_if([$#], [1], [],
7769 [$#], [2], [[$2]],
7770 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7771 m4_define([_lt_join],
7772 [m4_if([$#$2], [2], [],
7773 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7774
7775
7776 # lt_car(LIST)
7777 # lt_cdr(LIST)
7778 # ------------
7779 # Manipulate m4 lists.
7780 # These macros are necessary as long as will still need to support
7781 # Autoconf-2.59 which quotes differently.
7782 m4_define([lt_car], [[$1]])
7783 m4_define([lt_cdr],
7784 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7785 [$#], 1, [],
7786 [m4_dquote(m4_shift($@))])])
7787 m4_define([lt_unquote], $1)
7788
7789
7790 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
7791 # ------------------------------------------
7792 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7793 # Note that neither SEPARATOR nor STRING are expanded; they are appended
7794 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7795 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
7796 # than defined and empty).
7797 #
7798 # This macro is needed until we can rely on Autoconf 2.62, since earlier
7799 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7800 m4_define([lt_append],
7801 [m4_define([$1],
7802 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7803
7804
7805
7806 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7807 # ----------------------------------------------------------
7808 # Produce a SEP delimited list of all paired combinations of elements of
7809 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
7810 # has the form PREFIXmINFIXSUFFIXn.
7811 # Needed until we can rely on m4_combine added in Autoconf 2.62.
7812 m4_define([lt_combine],
7813 [m4_if(m4_eval([$# > 3]), [1],
7814 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
7815 [[m4_foreach([_Lt_prefix], [$2],
7816 [m4_foreach([_Lt_suffix],
7817 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
7818 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
7819
7820
7821 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7822 # -----------------------------------------------------------------------
7823 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7824 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7825 m4_define([lt_if_append_uniq],
7826 [m4_ifdef([$1],
7827 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
7828 [lt_append([$1], [$2], [$3])$4],
7829 [$5])],
7830 [lt_append([$1], [$2], [$3])$4])])
7831
7832
7833 # lt_dict_add(DICT, KEY, VALUE)
7834 # -----------------------------
7835 m4_define([lt_dict_add],
7836 [m4_define([$1($2)], [$3])])
7837
7838
7839 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7840 # --------------------------------------------
7841 m4_define([lt_dict_add_subkey],
7842 [m4_define([$1($2:$3)], [$4])])
7843
7844
7845 # lt_dict_fetch(DICT, KEY, [SUBKEY])
7846 # ----------------------------------
7847 m4_define([lt_dict_fetch],
7848 [m4_ifval([$3],
7849 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7850 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7851
7852
7853 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7854 # -----------------------------------------------------------------
7855 m4_define([lt_if_dict_fetch],
7856 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7857 [$5],
7858 [$6])])
7859
7860
7861 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7862 # --------------------------------------------------------------
7863 m4_define([lt_dict_filter],
7864 [m4_if([$5], [], [],
7865 [lt_join(m4_quote(m4_default([$4], [[, ]])),
7866 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7867 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7868 ])
7869
7870 # ltversion.m4 -- version numbers -*- Autoconf -*-
7871 #
7872 # Copyright (C) 2004 Free Software Foundation, Inc.
7873 # Written by Scott James Remnant, 2004
7874 #
7875 # This file is free software; the Free Software Foundation gives
7876 # unlimited permission to copy and/or distribute it, with or without
7877 # modifications, as long as this notice is preserved.
7878
7879 # Generated from ltversion.in.
7880
7881 # serial 3017 ltversion.m4
7882 # This file is part of GNU Libtool
7883
7884 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
7885 m4_define([LT_PACKAGE_REVISION], [1.3017])
7886
7887 AC_DEFUN([LTVERSION_VERSION],
7888 [macro_version='2.2.6b'
7889 macro_revision='1.3017'
7890 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7891 _LT_DECL(, macro_revision, 0)
7892 ])
7893
7894 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
7895 #
7896 # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
7897 # Written by Scott James Remnant, 2004.
7898 #
7899 # This file is free software; the Free Software Foundation gives
7900 # unlimited permission to copy and/or distribute it, with or without
7901 # modifications, as long as this notice is preserved.
7902
7903 # serial 4 lt~obsolete.m4
7904
7905 # These exist entirely to fool aclocal when bootstrapping libtool.
7906 #
7907 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
7908 # which have later been changed to m4_define as they aren't part of the
7909 # exported API, or moved to Autoconf or Automake where they belong.
7910 #
7911 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
7912 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
7913 # using a macro with the same name in our local m4/libtool.m4 it'll
7914 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
7915 # and doesn't know about Autoconf macros at all.)
7916 #
7917 # So we provide this file, which has a silly filename so it's always
7918 # included after everything else. This provides aclocal with the
7919 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
7920 # because those macros already exist, or will be overwritten later.
7921 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
7922 #
7923 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
7924 # Yes, that means every name once taken will need to remain here until
7925 # we give up compatibility with versions before 1.7, at which point
7926 # we need to keep only those names which we still refer to.
7927
7928 # This is to help aclocal find these macros, as it can't see m4_define.
7929 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
7930
7931 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
7932 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
7933 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
7934 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
7935 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
7936 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
7937 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
7938 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
7939 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
7940 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
7941 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
7942 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
7943 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
7944 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
7945 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
7946 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
7947 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
7948 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
7949 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
7950 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
7951 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
7952 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
7953 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
7954 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
7955 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
7956 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
7957 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
7958 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
7959 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
7960 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
7961 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
7962 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
7963 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
7964 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
7965 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
7966 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
7967 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
7968 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
7969 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
7970 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
7971 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
7972 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
7973 m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
7974 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7975 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7976 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7977 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
7978 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
7979 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
7980 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
7981 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
7982 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
7983 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7984 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
7985 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7986892
7987893 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
894 # serial 1 (pkg-config-0.24)
7988895 #
7989896 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7990897 #
8012919 AC_DEFUN([PKG_PROG_PKG_CONFIG],
8013920 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8014921 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8015 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
922 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
923 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
924 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
925
8016926 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8017927 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8018928 fi
8025935 AC_MSG_RESULT([no])
8026936 PKG_CONFIG=""
8027937 fi
8028
8029938 fi[]dnl
8030939 ])# PKG_PROG_PKG_CONFIG
8031940
8034943 # Check to see whether a particular set of modules exists. Similar
8035944 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
8036945 #
8037 #
8038 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
8039 # this or PKG_CHECK_MODULES is called, or make sure to call
8040 # PKG_CHECK_EXISTS manually
946 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
947 # only at the first occurence in configure.ac, so if the first place
948 # it's called might be skipped (such as if it is within an "if", you
949 # have to call PKG_CHECK_EXISTS manually
8041950 # --------------------------------------------------------------
8042951 AC_DEFUN([PKG_CHECK_EXISTS],
8043952 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8044953 if test -n "$PKG_CONFIG" && \
8045954 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8046 m4_ifval([$2], [$2], [:])
955 m4_default([$2], [:])
8047956 m4_ifvaln([$3], [else
8048957 $3])dnl
8049958 fi])
8050959
8051
8052960 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8053961 # ---------------------------------------------
8054962 m4_define([_PKG_CONFIG],
8055 [if test -n "$PKG_CONFIG"; then
8056 if test -n "$$1"; then
8057 pkg_cv_[]$1="$$1"
8058 else
8059 PKG_CHECK_EXISTS([$3],
8060 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8061 [pkg_failed=yes])
8062 fi
8063 else
8064 pkg_failed=untried
963 [if test -n "$$1"; then
964 pkg_cv_[]$1="$$1"
965 elif test -n "$PKG_CONFIG"; then
966 PKG_CHECK_EXISTS([$3],
967 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
968 [pkg_failed=yes])
969 else
970 pkg_failed=untried
8065971 fi[]dnl
8066972 ])# _PKG_CONFIG
8067973
81031009 See the pkg-config man page for more details.])
81041010
81051011 if test $pkg_failed = yes; then
1012 AC_MSG_RESULT([no])
81061013 _PKG_SHORT_ERRORS_SUPPORTED
81071014 if test $_pkg_short_errors_supported = yes; then
8108 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
1015 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
81091016 else
8110 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1017 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
81111018 fi
81121019 # Put the nasty error message in config.log where it belongs
81131020 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
81141021
8115 ifelse([$4], , [AC_MSG_ERROR(dnl
1022 m4_default([$4], [AC_MSG_ERROR(
81161023 [Package requirements ($2) were not met:
81171024
81181025 $$1_PKG_ERRORS
81201027 Consider adjusting the PKG_CONFIG_PATH environment variable if you
81211028 installed software in a non-standard prefix.
81221029
8123 _PKG_TEXT
8124 ])],
8125 [AC_MSG_RESULT([no])
8126 $4])
1030 _PKG_TEXT])dnl
1031 ])
81271032 elif test $pkg_failed = untried; then
8128 ifelse([$4], , [AC_MSG_FAILURE(dnl
1033 AC_MSG_RESULT([no])
1034 m4_default([$4], [AC_MSG_FAILURE(
81291035 [The pkg-config script could not be found or is too old. Make sure it
81301036 is in your PATH or set the PKG_CONFIG environment variable to the full
81311037 path to pkg-config.
81321038
81331039 _PKG_TEXT
81341040
8135 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8136 [$4])
1041 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
1042 ])
81371043 else
81381044 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
81391045 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
81401046 AC_MSG_RESULT([yes])
8141 ifelse([$3], , :, [$3])
1047 $3
81421048 fi[]dnl
81431049 ])# PKG_CHECK_MODULES
81441050
82301136 # expand $ac_aux_dir to an absolute path
82311137 am_aux_dir=`cd $ac_aux_dir && pwd`
82321138 ])
8233
8234
8235 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
8236 # Free Software Foundation, Inc.
8237 #
8238 # This file is free software; the Free Software Foundation
8239 # gives unlimited permission to copy and/or distribute it,
8240 # with or without modifications, as long as this notice is preserved.
8241
8242 # serial 4
8243
8244 # This was merged into AC_PROG_CC in Autoconf.
8245
8246 AU_DEFUN([AM_PROG_CC_STDC],
8247 [AC_PROG_CC
8248 AC_DIAGNOSE([obsolete], [$0:
8249 your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
8250 `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when
8251 you adjust the code. You can also remove the above call to
8252 AC_PROG_CC if you already called it elsewhere.])
8253 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
8254 ])
8255 AU_DEFUN([fp_PROG_CC_STDC])
82561139
82571140 # AM_CONDITIONAL -*- Autoconf -*-
82581141
91622045 AC_SUBST([am__untar])
91632046 ]) # _AM_PROG_TAR
91642047
2048 m4_include([m4/as-compiler-flag.m4])
2049 m4_include([m4/libtool.m4])
2050 m4_include([m4/ltoptions.m4])
2051 m4_include([m4/ltsugar.m4])
2052 m4_include([m4/ltversion.m4])
2053 m4_include([m4/lt~obsolete.m4])
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
22 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
44 # Free Software Foundation, Inc.
55
6 timestamp='2009-06-10'
6 timestamp='2009-12-30'
77
88 # This file is free software; you can redistribute it and/or modify it
99 # under the terms of the GNU General Public License as published by
2626 # the same distribution terms that you use for the rest of that program.
2727
2828
29 # Originally written by Per Bothner <per@bothner.com>.
30 # Please send patches to <config-patches@gnu.org>. Submit a context
31 # diff and a properly formatted ChangeLog entry.
29 # Originally written by Per Bothner. Please send patches (context
30 # diff format) to <config-patches@gnu.org> and include a ChangeLog
31 # entry.
3232 #
3333 # This script attempts to guess a canonical system name similar to
3434 # config.sub. If it succeeds, it prints the system name on stdout, and
3535 # exits with 0. Otherwise, it exits with 1.
3636 #
37 # The plan is that this can be called by configure scripts if you
38 # don't specify an explicit build system type.
37 # You can get the latest version of this script from:
38 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
3939
4040 me=`echo "$0" | sed -e 's,.*/,,'`
4141
5555 GNU config.guess ($timestamp)
5656
5757 Originally written by Per Bothner.
58 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
59 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
58 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
59 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
60 Software Foundation, Inc.
6061
6162 This is free software; see the source for copying conditions. There is NO
6263 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
332333 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
333334 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
334335 exit ;;
336 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
337 echo i386-pc-auroraux${UNAME_RELEASE}
338 exit ;;
335339 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
336340 eval $set_cc_for_build
337341 SUN_ARCH="i386"
806810 i*:PW*:*)
807811 echo ${UNAME_MACHINE}-pc-pw32
808812 exit ;;
809 *:Interix*:[3456]*)
813 *:Interix*:*)
810814 case ${UNAME_MACHINE} in
811815 x86)
812816 echo i586-pc-interix${UNAME_RELEASE}
813817 exit ;;
814 EM64T | authenticamd | genuineintel)
818 authenticamd | genuineintel | EM64T)
815819 echo x86_64-unknown-interix${UNAME_RELEASE}
816820 exit ;;
817821 IA64)
853857 i*86:Minix:*:*)
854858 echo ${UNAME_MACHINE}-pc-minix
855859 exit ;;
860 alpha:Linux:*:*)
861 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
862 EV5) UNAME_MACHINE=alphaev5 ;;
863 EV56) UNAME_MACHINE=alphaev56 ;;
864 PCA56) UNAME_MACHINE=alphapca56 ;;
865 PCA57) UNAME_MACHINE=alphapca56 ;;
866 EV6) UNAME_MACHINE=alphaev6 ;;
867 EV67) UNAME_MACHINE=alphaev67 ;;
868 EV68*) UNAME_MACHINE=alphaev68 ;;
869 esac
870 objdump --private-headers /bin/sh | grep -q ld.so.1
871 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
872 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
873 exit ;;
856874 arm*:Linux:*:*)
857875 eval $set_cc_for_build
858876 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
874892 exit ;;
875893 frv:Linux:*:*)
876894 echo frv-unknown-linux-gnu
895 exit ;;
896 i*86:Linux:*:*)
897 LIBC=gnu
898 eval $set_cc_for_build
899 sed 's/^ //' << EOF >$dummy.c
900 #ifdef __dietlibc__
901 LIBC=dietlibc
902 #endif
903 EOF
904 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
905 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
877906 exit ;;
878907 ia64:Linux:*:*)
879908 echo ${UNAME_MACHINE}-unknown-linux-gnu
900929 #endif
901930 #endif
902931 EOF
903 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
904 /^CPU/{
905 s: ::g
906 p
907 }'`"
932 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
908933 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
909934 ;;
910935 or32:Linux:*:*)
911936 echo or32-unknown-linux-gnu
912937 exit ;;
913 ppc:Linux:*:*)
914 echo powerpc-unknown-linux-gnu
915 exit ;;
916 ppc64:Linux:*:*)
917 echo powerpc64-unknown-linux-gnu
918 exit ;;
919 alpha:Linux:*:*)
920 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
921 EV5) UNAME_MACHINE=alphaev5 ;;
922 EV56) UNAME_MACHINE=alphaev56 ;;
923 PCA56) UNAME_MACHINE=alphapca56 ;;
924 PCA57) UNAME_MACHINE=alphapca56 ;;
925 EV6) UNAME_MACHINE=alphaev6 ;;
926 EV67) UNAME_MACHINE=alphaev67 ;;
927 EV68*) UNAME_MACHINE=alphaev68 ;;
928 esac
929 objdump --private-headers /bin/sh | grep -q ld.so.1
930 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
931 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
932 exit ;;
933938 padre:Linux:*:*)
934939 echo sparc-unknown-linux-gnu
940 exit ;;
941 parisc64:Linux:*:* | hppa64:Linux:*:*)
942 echo hppa64-unknown-linux-gnu
935943 exit ;;
936944 parisc:Linux:*:* | hppa:Linux:*:*)
937945 # Look for CPU level
941949 *) echo hppa-unknown-linux-gnu ;;
942950 esac
943951 exit ;;
944 parisc64:Linux:*:* | hppa64:Linux:*:*)
945 echo hppa64-unknown-linux-gnu
952 ppc64:Linux:*:*)
953 echo powerpc64-unknown-linux-gnu
954 exit ;;
955 ppc:Linux:*:*)
956 echo powerpc-unknown-linux-gnu
946957 exit ;;
947958 s390:Linux:*:* | s390x:Linux:*:*)
948959 echo ${UNAME_MACHINE}-ibm-linux
965976 xtensa*:Linux:*:*)
966977 echo ${UNAME_MACHINE}-unknown-linux-gnu
967978 exit ;;
968 i*86:Linux:*:*)
969 # The BFD linker knows what the default object file format is, so
970 # first see if it will tell us. cd to the root directory to prevent
971 # problems with other programs or directories called `ld' in the path.
972 # Set LC_ALL=C to ensure ld outputs messages in English.
973 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
974 | sed -ne '/supported targets:/!d
975 s/[ ][ ]*/ /g
976 s/.*supported targets: *//
977 s/ .*//
978 p'`
979 case "$ld_supported_targets" in
980 elf32-i386)
981 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
982 ;;
983 esac
984 # Determine whether the default compiler is a.out or elf
985 eval $set_cc_for_build
986 sed 's/^ //' << EOF >$dummy.c
987 #include <features.h>
988 #ifdef __ELF__
989 # ifdef __GLIBC__
990 # if __GLIBC__ >= 2
991 LIBC=gnu
992 # else
993 LIBC=gnulibc1
994 # endif
995 # else
996 LIBC=gnulibc1
997 # endif
998 #else
999 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1000 LIBC=gnu
1001 #else
1002 LIBC=gnuaout
1003 #endif
1004 #endif
1005 #ifdef __dietlibc__
1006 LIBC=dietlibc
1007 #endif
1008 EOF
1009 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1010 /^LIBC/{
1011 s: ::g
1012 p
1013 }'`"
1014 test x"${LIBC}" != x && {
1015 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1016 exit
1017 }
1018 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1019 ;;
1020979 i*86:DYNIX/ptx:4*:*)
1021980 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1022981 # earlier versions are messed up and put the nodename in both
12461205 *:Darwin:*:*)
12471206 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
12481207 case $UNAME_PROCESSOR in
1208 i386)
1209 eval $set_cc_for_build
1210 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1211 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1212 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1213 grep IS_64BIT_ARCH >/dev/null
1214 then
1215 UNAME_PROCESSOR="x86_64"
1216 fi
1217 fi ;;
12491218 unknown) UNAME_PROCESSOR=powerpc ;;
12501219 esac
12511220 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
00 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* always defined to indicate that i18n is enabled */
3 #undef ENABLE_NLS
4
5 /* Gettext package name */
6 #undef GETTEXT_PACKAGE
7
8 /* Define to 1 if you have the `bind_textdomain_codeset' function. */
9 #undef HAVE_BIND_TEXTDOMAIN_CODESET
10
11 /* Define to 1 if you have the `dcgettext' function. */
12 #undef HAVE_DCGETTEXT
113
214 /* Define to 1 if you have the <dlfcn.h> header file. */
315 #undef HAVE_DLFCN_H
416
17 /* Define if the GNU gettext() function is already present or preinstalled. */
18 #undef HAVE_GETTEXT
19
520 /* Define to 1 if you have the <inttypes.h> header file. */
621 #undef HAVE_INTTYPES_H
22
23 /* Define if your <locale.h> file defines LC_MESSAGES. */
24 #undef HAVE_LC_MESSAGES
25
26 /* Define to 1 if you have the <locale.h> header file. */
27 #undef HAVE_LOCALE_H
728
829 /* Define to 1 if you have the <memory.h> header file. */
930 #undef HAVE_MEMORY_H
2950 /* Define to 1 if you have the <unistd.h> header file. */
3051 #undef HAVE_UNISTD_H
3152
53 /* Define if you have libvinagre */
54 #undef HAVE_VINAGRE
55
3256 /* Define to the sub-directory in which libtool stores uninstalled libraries.
3357 */
3458 #undef LT_OBJDIR
35
36 /* Name of package */
37 #undef PACKAGE
3859
3960 /* Define to the address where bug reports for this package should be sent. */
4061 #undef PACKAGE_BUGREPORT
5778 /* Define to 1 if you have the ANSI C header files. */
5879 #undef STDC_HEADERS
5980
60 /* Version number of package */
61 #undef VERSION
81 /* Define to 1 if the X Window System is missing or not being used. */
82 #undef X_DISPLAY_MISSING
00 #! /bin/sh
11 # Configuration validation subroutine script.
22 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
44 # Free Software Foundation, Inc.
55
6 timestamp='2009-06-11'
6 timestamp='2010-01-22'
77
88 # This file is (in principle) common to ALL GNU software.
99 # The presence of a machine in this file suggests that SOME GNU software
3131
3232
3333 # Please send patches to <config-patches@gnu.org>. Submit a context
34 # diff and a properly formatted ChangeLog entry.
34 # diff and a properly formatted GNU ChangeLog entry.
3535 #
3636 # Configuration subroutine to validate and canonicalize a configuration type.
3737 # Supply the specified configuration type as an argument.
3838 # If it is invalid, we print an error message on stderr and exit with code 1.
3939 # Otherwise, we print the canonical config type on stdout and succeed.
40
41 # You can get the latest version of this script from:
42 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
4043
4144 # This file is supposed to be the same for all GNU packages
4245 # and recognize all the CPU types, system types and aliases
7174 version="\
7275 GNU config.sub ($timestamp)
7376
74 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
75 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
77 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
78 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
79 Software Foundation, Inc.
7680
7781 This is free software; see the source for copying conditions. There is NO
7882 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
148152 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149153 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150154 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray)
155 -apple | -axis | -knuth | -cray | -microblaze)
152156 os=
153157 basic_machine=$1
154158 ;;
283287 | pdp10 | pdp11 | pj | pjl \
284288 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
285289 | pyramid \
290 | rx \
286291 | score \
287292 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
288293 | sh64 | sh64le \
290295 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
291296 | spu | strongarm \
292297 | tahoe | thumb | tic4x | tic80 | tron \
298 | ubicom32 \
293299 | v850 | v850e \
294300 | we32k \
295301 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
296302 | z8k | z80)
297303 basic_machine=$basic_machine-unknown
298304 ;;
299 m6811 | m68hc11 | m6812 | m68hc12)
305 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
300306 # Motorola 68HC11/12.
301307 basic_machine=$basic_machine-unknown
302308 os=-none
339345 | lm32-* \
340346 | m32c-* | m32r-* | m32rle-* \
341347 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
342 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
348 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
343349 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
344350 | mips16-* \
345351 | mips64-* | mips64el-* \
367373 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
368374 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
369375 | pyramid-* \
370 | romp-* | rs6000-* \
376 | romp-* | rs6000-* | rx-* \
371377 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
372378 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
373379 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
374380 | sparclite-* \
375381 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
376382 | tahoe-* | thumb-* \
377 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
383 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
384 | tile-* | tilegx-* \
378385 | tron-* \
386 | ubicom32-* \
379387 | v850-* | v850e-* | vax-* \
380388 | we32k-* \
381389 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
724732 merlin)
725733 basic_machine=ns32k-utek
726734 os=-sysv
735 ;;
736 microblaze)
737 basic_machine=microblaze-xilinx
727738 ;;
728739 mingw32)
729740 basic_machine=i386-pc
10751086 basic_machine=tic6x-unknown
10761087 os=-coff
10771088 ;;
1089 # This must be matched before tile*.
1090 tilegx*)
1091 basic_machine=tilegx-unknown
1092 os=-linux-gnu
1093 ;;
10781094 tile*)
10791095 basic_machine=tile-unknown
10801096 os=-linux-gnu
12461262 # First match some system type aliases
12471263 # that might get confused with valid system types.
12481264 # -solaris* is a basic system type, with this one exception.
1265 -auroraux)
1266 os=-auroraux
1267 ;;
12491268 -solaris1 | -solaris1.*)
12501269 os=`echo $os | sed -e 's|solaris1|sunos4|'`
12511270 ;;
12671286 # -sysv* is not here because it comes later, after sysvr4.
12681287 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
12691288 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1270 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1271 | -kopensolaris* \
1289 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1290 | -sym* | -kopensolaris* \
12721291 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
12731292 | -aos* | -aros* \
12741293 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
12891308 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
12901309 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
12911310 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1292 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1311 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
12931312 # Remember, each alternative MUST END IN *, to match a version number.
12941313 ;;
12951314 -qnx*)
14221441 -dicos*)
14231442 os=-dicos
14241443 ;;
1444 -nacl*)
1445 ;;
14251446 -none)
14261447 ;;
14271448 *)
+3223
-982
configure less more
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.65 for ssh-contact 0.2.
2 # Generated by GNU Autoconf 2.67 for ssh-contact 0.4.
3 #
4 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=ssh-contact>.
35 #
46 #
57 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
7 # Inc.
8 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
9 # Foundation, Inc.
810 #
911 #
1012 # This configure script is free software; the Free Software Foundation
1113 # gives unlimited permission to copy, distribute and modify it.
14 #
15 #
16 # Copyright (C) 2010 Collabora Ltd.
17 #
1218 ## -------------------- ##
1319 ## M4sh Initialization. ##
1420 ## -------------------- ##
227233 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
228234 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
229235 else
230 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
231 $0: including any error possibly output before this
232 $0: message. Then install a modern shell, or manually run
233 $0: the script under such a shell if you do have one."
236 $as_echo "$0: Please tell bug-autoconf@gnu.org and
237 $0: https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=ssh-contact
238 $0: about your system, including any error possibly output
239 $0: before this message. Then install a modern shell, or
240 $0: manually run the script under such a shell if you do
241 $0: have one."
234242 fi
235243 exit 1
236244 fi
315323 test -d "$as_dir" && break
316324 done
317325 test -z "$as_dirs" || eval "mkdir $as_dirs"
318 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
326 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
319327
320328
321329 } # as_fn_mkdir_p
355363 fi # as_fn_arith
356364
357365
358 # as_fn_error ERROR [LINENO LOG_FD]
359 # ---------------------------------
366 # as_fn_error STATUS ERROR [LINENO LOG_FD]
367 # ----------------------------------------
360368 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
361369 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
362 # script with status $?, using 1 if that was 0.
370 # script with STATUS, using 1 if that was 0.
363371 as_fn_error ()
364372 {
365 as_status=$?; test $as_status -eq 0 && as_status=1
366 if test "$3"; then
367 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
368 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
373 as_status=$1; test $as_status -eq 0 && as_status=1
374 if test "$4"; then
375 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
376 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
369377 fi
370 $as_echo "$as_me: error: $1" >&2
378 $as_echo "$as_me: error: $2" >&2
371379 as_fn_exit $as_status
372380 } # as_fn_error
373381
678686 exec 6>&1
679687
680688 # Name of the host.
681 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
689 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
682690 # so uname gets run too.
683691 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
684692
697705 # Identity of this package.
698706 PACKAGE_NAME='ssh-contact'
699707 PACKAGE_TARNAME='ssh-contact'
700 PACKAGE_VERSION='0.2'
701 PACKAGE_STRING='ssh-contact 0.2'
702 PACKAGE_BUGREPORT=''
708 PACKAGE_VERSION='0.4'
709 PACKAGE_STRING='ssh-contact 0.4'
710 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=ssh-contact'
703711 PACKAGE_URL=''
704712
713 ac_unique_file="configure.ac"
705714 # Factoring default headers for most tests.
706715 ac_includes_default="\
707716 #include <stdio.h>
742751 am__EXEEXT_TRUE
743752 LTLIBOBJS
744753 LIBOBJS
754 HAVE_VINAGRE_FALSE
755 HAVE_VINAGRE_TRUE
756 VINAGRE_LIBS
757 VINAGRE_CFLAGS
758 MKINSTALLDIRS
759 POSUB
760 POFILES
761 PO_IN_DATADIR_FALSE
762 PO_IN_DATADIR_TRUE
763 INTLLIBS
764 INSTOBJEXT
765 GMOFILES
766 CATOBJEXT
767 CATALOGS
768 MSGFMT_OPTS
769 GETTEXT_PACKAGE
770 ERROR_CFLAGS
745771 SSH_CONTACT_LIBS
746772 SSH_CONTACT_CFLAGS
773 DATADIRNAME
774 ALL_LINGUAS
775 INTLTOOL_PERL
776 GMSGFMT
777 MSGFMT
778 MSGMERGE
779 XGETTEXT
780 INTLTOOL_POLICY_RULE
781 INTLTOOL_SERVICE_RULE
782 INTLTOOL_THEME_RULE
783 INTLTOOL_SCHEMAS_RULE
784 INTLTOOL_CAVES_RULE
785 INTLTOOL_XML_NOMERGE_RULE
786 INTLTOOL_XML_RULE
787 INTLTOOL_KBD_RULE
788 INTLTOOL_XAM_RULE
789 INTLTOOL_UI_RULE
790 INTLTOOL_SOUNDLIST_RULE
791 INTLTOOL_SHEET_RULE
792 INTLTOOL_SERVER_RULE
793 INTLTOOL_PONG_RULE
794 INTLTOOL_OAF_RULE
795 INTLTOOL_PROP_RULE
796 INTLTOOL_KEYS_RULE
797 INTLTOOL_DIRECTORY_RULE
798 INTLTOOL_DESKTOP_RULE
799 INTLTOOL_EXTRACT
800 INTLTOOL_MERGE
801 INTLTOOL_UPDATE
802 USE_NLS
803 X_EXTRA_LIBS
804 X_LIBS
805 X_PRE_LIBS
806 X_CFLAGS
807 XMKMF
808 GLIB_MKENUMS
809 GOBJECT_QUERY
810 GLIB_GENMARSHAL
811 GLIB_LIBS
812 GLIB_CFLAGS
813 PKG_CONFIG_LIBDIR
814 PKG_CONFIG_PATH
747815 PKG_CONFIG
748816 OTOOL64
749817 OTOOL
789857 LDFLAGS
790858 CFLAGS
791859 CC
792 MAINT
793 MAINTAINER_MODE_FALSE
794 MAINTAINER_MODE_TRUE
860 AM_BACKSLASH
861 AM_DEFAULT_VERBOSITY
795862 am__untar
796863 am__tar
797864 AMTAR
815882 INSTALL_DATA
816883 INSTALL_SCRIPT
817884 INSTALL_PROGRAM
818 AM_BACKSLASH
819 AM_DEFAULT_VERBOSITY
885 MAINT
886 MAINTAINER_MODE_FALSE
887 MAINTAINER_MODE_TRUE
820888 target_alias
821889 host_alias
822890 build_alias
858926 ac_subst_files=''
859927 ac_user_opts='
860928 enable_option_checking
929 enable_maintainer_mode
861930 enable_silent_rules
862 enable_maintainer_mode
863931 enable_dependency_tracking
864932 enable_shared
865933 enable_static
867935 enable_fast_install
868936 with_gnu_ld
869937 enable_libtool_lock
938 enable_glibtest
939 with_x
940 enable_nls
941 enable_Werror
942 enable_vinagre
870943 '
871944 ac_precious_vars='build_alias
872945 host_alias
878951 CPPFLAGS
879952 CPP
880953 PKG_CONFIG
954 PKG_CONFIG_PATH
955 PKG_CONFIG_LIBDIR
956 XMKMF
881957 SSH_CONTACT_CFLAGS
882 SSH_CONTACT_LIBS'
958 SSH_CONTACT_LIBS
959 VINAGRE_CFLAGS
960 VINAGRE_LIBS'
883961
884962
885963 # Initialize some variables set by options.
9421020 fi
9431021
9441022 case $ac_option in
945 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
946 *) ac_optarg=yes ;;
1023 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1024 *=) ac_optarg= ;;
1025 *) ac_optarg=yes ;;
9471026 esac
9481027
9491028 # Accept the important Cygnus configure options, so we can diagnose typos.
9881067 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
9891068 # Reject names that are not valid shell variable names.
9901069 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
991 as_fn_error "invalid feature name: $ac_useropt"
1070 as_fn_error $? "invalid feature name: $ac_useropt"
9921071 ac_useropt_orig=$ac_useropt
9931072 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
9941073 case $ac_user_opts in
10141093 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
10151094 # Reject names that are not valid shell variable names.
10161095 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1017 as_fn_error "invalid feature name: $ac_useropt"
1096 as_fn_error $? "invalid feature name: $ac_useropt"
10181097 ac_useropt_orig=$ac_useropt
10191098 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
10201099 case $ac_user_opts in
12181297 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
12191298 # Reject names that are not valid shell variable names.
12201299 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1221 as_fn_error "invalid package name: $ac_useropt"
1300 as_fn_error $? "invalid package name: $ac_useropt"
12221301 ac_useropt_orig=$ac_useropt
12231302 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
12241303 case $ac_user_opts in
12341313 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
12351314 # Reject names that are not valid shell variable names.
12361315 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1237 as_fn_error "invalid package name: $ac_useropt"
1316 as_fn_error $? "invalid package name: $ac_useropt"
12381317 ac_useropt_orig=$ac_useropt
12391318 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
12401319 case $ac_user_opts in
12641343 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
12651344 x_libraries=$ac_optarg ;;
12661345
1267 -*) as_fn_error "unrecognized option: \`$ac_option'
1268 Try \`$0 --help' for more information."
1346 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1347 Try \`$0 --help' for more information"
12691348 ;;
12701349
12711350 *=*)
12731352 # Reject names that are not valid shell variable names.
12741353 case $ac_envvar in #(
12751354 '' | [0-9]* | *[!_$as_cr_alnum]* )
1276 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1355 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
12771356 esac
12781357 eval $ac_envvar=\$ac_optarg
12791358 export $ac_envvar ;;
12911370
12921371 if test -n "$ac_prev"; then
12931372 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1294 as_fn_error "missing argument to $ac_option"
1373 as_fn_error $? "missing argument to $ac_option"
12951374 fi
12961375
12971376 if test -n "$ac_unrecognized_opts"; then
12981377 case $enable_option_checking in
12991378 no) ;;
1300 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1379 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
13011380 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
13021381 esac
13031382 fi
13201399 [\\/$]* | ?:[\\/]* ) continue;;
13211400 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
13221401 esac
1323 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1402 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
13241403 done
13251404
13261405 # There might be people who depend on the old broken behavior: `$host'
13341413 if test "x$host_alias" != x; then
13351414 if test "x$build_alias" = x; then
13361415 cross_compiling=maybe
1337 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1338 If a cross compiler is detected then cross compile mode will be used." >&2
1416 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1417 If a cross compiler is detected then cross compile mode will be used" >&2
13391418 elif test "x$build_alias" != "x$host_alias"; then
13401419 cross_compiling=yes
13411420 fi
13501429 ac_pwd=`pwd` && test -n "$ac_pwd" &&
13511430 ac_ls_di=`ls -di .` &&
13521431 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1353 as_fn_error "working directory cannot be determined"
1432 as_fn_error $? "working directory cannot be determined"
13541433 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1355 as_fn_error "pwd does not report name of working directory"
1434 as_fn_error $? "pwd does not report name of working directory"
13561435
13571436
13581437 # Find the source files, if location was not specified.
13911470 fi
13921471 if test ! -r "$srcdir/$ac_unique_file"; then
13931472 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1394 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1473 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
13951474 fi
13961475 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
13971476 ac_abs_confdir=`(
1398 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1477 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
13991478 pwd)`
14001479 # When building in place, set srcdir=.
14011480 if test "$ac_abs_confdir" = "$ac_pwd"; then
14211500 # Omit some internal or obsolete options to make the list less imposing.
14221501 # This message is too long to be a string in the A/UX 3.1 sh.
14231502 cat <<_ACEOF
1424 \`configure' configures ssh-contact 0.2 to adapt to many kinds of systems.
1503 \`configure' configures ssh-contact 0.4 to adapt to many kinds of systems.
14251504
14261505 Usage: $0 [OPTION]... [VAR=VALUE]...
14271506
14351514 --help=short display options specific to this package
14361515 --help=recursive display the short help of all the included packages
14371516 -V, --version display version information and exit
1438 -q, --quiet, --silent do not print \`checking...' messages
1517 -q, --quiet, --silent do not print \`checking ...' messages
14391518 --cache-file=FILE cache test results in FILE [disabled]
14401519 -C, --config-cache alias for \`--cache-file=config.cache'
14411520 -n, --no-create do not create output files
14831562 --program-suffix=SUFFIX append SUFFIX to installed program names
14841563 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
14851564
1565 X features:
1566 --x-includes=DIR X include files are in DIR
1567 --x-libraries=DIR X library files are in DIR
1568
14861569 System types:
14871570 --build=BUILD configure for building on BUILD [guessed]
14881571 --host=HOST cross-compile to build programs to run on HOST [BUILD]
14911574
14921575 if test -n "$ac_init_help"; then
14931576 case $ac_init_help in
1494 short | recursive ) echo "Configuration of ssh-contact 0.2:";;
1577 short | recursive ) echo "Configuration of ssh-contact 0.4:";;
14951578 esac
14961579 cat <<\_ACEOF
14971580
14991582 --disable-option-checking ignore unrecognized --enable/--with options
15001583 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
15011584 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1585 --enable-maintainer-mode enable make rules and dependencies not useful
1586 (and sometimes confusing) to the casual installer
15021587 --enable-silent-rules less verbose build output (undo: `make V=1')
15031588 --disable-silent-rules verbose build output (undo: `make V=0')
1504 --enable-maintainer-mode enable make rules and dependencies not useful
1505 (and sometimes confusing) to the casual installer
15061589 --disable-dependency-tracking speeds up one-time build
15071590 --enable-dependency-tracking do not reject slow dependency extractors
15081591 --enable-shared[=PKGS] build shared libraries [default=yes]
15101593 --enable-fast-install[=PKGS]
15111594 optimize for fast installation [default=yes]
15121595 --disable-libtool-lock avoid locking (might break parallel builds)
1596 --disable-glibtest do not try to compile and run a test GLIB program
1597 --disable-nls do not use Native Language Support
1598 --disable-Werror compile without -Werror (normally enabled in
1599 development builds)
1600 --enable-vinagre=[no/yes/auto]
1601 build with vinagre plugin
15131602
15141603 Optional Packages:
15151604 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
15171606 --with-pic try to use only PIC/non-PIC objects [default=use
15181607 both]
15191608 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1609 --with-x use the X Window System
15201610
15211611 Some influential environment variables:
15221612 CC C compiler command
15281618 you have headers in a nonstandard directory <include dir>
15291619 CPP C preprocessor
15301620 PKG_CONFIG path to pkg-config utility
1621 PKG_CONFIG_PATH
1622 directories to add to pkg-config's search path
1623 PKG_CONFIG_LIBDIR
1624 path overriding pkg-config's built-in search path
1625 XMKMF Path to xmkmf, Makefile generator for X Window System
15311626 SSH_CONTACT_CFLAGS
15321627 C compiler flags for SSH_CONTACT, overriding pkg-config
15331628 SSH_CONTACT_LIBS
15341629 linker flags for SSH_CONTACT, overriding pkg-config
1630 VINAGRE_CFLAGS
1631 C compiler flags for VINAGRE, overriding pkg-config
1632 VINAGRE_LIBS
1633 linker flags for VINAGRE, overriding pkg-config
15351634
15361635 Use these variables to override the choices made by `configure' or to help
15371636 it to find libraries and programs with nonstandard names/locations.
15381637
1539 Report bugs to the package provider.
1638 Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=ssh-contact>.
15401639 _ACEOF
15411640 ac_status=$?
15421641 fi
15991698 test -n "$ac_init_help" && exit $ac_status
16001699 if $ac_init_version; then
16011700 cat <<\_ACEOF
1602 ssh-contact configure 0.2
1603 generated by GNU Autoconf 2.65
1604
1605 Copyright (C) 2009 Free Software Foundation, Inc.
1701 ssh-contact configure 0.4
1702 generated by GNU Autoconf 2.67
1703
1704 Copyright (C) 2010 Free Software Foundation, Inc.
16061705 This configure script is free software; the Free Software Foundation
16071706 gives unlimited permission to copy, distribute and modify it.
1707
1708
1709 Copyright (C) 2010 Collabora Ltd.
1710
16081711 _ACEOF
16091712 exit
16101713 fi
17181821 mv -f conftest.er1 conftest.err
17191822 fi
17201823 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1721 test $ac_status = 0; } >/dev/null && {
1824 test $ac_status = 0; } > conftest.i && {
17221825 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17231826 test ! -s conftest.err
17241827 }; then :
17851888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17861889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
17871890 $as_echo_n "checking for $2... " >&6; }
1788 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1891 if eval "test \"\${$3+set}\"" = set; then :
17891892 $as_echo_n "(cached) " >&6
17901893 else
17911894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18151918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18161919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
18171920 $as_echo_n "checking for $2... " >&6; }
1818 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1921 if eval "test \"\${$3+set}\"" = set; then :
18191922 $as_echo_n "(cached) " >&6
18201923 else
18211924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18731976 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
18741977
18751978 } # ac_fn_c_check_func
1979
1980 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1981 # -------------------------------------------------------
1982 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1983 # the include files in INCLUDES and setting the cache variable VAR
1984 # accordingly.
1985 ac_fn_c_check_header_mongrel ()
1986 {
1987 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988 if eval "test \"\${$3+set}\"" = set; then :
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1990 $as_echo_n "checking for $2... " >&6; }
1991 if eval "test \"\${$3+set}\"" = set; then :
1992 $as_echo_n "(cached) " >&6
1993 fi
1994 eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996 $as_echo "$ac_res" >&6; }
1997 else
1998 # Is the header compilable?
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2000 $as_echo_n "checking $2 usability... " >&6; }
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002 /* end confdefs.h. */
2003 $4
2004 #include <$2>
2005 _ACEOF
2006 if ac_fn_c_try_compile "$LINENO"; then :
2007 ac_header_compiler=yes
2008 else
2009 ac_header_compiler=no
2010 fi
2011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2013 $as_echo "$ac_header_compiler" >&6; }
2014
2015 # Is the header present?
2016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2017 $as_echo_n "checking $2 presence... " >&6; }
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019 /* end confdefs.h. */
2020 #include <$2>
2021 _ACEOF
2022 if ac_fn_c_try_cpp "$LINENO"; then :
2023 ac_header_preproc=yes
2024 else
2025 ac_header_preproc=no
2026 fi
2027 rm -f conftest.err conftest.i conftest.$ac_ext
2028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2029 $as_echo "$ac_header_preproc" >&6; }
2030
2031 # So? What about this header?
2032 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2033 yes:no: )
2034 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2035 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2037 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2038 ;;
2039 no:yes:* )
2040 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2041 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2042 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2043 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2045 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2046 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2047 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2049 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2050 ( $as_echo "## ------------------------------------------------------------------------------------------------- ##
2051 ## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=ssh-contact ##
2052 ## ------------------------------------------------------------------------------------------------- ##"
2053 ) | sed "s/^/$as_me: WARNING: /" >&2
2054 ;;
2055 esac
2056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2057 $as_echo_n "checking for $2... " >&6; }
2058 if eval "test \"\${$3+set}\"" = set; then :
2059 $as_echo_n "(cached) " >&6
2060 else
2061 eval "$3=\$ac_header_compiler"
2062 fi
2063 eval ac_res=\$$3
2064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2065 $as_echo "$ac_res" >&6; }
2066 fi
2067 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2068
2069 } # ac_fn_c_check_header_mongrel
18762070 cat >config.log <<_ACEOF
18772071 This file contains any messages produced by compilers while
18782072 running configure, to aid debugging if configure makes a mistake.
18792073
1880 It was created by ssh-contact $as_me 0.2, which was
1881 generated by GNU Autoconf 2.65. Invocation command line was
2074 It was created by ssh-contact $as_me 0.4, which was
2075 generated by GNU Autoconf 2.67. Invocation command line was
18822076
18832077 $ $0 $@
18842078
19882182 {
19892183 echo
19902184
1991 cat <<\_ASBOX
1992 ## ---------------- ##
2185 $as_echo "## ---------------- ##
19932186 ## Cache variables. ##
1994 ## ---------------- ##
1995 _ASBOX
2187 ## ---------------- ##"
19962188 echo
19972189 # The following way of writing the cache mishandles newlines in values,
19982190 (
20262218 )
20272219 echo
20282220
2029 cat <<\_ASBOX
2030 ## ----------------- ##
2221 $as_echo "## ----------------- ##
20312222 ## Output variables. ##
2032 ## ----------------- ##
2033 _ASBOX
2223 ## ----------------- ##"
20342224 echo
20352225 for ac_var in $ac_subst_vars
20362226 do
20432233 echo
20442234
20452235 if test -n "$ac_subst_files"; then
2046 cat <<\_ASBOX
2047 ## ------------------- ##
2236 $as_echo "## ------------------- ##
20482237 ## File substitutions. ##
2049 ## ------------------- ##
2050 _ASBOX
2238 ## ------------------- ##"
20512239 echo
20522240 for ac_var in $ac_subst_files
20532241 do
20612249 fi
20622250
20632251 if test -s confdefs.h; then
2064 cat <<\_ASBOX
2065 ## ----------- ##
2252 $as_echo "## ----------- ##
20662253 ## confdefs.h. ##
2067 ## ----------- ##
2068 _ASBOX
2254 ## ----------- ##"
20692255 echo
20702256 cat confdefs.h
20712257 echo
21202306 ac_site_file1=NONE
21212307 ac_site_file2=NONE
21222308 if test -n "$CONFIG_SITE"; then
2123 ac_site_file1=$CONFIG_SITE
2309 # We do not want a PATH search for config.site.
2310 case $CONFIG_SITE in #((
2311 -*) ac_site_file1=./$CONFIG_SITE;;
2312 */*) ac_site_file1=$CONFIG_SITE;;
2313 *) ac_site_file1=./$CONFIG_SITE;;
2314 esac
21242315 elif test "x$prefix" != xNONE; then
21252316 ac_site_file1=$prefix/share/config.site
21262317 ac_site_file2=$prefix/etc/config.site
21352326 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
21362327 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
21372328 sed 's/^/| /' "$ac_site_file" >&5
2138 . "$ac_site_file"
2329 . "$ac_site_file" \
2330 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2331 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2332 as_fn_error $? "failed to load site script $ac_site_file
2333 See \`config.log' for more details" "$LINENO" 5 ; }
21392334 fi
21402335 done
21412336
22112406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22122407 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
22132408 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2214 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2409 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
22152410 fi
22162411 ## -------------------- ##
22172412 ## Main body of script. ##
22242419 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22252420
22262421
2227 # Check whether --enable-silent-rules was given.
2228 if test "${enable_silent_rules+set}" = set; then :
2229 enableval=$enable_silent_rules;
2230 fi
2231
2232 case $enable_silent_rules in
2233 yes) AM_DEFAULT_VERBOSITY=0;;
2234 no) AM_DEFAULT_VERBOSITY=1;;
2235 *) AM_DEFAULT_VERBOSITY=0;;
2236 esac
2237 AM_BACKSLASH='\'
2238
2239
2240 am__api_version='1.11'
2422
2423
2424
2425
2426
2427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2428 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2429 # Check whether --enable-maintainer-mode was given.
2430 if test "${enable_maintainer_mode+set}" = set; then :
2431 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2432 else
2433 USE_MAINTAINER_MODE=no
2434 fi
2435
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2437 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2438 if test $USE_MAINTAINER_MODE = yes; then
2439 MAINTAINER_MODE_TRUE=
2440 MAINTAINER_MODE_FALSE='#'
2441 else
2442 MAINTAINER_MODE_TRUE='#'
2443 MAINTAINER_MODE_FALSE=
2444 fi
2445
2446 MAINT=$MAINTAINER_MODE_TRUE
2447
2448
2449
2450
2451 ac_config_headers="$ac_config_headers config.h"
2452
22412453
22422454 ac_aux_dir=
2243 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2244 for ac_t in install-sh install.sh shtool; do
2245 if test -f "$ac_dir/$ac_t"; then
2246 ac_aux_dir=$ac_dir
2247 ac_install_sh="$ac_aux_dir/$ac_t -c"
2248 break 2
2249 fi
2250 done
2455 for ac_dir in . "$srcdir"/.; do
2456 if test -f "$ac_dir/install-sh"; then
2457 ac_aux_dir=$ac_dir
2458 ac_install_sh="$ac_aux_dir/install-sh -c"
2459 break
2460 elif test -f "$ac_dir/install.sh"; then
2461 ac_aux_dir=$ac_dir
2462 ac_install_sh="$ac_aux_dir/install.sh -c"
2463 break
2464 elif test -f "$ac_dir/shtool"; then
2465 ac_aux_dir=$ac_dir
2466 ac_install_sh="$ac_aux_dir/shtool install -c"
2467 break
2468 fi
22512469 done
22522470 if test -z "$ac_aux_dir"; then
2253 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2471 as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5
22542472 fi
22552473
22562474 # These three variables are undocumented and unsupported,
22612479 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
22622480 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
22632481
2482
2483 am__api_version='1.11'
22642484
22652485 # Find a good install program. We prefer a C program (faster),
22662486 # so one script is as good as another. But avoid the broken or
23662586 '
23672587 case `pwd` in
23682588 *[\\\"\#\$\&\'\`$am_lf]*)
2369 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
2589 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
23702590 esac
23712591 case $srcdir in
23722592 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2373 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
2593 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
23742594 esac
23752595
23762596 # Do `set' in a subshell so we don't clobber the current shell's
23922612 # if, for instance, CONFIG_SHELL is bash and it inherits a
23932613 # broken ls alias from the environment. This has actually
23942614 # happened. Such a system could not be considered "sane".
2395 as_fn_error "ls -t appears to fail. Make sure there is not a broken
2615 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
23962616 alias in your environment" "$LINENO" 5
23972617 fi
23982618
24022622 # Ok.
24032623 :
24042624 else
2405 as_fn_error "newly created file is older than distributed files!
2625 as_fn_error $? "newly created file is older than distributed files!
24062626 Check your system clock" "$LINENO" 5
24072627 fi
24082628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26402860 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
26412861 set x ${MAKE-make}
26422862 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2643 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
2863 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
26442864 $as_echo_n "(cached) " >&6
26452865 else
26462866 cat >conftest.make <<\_ACEOF
26482868 all:
26492869 @echo '@@@%%%=$(MAKE)=@@@%%%'
26502870 _ACEOF
2651 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2871 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
26522872 case `${MAKE-make} -f conftest.make 2>/dev/null` in
26532873 *@@@%%%=?*=@@@%%%*)
26542874 eval ac_cv_prog_make_${ac_make}_set=yes;;
26822902 am__isrc=' -I$(srcdir)'
26832903 # test to see if srcdir already configured
26842904 if test -f $srcdir/config.status; then
2685 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2905 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
26862906 fi
26872907 fi
26882908
26972917
26982918
26992919 # Define the identity of the package.
2700 PACKAGE=ssh-contact
2701 VERSION=0.2
2702
2703
2704 cat >>confdefs.h <<_ACEOF
2705 #define PACKAGE "$PACKAGE"
2706 _ACEOF
2707
2708
2709 cat >>confdefs.h <<_ACEOF
2710 #define VERSION "$VERSION"
2711 _ACEOF
2920 PACKAGE='ssh-contact'
2921 VERSION='0.4'
2922
27122923
27132924 # Some tools Automake needs.
27142925
27382949
27392950
27402951
2741 ac_config_headers="$ac_config_headers config.h"
2742
2743
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2745 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2746 # Check whether --enable-maintainer-mode was given.
2747 if test "${enable_maintainer_mode+set}" = set; then :
2748 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2749 else
2750 USE_MAINTAINER_MODE=no
2751 fi
2752
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2754 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2755 if test $USE_MAINTAINER_MODE = yes; then
2756 MAINTAINER_MODE_TRUE=
2757 MAINTAINER_MODE_FALSE='#'
2758 else
2759 MAINTAINER_MODE_TRUE='#'
2760 MAINTAINER_MODE_FALSE=
2761 fi
2762
2763 MAINT=$MAINTAINER_MODE_TRUE
2764
2765
2952 # Check whether --enable-silent-rules was given.
2953 if test "${enable_silent_rules+set}" = set; then :
2954 enableval=$enable_silent_rules;
2955 fi
2956
2957 case $enable_silent_rules in
2958 yes) AM_DEFAULT_VERBOSITY=0;;
2959 no) AM_DEFAULT_VERBOSITY=1;;
2960 *) AM_DEFAULT_VERBOSITY=0;;
2961 esac
2962 AM_BACKSLASH='\'
27662963
27672964 DEPDIR="${am__leading_dot}deps"
27682965
31263323
31273324 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31283325 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3129 as_fn_error "no acceptable C compiler found in \$PATH
3130 See \`config.log' for more details." "$LINENO" 5; }
3326 as_fn_error $? "no acceptable C compiler found in \$PATH
3327 See \`config.log' for more details" "$LINENO" 5 ; }
31313328
31323329 # Provide some information about the compiler.
31333330 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32413438
32423439 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32433440 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3244 { as_fn_set_status 77
3245 as_fn_error "C compiler cannot create executables
3246 See \`config.log' for more details." "$LINENO" 5; }; }
3441 as_fn_error 77 "C compiler cannot create executables
3442 See \`config.log' for more details" "$LINENO" 5 ; }
32473443 else
32483444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32493445 $as_echo "yes" >&6; }
32853481 else
32863482 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32873483 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3288 as_fn_error "cannot compute suffix of executables: cannot compile and link
3289 See \`config.log' for more details." "$LINENO" 5; }
3484 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3485 See \`config.log' for more details" "$LINENO" 5 ; }
32903486 fi
32913487 rm -f conftest conftest$ac_cv_exeext
32923488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33433539 else
33443540 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33453541 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3346 as_fn_error "cannot run C compiled programs.
3542 as_fn_error $? "cannot run C compiled programs.
33473543 If you meant to cross compile, use \`--host'.
3348 See \`config.log' for more details." "$LINENO" 5; }
3544 See \`config.log' for more details" "$LINENO" 5 ; }
33493545 fi
33503546 fi
33513547 fi
33963592
33973593 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33983594 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3399 as_fn_error "cannot compute suffix of object files: cannot compile
3400 See \`config.log' for more details." "$LINENO" 5; }
3595 as_fn_error $? "cannot compute suffix of object files: cannot compile
3596 See \`config.log' for more details" "$LINENO" 5 ; }
34013597 fi
34023598 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34033599 fi
41014297
41024298 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41034299 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4104 as_fn_error "no acceptable C compiler found in \$PATH
4105 See \`config.log' for more details." "$LINENO" 5; }
4300 as_fn_error $? "no acceptable C compiler found in \$PATH
4301 See \`config.log' for more details" "$LINENO" 5 ; }
41064302
41074303 # Provide some information about the compiler.
41084304 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
44734669 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44744670 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44754671 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4476 if test -n "$ac_tool_prefix"; then
4477 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4478 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4480 $as_echo_n "checking for $ac_word... " >&6; }
4481 if test "${ac_cv_prog_CC+set}" = set; then :
4482 $as_echo_n "(cached) " >&6
4483 else
4484 if test -n "$CC"; then
4485 ac_cv_prog_CC="$CC" # Let the user override the test.
4486 else
4487 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4488 for as_dir in $PATH
4489 do
4490 IFS=$as_save_IFS
4491 test -z "$as_dir" && as_dir=.
4492 for ac_exec_ext in '' $ac_executable_extensions; do
4493 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4494 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4495 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4496 break 2
4497 fi
4498 done
4499 done
4500 IFS=$as_save_IFS
4501
4502 fi
4503 fi
4504 CC=$ac_cv_prog_CC
4505 if test -n "$CC"; then
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4507 $as_echo "$CC" >&6; }
4508 else
4509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4510 $as_echo "no" >&6; }
4511 fi
4512
4513
4514 fi
4515 if test -z "$ac_cv_prog_CC"; then
4516 ac_ct_CC=$CC
4517 # Extract the first word of "gcc", so it can be a program name with args.
4518 set dummy gcc; ac_word=$2
4519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4520 $as_echo_n "checking for $ac_word... " >&6; }
4521 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4522 $as_echo_n "(cached) " >&6
4523 else
4524 if test -n "$ac_ct_CC"; then
4525 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4526 else
4527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4528 for as_dir in $PATH
4529 do
4530 IFS=$as_save_IFS
4531 test -z "$as_dir" && as_dir=.
4532 for ac_exec_ext in '' $ac_executable_extensions; do
4533 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4534 ac_cv_prog_ac_ct_CC="gcc"
4535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4536 break 2
4537 fi
4538 done
4539 done
4540 IFS=$as_save_IFS
4541
4542 fi
4543 fi
4544 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4545 if test -n "$ac_ct_CC"; then
4546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4547 $as_echo "$ac_ct_CC" >&6; }
4548 else
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4550 $as_echo "no" >&6; }
4551 fi
4552
4553 if test "x$ac_ct_CC" = x; then
4554 CC=""
4555 else
4556 case $cross_compiling:$ac_tool_warned in
4557 yes:)
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4559 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4560 ac_tool_warned=yes ;;
4561 esac
4562 CC=$ac_ct_CC
4563 fi
4564 else
4565 CC="$ac_cv_prog_CC"
4566 fi
4567
4568 if test -z "$CC"; then
4569 if test -n "$ac_tool_prefix"; then
4570 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4571 set dummy ${ac_tool_prefix}cc; ac_word=$2
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4573 $as_echo_n "checking for $ac_word... " >&6; }
4574 if test "${ac_cv_prog_CC+set}" = set; then :
4575 $as_echo_n "(cached) " >&6
4576 else
4577 if test -n "$CC"; then
4578 ac_cv_prog_CC="$CC" # Let the user override the test.
4579 else
4580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4581 for as_dir in $PATH
4582 do
4583 IFS=$as_save_IFS
4584 test -z "$as_dir" && as_dir=.
4585 for ac_exec_ext in '' $ac_executable_extensions; do
4586 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4587 ac_cv_prog_CC="${ac_tool_prefix}cc"
4588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4589 break 2
4590 fi
4591 done
4592 done
4593 IFS=$as_save_IFS
4594
4595 fi
4596 fi
4597 CC=$ac_cv_prog_CC
4598 if test -n "$CC"; then
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4600 $as_echo "$CC" >&6; }
4601 else
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603 $as_echo "no" >&6; }
4604 fi
4605
4606
4607 fi
4608 fi
4609 if test -z "$CC"; then
4610 # Extract the first word of "cc", so it can be a program name with args.
4611 set dummy cc; ac_word=$2
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4613 $as_echo_n "checking for $ac_word... " >&6; }
4614 if test "${ac_cv_prog_CC+set}" = set; then :
4615 $as_echo_n "(cached) " >&6
4616 else
4617 if test -n "$CC"; then
4618 ac_cv_prog_CC="$CC" # Let the user override the test.
4619 else
4620 ac_prog_rejected=no
4621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622 for as_dir in $PATH
4623 do
4624 IFS=$as_save_IFS
4625 test -z "$as_dir" && as_dir=.
4626 for ac_exec_ext in '' $ac_executable_extensions; do
4627 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4628 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4629 ac_prog_rejected=yes
4630 continue
4631 fi
4632 ac_cv_prog_CC="cc"
4633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4634 break 2
4635 fi
4636 done
4637 done
4638 IFS=$as_save_IFS
4639
4640 if test $ac_prog_rejected = yes; then
4641 # We found a bogon in the path, so make sure we never use it.
4642 set dummy $ac_cv_prog_CC
4643 shift
4644 if test $# != 0; then
4645 # We chose a different compiler from the bogus one.
4646 # However, it has the same basename, so the bogon will be chosen
4647 # first if we set CC to just the basename; use the full file name.
4648 shift
4649 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4650 fi
4651 fi
4652 fi
4653 fi
4654 CC=$ac_cv_prog_CC
4655 if test -n "$CC"; then
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4657 $as_echo "$CC" >&6; }
4658 else
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660 $as_echo "no" >&6; }
4661 fi
4662
4663
4664 fi
4665 if test -z "$CC"; then
4666 if test -n "$ac_tool_prefix"; then
4667 for ac_prog in cl.exe
4668 do
4669 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4670 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672 $as_echo_n "checking for $ac_word... " >&6; }
4673 if test "${ac_cv_prog_CC+set}" = set; then :
4674 $as_echo_n "(cached) " >&6
4675 else
4676 if test -n "$CC"; then
4677 ac_cv_prog_CC="$CC" # Let the user override the test.
4678 else
4679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680 for as_dir in $PATH
4681 do
4682 IFS=$as_save_IFS
4683 test -z "$as_dir" && as_dir=.
4684 for ac_exec_ext in '' $ac_executable_extensions; do
4685 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4686 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4688 break 2
4689 fi
4690 done
4691 done
4692 IFS=$as_save_IFS
4693
4694 fi
4695 fi
4696 CC=$ac_cv_prog_CC
4697 if test -n "$CC"; then
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4699 $as_echo "$CC" >&6; }
4700 else
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702 $as_echo "no" >&6; }
4703 fi
4704
4705
4706 test -n "$CC" && break
4707 done
4708 fi
4709 if test -z "$CC"; then
4710 ac_ct_CC=$CC
4711 for ac_prog in cl.exe
4712 do
4713 # Extract the first word of "$ac_prog", so it can be a program name with args.
4714 set dummy $ac_prog; ac_word=$2
4715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4716 $as_echo_n "checking for $ac_word... " >&6; }
4717 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4718 $as_echo_n "(cached) " >&6
4719 else
4720 if test -n "$ac_ct_CC"; then
4721 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4722 else
4723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4724 for as_dir in $PATH
4725 do
4726 IFS=$as_save_IFS
4727 test -z "$as_dir" && as_dir=.
4728 for ac_exec_ext in '' $ac_executable_extensions; do
4729 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4730 ac_cv_prog_ac_ct_CC="$ac_prog"
4731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4732 break 2
4733 fi
4734 done
4735 done
4736 IFS=$as_save_IFS
4737
4738 fi
4739 fi
4740 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4741 if test -n "$ac_ct_CC"; then
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4743 $as_echo "$ac_ct_CC" >&6; }
4744 else
4745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4746 $as_echo "no" >&6; }
4747 fi
4748
4749
4750 test -n "$ac_ct_CC" && break
4751 done
4752
4753 if test "x$ac_ct_CC" = x; then
4754 CC=""
4755 else
4756 case $cross_compiling:$ac_tool_warned in
4757 yes:)
4758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4759 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4760 ac_tool_warned=yes ;;
4761 esac
4762 CC=$ac_ct_CC
4763 fi
4764 fi
4765
4766 fi
4767
4768
4769 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4770 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4771 as_fn_error "no acceptable C compiler found in \$PATH
4772 See \`config.log' for more details." "$LINENO" 5; }
4773
4774 # Provide some information about the compiler.
4775 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4776 set X $ac_compile
4777 ac_compiler=$2
4778 for ac_option in --version -v -V -qversion; do
4779 { { ac_try="$ac_compiler $ac_option >&5"
4780 case "(($ac_try" in
4781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4782 *) ac_try_echo=$ac_try;;
4783 esac
4784 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4785 $as_echo "$ac_try_echo"; } >&5
4786 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4787 ac_status=$?
4788 if test -s conftest.err; then
4789 sed '10a\
4790 ... rest of stderr output deleted ...
4791 10q' conftest.err >conftest.er1
4792 cat conftest.er1 >&5
4793 fi
4794 rm -f conftest.er1 conftest.err
4795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4796 test $ac_status = 0; }
4797 done
4798
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4800 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4801 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4802 $as_echo_n "(cached) " >&6
4803 else
4804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4805 /* end confdefs.h. */
4806
4807 int
4808 main ()
4809 {
4810 #ifndef __GNUC__
4811 choke me
4812 #endif
4813
4814 ;
4815 return 0;
4816 }
4817 _ACEOF
4818 if ac_fn_c_try_compile "$LINENO"; then :
4819 ac_compiler_gnu=yes
4820 else
4821 ac_compiler_gnu=no
4822 fi
4823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4824 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4825
4826 fi
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4828 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4829 if test $ac_compiler_gnu = yes; then
4830 GCC=yes
4831 else
4832 GCC=
4833 fi
4834 ac_test_CFLAGS=${CFLAGS+set}
4835 ac_save_CFLAGS=$CFLAGS
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4837 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4838 if test "${ac_cv_prog_cc_g+set}" = set; then :
4839 $as_echo_n "(cached) " >&6
4840 else
4841 ac_save_c_werror_flag=$ac_c_werror_flag
4842 ac_c_werror_flag=yes
4843 ac_cv_prog_cc_g=no
4844 CFLAGS="-g"
4845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4846 /* end confdefs.h. */
4847
4848 int
4849 main ()
4850 {
4851
4852 ;
4853 return 0;
4854 }
4855 _ACEOF
4856 if ac_fn_c_try_compile "$LINENO"; then :
4857 ac_cv_prog_cc_g=yes
4858 else
4859 CFLAGS=""
4860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4861 /* end confdefs.h. */
4862
4863 int
4864 main ()
4865 {
4866
4867 ;
4868 return 0;
4869 }
4870 _ACEOF
4871 if ac_fn_c_try_compile "$LINENO"; then :
4872
4873 else
4874 ac_c_werror_flag=$ac_save_c_werror_flag
4875 CFLAGS="-g"
4876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4877 /* end confdefs.h. */
4878
4879 int
4880 main ()
4881 {
4882
4883 ;
4884 return 0;
4885 }
4886 _ACEOF
4887 if ac_fn_c_try_compile "$LINENO"; then :
4888 ac_cv_prog_cc_g=yes
4889 fi
4890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4891 fi
4892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4893 fi
4894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4895 ac_c_werror_flag=$ac_save_c_werror_flag
4896 fi
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4898 $as_echo "$ac_cv_prog_cc_g" >&6; }
4899 if test "$ac_test_CFLAGS" = set; then
4900 CFLAGS=$ac_save_CFLAGS
4901 elif test $ac_cv_prog_cc_g = yes; then
4902 if test "$GCC" = yes; then
4903 CFLAGS="-g -O2"
4904 else
4905 CFLAGS="-g"
4906 fi
4907 else
4908 if test "$GCC" = yes; then
4909 CFLAGS="-O2"
4910 else
4911 CFLAGS=
4912 fi
4913 fi
4914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4915 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4916 if test "${ac_cv_prog_cc_c89+set}" = set; then :
4917 $as_echo_n "(cached) " >&6
4918 else
4919 ac_cv_prog_cc_c89=no
4920 ac_save_CC=$CC
4921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4922 /* end confdefs.h. */
4923 #include <stdarg.h>
4924 #include <stdio.h>
4925 #include <sys/types.h>
4926 #include <sys/stat.h>
4927 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4928 struct buf { int x; };
4929 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4930 static char *e (p, i)
4931 char **p;
4932 int i;
4933 {
4934 return p[i];
4935 }
4936 static char *f (char * (*g) (char **, int), char **p, ...)
4937 {
4938 char *s;
4939 va_list v;
4940 va_start (v,p);
4941 s = g (p, va_arg (v,int));
4942 va_end (v);
4943 return s;
4944 }
4945
4946 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4947 function prototypes and stuff, but not '\xHH' hex character constants.
4948 These don't provoke an error unfortunately, instead are silently treated
4949 as 'x'. The following induces an error, until -std is added to get
4950 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4951 array size at least. It's necessary to write '\x00'==0 to get something
4952 that's true only with -std. */
4953 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4954
4955 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4956 inside strings and character constants. */
4957 #define FOO(x) 'x'
4958 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4959
4960 int test (int i, double x);
4961 struct s1 {int (*f) (int a);};
4962 struct s2 {int (*f) (double a);};
4963 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4964 int argc;
4965 char **argv;
4966 int
4967 main ()
4968 {
4969 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4970 ;
4971 return 0;
4972 }
4973 _ACEOF
4974 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4975 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4976 do
4977 CC="$ac_save_CC $ac_arg"
4978 if ac_fn_c_try_compile "$LINENO"; then :
4979 ac_cv_prog_cc_c89=$ac_arg
4980 fi
4981 rm -f core conftest.err conftest.$ac_objext
4982 test "x$ac_cv_prog_cc_c89" != "xno" && break
4983 done
4984 rm -f conftest.$ac_ext
4985 CC=$ac_save_CC
4986
4987 fi
4988 # AC_CACHE_VAL
4989 case "x$ac_cv_prog_cc_c89" in
4990 x)
4991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4992 $as_echo "none needed" >&6; } ;;
4993 xno)
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4995 $as_echo "unsupported" >&6; } ;;
4996 *)
4997 CC="$CC $ac_cv_prog_cc_c89"
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4999 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5000 esac
5001 if test "x$ac_cv_prog_cc_c89" != xno; then :
5002
5003 fi
5004
5005 ac_ext=c
5006 ac_cpp='$CPP $CPPFLAGS'
5007 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5008 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5009 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5010
5011 depcc="$CC" am_compiler_list=
5012
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5014 $as_echo_n "checking dependency style of $depcc... " >&6; }
5015 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5016 $as_echo_n "(cached) " >&6
5017 else
5018 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5019 # We make a subdir and do the tests there. Otherwise we can end up
5020 # making bogus files that we don't know about and never remove. For
5021 # instance it was reported that on HP-UX the gcc test will end up
5022 # making a dummy file named `D' -- because `-MD' means `put the output
5023 # in D'.
5024 mkdir conftest.dir
5025 # Copy depcomp to subdir because otherwise we won't find it if we're
5026 # using a relative directory.
5027 cp "$am_depcomp" conftest.dir
5028 cd conftest.dir
5029 # We will build objects and dependencies in a subdirectory because
5030 # it helps to detect inapplicable dependency modes. For instance
5031 # both Tru64's cc and ICC support -MD to output dependencies as a
5032 # side effect of compilation, but ICC will put the dependencies in
5033 # the current directory while Tru64 will put them in the object
5034 # directory.
5035 mkdir sub
5036
5037 am_cv_CC_dependencies_compiler_type=none
5038 if test "$am_compiler_list" = ""; then
5039 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5040 fi
5041 am__universal=false
5042 case " $depcc " in #(
5043 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5044 esac
5045
5046 for depmode in $am_compiler_list; do
5047 # Setup a source with many dependencies, because some compilers
5048 # like to wrap large dependency lists on column 80 (with \), and
5049 # we should not choose a depcomp mode which is confused by this.
5050 #
5051 # We need to recreate these files for each test, as the compiler may
5052 # overwrite some of them when testing with obscure command lines.
5053 # This happens at least with the AIX C compiler.
5054 : > sub/conftest.c
5055 for i in 1 2 3 4 5 6; do
5056 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5057 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5058 # Solaris 8's {/usr,}/bin/sh.
5059 touch sub/conftst$i.h
5060 done
5061 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5062
5063 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5064 # mode. It turns out that the SunPro C++ compiler does not properly
5065 # handle `-M -o', and we need to detect this. Also, some Intel
5066 # versions had trouble with output in subdirs
5067 am__obj=sub/conftest.${OBJEXT-o}
5068 am__minus_obj="-o $am__obj"
5069 case $depmode in
5070 gcc)
5071 # This depmode causes a compiler race in universal mode.
5072 test "$am__universal" = false || continue
5073 ;;
5074 nosideeffect)
5075 # after this tag, mechanisms are not by side-effect, so they'll
5076 # only be used when explicitly requested
5077 if test "x$enable_dependency_tracking" = xyes; then
5078 continue
5079 else
5080 break
5081 fi
5082 ;;
5083 msvisualcpp | msvcmsys)
5084 # This compiler won't grok `-c -o', but also, the minuso test has
5085 # not run yet. These depmodes are late enough in the game, and
5086 # so weak that their functioning should not be impacted.
5087 am__obj=conftest.${OBJEXT-o}
5088 am__minus_obj=
5089 ;;
5090 none) break ;;
5091 esac
5092 if depmode=$depmode \
5093 source=sub/conftest.c object=$am__obj \
5094 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5095 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5096 >/dev/null 2>conftest.err &&
5097 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5098 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5099 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5100 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5101 # icc doesn't choke on unknown options, it will just issue warnings
5102 # or remarks (even with -Werror). So we grep stderr for any message
5103 # that says an option was ignored or not supported.
5104 # When given -MP, icc 7.0 and 7.1 complain thusly:
5105 # icc: Command line warning: ignoring option '-M'; no argument required
5106 # The diagnosis changed in icc 8.0:
5107 # icc: Command line remark: option '-MP' not supported
5108 if (grep 'ignoring option' conftest.err ||
5109 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5110 am_cv_CC_dependencies_compiler_type=$depmode
5111 break
5112 fi
5113 fi
5114 done
5115
5116 cd ..
5117 rm -rf conftest.dir
5118 else
5119 am_cv_CC_dependencies_compiler_type=none
5120 fi
5121
5122 fi
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5124 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5125 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5126
5127 if
5128 test "x$enable_dependency_tracking" != xno \
5129 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5130 am__fastdepCC_TRUE=
5131 am__fastdepCC_FALSE='#'
5132 else
5133 am__fastdepCC_TRUE='#'
5134 am__fastdepCC_FALSE=
5135 fi
5136
5137
5138
5139 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
5140
5141 ac_ext=c
5142 ac_cpp='$CPP $CPPFLAGS'
5143 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5144 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5145 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51464672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
51474673 $as_echo_n "checking how to run the C preprocessor... " >&6; }
51484674 # On Suns, sometimes $CPP names a directory.
51804706 # Broken: fails on valid input.
51814707 continue
51824708 fi
5183 rm -f conftest.err conftest.$ac_ext
4709 rm -f conftest.err conftest.i conftest.$ac_ext
51844710
51854711 # OK, works on sane cases. Now check whether nonexistent headers
51864712 # can be detected and how.
51964722 ac_preproc_ok=:
51974723 break
51984724 fi
5199 rm -f conftest.err conftest.$ac_ext
4725 rm -f conftest.err conftest.i conftest.$ac_ext
52004726
52014727 done
52024728 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5203 rm -f conftest.err conftest.$ac_ext
4729 rm -f conftest.i conftest.err conftest.$ac_ext
52044730 if $ac_preproc_ok; then :
52054731 break
52064732 fi
52394765 # Broken: fails on valid input.
52404766 continue
52414767 fi
5242 rm -f conftest.err conftest.$ac_ext
4768 rm -f conftest.err conftest.i conftest.$ac_ext
52434769
52444770 # OK, works on sane cases. Now check whether nonexistent headers
52454771 # can be detected and how.
52554781 ac_preproc_ok=:
52564782 break
52574783 fi
5258 rm -f conftest.err conftest.$ac_ext
4784 rm -f conftest.err conftest.i conftest.$ac_ext
52594785
52604786 done
52614787 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5262 rm -f conftest.err conftest.$ac_ext
4788 rm -f conftest.i conftest.err conftest.$ac_ext
52634789 if $ac_preproc_ok; then :
52644790
52654791 else
52664792 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
52674793 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5268 as_fn_error "C preprocessor \"$CPP\" fails sanity check
5269 See \`config.log' for more details." "$LINENO" 5; }
4794 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4795 See \`config.log' for more details" "$LINENO" 5 ; }
52704796 fi
52714797
52724798 ac_ext=c
53274853 done
53284854 IFS=$as_save_IFS
53294855 if test -z "$ac_cv_path_GREP"; then
5330 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4856 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
53314857 fi
53324858 else
53334859 ac_cv_path_GREP=$GREP
53934919 done
53944920 IFS=$as_save_IFS
53954921 if test -z "$ac_cv_path_EGREP"; then
5396 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4922 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
53974923 fi
53984924 else
53994925 ac_cv_path_EGREP=$EGREP
55455071
55465072 # Make sure we can run config.sub.
55475073 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5548 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5074 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
55495075
55505076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
55515077 $as_echo_n "checking build system type... " >&6; }
55565082 test "x$ac_build_alias" = x &&
55575083 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
55585084 test "x$ac_build_alias" = x &&
5559 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
5085 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
55605086 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5561 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5087 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
55625088
55635089 fi
55645090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
55655091 $as_echo "$ac_cv_build" >&6; }
55665092 case $ac_cv_build in
55675093 *-*-*) ;;
5568 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
5094 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
55695095 esac
55705096 build=$ac_cv_build
55715097 ac_save_IFS=$IFS; IFS='-'
55905116 ac_cv_host=$ac_cv_build
55915117 else
55925118 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5593 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5119 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
55945120 fi
55955121
55965122 fi
55985124 $as_echo "$ac_cv_host" >&6; }
55995125 case $ac_cv_host in
56005126 *-*-*) ;;
5601 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
5127 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
56025128 esac
56035129 host=$ac_cv_host
56045130 ac_save_IFS=$IFS; IFS='-'
56715197 done
56725198 IFS=$as_save_IFS
56735199 if test -z "$ac_cv_path_SED"; then
5674 as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
5200 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
56755201 fi
56765202 else
56775203 ac_cv_path_SED=$SED
57505276 done
57515277 IFS=$as_save_IFS
57525278 if test -z "$ac_cv_path_FGREP"; then
5753 as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5279 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
57545280 fi
57555281 else
57565282 ac_cv_path_FGREP=$FGREP
58665392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58675393 $as_echo "no" >&6; }
58685394 fi
5869 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
5395 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
58705396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
58715397 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
58725398 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
60685594 else
60695595 lt_cv_nm_interface="BSD nm"
60705596 echo "int some_variable = 0;" > conftest.$ac_ext
6071 (eval echo "\"\$as_me:6072: $ac_compile\"" >&5)
5597 (eval echo "\"\$as_me:5598: $ac_compile\"" >&5)
60725598 (eval "$ac_compile" 2>conftest.err)
60735599 cat conftest.err >&5
6074 (eval echo "\"\$as_me:6075: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
5600 (eval echo "\"\$as_me:5601: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
60755601 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
60765602 cat conftest.err >&5
6077 (eval echo "\"\$as_me:6078: output\"" >&5)
5603 (eval echo "\"\$as_me:5604: output\"" >&5)
60785604 cat conftest.out >&5
60795605 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
60805606 lt_cv_nm_interface="MS dumpbin"
72796805 ;;
72806806 *-*-irix6*)
72816807 # Find out which ABI we are using.
7282 echo '#line 7283 "configure"' > conftest.$ac_ext
6808 echo '#line 6809 "configure"' > conftest.$ac_ext
72836809 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
72846810 (eval $ac_compile) 2>&5
72856811 ac_status=$?
80337559 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
80347560 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
80357561 "
8036 eval as_val=\$$as_ac_Header
8037 if test "x$as_val" = x""yes; then :
7562 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
80387563 cat >>confdefs.h <<_ACEOF
80397564 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
80407565 _ACEOF
85308055 $RM -r conftest*
85318056
85328057
8058 ## CAVEAT EMPTOR:
8059 ## There is no encapsulation within the following macros, do not change
8060 ## the running order or otherwise move them around unless you know exactly
8061 ## what you are doing...
85338062 if test -n "$compiler"; then
85348063
85358064 lt_prog_compiler_no_builtin_flag=
85558084 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
85568085 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
85578086 -e 's:$: $lt_compiler_flag:'`
8558 (eval echo "\"\$as_me:8559: $lt_compile\"" >&5)
8087 (eval echo "\"\$as_me:8088: $lt_compile\"" >&5)
85598088 (eval "$lt_compile" 2>conftest.err)
85608089 ac_status=$?
85618090 cat conftest.err >&5
8562 echo "$as_me:8563: \$? = $ac_status" >&5
8091 echo "$as_me:8092: \$? = $ac_status" >&5
85638092 if (exit $ac_status) && test -s "$ac_outfile"; then
85648093 # The compiler can only warn and ignore the option if not recognized
85658094 # So say no if there are warnings other than the usual output.
88948423 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
88958424 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
88968425 -e 's:$: $lt_compiler_flag:'`
8897 (eval echo "\"\$as_me:8898: $lt_compile\"" >&5)
8426 (eval echo "\"\$as_me:8427: $lt_compile\"" >&5)
88988427 (eval "$lt_compile" 2>conftest.err)
88998428 ac_status=$?
89008429 cat conftest.err >&5
8901 echo "$as_me:8902: \$? = $ac_status" >&5
8430 echo "$as_me:8431: \$? = $ac_status" >&5
89028431 if (exit $ac_status) && test -s "$ac_outfile"; then
89038432 # The compiler can only warn and ignore the option if not recognized
89048433 # So say no if there are warnings other than the usual output.
89998528 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
90008529 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
90018530 -e 's:$: $lt_compiler_flag:'`
9002 (eval echo "\"\$as_me:9003: $lt_compile\"" >&5)
8531 (eval echo "\"\$as_me:8532: $lt_compile\"" >&5)
90038532 (eval "$lt_compile" 2>out/conftest.err)
90048533 ac_status=$?
90058534 cat out/conftest.err >&5
9006 echo "$as_me:9007: \$? = $ac_status" >&5
8535 echo "$as_me:8536: \$? = $ac_status" >&5
90078536 if (exit $ac_status) && test -s out/conftest2.$ac_objext
90088537 then
90098538 # The compiler can only warn and ignore the option if not recognized
90548583 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
90558584 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
90568585 -e 's:$: $lt_compiler_flag:'`
9057 (eval echo "\"\$as_me:9058: $lt_compile\"" >&5)
8586 (eval echo "\"\$as_me:8587: $lt_compile\"" >&5)
90588587 (eval "$lt_compile" 2>out/conftest.err)
90598588 ac_status=$?
90608589 cat out/conftest.err >&5
9061 echo "$as_me:9062: \$? = $ac_status" >&5
8590 echo "$as_me:8591: \$? = $ac_status" >&5
90628591 if (exit $ac_status) && test -s out/conftest2.$ac_objext
90638592 then
90648593 # The compiler can only warn and ignore the option if not recognized
1143810967 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1143910968 lt_status=$lt_dlunknown
1144010969 cat > conftest.$ac_ext <<_LT_EOF
11441 #line 11442 "configure"
10970 #line 10971 "configure"
1144210971 #include "confdefs.h"
1144310972
1144410973 #if HAVE_DLFCN_H
1153411063 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1153511064 lt_status=$lt_dlunknown
1153611065 cat > conftest.$ac_ext <<_LT_EOF
11537 #line 11538 "configure"
11066 #line 11067 "configure"
1153811067 #include "confdefs.h"
1153911068
1154011069 #if HAVE_DLFCN_H
1176111290 # Only expand once:
1176211291
1176311292
11293 mkdir_p="$MKDIR_P"
11294 case $mkdir_p in
11295 [\\/$]* | ?:[\\/]*) ;;
11296 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
11297 esac
11298
11299 # Check whether --enable-glibtest was given.
11300 if test "${enable_glibtest+set}" = set; then :
11301 enableval=$enable_glibtest;
11302 else
11303 enable_glibtest=yes
11304 fi
11305
11306
11307 pkg_config_args=glib-2.0
11308 for module in .
11309 do
11310 case "$module" in
11311 gmodule)
11312 pkg_config_args="$pkg_config_args gmodule-2.0"
11313 ;;
11314 gmodule-no-export)
11315 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
11316 ;;
11317 gobject)
11318 pkg_config_args="$pkg_config_args gobject-2.0"
11319 ;;
11320 gthread)
11321 pkg_config_args="$pkg_config_args gthread-2.0"
11322 ;;
11323 gio*)
11324 pkg_config_args="$pkg_config_args $module-2.0"
11325 ;;
11326 esac
11327 done
11328
11329
11330
11331
1176411332
1176511333
1176611334
1186511433
1186611434 fi
1186711435 if test -n "$PKG_CONFIG"; then
11868 _pkg_min_version=0.9.0
11436 _pkg_min_version=0.16
1186911437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
1187011438 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
1187111439 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1187611444 $as_echo "no" >&6; }
1187711445 PKG_CONFIG=""
1187811446 fi
11879
11880 fi
11447 fi
11448
11449 no_glib=""
11450
11451 if test "x$PKG_CONFIG" = x ; then
11452 no_glib=yes
11453 PKG_CONFIG=no
11454 fi
11455
11456 min_glib_version=2.0.0
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5
11458 $as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; }
11459
11460 if test x$PKG_CONFIG != xno ; then
11461 ## don't try to run the test against uninstalled libtool libs
11462 if $PKG_CONFIG --uninstalled $pkg_config_args; then
11463 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
11464 enable_glibtest=no
11465 fi
11466
11467 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
11468 :
11469 else
11470 no_glib=yes
11471 fi
11472 fi
11473
11474 if test x"$no_glib" = x ; then
11475 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
11476 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
11477 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
11478
11479 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
11480 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
11481 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
11482 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
11483 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
11484 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
11485 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
11486 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
11487 if test "x$enable_glibtest" = "xyes" ; then
11488 ac_save_CFLAGS="$CFLAGS"
11489 ac_save_LIBS="$LIBS"
11490 CFLAGS="$CFLAGS $GLIB_CFLAGS"
11491 LIBS="$GLIB_LIBS $LIBS"
11492 rm -f conf.glibtest
11493 if test "$cross_compiling" = yes; then :
11494 echo $ac_n "cross compiling; assumed OK... $ac_c"
11495 else
11496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11497 /* end confdefs.h. */
11498
11499 #include <glib.h>
11500 #include <stdio.h>
11501 #include <stdlib.h>
11502
11503 int
11504 main ()
11505 {
11506 unsigned int major, minor, micro;
11507 char *tmp_version;
11508
11509 fclose (fopen ("conf.glibtest", "w"));
11510
11511 /* HP/UX 9 (%@#!) writes to sscanf strings */
11512 tmp_version = g_strdup("$min_glib_version");
11513 if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, &micro) != 3) {
11514 printf("%s, bad version string\n", "$min_glib_version");
11515 exit(1);
11516 }
11517
11518 if ((glib_major_version != $glib_config_major_version) ||
11519 (glib_minor_version != $glib_config_minor_version) ||
11520 (glib_micro_version != $glib_config_micro_version))
11521 {
11522 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
11523 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
11524 glib_major_version, glib_minor_version, glib_micro_version);
11525 printf ("*** was found! If pkg-config was correct, then it is best\n");
11526 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
11527 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
11528 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
11529 printf("*** required on your system.\n");
11530 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
11531 printf("*** to point to the correct configuration files\n");
11532 }
11533 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
11534 (glib_minor_version != GLIB_MINOR_VERSION) ||
11535 (glib_micro_version != GLIB_MICRO_VERSION))
11536 {
11537 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
11538 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
11539 printf("*** library (version %d.%d.%d)\n",
11540 glib_major_version, glib_minor_version, glib_micro_version);
11541 }
11542 else
11543 {
11544 if ((glib_major_version > major) ||
11545 ((glib_major_version == major) && (glib_minor_version > minor)) ||
11546 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
11547 {
11548 return 0;
11549 }
11550 else
11551 {
11552 printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
11553 glib_major_version, glib_minor_version, glib_micro_version);
11554 printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
11555 major, minor, micro);
11556 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
11557 printf("***\n");
11558 printf("*** If you have already installed a sufficiently new version, this error\n");
11559 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
11560 printf("*** being found. The easiest way to fix this is to remove the old version\n");
11561 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
11562 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
11563 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
11564 printf("*** so that the correct libraries are found at run-time))\n");
11565 }
11566 }
11567 return 1;
11568 }
11569
11570 _ACEOF
11571 if ac_fn_c_try_run "$LINENO"; then :
11572
11573 else
11574 no_glib=yes
11575 fi
11576 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11577 conftest.$ac_objext conftest.beam conftest.$ac_ext
11578 fi
11579
11580 CFLAGS="$ac_save_CFLAGS"
11581 LIBS="$ac_save_LIBS"
11582 fi
11583 fi
11584 if test "x$no_glib" = x ; then
11585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5
11586 $as_echo "yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; }
11587 :
11588 else
11589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11590 $as_echo "no" >&6; }
11591 if test "$PKG_CONFIG" = "no" ; then
11592 echo "*** A new enough version of pkg-config was not found."
11593 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
11594 else
11595 if test -f conf.glibtest ; then
11596 :
11597 else
11598 echo "*** Could not run GLIB test program, checking why..."
11599 ac_save_CFLAGS="$CFLAGS"
11600 ac_save_LIBS="$LIBS"
11601 CFLAGS="$CFLAGS $GLIB_CFLAGS"
11602 LIBS="$LIBS $GLIB_LIBS"
11603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11604 /* end confdefs.h. */
11605
11606 #include <glib.h>
11607 #include <stdio.h>
11608
11609 int
11610 main ()
11611 {
11612 return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
11613 ;
11614 return 0;
11615 }
11616 _ACEOF
11617 if ac_fn_c_try_link "$LINENO"; then :
11618 echo "*** The test program compiled, but did not run. This usually means"
11619 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
11620 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
11621 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
11622 echo "*** to the installed location Also, make sure you have run ldconfig if that"
11623 echo "*** is required on your system"
11624 echo "***"
11625 echo "*** If you have an old version installed, it is best to remove it, although"
11626 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
11627 else
11628 echo "*** The test program failed to compile or link. See the file config.log for the"
11629 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."
11630 fi
11631 rm -f core conftest.err conftest.$ac_objext \
11632 conftest$ac_exeext conftest.$ac_ext
11633 CFLAGS="$ac_save_CFLAGS"
11634 LIBS="$ac_save_LIBS"
11635 fi
11636 fi
11637 GLIB_CFLAGS=""
11638 GLIB_LIBS=""
11639 GLIB_GENMARSHAL=""
11640 GOBJECT_QUERY=""
11641 GLIB_MKENUMS=""
11642 :
11643 fi
11644
11645
11646
11647
11648
11649 rm -f conf.glibtest
11650
11651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
11652 $as_echo_n "checking for X... " >&6; }
11653
11654
11655 # Check whether --with-x was given.
11656 if test "${with_x+set}" = set; then :
11657 withval=$with_x;
11658 fi
11659
11660 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11661 if test "x$with_x" = xno; then
11662 # The user explicitly disabled X.
11663 have_x=disabled
11664 else
11665 case $x_includes,$x_libraries in #(
11666 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
11667 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
11668 $as_echo_n "(cached) " >&6
11669 else
11670 # One or both of the vars are not set, and there is no cached value.
11671 ac_x_includes=no ac_x_libraries=no
11672 rm -f -r conftest.dir
11673 if mkdir conftest.dir; then
11674 cd conftest.dir
11675 cat >Imakefile <<'_ACEOF'
11676 incroot:
11677 @echo incroot='${INCROOT}'
11678 usrlibdir:
11679 @echo usrlibdir='${USRLIBDIR}'
11680 libdir:
11681 @echo libdir='${LIBDIR}'
11682 _ACEOF
11683 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
11684 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
11685 for ac_var in incroot usrlibdir libdir; do
11686 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
11687 done
11688 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11689 for ac_extension in a so sl dylib la dll; do
11690 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
11691 test -f "$ac_im_libdir/libX11.$ac_extension"; then
11692 ac_im_usrlibdir=$ac_im_libdir; break
11693 fi
11694 done
11695 # Screen out bogus values from the imake configuration. They are
11696 # bogus both because they are the default anyway, and because
11697 # using them would break gcc on systems where it needs fixed includes.
11698 case $ac_im_incroot in
11699 /usr/include) ac_x_includes= ;;
11700 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11701 esac
11702 case $ac_im_usrlibdir in
11703 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
11704 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11705 esac
11706 fi
11707 cd ..
11708 rm -f -r conftest.dir
11709 fi
11710
11711 # Standard set of common directories for X headers.
11712 # Check X11 before X11Rn because it is often a symlink to the current release.
11713 ac_x_header_dirs='
11714 /usr/X11/include
11715 /usr/X11R7/include
11716 /usr/X11R6/include
11717 /usr/X11R5/include
11718 /usr/X11R4/include
11719
11720 /usr/include/X11
11721 /usr/include/X11R7
11722 /usr/include/X11R6
11723 /usr/include/X11R5
11724 /usr/include/X11R4
11725
11726 /usr/local/X11/include
11727 /usr/local/X11R7/include
11728 /usr/local/X11R6/include
11729 /usr/local/X11R5/include
11730 /usr/local/X11R4/include
11731
11732 /usr/local/include/X11
11733 /usr/local/include/X11R7
11734 /usr/local/include/X11R6
11735 /usr/local/include/X11R5
11736 /usr/local/include/X11R4
11737
11738 /usr/X386/include
11739 /usr/x386/include
11740 /usr/XFree86/include/X11
11741
11742 /usr/include
11743 /usr/local/include
11744 /usr/unsupported/include
11745 /usr/athena/include
11746 /usr/local/x11r5/include
11747 /usr/lpp/Xamples/include
11748
11749 /usr/openwin/include
11750 /usr/openwin/share/include'
11751
11752 if test "$ac_x_includes" = no; then
11753 # Guess where to find include files, by looking for Xlib.h.
11754 # First, try using that file with no special directory specified.
11755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11756 /* end confdefs.h. */
11757 #include <X11/Xlib.h>
11758 _ACEOF
11759 if ac_fn_c_try_cpp "$LINENO"; then :
11760 # We can compile using X headers with no special include directory.
11761 ac_x_includes=
11762 else
11763 for ac_dir in $ac_x_header_dirs; do
11764 if test -r "$ac_dir/X11/Xlib.h"; then
11765 ac_x_includes=$ac_dir
11766 break
11767 fi
11768 done
11769 fi
11770 rm -f conftest.err conftest.i conftest.$ac_ext
11771 fi # $ac_x_includes = no
11772
11773 if test "$ac_x_libraries" = no; then
11774 # Check for the libraries.
11775 # See if we find them without any special options.
11776 # Don't add to $LIBS permanently.
11777 ac_save_LIBS=$LIBS
11778 LIBS="-lX11 $LIBS"
11779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11780 /* end confdefs.h. */
11781 #include <X11/Xlib.h>
11782 int
11783 main ()
11784 {
11785 XrmInitialize ()
11786 ;
11787 return 0;
11788 }
11789 _ACEOF
11790 if ac_fn_c_try_link "$LINENO"; then :
11791 LIBS=$ac_save_LIBS
11792 # We can link X programs with no special library path.
11793 ac_x_libraries=
11794 else
11795 LIBS=$ac_save_LIBS
11796 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11797 do
11798 # Don't even attempt the hair of trying to link an X program!
11799 for ac_extension in a so sl dylib la dll; do
11800 if test -r "$ac_dir/libX11.$ac_extension"; then
11801 ac_x_libraries=$ac_dir
11802 break 2
11803 fi
11804 done
11805 done
11806 fi
11807 rm -f core conftest.err conftest.$ac_objext \
11808 conftest$ac_exeext conftest.$ac_ext
11809 fi # $ac_x_libraries = no
11810
11811 case $ac_x_includes,$ac_x_libraries in #(
11812 no,* | *,no | *\'*)
11813 # Didn't find X, or a directory has "'" in its name.
11814 ac_cv_have_x="have_x=no";; #(
11815 *)
11816 # Record where we found X for the cache.
11817 ac_cv_have_x="have_x=yes\
11818 ac_x_includes='$ac_x_includes'\
11819 ac_x_libraries='$ac_x_libraries'"
11820 esac
11821 fi
11822 ;; #(
11823 *) have_x=yes;;
11824 esac
11825 eval "$ac_cv_have_x"
11826 fi # $with_x != no
11827
11828 if test "$have_x" != yes; then
11829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
11830 $as_echo "$have_x" >&6; }
11831 no_x=yes
11832 else
11833 # If each of the values was on the command line, it overrides each guess.
11834 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11835 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11836 # Update the cache value to reflect the command line values.
11837 ac_cv_have_x="have_x=yes\
11838 ac_x_includes='$x_includes'\
11839 ac_x_libraries='$x_libraries'"
11840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
11841 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
11842 fi
11843
11844 if test "$no_x" = yes; then
11845 # Not all programs may use this symbol, but it does not hurt to define it.
11846
11847 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
11848
11849 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11850 else
11851 if test -n "$x_includes"; then
11852 X_CFLAGS="$X_CFLAGS -I$x_includes"
11853 fi
11854
11855 # It would also be nice to do this for all -L options, not just this one.
11856 if test -n "$x_libraries"; then
11857 X_LIBS="$X_LIBS -L$x_libraries"
11858 # For Solaris; some versions of Sun CC require a space after -R and
11859 # others require no space. Words are not sufficient . . . .
11860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
11861 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
11862 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11863 ac_xsave_c_werror_flag=$ac_c_werror_flag
11864 ac_c_werror_flag=yes
11865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11866 /* end confdefs.h. */
11867
11868 int
11869 main ()
11870 {
11871
11872 ;
11873 return 0;
11874 }
11875 _ACEOF
11876 if ac_fn_c_try_link "$LINENO"; then :
11877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11878 $as_echo "no" >&6; }
11879 X_LIBS="$X_LIBS -R$x_libraries"
11880 else
11881 LIBS="$ac_xsave_LIBS -R $x_libraries"
11882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11883 /* end confdefs.h. */
11884
11885 int
11886 main ()
11887 {
11888
11889 ;
11890 return 0;
11891 }
11892 _ACEOF
11893 if ac_fn_c_try_link "$LINENO"; then :
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11895 $as_echo "yes" >&6; }
11896 X_LIBS="$X_LIBS -R $x_libraries"
11897 else
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
11899 $as_echo "neither works" >&6; }
11900 fi
11901 rm -f core conftest.err conftest.$ac_objext \
11902 conftest$ac_exeext conftest.$ac_ext
11903 fi
11904 rm -f core conftest.err conftest.$ac_objext \
11905 conftest$ac_exeext conftest.$ac_ext
11906 ac_c_werror_flag=$ac_xsave_c_werror_flag
11907 LIBS=$ac_xsave_LIBS
11908 fi
11909
11910 # Check for system-dependent libraries X programs must link with.
11911 # Do this before checking for the system-independent R6 libraries
11912 # (-lICE), since we may need -lsocket or whatever for X linking.
11913
11914 if test "$ISC" = yes; then
11915 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11916 else
11917 # Martyn Johnson says this is needed for Ultrix, if the X
11918 # libraries were built with DECnet support. And Karl Berry says
11919 # the Alpha needs dnet_stub (dnet does not exist).
11920 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922 /* end confdefs.h. */
11923
11924 /* Override any GCC internal prototype to avoid an error.
11925 Use char because int might match the return type of a GCC
11926 builtin and then its argument prototype would still apply. */
11927 #ifdef __cplusplus
11928 extern "C"
11929 #endif
11930 char XOpenDisplay ();
11931 int
11932 main ()
11933 {
11934 return XOpenDisplay ();
11935 ;
11936 return 0;
11937 }
11938 _ACEOF
11939 if ac_fn_c_try_link "$LINENO"; then :
11940
11941 else
11942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
11943 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
11944 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
11945 $as_echo_n "(cached) " >&6
11946 else
11947 ac_check_lib_save_LIBS=$LIBS
11948 LIBS="-ldnet $LIBS"
11949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11950 /* end confdefs.h. */
11951
11952 /* Override any GCC internal prototype to avoid an error.
11953 Use char because int might match the return type of a GCC
11954 builtin and then its argument prototype would still apply. */
11955 #ifdef __cplusplus
11956 extern "C"
11957 #endif
11958 char dnet_ntoa ();
11959 int
11960 main ()
11961 {
11962 return dnet_ntoa ();
11963 ;
11964 return 0;
11965 }
11966 _ACEOF
11967 if ac_fn_c_try_link "$LINENO"; then :
11968 ac_cv_lib_dnet_dnet_ntoa=yes
11969 else
11970 ac_cv_lib_dnet_dnet_ntoa=no
11971 fi
11972 rm -f core conftest.err conftest.$ac_objext \
11973 conftest$ac_exeext conftest.$ac_ext
11974 LIBS=$ac_check_lib_save_LIBS
11975 fi
11976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11977 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
11978 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
11979 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
11980 fi
11981
11982 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
11983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
11984 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
11985 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
11986 $as_echo_n "(cached) " >&6
11987 else
11988 ac_check_lib_save_LIBS=$LIBS
11989 LIBS="-ldnet_stub $LIBS"
11990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11991 /* end confdefs.h. */
11992
11993 /* Override any GCC internal prototype to avoid an error.
11994 Use char because int might match the return type of a GCC
11995 builtin and then its argument prototype would still apply. */
11996 #ifdef __cplusplus
11997 extern "C"
11998 #endif
11999 char dnet_ntoa ();
12000 int
12001 main ()
12002 {
12003 return dnet_ntoa ();
12004 ;
12005 return 0;
12006 }
12007 _ACEOF
12008 if ac_fn_c_try_link "$LINENO"; then :
12009 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12010 else
12011 ac_cv_lib_dnet_stub_dnet_ntoa=no
12012 fi
12013 rm -f core conftest.err conftest.$ac_objext \
12014 conftest$ac_exeext conftest.$ac_ext
12015 LIBS=$ac_check_lib_save_LIBS
12016 fi
12017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12018 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
12019 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
12020 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12021 fi
12022
12023 fi
12024 fi
12025 rm -f core conftest.err conftest.$ac_objext \
12026 conftest$ac_exeext conftest.$ac_ext
12027 LIBS="$ac_xsave_LIBS"
12028
12029 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12030 # to get the SysV transport functions.
12031 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12032 # needs -lnsl.
12033 # The nsl library prevents programs from opening the X display
12034 # on Irix 5.2, according to T.E. Dickey.
12035 # The functions gethostbyname, getservbyname, and inet_addr are
12036 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12037 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
12038 if test "x$ac_cv_func_gethostbyname" = x""yes; then :
12039
12040 fi
12041
12042 if test $ac_cv_func_gethostbyname = no; then
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
12044 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
12045 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
12046 $as_echo_n "(cached) " >&6
12047 else
12048 ac_check_lib_save_LIBS=$LIBS
12049 LIBS="-lnsl $LIBS"
12050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12051 /* end confdefs.h. */
12052
12053 /* Override any GCC internal prototype to avoid an error.
12054 Use char because int might match the return type of a GCC
12055 builtin and then its argument prototype would still apply. */
12056 #ifdef __cplusplus
12057 extern "C"
12058 #endif
12059 char gethostbyname ();
12060 int
12061 main ()
12062 {
12063 return gethostbyname ();
12064 ;
12065 return 0;
12066 }
12067 _ACEOF
12068 if ac_fn_c_try_link "$LINENO"; then :
12069 ac_cv_lib_nsl_gethostbyname=yes
12070 else
12071 ac_cv_lib_nsl_gethostbyname=no
12072 fi
12073 rm -f core conftest.err conftest.$ac_objext \
12074 conftest$ac_exeext conftest.$ac_ext
12075 LIBS=$ac_check_lib_save_LIBS
12076 fi
12077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
12078 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
12079 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
12080 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12081 fi
12082
12083 if test $ac_cv_lib_nsl_gethostbyname = no; then
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
12085 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
12086 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
12087 $as_echo_n "(cached) " >&6
12088 else
12089 ac_check_lib_save_LIBS=$LIBS
12090 LIBS="-lbsd $LIBS"
12091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12092 /* end confdefs.h. */
12093
12094 /* Override any GCC internal prototype to avoid an error.
12095 Use char because int might match the return type of a GCC
12096 builtin and then its argument prototype would still apply. */
12097 #ifdef __cplusplus
12098 extern "C"
12099 #endif
12100 char gethostbyname ();
12101 int
12102 main ()
12103 {
12104 return gethostbyname ();
12105 ;
12106 return 0;
12107 }
12108 _ACEOF
12109 if ac_fn_c_try_link "$LINENO"; then :
12110 ac_cv_lib_bsd_gethostbyname=yes
12111 else
12112 ac_cv_lib_bsd_gethostbyname=no
12113 fi
12114 rm -f core conftest.err conftest.$ac_objext \
12115 conftest$ac_exeext conftest.$ac_ext
12116 LIBS=$ac_check_lib_save_LIBS
12117 fi
12118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
12119 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
12120 if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
12121 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
12122 fi
12123
12124 fi
12125 fi
12126
12127 # lieder@skyler.mavd.honeywell.com says without -lsocket,
12128 # socket/setsockopt and other routines are undefined under SCO ODT
12129 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
12130 # on later versions), says Simon Leinen: it contains gethostby*
12131 # variants that don't use the name server (or something). -lsocket
12132 # must be given before -lnsl if both are needed. We assume that
12133 # if connect needs -lnsl, so does gethostbyname.
12134 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
12135 if test "x$ac_cv_func_connect" = x""yes; then :
12136
12137 fi
12138
12139 if test $ac_cv_func_connect = no; then
12140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
12141 $as_echo_n "checking for connect in -lsocket... " >&6; }
12142 if test "${ac_cv_lib_socket_connect+set}" = set; then :
12143 $as_echo_n "(cached) " >&6
12144 else
12145 ac_check_lib_save_LIBS=$LIBS
12146 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
12147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12148 /* end confdefs.h. */
12149
12150 /* Override any GCC internal prototype to avoid an error.
12151 Use char because int might match the return type of a GCC
12152 builtin and then its argument prototype would still apply. */
12153 #ifdef __cplusplus
12154 extern "C"
12155 #endif
12156 char connect ();
12157 int
12158 main ()
12159 {
12160 return connect ();
12161 ;
12162 return 0;
12163 }
12164 _ACEOF
12165 if ac_fn_c_try_link "$LINENO"; then :
12166 ac_cv_lib_socket_connect=yes
12167 else
12168 ac_cv_lib_socket_connect=no
12169 fi
12170 rm -f core conftest.err conftest.$ac_objext \
12171 conftest$ac_exeext conftest.$ac_ext
12172 LIBS=$ac_check_lib_save_LIBS
12173 fi
12174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
12175 $as_echo "$ac_cv_lib_socket_connect" >&6; }
12176 if test "x$ac_cv_lib_socket_connect" = x""yes; then :
12177 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
12178 fi
12179
12180 fi
12181
12182 # Guillermo Gomez says -lposix is necessary on A/UX.
12183 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
12184 if test "x$ac_cv_func_remove" = x""yes; then :
12185
12186 fi
12187
12188 if test $ac_cv_func_remove = no; then
12189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
12190 $as_echo_n "checking for remove in -lposix... " >&6; }
12191 if test "${ac_cv_lib_posix_remove+set}" = set; then :
12192 $as_echo_n "(cached) " >&6
12193 else
12194 ac_check_lib_save_LIBS=$LIBS
12195 LIBS="-lposix $LIBS"
12196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12197 /* end confdefs.h. */
12198
12199 /* Override any GCC internal prototype to avoid an error.
12200 Use char because int might match the return type of a GCC
12201 builtin and then its argument prototype would still apply. */
12202 #ifdef __cplusplus
12203 extern "C"
12204 #endif
12205 char remove ();
12206 int
12207 main ()
12208 {
12209 return remove ();
12210 ;
12211 return 0;
12212 }
12213 _ACEOF
12214 if ac_fn_c_try_link "$LINENO"; then :
12215 ac_cv_lib_posix_remove=yes
12216 else
12217 ac_cv_lib_posix_remove=no
12218 fi
12219 rm -f core conftest.err conftest.$ac_objext \
12220 conftest$ac_exeext conftest.$ac_ext
12221 LIBS=$ac_check_lib_save_LIBS
12222 fi
12223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
12224 $as_echo "$ac_cv_lib_posix_remove" >&6; }
12225 if test "x$ac_cv_lib_posix_remove" = x""yes; then :
12226 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12227 fi
12228
12229 fi
12230
12231 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12232 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
12233 if test "x$ac_cv_func_shmat" = x""yes; then :
12234
12235 fi
12236
12237 if test $ac_cv_func_shmat = no; then
12238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
12239 $as_echo_n "checking for shmat in -lipc... " >&6; }
12240 if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
12241 $as_echo_n "(cached) " >&6
12242 else
12243 ac_check_lib_save_LIBS=$LIBS
12244 LIBS="-lipc $LIBS"
12245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12246 /* end confdefs.h. */
12247
12248 /* Override any GCC internal prototype to avoid an error.
12249 Use char because int might match the return type of a GCC
12250 builtin and then its argument prototype would still apply. */
12251 #ifdef __cplusplus
12252 extern "C"
12253 #endif
12254 char shmat ();
12255 int
12256 main ()
12257 {
12258 return shmat ();
12259 ;
12260 return 0;
12261 }
12262 _ACEOF
12263 if ac_fn_c_try_link "$LINENO"; then :
12264 ac_cv_lib_ipc_shmat=yes
12265 else
12266 ac_cv_lib_ipc_shmat=no
12267 fi
12268 rm -f core conftest.err conftest.$ac_objext \
12269 conftest$ac_exeext conftest.$ac_ext
12270 LIBS=$ac_check_lib_save_LIBS
12271 fi
12272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
12273 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
12274 if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
12275 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12276 fi
12277
12278 fi
12279 fi
12280
12281 # Check for libraries that X11R6 Xt/Xaw programs need.
12282 ac_save_LDFLAGS=$LDFLAGS
12283 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12284 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12285 # check for ICE first), but we must link in the order -lSM -lICE or
12286 # we get undefined symbols. So assume we have SM if we have ICE.
12287 # These have to be linked with before -lX11, unlike the other
12288 # libraries we check for below, so use a different variable.
12289 # John Interrante, Karl Berry
12290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
12291 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
12292 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
12293 $as_echo_n "(cached) " >&6
12294 else
12295 ac_check_lib_save_LIBS=$LIBS
12296 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12298 /* end confdefs.h. */
12299
12300 /* Override any GCC internal prototype to avoid an error.
12301 Use char because int might match the return type of a GCC
12302 builtin and then its argument prototype would still apply. */
12303 #ifdef __cplusplus
12304 extern "C"
12305 #endif
12306 char IceConnectionNumber ();
12307 int
12308 main ()
12309 {
12310 return IceConnectionNumber ();
12311 ;
12312 return 0;
12313 }
12314 _ACEOF
12315 if ac_fn_c_try_link "$LINENO"; then :
12316 ac_cv_lib_ICE_IceConnectionNumber=yes
12317 else
12318 ac_cv_lib_ICE_IceConnectionNumber=no
12319 fi
12320 rm -f core conftest.err conftest.$ac_objext \
12321 conftest$ac_exeext conftest.$ac_ext
12322 LIBS=$ac_check_lib_save_LIBS
12323 fi
12324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12325 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
12326 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
12327 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12328 fi
12329
12330 LDFLAGS=$ac_save_LDFLAGS
12331
12332 fi
12333
12334
12335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
12336 $as_echo_n "checking whether NLS is requested... " >&6; }
12337 # Check whether --enable-nls was given.
12338 if test "${enable_nls+set}" = set; then :
12339 enableval=$enable_nls; USE_NLS=$enableval
12340 else
12341 USE_NLS=yes
12342 fi
12343
12344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
12345 $as_echo "$USE_NLS" >&6; }
12346
12347
12348
12349
12350 case "$am__api_version" in
12351 1.01234)
12352 as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5
12353 ;;
12354 *)
12355 ;;
12356 esac
12357
12358 if test -n "0.35.0"; then
12359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.35.0" >&5
12360 $as_echo_n "checking for intltool >= 0.35.0... " >&6; }
12361
12362 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
12363 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
12364 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
12365
12366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
12367 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
12368 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
12369 as_fn_error $? "Your intltool is too old. You need intltool 0.35.0 or later." "$LINENO" 5
12370 fi
12371
12372 # Extract the first word of "intltool-update", so it can be a program name with args.
12373 set dummy intltool-update; ac_word=$2
12374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12375 $as_echo_n "checking for $ac_word... " >&6; }
12376 if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then :
12377 $as_echo_n "(cached) " >&6
12378 else
12379 case $INTLTOOL_UPDATE in
12380 [\\/]* | ?:[\\/]*)
12381 ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
12382 ;;
12383 *)
12384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12385 for as_dir in $PATH
12386 do
12387 IFS=$as_save_IFS
12388 test -z "$as_dir" && as_dir=.
12389 for ac_exec_ext in '' $ac_executable_extensions; do
12390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12391 ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
12392 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12393 break 2
12394 fi
12395 done
12396 done
12397 IFS=$as_save_IFS
12398
12399 ;;
12400 esac
12401 fi
12402 INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
12403 if test -n "$INTLTOOL_UPDATE"; then
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5
12405 $as_echo "$INTLTOOL_UPDATE" >&6; }
12406 else
12407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12408 $as_echo "no" >&6; }
12409 fi
12410
12411
12412 # Extract the first word of "intltool-merge", so it can be a program name with args.
12413 set dummy intltool-merge; ac_word=$2
12414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12415 $as_echo_n "checking for $ac_word... " >&6; }
12416 if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then :
12417 $as_echo_n "(cached) " >&6
12418 else
12419 case $INTLTOOL_MERGE in
12420 [\\/]* | ?:[\\/]*)
12421 ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
12422 ;;
12423 *)
12424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12425 for as_dir in $PATH
12426 do
12427 IFS=$as_save_IFS
12428 test -z "$as_dir" && as_dir=.
12429 for ac_exec_ext in '' $ac_executable_extensions; do
12430 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12431 ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
12432 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12433 break 2
12434 fi
12435 done
12436 done
12437 IFS=$as_save_IFS
12438
12439 ;;
12440 esac
12441 fi
12442 INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
12443 if test -n "$INTLTOOL_MERGE"; then
12444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5
12445 $as_echo "$INTLTOOL_MERGE" >&6; }
12446 else
12447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12448 $as_echo "no" >&6; }
12449 fi
12450
12451
12452 # Extract the first word of "intltool-extract", so it can be a program name with args.
12453 set dummy intltool-extract; ac_word=$2
12454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12455 $as_echo_n "checking for $ac_word... " >&6; }
12456 if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then :
12457 $as_echo_n "(cached) " >&6
12458 else
12459 case $INTLTOOL_EXTRACT in
12460 [\\/]* | ?:[\\/]*)
12461 ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
12462 ;;
12463 *)
12464 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12465 for as_dir in $PATH
12466 do
12467 IFS=$as_save_IFS
12468 test -z "$as_dir" && as_dir=.
12469 for ac_exec_ext in '' $ac_executable_extensions; do
12470 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12471 ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
12472 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12473 break 2
12474 fi
12475 done
12476 done
12477 IFS=$as_save_IFS
12478
12479 ;;
12480 esac
12481 fi
12482 INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
12483 if test -n "$INTLTOOL_EXTRACT"; then
12484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5
12485 $as_echo "$INTLTOOL_EXTRACT" >&6; }
12486 else
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488 $as_echo "no" >&6; }
12489 fi
12490
12491
12492 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
12493 as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
12494 fi
12495
12496 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12497 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12498 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12499 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12500 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@'
12501 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12502 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12503 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12504 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12505 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12506 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12507 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@'
12508 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12509 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12510 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12511 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12512 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12513 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12514 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612 # Check the gettext tools to make sure they are GNU
12613 # Extract the first word of "xgettext", so it can be a program name with args.
12614 set dummy xgettext; ac_word=$2
12615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12616 $as_echo_n "checking for $ac_word... " >&6; }
12617 if test "${ac_cv_path_XGETTEXT+set}" = set; then :
12618 $as_echo_n "(cached) " >&6
12619 else
12620 case $XGETTEXT in
12621 [\\/]* | ?:[\\/]*)
12622 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
12623 ;;
12624 *)
12625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12626 for as_dir in $PATH
12627 do
12628 IFS=$as_save_IFS
12629 test -z "$as_dir" && as_dir=.
12630 for ac_exec_ext in '' $ac_executable_extensions; do
12631 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12632 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
12633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12634 break 2
12635 fi
12636 done
12637 done
12638 IFS=$as_save_IFS
12639
12640 ;;
12641 esac
12642 fi
12643 XGETTEXT=$ac_cv_path_XGETTEXT
12644 if test -n "$XGETTEXT"; then
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
12646 $as_echo "$XGETTEXT" >&6; }
12647 else
12648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12649 $as_echo "no" >&6; }
12650 fi
12651
12652
12653 # Extract the first word of "msgmerge", so it can be a program name with args.
12654 set dummy msgmerge; ac_word=$2
12655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12656 $as_echo_n "checking for $ac_word... " >&6; }
12657 if test "${ac_cv_path_MSGMERGE+set}" = set; then :
12658 $as_echo_n "(cached) " >&6
12659 else
12660 case $MSGMERGE in
12661 [\\/]* | ?:[\\/]*)
12662 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
12663 ;;
12664 *)
12665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12666 for as_dir in $PATH
12667 do
12668 IFS=$as_save_IFS
12669 test -z "$as_dir" && as_dir=.
12670 for ac_exec_ext in '' $ac_executable_extensions; do
12671 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12672 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
12673 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12674 break 2
12675 fi
12676 done
12677 done
12678 IFS=$as_save_IFS
12679
12680 ;;
12681 esac
12682 fi
12683 MSGMERGE=$ac_cv_path_MSGMERGE
12684 if test -n "$MSGMERGE"; then
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
12686 $as_echo "$MSGMERGE" >&6; }
12687 else
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689 $as_echo "no" >&6; }
12690 fi
12691
12692
12693 # Extract the first word of "msgfmt", so it can be a program name with args.
12694 set dummy msgfmt; ac_word=$2
12695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12696 $as_echo_n "checking for $ac_word... " >&6; }
12697 if test "${ac_cv_path_MSGFMT+set}" = set; then :
12698 $as_echo_n "(cached) " >&6
12699 else
12700 case $MSGFMT in
12701 [\\/]* | ?:[\\/]*)
12702 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
12703 ;;
12704 *)
12705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12706 for as_dir in $PATH
12707 do
12708 IFS=$as_save_IFS
12709 test -z "$as_dir" && as_dir=.
12710 for ac_exec_ext in '' $ac_executable_extensions; do
12711 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12712 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
12713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12714 break 2
12715 fi
12716 done
12717 done
12718 IFS=$as_save_IFS
12719
12720 ;;
12721 esac
12722 fi
12723 MSGFMT=$ac_cv_path_MSGFMT
12724 if test -n "$MSGFMT"; then
12725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
12726 $as_echo "$MSGFMT" >&6; }
12727 else
12728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12729 $as_echo "no" >&6; }
12730 fi
12731
12732
12733 # Extract the first word of "gmsgfmt", so it can be a program name with args.
12734 set dummy gmsgfmt; ac_word=$2
12735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12736 $as_echo_n "checking for $ac_word... " >&6; }
12737 if test "${ac_cv_path_GMSGFMT+set}" = set; then :
12738 $as_echo_n "(cached) " >&6
12739 else
12740 case $GMSGFMT in
12741 [\\/]* | ?:[\\/]*)
12742 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
12743 ;;
12744 *)
12745 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12746 for as_dir in $PATH
12747 do
12748 IFS=$as_save_IFS
12749 test -z "$as_dir" && as_dir=.
12750 for ac_exec_ext in '' $ac_executable_extensions; do
12751 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12752 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
12753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12754 break 2
12755 fi
12756 done
12757 done
12758 IFS=$as_save_IFS
12759
12760 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
12761 ;;
12762 esac
12763 fi
12764 GMSGFMT=$ac_cv_path_GMSGFMT
12765 if test -n "$GMSGFMT"; then
12766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
12767 $as_echo "$GMSGFMT" >&6; }
12768 else
12769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12770 $as_echo "no" >&6; }
12771 fi
12772
12773
12774 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
12775 as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
12776 fi
12777 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
12778 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
12779 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
12780 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
12781 as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
12782 fi
12783
12784 # Extract the first word of "perl", so it can be a program name with args.
12785 set dummy perl; ac_word=$2
12786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12787 $as_echo_n "checking for $ac_word... " >&6; }
12788 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then :
12789 $as_echo_n "(cached) " >&6
12790 else
12791 case $INTLTOOL_PERL in
12792 [\\/]* | ?:[\\/]*)
12793 ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
12794 ;;
12795 *)
12796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12797 for as_dir in $PATH
12798 do
12799 IFS=$as_save_IFS
12800 test -z "$as_dir" && as_dir=.
12801 for ac_exec_ext in '' $ac_executable_extensions; do
12802 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12803 ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
12804 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12805 break 2
12806 fi
12807 done
12808 done
12809 IFS=$as_save_IFS
12810
12811 ;;
12812 esac
12813 fi
12814 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
12815 if test -n "$INTLTOOL_PERL"; then
12816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5
12817 $as_echo "$INTLTOOL_PERL" >&6; }
12818 else
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12820 $as_echo "no" >&6; }
12821 fi
12822
12823
12824 if test -z "$INTLTOOL_PERL"; then
12825 as_fn_error $? "perl not found" "$LINENO" 5
12826 fi
12827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5
12828 $as_echo_n "checking for perl >= 5.8.1... " >&6; }
12829 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
12830 if test $? -ne 0; then
12831 as_fn_error $? "perl 5.8.1 is required for intltool" "$LINENO" 5
12832 else
12833 IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
12834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5
12835 $as_echo "$IT_PERL_VERSION" >&6; }
12836 fi
12837 if test "x" != "xno-xml"; then
12838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5
12839 $as_echo_n "checking for XML::Parser... " >&6; }
12840 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
12841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12842 $as_echo "ok" >&6; }
12843 else
12844 as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5
12845 fi
12846 fi
12847
12848 # Substitute ALL_LINGUAS so we can use it in po/Makefile
12849
12850
12851 # Set DATADIRNAME correctly if it is not set yet
12852 # (copied from glib-gettext.m4)
12853 if test -z "$DATADIRNAME"; then
12854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12855 /* end confdefs.h. */
12856
12857 int
12858 main ()
12859 {
12860 extern int _nl_msg_cat_cntr;
12861 return _nl_msg_cat_cntr
12862 ;
12863 return 0;
12864 }
12865 _ACEOF
12866 if ac_fn_c_try_link "$LINENO"; then :
12867 DATADIRNAME=share
12868 else
12869 case $host in
12870 *-*-solaris*)
12871 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
12872 if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then :
12873 DATADIRNAME=share
12874 else
12875 DATADIRNAME=lib
12876 fi
12877
12878 ;;
12879 *)
12880 DATADIRNAME=lib
12881 ;;
12882 esac
12883 fi
12884 rm -f core conftest.err conftest.$ac_objext \
12885 conftest$ac_exeext conftest.$ac_ext
12886 fi
12887
12888
12889
12890
12891
12892
12893 # -----------------------------------------------------------
12894
1188112895
1188212896 pkg_failed=no
1188312897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSH_CONTACT" >&5
1188412898 $as_echo_n "checking for SSH_CONTACT... " >&6; }
1188512899
11886 if test -n "$PKG_CONFIG"; then
11887 if test -n "$SSH_CONTACT_CFLAGS"; then
11888 pkg_cv_SSH_CONTACT_CFLAGS="$SSH_CONTACT_CFLAGS"
11889 else
11890 if test -n "$PKG_CONFIG" && \
12900 if test -n "$SSH_CONTACT_CFLAGS"; then
12901 pkg_cv_SSH_CONTACT_CFLAGS="$SSH_CONTACT_CFLAGS"
12902 elif test -n "$PKG_CONFIG"; then
12903 if test -n "$PKG_CONFIG" && \
1189112904 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
11892 telepathy-glib >= 0.11.9
12905 telepathy-glib >= 0.13.9
1189312906 glib-2.0 >= 2.24
1189412907 gio-2.0
11895 gio-unix-2.0
1189612908 \""; } >&5
1189712909 ($PKG_CONFIG --exists --print-errors "
11898 telepathy-glib >= 0.11.9
12910 telepathy-glib >= 0.13.9
1189912911 glib-2.0 >= 2.24
1190012912 gio-2.0
11901 gio-unix-2.0
1190212913 ") 2>&5
1190312914 ac_status=$?
1190412915 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1190512916 test $ac_status = 0; }; then
1190612917 pkg_cv_SSH_CONTACT_CFLAGS=`$PKG_CONFIG --cflags "
11907 telepathy-glib >= 0.11.9
12918 telepathy-glib >= 0.13.9
1190812919 glib-2.0 >= 2.24
1190912920 gio-2.0
11910 gio-unix-2.0
1191112921 " 2>/dev/null`
1191212922 else
1191312923 pkg_failed=yes
1191412924 fi
11915 fi
11916 else
11917 pkg_failed=untried
11918 fi
11919 if test -n "$PKG_CONFIG"; then
11920 if test -n "$SSH_CONTACT_LIBS"; then
11921 pkg_cv_SSH_CONTACT_LIBS="$SSH_CONTACT_LIBS"
11922 else
11923 if test -n "$PKG_CONFIG" && \
12925 else
12926 pkg_failed=untried
12927 fi
12928 if test -n "$SSH_CONTACT_LIBS"; then
12929 pkg_cv_SSH_CONTACT_LIBS="$SSH_CONTACT_LIBS"
12930 elif test -n "$PKG_CONFIG"; then
12931 if test -n "$PKG_CONFIG" && \
1192412932 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
11925 telepathy-glib >= 0.11.9
12933 telepathy-glib >= 0.13.9
1192612934 glib-2.0 >= 2.24
1192712935 gio-2.0
11928 gio-unix-2.0
1192912936 \""; } >&5
1193012937 ($PKG_CONFIG --exists --print-errors "
11931 telepathy-glib >= 0.11.9
12938 telepathy-glib >= 0.13.9
1193212939 glib-2.0 >= 2.24
1193312940 gio-2.0
11934 gio-unix-2.0
1193512941 ") 2>&5
1193612942 ac_status=$?
1193712943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1193812944 test $ac_status = 0; }; then
1193912945 pkg_cv_SSH_CONTACT_LIBS=`$PKG_CONFIG --libs "
11940 telepathy-glib >= 0.11.9
12946 telepathy-glib >= 0.13.9
1194112947 glib-2.0 >= 2.24
1194212948 gio-2.0
11943 gio-unix-2.0
1194412949 " 2>/dev/null`
1194512950 else
1194612951 pkg_failed=yes
1194712952 fi
11948 fi
11949 else
11950 pkg_failed=untried
12953 else
12954 pkg_failed=untried
1195112955 fi
1195212956
1195312957
1195412958
1195512959 if test $pkg_failed = yes; then
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12961 $as_echo "no" >&6; }
1195612962
1195712963 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1195812964 _pkg_short_errors_supported=yes
1196012966 _pkg_short_errors_supported=no
1196112967 fi
1196212968 if test $_pkg_short_errors_supported = yes; then
11963 SSH_CONTACT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "
11964 telepathy-glib >= 0.11.9
12969 SSH_CONTACT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "
12970 telepathy-glib >= 0.13.9
1196512971 glib-2.0 >= 2.24
1196612972 gio-2.0
11967 gio-unix-2.0
11968 "`
12973 " 2>&1`
1196912974 else
11970 SSH_CONTACT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "
11971 telepathy-glib >= 0.11.9
12975 SSH_CONTACT_PKG_ERRORS=`$PKG_CONFIG --print-errors "
12976 telepathy-glib >= 0.13.9
1197212977 glib-2.0 >= 2.24
1197312978 gio-2.0
11974 gio-unix-2.0
11975 "`
12979 " 2>&1`
1197612980 fi
1197712981 # Put the nasty error message in config.log where it belongs
1197812982 echo "$SSH_CONTACT_PKG_ERRORS" >&5
1197912983
11980 as_fn_error "Package requirements (
11981 telepathy-glib >= 0.11.9
12984 as_fn_error $? "Package requirements (
12985 telepathy-glib >= 0.13.9
1198212986 glib-2.0 >= 2.24
1198312987 gio-2.0
11984 gio-unix-2.0
1198512988 ) were not met:
1198612989
1198712990 $SSH_CONTACT_PKG_ERRORS
1198812991
1198912992 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1199012993 installed software in a non-standard prefix.
12994
12995 Alternatively, you may set the environment variables SSH_CONTACT_CFLAGS
12996 and SSH_CONTACT_LIBS to avoid the need to call pkg-config.
12997 See the pkg-config man page for more details." "$LINENO" 5
12998 elif test $pkg_failed = untried; then
12999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13000 $as_echo "no" >&6; }
13001 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13002 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13003 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
13004 is in your PATH or set the PKG_CONFIG environment variable to the full
13005 path to pkg-config.
1199113006
1199213007 Alternatively, you may set the environment variables SSH_CONTACT_CFLAGS
1199313008 and SSH_CONTACT_LIBS to avoid the need to call pkg-config.
1199413009 See the pkg-config man page for more details.
11995 " "$LINENO" 5
11996 elif test $pkg_failed = untried; then
11997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11998 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11999 as_fn_error "The pkg-config script could not be found or is too old. Make sure it
12000 is in your PATH or set the PKG_CONFIG environment variable to the full
12001 path to pkg-config.
12002
12003 Alternatively, you may set the environment variables SSH_CONTACT_CFLAGS
12004 and SSH_CONTACT_LIBS to avoid the need to call pkg-config.
12005 See the pkg-config man page for more details.
1200613010
1200713011 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
12008 See \`config.log' for more details." "$LINENO" 5; }
13012 See \`config.log' for more details" "$LINENO" 5 ; }
1200913013 else
1201013014 SSH_CONTACT_CFLAGS=$pkg_cv_SSH_CONTACT_CFLAGS
1201113015 SSH_CONTACT_LIBS=$pkg_cv_SSH_CONTACT_LIBS
1201213016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1201313017 $as_echo "yes" >&6; }
12014 :
12015 fi
12016
12017 ac_config_files="$ac_config_files Makefile src/Makefile"
13018
13019 fi
13020
13021 # -----------------------------------------------------------
13022 # Error flags
13023 # -----------------------------------------------------------
13024
13025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wall" >&5
13026 $as_echo_n "checking to see if compiler understands -Wall... " >&6; }
13027
13028 save_CFLAGS="$CFLAGS"
13029 CFLAGS="$CFLAGS -Wall"
13030
13031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13032 /* end confdefs.h. */
13033
13034 int
13035 main ()
13036 {
13037
13038 ;
13039 return 0;
13040 }
13041 _ACEOF
13042 if ac_fn_c_try_compile "$LINENO"; then :
13043 flag_ok=yes
13044 else
13045 flag_ok=no
13046 fi
13047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13048 CFLAGS="$save_CFLAGS"
13049
13050 if test "X$flag_ok" = Xyes ; then
13051 ERROR_CFLAGS="-Wall"
13052 true
13053 else
13054 ERROR_CFLAGS=""
13055 true
13056 fi
13057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
13058 $as_echo "$flag_ok" >&6; }
13059
13060
13061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Werror" >&5
13062 $as_echo_n "checking to see if compiler understands -Werror... " >&6; }
13063
13064 save_CFLAGS="$CFLAGS"
13065 CFLAGS="$CFLAGS -Werror"
13066
13067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13068 /* end confdefs.h. */
13069
13070 int
13071 main ()
13072 {
13073
13074 ;
13075 return 0;
13076 }
13077 _ACEOF
13078 if ac_fn_c_try_compile "$LINENO"; then :
13079 flag_ok=yes
13080 else
13081 flag_ok=no
13082 fi
13083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13084 CFLAGS="$save_CFLAGS"
13085
13086 if test "X$flag_ok" = Xyes ; then
13087 werror=yes
13088 true
13089 else
13090 werror=no
13091 true
13092 fi
13093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
13094 $as_echo "$flag_ok" >&6; }
13095
13096
13097 # Check whether --enable-Werror was given.
13098 if test "${enable_Werror+set}" = set; then :
13099 enableval=$enable_Werror; werror=$enableval
13100 else
13101 :
13102 fi
13103
13104
13105
13106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wextra" >&5
13107 $as_echo_n "checking to see if compiler understands -Wextra... " >&6; }
13108
13109 save_CFLAGS="$CFLAGS"
13110 CFLAGS="$CFLAGS -Wextra"
13111
13112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13113 /* end confdefs.h. */
13114
13115 int
13116 main ()
13117 {
13118
13119 ;
13120 return 0;
13121 }
13122 _ACEOF
13123 if ac_fn_c_try_compile "$LINENO"; then :
13124 flag_ok=yes
13125 else
13126 flag_ok=no
13127 fi
13128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13129 CFLAGS="$save_CFLAGS"
13130
13131 if test "X$flag_ok" = Xyes ; then
13132 wextra=yes
13133 true
13134 else
13135 wextra=no
13136 true
13137 fi
13138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
13139 $as_echo "$flag_ok" >&6; }
13140
13141
13142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wno-missing-field-initializers" >&5
13143 $as_echo_n "checking to see if compiler understands -Wno-missing-field-initializers... " >&6; }
13144
13145 save_CFLAGS="$CFLAGS"
13146 CFLAGS="$CFLAGS -Wno-missing-field-initializers"
13147
13148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13149 /* end confdefs.h. */
13150
13151 int
13152 main ()
13153 {
13154
13155 ;
13156 return 0;
13157 }
13158 _ACEOF
13159 if ac_fn_c_try_compile "$LINENO"; then :
13160 flag_ok=yes
13161 else
13162 flag_ok=no
13163 fi
13164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13165 CFLAGS="$save_CFLAGS"
13166
13167 if test "X$flag_ok" = Xyes ; then
13168 wno_missing_field_initializers=yes
13169 true
13170 else
13171 wno_missing_field_initializers=no
13172 true
13173 fi
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
13175 $as_echo "$flag_ok" >&6; }
13176
13177
13178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wno-unused-parameter" >&5
13179 $as_echo_n "checking to see if compiler understands -Wno-unused-parameter... " >&6; }
13180
13181 save_CFLAGS="$CFLAGS"
13182 CFLAGS="$CFLAGS -Wno-unused-parameter"
13183
13184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13185 /* end confdefs.h. */
13186
13187 int
13188 main ()
13189 {
13190
13191 ;
13192 return 0;
13193 }
13194 _ACEOF
13195 if ac_fn_c_try_compile "$LINENO"; then :
13196 flag_ok=yes
13197 else
13198 flag_ok=no
13199 fi
13200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13201 CFLAGS="$save_CFLAGS"
13202
13203 if test "X$flag_ok" = Xyes ; then
13204 wno_unused_parameter=yes
13205 true
13206 else
13207 wno_unused_parameter=no
13208 true
13209 fi
13210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
13211 $as_echo "$flag_ok" >&6; }
13212
13213
13214
13215
13216
13217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wdeclaration-after-statement" >&5
13218 $as_echo_n "checking to see if compiler understands -Wdeclaration-after-statement... " >&6; }
13219
13220 save_CFLAGS="$CFLAGS"
13221 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
13222
13223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13224 /* end confdefs.h. */
13225
13226 int
13227 main ()
13228 {
13229
13230 ;
13231 return 0;
13232 }
13233 _ACEOF
13234 if ac_fn_c_try_compile "$LINENO"; then :
13235 flag_ok=yes
13236 else
13237 flag_ok=no
13238 fi
13239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13240 CFLAGS="$save_CFLAGS"
13241
13242 if test "X$flag_ok" = Xyes ; then
13243 ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement"
13244 true
13245 else
13246
13247 true
13248 fi
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
13250 $as_echo "$flag_ok" >&6; }
13251
13252
13253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wshadow" >&5
13254 $as_echo_n "checking to see if compiler understands -Wshadow... " >&6; }
13255
13256 save_CFLAGS="$CFLAGS"
13257 CFLAGS="$CFLAGS -Wshadow"
13258
13259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13260 /* end confdefs.h. */
13261
13262 int
13263 main ()
13264 {
13265
13266 ;
13267 return 0;
13268 }
13269 _ACEOF
13270 if ac_fn_c_try_compile "$LINENO"; then :
13271 flag_ok=yes
13272 else
13273 flag_ok=no
13274 fi
13275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13276 CFLAGS="$save_CFLAGS"
13277
13278 if test "X$flag_ok" = Xyes ; then
13279 ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow"
13280 true
13281 else
13282
13283 true
13284 fi
13285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
13286 $as_echo "$flag_ok" >&6; }
13287
13288
13289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wmissing-prototypes" >&5
13290 $as_echo_n "checking to see if compiler understands -Wmissing-prototypes... " >&6; }
13291
13292 save_CFLAGS="$CFLAGS"
13293 CFLAGS="$CFLAGS -Wmissing-prototypes"
13294
13295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13296 /* end confdefs.h. */
13297
13298 int
13299 main ()
13300 {
13301
13302 ;
13303 return 0;
13304 }
13305 _ACEOF
13306 if ac_fn_c_try_compile "$LINENO"; then :
13307 flag_ok=yes
13308 else
13309 flag_ok=no
13310 fi
13311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13312 CFLAGS="$save_CFLAGS"
13313
13314 if test "X$flag_ok" = Xyes ; then
13315 ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes"
13316 true
13317 else
13318
13319 true
13320 fi
13321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
13322 $as_echo "$flag_ok" >&6; }
13323
13324
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wmissing-declarations" >&5
13326 $as_echo_n "checking to see if compiler understands -Wmissing-declarations... " >&6; }
13327
13328 save_CFLAGS="$CFLAGS"
13329 CFLAGS="$CFLAGS -Wmissing-declarations"
13330
13331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13332 /* end confdefs.h. */
13333
13334 int
13335 main ()
13336 {
13337
13338 ;
13339 return 0;
13340 }
13341 _ACEOF
13342 if ac_fn_c_try_compile "$LINENO"; then :
13343 flag_ok=yes
13344 else
13345 flag_ok=no
13346 fi
13347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13348 CFLAGS="$save_CFLAGS"
13349
13350 if test "X$flag_ok" = Xyes ; then
13351 ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations"
13352 true
13353 else
13354
13355 true
13356 fi
13357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5
13358 $as_echo "$flag_ok" >&6; }
13359
13360 # Disabled because some GTK+ headers (like gtkitemfactory.h) are bugged :(
13361 #AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
13362
13363
13364
13365 # -----------------------------------------------------------
13366 # Language Support
13367 # -----------------------------------------------------------
13368
13369 GETTEXT_PACKAGE=ssh-contact
13370
13371
13372 cat >>confdefs.h <<_ACEOF
13373 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
13374 _ACEOF
13375
13376
13377
13378 for ac_header in locale.h
13379 do :
13380 ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
13381 if test "x$ac_cv_header_locale_h" = x""yes; then :
13382 cat >>confdefs.h <<_ACEOF
13383 #define HAVE_LOCALE_H 1
13384 _ACEOF
13385
13386 fi
13387
13388 done
13389
13390 if test $ac_cv_header_locale_h = yes; then
13391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
13392 $as_echo_n "checking for LC_MESSAGES... " >&6; }
13393 if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
13394 $as_echo_n "(cached) " >&6
13395 else
13396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13397 /* end confdefs.h. */
13398 #include <locale.h>
13399 int
13400 main ()
13401 {
13402 return LC_MESSAGES
13403 ;
13404 return 0;
13405 }
13406 _ACEOF
13407 if ac_fn_c_try_link "$LINENO"; then :
13408 am_cv_val_LC_MESSAGES=yes
13409 else
13410 am_cv_val_LC_MESSAGES=no
13411 fi
13412 rm -f core conftest.err conftest.$ac_objext \
13413 conftest$ac_exeext conftest.$ac_ext
13414 fi
13415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
13416 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
13417 if test $am_cv_val_LC_MESSAGES = yes; then
13418
13419 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
13420
13421 fi
13422 fi
13423 USE_NLS=yes
13424
13425
13426 gt_cv_have_gettext=no
13427
13428 CATOBJEXT=NONE
13429 XGETTEXT=:
13430 INTLLIBS=
13431
13432 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
13433 if test "x$ac_cv_header_libintl_h" = x""yes; then :
13434 gt_cv_func_dgettext_libintl="no"
13435 libintl_extra_libs=""
13436
13437 #
13438 # First check in libc
13439 #
13440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
13441 $as_echo_n "checking for ngettext in libc... " >&6; }
13442 if test "${gt_cv_func_ngettext_libc+set}" = set; then :
13443 $as_echo_n "(cached) " >&6
13444 else
13445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13446 /* end confdefs.h. */
13447
13448 #include <libintl.h>
13449
13450 int
13451 main ()
13452 {
13453 return !ngettext ("","", 1)
13454 ;
13455 return 0;
13456 }
13457 _ACEOF
13458 if ac_fn_c_try_link "$LINENO"; then :
13459 gt_cv_func_ngettext_libc=yes
13460 else
13461 gt_cv_func_ngettext_libc=no
13462 fi
13463 rm -f core conftest.err conftest.$ac_objext \
13464 conftest$ac_exeext conftest.$ac_ext
13465
13466 fi
13467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
13468 $as_echo "$gt_cv_func_ngettext_libc" >&6; }
13469
13470 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
13471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
13472 $as_echo_n "checking for dgettext in libc... " >&6; }
13473 if test "${gt_cv_func_dgettext_libc+set}" = set; then :
13474 $as_echo_n "(cached) " >&6
13475 else
13476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13477 /* end confdefs.h. */
13478
13479 #include <libintl.h>
13480
13481 int
13482 main ()
13483 {
13484 return !dgettext ("","")
13485 ;
13486 return 0;
13487 }
13488 _ACEOF
13489 if ac_fn_c_try_link "$LINENO"; then :
13490 gt_cv_func_dgettext_libc=yes
13491 else
13492 gt_cv_func_dgettext_libc=no
13493 fi
13494 rm -f core conftest.err conftest.$ac_objext \
13495 conftest$ac_exeext conftest.$ac_ext
13496
13497 fi
13498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
13499 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
13500 fi
13501
13502 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
13503 for ac_func in bind_textdomain_codeset
13504 do :
13505 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
13506 if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then :
13507 cat >>confdefs.h <<_ACEOF
13508 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
13509 _ACEOF
13510
13511 fi
13512 done
13513
13514 fi
13515
13516 #
13517 # If we don't have everything we want, check in libintl
13518 #
13519 if test "$gt_cv_func_dgettext_libc" != "yes" \
13520 || test "$gt_cv_func_ngettext_libc" != "yes" \
13521 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
13522
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
13524 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
13525 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then :
13526 $as_echo_n "(cached) " >&6
13527 else
13528 ac_check_lib_save_LIBS=$LIBS
13529 LIBS="-lintl $LIBS"
13530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13531 /* end confdefs.h. */
13532
13533 /* Override any GCC internal prototype to avoid an error.
13534 Use char because int might match the return type of a GCC
13535 builtin and then its argument prototype would still apply. */
13536 #ifdef __cplusplus
13537 extern "C"
13538 #endif
13539 char bindtextdomain ();
13540 int
13541 main ()
13542 {
13543 return bindtextdomain ();
13544 ;
13545 return 0;
13546 }
13547 _ACEOF
13548 if ac_fn_c_try_link "$LINENO"; then :
13549 ac_cv_lib_intl_bindtextdomain=yes
13550 else
13551 ac_cv_lib_intl_bindtextdomain=no
13552 fi
13553 rm -f core conftest.err conftest.$ac_objext \
13554 conftest$ac_exeext conftest.$ac_ext
13555 LIBS=$ac_check_lib_save_LIBS
13556 fi
13557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
13558 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
13559 if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then :
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
13561 $as_echo_n "checking for ngettext in -lintl... " >&6; }
13562 if test "${ac_cv_lib_intl_ngettext+set}" = set; then :
13563 $as_echo_n "(cached) " >&6
13564 else
13565 ac_check_lib_save_LIBS=$LIBS
13566 LIBS="-lintl $LIBS"
13567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13568 /* end confdefs.h. */
13569
13570 /* Override any GCC internal prototype to avoid an error.
13571 Use char because int might match the return type of a GCC
13572 builtin and then its argument prototype would still apply. */
13573 #ifdef __cplusplus
13574 extern "C"
13575 #endif
13576 char ngettext ();
13577 int
13578 main ()
13579 {
13580 return ngettext ();
13581 ;
13582 return 0;
13583 }
13584 _ACEOF
13585 if ac_fn_c_try_link "$LINENO"; then :
13586 ac_cv_lib_intl_ngettext=yes
13587 else
13588 ac_cv_lib_intl_ngettext=no
13589 fi
13590 rm -f core conftest.err conftest.$ac_objext \
13591 conftest$ac_exeext conftest.$ac_ext
13592 LIBS=$ac_check_lib_save_LIBS
13593 fi
13594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
13595 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
13596 if test "x$ac_cv_lib_intl_ngettext" = x""yes; then :
13597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
13598 $as_echo_n "checking for dgettext in -lintl... " >&6; }
13599 if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
13600 $as_echo_n "(cached) " >&6
13601 else
13602 ac_check_lib_save_LIBS=$LIBS
13603 LIBS="-lintl $LIBS"
13604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13605 /* end confdefs.h. */
13606
13607 /* Override any GCC internal prototype to avoid an error.
13608 Use char because int might match the return type of a GCC
13609 builtin and then its argument prototype would still apply. */
13610 #ifdef __cplusplus
13611 extern "C"
13612 #endif
13613 char dgettext ();
13614 int
13615 main ()
13616 {
13617 return dgettext ();
13618 ;
13619 return 0;
13620 }
13621 _ACEOF
13622 if ac_fn_c_try_link "$LINENO"; then :
13623 ac_cv_lib_intl_dgettext=yes
13624 else
13625 ac_cv_lib_intl_dgettext=no
13626 fi
13627 rm -f core conftest.err conftest.$ac_objext \
13628 conftest$ac_exeext conftest.$ac_ext
13629 LIBS=$ac_check_lib_save_LIBS
13630 fi
13631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
13632 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
13633 if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
13634 gt_cv_func_dgettext_libintl=yes
13635 fi
13636
13637 fi
13638
13639 fi
13640
13641
13642 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
13644 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
13645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
13646 $as_echo "" >&6; }
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
13648 $as_echo_n "checking for ngettext in -lintl... " >&6; }
13649 if test "${ac_cv_lib_intl_ngettext+set}" = set; then :
13650 $as_echo_n "(cached) " >&6
13651 else
13652 ac_check_lib_save_LIBS=$LIBS
13653 LIBS="-lintl -liconv $LIBS"
13654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13655 /* end confdefs.h. */
13656
13657 /* Override any GCC internal prototype to avoid an error.
13658 Use char because int might match the return type of a GCC
13659 builtin and then its argument prototype would still apply. */
13660 #ifdef __cplusplus
13661 extern "C"
13662 #endif
13663 char ngettext ();
13664 int
13665 main ()
13666 {
13667 return ngettext ();
13668 ;
13669 return 0;
13670 }
13671 _ACEOF
13672 if ac_fn_c_try_link "$LINENO"; then :
13673 ac_cv_lib_intl_ngettext=yes
13674 else
13675 ac_cv_lib_intl_ngettext=no
13676 fi
13677 rm -f core conftest.err conftest.$ac_objext \
13678 conftest$ac_exeext conftest.$ac_ext
13679 LIBS=$ac_check_lib_save_LIBS
13680 fi
13681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
13682 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
13683 if test "x$ac_cv_lib_intl_ngettext" = x""yes; then :
13684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
13685 $as_echo_n "checking for dcgettext in -lintl... " >&6; }
13686 if test "${ac_cv_lib_intl_dcgettext+set}" = set; then :
13687 $as_echo_n "(cached) " >&6
13688 else
13689 ac_check_lib_save_LIBS=$LIBS
13690 LIBS="-lintl -liconv $LIBS"
13691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13692 /* end confdefs.h. */
13693
13694 /* Override any GCC internal prototype to avoid an error.
13695 Use char because int might match the return type of a GCC
13696 builtin and then its argument prototype would still apply. */
13697 #ifdef __cplusplus
13698 extern "C"
13699 #endif
13700 char dcgettext ();
13701 int
13702 main ()
13703 {
13704 return dcgettext ();
13705 ;
13706 return 0;
13707 }
13708 _ACEOF
13709 if ac_fn_c_try_link "$LINENO"; then :
13710 ac_cv_lib_intl_dcgettext=yes
13711 else
13712 ac_cv_lib_intl_dcgettext=no
13713 fi
13714 rm -f core conftest.err conftest.$ac_objext \
13715 conftest$ac_exeext conftest.$ac_ext
13716 LIBS=$ac_check_lib_save_LIBS
13717 fi
13718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
13719 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
13720 if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then :
13721 gt_cv_func_dgettext_libintl=yes
13722 libintl_extra_libs=-liconv
13723 else
13724 :
13725 fi
13726
13727 else
13728 :
13729 fi
13730
13731 fi
13732
13733 #
13734 # If we found libintl, then check in it for bind_textdomain_codeset();
13735 # we'll prefer libc if neither have bind_textdomain_codeset(),
13736 # and both have dgettext and ngettext
13737 #
13738 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
13739 glib_save_LIBS="$LIBS"
13740 LIBS="$LIBS -lintl $libintl_extra_libs"
13741 unset ac_cv_func_bind_textdomain_codeset
13742 for ac_func in bind_textdomain_codeset
13743 do :
13744 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
13745 if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then :
13746 cat >>confdefs.h <<_ACEOF
13747 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
13748 _ACEOF
13749
13750 fi
13751 done
13752
13753 LIBS="$glib_save_LIBS"
13754
13755 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
13756 gt_cv_func_dgettext_libc=no
13757 else
13758 if test "$gt_cv_func_dgettext_libc" = "yes" \
13759 && test "$gt_cv_func_ngettext_libc" = "yes"; then
13760 gt_cv_func_dgettext_libintl=no
13761 fi
13762 fi
13763 fi
13764 fi
13765
13766 if test "$gt_cv_func_dgettext_libc" = "yes" \
13767 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
13768 gt_cv_have_gettext=yes
13769 fi
13770
13771 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
13772 INTLLIBS="-lintl $libintl_extra_libs"
13773 fi
13774
13775 if test "$gt_cv_have_gettext" = "yes"; then
13776
13777 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
13778
13779 # Extract the first word of "msgfmt", so it can be a program name with args.
13780 set dummy msgfmt; ac_word=$2
13781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13782 $as_echo_n "checking for $ac_word... " >&6; }
13783 if test "${ac_cv_path_MSGFMT+set}" = set; then :
13784 $as_echo_n "(cached) " >&6
13785 else
13786 case "$MSGFMT" in
13787 /*)
13788 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
13789 ;;
13790 *)
13791 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13792 for ac_dir in $PATH; do
13793 test -z "$ac_dir" && ac_dir=.
13794 if test -f $ac_dir/$ac_word; then
13795 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
13796 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
13797 break
13798 fi
13799 fi
13800 done
13801 IFS="$ac_save_ifs"
13802 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
13803 ;;
13804 esac
13805 fi
13806 MSGFMT="$ac_cv_path_MSGFMT"
13807 if test "$MSGFMT" != "no"; then
13808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
13809 $as_echo "$MSGFMT" >&6; }
13810 else
13811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13812 $as_echo "no" >&6; }
13813 fi
13814 if test "$MSGFMT" != "no"; then
13815 glib_save_LIBS="$LIBS"
13816 LIBS="$LIBS $INTLLIBS"
13817 for ac_func in dcgettext
13818 do :
13819 ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
13820 if test "x$ac_cv_func_dcgettext" = x""yes; then :
13821 cat >>confdefs.h <<_ACEOF
13822 #define HAVE_DCGETTEXT 1
13823 _ACEOF
13824
13825 fi
13826 done
13827
13828 MSGFMT_OPTS=
13829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
13830 $as_echo_n "checking if msgfmt accepts -c... " >&6; }
13831 cat >conftest.foo <<_ACEOF
13832
13833 msgid ""
13834 msgstr ""
13835 "Content-Type: text/plain; charset=UTF-8\n"
13836 "Project-Id-Version: test 1.0\n"
13837 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
13838 "Last-Translator: test <foo@bar.xx>\n"
13839 "Language-Team: C <LL@li.org>\n"
13840 "MIME-Version: 1.0\n"
13841 "Content-Transfer-Encoding: 8bit\n"
13842
13843 _ACEOF
13844 if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
13845 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
13846 ac_status=$?
13847 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13848 test $ac_status = 0; }; then
13849 MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13850 $as_echo "yes" >&6; }
13851 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13852 $as_echo "no" >&6; }
13853 echo "$as_me: failed input was:" >&5
13854 sed 's/^/| /' conftest.foo >&5
13855 fi
13856
13857 # Extract the first word of "gmsgfmt", so it can be a program name with args.
13858 set dummy gmsgfmt; ac_word=$2
13859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13860 $as_echo_n "checking for $ac_word... " >&6; }
13861 if test "${ac_cv_path_GMSGFMT+set}" = set; then :
13862 $as_echo_n "(cached) " >&6
13863 else
13864 case $GMSGFMT in
13865 [\\/]* | ?:[\\/]*)
13866 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
13867 ;;
13868 *)
13869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13870 for as_dir in $PATH
13871 do
13872 IFS=$as_save_IFS
13873 test -z "$as_dir" && as_dir=.
13874 for ac_exec_ext in '' $ac_executable_extensions; do
13875 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13876 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
13877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13878 break 2
13879 fi
13880 done
13881 done
13882 IFS=$as_save_IFS
13883
13884 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
13885 ;;
13886 esac
13887 fi
13888 GMSGFMT=$ac_cv_path_GMSGFMT
13889 if test -n "$GMSGFMT"; then
13890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
13891 $as_echo "$GMSGFMT" >&6; }
13892 else
13893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13894 $as_echo "no" >&6; }
13895 fi
13896
13897
13898 # Extract the first word of "xgettext", so it can be a program name with args.
13899 set dummy xgettext; ac_word=$2
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13901 $as_echo_n "checking for $ac_word... " >&6; }
13902 if test "${ac_cv_path_XGETTEXT+set}" = set; then :
13903 $as_echo_n "(cached) " >&6
13904 else
13905 case "$XGETTEXT" in
13906 /*)
13907 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
13908 ;;
13909 *)
13910 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13911 for ac_dir in $PATH; do
13912 test -z "$ac_dir" && ac_dir=.
13913 if test -f $ac_dir/$ac_word; then
13914 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
13915 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
13916 break
13917 fi
13918 fi
13919 done
13920 IFS="$ac_save_ifs"
13921 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
13922 ;;
13923 esac
13924 fi
13925 XGETTEXT="$ac_cv_path_XGETTEXT"
13926 if test "$XGETTEXT" != ":"; then
13927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
13928 $as_echo "$XGETTEXT" >&6; }
13929 else
13930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13931 $as_echo "no" >&6; }
13932 fi
13933
13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13935 /* end confdefs.h. */
13936
13937 int
13938 main ()
13939 {
13940 extern int _nl_msg_cat_cntr;
13941 return _nl_msg_cat_cntr
13942 ;
13943 return 0;
13944 }
13945 _ACEOF
13946 if ac_fn_c_try_link "$LINENO"; then :
13947 CATOBJEXT=.gmo
13948 DATADIRNAME=share
13949 else
13950 case $host in
13951 *-*-solaris*)
13952 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
13953 if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then :
13954 CATOBJEXT=.gmo
13955 DATADIRNAME=share
13956 else
13957 CATOBJEXT=.mo
13958 DATADIRNAME=lib
13959 fi
13960
13961 ;;
13962 *)
13963 CATOBJEXT=.mo
13964 DATADIRNAME=lib
13965 ;;
13966 esac
13967 fi
13968 rm -f core conftest.err conftest.$ac_objext \
13969 conftest$ac_exeext conftest.$ac_ext
13970 LIBS="$glib_save_LIBS"
13971 INSTOBJEXT=.mo
13972 else
13973 gt_cv_have_gettext=no
13974 fi
13975 fi
13976
13977 fi
13978
13979
13980
13981 if test "$gt_cv_have_gettext" = "yes" ; then
13982
13983 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
13984
13985 fi
13986
13987 if test "$XGETTEXT" != ":"; then
13988 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
13989 : ;
13990 else
13991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
13992 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
13993 XGETTEXT=":"
13994 fi
13995 fi
13996
13997 # We need to process the po/ directory.
13998 POSUB=po
13999
14000 ac_config_commands="$ac_config_commands default-1"
14001
14002
14003 for lang in $ALL_LINGUAS; do
14004 GMOFILES="$GMOFILES $lang.gmo"
14005 POFILES="$POFILES $lang.po"
14006 done
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020 if test "$gt_cv_have_gettext" = "yes"; then
14021 if test "x$ALL_LINGUAS" = "x"; then
14022 LINGUAS=
14023 else
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
14025 $as_echo_n "checking for catalogs to be installed... " >&6; }
14026 NEW_LINGUAS=
14027 for presentlang in $ALL_LINGUAS; do
14028 useit=no
14029 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
14030 desiredlanguages="$LINGUAS"
14031 else
14032 desiredlanguages="$ALL_LINGUAS"
14033 fi
14034 for desiredlang in $desiredlanguages; do
14035 # Use the presentlang catalog if desiredlang is
14036 # a. equal to presentlang, or
14037 # b. a variant of presentlang (because in this case,
14038 # presentlang can be used as a fallback for messages
14039 # which are not translated in the desiredlang catalog).
14040 case "$desiredlang" in
14041 "$presentlang"*) useit=yes;;
14042 esac
14043 done
14044 if test $useit = yes; then
14045 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
14046 fi
14047 done
14048 LINGUAS=$NEW_LINGUAS
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
14050 $as_echo "$LINGUAS" >&6; }
14051 fi
14052
14053 if test -n "$LINGUAS"; then
14054 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
14055 fi
14056 fi
14057
14058 MKINSTALLDIRS=
14059 if test -n "$ac_aux_dir"; then
14060 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
14061 fi
14062 if test -z "$MKINSTALLDIRS"; then
14063 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
14064 fi
14065
14066
14067 test -d po || mkdir po
14068 if test "x$srcdir" != "x."; then
14069 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
14070 posrcprefix="$srcdir/"
14071 else
14072 posrcprefix="../$srcdir/"
14073 fi
14074 else
14075 posrcprefix="../"
14076 fi
14077 rm -f po/POTFILES
14078 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
14079 < $srcdir/po/POTFILES.in > po/POTFILES
14080
14081
14082 # -----------------------------------------------------------
14083 # Vinagre plugin
14084 # -----------------------------------------------------------
14085 # Check whether --enable-vinagre was given.
14086 if test "${enable_vinagre+set}" = set; then :
14087 enableval=$enable_vinagre;
14088 else
14089 enable_vinagre=no
14090 fi
14091
14092
14093 if test "x$enable_vinagre" != "xno"; then
14094
14095 pkg_failed=no
14096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VINAGRE" >&5
14097 $as_echo_n "checking for VINAGRE... " >&6; }
14098
14099 if test -n "$VINAGRE_CFLAGS"; then
14100 pkg_cv_VINAGRE_CFLAGS="$VINAGRE_CFLAGS"
14101 elif test -n "$PKG_CONFIG"; then
14102 if test -n "$PKG_CONFIG" && \
14103 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
14104 vinagre-1.0
14105 vte
14106 \""; } >&5
14107 ($PKG_CONFIG --exists --print-errors "
14108 vinagre-1.0
14109 vte
14110 ") 2>&5
14111 ac_status=$?
14112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14113 test $ac_status = 0; }; then
14114 pkg_cv_VINAGRE_CFLAGS=`$PKG_CONFIG --cflags "
14115 vinagre-1.0
14116 vte
14117 " 2>/dev/null`
14118 else
14119 pkg_failed=yes
14120 fi
14121 else
14122 pkg_failed=untried
14123 fi
14124 if test -n "$VINAGRE_LIBS"; then
14125 pkg_cv_VINAGRE_LIBS="$VINAGRE_LIBS"
14126 elif test -n "$PKG_CONFIG"; then
14127 if test -n "$PKG_CONFIG" && \
14128 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
14129 vinagre-1.0
14130 vte
14131 \""; } >&5
14132 ($PKG_CONFIG --exists --print-errors "
14133 vinagre-1.0
14134 vte
14135 ") 2>&5
14136 ac_status=$?
14137 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14138 test $ac_status = 0; }; then
14139 pkg_cv_VINAGRE_LIBS=`$PKG_CONFIG --libs "
14140 vinagre-1.0
14141 vte
14142 " 2>/dev/null`
14143 else
14144 pkg_failed=yes
14145 fi
14146 else
14147 pkg_failed=untried
14148 fi
14149
14150
14151
14152 if test $pkg_failed = yes; then
14153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14154 $as_echo "no" >&6; }
14155
14156 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
14157 _pkg_short_errors_supported=yes
14158 else
14159 _pkg_short_errors_supported=no
14160 fi
14161 if test $_pkg_short_errors_supported = yes; then
14162 VINAGRE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "
14163 vinagre-1.0
14164 vte
14165 " 2>&1`
14166 else
14167 VINAGRE_PKG_ERRORS=`$PKG_CONFIG --print-errors "
14168 vinagre-1.0
14169 vte
14170 " 2>&1`
14171 fi
14172 # Put the nasty error message in config.log where it belongs
14173 echo "$VINAGRE_PKG_ERRORS" >&5
14174
14175 have_vinagre="no"
14176 elif test $pkg_failed = untried; then
14177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14178 $as_echo "no" >&6; }
14179 have_vinagre="no"
14180 else
14181 VINAGRE_CFLAGS=$pkg_cv_VINAGRE_CFLAGS
14182 VINAGRE_LIBS=$pkg_cv_VINAGRE_LIBS
14183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14184 $as_echo "yes" >&6; }
14185 have_vinagre="yes"
14186 fi
14187
14188 if test "x$have_vinagre" = "xyes"; then
14189
14190 $as_echo "#define HAVE_VINAGRE 1" >>confdefs.h
14191
14192 fi
14193 else
14194 have_vinagre=no
14195 fi
14196
14197 if test "x$enable_vinagre" = "xyes" -a "x$have_vinagre" != "xyes"; then
14198 as_fn_error $? "Could not find vinagre dependencies." "$LINENO" 5
14199 fi
14200 if test "x$have_vinagre" = "xyes"; then
14201 HAVE_VINAGRE_TRUE=
14202 HAVE_VINAGRE_FALSE='#'
14203 else
14204 HAVE_VINAGRE_TRUE='#'
14205 HAVE_VINAGRE_FALSE=
14206 fi
14207
14208
14209 # -----------------------------------------------------------
14210
14211 ac_config_files="$ac_config_files Makefile po/Makefile.in src/Makefile src/vinagre/Makefile"
1201814212
1201914213 cat >confcache <<\_ACEOF
1202014214 # This file is a shell script that caches the results of configure
1209914293
1210014294 ac_libobjs=
1210114295 ac_ltlibobjs=
14296 U=
1210214297 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
1210314298 # 1. Remove the extension, and $U if already installed.
1210414299 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
1211314308 LTLIBOBJS=$ac_ltlibobjs
1211414309
1211514310
14311 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
14312 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
14313 Usually this means the macro was only invoked conditionally." "$LINENO" 5
14314 fi
1211614315 if test -n "$EXEEXT"; then
1211714316 am__EXEEXT_TRUE=
1211814317 am__EXEEXT_FALSE='#'
1212114320 am__EXEEXT_FALSE=
1212214321 fi
1212314322
12124 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
12125 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
14323 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
14324 as_fn_error $? "conditional \"AMDEP\" was never defined.
1212614325 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1212714326 fi
12128 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
12129 as_fn_error "conditional \"AMDEP\" was never defined.
14327 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
14328 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
1213014329 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1213114330 fi
1213214331 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
12133 as_fn_error "conditional \"am__fastdepCC\" was never defined.
14332 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
1213414333 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1213514334 fi
12136 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
12137 as_fn_error "conditional \"am__fastdepCC\" was never defined.
12138 Usually this means the macro was only invoked conditionally." "$LINENO" 5
12139 fi
12140 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
12141 as_fn_error "conditional \"am__fastdepCC\" was never defined.
14335
14336 ac_config_commands="$ac_config_commands po/stamp-it"
14337
14338
14339 if test -z "${HAVE_VINAGRE_TRUE}" && test -z "${HAVE_VINAGRE_FALSE}"; then
14340 as_fn_error $? "conditional \"HAVE_VINAGRE\" was never defined.
1214214341 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1214314342 fi
1214414343
1228814487 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1228914488
1229014489
12291 # as_fn_error ERROR [LINENO LOG_FD]
12292 # ---------------------------------
14490 # as_fn_error STATUS ERROR [LINENO LOG_FD]
14491 # ----------------------------------------
1229314492 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
1229414493 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
12295 # script with status $?, using 1 if that was 0.
14494 # script with STATUS, using 1 if that was 0.
1229614495 as_fn_error ()
1229714496 {
12298 as_status=$?; test $as_status -eq 0 && as_status=1
12299 if test "$3"; then
12300 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12301 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
14497 as_status=$1; test $as_status -eq 0 && as_status=1
14498 if test "$4"; then
14499 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14500 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
1230214501 fi
12303 $as_echo "$as_me: error: $1" >&2
14502 $as_echo "$as_me: error: $2" >&2
1230414503 as_fn_exit $as_status
1230514504 } # as_fn_error
1230614505
1249614695 test -d "$as_dir" && break
1249714696 done
1249814697 test -z "$as_dirs" || eval "mkdir $as_dirs"
12499 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14698 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
1250014699
1250114700
1250214701 } # as_fn_mkdir_p
1254914748 # report actual input values of CONFIG_FILES etc. instead of their
1255014749 # values after options handling.
1255114750 ac_log="
12552 This file was extended by ssh-contact $as_me 0.2, which was
12553 generated by GNU Autoconf 2.65. Invocation command line was
14751 This file was extended by ssh-contact $as_me 0.4, which was
14752 generated by GNU Autoconf 2.67. Invocation command line was
1255414753
1255514754 CONFIG_FILES = $CONFIG_FILES
1255614755 CONFIG_HEADERS = $CONFIG_HEADERS
1260914808 Configuration commands:
1261014809 $config_commands
1261114810
12612 Report bugs to the package provider."
14811 Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=ssh-contact>."
1261314812
1261414813 _ACEOF
1261514814 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1261614815 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1261714816 ac_cs_version="\\
12618 ssh-contact config.status 0.2
12619 configured by $0, generated by GNU Autoconf 2.65,
14817 ssh-contact config.status 0.4
14818 configured by $0, generated by GNU Autoconf 2.67,
1262014819 with options \\"\$ac_cs_config\\"
1262114820
12622 Copyright (C) 2009 Free Software Foundation, Inc.
14821 Copyright (C) 2010 Free Software Foundation, Inc.
1262314822 This config.status script is free software; the Free Software Foundation
1262414823 gives unlimited permission to copy, distribute and modify it."
1262514824
1263714836 while test $# != 0
1263814837 do
1263914838 case $1 in
12640 --*=*)
14839 --*=?*)
1264114840 ac_option=`expr "X$1" : 'X\([^=]*\)='`
1264214841 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
14842 ac_shift=:
14843 ;;
14844 --*=)
14845 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14846 ac_optarg=
1264314847 ac_shift=:
1264414848 ;;
1264514849 *)
1266314867 $ac_shift
1266414868 case $ac_optarg in
1266514869 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14870 '') as_fn_error $? "missing file argument" ;;
1266614871 esac
1266714872 as_fn_append CONFIG_FILES " '$ac_optarg'"
1266814873 ac_need_defaults=false;;
1267514880 ac_need_defaults=false;;
1267614881 --he | --h)
1267714882 # Conflict between --help and --header
12678 as_fn_error "ambiguous option: \`$1'
14883 as_fn_error $? "ambiguous option: \`$1'
1267914884 Try \`$0 --help' for more information.";;
1268014885 --help | --hel | -h )
1268114886 $as_echo "$ac_cs_usage"; exit ;;
1268414889 ac_cs_silent=: ;;
1268514890
1268614891 # This is an error.
12687 -*) as_fn_error "unrecognized option: \`$1'
14892 -*) as_fn_error $? "unrecognized option: \`$1'
1268814893 Try \`$0 --help' for more information." ;;
1268914894
1269014895 *) as_fn_append ac_config_targets " $1"
1298515190
1298615191
1298715192
15193
1298815194 _ACEOF
1298915195
1299015196 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1299615202 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
1299715203 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
1299815204 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
15205 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
1299915206 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15207 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
1300015208 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
13001
13002 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15209 "src/vinagre/Makefile") CONFIG_FILES="$CONFIG_FILES src/vinagre/Makefile" ;;
15210 "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
15211
15212 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
1300315213 esac
1300415214 done
1300515215
1303715247 {
1303815248 tmp=./conf$$-$RANDOM
1303915249 (umask 077 && mkdir "$tmp")
13040 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
15250 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
1304115251
1304215252 # Set up the scripts for CONFIG_FILES section.
1304315253 # No need to generate them if there are no CONFIG_FILES.
1305415264 fi
1305515265 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
1305615266 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
13057 ac_cs_awk_cr='\r'
15267 ac_cs_awk_cr='\\r'
1305815268 else
1305915269 ac_cs_awk_cr=$ac_cr
1306015270 fi
1306815278 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
1306915279 echo "_ACEOF"
1307015280 } >conf$$subs.sh ||
13071 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
13072 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
15281 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15282 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
1307315283 ac_delim='%!_!# '
1307415284 for ac_last_try in false false false false false :; do
1307515285 . ./conf$$subs.sh ||
13076 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15286 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
1307715287
1307815288 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
1307915289 if test $ac_delim_n = $ac_delim_num; then
1308015290 break
1308115291 elif $ac_last_try; then
13082 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15292 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
1308315293 else
1308415294 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
1308515295 fi
1316815378 else
1316915379 cat
1317015380 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
13171 || as_fn_error "could not setup config files machinery" "$LINENO" 5
15381 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
1317215382 _ACEOF
1317315383
13174 # VPATH may cause trouble with some makes, so we remove $(srcdir),
13175 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15384 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15385 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
1317615386 # trailing colons and then remove the whole line if VPATH becomes empty
1317715387 # (actually we leave an empty line to preserve line numbers).
1317815388 if test "x$srcdir" = x.; then
13179 ac_vpsub='/^[ ]*VPATH[ ]*=/{
13180 s/:*\$(srcdir):*/:/
13181 s/:*\${srcdir}:*/:/
13182 s/:*@srcdir@:*/:/
13183 s/^\([^=]*=[ ]*\):*/\1/
15389 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15390 h
15391 s///
15392 s/^/:/
15393 s/[ ]*$/:/
15394 s/:\$(srcdir):/:/g
15395 s/:\${srcdir}:/:/g
15396 s/:@srcdir@:/:/g
15397 s/^:*//
1318415398 s/:*$//
15399 x
15400 s/\(=[ ]*\).*/\1/
15401 G
15402 s/\n//
1318515403 s/^[^=]*=[ ]*$//
1318615404 }'
1318715405 fi
1320915427 if test -z "$ac_t"; then
1321015428 break
1321115429 elif $ac_last_try; then
13212 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
15430 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
1321315431 else
1321415432 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
1321515433 fi
1329415512 _ACAWK
1329515513 _ACEOF
1329615514 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13297 as_fn_error "could not setup config headers machinery" "$LINENO" 5
15515 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
1329815516 fi # test -n "$CONFIG_HEADERS"
1329915517
1330015518
1330715525 esac
1330815526 case $ac_mode$ac_tag in
1330915527 :[FHL]*:*);;
13310 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
15528 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
1331115529 :[FH]-) ac_tag=-:-;;
1331215530 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
1331315531 esac
1333515553 [\\/$]*) false;;
1333615554 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
1333715555 esac ||
13338 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15556 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
1333915557 esac
1334015558 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
1334115559 as_fn_append ac_file_inputs " '$ac_f'"
1336215580
1336315581 case $ac_tag in
1336415582 *:-:* | *:-) cat >"$tmp/stdin" \
13365 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
15583 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
1336615584 esac
1336715585 ;;
1336815586 esac
1349915717 $ac_datarootdir_hack
1350015718 "
1350115719 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
13502 || as_fn_error "could not create $ac_file" "$LINENO" 5
15720 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1350315721
1350415722 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
1350515723 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
1350615724 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
1350715725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13508 which seems to be undefined. Please make sure it is defined." >&5
15726 which seems to be undefined. Please make sure it is defined" >&5
1350915727 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13510 which seems to be undefined. Please make sure it is defined." >&2;}
15728 which seems to be undefined. Please make sure it is defined" >&2;}
1351115729
1351215730 rm -f "$tmp/stdin"
1351315731 case $ac_file in
1351415732 -) cat "$tmp/out" && rm -f "$tmp/out";;
1351515733 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
1351615734 esac \
13517 || as_fn_error "could not create $ac_file" "$LINENO" 5
15735 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1351815736 ;;
1351915737 :H)
1352015738 #
1352515743 $as_echo "/* $configure_input */" \
1352615744 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
1352715745 } >"$tmp/config.h" \
13528 || as_fn_error "could not create $ac_file" "$LINENO" 5
15746 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1352915747 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
1353015748 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
1353115749 $as_echo "$as_me: $ac_file is unchanged" >&6;}
1353215750 else
1353315751 rm -f "$ac_file"
1353415752 mv "$tmp/config.h" "$ac_file" \
13535 || as_fn_error "could not create $ac_file" "$LINENO" 5
15753 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1353615754 fi
1353715755 else
1353815756 $as_echo "/* $configure_input */" \
1353915757 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
13540 || as_fn_error "could not create -" "$LINENO" 5
15758 || as_fn_error $? "could not create -" "$LINENO" 5
1354115759 fi
1354215760 # Compute "$ac_file"'s index in $config_headers.
1354315761 _am_arg="$ac_file"
1431216530 chmod +x "$ofile"
1431316531
1431416532 ;;
16533 "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
16534 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
16535 esac ;;
16536 "po/stamp-it":C)
16537 if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
16538 as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
16539 fi
16540 rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
16541 >"po/stamp-it.tmp"
16542 sed '/^#/d
16543 s/^[[].*] *//
16544 /^[ ]*$/d
16545 '"s|^| $ac_top_srcdir/|" \
16546 "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
16547
16548 sed '/^POTFILES =/,/[^\\]$/ {
16549 /^POTFILES =/!d
16550 r po/POTFILES
16551 }
16552 ' "po/Makefile.in" >"po/Makefile"
16553 rm -f "po/Makefile.tmp"
16554 mv "po/stamp-it.tmp" "po/stamp-it"
16555 ;;
1431516556
1431616557 esac
1431716558 done # for ac_tag
1432216563 ac_clean_files=$ac_clean_files_save
1432316564
1432416565 test $ac_write_fail = 0 ||
14325 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16566 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
1432616567
1432716568
1432816569 # configure is writing to config.log, and then calls config.status.
1434316584 exec 5>>config.log
1434416585 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
1434516586 # would make configure fail if this is the last instruction.
14346 $ac_cs_success || as_fn_exit $?
16587 $ac_cs_success || as_fn_exit 1
1434716588 fi
1434816589 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
1434916590 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
0 AC_INIT(ssh-contact, 0.2)
1 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
0 m4_define(released, 1)
1 AC_INIT(ssh-contact, 0.4, https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=ssh-contact)
2 AC_PREREQ(2.59)
3 AC_COPYRIGHT([
4 Copyright (C) 2010 Collabora Ltd.
5 ])
26
3 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
4 AC_CONFIG_HEADERS([config.h])
7 ifelse(released, 1, [], [enable_maintainer_mode="yes"])
58 AM_MAINTAINER_MODE
69
10 AC_CONFIG_MACRO_DIR([m4])
11 AC_CONFIG_HEADERS([config.h])
12 AC_CONFIG_SRCDIR([configure.ac])
13 AC_CONFIG_AUX_DIR(.)
14 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define -Wno-portability)
15 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
716 AC_ISC_POSIX
817 AC_PROG_CC
9 AM_PROG_CC_STDC
1018 AC_HEADER_STDC
1119 AM_PROG_LIBTOOL
20 AM_PROG_MKDIR_P
21 AM_PATH_GLIB_2_0
22 AC_PATH_XTRA
23 IT_PROG_INTLTOOL([0.35.0])
24
25 # -----------------------------------------------------------
1226
1327 PKG_CHECK_MODULES(SSH_CONTACT,
1428 [
15 telepathy-glib >= 0.11.9
29 telepathy-glib >= 0.13.9
1630 glib-2.0 >= 2.24
1731 gio-2.0
18 gio-unix-2.0
1932 ])
33
34 # -----------------------------------------------------------
35 # Error flags
36 # -----------------------------------------------------------
37 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
38 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
39
40 AC_ARG_ENABLE(Werror,
41 AC_HELP_STRING([--disable-Werror],[compile without -Werror (normally enabled in development builds)]),
42 werror=$enableval, :)
43
44 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
45 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
46 wno_missing_field_initializers=yes,
47 wno_missing_field_initializers=no)
48 AS_COMPILER_FLAG(-Wno-unused-parameter,
49 wno_unused_parameter=yes,
50 wno_unused_parameter=no)
51
52 ifelse(released, 1, [],
53 [
54 if test x$werror = xyes; then
55 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
56 fi
57 if test x$wextra = xyes -a \
58 x$wno_missing_field_initializers = xyes -a \
59 x$wno_unused_parameter = xyes; then
60 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
61 fi
62 ])
63
64 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
65 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
66 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
67 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
68 # Disabled because some GTK+ headers (like gtkitemfactory.h) are bugged :(
69 #AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
70
71 AC_SUBST(ERROR_CFLAGS)
72
73 # -----------------------------------------------------------
74 # Language Support
75 # -----------------------------------------------------------
76
77 GETTEXT_PACKAGE=ssh-contact
78 AC_SUBST(GETTEXT_PACKAGE)
79 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
80
81 AM_GLIB_GNU_GETTEXT
82
83 # -----------------------------------------------------------
84 # Vinagre plugin
85 # -----------------------------------------------------------
86 AC_ARG_ENABLE(vinagre,
87 AS_HELP_STRING([--enable-vinagre=@<:@no/yes/auto@:>@],
88 [build with vinagre plugin]), ,
89 enable_vinagre=no)
90
91 if test "x$enable_vinagre" != "xno"; then
92 PKG_CHECK_MODULES(VINAGRE,
93 [
94 vinagre-1.0
95 vte
96 ], have_vinagre="yes", have_vinagre="no")
97
98 if test "x$have_vinagre" = "xyes"; then
99 AC_DEFINE(HAVE_VINAGRE, 1, [Define if you have libvinagre])
100 fi
101 else
102 have_vinagre=no
103 fi
104
105 if test "x$enable_vinagre" = "xyes" -a "x$have_vinagre" != "xyes"; then
106 AC_MSG_ERROR([Could not find vinagre dependencies.])
107 fi
108 AM_CONDITIONAL(HAVE_VINAGRE, test "x$have_vinagre" = "xyes")
109
110 # -----------------------------------------------------------
20111
21112 AC_OUTPUT([
22113 Makefile
114 po/Makefile.in
23115 src/Makefile
116 src/vinagre/Makefile
24117 ])
0 dnl as-compiler-flag.m4 0.1.0
1
2 dnl autostars m4 macro for detection of compiler flags
3
4 dnl David Schleef <ds@schleef.org>
5
6 dnl $Id: as-compiler-flag.m4,v 1.1 2005/06/18 18:02:46 burgerman Exp $
7
8 dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
9 dnl Tries to compile with the given CFLAGS.
10 dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
11 dnl and ACTION-IF-NOT-ACCEPTED otherwise.
12
13 AC_DEFUN([AS_COMPILER_FLAG],
14 [
15 AC_MSG_CHECKING([to see if compiler understands $1])
16
17 save_CFLAGS="$CFLAGS"
18 CFLAGS="$CFLAGS $1"
19
20 AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
21 CFLAGS="$save_CFLAGS"
22
23 if test "X$flag_ok" = Xyes ; then
24 $2
25 true
26 else
27 $3
28 true
29 fi
30 AC_MSG_RESULT([$flag_ok])
31 ])
32
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 #
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3 # 2006, 2007, 2008 Free Software Foundation, Inc.
4 # Written by Gordon Matzigkeit, 1996
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 m4_define([_LT_COPYING], [dnl
11 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
12 # 2006, 2007, 2008 Free Software Foundation, Inc.
13 # Written by Gordon Matzigkeit, 1996
14 #
15 # This file is part of GNU Libtool.
16 #
17 # GNU Libtool is free software; you can redistribute it and/or
18 # modify it under the terms of the GNU General Public License as
19 # published by the Free Software Foundation; either version 2 of
20 # the License, or (at your option) any later version.
21 #
22 # As a special exception to the GNU General Public License,
23 # if you distribute this file as part of a program or library that
24 # is built using GNU Libtool, you may include this file under the
25 # same distribution terms that you use for the rest of that program.
26 #
27 # GNU Libtool is distributed in the hope that it will be useful,
28 # but WITHOUT ANY WARRANTY; without even the implied warranty of
29 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 # GNU General Public License for more details.
31 #
32 # You should have received a copy of the GNU General Public License
33 # along with GNU Libtool; see the file COPYING. If not, a copy
34 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
35 # obtained by writing to the Free Software Foundation, Inc.,
36 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
37 ])
38
39 # serial 56 LT_INIT
40
41
42 # LT_PREREQ(VERSION)
43 # ------------------
44 # Complain and exit if this libtool version is less that VERSION.
45 m4_defun([LT_PREREQ],
46 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
47 [m4_default([$3],
48 [m4_fatal([Libtool version $1 or higher is required],
49 63)])],
50 [$2])])
51
52
53 # _LT_CHECK_BUILDDIR
54 # ------------------
55 # Complain if the absolute build directory name contains unusual characters
56 m4_defun([_LT_CHECK_BUILDDIR],
57 [case `pwd` in
58 *\ * | *\ *)
59 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
60 esac
61 ])
62
63
64 # LT_INIT([OPTIONS])
65 # ------------------
66 AC_DEFUN([LT_INIT],
67 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
68 AC_BEFORE([$0], [LT_LANG])dnl
69 AC_BEFORE([$0], [LT_OUTPUT])dnl
70 AC_BEFORE([$0], [LTDL_INIT])dnl
71 m4_require([_LT_CHECK_BUILDDIR])dnl
72
73 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
74 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
75 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
76 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
77 dnl unless we require an AC_DEFUNed macro:
78 AC_REQUIRE([LTOPTIONS_VERSION])dnl
79 AC_REQUIRE([LTSUGAR_VERSION])dnl
80 AC_REQUIRE([LTVERSION_VERSION])dnl
81 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
82 m4_require([_LT_PROG_LTMAIN])dnl
83
84 dnl Parse OPTIONS
85 _LT_SET_OPTIONS([$0], [$1])
86
87 # This can be used to rebuild libtool when needed
88 LIBTOOL_DEPS="$ltmain"
89
90 # Always use our own libtool.
91 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
92 AC_SUBST(LIBTOOL)dnl
93
94 _LT_SETUP
95
96 # Only expand once:
97 m4_define([LT_INIT])
98 ])# LT_INIT
99
100 # Old names:
101 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
102 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
103 dnl aclocal-1.4 backwards compatibility:
104 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
105 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
106
107
108 # _LT_CC_BASENAME(CC)
109 # -------------------
110 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
111 m4_defun([_LT_CC_BASENAME],
112 [for cc_temp in $1""; do
113 case $cc_temp in
114 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
115 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
116 \-*) ;;
117 *) break;;
118 esac
119 done
120 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
121 ])
122
123
124 # _LT_FILEUTILS_DEFAULTS
125 # ----------------------
126 # It is okay to use these file commands and assume they have been set
127 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
128 m4_defun([_LT_FILEUTILS_DEFAULTS],
129 [: ${CP="cp -f"}
130 : ${MV="mv -f"}
131 : ${RM="rm -f"}
132 ])# _LT_FILEUTILS_DEFAULTS
133
134
135 # _LT_SETUP
136 # ---------
137 m4_defun([_LT_SETUP],
138 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
139 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
140 _LT_DECL([], [host_alias], [0], [The host system])dnl
141 _LT_DECL([], [host], [0])dnl
142 _LT_DECL([], [host_os], [0])dnl
143 dnl
144 _LT_DECL([], [build_alias], [0], [The build system])dnl
145 _LT_DECL([], [build], [0])dnl
146 _LT_DECL([], [build_os], [0])dnl
147 dnl
148 AC_REQUIRE([AC_PROG_CC])dnl
149 AC_REQUIRE([LT_PATH_LD])dnl
150 AC_REQUIRE([LT_PATH_NM])dnl
151 dnl
152 AC_REQUIRE([AC_PROG_LN_S])dnl
153 test -z "$LN_S" && LN_S="ln -s"
154 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
155 dnl
156 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
157 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
158 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
159 dnl
160 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
161 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
162 m4_require([_LT_CMD_RELOAD])dnl
163 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
164 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
165 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
166
167 _LT_CONFIG_LIBTOOL_INIT([
168 # See if we are running on zsh, and set the options which allow our
169 # commands through without removal of \ escapes INIT.
170 if test -n "\${ZSH_VERSION+set}" ; then
171 setopt NO_GLOB_SUBST
172 fi
173 ])
174 if test -n "${ZSH_VERSION+set}" ; then
175 setopt NO_GLOB_SUBST
176 fi
177
178 _LT_CHECK_OBJDIR
179
180 m4_require([_LT_TAG_COMPILER])dnl
181 _LT_PROG_ECHO_BACKSLASH
182
183 case $host_os in
184 aix3*)
185 # AIX sometimes has problems with the GCC collect2 program. For some
186 # reason, if we set the COLLECT_NAMES environment variable, the problems
187 # vanish in a puff of smoke.
188 if test "X${COLLECT_NAMES+set}" != Xset; then
189 COLLECT_NAMES=
190 export COLLECT_NAMES
191 fi
192 ;;
193 esac
194
195 # Sed substitution that helps us do robust quoting. It backslashifies
196 # metacharacters that are still active within double-quoted strings.
197 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
198
199 # Same as above, but do not quote variable references.
200 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
201
202 # Sed substitution to delay expansion of an escaped shell variable in a
203 # double_quote_subst'ed string.
204 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
205
206 # Sed substitution to delay expansion of an escaped single quote.
207 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
208
209 # Sed substitution to avoid accidental globbing in evaled expressions
210 no_glob_subst='s/\*/\\\*/g'
211
212 # Global variables:
213 ofile=libtool
214 can_build_shared=yes
215
216 # All known linkers require a `.a' archive for static linking (except MSVC,
217 # which needs '.lib').
218 libext=a
219
220 with_gnu_ld="$lt_cv_prog_gnu_ld"
221
222 old_CC="$CC"
223 old_CFLAGS="$CFLAGS"
224
225 # Set sane defaults for various variables
226 test -z "$CC" && CC=cc
227 test -z "$LTCC" && LTCC=$CC
228 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
229 test -z "$LD" && LD=ld
230 test -z "$ac_objext" && ac_objext=o
231
232 _LT_CC_BASENAME([$compiler])
233
234 # Only perform the check for file, if the check method requires it
235 test -z "$MAGIC_CMD" && MAGIC_CMD=file
236 case $deplibs_check_method in
237 file_magic*)
238 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
239 _LT_PATH_MAGIC
240 fi
241 ;;
242 esac
243
244 # Use C for the default configuration in the libtool script
245 LT_SUPPORTED_TAG([CC])
246 _LT_LANG_C_CONFIG
247 _LT_LANG_DEFAULT_CONFIG
248 _LT_CONFIG_COMMANDS
249 ])# _LT_SETUP
250
251
252 # _LT_PROG_LTMAIN
253 # ---------------
254 # Note that this code is called both from `configure', and `config.status'
255 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
256 # `config.status' has no value for ac_aux_dir unless we are using Automake,
257 # so we pass a copy along to make sure it has a sensible value anyway.
258 m4_defun([_LT_PROG_LTMAIN],
259 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
260 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
261 ltmain="$ac_aux_dir/ltmain.sh"
262 ])# _LT_PROG_LTMAIN
263
264
265 ## ------------------------------------- ##
266 ## Accumulate code for creating libtool. ##
267 ## ------------------------------------- ##
268
269 # So that we can recreate a full libtool script including additional
270 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
271 # in macros and then make a single call at the end using the `libtool'
272 # label.
273
274
275 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
276 # ----------------------------------------
277 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
278 m4_define([_LT_CONFIG_LIBTOOL_INIT],
279 [m4_ifval([$1],
280 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
281 [$1
282 ])])])
283
284 # Initialize.
285 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
286
287
288 # _LT_CONFIG_LIBTOOL([COMMANDS])
289 # ------------------------------
290 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
291 m4_define([_LT_CONFIG_LIBTOOL],
292 [m4_ifval([$1],
293 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
294 [$1
295 ])])])
296
297 # Initialize.
298 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
299
300
301 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
302 # -----------------------------------------------------
303 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
304 [_LT_CONFIG_LIBTOOL([$1])
305 _LT_CONFIG_LIBTOOL_INIT([$2])
306 ])
307
308
309 # _LT_FORMAT_COMMENT([COMMENT])
310 # -----------------------------
311 # Add leading comment marks to the start of each line, and a trailing
312 # full-stop to the whole comment if one is not present already.
313 m4_define([_LT_FORMAT_COMMENT],
314 [m4_ifval([$1], [
315 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
316 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
317 )])
318
319
320
321 ## ------------------------ ##
322 ## FIXME: Eliminate VARNAME ##
323 ## ------------------------ ##
324
325
326 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
327 # -------------------------------------------------------------------
328 # CONFIGNAME is the name given to the value in the libtool script.
329 # VARNAME is the (base) name used in the configure script.
330 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
331 # VARNAME. Any other value will be used directly.
332 m4_define([_LT_DECL],
333 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
334 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
335 [m4_ifval([$1], [$1], [$2])])
336 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
337 m4_ifval([$4],
338 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
339 lt_dict_add_subkey([lt_decl_dict], [$2],
340 [tagged?], [m4_ifval([$5], [yes], [no])])])
341 ])
342
343
344 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
345 # --------------------------------------------------------
346 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
347
348
349 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
350 # ------------------------------------------------
351 m4_define([lt_decl_tag_varnames],
352 [_lt_decl_filter([tagged?], [yes], $@)])
353
354
355 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
356 # ---------------------------------------------------------
357 m4_define([_lt_decl_filter],
358 [m4_case([$#],
359 [0], [m4_fatal([$0: too few arguments: $#])],
360 [1], [m4_fatal([$0: too few arguments: $#: $1])],
361 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
362 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
363 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
364 ])
365
366
367 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
368 # --------------------------------------------------
369 m4_define([lt_decl_quote_varnames],
370 [_lt_decl_filter([value], [1], $@)])
371
372
373 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
374 # ---------------------------------------------------
375 m4_define([lt_decl_dquote_varnames],
376 [_lt_decl_filter([value], [2], $@)])
377
378
379 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
380 # ---------------------------------------------------
381 m4_define([lt_decl_varnames_tagged],
382 [m4_assert([$# <= 2])dnl
383 _$0(m4_quote(m4_default([$1], [[, ]])),
384 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
385 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
386 m4_define([_lt_decl_varnames_tagged],
387 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
388
389
390 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
391 # ------------------------------------------------
392 m4_define([lt_decl_all_varnames],
393 [_$0(m4_quote(m4_default([$1], [[, ]])),
394 m4_if([$2], [],
395 m4_quote(lt_decl_varnames),
396 m4_quote(m4_shift($@))))[]dnl
397 ])
398 m4_define([_lt_decl_all_varnames],
399 [lt_join($@, lt_decl_varnames_tagged([$1],
400 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
401 ])
402
403
404 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
405 # ------------------------------------
406 # Quote a variable value, and forward it to `config.status' so that its
407 # declaration there will have the same value as in `configure'. VARNAME
408 # must have a single quote delimited value for this to work.
409 m4_define([_LT_CONFIG_STATUS_DECLARE],
410 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
411
412
413 # _LT_CONFIG_STATUS_DECLARATIONS
414 # ------------------------------
415 # We delimit libtool config variables with single quotes, so when
416 # we write them to config.status, we have to be sure to quote all
417 # embedded single quotes properly. In configure, this macro expands
418 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
419 #
420 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
421 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
422 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
423 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
424
425
426 # _LT_LIBTOOL_TAGS
427 # ----------------
428 # Output comment and list of tags supported by the script
429 m4_defun([_LT_LIBTOOL_TAGS],
430 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
431 available_tags="_LT_TAGS"dnl
432 ])
433
434
435 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
436 # -----------------------------------
437 # Extract the dictionary values for VARNAME (optionally with TAG) and
438 # expand to a commented shell variable setting:
439 #
440 # # Some comment about what VAR is for.
441 # visible_name=$lt_internal_name
442 m4_define([_LT_LIBTOOL_DECLARE],
443 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
444 [description])))[]dnl
445 m4_pushdef([_libtool_name],
446 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
447 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
448 [0], [_libtool_name=[$]$1],
449 [1], [_libtool_name=$lt_[]$1],
450 [2], [_libtool_name=$lt_[]$1],
451 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
452 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
453 ])
454
455
456 # _LT_LIBTOOL_CONFIG_VARS
457 # -----------------------
458 # Produce commented declarations of non-tagged libtool config variables
459 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
460 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
461 # section) are produced by _LT_LIBTOOL_TAG_VARS.
462 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
463 [m4_foreach([_lt_var],
464 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
465 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
466
467
468 # _LT_LIBTOOL_TAG_VARS(TAG)
469 # -------------------------
470 m4_define([_LT_LIBTOOL_TAG_VARS],
471 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
472 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
473
474
475 # _LT_TAGVAR(VARNAME, [TAGNAME])
476 # ------------------------------
477 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
478
479
480 # _LT_CONFIG_COMMANDS
481 # -------------------
482 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
483 # variables for single and double quote escaping we saved from calls
484 # to _LT_DECL, we can put quote escaped variables declarations
485 # into `config.status', and then the shell code to quote escape them in
486 # for loops in `config.status'. Finally, any additional code accumulated
487 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
488 m4_defun([_LT_CONFIG_COMMANDS],
489 [AC_PROVIDE_IFELSE([LT_OUTPUT],
490 dnl If the libtool generation code has been placed in $CONFIG_LT,
491 dnl instead of duplicating it all over again into config.status,
492 dnl then we will have config.status run $CONFIG_LT later, so it
493 dnl needs to know what name is stored there:
494 [AC_CONFIG_COMMANDS([libtool],
495 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
496 dnl If the libtool generation code is destined for config.status,
497 dnl expand the accumulated commands and init code now:
498 [AC_CONFIG_COMMANDS([libtool],
499 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
500 ])#_LT_CONFIG_COMMANDS
501
502
503 # Initialize.
504 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
505 [
506
507 # The HP-UX ksh and POSIX shell print the target directory to stdout
508 # if CDPATH is set.
509 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
510
511 sed_quote_subst='$sed_quote_subst'
512 double_quote_subst='$double_quote_subst'
513 delay_variable_subst='$delay_variable_subst'
514 _LT_CONFIG_STATUS_DECLARATIONS
515 LTCC='$LTCC'
516 LTCFLAGS='$LTCFLAGS'
517 compiler='$compiler_DEFAULT'
518
519 # Quote evaled strings.
520 for var in lt_decl_all_varnames([[ \
521 ]], lt_decl_quote_varnames); do
522 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
523 *[[\\\\\\\`\\"\\\$]]*)
524 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
525 ;;
526 *)
527 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
528 ;;
529 esac
530 done
531
532 # Double-quote double-evaled strings.
533 for var in lt_decl_all_varnames([[ \
534 ]], lt_decl_dquote_varnames); do
535 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
536 *[[\\\\\\\`\\"\\\$]]*)
537 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
538 ;;
539 *)
540 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
541 ;;
542 esac
543 done
544
545 # Fix-up fallback echo if it was mangled by the above quoting rules.
546 case \$lt_ECHO in
547 *'\\\[$]0 --fallback-echo"')dnl "
548 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
549 ;;
550 esac
551
552 _LT_OUTPUT_LIBTOOL_INIT
553 ])
554
555
556 # LT_OUTPUT
557 # ---------
558 # This macro allows early generation of the libtool script (before
559 # AC_OUTPUT is called), incase it is used in configure for compilation
560 # tests.
561 AC_DEFUN([LT_OUTPUT],
562 [: ${CONFIG_LT=./config.lt}
563 AC_MSG_NOTICE([creating $CONFIG_LT])
564 cat >"$CONFIG_LT" <<_LTEOF
565 #! $SHELL
566 # Generated by $as_me.
567 # Run this file to recreate a libtool stub with the current configuration.
568
569 lt_cl_silent=false
570 SHELL=\${CONFIG_SHELL-$SHELL}
571 _LTEOF
572
573 cat >>"$CONFIG_LT" <<\_LTEOF
574 AS_SHELL_SANITIZE
575 _AS_PREPARE
576
577 exec AS_MESSAGE_FD>&1
578 exec AS_MESSAGE_LOG_FD>>config.log
579 {
580 echo
581 AS_BOX([Running $as_me.])
582 } >&AS_MESSAGE_LOG_FD
583
584 lt_cl_help="\
585 \`$as_me' creates a local libtool stub from the current configuration,
586 for use in further configure time tests before the real libtool is
587 generated.
588
589 Usage: $[0] [[OPTIONS]]
590
591 -h, --help print this help, then exit
592 -V, --version print version number, then exit
593 -q, --quiet do not print progress messages
594 -d, --debug don't remove temporary files
595
596 Report bugs to <bug-libtool@gnu.org>."
597
598 lt_cl_version="\
599 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
600 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
601 configured by $[0], generated by m4_PACKAGE_STRING.
602
603 Copyright (C) 2008 Free Software Foundation, Inc.
604 This config.lt script is free software; the Free Software Foundation
605 gives unlimited permision to copy, distribute and modify it."
606
607 while test $[#] != 0
608 do
609 case $[1] in
610 --version | --v* | -V )
611 echo "$lt_cl_version"; exit 0 ;;
612 --help | --h* | -h )
613 echo "$lt_cl_help"; exit 0 ;;
614 --debug | --d* | -d )
615 debug=: ;;
616 --quiet | --q* | --silent | --s* | -q )
617 lt_cl_silent=: ;;
618
619 -*) AC_MSG_ERROR([unrecognized option: $[1]
620 Try \`$[0] --help' for more information.]) ;;
621
622 *) AC_MSG_ERROR([unrecognized argument: $[1]
623 Try \`$[0] --help' for more information.]) ;;
624 esac
625 shift
626 done
627
628 if $lt_cl_silent; then
629 exec AS_MESSAGE_FD>/dev/null
630 fi
631 _LTEOF
632
633 cat >>"$CONFIG_LT" <<_LTEOF
634 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
635 _LTEOF
636
637 cat >>"$CONFIG_LT" <<\_LTEOF
638 AC_MSG_NOTICE([creating $ofile])
639 _LT_OUTPUT_LIBTOOL_COMMANDS
640 AS_EXIT(0)
641 _LTEOF
642 chmod +x "$CONFIG_LT"
643
644 # configure is writing to config.log, but config.lt does its own redirection,
645 # appending to config.log, which fails on DOS, as config.log is still kept
646 # open by configure. Here we exec the FD to /dev/null, effectively closing
647 # config.log, so it can be properly (re)opened and appended to by config.lt.
648 if test "$no_create" != yes; then
649 lt_cl_success=:
650 test "$silent" = yes &&
651 lt_config_lt_args="$lt_config_lt_args --quiet"
652 exec AS_MESSAGE_LOG_FD>/dev/null
653 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
654 exec AS_MESSAGE_LOG_FD>>config.log
655 $lt_cl_success || AS_EXIT(1)
656 fi
657 ])# LT_OUTPUT
658
659
660 # _LT_CONFIG(TAG)
661 # ---------------
662 # If TAG is the built-in tag, create an initial libtool script with a
663 # default configuration from the untagged config vars. Otherwise add code
664 # to config.status for appending the configuration named by TAG from the
665 # matching tagged config vars.
666 m4_defun([_LT_CONFIG],
667 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
668 _LT_CONFIG_SAVE_COMMANDS([
669 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
670 m4_if(_LT_TAG, [C], [
671 # See if we are running on zsh, and set the options which allow our
672 # commands through without removal of \ escapes.
673 if test -n "${ZSH_VERSION+set}" ; then
674 setopt NO_GLOB_SUBST
675 fi
676
677 cfgfile="${ofile}T"
678 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
679 $RM "$cfgfile"
680
681 cat <<_LT_EOF >> "$cfgfile"
682 #! $SHELL
683
684 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
685 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
686 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
687 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
688 #
689 _LT_COPYING
690 _LT_LIBTOOL_TAGS
691
692 # ### BEGIN LIBTOOL CONFIG
693 _LT_LIBTOOL_CONFIG_VARS
694 _LT_LIBTOOL_TAG_VARS
695 # ### END LIBTOOL CONFIG
696
697 _LT_EOF
698
699 case $host_os in
700 aix3*)
701 cat <<\_LT_EOF >> "$cfgfile"
702 # AIX sometimes has problems with the GCC collect2 program. For some
703 # reason, if we set the COLLECT_NAMES environment variable, the problems
704 # vanish in a puff of smoke.
705 if test "X${COLLECT_NAMES+set}" != Xset; then
706 COLLECT_NAMES=
707 export COLLECT_NAMES
708 fi
709 _LT_EOF
710 ;;
711 esac
712
713 _LT_PROG_LTMAIN
714
715 # We use sed instead of cat because bash on DJGPP gets confused if
716 # if finds mixed CR/LF and LF-only lines. Since sed operates in
717 # text mode, it properly converts lines to CR/LF. This bash problem
718 # is reportedly fixed, but why not run on old versions too?
719 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
720 || (rm -f "$cfgfile"; exit 1)
721
722 _LT_PROG_XSI_SHELLFNS
723
724 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
725 || (rm -f "$cfgfile"; exit 1)
726
727 mv -f "$cfgfile" "$ofile" ||
728 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
729 chmod +x "$ofile"
730 ],
731 [cat <<_LT_EOF >> "$ofile"
732
733 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
734 dnl in a comment (ie after a #).
735 # ### BEGIN LIBTOOL TAG CONFIG: $1
736 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
737 # ### END LIBTOOL TAG CONFIG: $1
738 _LT_EOF
739 ])dnl /m4_if
740 ],
741 [m4_if([$1], [], [
742 PACKAGE='$PACKAGE'
743 VERSION='$VERSION'
744 TIMESTAMP='$TIMESTAMP'
745 RM='$RM'
746 ofile='$ofile'], [])
747 ])dnl /_LT_CONFIG_SAVE_COMMANDS
748 ])# _LT_CONFIG
749
750
751 # LT_SUPPORTED_TAG(TAG)
752 # ---------------------
753 # Trace this macro to discover what tags are supported by the libtool
754 # --tag option, using:
755 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
756 AC_DEFUN([LT_SUPPORTED_TAG], [])
757
758
759 # C support is built-in for now
760 m4_define([_LT_LANG_C_enabled], [])
761 m4_define([_LT_TAGS], [])
762
763
764 # LT_LANG(LANG)
765 # -------------
766 # Enable libtool support for the given language if not already enabled.
767 AC_DEFUN([LT_LANG],
768 [AC_BEFORE([$0], [LT_OUTPUT])dnl
769 m4_case([$1],
770 [C], [_LT_LANG(C)],
771 [C++], [_LT_LANG(CXX)],
772 [Java], [_LT_LANG(GCJ)],
773 [Fortran 77], [_LT_LANG(F77)],
774 [Fortran], [_LT_LANG(FC)],
775 [Windows Resource], [_LT_LANG(RC)],
776 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
777 [_LT_LANG($1)],
778 [m4_fatal([$0: unsupported language: "$1"])])])dnl
779 ])# LT_LANG
780
781
782 # _LT_LANG(LANGNAME)
783 # ------------------
784 m4_defun([_LT_LANG],
785 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
786 [LT_SUPPORTED_TAG([$1])dnl
787 m4_append([_LT_TAGS], [$1 ])dnl
788 m4_define([_LT_LANG_]$1[_enabled], [])dnl
789 _LT_LANG_$1_CONFIG($1)])dnl
790 ])# _LT_LANG
791
792
793 # _LT_LANG_DEFAULT_CONFIG
794 # -----------------------
795 m4_defun([_LT_LANG_DEFAULT_CONFIG],
796 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
797 [LT_LANG(CXX)],
798 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
799
800 AC_PROVIDE_IFELSE([AC_PROG_F77],
801 [LT_LANG(F77)],
802 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
803
804 AC_PROVIDE_IFELSE([AC_PROG_FC],
805 [LT_LANG(FC)],
806 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
807
808 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
809 dnl pulling things in needlessly.
810 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
811 [LT_LANG(GCJ)],
812 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
813 [LT_LANG(GCJ)],
814 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
815 [LT_LANG(GCJ)],
816 [m4_ifdef([AC_PROG_GCJ],
817 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
818 m4_ifdef([A][M_PROG_GCJ],
819 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
820 m4_ifdef([LT_PROG_GCJ],
821 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
822
823 AC_PROVIDE_IFELSE([LT_PROG_RC],
824 [LT_LANG(RC)],
825 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
826 ])# _LT_LANG_DEFAULT_CONFIG
827
828 # Obsolete macros:
829 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
830 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
831 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
832 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
833 dnl aclocal-1.4 backwards compatibility:
834 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
835 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
836 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
837 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
838
839
840 # _LT_TAG_COMPILER
841 # ----------------
842 m4_defun([_LT_TAG_COMPILER],
843 [AC_REQUIRE([AC_PROG_CC])dnl
844
845 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
846 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
847 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
848 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
849
850 # If no C compiler was specified, use CC.
851 LTCC=${LTCC-"$CC"}
852
853 # If no C compiler flags were specified, use CFLAGS.
854 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
855
856 # Allow CC to be a program name with arguments.
857 compiler=$CC
858 ])# _LT_TAG_COMPILER
859
860
861 # _LT_COMPILER_BOILERPLATE
862 # ------------------------
863 # Check for compiler boilerplate output or warnings with
864 # the simple compiler test code.
865 m4_defun([_LT_COMPILER_BOILERPLATE],
866 [m4_require([_LT_DECL_SED])dnl
867 ac_outfile=conftest.$ac_objext
868 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
869 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
870 _lt_compiler_boilerplate=`cat conftest.err`
871 $RM conftest*
872 ])# _LT_COMPILER_BOILERPLATE
873
874
875 # _LT_LINKER_BOILERPLATE
876 # ----------------------
877 # Check for linker boilerplate output or warnings with
878 # the simple link test code.
879 m4_defun([_LT_LINKER_BOILERPLATE],
880 [m4_require([_LT_DECL_SED])dnl
881 ac_outfile=conftest.$ac_objext
882 echo "$lt_simple_link_test_code" >conftest.$ac_ext
883 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
884 _lt_linker_boilerplate=`cat conftest.err`
885 $RM -r conftest*
886 ])# _LT_LINKER_BOILERPLATE
887
888 # _LT_REQUIRED_DARWIN_CHECKS
889 # -------------------------
890 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
891 case $host_os in
892 rhapsody* | darwin*)
893 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
894 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
895 AC_CHECK_TOOL([LIPO], [lipo], [:])
896 AC_CHECK_TOOL([OTOOL], [otool], [:])
897 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
898 _LT_DECL([], [DSYMUTIL], [1],
899 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
900 _LT_DECL([], [NMEDIT], [1],
901 [Tool to change global to local symbols on Mac OS X])
902 _LT_DECL([], [LIPO], [1],
903 [Tool to manipulate fat objects and archives on Mac OS X])
904 _LT_DECL([], [OTOOL], [1],
905 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
906 _LT_DECL([], [OTOOL64], [1],
907 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
908
909 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
910 [lt_cv_apple_cc_single_mod=no
911 if test -z "${LT_MULTI_MODULE}"; then
912 # By default we will add the -single_module flag. You can override
913 # by either setting the environment variable LT_MULTI_MODULE
914 # non-empty at configure time, or by adding -multi_module to the
915 # link flags.
916 rm -rf libconftest.dylib*
917 echo "int foo(void){return 1;}" > conftest.c
918 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
919 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
920 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
921 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
922 _lt_result=$?
923 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
924 lt_cv_apple_cc_single_mod=yes
925 else
926 cat conftest.err >&AS_MESSAGE_LOG_FD
927 fi
928 rm -rf libconftest.dylib*
929 rm -f conftest.*
930 fi])
931 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
932 [lt_cv_ld_exported_symbols_list],
933 [lt_cv_ld_exported_symbols_list=no
934 save_LDFLAGS=$LDFLAGS
935 echo "_main" > conftest.sym
936 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
937 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
938 [lt_cv_ld_exported_symbols_list=yes],
939 [lt_cv_ld_exported_symbols_list=no])
940 LDFLAGS="$save_LDFLAGS"
941 ])
942 case $host_os in
943 rhapsody* | darwin1.[[012]])
944 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
945 darwin1.*)
946 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
947 darwin*) # darwin 5.x on
948 # if running on 10.5 or later, the deployment target defaults
949 # to the OS version, if on x86, and 10.4, the deployment
950 # target defaults to 10.4. Don't you love it?
951 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
952 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
953 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
954 10.[[012]]*)
955 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
956 10.*)
957 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
958 esac
959 ;;
960 esac
961 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
962 _lt_dar_single_mod='$single_module'
963 fi
964 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
965 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
966 else
967 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
968 fi
969 if test "$DSYMUTIL" != ":"; then
970 _lt_dsymutil='~$DSYMUTIL $lib || :'
971 else
972 _lt_dsymutil=
973 fi
974 ;;
975 esac
976 ])
977
978
979 # _LT_DARWIN_LINKER_FEATURES
980 # --------------------------
981 # Checks for linker and compiler features on darwin
982 m4_defun([_LT_DARWIN_LINKER_FEATURES],
983 [
984 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
985 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
986 _LT_TAGVAR(hardcode_direct, $1)=no
987 _LT_TAGVAR(hardcode_automatic, $1)=yes
988 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
989 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
990 _LT_TAGVAR(link_all_deplibs, $1)=yes
991 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
992 case $cc_basename in
993 ifort*) _lt_dar_can_shared=yes ;;
994 *) _lt_dar_can_shared=$GCC ;;
995 esac
996 if test "$_lt_dar_can_shared" = "yes"; then
997 output_verbose_link_cmd=echo
998 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
999 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1000 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1001 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1002 m4_if([$1], [CXX],
1003 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1004 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1005 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1006 fi
1007 ],[])
1008 else
1009 _LT_TAGVAR(ld_shlibs, $1)=no
1010 fi
1011 ])
1012
1013 # _LT_SYS_MODULE_PATH_AIX
1014 # -----------------------
1015 # Links a minimal program and checks the executable
1016 # for the system default hardcoded library path. In most cases,
1017 # this is /usr/lib:/lib, but when the MPI compilers are used
1018 # the location of the communication and MPI libs are included too.
1019 # If we don't find anything, use the default library path according
1020 # to the aix ld manual.
1021 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1022 [m4_require([_LT_DECL_SED])dnl
1023 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1024 lt_aix_libpath_sed='
1025 /Import File Strings/,/^$/ {
1026 /^0/ {
1027 s/^0 *\(.*\)$/\1/
1028 p
1029 }
1030 }'
1031 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1032 # Check for a 64-bit object if we didn't find anything.
1033 if test -z "$aix_libpath"; then
1034 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1035 fi],[])
1036 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1037 ])# _LT_SYS_MODULE_PATH_AIX
1038
1039
1040 # _LT_SHELL_INIT(ARG)
1041 # -------------------
1042 m4_define([_LT_SHELL_INIT],
1043 [ifdef([AC_DIVERSION_NOTICE],
1044 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1045 [AC_DIVERT_PUSH(NOTICE)])
1046 $1
1047 AC_DIVERT_POP
1048 ])# _LT_SHELL_INIT
1049
1050
1051 # _LT_PROG_ECHO_BACKSLASH
1052 # -----------------------
1053 # Add some code to the start of the generated configure script which
1054 # will find an echo command which doesn't interpret backslashes.
1055 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1056 [_LT_SHELL_INIT([
1057 # Check that we are running under the correct shell.
1058 SHELL=${CONFIG_SHELL-/bin/sh}
1059
1060 case X$lt_ECHO in
1061 X*--fallback-echo)
1062 # Remove one level of quotation (which was required for Make).
1063 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1064 ;;
1065 esac
1066
1067 ECHO=${lt_ECHO-echo}
1068 if test "X[$]1" = X--no-reexec; then
1069 # Discard the --no-reexec flag, and continue.
1070 shift
1071 elif test "X[$]1" = X--fallback-echo; then
1072 # Avoid inline document here, it may be left over
1073 :
1074 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1075 # Yippee, $ECHO works!
1076 :
1077 else
1078 # Restart under the correct shell.
1079 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1080 fi
1081
1082 if test "X[$]1" = X--fallback-echo; then
1083 # used as fallback echo
1084 shift
1085 cat <<_LT_EOF
1086 [$]*
1087 _LT_EOF
1088 exit 0
1089 fi
1090
1091 # The HP-UX ksh and POSIX shell print the target directory to stdout
1092 # if CDPATH is set.
1093 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1094
1095 if test -z "$lt_ECHO"; then
1096 if test "X${echo_test_string+set}" != Xset; then
1097 # find a string as large as possible, as long as the shell can cope with it
1098 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1099 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1100 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1101 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1102 then
1103 break
1104 fi
1105 done
1106 fi
1107
1108 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1109 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1110 test "X$echo_testing_string" = "X$echo_test_string"; then
1111 :
1112 else
1113 # The Solaris, AIX, and Digital Unix default echo programs unquote
1114 # backslashes. This makes it impossible to quote backslashes using
1115 # echo "$something" | sed 's/\\/\\\\/g'
1116 #
1117 # So, first we look for a working echo in the user's PATH.
1118
1119 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1120 for dir in $PATH /usr/ucb; do
1121 IFS="$lt_save_ifs"
1122 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1123 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1124 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1125 test "X$echo_testing_string" = "X$echo_test_string"; then
1126 ECHO="$dir/echo"
1127 break
1128 fi
1129 done
1130 IFS="$lt_save_ifs"
1131
1132 if test "X$ECHO" = Xecho; then
1133 # We didn't find a better echo, so look for alternatives.
1134 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1135 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1136 test "X$echo_testing_string" = "X$echo_test_string"; then
1137 # This shell has a builtin print -r that does the trick.
1138 ECHO='print -r'
1139 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1140 test "X$CONFIG_SHELL" != X/bin/ksh; then
1141 # If we have ksh, try running configure again with it.
1142 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1143 export ORIGINAL_CONFIG_SHELL
1144 CONFIG_SHELL=/bin/ksh
1145 export CONFIG_SHELL
1146 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1147 else
1148 # Try using printf.
1149 ECHO='printf %s\n'
1150 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1151 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1152 test "X$echo_testing_string" = "X$echo_test_string"; then
1153 # Cool, printf works
1154 :
1155 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1156 test "X$echo_testing_string" = 'X\t' &&
1157 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1158 test "X$echo_testing_string" = "X$echo_test_string"; then
1159 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1160 export CONFIG_SHELL
1161 SHELL="$CONFIG_SHELL"
1162 export SHELL
1163 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1164 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1165 test "X$echo_testing_string" = 'X\t' &&
1166 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1167 test "X$echo_testing_string" = "X$echo_test_string"; then
1168 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1169 else
1170 # maybe with a smaller string...
1171 prev=:
1172
1173 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1174 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1175 then
1176 break
1177 fi
1178 prev="$cmd"
1179 done
1180
1181 if test "$prev" != 'sed 50q "[$]0"'; then
1182 echo_test_string=`eval $prev`
1183 export echo_test_string
1184 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1185 else
1186 # Oops. We lost completely, so just stick with echo.
1187 ECHO=echo
1188 fi
1189 fi
1190 fi
1191 fi
1192 fi
1193 fi
1194
1195 # Copy echo and quote the copy suitably for passing to libtool from
1196 # the Makefile, instead of quoting the original, which is used later.
1197 lt_ECHO=$ECHO
1198 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1199 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1200 fi
1201
1202 AC_SUBST(lt_ECHO)
1203 ])
1204 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1205 _LT_DECL([], [ECHO], [1],
1206 [An echo program that does not interpret backslashes])
1207 ])# _LT_PROG_ECHO_BACKSLASH
1208
1209
1210 # _LT_ENABLE_LOCK
1211 # ---------------
1212 m4_defun([_LT_ENABLE_LOCK],
1213 [AC_ARG_ENABLE([libtool-lock],
1214 [AS_HELP_STRING([--disable-libtool-lock],
1215 [avoid locking (might break parallel builds)])])
1216 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1217
1218 # Some flags need to be propagated to the compiler or linker for good
1219 # libtool support.
1220 case $host in
1221 ia64-*-hpux*)
1222 # Find out which ABI we are using.
1223 echo 'int i;' > conftest.$ac_ext
1224 if AC_TRY_EVAL(ac_compile); then
1225 case `/usr/bin/file conftest.$ac_objext` in
1226 *ELF-32*)
1227 HPUX_IA64_MODE="32"
1228 ;;
1229 *ELF-64*)
1230 HPUX_IA64_MODE="64"
1231 ;;
1232 esac
1233 fi
1234 rm -rf conftest*
1235 ;;
1236 *-*-irix6*)
1237 # Find out which ABI we are using.
1238 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1239 if AC_TRY_EVAL(ac_compile); then
1240 if test "$lt_cv_prog_gnu_ld" = yes; then
1241 case `/usr/bin/file conftest.$ac_objext` in
1242 *32-bit*)
1243 LD="${LD-ld} -melf32bsmip"
1244 ;;
1245 *N32*)
1246 LD="${LD-ld} -melf32bmipn32"
1247 ;;
1248 *64-bit*)
1249 LD="${LD-ld} -melf64bmip"
1250 ;;
1251 esac
1252 else
1253 case `/usr/bin/file conftest.$ac_objext` in
1254 *32-bit*)
1255 LD="${LD-ld} -32"
1256 ;;
1257 *N32*)
1258 LD="${LD-ld} -n32"
1259 ;;
1260 *64-bit*)
1261 LD="${LD-ld} -64"
1262 ;;
1263 esac
1264 fi
1265 fi
1266 rm -rf conftest*
1267 ;;
1268
1269 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1270 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1271 # Find out which ABI we are using.
1272 echo 'int i;' > conftest.$ac_ext
1273 if AC_TRY_EVAL(ac_compile); then
1274 case `/usr/bin/file conftest.o` in
1275 *32-bit*)
1276 case $host in
1277 x86_64-*kfreebsd*-gnu)
1278 LD="${LD-ld} -m elf_i386_fbsd"
1279 ;;
1280 x86_64-*linux*)
1281 LD="${LD-ld} -m elf_i386"
1282 ;;
1283 ppc64-*linux*|powerpc64-*linux*)
1284 LD="${LD-ld} -m elf32ppclinux"
1285 ;;
1286 s390x-*linux*)
1287 LD="${LD-ld} -m elf_s390"
1288 ;;
1289 sparc64-*linux*)
1290 LD="${LD-ld} -m elf32_sparc"
1291 ;;
1292 esac
1293 ;;
1294 *64-bit*)
1295 case $host in
1296 x86_64-*kfreebsd*-gnu)
1297 LD="${LD-ld} -m elf_x86_64_fbsd"
1298 ;;
1299 x86_64-*linux*)
1300 LD="${LD-ld} -m elf_x86_64"
1301 ;;
1302 ppc*-*linux*|powerpc*-*linux*)
1303 LD="${LD-ld} -m elf64ppc"
1304 ;;
1305 s390*-*linux*|s390*-*tpf*)
1306 LD="${LD-ld} -m elf64_s390"
1307 ;;
1308 sparc*-*linux*)
1309 LD="${LD-ld} -m elf64_sparc"
1310 ;;
1311 esac
1312 ;;
1313 esac
1314 fi
1315 rm -rf conftest*
1316 ;;
1317
1318 *-*-sco3.2v5*)
1319 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1320 SAVE_CFLAGS="$CFLAGS"
1321 CFLAGS="$CFLAGS -belf"
1322 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1323 [AC_LANG_PUSH(C)
1324 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1325 AC_LANG_POP])
1326 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1327 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1328 CFLAGS="$SAVE_CFLAGS"
1329 fi
1330 ;;
1331 sparc*-*solaris*)
1332 # Find out which ABI we are using.
1333 echo 'int i;' > conftest.$ac_ext
1334 if AC_TRY_EVAL(ac_compile); then
1335 case `/usr/bin/file conftest.o` in
1336 *64-bit*)
1337 case $lt_cv_prog_gnu_ld in
1338 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1339 *)
1340 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1341 LD="${LD-ld} -64"
1342 fi
1343 ;;
1344 esac
1345 ;;
1346 esac
1347 fi
1348 rm -rf conftest*
1349 ;;
1350 esac
1351
1352 need_locks="$enable_libtool_lock"
1353 ])# _LT_ENABLE_LOCK
1354
1355
1356 # _LT_CMD_OLD_ARCHIVE
1357 # -------------------
1358 m4_defun([_LT_CMD_OLD_ARCHIVE],
1359 [AC_CHECK_TOOL(AR, ar, false)
1360 test -z "$AR" && AR=ar
1361 test -z "$AR_FLAGS" && AR_FLAGS=cru
1362 _LT_DECL([], [AR], [1], [The archiver])
1363 _LT_DECL([], [AR_FLAGS], [1])
1364
1365 AC_CHECK_TOOL(STRIP, strip, :)
1366 test -z "$STRIP" && STRIP=:
1367 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1368
1369 AC_CHECK_TOOL(RANLIB, ranlib, :)
1370 test -z "$RANLIB" && RANLIB=:
1371 _LT_DECL([], [RANLIB], [1],
1372 [Commands used to install an old-style archive])
1373
1374 # Determine commands to create old-style static archives.
1375 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1376 old_postinstall_cmds='chmod 644 $oldlib'
1377 old_postuninstall_cmds=
1378
1379 if test -n "$RANLIB"; then
1380 case $host_os in
1381 openbsd*)
1382 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1383 ;;
1384 *)
1385 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1386 ;;
1387 esac
1388 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1389 fi
1390 _LT_DECL([], [old_postinstall_cmds], [2])
1391 _LT_DECL([], [old_postuninstall_cmds], [2])
1392 _LT_TAGDECL([], [old_archive_cmds], [2],
1393 [Commands used to build an old-style archive])
1394 ])# _LT_CMD_OLD_ARCHIVE
1395
1396
1397 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1398 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1399 # ----------------------------------------------------------------
1400 # Check whether the given compiler option works
1401 AC_DEFUN([_LT_COMPILER_OPTION],
1402 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1403 m4_require([_LT_DECL_SED])dnl
1404 AC_CACHE_CHECK([$1], [$2],
1405 [$2=no
1406 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1407 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1408 lt_compiler_flag="$3"
1409 # Insert the option either (1) after the last *FLAGS variable, or
1410 # (2) before a word containing "conftest.", or (3) at the end.
1411 # Note that $ac_compile itself does not contain backslashes and begins
1412 # with a dollar sign (not a hyphen), so the echo should work correctly.
1413 # The option is referenced via a variable to avoid confusing sed.
1414 lt_compile=`echo "$ac_compile" | $SED \
1415 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1416 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1417 -e 's:$: $lt_compiler_flag:'`
1418 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1419 (eval "$lt_compile" 2>conftest.err)
1420 ac_status=$?
1421 cat conftest.err >&AS_MESSAGE_LOG_FD
1422 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1423 if (exit $ac_status) && test -s "$ac_outfile"; then
1424 # The compiler can only warn and ignore the option if not recognized
1425 # So say no if there are warnings other than the usual output.
1426 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1427 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1428 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1429 $2=yes
1430 fi
1431 fi
1432 $RM conftest*
1433 ])
1434
1435 if test x"[$]$2" = xyes; then
1436 m4_if([$5], , :, [$5])
1437 else
1438 m4_if([$6], , :, [$6])
1439 fi
1440 ])# _LT_COMPILER_OPTION
1441
1442 # Old name:
1443 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1444 dnl aclocal-1.4 backwards compatibility:
1445 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1446
1447
1448 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1449 # [ACTION-SUCCESS], [ACTION-FAILURE])
1450 # ----------------------------------------------------
1451 # Check whether the given linker option works
1452 AC_DEFUN([_LT_LINKER_OPTION],
1453 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1454 m4_require([_LT_DECL_SED])dnl
1455 AC_CACHE_CHECK([$1], [$2],
1456 [$2=no
1457 save_LDFLAGS="$LDFLAGS"
1458 LDFLAGS="$LDFLAGS $3"
1459 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1460 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1461 # The linker can only warn and ignore the option if not recognized
1462 # So say no if there are warnings
1463 if test -s conftest.err; then
1464 # Append any errors to the config.log.
1465 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1466 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1467 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1468 if diff conftest.exp conftest.er2 >/dev/null; then
1469 $2=yes
1470 fi
1471 else
1472 $2=yes
1473 fi
1474 fi
1475 $RM -r conftest*
1476 LDFLAGS="$save_LDFLAGS"
1477 ])
1478
1479 if test x"[$]$2" = xyes; then
1480 m4_if([$4], , :, [$4])
1481 else
1482 m4_if([$5], , :, [$5])
1483 fi
1484 ])# _LT_LINKER_OPTION
1485
1486 # Old name:
1487 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1488 dnl aclocal-1.4 backwards compatibility:
1489 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1490
1491
1492 # LT_CMD_MAX_LEN
1493 #---------------
1494 AC_DEFUN([LT_CMD_MAX_LEN],
1495 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1496 # find the maximum length of command line arguments
1497 AC_MSG_CHECKING([the maximum length of command line arguments])
1498 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1499 i=0
1500 teststring="ABCD"
1501
1502 case $build_os in
1503 msdosdjgpp*)
1504 # On DJGPP, this test can blow up pretty badly due to problems in libc
1505 # (any single argument exceeding 2000 bytes causes a buffer overrun
1506 # during glob expansion). Even if it were fixed, the result of this
1507 # check would be larger than it should be.
1508 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1509 ;;
1510
1511 gnu*)
1512 # Under GNU Hurd, this test is not required because there is
1513 # no limit to the length of command line arguments.
1514 # Libtool will interpret -1 as no limit whatsoever
1515 lt_cv_sys_max_cmd_len=-1;
1516 ;;
1517
1518 cygwin* | mingw* | cegcc*)
1519 # On Win9x/ME, this test blows up -- it succeeds, but takes
1520 # about 5 minutes as the teststring grows exponentially.
1521 # Worse, since 9x/ME are not pre-emptively multitasking,
1522 # you end up with a "frozen" computer, even though with patience
1523 # the test eventually succeeds (with a max line length of 256k).
1524 # Instead, let's just punt: use the minimum linelength reported by
1525 # all of the supported platforms: 8192 (on NT/2K/XP).
1526 lt_cv_sys_max_cmd_len=8192;
1527 ;;
1528
1529 amigaos*)
1530 # On AmigaOS with pdksh, this test takes hours, literally.
1531 # So we just punt and use a minimum line length of 8192.
1532 lt_cv_sys_max_cmd_len=8192;
1533 ;;
1534
1535 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1536 # This has been around since 386BSD, at least. Likely further.
1537 if test -x /sbin/sysctl; then
1538 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1539 elif test -x /usr/sbin/sysctl; then
1540 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1541 else
1542 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1543 fi
1544 # And add a safety zone
1545 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1546 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1547 ;;
1548
1549 interix*)
1550 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1551 lt_cv_sys_max_cmd_len=196608
1552 ;;
1553
1554 osf*)
1555 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1556 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1557 # nice to cause kernel panics so lets avoid the loop below.
1558 # First set a reasonable default.
1559 lt_cv_sys_max_cmd_len=16384
1560 #
1561 if test -x /sbin/sysconfig; then
1562 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1563 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1564 esac
1565 fi
1566 ;;
1567 sco3.2v5*)
1568 lt_cv_sys_max_cmd_len=102400
1569 ;;
1570 sysv5* | sco5v6* | sysv4.2uw2*)
1571 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1572 if test -n "$kargmax"; then
1573 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1574 else
1575 lt_cv_sys_max_cmd_len=32768
1576 fi
1577 ;;
1578 *)
1579 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1580 if test -n "$lt_cv_sys_max_cmd_len"; then
1581 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1582 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1583 else
1584 # Make teststring a little bigger before we do anything with it.
1585 # a 1K string should be a reasonable start.
1586 for i in 1 2 3 4 5 6 7 8 ; do
1587 teststring=$teststring$teststring
1588 done
1589 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1590 # If test is not a shell built-in, we'll probably end up computing a
1591 # maximum length that is only half of the actual maximum length, but
1592 # we can't tell.
1593 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1594 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1595 test $i != 17 # 1/2 MB should be enough
1596 do
1597 i=`expr $i + 1`
1598 teststring=$teststring$teststring
1599 done
1600 # Only check the string length outside the loop.
1601 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1602 teststring=
1603 # Add a significant safety factor because C++ compilers can tack on
1604 # massive amounts of additional arguments before passing them to the
1605 # linker. It appears as though 1/2 is a usable value.
1606 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1607 fi
1608 ;;
1609 esac
1610 ])
1611 if test -n $lt_cv_sys_max_cmd_len ; then
1612 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1613 else
1614 AC_MSG_RESULT(none)
1615 fi
1616 max_cmd_len=$lt_cv_sys_max_cmd_len
1617 _LT_DECL([], [max_cmd_len], [0],
1618 [What is the maximum length of a command?])
1619 ])# LT_CMD_MAX_LEN
1620
1621 # Old name:
1622 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1623 dnl aclocal-1.4 backwards compatibility:
1624 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1625
1626
1627 # _LT_HEADER_DLFCN
1628 # ----------------
1629 m4_defun([_LT_HEADER_DLFCN],
1630 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1631 ])# _LT_HEADER_DLFCN
1632
1633
1634 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1635 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1636 # ----------------------------------------------------------------
1637 m4_defun([_LT_TRY_DLOPEN_SELF],
1638 [m4_require([_LT_HEADER_DLFCN])dnl
1639 if test "$cross_compiling" = yes; then :
1640 [$4]
1641 else
1642 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1643 lt_status=$lt_dlunknown
1644 cat > conftest.$ac_ext <<_LT_EOF
1645 [#line __oline__ "configure"
1646 #include "confdefs.h"
1647
1648 #if HAVE_DLFCN_H
1649 #include <dlfcn.h>
1650 #endif
1651
1652 #include <stdio.h>
1653
1654 #ifdef RTLD_GLOBAL
1655 # define LT_DLGLOBAL RTLD_GLOBAL
1656 #else
1657 # ifdef DL_GLOBAL
1658 # define LT_DLGLOBAL DL_GLOBAL
1659 # else
1660 # define LT_DLGLOBAL 0
1661 # endif
1662 #endif
1663
1664 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1665 find out it does not work in some platform. */
1666 #ifndef LT_DLLAZY_OR_NOW
1667 # ifdef RTLD_LAZY
1668 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1669 # else
1670 # ifdef DL_LAZY
1671 # define LT_DLLAZY_OR_NOW DL_LAZY
1672 # else
1673 # ifdef RTLD_NOW
1674 # define LT_DLLAZY_OR_NOW RTLD_NOW
1675 # else
1676 # ifdef DL_NOW
1677 # define LT_DLLAZY_OR_NOW DL_NOW
1678 # else
1679 # define LT_DLLAZY_OR_NOW 0
1680 # endif
1681 # endif
1682 # endif
1683 # endif
1684 #endif
1685
1686 void fnord() { int i=42;}
1687 int main ()
1688 {
1689 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1690 int status = $lt_dlunknown;
1691
1692 if (self)
1693 {
1694 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1695 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1696 /* dlclose (self); */
1697 }
1698 else
1699 puts (dlerror ());
1700
1701 return status;
1702 }]
1703 _LT_EOF
1704 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1705 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1706 lt_status=$?
1707 case x$lt_status in
1708 x$lt_dlno_uscore) $1 ;;
1709 x$lt_dlneed_uscore) $2 ;;
1710 x$lt_dlunknown|x*) $3 ;;
1711 esac
1712 else :
1713 # compilation failed
1714 $3
1715 fi
1716 fi
1717 rm -fr conftest*
1718 ])# _LT_TRY_DLOPEN_SELF
1719
1720
1721 # LT_SYS_DLOPEN_SELF
1722 # ------------------
1723 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1724 [m4_require([_LT_HEADER_DLFCN])dnl
1725 if test "x$enable_dlopen" != xyes; then
1726 enable_dlopen=unknown
1727 enable_dlopen_self=unknown
1728 enable_dlopen_self_static=unknown
1729 else
1730 lt_cv_dlopen=no
1731 lt_cv_dlopen_libs=
1732
1733 case $host_os in
1734 beos*)
1735 lt_cv_dlopen="load_add_on"
1736 lt_cv_dlopen_libs=
1737 lt_cv_dlopen_self=yes
1738 ;;
1739
1740 mingw* | pw32* | cegcc*)
1741 lt_cv_dlopen="LoadLibrary"
1742 lt_cv_dlopen_libs=
1743 ;;
1744
1745 cygwin*)
1746 lt_cv_dlopen="dlopen"
1747 lt_cv_dlopen_libs=
1748 ;;
1749
1750 darwin*)
1751 # if libdl is installed we need to link against it
1752 AC_CHECK_LIB([dl], [dlopen],
1753 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1754 lt_cv_dlopen="dyld"
1755 lt_cv_dlopen_libs=
1756 lt_cv_dlopen_self=yes
1757 ])
1758 ;;
1759
1760 *)
1761 AC_CHECK_FUNC([shl_load],
1762 [lt_cv_dlopen="shl_load"],
1763 [AC_CHECK_LIB([dld], [shl_load],
1764 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1765 [AC_CHECK_FUNC([dlopen],
1766 [lt_cv_dlopen="dlopen"],
1767 [AC_CHECK_LIB([dl], [dlopen],
1768 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1769 [AC_CHECK_LIB([svld], [dlopen],
1770 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1771 [AC_CHECK_LIB([dld], [dld_link],
1772 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1773 ])
1774 ])
1775 ])
1776 ])
1777 ])
1778 ;;
1779 esac
1780
1781 if test "x$lt_cv_dlopen" != xno; then
1782 enable_dlopen=yes
1783 else
1784 enable_dlopen=no
1785 fi
1786
1787 case $lt_cv_dlopen in
1788 dlopen)
1789 save_CPPFLAGS="$CPPFLAGS"
1790 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1791
1792 save_LDFLAGS="$LDFLAGS"
1793 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1794
1795 save_LIBS="$LIBS"
1796 LIBS="$lt_cv_dlopen_libs $LIBS"
1797
1798 AC_CACHE_CHECK([whether a program can dlopen itself],
1799 lt_cv_dlopen_self, [dnl
1800 _LT_TRY_DLOPEN_SELF(
1801 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1802 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1803 ])
1804
1805 if test "x$lt_cv_dlopen_self" = xyes; then
1806 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1807 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1808 lt_cv_dlopen_self_static, [dnl
1809 _LT_TRY_DLOPEN_SELF(
1810 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1811 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1812 ])
1813 fi
1814
1815 CPPFLAGS="$save_CPPFLAGS"
1816 LDFLAGS="$save_LDFLAGS"
1817 LIBS="$save_LIBS"
1818 ;;
1819 esac
1820
1821 case $lt_cv_dlopen_self in
1822 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1823 *) enable_dlopen_self=unknown ;;
1824 esac
1825
1826 case $lt_cv_dlopen_self_static in
1827 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1828 *) enable_dlopen_self_static=unknown ;;
1829 esac
1830 fi
1831 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1832 [Whether dlopen is supported])
1833 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1834 [Whether dlopen of programs is supported])
1835 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1836 [Whether dlopen of statically linked programs is supported])
1837 ])# LT_SYS_DLOPEN_SELF
1838
1839 # Old name:
1840 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1841 dnl aclocal-1.4 backwards compatibility:
1842 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1843
1844
1845 # _LT_COMPILER_C_O([TAGNAME])
1846 # ---------------------------
1847 # Check to see if options -c and -o are simultaneously supported by compiler.
1848 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1849 m4_defun([_LT_COMPILER_C_O],
1850 [m4_require([_LT_DECL_SED])dnl
1851 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1852 m4_require([_LT_TAG_COMPILER])dnl
1853 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1854 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1855 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1856 $RM -r conftest 2>/dev/null
1857 mkdir conftest
1858 cd conftest
1859 mkdir out
1860 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1861
1862 lt_compiler_flag="-o out/conftest2.$ac_objext"
1863 # Insert the option either (1) after the last *FLAGS variable, or
1864 # (2) before a word containing "conftest.", or (3) at the end.
1865 # Note that $ac_compile itself does not contain backslashes and begins
1866 # with a dollar sign (not a hyphen), so the echo should work correctly.
1867 lt_compile=`echo "$ac_compile" | $SED \
1868 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1869 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1870 -e 's:$: $lt_compiler_flag:'`
1871 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1872 (eval "$lt_compile" 2>out/conftest.err)
1873 ac_status=$?
1874 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1875 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1876 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1877 then
1878 # The compiler can only warn and ignore the option if not recognized
1879 # So say no if there are warnings
1880 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1881 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1882 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1883 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1884 fi
1885 fi
1886 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1887 $RM conftest*
1888 # SGI C++ compiler will create directory out/ii_files/ for
1889 # template instantiation
1890 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1891 $RM out/* && rmdir out
1892 cd ..
1893 $RM -r conftest
1894 $RM conftest*
1895 ])
1896 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1897 [Does compiler simultaneously support -c and -o options?])
1898 ])# _LT_COMPILER_C_O
1899
1900
1901 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1902 # ----------------------------------
1903 # Check to see if we can do hard links to lock some files if needed
1904 m4_defun([_LT_COMPILER_FILE_LOCKS],
1905 [m4_require([_LT_ENABLE_LOCK])dnl
1906 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1907 _LT_COMPILER_C_O([$1])
1908
1909 hard_links="nottested"
1910 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1911 # do not overwrite the value of need_locks provided by the user
1912 AC_MSG_CHECKING([if we can lock with hard links])
1913 hard_links=yes
1914 $RM conftest*
1915 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1916 touch conftest.a
1917 ln conftest.a conftest.b 2>&5 || hard_links=no
1918 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1919 AC_MSG_RESULT([$hard_links])
1920 if test "$hard_links" = no; then
1921 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1922 need_locks=warn
1923 fi
1924 else
1925 need_locks=no
1926 fi
1927 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1928 ])# _LT_COMPILER_FILE_LOCKS
1929
1930
1931 # _LT_CHECK_OBJDIR
1932 # ----------------
1933 m4_defun([_LT_CHECK_OBJDIR],
1934 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1935 [rm -f .libs 2>/dev/null
1936 mkdir .libs 2>/dev/null
1937 if test -d .libs; then
1938 lt_cv_objdir=.libs
1939 else
1940 # MS-DOS does not allow filenames that begin with a dot.
1941 lt_cv_objdir=_libs
1942 fi
1943 rmdir .libs 2>/dev/null])
1944 objdir=$lt_cv_objdir
1945 _LT_DECL([], [objdir], [0],
1946 [The name of the directory that contains temporary libtool files])dnl
1947 m4_pattern_allow([LT_OBJDIR])dnl
1948 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1949 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1950 ])# _LT_CHECK_OBJDIR
1951
1952
1953 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1954 # --------------------------------------
1955 # Check hardcoding attributes.
1956 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1957 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1958 _LT_TAGVAR(hardcode_action, $1)=
1959 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1960 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1961 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1962
1963 # We can hardcode non-existent directories.
1964 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1965 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1966 # have to relink, otherwise we might link with an installed library
1967 # when we should be linking with a yet-to-be-installed one
1968 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1969 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1970 # Linking always hardcodes the temporary library directory.
1971 _LT_TAGVAR(hardcode_action, $1)=relink
1972 else
1973 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1974 _LT_TAGVAR(hardcode_action, $1)=immediate
1975 fi
1976 else
1977 # We cannot hardcode anything, or else we can only hardcode existing
1978 # directories.
1979 _LT_TAGVAR(hardcode_action, $1)=unsupported
1980 fi
1981 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1982
1983 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1984 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
1985 # Fast installation is not supported
1986 enable_fast_install=no
1987 elif test "$shlibpath_overrides_runpath" = yes ||
1988 test "$enable_shared" = no; then
1989 # Fast installation is not necessary
1990 enable_fast_install=needless
1991 fi
1992 _LT_TAGDECL([], [hardcode_action], [0],
1993 [How to hardcode a shared library path into an executable])
1994 ])# _LT_LINKER_HARDCODE_LIBPATH
1995
1996
1997 # _LT_CMD_STRIPLIB
1998 # ----------------
1999 m4_defun([_LT_CMD_STRIPLIB],
2000 [m4_require([_LT_DECL_EGREP])
2001 striplib=
2002 old_striplib=
2003 AC_MSG_CHECKING([whether stripping libraries is possible])
2004 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2005 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2006 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2007 AC_MSG_RESULT([yes])
2008 else
2009 # FIXME - insert some real tests, host_os isn't really good enough
2010 case $host_os in
2011 darwin*)
2012 if test -n "$STRIP" ; then
2013 striplib="$STRIP -x"
2014 old_striplib="$STRIP -S"
2015 AC_MSG_RESULT([yes])
2016 else
2017 AC_MSG_RESULT([no])
2018 fi
2019 ;;
2020 *)
2021 AC_MSG_RESULT([no])
2022 ;;
2023 esac
2024 fi
2025 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2026 _LT_DECL([], [striplib], [1])
2027 ])# _LT_CMD_STRIPLIB
2028
2029
2030 # _LT_SYS_DYNAMIC_LINKER([TAG])
2031 # -----------------------------
2032 # PORTME Fill in your ld.so characteristics
2033 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2034 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2035 m4_require([_LT_DECL_EGREP])dnl
2036 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2037 m4_require([_LT_DECL_OBJDUMP])dnl
2038 m4_require([_LT_DECL_SED])dnl
2039 AC_MSG_CHECKING([dynamic linker characteristics])
2040 m4_if([$1],
2041 [], [
2042 if test "$GCC" = yes; then
2043 case $host_os in
2044 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2045 *) lt_awk_arg="/^libraries:/" ;;
2046 esac
2047 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2048 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2049 # if the path contains ";" then we assume it to be the separator
2050 # otherwise default to the standard path separator (i.e. ":") - it is
2051 # assumed that no part of a normal pathname contains ";" but that should
2052 # okay in the real world where ";" in dirpaths is itself problematic.
2053 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2054 else
2055 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2056 fi
2057 # Ok, now we have the path, separated by spaces, we can step through it
2058 # and add multilib dir if necessary.
2059 lt_tmp_lt_search_path_spec=
2060 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2061 for lt_sys_path in $lt_search_path_spec; do
2062 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2063 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2064 else
2065 test -d "$lt_sys_path" && \
2066 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2067 fi
2068 done
2069 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2070 BEGIN {RS=" "; FS="/|\n";} {
2071 lt_foo="";
2072 lt_count=0;
2073 for (lt_i = NF; lt_i > 0; lt_i--) {
2074 if ($lt_i != "" && $lt_i != ".") {
2075 if ($lt_i == "..") {
2076 lt_count++;
2077 } else {
2078 if (lt_count == 0) {
2079 lt_foo="/" $lt_i lt_foo;
2080 } else {
2081 lt_count--;
2082 }
2083 }
2084 }
2085 }
2086 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2087 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2088 }'`
2089 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2090 else
2091 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2092 fi])
2093 library_names_spec=
2094 libname_spec='lib$name'
2095 soname_spec=
2096 shrext_cmds=".so"
2097 postinstall_cmds=
2098 postuninstall_cmds=
2099 finish_cmds=
2100 finish_eval=
2101 shlibpath_var=
2102 shlibpath_overrides_runpath=unknown
2103 version_type=none
2104 dynamic_linker="$host_os ld.so"
2105 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2106 need_lib_prefix=unknown
2107 hardcode_into_libs=no
2108
2109 # when you set need_version to no, make sure it does not cause -set_version
2110 # flags to be left without arguments
2111 need_version=unknown
2112
2113 case $host_os in
2114 aix3*)
2115 version_type=linux
2116 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2117 shlibpath_var=LIBPATH
2118
2119 # AIX 3 has no versioning support, so we append a major version to the name.
2120 soname_spec='${libname}${release}${shared_ext}$major'
2121 ;;
2122
2123 aix[[4-9]]*)
2124 version_type=linux
2125 need_lib_prefix=no
2126 need_version=no
2127 hardcode_into_libs=yes
2128 if test "$host_cpu" = ia64; then
2129 # AIX 5 supports IA64
2130 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2131 shlibpath_var=LD_LIBRARY_PATH
2132 else
2133 # With GCC up to 2.95.x, collect2 would create an import file
2134 # for dependence libraries. The import file would start with
2135 # the line `#! .'. This would cause the generated library to
2136 # depend on `.', always an invalid library. This was fixed in
2137 # development snapshots of GCC prior to 3.0.
2138 case $host_os in
2139 aix4 | aix4.[[01]] | aix4.[[01]].*)
2140 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2141 echo ' yes '
2142 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2143 :
2144 else
2145 can_build_shared=no
2146 fi
2147 ;;
2148 esac
2149 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2150 # soname into executable. Probably we can add versioning support to
2151 # collect2, so additional links can be useful in future.
2152 if test "$aix_use_runtimelinking" = yes; then
2153 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2154 # instead of lib<name>.a to let people know that these are not
2155 # typical AIX shared libraries.
2156 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2157 else
2158 # We preserve .a as extension for shared libraries through AIX4.2
2159 # and later when we are not doing run time linking.
2160 library_names_spec='${libname}${release}.a $libname.a'
2161 soname_spec='${libname}${release}${shared_ext}$major'
2162 fi
2163 shlibpath_var=LIBPATH
2164 fi
2165 ;;
2166
2167 amigaos*)
2168 case $host_cpu in
2169 powerpc)
2170 # Since July 2007 AmigaOS4 officially supports .so libraries.
2171 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2172 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2173 ;;
2174 m68k)
2175 library_names_spec='$libname.ixlibrary $libname.a'
2176 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2177 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'
2178 ;;
2179 esac
2180 ;;
2181
2182 beos*)
2183 library_names_spec='${libname}${shared_ext}'
2184 dynamic_linker="$host_os ld.so"
2185 shlibpath_var=LIBRARY_PATH
2186 ;;
2187
2188 bsdi[[45]]*)
2189 version_type=linux
2190 need_version=no
2191 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2192 soname_spec='${libname}${release}${shared_ext}$major'
2193 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2194 shlibpath_var=LD_LIBRARY_PATH
2195 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2196 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2197 # the default ld.so.conf also contains /usr/contrib/lib and
2198 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2199 # libtool to hard-code these into programs
2200 ;;
2201
2202 cygwin* | mingw* | pw32* | cegcc*)
2203 version_type=windows
2204 shrext_cmds=".dll"
2205 need_version=no
2206 need_lib_prefix=no
2207
2208 case $GCC,$host_os in
2209 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2210 library_names_spec='$libname.dll.a'
2211 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2212 postinstall_cmds='base_file=`basename \${file}`~
2213 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2214 dldir=$destdir/`dirname \$dlpath`~
2215 test -d \$dldir || mkdir -p \$dldir~
2216 $install_prog $dir/$dlname \$dldir/$dlname~
2217 chmod a+x \$dldir/$dlname~
2218 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2219 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2220 fi'
2221 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2222 dlpath=$dir/\$dldll~
2223 $RM \$dlpath'
2224 shlibpath_overrides_runpath=yes
2225
2226 case $host_os in
2227 cygwin*)
2228 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2229 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2230 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2231 ;;
2232 mingw* | cegcc*)
2233 # MinGW DLLs use traditional 'lib' prefix
2234 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2235 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2236 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2237 # It is most probably a Windows format PATH printed by
2238 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2239 # path with ; separators, and with drive letters. We can handle the
2240 # drive letters (cygwin fileutils understands them), so leave them,
2241 # especially as we might pass files found there to a mingw objdump,
2242 # which wouldn't understand a cygwinified path. Ahh.
2243 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2244 else
2245 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2246 fi
2247 ;;
2248 pw32*)
2249 # pw32 DLLs use 'pw' prefix rather than 'lib'
2250 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2251 ;;
2252 esac
2253 ;;
2254
2255 *)
2256 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2257 ;;
2258 esac
2259 dynamic_linker='Win32 ld.exe'
2260 # FIXME: first we should search . and the directory the executable is in
2261 shlibpath_var=PATH
2262 ;;
2263
2264 darwin* | rhapsody*)
2265 dynamic_linker="$host_os dyld"
2266 version_type=darwin
2267 need_lib_prefix=no
2268 need_version=no
2269 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2270 soname_spec='${libname}${release}${major}$shared_ext'
2271 shlibpath_overrides_runpath=yes
2272 shlibpath_var=DYLD_LIBRARY_PATH
2273 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2274 m4_if([$1], [],[
2275 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2276 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2277 ;;
2278
2279 dgux*)
2280 version_type=linux
2281 need_lib_prefix=no
2282 need_version=no
2283 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2284 soname_spec='${libname}${release}${shared_ext}$major'
2285 shlibpath_var=LD_LIBRARY_PATH
2286 ;;
2287
2288 freebsd1*)
2289 dynamic_linker=no
2290 ;;
2291
2292 freebsd* | dragonfly*)
2293 # DragonFly does not have aout. When/if they implement a new
2294 # versioning mechanism, adjust this.
2295 if test -x /usr/bin/objformat; then
2296 objformat=`/usr/bin/objformat`
2297 else
2298 case $host_os in
2299 freebsd[[123]]*) objformat=aout ;;
2300 *) objformat=elf ;;
2301 esac
2302 fi
2303 version_type=freebsd-$objformat
2304 case $version_type in
2305 freebsd-elf*)
2306 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2307 need_version=no
2308 need_lib_prefix=no
2309 ;;
2310 freebsd-*)
2311 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2312 need_version=yes
2313 ;;
2314 esac
2315 shlibpath_var=LD_LIBRARY_PATH
2316 case $host_os in
2317 freebsd2*)
2318 shlibpath_overrides_runpath=yes
2319 ;;
2320 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2321 shlibpath_overrides_runpath=yes
2322 hardcode_into_libs=yes
2323 ;;
2324 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2325 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2326 shlibpath_overrides_runpath=no
2327 hardcode_into_libs=yes
2328 ;;
2329 *) # from 4.6 on, and DragonFly
2330 shlibpath_overrides_runpath=yes
2331 hardcode_into_libs=yes
2332 ;;
2333 esac
2334 ;;
2335
2336 gnu*)
2337 version_type=linux
2338 need_lib_prefix=no
2339 need_version=no
2340 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2341 soname_spec='${libname}${release}${shared_ext}$major'
2342 shlibpath_var=LD_LIBRARY_PATH
2343 hardcode_into_libs=yes
2344 ;;
2345
2346 hpux9* | hpux10* | hpux11*)
2347 # Give a soname corresponding to the major version so that dld.sl refuses to
2348 # link against other versions.
2349 version_type=sunos
2350 need_lib_prefix=no
2351 need_version=no
2352 case $host_cpu in
2353 ia64*)
2354 shrext_cmds='.so'
2355 hardcode_into_libs=yes
2356 dynamic_linker="$host_os dld.so"
2357 shlibpath_var=LD_LIBRARY_PATH
2358 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2359 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2360 soname_spec='${libname}${release}${shared_ext}$major'
2361 if test "X$HPUX_IA64_MODE" = X32; then
2362 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2363 else
2364 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2365 fi
2366 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2367 ;;
2368 hppa*64*)
2369 shrext_cmds='.sl'
2370 hardcode_into_libs=yes
2371 dynamic_linker="$host_os dld.sl"
2372 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2373 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2374 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2375 soname_spec='${libname}${release}${shared_ext}$major'
2376 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2377 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2378 ;;
2379 *)
2380 shrext_cmds='.sl'
2381 dynamic_linker="$host_os dld.sl"
2382 shlibpath_var=SHLIB_PATH
2383 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2384 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2385 soname_spec='${libname}${release}${shared_ext}$major'
2386 ;;
2387 esac
2388 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2389 postinstall_cmds='chmod 555 $lib'
2390 ;;
2391
2392 interix[[3-9]]*)
2393 version_type=linux
2394 need_lib_prefix=no
2395 need_version=no
2396 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2397 soname_spec='${libname}${release}${shared_ext}$major'
2398 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2399 shlibpath_var=LD_LIBRARY_PATH
2400 shlibpath_overrides_runpath=no
2401 hardcode_into_libs=yes
2402 ;;
2403
2404 irix5* | irix6* | nonstopux*)
2405 case $host_os in
2406 nonstopux*) version_type=nonstopux ;;
2407 *)
2408 if test "$lt_cv_prog_gnu_ld" = yes; then
2409 version_type=linux
2410 else
2411 version_type=irix
2412 fi ;;
2413 esac
2414 need_lib_prefix=no
2415 need_version=no
2416 soname_spec='${libname}${release}${shared_ext}$major'
2417 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2418 case $host_os in
2419 irix5* | nonstopux*)
2420 libsuff= shlibsuff=
2421 ;;
2422 *)
2423 case $LD in # libtool.m4 will add one of these switches to LD
2424 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2425 libsuff= shlibsuff= libmagic=32-bit;;
2426 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2427 libsuff=32 shlibsuff=N32 libmagic=N32;;
2428 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2429 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2430 *) libsuff= shlibsuff= libmagic=never-match;;
2431 esac
2432 ;;
2433 esac
2434 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2435 shlibpath_overrides_runpath=no
2436 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2437 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2438 hardcode_into_libs=yes
2439 ;;
2440
2441 # No shared lib support for Linux oldld, aout, or coff.
2442 linux*oldld* | linux*aout* | linux*coff*)
2443 dynamic_linker=no
2444 ;;
2445
2446 # This must be Linux ELF.
2447 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2448 version_type=linux
2449 need_lib_prefix=no
2450 need_version=no
2451 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2452 soname_spec='${libname}${release}${shared_ext}$major'
2453 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2454 shlibpath_var=LD_LIBRARY_PATH
2455 shlibpath_overrides_runpath=no
2456 # Some binutils ld are patched to set DT_RUNPATH
2457 save_LDFLAGS=$LDFLAGS
2458 save_libdir=$libdir
2459 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2460 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2461 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2462 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2463 [shlibpath_overrides_runpath=yes])])
2464 LDFLAGS=$save_LDFLAGS
2465 libdir=$save_libdir
2466
2467 # This implies no fast_install, which is unacceptable.
2468 # Some rework will be needed to allow for fast_install
2469 # before this can be enabled.
2470 hardcode_into_libs=yes
2471
2472 # Append ld.so.conf contents to the search path
2473 if test -f /etc/ld.so.conf; then
2474 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2475 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2476 fi
2477
2478 # We used to test for /lib/ld.so.1 and disable shared libraries on
2479 # powerpc, because MkLinux only supported shared libraries with the
2480 # GNU dynamic linker. Since this was broken with cross compilers,
2481 # most powerpc-linux boxes support dynamic linking these days and
2482 # people can always --disable-shared, the test was removed, and we
2483 # assume the GNU/Linux dynamic linker is in use.
2484 dynamic_linker='GNU/Linux ld.so'
2485 ;;
2486
2487 netbsdelf*-gnu)
2488 version_type=linux
2489 need_lib_prefix=no
2490 need_version=no
2491 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2492 soname_spec='${libname}${release}${shared_ext}$major'
2493 shlibpath_var=LD_LIBRARY_PATH
2494 shlibpath_overrides_runpath=no
2495 hardcode_into_libs=yes
2496 dynamic_linker='NetBSD ld.elf_so'
2497 ;;
2498
2499 netbsd*)
2500 version_type=sunos
2501 need_lib_prefix=no
2502 need_version=no
2503 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2504 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2505 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2506 dynamic_linker='NetBSD (a.out) ld.so'
2507 else
2508 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2509 soname_spec='${libname}${release}${shared_ext}$major'
2510 dynamic_linker='NetBSD ld.elf_so'
2511 fi
2512 shlibpath_var=LD_LIBRARY_PATH
2513 shlibpath_overrides_runpath=yes
2514 hardcode_into_libs=yes
2515 ;;
2516
2517 newsos6)
2518 version_type=linux
2519 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2520 shlibpath_var=LD_LIBRARY_PATH
2521 shlibpath_overrides_runpath=yes
2522 ;;
2523
2524 *nto* | *qnx*)
2525 version_type=qnx
2526 need_lib_prefix=no
2527 need_version=no
2528 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2529 soname_spec='${libname}${release}${shared_ext}$major'
2530 shlibpath_var=LD_LIBRARY_PATH
2531 shlibpath_overrides_runpath=no
2532 hardcode_into_libs=yes
2533 dynamic_linker='ldqnx.so'
2534 ;;
2535
2536 openbsd*)
2537 version_type=sunos
2538 sys_lib_dlsearch_path_spec="/usr/lib"
2539 need_lib_prefix=no
2540 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2541 case $host_os in
2542 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2543 *) need_version=no ;;
2544 esac
2545 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2546 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2547 shlibpath_var=LD_LIBRARY_PATH
2548 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2549 case $host_os in
2550 openbsd2.[[89]] | openbsd2.[[89]].*)
2551 shlibpath_overrides_runpath=no
2552 ;;
2553 *)
2554 shlibpath_overrides_runpath=yes
2555 ;;
2556 esac
2557 else
2558 shlibpath_overrides_runpath=yes
2559 fi
2560 ;;
2561
2562 os2*)
2563 libname_spec='$name'
2564 shrext_cmds=".dll"
2565 need_lib_prefix=no
2566 library_names_spec='$libname${shared_ext} $libname.a'
2567 dynamic_linker='OS/2 ld.exe'
2568 shlibpath_var=LIBPATH
2569 ;;
2570
2571 osf3* | osf4* | osf5*)
2572 version_type=osf
2573 need_lib_prefix=no
2574 need_version=no
2575 soname_spec='${libname}${release}${shared_ext}$major'
2576 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2577 shlibpath_var=LD_LIBRARY_PATH
2578 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2579 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2580 ;;
2581
2582 rdos*)
2583 dynamic_linker=no
2584 ;;
2585
2586 solaris*)
2587 version_type=linux
2588 need_lib_prefix=no
2589 need_version=no
2590 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2591 soname_spec='${libname}${release}${shared_ext}$major'
2592 shlibpath_var=LD_LIBRARY_PATH
2593 shlibpath_overrides_runpath=yes
2594 hardcode_into_libs=yes
2595 # ldd complains unless libraries are executable
2596 postinstall_cmds='chmod +x $lib'
2597 ;;
2598
2599 sunos4*)
2600 version_type=sunos
2601 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2602 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2603 shlibpath_var=LD_LIBRARY_PATH
2604 shlibpath_overrides_runpath=yes
2605 if test "$with_gnu_ld" = yes; then
2606 need_lib_prefix=no
2607 fi
2608 need_version=yes
2609 ;;
2610
2611 sysv4 | sysv4.3*)
2612 version_type=linux
2613 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2614 soname_spec='${libname}${release}${shared_ext}$major'
2615 shlibpath_var=LD_LIBRARY_PATH
2616 case $host_vendor in
2617 sni)
2618 shlibpath_overrides_runpath=no
2619 need_lib_prefix=no
2620 runpath_var=LD_RUN_PATH
2621 ;;
2622 siemens)
2623 need_lib_prefix=no
2624 ;;
2625 motorola)
2626 need_lib_prefix=no
2627 need_version=no
2628 shlibpath_overrides_runpath=no
2629 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2630 ;;
2631 esac
2632 ;;
2633
2634 sysv4*MP*)
2635 if test -d /usr/nec ;then
2636 version_type=linux
2637 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2638 soname_spec='$libname${shared_ext}.$major'
2639 shlibpath_var=LD_LIBRARY_PATH
2640 fi
2641 ;;
2642
2643 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2644 version_type=freebsd-elf
2645 need_lib_prefix=no
2646 need_version=no
2647 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2648 soname_spec='${libname}${release}${shared_ext}$major'
2649 shlibpath_var=LD_LIBRARY_PATH
2650 shlibpath_overrides_runpath=yes
2651 hardcode_into_libs=yes
2652 if test "$with_gnu_ld" = yes; then
2653 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2654 else
2655 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2656 case $host_os in
2657 sco3.2v5*)
2658 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2659 ;;
2660 esac
2661 fi
2662 sys_lib_dlsearch_path_spec='/usr/lib'
2663 ;;
2664
2665 tpf*)
2666 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2667 version_type=linux
2668 need_lib_prefix=no
2669 need_version=no
2670 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2671 shlibpath_var=LD_LIBRARY_PATH
2672 shlibpath_overrides_runpath=no
2673 hardcode_into_libs=yes
2674 ;;
2675
2676 uts4*)
2677 version_type=linux
2678 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2679 soname_spec='${libname}${release}${shared_ext}$major'
2680 shlibpath_var=LD_LIBRARY_PATH
2681 ;;
2682
2683 *)
2684 dynamic_linker=no
2685 ;;
2686 esac
2687 AC_MSG_RESULT([$dynamic_linker])
2688 test "$dynamic_linker" = no && can_build_shared=no
2689
2690 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2691 if test "$GCC" = yes; then
2692 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2693 fi
2694
2695 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2696 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2697 fi
2698 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2699 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2700 fi
2701
2702 _LT_DECL([], [variables_saved_for_relink], [1],
2703 [Variables whose values should be saved in libtool wrapper scripts and
2704 restored at link time])
2705 _LT_DECL([], [need_lib_prefix], [0],
2706 [Do we need the "lib" prefix for modules?])
2707 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2708 _LT_DECL([], [version_type], [0], [Library versioning type])
2709 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2710 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2711 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2712 [Is shlibpath searched before the hard-coded library search path?])
2713 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2714 _LT_DECL([], [library_names_spec], [1],
2715 [[List of archive names. First name is the real one, the rest are links.
2716 The last name is the one that the linker finds with -lNAME]])
2717 _LT_DECL([], [soname_spec], [1],
2718 [[The coded name of the library, if different from the real name]])
2719 _LT_DECL([], [postinstall_cmds], [2],
2720 [Command to use after installation of a shared archive])
2721 _LT_DECL([], [postuninstall_cmds], [2],
2722 [Command to use after uninstallation of a shared archive])
2723 _LT_DECL([], [finish_cmds], [2],
2724 [Commands used to finish a libtool library installation in a directory])
2725 _LT_DECL([], [finish_eval], [1],
2726 [[As "finish_cmds", except a single script fragment to be evaled but
2727 not shown]])
2728 _LT_DECL([], [hardcode_into_libs], [0],
2729 [Whether we should hardcode library paths into libraries])
2730 _LT_DECL([], [sys_lib_search_path_spec], [2],
2731 [Compile-time system search path for libraries])
2732 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2733 [Run-time system search path for libraries])
2734 ])# _LT_SYS_DYNAMIC_LINKER
2735
2736
2737 # _LT_PATH_TOOL_PREFIX(TOOL)
2738 # --------------------------
2739 # find a file program which can recognize shared library
2740 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2741 [m4_require([_LT_DECL_EGREP])dnl
2742 AC_MSG_CHECKING([for $1])
2743 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2744 [case $MAGIC_CMD in
2745 [[\\/*] | ?:[\\/]*])
2746 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2747 ;;
2748 *)
2749 lt_save_MAGIC_CMD="$MAGIC_CMD"
2750 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2751 dnl $ac_dummy forces splitting on constant user-supplied paths.
2752 dnl POSIX.2 word splitting is done only on the output of word expansions,
2753 dnl not every word. This closes a longstanding sh security hole.
2754 ac_dummy="m4_if([$2], , $PATH, [$2])"
2755 for ac_dir in $ac_dummy; do
2756 IFS="$lt_save_ifs"
2757 test -z "$ac_dir" && ac_dir=.
2758 if test -f $ac_dir/$1; then
2759 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2760 if test -n "$file_magic_test_file"; then
2761 case $deplibs_check_method in
2762 "file_magic "*)
2763 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2764 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2765 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2766 $EGREP "$file_magic_regex" > /dev/null; then
2767 :
2768 else
2769 cat <<_LT_EOF 1>&2
2770
2771 *** Warning: the command libtool uses to detect shared libraries,
2772 *** $file_magic_cmd, produces output that libtool cannot recognize.
2773 *** The result is that libtool may fail to recognize shared libraries
2774 *** as such. This will affect the creation of libtool libraries that
2775 *** depend on shared libraries, but programs linked with such libtool
2776 *** libraries will work regardless of this problem. Nevertheless, you
2777 *** may want to report the problem to your system manager and/or to
2778 *** bug-libtool@gnu.org
2779
2780 _LT_EOF
2781 fi ;;
2782 esac
2783 fi
2784 break
2785 fi
2786 done
2787 IFS="$lt_save_ifs"
2788 MAGIC_CMD="$lt_save_MAGIC_CMD"
2789 ;;
2790 esac])
2791 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2792 if test -n "$MAGIC_CMD"; then
2793 AC_MSG_RESULT($MAGIC_CMD)
2794 else
2795 AC_MSG_RESULT(no)
2796 fi
2797 _LT_DECL([], [MAGIC_CMD], [0],
2798 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2799 ])# _LT_PATH_TOOL_PREFIX
2800
2801 # Old name:
2802 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2803 dnl aclocal-1.4 backwards compatibility:
2804 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2805
2806
2807 # _LT_PATH_MAGIC
2808 # --------------
2809 # find a file program which can recognize a shared library
2810 m4_defun([_LT_PATH_MAGIC],
2811 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2812 if test -z "$lt_cv_path_MAGIC_CMD"; then
2813 if test -n "$ac_tool_prefix"; then
2814 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2815 else
2816 MAGIC_CMD=:
2817 fi
2818 fi
2819 ])# _LT_PATH_MAGIC
2820
2821
2822 # LT_PATH_LD
2823 # ----------
2824 # find the pathname to the GNU or non-GNU linker
2825 AC_DEFUN([LT_PATH_LD],
2826 [AC_REQUIRE([AC_PROG_CC])dnl
2827 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2828 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2829 m4_require([_LT_DECL_SED])dnl
2830 m4_require([_LT_DECL_EGREP])dnl
2831
2832 AC_ARG_WITH([gnu-ld],
2833 [AS_HELP_STRING([--with-gnu-ld],
2834 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2835 [test "$withval" = no || with_gnu_ld=yes],
2836 [with_gnu_ld=no])dnl
2837
2838 ac_prog=ld
2839 if test "$GCC" = yes; then
2840 # Check if gcc -print-prog-name=ld gives a path.
2841 AC_MSG_CHECKING([for ld used by $CC])
2842 case $host in
2843 *-*-mingw*)
2844 # gcc leaves a trailing carriage return which upsets mingw
2845 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2846 *)
2847 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2848 esac
2849 case $ac_prog in
2850 # Accept absolute paths.
2851 [[\\/]]* | ?:[[\\/]]*)
2852 re_direlt='/[[^/]][[^/]]*/\.\./'
2853 # Canonicalize the pathname of ld
2854 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2855 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2856 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2857 done
2858 test -z "$LD" && LD="$ac_prog"
2859 ;;
2860 "")
2861 # If it fails, then pretend we aren't using GCC.
2862 ac_prog=ld
2863 ;;
2864 *)
2865 # If it is relative, then search for the first ld in PATH.
2866 with_gnu_ld=unknown
2867 ;;
2868 esac
2869 elif test "$with_gnu_ld" = yes; then
2870 AC_MSG_CHECKING([for GNU ld])
2871 else
2872 AC_MSG_CHECKING([for non-GNU ld])
2873 fi
2874 AC_CACHE_VAL(lt_cv_path_LD,
2875 [if test -z "$LD"; then
2876 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2877 for ac_dir in $PATH; do
2878 IFS="$lt_save_ifs"
2879 test -z "$ac_dir" && ac_dir=.
2880 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2881 lt_cv_path_LD="$ac_dir/$ac_prog"
2882 # Check to see if the program is GNU ld. I'd rather use --version,
2883 # but apparently some variants of GNU ld only accept -v.
2884 # Break only if it was the GNU/non-GNU ld that we prefer.
2885 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2886 *GNU* | *'with BFD'*)
2887 test "$with_gnu_ld" != no && break
2888 ;;
2889 *)
2890 test "$with_gnu_ld" != yes && break
2891 ;;
2892 esac
2893 fi
2894 done
2895 IFS="$lt_save_ifs"
2896 else
2897 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2898 fi])
2899 LD="$lt_cv_path_LD"
2900 if test -n "$LD"; then
2901 AC_MSG_RESULT($LD)
2902 else
2903 AC_MSG_RESULT(no)
2904 fi
2905 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2906 _LT_PATH_LD_GNU
2907 AC_SUBST([LD])
2908
2909 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2910 ])# LT_PATH_LD
2911
2912 # Old names:
2913 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2914 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2915 dnl aclocal-1.4 backwards compatibility:
2916 dnl AC_DEFUN([AM_PROG_LD], [])
2917 dnl AC_DEFUN([AC_PROG_LD], [])
2918
2919
2920 # _LT_PATH_LD_GNU
2921 #- --------------
2922 m4_defun([_LT_PATH_LD_GNU],
2923 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2924 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2925 case `$LD -v 2>&1 </dev/null` in
2926 *GNU* | *'with BFD'*)
2927 lt_cv_prog_gnu_ld=yes
2928 ;;
2929 *)
2930 lt_cv_prog_gnu_ld=no
2931 ;;
2932 esac])
2933 with_gnu_ld=$lt_cv_prog_gnu_ld
2934 ])# _LT_PATH_LD_GNU
2935
2936
2937 # _LT_CMD_RELOAD
2938 # --------------
2939 # find reload flag for linker
2940 # -- PORTME Some linkers may need a different reload flag.
2941 m4_defun([_LT_CMD_RELOAD],
2942 [AC_CACHE_CHECK([for $LD option to reload object files],
2943 lt_cv_ld_reload_flag,
2944 [lt_cv_ld_reload_flag='-r'])
2945 reload_flag=$lt_cv_ld_reload_flag
2946 case $reload_flag in
2947 "" | " "*) ;;
2948 *) reload_flag=" $reload_flag" ;;
2949 esac
2950 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2951 case $host_os in
2952 darwin*)
2953 if test "$GCC" = yes; then
2954 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2955 else
2956 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2957 fi
2958 ;;
2959 esac
2960 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2961 _LT_DECL([], [reload_cmds], [2])dnl
2962 ])# _LT_CMD_RELOAD
2963
2964
2965 # _LT_CHECK_MAGIC_METHOD
2966 # ----------------------
2967 # how to check for library dependencies
2968 # -- PORTME fill in with the dynamic library characteristics
2969 m4_defun([_LT_CHECK_MAGIC_METHOD],
2970 [m4_require([_LT_DECL_EGREP])
2971 m4_require([_LT_DECL_OBJDUMP])
2972 AC_CACHE_CHECK([how to recognize dependent libraries],
2973 lt_cv_deplibs_check_method,
2974 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2975 lt_cv_file_magic_test_file=
2976 lt_cv_deplibs_check_method='unknown'
2977 # Need to set the preceding variable on all platforms that support
2978 # interlibrary dependencies.
2979 # 'none' -- dependencies not supported.
2980 # `unknown' -- same as none, but documents that we really don't know.
2981 # 'pass_all' -- all dependencies passed with no checks.
2982 # 'test_compile' -- check by making test program.
2983 # 'file_magic [[regex]]' -- check by looking for files in library path
2984 # which responds to the $file_magic_cmd with a given extended regex.
2985 # If you have `file' or equivalent on your system and you're not sure
2986 # whether `pass_all' will *always* work, you probably want this one.
2987
2988 case $host_os in
2989 aix[[4-9]]*)
2990 lt_cv_deplibs_check_method=pass_all
2991 ;;
2992
2993 beos*)
2994 lt_cv_deplibs_check_method=pass_all
2995 ;;
2996
2997 bsdi[[45]]*)
2998 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2999 lt_cv_file_magic_cmd='/usr/bin/file -L'
3000 lt_cv_file_magic_test_file=/shlib/libc.so
3001 ;;
3002
3003 cygwin*)
3004 # func_win32_libid is a shell function defined in ltmain.sh
3005 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3006 lt_cv_file_magic_cmd='func_win32_libid'
3007 ;;
3008
3009 mingw* | pw32*)
3010 # Base MSYS/MinGW do not provide the 'file' command needed by
3011 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3012 # unless we find 'file', for example because we are cross-compiling.
3013 if ( file / ) >/dev/null 2>&1; then
3014 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3015 lt_cv_file_magic_cmd='func_win32_libid'
3016 else
3017 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3018 lt_cv_file_magic_cmd='$OBJDUMP -f'
3019 fi
3020 ;;
3021
3022 cegcc)
3023 # use the weaker test based on 'objdump'. See mingw*.
3024 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3025 lt_cv_file_magic_cmd='$OBJDUMP -f'
3026 ;;
3027
3028 darwin* | rhapsody*)
3029 lt_cv_deplibs_check_method=pass_all
3030 ;;
3031
3032 freebsd* | dragonfly*)
3033 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3034 case $host_cpu in
3035 i*86 )
3036 # Not sure whether the presence of OpenBSD here was a mistake.
3037 # Let's accept both of them until this is cleared up.
3038 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3039 lt_cv_file_magic_cmd=/usr/bin/file
3040 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3041 ;;
3042 esac
3043 else
3044 lt_cv_deplibs_check_method=pass_all
3045 fi
3046 ;;
3047
3048 gnu*)
3049 lt_cv_deplibs_check_method=pass_all
3050 ;;
3051
3052 hpux10.20* | hpux11*)
3053 lt_cv_file_magic_cmd=/usr/bin/file
3054 case $host_cpu in
3055 ia64*)
3056 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3057 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3058 ;;
3059 hppa*64*)
3060 [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]']
3061 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3062 ;;
3063 *)
3064 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3065 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3066 ;;
3067 esac
3068 ;;
3069
3070 interix[[3-9]]*)
3071 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3072 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3073 ;;
3074
3075 irix5* | irix6* | nonstopux*)
3076 case $LD in
3077 *-32|*"-32 ") libmagic=32-bit;;
3078 *-n32|*"-n32 ") libmagic=N32;;
3079 *-64|*"-64 ") libmagic=64-bit;;
3080 *) libmagic=never-match;;
3081 esac
3082 lt_cv_deplibs_check_method=pass_all
3083 ;;
3084
3085 # This must be Linux ELF.
3086 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3087 lt_cv_deplibs_check_method=pass_all
3088 ;;
3089
3090 netbsd* | netbsdelf*-gnu)
3091 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3092 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3093 else
3094 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3095 fi
3096 ;;
3097
3098 newos6*)
3099 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3100 lt_cv_file_magic_cmd=/usr/bin/file
3101 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3102 ;;
3103
3104 *nto* | *qnx*)
3105 lt_cv_deplibs_check_method=pass_all
3106 ;;
3107
3108 openbsd*)
3109 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3110 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3111 else
3112 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3113 fi
3114 ;;
3115
3116 osf3* | osf4* | osf5*)
3117 lt_cv_deplibs_check_method=pass_all
3118 ;;
3119
3120 rdos*)
3121 lt_cv_deplibs_check_method=pass_all
3122 ;;
3123
3124 solaris*)
3125 lt_cv_deplibs_check_method=pass_all
3126 ;;
3127
3128 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3129 lt_cv_deplibs_check_method=pass_all
3130 ;;
3131
3132 sysv4 | sysv4.3*)
3133 case $host_vendor in
3134 motorola)
3135 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]]'
3136 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3137 ;;
3138 ncr)
3139 lt_cv_deplibs_check_method=pass_all
3140 ;;
3141 sequent)
3142 lt_cv_file_magic_cmd='/bin/file'
3143 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3144 ;;
3145 sni)
3146 lt_cv_file_magic_cmd='/bin/file'
3147 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3148 lt_cv_file_magic_test_file=/lib/libc.so
3149 ;;
3150 siemens)
3151 lt_cv_deplibs_check_method=pass_all
3152 ;;
3153 pc)
3154 lt_cv_deplibs_check_method=pass_all
3155 ;;
3156 esac
3157 ;;
3158
3159 tpf*)
3160 lt_cv_deplibs_check_method=pass_all
3161 ;;
3162 esac
3163 ])
3164 file_magic_cmd=$lt_cv_file_magic_cmd
3165 deplibs_check_method=$lt_cv_deplibs_check_method
3166 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3167
3168 _LT_DECL([], [deplibs_check_method], [1],
3169 [Method to check whether dependent libraries are shared objects])
3170 _LT_DECL([], [file_magic_cmd], [1],
3171 [Command to use when deplibs_check_method == "file_magic"])
3172 ])# _LT_CHECK_MAGIC_METHOD
3173
3174
3175 # LT_PATH_NM
3176 # ----------
3177 # find the pathname to a BSD- or MS-compatible name lister
3178 AC_DEFUN([LT_PATH_NM],
3179 [AC_REQUIRE([AC_PROG_CC])dnl
3180 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3181 [if test -n "$NM"; then
3182 # Let the user override the test.
3183 lt_cv_path_NM="$NM"
3184 else
3185 lt_nm_to_check="${ac_tool_prefix}nm"
3186 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3187 lt_nm_to_check="$lt_nm_to_check nm"
3188 fi
3189 for lt_tmp_nm in $lt_nm_to_check; do
3190 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3191 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3192 IFS="$lt_save_ifs"
3193 test -z "$ac_dir" && ac_dir=.
3194 tmp_nm="$ac_dir/$lt_tmp_nm"
3195 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3196 # Check to see if the nm accepts a BSD-compat flag.
3197 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3198 # nm: unknown option "B" ignored
3199 # Tru64's nm complains that /dev/null is an invalid object file
3200 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3201 */dev/null* | *'Invalid file or object type'*)
3202 lt_cv_path_NM="$tmp_nm -B"
3203 break
3204 ;;
3205 *)
3206 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3207 */dev/null*)
3208 lt_cv_path_NM="$tmp_nm -p"
3209 break
3210 ;;
3211 *)
3212 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3213 continue # so that we can try to find one that supports BSD flags
3214 ;;
3215 esac
3216 ;;
3217 esac
3218 fi
3219 done
3220 IFS="$lt_save_ifs"
3221 done
3222 : ${lt_cv_path_NM=no}
3223 fi])
3224 if test "$lt_cv_path_NM" != "no"; then
3225 NM="$lt_cv_path_NM"
3226 else
3227 # Didn't find any BSD compatible name lister, look for dumpbin.
3228 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3229 AC_SUBST([DUMPBIN])
3230 if test "$DUMPBIN" != ":"; then
3231 NM="$DUMPBIN"
3232 fi
3233 fi
3234 test -z "$NM" && NM=nm
3235 AC_SUBST([NM])
3236 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3237
3238 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3239 [lt_cv_nm_interface="BSD nm"
3240 echo "int some_variable = 0;" > conftest.$ac_ext
3241 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3242 (eval "$ac_compile" 2>conftest.err)
3243 cat conftest.err >&AS_MESSAGE_LOG_FD
3244 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3245 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3246 cat conftest.err >&AS_MESSAGE_LOG_FD
3247 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3248 cat conftest.out >&AS_MESSAGE_LOG_FD
3249 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3250 lt_cv_nm_interface="MS dumpbin"
3251 fi
3252 rm -f conftest*])
3253 ])# LT_PATH_NM
3254
3255 # Old names:
3256 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3257 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3258 dnl aclocal-1.4 backwards compatibility:
3259 dnl AC_DEFUN([AM_PROG_NM], [])
3260 dnl AC_DEFUN([AC_PROG_NM], [])
3261
3262
3263 # LT_LIB_M
3264 # --------
3265 # check for math library
3266 AC_DEFUN([LT_LIB_M],
3267 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3268 LIBM=
3269 case $host in
3270 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3271 # These system don't have libm, or don't need it
3272 ;;
3273 *-ncr-sysv4.3*)
3274 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3275 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3276 ;;
3277 *)
3278 AC_CHECK_LIB(m, cos, LIBM="-lm")
3279 ;;
3280 esac
3281 AC_SUBST([LIBM])
3282 ])# LT_LIB_M
3283
3284 # Old name:
3285 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3286 dnl aclocal-1.4 backwards compatibility:
3287 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3288
3289
3290 # _LT_COMPILER_NO_RTTI([TAGNAME])
3291 # -------------------------------
3292 m4_defun([_LT_COMPILER_NO_RTTI],
3293 [m4_require([_LT_TAG_COMPILER])dnl
3294
3295 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3296
3297 if test "$GCC" = yes; then
3298 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3299
3300 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3301 lt_cv_prog_compiler_rtti_exceptions,
3302 [-fno-rtti -fno-exceptions], [],
3303 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3304 fi
3305 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3306 [Compiler flag to turn off builtin functions])
3307 ])# _LT_COMPILER_NO_RTTI
3308
3309
3310 # _LT_CMD_GLOBAL_SYMBOLS
3311 # ----------------------
3312 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3313 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3314 AC_REQUIRE([AC_PROG_CC])dnl
3315 AC_REQUIRE([LT_PATH_NM])dnl
3316 AC_REQUIRE([LT_PATH_LD])dnl
3317 m4_require([_LT_DECL_SED])dnl
3318 m4_require([_LT_DECL_EGREP])dnl
3319 m4_require([_LT_TAG_COMPILER])dnl
3320
3321 # Check for command to grab the raw symbol name followed by C symbol from nm.
3322 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3323 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3324 [
3325 # These are sane defaults that work on at least a few old systems.
3326 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3327
3328 # Character class describing NM global symbol codes.
3329 symcode='[[BCDEGRST]]'
3330
3331 # Regexp to match symbols that can be accessed directly from C.
3332 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3333
3334 # Define system-specific variables.
3335 case $host_os in
3336 aix*)
3337 symcode='[[BCDT]]'
3338 ;;
3339 cygwin* | mingw* | pw32* | cegcc*)
3340 symcode='[[ABCDGISTW]]'
3341 ;;
3342 hpux*)
3343 if test "$host_cpu" = ia64; then
3344 symcode='[[ABCDEGRST]]'
3345 fi
3346 ;;
3347 irix* | nonstopux*)
3348 symcode='[[BCDEGRST]]'
3349 ;;
3350 osf*)
3351 symcode='[[BCDEGQRST]]'
3352 ;;
3353 solaris*)
3354 symcode='[[BDRT]]'
3355 ;;
3356 sco3.2v5*)
3357 symcode='[[DT]]'
3358 ;;
3359 sysv4.2uw2*)
3360 symcode='[[DT]]'
3361 ;;
3362 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3363 symcode='[[ABDT]]'
3364 ;;
3365 sysv4)
3366 symcode='[[DFNSTU]]'
3367 ;;
3368 esac
3369
3370 # If we're using GNU nm, then use its standard symbol codes.
3371 case `$NM -V 2>&1` in
3372 *GNU* | *'with BFD'*)
3373 symcode='[[ABCDGIRSTW]]' ;;
3374 esac
3375
3376 # Transform an extracted symbol line into a proper C declaration.
3377 # Some systems (esp. on ia64) link data and code symbols differently,
3378 # so use this general approach.
3379 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3380
3381 # Transform an extracted symbol line into symbol name and symbol address
3382 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3383 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3384
3385 # Handle CRLF in mingw tool chain
3386 opt_cr=
3387 case $build_os in
3388 mingw*)
3389 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3390 ;;
3391 esac
3392
3393 # Try without a prefix underscore, then with it.
3394 for ac_symprfx in "" "_"; do
3395
3396 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3397 symxfrm="\\1 $ac_symprfx\\2 \\2"
3398
3399 # Write the raw and C identifiers.
3400 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3401 # Fake it for dumpbin and say T for any non-static function
3402 # and D for any global variable.
3403 # Also find C++ and __fastcall symbols from MSVC++,
3404 # which start with @ or ?.
3405 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3406 " {last_section=section; section=\$ 3};"\
3407 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3408 " \$ 0!~/External *\|/{next};"\
3409 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3410 " {if(hide[section]) next};"\
3411 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3412 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3413 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3414 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3415 " ' prfx=^$ac_symprfx]"
3416 else
3417 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3418 fi
3419
3420 # Check to see that the pipe works correctly.
3421 pipe_works=no
3422
3423 rm -f conftest*
3424 cat > conftest.$ac_ext <<_LT_EOF
3425 #ifdef __cplusplus
3426 extern "C" {
3427 #endif
3428 char nm_test_var;
3429 void nm_test_func(void);
3430 void nm_test_func(void){}
3431 #ifdef __cplusplus
3432 }
3433 #endif
3434 int main(){nm_test_var='a';nm_test_func();return(0);}
3435 _LT_EOF
3436
3437 if AC_TRY_EVAL(ac_compile); then
3438 # Now try to grab the symbols.
3439 nlist=conftest.nm
3440 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3441 # Try sorting and uniquifying the output.
3442 if sort "$nlist" | uniq > "$nlist"T; then
3443 mv -f "$nlist"T "$nlist"
3444 else
3445 rm -f "$nlist"T
3446 fi
3447
3448 # Make sure that we snagged all the symbols we need.
3449 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3450 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3451 cat <<_LT_EOF > conftest.$ac_ext
3452 #ifdef __cplusplus
3453 extern "C" {
3454 #endif
3455
3456 _LT_EOF
3457 # Now generate the symbol file.
3458 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3459
3460 cat <<_LT_EOF >> conftest.$ac_ext
3461
3462 /* The mapping between symbol names and symbols. */
3463 const struct {
3464 const char *name;
3465 void *address;
3466 }
3467 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3468 {
3469 { "@PROGRAM@", (void *) 0 },
3470 _LT_EOF
3471 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3472 cat <<\_LT_EOF >> conftest.$ac_ext
3473 {0, (void *) 0}
3474 };
3475
3476 /* This works around a problem in FreeBSD linker */
3477 #ifdef FREEBSD_WORKAROUND
3478 static const void *lt_preloaded_setup() {
3479 return lt__PROGRAM__LTX_preloaded_symbols;
3480 }
3481 #endif
3482
3483 #ifdef __cplusplus
3484 }
3485 #endif
3486 _LT_EOF
3487 # Now try linking the two files.
3488 mv conftest.$ac_objext conftstm.$ac_objext
3489 lt_save_LIBS="$LIBS"
3490 lt_save_CFLAGS="$CFLAGS"
3491 LIBS="conftstm.$ac_objext"
3492 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3493 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3494 pipe_works=yes
3495 fi
3496 LIBS="$lt_save_LIBS"
3497 CFLAGS="$lt_save_CFLAGS"
3498 else
3499 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3500 fi
3501 else
3502 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3503 fi
3504 else
3505 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3506 fi
3507 else
3508 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3509 cat conftest.$ac_ext >&5
3510 fi
3511 rm -rf conftest* conftst*
3512
3513 # Do not use the global_symbol_pipe unless it works.
3514 if test "$pipe_works" = yes; then
3515 break
3516 else
3517 lt_cv_sys_global_symbol_pipe=
3518 fi
3519 done
3520 ])
3521 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3522 lt_cv_sys_global_symbol_to_cdecl=
3523 fi
3524 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3525 AC_MSG_RESULT(failed)
3526 else
3527 AC_MSG_RESULT(ok)
3528 fi
3529
3530 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3531 [Take the output of nm and produce a listing of raw symbols and C names])
3532 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3533 [Transform the output of nm in a proper C declaration])
3534 _LT_DECL([global_symbol_to_c_name_address],
3535 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3536 [Transform the output of nm in a C name address pair])
3537 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3538 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3539 [Transform the output of nm in a C name address pair when lib prefix is needed])
3540 ]) # _LT_CMD_GLOBAL_SYMBOLS
3541
3542
3543 # _LT_COMPILER_PIC([TAGNAME])
3544 # ---------------------------
3545 m4_defun([_LT_COMPILER_PIC],
3546 [m4_require([_LT_TAG_COMPILER])dnl
3547 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3548 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3549 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3550
3551 AC_MSG_CHECKING([for $compiler option to produce PIC])
3552 m4_if([$1], [CXX], [
3553 # C++ specific cases for pic, static, wl, etc.
3554 if test "$GXX" = yes; then
3555 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3556 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3557
3558 case $host_os in
3559 aix*)
3560 # All AIX code is PIC.
3561 if test "$host_cpu" = ia64; then
3562 # AIX 5 now supports IA64 processor
3563 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3564 fi
3565 ;;
3566
3567 amigaos*)
3568 case $host_cpu in
3569 powerpc)
3570 # see comment about AmigaOS4 .so support
3571 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3572 ;;
3573 m68k)
3574 # FIXME: we need at least 68020 code to build shared libraries, but
3575 # adding the `-m68020' flag to GCC prevents building anything better,
3576 # like `-m68040'.
3577 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3578 ;;
3579 esac
3580 ;;
3581
3582 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3583 # PIC is the default for these OSes.
3584 ;;
3585 mingw* | cygwin* | os2* | pw32* | cegcc*)
3586 # This hack is so that the source file can tell whether it is being
3587 # built for inclusion in a dll (and should export symbols for example).
3588 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3589 # (--disable-auto-import) libraries
3590 m4_if([$1], [GCJ], [],
3591 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3592 ;;
3593 darwin* | rhapsody*)
3594 # PIC is the default on this platform
3595 # Common symbols not allowed in MH_DYLIB files
3596 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3597 ;;
3598 *djgpp*)
3599 # DJGPP does not support shared libraries at all
3600 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3601 ;;
3602 interix[[3-9]]*)
3603 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3604 # Instead, we relocate shared libraries at runtime.
3605 ;;
3606 sysv4*MP*)
3607 if test -d /usr/nec; then
3608 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3609 fi
3610 ;;
3611 hpux*)
3612 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3613 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3614 # sets the default TLS model and affects inlining.
3615 case $host_cpu in
3616 hppa*64*)
3617 ;;
3618 *)
3619 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3620 ;;
3621 esac
3622 ;;
3623 *qnx* | *nto*)
3624 # QNX uses GNU C++, but need to define -shared option too, otherwise
3625 # it will coredump.
3626 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3627 ;;
3628 *)
3629 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3630 ;;
3631 esac
3632 else
3633 case $host_os in
3634 aix[[4-9]]*)
3635 # All AIX code is PIC.
3636 if test "$host_cpu" = ia64; then
3637 # AIX 5 now supports IA64 processor
3638 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3639 else
3640 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3641 fi
3642 ;;
3643 chorus*)
3644 case $cc_basename in
3645 cxch68*)
3646 # Green Hills C++ Compiler
3647 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
3648 ;;
3649 esac
3650 ;;
3651 dgux*)
3652 case $cc_basename in
3653 ec++*)
3654 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3655 ;;
3656 ghcx*)
3657 # Green Hills C++ Compiler
3658 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3659 ;;
3660 *)
3661 ;;
3662 esac
3663 ;;
3664 freebsd* | dragonfly*)
3665 # FreeBSD uses GNU C++
3666 ;;
3667 hpux9* | hpux10* | hpux11*)
3668 case $cc_basename in
3669 CC*)
3670 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3671 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3672 if test "$host_cpu" != ia64; then
3673 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3674 fi
3675 ;;
3676 aCC*)
3677 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3678 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3679 case $host_cpu in
3680 hppa*64*|ia64*)
3681 # +Z the default
3682 ;;
3683 *)
3684 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3685 ;;
3686 esac
3687 ;;
3688 *)
3689 ;;
3690 esac
3691 ;;
3692 interix*)
3693 # This is c89, which is MS Visual C++ (no shared libs)
3694 # Anyone wants to do a port?
3695 ;;
3696 irix5* | irix6* | nonstopux*)
3697 case $cc_basename in
3698 CC*)
3699 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3700 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3701 # CC pic flag -KPIC is the default.
3702 ;;
3703 *)
3704 ;;
3705 esac
3706 ;;
3707 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3708 case $cc_basename in
3709 KCC*)
3710 # KAI C++ Compiler
3711 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3712 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3713 ;;
3714 ecpc* )
3715 # old Intel C++ for x86_64 which still supported -KPIC.
3716 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3717 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3718 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3719 ;;
3720 icpc* )
3721 # Intel C++, used to be incompatible with GCC.
3722 # ICC 10 doesn't accept -KPIC any more.
3723 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3724 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3725 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3726 ;;
3727 pgCC* | pgcpp*)
3728 # Portland Group C++ compiler
3729 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3730 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3731 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3732 ;;
3733 cxx*)
3734 # Compaq C++
3735 # Make sure the PIC flag is empty. It appears that all Alpha
3736 # Linux and Compaq Tru64 Unix objects are PIC.
3737 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3738 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3739 ;;
3740 xlc* | xlC*)
3741 # IBM XL 8.0 on PPC
3742 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3743 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3744 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3745 ;;
3746 *)
3747 case `$CC -V 2>&1 | sed 5q` in
3748 *Sun\ C*)
3749 # Sun C++ 5.9
3750 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3751 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3752 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3753 ;;
3754 esac
3755 ;;
3756 esac
3757 ;;
3758 lynxos*)
3759 ;;
3760 m88k*)
3761 ;;
3762 mvs*)
3763 case $cc_basename in
3764 cxx*)
3765 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3766 ;;
3767 *)
3768 ;;
3769 esac
3770 ;;
3771 netbsd* | netbsdelf*-gnu)
3772 ;;
3773 *qnx* | *nto*)
3774 # QNX uses GNU C++, but need to define -shared option too, otherwise
3775 # it will coredump.
3776 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3777 ;;
3778 osf3* | osf4* | osf5*)
3779 case $cc_basename in
3780 KCC*)
3781 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3782 ;;
3783 RCC*)
3784 # Rational C++ 2.4.1
3785 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3786 ;;
3787 cxx*)
3788 # Digital/Compaq C++
3789 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3790 # Make sure the PIC flag is empty. It appears that all Alpha
3791 # Linux and Compaq Tru64 Unix objects are PIC.
3792 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3793 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3794 ;;
3795 *)
3796 ;;
3797 esac
3798 ;;
3799 psos*)
3800 ;;
3801 solaris*)
3802 case $cc_basename in
3803 CC*)
3804 # Sun C++ 4.2, 5.x and Centerline C++
3805 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3806 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3807 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3808 ;;
3809 gcx*)
3810 # Green Hills C++ Compiler
3811 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3812 ;;
3813 *)
3814 ;;
3815 esac
3816 ;;
3817 sunos4*)
3818 case $cc_basename in
3819 CC*)
3820 # Sun C++ 4.x
3821 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3822 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3823 ;;
3824 lcc*)
3825 # Lucid
3826 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3827 ;;
3828 *)
3829 ;;
3830 esac
3831 ;;
3832 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3833 case $cc_basename in
3834 CC*)
3835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3838 ;;
3839 esac
3840 ;;
3841 tandem*)
3842 case $cc_basename in
3843 NCC*)
3844 # NonStop-UX NCC 3.20
3845 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3846 ;;
3847 *)
3848 ;;
3849 esac
3850 ;;
3851 vxworks*)
3852 ;;
3853 *)
3854 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3855 ;;
3856 esac
3857 fi
3858 ],
3859 [
3860 if test "$GCC" = yes; then
3861 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3862 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3863
3864 case $host_os in
3865 aix*)
3866 # All AIX code is PIC.
3867 if test "$host_cpu" = ia64; then
3868 # AIX 5 now supports IA64 processor
3869 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3870 fi
3871 ;;
3872
3873 amigaos*)
3874 case $host_cpu in
3875 powerpc)
3876 # see comment about AmigaOS4 .so support
3877 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3878 ;;
3879 m68k)
3880 # FIXME: we need at least 68020 code to build shared libraries, but
3881 # adding the `-m68020' flag to GCC prevents building anything better,
3882 # like `-m68040'.
3883 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3884 ;;
3885 esac
3886 ;;
3887
3888 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3889 # PIC is the default for these OSes.
3890 ;;
3891
3892 mingw* | cygwin* | pw32* | os2* | cegcc*)
3893 # This hack is so that the source file can tell whether it is being
3894 # built for inclusion in a dll (and should export symbols for example).
3895 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3896 # (--disable-auto-import) libraries
3897 m4_if([$1], [GCJ], [],
3898 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3899 ;;
3900
3901 darwin* | rhapsody*)
3902 # PIC is the default on this platform
3903 # Common symbols not allowed in MH_DYLIB files
3904 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3905 ;;
3906
3907 hpux*)
3908 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3909 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3910 # sets the default TLS model and affects inlining.
3911 case $host_cpu in
3912 hppa*64*)
3913 # +Z the default
3914 ;;
3915 *)
3916 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3917 ;;
3918 esac
3919 ;;
3920
3921 interix[[3-9]]*)
3922 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3923 # Instead, we relocate shared libraries at runtime.
3924 ;;
3925
3926 msdosdjgpp*)
3927 # Just because we use GCC doesn't mean we suddenly get shared libraries
3928 # on systems that don't support them.
3929 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3930 enable_shared=no
3931 ;;
3932
3933 *nto* | *qnx*)
3934 # QNX uses GNU C++, but need to define -shared option too, otherwise
3935 # it will coredump.
3936 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3937 ;;
3938
3939 sysv4*MP*)
3940 if test -d /usr/nec; then
3941 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3942 fi
3943 ;;
3944
3945 *)
3946 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3947 ;;
3948 esac
3949 else
3950 # PORTME Check for flag to pass linker flags through the system compiler.
3951 case $host_os in
3952 aix*)
3953 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3954 if test "$host_cpu" = ia64; then
3955 # AIX 5 now supports IA64 processor
3956 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3957 else
3958 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3959 fi
3960 ;;
3961
3962 mingw* | cygwin* | pw32* | os2* | cegcc*)
3963 # This hack is so that the source file can tell whether it is being
3964 # built for inclusion in a dll (and should export symbols for example).
3965 m4_if([$1], [GCJ], [],
3966 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3967 ;;
3968
3969 hpux9* | hpux10* | hpux11*)
3970 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3971 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3972 # not for PA HP-UX.
3973 case $host_cpu in
3974 hppa*64*|ia64*)
3975 # +Z the default
3976 ;;
3977 *)
3978 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3979 ;;
3980 esac
3981 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3982 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3983 ;;
3984
3985 irix5* | irix6* | nonstopux*)
3986 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3987 # PIC (with -KPIC) is the default.
3988 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3989 ;;
3990
3991 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3992 case $cc_basename in
3993 # old Intel for x86_64 which still supported -KPIC.
3994 ecc*)
3995 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3996 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3997 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3998 ;;
3999 # icc used to be incompatible with GCC.
4000 # ICC 10 doesn't accept -KPIC any more.
4001 icc* | ifort*)
4002 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4003 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4004 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4005 ;;
4006 # Lahey Fortran 8.1.
4007 lf95*)
4008 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4009 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4010 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4011 ;;
4012 pgcc* | pgf77* | pgf90* | pgf95*)
4013 # Portland Group compilers (*not* the Pentium gcc compiler,
4014 # which looks to be a dead project)
4015 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4016 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4017 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4018 ;;
4019 ccc*)
4020 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4021 # All Alpha code is PIC.
4022 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4023 ;;
4024 xl*)
4025 # IBM XL C 8.0/Fortran 10.1 on PPC
4026 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4027 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4028 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4029 ;;
4030 *)
4031 case `$CC -V 2>&1 | sed 5q` in
4032 *Sun\ C*)
4033 # Sun C 5.9
4034 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4035 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4036 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4037 ;;
4038 *Sun\ F*)
4039 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4040 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4041 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4042 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4043 ;;
4044 esac
4045 ;;
4046 esac
4047 ;;
4048
4049 newsos6)
4050 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4051 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4052 ;;
4053
4054 *nto* | *qnx*)
4055 # QNX uses GNU C++, but need to define -shared option too, otherwise
4056 # it will coredump.
4057 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4058 ;;
4059
4060 osf3* | osf4* | osf5*)
4061 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4062 # All OSF/1 code is PIC.
4063 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4064 ;;
4065
4066 rdos*)
4067 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4068 ;;
4069
4070 solaris*)
4071 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4072 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4073 case $cc_basename in
4074 f77* | f90* | f95*)
4075 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4076 *)
4077 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4078 esac
4079 ;;
4080
4081 sunos4*)
4082 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4083 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4084 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4085 ;;
4086
4087 sysv4 | sysv4.2uw2* | sysv4.3*)
4088 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4089 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4090 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4091 ;;
4092
4093 sysv4*MP*)
4094 if test -d /usr/nec ;then
4095 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4096 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4097 fi
4098 ;;
4099
4100 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4101 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4102 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4103 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4104 ;;
4105
4106 unicos*)
4107 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4108 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4109 ;;
4110
4111 uts4*)
4112 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4113 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4114 ;;
4115
4116 *)
4117 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4118 ;;
4119 esac
4120 fi
4121 ])
4122 case $host_os in
4123 # For platforms which do not support PIC, -DPIC is meaningless:
4124 *djgpp*)
4125 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4126 ;;
4127 *)
4128 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4129 ;;
4130 esac
4131 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4132 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4133 [How to pass a linker flag through the compiler])
4134
4135 #
4136 # Check to make sure the PIC flag actually works.
4137 #
4138 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4139 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4140 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4141 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4142 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4143 "" | " "*) ;;
4144 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4145 esac],
4146 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4147 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4148 fi
4149 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4150 [Additional compiler flags for building library objects])
4151
4152 #
4153 # Check to make sure the static flag actually works.
4154 #
4155 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4156 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4157 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4158 $lt_tmp_static_flag,
4159 [],
4160 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4161 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4162 [Compiler flag to prevent dynamic linking])
4163 ])# _LT_COMPILER_PIC
4164
4165
4166 # _LT_LINKER_SHLIBS([TAGNAME])
4167 # ----------------------------
4168 # See if the linker supports building shared libraries.
4169 m4_defun([_LT_LINKER_SHLIBS],
4170 [AC_REQUIRE([LT_PATH_LD])dnl
4171 AC_REQUIRE([LT_PATH_NM])dnl
4172 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4173 m4_require([_LT_DECL_EGREP])dnl
4174 m4_require([_LT_DECL_SED])dnl
4175 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4176 m4_require([_LT_TAG_COMPILER])dnl
4177 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4178 m4_if([$1], [CXX], [
4179 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4180 case $host_os in
4181 aix[[4-9]]*)
4182 # If we're using GNU nm, then we don't want the "-C" option.
4183 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4184 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4185 _LT_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'
4186 else
4187 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4188 fi
4189 ;;
4190 pw32*)
4191 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4192 ;;
4193 cygwin* | mingw* | cegcc*)
4194 _LT_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'
4195 ;;
4196 linux* | k*bsd*-gnu)
4197 _LT_TAGVAR(link_all_deplibs, $1)=no
4198 ;;
4199 *)
4200 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4201 ;;
4202 esac
4203 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4204 ], [
4205 runpath_var=
4206 _LT_TAGVAR(allow_undefined_flag, $1)=
4207 _LT_TAGVAR(always_export_symbols, $1)=no
4208 _LT_TAGVAR(archive_cmds, $1)=
4209 _LT_TAGVAR(archive_expsym_cmds, $1)=
4210 _LT_TAGVAR(compiler_needs_object, $1)=no
4211 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4212 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4213 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4214 _LT_TAGVAR(hardcode_automatic, $1)=no
4215 _LT_TAGVAR(hardcode_direct, $1)=no
4216 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4217 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4218 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4219 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4220 _LT_TAGVAR(hardcode_minus_L, $1)=no
4221 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4222 _LT_TAGVAR(inherit_rpath, $1)=no
4223 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4224 _LT_TAGVAR(module_cmds, $1)=
4225 _LT_TAGVAR(module_expsym_cmds, $1)=
4226 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4227 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4228 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4229 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4230 # include_expsyms should be a list of space-separated symbols to be *always*
4231 # included in the symbol list
4232 _LT_TAGVAR(include_expsyms, $1)=
4233 # exclude_expsyms can be an extended regexp of symbols to exclude
4234 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4235 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4236 # as well as any symbol that contains `d'.
4237 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4238 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4239 # platforms (ab)use it in PIC code, but their linkers get confused if
4240 # the symbol is explicitly referenced. Since portable code cannot
4241 # rely on this symbol name, it's probably fine to never include it in
4242 # preloaded symbol tables.
4243 # Exclude shared library initialization/finalization symbols.
4244 dnl Note also adjust exclude_expsyms for C++ above.
4245 extract_expsyms_cmds=
4246
4247 case $host_os in
4248 cygwin* | mingw* | pw32* | cegcc*)
4249 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4250 # When not using gcc, we currently assume that we are using
4251 # Microsoft Visual C++.
4252 if test "$GCC" != yes; then
4253 with_gnu_ld=no
4254 fi
4255 ;;
4256 interix*)
4257 # we just hope/assume this is gcc and not c89 (= MSVC++)
4258 with_gnu_ld=yes
4259 ;;
4260 openbsd*)
4261 with_gnu_ld=no
4262 ;;
4263 linux* | k*bsd*-gnu)
4264 _LT_TAGVAR(link_all_deplibs, $1)=no
4265 ;;
4266 esac
4267
4268 _LT_TAGVAR(ld_shlibs, $1)=yes
4269 if test "$with_gnu_ld" = yes; then
4270 # If archive_cmds runs LD, not CC, wlarc should be empty
4271 wlarc='${wl}'
4272
4273 # Set some defaults for GNU ld with shared library support. These
4274 # are reset later if shared libraries are not supported. Putting them
4275 # here allows them to be overridden if necessary.
4276 runpath_var=LD_RUN_PATH
4277 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4278 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4279 # ancient GNU ld didn't support --whole-archive et. al.
4280 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4281 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4282 else
4283 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4284 fi
4285 supports_anon_versioning=no
4286 case `$LD -v 2>&1` in
4287 *GNU\ gold*) supports_anon_versioning=yes ;;
4288 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4289 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4290 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4291 *\ 2.11.*) ;; # other 2.11 versions
4292 *) supports_anon_versioning=yes ;;
4293 esac
4294
4295 # See if GNU ld supports shared libraries.
4296 case $host_os in
4297 aix[[3-9]]*)
4298 # On AIX/PPC, the GNU linker is very broken
4299 if test "$host_cpu" != ia64; then
4300 _LT_TAGVAR(ld_shlibs, $1)=no
4301 cat <<_LT_EOF 1>&2
4302
4303 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4304 *** to be unable to reliably create shared libraries on AIX.
4305 *** Therefore, libtool is disabling shared libraries support. If you
4306 *** really care for shared libraries, you may want to modify your PATH
4307 *** so that a non-GNU linker is found, and then restart.
4308
4309 _LT_EOF
4310 fi
4311 ;;
4312
4313 amigaos*)
4314 case $host_cpu in
4315 powerpc)
4316 # see comment about AmigaOS4 .so support
4317 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4318 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4319 ;;
4320 m68k)
4321 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4322 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4323 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4324 ;;
4325 esac
4326 ;;
4327
4328 beos*)
4329 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4330 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4331 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4332 # support --undefined. This deserves some investigation. FIXME
4333 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4334 else
4335 _LT_TAGVAR(ld_shlibs, $1)=no
4336 fi
4337 ;;
4338
4339 cygwin* | mingw* | pw32* | cegcc*)
4340 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4341 # as there is no search path for DLLs.
4342 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4343 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4344 _LT_TAGVAR(always_export_symbols, $1)=no
4345 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4346 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
4347
4348 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4349 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4350 # If the export-symbols file already is a .def file (1st line
4351 # is EXPORTS), use it as is; otherwise, prepend...
4352 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4353 cp $export_symbols $output_objdir/$soname.def;
4354 else
4355 echo EXPORTS > $output_objdir/$soname.def;
4356 cat $export_symbols >> $output_objdir/$soname.def;
4357 fi~
4358 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4359 else
4360 _LT_TAGVAR(ld_shlibs, $1)=no
4361 fi
4362 ;;
4363
4364 interix[[3-9]]*)
4365 _LT_TAGVAR(hardcode_direct, $1)=no
4366 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4367 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4368 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4369 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4370 # Instead, shared libraries are loaded at an image base (0x10000000 by
4371 # default) and relocated if they conflict, which is a slow very memory
4372 # consuming and fragmenting process. To avoid this, we pick a random,
4373 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4374 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4375 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4376 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4377 ;;
4378
4379 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4380 tmp_diet=no
4381 if test "$host_os" = linux-dietlibc; then
4382 case $cc_basename in
4383 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4384 esac
4385 fi
4386 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4387 && test "$tmp_diet" = no
4388 then
4389 tmp_addflag=
4390 tmp_sharedflag='-shared'
4391 case $cc_basename,$host_cpu in
4392 pgcc*) # Portland Group C compiler
4393 _LT_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'
4394 tmp_addflag=' $pic_flag'
4395 ;;
4396 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4397 _LT_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'
4398 tmp_addflag=' $pic_flag -Mnomain' ;;
4399 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4400 tmp_addflag=' -i_dynamic' ;;
4401 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4402 tmp_addflag=' -i_dynamic -nofor_main' ;;
4403 ifc* | ifort*) # Intel Fortran compiler
4404 tmp_addflag=' -nofor_main' ;;
4405 lf95*) # Lahey Fortran 8.1
4406 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4407 tmp_sharedflag='--shared' ;;
4408 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4409 tmp_sharedflag='-qmkshrobj'
4410 tmp_addflag= ;;
4411 esac
4412 case `$CC -V 2>&1 | sed 5q` in
4413 *Sun\ C*) # Sun C 5.9
4414 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4415 _LT_TAGVAR(compiler_needs_object, $1)=yes
4416 tmp_sharedflag='-G' ;;
4417 *Sun\ F*) # Sun Fortran 8.3
4418 tmp_sharedflag='-G' ;;
4419 esac
4420 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4421
4422 if test "x$supports_anon_versioning" = xyes; then
4423 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4424 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4425 echo "local: *; };" >> $output_objdir/$libname.ver~
4426 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4427 fi
4428
4429 case $cc_basename in
4430 xlf*)
4431 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4432 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4433 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4434 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4435 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4436 if test "x$supports_anon_versioning" = xyes; then
4437 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4438 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4439 echo "local: *; };" >> $output_objdir/$libname.ver~
4440 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4441 fi
4442 ;;
4443 esac
4444 else
4445 _LT_TAGVAR(ld_shlibs, $1)=no
4446 fi
4447 ;;
4448
4449 netbsd* | netbsdelf*-gnu)
4450 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4451 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4452 wlarc=
4453 else
4454 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4455 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4456 fi
4457 ;;
4458
4459 solaris*)
4460 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4461 _LT_TAGVAR(ld_shlibs, $1)=no
4462 cat <<_LT_EOF 1>&2
4463
4464 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4465 *** create shared libraries on Solaris systems. Therefore, libtool
4466 *** is disabling shared libraries support. We urge you to upgrade GNU
4467 *** binutils to release 2.9.1 or newer. Another option is to modify
4468 *** your PATH or compiler configuration so that the native linker is
4469 *** used, and then restart.
4470
4471 _LT_EOF
4472 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4473 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4474 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4475 else
4476 _LT_TAGVAR(ld_shlibs, $1)=no
4477 fi
4478 ;;
4479
4480 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4481 case `$LD -v 2>&1` in
4482 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4483 _LT_TAGVAR(ld_shlibs, $1)=no
4484 cat <<_LT_EOF 1>&2
4485
4486 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4487 *** reliably create shared libraries on SCO systems. Therefore, libtool
4488 *** is disabling shared libraries support. We urge you to upgrade GNU
4489 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4490 *** your PATH or compiler configuration so that the native linker is
4491 *** used, and then restart.
4492
4493 _LT_EOF
4494 ;;
4495 *)
4496 # For security reasons, it is highly recommended that you always
4497 # use absolute paths for naming shared libraries, and exclude the
4498 # DT_RUNPATH tag from executables and libraries. But doing so
4499 # requires that you compile everything twice, which is a pain.
4500 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4501 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4502 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4503 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4504 else
4505 _LT_TAGVAR(ld_shlibs, $1)=no
4506 fi
4507 ;;
4508 esac
4509 ;;
4510
4511 sunos4*)
4512 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4513 wlarc=
4514 _LT_TAGVAR(hardcode_direct, $1)=yes
4515 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4516 ;;
4517
4518 *)
4519 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4520 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4521 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4522 else
4523 _LT_TAGVAR(ld_shlibs, $1)=no
4524 fi
4525 ;;
4526 esac
4527
4528 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4529 runpath_var=
4530 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4531 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4532 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4533 fi
4534 else
4535 # PORTME fill in a description of your system's linker (not GNU ld)
4536 case $host_os in
4537 aix3*)
4538 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4539 _LT_TAGVAR(always_export_symbols, $1)=yes
4540 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
4541 # Note: this linker hardcodes the directories in LIBPATH if there
4542 # are no directories specified by -L.
4543 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4544 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4545 # Neither direct hardcoding nor static linking is supported with a
4546 # broken collect2.
4547 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4548 fi
4549 ;;
4550
4551 aix[[4-9]]*)
4552 if test "$host_cpu" = ia64; then
4553 # On IA64, the linker does run time linking by default, so we don't
4554 # have to do anything special.
4555 aix_use_runtimelinking=no
4556 exp_sym_flag='-Bexport'
4557 no_entry_flag=""
4558 else
4559 # If we're using GNU nm, then we don't want the "-C" option.
4560 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4561 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4562 _LT_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'
4563 else
4564 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4565 fi
4566 aix_use_runtimelinking=no
4567
4568 # Test if we are trying to use run time linking or normal
4569 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4570 # need to do runtime linking.
4571 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4572 for ld_flag in $LDFLAGS; do
4573 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4574 aix_use_runtimelinking=yes
4575 break
4576 fi
4577 done
4578 ;;
4579 esac
4580
4581 exp_sym_flag='-bexport'
4582 no_entry_flag='-bnoentry'
4583 fi
4584
4585 # When large executables or shared objects are built, AIX ld can
4586 # have problems creating the table of contents. If linking a library
4587 # or program results in "error TOC overflow" add -mminimal-toc to
4588 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4589 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4590
4591 _LT_TAGVAR(archive_cmds, $1)=''
4592 _LT_TAGVAR(hardcode_direct, $1)=yes
4593 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4594 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4595 _LT_TAGVAR(link_all_deplibs, $1)=yes
4596 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4597
4598 if test "$GCC" = yes; then
4599 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4600 # We only want to do this on AIX 4.2 and lower, the check
4601 # below for broken collect2 doesn't work under 4.3+
4602 collect2name=`${CC} -print-prog-name=collect2`
4603 if test -f "$collect2name" &&
4604 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4605 then
4606 # We have reworked collect2
4607 :
4608 else
4609 # We have old collect2
4610 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4611 # It fails to find uninstalled libraries when the uninstalled
4612 # path is not listed in the libpath. Setting hardcode_minus_L
4613 # to unsupported forces relinking
4614 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4615 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4616 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4617 fi
4618 ;;
4619 esac
4620 shared_flag='-shared'
4621 if test "$aix_use_runtimelinking" = yes; then
4622 shared_flag="$shared_flag "'${wl}-G'
4623 fi
4624 _LT_TAGVAR(link_all_deplibs, $1)=no
4625 else
4626 # not using gcc
4627 if test "$host_cpu" = ia64; then
4628 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4629 # chokes on -Wl,-G. The following line is correct:
4630 shared_flag='-G'
4631 else
4632 if test "$aix_use_runtimelinking" = yes; then
4633 shared_flag='${wl}-G'
4634 else
4635 shared_flag='${wl}-bM:SRE'
4636 fi
4637 fi
4638 fi
4639
4640 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4641 # It seems that -bexpall does not export symbols beginning with
4642 # underscore (_), so it is better to generate a list of symbols to export.
4643 _LT_TAGVAR(always_export_symbols, $1)=yes
4644 if test "$aix_use_runtimelinking" = yes; then
4645 # Warning - without using the other runtime loading flags (-brtl),
4646 # -berok will link without error, but may produce a broken library.
4647 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4648 # Determine the default libpath from the value encoded in an
4649 # empty executable.
4650 _LT_SYS_MODULE_PATH_AIX
4651 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4652 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4653 else
4654 if test "$host_cpu" = ia64; then
4655 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4656 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4657 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
4658 else
4659 # Determine the default libpath from the value encoded in an
4660 # empty executable.
4661 _LT_SYS_MODULE_PATH_AIX
4662 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4663 # Warning - without using the other run time loading flags,
4664 # -berok will link without error, but may produce a broken library.
4665 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4666 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4667 # Exported symbols can be pulled into shared objects from archives
4668 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4669 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4670 # This is similar to how AIX traditionally builds its shared libraries.
4671 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4672 fi
4673 fi
4674 ;;
4675
4676 amigaos*)
4677 case $host_cpu in
4678 powerpc)
4679 # see comment about AmigaOS4 .so support
4680 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4681 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4682 ;;
4683 m68k)
4684 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4685 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4686 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4687 ;;
4688 esac
4689 ;;
4690
4691 bsdi[[45]]*)
4692 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4693 ;;
4694
4695 cygwin* | mingw* | pw32* | cegcc*)
4696 # When not using gcc, we currently assume that we are using
4697 # Microsoft Visual C++.
4698 # hardcode_libdir_flag_spec is actually meaningless, as there is
4699 # no search path for DLLs.
4700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4701 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4702 # Tell ltmain to make .lib files, not .a files.
4703 libext=lib
4704 # Tell ltmain to make .dll files, not .so files.
4705 shrext_cmds=".dll"
4706 # FIXME: Setting linknames here is a bad hack.
4707 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4708 # The linker will automatically build a .lib file if we build a DLL.
4709 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4710 # FIXME: Should let the user specify the lib program.
4711 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4712 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4713 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4714 ;;
4715
4716 darwin* | rhapsody*)
4717 _LT_DARWIN_LINKER_FEATURES($1)
4718 ;;
4719
4720 dgux*)
4721 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4722 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4723 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4724 ;;
4725
4726 freebsd1*)
4727 _LT_TAGVAR(ld_shlibs, $1)=no
4728 ;;
4729
4730 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4731 # support. Future versions do this automatically, but an explicit c++rt0.o
4732 # does not break anything, and helps significantly (at the cost of a little
4733 # extra space).
4734 freebsd2.2*)
4735 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4736 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4737 _LT_TAGVAR(hardcode_direct, $1)=yes
4738 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4739 ;;
4740
4741 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4742 freebsd2*)
4743 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4744 _LT_TAGVAR(hardcode_direct, $1)=yes
4745 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4746 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4747 ;;
4748
4749 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4750 freebsd* | dragonfly*)
4751 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4752 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4753 _LT_TAGVAR(hardcode_direct, $1)=yes
4754 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4755 ;;
4756
4757 hpux9*)
4758 if test "$GCC" = yes; then
4759 _LT_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'
4760 else
4761 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4762 fi
4763 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4764 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4765 _LT_TAGVAR(hardcode_direct, $1)=yes
4766
4767 # hardcode_minus_L: Not really in the search PATH,
4768 # but as the default location of the library.
4769 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4770 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4771 ;;
4772
4773 hpux10*)
4774 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4775 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4776 else
4777 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4778 fi
4779 if test "$with_gnu_ld" = no; then
4780 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4781 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4782 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4783 _LT_TAGVAR(hardcode_direct, $1)=yes
4784 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4785 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4786 # hardcode_minus_L: Not really in the search PATH,
4787 # but as the default location of the library.
4788 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4789 fi
4790 ;;
4791
4792 hpux11*)
4793 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4794 case $host_cpu in
4795 hppa*64*)
4796 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4797 ;;
4798 ia64*)
4799 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4800 ;;
4801 *)
4802 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4803 ;;
4804 esac
4805 else
4806 case $host_cpu in
4807 hppa*64*)
4808 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4809 ;;
4810 ia64*)
4811 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4812 ;;
4813 *)
4814 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4815 ;;
4816 esac
4817 fi
4818 if test "$with_gnu_ld" = no; then
4819 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4820 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4821
4822 case $host_cpu in
4823 hppa*64*|ia64*)
4824 _LT_TAGVAR(hardcode_direct, $1)=no
4825 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4826 ;;
4827 *)
4828 _LT_TAGVAR(hardcode_direct, $1)=yes
4829 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4830 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4831
4832 # hardcode_minus_L: Not really in the search PATH,
4833 # but as the default location of the library.
4834 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4835 ;;
4836 esac
4837 fi
4838 ;;
4839
4840 irix5* | irix6* | nonstopux*)
4841 if test "$GCC" = yes; then
4842 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4843 # Try to use the -exported_symbol ld option, if it does not
4844 # work, assume that -exports_file does not work either and
4845 # implicitly export all symbols.
4846 save_LDFLAGS="$LDFLAGS"
4847 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4848 AC_LINK_IFELSE(int foo(void) {},
4849 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4850 )
4851 LDFLAGS="$save_LDFLAGS"
4852 else
4853 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4854 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
4855 fi
4856 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4858 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4859 _LT_TAGVAR(inherit_rpath, $1)=yes
4860 _LT_TAGVAR(link_all_deplibs, $1)=yes
4861 ;;
4862
4863 netbsd* | netbsdelf*-gnu)
4864 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4865 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4866 else
4867 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4868 fi
4869 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4870 _LT_TAGVAR(hardcode_direct, $1)=yes
4871 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4872 ;;
4873
4874 newsos6)
4875 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4876 _LT_TAGVAR(hardcode_direct, $1)=yes
4877 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4878 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4879 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4880 ;;
4881
4882 *nto* | *qnx*)
4883 ;;
4884
4885 openbsd*)
4886 if test -f /usr/libexec/ld.so; then
4887 _LT_TAGVAR(hardcode_direct, $1)=yes
4888 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4889 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4890 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4891 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4892 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4893 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4894 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4895 else
4896 case $host_os in
4897 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4898 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4899 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4900 ;;
4901 *)
4902 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4903 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4904 ;;
4905 esac
4906 fi
4907 else
4908 _LT_TAGVAR(ld_shlibs, $1)=no
4909 fi
4910 ;;
4911
4912 os2*)
4913 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4914 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4915 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4916 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
4917 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4918 ;;
4919
4920 osf3*)
4921 if test "$GCC" = yes; then
4922 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4923 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4924 else
4925 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4926 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4927 fi
4928 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4929 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4930 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4931 ;;
4932
4933 osf4* | osf5*) # as osf3* with the addition of -msym flag
4934 if test "$GCC" = yes; then
4935 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4936 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4937 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4938 else
4939 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4940 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4941 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
4942 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
4943
4944 # Both c and cxx compiler support -rpath directly
4945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4946 fi
4947 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4948 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4949 ;;
4950
4951 solaris*)
4952 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4953 if test "$GCC" = yes; then
4954 wlarc='${wl}'
4955 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4956 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4957 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4958 else
4959 case `$CC -V 2>&1` in
4960 *"Compilers 5.0"*)
4961 wlarc=''
4962 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4963 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4964 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4965 ;;
4966 *)
4967 wlarc='${wl}'
4968 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4969 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4970 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4971 ;;
4972 esac
4973 fi
4974 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4975 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4976 case $host_os in
4977 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4978 *)
4979 # The compiler driver will combine and reorder linker options,
4980 # but understands `-z linker_flag'. GCC discards it without `$wl',
4981 # but is careful enough not to reorder.
4982 # Supported since Solaris 2.6 (maybe 2.5.1?)
4983 if test "$GCC" = yes; then
4984 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4985 else
4986 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4987 fi
4988 ;;
4989 esac
4990 _LT_TAGVAR(link_all_deplibs, $1)=yes
4991 ;;
4992
4993 sunos4*)
4994 if test "x$host_vendor" = xsequent; then
4995 # Use $CC to link under sequent, because it throws in some extra .o
4996 # files that make .init and .fini sections work.
4997 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4998 else
4999 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5000 fi
5001 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5002 _LT_TAGVAR(hardcode_direct, $1)=yes
5003 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5004 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5005 ;;
5006
5007 sysv4)
5008 case $host_vendor in
5009 sni)
5010 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5011 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5012 ;;
5013 siemens)
5014 ## LD is ld it makes a PLAMLIB
5015 ## CC just makes a GrossModule.
5016 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5017 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5018 _LT_TAGVAR(hardcode_direct, $1)=no
5019 ;;
5020 motorola)
5021 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5022 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5023 ;;
5024 esac
5025 runpath_var='LD_RUN_PATH'
5026 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5027 ;;
5028
5029 sysv4.3*)
5030 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5031 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5032 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5033 ;;
5034
5035 sysv4*MP*)
5036 if test -d /usr/nec; then
5037 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5038 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5039 runpath_var=LD_RUN_PATH
5040 hardcode_runpath_var=yes
5041 _LT_TAGVAR(ld_shlibs, $1)=yes
5042 fi
5043 ;;
5044
5045 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5046 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5047 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5048 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5049 runpath_var='LD_RUN_PATH'
5050
5051 if test "$GCC" = yes; then
5052 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5053 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5054 else
5055 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5056 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5057 fi
5058 ;;
5059
5060 sysv5* | sco3.2v5* | sco5v6*)
5061 # Note: We can NOT use -z defs as we might desire, because we do not
5062 # link with -lc, and that would cause any symbols used from libc to
5063 # always be unresolved, which means just about no library would
5064 # ever link correctly. If we're not using GNU ld we use -z text
5065 # though, which does catch some bad symbols but isn't as heavy-handed
5066 # as -z defs.
5067 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5068 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5069 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5070 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5071 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5072 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5073 _LT_TAGVAR(link_all_deplibs, $1)=yes
5074 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5075 runpath_var='LD_RUN_PATH'
5076
5077 if test "$GCC" = yes; then
5078 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5079 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5080 else
5081 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5082 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5083 fi
5084 ;;
5085
5086 uts4*)
5087 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5089 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5090 ;;
5091
5092 *)
5093 _LT_TAGVAR(ld_shlibs, $1)=no
5094 ;;
5095 esac
5096
5097 if test x$host_vendor = xsni; then
5098 case $host in
5099 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5100 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5101 ;;
5102 esac
5103 fi
5104 fi
5105 ])
5106 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5107 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5108
5109 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5110
5111 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5112 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5113 _LT_DECL([], [extract_expsyms_cmds], [2],
5114 [The commands to extract the exported symbol list from a shared archive])
5115
5116 #
5117 # Do we need to explicitly link libc?
5118 #
5119 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5120 x|xyes)
5121 # Assume -lc should be added
5122 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5123
5124 if test "$enable_shared" = yes && test "$GCC" = yes; then
5125 case $_LT_TAGVAR(archive_cmds, $1) in
5126 *'~'*)
5127 # FIXME: we may have to deal with multi-command sequences.
5128 ;;
5129 '$CC '*)
5130 # Test whether the compiler implicitly links with -lc since on some
5131 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5132 # to ld, don't add -lc before -lgcc.
5133 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5134 $RM conftest*
5135 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5136
5137 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5138 soname=conftest
5139 lib=conftest
5140 libobjs=conftest.$ac_objext
5141 deplibs=
5142 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5143 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5144 compiler_flags=-v
5145 linker_flags=-v
5146 verstring=
5147 output_objdir=.
5148 libname=conftest
5149 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5150 _LT_TAGVAR(allow_undefined_flag, $1)=
5151 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5152 then
5153 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5154 else
5155 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5156 fi
5157 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5158 else
5159 cat conftest.err 1>&5
5160 fi
5161 $RM conftest*
5162 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5163 ;;
5164 esac
5165 fi
5166 ;;
5167 esac
5168
5169 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5170 [Whether or not to add -lc for building shared libraries])
5171 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5172 [enable_shared_with_static_runtimes], [0],
5173 [Whether or not to disallow shared libs when runtime libs are static])
5174 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5175 [Compiler flag to allow reflexive dlopens])
5176 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5177 [Compiler flag to generate shared objects directly from archives])
5178 _LT_TAGDECL([], [compiler_needs_object], [1],
5179 [Whether the compiler copes with passing no objects directly])
5180 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5181 [Create an old-style archive from a shared archive])
5182 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5183 [Create a temporary old-style archive to link instead of a shared archive])
5184 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5185 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5186 _LT_TAGDECL([], [module_cmds], [2],
5187 [Commands used to build a loadable module if different from building
5188 a shared archive.])
5189 _LT_TAGDECL([], [module_expsym_cmds], [2])
5190 _LT_TAGDECL([], [with_gnu_ld], [1],
5191 [Whether we are building with GNU ld or not])
5192 _LT_TAGDECL([], [allow_undefined_flag], [1],
5193 [Flag that allows shared libraries with undefined symbols to be built])
5194 _LT_TAGDECL([], [no_undefined_flag], [1],
5195 [Flag that enforces no undefined symbols])
5196 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5197 [Flag to hardcode $libdir into a binary during linking.
5198 This must work even if $libdir does not exist])
5199 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5200 [[If ld is used when linking, flag to hardcode $libdir into a binary
5201 during linking. This must work even if $libdir does not exist]])
5202 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5203 [Whether we need a single "-rpath" flag with a separated argument])
5204 _LT_TAGDECL([], [hardcode_direct], [0],
5205 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5206 DIR into the resulting binary])
5207 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5208 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5209 DIR into the resulting binary and the resulting library dependency is
5210 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5211 library is relocated])
5212 _LT_TAGDECL([], [hardcode_minus_L], [0],
5213 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5214 into the resulting binary])
5215 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5216 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5217 into the resulting binary])
5218 _LT_TAGDECL([], [hardcode_automatic], [0],
5219 [Set to "yes" if building a shared library automatically hardcodes DIR
5220 into the library and all subsequent libraries and executables linked
5221 against it])
5222 _LT_TAGDECL([], [inherit_rpath], [0],
5223 [Set to yes if linker adds runtime paths of dependent libraries
5224 to runtime path list])
5225 _LT_TAGDECL([], [link_all_deplibs], [0],
5226 [Whether libtool must link a program against all its dependency libraries])
5227 _LT_TAGDECL([], [fix_srcfile_path], [1],
5228 [Fix the shell variable $srcfile for the compiler])
5229 _LT_TAGDECL([], [always_export_symbols], [0],
5230 [Set to "yes" if exported symbols are required])
5231 _LT_TAGDECL([], [export_symbols_cmds], [2],
5232 [The commands to list exported symbols])
5233 _LT_TAGDECL([], [exclude_expsyms], [1],
5234 [Symbols that should not be listed in the preloaded symbols])
5235 _LT_TAGDECL([], [include_expsyms], [1],
5236 [Symbols that must always be exported])
5237 _LT_TAGDECL([], [prelink_cmds], [2],
5238 [Commands necessary for linking programs (against libraries) with templates])
5239 _LT_TAGDECL([], [file_list_spec], [1],
5240 [Specify filename containing input files])
5241 dnl FIXME: Not yet implemented
5242 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5243 dnl [Compiler flag to generate thread safe objects])
5244 ])# _LT_LINKER_SHLIBS
5245
5246
5247 # _LT_LANG_C_CONFIG([TAG])
5248 # ------------------------
5249 # Ensure that the configuration variables for a C compiler are suitably
5250 # defined. These variables are subsequently used by _LT_CONFIG to write
5251 # the compiler configuration to `libtool'.
5252 m4_defun([_LT_LANG_C_CONFIG],
5253 [m4_require([_LT_DECL_EGREP])dnl
5254 lt_save_CC="$CC"
5255 AC_LANG_PUSH(C)
5256
5257 # Source file extension for C test sources.
5258 ac_ext=c
5259
5260 # Object file extension for compiled C test sources.
5261 objext=o
5262 _LT_TAGVAR(objext, $1)=$objext
5263
5264 # Code to be used in simple compile tests
5265 lt_simple_compile_test_code="int some_variable = 0;"
5266
5267 # Code to be used in simple link tests
5268 lt_simple_link_test_code='int main(){return(0);}'
5269
5270 _LT_TAG_COMPILER
5271 # Save the default compiler, since it gets overwritten when the other
5272 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5273 compiler_DEFAULT=$CC
5274
5275 # save warnings/boilerplate of simple test code
5276 _LT_COMPILER_BOILERPLATE
5277 _LT_LINKER_BOILERPLATE
5278
5279 ## CAVEAT EMPTOR:
5280 ## There is no encapsulation within the following macros, do not change
5281 ## the running order or otherwise move them around unless you know exactly
5282 ## what you are doing...
5283 if test -n "$compiler"; then
5284 _LT_COMPILER_NO_RTTI($1)
5285 _LT_COMPILER_PIC($1)
5286 _LT_COMPILER_C_O($1)
5287 _LT_COMPILER_FILE_LOCKS($1)
5288 _LT_LINKER_SHLIBS($1)
5289 _LT_SYS_DYNAMIC_LINKER($1)
5290 _LT_LINKER_HARDCODE_LIBPATH($1)
5291 LT_SYS_DLOPEN_SELF
5292 _LT_CMD_STRIPLIB
5293
5294 # Report which library types will actually be built
5295 AC_MSG_CHECKING([if libtool supports shared libraries])
5296 AC_MSG_RESULT([$can_build_shared])
5297
5298 AC_MSG_CHECKING([whether to build shared libraries])
5299 test "$can_build_shared" = "no" && enable_shared=no
5300
5301 # On AIX, shared libraries and static libraries use the same namespace, and
5302 # are all built from PIC.
5303 case $host_os in
5304 aix3*)
5305 test "$enable_shared" = yes && enable_static=no
5306 if test -n "$RANLIB"; then
5307 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5308 postinstall_cmds='$RANLIB $lib'
5309 fi
5310 ;;
5311
5312 aix[[4-9]]*)
5313 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5314 test "$enable_shared" = yes && enable_static=no
5315 fi
5316 ;;
5317 esac
5318 AC_MSG_RESULT([$enable_shared])
5319
5320 AC_MSG_CHECKING([whether to build static libraries])
5321 # Make sure either enable_shared or enable_static is yes.
5322 test "$enable_shared" = yes || enable_static=yes
5323 AC_MSG_RESULT([$enable_static])
5324
5325 _LT_CONFIG($1)
5326 fi
5327 AC_LANG_POP
5328 CC="$lt_save_CC"
5329 ])# _LT_LANG_C_CONFIG
5330
5331
5332 # _LT_PROG_CXX
5333 # ------------
5334 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5335 # compiler, we have our own version here.
5336 m4_defun([_LT_PROG_CXX],
5337 [
5338 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5339 AC_PROG_CXX
5340 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5341 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5342 (test "X$CXX" != "Xg++"))) ; then
5343 AC_PROG_CXXCPP
5344 else
5345 _lt_caught_CXX_error=yes
5346 fi
5347 popdef([AC_MSG_ERROR])
5348 ])# _LT_PROG_CXX
5349
5350 dnl aclocal-1.4 backwards compatibility:
5351 dnl AC_DEFUN([_LT_PROG_CXX], [])
5352
5353
5354 # _LT_LANG_CXX_CONFIG([TAG])
5355 # --------------------------
5356 # Ensure that the configuration variables for a C++ compiler are suitably
5357 # defined. These variables are subsequently used by _LT_CONFIG to write
5358 # the compiler configuration to `libtool'.
5359 m4_defun([_LT_LANG_CXX_CONFIG],
5360 [AC_REQUIRE([_LT_PROG_CXX])dnl
5361 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5362 m4_require([_LT_DECL_EGREP])dnl
5363
5364 AC_LANG_PUSH(C++)
5365 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5366 _LT_TAGVAR(allow_undefined_flag, $1)=
5367 _LT_TAGVAR(always_export_symbols, $1)=no
5368 _LT_TAGVAR(archive_expsym_cmds, $1)=
5369 _LT_TAGVAR(compiler_needs_object, $1)=no
5370 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5371 _LT_TAGVAR(hardcode_direct, $1)=no
5372 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5373 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5374 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5375 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5376 _LT_TAGVAR(hardcode_minus_L, $1)=no
5377 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5378 _LT_TAGVAR(hardcode_automatic, $1)=no
5379 _LT_TAGVAR(inherit_rpath, $1)=no
5380 _LT_TAGVAR(module_cmds, $1)=
5381 _LT_TAGVAR(module_expsym_cmds, $1)=
5382 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5383 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5384 _LT_TAGVAR(no_undefined_flag, $1)=
5385 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5386 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5387
5388 # Source file extension for C++ test sources.
5389 ac_ext=cpp
5390
5391 # Object file extension for compiled C++ test sources.
5392 objext=o
5393 _LT_TAGVAR(objext, $1)=$objext
5394
5395 # No sense in running all these tests if we already determined that
5396 # the CXX compiler isn't working. Some variables (like enable_shared)
5397 # are currently assumed to apply to all compilers on this platform,
5398 # and will be corrupted by setting them based on a non-working compiler.
5399 if test "$_lt_caught_CXX_error" != yes; then
5400 # Code to be used in simple compile tests
5401 lt_simple_compile_test_code="int some_variable = 0;"
5402
5403 # Code to be used in simple link tests
5404 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5405
5406 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5407 _LT_TAG_COMPILER
5408
5409 # save warnings/boilerplate of simple test code
5410 _LT_COMPILER_BOILERPLATE
5411 _LT_LINKER_BOILERPLATE
5412
5413 # Allow CC to be a program name with arguments.
5414 lt_save_CC=$CC
5415 lt_save_LD=$LD
5416 lt_save_GCC=$GCC
5417 GCC=$GXX
5418 lt_save_with_gnu_ld=$with_gnu_ld
5419 lt_save_path_LD=$lt_cv_path_LD
5420 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5421 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5422 else
5423 $as_unset lt_cv_prog_gnu_ld
5424 fi
5425 if test -n "${lt_cv_path_LDCXX+set}"; then
5426 lt_cv_path_LD=$lt_cv_path_LDCXX
5427 else
5428 $as_unset lt_cv_path_LD
5429 fi
5430 test -z "${LDCXX+set}" || LD=$LDCXX
5431 CC=${CXX-"c++"}
5432 compiler=$CC
5433 _LT_TAGVAR(compiler, $1)=$CC
5434 _LT_CC_BASENAME([$compiler])
5435
5436 if test -n "$compiler"; then
5437 # We don't want -fno-exception when compiling C++ code, so set the
5438 # no_builtin_flag separately
5439 if test "$GXX" = yes; then
5440 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5441 else
5442 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5443 fi
5444
5445 if test "$GXX" = yes; then
5446 # Set up default GNU C++ configuration
5447
5448 LT_PATH_LD
5449
5450 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5451 # archiving commands below assume that GNU ld is being used.
5452 if test "$with_gnu_ld" = yes; then
5453 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5454 _LT_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'
5455
5456 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5457 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5458
5459 # If archive_cmds runs LD, not CC, wlarc should be empty
5460 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5461 # investigate it a little bit more. (MM)
5462 wlarc='${wl}'
5463
5464 # ancient GNU ld didn't support --whole-archive et. al.
5465 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5466 $GREP 'no-whole-archive' > /dev/null; then
5467 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5468 else
5469 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5470 fi
5471 else
5472 with_gnu_ld=no
5473 wlarc=
5474
5475 # A generic and very simple default shared library creation
5476 # command for GNU C++ for the case where it uses the native
5477 # linker, instead of GNU ld. If possible, this setting should
5478 # overridden to take advantage of the native linker features on
5479 # the platform it is being used on.
5480 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5481 fi
5482
5483 # Commands to make compiler produce verbose output that lists
5484 # what "hidden" libraries, object files and flags are used when
5485 # linking a shared library.
5486 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5487
5488 else
5489 GXX=no
5490 with_gnu_ld=no
5491 wlarc=
5492 fi
5493
5494 # PORTME: fill in a description of your system's C++ link characteristics
5495 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5496 _LT_TAGVAR(ld_shlibs, $1)=yes
5497 case $host_os in
5498 aix3*)
5499 # FIXME: insert proper C++ library support
5500 _LT_TAGVAR(ld_shlibs, $1)=no
5501 ;;
5502 aix[[4-9]]*)
5503 if test "$host_cpu" = ia64; then
5504 # On IA64, the linker does run time linking by default, so we don't
5505 # have to do anything special.
5506 aix_use_runtimelinking=no
5507 exp_sym_flag='-Bexport'
5508 no_entry_flag=""
5509 else
5510 aix_use_runtimelinking=no
5511
5512 # Test if we are trying to use run time linking or normal
5513 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5514 # need to do runtime linking.
5515 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5516 for ld_flag in $LDFLAGS; do
5517 case $ld_flag in
5518 *-brtl*)
5519 aix_use_runtimelinking=yes
5520 break
5521 ;;
5522 esac
5523 done
5524 ;;
5525 esac
5526
5527 exp_sym_flag='-bexport'
5528 no_entry_flag='-bnoentry'
5529 fi
5530
5531 # When large executables or shared objects are built, AIX ld can
5532 # have problems creating the table of contents. If linking a library
5533 # or program results in "error TOC overflow" add -mminimal-toc to
5534 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5535 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5536
5537 _LT_TAGVAR(archive_cmds, $1)=''
5538 _LT_TAGVAR(hardcode_direct, $1)=yes
5539 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5540 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5541 _LT_TAGVAR(link_all_deplibs, $1)=yes
5542 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5543
5544 if test "$GXX" = yes; then
5545 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5546 # We only want to do this on AIX 4.2 and lower, the check
5547 # below for broken collect2 doesn't work under 4.3+
5548 collect2name=`${CC} -print-prog-name=collect2`
5549 if test -f "$collect2name" &&
5550 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5551 then
5552 # We have reworked collect2
5553 :
5554 else
5555 # We have old collect2
5556 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5557 # It fails to find uninstalled libraries when the uninstalled
5558 # path is not listed in the libpath. Setting hardcode_minus_L
5559 # to unsupported forces relinking
5560 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5561 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5562 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5563 fi
5564 esac
5565 shared_flag='-shared'
5566 if test "$aix_use_runtimelinking" = yes; then
5567 shared_flag="$shared_flag "'${wl}-G'
5568 fi
5569 else
5570 # not using gcc
5571 if test "$host_cpu" = ia64; then
5572 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5573 # chokes on -Wl,-G. The following line is correct:
5574 shared_flag='-G'
5575 else
5576 if test "$aix_use_runtimelinking" = yes; then
5577 shared_flag='${wl}-G'
5578 else
5579 shared_flag='${wl}-bM:SRE'
5580 fi
5581 fi
5582 fi
5583
5584 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5585 # It seems that -bexpall does not export symbols beginning with
5586 # underscore (_), so it is better to generate a list of symbols to
5587 # export.
5588 _LT_TAGVAR(always_export_symbols, $1)=yes
5589 if test "$aix_use_runtimelinking" = yes; then
5590 # Warning - without using the other runtime loading flags (-brtl),
5591 # -berok will link without error, but may produce a broken library.
5592 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5593 # Determine the default libpath from the value encoded in an empty
5594 # executable.
5595 _LT_SYS_MODULE_PATH_AIX
5596 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5597
5598 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5599 else
5600 if test "$host_cpu" = ia64; then
5601 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5602 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5603 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5604 else
5605 # Determine the default libpath from the value encoded in an
5606 # empty executable.
5607 _LT_SYS_MODULE_PATH_AIX
5608 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5609 # Warning - without using the other run time loading flags,
5610 # -berok will link without error, but may produce a broken library.
5611 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5612 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5613 # Exported symbols can be pulled into shared objects from archives
5614 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5615 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5616 # This is similar to how AIX traditionally builds its shared
5617 # libraries.
5618 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5619 fi
5620 fi
5621 ;;
5622
5623 beos*)
5624 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5625 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5626 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5627 # support --undefined. This deserves some investigation. FIXME
5628 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5629 else
5630 _LT_TAGVAR(ld_shlibs, $1)=no
5631 fi
5632 ;;
5633
5634 chorus*)
5635 case $cc_basename in
5636 *)
5637 # FIXME: insert proper C++ library support
5638 _LT_TAGVAR(ld_shlibs, $1)=no
5639 ;;
5640 esac
5641 ;;
5642
5643 cygwin* | mingw* | pw32* | cegcc*)
5644 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5645 # as there is no search path for DLLs.
5646 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5647 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5648 _LT_TAGVAR(always_export_symbols, $1)=no
5649 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5650
5651 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5652 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5653 # If the export-symbols file already is a .def file (1st line
5654 # is EXPORTS), use it as is; otherwise, prepend...
5655 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5656 cp $export_symbols $output_objdir/$soname.def;
5657 else
5658 echo EXPORTS > $output_objdir/$soname.def;
5659 cat $export_symbols >> $output_objdir/$soname.def;
5660 fi~
5661 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5662 else
5663 _LT_TAGVAR(ld_shlibs, $1)=no
5664 fi
5665 ;;
5666 darwin* | rhapsody*)
5667 _LT_DARWIN_LINKER_FEATURES($1)
5668 ;;
5669
5670 dgux*)
5671 case $cc_basename in
5672 ec++*)
5673 # FIXME: insert proper C++ library support
5674 _LT_TAGVAR(ld_shlibs, $1)=no
5675 ;;
5676 ghcx*)
5677 # Green Hills C++ Compiler
5678 # FIXME: insert proper C++ library support
5679 _LT_TAGVAR(ld_shlibs, $1)=no
5680 ;;
5681 *)
5682 # FIXME: insert proper C++ library support
5683 _LT_TAGVAR(ld_shlibs, $1)=no
5684 ;;
5685 esac
5686 ;;
5687
5688 freebsd[[12]]*)
5689 # C++ shared libraries reported to be fairly broken before
5690 # switch to ELF
5691 _LT_TAGVAR(ld_shlibs, $1)=no
5692 ;;
5693
5694 freebsd-elf*)
5695 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5696 ;;
5697
5698 freebsd* | dragonfly*)
5699 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5700 # conventions
5701 _LT_TAGVAR(ld_shlibs, $1)=yes
5702 ;;
5703
5704 gnu*)
5705 ;;
5706
5707 hpux9*)
5708 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5709 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5710 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5711 _LT_TAGVAR(hardcode_direct, $1)=yes
5712 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5713 # but as the default
5714 # location of the library.
5715
5716 case $cc_basename in
5717 CC*)
5718 # FIXME: insert proper C++ library support
5719 _LT_TAGVAR(ld_shlibs, $1)=no
5720 ;;
5721 aCC*)
5722 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5723 # Commands to make compiler produce verbose output that lists
5724 # what "hidden" libraries, object files and flags are used when
5725 # linking a shared library.
5726 #
5727 # There doesn't appear to be a way to prevent this compiler from
5728 # explicitly linking system object files so we need to strip them
5729 # from the output so that they don't get included in the library
5730 # dependencies.
5731 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5732 ;;
5733 *)
5734 if test "$GXX" = yes; then
5735 _LT_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'
5736 else
5737 # FIXME: insert proper C++ library support
5738 _LT_TAGVAR(ld_shlibs, $1)=no
5739 fi
5740 ;;
5741 esac
5742 ;;
5743
5744 hpux10*|hpux11*)
5745 if test $with_gnu_ld = no; then
5746 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5747 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5748
5749 case $host_cpu in
5750 hppa*64*|ia64*)
5751 ;;
5752 *)
5753 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5754 ;;
5755 esac
5756 fi
5757 case $host_cpu in
5758 hppa*64*|ia64*)
5759 _LT_TAGVAR(hardcode_direct, $1)=no
5760 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5761 ;;
5762 *)
5763 _LT_TAGVAR(hardcode_direct, $1)=yes
5764 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5765 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5766 # but as the default
5767 # location of the library.
5768 ;;
5769 esac
5770
5771 case $cc_basename in
5772 CC*)
5773 # FIXME: insert proper C++ library support
5774 _LT_TAGVAR(ld_shlibs, $1)=no
5775 ;;
5776 aCC*)
5777 case $host_cpu in
5778 hppa*64*)
5779 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5780 ;;
5781 ia64*)
5782 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5783 ;;
5784 *)
5785 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5786 ;;
5787 esac
5788 # Commands to make compiler produce verbose output that lists
5789 # what "hidden" libraries, object files and flags are used when
5790 # linking a shared library.
5791 #
5792 # There doesn't appear to be a way to prevent this compiler from
5793 # explicitly linking system object files so we need to strip them
5794 # from the output so that they don't get included in the library
5795 # dependencies.
5796 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 "X$list" | $Xsed'
5797 ;;
5798 *)
5799 if test "$GXX" = yes; then
5800 if test $with_gnu_ld = no; then
5801 case $host_cpu in
5802 hppa*64*)
5803 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5804 ;;
5805 ia64*)
5806 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5807 ;;
5808 *)
5809 _LT_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'
5810 ;;
5811 esac
5812 fi
5813 else
5814 # FIXME: insert proper C++ library support
5815 _LT_TAGVAR(ld_shlibs, $1)=no
5816 fi
5817 ;;
5818 esac
5819 ;;
5820
5821 interix[[3-9]]*)
5822 _LT_TAGVAR(hardcode_direct, $1)=no
5823 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5824 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5825 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5826 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5827 # Instead, shared libraries are loaded at an image base (0x10000000 by
5828 # default) and relocated if they conflict, which is a slow very memory
5829 # consuming and fragmenting process. To avoid this, we pick a random,
5830 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5831 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5832 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5833 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5834 ;;
5835 irix5* | irix6*)
5836 case $cc_basename in
5837 CC*)
5838 # SGI C++
5839 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5840
5841 # Archives containing C++ object files must be created using
5842 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5843 # necessary to make sure instantiated templates are included
5844 # in the archive.
5845 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5846 ;;
5847 *)
5848 if test "$GXX" = yes; then
5849 if test "$with_gnu_ld" = no; then
5850 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5851 else
5852 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
5853 fi
5854 fi
5855 _LT_TAGVAR(link_all_deplibs, $1)=yes
5856 ;;
5857 esac
5858 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5859 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5860 _LT_TAGVAR(inherit_rpath, $1)=yes
5861 ;;
5862
5863 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5864 case $cc_basename in
5865 KCC*)
5866 # Kuck and Associates, Inc. (KAI) C++ Compiler
5867
5868 # KCC will only create a shared library if the output file
5869 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5870 # to its proper name (with version) after linking.
5871 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5872 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
5873 # Commands to make compiler produce verbose output that lists
5874 # what "hidden" libraries, object files and flags are used when
5875 # linking a shared library.
5876 #
5877 # There doesn't appear to be a way to prevent this compiler from
5878 # explicitly linking system object files so we need to strip them
5879 # from the output so that they don't get included in the library
5880 # dependencies.
5881 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 "X$list" | $Xsed'
5882
5883 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5884 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5885
5886 # Archives containing C++ object files must be created using
5887 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5888 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5889 ;;
5890 icpc* | ecpc* )
5891 # Intel C++
5892 with_gnu_ld=yes
5893 # version 8.0 and above of icpc choke on multiply defined symbols
5894 # if we add $predep_objects and $postdep_objects, however 7.1 and
5895 # earlier do not add the objects themselves.
5896 case `$CC -V 2>&1` in
5897 *"Version 7."*)
5898 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5899 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5900 ;;
5901 *) # Version 8.0 or newer
5902 tmp_idyn=
5903 case $host_cpu in
5904 ia64*) tmp_idyn=' -i_dynamic';;
5905 esac
5906 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5907 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5908 ;;
5909 esac
5910 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5911 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5912 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5913 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5914 ;;
5915 pgCC* | pgcpp*)
5916 # Portland Group C++ compiler
5917 case `$CC -V` in
5918 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5919 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5920 rm -rf $tpldir~
5921 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5922 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5923 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5924 rm -rf $tpldir~
5925 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5926 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5927 $RANLIB $oldlib'
5928 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5929 rm -rf $tpldir~
5930 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5931 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5932 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5933 rm -rf $tpldir~
5934 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5935 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5936 ;;
5937 *) # Version 6 will use weak symbols
5938 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5939 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5940 ;;
5941 esac
5942
5943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5944 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5945 _LT_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'
5946 ;;
5947 cxx*)
5948 # Compaq C++
5949 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5950 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
5951
5952 runpath_var=LD_RUN_PATH
5953 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5954 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5955
5956 # Commands to make compiler produce verbose output that lists
5957 # what "hidden" libraries, object files and flags are used when
5958 # linking a shared library.
5959 #
5960 # There doesn't appear to be a way to prevent this compiler from
5961 # explicitly linking system object files so we need to strip them
5962 # from the output so that they don't get included in the library
5963 # dependencies.
5964 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
5965 ;;
5966 xl*)
5967 # IBM XL 8.0 on PPC, with GNU ld
5968 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5969 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5970 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5971 if test "x$supports_anon_versioning" = xyes; then
5972 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5973 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5974 echo "local: *; };" >> $output_objdir/$libname.ver~
5975 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5976 fi
5977 ;;
5978 *)
5979 case `$CC -V 2>&1 | sed 5q` in
5980 *Sun\ C*)
5981 # Sun C++ 5.9
5982 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5983 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5984 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
5985 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5986 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5987 _LT_TAGVAR(compiler_needs_object, $1)=yes
5988
5989 # Not sure whether something based on
5990 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5991 # would be better.
5992 output_verbose_link_cmd='echo'
5993
5994 # Archives containing C++ object files must be created using
5995 # "CC -xar", where "CC" is the Sun C++ compiler. This is
5996 # necessary to make sure instantiated templates are included
5997 # in the archive.
5998 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5999 ;;
6000 esac
6001 ;;
6002 esac
6003 ;;
6004
6005 lynxos*)
6006 # FIXME: insert proper C++ library support
6007 _LT_TAGVAR(ld_shlibs, $1)=no
6008 ;;
6009
6010 m88k*)
6011 # FIXME: insert proper C++ library support
6012 _LT_TAGVAR(ld_shlibs, $1)=no
6013 ;;
6014
6015 mvs*)
6016 case $cc_basename in
6017 cxx*)
6018 # FIXME: insert proper C++ library support
6019 _LT_TAGVAR(ld_shlibs, $1)=no
6020 ;;
6021 *)
6022 # FIXME: insert proper C++ library support
6023 _LT_TAGVAR(ld_shlibs, $1)=no
6024 ;;
6025 esac
6026 ;;
6027
6028 netbsd*)
6029 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6030 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6031 wlarc=
6032 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6033 _LT_TAGVAR(hardcode_direct, $1)=yes
6034 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6035 fi
6036 # Workaround some broken pre-1.5 toolchains
6037 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6038 ;;
6039
6040 *nto* | *qnx*)
6041 _LT_TAGVAR(ld_shlibs, $1)=yes
6042 ;;
6043
6044 openbsd2*)
6045 # C++ shared libraries are fairly broken
6046 _LT_TAGVAR(ld_shlibs, $1)=no
6047 ;;
6048
6049 openbsd*)
6050 if test -f /usr/libexec/ld.so; then
6051 _LT_TAGVAR(hardcode_direct, $1)=yes
6052 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6053 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6054 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6056 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6057 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6058 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6059 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6060 fi
6061 output_verbose_link_cmd=echo
6062 else
6063 _LT_TAGVAR(ld_shlibs, $1)=no
6064 fi
6065 ;;
6066
6067 osf3* | osf4* | osf5*)
6068 case $cc_basename in
6069 KCC*)
6070 # Kuck and Associates, Inc. (KAI) C++ Compiler
6071
6072 # KCC will only create a shared library if the output file
6073 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6074 # to its proper name (with version) after linking.
6075 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6076
6077 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6078 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6079
6080 # Archives containing C++ object files must be created using
6081 # the KAI C++ compiler.
6082 case $host in
6083 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6084 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6085 esac
6086 ;;
6087 RCC*)
6088 # Rational C++ 2.4.1
6089 # FIXME: insert proper C++ library support
6090 _LT_TAGVAR(ld_shlibs, $1)=no
6091 ;;
6092 cxx*)
6093 case $host in
6094 osf3*)
6095 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6096 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6097 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6098 ;;
6099 *)
6100 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6101 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6102 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6103 echo "-hidden">> $lib.exp~
6104 $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6105 $RM $lib.exp'
6106 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6107 ;;
6108 esac
6109
6110 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6111
6112 # Commands to make compiler produce verbose output that lists
6113 # what "hidden" libraries, object files and flags are used when
6114 # linking a shared library.
6115 #
6116 # There doesn't appear to be a way to prevent this compiler from
6117 # explicitly linking system object files so we need to strip them
6118 # from the output so that they don't get included in the library
6119 # dependencies.
6120 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
6121 ;;
6122 *)
6123 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6124 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6125 case $host in
6126 osf3*)
6127 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6128 ;;
6129 *)
6130 _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6131 ;;
6132 esac
6133
6134 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6135 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6136
6137 # Commands to make compiler produce verbose output that lists
6138 # what "hidden" libraries, object files and flags are used when
6139 # linking a shared library.
6140 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6141
6142 else
6143 # FIXME: insert proper C++ library support
6144 _LT_TAGVAR(ld_shlibs, $1)=no
6145 fi
6146 ;;
6147 esac
6148 ;;
6149
6150 psos*)
6151 # FIXME: insert proper C++ library support
6152 _LT_TAGVAR(ld_shlibs, $1)=no
6153 ;;
6154
6155 sunos4*)
6156 case $cc_basename in
6157 CC*)
6158 # Sun C++ 4.x
6159 # FIXME: insert proper C++ library support
6160 _LT_TAGVAR(ld_shlibs, $1)=no
6161 ;;
6162 lcc*)
6163 # Lucid
6164 # FIXME: insert proper C++ library support
6165 _LT_TAGVAR(ld_shlibs, $1)=no
6166 ;;
6167 *)
6168 # FIXME: insert proper C++ library support
6169 _LT_TAGVAR(ld_shlibs, $1)=no
6170 ;;
6171 esac
6172 ;;
6173
6174 solaris*)
6175 case $cc_basename in
6176 CC*)
6177 # Sun C++ 4.2, 5.x and Centerline C++
6178 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6179 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6180 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6181 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6182 $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'
6183
6184 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6185 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6186 case $host_os in
6187 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6188 *)
6189 # The compiler driver will combine and reorder linker options,
6190 # but understands `-z linker_flag'.
6191 # Supported since Solaris 2.6 (maybe 2.5.1?)
6192 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6193 ;;
6194 esac
6195 _LT_TAGVAR(link_all_deplibs, $1)=yes
6196
6197 output_verbose_link_cmd='echo'
6198
6199 # Archives containing C++ object files must be created using
6200 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6201 # necessary to make sure instantiated templates are included
6202 # in the archive.
6203 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6204 ;;
6205 gcx*)
6206 # Green Hills C++ Compiler
6207 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6208
6209 # The C++ compiler must be used to create the archive.
6210 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6211 ;;
6212 *)
6213 # GNU C++ compiler with Solaris linker
6214 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6215 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6216 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6217 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6218 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6219 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6220
6221 # Commands to make compiler produce verbose output that lists
6222 # what "hidden" libraries, object files and flags are used when
6223 # linking a shared library.
6224 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6225 else
6226 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6227 # platform.
6228 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6229 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6230 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6231
6232 # Commands to make compiler produce verbose output that lists
6233 # what "hidden" libraries, object files and flags are used when
6234 # linking a shared library.
6235 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6236 fi
6237
6238 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6239 case $host_os in
6240 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6241 *)
6242 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6243 ;;
6244 esac
6245 fi
6246 ;;
6247 esac
6248 ;;
6249
6250 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6251 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6252 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6253 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6254 runpath_var='LD_RUN_PATH'
6255
6256 case $cc_basename in
6257 CC*)
6258 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6259 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6260 ;;
6261 *)
6262 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6263 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6264 ;;
6265 esac
6266 ;;
6267
6268 sysv5* | sco3.2v5* | sco5v6*)
6269 # Note: We can NOT use -z defs as we might desire, because we do not
6270 # link with -lc, and that would cause any symbols used from libc to
6271 # always be unresolved, which means just about no library would
6272 # ever link correctly. If we're not using GNU ld we use -z text
6273 # though, which does catch some bad symbols but isn't as heavy-handed
6274 # as -z defs.
6275 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6276 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6277 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6278 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6279 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6280 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6281 _LT_TAGVAR(link_all_deplibs, $1)=yes
6282 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6283 runpath_var='LD_RUN_PATH'
6284
6285 case $cc_basename in
6286 CC*)
6287 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6288 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6289 ;;
6290 *)
6291 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6292 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6293 ;;
6294 esac
6295 ;;
6296
6297 tandem*)
6298 case $cc_basename in
6299 NCC*)
6300 # NonStop-UX NCC 3.20
6301 # FIXME: insert proper C++ library support
6302 _LT_TAGVAR(ld_shlibs, $1)=no
6303 ;;
6304 *)
6305 # FIXME: insert proper C++ library support
6306 _LT_TAGVAR(ld_shlibs, $1)=no
6307 ;;
6308 esac
6309 ;;
6310
6311 vxworks*)
6312 # FIXME: insert proper C++ library support
6313 _LT_TAGVAR(ld_shlibs, $1)=no
6314 ;;
6315
6316 *)
6317 # FIXME: insert proper C++ library support
6318 _LT_TAGVAR(ld_shlibs, $1)=no
6319 ;;
6320 esac
6321
6322 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6323 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6324
6325 _LT_TAGVAR(GCC, $1)="$GXX"
6326 _LT_TAGVAR(LD, $1)="$LD"
6327
6328 ## CAVEAT EMPTOR:
6329 ## There is no encapsulation within the following macros, do not change
6330 ## the running order or otherwise move them around unless you know exactly
6331 ## what you are doing...
6332 _LT_SYS_HIDDEN_LIBDEPS($1)
6333 _LT_COMPILER_PIC($1)
6334 _LT_COMPILER_C_O($1)
6335 _LT_COMPILER_FILE_LOCKS($1)
6336 _LT_LINKER_SHLIBS($1)
6337 _LT_SYS_DYNAMIC_LINKER($1)
6338 _LT_LINKER_HARDCODE_LIBPATH($1)
6339
6340 _LT_CONFIG($1)
6341 fi # test -n "$compiler"
6342
6343 CC=$lt_save_CC
6344 LDCXX=$LD
6345 LD=$lt_save_LD
6346 GCC=$lt_save_GCC
6347 with_gnu_ld=$lt_save_with_gnu_ld
6348 lt_cv_path_LDCXX=$lt_cv_path_LD
6349 lt_cv_path_LD=$lt_save_path_LD
6350 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6351 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6352 fi # test "$_lt_caught_CXX_error" != yes
6353
6354 AC_LANG_POP
6355 ])# _LT_LANG_CXX_CONFIG
6356
6357
6358 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6359 # ---------------------------------
6360 # Figure out "hidden" library dependencies from verbose
6361 # compiler output when linking a shared library.
6362 # Parse the compiler output and extract the necessary
6363 # objects, libraries and library flags.
6364 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6365 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6366 # Dependencies to place before and after the object being linked:
6367 _LT_TAGVAR(predep_objects, $1)=
6368 _LT_TAGVAR(postdep_objects, $1)=
6369 _LT_TAGVAR(predeps, $1)=
6370 _LT_TAGVAR(postdeps, $1)=
6371 _LT_TAGVAR(compiler_lib_search_path, $1)=
6372
6373 dnl we can't use the lt_simple_compile_test_code here,
6374 dnl because it contains code intended for an executable,
6375 dnl not a library. It's possible we should let each
6376 dnl tag define a new lt_????_link_test_code variable,
6377 dnl but it's only used here...
6378 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6379 int a;
6380 void foo (void) { a = 0; }
6381 _LT_EOF
6382 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6383 class Foo
6384 {
6385 public:
6386 Foo (void) { a = 0; }
6387 private:
6388 int a;
6389 };
6390 _LT_EOF
6391 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6392 subroutine foo
6393 implicit none
6394 integer*4 a
6395 a=0
6396 return
6397 end
6398 _LT_EOF
6399 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6400 subroutine foo
6401 implicit none
6402 integer a
6403 a=0
6404 return
6405 end
6406 _LT_EOF
6407 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6408 public class foo {
6409 private int a;
6410 public void bar (void) {
6411 a = 0;
6412 }
6413 };
6414 _LT_EOF
6415 ])
6416 dnl Parse the compiler output and extract the necessary
6417 dnl objects, libraries and library flags.
6418 if AC_TRY_EVAL(ac_compile); then
6419 # Parse the compiler output and extract the necessary
6420 # objects, libraries and library flags.
6421
6422 # Sentinel used to keep track of whether or not we are before
6423 # the conftest object file.
6424 pre_test_object_deps_done=no
6425
6426 for p in `eval "$output_verbose_link_cmd"`; do
6427 case $p in
6428
6429 -L* | -R* | -l*)
6430 # Some compilers place space between "-{L,R}" and the path.
6431 # Remove the space.
6432 if test $p = "-L" ||
6433 test $p = "-R"; then
6434 prev=$p
6435 continue
6436 else
6437 prev=
6438 fi
6439
6440 if test "$pre_test_object_deps_done" = no; then
6441 case $p in
6442 -L* | -R*)
6443 # Internal compiler library paths should come after those
6444 # provided the user. The postdeps already come after the
6445 # user supplied libs so there is no need to process them.
6446 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6447 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6448 else
6449 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6450 fi
6451 ;;
6452 # The "-l" case would never come before the object being
6453 # linked, so don't bother handling this case.
6454 esac
6455 else
6456 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6457 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6458 else
6459 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6460 fi
6461 fi
6462 ;;
6463
6464 *.$objext)
6465 # This assumes that the test object file only shows up
6466 # once in the compiler output.
6467 if test "$p" = "conftest.$objext"; then
6468 pre_test_object_deps_done=yes
6469 continue
6470 fi
6471
6472 if test "$pre_test_object_deps_done" = no; then
6473 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6474 _LT_TAGVAR(predep_objects, $1)="$p"
6475 else
6476 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6477 fi
6478 else
6479 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6480 _LT_TAGVAR(postdep_objects, $1)="$p"
6481 else
6482 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6483 fi
6484 fi
6485 ;;
6486
6487 *) ;; # Ignore the rest.
6488
6489 esac
6490 done
6491
6492 # Clean up.
6493 rm -f a.out a.exe
6494 else
6495 echo "libtool.m4: error: problem compiling $1 test program"
6496 fi
6497
6498 $RM -f confest.$objext
6499
6500 # PORTME: override above test on systems where it is broken
6501 m4_if([$1], [CXX],
6502 [case $host_os in
6503 interix[[3-9]]*)
6504 # Interix 3.5 installs completely hosed .la files for C++, so rather than
6505 # hack all around it, let's just trust "g++" to DTRT.
6506 _LT_TAGVAR(predep_objects,$1)=
6507 _LT_TAGVAR(postdep_objects,$1)=
6508 _LT_TAGVAR(postdeps,$1)=
6509 ;;
6510
6511 linux*)
6512 case `$CC -V 2>&1 | sed 5q` in
6513 *Sun\ C*)
6514 # Sun C++ 5.9
6515
6516 # The more standards-conforming stlport4 library is
6517 # incompatible with the Cstd library. Avoid specifying
6518 # it if it's in CXXFLAGS. Ignore libCrun as
6519 # -library=stlport4 depends on it.
6520 case " $CXX $CXXFLAGS " in
6521 *" -library=stlport4 "*)
6522 solaris_use_stlport4=yes
6523 ;;
6524 esac
6525
6526 if test "$solaris_use_stlport4" != yes; then
6527 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6528 fi
6529 ;;
6530 esac
6531 ;;
6532
6533 solaris*)
6534 case $cc_basename in
6535 CC*)
6536 # The more standards-conforming stlport4 library is
6537 # incompatible with the Cstd library. Avoid specifying
6538 # it if it's in CXXFLAGS. Ignore libCrun as
6539 # -library=stlport4 depends on it.
6540 case " $CXX $CXXFLAGS " in
6541 *" -library=stlport4 "*)
6542 solaris_use_stlport4=yes
6543 ;;
6544 esac
6545
6546 # Adding this requires a known-good setup of shared libraries for
6547 # Sun compiler versions before 5.6, else PIC objects from an old
6548 # archive will be linked into the output, leading to subtle bugs.
6549 if test "$solaris_use_stlport4" != yes; then
6550 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6551 fi
6552 ;;
6553 esac
6554 ;;
6555 esac
6556 ])
6557
6558 case " $_LT_TAGVAR(postdeps, $1) " in
6559 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6560 esac
6561 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6562 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6563 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6564 fi
6565 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6566 [The directories searched by this compiler when creating a shared library])
6567 _LT_TAGDECL([], [predep_objects], [1],
6568 [Dependencies to place before and after the objects being linked to
6569 create a shared library])
6570 _LT_TAGDECL([], [postdep_objects], [1])
6571 _LT_TAGDECL([], [predeps], [1])
6572 _LT_TAGDECL([], [postdeps], [1])
6573 _LT_TAGDECL([], [compiler_lib_search_path], [1],
6574 [The library search path used internally by the compiler when linking
6575 a shared library])
6576 ])# _LT_SYS_HIDDEN_LIBDEPS
6577
6578
6579 # _LT_PROG_F77
6580 # ------------
6581 # Since AC_PROG_F77 is broken, in that it returns the empty string
6582 # if there is no fortran compiler, we have our own version here.
6583 m4_defun([_LT_PROG_F77],
6584 [
6585 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6586 AC_PROG_F77
6587 if test -z "$F77" || test "X$F77" = "Xno"; then
6588 _lt_disable_F77=yes
6589 fi
6590 popdef([AC_MSG_ERROR])
6591 ])# _LT_PROG_F77
6592
6593 dnl aclocal-1.4 backwards compatibility:
6594 dnl AC_DEFUN([_LT_PROG_F77], [])
6595
6596
6597 # _LT_LANG_F77_CONFIG([TAG])
6598 # --------------------------
6599 # Ensure that the configuration variables for a Fortran 77 compiler are
6600 # suitably defined. These variables are subsequently used by _LT_CONFIG
6601 # to write the compiler configuration to `libtool'.
6602 m4_defun([_LT_LANG_F77_CONFIG],
6603 [AC_REQUIRE([_LT_PROG_F77])dnl
6604 AC_LANG_PUSH(Fortran 77)
6605
6606 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6607 _LT_TAGVAR(allow_undefined_flag, $1)=
6608 _LT_TAGVAR(always_export_symbols, $1)=no
6609 _LT_TAGVAR(archive_expsym_cmds, $1)=
6610 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6611 _LT_TAGVAR(hardcode_direct, $1)=no
6612 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6613 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6614 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6615 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6616 _LT_TAGVAR(hardcode_minus_L, $1)=no
6617 _LT_TAGVAR(hardcode_automatic, $1)=no
6618 _LT_TAGVAR(inherit_rpath, $1)=no
6619 _LT_TAGVAR(module_cmds, $1)=
6620 _LT_TAGVAR(module_expsym_cmds, $1)=
6621 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6622 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6623 _LT_TAGVAR(no_undefined_flag, $1)=
6624 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6625 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6626
6627 # Source file extension for f77 test sources.
6628 ac_ext=f
6629
6630 # Object file extension for compiled f77 test sources.
6631 objext=o
6632 _LT_TAGVAR(objext, $1)=$objext
6633
6634 # No sense in running all these tests if we already determined that
6635 # the F77 compiler isn't working. Some variables (like enable_shared)
6636 # are currently assumed to apply to all compilers on this platform,
6637 # and will be corrupted by setting them based on a non-working compiler.
6638 if test "$_lt_disable_F77" != yes; then
6639 # Code to be used in simple compile tests
6640 lt_simple_compile_test_code="\
6641 subroutine t
6642 return
6643 end
6644 "
6645
6646 # Code to be used in simple link tests
6647 lt_simple_link_test_code="\
6648 program t
6649 end
6650 "
6651
6652 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6653 _LT_TAG_COMPILER
6654
6655 # save warnings/boilerplate of simple test code
6656 _LT_COMPILER_BOILERPLATE
6657 _LT_LINKER_BOILERPLATE
6658
6659 # Allow CC to be a program name with arguments.
6660 lt_save_CC="$CC"
6661 lt_save_GCC=$GCC
6662 CC=${F77-"f77"}
6663 compiler=$CC
6664 _LT_TAGVAR(compiler, $1)=$CC
6665 _LT_CC_BASENAME([$compiler])
6666 GCC=$G77
6667 if test -n "$compiler"; then
6668 AC_MSG_CHECKING([if libtool supports shared libraries])
6669 AC_MSG_RESULT([$can_build_shared])
6670
6671 AC_MSG_CHECKING([whether to build shared libraries])
6672 test "$can_build_shared" = "no" && enable_shared=no
6673
6674 # On AIX, shared libraries and static libraries use the same namespace, and
6675 # are all built from PIC.
6676 case $host_os in
6677 aix3*)
6678 test "$enable_shared" = yes && enable_static=no
6679 if test -n "$RANLIB"; then
6680 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6681 postinstall_cmds='$RANLIB $lib'
6682 fi
6683 ;;
6684 aix[[4-9]]*)
6685 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6686 test "$enable_shared" = yes && enable_static=no
6687 fi
6688 ;;
6689 esac
6690 AC_MSG_RESULT([$enable_shared])
6691
6692 AC_MSG_CHECKING([whether to build static libraries])
6693 # Make sure either enable_shared or enable_static is yes.
6694 test "$enable_shared" = yes || enable_static=yes
6695 AC_MSG_RESULT([$enable_static])
6696
6697 _LT_TAGVAR(GCC, $1)="$G77"
6698 _LT_TAGVAR(LD, $1)="$LD"
6699
6700 ## CAVEAT EMPTOR:
6701 ## There is no encapsulation within the following macros, do not change
6702 ## the running order or otherwise move them around unless you know exactly
6703 ## what you are doing...
6704 _LT_COMPILER_PIC($1)
6705 _LT_COMPILER_C_O($1)
6706 _LT_COMPILER_FILE_LOCKS($1)
6707 _LT_LINKER_SHLIBS($1)
6708 _LT_SYS_DYNAMIC_LINKER($1)
6709 _LT_LINKER_HARDCODE_LIBPATH($1)
6710
6711 _LT_CONFIG($1)
6712 fi # test -n "$compiler"
6713
6714 GCC=$lt_save_GCC
6715 CC="$lt_save_CC"
6716 fi # test "$_lt_disable_F77" != yes
6717
6718 AC_LANG_POP
6719 ])# _LT_LANG_F77_CONFIG
6720
6721
6722 # _LT_PROG_FC
6723 # -----------
6724 # Since AC_PROG_FC is broken, in that it returns the empty string
6725 # if there is no fortran compiler, we have our own version here.
6726 m4_defun([_LT_PROG_FC],
6727 [
6728 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6729 AC_PROG_FC
6730 if test -z "$FC" || test "X$FC" = "Xno"; then
6731 _lt_disable_FC=yes
6732 fi
6733 popdef([AC_MSG_ERROR])
6734 ])# _LT_PROG_FC
6735
6736 dnl aclocal-1.4 backwards compatibility:
6737 dnl AC_DEFUN([_LT_PROG_FC], [])
6738
6739
6740 # _LT_LANG_FC_CONFIG([TAG])
6741 # -------------------------
6742 # Ensure that the configuration variables for a Fortran compiler are
6743 # suitably defined. These variables are subsequently used by _LT_CONFIG
6744 # to write the compiler configuration to `libtool'.
6745 m4_defun([_LT_LANG_FC_CONFIG],
6746 [AC_REQUIRE([_LT_PROG_FC])dnl
6747 AC_LANG_PUSH(Fortran)
6748
6749 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6750 _LT_TAGVAR(allow_undefined_flag, $1)=
6751 _LT_TAGVAR(always_export_symbols, $1)=no
6752 _LT_TAGVAR(archive_expsym_cmds, $1)=
6753 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6754 _LT_TAGVAR(hardcode_direct, $1)=no
6755 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6756 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6757 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6758 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6759 _LT_TAGVAR(hardcode_minus_L, $1)=no
6760 _LT_TAGVAR(hardcode_automatic, $1)=no
6761 _LT_TAGVAR(inherit_rpath, $1)=no
6762 _LT_TAGVAR(module_cmds, $1)=
6763 _LT_TAGVAR(module_expsym_cmds, $1)=
6764 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6765 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6766 _LT_TAGVAR(no_undefined_flag, $1)=
6767 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6768 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6769
6770 # Source file extension for fc test sources.
6771 ac_ext=${ac_fc_srcext-f}
6772
6773 # Object file extension for compiled fc test sources.
6774 objext=o
6775 _LT_TAGVAR(objext, $1)=$objext
6776
6777 # No sense in running all these tests if we already determined that
6778 # the FC compiler isn't working. Some variables (like enable_shared)
6779 # are currently assumed to apply to all compilers on this platform,
6780 # and will be corrupted by setting them based on a non-working compiler.
6781 if test "$_lt_disable_FC" != yes; then
6782 # Code to be used in simple compile tests
6783 lt_simple_compile_test_code="\
6784 subroutine t
6785 return
6786 end
6787 "
6788
6789 # Code to be used in simple link tests
6790 lt_simple_link_test_code="\
6791 program t
6792 end
6793 "
6794
6795 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6796 _LT_TAG_COMPILER
6797
6798 # save warnings/boilerplate of simple test code
6799 _LT_COMPILER_BOILERPLATE
6800 _LT_LINKER_BOILERPLATE
6801
6802 # Allow CC to be a program name with arguments.
6803 lt_save_CC="$CC"
6804 lt_save_GCC=$GCC
6805 CC=${FC-"f95"}
6806 compiler=$CC
6807 GCC=$ac_cv_fc_compiler_gnu
6808
6809 _LT_TAGVAR(compiler, $1)=$CC
6810 _LT_CC_BASENAME([$compiler])
6811
6812 if test -n "$compiler"; then
6813 AC_MSG_CHECKING([if libtool supports shared libraries])
6814 AC_MSG_RESULT([$can_build_shared])
6815
6816 AC_MSG_CHECKING([whether to build shared libraries])
6817 test "$can_build_shared" = "no" && enable_shared=no
6818
6819 # On AIX, shared libraries and static libraries use the same namespace, and
6820 # are all built from PIC.
6821 case $host_os in
6822 aix3*)
6823 test "$enable_shared" = yes && enable_static=no
6824 if test -n "$RANLIB"; then
6825 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6826 postinstall_cmds='$RANLIB $lib'
6827 fi
6828 ;;
6829 aix[[4-9]]*)
6830 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6831 test "$enable_shared" = yes && enable_static=no
6832 fi
6833 ;;
6834 esac
6835 AC_MSG_RESULT([$enable_shared])
6836
6837 AC_MSG_CHECKING([whether to build static libraries])
6838 # Make sure either enable_shared or enable_static is yes.
6839 test "$enable_shared" = yes || enable_static=yes
6840 AC_MSG_RESULT([$enable_static])
6841
6842 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6843 _LT_TAGVAR(LD, $1)="$LD"
6844
6845 ## CAVEAT EMPTOR:
6846 ## There is no encapsulation within the following macros, do not change
6847 ## the running order or otherwise move them around unless you know exactly
6848 ## what you are doing...
6849 _LT_SYS_HIDDEN_LIBDEPS($1)
6850 _LT_COMPILER_PIC($1)
6851 _LT_COMPILER_C_O($1)
6852 _LT_COMPILER_FILE_LOCKS($1)
6853 _LT_LINKER_SHLIBS($1)
6854 _LT_SYS_DYNAMIC_LINKER($1)
6855 _LT_LINKER_HARDCODE_LIBPATH($1)
6856
6857 _LT_CONFIG($1)
6858 fi # test -n "$compiler"
6859
6860 GCC=$lt_save_GCC
6861 CC="$lt_save_CC"
6862 fi # test "$_lt_disable_FC" != yes
6863
6864 AC_LANG_POP
6865 ])# _LT_LANG_FC_CONFIG
6866
6867
6868 # _LT_LANG_GCJ_CONFIG([TAG])
6869 # --------------------------
6870 # Ensure that the configuration variables for the GNU Java Compiler compiler
6871 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6872 # to write the compiler configuration to `libtool'.
6873 m4_defun([_LT_LANG_GCJ_CONFIG],
6874 [AC_REQUIRE([LT_PROG_GCJ])dnl
6875 AC_LANG_SAVE
6876
6877 # Source file extension for Java test sources.
6878 ac_ext=java
6879
6880 # Object file extension for compiled Java test sources.
6881 objext=o
6882 _LT_TAGVAR(objext, $1)=$objext
6883
6884 # Code to be used in simple compile tests
6885 lt_simple_compile_test_code="class foo {}"
6886
6887 # Code to be used in simple link tests
6888 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6889
6890 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6891 _LT_TAG_COMPILER
6892
6893 # save warnings/boilerplate of simple test code
6894 _LT_COMPILER_BOILERPLATE
6895 _LT_LINKER_BOILERPLATE
6896
6897 # Allow CC to be a program name with arguments.
6898 lt_save_CC="$CC"
6899 lt_save_GCC=$GCC
6900 GCC=yes
6901 CC=${GCJ-"gcj"}
6902 compiler=$CC
6903 _LT_TAGVAR(compiler, $1)=$CC
6904 _LT_TAGVAR(LD, $1)="$LD"
6905 _LT_CC_BASENAME([$compiler])
6906
6907 # GCJ did not exist at the time GCC didn't implicitly link libc in.
6908 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6909
6910 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6911
6912 ## CAVEAT EMPTOR:
6913 ## There is no encapsulation within the following macros, do not change
6914 ## the running order or otherwise move them around unless you know exactly
6915 ## what you are doing...
6916 if test -n "$compiler"; then
6917 _LT_COMPILER_NO_RTTI($1)
6918 _LT_COMPILER_PIC($1)
6919 _LT_COMPILER_C_O($1)
6920 _LT_COMPILER_FILE_LOCKS($1)
6921 _LT_LINKER_SHLIBS($1)
6922 _LT_LINKER_HARDCODE_LIBPATH($1)
6923
6924 _LT_CONFIG($1)
6925 fi
6926
6927 AC_LANG_RESTORE
6928
6929 GCC=$lt_save_GCC
6930 CC="$lt_save_CC"
6931 ])# _LT_LANG_GCJ_CONFIG
6932
6933
6934 # _LT_LANG_RC_CONFIG([TAG])
6935 # -------------------------
6936 # Ensure that the configuration variables for the Windows resource compiler
6937 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6938 # to write the compiler configuration to `libtool'.
6939 m4_defun([_LT_LANG_RC_CONFIG],
6940 [AC_REQUIRE([LT_PROG_RC])dnl
6941 AC_LANG_SAVE
6942
6943 # Source file extension for RC test sources.
6944 ac_ext=rc
6945
6946 # Object file extension for compiled RC test sources.
6947 objext=o
6948 _LT_TAGVAR(objext, $1)=$objext
6949
6950 # Code to be used in simple compile tests
6951 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6952
6953 # Code to be used in simple link tests
6954 lt_simple_link_test_code="$lt_simple_compile_test_code"
6955
6956 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6957 _LT_TAG_COMPILER
6958
6959 # save warnings/boilerplate of simple test code
6960 _LT_COMPILER_BOILERPLATE
6961 _LT_LINKER_BOILERPLATE
6962
6963 # Allow CC to be a program name with arguments.
6964 lt_save_CC="$CC"
6965 lt_save_GCC=$GCC
6966 GCC=
6967 CC=${RC-"windres"}
6968 compiler=$CC
6969 _LT_TAGVAR(compiler, $1)=$CC
6970 _LT_CC_BASENAME([$compiler])
6971 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6972
6973 if test -n "$compiler"; then
6974 :
6975 _LT_CONFIG($1)
6976 fi
6977
6978 GCC=$lt_save_GCC
6979 AC_LANG_RESTORE
6980 CC="$lt_save_CC"
6981 ])# _LT_LANG_RC_CONFIG
6982
6983
6984 # LT_PROG_GCJ
6985 # -----------
6986 AC_DEFUN([LT_PROG_GCJ],
6987 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6988 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6989 [AC_CHECK_TOOL(GCJ, gcj,)
6990 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6991 AC_SUBST(GCJFLAGS)])])[]dnl
6992 ])
6993
6994 # Old name:
6995 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6996 dnl aclocal-1.4 backwards compatibility:
6997 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6998
6999
7000 # LT_PROG_RC
7001 # ----------
7002 AC_DEFUN([LT_PROG_RC],
7003 [AC_CHECK_TOOL(RC, windres,)
7004 ])
7005
7006 # Old name:
7007 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7008 dnl aclocal-1.4 backwards compatibility:
7009 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7010
7011
7012 # _LT_DECL_EGREP
7013 # --------------
7014 # If we don't have a new enough Autoconf to choose the best grep
7015 # available, choose the one first in the user's PATH.
7016 m4_defun([_LT_DECL_EGREP],
7017 [AC_REQUIRE([AC_PROG_EGREP])dnl
7018 AC_REQUIRE([AC_PROG_FGREP])dnl
7019 test -z "$GREP" && GREP=grep
7020 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7021 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7022 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7023 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7024 AC_SUBST([GREP])
7025 ])
7026
7027
7028 # _LT_DECL_OBJDUMP
7029 # --------------
7030 # If we don't have a new enough Autoconf to choose the best objdump
7031 # available, choose the one first in the user's PATH.
7032 m4_defun([_LT_DECL_OBJDUMP],
7033 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7034 test -z "$OBJDUMP" && OBJDUMP=objdump
7035 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7036 AC_SUBST([OBJDUMP])
7037 ])
7038
7039
7040 # _LT_DECL_SED
7041 # ------------
7042 # Check for a fully-functional sed program, that truncates
7043 # as few characters as possible. Prefer GNU sed if found.
7044 m4_defun([_LT_DECL_SED],
7045 [AC_PROG_SED
7046 test -z "$SED" && SED=sed
7047 Xsed="$SED -e 1s/^X//"
7048 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7049 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7050 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7051 ])# _LT_DECL_SED
7052
7053 m4_ifndef([AC_PROG_SED], [
7054 ############################################################
7055 # NOTE: This macro has been submitted for inclusion into #
7056 # GNU Autoconf as AC_PROG_SED. When it is available in #
7057 # a released version of Autoconf we should remove this #
7058 # macro and use it instead. #
7059 ############################################################
7060
7061 m4_defun([AC_PROG_SED],
7062 [AC_MSG_CHECKING([for a sed that does not truncate output])
7063 AC_CACHE_VAL(lt_cv_path_SED,
7064 [# Loop through the user's path and test for sed and gsed.
7065 # Then use that list of sed's as ones to test for truncation.
7066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7067 for as_dir in $PATH
7068 do
7069 IFS=$as_save_IFS
7070 test -z "$as_dir" && as_dir=.
7071 for lt_ac_prog in sed gsed; do
7072 for ac_exec_ext in '' $ac_executable_extensions; do
7073 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7074 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7075 fi
7076 done
7077 done
7078 done
7079 IFS=$as_save_IFS
7080 lt_ac_max=0
7081 lt_ac_count=0
7082 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7083 # along with /bin/sed that truncates output.
7084 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7085 test ! -f $lt_ac_sed && continue
7086 cat /dev/null > conftest.in
7087 lt_ac_count=0
7088 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7089 # Check for GNU sed and select it if it is found.
7090 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7091 lt_cv_path_SED=$lt_ac_sed
7092 break
7093 fi
7094 while true; do
7095 cat conftest.in conftest.in >conftest.tmp
7096 mv conftest.tmp conftest.in
7097 cp conftest.in conftest.nl
7098 echo >>conftest.nl
7099 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7100 cmp -s conftest.out conftest.nl || break
7101 # 10000 chars as input seems more than enough
7102 test $lt_ac_count -gt 10 && break
7103 lt_ac_count=`expr $lt_ac_count + 1`
7104 if test $lt_ac_count -gt $lt_ac_max; then
7105 lt_ac_max=$lt_ac_count
7106 lt_cv_path_SED=$lt_ac_sed
7107 fi
7108 done
7109 done
7110 ])
7111 SED=$lt_cv_path_SED
7112 AC_SUBST([SED])
7113 AC_MSG_RESULT([$SED])
7114 ])#AC_PROG_SED
7115 ])#m4_ifndef
7116
7117 # Old name:
7118 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7119 dnl aclocal-1.4 backwards compatibility:
7120 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7121
7122
7123 # _LT_CHECK_SHELL_FEATURES
7124 # ------------------------
7125 # Find out whether the shell is Bourne or XSI compatible,
7126 # or has some other useful features.
7127 m4_defun([_LT_CHECK_SHELL_FEATURES],
7128 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7129 # Try some XSI features
7130 xsi_shell=no
7131 ( _lt_dummy="a/b/c"
7132 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7133 = c,a/b,, \
7134 && eval 'test $(( 1 + 1 )) -eq 2 \
7135 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7136 && xsi_shell=yes
7137 AC_MSG_RESULT([$xsi_shell])
7138 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7139
7140 AC_MSG_CHECKING([whether the shell understands "+="])
7141 lt_shell_append=no
7142 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7143 >/dev/null 2>&1 \
7144 && lt_shell_append=yes
7145 AC_MSG_RESULT([$lt_shell_append])
7146 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7147
7148 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7149 lt_unset=unset
7150 else
7151 lt_unset=false
7152 fi
7153 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7154
7155 # test EBCDIC or ASCII
7156 case `echo X|tr X '\101'` in
7157 A) # ASCII based system
7158 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7159 lt_SP2NL='tr \040 \012'
7160 lt_NL2SP='tr \015\012 \040\040'
7161 ;;
7162 *) # EBCDIC based system
7163 lt_SP2NL='tr \100 \n'
7164 lt_NL2SP='tr \r\n \100\100'
7165 ;;
7166 esac
7167 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7168 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7169 ])# _LT_CHECK_SHELL_FEATURES
7170
7171
7172 # _LT_PROG_XSI_SHELLFNS
7173 # ---------------------
7174 # Bourne and XSI compatible variants of some useful shell functions.
7175 m4_defun([_LT_PROG_XSI_SHELLFNS],
7176 [case $xsi_shell in
7177 yes)
7178 cat << \_LT_EOF >> "$cfgfile"
7179
7180 # func_dirname file append nondir_replacement
7181 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7182 # otherwise set result to NONDIR_REPLACEMENT.
7183 func_dirname ()
7184 {
7185 case ${1} in
7186 */*) func_dirname_result="${1%/*}${2}" ;;
7187 * ) func_dirname_result="${3}" ;;
7188 esac
7189 }
7190
7191 # func_basename file
7192 func_basename ()
7193 {
7194 func_basename_result="${1##*/}"
7195 }
7196
7197 # func_dirname_and_basename file append nondir_replacement
7198 # perform func_basename and func_dirname in a single function
7199 # call:
7200 # dirname: Compute the dirname of FILE. If nonempty,
7201 # add APPEND to the result, otherwise set result
7202 # to NONDIR_REPLACEMENT.
7203 # value returned in "$func_dirname_result"
7204 # basename: Compute filename of FILE.
7205 # value retuned in "$func_basename_result"
7206 # Implementation must be kept synchronized with func_dirname
7207 # and func_basename. For efficiency, we do not delegate to
7208 # those functions but instead duplicate the functionality here.
7209 func_dirname_and_basename ()
7210 {
7211 case ${1} in
7212 */*) func_dirname_result="${1%/*}${2}" ;;
7213 * ) func_dirname_result="${3}" ;;
7214 esac
7215 func_basename_result="${1##*/}"
7216 }
7217
7218 # func_stripname prefix suffix name
7219 # strip PREFIX and SUFFIX off of NAME.
7220 # PREFIX and SUFFIX must not contain globbing or regex special
7221 # characters, hashes, percent signs, but SUFFIX may contain a leading
7222 # dot (in which case that matches only a dot).
7223 func_stripname ()
7224 {
7225 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7226 # positional parameters, so assign one to ordinary parameter first.
7227 func_stripname_result=${3}
7228 func_stripname_result=${func_stripname_result#"${1}"}
7229 func_stripname_result=${func_stripname_result%"${2}"}
7230 }
7231
7232 # func_opt_split
7233 func_opt_split ()
7234 {
7235 func_opt_split_opt=${1%%=*}
7236 func_opt_split_arg=${1#*=}
7237 }
7238
7239 # func_lo2o object
7240 func_lo2o ()
7241 {
7242 case ${1} in
7243 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7244 *) func_lo2o_result=${1} ;;
7245 esac
7246 }
7247
7248 # func_xform libobj-or-source
7249 func_xform ()
7250 {
7251 func_xform_result=${1%.*}.lo
7252 }
7253
7254 # func_arith arithmetic-term...
7255 func_arith ()
7256 {
7257 func_arith_result=$(( $[*] ))
7258 }
7259
7260 # func_len string
7261 # STRING may not start with a hyphen.
7262 func_len ()
7263 {
7264 func_len_result=${#1}
7265 }
7266
7267 _LT_EOF
7268 ;;
7269 *) # Bourne compatible functions.
7270 cat << \_LT_EOF >> "$cfgfile"
7271
7272 # func_dirname file append nondir_replacement
7273 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7274 # otherwise set result to NONDIR_REPLACEMENT.
7275 func_dirname ()
7276 {
7277 # Extract subdirectory from the argument.
7278 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7279 if test "X$func_dirname_result" = "X${1}"; then
7280 func_dirname_result="${3}"
7281 else
7282 func_dirname_result="$func_dirname_result${2}"
7283 fi
7284 }
7285
7286 # func_basename file
7287 func_basename ()
7288 {
7289 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7290 }
7291
7292 dnl func_dirname_and_basename
7293 dnl A portable version of this function is already defined in general.m4sh
7294 dnl so there is no need for it here.
7295
7296 # func_stripname prefix suffix name
7297 # strip PREFIX and SUFFIX off of NAME.
7298 # PREFIX and SUFFIX must not contain globbing or regex special
7299 # characters, hashes, percent signs, but SUFFIX may contain a leading
7300 # dot (in which case that matches only a dot).
7301 # func_strip_suffix prefix name
7302 func_stripname ()
7303 {
7304 case ${2} in
7305 .*) func_stripname_result=`$ECHO "X${3}" \
7306 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7307 *) func_stripname_result=`$ECHO "X${3}" \
7308 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7309 esac
7310 }
7311
7312 # sed scripts:
7313 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7314 my_sed_long_arg='1s/^-[[^=]]*=//'
7315
7316 # func_opt_split
7317 func_opt_split ()
7318 {
7319 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7320 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7321 }
7322
7323 # func_lo2o object
7324 func_lo2o ()
7325 {
7326 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7327 }
7328
7329 # func_xform libobj-or-source
7330 func_xform ()
7331 {
7332 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7333 }
7334
7335 # func_arith arithmetic-term...
7336 func_arith ()
7337 {
7338 func_arith_result=`expr "$[@]"`
7339 }
7340
7341 # func_len string
7342 # STRING may not start with a hyphen.
7343 func_len ()
7344 {
7345 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7346 }
7347
7348 _LT_EOF
7349 esac
7350
7351 case $lt_shell_append in
7352 yes)
7353 cat << \_LT_EOF >> "$cfgfile"
7354
7355 # func_append var value
7356 # Append VALUE to the end of shell variable VAR.
7357 func_append ()
7358 {
7359 eval "$[1]+=\$[2]"
7360 }
7361 _LT_EOF
7362 ;;
7363 *)
7364 cat << \_LT_EOF >> "$cfgfile"
7365
7366 # func_append var value
7367 # Append VALUE to the end of shell variable VAR.
7368 func_append ()
7369 {
7370 eval "$[1]=\$$[1]\$[2]"
7371 }
7372
7373 _LT_EOF
7374 ;;
7375 esac
7376 ])
0 # Helper functions for option handling. -*- Autoconf -*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
3 # Written by Gary V. Vaughan, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 6 ltoptions.m4
10
11 # This is to help aclocal find these macros, as it can't see m4_define.
12 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
13
14
15 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
16 # ------------------------------------------
17 m4_define([_LT_MANGLE_OPTION],
18 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
19
20
21 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
22 # ---------------------------------------
23 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
24 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
25 # saved as a flag.
26 m4_define([_LT_SET_OPTION],
27 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
28 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
29 _LT_MANGLE_DEFUN([$1], [$2]),
30 [m4_warning([Unknown $1 option `$2'])])[]dnl
31 ])
32
33
34 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
35 # ------------------------------------------------------------
36 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
37 m4_define([_LT_IF_OPTION],
38 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
39
40
41 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
42 # -------------------------------------------------------
43 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
44 # are set.
45 m4_define([_LT_UNLESS_OPTIONS],
46 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
47 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
48 [m4_define([$0_found])])])[]dnl
49 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
50 ])[]dnl
51 ])
52
53
54 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
55 # ----------------------------------------
56 # OPTION-LIST is a space-separated list of Libtool options associated
57 # with MACRO-NAME. If any OPTION has a matching handler declared with
58 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
59 # the unknown option and exit.
60 m4_defun([_LT_SET_OPTIONS],
61 [# Set options
62 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
63 [_LT_SET_OPTION([$1], _LT_Option)])
64
65 m4_if([$1],[LT_INIT],[
66 dnl
67 dnl Simply set some default values (i.e off) if boolean options were not
68 dnl specified:
69 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
70 ])
71 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
72 ])
73 dnl
74 dnl If no reference was made to various pairs of opposing options, then
75 dnl we run the default mode handler for the pair. For example, if neither
76 dnl `shared' nor `disable-shared' was passed, we enable building of shared
77 dnl archives by default:
78 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
79 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
80 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
81 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
82 [_LT_ENABLE_FAST_INSTALL])
83 ])
84 ])# _LT_SET_OPTIONS
85
86
87 ## --------------------------------- ##
88 ## Macros to handle LT_INIT options. ##
89 ## --------------------------------- ##
90
91 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
92 # -----------------------------------------
93 m4_define([_LT_MANGLE_DEFUN],
94 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
95
96
97 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
98 # -----------------------------------------------
99 m4_define([LT_OPTION_DEFINE],
100 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
101 ])# LT_OPTION_DEFINE
102
103
104 # dlopen
105 # ------
106 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
107 ])
108
109 AU_DEFUN([AC_LIBTOOL_DLOPEN],
110 [_LT_SET_OPTION([LT_INIT], [dlopen])
111 AC_DIAGNOSE([obsolete],
112 [$0: Remove this warning and the call to _LT_SET_OPTION when you
113 put the `dlopen' option into LT_INIT's first parameter.])
114 ])
115
116 dnl aclocal-1.4 backwards compatibility:
117 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
118
119
120 # win32-dll
121 # ---------
122 # Declare package support for building win32 dll's.
123 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
124 [enable_win32_dll=yes
125
126 case $host in
127 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
128 AC_CHECK_TOOL(AS, as, false)
129 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
130 AC_CHECK_TOOL(OBJDUMP, objdump, false)
131 ;;
132 esac
133
134 test -z "$AS" && AS=as
135 _LT_DECL([], [AS], [0], [Assembler program])dnl
136
137 test -z "$DLLTOOL" && DLLTOOL=dlltool
138 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
139
140 test -z "$OBJDUMP" && OBJDUMP=objdump
141 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
142 ])# win32-dll
143
144 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
145 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
146 _LT_SET_OPTION([LT_INIT], [win32-dll])
147 AC_DIAGNOSE([obsolete],
148 [$0: Remove this warning and the call to _LT_SET_OPTION when you
149 put the `win32-dll' option into LT_INIT's first parameter.])
150 ])
151
152 dnl aclocal-1.4 backwards compatibility:
153 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
154
155
156 # _LT_ENABLE_SHARED([DEFAULT])
157 # ----------------------------
158 # implement the --enable-shared flag, and supports the `shared' and
159 # `disable-shared' LT_INIT options.
160 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
161 m4_define([_LT_ENABLE_SHARED],
162 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
163 AC_ARG_ENABLE([shared],
164 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
165 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
166 [p=${PACKAGE-default}
167 case $enableval in
168 yes) enable_shared=yes ;;
169 no) enable_shared=no ;;
170 *)
171 enable_shared=no
172 # Look at the argument we got. We use all the common list separators.
173 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
174 for pkg in $enableval; do
175 IFS="$lt_save_ifs"
176 if test "X$pkg" = "X$p"; then
177 enable_shared=yes
178 fi
179 done
180 IFS="$lt_save_ifs"
181 ;;
182 esac],
183 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
184
185 _LT_DECL([build_libtool_libs], [enable_shared], [0],
186 [Whether or not to build shared libraries])
187 ])# _LT_ENABLE_SHARED
188
189 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
190 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
191
192 # Old names:
193 AC_DEFUN([AC_ENABLE_SHARED],
194 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
195 ])
196
197 AC_DEFUN([AC_DISABLE_SHARED],
198 [_LT_SET_OPTION([LT_INIT], [disable-shared])
199 ])
200
201 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
202 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
203
204 dnl aclocal-1.4 backwards compatibility:
205 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
206 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
207
208
209
210 # _LT_ENABLE_STATIC([DEFAULT])
211 # ----------------------------
212 # implement the --enable-static flag, and support the `static' and
213 # `disable-static' LT_INIT options.
214 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
215 m4_define([_LT_ENABLE_STATIC],
216 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
217 AC_ARG_ENABLE([static],
218 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
219 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
220 [p=${PACKAGE-default}
221 case $enableval in
222 yes) enable_static=yes ;;
223 no) enable_static=no ;;
224 *)
225 enable_static=no
226 # Look at the argument we got. We use all the common list separators.
227 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
228 for pkg in $enableval; do
229 IFS="$lt_save_ifs"
230 if test "X$pkg" = "X$p"; then
231 enable_static=yes
232 fi
233 done
234 IFS="$lt_save_ifs"
235 ;;
236 esac],
237 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
238
239 _LT_DECL([build_old_libs], [enable_static], [0],
240 [Whether or not to build static libraries])
241 ])# _LT_ENABLE_STATIC
242
243 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
244 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
245
246 # Old names:
247 AC_DEFUN([AC_ENABLE_STATIC],
248 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
249 ])
250
251 AC_DEFUN([AC_DISABLE_STATIC],
252 [_LT_SET_OPTION([LT_INIT], [disable-static])
253 ])
254
255 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
256 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
257
258 dnl aclocal-1.4 backwards compatibility:
259 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
260 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
261
262
263
264 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
265 # ----------------------------------
266 # implement the --enable-fast-install flag, and support the `fast-install'
267 # and `disable-fast-install' LT_INIT options.
268 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
269 m4_define([_LT_ENABLE_FAST_INSTALL],
270 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
271 AC_ARG_ENABLE([fast-install],
272 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
273 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
274 [p=${PACKAGE-default}
275 case $enableval in
276 yes) enable_fast_install=yes ;;
277 no) enable_fast_install=no ;;
278 *)
279 enable_fast_install=no
280 # Look at the argument we got. We use all the common list separators.
281 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
282 for pkg in $enableval; do
283 IFS="$lt_save_ifs"
284 if test "X$pkg" = "X$p"; then
285 enable_fast_install=yes
286 fi
287 done
288 IFS="$lt_save_ifs"
289 ;;
290 esac],
291 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
292
293 _LT_DECL([fast_install], [enable_fast_install], [0],
294 [Whether or not to optimize for fast installation])dnl
295 ])# _LT_ENABLE_FAST_INSTALL
296
297 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
298 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
299
300 # Old names:
301 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
302 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
303 AC_DIAGNOSE([obsolete],
304 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
305 the `fast-install' option into LT_INIT's first parameter.])
306 ])
307
308 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
309 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
310 AC_DIAGNOSE([obsolete],
311 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
312 the `disable-fast-install' option into LT_INIT's first parameter.])
313 ])
314
315 dnl aclocal-1.4 backwards compatibility:
316 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
317 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
318
319
320 # _LT_WITH_PIC([MODE])
321 # --------------------
322 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
323 # LT_INIT options.
324 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
325 m4_define([_LT_WITH_PIC],
326 [AC_ARG_WITH([pic],
327 [AS_HELP_STRING([--with-pic],
328 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
329 [pic_mode="$withval"],
330 [pic_mode=default])
331
332 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
333
334 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
335 ])# _LT_WITH_PIC
336
337 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
338 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
339
340 # Old name:
341 AU_DEFUN([AC_LIBTOOL_PICMODE],
342 [_LT_SET_OPTION([LT_INIT], [pic-only])
343 AC_DIAGNOSE([obsolete],
344 [$0: Remove this warning and the call to _LT_SET_OPTION when you
345 put the `pic-only' option into LT_INIT's first parameter.])
346 ])
347
348 dnl aclocal-1.4 backwards compatibility:
349 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
350
351 ## ----------------- ##
352 ## LTDL_INIT Options ##
353 ## ----------------- ##
354
355 m4_define([_LTDL_MODE], [])
356 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
357 [m4_define([_LTDL_MODE], [nonrecursive])])
358 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
359 [m4_define([_LTDL_MODE], [recursive])])
360 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
361 [m4_define([_LTDL_MODE], [subproject])])
362
363 m4_define([_LTDL_TYPE], [])
364 LT_OPTION_DEFINE([LTDL_INIT], [installable],
365 [m4_define([_LTDL_TYPE], [installable])])
366 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
367 [m4_define([_LTDL_TYPE], [convenience])])
0 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
3 # Written by Gary V. Vaughan, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 6 ltsugar.m4
10
11 # This is to help aclocal find these macros, as it can't see m4_define.
12 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
13
14
15 # lt_join(SEP, ARG1, [ARG2...])
16 # -----------------------------
17 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
18 # associated separator.
19 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
20 # versions in m4sugar had bugs.
21 m4_define([lt_join],
22 [m4_if([$#], [1], [],
23 [$#], [2], [[$2]],
24 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
25 m4_define([_lt_join],
26 [m4_if([$#$2], [2], [],
27 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
28
29
30 # lt_car(LIST)
31 # lt_cdr(LIST)
32 # ------------
33 # Manipulate m4 lists.
34 # These macros are necessary as long as will still need to support
35 # Autoconf-2.59 which quotes differently.
36 m4_define([lt_car], [[$1]])
37 m4_define([lt_cdr],
38 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
39 [$#], 1, [],
40 [m4_dquote(m4_shift($@))])])
41 m4_define([lt_unquote], $1)
42
43
44 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
45 # ------------------------------------------
46 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
47 # Note that neither SEPARATOR nor STRING are expanded; they are appended
48 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
49 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
50 # than defined and empty).
51 #
52 # This macro is needed until we can rely on Autoconf 2.62, since earlier
53 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
54 m4_define([lt_append],
55 [m4_define([$1],
56 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
57
58
59
60 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
61 # ----------------------------------------------------------
62 # Produce a SEP delimited list of all paired combinations of elements of
63 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
64 # has the form PREFIXmINFIXSUFFIXn.
65 # Needed until we can rely on m4_combine added in Autoconf 2.62.
66 m4_define([lt_combine],
67 [m4_if(m4_eval([$# > 3]), [1],
68 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
69 [[m4_foreach([_Lt_prefix], [$2],
70 [m4_foreach([_Lt_suffix],
71 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
72 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
73
74
75 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
76 # -----------------------------------------------------------------------
77 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
78 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
79 m4_define([lt_if_append_uniq],
80 [m4_ifdef([$1],
81 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
82 [lt_append([$1], [$2], [$3])$4],
83 [$5])],
84 [lt_append([$1], [$2], [$3])$4])])
85
86
87 # lt_dict_add(DICT, KEY, VALUE)
88 # -----------------------------
89 m4_define([lt_dict_add],
90 [m4_define([$1($2)], [$3])])
91
92
93 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
94 # --------------------------------------------
95 m4_define([lt_dict_add_subkey],
96 [m4_define([$1($2:$3)], [$4])])
97
98
99 # lt_dict_fetch(DICT, KEY, [SUBKEY])
100 # ----------------------------------
101 m4_define([lt_dict_fetch],
102 [m4_ifval([$3],
103 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
104 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
105
106
107 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
108 # -----------------------------------------------------------------
109 m4_define([lt_if_dict_fetch],
110 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
111 [$5],
112 [$6])])
113
114
115 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
116 # --------------------------------------------------------------
117 m4_define([lt_dict_filter],
118 [m4_if([$5], [], [],
119 [lt_join(m4_quote(m4_default([$4], [[, ]])),
120 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
121 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
122 ])
0 # ltversion.m4 -- version numbers -*- Autoconf -*-
1 #
2 # Copyright (C) 2004 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # Generated from ltversion.in.
10
11 # serial 3017 ltversion.m4
12 # This file is part of GNU Libtool
13
14 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
15 m4_define([LT_PACKAGE_REVISION], [1.3017])
16
17 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.2.6b'
19 macro_revision='1.3017'
20 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
21 _LT_DECL(, macro_revision, 0)
22 ])
0 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004.
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 4 lt~obsolete.m4
10
11 # These exist entirely to fool aclocal when bootstrapping libtool.
12 #
13 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
14 # which have later been changed to m4_define as they aren't part of the
15 # exported API, or moved to Autoconf or Automake where they belong.
16 #
17 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
18 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
19 # using a macro with the same name in our local m4/libtool.m4 it'll
20 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
21 # and doesn't know about Autoconf macros at all.)
22 #
23 # So we provide this file, which has a silly filename so it's always
24 # included after everything else. This provides aclocal with the
25 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
26 # because those macros already exist, or will be overwritten later.
27 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
28 #
29 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
30 # Yes, that means every name once taken will need to remain here until
31 # we give up compatibility with versions before 1.7, at which point
32 # we need to keep only those names which we still refer to.
33
34 # This is to help aclocal find these macros, as it can't see m4_define.
35 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
36
37 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
38 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
39 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
40 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
41 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
42 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
43 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
44 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
45 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
46 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
47 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
48 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
49 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
50 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
51 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
52 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
53 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
54 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
55 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
56 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
57 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
58 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
59 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
60 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
61 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
62 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
63 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
64 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
65 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
66 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
67 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
68 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
69 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
70 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
71 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
72 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
73 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
74 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
75 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
76 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
77 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
78 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
79 m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
80 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
81 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
82 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
83 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
84 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
85 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
86 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
87 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
88 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
89 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
90 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
91 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
(New empty file)
0 # please keep this list sorted alphabetically
1
0 # Makefile for program source directory in GNU NLS utilities package.
1 # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
2 # Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
3 #
4 # This file may be copied and used freely without restrictions. It may
5 # be used in projects which are not available under a GNU Public License,
6 # but which still want to provide support for the GNU gettext functionality.
7 #
8 # - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
9 # instead of PACKAGE and to look for po2tbl in ./ not in intl/
10 #
11 # - Modified by jacob berkman <jacob@ximian.com> to install
12 # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
13 #
14 # - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
15 #
16 # We have the following line for use by intltoolize:
17 # INTLTOOL_MAKEFILE
18
19 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
20 PACKAGE = @PACKAGE@
21 VERSION = @VERSION@
22
23 SHELL = @SHELL@
24
25 srcdir = @srcdir@
26 top_srcdir = @top_srcdir@
27 top_builddir = @top_builddir@
28 VPATH = @srcdir@
29
30 prefix = @prefix@
31 exec_prefix = @exec_prefix@
32 datadir = @datadir@
33 datarootdir = @datarootdir@
34 libdir = @libdir@
35 DATADIRNAME = @DATADIRNAME@
36 itlocaledir = $(prefix)/$(DATADIRNAME)/locale
37 subdir = po
38 install_sh = @install_sh@
39 # Automake >= 1.8 provides @mkdir_p@.
40 # Until it can be supposed, use the safe fallback:
41 mkdir_p = $(install_sh) -d
42
43 INSTALL = @INSTALL@
44 INSTALL_DATA = @INSTALL_DATA@
45
46 GMSGFMT = @GMSGFMT@
47 MSGFMT = @MSGFMT@
48 XGETTEXT = @XGETTEXT@
49 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
50 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
51 MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
52 GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
53
54 ALL_LINGUAS = @ALL_LINGUAS@
55
56 PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
57
58 USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
59
60 USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
61
62 POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
63
64 DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
65 EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
66
67 POTFILES = \
68 # This comment gets stripped out
69
70 CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
71
72 .SUFFIXES:
73 .SUFFIXES: .po .pox .gmo .mo .msg .cat
74
75 .po.pox:
76 $(MAKE) $(GETTEXT_PACKAGE).pot
77 $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
78
79 .po.mo:
80 $(MSGFMT) -o $@ $<
81
82 .po.gmo:
83 file=`echo $* | sed 's,.*/,,'`.gmo \
84 && rm -f $$file && $(GMSGFMT) -o $$file $<
85
86 .po.cat:
87 sed -f ../intl/po2msg.sed < $< > $*.msg \
88 && rm -f $@ && gencat $@ $*.msg
89
90
91 all: all-@USE_NLS@
92
93 all-yes: $(CATALOGS)
94 all-no:
95
96 $(GETTEXT_PACKAGE).pot: $(POTFILES)
97 $(GENPOT)
98
99 install: install-data
100 install-data: install-data-@USE_NLS@
101 install-data-no: all
102 install-data-yes: all
103 linguas="$(USE_LINGUAS)"; \
104 for lang in $$linguas; do \
105 dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
106 $(mkdir_p) $$dir; \
107 if test -r $$lang.gmo; then \
108 $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
109 echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
110 else \
111 $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
112 echo "installing $(srcdir)/$$lang.gmo as" \
113 "$$dir/$(GETTEXT_PACKAGE).mo"; \
114 fi; \
115 if test -r $$lang.gmo.m; then \
116 $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
117 echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
118 else \
119 if test -r $(srcdir)/$$lang.gmo.m ; then \
120 $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
121 $$dir/$(GETTEXT_PACKAGE).mo.m; \
122 echo "installing $(srcdir)/$$lang.gmo.m as" \
123 "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
124 else \
125 true; \
126 fi; \
127 fi; \
128 done
129
130 # Empty stubs to satisfy archaic automake needs
131 dvi info ctags tags CTAGS TAGS ID:
132
133 # Define this as empty until I found a useful application.
134 install-exec installcheck:
135
136 uninstall:
137 linguas="$(USE_LINGUAS)"; \
138 for lang in $$linguas; do \
139 rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
140 rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
141 done
142
143 check: all $(GETTEXT_PACKAGE).pot
144 rm -f missing notexist
145 srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
146 if [ -r missing -o -r notexist ]; then \
147 exit 1; \
148 fi
149
150 mostlyclean:
151 rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
152 rm -f .intltool-merge-cache
153
154 clean: mostlyclean
155
156 distclean: clean
157 rm -f Makefile Makefile.in POTFILES stamp-it
158 rm -f *.mo *.msg *.cat *.cat.m *.gmo
159
160 maintainer-clean: distclean
161 @echo "This command is intended for maintainers to use;"
162 @echo "it deletes files that may require special tools to rebuild."
163 rm -f Makefile.in.in
164
165 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
166 dist distdir: $(DISTFILES)
167 dists="$(DISTFILES)"; \
168 extra_dists="$(EXTRA_DISTFILES)"; \
169 for file in $$extra_dists; do \
170 test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
171 done; \
172 for file in $$dists; do \
173 test -f $$file || file="$(srcdir)/$$file"; \
174 ln $$file $(distdir) 2> /dev/null \
175 || cp -p $$file $(distdir); \
176 done
177
178 update-po: Makefile
179 $(MAKE) $(GETTEXT_PACKAGE).pot
180 tmpdir=`pwd`; \
181 linguas="$(USE_LINGUAS)"; \
182 for lang in $$linguas; do \
183 echo "$$lang:"; \
184 result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
185 if $$result; then \
186 if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
187 rm -f $$tmpdir/$$lang.new.po; \
188 else \
189 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
190 :; \
191 else \
192 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
193 rm -f $$tmpdir/$$lang.new.po; \
194 exit 1; \
195 fi; \
196 fi; \
197 else \
198 echo "msgmerge for $$lang.gmo failed!"; \
199 rm -f $$tmpdir/$$lang.new.po; \
200 fi; \
201 done
202
203 Makefile POTFILES: stamp-it
204 @if test ! -f $@; then \
205 rm -f stamp-it; \
206 $(MAKE) stamp-it; \
207 fi
208
209 stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
210 cd $(top_builddir) \
211 && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
212 $(SHELL) ./config.status
213
214 # Tell versions [3.59,3.63) of GNU make not to export all variables.
215 # Otherwise a system limit (for SysV at least) may be exceeded.
216 .NOEXPORT:
0 # List of source files containing translatable strings.
1 # Please keep this file sorted alphabetically.
2
3 src/vinagre/plugin.c
4 src/vinagre/ssh-contact.vinagre-plugin.desktop.in
5 src/vinagre/tab.c
6
0 AM_CPPFLAGS = \
1 -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
2 -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
3 -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
4 $(SSH_CONTACT_CFLAGS)
0 if HAVE_VINAGRE
1 SUBDIRS = vinagre
2 endif
53
6 AM_CFLAGS = -Wall -g -Werror
4 AM_CPPFLAGS = \
5 $(ERROR_CFLAGS) \
6 $(SSH_CONTACT_CFLAGS) \
7 $(NULL)
78
8 LDADD = $(SSH_CONTACT_LIBS)
9 LDADD = \
10 $(SSH_CONTACT_LIBS) \
11 $(NULL)
912
1013 bin_PROGRAMS = ssh-contact
1114 libexec_PROGRAMS = ssh-contact-service
1215
1316 ssh_contact_SOURCES = \
1417 common.c common.h \
18 client-helpers.c client-helpers.h \
1519 client.c
1620
1721 ssh_contact_service_SOURCES = \
3939 subdir = src
4040 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
4141 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
42 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
42 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \
43 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
44 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
45 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
4346 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4447 $(ACLOCAL_M4)
4548 mkinstalldirs = $(install_sh) -d
4952 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
5053 "$(DESTDIR)$(clientfiledir)" "$(DESTDIR)$(servicefiledir)"
5154 PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS)
52 am_ssh_contact_OBJECTS = common.$(OBJEXT) client.$(OBJEXT)
55 am_ssh_contact_OBJECTS = common.$(OBJEXT) client-helpers.$(OBJEXT) \
56 client.$(OBJEXT)
5357 ssh_contact_OBJECTS = $(am_ssh_contact_OBJECTS)
5458 ssh_contact_LDADD = $(LDADD)
5559 am__DEPENDENCIES_1 =
8993 am__v_GEN_0 = @echo " GEN " $@;
9094 SOURCES = $(ssh_contact_SOURCES) $(ssh_contact_service_SOURCES)
9195 DIST_SOURCES = $(ssh_contact_SOURCES) $(ssh_contact_service_SOURCES)
96 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
97 html-recursive info-recursive install-data-recursive \
98 install-dvi-recursive install-exec-recursive \
99 install-html-recursive install-info-recursive \
100 install-pdf-recursive install-ps-recursive install-recursive \
101 installcheck-recursive installdirs-recursive pdf-recursive \
102 ps-recursive uninstall-recursive
92103 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
93104 am__vpath_adj = case $$p in \
94105 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
111122 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
112123 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
113124 DATA = $(clientfile_DATA) $(servicefile_DATA)
125 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
126 distclean-recursive maintainer-clean-recursive
127 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
128 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
129 distdir
114130 ETAGS = etags
115131 CTAGS = ctags
132 DIST_SUBDIRS = vinagre
116133 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
134 am__relativize = \
135 dir0=`pwd`; \
136 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
137 sed_rest='s,^[^/]*/*,,'; \
138 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
139 sed_butlast='s,/*[^/]*$$,,'; \
140 while test -n "$$dir1"; do \
141 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
142 if test "$$first" != "."; then \
143 if test "$$first" = ".."; then \
144 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
145 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
146 else \
147 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
148 if test "$$first2" = "$$first"; then \
149 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
150 else \
151 dir2="../$$dir2"; \
152 fi; \
153 dir0="$$dir0"/"$$first"; \
154 fi; \
155 fi; \
156 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
157 done; \
158 reldir="$$dir2"
117159 ACLOCAL = @ACLOCAL@
160 ALL_LINGUAS = @ALL_LINGUAS@
118161 AMTAR = @AMTAR@
119162 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
120163 AR = @AR@
122165 AUTOHEADER = @AUTOHEADER@
123166 AUTOMAKE = @AUTOMAKE@
124167 AWK = @AWK@
168 CATALOGS = @CATALOGS@
169 CATOBJEXT = @CATOBJEXT@
125170 CC = @CC@
126171 CCDEPMODE = @CCDEPMODE@
127172 CFLAGS = @CFLAGS@
128173 CPP = @CPP@
129174 CPPFLAGS = @CPPFLAGS@
130175 CYGPATH_W = @CYGPATH_W@
176 DATADIRNAME = @DATADIRNAME@
131177 DEFS = @DEFS@
132178 DEPDIR = @DEPDIR@
133179 DSYMUTIL = @DSYMUTIL@
136182 ECHO_N = @ECHO_N@
137183 ECHO_T = @ECHO_T@
138184 EGREP = @EGREP@
185 ERROR_CFLAGS = @ERROR_CFLAGS@
139186 EXEEXT = @EXEEXT@
140187 FGREP = @FGREP@
188 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
189 GLIB_CFLAGS = @GLIB_CFLAGS@
190 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
191 GLIB_LIBS = @GLIB_LIBS@
192 GLIB_MKENUMS = @GLIB_MKENUMS@
193 GMOFILES = @GMOFILES@
194 GMSGFMT = @GMSGFMT@
195 GOBJECT_QUERY = @GOBJECT_QUERY@
141196 GREP = @GREP@
142197 INSTALL = @INSTALL@
143198 INSTALL_DATA = @INSTALL_DATA@
144199 INSTALL_PROGRAM = @INSTALL_PROGRAM@
145200 INSTALL_SCRIPT = @INSTALL_SCRIPT@
146201 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
202 INSTOBJEXT = @INSTOBJEXT@
203 INTLLIBS = @INTLLIBS@
204 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
205 INTLTOOL_MERGE = @INTLTOOL_MERGE@
206 INTLTOOL_PERL = @INTLTOOL_PERL@
207 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
147208 LD = @LD@
148209 LDFLAGS = @LDFLAGS@
149210 LIBOBJS = @LIBOBJS@
155216 MAINT = @MAINT@
156217 MAKEINFO = @MAKEINFO@
157218 MKDIR_P = @MKDIR_P@
219 MKINSTALLDIRS = @MKINSTALLDIRS@
220 MSGFMT = @MSGFMT@
221 MSGFMT_OPTS = @MSGFMT_OPTS@
222 MSGMERGE = @MSGMERGE@
158223 NM = @NM@
159224 NMEDIT = @NMEDIT@
160225 OBJDUMP = @OBJDUMP@
170235 PACKAGE_VERSION = @PACKAGE_VERSION@
171236 PATH_SEPARATOR = @PATH_SEPARATOR@
172237 PKG_CONFIG = @PKG_CONFIG@
238 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
239 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
240 POFILES = @POFILES@
241 POSUB = @POSUB@
242 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
243 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
173244 RANLIB = @RANLIB@
174245 SED = @SED@
175246 SET_MAKE = @SET_MAKE@
177248 SSH_CONTACT_CFLAGS = @SSH_CONTACT_CFLAGS@
178249 SSH_CONTACT_LIBS = @SSH_CONTACT_LIBS@
179250 STRIP = @STRIP@
251 USE_NLS = @USE_NLS@
180252 VERSION = @VERSION@
253 VINAGRE_CFLAGS = @VINAGRE_CFLAGS@
254 VINAGRE_LIBS = @VINAGRE_LIBS@
255 XGETTEXT = @XGETTEXT@
256 XMKMF = @XMKMF@
257 X_CFLAGS = @X_CFLAGS@
258 X_EXTRA_LIBS = @X_EXTRA_LIBS@
259 X_LIBS = @X_LIBS@
260 X_PRE_LIBS = @X_PRE_LIBS@
181261 abs_builddir = @abs_builddir@
182262 abs_srcdir = @abs_srcdir@
183263 abs_top_builddir = @abs_top_builddir@
230310 top_build_prefix = @top_build_prefix@
231311 top_builddir = @top_builddir@
232312 top_srcdir = @top_srcdir@
313 @HAVE_VINAGRE_TRUE@SUBDIRS = vinagre
233314 AM_CPPFLAGS = \
234 -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
235 -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
236 -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
237 $(SSH_CONTACT_CFLAGS)
238
239 AM_CFLAGS = -Wall -g -Werror
240 LDADD = $(SSH_CONTACT_LIBS)
315 $(ERROR_CFLAGS) \
316 $(SSH_CONTACT_CFLAGS) \
317 $(NULL)
318
319 LDADD = \
320 $(SSH_CONTACT_LIBS) \
321 $(NULL)
322
241323 ssh_contact_SOURCES = \
242324 common.c common.h \
325 client-helpers.c client-helpers.h \
243326 client.c
244327
245328 ssh_contact_service_SOURCES = \
264347 $(servicefile_DATA) \
265348 $(NULL)
266349
267 all: all-am
350 all: all-recursive
268351
269352 .SUFFIXES:
270353 .SUFFIXES: .c .lo .o .obj
277360 exit 1;; \
278361 esac; \
279362 done; \
280 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
363 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
281364 $(am__cd) $(top_srcdir) && \
282 $(AUTOMAKE) --foreign src/Makefile
365 $(AUTOMAKE) --gnu src/Makefile
283366 .PRECIOUS: Makefile
284367 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
285368 @case '$?' in \
397480 distclean-compile:
398481 -rm -f *.tab.c
399482
483 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client-helpers.Po@am__quote@
400484 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@
401485 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@
402486 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/service.Po@am__quote@
471555 echo " ( cd '$(DESTDIR)$(servicefiledir)' && rm -f" $$files ")"; \
472556 cd "$(DESTDIR)$(servicefiledir)" && rm -f $$files
473557
558 # This directory's subdirectories are mostly independent; you can cd
559 # into them and run `make' without going through this Makefile.
560 # To change the values of `make' variables: instead of editing Makefiles,
561 # (1) if the variable is set in `config.status', edit `config.status'
562 # (which will cause the Makefiles to be regenerated when you run `make');
563 # (2) otherwise, pass the desired values on the `make' command line.
564 $(RECURSIVE_TARGETS):
565 @fail= failcom='exit 1'; \
566 for f in x $$MAKEFLAGS; do \
567 case $$f in \
568 *=* | --[!k]*);; \
569 *k*) failcom='fail=yes';; \
570 esac; \
571 done; \
572 dot_seen=no; \
573 target=`echo $@ | sed s/-recursive//`; \
574 list='$(SUBDIRS)'; for subdir in $$list; do \
575 echo "Making $$target in $$subdir"; \
576 if test "$$subdir" = "."; then \
577 dot_seen=yes; \
578 local_target="$$target-am"; \
579 else \
580 local_target="$$target"; \
581 fi; \
582 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
583 || eval $$failcom; \
584 done; \
585 if test "$$dot_seen" = "no"; then \
586 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
587 fi; test -z "$$fail"
588
589 $(RECURSIVE_CLEAN_TARGETS):
590 @fail= failcom='exit 1'; \
591 for f in x $$MAKEFLAGS; do \
592 case $$f in \
593 *=* | --[!k]*);; \
594 *k*) failcom='fail=yes';; \
595 esac; \
596 done; \
597 dot_seen=no; \
598 case "$@" in \
599 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
600 *) list='$(SUBDIRS)' ;; \
601 esac; \
602 rev=''; for subdir in $$list; do \
603 if test "$$subdir" = "."; then :; else \
604 rev="$$subdir $$rev"; \
605 fi; \
606 done; \
607 rev="$$rev ."; \
608 target=`echo $@ | sed s/-recursive//`; \
609 for subdir in $$rev; do \
610 echo "Making $$target in $$subdir"; \
611 if test "$$subdir" = "."; then \
612 local_target="$$target-am"; \
613 else \
614 local_target="$$target"; \
615 fi; \
616 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
617 || eval $$failcom; \
618 done && test -z "$$fail"
619 tags-recursive:
620 list='$(SUBDIRS)'; for subdir in $$list; do \
621 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
622 done
623 ctags-recursive:
624 list='$(SUBDIRS)'; for subdir in $$list; do \
625 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
626 done
627
474628 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
475629 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
476630 unique=`for i in $$list; do \
481635 mkid -fID $$unique
482636 tags: TAGS
483637
484 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
638 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
485639 $(TAGS_FILES) $(LISP)
486640 set x; \
487641 here=`pwd`; \
642 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
643 include_option=--etags-include; \
644 empty_fix=.; \
645 else \
646 include_option=--include; \
647 empty_fix=; \
648 fi; \
649 list='$(SUBDIRS)'; for subdir in $$list; do \
650 if test "$$subdir" = .; then :; else \
651 test ! -f $$subdir/TAGS || \
652 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
653 fi; \
654 done; \
488655 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
489656 unique=`for i in $$list; do \
490657 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
503670 fi; \
504671 fi
505672 ctags: CTAGS
506 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
673 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
507674 $(TAGS_FILES) $(LISP)
508675 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
509676 unique=`for i in $$list; do \
553720 || exit 1; \
554721 fi; \
555722 done
723 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
724 if test "$$subdir" = .; then :; else \
725 test -d "$(distdir)/$$subdir" \
726 || $(MKDIR_P) "$(distdir)/$$subdir" \
727 || exit 1; \
728 fi; \
729 done
730 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
731 if test "$$subdir" = .; then :; else \
732 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
733 $(am__relativize); \
734 new_distdir=$$reldir; \
735 dir1=$$subdir; dir2="$(top_distdir)"; \
736 $(am__relativize); \
737 new_top_distdir=$$reldir; \
738 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
739 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
740 ($(am__cd) $$subdir && \
741 $(MAKE) $(AM_MAKEFLAGS) \
742 top_distdir="$$new_top_distdir" \
743 distdir="$$new_distdir" \
744 am__remove_distdir=: \
745 am__skip_length_check=: \
746 am__skip_mode_fix=: \
747 distdir) \
748 || exit 1; \
749 fi; \
750 done
556751 check-am: all-am
557 check: check-am
752 check: check-recursive
558753 all-am: Makefile $(PROGRAMS) $(DATA)
559 installdirs:
754 installdirs: installdirs-recursive
755 installdirs-am:
560756 for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(clientfiledir)" "$(DESTDIR)$(servicefiledir)"; do \
561757 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
562758 done
563 install: install-am
564 install-exec: install-exec-am
565 install-data: install-data-am
566 uninstall: uninstall-am
759 install: install-recursive
760 install-exec: install-exec-recursive
761 install-data: install-data-recursive
762 uninstall: uninstall-recursive
567763
568764 install-am: all-am
569765 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
570766
571 installcheck: installcheck-am
767 installcheck: installcheck-recursive
572768 install-strip:
573769 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
574770 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
586782 maintainer-clean-generic:
587783 @echo "This command is intended for maintainers to use"
588784 @echo "it deletes files that may require special tools to rebuild."
589 clean: clean-am
785 clean: clean-recursive
590786
591787 clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
592788 clean-libtool mostlyclean-am
593789
594 distclean: distclean-am
790 distclean: distclean-recursive
595791 -rm -rf ./$(DEPDIR)
596792 -rm -f Makefile
597793 distclean-am: clean-am distclean-compile distclean-generic \
598794 distclean-tags
599795
600 dvi: dvi-am
796 dvi: dvi-recursive
601797
602798 dvi-am:
603799
604 html: html-am
800 html: html-recursive
605801
606802 html-am:
607803
608 info: info-am
804 info: info-recursive
609805
610806 info-am:
611807
612808 install-data-am: install-clientfileDATA install-servicefileDATA
613809
614 install-dvi: install-dvi-am
810 install-dvi: install-dvi-recursive
615811
616812 install-dvi-am:
617813
618814 install-exec-am: install-binPROGRAMS install-libexecPROGRAMS
619815
620 install-html: install-html-am
816 install-html: install-html-recursive
621817
622818 install-html-am:
623819
624 install-info: install-info-am
820 install-info: install-info-recursive
625821
626822 install-info-am:
627823
628824 install-man:
629825
630 install-pdf: install-pdf-am
826 install-pdf: install-pdf-recursive
631827
632828 install-pdf-am:
633829
634 install-ps: install-ps-am
830 install-ps: install-ps-recursive
635831
636832 install-ps-am:
637833
638834 installcheck-am:
639835
640 maintainer-clean: maintainer-clean-am
836 maintainer-clean: maintainer-clean-recursive
641837 -rm -rf ./$(DEPDIR)
642838 -rm -f Makefile
643839 maintainer-clean-am: distclean-am maintainer-clean-generic
644840
645 mostlyclean: mostlyclean-am
841 mostlyclean: mostlyclean-recursive
646842
647843 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
648844 mostlyclean-libtool
649845
650 pdf: pdf-am
846 pdf: pdf-recursive
651847
652848 pdf-am:
653849
654 ps: ps-am
850 ps: ps-recursive
655851
656852 ps-am:
657853
658854 uninstall-am: uninstall-binPROGRAMS uninstall-clientfileDATA \
659855 uninstall-libexecPROGRAMS uninstall-servicefileDATA
660856
661 .MAKE: install-am install-strip
662
663 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
857 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
858 install-am install-strip tags-recursive
859
860 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
861 all all-am check check-am clean clean-binPROGRAMS \
664862 clean-generic clean-libexecPROGRAMS clean-libtool ctags \
665 distclean distclean-compile distclean-generic \
863 ctags-recursive distclean distclean-compile distclean-generic \
666864 distclean-libtool distclean-tags distdir dvi dvi-am html \
667865 html-am info info-am install install-am install-binPROGRAMS \
668866 install-clientfileDATA install-data install-data-am \
670868 install-html install-html-am install-info install-info-am \
671869 install-libexecPROGRAMS install-man install-pdf install-pdf-am \
672870 install-ps install-ps-am install-servicefileDATA install-strip \
673 installcheck installcheck-am installdirs maintainer-clean \
674 maintainer-clean-generic mostlyclean mostlyclean-compile \
675 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
676 tags uninstall uninstall-am uninstall-binPROGRAMS \
677 uninstall-clientfileDATA uninstall-libexecPROGRAMS \
678 uninstall-servicefileDATA
871 installcheck installcheck-am installdirs installdirs-am \
872 maintainer-clean maintainer-clean-generic mostlyclean \
873 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
874 pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
875 uninstall-binPROGRAMS uninstall-clientfileDATA \
876 uninstall-libexecPROGRAMS uninstall-servicefileDATA
679877
680878
681879 org.freedesktop.Telepathy.Client.SSHContact.service: org.freedesktop.Telepathy.Client.SSHContact.service.in
0 /*
1 * Copyright (C) 2010 Xavier Claessens <xclaesse@gmail.com>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #include "config.h"
21
22 #include "client-helpers.h"
23 #include "common.h"
24
25 typedef struct
26 {
27 GSocketConnection *connection;
28 TpChannel *channel;
29 } CreateTubeData;
30
31 static void
32 create_tube_data_free (CreateTubeData *data)
33 {
34 tp_clear_object (&data->connection);
35 tp_clear_object (&data->channel);
36
37 g_slice_free (CreateTubeData, data);
38 }
39
40 static void create_tube_channel_invalidated_cb (TpProxy *proxy, guint domain,
41 gint code, gchar *message, GSimpleAsyncResult *simple);
42 static void create_tube_incoming_cb (TpStreamTubeChannel *channel,
43 TpStreamTubeConnection *tube_connection, GSimpleAsyncResult *simple);
44
45 static void
46 create_tube_complete (GSimpleAsyncResult *simple, const GError *error)
47 {
48 CreateTubeData *data;
49
50 g_object_ref (simple);
51
52 data = g_simple_async_result_get_op_res_gpointer (simple);
53
54 if (data->channel != NULL)
55 {
56 g_signal_handlers_disconnect_by_func (data->channel,
57 create_tube_channel_invalidated_cb, simple);
58 g_signal_handlers_disconnect_by_func (data->channel,
59 create_tube_incoming_cb, simple);
60 }
61
62 if (error != NULL)
63 g_simple_async_result_set_from_error (simple, error);
64
65 g_simple_async_result_complete (simple);
66
67 g_object_unref (simple);
68 }
69
70 static void
71 create_tube_channel_invalidated_cb (TpProxy *proxy,
72 guint domain,
73 gint code,
74 gchar *message,
75 GSimpleAsyncResult *simple)
76 {
77 create_tube_complete (simple,
78 tp_proxy_get_invalidated (proxy));
79 }
80
81 static void
82 create_tube_incoming_cb (TpStreamTubeChannel *channel,
83 TpStreamTubeConnection *tube_connection,
84 GSimpleAsyncResult *simple)
85 {
86 CreateTubeData *data;
87
88 data = g_simple_async_result_get_op_res_gpointer (simple);
89 data->connection = tp_stream_tube_connection_get_socket_connection (
90 tube_connection);
91 g_object_ref (data->connection);
92
93 create_tube_complete (simple, NULL);
94 }
95
96 static void
97 create_tube_offer_cb (GObject *object,
98 GAsyncResult *res,
99 gpointer user_data)
100 {
101 GSimpleAsyncResult *simple = user_data;
102 GError *error = NULL;
103 CreateTubeData *data;
104
105 data = g_simple_async_result_get_op_res_gpointer (simple);
106
107 if (!tp_stream_tube_channel_offer_finish (TP_STREAM_TUBE_CHANNEL (object),
108 res, &error))
109 create_tube_complete (simple, error);
110
111 g_clear_error (&error);
112 g_object_unref (simple);
113 }
114
115 static void
116 create_channel_cb (GObject *acr,
117 GAsyncResult *res,
118 gpointer user_data)
119 {
120 GSimpleAsyncResult *simple = user_data;
121 CreateTubeData *data;
122 GError *error = NULL;
123
124 data = g_simple_async_result_get_op_res_gpointer (simple);
125
126 data->channel = tp_account_channel_request_create_and_handle_channel_finish (
127 TP_ACCOUNT_CHANNEL_REQUEST (acr), res, NULL, &error);
128 if (!TP_IS_STREAM_TUBE_CHANNEL (data->channel))
129 {
130 tp_clear_object (&data->channel);
131
132 if (error == NULL)
133 error = g_error_new_literal (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
134 "Not supported channel type");
135
136 create_tube_complete (simple, error);
137
138 g_clear_error (&error);
139 g_object_unref (simple);
140 return;
141 }
142
143 g_signal_connect (data->channel, "invalidated",
144 G_CALLBACK (create_tube_channel_invalidated_cb), simple);
145
146 g_signal_connect_data (data->channel, "incoming",
147 G_CALLBACK (create_tube_incoming_cb),
148 g_object_ref (simple), (GClosureNotify) g_object_unref, 0);
149
150 tp_stream_tube_channel_offer_async (TP_STREAM_TUBE_CHANNEL (data->channel),
151 NULL, create_tube_offer_cb, g_object_ref (simple));
152
153 g_object_unref (simple);
154 }
155
156 void
157 _client_create_tube_async (const gchar *account_path,
158 const gchar *contact_id,
159 GAsyncReadyCallback callback,
160 gpointer user_data)
161 {
162 GSimpleAsyncResult *simple;
163 CreateTubeData *data;
164 GHashTable *request;
165 TpDBusDaemon *dbus;
166 TpAccount *account = NULL;
167 TpAccountChannelRequest *acr;
168 GError *error = NULL;
169
170 dbus = tp_dbus_daemon_dup (&error);
171 if (dbus != NULL)
172 account = tp_account_new (dbus, account_path, &error);
173 if (account == NULL)
174 {
175 g_simple_async_report_gerror_in_idle (NULL, callback, user_data, error);
176 g_clear_error (&error);
177 tp_clear_object (&dbus);
178 return;
179 }
180
181 simple = g_simple_async_result_new (NULL, callback, user_data,
182 _client_create_tube_finish);
183
184 data = g_slice_new0 (CreateTubeData);
185 g_simple_async_result_set_op_res_gpointer (simple, data,
186 (GDestroyNotify) create_tube_data_free);
187
188 request = tp_asv_new (
189 TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
190 TP_IFACE_CHANNEL_TYPE_STREAM_TUBE,
191 TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
192 TP_HANDLE_TYPE_CONTACT,
193 TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING,
194 contact_id,
195 TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE, G_TYPE_STRING,
196 TUBE_SERVICE,
197 NULL);
198
199 acr = tp_account_channel_request_new (account, request, G_MAXINT64);
200 tp_account_channel_request_create_and_handle_channel_async (acr,
201 NULL, create_channel_cb, simple);
202
203 g_hash_table_unref (request);
204 g_object_unref (dbus);
205 g_object_unref (account);
206 g_object_unref (acr);
207 }
208
209 GSocketConnection *
210 _client_create_tube_finish (GAsyncResult *result,
211 TpChannel **channel,
212 GError **error)
213 {
214 GSimpleAsyncResult *simple;
215 CreateTubeData *data;
216
217 g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), NULL);
218
219 simple = G_SIMPLE_ASYNC_RESULT (result);
220
221 if (g_simple_async_result_propagate_error (simple, error))
222 return NULL;
223
224 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
225 _client_create_tube_finish), NULL);
226
227 data = g_simple_async_result_get_op_res_gpointer (
228 G_SIMPLE_ASYNC_RESULT (result));
229
230 if (channel != NULL)
231 *channel = g_object_ref (data->channel);
232
233 return g_object_ref (data->connection);
234 }
235
236 GSocket *
237 _client_create_local_socket (GError **error)
238 {
239 GSocket *socket = NULL;
240 GInetAddress * inet_address = NULL;
241 GSocketAddress *socket_address = NULL;
242
243 /* Create the IPv4 socket, and listen for connection on it */
244 socket = g_socket_new (G_SOCKET_FAMILY_IPV4, G_SOCKET_TYPE_STREAM,
245 G_SOCKET_PROTOCOL_DEFAULT, error);
246 if (socket != NULL)
247 {
248 inet_address = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4);
249 socket_address = g_inet_socket_address_new (inet_address, 0);
250 g_socket_bind (socket, socket_address, FALSE, error);
251 }
252
253 tp_clear_object (&inet_address);
254 tp_clear_object (&socket_address);
255
256 return socket;
257 }
258
259 GStrv
260 _client_create_exec_args (GSocket *socket,
261 const gchar *contact_id,
262 const gchar *username)
263 {
264 GPtrArray *args;
265 GSocketAddress *socket_address;
266 GInetAddress *inet_address;
267 guint16 port;
268 gchar *host;
269 gchar *str;
270
271 /* Get the local host and port on which sshd is running */
272 socket_address = g_socket_get_local_address (socket, NULL);
273 inet_address = g_inet_socket_address_get_address (
274 G_INET_SOCKET_ADDRESS (socket_address));
275 port = g_inet_socket_address_get_port (
276 G_INET_SOCKET_ADDRESS (socket_address));
277 host = g_inet_address_to_string (inet_address);
278
279 /* Create ssh client args */
280 args = g_ptr_array_new_with_free_func (g_free);
281 g_ptr_array_add (args, g_strdup ("ssh"));
282 g_ptr_array_add (args, host);
283
284 g_ptr_array_add (args, g_strdup ("-p"));
285 str = g_strdup_printf ("%d", port);
286 g_ptr_array_add (args, str);
287
288 if (contact_id != NULL)
289 {
290 str = g_strdup_printf ("-oHostKeyAlias=%s", contact_id);
291 g_ptr_array_add (args, str);
292 }
293
294 if (!tp_str_empty (username))
295 {
296 g_ptr_array_add (args, g_strdup ("-l"));
297 g_ptr_array_add (args, g_strdup (username));
298 }
299
300 g_ptr_array_add (args, NULL);
301
302 return (gchar **) g_ptr_array_free (args, FALSE);
303 }
304
305 gboolean
306 _capabilities_has_stream_tube (TpCapabilities *caps)
307 {
308 GPtrArray *classes;
309 guint i;
310
311 if (caps == NULL)
312 return FALSE;
313
314 classes = tp_capabilities_get_channel_classes (caps);
315 for (i = 0; i < classes->len; i++)
316 {
317 GValueArray *arr = g_ptr_array_index (classes, i);
318 GHashTable *fixed;
319 const gchar *chan_type;
320 const gchar *service;
321 TpHandleType handle_type;
322
323 fixed = g_value_get_boxed (g_value_array_get_nth (arr, 0));
324 chan_type = tp_asv_get_string (fixed, TP_PROP_CHANNEL_CHANNEL_TYPE);
325 service = tp_asv_get_string (fixed,
326 TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE);
327 handle_type = tp_asv_get_uint32 (fixed,
328 TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL);
329
330 if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE) &&
331 handle_type == TP_HANDLE_TYPE_CONTACT &&
332 (!tp_capabilities_is_specific_to_contact (caps) ||
333 !tp_strdiff (service, TUBE_SERVICE)))
334 return TRUE;
335 }
336
337 return FALSE;
338 }
0 /*
1 * Copyright (C) 2010 Xavier Claessens <xclaesse@gmail.com>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #ifndef __CLIENT_HELPERS_H__
21 #define __CLIENT_HELPERS_H__
22
23 #include <gio/gio.h>
24 #include <telepathy-glib/telepathy-glib.h>
25
26 G_BEGIN_DECLS
27
28 void _client_create_tube_async (const gchar *account_path,
29 const gchar *contact_id, GAsyncReadyCallback callback, gpointer user_data);
30
31 GSocketConnection *_client_create_tube_finish (GAsyncResult *res,
32 TpChannel **channel, GError **error);
33
34 GSocket *_client_create_local_socket (GError **error);
35
36 GStrv _client_create_exec_args (GSocket *socket, const gchar *contact_id,
37 const gchar *username);
38
39 gboolean _capabilities_has_stream_tube (TpCapabilities *caps);
40
41 G_END_DECLS
42
43 #endif /* #ifndef __CLIENT_HELPERS_H__*/
1919
2020 #include "config.h"
2121
22 #include <string.h>
2223 #include <stdlib.h>
23 #include <string.h>
24 #include <unistd.h>
25
26 #include <glib/gstdio.h>
27 #include <gio/gunixsocketaddress.h>
24 #include <stdio.h>
25
26 #include <gio/gio.h>
2827 #include <telepathy-glib/telepathy-glib.h>
2928
29 #include "client-helpers.h"
3030 #include "common.h"
3131
3232 typedef struct
3333 {
3434 GMainLoop *loop;
35
36 gchar *account_id;
35 gchar *argv0;
36
37 gchar *account_path;
3738 gchar *contact_id;
3839 gchar *login;
39
40 TpBaseClient *client;
4140
4241 GList *accounts;
4342 guint n_readying_connections;
4443 TpAccount *account;
4544
46 gchar *unix_path;
45 TpChannel *channel;
4746 GSocketConnection *tube_connection;
4847 GSocketConnection *ssh_connection;
4948
49 gboolean account_set:1;
50 gboolean contact_set:1;
5051 gboolean success:1;
5152 } ClientContext;
5253
5354 static void
55 channel_invalidated_cb (TpChannel *channel,
56 guint domain,
57 gint code,
58 gchar *message,
59 ClientContext *context)
60 {
61 g_main_loop_quit (context->loop);
62 }
63
64 static void
65 leave (ClientContext *context)
66 {
67 if (context->channel != NULL &&
68 tp_proxy_get_invalidated (context->channel) == NULL)
69 tp_cli_channel_call_close (context->channel, -1, NULL, NULL, NULL, NULL);
70 else
71 g_main_loop_quit (context->loop);
72 }
73
74 static void
5475 throw_error_message (ClientContext *context,
5576 const gchar *message)
5677 {
57 g_debug ("Error: %s", message);
78 g_print ("Error: %s\n", message);
5879 context->success = FALSE;
59 g_main_loop_quit (context->loop);
80 leave (context);
6081 }
6182
6283 static void
6788 }
6889
6990 static void
70 splice_cb (GIOStream *stream1,
71 GIOStream *stream2,
72 const GError *error,
73 gpointer user_data)
74 {
75 ClientContext *context = user_data;
76
77 if (error != NULL)
91 ssh_client_watch_cb (GPid pid,
92 gint status,
93 gpointer user_data)
94 {
95 ClientContext *context = user_data;
96
97 leave (context);
98 g_spawn_close_pid (pid);
99 }
100
101 static void
102 splice_cb (GObject *source_object,
103 GAsyncResult *res,
104 gpointer user_data)
105 {
106 ClientContext *context = user_data;
107 GError *error = NULL;
108
109 if (!_g_io_stream_splice_finish (res, &error))
78110 throw_error (context, error);
79111 else
80 g_main_loop_quit (context->loop);
112 leave (context);
113
114 g_clear_error (&error);
81115 }
82116
83117 static void
91125
92126 context->ssh_connection = g_socket_listener_accept_finish (listener, res,
93127 NULL, &error);
94 if (context->ssh_connection == NULL)
128 if (error != NULL)
95129 {
96130 throw_error (context, error);
131 g_clear_error (&error);
97132 return;
98133 }
99134
100135 /* Splice tube and ssh connections */
101 _g_io_stream_splice (G_IO_STREAM (context->tube_connection),
102 G_IO_STREAM (context->ssh_connection), splice_cb, context);
103 }
104
105 static void
106 ssh_client_watch_cb (GPid pid,
107 gint status,
108 gpointer user_data)
109 {
110 ClientContext *context = user_data;
111
112 g_main_loop_quit (context->loop);
113 g_spawn_close_pid (pid);
114 }
115
116 static void
117 exec_ssh_on_socket (ClientContext *context,
118 GSocket *socket)
119 {
120 GSocketAddress *socket_address;
121 GInetAddress *inet_address;
136 _g_io_stream_splice_async (G_IO_STREAM (context->tube_connection),
137 G_IO_STREAM (context->ssh_connection), _G_IO_STREAM_SPLICE_NONE,
138 G_PRIORITY_DEFAULT, NULL, splice_cb, context);
139 }
140
141 static void
142 create_tube_cb (GObject *source_object,
143 GAsyncResult *res,
144 gpointer user_data)
145 {
146 ClientContext *context = user_data;
147 GSocketListener *listener;
148 GSocket *socket;
149 GStrv args = NULL;
150 GPid pid;
122151 GError *error = NULL;
123 guint16 port;
124 gchar *host;
125 GPtrArray *args;
126 gchar *str;
127 GPid pid;
128
129 /* Get the local host and port on which sshd is running */
130 socket_address = g_socket_get_local_address (socket, &error);
131 if (socket_address == NULL)
152
153 context->tube_connection = _client_create_tube_finish (res, &context->channel,
154 &error);
155 if (error != NULL)
132156 {
133157 throw_error (context, error);
134 return;
135 }
136 inet_address = g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (socket_address));
137 port = g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (socket_address));
138 host = g_inet_address_to_string (inet_address);
139
140 /* Create ssh client args */
141 args = g_ptr_array_new_with_free_func (g_free);
142 g_ptr_array_add (args, g_strdup ("ssh"));
143 g_ptr_array_add (args, host);
144
145 g_ptr_array_add (args, g_strdup ("-p"));
146 str = g_strdup_printf ("%d", port);
147 g_ptr_array_add (args, str);
148
149 if (context->login != NULL)
150 {
151 g_ptr_array_add (args, g_strdup ("-l"));
152 str = g_strdup_printf ("%s", context->login);
153 g_ptr_array_add (args, str);
154 }
155
156 str = g_strdup_printf ("-oHostKeyAlias=%s", context->contact_id);
157 g_ptr_array_add (args, str);
158
159 g_ptr_array_add (args, NULL);
160
161 /* spawn ssh client */
162 if (!g_spawn_async (NULL, (gchar **) args->pdata, NULL,
163 G_SPAWN_SEARCH_PATH | G_SPAWN_CHILD_INHERITS_STDIN |
164 G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, &error))
165 {
166 throw_error (context, error);
167 goto OUT;
168 }
169
170 g_child_watch_add (pid, ssh_client_watch_cb, context);
171
172 OUT:
173
174 g_ptr_array_unref (args);
175 }
176
177 static void
178 tube_socket_connected_cb (GObject *source_object,
179 GAsyncResult *res,
180 gpointer user_data)
181 {
182 ClientContext *context = user_data;
183 GSocketListener *listener = G_SOCKET_LISTENER (source_object);
184 GSocket *socket = NULL;
185 GInetAddress * inet_address = NULL;
186 GSocketAddress *socket_address = NULL;
187 GError *error = NULL;
188
189 context->tube_connection = g_socket_listener_accept_finish (listener, res,
190 NULL, &error);
191 if (context->tube_connection == NULL)
192 goto OUT;
193
194 /* Create the IPv4 socket, and listen for connection on it */
195 socket = g_socket_new (G_SOCKET_FAMILY_IPV4, G_SOCKET_TYPE_STREAM,
196 G_SOCKET_PROTOCOL_DEFAULT, &error);
158 g_clear_error (&error);
159 return;
160 }
161
162 g_signal_connect (context->channel, "invalidated",
163 G_CALLBACK (channel_invalidated_cb), context);
164
165 listener = g_socket_listener_new ();
166 socket = _client_create_local_socket (&error);
197167 if (socket == NULL)
198 goto OUT;
199 inet_address = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4);
200 socket_address = g_inet_socket_address_new (inet_address, 0);
201 if (!g_socket_bind (socket, socket_address, FALSE, &error))
202168 goto OUT;
203169 if (!g_socket_listen (socket, &error))
204170 goto OUT;
206172 goto OUT;
207173
208174 g_socket_listener_accept_async (listener, NULL,
209 ssh_socket_connected_cb, context);
210
211 exec_ssh_on_socket (context, socket);
175 ssh_socket_connected_cb, context);
176
177 args = _client_create_exec_args (socket, context->contact_id,
178 context->login);
179
180 /* spawn ssh client */
181 if (g_spawn_async (NULL, args, NULL,
182 G_SPAWN_SEARCH_PATH | G_SPAWN_CHILD_INHERITS_STDIN |
183 G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, &error))
184 {
185 g_child_watch_add (pid, ssh_client_watch_cb, context);
186 }
212187
213188 OUT:
214189
215190 if (error != NULL)
216191 throw_error (context, error);
217192
218 tp_clear_object (&socket);
219 tp_clear_object (&inet_address);
220 tp_clear_object (&socket_address);
221193 g_clear_error (&error);
222 }
223
224 static void
225 offer_tube_cb (TpChannel *channel,
226 const GError *error,
227 gpointer user_data,
228 GObject *weak_object)
229 {
230 ClientContext *context = user_data;
231
232 if (error != NULL)
233 throw_error (context, error);
234 }
235
236 static void
237 channel_invalidated_cb (TpProxy *proxy,
238 guint domain,
239 gint code,
240 gchar *message,
241 ClientContext *context)
242 {
243 const GError *error;
244
245 error = tp_proxy_get_invalidated (proxy);
246 throw_error (context, error);
247 }
248
249 static void
250 handle_channel (ClientContext *context,
251 TpChannel *channel)
252 {
253 gchar *dir;
254 GSocketListener *listener = NULL;
255 GSocket *socket = NULL;
256 GSocketAddress *socket_address = NULL;
257 GValue *address;
258 GHashTable *parameters;
259 GError *error = NULL;
260
261 g_signal_connect (channel, "invalidated",
262 G_CALLBACK (channel_invalidated_cb), context);
263
264 /* We are client side, but we have to offer a socket... So we offer an unix
265 * socket on which the service side can connect. We also create an IPv4 socket
266 * on which the ssh client can connect. When both sockets are connected,
267 * we can forward all communications between them. */
268
269 /* FIXME: I don't think we close socket connections, or cancel
270 * g_socket_listener_accept_async in all error cases... */
271
272 listener = g_socket_listener_new ();
273
274 /* Create temporary file for our unix socket */
275 dir = g_build_filename (g_get_tmp_dir (), "telepathy-ssh-XXXXXX", NULL);
276 dir = mkdtemp (dir);
277 context->unix_path = g_build_filename (dir, "unix-socket", NULL);
278 g_free (dir);
279
280 /* Create the unix socket, and listen for connection on it */
281 socket = g_socket_new (G_SOCKET_FAMILY_UNIX, G_SOCKET_TYPE_STREAM,
282 G_SOCKET_PROTOCOL_DEFAULT, &error);
283 if (socket == NULL)
284 goto OUT;
285 socket_address = g_unix_socket_address_new (context->unix_path);
286 if (!g_socket_bind (socket, socket_address, FALSE, &error))
287 goto OUT;
288 if (!g_socket_listen (socket, &error))
289 goto OUT;
290 if (!g_socket_listener_add_socket (listener, socket, NULL, &error))
291 goto OUT;
292
293 g_socket_listener_accept_async (listener, NULL,
294 tube_socket_connected_cb, context);
295
296 /* Offer the socket */
297 address = tp_address_variant_from_g_socket_address (socket_address,
298 TP_SOCKET_ADDRESS_TYPE_UNIX, &error);
299 if (address == NULL)
300 goto OUT;
301 parameters = g_hash_table_new (NULL, NULL);
302 tp_cli_channel_type_stream_tube_call_offer (channel, -1,
303 TP_SOCKET_ADDRESS_TYPE_UNIX, address,
304 TP_SOCKET_ACCESS_CONTROL_LOCALHOST, parameters,
305 offer_tube_cb, context, NULL, NULL);
306 tp_g_value_slice_free (address);
307 g_hash_table_unref (parameters);
308
309 OUT:
310
311 if (error != NULL)
312 throw_error (context, error);
313
314194 tp_clear_object (&listener);
315195 tp_clear_object (&socket);
316 tp_clear_object (&socket_address);
317 g_clear_error (&error);
318 }
319
320 static void
321 got_channel_cb (TpSimpleHandler *handler,
322 TpAccount *account,
323 TpConnection *connection,
324 GList *channels,
325 GList *requests_satisfied,
326 gint64 user_action_time,
327 TpHandleChannelsContext *channel_context,
328 gpointer user_data)
329 {
330 ClientContext *context = user_data;
331 GList *l;
332
333 for (l = channels; l != NULL; l = l->next)
334 {
335 TpChannel *channel = l->data;
336
337 if (tp_strdiff (tp_channel_get_channel_type (channel),
338 TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
339 continue;
340
341 handle_channel (context, channel);
342 }
343
344 tp_handle_channels_context_accept (channel_context);
345 }
346
347 static void
348 channel_request_invalidated_cb (TpProxy *proxy,
349 guint domain,
350 gint code,
351 gchar *message,
352 ClientContext *context)
353 {
354 const GError *error;
355
356 error = tp_proxy_get_invalidated (proxy);
357 if (!g_error_matches (error, TP_DBUS_ERRORS, TP_DBUS_ERROR_OBJECT_REMOVED))
358 throw_error (context, error);
359
360 g_object_unref (proxy);
361 }
362
363 static void
364 request_proceed_cb (TpChannelRequest *request,
365 const GError *error,
366 gpointer user_data,
367 GObject *weak_object)
368 {
369 ClientContext *context = user_data;
370
371 if (error != NULL)
372 throw_error (context, error);
373 }
374
375 static void
376 create_channel_cb (TpChannelDispatcher *dispatcher,
377 const gchar *request_path,
378 const GError *error,
379 gpointer user_data,
380 GObject *weak_object)
381 {
382 ClientContext *context = user_data;
383 TpDBusDaemon *dbus;
384 TpChannelRequest *request;
385 GError *err = NULL;
386
387 if (error != NULL)
388 {
389 throw_error (context, error);
390 return;
391 }
392
393 dbus = tp_proxy_get_dbus_daemon (TP_PROXY (dispatcher));
394 request = tp_channel_request_new (dbus, request_path, NULL, &err);
395 if (request == NULL)
396 {
397 throw_error (context, err);
398 g_clear_error (&err);
399 return;
400 }
401
402 g_signal_connect (request, "invalidated",
403 G_CALLBACK (channel_request_invalidated_cb), context);
404
405 tp_cli_channel_request_call_proceed (request, -1, request_proceed_cb,
406 context, NULL, NULL);
407 }
408
409 static void
410 request_channel (ClientContext *context)
411 {
412 TpDBusDaemon *dbus = NULL;
413 TpChannelDispatcher *dispatcher = NULL;
414 GHashTable *request = NULL;
415
416 dbus = tp_dbus_daemon_dup (NULL);
417 dispatcher = tp_channel_dispatcher_new (dbus);
418 request = tp_asv_new (
419 TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
420 TP_IFACE_CHANNEL_TYPE_STREAM_TUBE,
421 TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
422 TP_HANDLE_TYPE_CONTACT,
423 TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING,
424 context->contact_id,
425 TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE, G_TYPE_STRING,
426 TUBE_SERVICE,
427 NULL);
428
429 tp_cli_channel_dispatcher_call_create_channel (dispatcher, -1,
430 tp_proxy_get_object_path (TP_PROXY (context->account)), request, G_MAXINT64,
431 tp_base_client_get_bus_name (context->client), create_channel_cb,
432 context, NULL, NULL);
433
434 g_object_unref (dbus);
435 g_object_unref (dispatcher);
436 g_hash_table_unref (request);
437 }
438
439 static gboolean
440 has_stream_tube_cap (TpCapabilities *caps)
441 {
442 GPtrArray *classes;
443 guint i;
444
445 if (caps == NULL)
446 return FALSE;
447
448 classes = tp_capabilities_get_channel_classes (caps);
449 for (i = 0; i < classes->len; i++)
450 {
451 GValueArray *arr = g_ptr_array_index (classes, i);
452 GHashTable *fixed;
453 const gchar *chan_type;
454 const gchar *service;
455 TpHandleType handle_type;
456
457 fixed = g_value_get_boxed (g_value_array_get_nth (arr, 0));
458 chan_type = tp_asv_get_string (fixed, TP_PROP_CHANNEL_CHANNEL_TYPE);
459 service = tp_asv_get_string (fixed, TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE);
460 handle_type = tp_asv_get_uint32 (fixed,
461 TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL);
462
463 if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE) &&
464 handle_type == TP_HANDLE_TYPE_CONTACT &&
465 (!tp_capabilities_is_specific_to_contact (caps) ||
466 !tp_strdiff (service, TUBE_SERVICE)))
467 return TRUE;
468 }
469
470 return FALSE;
196 g_strfreev (args);
197 }
198
199 static void
200 start_tube (ClientContext *context)
201 {
202 if (!context->account_set || !context->contact_set)
203 {
204 g_print ("\nTo avoid interactive mode, you can use that command:\n"
205 "%s --account %s --contact %s\n", context->argv0,
206 context->account_path, context->contact_id);
207 }
208
209 _client_create_tube_async (context->account_path,
210 context->contact_id, create_tube_cb, context);
471211 }
472212
473213 static void
495235
496236 /* Build a list of all contacts supporting StreamTube */
497237 for (i = 0; i < n_contacts; i++)
498 if (has_stream_tube_cap (tp_contact_get_capabilities (contacts[i])))
238 if (_capabilities_has_stream_tube (tp_contact_get_capabilities (contacts[i])))
499239 candidates = g_list_prepend (candidates, contacts[i]);
500240
501241 if (candidates == NULL)
527267 }
528268
529269 context->contact_id = g_strdup (tp_contact_get_identifier (l->data));
530 request_channel (context);
270 start_tube (context);
531271
532272 g_list_free (candidates);
533273 }
606346 GHashTable *request;
607347
608348 /* If a contact ID was passed in the options, use it */
609 if (context->contact_id != NULL)
610 request_channel (context);
349 if (context->contact_set)
350 {
351 g_assert (context->contact_id != NULL);
352 start_tube (context);
353 return;
354 }
611355
612356 /* Otherwise, we'll get TpContact objects for all stored contacts on that
613357 * account. */
641385 return;
642386 }
643387
388 if (context->account_set)
389 {
390 g_assert (context->account != NULL);
391 g_assert (context->account_path != NULL);
392 chooser_contact (context);
393 return;
394 }
395
644396 for (l = context->accounts; l != NULL; l = l->next)
645397 {
646398 g_print ("%d) %s (%s)\n", ++count,
660412 throw_error_message (context, "Invalid account number");
661413 return;
662414 }
415
663416 context->account = g_object_ref (l->data);
664
665 /* If the account id was not in the options, print it now. It makes easier to
666 * copy/paste later. */
667 if (context->account_id == NULL)
668 {
669 const gchar *account_path;
670
671 account_path = tp_proxy_get_object_path (context->account);
672 context->account_id = g_strdup (account_path +
673 strlen (TP_ACCOUNT_OBJECT_PATH_BASE));
674
675 g_print ("Going to use account: '%s'\n", context->account_id);
676 }
417 context->account_path = g_strdup (tp_proxy_get_object_path (context->account));
677418
678419 chooser_contact (context);
679420 }
687428 ClientContext *context = user_data;
688429
689430 if (!tp_proxy_prepare_finish (TP_PROXY (connection), res, NULL) ||
690 !has_stream_tube_cap (tp_connection_get_capabilities (connection)))
431 !_capabilities_has_stream_tube (tp_connection_get_capabilities (connection)))
691432 {
692433 GList *l;
693434
793534 client_context_clear (ClientContext *context)
794535 {
795536 tp_clear_pointer (&context->loop, g_main_loop_unref);
796 g_free (context->account_id);
537 g_free (context->argv0);
538 g_free (context->account_path);
797539 g_free (context->contact_id);
798540 g_free (context->login);
799
800 tp_clear_object (&context->client);
801541
802542 g_list_foreach (context->accounts, (GFunc) g_object_unref, NULL);
803543 g_list_free (context->accounts);
804544 tp_clear_object (&context->account);
805545
806 if (context->unix_path != NULL)
807 {
808 gchar *p;
809
810 g_unlink (context->unix_path);
811 p = g_strrstr (context->unix_path, G_DIR_SEPARATOR_S);
812 *p = '\0';
813 g_rmdir (context->unix_path);
814 g_free (context->unix_path);
815 }
546 tp_clear_object (&context->channel);
816547 tp_clear_object (&context->tube_connection);
817548 tp_clear_object (&context->ssh_connection);
818549 }
826557 GOptionContext *optcontext;
827558 GOptionEntry options[] = {
828559 { "account", 'a',
829 0, G_OPTION_ARG_STRING, &context.account_id,
560 0, G_OPTION_ARG_STRING, &context.account_path,
830561 "The account ID",
831562 NULL },
832563 { "contact", 'c',
854585
855586 g_set_application_name (PACKAGE_NAME);
856587
857 /* Register an handler for the StreamTube channel we'll request */
858588 dbus = tp_dbus_daemon_dup (&error);
859589 if (dbus == NULL)
860590 goto OUT;
861591
862 context.client = tp_simple_handler_new (dbus, FALSE, FALSE,
863 "SSHContactClient", TRUE, got_channel_cb, &context, NULL);
864
865 tp_base_client_take_handler_filter (context.client, tp_asv_new (
866 TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
867 TP_IFACE_CHANNEL_TYPE_STREAM_TUBE,
868 TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
869 TP_HANDLE_TYPE_CONTACT,
870 TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE, G_TYPE_STRING,
871 "ssh",
872 TP_PROP_CHANNEL_REQUESTED, G_TYPE_BOOLEAN,
873 TRUE,
874 NULL));
875
876 if (!tp_base_client_register (context.client, &error))
877 goto OUT;
592 context.argv0 = g_strdup (argv[0]);
593 if (context.account_path != NULL)
594 context.account_set = TRUE;
595 if (context.contact_id != NULL)
596 context.contact_set = TRUE;
878597
879598 /* If an account id was specified in options, then prepare it, otherwise
880599 * we get the account manager to get a list of all accounts */
881 if (context.account_id != NULL)
882 {
883 gchar *account_path;
884
885 account_path = g_strconcat (TP_ACCOUNT_OBJECT_PATH_BASE, context.account_id,
886 NULL);
887 context.account = tp_account_new (dbus, account_path, &error);
600 if (context.account_set)
601 {
602 if (!g_str_has_prefix (context.account_path, TP_ACCOUNT_OBJECT_PATH_BASE))
603 {
604 gchar *account_id = context.account_path;
605
606 context.account_path = g_strconcat (TP_ACCOUNT_OBJECT_PATH_BASE,
607 account_id, NULL);
608
609 g_free (account_id);
610 }
611
612 context.account = tp_account_new (dbus, context.account_path, &error);
888613 if (context.account == NULL)
889614 goto OUT;
890615
891616 tp_proxy_prepare_async (TP_PROXY (context.account), NULL,
892617 account_prepare_cb, &context);
893
894 g_free (account_path);
895618 }
896619 else
897620 {
2323
2424 typedef struct
2525 {
26 guint ref_count;
27 gboolean closed;
28 GError *error;
29
3026 GIOStream *stream1;
3127 GIOStream *stream2;
32
33 _GIOStreamSpliceCallback callback;
34 gpointer user_data;
28 _GIOStreamSpliceFlags flags;
29 gint io_priority;
30 GCancellable *cancellable;
31 gulong cancelled_id;
32 GCancellable *op1_cancellable;
33 GCancellable *op2_cancellable;
34 guint completed;
35 GError *error;
3536 } SpliceContext;
3637
37 static SpliceContext *
38 splice_context_ref (SpliceContext *self)
39 {
40 self->ref_count++;
41 return self;
42 }
43
44 static void
45 splice_context_unref (SpliceContext *self)
46 {
47 if (--self->ref_count == 0)
48 {
49 if (self->callback != NULL)
50 self->callback (self->stream1, self->stream2, self->error,
51 self->user_data);
52
53 g_clear_error (&self->error);
54 g_object_unref (self->stream1);
55 g_object_unref (self->stream2);
56
57 g_slice_free (SpliceContext, self);
58 }
59 }
60
61 static void
62 splice_context_close (SpliceContext *self, const GError *error)
63 {
64 if (self->closed)
65 return;
66 self->closed = TRUE;
67
68 if (error != NULL)
69 self->error = g_error_copy (error);
70
71 g_io_stream_close (self->stream1, NULL, NULL);
72 g_io_stream_close (self->stream2, NULL, NULL);
73 }
74
75 static void
76 splice_cb (GObject *ostream,
77 GAsyncResult *res,
78 gpointer user_data)
79 {
80 SpliceContext *ctx = user_data;
38 static void
39 splice_context_free (SpliceContext *ctx)
40 {
41 g_object_unref (ctx->stream1);
42 g_object_unref (ctx->stream2);
43 if (ctx->cancellable != NULL)
44 g_object_unref (ctx->cancellable);
45 g_object_unref (ctx->op1_cancellable);
46 g_object_unref (ctx->op2_cancellable);
47 g_clear_error (&ctx->error);
48 g_slice_free (SpliceContext, ctx);
49 }
50
51 static void
52 splice_complete (GSimpleAsyncResult *simple,
53 SpliceContext *ctx)
54 {
55 if (ctx->cancelled_id != 0)
56 g_cancellable_disconnect (ctx->cancellable, ctx->cancelled_id);
57 ctx->cancelled_id = 0;
58
59 if (ctx->error != NULL)
60 g_simple_async_result_set_from_error (simple, ctx->error);
61 g_simple_async_result_complete (simple);
62 }
63
64 static void
65 splice_close_cb (GObject *iostream,
66 GAsyncResult *res,
67 gpointer user_data)
68 {
69 GSimpleAsyncResult *simple = user_data;
70 SpliceContext *ctx;
8171 GError *error = NULL;
8272
73 g_io_stream_close_finish (G_IO_STREAM (iostream), res, &error);
74
75 ctx = g_simple_async_result_get_op_res_gpointer (simple);
76 ctx->completed++;
77
78 /* Keep the first error that occured */
79 if (error != NULL && ctx->error == NULL)
80 ctx->error = error;
81 else
82 g_clear_error (&error);
83
84 /* If all operations are done, complete now */
85 if (ctx->completed == 4)
86 splice_complete (simple, ctx);
87
88 g_object_unref (simple);
89 }
90
91 static void
92 splice_cb (GObject *ostream,
93 GAsyncResult *res,
94 gpointer user_data)
95 {
96 GSimpleAsyncResult *simple = user_data;
97 SpliceContext *ctx;
98 GError *error = NULL;
99
83100 g_output_stream_splice_finish (G_OUTPUT_STREAM (ostream), res, &error);
84101
85 splice_context_close (ctx, error);
86 splice_context_unref (ctx);
87
88 g_clear_error (&error);
102 ctx = g_simple_async_result_get_op_res_gpointer (simple);
103 ctx->completed++;
104
105 /* ignore cancellation error if it was not requested by the user */
106 if (error != NULL &&
107 g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) &&
108 (ctx->cancellable == NULL ||
109 !g_cancellable_is_cancelled (ctx->cancellable)))
110 g_clear_error (&error);
111
112 /* Keep the first error that occured */
113 if (error != NULL && ctx->error == NULL)
114 ctx->error = error;
115 else
116 g_clear_error (&error);
117
118 if (ctx->completed == 1 &&
119 (ctx->flags & _G_IO_STREAM_SPLICE_WAIT_FOR_BOTH) == 0)
120 {
121 /* We don't want to wait for the 2nd operation to finish, cancel it */
122 g_cancellable_cancel (ctx->op1_cancellable);
123 g_cancellable_cancel (ctx->op2_cancellable);
124 }
125 else if (ctx->completed == 2)
126 {
127 if (ctx->cancellable == NULL ||
128 !g_cancellable_is_cancelled (ctx->cancellable))
129 {
130 g_cancellable_reset (ctx->op1_cancellable);
131 g_cancellable_reset (ctx->op2_cancellable);
132 }
133
134 /* Close the IO streams if needed */
135 if ((ctx->flags & _G_IO_STREAM_SPLICE_CLOSE_STREAM1) != 0)
136 g_io_stream_close_async (ctx->stream1, ctx->io_priority,
137 ctx->op1_cancellable, splice_close_cb, g_object_ref (simple));
138 else
139 ctx->completed++;
140
141 if ((ctx->flags & _G_IO_STREAM_SPLICE_CLOSE_STREAM2) != 0)
142 g_io_stream_close_async (ctx->stream2, ctx->io_priority,
143 ctx->op2_cancellable, splice_close_cb, g_object_ref (simple));
144 else
145 ctx->completed++;
146
147 /* If all operations are done, complete now */
148 if (ctx->completed == 4)
149 splice_complete (simple, ctx);
150 }
151
152 g_object_unref (simple);
153 }
154
155 static void
156 splice_cancelled_cb (GCancellable *cancellable,
157 GSimpleAsyncResult *simple)
158 {
159 SpliceContext *ctx;
160
161 ctx = g_simple_async_result_get_op_res_gpointer (simple);
162 g_cancellable_cancel (ctx->op1_cancellable);
163 g_cancellable_cancel (ctx->op2_cancellable);
89164 }
90165
91166 void
92 _g_io_stream_splice (GIOStream *stream1,
93 GIOStream *stream2,
94 _GIOStreamSpliceCallback callback,
95 gpointer user_data)
96 {
167 _g_io_stream_splice_async (GIOStream *stream1,
168 GIOStream *stream2,
169 _GIOStreamSpliceFlags flags,
170 gint io_priority,
171 GCancellable *cancellable,
172 GAsyncReadyCallback callback,
173 gpointer user_data)
174 {
175 GSimpleAsyncResult *simple;
97176 SpliceContext *ctx;
98177 GInputStream *istream;
99178 GOutputStream *ostream;
100179
180 if (cancellable != NULL && g_cancellable_is_cancelled (cancellable))
181 {
182 g_simple_async_report_error_in_idle (NULL, callback,
183 user_data, G_IO_ERROR, G_IO_ERROR_CANCELLED,
184 "Operation has been cancelled");
185 return;
186 }
187
101188 ctx = g_slice_new0 (SpliceContext);
102 ctx->ref_count = 1;
103189 ctx->stream1 = g_object_ref (stream1);
104190 ctx->stream2 = g_object_ref (stream2);
105 ctx->callback = callback;
106 ctx->user_data = user_data;
191 ctx->flags = flags;
192 ctx->io_priority = io_priority;
193 ctx->op1_cancellable = g_cancellable_new ();
194 ctx->op2_cancellable = g_cancellable_new ();
195 ctx->completed = 0;
196
197 simple = g_simple_async_result_new (NULL, callback, user_data,
198 _g_io_stream_splice_finish);
199 g_simple_async_result_set_op_res_gpointer (simple, ctx,
200 (GDestroyNotify) splice_context_free);
201
202 if (cancellable != NULL)
203 {
204 ctx->cancellable = g_object_ref (cancellable);
205 ctx->cancelled_id = g_cancellable_connect (cancellable,
206 G_CALLBACK (splice_cancelled_cb), g_object_ref (simple),
207 g_object_unref);
208 }
107209
108210 istream = g_io_stream_get_input_stream (stream1);
109211 ostream = g_io_stream_get_output_stream (stream2);
110212 g_output_stream_splice_async (ostream, istream, G_OUTPUT_STREAM_SPLICE_NONE,
111 G_PRIORITY_DEFAULT, NULL, splice_cb, splice_context_ref (ctx));
112
213 io_priority, ctx->op1_cancellable, splice_cb,
214 g_object_ref (simple));
215
113216 istream = g_io_stream_get_input_stream (stream2);
114217 ostream = g_io_stream_get_output_stream (stream1);
115218 g_output_stream_splice_async (ostream, istream, G_OUTPUT_STREAM_SPLICE_NONE,
116 G_PRIORITY_DEFAULT, NULL, splice_cb, splice_context_ref (ctx));
117
118 splice_context_unref (ctx);
119 }
120
219 io_priority, ctx->op2_cancellable, splice_cb,
220 g_object_ref (simple));
221
222 g_object_unref (simple);
223 }
224
225 gboolean
226 _g_io_stream_splice_finish (GAsyncResult *result,
227 GError **error)
228 {
229 GSimpleAsyncResult *simple;
230
231 g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), FALSE);
232
233 simple = G_SIMPLE_ASYNC_RESULT (result);
234
235 if (g_simple_async_result_propagate_error (simple, error))
236 return FALSE;
237
238 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
239 _g_io_stream_splice_finish), FALSE);
240
241 return TRUE;
242 }
2626
2727 G_BEGIN_DECLS
2828
29 typedef void (*_GIOStreamSpliceCallback) (GIOStream *stream1,
30 GIOStream *stream2, const GError *error, gpointer user_data);
29 typedef enum {
30 _G_IO_STREAM_SPLICE_NONE = 0,
31 _G_IO_STREAM_SPLICE_CLOSE_STREAM1 = (1 << 0),
32 _G_IO_STREAM_SPLICE_CLOSE_STREAM2 = (1 << 1),
33 _G_IO_STREAM_SPLICE_WAIT_FOR_BOTH = (1 << 2),
34 } _GIOStreamSpliceFlags;
3135
32 void _g_io_stream_splice (GIOStream *stream1, GIOStream *stream2,
33 _GIOStreamSpliceCallback callback, gpointer user_data);
36 void _g_io_stream_splice_async (GIOStream *stream1,
37 GIOStream *stream2,
38 _GIOStreamSpliceFlags flags,
39 int io_priority,
40 GCancellable *cancellable,
41 GAsyncReadyCallback callback,
42 gpointer user_data);
43
44 gboolean _g_io_stream_splice_finish (GAsyncResult *result,
45 GError **error);
3446
3547 G_END_DECLS
3648
2121
2222 #include <stdlib.h>
2323
24 #include <gio/gunixsocketaddress.h>
24 #include <gio/gio.h>
2525 #include <telepathy-glib/telepathy-glib.h>
2626
2727 #include "common.h"
2828
2929 static GMainLoop *loop = NULL;
30 static guint n_sessions = 0;
30 static GList *channel_list = NULL;
3131
3232 static void
33 throw_error (const GError *error)
33 channel_invalidated_cb (TpChannel *channel,
34 guint domain,
35 gint code,
36 gchar *message,
37 gpointer user_data)
3438 {
35 g_debug ("Error: %s", error ? error->message : "No error message");
39 channel_list = g_list_remove (channel_list, channel);
40 g_object_unref (channel);
3641
37 if (--n_sessions == 0)
42 if (channel_list == NULL)
3843 g_main_loop_quit (loop);
3944 }
4045
4146 static void
42 splice_cb (GIOStream *stream1,
43 GIOStream *stream2,
44 const GError *error,
45 gpointer user_data)
47 session_complete (TpChannel *channel, const GError *error)
4648 {
4749 if (error != NULL)
48 throw_error (error);
49 else if (--n_sessions == 0)
50 g_main_loop_quit (loop);
50 {
51 g_debug ("Error for channel %p: %s", channel,
52 error ? error->message : "No error message");
53 }
54
55 tp_cli_channel_call_close (channel, -1, NULL, NULL, NULL, NULL);
5156 }
5257
5358 static void
54 accept_tube_cb (TpChannel *channel,
55 const GValue *address,
56 const GError *error,
57 gpointer user_data,
58 GObject *weak_object)
59 splice_cb (GObject *source_object,
60 GAsyncResult *res,
61 gpointer channel)
5962 {
63 GError *error = NULL;
64
65 _g_io_stream_splice_finish (res, &error);
66 session_complete (channel, error);
67 g_clear_error (&error);
68 }
69
70 static void
71 accept_tube_cb (GObject *object,
72 GAsyncResult *res,
73 gpointer user_data)
74 {
75 TpChannel *channel = TP_CHANNEL (object);
76 TpStreamTubeConnection *stc;
77 GInetAddress *inet_address = NULL;
6078 GSocketAddress *socket_address = NULL;
61 GInetAddress *inet_address = NULL;
6279 GSocket *socket = NULL;
6380 GSocketConnection *tube_connection = NULL;
6481 GSocketConnection *sshd_connection = NULL;
65 GError *err = NULL;
82 GError *error = NULL;
6683
67 if (error != NULL)
68 {
69 throw_error (error);
70 return;
71 }
84 stc = tp_stream_tube_channel_accept_finish (TP_STREAM_TUBE_CHANNEL (channel),
85 res, &error);
86 if (stc == NULL)
87 goto OUT;
7288
73 /* Connect to the unix socket we received */
74 socket_address = tp_g_socket_address_from_variant (
75 TP_SOCKET_ADDRESS_TYPE_UNIX, address, &err);
76 if (socket_address == NULL)
77 goto OUT;
78 socket = g_socket_new (G_SOCKET_FAMILY_UNIX, G_SOCKET_TYPE_STREAM,
79 G_SOCKET_PROTOCOL_DEFAULT, &err);
80 if (socket == NULL)
81 goto OUT;
82 if (!g_socket_connect (socket, socket_address, NULL, &err))
83 goto OUT;
84 tube_connection = g_socket_connection_factory_create_connection (socket);
85 tp_clear_object (&socket_address);
86 tp_clear_object (&socket);
89 tube_connection = tp_stream_tube_connection_get_socket_connection (stc);
8790
8891 /* Connect to the sshd */
8992 inet_address = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4);
9093 socket_address = g_inet_socket_address_new (inet_address, 22);
9194 socket = g_socket_new (G_SOCKET_FAMILY_IPV4, G_SOCKET_TYPE_STREAM,
92 G_SOCKET_PROTOCOL_DEFAULT, &err);
95 G_SOCKET_PROTOCOL_DEFAULT, &error);
9396 if (socket == NULL)
9497 goto OUT;
95 if (!g_socket_connect (socket, socket_address, NULL, &err))
98 if (!g_socket_connect (socket, socket_address, NULL, &error))
9699 goto OUT;
97100 sshd_connection = g_socket_connection_factory_create_connection (socket);
98101
99102 /* Splice tube and ssh connections */
100 _g_io_stream_splice (G_IO_STREAM (tube_connection),
101 G_IO_STREAM (sshd_connection), splice_cb, NULL);
103 _g_io_stream_splice_async (G_IO_STREAM (tube_connection),
104 G_IO_STREAM (sshd_connection), _G_IO_STREAM_SPLICE_NONE,
105 G_PRIORITY_DEFAULT, NULL, splice_cb, channel);
102106
103107 OUT:
104108
105 if (err != NULL)
106 throw_error (err);
109 if (error != NULL)
110 session_complete (channel, error);
107111
112 tp_clear_object (&stc);
108113 tp_clear_object (&inet_address);
109114 tp_clear_object (&socket_address);
110115 tp_clear_object (&socket);
111 tp_clear_object (&tube_connection);
112116 tp_clear_object (&sshd_connection);
113 g_clear_error (&err);
117 g_clear_error (&error);
114118 }
115119
116120 static void
123127 TpHandleChannelsContext *context,
124128 gpointer user_data)
125129 {
126 GValue value = { 0, };
127130 GList *l;
128
129 /* FIXME: Dummy value because passing NULL makes tp-glib crash */
130 g_value_init (&value, G_TYPE_STRING);
131131
132132 for (l = channels; l != NULL; l = l->next)
133133 {
134 TpChannel *channel = l->data;
134 if (TP_IS_STREAM_TUBE_CHANNEL (l->data))
135 {
136 TpStreamTubeChannel *channel = l->data;
135137
136 if (tp_strdiff (tp_channel_get_channel_type (channel),
137 TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
138 continue;
138 channel_list = g_list_prepend (channel_list, g_object_ref (channel));
139 g_signal_connect (channel, "invalidated",
140 G_CALLBACK (channel_invalidated_cb), NULL);
139141
140 n_sessions++;
142 tp_stream_tube_channel_accept_async (channel, accept_tube_cb, NULL);
143 }
144 }
141145
142 tp_cli_channel_type_stream_tube_call_accept (channel, -1,
143 TP_SOCKET_ADDRESS_TYPE_UNIX,
144 TP_SOCKET_ACCESS_CONTROL_LOCALHOST, &value,
145 accept_tube_cb, NULL, NULL, NULL);
146
147 }
148146 tp_handle_channels_context_accept (context);
149
150 g_value_reset (&value);
151147 }
152148
153149 int
0 # ssh plugin
1 plugindir = $(libdir)/vinagre-1/plugins
2
3 AM_CPPFLAGS = \
4 $(ERROR_CFLAGS) \
5 $(SSH_CONTACT_CFLAGS) \
6 $(VINAGRE_CFLAGS) \
7 $(NULL)
8
9 plugin_LTLIBRARIES = libssh-contact.la
10
11 libssh_contact_la_LIBADD = \
12 $(SSH_CONTACT_LIBS) \
13 $(VINAGRE_LIBS) \
14 $(NULL)
15
16 libssh_contact_la_SOURCES = \
17 plugin.h plugin.c \
18 connection.h connection.c \
19 tab.h tab.c \
20 tree-view.h tree-view.c \
21 ../client-helpers.h ../client-helpers.c \
22 ../common.h ../common.c \
23 $(NULL)
24
25 plugin_in_files = ssh-contact.vinagre-plugin.desktop.in
26
27 ssh-contact.vinagre-plugin: ssh-contact.vinagre-plugin.desktop.in
28 $(AM_V_GEN) $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c \
29 $(top_builddir)/po/.intltool-merge-cache
30
31 plugin_DATA = $(plugin_in_files:.vinagre-plugin.desktop.in=.vinagre-plugin)
32
33 EXTRA_DIST = $(plugin_in_files)
34 CLEANFILES = $(plugin_DATA)
35 DISTCLEANFILES = $(plugin_DATA)
36
0 # Makefile.in generated by automake 1.11.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17
18 VPATH = @srcdir@
19 pkgdatadir = $(datadir)/@PACKAGE@
20 pkgincludedir = $(includedir)/@PACKAGE@
21 pkglibdir = $(libdir)/@PACKAGE@
22 pkglibexecdir = $(libexecdir)/@PACKAGE@
23 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24 install_sh_DATA = $(install_sh) -c -m 644
25 install_sh_PROGRAM = $(install_sh) -c
26 install_sh_SCRIPT = $(install_sh) -c
27 INSTALL_HEADER = $(INSTALL_DATA)
28 transform = $(program_transform_name)
29 NORMAL_INSTALL = :
30 PRE_INSTALL = :
31 POST_INSTALL = :
32 NORMAL_UNINSTALL = :
33 PRE_UNINSTALL = :
34 POST_UNINSTALL = :
35 build_triplet = @build@
36 host_triplet = @host@
37 subdir = src/vinagre
38 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40 am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \
41 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
42 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
43 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
44 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
45 $(ACLOCAL_M4)
46 mkinstalldirs = $(install_sh) -d
47 CONFIG_HEADER = $(top_builddir)/config.h
48 CONFIG_CLEAN_FILES =
49 CONFIG_CLEAN_VPATH_FILES =
50 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
51 am__vpath_adj = case $$p in \
52 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
53 *) f=$$p;; \
54 esac;
55 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
56 am__install_max = 40
57 am__nobase_strip_setup = \
58 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
59 am__nobase_strip = \
60 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
61 am__nobase_list = $(am__nobase_strip_setup); \
62 for p in $$list; do echo "$$p $$p"; done | \
63 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
64 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
65 if (++n[$$2] == $(am__install_max)) \
66 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
67 END { for (dir in files) print dir, files[dir] }'
68 am__base_list = \
69 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
70 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
71 am__installdirs = "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(plugindir)"
72 LTLIBRARIES = $(plugin_LTLIBRARIES)
73 am__DEPENDENCIES_1 =
74 libssh_contact_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
75 $(am__DEPENDENCIES_1)
76 am_libssh_contact_la_OBJECTS = plugin.lo connection.lo tab.lo \
77 tree-view.lo client-helpers.lo common.lo
78 libssh_contact_la_OBJECTS = $(am_libssh_contact_la_OBJECTS)
79 AM_V_lt = $(am__v_lt_$(V))
80 am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
81 am__v_lt_0 = --silent
82 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
83 depcomp = $(SHELL) $(top_srcdir)/depcomp
84 am__depfiles_maybe = depfiles
85 am__mv = mv -f
86 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
87 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
88 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
89 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
90 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
91 $(AM_CFLAGS) $(CFLAGS)
92 AM_V_CC = $(am__v_CC_$(V))
93 am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
94 am__v_CC_0 = @echo " CC " $@;
95 AM_V_at = $(am__v_at_$(V))
96 am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
97 am__v_at_0 = @
98 CCLD = $(CC)
99 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
100 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
101 $(AM_LDFLAGS) $(LDFLAGS) -o $@
102 AM_V_CCLD = $(am__v_CCLD_$(V))
103 am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
104 am__v_CCLD_0 = @echo " CCLD " $@;
105 AM_V_GEN = $(am__v_GEN_$(V))
106 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
107 am__v_GEN_0 = @echo " GEN " $@;
108 SOURCES = $(libssh_contact_la_SOURCES)
109 DIST_SOURCES = $(libssh_contact_la_SOURCES)
110 DATA = $(plugin_DATA)
111 ETAGS = etags
112 CTAGS = ctags
113 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
114 ACLOCAL = @ACLOCAL@
115 ALL_LINGUAS = @ALL_LINGUAS@
116 AMTAR = @AMTAR@
117 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
118 AR = @AR@
119 AUTOCONF = @AUTOCONF@
120 AUTOHEADER = @AUTOHEADER@
121 AUTOMAKE = @AUTOMAKE@
122 AWK = @AWK@
123 CATALOGS = @CATALOGS@
124 CATOBJEXT = @CATOBJEXT@
125 CC = @CC@
126 CCDEPMODE = @CCDEPMODE@
127 CFLAGS = @CFLAGS@
128 CPP = @CPP@
129 CPPFLAGS = @CPPFLAGS@
130 CYGPATH_W = @CYGPATH_W@
131 DATADIRNAME = @DATADIRNAME@
132 DEFS = @DEFS@
133 DEPDIR = @DEPDIR@
134 DSYMUTIL = @DSYMUTIL@
135 DUMPBIN = @DUMPBIN@
136 ECHO_C = @ECHO_C@
137 ECHO_N = @ECHO_N@
138 ECHO_T = @ECHO_T@
139 EGREP = @EGREP@
140 ERROR_CFLAGS = @ERROR_CFLAGS@
141 EXEEXT = @EXEEXT@
142 FGREP = @FGREP@
143 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
144 GLIB_CFLAGS = @GLIB_CFLAGS@
145 GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
146 GLIB_LIBS = @GLIB_LIBS@
147 GLIB_MKENUMS = @GLIB_MKENUMS@
148 GMOFILES = @GMOFILES@
149 GMSGFMT = @GMSGFMT@
150 GOBJECT_QUERY = @GOBJECT_QUERY@
151 GREP = @GREP@
152 INSTALL = @INSTALL@
153 INSTALL_DATA = @INSTALL_DATA@
154 INSTALL_PROGRAM = @INSTALL_PROGRAM@
155 INSTALL_SCRIPT = @INSTALL_SCRIPT@
156 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
157 INSTOBJEXT = @INSTOBJEXT@
158 INTLLIBS = @INTLLIBS@
159 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
160 INTLTOOL_MERGE = @INTLTOOL_MERGE@
161 INTLTOOL_PERL = @INTLTOOL_PERL@
162 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
163 LD = @LD@
164 LDFLAGS = @LDFLAGS@
165 LIBOBJS = @LIBOBJS@
166 LIBS = @LIBS@
167 LIBTOOL = @LIBTOOL@
168 LIPO = @LIPO@
169 LN_S = @LN_S@
170 LTLIBOBJS = @LTLIBOBJS@
171 MAINT = @MAINT@
172 MAKEINFO = @MAKEINFO@
173 MKDIR_P = @MKDIR_P@
174 MKINSTALLDIRS = @MKINSTALLDIRS@
175 MSGFMT = @MSGFMT@
176 MSGFMT_OPTS = @MSGFMT_OPTS@
177 MSGMERGE = @MSGMERGE@
178 NM = @NM@
179 NMEDIT = @NMEDIT@
180 OBJDUMP = @OBJDUMP@
181 OBJEXT = @OBJEXT@
182 OTOOL = @OTOOL@
183 OTOOL64 = @OTOOL64@
184 PACKAGE = @PACKAGE@
185 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
186 PACKAGE_NAME = @PACKAGE_NAME@
187 PACKAGE_STRING = @PACKAGE_STRING@
188 PACKAGE_TARNAME = @PACKAGE_TARNAME@
189 PACKAGE_URL = @PACKAGE_URL@
190 PACKAGE_VERSION = @PACKAGE_VERSION@
191 PATH_SEPARATOR = @PATH_SEPARATOR@
192 PKG_CONFIG = @PKG_CONFIG@
193 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
194 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
195 POFILES = @POFILES@
196 POSUB = @POSUB@
197 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
198 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
199 RANLIB = @RANLIB@
200 SED = @SED@
201 SET_MAKE = @SET_MAKE@
202 SHELL = @SHELL@
203 SSH_CONTACT_CFLAGS = @SSH_CONTACT_CFLAGS@
204 SSH_CONTACT_LIBS = @SSH_CONTACT_LIBS@
205 STRIP = @STRIP@
206 USE_NLS = @USE_NLS@
207 VERSION = @VERSION@
208 VINAGRE_CFLAGS = @VINAGRE_CFLAGS@
209 VINAGRE_LIBS = @VINAGRE_LIBS@
210 XGETTEXT = @XGETTEXT@
211 XMKMF = @XMKMF@
212 X_CFLAGS = @X_CFLAGS@
213 X_EXTRA_LIBS = @X_EXTRA_LIBS@
214 X_LIBS = @X_LIBS@
215 X_PRE_LIBS = @X_PRE_LIBS@
216 abs_builddir = @abs_builddir@
217 abs_srcdir = @abs_srcdir@
218 abs_top_builddir = @abs_top_builddir@
219 abs_top_srcdir = @abs_top_srcdir@
220 ac_ct_CC = @ac_ct_CC@
221 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
222 am__include = @am__include@
223 am__leading_dot = @am__leading_dot@
224 am__quote = @am__quote@
225 am__tar = @am__tar@
226 am__untar = @am__untar@
227 bindir = @bindir@
228 build = @build@
229 build_alias = @build_alias@
230 build_cpu = @build_cpu@
231 build_os = @build_os@
232 build_vendor = @build_vendor@
233 builddir = @builddir@
234 datadir = @datadir@
235 datarootdir = @datarootdir@
236 docdir = @docdir@
237 dvidir = @dvidir@
238 exec_prefix = @exec_prefix@
239 host = @host@
240 host_alias = @host_alias@
241 host_cpu = @host_cpu@
242 host_os = @host_os@
243 host_vendor = @host_vendor@
244 htmldir = @htmldir@
245 includedir = @includedir@
246 infodir = @infodir@
247 install_sh = @install_sh@
248 libdir = @libdir@
249 libexecdir = @libexecdir@
250 localedir = @localedir@
251 localstatedir = @localstatedir@
252 lt_ECHO = @lt_ECHO@
253 mandir = @mandir@
254 mkdir_p = @mkdir_p@
255 oldincludedir = @oldincludedir@
256 pdfdir = @pdfdir@
257 prefix = @prefix@
258 program_transform_name = @program_transform_name@
259 psdir = @psdir@
260 sbindir = @sbindir@
261 sharedstatedir = @sharedstatedir@
262 srcdir = @srcdir@
263 sysconfdir = @sysconfdir@
264 target_alias = @target_alias@
265 top_build_prefix = @top_build_prefix@
266 top_builddir = @top_builddir@
267 top_srcdir = @top_srcdir@
268
269 # ssh plugin
270 plugindir = $(libdir)/vinagre-1/plugins
271 AM_CPPFLAGS = \
272 $(ERROR_CFLAGS) \
273 $(SSH_CONTACT_CFLAGS) \
274 $(VINAGRE_CFLAGS) \
275 $(NULL)
276
277 plugin_LTLIBRARIES = libssh-contact.la
278 libssh_contact_la_LIBADD = \
279 $(SSH_CONTACT_LIBS) \
280 $(VINAGRE_LIBS) \
281 $(NULL)
282
283 libssh_contact_la_SOURCES = \
284 plugin.h plugin.c \
285 connection.h connection.c \
286 tab.h tab.c \
287 tree-view.h tree-view.c \
288 ../client-helpers.h ../client-helpers.c \
289 ../common.h ../common.c \
290 $(NULL)
291
292 plugin_in_files = ssh-contact.vinagre-plugin.desktop.in
293 plugin_DATA = $(plugin_in_files:.vinagre-plugin.desktop.in=.vinagre-plugin)
294 EXTRA_DIST = $(plugin_in_files)
295 CLEANFILES = $(plugin_DATA)
296 DISTCLEANFILES = $(plugin_DATA)
297 all: all-am
298
299 .SUFFIXES:
300 .SUFFIXES: .c .lo .o .obj
301 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
302 @for dep in $?; do \
303 case '$(am__configure_deps)' in \
304 *$$dep*) \
305 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
306 && { if test -f $@; then exit 0; else break; fi; }; \
307 exit 1;; \
308 esac; \
309 done; \
310 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/vinagre/Makefile'; \
311 $(am__cd) $(top_srcdir) && \
312 $(AUTOMAKE) --gnu src/vinagre/Makefile
313 .PRECIOUS: Makefile
314 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
315 @case '$?' in \
316 *config.status*) \
317 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
318 *) \
319 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
320 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
321 esac;
322
323 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
324 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
325
326 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
327 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
328 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
329 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
330 $(am__aclocal_m4_deps):
331 install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
332 @$(NORMAL_INSTALL)
333 test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)"
334 @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
335 list2=; for p in $$list; do \
336 if test -f $$p; then \
337 list2="$$list2 $$p"; \
338 else :; fi; \
339 done; \
340 test -z "$$list2" || { \
341 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \
342 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \
343 }
344
345 uninstall-pluginLTLIBRARIES:
346 @$(NORMAL_UNINSTALL)
347 @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
348 for p in $$list; do \
349 $(am__strip_dir) \
350 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \
351 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \
352 done
353
354 clean-pluginLTLIBRARIES:
355 -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
356 @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
357 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
358 test "$$dir" != "$$p" || dir=.; \
359 echo "rm -f \"$${dir}/so_locations\""; \
360 rm -f "$${dir}/so_locations"; \
361 done
362 libssh-contact.la: $(libssh_contact_la_OBJECTS) $(libssh_contact_la_DEPENDENCIES)
363 $(AM_V_CCLD)$(LINK) -rpath $(plugindir) $(libssh_contact_la_OBJECTS) $(libssh_contact_la_LIBADD) $(LIBS)
364
365 mostlyclean-compile:
366 -rm -f *.$(OBJEXT)
367
368 distclean-compile:
369 -rm -f *.tab.c
370
371 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client-helpers.Plo@am__quote@
372 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@
373 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Plo@am__quote@
374 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@
375 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tab.Plo@am__quote@
376 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree-view.Plo@am__quote@
377
378 .c.o:
379 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
380 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
381 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
382 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
383 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
384 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
385
386 .c.obj:
387 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
388 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
389 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
390 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
391 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
392 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
393
394 .c.lo:
395 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
396 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
397 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
398 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
399 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
400 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
401
402 client-helpers.lo: ../client-helpers.c
403 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT client-helpers.lo -MD -MP -MF $(DEPDIR)/client-helpers.Tpo -c -o client-helpers.lo `test -f '../client-helpers.c' || echo '$(srcdir)/'`../client-helpers.c
404 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/client-helpers.Tpo $(DEPDIR)/client-helpers.Plo
405 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
406 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../client-helpers.c' object='client-helpers.lo' libtool=yes @AMDEPBACKSLASH@
407 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
408 @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o client-helpers.lo `test -f '../client-helpers.c' || echo '$(srcdir)/'`../client-helpers.c
409
410 common.lo: ../common.c
411 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT common.lo -MD -MP -MF $(DEPDIR)/common.Tpo -c -o common.lo `test -f '../common.c' || echo '$(srcdir)/'`../common.c
412 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/common.Tpo $(DEPDIR)/common.Plo
413 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
414 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common.c' object='common.lo' libtool=yes @AMDEPBACKSLASH@
415 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
416 @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o common.lo `test -f '../common.c' || echo '$(srcdir)/'`../common.c
417
418 mostlyclean-libtool:
419 -rm -f *.lo
420
421 clean-libtool:
422 -rm -rf .libs _libs
423 install-pluginDATA: $(plugin_DATA)
424 @$(NORMAL_INSTALL)
425 test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)"
426 @list='$(plugin_DATA)'; test -n "$(plugindir)" || list=; \
427 for p in $$list; do \
428 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
429 echo "$$d$$p"; \
430 done | $(am__base_list) | \
431 while read files; do \
432 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(plugindir)'"; \
433 $(INSTALL_DATA) $$files "$(DESTDIR)$(plugindir)" || exit $$?; \
434 done
435
436 uninstall-pluginDATA:
437 @$(NORMAL_UNINSTALL)
438 @list='$(plugin_DATA)'; test -n "$(plugindir)" || list=; \
439 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
440 test -n "$$files" || exit 0; \
441 echo " ( cd '$(DESTDIR)$(plugindir)' && rm -f" $$files ")"; \
442 cd "$(DESTDIR)$(plugindir)" && rm -f $$files
443
444 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
445 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
446 unique=`for i in $$list; do \
447 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
448 done | \
449 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
450 END { if (nonempty) { for (i in files) print i; }; }'`; \
451 mkid -fID $$unique
452 tags: TAGS
453
454 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
455 $(TAGS_FILES) $(LISP)
456 set x; \
457 here=`pwd`; \
458 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
459 unique=`for i in $$list; do \
460 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
461 done | \
462 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
463 END { if (nonempty) { for (i in files) print i; }; }'`; \
464 shift; \
465 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
466 test -n "$$unique" || unique=$$empty_fix; \
467 if test $$# -gt 0; then \
468 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
469 "$$@" $$unique; \
470 else \
471 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
472 $$unique; \
473 fi; \
474 fi
475 ctags: CTAGS
476 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
477 $(TAGS_FILES) $(LISP)
478 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
479 unique=`for i in $$list; do \
480 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
481 done | \
482 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
483 END { if (nonempty) { for (i in files) print i; }; }'`; \
484 test -z "$(CTAGS_ARGS)$$unique" \
485 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
486 $$unique
487
488 GTAGS:
489 here=`$(am__cd) $(top_builddir) && pwd` \
490 && $(am__cd) $(top_srcdir) \
491 && gtags -i $(GTAGS_ARGS) "$$here"
492
493 distclean-tags:
494 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
495
496 distdir: $(DISTFILES)
497 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
498 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
499 list='$(DISTFILES)'; \
500 dist_files=`for file in $$list; do echo $$file; done | \
501 sed -e "s|^$$srcdirstrip/||;t" \
502 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
503 case $$dist_files in \
504 */*) $(MKDIR_P) `echo "$$dist_files" | \
505 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
506 sort -u` ;; \
507 esac; \
508 for file in $$dist_files; do \
509 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
510 if test -d $$d/$$file; then \
511 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
512 if test -d "$(distdir)/$$file"; then \
513 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
514 fi; \
515 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
516 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
517 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
518 fi; \
519 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
520 else \
521 test -f "$(distdir)/$$file" \
522 || cp -p $$d/$$file "$(distdir)/$$file" \
523 || exit 1; \
524 fi; \
525 done
526 check-am: all-am
527 check: check-am
528 all-am: Makefile $(LTLIBRARIES) $(DATA)
529 installdirs:
530 for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(plugindir)"; do \
531 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
532 done
533 install: install-am
534 install-exec: install-exec-am
535 install-data: install-data-am
536 uninstall: uninstall-am
537
538 install-am: all-am
539 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
540
541 installcheck: installcheck-am
542 install-strip:
543 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
544 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
545 `test -z '$(STRIP)' || \
546 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
547 mostlyclean-generic:
548
549 clean-generic:
550 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
551
552 distclean-generic:
553 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
554 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
555 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
556
557 maintainer-clean-generic:
558 @echo "This command is intended for maintainers to use"
559 @echo "it deletes files that may require special tools to rebuild."
560 clean: clean-am
561
562 clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
563 mostlyclean-am
564
565 distclean: distclean-am
566 -rm -rf ./$(DEPDIR)
567 -rm -f Makefile
568 distclean-am: clean-am distclean-compile distclean-generic \
569 distclean-tags
570
571 dvi: dvi-am
572
573 dvi-am:
574
575 html: html-am
576
577 html-am:
578
579 info: info-am
580
581 info-am:
582
583 install-data-am: install-pluginDATA install-pluginLTLIBRARIES
584
585 install-dvi: install-dvi-am
586
587 install-dvi-am:
588
589 install-exec-am:
590
591 install-html: install-html-am
592
593 install-html-am:
594
595 install-info: install-info-am
596
597 install-info-am:
598
599 install-man:
600
601 install-pdf: install-pdf-am
602
603 install-pdf-am:
604
605 install-ps: install-ps-am
606
607 install-ps-am:
608
609 installcheck-am:
610
611 maintainer-clean: maintainer-clean-am
612 -rm -rf ./$(DEPDIR)
613 -rm -f Makefile
614 maintainer-clean-am: distclean-am maintainer-clean-generic
615
616 mostlyclean: mostlyclean-am
617
618 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
619 mostlyclean-libtool
620
621 pdf: pdf-am
622
623 pdf-am:
624
625 ps: ps-am
626
627 ps-am:
628
629 uninstall-am: uninstall-pluginDATA uninstall-pluginLTLIBRARIES
630
631 .MAKE: install-am install-strip
632
633 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
634 clean-libtool clean-pluginLTLIBRARIES ctags distclean \
635 distclean-compile distclean-generic distclean-libtool \
636 distclean-tags distdir dvi dvi-am html html-am info info-am \
637 install install-am install-data install-data-am install-dvi \
638 install-dvi-am install-exec install-exec-am install-html \
639 install-html-am install-info install-info-am install-man \
640 install-pdf install-pdf-am install-pluginDATA \
641 install-pluginLTLIBRARIES install-ps install-ps-am \
642 install-strip installcheck installcheck-am installdirs \
643 maintainer-clean maintainer-clean-generic mostlyclean \
644 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
645 pdf pdf-am ps ps-am tags uninstall uninstall-am \
646 uninstall-pluginDATA uninstall-pluginLTLIBRARIES
647
648
649 ssh-contact.vinagre-plugin: ssh-contact.vinagre-plugin.desktop.in
650 $(AM_V_GEN) $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c \
651 $(top_builddir)/po/.intltool-merge-cache
652
653 # Tell versions [3.59,3.63) of GNU make to not export all variables.
654 # Otherwise a system limit (for SysV at least) may be exceeded.
655 .NOEXPORT:
0 /*
1 * Copyright (C) 2009 Jonh Wendell <wendell@bani.com.br>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #include <glib/gi18n.h>
21
22 #include <vinagre/vinagre-utils.h>
23 #include <vinagre/vinagre-cache-prefs.h>
24
25 #include <telepathy-glib/telepathy-glib.h>
26
27 #include "connection.h"
28 #include "tree-view.h"
29
30 struct _SshContactConnectionPrivate
31 {
32 gchar *account_path;
33 gchar *contact_id;
34 };
35
36 G_DEFINE_TYPE (SshContactConnection, ssh_contact_connection,
37 VINAGRE_TYPE_CONNECTION);
38
39 static void
40 impl_fill_writer (VinagreConnection *conn, xmlTextWriter *writer)
41 {
42 SshContactConnection *self = SSH_CONTACT_CONNECTION (conn);
43
44 xmlTextWriterWriteElement (writer, (const xmlChar *) "account",
45 (const xmlChar *) (self->priv->account_path ? self->priv->account_path : ""));
46 xmlTextWriterWriteElement (writer, (const xmlChar *) "contact",
47 (const xmlChar *) (self->priv->contact_id ? self->priv->contact_id : ""));
48
49 VINAGRE_CONNECTION_CLASS (ssh_contact_connection_parent_class)->impl_fill_writer (conn, writer);
50 }
51
52 static void
53 impl_parse_item (VinagreConnection *conn, xmlNode *root)
54 {
55 SshContactConnection *self = SSH_CONTACT_CONNECTION (conn);
56 xmlNode *curr;
57 xmlChar *s_value;
58
59 for (curr = root->children; curr; curr = curr->next)
60 {
61 s_value = xmlNodeGetContent (curr);
62
63 if (!xmlStrcmp(curr->name, (const xmlChar *)"account"))
64 ssh_contact_connection_set_account_path (self, (gchar *) s_value);
65 else if (!xmlStrcmp(curr->name, (const xmlChar *)"contact"))
66 ssh_contact_connection_set_contact_id (self, (gchar *) s_value);
67
68 xmlFree (s_value);
69 }
70
71 VINAGRE_CONNECTION_CLASS (ssh_contact_connection_parent_class)->impl_parse_item (conn, root);
72 }
73
74 static void
75 impl_parse_options_widget (VinagreConnection *conn,
76 GtkWidget *widget)
77 {
78 GtkWidget *entry;
79 const gchar *username;
80
81 entry = g_object_get_data (G_OBJECT (widget), "username_entry");
82 if (entry == NULL)
83 {
84 g_warning ("Wrong widget passed to impl_parse_options_widget()");
85 return;
86 }
87
88 username = gtk_entry_get_text (GTK_ENTRY (entry));
89 vinagre_cache_prefs_set_string ("ssh-contact-connection", "username",
90 username);
91 vinagre_connection_set_username (conn, username);
92
93 VINAGRE_CONNECTION_CLASS (ssh_contact_connection_parent_class)->impl_parse_options_widget (conn, widget);
94 }
95
96 static void
97 impl_parse_host_widget (VinagreConnection *conn,
98 GtkWidget *widget)
99 {
100 SshContactConnection *self = SSH_CONTACT_CONNECTION (conn);
101 SshContactTreeView *view;
102 TpAccount *account;
103 TpContact *contact;
104
105 /* widget is a GtkScrolledWindow containing an SshContactTreeView */
106 view = SSH_CONTACT_TREE_VIEW (gtk_bin_get_child (GTK_BIN (widget)));
107
108 account = ssh_contact_tree_view_get_selected_account (view);
109 ssh_contact_connection_set_account_path (self,
110 tp_proxy_get_object_path (account));
111
112 contact = ssh_contact_tree_view_get_selected_contact (view);
113 ssh_contact_connection_set_contact_id (self,
114 tp_contact_get_identifier (contact));
115
116 VINAGRE_CONNECTION_CLASS (ssh_contact_connection_parent_class)->impl_parse_host_widget (conn, widget);
117 }
118
119 static gchar *
120 impl_get_string_rep (VinagreConnection *conn,
121 gboolean has_protocol)
122 {
123 SshContactConnection *self = SSH_CONTACT_CONNECTION (conn);
124 GString *uri;
125
126 if (has_protocol)
127 {
128 uri = g_string_new (vinagre_connection_get_protocol (conn));
129 g_string_append (uri, "://");
130 }
131 else
132 {
133 uri = g_string_new (NULL);
134 }
135
136 g_string_append (uri, self->priv->account_path);
137 g_string_append_c (uri, '/');
138 g_string_append (uri, self->priv->contact_id);
139
140 return g_string_free (uri, FALSE);
141 }
142
143 static void
144 finalize (GObject *object)
145 {
146 SshContactConnection *self = SSH_CONTACT_CONNECTION (object);
147
148 g_free (self->priv->contact_id);
149 g_free (self->priv->account_path);
150
151 G_OBJECT_CLASS (ssh_contact_connection_parent_class)->finalize (object);
152 }
153
154 static void
155 ssh_contact_connection_init (SshContactConnection *self)
156 {
157 self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, SSH_CONTACT_TYPE_CONNECTION,
158 SshContactConnectionPrivate);
159 }
160
161 static void
162 ssh_contact_connection_class_init (SshContactConnectionClass *klass)
163 {
164 GObjectClass *object_class = G_OBJECT_CLASS (klass);
165 VinagreConnectionClass* vinagre_class = VINAGRE_CONNECTION_CLASS (klass);
166
167 object_class->finalize = finalize;
168
169 vinagre_class->impl_fill_writer = impl_fill_writer;
170 vinagre_class->impl_parse_item = impl_parse_item;
171 vinagre_class->impl_parse_options_widget = impl_parse_options_widget;
172 vinagre_class->impl_parse_host_widget = impl_parse_host_widget;
173 vinagre_class->impl_get_string_rep = impl_get_string_rep;
174
175 g_type_class_add_private (klass, sizeof (SshContactConnectionPrivate));
176 }
177
178 VinagreConnection *
179 ssh_contact_connection_new (void)
180 {
181 return g_object_new (SSH_CONTACT_TYPE_CONNECTION,
182 "protocol", "ssh-contact",
183 NULL);
184 }
185
186 const gchar *
187 ssh_contact_connection_get_account_path (SshContactConnection *self)
188 {
189 g_return_val_if_fail (SSH_CONTACT_IS_CONNECTION (self), NULL);
190
191 return self->priv->account_path;
192 }
193
194 void
195 ssh_contact_connection_set_account_path (SshContactConnection *self,
196 const gchar *account_path)
197 {
198 g_return_if_fail (SSH_CONTACT_IS_CONNECTION (self));
199
200 g_free (self->priv->account_path);
201 self->priv->account_path = g_strdup (account_path);
202 }
203
204 const gchar *
205 ssh_contact_connection_get_contact_id (SshContactConnection *self)
206 {
207 g_return_val_if_fail (SSH_CONTACT_IS_CONNECTION (self), NULL);
208
209 return self->priv->contact_id;
210 }
211
212 void
213 ssh_contact_connection_set_contact_id (SshContactConnection *self,
214 const gchar *contact_id)
215 {
216 g_return_if_fail (SSH_CONTACT_IS_CONNECTION (self));
217
218 g_free (self->priv->contact_id);
219 self->priv->contact_id = g_strdup (contact_id);
220 }
221
222 /* vim: set ts=8: */
0 /*
1 * Copyright (C) 2009 Jonh Wendell <wendell@bani.com.br>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #ifndef __SSH_CONTACT_CONNECTION_H__
21 #define __SSH_CONTACT_CONNECTION_H__
22
23 #include <vinagre/vinagre-connection.h>
24
25 G_BEGIN_DECLS
26
27 #define SSH_CONTACT_TYPE_CONNECTION (ssh_contact_connection_get_type ())
28 #define SSH_CONTACT_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SSH_CONTACT_TYPE_CONNECTION, SshContactConnection))
29 #define SSH_CONTACT_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SSH_CONTACT_TYPE_CONNECTION, SshContactConnectionClass))
30 #define SSH_CONTACT_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SSH_CONTACT_TYPE_CONNECTION))
31 #define SSH_CONTACT_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SSH_CONTACT_TYPE_CONNECTION))
32 #define SSH_CONTACT_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SSH_CONTACT_TYPE_CONNECTION, SshContactConnectionClass))
33
34 typedef struct _SshContactConnectionPrivate SshContactConnectionPrivate;
35
36 typedef struct
37 {
38 VinagreConnection parent_instance;
39 SshContactConnectionPrivate *priv;
40 } SshContactConnection;
41
42 typedef struct
43 {
44 VinagreConnectionClass parent_class;
45 } SshContactConnectionClass;
46
47 GType ssh_contact_connection_get_type (void) G_GNUC_CONST;
48
49 VinagreConnection *ssh_contact_connection_new (void);
50
51 const gchar *ssh_contact_connection_get_account_path (SshContactConnection *self);
52
53 void ssh_contact_connection_set_account_path (SshContactConnection *self,
54 const gchar *account_path);
55
56 const gchar *ssh_contact_connection_get_contact_id (SshContactConnection *self);
57
58 void ssh_contact_connection_set_contact_id (SshContactConnection *self,
59 const gchar *contact_id);
60
61 G_END_DECLS
62
63 #endif /* __SSH_CONTACT_CONNECTION_H__ */
64 /* vim: set ts=8: */
0 /*
1 * Copyright (C) 2009 Jonh Wendell <wendell@bani.com.br>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #include "config.h"
21
22 #include <glib/gi18n-lib.h>
23 #include <gmodule.h>
24
25 #include <vinagre/vinagre-debug.h>
26 #include <vinagre/vinagre-cache-prefs.h>
27
28 #include "plugin.h"
29 #include "connection.h"
30 #include "tab.h"
31 #include "tree-view.h"
32
33 VINAGRE_PLUGIN_REGISTER_TYPE (SshContactPlugin, ssh_contact_plugin)
34
35 static void
36 impl_activate (VinagrePlugin *plugin,
37 VinagreWindow *window)
38 {
39 vinagre_debug_message (DEBUG_PLUGINS, "SshContactPlugin Activate");
40 }
41
42 static void
43 impl_deactivate (VinagrePlugin *plugin,
44 VinagreWindow *window)
45 {
46 vinagre_debug_message (DEBUG_PLUGINS, "SshContactPlugin Deactivate");
47 }
48
49 static void
50 impl_update_ui (VinagrePlugin *plugin,
51 VinagreWindow *window)
52 {
53 vinagre_debug_message (DEBUG_PLUGINS, "SshContactPlugin Update UI");
54 }
55
56 static const gchar *
57 impl_get_protocol (VinagrePlugin *plugin)
58 {
59 return "ssh-contact";
60 }
61
62 static gchar **
63 impl_get_public_description (VinagrePlugin *plugin)
64 {
65 gchar **result = g_new (gchar *, 3);
66
67 result[0] = g_strdup (_("SSH-Contact"));
68 /* Translators: This is a description of the SSH protocol. It appears at
69 * Connect dialog. */
70 result[1] = g_strdup (_("Access Unix/Linux terminals using a Telepathy Tube"));
71 result[2] = NULL;
72
73 return result;
74 }
75
76 static const gchar *
77 impl_get_mdns_service (VinagrePlugin *plugin)
78 {
79 return NULL;
80 }
81
82 static VinagreConnection *
83 impl_new_connection (VinagrePlugin *plugin)
84 {
85 return ssh_contact_connection_new ();
86 }
87
88 static VinagreConnection *
89 impl_new_connection_from_string (VinagrePlugin *plugin,
90 const gchar *uri,
91 gchar **error_msg,
92 gboolean use_bookmarks)
93 {
94 VinagreConnection *conn = NULL;
95 const gchar *p1 = uri;
96 const gchar *p2;
97 gchar *account_path;
98 gchar *contact_id;
99
100 /* FIXME: Search in bookmarks */
101
102 /* URI is in the form "ssh-contact://<account path>/<contact id>". */
103
104 /* Skip the scheme part */
105 if (!g_str_has_prefix (p1, vinagre_plugin_get_protocol (plugin)))
106 goto OUT;
107 p1 += strlen (vinagre_plugin_get_protocol (plugin));
108 if (!g_str_has_prefix (p1, "://"))
109 goto OUT;
110 p1 += strlen ("://");
111
112 /* Search delimiter between account path and contact id */
113 p2 = g_strrstr (p1, "/");
114 if (p2 == NULL)
115 goto OUT;
116
117 account_path = g_strndup (p1, p2 - p1);
118 contact_id = g_strdup (p2 + 1);
119
120 conn = ssh_contact_connection_new ();
121 ssh_contact_connection_set_account_path (SSH_CONTACT_CONNECTION (conn),
122 account_path);
123 ssh_contact_connection_set_contact_id (SSH_CONTACT_CONNECTION (conn),
124 contact_id);
125
126 g_free (account_path);
127 g_free (contact_id);
128
129 OUT:
130
131 if (conn == NULL)
132 *error_msg = g_strdup ("URI format not recognized");
133
134 return conn;
135 }
136
137 static GtkWidget *
138 impl_new_tab (VinagrePlugin *plugin,
139 VinagreConnection *conn,
140 VinagreWindow *window)
141 {
142 return ssh_contact_tab_new (conn, window);
143 }
144
145 static gint
146 impl_get_default_port (VinagrePlugin *plugin)
147 {
148 return 0;
149 }
150
151 static GtkWidget *
152 impl_get_connect_widget (VinagrePlugin *plugin,
153 VinagreConnection *conn)
154 {
155 GtkWidget *box, *label, *u_box, *u_entry;
156 gchar *str;
157
158 box = gtk_vbox_new (FALSE, 0);
159
160 str = g_strdup_printf ("<b>%s</b>", _("SSH Options"));
161 label = gtk_label_new (str);
162 g_free (str);
163 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
164 gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
165 gtk_misc_set_padding (GTK_MISC (label), 0, 6);
166 gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
167
168 u_box = gtk_hbox_new (FALSE, 4);
169 label = gtk_label_new (" ");
170 gtk_box_pack_start (GTK_BOX (u_box), label, FALSE, FALSE, 0);
171
172 label = gtk_label_new_with_mnemonic (_("_Username:"));
173 gtk_box_pack_start (GTK_BOX (u_box), label, FALSE, FALSE, 0);
174
175 u_entry = gtk_entry_new ();
176 /* Translators: This is the tooltip for the username field in a SSH
177 * connection */
178 gtk_widget_set_tooltip_text (u_entry,
179 _("Optional. If blank, your username will be used."));
180 g_object_set_data (G_OBJECT (box), "username_entry", u_entry);
181 gtk_box_pack_start (GTK_BOX (u_box), u_entry, TRUE, TRUE, 5);
182 gtk_label_set_mnemonic_widget (GTK_LABEL (label), u_entry);
183 str = g_strdup (VINAGRE_IS_CONNECTION (conn) ?
184 vinagre_connection_get_username (conn) :
185 vinagre_cache_prefs_get_string ("ssh-contact-connection", "username", ""));
186 gtk_entry_set_text (GTK_ENTRY (u_entry), str);
187 gtk_entry_set_activates_default (GTK_ENTRY (u_entry), TRUE);
188 g_free (str);
189
190 gtk_box_pack_start (GTK_BOX (box), u_box, TRUE, TRUE, 0);
191
192 return box;
193 }
194
195 static GtkWidget *
196 impl_get_connect_host_widget (VinagrePlugin *plugin,
197 VinagreConnection *conn)
198 {
199 GtkWidget *sw;
200 GtkWidget *view;
201
202 view = ssh_contact_tree_view_new ();
203 gtk_widget_show (view);
204
205 sw = gtk_scrolled_window_new (NULL, NULL);
206 gtk_container_add (GTK_CONTAINER (sw), view);
207 gtk_widget_set_size_request (GTK_WIDGET (sw), -1, 150);
208
209 return sw;
210 }
211
212 static void
213 impl_parse_mdns_dialog (VinagrePlugin *plugin,
214 GtkWidget *connect_widget,
215 GtkWidget *dialog)
216 {
217 }
218
219 static void
220 ssh_contact_plugin_init (SshContactPlugin *self)
221 {
222 }
223
224 static void
225 ssh_contact_plugin_class_init (SshContactPluginClass *klass)
226 {
227 VinagrePluginClass *plugin_class = VINAGRE_PLUGIN_CLASS (klass);
228
229 plugin_class->activate = impl_activate;
230 plugin_class->deactivate = impl_deactivate;
231 plugin_class->update_ui = impl_update_ui;
232 plugin_class->get_protocol = impl_get_protocol;
233 plugin_class->get_public_description = impl_get_public_description;
234 plugin_class->new_connection = impl_new_connection;
235 plugin_class->new_connection_from_string = impl_new_connection_from_string;
236 plugin_class->get_mdns_service = impl_get_mdns_service;
237 plugin_class->new_tab = impl_new_tab;
238 plugin_class->get_default_port = impl_get_default_port;
239 plugin_class->get_connect_widget = impl_get_connect_widget;
240 plugin_class->get_connect_host_widget = impl_get_connect_host_widget;
241 plugin_class->parse_mdns_dialog = impl_parse_mdns_dialog;
242 }
243 /* vim: set ts=8: */
0 /*
1 * Copyright (C) 2009 Jonh Wendell <wendell@bani.com.br>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #ifndef __SSH_CONTACT_PLUGIN_H__
21 #define __SSH_CONTACT_PLUGIN_H__
22
23 #include <glib.h>
24 #include <glib-object.h>
25 #include <vinagre/vinagre-plugin.h>
26
27 G_BEGIN_DECLS
28
29 #define SSH_CONTACT_TYPE_PLUGIN (ssh_contact_plugin_get_type ())
30 #define SSH_CONTACT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SSH_CONTACT_TYPE_PLUGIN, SshContactPlugin))
31 #define SSH_CONTACT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SSH_CONTACT_TYPE_PLUGIN, SshContactPluginClass))
32 #define SSH_CONTACT_IS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SSH_CONTACT_TYPE_PLUGIN))
33 #define SSH_CONTACT_IS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SSH_CONTACT_TYPE_PLUGIN))
34 #define SSH_CONTACT_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), SSH_CONTACT_TYPE_PLUGIN, SshContactPluginClass))
35
36 typedef struct _SshContactPluginPrivate SshContactPluginPrivate;
37
38 typedef struct
39 {
40 VinagrePlugin parent_instance;
41 SshContactPluginPrivate *priv;
42 } SshContactPlugin;
43
44 typedef struct
45 {
46 VinagrePluginClass parent_class;
47 } SshContactPluginClass;
48
49 GType ssh_contact_plugin_get_type (void) G_GNUC_CONST;
50
51 /* All the plugins must implement this function */
52 G_MODULE_EXPORT GType register_vinagre_plugin (GTypeModule *module);
53
54 G_END_DECLS
55
56 #endif /* __SSH_CONTACT_PLUGIN_H__ */
57 /* vim: set ts=8: */
0 [Vinagre Plugin]
1 Module=ssh-contact
2 IAge=1
3 _Name=SSH-Contact
4 _Description=SSH-Contact support
5 Authors=Xavier Claessens
6 Copyright=Copyright © 2010 Collabora Ltd.
7 Website=http://telepathy.freedesktop.org/wiki/SSH-Contact
8 Version=1.0
9 Engine=1
10 Icon=utilities-terminal
0 /*
1 * Copyright (C) 2009 Jonh Wendell <wendell@bani.com.br>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #include <glib/gi18n.h>
21 #include <vte/vte.h>
22 #include <gdk/gdkkeysyms.h>
23
24 #include <telepathy-glib/telepathy-glib.h>
25
26 #include <vinagre/vinagre-utils.h>
27 #include <vinagre/vinagre-prefs.h>
28
29 #include "tab.h"
30 #include "connection.h"
31 #include "../client-helpers.h"
32 #include "../common.h"
33
34 struct _SshContactTabPrivate
35 {
36 GtkWidget *vte;
37 TpChannel *channel;
38 GSocketConnection *tube_connection;
39 GSocketConnection *ssh_connection;
40 gboolean connected:1;
41 };
42
43 G_DEFINE_TYPE (SshContactTab, ssh_contact_tab, VINAGRE_TYPE_TAB)
44
45 static void
46 get_connection_info (SshContactTab *self,
47 const gchar **account_path,
48 const gchar **contact_id,
49 const gchar **username)
50 {
51 VinagreConnection *conn;
52
53 conn = vinagre_tab_get_conn (VINAGRE_TAB (self));
54 if (account_path != NULL)
55 *account_path = ssh_contact_connection_get_account_path (SSH_CONTACT_CONNECTION (conn));
56 if (contact_id != NULL)
57 *contact_id = ssh_contact_connection_get_contact_id (SSH_CONTACT_CONNECTION (conn));
58 if (username != NULL)
59 *username = vinagre_connection_get_username (conn);
60 }
61
62 static gchar *
63 impl_get_tooltip (VinagreTab *tab)
64 {
65 SshContactTab *self = SSH_CONTACT_TAB (tab);
66 const gchar *account_path;
67 const gchar *contact_id;
68
69 get_connection_info (self, &account_path, &contact_id, NULL);
70
71 return g_markup_printf_escaped (
72 "<b>%s</b> %s\n"
73 "<b>%s</b> %s",
74 _("Account:"), account_path + strlen (TP_ACCOUNT_OBJECT_PATH_BASE),
75 _("Contact:"), contact_id);
76 }
77
78 static GdkPixbuf *
79 impl_get_screenshot (VinagreTab *tab)
80 {
81 SshContactTab *self = SSH_CONTACT_TAB (tab);
82 GdkPixbuf *pixbuf;
83 GdkPixmap *pixmap;
84
85 pixmap = gtk_widget_get_snapshot (self->priv->vte, NULL);
86 pixbuf = gdk_pixbuf_get_from_drawable (NULL, GDK_DRAWABLE (pixmap),
87 gdk_colormap_get_system (), 0, 0, 0, 0, -1, -1);
88
89 g_object_unref (pixmap);
90
91 return pixbuf;
92 }
93
94 static void
95 disconnect_tab (SshContactTab *self)
96 {
97 if (self->priv->connected)
98 g_signal_emit_by_name (self, "tab-disconnected");
99 else
100 g_signal_emit_by_name (self, "tab-auth-failed", "");
101 }
102
103 static void
104 channel_invalidated_cb (TpChannel *channel,
105 guint domain,
106 gint code,
107 gchar *message,
108 SshContactTab *self)
109 {
110 disconnect_tab (self);
111 }
112
113 static void
114 leave (SshContactTab *self)
115 {
116 if (self->priv->channel != NULL &&
117 tp_proxy_get_invalidated (self->priv->channel) == NULL)
118 tp_cli_channel_call_close (context->channel, -1, NULL, NULL, NULL, NULL);
119 else
120 disconnect_tab (self);
121 }
122
123 static void
124 ssh_disconnected_cb (VteTerminal *ssh,
125 SshContactTab *self)
126 {
127 leave (self);
128 }
129
130 static void
131 throw_error (SshContactTab *self,
132 const GError *error)
133 {
134 g_debug ("ERROR: %s", error->message);
135 leave (self);
136 }
137
138 static void
139 splice_cb (GObject *source_object,
140 GAsyncResult *res,
141 gpointer user_data)
142 {
143 SshContactTab *self = user_data;
144 GError *error = NULL;
145
146 if (!_g_io_stream_splice_finish (res, &error))
147 throw_error (self, error);
148 else
149 leave (self);
150
151 g_clear_error (&error);
152 }
153
154 static void
155 ssh_socket_connected_cb (GObject *source_object,
156 GAsyncResult *res,
157 gpointer user_data)
158 {
159 SshContactTab *self = user_data;
160 GSocketListener *listener = G_SOCKET_LISTENER (source_object);
161 GError *error = NULL;
162
163 self->priv->ssh_connection = g_socket_listener_accept_finish (listener, res,
164 NULL, &error);
165 if (error != NULL)
166 {
167 throw_error (self, error);
168 g_clear_error (&error);
169 return;
170 }
171
172 g_signal_emit_by_name (self, "tab-connected");
173 self->priv->connected = TRUE;
174
175 /* Splice tube and ssh connections */
176 _g_io_stream_splice_async (G_IO_STREAM (self->priv->tube_connection),
177 G_IO_STREAM (self->priv->ssh_connection), _G_IO_STREAM_SPLICE_NONE,
178 G_PRIORITY_DEFAULT, NULL, splice_cb, self);
179 }
180
181 static void
182 create_tube_cb (GObject *source_object,
183 GAsyncResult *res,
184 gpointer user_data)
185 {
186 SshContactTab *self = user_data;
187 GSocketListener *listener;
188 GSocket *socket;
189 const gchar *username;
190 const gchar *contact_id;
191 GStrv args = NULL;
192 GError *error = NULL;
193
194 self->priv->tube_connection = _client_create_tube_finish (res,
195 &self->priv->channel, &error);
196 if (error != NULL)
197 {
198 throw_error (self, error);
199 g_clear_error (&error);
200 return;
201 }
202
203 g_signal_connect (self->priv->channel, "invalidated",
204 G_CALLBACK (channel_invalidated_cb), self);
205
206 listener = g_socket_listener_new ();
207 socket = _client_create_local_socket (&error);
208 if (socket == NULL)
209 goto OUT;
210 if (!g_socket_listen (socket, &error))
211 goto OUT;
212 if (!g_socket_listener_add_socket (listener, socket, NULL, &error))
213 goto OUT;
214
215 g_socket_listener_accept_async (listener, NULL,
216 ssh_socket_connected_cb, self);
217
218 get_connection_info (self, NULL, &contact_id, &username);
219 args = _client_create_exec_args (socket, contact_id, username);
220 vte_terminal_fork_command (VTE_TERMINAL (self->priv->vte), "ssh", args,
221 NULL, NULL, FALSE, FALSE, FALSE);
222
223 OUT:
224
225 if (error != NULL)
226 throw_error (self, error);
227
228 g_clear_error (&error);
229 tp_clear_object (&listener);
230 tp_clear_object (&socket);
231 g_strfreev (args);
232 }
233
234 static gboolean
235 start_tube (gpointer user_data)
236 {
237 SshContactTab *self = user_data;
238 const gchar *account_path;
239 const gchar *contact_id;
240
241 g_signal_emit_by_name (self, "tab-initialized");
242
243 get_connection_info (self, &account_path, &contact_id, NULL);
244 _client_create_tube_async (account_path, contact_id, create_tube_cb, self);
245
246 return FALSE;
247 }
248
249 static void
250 constructed (GObject *object)
251 {
252 SshContactTab *self = SSH_CONTACT_TAB (object);
253
254 g_idle_add (start_tube, self);
255
256 vinagre_tab_add_recent_used (VINAGRE_TAB (self));
257 vinagre_tab_set_state (VINAGRE_TAB (self), VINAGRE_TAB_STATE_CONNECTED);
258
259 gtk_widget_show (GTK_WIDGET (self));
260
261 if (G_OBJECT_CLASS (ssh_contact_tab_parent_class)->constructed)
262 G_OBJECT_CLASS (ssh_contact_tab_parent_class)->constructed (object);
263 }
264
265 static void
266 dispose (GObject *object)
267 {
268 SshContactTab *self = SSH_CONTACT_TAB (object);
269
270 if (self->priv->tube_connection)
271 g_io_stream_close (G_IO_STREAM (self->priv->tube_connection), NULL, NULL);
272 tp_clear_object (&self->priv->tube_connection);
273
274 if (self->priv->ssh_connection)
275 g_io_stream_close (G_IO_STREAM (self->priv->ssh_connection), NULL, NULL);
276 tp_clear_object (&self->priv->ssh_connection);
277
278 tp_clear_object (&self->priv->channel);
279
280 if (G_OBJECT_CLASS (ssh_contact_tab_parent_class)->dispose)
281 G_OBJECT_CLASS (ssh_contact_tab_parent_class)->dispose (object);
282 }
283
284 static void
285 ssh_contact_tab_class_init (SshContactTabClass *klass)
286 {
287 GObjectClass *object_class = G_OBJECT_CLASS (klass);
288 VinagreTabClass* tab_class = VINAGRE_TAB_CLASS (klass);
289
290 object_class->constructed = constructed;
291 object_class->dispose = dispose;
292
293 tab_class->impl_get_tooltip = impl_get_tooltip;
294 tab_class->impl_get_screenshot = impl_get_screenshot;
295
296 g_type_class_add_private (klass, sizeof (SshContactTabPrivate));
297
298 }
299
300 static void
301 ssh_contact_tab_init (SshContactTab *self)
302 {
303 self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, SSH_CONTACT_TYPE_TAB,
304 SshContactTabPrivate);
305
306 /* Create the ssh widget */
307 self->priv->vte = vte_terminal_new ();
308 vinagre_tab_add_view (VINAGRE_TAB (self), self->priv->vte);
309 gtk_widget_show (self->priv->vte);
310
311 g_signal_connect (self->priv->vte, "child-exited",
312 G_CALLBACK (ssh_disconnected_cb), self);
313 }
314
315 GtkWidget *
316 ssh_contact_tab_new (VinagreConnection *conn,
317 VinagreWindow *window)
318 {
319 return g_object_new (SSH_CONTACT_TYPE_TAB, "conn", conn, "window", window,
320 NULL);
321 }
322
323 /* vim: set ts=8: */
0 /*
1 * Copyright (C) 2009 Jonh Wendell <wendell@bani.com.br>
2 * Copyright (C) 2010 Collabora Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20 #ifndef __SSH_CONTACT_TAB_H__
21 #define __SSH_CONTACT_TAB_H__
22
23 #include <vinagre/vinagre-tab.h>
24
25 G_BEGIN_DECLS
26
27 #define SSH_CONTACT_TYPE_TAB (ssh_contact_tab_get_type())
28 #define SSH_CONTACT_TAB(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SSH_CONTACT_TYPE_TAB, SshContactTab))
29 #define SSH_CONTACT_TAB_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SSH_CONTACT_TYPE_TAB, SshContactTab const))
30 #define SSH_CONTACT_TAB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SSH_CONTACT_TYPE_TAB, SshContactTabClass))
31 #define SSH_CONTACT_IS_TAB(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SSH_CONTACT_TYPE_TAB))
32 #define SSH_CONTACT_IS_TAB_CLASS(klass)...(G_TYPE_CHECK_CLASS_TYPE ((klass), SSH_CONTACT_TYPE_TAB))
33 #define SSH_CONTACT_TAB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SSH_CONTACT_TYPE_TAB, SshContactTabClass))
34
35 typedef struct _SshContactTabPrivate SshContactTabPrivate;
36
37 typedef struct
38 {
39 VinagreTab tab;
40 SshContactTabPrivate *priv;
41 } SshContactTab;
42
43 typedef struct
44 {
45 VinagreTabClass parent_class;
46 } SshContactTabClass;
47
48 GType ssh_contact_tab_get_type (void) G_GNUC_CONST;
49
50 GtkWidget *ssh_contact_tab_new (VinagreConnection *conn, VinagreWindow *window);
51
52 G_END_DECLS
53
54 #endif /* __VINAGRE_SSH_TAB_H__ */
55 /* vim: set ts=8: */
0 /*
1 * Copyright (C) 2010 Collabora Ltd.
2 *
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public License as
5 * published by the Free Software Foundation; either version 2 of the
6 * License, or (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public
14 * License along with this program; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
16 * Boston, MA 02110-1301 USA
17 */
18 #include <gtk/gtk.h>
19
20 #include <telepathy-glib/telepathy-glib.h>
21
22 #include "tree-view.h"
23 #include "../client-helpers.h"
24
25 enum
26 {
27 COL_ACCOUNT,
28 COL_CONTACT,
29 COL_TEXT,
30 N_COL
31 };
32
33 struct _SshContactTreeViewPrivate
34 {
35 GtkListStore *store;
36 TpAccountManager *account_manager;
37 };
38
39 G_DEFINE_TYPE (SshContactTreeView, ssh_contact_tree_view,
40 GTK_TYPE_TREE_VIEW);
41
42 static TpAccount *
43 find_account_for_contact (SshContactTreeView *self,
44 TpContact *contact)
45 {
46 TpAccount *account = NULL;
47 TpConnection *connection;
48 GList *list;
49
50 connection = tp_contact_get_connection (contact);
51 list = tp_account_manager_get_valid_accounts (self->priv->account_manager);
52 while (list)
53 {
54 if (tp_account_get_connection (list->data) == connection)
55 {
56 account = list->data;
57 break;
58 }
59
60 list = g_list_delete_link (list, list);
61 }
62 g_list_free (list);
63
64 return account;
65 }
66
67 static void
68 got_contacts_cb (TpConnection *connection,
69 guint n_contacts,
70 TpContact * const *contacts,
71 guint n_failed,
72 const TpHandle *failed,
73 const GError *error,
74 gpointer user_data,
75 GObject *weak_object)
76 {
77 SshContactTreeView *self = user_data;
78 guint i;
79
80 if (error != NULL)
81 {
82 g_debug ("%s", error->message);
83 return;
84 }
85
86 for (i = 0; i < n_contacts; i++)
87 {
88 TpAccount *account;
89
90 if (!_capabilities_has_stream_tube (tp_contact_get_capabilities (contacts[i])))
91 continue;
92
93 account = find_account_for_contact (self, contacts[i]);
94 gtk_list_store_insert_with_values (self->priv->store, NULL, -1,
95 COL_ACCOUNT, account,
96 COL_CONTACT, contacts[i],
97 COL_TEXT, tp_contact_get_alias (contacts[i]),
98 -1);
99 }
100 }
101
102 static void
103 stored_channel_prepare_cb (GObject *object,
104 GAsyncResult *res,
105 gpointer self)
106 {
107 TpChannel *channel = TP_CHANNEL (object);
108 TpConnection *connection;
109 TpContactFeature features[] = { TP_CONTACT_FEATURE_ALIAS,
110 TP_CONTACT_FEATURE_CAPABILITIES };
111 const TpIntSet *set;
112 GArray *handles;
113 GError *error = NULL;
114
115 if (!tp_proxy_prepare_finish (channel, res, &error))
116 {
117 g_debug ("%s", error->message);
118 g_clear_error (&error);
119 return;
120 }
121
122 connection = tp_channel_borrow_connection (channel);
123 set = tp_channel_group_get_members (channel);
124 handles = tp_intset_to_array (set);
125
126 tp_connection_get_contacts_by_handle (connection, handles->len,
127 (TpHandle *) handles->data, G_N_ELEMENTS (features), features,
128 got_contacts_cb, self, NULL, NULL);
129
130 g_array_unref (handles);
131 }
132
133 static void
134 ensure_stored_channel_cb (TpConnection *connection,
135 gboolean yours,
136 const gchar *channel_path,
137 GHashTable *properties,
138 const GError *error,
139 gpointer self,
140 GObject *weak_object)
141 {
142 TpChannel *channel;
143 GQuark features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
144 GError *err = NULL;
145
146 if (error != NULL)
147 {
148 g_debug ("%s", error->message);
149 return;
150 }
151
152 channel = tp_channel_new_from_properties (connection, channel_path,
153 properties, &err);
154 if (channel == NULL)
155 {
156 g_debug ("%s", err->message);
157 g_clear_error (&err);
158 return;
159 }
160
161 tp_proxy_prepare_async (TP_PROXY (channel), features,
162 stored_channel_prepare_cb, self);
163
164 g_object_unref (channel);
165 }
166
167 static void
168 connection_prepare_cb (GObject *object,
169 GAsyncResult *res,
170 gpointer self)
171 {
172 TpConnection *connection = TP_CONNECTION (object);
173 GError *error = NULL;
174 GHashTable *request;
175
176 if (!tp_proxy_prepare_finish (TP_PROXY (connection), res, &error))
177 {
178 g_debug ("%s", error->message);
179 g_clear_error (&error);
180 return;
181 }
182
183 if (!_capabilities_has_stream_tube (tp_connection_get_capabilities (connection)))
184 return;
185
186 request = tp_asv_new (
187 TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
188 TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
189 TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
190 TP_HANDLE_TYPE_LIST,
191 TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING,
192 "stored",
193 NULL);
194
195 tp_cli_connection_interface_requests_call_ensure_channel (connection, -1,
196 request, ensure_stored_channel_cb, self, NULL, NULL);
197
198 g_hash_table_unref (request);
199 }
200
201 static void
202 account_manager_prepare_cb (GObject *object,
203 GAsyncResult *res,
204 gpointer self)
205 {
206 TpAccountManager *manager = TP_ACCOUNT_MANAGER (object);
207 GList *accounts, *l;
208 GError *error = NULL;
209
210 if (!tp_proxy_prepare_finish (TP_PROXY (manager), res, &error))
211 {
212 g_debug ("%s", error->message);
213 g_clear_error (&error);
214 return;
215 }
216
217 accounts = tp_account_manager_get_valid_accounts (manager);
218 for (l = accounts; l != NULL; l = l->next)
219 {
220 GQuark features[] = { TP_CONNECTION_FEATURE_CAPABILITIES, 0 };
221 TpAccount *account = l->data;
222 TpConnection *connection;
223
224 connection = tp_account_get_connection (account);
225 if (connection != NULL)
226 tp_proxy_prepare_async (TP_PROXY (connection), features,
227 connection_prepare_cb, self);
228 }
229 g_list_free (accounts);
230 }
231
232 static void
233 dispose (GObject *object)
234 {
235 SshContactTreeView *self = SSH_CONTACT_TREE_VIEW (object);
236
237 tp_clear_object (&self->priv->store);
238 tp_clear_object (&self->priv->account_manager);
239
240 G_OBJECT_CLASS (ssh_contact_tree_view_parent_class)->dispose (object);
241 }
242
243 static void
244 ssh_contact_tree_view_init (SshContactTreeView *self)
245 {
246 GtkTreeView *view = GTK_TREE_VIEW (self);
247 GtkCellRenderer *renderer;
248 GtkTreeViewColumn *column;
249
250 self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, SSH_CONTACT_TYPE_TREE_VIEW,
251 SshContactTreeViewPrivate);
252
253 self->priv->store = gtk_list_store_new (N_COL,
254 G_TYPE_OBJECT, /* ACCOUNT */
255 G_TYPE_OBJECT, /* CONTACT */
256 G_TYPE_STRING); /* TEXT */
257
258 renderer = gtk_cell_renderer_text_new ();
259 column = gtk_tree_view_column_new_with_attributes ("Contacts",
260 renderer, "text", COL_TEXT, NULL);
261
262 gtk_tree_view_append_column (view, column);
263 gtk_tree_view_set_headers_visible (view, FALSE);
264 gtk_tree_view_set_model (view, GTK_TREE_MODEL (self->priv->store));
265
266 self->priv->account_manager = tp_account_manager_dup ();
267 tp_proxy_prepare_async (TP_PROXY (self->priv->account_manager), NULL,
268 account_manager_prepare_cb, self);
269 }
270
271 static void
272 ssh_contact_tree_view_class_init (SshContactTreeViewClass *klass)
273 {
274 GObjectClass *object_class = G_OBJECT_CLASS (klass);
275
276 object_class->dispose = dispose;
277
278 g_type_class_add_private (klass, sizeof (SshContactTreeViewPrivate));
279 }
280
281 GtkWidget *
282 ssh_contact_tree_view_new (void)
283 {
284 return g_object_new (SSH_CONTACT_TYPE_TREE_VIEW, NULL);
285 }
286
287 TpAccount *
288 ssh_contact_tree_view_get_selected_account (SshContactTreeView *self)
289 {
290 GtkTreeSelection *selection;
291 GtkTreeModel *model;
292 GtkTreeIter iter;
293 TpAccount *account = NULL;
294
295 g_return_val_if_fail (SSH_CONTACT_IS_TREE_VIEW (self), NULL);
296
297 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (self));
298 if (!gtk_tree_selection_get_selected (selection, &model, &iter))
299 return NULL;
300
301 gtk_tree_model_get (model, &iter, COL_ACCOUNT, &account, -1);
302 g_object_unref (account);
303
304 return account;
305 }
306
307 TpContact *
308 ssh_contact_tree_view_get_selected_contact (SshContactTreeView *self)
309 {
310 GtkTreeSelection *selection;
311 GtkTreeModel *model;
312 GtkTreeIter iter;
313 TpContact *contact;
314
315 g_return_val_if_fail (SSH_CONTACT_IS_TREE_VIEW (self), NULL);
316
317 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (self));
318 if (!gtk_tree_selection_get_selected (selection, &model, &iter))
319 return NULL;
320
321 gtk_tree_model_get (model, &iter, COL_CONTACT, &contact, -1);
322 g_object_unref (contact);
323
324 return contact;
325 }
326
327 /* vim: set ts=8: */
0 /*
1 * Copyright (C) 2010 Collabora Ltd.
2 *
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public License as
5 * published by the Free Software Foundation; either version 2 of the
6 * License, or (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public
14 * License along with this program; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
16 * Boston, MA 02110-1301 USA
17 */
18
19 #ifndef __SSH_CONTACT_TREE_VIEW_H__
20 #define __SSH_CONTACT_TREE_VIEW_H__
21
22 #include <gtk/gtk.h>
23
24 #include <telepathy-glib/telepathy-glib.h>
25
26 G_BEGIN_DECLS
27
28 #define SSH_CONTACT_TYPE_TREE_VIEW (ssh_contact_tree_view_get_type ())
29 #define SSH_CONTACT_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SSH_CONTACT_TYPE_TREE_VIEW, SshContactTreeView))
30 #define SSH_CONTACT_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SSH_CONTACT_TYPE_TREE_VIEW, SshContactTreeViewClass))
31 #define SSH_CONTACT_IS_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SSH_CONTACT_TYPE_TREE_VIEW))
32 #define SSH_CONTACT_IS_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SSH_CONTACT_TYPE_TREE_VIEW))
33 #define SSH_CONTACT_TREE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SSH_CONTACT_TYPE_TREE_VIEW, SshContactTreeViewClass))
34
35 typedef struct _SshContactTreeViewPrivate SshContactTreeViewPrivate;
36
37 typedef struct
38 {
39 GtkTreeView parent_instance;
40 SshContactTreeViewPrivate *priv;
41 } SshContactTreeView;
42
43 typedef struct
44 {
45 GtkTreeViewClass parent_class;
46 } SshContactTreeViewClass;
47
48 GType ssh_contact_tree_view_get_type (void) G_GNUC_CONST;
49
50 GtkWidget *ssh_contact_tree_view_new (void);
51
52 TpAccount *ssh_contact_tree_view_get_selected_account (SshContactTreeView *self);
53
54 TpContact *ssh_contact_tree_view_get_selected_contact (SshContactTreeView *self);
55
56
57 G_END_DECLS
58
59 #endif /* __SSH_CONTACT_TREE_VIEW_H__ */
60 /* vim: set ts=8: */