Codebase list pkgconf / 1bbbb31
Merge remote-tracking branch 'origin/v1.6.3' into debian/master Andrej Shadura 4 years ago
42 changed file(s) with 10033 addition(s) and 9838 deletion(s). Raw diff Collapse all Expand all
._config.guess less more
Binary diff not shown
._config.sub less more
Binary diff not shown
._install-sh less more
Binary diff not shown
0 A. Wilcox <AWilcox@Wilcox-Tech.com>
1 Alexander Tsoy <alexander@tsoy.me>
2 Alexpux <alexey.pawlow@gmail.com>
3 Alon Bar-Lev <alon.barlev@gmail.com>
4 Alyx <alyx@malkier.net>
5 Ariadne Conill <ariadne@dereferenced.org>
06 Baptiste Daroussin <bapt@FreeBSD.org>
1 Jeff Horelick <jdhore@gentoo.org>
2 Michał Górny <mgorny@gentoo.org
3 William Pitcock <nenolod@atheme.org>
7 Baptiste Daroussin <bapt@gandi.net>
8 Bryan Drewery <bryan@shatow.net>
9 Dag-Erling Smørgrav <des@des.no>
10 Dan Kegel <dank@kegel.com>
11 Dan Kegel <dank@oblong.com>
12 Dan Nicholson <dbn.lists@gmail.com>
13 David Michael <fedora.dm0@gmail.com>
14 Emil Renner Berthing <esmil@mailme.dk>
15 Fabian Groffen <grobian@gentoo.org>
16 Graham Ollis <plicease@cpan.org>
17 Gregor Richards <Richards@codu.org>
18 Ignacio Casal Quinteiro <qignacio@amazon.com>
19 Igor Gnatenko <ignatenko@redhat.com>
20 Issam Maghni <concatime@users.noreply.github.com>
21 JD Horelick <jdhore1@gmail.com>
22 Jason Dusek <jason.dusek@gmail.com>
23 Javier Viguera <javier.viguera@digi.com>
24 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
25 John Hein <jhgit@users.github.com>
26 Jussi Pakkanen <jpakkane@gmail.com>
27 Leorize <alaviss@users.noreply.github.com>
28 Luca Barbato <lu_zero@gentoo.org>
29 Marcin Wojdyr <wojdyr@gmail.com>
30 Maxin B. John <maxinbjohn@users.noreply.github.com>
31 Michał Górny <mgorny@gentoo.org>
32 Mike Frysinger <vapier@gentoo.org>
33 Seungha Yang <seungha.yang@navercorp.com>
34 TingPing <tingping@tingping.se>
35 Tobias Kortkamp <t6@users.noreply.github.com>
36 Tony Theodore <tonyt@logyst.com>
37 Volker Braun <vbraun.name@gmail.com>
38 Yu Kobayashi <yukoba@accelart.jp>
39 orbea <orbea@fredslev.dk>
40 ✈ Graham ✈ <plicease@cpan.org>
+0
-135
CMakeLists.txt less more
0 # CMake configuration for pkgconf
1 #
2 # Caution: this assumes you don't set CMAKE_BUILD_TYPE
3 #
4 # FIXME: this isn't a native cmake approach, it's just a straight translation
5 # of configure.ac + Makefile.am, barely good enough to work on Linux, Mac, and Windows.
6
7 # Require recent cmake, but not so recent that Ubuntu 16.04 users have to upgrade.
8 CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1 FATAL_ERROR)
9
10 PROJECT(pkgconf C)
11
12 SET(PACKAGE_BUGREPORT http://github.com/pkgconf/pkgconf/issues)
13 SET(PACKAGE_NAME pkgconf)
14 SET(PACKAGE_VERSION 1.6.0)
15 SET(LIBPKGCONF_VERSION "3.0.0")
16 SET(LIBPKGCONF_SOVERSION 3)
17
18 #-------- GNU directory variables ---------
19
20 SET(abs_top_srcdir ${pkgconf_SOURCE_DIR})
21 SET(prefix ${CMAKE_INSTALL_PREFIX})
22 SET(exec_prefix ${prefix})
23 SET(datarootdir ${prefix}/share)
24 SET(datadir ${datarootdir})
25 SET(libdir ${prefix}/lib)
26 SET(includedir ${prefix}/include)
27
28 #-------- User-settable options ---------
29
30 # FIXME: this is overridden in get_default_pkgconfig_path() on windows, but not in test_env.sh.in?!
31 SET(pkg_config_dir "${libdir}/pkgconfig:${datadir}/pkgconfig" CACHE STRING "specify the places where pc files will be found")
32 SET(PKGCONFIGDIR "${pkg_config_dir}")
33 SET(pkg_default_dir "${PKGCONFIGDIR}") # c'mon, make up your mind
34
35 SET(personality_dir "${libdir}/pkgconfig/personality.d:${datadir}/pkgconfig/personality.d" CACHE STRING "specify the places where personality files will be found")
36
37 SET(system_libdir "${libdir}" CACHE STRING "specify the system library directory (default LIBDIR)")
38 SET(SYSTEM_LIBDIR "${system_libdir}")
39
40 SET(system_includedir "${includedir}" CACHE STRING "specify the system include directory (default INCLUDEDIR)")
41 SET(SYSTEM_INCLUDEDIR "${system_includedir}")
42
43 #-------- Probe system ---------
44
45 INCLUDE (CheckIncludeFiles)
46 CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)
47 INCLUDE (CheckFunctionExists)
48 CHECK_FUNCTION_EXISTS(strlcpy HAVE_STRLCPY)
49 CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
50 CHECK_FUNCTION_EXISTS(strndup HAVE_STRNDUP)
51 CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH)
52
53 #-------- Generate source files ---------
54
55 CONFIGURE_FILE(libpkgconf/config.h.cmake.in libpkgconf/config.h @ONLY)
56
57 #-------- Configure common compiler options --------
58
59 IF (MSVC)
60 # Make warnings fatal... but ignore C4996: 'strdup' two different ways
61 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX /wd4996")
62 # Ignore warning C4996: 'strncpy'
63 ADD_DEFINITIONS("-D_CRT_SECURE_NO_WARNINGS=1")
64 ELSE()
65 INCLUDE(CheckCCompilerFlag)
66 CHECK_C_COMPILER_FLAG("-Wall" COMPILER_HAS_WALL)
67 IF (COMPILER_HAS_WALL)
68 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
69 ENDIF()
70 CHECK_C_COMPILER_FLAG("-Wextra" COMPILER_HAS_WEXTRA)
71 IF (COMPILER_HAS_WEXTRA)
72 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra")
73 ENDIF()
74 CHECK_C_COMPILER_FLAG("-Wformat=2" COMPILER_HAS_WFORMAT)
75 IF (COMPILER_HAS_WFORMAT)
76 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat=2")
77 ENDIF()
78 CHECK_C_COMPILER_FLAG("-std=gnu99" COMPILER_HAS_STD_GNU99)
79 CHECK_C_COMPILER_FLAG("-std=c99" COMPILER_HAS_STD_C99)
80 IF (COMPILER_HAS_STD_GNU99)
81 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
82 ELSEIF (COMPILER_HAS_STD_C99)
83 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
84 ENDIF()
85 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -g")
86 ENDIF()
87
88 INCLUDE_DIRECTORIES(${pkgconf_SOURCE_DIR} ${pkgconf_BINARY_DIR})
89 ADD_DEFINITIONS(-DPERSONALITY_PATH=\"${personality_dir}\")
90 ADD_DEFINITIONS(-DPKG_DEFAULT_PATH=\"${pkg_default_dir}\")
91 ADD_DEFINITIONS(-DSYSTEM_INCLUDEDIR=\"${system_includedir}\")
92 ADD_DEFINITIONS(-DSYSTEM_LIBDIR=\"${system_libdir}\")
93
94 #-------- Build and install library --------
95
96 # Place shared libraries in same place as binary, for ease of setting PATH in test_env.sh
97 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${pkgconf_BINARY_DIR})
98 ADD_SUBDIRECTORY(libpkgconf)
99
100 #-------- Build and install executable --------
101
102 INCLUDE_DIRECTORIES(${libpkgconf_BINARY_DIR})
103 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Icli")
104 ADD_EXECUTABLE(pkgconf cli/main.c cli/getopt_long.c cli/renderer-msvc.c)
105 TARGET_LINK_LIBRARIES(pkgconf libpkgconf)
106 INSTALL(TARGETS pkgconf DESTINATION bin)
107
108 #-------- Tests ---------
109
110 ENABLE_TESTING()
111
112 # Handy that these files need configuring; cygwin atf doesn't like windows line endings, and NEWLINE_STYLE helps.
113 FOREACH(file Kyuafile tests/Kyuafile tests/test_env.sh)
114 CONFIGURE_FILE(${file}.in ${file} @ONLY NEWLINE_STYLE UNIX)
115 ENDFOREACH()
116
117 SET(test_scripts
118 tests/basic
119 tests/builtins
120 tests/conflicts
121 tests/framework
122 tests/parser
123 tests/provides
124 tests/regress
125 tests/requires
126 tests/sysroot
127 tests/version
128 )
129 # Handy that these files need configuring; cygwin atf doesn't like windows line endings, and NEWLINE_STYLE helps.
130 FOREACH(file ${test_scripts})
131 CONFIGURE_FILE(${file}.sh ${file} @ONLY NEWLINE_STYLE UNIX)
132 ENDFOREACH()
133
134 ADD_TEST(kyua kyua --config=none test)
1414 lib_LTLIBRARIES = libpkgconf.la
1515
1616 EXTRA_DIST = pkg.m4 \
17 CMakeLists.txt \
18 libpkgconf/CMakeLists.txt \
1917 libpkgconf/win-dirent.h \
2018 tests/lib-relocatable/lib/pkgconfig/foo.pc \
2119 tests/lib1/argv-parse-2.pc \
8381 tests/lib1/fragment-quoting-7.pc \
8482 tests/lib1/malformed-1.pc \
8583 tests/lib1/malformed-quoting.pc \
84 tests/lib1/malformed-version.pc \
8685 tests/lib1/explicit-sysroot.pc \
8786 tests/lib1/escaped-backslash.pc \
8887 tests/lib1/cflags-internal.pc \
0 # Makefile.in generated by automake 1.15 from Makefile.am.
0 # Makefile.in generated by automake 1.15.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2017 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
9494 subdir = .
9595 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
9696 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
97 $(top_srcdir)/configure.ac
97 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
98 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
99 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
98100 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
99101 $(ACLOCAL_M4)
100102 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
368370 prefix = @prefix@
369371 program_transform_name = @program_transform_name@
370372 psdir = @psdir@
373 runstatedir = @runstatedir@
371374 sbindir = @sbindir@
372375 sharedstatedir = @sharedstatedir@
373376 srcdir = @srcdir@
385388 AM_CFLAGS = -DPERSONALITY_PATH=\"$(personality_dir)\" -DPKG_DEFAULT_PATH=\"$(pkg_default_dir)\" -DSYSTEM_INCLUDEDIR=\"$(system_includedir)\" -DSYSTEM_LIBDIR=\"$(system_libdir)\"
386389 lib_LTLIBRARIES = libpkgconf.la
387390 EXTRA_DIST = pkg.m4 \
388 CMakeLists.txt \
389 libpkgconf/CMakeLists.txt \
390391 libpkgconf/win-dirent.h \
391392 tests/lib-relocatable/lib/pkgconfig/foo.pc \
392393 tests/lib1/argv-parse-2.pc \
454455 tests/lib1/fragment-quoting-7.pc \
455456 tests/lib1/malformed-1.pc \
456457 tests/lib1/malformed-quoting.pc \
458 tests/lib1/malformed-version.pc \
457459 tests/lib1/explicit-sysroot.pc \
458460 tests/lib1/escaped-backslash.pc \
459461 tests/lib1/cflags-internal.pc \
11521154 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
11531155 || chmod -R a+r "$(distdir)"
11541156 dist-gzip: distdir
1155 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
1157 tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
11561158 $(am__post_remove_distdir)
11571159
11581160 dist-bzip2: distdir
11771179 @echo WARNING: "Support for shar distribution archives is" \
11781180 "deprecated." >&2
11791181 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
1180 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
1182 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
11811183 $(am__post_remove_distdir)
11821184
11831185 dist-zip: distdir
11951197 distcheck: dist
11961198 case '$(DIST_ARCHIVES)' in \
11971199 *.tar.gz*) \
1198 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
1200 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
11991201 *.tar.bz2*) \
12001202 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
12011203 *.tar.lz*) \
12051207 *.tar.Z*) \
12061208 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
12071209 *.shar.gz*) \
1208 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
1210 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
12091211 *.zip*) \
12101212 unzip $(distdir).zip ;;\
12111213 esac
00 Changes from previous version of pkgconf
11 ========================================
2
3 Changes from 1.6.2 to 1.6.3:
4 ----------------------------
5
6 * Bug fixes:
7 - Properly tokenize versions. Versions cannot logically contain
8 whitespace, as dependency-lists would not properly tokenize if
9 they could. A diagnostic is generated for malformed version
10 strings containing whitespace when --validate is used.
11
12 * Enhancements:
13 - CMake support has been dropped. Use Meson to build on Windows.
14
15 Changes from 1.6.1 to 1.6.2:
16 ----------------------------
17
18 * Bug fixes:
19 - Fixed a memory leak when deduplicating paths.
20 - Fixed strndup-related build regression on Windows.
21
22 * Enhancements:
23 - Added pkgconf-lite variant. pkgconf-lite is a stripped down
24 variant of pkgconf that only includes pkg-config features.
25 - Added --modversion description to pkgconf(1) man page.
26
27 Changes from 1.6.0 to 1.6.1:
28 ----------------------------
29
30 * Bug fixes:
31 - Fixed an issue where a personality may not be properly selected
32 due to argv[0] containing a full path.
33 - Fixed a regression where having an empty PKG_CONFIG_LIBDIR
34 environment variable would not eliminate the default search
35 paths.
36 - Use POSIX realpath(3) instead of readlink() for deduplicating the
37 search path. Use _fullpath() on Windows for the same purpose.
38 - The dequoting logic for tuples has been improved to ensure that
39 quotes *inside* a value remain quoted when necessary.
240
341 Changes from 1.5.4 to 1.6.0:
442 ----------------------------
0 # pkgconf
0 # pkgconf [![builds.sr.ht status](https://builds.sr.ht/~kaniini/pkgconf.svg)](https://builds.sr.ht/~kaniini/pkgconf?)
11
22 `pkgconf` is a program which helps to configure compiler and linker flags for
33 development libraries. It is similar to pkg-config from freedesktop.org.
55 `libpkgconf` is a library which provides access to most of `pkgconf`'s functionality, to allow
66 other tooling such as compilers and IDEs to discover and use libraries configured by
77 pkgconf.
8
9 ## git repository has moved
10
11 Note: due to the recent acquisition of GitHub by Microsoft, we have moved our git
12 repository to <https://git.dereferenced.org/pkgconf/pkgconf>.
138
149 ## using `pkgconf` with autotools
1510
121116 Release tarballs are available at <https://distfiles.dereferenced.org/pkgconf/>.
122117 Please only use the tarballs from distfiles.dereferenced.org.
123118
124 ## reporting bugs
119 ## contacts
125120
126 See <https://git.dereferenced.org/pkgconf/pkgconf/issues>.
121 You can report bugs at <https://todo.sr.ht/~kaniini/pkgconf>.
127122
128 Also you can contact us at `#pkgconf` at `irc.freenode.net`.
123 There is a mailing list at <https://lists.sr.ht/~kaniini/pkgconf>.
124
125 You can contact us via IRC at `#pkgconf` at `irc.freenode.net`.
0 # generated automatically by aclocal 1.15 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
0 # generated automatically by aclocal 1.15.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
33
44 # This file is free software; the Free Software Foundation
55 # gives unlimited permission to copy and/or distribute it,
1919 If you have problems, you may need to regenerate the build system entirely.
2020 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2121
22 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23 #
24 # Copyright (C) 1996-2001, 2003-2015 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) 2014 Free Software Foundation, Inc.
33 # This is free software; see the source for copying conditions. There is NO
34 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35
36 # GNU Libtool is free software; you can redistribute it and/or modify
37 # it under the terms of the GNU General Public License as published by
38 # the Free Software Foundation; either version 2 of of the License, or
39 # (at your option) any later version.
40 #
41 # As a special exception to the GNU General Public License, if you
42 # distribute this file as part of a program or library that is built
43 # using GNU Libtool, you may include this file under the same
44 # distribution terms that you use for the rest of that program.
45 #
46 # GNU Libtool is distributed in the hope that it will be useful, but
47 # WITHOUT ANY WARRANTY; without even the implied warranty of
48 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49 # GNU General Public License for more details.
50 #
51 # You should have received a copy of the GNU General Public License
52 # along with this program. If not, see <http://www.gnu.org/licenses/>.
53 ])
54
55 # serial 58 LT_INIT
56
57
58 # LT_PREREQ(VERSION)
59 # ------------------
60 # Complain and exit if this libtool version is less that VERSION.
61 m4_defun([LT_PREREQ],
62 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
63 [m4_default([$3],
64 [m4_fatal([Libtool version $1 or higher is required],
65 63)])],
66 [$2])])
67
68
69 # _LT_CHECK_BUILDDIR
70 # ------------------
71 # Complain if the absolute build directory name contains unusual characters
72 m4_defun([_LT_CHECK_BUILDDIR],
73 [case `pwd` in
74 *\ * | *\ *)
75 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
76 esac
77 ])
78
79
80 # LT_INIT([OPTIONS])
81 # ------------------
82 AC_DEFUN([LT_INIT],
83 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
84 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
85 AC_BEFORE([$0], [LT_LANG])dnl
86 AC_BEFORE([$0], [LT_OUTPUT])dnl
87 AC_BEFORE([$0], [LTDL_INIT])dnl
88 m4_require([_LT_CHECK_BUILDDIR])dnl
89
90 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
91 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
92 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
93 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
94 dnl unless we require an AC_DEFUNed macro:
95 AC_REQUIRE([LTOPTIONS_VERSION])dnl
96 AC_REQUIRE([LTSUGAR_VERSION])dnl
97 AC_REQUIRE([LTVERSION_VERSION])dnl
98 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
99 m4_require([_LT_PROG_LTMAIN])dnl
100
101 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
102
103 dnl Parse OPTIONS
104 _LT_SET_OPTIONS([$0], [$1])
105
106 # This can be used to rebuild libtool when needed
107 LIBTOOL_DEPS=$ltmain
108
109 # Always use our own libtool.
110 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
111 AC_SUBST(LIBTOOL)dnl
112
113 _LT_SETUP
114
115 # Only expand once:
116 m4_define([LT_INIT])
117 ])# LT_INIT
118
119 # Old names:
120 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
121 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
122 dnl aclocal-1.4 backwards compatibility:
123 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
124 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
125
126
127 # _LT_PREPARE_CC_BASENAME
128 # -----------------------
129 m4_defun([_LT_PREPARE_CC_BASENAME], [
130 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
131 func_cc_basename ()
132 {
133 for cc_temp in @S|@*""; do
134 case $cc_temp in
135 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
136 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
137 \-*) ;;
138 *) break;;
139 esac
140 done
141 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
142 }
143 ])# _LT_PREPARE_CC_BASENAME
144
145
146 # _LT_CC_BASENAME(CC)
147 # -------------------
148 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
149 # but that macro is also expanded into generated libtool script, which
150 # arranges for $SED and $ECHO to be set by different means.
151 m4_defun([_LT_CC_BASENAME],
152 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
153 AC_REQUIRE([_LT_DECL_SED])dnl
154 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
155 func_cc_basename $1
156 cc_basename=$func_cc_basename_result
157 ])
158
159
160 # _LT_FILEUTILS_DEFAULTS
161 # ----------------------
162 # It is okay to use these file commands and assume they have been set
163 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
164 m4_defun([_LT_FILEUTILS_DEFAULTS],
165 [: ${CP="cp -f"}
166 : ${MV="mv -f"}
167 : ${RM="rm -f"}
168 ])# _LT_FILEUTILS_DEFAULTS
169
170
171 # _LT_SETUP
172 # ---------
173 m4_defun([_LT_SETUP],
174 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
175 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
176 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
177 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
178
179 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
180 dnl
181 _LT_DECL([], [host_alias], [0], [The host system])dnl
182 _LT_DECL([], [host], [0])dnl
183 _LT_DECL([], [host_os], [0])dnl
184 dnl
185 _LT_DECL([], [build_alias], [0], [The build system])dnl
186 _LT_DECL([], [build], [0])dnl
187 _LT_DECL([], [build_os], [0])dnl
188 dnl
189 AC_REQUIRE([AC_PROG_CC])dnl
190 AC_REQUIRE([LT_PATH_LD])dnl
191 AC_REQUIRE([LT_PATH_NM])dnl
192 dnl
193 AC_REQUIRE([AC_PROG_LN_S])dnl
194 test -z "$LN_S" && LN_S="ln -s"
195 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
196 dnl
197 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
198 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
199 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
200 dnl
201 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
202 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
203 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
204 m4_require([_LT_CMD_RELOAD])dnl
205 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
206 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
207 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
208 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
209 m4_require([_LT_WITH_SYSROOT])dnl
210 m4_require([_LT_CMD_TRUNCATE])dnl
211
212 _LT_CONFIG_LIBTOOL_INIT([
213 # See if we are running on zsh, and set the options that allow our
214 # commands through without removal of \ escapes INIT.
215 if test -n "\${ZSH_VERSION+set}"; then
216 setopt NO_GLOB_SUBST
217 fi
218 ])
219 if test -n "${ZSH_VERSION+set}"; then
220 setopt NO_GLOB_SUBST
221 fi
222
223 _LT_CHECK_OBJDIR
224
225 m4_require([_LT_TAG_COMPILER])dnl
226
227 case $host_os in
228 aix3*)
229 # AIX sometimes has problems with the GCC collect2 program. For some
230 # reason, if we set the COLLECT_NAMES environment variable, the problems
231 # vanish in a puff of smoke.
232 if test set != "${COLLECT_NAMES+set}"; then
233 COLLECT_NAMES=
234 export COLLECT_NAMES
235 fi
236 ;;
237 esac
238
239 # Global variables:
240 ofile=libtool
241 can_build_shared=yes
242
243 # All known linkers require a '.a' archive for static linking (except MSVC,
244 # which needs '.lib').
245 libext=a
246
247 with_gnu_ld=$lt_cv_prog_gnu_ld
248
249 old_CC=$CC
250 old_CFLAGS=$CFLAGS
251
252 # Set sane defaults for various variables
253 test -z "$CC" && CC=cc
254 test -z "$LTCC" && LTCC=$CC
255 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
256 test -z "$LD" && LD=ld
257 test -z "$ac_objext" && ac_objext=o
258
259 _LT_CC_BASENAME([$compiler])
260
261 # Only perform the check for file, if the check method requires it
262 test -z "$MAGIC_CMD" && MAGIC_CMD=file
263 case $deplibs_check_method in
264 file_magic*)
265 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
266 _LT_PATH_MAGIC
267 fi
268 ;;
269 esac
270
271 # Use C for the default configuration in the libtool script
272 LT_SUPPORTED_TAG([CC])
273 _LT_LANG_C_CONFIG
274 _LT_LANG_DEFAULT_CONFIG
275 _LT_CONFIG_COMMANDS
276 ])# _LT_SETUP
277
278
279 # _LT_PREPARE_SED_QUOTE_VARS
280 # --------------------------
281 # Define a few sed substitution that help us do robust quoting.
282 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
283 [# Backslashify metacharacters that are still active within
284 # double-quoted strings.
285 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
286
287 # Same as above, but do not quote variable references.
288 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
289
290 # Sed substitution to delay expansion of an escaped shell variable in a
291 # double_quote_subst'ed string.
292 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
293
294 # Sed substitution to delay expansion of an escaped single quote.
295 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
296
297 # Sed substitution to avoid accidental globbing in evaled expressions
298 no_glob_subst='s/\*/\\\*/g'
299 ])
300
301 # _LT_PROG_LTMAIN
302 # ---------------
303 # Note that this code is called both from 'configure', and 'config.status'
304 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
305 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
306 # so we pass a copy along to make sure it has a sensible value anyway.
307 m4_defun([_LT_PROG_LTMAIN],
308 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
309 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
310 ltmain=$ac_aux_dir/ltmain.sh
311 ])# _LT_PROG_LTMAIN
312
313
314
315 # So that we can recreate a full libtool script including additional
316 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
317 # in macros and then make a single call at the end using the 'libtool'
318 # label.
319
320
321 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
322 # ----------------------------------------
323 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
324 m4_define([_LT_CONFIG_LIBTOOL_INIT],
325 [m4_ifval([$1],
326 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
327 [$1
328 ])])])
329
330 # Initialize.
331 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
332
333
334 # _LT_CONFIG_LIBTOOL([COMMANDS])
335 # ------------------------------
336 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
337 m4_define([_LT_CONFIG_LIBTOOL],
338 [m4_ifval([$1],
339 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
340 [$1
341 ])])])
342
343 # Initialize.
344 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
345
346
347 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
348 # -----------------------------------------------------
349 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
350 [_LT_CONFIG_LIBTOOL([$1])
351 _LT_CONFIG_LIBTOOL_INIT([$2])
352 ])
353
354
355 # _LT_FORMAT_COMMENT([COMMENT])
356 # -----------------------------
357 # Add leading comment marks to the start of each line, and a trailing
358 # full-stop to the whole comment if one is not present already.
359 m4_define([_LT_FORMAT_COMMENT],
360 [m4_ifval([$1], [
361 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
362 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
363 )])
364
365
366
367
368
369 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
370 # -------------------------------------------------------------------
371 # CONFIGNAME is the name given to the value in the libtool script.
372 # VARNAME is the (base) name used in the configure script.
373 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
374 # VARNAME. Any other value will be used directly.
375 m4_define([_LT_DECL],
376 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
377 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
378 [m4_ifval([$1], [$1], [$2])])
379 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
380 m4_ifval([$4],
381 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
382 lt_dict_add_subkey([lt_decl_dict], [$2],
383 [tagged?], [m4_ifval([$5], [yes], [no])])])
384 ])
385
386
387 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
388 # --------------------------------------------------------
389 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
390
391
392 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
393 # ------------------------------------------------
394 m4_define([lt_decl_tag_varnames],
395 [_lt_decl_filter([tagged?], [yes], $@)])
396
397
398 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
399 # ---------------------------------------------------------
400 m4_define([_lt_decl_filter],
401 [m4_case([$#],
402 [0], [m4_fatal([$0: too few arguments: $#])],
403 [1], [m4_fatal([$0: too few arguments: $#: $1])],
404 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
405 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
406 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
407 ])
408
409
410 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
411 # --------------------------------------------------
412 m4_define([lt_decl_quote_varnames],
413 [_lt_decl_filter([value], [1], $@)])
414
415
416 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
417 # ---------------------------------------------------
418 m4_define([lt_decl_dquote_varnames],
419 [_lt_decl_filter([value], [2], $@)])
420
421
422 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
423 # ---------------------------------------------------
424 m4_define([lt_decl_varnames_tagged],
425 [m4_assert([$# <= 2])dnl
426 _$0(m4_quote(m4_default([$1], [[, ]])),
427 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
428 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
429 m4_define([_lt_decl_varnames_tagged],
430 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
431
432
433 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
434 # ------------------------------------------------
435 m4_define([lt_decl_all_varnames],
436 [_$0(m4_quote(m4_default([$1], [[, ]])),
437 m4_if([$2], [],
438 m4_quote(lt_decl_varnames),
439 m4_quote(m4_shift($@))))[]dnl
440 ])
441 m4_define([_lt_decl_all_varnames],
442 [lt_join($@, lt_decl_varnames_tagged([$1],
443 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
444 ])
445
446
447 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
448 # ------------------------------------
449 # Quote a variable value, and forward it to 'config.status' so that its
450 # declaration there will have the same value as in 'configure'. VARNAME
451 # must have a single quote delimited value for this to work.
452 m4_define([_LT_CONFIG_STATUS_DECLARE],
453 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
454
455
456 # _LT_CONFIG_STATUS_DECLARATIONS
457 # ------------------------------
458 # We delimit libtool config variables with single quotes, so when
459 # we write them to config.status, we have to be sure to quote all
460 # embedded single quotes properly. In configure, this macro expands
461 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
462 #
463 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
464 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
465 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
466 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
467
468
469 # _LT_LIBTOOL_TAGS
470 # ----------------
471 # Output comment and list of tags supported by the script
472 m4_defun([_LT_LIBTOOL_TAGS],
473 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
474 available_tags='_LT_TAGS'dnl
475 ])
476
477
478 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
479 # -----------------------------------
480 # Extract the dictionary values for VARNAME (optionally with TAG) and
481 # expand to a commented shell variable setting:
482 #
483 # # Some comment about what VAR is for.
484 # visible_name=$lt_internal_name
485 m4_define([_LT_LIBTOOL_DECLARE],
486 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
487 [description])))[]dnl
488 m4_pushdef([_libtool_name],
489 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
490 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
491 [0], [_libtool_name=[$]$1],
492 [1], [_libtool_name=$lt_[]$1],
493 [2], [_libtool_name=$lt_[]$1],
494 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
495 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
496 ])
497
498
499 # _LT_LIBTOOL_CONFIG_VARS
500 # -----------------------
501 # Produce commented declarations of non-tagged libtool config variables
502 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
503 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
504 # section) are produced by _LT_LIBTOOL_TAG_VARS.
505 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
506 [m4_foreach([_lt_var],
507 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
508 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
509
510
511 # _LT_LIBTOOL_TAG_VARS(TAG)
512 # -------------------------
513 m4_define([_LT_LIBTOOL_TAG_VARS],
514 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
515 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
516
517
518 # _LT_TAGVAR(VARNAME, [TAGNAME])
519 # ------------------------------
520 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
521
522
523 # _LT_CONFIG_COMMANDS
524 # -------------------
525 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
526 # variables for single and double quote escaping we saved from calls
527 # to _LT_DECL, we can put quote escaped variables declarations
528 # into 'config.status', and then the shell code to quote escape them in
529 # for loops in 'config.status'. Finally, any additional code accumulated
530 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
531 m4_defun([_LT_CONFIG_COMMANDS],
532 [AC_PROVIDE_IFELSE([LT_OUTPUT],
533 dnl If the libtool generation code has been placed in $CONFIG_LT,
534 dnl instead of duplicating it all over again into config.status,
535 dnl then we will have config.status run $CONFIG_LT later, so it
536 dnl needs to know what name is stored there:
537 [AC_CONFIG_COMMANDS([libtool],
538 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
539 dnl If the libtool generation code is destined for config.status,
540 dnl expand the accumulated commands and init code now:
541 [AC_CONFIG_COMMANDS([libtool],
542 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
543 ])#_LT_CONFIG_COMMANDS
544
545
546 # Initialize.
547 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
548 [
549
550 # The HP-UX ksh and POSIX shell print the target directory to stdout
551 # if CDPATH is set.
552 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
553
554 sed_quote_subst='$sed_quote_subst'
555 double_quote_subst='$double_quote_subst'
556 delay_variable_subst='$delay_variable_subst'
557 _LT_CONFIG_STATUS_DECLARATIONS
558 LTCC='$LTCC'
559 LTCFLAGS='$LTCFLAGS'
560 compiler='$compiler_DEFAULT'
561
562 # A function that is used when there is no print builtin or printf.
563 func_fallback_echo ()
564 {
565 eval 'cat <<_LTECHO_EOF
566 \$[]1
567 _LTECHO_EOF'
568 }
569
570 # Quote evaled strings.
571 for var in lt_decl_all_varnames([[ \
572 ]], lt_decl_quote_varnames); do
573 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
574 *[[\\\\\\\`\\"\\\$]]*)
575 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
576 ;;
577 *)
578 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
579 ;;
580 esac
581 done
582
583 # Double-quote double-evaled strings.
584 for var in lt_decl_all_varnames([[ \
585 ]], lt_decl_dquote_varnames); do
586 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
587 *[[\\\\\\\`\\"\\\$]]*)
588 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
589 ;;
590 *)
591 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
592 ;;
593 esac
594 done
595
596 _LT_OUTPUT_LIBTOOL_INIT
597 ])
598
599 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
600 # ------------------------------------
601 # Generate a child script FILE with all initialization necessary to
602 # reuse the environment learned by the parent script, and make the
603 # file executable. If COMMENT is supplied, it is inserted after the
604 # '#!' sequence but before initialization text begins. After this
605 # macro, additional text can be appended to FILE to form the body of
606 # the child script. The macro ends with non-zero status if the
607 # file could not be fully written (such as if the disk is full).
608 m4_ifdef([AS_INIT_GENERATED],
609 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
610 [m4_defun([_LT_GENERATED_FILE_INIT],
611 [m4_require([AS_PREPARE])]dnl
612 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
613 [lt_write_fail=0
614 cat >$1 <<_ASEOF || lt_write_fail=1
615 #! $SHELL
616 # Generated by $as_me.
617 $2
618 SHELL=\${CONFIG_SHELL-$SHELL}
619 export SHELL
620 _ASEOF
621 cat >>$1 <<\_ASEOF || lt_write_fail=1
622 AS_SHELL_SANITIZE
623 _AS_PREPARE
624 exec AS_MESSAGE_FD>&1
625 _ASEOF
626 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
627 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
628
629 # LT_OUTPUT
630 # ---------
631 # This macro allows early generation of the libtool script (before
632 # AC_OUTPUT is called), incase it is used in configure for compilation
633 # tests.
634 AC_DEFUN([LT_OUTPUT],
635 [: ${CONFIG_LT=./config.lt}
636 AC_MSG_NOTICE([creating $CONFIG_LT])
637 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
638 [# Run this file to recreate a libtool stub with the current configuration.])
639
640 cat >>"$CONFIG_LT" <<\_LTEOF
641 lt_cl_silent=false
642 exec AS_MESSAGE_LOG_FD>>config.log
643 {
644 echo
645 AS_BOX([Running $as_me.])
646 } >&AS_MESSAGE_LOG_FD
647
648 lt_cl_help="\
649 '$as_me' creates a local libtool stub from the current configuration,
650 for use in further configure time tests before the real libtool is
651 generated.
652
653 Usage: $[0] [[OPTIONS]]
654
655 -h, --help print this help, then exit
656 -V, --version print version number, then exit
657 -q, --quiet do not print progress messages
658 -d, --debug don't remove temporary files
659
660 Report bugs to <bug-libtool@gnu.org>."
661
662 lt_cl_version="\
663 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
664 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
665 configured by $[0], generated by m4_PACKAGE_STRING.
666
667 Copyright (C) 2011 Free Software Foundation, Inc.
668 This config.lt script is free software; the Free Software Foundation
669 gives unlimited permision to copy, distribute and modify it."
670
671 while test 0 != $[#]
672 do
673 case $[1] in
674 --version | --v* | -V )
675 echo "$lt_cl_version"; exit 0 ;;
676 --help | --h* | -h )
677 echo "$lt_cl_help"; exit 0 ;;
678 --debug | --d* | -d )
679 debug=: ;;
680 --quiet | --q* | --silent | --s* | -q )
681 lt_cl_silent=: ;;
682
683 -*) AC_MSG_ERROR([unrecognized option: $[1]
684 Try '$[0] --help' for more information.]) ;;
685
686 *) AC_MSG_ERROR([unrecognized argument: $[1]
687 Try '$[0] --help' for more information.]) ;;
688 esac
689 shift
690 done
691
692 if $lt_cl_silent; then
693 exec AS_MESSAGE_FD>/dev/null
694 fi
695 _LTEOF
696
697 cat >>"$CONFIG_LT" <<_LTEOF
698 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
699 _LTEOF
700
701 cat >>"$CONFIG_LT" <<\_LTEOF
702 AC_MSG_NOTICE([creating $ofile])
703 _LT_OUTPUT_LIBTOOL_COMMANDS
704 AS_EXIT(0)
705 _LTEOF
706 chmod +x "$CONFIG_LT"
707
708 # configure is writing to config.log, but config.lt does its own redirection,
709 # appending to config.log, which fails on DOS, as config.log is still kept
710 # open by configure. Here we exec the FD to /dev/null, effectively closing
711 # config.log, so it can be properly (re)opened and appended to by config.lt.
712 lt_cl_success=:
713 test yes = "$silent" &&
714 lt_config_lt_args="$lt_config_lt_args --quiet"
715 exec AS_MESSAGE_LOG_FD>/dev/null
716 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
717 exec AS_MESSAGE_LOG_FD>>config.log
718 $lt_cl_success || AS_EXIT(1)
719 ])# LT_OUTPUT
720
721
722 # _LT_CONFIG(TAG)
723 # ---------------
724 # If TAG is the built-in tag, create an initial libtool script with a
725 # default configuration from the untagged config vars. Otherwise add code
726 # to config.status for appending the configuration named by TAG from the
727 # matching tagged config vars.
728 m4_defun([_LT_CONFIG],
729 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
730 _LT_CONFIG_SAVE_COMMANDS([
731 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
732 m4_if(_LT_TAG, [C], [
733 # See if we are running on zsh, and set the options that allow our
734 # commands through without removal of \ escapes.
735 if test -n "${ZSH_VERSION+set}"; then
736 setopt NO_GLOB_SUBST
737 fi
738
739 cfgfile=${ofile}T
740 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
741 $RM "$cfgfile"
742
743 cat <<_LT_EOF >> "$cfgfile"
744 #! $SHELL
745 # Generated automatically by $as_me ($PACKAGE) $VERSION
746 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
747 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
748
749 # Provide generalized library-building support services.
750 # Written by Gordon Matzigkeit, 1996
751
752 _LT_COPYING
753 _LT_LIBTOOL_TAGS
754
755 # Configured defaults for sys_lib_dlsearch_path munging.
756 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
757
758 # ### BEGIN LIBTOOL CONFIG
759 _LT_LIBTOOL_CONFIG_VARS
760 _LT_LIBTOOL_TAG_VARS
761 # ### END LIBTOOL CONFIG
762
763 _LT_EOF
764
765 cat <<'_LT_EOF' >> "$cfgfile"
766
767 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
768
769 _LT_PREPARE_MUNGE_PATH_LIST
770 _LT_PREPARE_CC_BASENAME
771
772 # ### END FUNCTIONS SHARED WITH CONFIGURE
773
774 _LT_EOF
775
776 case $host_os in
777 aix3*)
778 cat <<\_LT_EOF >> "$cfgfile"
779 # AIX sometimes has problems with the GCC collect2 program. For some
780 # reason, if we set the COLLECT_NAMES environment variable, the problems
781 # vanish in a puff of smoke.
782 if test set != "${COLLECT_NAMES+set}"; then
783 COLLECT_NAMES=
784 export COLLECT_NAMES
785 fi
786 _LT_EOF
787 ;;
788 esac
789
790 _LT_PROG_LTMAIN
791
792 # We use sed instead of cat because bash on DJGPP gets confused if
793 # if finds mixed CR/LF and LF-only lines. Since sed operates in
794 # text mode, it properly converts lines to CR/LF. This bash problem
795 # is reportedly fixed, but why not run on old versions too?
796 sed '$q' "$ltmain" >> "$cfgfile" \
797 || (rm -f "$cfgfile"; exit 1)
798
799 mv -f "$cfgfile" "$ofile" ||
800 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
801 chmod +x "$ofile"
802 ],
803 [cat <<_LT_EOF >> "$ofile"
804
805 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
806 dnl in a comment (ie after a #).
807 # ### BEGIN LIBTOOL TAG CONFIG: $1
808 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
809 # ### END LIBTOOL TAG CONFIG: $1
810 _LT_EOF
811 ])dnl /m4_if
812 ],
813 [m4_if([$1], [], [
814 PACKAGE='$PACKAGE'
815 VERSION='$VERSION'
816 RM='$RM'
817 ofile='$ofile'], [])
818 ])dnl /_LT_CONFIG_SAVE_COMMANDS
819 ])# _LT_CONFIG
820
821
822 # LT_SUPPORTED_TAG(TAG)
823 # ---------------------
824 # Trace this macro to discover what tags are supported by the libtool
825 # --tag option, using:
826 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
827 AC_DEFUN([LT_SUPPORTED_TAG], [])
828
829
830 # C support is built-in for now
831 m4_define([_LT_LANG_C_enabled], [])
832 m4_define([_LT_TAGS], [])
833
834
835 # LT_LANG(LANG)
836 # -------------
837 # Enable libtool support for the given language if not already enabled.
838 AC_DEFUN([LT_LANG],
839 [AC_BEFORE([$0], [LT_OUTPUT])dnl
840 m4_case([$1],
841 [C], [_LT_LANG(C)],
842 [C++], [_LT_LANG(CXX)],
843 [Go], [_LT_LANG(GO)],
844 [Java], [_LT_LANG(GCJ)],
845 [Fortran 77], [_LT_LANG(F77)],
846 [Fortran], [_LT_LANG(FC)],
847 [Windows Resource], [_LT_LANG(RC)],
848 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
849 [_LT_LANG($1)],
850 [m4_fatal([$0: unsupported language: "$1"])])])dnl
851 ])# LT_LANG
852
853
854 # _LT_LANG(LANGNAME)
855 # ------------------
856 m4_defun([_LT_LANG],
857 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
858 [LT_SUPPORTED_TAG([$1])dnl
859 m4_append([_LT_TAGS], [$1 ])dnl
860 m4_define([_LT_LANG_]$1[_enabled], [])dnl
861 _LT_LANG_$1_CONFIG($1)])dnl
862 ])# _LT_LANG
863
864
865 m4_ifndef([AC_PROG_GO], [
866 # NOTE: This macro has been submitted for inclusion into #
867 # GNU Autoconf as AC_PROG_GO. When it is available in #
868 # a released version of Autoconf we should remove this #
869 # macro and use it instead. #
870 m4_defun([AC_PROG_GO],
871 [AC_LANG_PUSH(Go)dnl
872 AC_ARG_VAR([GOC], [Go compiler command])dnl
873 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
874 _AC_ARG_VAR_LDFLAGS()dnl
875 AC_CHECK_TOOL(GOC, gccgo)
876 if test -z "$GOC"; then
877 if test -n "$ac_tool_prefix"; then
878 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
879 fi
880 fi
881 if test -z "$GOC"; then
882 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
883 fi
884 ])#m4_defun
885 ])#m4_ifndef
886
887
888 # _LT_LANG_DEFAULT_CONFIG
889 # -----------------------
890 m4_defun([_LT_LANG_DEFAULT_CONFIG],
891 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
892 [LT_LANG(CXX)],
893 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
894
895 AC_PROVIDE_IFELSE([AC_PROG_F77],
896 [LT_LANG(F77)],
897 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
898
899 AC_PROVIDE_IFELSE([AC_PROG_FC],
900 [LT_LANG(FC)],
901 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
902
903 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
904 dnl pulling things in needlessly.
905 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
906 [LT_LANG(GCJ)],
907 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
908 [LT_LANG(GCJ)],
909 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
910 [LT_LANG(GCJ)],
911 [m4_ifdef([AC_PROG_GCJ],
912 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
913 m4_ifdef([A][M_PROG_GCJ],
914 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
915 m4_ifdef([LT_PROG_GCJ],
916 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
917
918 AC_PROVIDE_IFELSE([AC_PROG_GO],
919 [LT_LANG(GO)],
920 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
921
922 AC_PROVIDE_IFELSE([LT_PROG_RC],
923 [LT_LANG(RC)],
924 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
925 ])# _LT_LANG_DEFAULT_CONFIG
926
927 # Obsolete macros:
928 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
929 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
930 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
931 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
932 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
933 dnl aclocal-1.4 backwards compatibility:
934 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
935 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
936 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
937 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
938 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
939
940
941 # _LT_TAG_COMPILER
942 # ----------------
943 m4_defun([_LT_TAG_COMPILER],
944 [AC_REQUIRE([AC_PROG_CC])dnl
945
946 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
947 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
948 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
949 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
950
951 # If no C compiler was specified, use CC.
952 LTCC=${LTCC-"$CC"}
953
954 # If no C compiler flags were specified, use CFLAGS.
955 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
956
957 # Allow CC to be a program name with arguments.
958 compiler=$CC
959 ])# _LT_TAG_COMPILER
960
961
962 # _LT_COMPILER_BOILERPLATE
963 # ------------------------
964 # Check for compiler boilerplate output or warnings with
965 # the simple compiler test code.
966 m4_defun([_LT_COMPILER_BOILERPLATE],
967 [m4_require([_LT_DECL_SED])dnl
968 ac_outfile=conftest.$ac_objext
969 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
970 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
971 _lt_compiler_boilerplate=`cat conftest.err`
972 $RM conftest*
973 ])# _LT_COMPILER_BOILERPLATE
974
975
976 # _LT_LINKER_BOILERPLATE
977 # ----------------------
978 # Check for linker boilerplate output or warnings with
979 # the simple link test code.
980 m4_defun([_LT_LINKER_BOILERPLATE],
981 [m4_require([_LT_DECL_SED])dnl
982 ac_outfile=conftest.$ac_objext
983 echo "$lt_simple_link_test_code" >conftest.$ac_ext
984 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
985 _lt_linker_boilerplate=`cat conftest.err`
986 $RM -r conftest*
987 ])# _LT_LINKER_BOILERPLATE
988
989 # _LT_REQUIRED_DARWIN_CHECKS
990 # -------------------------
991 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
992 case $host_os in
993 rhapsody* | darwin*)
994 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
995 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
996 AC_CHECK_TOOL([LIPO], [lipo], [:])
997 AC_CHECK_TOOL([OTOOL], [otool], [:])
998 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
999 _LT_DECL([], [DSYMUTIL], [1],
1000 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1001 _LT_DECL([], [NMEDIT], [1],
1002 [Tool to change global to local symbols on Mac OS X])
1003 _LT_DECL([], [LIPO], [1],
1004 [Tool to manipulate fat objects and archives on Mac OS X])
1005 _LT_DECL([], [OTOOL], [1],
1006 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1007 _LT_DECL([], [OTOOL64], [1],
1008 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1009
1010 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1011 [lt_cv_apple_cc_single_mod=no
1012 if test -z "$LT_MULTI_MODULE"; then
1013 # By default we will add the -single_module flag. You can override
1014 # by either setting the environment variable LT_MULTI_MODULE
1015 # non-empty at configure time, or by adding -multi_module to the
1016 # link flags.
1017 rm -rf libconftest.dylib*
1018 echo "int foo(void){return 1;}" > conftest.c
1019 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1020 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1021 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1022 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1023 _lt_result=$?
1024 # If there is a non-empty error log, and "single_module"
1025 # appears in it, assume the flag caused a linker warning
1026 if test -s conftest.err && $GREP single_module conftest.err; then
1027 cat conftest.err >&AS_MESSAGE_LOG_FD
1028 # Otherwise, if the output was created with a 0 exit code from
1029 # the compiler, it worked.
1030 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1031 lt_cv_apple_cc_single_mod=yes
1032 else
1033 cat conftest.err >&AS_MESSAGE_LOG_FD
1034 fi
1035 rm -rf libconftest.dylib*
1036 rm -f conftest.*
1037 fi])
1038
1039 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1040 [lt_cv_ld_exported_symbols_list],
1041 [lt_cv_ld_exported_symbols_list=no
1042 save_LDFLAGS=$LDFLAGS
1043 echo "_main" > conftest.sym
1044 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1045 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1046 [lt_cv_ld_exported_symbols_list=yes],
1047 [lt_cv_ld_exported_symbols_list=no])
1048 LDFLAGS=$save_LDFLAGS
1049 ])
1050
1051 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1052 [lt_cv_ld_force_load=no
1053 cat > conftest.c << _LT_EOF
1054 int forced_loaded() { return 2;}
1055 _LT_EOF
1056 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1057 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1058 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1059 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1060 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1061 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1062 cat > conftest.c << _LT_EOF
1063 int main() { return 0;}
1064 _LT_EOF
1065 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1066 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1067 _lt_result=$?
1068 if test -s conftest.err && $GREP force_load conftest.err; then
1069 cat conftest.err >&AS_MESSAGE_LOG_FD
1070 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1071 lt_cv_ld_force_load=yes
1072 else
1073 cat conftest.err >&AS_MESSAGE_LOG_FD
1074 fi
1075 rm -f conftest.err libconftest.a conftest conftest.c
1076 rm -rf conftest.dSYM
1077 ])
1078 case $host_os in
1079 rhapsody* | darwin1.[[012]])
1080 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1081 darwin1.*)
1082 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1083 darwin*) # darwin 5.x on
1084 # if running on 10.5 or later, the deployment target defaults
1085 # to the OS version, if on x86, and 10.4, the deployment
1086 # target defaults to 10.4. Don't you love it?
1087 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1088 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1089 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1090 10.[[012]][[,.]]*)
1091 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1092 10.*)
1093 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1094 esac
1095 ;;
1096 esac
1097 if test yes = "$lt_cv_apple_cc_single_mod"; then
1098 _lt_dar_single_mod='$single_module'
1099 fi
1100 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1101 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1102 else
1103 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1104 fi
1105 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1106 _lt_dsymutil='~$DSYMUTIL $lib || :'
1107 else
1108 _lt_dsymutil=
1109 fi
1110 ;;
1111 esac
1112 ])
1113
1114
1115 # _LT_DARWIN_LINKER_FEATURES([TAG])
1116 # ---------------------------------
1117 # Checks for linker and compiler features on darwin
1118 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1119 [
1120 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1121 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1122 _LT_TAGVAR(hardcode_direct, $1)=no
1123 _LT_TAGVAR(hardcode_automatic, $1)=yes
1124 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1125 if test yes = "$lt_cv_ld_force_load"; then
1126 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1127 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1128 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1129 else
1130 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1131 fi
1132 _LT_TAGVAR(link_all_deplibs, $1)=yes
1133 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1134 case $cc_basename in
1135 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1136 *) _lt_dar_can_shared=$GCC ;;
1137 esac
1138 if test yes = "$_lt_dar_can_shared"; then
1139 output_verbose_link_cmd=func_echo_all
1140 _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"
1141 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1142 _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"
1143 _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"
1144 m4_if([$1], [CXX],
1145 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
1146 _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"
1147 _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"
1148 fi
1149 ],[])
1150 else
1151 _LT_TAGVAR(ld_shlibs, $1)=no
1152 fi
1153 ])
1154
1155 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1156 # ----------------------------------
1157 # Links a minimal program and checks the executable
1158 # for the system default hardcoded library path. In most cases,
1159 # this is /usr/lib:/lib, but when the MPI compilers are used
1160 # the location of the communication and MPI libs are included too.
1161 # If we don't find anything, use the default library path according
1162 # to the aix ld manual.
1163 # Store the results from the different compilers for each TAGNAME.
1164 # Allow to override them for all tags through lt_cv_aix_libpath.
1165 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1166 [m4_require([_LT_DECL_SED])dnl
1167 if test set = "${lt_cv_aix_libpath+set}"; then
1168 aix_libpath=$lt_cv_aix_libpath
1169 else
1170 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1171 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1172 lt_aix_libpath_sed='[
1173 /Import File Strings/,/^$/ {
1174 /^0/ {
1175 s/^0 *\([^ ]*\) *$/\1/
1176 p
1177 }
1178 }]'
1179 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1180 # Check for a 64-bit object if we didn't find anything.
1181 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1182 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1183 fi],[])
1184 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1185 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1186 fi
1187 ])
1188 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1189 fi
1190 ])# _LT_SYS_MODULE_PATH_AIX
1191
1192
1193 # _LT_SHELL_INIT(ARG)
1194 # -------------------
1195 m4_define([_LT_SHELL_INIT],
1196 [m4_divert_text([M4SH-INIT], [$1
1197 ])])# _LT_SHELL_INIT
1198
1199
1200
1201 # _LT_PROG_ECHO_BACKSLASH
1202 # -----------------------
1203 # Find how we can fake an echo command that does not interpret backslash.
1204 # In particular, with Autoconf 2.60 or later we add some code to the start
1205 # of the generated configure script that will find a shell with a builtin
1206 # printf (that we can use as an echo command).
1207 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1208 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1209 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1210 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1211
1212 AC_MSG_CHECKING([how to print strings])
1213 # Test print first, because it will be a builtin if present.
1214 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1215 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1216 ECHO='print -r --'
1217 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1218 ECHO='printf %s\n'
1219 else
1220 # Use this function as a fallback that always works.
1221 func_fallback_echo ()
1222 {
1223 eval 'cat <<_LTECHO_EOF
1224 $[]1
1225 _LTECHO_EOF'
1226 }
1227 ECHO='func_fallback_echo'
1228 fi
1229
1230 # func_echo_all arg...
1231 # Invoke $ECHO with all args, space-separated.
1232 func_echo_all ()
1233 {
1234 $ECHO "$*"
1235 }
1236
1237 case $ECHO in
1238 printf*) AC_MSG_RESULT([printf]) ;;
1239 print*) AC_MSG_RESULT([print -r]) ;;
1240 *) AC_MSG_RESULT([cat]) ;;
1241 esac
1242
1243 m4_ifdef([_AS_DETECT_SUGGESTED],
1244 [_AS_DETECT_SUGGESTED([
1245 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1246 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1247 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1248 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1249 PATH=/empty FPATH=/empty; export PATH FPATH
1250 test "X`printf %s $ECHO`" = "X$ECHO" \
1251 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1252
1253 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1254 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1255 ])# _LT_PROG_ECHO_BACKSLASH
1256
1257
1258 # _LT_WITH_SYSROOT
1259 # ----------------
1260 AC_DEFUN([_LT_WITH_SYSROOT],
1261 [AC_MSG_CHECKING([for sysroot])
1262 AC_ARG_WITH([sysroot],
1263 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1264 [Search for dependent libraries within DIR (or the compiler's sysroot
1265 if not specified).])],
1266 [], [with_sysroot=no])
1267
1268 dnl lt_sysroot will always be passed unquoted. We quote it here
1269 dnl in case the user passed a directory name.
1270 lt_sysroot=
1271 case $with_sysroot in #(
1272 yes)
1273 if test yes = "$GCC"; then
1274 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1275 fi
1276 ;; #(
1277 /*)
1278 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1279 ;; #(
1280 no|'')
1281 ;; #(
1282 *)
1283 AC_MSG_RESULT([$with_sysroot])
1284 AC_MSG_ERROR([The sysroot must be an absolute path.])
1285 ;;
1286 esac
1287
1288 AC_MSG_RESULT([${lt_sysroot:-no}])
1289 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1290 [dependent libraries, and where our libraries should be installed.])])
1291
1292 # _LT_ENABLE_LOCK
1293 # ---------------
1294 m4_defun([_LT_ENABLE_LOCK],
1295 [AC_ARG_ENABLE([libtool-lock],
1296 [AS_HELP_STRING([--disable-libtool-lock],
1297 [avoid locking (might break parallel builds)])])
1298 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1299
1300 # Some flags need to be propagated to the compiler or linker for good
1301 # libtool support.
1302 case $host in
1303 ia64-*-hpux*)
1304 # Find out what ABI is being produced by ac_compile, and set mode
1305 # options accordingly.
1306 echo 'int i;' > conftest.$ac_ext
1307 if AC_TRY_EVAL(ac_compile); then
1308 case `/usr/bin/file conftest.$ac_objext` in
1309 *ELF-32*)
1310 HPUX_IA64_MODE=32
1311 ;;
1312 *ELF-64*)
1313 HPUX_IA64_MODE=64
1314 ;;
1315 esac
1316 fi
1317 rm -rf conftest*
1318 ;;
1319 *-*-irix6*)
1320 # Find out what ABI is being produced by ac_compile, and set linker
1321 # options accordingly.
1322 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1323 if AC_TRY_EVAL(ac_compile); then
1324 if test yes = "$lt_cv_prog_gnu_ld"; then
1325 case `/usr/bin/file conftest.$ac_objext` in
1326 *32-bit*)
1327 LD="${LD-ld} -melf32bsmip"
1328 ;;
1329 *N32*)
1330 LD="${LD-ld} -melf32bmipn32"
1331 ;;
1332 *64-bit*)
1333 LD="${LD-ld} -melf64bmip"
1334 ;;
1335 esac
1336 else
1337 case `/usr/bin/file conftest.$ac_objext` in
1338 *32-bit*)
1339 LD="${LD-ld} -32"
1340 ;;
1341 *N32*)
1342 LD="${LD-ld} -n32"
1343 ;;
1344 *64-bit*)
1345 LD="${LD-ld} -64"
1346 ;;
1347 esac
1348 fi
1349 fi
1350 rm -rf conftest*
1351 ;;
1352
1353 mips64*-*linux*)
1354 # Find out what ABI is being produced by ac_compile, and set linker
1355 # options accordingly.
1356 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1357 if AC_TRY_EVAL(ac_compile); then
1358 emul=elf
1359 case `/usr/bin/file conftest.$ac_objext` in
1360 *32-bit*)
1361 emul="${emul}32"
1362 ;;
1363 *64-bit*)
1364 emul="${emul}64"
1365 ;;
1366 esac
1367 case `/usr/bin/file conftest.$ac_objext` in
1368 *MSB*)
1369 emul="${emul}btsmip"
1370 ;;
1371 *LSB*)
1372 emul="${emul}ltsmip"
1373 ;;
1374 esac
1375 case `/usr/bin/file conftest.$ac_objext` in
1376 *N32*)
1377 emul="${emul}n32"
1378 ;;
1379 esac
1380 LD="${LD-ld} -m $emul"
1381 fi
1382 rm -rf conftest*
1383 ;;
1384
1385 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1386 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1387 # Find out what ABI is being produced by ac_compile, and set linker
1388 # options accordingly. Note that the listed cases only cover the
1389 # situations where additional linker options are needed (such as when
1390 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1391 # vice versa); the common cases where no linker options are needed do
1392 # not appear in the list.
1393 echo 'int i;' > conftest.$ac_ext
1394 if AC_TRY_EVAL(ac_compile); then
1395 case `/usr/bin/file conftest.o` in
1396 *32-bit*)
1397 case $host in
1398 x86_64-*kfreebsd*-gnu)
1399 LD="${LD-ld} -m elf_i386_fbsd"
1400 ;;
1401 x86_64-*linux*)
1402 case `/usr/bin/file conftest.o` in
1403 *x86-64*)
1404 LD="${LD-ld} -m elf32_x86_64"
1405 ;;
1406 *)
1407 LD="${LD-ld} -m elf_i386"
1408 ;;
1409 esac
1410 ;;
1411 powerpc64le-*linux*)
1412 LD="${LD-ld} -m elf32lppclinux"
1413 ;;
1414 powerpc64-*linux*)
1415 LD="${LD-ld} -m elf32ppclinux"
1416 ;;
1417 s390x-*linux*)
1418 LD="${LD-ld} -m elf_s390"
1419 ;;
1420 sparc64-*linux*)
1421 LD="${LD-ld} -m elf32_sparc"
1422 ;;
1423 esac
1424 ;;
1425 *64-bit*)
1426 case $host in
1427 x86_64-*kfreebsd*-gnu)
1428 LD="${LD-ld} -m elf_x86_64_fbsd"
1429 ;;
1430 x86_64-*linux*)
1431 LD="${LD-ld} -m elf_x86_64"
1432 ;;
1433 powerpcle-*linux*)
1434 LD="${LD-ld} -m elf64lppc"
1435 ;;
1436 powerpc-*linux*)
1437 LD="${LD-ld} -m elf64ppc"
1438 ;;
1439 s390*-*linux*|s390*-*tpf*)
1440 LD="${LD-ld} -m elf64_s390"
1441 ;;
1442 sparc*-*linux*)
1443 LD="${LD-ld} -m elf64_sparc"
1444 ;;
1445 esac
1446 ;;
1447 esac
1448 fi
1449 rm -rf conftest*
1450 ;;
1451
1452 *-*-sco3.2v5*)
1453 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1454 SAVE_CFLAGS=$CFLAGS
1455 CFLAGS="$CFLAGS -belf"
1456 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1457 [AC_LANG_PUSH(C)
1458 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1459 AC_LANG_POP])
1460 if test yes != "$lt_cv_cc_needs_belf"; then
1461 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1462 CFLAGS=$SAVE_CFLAGS
1463 fi
1464 ;;
1465 *-*solaris*)
1466 # Find out what ABI is being produced by ac_compile, and set linker
1467 # options accordingly.
1468 echo 'int i;' > conftest.$ac_ext
1469 if AC_TRY_EVAL(ac_compile); then
1470 case `/usr/bin/file conftest.o` in
1471 *64-bit*)
1472 case $lt_cv_prog_gnu_ld in
1473 yes*)
1474 case $host in
1475 i?86-*-solaris*|x86_64-*-solaris*)
1476 LD="${LD-ld} -m elf_x86_64"
1477 ;;
1478 sparc*-*-solaris*)
1479 LD="${LD-ld} -m elf64_sparc"
1480 ;;
1481 esac
1482 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1483 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1484 LD=${LD-ld}_sol2
1485 fi
1486 ;;
1487 *)
1488 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1489 LD="${LD-ld} -64"
1490 fi
1491 ;;
1492 esac
1493 ;;
1494 esac
1495 fi
1496 rm -rf conftest*
1497 ;;
1498 esac
1499
1500 need_locks=$enable_libtool_lock
1501 ])# _LT_ENABLE_LOCK
1502
1503
1504 # _LT_PROG_AR
1505 # -----------
1506 m4_defun([_LT_PROG_AR],
1507 [AC_CHECK_TOOLS(AR, [ar], false)
1508 : ${AR=ar}
1509 : ${AR_FLAGS=cru}
1510 _LT_DECL([], [AR], [1], [The archiver])
1511 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1512
1513 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1514 [lt_cv_ar_at_file=no
1515 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1516 [echo conftest.$ac_objext > conftest.lst
1517 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1518 AC_TRY_EVAL([lt_ar_try])
1519 if test 0 -eq "$ac_status"; then
1520 # Ensure the archiver fails upon bogus file names.
1521 rm -f conftest.$ac_objext libconftest.a
1522 AC_TRY_EVAL([lt_ar_try])
1523 if test 0 -ne "$ac_status"; then
1524 lt_cv_ar_at_file=@
1525 fi
1526 fi
1527 rm -f conftest.* libconftest.a
1528 ])
1529 ])
1530
1531 if test no = "$lt_cv_ar_at_file"; then
1532 archiver_list_spec=
1533 else
1534 archiver_list_spec=$lt_cv_ar_at_file
1535 fi
1536 _LT_DECL([], [archiver_list_spec], [1],
1537 [How to feed a file listing to the archiver])
1538 ])# _LT_PROG_AR
1539
1540
1541 # _LT_CMD_OLD_ARCHIVE
1542 # -------------------
1543 m4_defun([_LT_CMD_OLD_ARCHIVE],
1544 [_LT_PROG_AR
1545
1546 AC_CHECK_TOOL(STRIP, strip, :)
1547 test -z "$STRIP" && STRIP=:
1548 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1549
1550 AC_CHECK_TOOL(RANLIB, ranlib, :)
1551 test -z "$RANLIB" && RANLIB=:
1552 _LT_DECL([], [RANLIB], [1],
1553 [Commands used to install an old-style archive])
1554
1555 # Determine commands to create old-style static archives.
1556 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1557 old_postinstall_cmds='chmod 644 $oldlib'
1558 old_postuninstall_cmds=
1559
1560 if test -n "$RANLIB"; then
1561 case $host_os in
1562 bitrig* | openbsd*)
1563 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1564 ;;
1565 *)
1566 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1567 ;;
1568 esac
1569 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1570 fi
1571
1572 case $host_os in
1573 darwin*)
1574 lock_old_archive_extraction=yes ;;
1575 *)
1576 lock_old_archive_extraction=no ;;
1577 esac
1578 _LT_DECL([], [old_postinstall_cmds], [2])
1579 _LT_DECL([], [old_postuninstall_cmds], [2])
1580 _LT_TAGDECL([], [old_archive_cmds], [2],
1581 [Commands used to build an old-style archive])
1582 _LT_DECL([], [lock_old_archive_extraction], [0],
1583 [Whether to use a lock for old archive extraction])
1584 ])# _LT_CMD_OLD_ARCHIVE
1585
1586
1587 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1588 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1589 # ----------------------------------------------------------------
1590 # Check whether the given compiler option works
1591 AC_DEFUN([_LT_COMPILER_OPTION],
1592 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1593 m4_require([_LT_DECL_SED])dnl
1594 AC_CACHE_CHECK([$1], [$2],
1595 [$2=no
1596 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1597 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1598 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
1599 # Insert the option either (1) after the last *FLAGS variable, or
1600 # (2) before a word containing "conftest.", or (3) at the end.
1601 # Note that $ac_compile itself does not contain backslashes and begins
1602 # with a dollar sign (not a hyphen), so the echo should work correctly.
1603 # The option is referenced via a variable to avoid confusing sed.
1604 lt_compile=`echo "$ac_compile" | $SED \
1605 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1606 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1607 -e 's:$: $lt_compiler_flag:'`
1608 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1609 (eval "$lt_compile" 2>conftest.err)
1610 ac_status=$?
1611 cat conftest.err >&AS_MESSAGE_LOG_FD
1612 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1613 if (exit $ac_status) && test -s "$ac_outfile"; then
1614 # The compiler can only warn and ignore the option if not recognized
1615 # So say no if there are warnings other than the usual output.
1616 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1617 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1618 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1619 $2=yes
1620 fi
1621 fi
1622 $RM conftest*
1623 ])
1624
1625 if test yes = "[$]$2"; then
1626 m4_if([$5], , :, [$5])
1627 else
1628 m4_if([$6], , :, [$6])
1629 fi
1630 ])# _LT_COMPILER_OPTION
1631
1632 # Old name:
1633 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1634 dnl aclocal-1.4 backwards compatibility:
1635 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1636
1637
1638 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1639 # [ACTION-SUCCESS], [ACTION-FAILURE])
1640 # ----------------------------------------------------
1641 # Check whether the given linker option works
1642 AC_DEFUN([_LT_LINKER_OPTION],
1643 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1644 m4_require([_LT_DECL_SED])dnl
1645 AC_CACHE_CHECK([$1], [$2],
1646 [$2=no
1647 save_LDFLAGS=$LDFLAGS
1648 LDFLAGS="$LDFLAGS $3"
1649 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1650 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1651 # The linker can only warn and ignore the option if not recognized
1652 # So say no if there are warnings
1653 if test -s conftest.err; then
1654 # Append any errors to the config.log.
1655 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1656 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1657 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1658 if diff conftest.exp conftest.er2 >/dev/null; then
1659 $2=yes
1660 fi
1661 else
1662 $2=yes
1663 fi
1664 fi
1665 $RM -r conftest*
1666 LDFLAGS=$save_LDFLAGS
1667 ])
1668
1669 if test yes = "[$]$2"; then
1670 m4_if([$4], , :, [$4])
1671 else
1672 m4_if([$5], , :, [$5])
1673 fi
1674 ])# _LT_LINKER_OPTION
1675
1676 # Old name:
1677 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1678 dnl aclocal-1.4 backwards compatibility:
1679 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1680
1681
1682 # LT_CMD_MAX_LEN
1683 #---------------
1684 AC_DEFUN([LT_CMD_MAX_LEN],
1685 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1686 # find the maximum length of command line arguments
1687 AC_MSG_CHECKING([the maximum length of command line arguments])
1688 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1689 i=0
1690 teststring=ABCD
1691
1692 case $build_os in
1693 msdosdjgpp*)
1694 # On DJGPP, this test can blow up pretty badly due to problems in libc
1695 # (any single argument exceeding 2000 bytes causes a buffer overrun
1696 # during glob expansion). Even if it were fixed, the result of this
1697 # check would be larger than it should be.
1698 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1699 ;;
1700
1701 gnu*)
1702 # Under GNU Hurd, this test is not required because there is
1703 # no limit to the length of command line arguments.
1704 # Libtool will interpret -1 as no limit whatsoever
1705 lt_cv_sys_max_cmd_len=-1;
1706 ;;
1707
1708 cygwin* | mingw* | cegcc*)
1709 # On Win9x/ME, this test blows up -- it succeeds, but takes
1710 # about 5 minutes as the teststring grows exponentially.
1711 # Worse, since 9x/ME are not pre-emptively multitasking,
1712 # you end up with a "frozen" computer, even though with patience
1713 # the test eventually succeeds (with a max line length of 256k).
1714 # Instead, let's just punt: use the minimum linelength reported by
1715 # all of the supported platforms: 8192 (on NT/2K/XP).
1716 lt_cv_sys_max_cmd_len=8192;
1717 ;;
1718
1719 mint*)
1720 # On MiNT this can take a long time and run out of memory.
1721 lt_cv_sys_max_cmd_len=8192;
1722 ;;
1723
1724 amigaos*)
1725 # On AmigaOS with pdksh, this test takes hours, literally.
1726 # So we just punt and use a minimum line length of 8192.
1727 lt_cv_sys_max_cmd_len=8192;
1728 ;;
1729
1730 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1731 # This has been around since 386BSD, at least. Likely further.
1732 if test -x /sbin/sysctl; then
1733 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1734 elif test -x /usr/sbin/sysctl; then
1735 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1736 else
1737 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1738 fi
1739 # And add a safety zone
1740 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1741 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1742 ;;
1743
1744 interix*)
1745 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1746 lt_cv_sys_max_cmd_len=196608
1747 ;;
1748
1749 os2*)
1750 # The test takes a long time on OS/2.
1751 lt_cv_sys_max_cmd_len=8192
1752 ;;
1753
1754 osf*)
1755 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1756 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1757 # nice to cause kernel panics so lets avoid the loop below.
1758 # First set a reasonable default.
1759 lt_cv_sys_max_cmd_len=16384
1760 #
1761 if test -x /sbin/sysconfig; then
1762 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1763 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1764 esac
1765 fi
1766 ;;
1767 sco3.2v5*)
1768 lt_cv_sys_max_cmd_len=102400
1769 ;;
1770 sysv5* | sco5v6* | sysv4.2uw2*)
1771 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1772 if test -n "$kargmax"; then
1773 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1774 else
1775 lt_cv_sys_max_cmd_len=32768
1776 fi
1777 ;;
1778 *)
1779 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1780 if test -n "$lt_cv_sys_max_cmd_len" && \
1781 test undefined != "$lt_cv_sys_max_cmd_len"; then
1782 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1783 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1784 else
1785 # Make teststring a little bigger before we do anything with it.
1786 # a 1K string should be a reasonable start.
1787 for i in 1 2 3 4 5 6 7 8; do
1788 teststring=$teststring$teststring
1789 done
1790 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1791 # If test is not a shell built-in, we'll probably end up computing a
1792 # maximum length that is only half of the actual maximum length, but
1793 # we can't tell.
1794 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1795 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1796 test 17 != "$i" # 1/2 MB should be enough
1797 do
1798 i=`expr $i + 1`
1799 teststring=$teststring$teststring
1800 done
1801 # Only check the string length outside the loop.
1802 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1803 teststring=
1804 # Add a significant safety factor because C++ compilers can tack on
1805 # massive amounts of additional arguments before passing them to the
1806 # linker. It appears as though 1/2 is a usable value.
1807 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1808 fi
1809 ;;
1810 esac
1811 ])
1812 if test -n "$lt_cv_sys_max_cmd_len"; then
1813 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1814 else
1815 AC_MSG_RESULT(none)
1816 fi
1817 max_cmd_len=$lt_cv_sys_max_cmd_len
1818 _LT_DECL([], [max_cmd_len], [0],
1819 [What is the maximum length of a command?])
1820 ])# LT_CMD_MAX_LEN
1821
1822 # Old name:
1823 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1824 dnl aclocal-1.4 backwards compatibility:
1825 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1826
1827
1828 # _LT_HEADER_DLFCN
1829 # ----------------
1830 m4_defun([_LT_HEADER_DLFCN],
1831 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1832 ])# _LT_HEADER_DLFCN
1833
1834
1835 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1836 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1837 # ----------------------------------------------------------------
1838 m4_defun([_LT_TRY_DLOPEN_SELF],
1839 [m4_require([_LT_HEADER_DLFCN])dnl
1840 if test yes = "$cross_compiling"; then :
1841 [$4]
1842 else
1843 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1844 lt_status=$lt_dlunknown
1845 cat > conftest.$ac_ext <<_LT_EOF
1846 [#line $LINENO "configure"
1847 #include "confdefs.h"
1848
1849 #if HAVE_DLFCN_H
1850 #include <dlfcn.h>
1851 #endif
1852
1853 #include <stdio.h>
1854
1855 #ifdef RTLD_GLOBAL
1856 # define LT_DLGLOBAL RTLD_GLOBAL
1857 #else
1858 # ifdef DL_GLOBAL
1859 # define LT_DLGLOBAL DL_GLOBAL
1860 # else
1861 # define LT_DLGLOBAL 0
1862 # endif
1863 #endif
1864
1865 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1866 find out it does not work in some platform. */
1867 #ifndef LT_DLLAZY_OR_NOW
1868 # ifdef RTLD_LAZY
1869 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1870 # else
1871 # ifdef DL_LAZY
1872 # define LT_DLLAZY_OR_NOW DL_LAZY
1873 # else
1874 # ifdef RTLD_NOW
1875 # define LT_DLLAZY_OR_NOW RTLD_NOW
1876 # else
1877 # ifdef DL_NOW
1878 # define LT_DLLAZY_OR_NOW DL_NOW
1879 # else
1880 # define LT_DLLAZY_OR_NOW 0
1881 # endif
1882 # endif
1883 # endif
1884 # endif
1885 #endif
1886
1887 /* When -fvisibility=hidden is used, assume the code has been annotated
1888 correspondingly for the symbols needed. */
1889 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1890 int fnord () __attribute__((visibility("default")));
1891 #endif
1892
1893 int fnord () { return 42; }
1894 int main ()
1895 {
1896 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1897 int status = $lt_dlunknown;
1898
1899 if (self)
1900 {
1901 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1902 else
1903 {
1904 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1905 else puts (dlerror ());
1906 }
1907 /* dlclose (self); */
1908 }
1909 else
1910 puts (dlerror ());
1911
1912 return status;
1913 }]
1914 _LT_EOF
1915 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1916 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1917 lt_status=$?
1918 case x$lt_status in
1919 x$lt_dlno_uscore) $1 ;;
1920 x$lt_dlneed_uscore) $2 ;;
1921 x$lt_dlunknown|x*) $3 ;;
1922 esac
1923 else :
1924 # compilation failed
1925 $3
1926 fi
1927 fi
1928 rm -fr conftest*
1929 ])# _LT_TRY_DLOPEN_SELF
1930
1931
1932 # LT_SYS_DLOPEN_SELF
1933 # ------------------
1934 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1935 [m4_require([_LT_HEADER_DLFCN])dnl
1936 if test yes != "$enable_dlopen"; then
1937 enable_dlopen=unknown
1938 enable_dlopen_self=unknown
1939 enable_dlopen_self_static=unknown
1940 else
1941 lt_cv_dlopen=no
1942 lt_cv_dlopen_libs=
1943
1944 case $host_os in
1945 beos*)
1946 lt_cv_dlopen=load_add_on
1947 lt_cv_dlopen_libs=
1948 lt_cv_dlopen_self=yes
1949 ;;
1950
1951 mingw* | pw32* | cegcc*)
1952 lt_cv_dlopen=LoadLibrary
1953 lt_cv_dlopen_libs=
1954 ;;
1955
1956 cygwin*)
1957 lt_cv_dlopen=dlopen
1958 lt_cv_dlopen_libs=
1959 ;;
1960
1961 darwin*)
1962 # if libdl is installed we need to link against it
1963 AC_CHECK_LIB([dl], [dlopen],
1964 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1965 lt_cv_dlopen=dyld
1966 lt_cv_dlopen_libs=
1967 lt_cv_dlopen_self=yes
1968 ])
1969 ;;
1970
1971 tpf*)
1972 # Don't try to run any link tests for TPF. We know it's impossible
1973 # because TPF is a cross-compiler, and we know how we open DSOs.
1974 lt_cv_dlopen=dlopen
1975 lt_cv_dlopen_libs=
1976 lt_cv_dlopen_self=no
1977 ;;
1978
1979 *)
1980 AC_CHECK_FUNC([shl_load],
1981 [lt_cv_dlopen=shl_load],
1982 [AC_CHECK_LIB([dld], [shl_load],
1983 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1984 [AC_CHECK_FUNC([dlopen],
1985 [lt_cv_dlopen=dlopen],
1986 [AC_CHECK_LIB([dl], [dlopen],
1987 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1988 [AC_CHECK_LIB([svld], [dlopen],
1989 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1990 [AC_CHECK_LIB([dld], [dld_link],
1991 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1992 ])
1993 ])
1994 ])
1995 ])
1996 ])
1997 ;;
1998 esac
1999
2000 if test no = "$lt_cv_dlopen"; then
2001 enable_dlopen=no
2002 else
2003 enable_dlopen=yes
2004 fi
2005
2006 case $lt_cv_dlopen in
2007 dlopen)
2008 save_CPPFLAGS=$CPPFLAGS
2009 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2010
2011 save_LDFLAGS=$LDFLAGS
2012 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2013
2014 save_LIBS=$LIBS
2015 LIBS="$lt_cv_dlopen_libs $LIBS"
2016
2017 AC_CACHE_CHECK([whether a program can dlopen itself],
2018 lt_cv_dlopen_self, [dnl
2019 _LT_TRY_DLOPEN_SELF(
2020 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2021 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2022 ])
2023
2024 if test yes = "$lt_cv_dlopen_self"; then
2025 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2026 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2027 lt_cv_dlopen_self_static, [dnl
2028 _LT_TRY_DLOPEN_SELF(
2029 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2030 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2031 ])
2032 fi
2033
2034 CPPFLAGS=$save_CPPFLAGS
2035 LDFLAGS=$save_LDFLAGS
2036 LIBS=$save_LIBS
2037 ;;
2038 esac
2039
2040 case $lt_cv_dlopen_self in
2041 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2042 *) enable_dlopen_self=unknown ;;
2043 esac
2044
2045 case $lt_cv_dlopen_self_static in
2046 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2047 *) enable_dlopen_self_static=unknown ;;
2048 esac
2049 fi
2050 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2051 [Whether dlopen is supported])
2052 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2053 [Whether dlopen of programs is supported])
2054 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2055 [Whether dlopen of statically linked programs is supported])
2056 ])# LT_SYS_DLOPEN_SELF
2057
2058 # Old name:
2059 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2060 dnl aclocal-1.4 backwards compatibility:
2061 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2062
2063
2064 # _LT_COMPILER_C_O([TAGNAME])
2065 # ---------------------------
2066 # Check to see if options -c and -o are simultaneously supported by compiler.
2067 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2068 m4_defun([_LT_COMPILER_C_O],
2069 [m4_require([_LT_DECL_SED])dnl
2070 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2071 m4_require([_LT_TAG_COMPILER])dnl
2072 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2073 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2074 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2075 $RM -r conftest 2>/dev/null
2076 mkdir conftest
2077 cd conftest
2078 mkdir out
2079 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2080
2081 lt_compiler_flag="-o out/conftest2.$ac_objext"
2082 # Insert the option either (1) after the last *FLAGS variable, or
2083 # (2) before a word containing "conftest.", or (3) at the end.
2084 # Note that $ac_compile itself does not contain backslashes and begins
2085 # with a dollar sign (not a hyphen), so the echo should work correctly.
2086 lt_compile=`echo "$ac_compile" | $SED \
2087 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2088 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2089 -e 's:$: $lt_compiler_flag:'`
2090 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2091 (eval "$lt_compile" 2>out/conftest.err)
2092 ac_status=$?
2093 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2094 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2095 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2096 then
2097 # The compiler can only warn and ignore the option if not recognized
2098 # So say no if there are warnings
2099 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2100 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2101 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2102 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2103 fi
2104 fi
2105 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2106 $RM conftest*
2107 # SGI C++ compiler will create directory out/ii_files/ for
2108 # template instantiation
2109 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2110 $RM out/* && rmdir out
2111 cd ..
2112 $RM -r conftest
2113 $RM conftest*
2114 ])
2115 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2116 [Does compiler simultaneously support -c and -o options?])
2117 ])# _LT_COMPILER_C_O
2118
2119
2120 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2121 # ----------------------------------
2122 # Check to see if we can do hard links to lock some files if needed
2123 m4_defun([_LT_COMPILER_FILE_LOCKS],
2124 [m4_require([_LT_ENABLE_LOCK])dnl
2125 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2126 _LT_COMPILER_C_O([$1])
2127
2128 hard_links=nottested
2129 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2130 # do not overwrite the value of need_locks provided by the user
2131 AC_MSG_CHECKING([if we can lock with hard links])
2132 hard_links=yes
2133 $RM conftest*
2134 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2135 touch conftest.a
2136 ln conftest.a conftest.b 2>&5 || hard_links=no
2137 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2138 AC_MSG_RESULT([$hard_links])
2139 if test no = "$hard_links"; then
2140 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2141 need_locks=warn
2142 fi
2143 else
2144 need_locks=no
2145 fi
2146 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2147 ])# _LT_COMPILER_FILE_LOCKS
2148
2149
2150 # _LT_CHECK_OBJDIR
2151 # ----------------
2152 m4_defun([_LT_CHECK_OBJDIR],
2153 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2154 [rm -f .libs 2>/dev/null
2155 mkdir .libs 2>/dev/null
2156 if test -d .libs; then
2157 lt_cv_objdir=.libs
2158 else
2159 # MS-DOS does not allow filenames that begin with a dot.
2160 lt_cv_objdir=_libs
2161 fi
2162 rmdir .libs 2>/dev/null])
2163 objdir=$lt_cv_objdir
2164 _LT_DECL([], [objdir], [0],
2165 [The name of the directory that contains temporary libtool files])dnl
2166 m4_pattern_allow([LT_OBJDIR])dnl
2167 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2168 [Define to the sub-directory where libtool stores uninstalled libraries.])
2169 ])# _LT_CHECK_OBJDIR
2170
2171
2172 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2173 # --------------------------------------
2174 # Check hardcoding attributes.
2175 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2176 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2177 _LT_TAGVAR(hardcode_action, $1)=
2178 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2179 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2180 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2181
2182 # We can hardcode non-existent directories.
2183 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2184 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2185 # have to relink, otherwise we might link with an installed library
2186 # when we should be linking with a yet-to-be-installed one
2187 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2188 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2189 # Linking always hardcodes the temporary library directory.
2190 _LT_TAGVAR(hardcode_action, $1)=relink
2191 else
2192 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2193 _LT_TAGVAR(hardcode_action, $1)=immediate
2194 fi
2195 else
2196 # We cannot hardcode anything, or else we can only hardcode existing
2197 # directories.
2198 _LT_TAGVAR(hardcode_action, $1)=unsupported
2199 fi
2200 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2201
2202 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2203 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2204 # Fast installation is not supported
2205 enable_fast_install=no
2206 elif test yes = "$shlibpath_overrides_runpath" ||
2207 test no = "$enable_shared"; then
2208 # Fast installation is not necessary
2209 enable_fast_install=needless
2210 fi
2211 _LT_TAGDECL([], [hardcode_action], [0],
2212 [How to hardcode a shared library path into an executable])
2213 ])# _LT_LINKER_HARDCODE_LIBPATH
2214
2215
2216 # _LT_CMD_STRIPLIB
2217 # ----------------
2218 m4_defun([_LT_CMD_STRIPLIB],
2219 [m4_require([_LT_DECL_EGREP])
2220 striplib=
2221 old_striplib=
2222 AC_MSG_CHECKING([whether stripping libraries is possible])
2223 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2224 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2225 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2226 AC_MSG_RESULT([yes])
2227 else
2228 # FIXME - insert some real tests, host_os isn't really good enough
2229 case $host_os in
2230 darwin*)
2231 if test -n "$STRIP"; then
2232 striplib="$STRIP -x"
2233 old_striplib="$STRIP -S"
2234 AC_MSG_RESULT([yes])
2235 else
2236 AC_MSG_RESULT([no])
2237 fi
2238 ;;
2239 *)
2240 AC_MSG_RESULT([no])
2241 ;;
2242 esac
2243 fi
2244 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2245 _LT_DECL([], [striplib], [1])
2246 ])# _LT_CMD_STRIPLIB
2247
2248
2249 # _LT_PREPARE_MUNGE_PATH_LIST
2250 # ---------------------------
2251 # Make sure func_munge_path_list() is defined correctly.
2252 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2253 [[# func_munge_path_list VARIABLE PATH
2254 # -----------------------------------
2255 # VARIABLE is name of variable containing _space_ separated list of
2256 # directories to be munged by the contents of PATH, which is string
2257 # having a format:
2258 # "DIR[:DIR]:"
2259 # string "DIR[ DIR]" will be prepended to VARIABLE
2260 # ":DIR[:DIR]"
2261 # string "DIR[ DIR]" will be appended to VARIABLE
2262 # "DIRP[:DIRP]::[DIRA:]DIRA"
2263 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2264 # "DIRA[ DIRA]" will be appended to VARIABLE
2265 # "DIR[:DIR]"
2266 # VARIABLE will be replaced by "DIR[ DIR]"
2267 func_munge_path_list ()
2268 {
2269 case x@S|@2 in
2270 x)
2271 ;;
2272 *:)
2273 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2274 ;;
2275 x:*)
2276 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2277 ;;
2278 *::*)
2279 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2280 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2281 ;;
2282 *)
2283 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2284 ;;
2285 esac
2286 }
2287 ]])# _LT_PREPARE_PATH_LIST
2288
2289
2290 # _LT_SYS_DYNAMIC_LINKER([TAG])
2291 # -----------------------------
2292 # PORTME Fill in your ld.so characteristics
2293 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2294 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2295 m4_require([_LT_DECL_EGREP])dnl
2296 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2297 m4_require([_LT_DECL_OBJDUMP])dnl
2298 m4_require([_LT_DECL_SED])dnl
2299 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2300 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2301 AC_MSG_CHECKING([dynamic linker characteristics])
2302 m4_if([$1],
2303 [], [
2304 if test yes = "$GCC"; then
2305 case $host_os in
2306 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2307 *) lt_awk_arg='/^libraries:/' ;;
2308 esac
2309 case $host_os in
2310 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2311 *) lt_sed_strip_eq='s|=/|/|g' ;;
2312 esac
2313 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2314 case $lt_search_path_spec in
2315 *\;*)
2316 # if the path contains ";" then we assume it to be the separator
2317 # otherwise default to the standard path separator (i.e. ":") - it is
2318 # assumed that no part of a normal pathname contains ";" but that should
2319 # okay in the real world where ";" in dirpaths is itself problematic.
2320 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2321 ;;
2322 *)
2323 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2324 ;;
2325 esac
2326 # Ok, now we have the path, separated by spaces, we can step through it
2327 # and add multilib dir if necessary...
2328 lt_tmp_lt_search_path_spec=
2329 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2330 # ...but if some path component already ends with the multilib dir we assume
2331 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2332 case "$lt_multi_os_dir; $lt_search_path_spec " in
2333 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2334 lt_multi_os_dir=
2335 ;;
2336 esac
2337 for lt_sys_path in $lt_search_path_spec; do
2338 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2339 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2340 elif test -n "$lt_multi_os_dir"; then
2341 test -d "$lt_sys_path" && \
2342 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2343 fi
2344 done
2345 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2346 BEGIN {RS = " "; FS = "/|\n";} {
2347 lt_foo = "";
2348 lt_count = 0;
2349 for (lt_i = NF; lt_i > 0; lt_i--) {
2350 if ($lt_i != "" && $lt_i != ".") {
2351 if ($lt_i == "..") {
2352 lt_count++;
2353 } else {
2354 if (lt_count == 0) {
2355 lt_foo = "/" $lt_i lt_foo;
2356 } else {
2357 lt_count--;
2358 }
2359 }
2360 }
2361 }
2362 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2363 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2364 }'`
2365 # AWK program above erroneously prepends '/' to C:/dos/paths
2366 # for these hosts.
2367 case $host_os in
2368 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2369 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2370 esac
2371 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2372 else
2373 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2374 fi])
2375 library_names_spec=
2376 libname_spec='lib$name'
2377 soname_spec=
2378 shrext_cmds=.so
2379 postinstall_cmds=
2380 postuninstall_cmds=
2381 finish_cmds=
2382 finish_eval=
2383 shlibpath_var=
2384 shlibpath_overrides_runpath=unknown
2385 version_type=none
2386 dynamic_linker="$host_os ld.so"
2387 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2388 need_lib_prefix=unknown
2389 hardcode_into_libs=no
2390
2391 # when you set need_version to no, make sure it does not cause -set_version
2392 # flags to be left without arguments
2393 need_version=unknown
2394
2395 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2396 [User-defined run-time library search path.])
2397
2398 case $host_os in
2399 aix3*)
2400 version_type=linux # correct to gnu/linux during the next big refactor
2401 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2402 shlibpath_var=LIBPATH
2403
2404 # AIX 3 has no versioning support, so we append a major version to the name.
2405 soname_spec='$libname$release$shared_ext$major'
2406 ;;
2407
2408 aix[[4-9]]*)
2409 version_type=linux # correct to gnu/linux during the next big refactor
2410 need_lib_prefix=no
2411 need_version=no
2412 hardcode_into_libs=yes
2413 if test ia64 = "$host_cpu"; then
2414 # AIX 5 supports IA64
2415 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2416 shlibpath_var=LD_LIBRARY_PATH
2417 else
2418 # With GCC up to 2.95.x, collect2 would create an import file
2419 # for dependence libraries. The import file would start with
2420 # the line '#! .'. This would cause the generated library to
2421 # depend on '.', always an invalid library. This was fixed in
2422 # development snapshots of GCC prior to 3.0.
2423 case $host_os in
2424 aix4 | aix4.[[01]] | aix4.[[01]].*)
2425 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2426 echo ' yes '
2427 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2428 :
2429 else
2430 can_build_shared=no
2431 fi
2432 ;;
2433 esac
2434 # Using Import Files as archive members, it is possible to support
2435 # filename-based versioning of shared library archives on AIX. While
2436 # this would work for both with and without runtime linking, it will
2437 # prevent static linking of such archives. So we do filename-based
2438 # shared library versioning with .so extension only, which is used
2439 # when both runtime linking and shared linking is enabled.
2440 # Unfortunately, runtime linking may impact performance, so we do
2441 # not want this to be the default eventually. Also, we use the
2442 # versioned .so libs for executables only if there is the -brtl
2443 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2444 # To allow for filename-based versioning support, we need to create
2445 # libNAME.so.V as an archive file, containing:
2446 # *) an Import File, referring to the versioned filename of the
2447 # archive as well as the shared archive member, telling the
2448 # bitwidth (32 or 64) of that shared object, and providing the
2449 # list of exported symbols of that shared object, eventually
2450 # decorated with the 'weak' keyword
2451 # *) the shared object with the F_LOADONLY flag set, to really avoid
2452 # it being seen by the linker.
2453 # At run time we better use the real file rather than another symlink,
2454 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2455
2456 case $with_aix_soname,$aix_use_runtimelinking in
2457 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2458 # soname into executable. Probably we can add versioning support to
2459 # collect2, so additional links can be useful in future.
2460 aix,yes) # traditional libtool
2461 dynamic_linker='AIX unversionable lib.so'
2462 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2463 # instead of lib<name>.a to let people know that these are not
2464 # typical AIX shared libraries.
2465 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2466 ;;
2467 aix,no) # traditional AIX only
2468 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2469 # We preserve .a as extension for shared libraries through AIX4.2
2470 # and later when we are not doing run time linking.
2471 library_names_spec='$libname$release.a $libname.a'
2472 soname_spec='$libname$release$shared_ext$major'
2473 ;;
2474 svr4,*) # full svr4 only
2475 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2476 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2477 # We do not specify a path in Import Files, so LIBPATH fires.
2478 shlibpath_overrides_runpath=yes
2479 ;;
2480 *,yes) # both, prefer svr4
2481 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2482 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2483 # unpreferred sharedlib libNAME.a needs extra handling
2484 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2485 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2486 # We do not specify a path in Import Files, so LIBPATH fires.
2487 shlibpath_overrides_runpath=yes
2488 ;;
2489 *,no) # both, prefer aix
2490 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2491 library_names_spec='$libname$release.a $libname.a'
2492 soname_spec='$libname$release$shared_ext$major'
2493 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2494 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2495 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2496 ;;
2497 esac
2498 shlibpath_var=LIBPATH
2499 fi
2500 ;;
2501
2502 amigaos*)
2503 case $host_cpu in
2504 powerpc)
2505 # Since July 2007 AmigaOS4 officially supports .so libraries.
2506 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2507 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2508 ;;
2509 m68k)
2510 library_names_spec='$libname.ixlibrary $libname.a'
2511 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2512 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2513 ;;
2514 esac
2515 ;;
2516
2517 beos*)
2518 library_names_spec='$libname$shared_ext'
2519 dynamic_linker="$host_os ld.so"
2520 shlibpath_var=LIBRARY_PATH
2521 ;;
2522
2523 bsdi[[45]]*)
2524 version_type=linux # correct to gnu/linux during the next big refactor
2525 need_version=no
2526 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2527 soname_spec='$libname$release$shared_ext$major'
2528 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2529 shlibpath_var=LD_LIBRARY_PATH
2530 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2531 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2532 # the default ld.so.conf also contains /usr/contrib/lib and
2533 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2534 # libtool to hard-code these into programs
2535 ;;
2536
2537 cygwin* | mingw* | pw32* | cegcc*)
2538 version_type=windows
2539 shrext_cmds=.dll
2540 need_version=no
2541 need_lib_prefix=no
2542
2543 case $GCC,$cc_basename in
2544 yes,*)
2545 # gcc
2546 library_names_spec='$libname.dll.a'
2547 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2548 postinstall_cmds='base_file=`basename \$file`~
2549 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2550 dldir=$destdir/`dirname \$dlpath`~
2551 test -d \$dldir || mkdir -p \$dldir~
2552 $install_prog $dir/$dlname \$dldir/$dlname~
2553 chmod a+x \$dldir/$dlname~
2554 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2555 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2556 fi'
2557 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2558 dlpath=$dir/\$dldll~
2559 $RM \$dlpath'
2560 shlibpath_overrides_runpath=yes
2561
2562 case $host_os in
2563 cygwin*)
2564 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2565 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2566 m4_if([$1], [],[
2567 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2568 ;;
2569 mingw* | cegcc*)
2570 # MinGW DLLs use traditional 'lib' prefix
2571 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2572 ;;
2573 pw32*)
2574 # pw32 DLLs use 'pw' prefix rather than 'lib'
2575 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2576 ;;
2577 esac
2578 dynamic_linker='Win32 ld.exe'
2579 ;;
2580
2581 *,cl*)
2582 # Native MSVC
2583 libname_spec='$name'
2584 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2585 library_names_spec='$libname.dll.lib'
2586
2587 case $build_os in
2588 mingw*)
2589 sys_lib_search_path_spec=
2590 lt_save_ifs=$IFS
2591 IFS=';'
2592 for lt_path in $LIB
2593 do
2594 IFS=$lt_save_ifs
2595 # Let DOS variable expansion print the short 8.3 style file name.
2596 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2597 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2598 done
2599 IFS=$lt_save_ifs
2600 # Convert to MSYS style.
2601 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2602 ;;
2603 cygwin*)
2604 # Convert to unix form, then to dos form, then back to unix form
2605 # but this time dos style (no spaces!) so that the unix form looks
2606 # like /cygdrive/c/PROGRA~1:/cygdr...
2607 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2608 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2609 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2610 ;;
2611 *)
2612 sys_lib_search_path_spec=$LIB
2613 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2614 # It is most probably a Windows format PATH.
2615 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2616 else
2617 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2618 fi
2619 # FIXME: find the short name or the path components, as spaces are
2620 # common. (e.g. "Program Files" -> "PROGRA~1")
2621 ;;
2622 esac
2623
2624 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2625 postinstall_cmds='base_file=`basename \$file`~
2626 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2627 dldir=$destdir/`dirname \$dlpath`~
2628 test -d \$dldir || mkdir -p \$dldir~
2629 $install_prog $dir/$dlname \$dldir/$dlname'
2630 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2631 dlpath=$dir/\$dldll~
2632 $RM \$dlpath'
2633 shlibpath_overrides_runpath=yes
2634 dynamic_linker='Win32 link.exe'
2635 ;;
2636
2637 *)
2638 # Assume MSVC wrapper
2639 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2640 dynamic_linker='Win32 ld.exe'
2641 ;;
2642 esac
2643 # FIXME: first we should search . and the directory the executable is in
2644 shlibpath_var=PATH
2645 ;;
2646
2647 darwin* | rhapsody*)
2648 dynamic_linker="$host_os dyld"
2649 version_type=darwin
2650 need_lib_prefix=no
2651 need_version=no
2652 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2653 soname_spec='$libname$release$major$shared_ext'
2654 shlibpath_overrides_runpath=yes
2655 shlibpath_var=DYLD_LIBRARY_PATH
2656 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2657 m4_if([$1], [],[
2658 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2659 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2660 ;;
2661
2662 dgux*)
2663 version_type=linux # correct to gnu/linux during the next big refactor
2664 need_lib_prefix=no
2665 need_version=no
2666 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2667 soname_spec='$libname$release$shared_ext$major'
2668 shlibpath_var=LD_LIBRARY_PATH
2669 ;;
2670
2671 freebsd* | dragonfly*)
2672 # DragonFly does not have aout. When/if they implement a new
2673 # versioning mechanism, adjust this.
2674 if test -x /usr/bin/objformat; then
2675 objformat=`/usr/bin/objformat`
2676 else
2677 case $host_os in
2678 freebsd[[23]].*) objformat=aout ;;
2679 *) objformat=elf ;;
2680 esac
2681 fi
2682 version_type=freebsd-$objformat
2683 case $version_type in
2684 freebsd-elf*)
2685 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2686 soname_spec='$libname$release$shared_ext$major'
2687 need_version=no
2688 need_lib_prefix=no
2689 ;;
2690 freebsd-*)
2691 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2692 need_version=yes
2693 ;;
2694 esac
2695 shlibpath_var=LD_LIBRARY_PATH
2696 case $host_os in
2697 freebsd2.*)
2698 shlibpath_overrides_runpath=yes
2699 ;;
2700 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2701 shlibpath_overrides_runpath=yes
2702 hardcode_into_libs=yes
2703 ;;
2704 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2705 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2706 shlibpath_overrides_runpath=no
2707 hardcode_into_libs=yes
2708 ;;
2709 *) # from 4.6 on, and DragonFly
2710 shlibpath_overrides_runpath=yes
2711 hardcode_into_libs=yes
2712 ;;
2713 esac
2714 ;;
2715
2716 haiku*)
2717 version_type=linux # correct to gnu/linux during the next big refactor
2718 need_lib_prefix=no
2719 need_version=no
2720 dynamic_linker="$host_os runtime_loader"
2721 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2722 soname_spec='$libname$release$shared_ext$major'
2723 shlibpath_var=LIBRARY_PATH
2724 shlibpath_overrides_runpath=no
2725 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2726 hardcode_into_libs=yes
2727 ;;
2728
2729 hpux9* | hpux10* | hpux11*)
2730 # Give a soname corresponding to the major version so that dld.sl refuses to
2731 # link against other versions.
2732 version_type=sunos
2733 need_lib_prefix=no
2734 need_version=no
2735 case $host_cpu in
2736 ia64*)
2737 shrext_cmds='.so'
2738 hardcode_into_libs=yes
2739 dynamic_linker="$host_os dld.so"
2740 shlibpath_var=LD_LIBRARY_PATH
2741 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2742 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2743 soname_spec='$libname$release$shared_ext$major'
2744 if test 32 = "$HPUX_IA64_MODE"; then
2745 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2746 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2747 else
2748 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2749 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2750 fi
2751 ;;
2752 hppa*64*)
2753 shrext_cmds='.sl'
2754 hardcode_into_libs=yes
2755 dynamic_linker="$host_os dld.sl"
2756 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2757 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2758 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2759 soname_spec='$libname$release$shared_ext$major'
2760 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2761 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2762 ;;
2763 *)
2764 shrext_cmds='.sl'
2765 dynamic_linker="$host_os dld.sl"
2766 shlibpath_var=SHLIB_PATH
2767 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2768 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2769 soname_spec='$libname$release$shared_ext$major'
2770 ;;
2771 esac
2772 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2773 postinstall_cmds='chmod 555 $lib'
2774 # or fails outright, so override atomically:
2775 install_override_mode=555
2776 ;;
2777
2778 interix[[3-9]]*)
2779 version_type=linux # correct to gnu/linux during the next big refactor
2780 need_lib_prefix=no
2781 need_version=no
2782 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2783 soname_spec='$libname$release$shared_ext$major'
2784 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2785 shlibpath_var=LD_LIBRARY_PATH
2786 shlibpath_overrides_runpath=no
2787 hardcode_into_libs=yes
2788 ;;
2789
2790 irix5* | irix6* | nonstopux*)
2791 case $host_os in
2792 nonstopux*) version_type=nonstopux ;;
2793 *)
2794 if test yes = "$lt_cv_prog_gnu_ld"; then
2795 version_type=linux # correct to gnu/linux during the next big refactor
2796 else
2797 version_type=irix
2798 fi ;;
2799 esac
2800 need_lib_prefix=no
2801 need_version=no
2802 soname_spec='$libname$release$shared_ext$major'
2803 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2804 case $host_os in
2805 irix5* | nonstopux*)
2806 libsuff= shlibsuff=
2807 ;;
2808 *)
2809 case $LD in # libtool.m4 will add one of these switches to LD
2810 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2811 libsuff= shlibsuff= libmagic=32-bit;;
2812 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2813 libsuff=32 shlibsuff=N32 libmagic=N32;;
2814 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2815 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2816 *) libsuff= shlibsuff= libmagic=never-match;;
2817 esac
2818 ;;
2819 esac
2820 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2821 shlibpath_overrides_runpath=no
2822 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2823 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2824 hardcode_into_libs=yes
2825 ;;
2826
2827 # No shared lib support for Linux oldld, aout, or coff.
2828 linux*oldld* | linux*aout* | linux*coff*)
2829 dynamic_linker=no
2830 ;;
2831
2832 linux*android*)
2833 version_type=none # Android doesn't support versioned libraries.
2834 need_lib_prefix=no
2835 need_version=no
2836 library_names_spec='$libname$release$shared_ext'
2837 soname_spec='$libname$release$shared_ext'
2838 finish_cmds=
2839 shlibpath_var=LD_LIBRARY_PATH
2840 shlibpath_overrides_runpath=yes
2841
2842 # This implies no fast_install, which is unacceptable.
2843 # Some rework will be needed to allow for fast_install
2844 # before this can be enabled.
2845 hardcode_into_libs=yes
2846
2847 dynamic_linker='Android linker'
2848 # Don't embed -rpath directories since the linker doesn't support them.
2849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2850 ;;
2851
2852 # This must be glibc/ELF.
2853 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2854 version_type=linux # correct to gnu/linux during the next big refactor
2855 need_lib_prefix=no
2856 need_version=no
2857 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2858 soname_spec='$libname$release$shared_ext$major'
2859 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2860 shlibpath_var=LD_LIBRARY_PATH
2861 shlibpath_overrides_runpath=no
2862
2863 # Some binutils ld are patched to set DT_RUNPATH
2864 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2865 [lt_cv_shlibpath_overrides_runpath=no
2866 save_LDFLAGS=$LDFLAGS
2867 save_libdir=$libdir
2868 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2869 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2870 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2871 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2872 [lt_cv_shlibpath_overrides_runpath=yes])])
2873 LDFLAGS=$save_LDFLAGS
2874 libdir=$save_libdir
2875 ])
2876 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2877
2878 # This implies no fast_install, which is unacceptable.
2879 # Some rework will be needed to allow for fast_install
2880 # before this can be enabled.
2881 hardcode_into_libs=yes
2882
2883 # Ideally, we could use ldconfig to report *all* directores which are
2884 # searched for libraries, however this is still not possible. Aside from not
2885 # being certain /sbin/ldconfig is available, command
2886 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2887 # even though it is searched at run-time. Try to do the best guess by
2888 # appending ld.so.conf contents (and includes) to the search path.
2889 if test -f /etc/ld.so.conf; then
2890 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2891 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2892 fi
2893
2894 # We used to test for /lib/ld.so.1 and disable shared libraries on
2895 # powerpc, because MkLinux only supported shared libraries with the
2896 # GNU dynamic linker. Since this was broken with cross compilers,
2897 # most powerpc-linux boxes support dynamic linking these days and
2898 # people can always --disable-shared, the test was removed, and we
2899 # assume the GNU/Linux dynamic linker is in use.
2900 dynamic_linker='GNU/Linux ld.so'
2901 ;;
2902
2903 netbsd*)
2904 version_type=sunos
2905 need_lib_prefix=no
2906 need_version=no
2907 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2908 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2909 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2910 dynamic_linker='NetBSD (a.out) ld.so'
2911 else
2912 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2913 soname_spec='$libname$release$shared_ext$major'
2914 dynamic_linker='NetBSD ld.elf_so'
2915 fi
2916 shlibpath_var=LD_LIBRARY_PATH
2917 shlibpath_overrides_runpath=yes
2918 hardcode_into_libs=yes
2919 ;;
2920
2921 newsos6)
2922 version_type=linux # correct to gnu/linux during the next big refactor
2923 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2924 shlibpath_var=LD_LIBRARY_PATH
2925 shlibpath_overrides_runpath=yes
2926 ;;
2927
2928 *nto* | *qnx*)
2929 version_type=qnx
2930 need_lib_prefix=no
2931 need_version=no
2932 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2933 soname_spec='$libname$release$shared_ext$major'
2934 shlibpath_var=LD_LIBRARY_PATH
2935 shlibpath_overrides_runpath=no
2936 hardcode_into_libs=yes
2937 dynamic_linker='ldqnx.so'
2938 ;;
2939
2940 openbsd* | bitrig*)
2941 version_type=sunos
2942 sys_lib_dlsearch_path_spec=/usr/lib
2943 need_lib_prefix=no
2944 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2945 need_version=no
2946 else
2947 need_version=yes
2948 fi
2949 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2950 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2951 shlibpath_var=LD_LIBRARY_PATH
2952 shlibpath_overrides_runpath=yes
2953 ;;
2954
2955 os2*)
2956 libname_spec='$name'
2957 version_type=windows
2958 shrext_cmds=.dll
2959 need_version=no
2960 need_lib_prefix=no
2961 # OS/2 can only load a DLL with a base name of 8 characters or less.
2962 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2963 v=$($ECHO $release$versuffix | tr -d .-);
2964 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2965 $ECHO $n$v`$shared_ext'
2966 library_names_spec='${libname}_dll.$libext'
2967 dynamic_linker='OS/2 ld.exe'
2968 shlibpath_var=BEGINLIBPATH
2969 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2970 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2971 postinstall_cmds='base_file=`basename \$file`~
2972 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2973 dldir=$destdir/`dirname \$dlpath`~
2974 test -d \$dldir || mkdir -p \$dldir~
2975 $install_prog $dir/$dlname \$dldir/$dlname~
2976 chmod a+x \$dldir/$dlname~
2977 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2978 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2979 fi'
2980 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2981 dlpath=$dir/\$dldll~
2982 $RM \$dlpath'
2983 ;;
2984
2985 osf3* | osf4* | osf5*)
2986 version_type=osf
2987 need_lib_prefix=no
2988 need_version=no
2989 soname_spec='$libname$release$shared_ext$major'
2990 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2991 shlibpath_var=LD_LIBRARY_PATH
2992 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2993 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2994 ;;
2995
2996 rdos*)
2997 dynamic_linker=no
2998 ;;
2999
3000 solaris*)
3001 version_type=linux # correct to gnu/linux during the next big refactor
3002 need_lib_prefix=no
3003 need_version=no
3004 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3005 soname_spec='$libname$release$shared_ext$major'
3006 shlibpath_var=LD_LIBRARY_PATH
3007 shlibpath_overrides_runpath=yes
3008 hardcode_into_libs=yes
3009 # ldd complains unless libraries are executable
3010 postinstall_cmds='chmod +x $lib'
3011 ;;
3012
3013 sunos4*)
3014 version_type=sunos
3015 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3016 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3017 shlibpath_var=LD_LIBRARY_PATH
3018 shlibpath_overrides_runpath=yes
3019 if test yes = "$with_gnu_ld"; then
3020 need_lib_prefix=no
3021 fi
3022 need_version=yes
3023 ;;
3024
3025 sysv4 | sysv4.3*)
3026 version_type=linux # correct to gnu/linux during the next big refactor
3027 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3028 soname_spec='$libname$release$shared_ext$major'
3029 shlibpath_var=LD_LIBRARY_PATH
3030 case $host_vendor in
3031 sni)
3032 shlibpath_overrides_runpath=no
3033 need_lib_prefix=no
3034 runpath_var=LD_RUN_PATH
3035 ;;
3036 siemens)
3037 need_lib_prefix=no
3038 ;;
3039 motorola)
3040 need_lib_prefix=no
3041 need_version=no
3042 shlibpath_overrides_runpath=no
3043 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3044 ;;
3045 esac
3046 ;;
3047
3048 sysv4*MP*)
3049 if test -d /usr/nec; then
3050 version_type=linux # correct to gnu/linux during the next big refactor
3051 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3052 soname_spec='$libname$shared_ext.$major'
3053 shlibpath_var=LD_LIBRARY_PATH
3054 fi
3055 ;;
3056
3057 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3058 version_type=sco
3059 need_lib_prefix=no
3060 need_version=no
3061 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3062 soname_spec='$libname$release$shared_ext$major'
3063 shlibpath_var=LD_LIBRARY_PATH
3064 shlibpath_overrides_runpath=yes
3065 hardcode_into_libs=yes
3066 if test yes = "$with_gnu_ld"; then
3067 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3068 else
3069 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3070 case $host_os in
3071 sco3.2v5*)
3072 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3073 ;;
3074 esac
3075 fi
3076 sys_lib_dlsearch_path_spec='/usr/lib'
3077 ;;
3078
3079 tpf*)
3080 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3081 version_type=linux # correct to gnu/linux during the next big refactor
3082 need_lib_prefix=no
3083 need_version=no
3084 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3085 shlibpath_var=LD_LIBRARY_PATH
3086 shlibpath_overrides_runpath=no
3087 hardcode_into_libs=yes
3088 ;;
3089
3090 uts4*)
3091 version_type=linux # correct to gnu/linux during the next big refactor
3092 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3093 soname_spec='$libname$release$shared_ext$major'
3094 shlibpath_var=LD_LIBRARY_PATH
3095 ;;
3096
3097 *)
3098 dynamic_linker=no
3099 ;;
3100 esac
3101 AC_MSG_RESULT([$dynamic_linker])
3102 test no = "$dynamic_linker" && can_build_shared=no
3103
3104 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3105 if test yes = "$GCC"; then
3106 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3107 fi
3108
3109 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3110 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3111 fi
3112
3113 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3114 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3115 fi
3116
3117 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3118 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3119
3120 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3121 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3122
3123 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3124 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3125
3126 _LT_DECL([], [variables_saved_for_relink], [1],
3127 [Variables whose values should be saved in libtool wrapper scripts and
3128 restored at link time])
3129 _LT_DECL([], [need_lib_prefix], [0],
3130 [Do we need the "lib" prefix for modules?])
3131 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3132 _LT_DECL([], [version_type], [0], [Library versioning type])
3133 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3134 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3135 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3136 [Is shlibpath searched before the hard-coded library search path?])
3137 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3138 _LT_DECL([], [library_names_spec], [1],
3139 [[List of archive names. First name is the real one, the rest are links.
3140 The last name is the one that the linker finds with -lNAME]])
3141 _LT_DECL([], [soname_spec], [1],
3142 [[The coded name of the library, if different from the real name]])
3143 _LT_DECL([], [install_override_mode], [1],
3144 [Permission mode override for installation of shared libraries])
3145 _LT_DECL([], [postinstall_cmds], [2],
3146 [Command to use after installation of a shared archive])
3147 _LT_DECL([], [postuninstall_cmds], [2],
3148 [Command to use after uninstallation of a shared archive])
3149 _LT_DECL([], [finish_cmds], [2],
3150 [Commands used to finish a libtool library installation in a directory])
3151 _LT_DECL([], [finish_eval], [1],
3152 [[As "finish_cmds", except a single script fragment to be evaled but
3153 not shown]])
3154 _LT_DECL([], [hardcode_into_libs], [0],
3155 [Whether we should hardcode library paths into libraries])
3156 _LT_DECL([], [sys_lib_search_path_spec], [2],
3157 [Compile-time system search path for libraries])
3158 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3159 [Detected run-time system search path for libraries])
3160 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3161 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3162 ])# _LT_SYS_DYNAMIC_LINKER
3163
3164
3165 # _LT_PATH_TOOL_PREFIX(TOOL)
3166 # --------------------------
3167 # find a file program that can recognize shared library
3168 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3169 [m4_require([_LT_DECL_EGREP])dnl
3170 AC_MSG_CHECKING([for $1])
3171 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3172 [case $MAGIC_CMD in
3173 [[\\/*] | ?:[\\/]*])
3174 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3175 ;;
3176 *)
3177 lt_save_MAGIC_CMD=$MAGIC_CMD
3178 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3179 dnl $ac_dummy forces splitting on constant user-supplied paths.
3180 dnl POSIX.2 word splitting is done only on the output of word expansions,
3181 dnl not every word. This closes a longstanding sh security hole.
3182 ac_dummy="m4_if([$2], , $PATH, [$2])"
3183 for ac_dir in $ac_dummy; do
3184 IFS=$lt_save_ifs
3185 test -z "$ac_dir" && ac_dir=.
3186 if test -f "$ac_dir/$1"; then
3187 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3188 if test -n "$file_magic_test_file"; then
3189 case $deplibs_check_method in
3190 "file_magic "*)
3191 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3192 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3193 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3194 $EGREP "$file_magic_regex" > /dev/null; then
3195 :
3196 else
3197 cat <<_LT_EOF 1>&2
3198
3199 *** Warning: the command libtool uses to detect shared libraries,
3200 *** $file_magic_cmd, produces output that libtool cannot recognize.
3201 *** The result is that libtool may fail to recognize shared libraries
3202 *** as such. This will affect the creation of libtool libraries that
3203 *** depend on shared libraries, but programs linked with such libtool
3204 *** libraries will work regardless of this problem. Nevertheless, you
3205 *** may want to report the problem to your system manager and/or to
3206 *** bug-libtool@gnu.org
3207
3208 _LT_EOF
3209 fi ;;
3210 esac
3211 fi
3212 break
3213 fi
3214 done
3215 IFS=$lt_save_ifs
3216 MAGIC_CMD=$lt_save_MAGIC_CMD
3217 ;;
3218 esac])
3219 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3220 if test -n "$MAGIC_CMD"; then
3221 AC_MSG_RESULT($MAGIC_CMD)
3222 else
3223 AC_MSG_RESULT(no)
3224 fi
3225 _LT_DECL([], [MAGIC_CMD], [0],
3226 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3227 ])# _LT_PATH_TOOL_PREFIX
3228
3229 # Old name:
3230 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3231 dnl aclocal-1.4 backwards compatibility:
3232 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3233
3234
3235 # _LT_PATH_MAGIC
3236 # --------------
3237 # find a file program that can recognize a shared library
3238 m4_defun([_LT_PATH_MAGIC],
3239 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3240 if test -z "$lt_cv_path_MAGIC_CMD"; then
3241 if test -n "$ac_tool_prefix"; then
3242 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3243 else
3244 MAGIC_CMD=:
3245 fi
3246 fi
3247 ])# _LT_PATH_MAGIC
3248
3249
3250 # LT_PATH_LD
3251 # ----------
3252 # find the pathname to the GNU or non-GNU linker
3253 AC_DEFUN([LT_PATH_LD],
3254 [AC_REQUIRE([AC_PROG_CC])dnl
3255 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3256 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3257 m4_require([_LT_DECL_SED])dnl
3258 m4_require([_LT_DECL_EGREP])dnl
3259 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3260
3261 AC_ARG_WITH([gnu-ld],
3262 [AS_HELP_STRING([--with-gnu-ld],
3263 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3264 [test no = "$withval" || with_gnu_ld=yes],
3265 [with_gnu_ld=no])dnl
3266
3267 ac_prog=ld
3268 if test yes = "$GCC"; then
3269 # Check if gcc -print-prog-name=ld gives a path.
3270 AC_MSG_CHECKING([for ld used by $CC])
3271 case $host in
3272 *-*-mingw*)
3273 # gcc leaves a trailing carriage return, which upsets mingw
3274 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3275 *)
3276 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3277 esac
3278 case $ac_prog in
3279 # Accept absolute paths.
3280 [[\\/]]* | ?:[[\\/]]*)
3281 re_direlt='/[[^/]][[^/]]*/\.\./'
3282 # Canonicalize the pathname of ld
3283 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3284 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3285 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3286 done
3287 test -z "$LD" && LD=$ac_prog
3288 ;;
3289 "")
3290 # If it fails, then pretend we aren't using GCC.
3291 ac_prog=ld
3292 ;;
3293 *)
3294 # If it is relative, then search for the first ld in PATH.
3295 with_gnu_ld=unknown
3296 ;;
3297 esac
3298 elif test yes = "$with_gnu_ld"; then
3299 AC_MSG_CHECKING([for GNU ld])
3300 else
3301 AC_MSG_CHECKING([for non-GNU ld])
3302 fi
3303 AC_CACHE_VAL(lt_cv_path_LD,
3304 [if test -z "$LD"; then
3305 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3306 for ac_dir in $PATH; do
3307 IFS=$lt_save_ifs
3308 test -z "$ac_dir" && ac_dir=.
3309 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3310 lt_cv_path_LD=$ac_dir/$ac_prog
3311 # Check to see if the program is GNU ld. I'd rather use --version,
3312 # but apparently some variants of GNU ld only accept -v.
3313 # Break only if it was the GNU/non-GNU ld that we prefer.
3314 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3315 *GNU* | *'with BFD'*)
3316 test no != "$with_gnu_ld" && break
3317 ;;
3318 *)
3319 test yes != "$with_gnu_ld" && break
3320 ;;
3321 esac
3322 fi
3323 done
3324 IFS=$lt_save_ifs
3325 else
3326 lt_cv_path_LD=$LD # Let the user override the test with a path.
3327 fi])
3328 LD=$lt_cv_path_LD
3329 if test -n "$LD"; then
3330 AC_MSG_RESULT($LD)
3331 else
3332 AC_MSG_RESULT(no)
3333 fi
3334 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3335 _LT_PATH_LD_GNU
3336 AC_SUBST([LD])
3337
3338 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3339 ])# LT_PATH_LD
3340
3341 # Old names:
3342 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3343 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3344 dnl aclocal-1.4 backwards compatibility:
3345 dnl AC_DEFUN([AM_PROG_LD], [])
3346 dnl AC_DEFUN([AC_PROG_LD], [])
3347
3348
3349 # _LT_PATH_LD_GNU
3350 #- --------------
3351 m4_defun([_LT_PATH_LD_GNU],
3352 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3353 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3354 case `$LD -v 2>&1 </dev/null` in
3355 *GNU* | *'with BFD'*)
3356 lt_cv_prog_gnu_ld=yes
3357 ;;
3358 *)
3359 lt_cv_prog_gnu_ld=no
3360 ;;
3361 esac])
3362 with_gnu_ld=$lt_cv_prog_gnu_ld
3363 ])# _LT_PATH_LD_GNU
3364
3365
3366 # _LT_CMD_RELOAD
3367 # --------------
3368 # find reload flag for linker
3369 # -- PORTME Some linkers may need a different reload flag.
3370 m4_defun([_LT_CMD_RELOAD],
3371 [AC_CACHE_CHECK([for $LD option to reload object files],
3372 lt_cv_ld_reload_flag,
3373 [lt_cv_ld_reload_flag='-r'])
3374 reload_flag=$lt_cv_ld_reload_flag
3375 case $reload_flag in
3376 "" | " "*) ;;
3377 *) reload_flag=" $reload_flag" ;;
3378 esac
3379 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3380 case $host_os in
3381 cygwin* | mingw* | pw32* | cegcc*)
3382 if test yes != "$GCC"; then
3383 reload_cmds=false
3384 fi
3385 ;;
3386 darwin*)
3387 if test yes = "$GCC"; then
3388 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3389 else
3390 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3391 fi
3392 ;;
3393 esac
3394 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3395 _LT_TAGDECL([], [reload_cmds], [2])dnl
3396 ])# _LT_CMD_RELOAD
3397
3398
3399 # _LT_PATH_DD
3400 # -----------
3401 # find a working dd
3402 m4_defun([_LT_PATH_DD],
3403 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3404 [printf 0123456789abcdef0123456789abcdef >conftest.i
3405 cat conftest.i conftest.i >conftest2.i
3406 : ${lt_DD:=$DD}
3407 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3408 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3409 cmp -s conftest.i conftest.out \
3410 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3411 fi])
3412 rm -f conftest.i conftest2.i conftest.out])
3413 ])# _LT_PATH_DD
3414
3415
3416 # _LT_CMD_TRUNCATE
3417 # ----------------
3418 # find command to truncate a binary pipe
3419 m4_defun([_LT_CMD_TRUNCATE],
3420 [m4_require([_LT_PATH_DD])
3421 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3422 [printf 0123456789abcdef0123456789abcdef >conftest.i
3423 cat conftest.i conftest.i >conftest2.i
3424 lt_cv_truncate_bin=
3425 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3426 cmp -s conftest.i conftest.out \
3427 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3428 fi
3429 rm -f conftest.i conftest2.i conftest.out
3430 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3431 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3432 [Command to truncate a binary pipe])
3433 ])# _LT_CMD_TRUNCATE
3434
3435
3436 # _LT_CHECK_MAGIC_METHOD
3437 # ----------------------
3438 # how to check for library dependencies
3439 # -- PORTME fill in with the dynamic library characteristics
3440 m4_defun([_LT_CHECK_MAGIC_METHOD],
3441 [m4_require([_LT_DECL_EGREP])
3442 m4_require([_LT_DECL_OBJDUMP])
3443 AC_CACHE_CHECK([how to recognize dependent libraries],
3444 lt_cv_deplibs_check_method,
3445 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3446 lt_cv_file_magic_test_file=
3447 lt_cv_deplibs_check_method='unknown'
3448 # Need to set the preceding variable on all platforms that support
3449 # interlibrary dependencies.
3450 # 'none' -- dependencies not supported.
3451 # 'unknown' -- same as none, but documents that we really don't know.
3452 # 'pass_all' -- all dependencies passed with no checks.
3453 # 'test_compile' -- check by making test program.
3454 # 'file_magic [[regex]]' -- check by looking for files in library path
3455 # that responds to the $file_magic_cmd with a given extended regex.
3456 # If you have 'file' or equivalent on your system and you're not sure
3457 # whether 'pass_all' will *always* work, you probably want this one.
3458
3459 case $host_os in
3460 aix[[4-9]]*)
3461 lt_cv_deplibs_check_method=pass_all
3462 ;;
3463
3464 beos*)
3465 lt_cv_deplibs_check_method=pass_all
3466 ;;
3467
3468 bsdi[[45]]*)
3469 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3470 lt_cv_file_magic_cmd='/usr/bin/file -L'
3471 lt_cv_file_magic_test_file=/shlib/libc.so
3472 ;;
3473
3474 cygwin*)
3475 # func_win32_libid is a shell function defined in ltmain.sh
3476 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3477 lt_cv_file_magic_cmd='func_win32_libid'
3478 ;;
3479
3480 mingw* | pw32*)
3481 # Base MSYS/MinGW do not provide the 'file' command needed by
3482 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3483 # unless we find 'file', for example because we are cross-compiling.
3484 if ( file / ) >/dev/null 2>&1; then
3485 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3486 lt_cv_file_magic_cmd='func_win32_libid'
3487 else
3488 # Keep this pattern in sync with the one in func_win32_libid.
3489 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3490 lt_cv_file_magic_cmd='$OBJDUMP -f'
3491 fi
3492 ;;
3493
3494 cegcc*)
3495 # use the weaker test based on 'objdump'. See mingw*.
3496 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3497 lt_cv_file_magic_cmd='$OBJDUMP -f'
3498 ;;
3499
3500 darwin* | rhapsody*)
3501 lt_cv_deplibs_check_method=pass_all
3502 ;;
3503
3504 freebsd* | dragonfly*)
3505 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3506 case $host_cpu in
3507 i*86 )
3508 # Not sure whether the presence of OpenBSD here was a mistake.
3509 # Let's accept both of them until this is cleared up.
3510 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3511 lt_cv_file_magic_cmd=/usr/bin/file
3512 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3513 ;;
3514 esac
3515 else
3516 lt_cv_deplibs_check_method=pass_all
3517 fi
3518 ;;
3519
3520 haiku*)
3521 lt_cv_deplibs_check_method=pass_all
3522 ;;
3523
3524 hpux10.20* | hpux11*)
3525 lt_cv_file_magic_cmd=/usr/bin/file
3526 case $host_cpu in
3527 ia64*)
3528 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3529 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3530 ;;
3531 hppa*64*)
3532 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3533 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3534 ;;
3535 *)
3536 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3537 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3538 ;;
3539 esac
3540 ;;
3541
3542 interix[[3-9]]*)
3543 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3544 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3545 ;;
3546
3547 irix5* | irix6* | nonstopux*)
3548 case $LD in
3549 *-32|*"-32 ") libmagic=32-bit;;
3550 *-n32|*"-n32 ") libmagic=N32;;
3551 *-64|*"-64 ") libmagic=64-bit;;
3552 *) libmagic=never-match;;
3553 esac
3554 lt_cv_deplibs_check_method=pass_all
3555 ;;
3556
3557 # This must be glibc/ELF.
3558 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3559 lt_cv_deplibs_check_method=pass_all
3560 ;;
3561
3562 netbsd*)
3563 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3564 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3565 else
3566 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3567 fi
3568 ;;
3569
3570 newos6*)
3571 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3572 lt_cv_file_magic_cmd=/usr/bin/file
3573 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3574 ;;
3575
3576 *nto* | *qnx*)
3577 lt_cv_deplibs_check_method=pass_all
3578 ;;
3579
3580 openbsd* | bitrig*)
3581 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3582 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3583 else
3584 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3585 fi
3586 ;;
3587
3588 osf3* | osf4* | osf5*)
3589 lt_cv_deplibs_check_method=pass_all
3590 ;;
3591
3592 rdos*)
3593 lt_cv_deplibs_check_method=pass_all
3594 ;;
3595
3596 solaris*)
3597 lt_cv_deplibs_check_method=pass_all
3598 ;;
3599
3600 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3601 lt_cv_deplibs_check_method=pass_all
3602 ;;
3603
3604 sysv4 | sysv4.3*)
3605 case $host_vendor in
3606 motorola)
3607 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]]'
3608 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3609 ;;
3610 ncr)
3611 lt_cv_deplibs_check_method=pass_all
3612 ;;
3613 sequent)
3614 lt_cv_file_magic_cmd='/bin/file'
3615 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3616 ;;
3617 sni)
3618 lt_cv_file_magic_cmd='/bin/file'
3619 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3620 lt_cv_file_magic_test_file=/lib/libc.so
3621 ;;
3622 siemens)
3623 lt_cv_deplibs_check_method=pass_all
3624 ;;
3625 pc)
3626 lt_cv_deplibs_check_method=pass_all
3627 ;;
3628 esac
3629 ;;
3630
3631 tpf*)
3632 lt_cv_deplibs_check_method=pass_all
3633 ;;
3634 os2*)
3635 lt_cv_deplibs_check_method=pass_all
3636 ;;
3637 esac
3638 ])
3639
3640 file_magic_glob=
3641 want_nocaseglob=no
3642 if test "$build" = "$host"; then
3643 case $host_os in
3644 mingw* | pw32*)
3645 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3646 want_nocaseglob=yes
3647 else
3648 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3649 fi
3650 ;;
3651 esac
3652 fi
3653
3654 file_magic_cmd=$lt_cv_file_magic_cmd
3655 deplibs_check_method=$lt_cv_deplibs_check_method
3656 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3657
3658 _LT_DECL([], [deplibs_check_method], [1],
3659 [Method to check whether dependent libraries are shared objects])
3660 _LT_DECL([], [file_magic_cmd], [1],
3661 [Command to use when deplibs_check_method = "file_magic"])
3662 _LT_DECL([], [file_magic_glob], [1],
3663 [How to find potential files when deplibs_check_method = "file_magic"])
3664 _LT_DECL([], [want_nocaseglob], [1],
3665 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3666 ])# _LT_CHECK_MAGIC_METHOD
3667
3668
3669 # LT_PATH_NM
3670 # ----------
3671 # find the pathname to a BSD- or MS-compatible name lister
3672 AC_DEFUN([LT_PATH_NM],
3673 [AC_REQUIRE([AC_PROG_CC])dnl
3674 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3675 [if test -n "$NM"; then
3676 # Let the user override the test.
3677 lt_cv_path_NM=$NM
3678 else
3679 lt_nm_to_check=${ac_tool_prefix}nm
3680 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3681 lt_nm_to_check="$lt_nm_to_check nm"
3682 fi
3683 for lt_tmp_nm in $lt_nm_to_check; do
3684 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3685 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3686 IFS=$lt_save_ifs
3687 test -z "$ac_dir" && ac_dir=.
3688 tmp_nm=$ac_dir/$lt_tmp_nm
3689 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3690 # Check to see if the nm accepts a BSD-compat flag.
3691 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3692 # nm: unknown option "B" ignored
3693 # Tru64's nm complains that /dev/null is an invalid object file
3694 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3695 case $build_os in
3696 mingw*) lt_bad_file=conftest.nm/nofile ;;
3697 *) lt_bad_file=/dev/null ;;
3698 esac
3699 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3700 *$lt_bad_file* | *'Invalid file or object type'*)
3701 lt_cv_path_NM="$tmp_nm -B"
3702 break 2
3703 ;;
3704 *)
3705 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3706 */dev/null*)
3707 lt_cv_path_NM="$tmp_nm -p"
3708 break 2
3709 ;;
3710 *)
3711 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3712 continue # so that we can try to find one that supports BSD flags
3713 ;;
3714 esac
3715 ;;
3716 esac
3717 fi
3718 done
3719 IFS=$lt_save_ifs
3720 done
3721 : ${lt_cv_path_NM=no}
3722 fi])
3723 if test no != "$lt_cv_path_NM"; then
3724 NM=$lt_cv_path_NM
3725 else
3726 # Didn't find any BSD compatible name lister, look for dumpbin.
3727 if test -n "$DUMPBIN"; then :
3728 # Let the user override the test.
3729 else
3730 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3731 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3732 *COFF*)
3733 DUMPBIN="$DUMPBIN -symbols -headers"
3734 ;;
3735 *)
3736 DUMPBIN=:
3737 ;;
3738 esac
3739 fi
3740 AC_SUBST([DUMPBIN])
3741 if test : != "$DUMPBIN"; then
3742 NM=$DUMPBIN
3743 fi
3744 fi
3745 test -z "$NM" && NM=nm
3746 AC_SUBST([NM])
3747 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3748
3749 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3750 [lt_cv_nm_interface="BSD nm"
3751 echo "int some_variable = 0;" > conftest.$ac_ext
3752 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3753 (eval "$ac_compile" 2>conftest.err)
3754 cat conftest.err >&AS_MESSAGE_LOG_FD
3755 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3756 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3757 cat conftest.err >&AS_MESSAGE_LOG_FD
3758 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3759 cat conftest.out >&AS_MESSAGE_LOG_FD
3760 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3761 lt_cv_nm_interface="MS dumpbin"
3762 fi
3763 rm -f conftest*])
3764 ])# LT_PATH_NM
3765
3766 # Old names:
3767 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3768 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3769 dnl aclocal-1.4 backwards compatibility:
3770 dnl AC_DEFUN([AM_PROG_NM], [])
3771 dnl AC_DEFUN([AC_PROG_NM], [])
3772
3773 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3774 # --------------------------------
3775 # how to determine the name of the shared library
3776 # associated with a specific link library.
3777 # -- PORTME fill in with the dynamic library characteristics
3778 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3779 [m4_require([_LT_DECL_EGREP])
3780 m4_require([_LT_DECL_OBJDUMP])
3781 m4_require([_LT_DECL_DLLTOOL])
3782 AC_CACHE_CHECK([how to associate runtime and link libraries],
3783 lt_cv_sharedlib_from_linklib_cmd,
3784 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3785
3786 case $host_os in
3787 cygwin* | mingw* | pw32* | cegcc*)
3788 # two different shell functions defined in ltmain.sh;
3789 # decide which one to use based on capabilities of $DLLTOOL
3790 case `$DLLTOOL --help 2>&1` in
3791 *--identify-strict*)
3792 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3793 ;;
3794 *)
3795 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3796 ;;
3797 esac
3798 ;;
3799 *)
3800 # fallback: assume linklib IS sharedlib
3801 lt_cv_sharedlib_from_linklib_cmd=$ECHO
3802 ;;
3803 esac
3804 ])
3805 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3806 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3807
3808 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3809 [Command to associate shared and link libraries])
3810 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3811
3812
3813 # _LT_PATH_MANIFEST_TOOL
3814 # ----------------------
3815 # locate the manifest tool
3816 m4_defun([_LT_PATH_MANIFEST_TOOL],
3817 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3818 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3819 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3820 [lt_cv_path_mainfest_tool=no
3821 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3822 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3823 cat conftest.err >&AS_MESSAGE_LOG_FD
3824 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3825 lt_cv_path_mainfest_tool=yes
3826 fi
3827 rm -f conftest*])
3828 if test yes != "$lt_cv_path_mainfest_tool"; then
3829 MANIFEST_TOOL=:
3830 fi
3831 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3832 ])# _LT_PATH_MANIFEST_TOOL
3833
3834
3835 # _LT_DLL_DEF_P([FILE])
3836 # ---------------------
3837 # True iff FILE is a Windows DLL '.def' file.
3838 # Keep in sync with func_dll_def_p in the libtool script
3839 AC_DEFUN([_LT_DLL_DEF_P],
3840 [dnl
3841 test DEF = "`$SED -n dnl
3842 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3843 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3844 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3845 -e q dnl Only consider the first "real" line
3846 $1`" dnl
3847 ])# _LT_DLL_DEF_P
3848
3849
3850 # LT_LIB_M
3851 # --------
3852 # check for math library
3853 AC_DEFUN([LT_LIB_M],
3854 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3855 LIBM=
3856 case $host in
3857 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3858 # These system don't have libm, or don't need it
3859 ;;
3860 *-ncr-sysv4.3*)
3861 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3862 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3863 ;;
3864 *)
3865 AC_CHECK_LIB(m, cos, LIBM=-lm)
3866 ;;
3867 esac
3868 AC_SUBST([LIBM])
3869 ])# LT_LIB_M
3870
3871 # Old name:
3872 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3873 dnl aclocal-1.4 backwards compatibility:
3874 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3875
3876
3877 # _LT_COMPILER_NO_RTTI([TAGNAME])
3878 # -------------------------------
3879 m4_defun([_LT_COMPILER_NO_RTTI],
3880 [m4_require([_LT_TAG_COMPILER])dnl
3881
3882 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3883
3884 if test yes = "$GCC"; then
3885 case $cc_basename in
3886 nvcc*)
3887 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3888 *)
3889 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3890 esac
3891
3892 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3893 lt_cv_prog_compiler_rtti_exceptions,
3894 [-fno-rtti -fno-exceptions], [],
3895 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3896 fi
3897 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3898 [Compiler flag to turn off builtin functions])
3899 ])# _LT_COMPILER_NO_RTTI
3900
3901
3902 # _LT_CMD_GLOBAL_SYMBOLS
3903 # ----------------------
3904 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3905 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3906 AC_REQUIRE([AC_PROG_CC])dnl
3907 AC_REQUIRE([AC_PROG_AWK])dnl
3908 AC_REQUIRE([LT_PATH_NM])dnl
3909 AC_REQUIRE([LT_PATH_LD])dnl
3910 m4_require([_LT_DECL_SED])dnl
3911 m4_require([_LT_DECL_EGREP])dnl
3912 m4_require([_LT_TAG_COMPILER])dnl
3913
3914 # Check for command to grab the raw symbol name followed by C symbol from nm.
3915 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3916 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3917 [
3918 # These are sane defaults that work on at least a few old systems.
3919 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3920
3921 # Character class describing NM global symbol codes.
3922 symcode='[[BCDEGRST]]'
3923
3924 # Regexp to match symbols that can be accessed directly from C.
3925 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3926
3927 # Define system-specific variables.
3928 case $host_os in
3929 aix*)
3930 symcode='[[BCDT]]'
3931 ;;
3932 cygwin* | mingw* | pw32* | cegcc*)
3933 symcode='[[ABCDGISTW]]'
3934 ;;
3935 hpux*)
3936 if test ia64 = "$host_cpu"; then
3937 symcode='[[ABCDEGRST]]'
3938 fi
3939 ;;
3940 irix* | nonstopux*)
3941 symcode='[[BCDEGRST]]'
3942 ;;
3943 osf*)
3944 symcode='[[BCDEGQRST]]'
3945 ;;
3946 solaris*)
3947 symcode='[[BDRT]]'
3948 ;;
3949 sco3.2v5*)
3950 symcode='[[DT]]'
3951 ;;
3952 sysv4.2uw2*)
3953 symcode='[[DT]]'
3954 ;;
3955 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3956 symcode='[[ABDT]]'
3957 ;;
3958 sysv4)
3959 symcode='[[DFNSTU]]'
3960 ;;
3961 esac
3962
3963 # If we're using GNU nm, then use its standard symbol codes.
3964 case `$NM -V 2>&1` in
3965 *GNU* | *'with BFD'*)
3966 symcode='[[ABCDGIRSTW]]' ;;
3967 esac
3968
3969 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3970 # Gets list of data symbols to import.
3971 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3972 # Adjust the below global symbol transforms to fixup imported variables.
3973 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3974 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
3975 lt_c_name_lib_hook="\
3976 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
3977 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
3978 else
3979 # Disable hooks by default.
3980 lt_cv_sys_global_symbol_to_import=
3981 lt_cdecl_hook=
3982 lt_c_name_hook=
3983 lt_c_name_lib_hook=
3984 fi
3985
3986 # Transform an extracted symbol line into a proper C declaration.
3987 # Some systems (esp. on ia64) link data and code symbols differently,
3988 # so use this general approach.
3989 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
3990 $lt_cdecl_hook\
3991 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3992 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
3993
3994 # Transform an extracted symbol line into symbol name and symbol address
3995 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
3996 $lt_c_name_hook\
3997 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
3998 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
3999
4000 # Transform an extracted symbol line into symbol name with lib prefix and
4001 # symbol address.
4002 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4003 $lt_c_name_lib_hook\
4004 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4005 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
4006 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
4007
4008 # Handle CRLF in mingw tool chain
4009 opt_cr=
4010 case $build_os in
4011 mingw*)
4012 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4013 ;;
4014 esac
4015
4016 # Try without a prefix underscore, then with it.
4017 for ac_symprfx in "" "_"; do
4018
4019 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4020 symxfrm="\\1 $ac_symprfx\\2 \\2"
4021
4022 # Write the raw and C identifiers.
4023 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4024 # Fake it for dumpbin and say T for any non-static function,
4025 # D for any global variable and I for any imported variable.
4026 # Also find C++ and __fastcall symbols from MSVC++,
4027 # which start with @ or ?.
4028 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4029 " {last_section=section; section=\$ 3};"\
4030 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4031 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4032 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4033 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4034 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4035 " \$ 0!~/External *\|/{next};"\
4036 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4037 " {if(hide[section]) next};"\
4038 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4039 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4040 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4041 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4042 " ' prfx=^$ac_symprfx]"
4043 else
4044 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4045 fi
4046 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4047
4048 # Check to see that the pipe works correctly.
4049 pipe_works=no
4050
4051 rm -f conftest*
4052 cat > conftest.$ac_ext <<_LT_EOF
4053 #ifdef __cplusplus
4054 extern "C" {
4055 #endif
4056 char nm_test_var;
4057 void nm_test_func(void);
4058 void nm_test_func(void){}
4059 #ifdef __cplusplus
4060 }
4061 #endif
4062 int main(){nm_test_var='a';nm_test_func();return(0);}
4063 _LT_EOF
4064
4065 if AC_TRY_EVAL(ac_compile); then
4066 # Now try to grab the symbols.
4067 nlist=conftest.nm
4068 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4069 # Try sorting and uniquifying the output.
4070 if sort "$nlist" | uniq > "$nlist"T; then
4071 mv -f "$nlist"T "$nlist"
4072 else
4073 rm -f "$nlist"T
4074 fi
4075
4076 # Make sure that we snagged all the symbols we need.
4077 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4078 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4079 cat <<_LT_EOF > conftest.$ac_ext
4080 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4081 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4082 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4083 relocations are performed -- see ld's documentation on pseudo-relocs. */
4084 # define LT@&t@_DLSYM_CONST
4085 #elif defined __osf__
4086 /* This system does not cope well with relocations in const data. */
4087 # define LT@&t@_DLSYM_CONST
4088 #else
4089 # define LT@&t@_DLSYM_CONST const
4090 #endif
4091
4092 #ifdef __cplusplus
4093 extern "C" {
4094 #endif
4095
4096 _LT_EOF
4097 # Now generate the symbol file.
4098 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4099
4100 cat <<_LT_EOF >> conftest.$ac_ext
4101
4102 /* The mapping between symbol names and symbols. */
4103 LT@&t@_DLSYM_CONST struct {
4104 const char *name;
4105 void *address;
4106 }
4107 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4108 {
4109 { "@PROGRAM@", (void *) 0 },
4110 _LT_EOF
4111 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4112 cat <<\_LT_EOF >> conftest.$ac_ext
4113 {0, (void *) 0}
4114 };
4115
4116 /* This works around a problem in FreeBSD linker */
4117 #ifdef FREEBSD_WORKAROUND
4118 static const void *lt_preloaded_setup() {
4119 return lt__PROGRAM__LTX_preloaded_symbols;
4120 }
4121 #endif
4122
4123 #ifdef __cplusplus
4124 }
4125 #endif
4126 _LT_EOF
4127 # Now try linking the two files.
4128 mv conftest.$ac_objext conftstm.$ac_objext
4129 lt_globsym_save_LIBS=$LIBS
4130 lt_globsym_save_CFLAGS=$CFLAGS
4131 LIBS=conftstm.$ac_objext
4132 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4133 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4134 pipe_works=yes
4135 fi
4136 LIBS=$lt_globsym_save_LIBS
4137 CFLAGS=$lt_globsym_save_CFLAGS
4138 else
4139 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4140 fi
4141 else
4142 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4143 fi
4144 else
4145 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4146 fi
4147 else
4148 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4149 cat conftest.$ac_ext >&5
4150 fi
4151 rm -rf conftest* conftst*
4152
4153 # Do not use the global_symbol_pipe unless it works.
4154 if test yes = "$pipe_works"; then
4155 break
4156 else
4157 lt_cv_sys_global_symbol_pipe=
4158 fi
4159 done
4160 ])
4161 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4162 lt_cv_sys_global_symbol_to_cdecl=
4163 fi
4164 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4165 AC_MSG_RESULT(failed)
4166 else
4167 AC_MSG_RESULT(ok)
4168 fi
4169
4170 # Response file support.
4171 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4172 nm_file_list_spec='@'
4173 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4174 nm_file_list_spec='@'
4175 fi
4176
4177 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4178 [Take the output of nm and produce a listing of raw symbols and C names])
4179 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4180 [Transform the output of nm in a proper C declaration])
4181 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4182 [Transform the output of nm into a list of symbols to manually relocate])
4183 _LT_DECL([global_symbol_to_c_name_address],
4184 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4185 [Transform the output of nm in a C name address pair])
4186 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4187 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4188 [Transform the output of nm in a C name address pair when lib prefix is needed])
4189 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4190 [The name lister interface])
4191 _LT_DECL([], [nm_file_list_spec], [1],
4192 [Specify filename containing input files for $NM])
4193 ]) # _LT_CMD_GLOBAL_SYMBOLS
4194
4195
4196 # _LT_COMPILER_PIC([TAGNAME])
4197 # ---------------------------
4198 m4_defun([_LT_COMPILER_PIC],
4199 [m4_require([_LT_TAG_COMPILER])dnl
4200 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4201 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4202 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4203
4204 m4_if([$1], [CXX], [
4205 # C++ specific cases for pic, static, wl, etc.
4206 if test yes = "$GXX"; then
4207 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4208 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4209
4210 case $host_os in
4211 aix*)
4212 # All AIX code is PIC.
4213 if test ia64 = "$host_cpu"; then
4214 # AIX 5 now supports IA64 processor
4215 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4216 fi
4217 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4218 ;;
4219
4220 amigaos*)
4221 case $host_cpu in
4222 powerpc)
4223 # see comment about AmigaOS4 .so support
4224 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4225 ;;
4226 m68k)
4227 # FIXME: we need at least 68020 code to build shared libraries, but
4228 # adding the '-m68020' flag to GCC prevents building anything better,
4229 # like '-m68040'.
4230 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4231 ;;
4232 esac
4233 ;;
4234
4235 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4236 # PIC is the default for these OSes.
4237 ;;
4238 mingw* | cygwin* | os2* | pw32* | cegcc*)
4239 # This hack is so that the source file can tell whether it is being
4240 # built for inclusion in a dll (and should export symbols for example).
4241 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4242 # (--disable-auto-import) libraries
4243 m4_if([$1], [GCJ], [],
4244 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4245 case $host_os in
4246 os2*)
4247 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4248 ;;
4249 esac
4250 ;;
4251 darwin* | rhapsody*)
4252 # PIC is the default on this platform
4253 # Common symbols not allowed in MH_DYLIB files
4254 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4255 ;;
4256 *djgpp*)
4257 # DJGPP does not support shared libraries at all
4258 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4259 ;;
4260 haiku*)
4261 # PIC is the default for Haiku.
4262 # The "-static" flag exists, but is broken.
4263 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4264 ;;
4265 interix[[3-9]]*)
4266 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4267 # Instead, we relocate shared libraries at runtime.
4268 ;;
4269 sysv4*MP*)
4270 if test -d /usr/nec; then
4271 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4272 fi
4273 ;;
4274 hpux*)
4275 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4276 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4277 # sets the default TLS model and affects inlining.
4278 case $host_cpu in
4279 hppa*64*)
4280 ;;
4281 *)
4282 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4283 ;;
4284 esac
4285 ;;
4286 *qnx* | *nto*)
4287 # QNX uses GNU C++, but need to define -shared option too, otherwise
4288 # it will coredump.
4289 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4290 ;;
4291 *)
4292 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4293 ;;
4294 esac
4295 else
4296 case $host_os in
4297 aix[[4-9]]*)
4298 # All AIX code is PIC.
4299 if test ia64 = "$host_cpu"; then
4300 # AIX 5 now supports IA64 processor
4301 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4302 else
4303 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4304 fi
4305 ;;
4306 chorus*)
4307 case $cc_basename in
4308 cxch68*)
4309 # Green Hills C++ Compiler
4310 # _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"
4311 ;;
4312 esac
4313 ;;
4314 mingw* | cygwin* | os2* | pw32* | cegcc*)
4315 # This hack is so that the source file can tell whether it is being
4316 # built for inclusion in a dll (and should export symbols for example).
4317 m4_if([$1], [GCJ], [],
4318 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4319 ;;
4320 dgux*)
4321 case $cc_basename in
4322 ec++*)
4323 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4324 ;;
4325 ghcx*)
4326 # Green Hills C++ Compiler
4327 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4328 ;;
4329 *)
4330 ;;
4331 esac
4332 ;;
4333 freebsd* | dragonfly*)
4334 # FreeBSD uses GNU C++
4335 ;;
4336 hpux9* | hpux10* | hpux11*)
4337 case $cc_basename in
4338 CC*)
4339 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4340 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4341 if test ia64 != "$host_cpu"; then
4342 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4343 fi
4344 ;;
4345 aCC*)
4346 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4347 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4348 case $host_cpu in
4349 hppa*64*|ia64*)
4350 # +Z the default
4351 ;;
4352 *)
4353 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4354 ;;
4355 esac
4356 ;;
4357 *)
4358 ;;
4359 esac
4360 ;;
4361 interix*)
4362 # This is c89, which is MS Visual C++ (no shared libs)
4363 # Anyone wants to do a port?
4364 ;;
4365 irix5* | irix6* | nonstopux*)
4366 case $cc_basename in
4367 CC*)
4368 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4369 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4370 # CC pic flag -KPIC is the default.
4371 ;;
4372 *)
4373 ;;
4374 esac
4375 ;;
4376 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4377 case $cc_basename in
4378 KCC*)
4379 # KAI C++ Compiler
4380 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4382 ;;
4383 ecpc* )
4384 # old Intel C++ for x86_64, which still supported -KPIC.
4385 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4386 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4387 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4388 ;;
4389 icpc* )
4390 # Intel C++, used to be incompatible with GCC.
4391 # ICC 10 doesn't accept -KPIC any more.
4392 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4393 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4394 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4395 ;;
4396 pgCC* | pgcpp*)
4397 # Portland Group C++ compiler
4398 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4399 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4400 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4401 ;;
4402 cxx*)
4403 # Compaq C++
4404 # Make sure the PIC flag is empty. It appears that all Alpha
4405 # Linux and Compaq Tru64 Unix objects are PIC.
4406 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4407 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4408 ;;
4409 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4410 # IBM XL 8.0, 9.0 on PPC and BlueGene
4411 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4412 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4413 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4414 ;;
4415 *)
4416 case `$CC -V 2>&1 | sed 5q` in
4417 *Sun\ C*)
4418 # Sun C++ 5.9
4419 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4420 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4421 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4422 ;;
4423 esac
4424 ;;
4425 esac
4426 ;;
4427 lynxos*)
4428 ;;
4429 m88k*)
4430 ;;
4431 mvs*)
4432 case $cc_basename in
4433 cxx*)
4434 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4435 ;;
4436 *)
4437 ;;
4438 esac
4439 ;;
4440 netbsd*)
4441 ;;
4442 *qnx* | *nto*)
4443 # QNX uses GNU C++, but need to define -shared option too, otherwise
4444 # it will coredump.
4445 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4446 ;;
4447 osf3* | osf4* | osf5*)
4448 case $cc_basename in
4449 KCC*)
4450 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4451 ;;
4452 RCC*)
4453 # Rational C++ 2.4.1
4454 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4455 ;;
4456 cxx*)
4457 # Digital/Compaq C++
4458 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4459 # Make sure the PIC flag is empty. It appears that all Alpha
4460 # Linux and Compaq Tru64 Unix objects are PIC.
4461 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4462 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4463 ;;
4464 *)
4465 ;;
4466 esac
4467 ;;
4468 psos*)
4469 ;;
4470 solaris*)
4471 case $cc_basename in
4472 CC* | sunCC*)
4473 # Sun C++ 4.2, 5.x and Centerline C++
4474 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4475 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4476 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4477 ;;
4478 gcx*)
4479 # Green Hills C++ Compiler
4480 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4481 ;;
4482 *)
4483 ;;
4484 esac
4485 ;;
4486 sunos4*)
4487 case $cc_basename in
4488 CC*)
4489 # Sun C++ 4.x
4490 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4491 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4492 ;;
4493 lcc*)
4494 # Lucid
4495 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4496 ;;
4497 *)
4498 ;;
4499 esac
4500 ;;
4501 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4502 case $cc_basename in
4503 CC*)
4504 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4505 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4506 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4507 ;;
4508 esac
4509 ;;
4510 tandem*)
4511 case $cc_basename in
4512 NCC*)
4513 # NonStop-UX NCC 3.20
4514 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4515 ;;
4516 *)
4517 ;;
4518 esac
4519 ;;
4520 vxworks*)
4521 ;;
4522 *)
4523 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4524 ;;
4525 esac
4526 fi
4527 ],
4528 [
4529 if test yes = "$GCC"; then
4530 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4531 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4532
4533 case $host_os in
4534 aix*)
4535 # All AIX code is PIC.
4536 if test ia64 = "$host_cpu"; then
4537 # AIX 5 now supports IA64 processor
4538 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4539 fi
4540 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4541 ;;
4542
4543 amigaos*)
4544 case $host_cpu in
4545 powerpc)
4546 # see comment about AmigaOS4 .so support
4547 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4548 ;;
4549 m68k)
4550 # FIXME: we need at least 68020 code to build shared libraries, but
4551 # adding the '-m68020' flag to GCC prevents building anything better,
4552 # like '-m68040'.
4553 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4554 ;;
4555 esac
4556 ;;
4557
4558 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4559 # PIC is the default for these OSes.
4560 ;;
4561
4562 mingw* | cygwin* | pw32* | os2* | cegcc*)
4563 # This hack is so that the source file can tell whether it is being
4564 # built for inclusion in a dll (and should export symbols for example).
4565 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4566 # (--disable-auto-import) libraries
4567 m4_if([$1], [GCJ], [],
4568 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4569 case $host_os in
4570 os2*)
4571 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4572 ;;
4573 esac
4574 ;;
4575
4576 darwin* | rhapsody*)
4577 # PIC is the default on this platform
4578 # Common symbols not allowed in MH_DYLIB files
4579 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4580 ;;
4581
4582 haiku*)
4583 # PIC is the default for Haiku.
4584 # The "-static" flag exists, but is broken.
4585 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4586 ;;
4587
4588 hpux*)
4589 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4590 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4591 # sets the default TLS model and affects inlining.
4592 case $host_cpu in
4593 hppa*64*)
4594 # +Z the default
4595 ;;
4596 *)
4597 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4598 ;;
4599 esac
4600 ;;
4601
4602 interix[[3-9]]*)
4603 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4604 # Instead, we relocate shared libraries at runtime.
4605 ;;
4606
4607 msdosdjgpp*)
4608 # Just because we use GCC doesn't mean we suddenly get shared libraries
4609 # on systems that don't support them.
4610 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4611 enable_shared=no
4612 ;;
4613
4614 *nto* | *qnx*)
4615 # QNX uses GNU C++, but need to define -shared option too, otherwise
4616 # it will coredump.
4617 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4618 ;;
4619
4620 sysv4*MP*)
4621 if test -d /usr/nec; then
4622 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4623 fi
4624 ;;
4625
4626 *)
4627 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4628 ;;
4629 esac
4630
4631 case $cc_basename in
4632 nvcc*) # Cuda Compiler Driver 2.2
4633 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4634 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4635 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4636 fi
4637 ;;
4638 esac
4639 else
4640 # PORTME Check for flag to pass linker flags through the system compiler.
4641 case $host_os in
4642 aix*)
4643 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4644 if test ia64 = "$host_cpu"; then
4645 # AIX 5 now supports IA64 processor
4646 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4647 else
4648 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4649 fi
4650 ;;
4651
4652 darwin* | rhapsody*)
4653 # PIC is the default on this platform
4654 # Common symbols not allowed in MH_DYLIB files
4655 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4656 case $cc_basename in
4657 nagfor*)
4658 # NAG Fortran compiler
4659 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4660 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4661 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4662 ;;
4663 esac
4664 ;;
4665
4666 mingw* | cygwin* | pw32* | os2* | cegcc*)
4667 # This hack is so that the source file can tell whether it is being
4668 # built for inclusion in a dll (and should export symbols for example).
4669 m4_if([$1], [GCJ], [],
4670 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4671 case $host_os in
4672 os2*)
4673 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4674 ;;
4675 esac
4676 ;;
4677
4678 hpux9* | hpux10* | hpux11*)
4679 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4680 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4681 # not for PA HP-UX.
4682 case $host_cpu in
4683 hppa*64*|ia64*)
4684 # +Z the default
4685 ;;
4686 *)
4687 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4688 ;;
4689 esac
4690 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4691 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4692 ;;
4693
4694 irix5* | irix6* | nonstopux*)
4695 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4696 # PIC (with -KPIC) is the default.
4697 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4698 ;;
4699
4700 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4701 case $cc_basename in
4702 # old Intel for x86_64, which still supported -KPIC.
4703 ecc*)
4704 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4705 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4706 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4707 ;;
4708 # icc used to be incompatible with GCC.
4709 # ICC 10 doesn't accept -KPIC any more.
4710 icc* | ifort*)
4711 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4712 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4713 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4714 ;;
4715 # Lahey Fortran 8.1.
4716 lf95*)
4717 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4718 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4719 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4720 ;;
4721 nagfor*)
4722 # NAG Fortran compiler
4723 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4724 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4725 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4726 ;;
4727 tcc*)
4728 # Fabrice Bellard et al's Tiny C Compiler
4729 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4730 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4731 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4732 ;;
4733 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4734 # Portland Group compilers (*not* the Pentium gcc compiler,
4735 # which looks to be a dead project)
4736 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4737 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4738 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4739 ;;
4740 ccc*)
4741 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4742 # All Alpha code is PIC.
4743 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4744 ;;
4745 xl* | bgxl* | bgf* | mpixl*)
4746 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4747 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4748 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4749 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4750 ;;
4751 *)
4752 case `$CC -V 2>&1 | sed 5q` in
4753 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4754 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4755 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4756 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4757 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4758 ;;
4759 *Sun\ F* | *Sun*Fortran*)
4760 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4761 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4762 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4763 ;;
4764 *Sun\ C*)
4765 # Sun C 5.9
4766 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4767 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4768 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4769 ;;
4770 *Intel*\ [[CF]]*Compiler*)
4771 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4772 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4773 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4774 ;;
4775 *Portland\ Group*)
4776 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4777 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4778 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4779 ;;
4780 esac
4781 ;;
4782 esac
4783 ;;
4784
4785 newsos6)
4786 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4787 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4788 ;;
4789
4790 *nto* | *qnx*)
4791 # QNX uses GNU C++, but need to define -shared option too, otherwise
4792 # it will coredump.
4793 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4794 ;;
4795
4796 osf3* | osf4* | osf5*)
4797 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4798 # All OSF/1 code is PIC.
4799 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4800 ;;
4801
4802 rdos*)
4803 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4804 ;;
4805
4806 solaris*)
4807 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4808 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4809 case $cc_basename in
4810 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4812 *)
4813 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4814 esac
4815 ;;
4816
4817 sunos4*)
4818 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4819 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4820 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4821 ;;
4822
4823 sysv4 | sysv4.2uw2* | sysv4.3*)
4824 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4825 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4826 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4827 ;;
4828
4829 sysv4*MP*)
4830 if test -d /usr/nec; then
4831 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4832 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4833 fi
4834 ;;
4835
4836 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4837 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4838 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4839 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4840 ;;
4841
4842 unicos*)
4843 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4844 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4845 ;;
4846
4847 uts4*)
4848 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4849 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4850 ;;
4851
4852 *)
4853 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4854 ;;
4855 esac
4856 fi
4857 ])
4858 case $host_os in
4859 # For platforms that do not support PIC, -DPIC is meaningless:
4860 *djgpp*)
4861 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4862 ;;
4863 *)
4864 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4865 ;;
4866 esac
4867
4868 AC_CACHE_CHECK([for $compiler option to produce PIC],
4869 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4870 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4871 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4872
4873 #
4874 # Check to make sure the PIC flag actually works.
4875 #
4876 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4877 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4878 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4879 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4880 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4881 "" | " "*) ;;
4882 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4883 esac],
4884 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4885 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4886 fi
4887 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4888 [Additional compiler flags for building library objects])
4889
4890 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4891 [How to pass a linker flag through the compiler])
4892 #
4893 # Check to make sure the static flag actually works.
4894 #
4895 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4896 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4897 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4898 $lt_tmp_static_flag,
4899 [],
4900 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4901 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4902 [Compiler flag to prevent dynamic linking])
4903 ])# _LT_COMPILER_PIC
4904
4905
4906 # _LT_LINKER_SHLIBS([TAGNAME])
4907 # ----------------------------
4908 # See if the linker supports building shared libraries.
4909 m4_defun([_LT_LINKER_SHLIBS],
4910 [AC_REQUIRE([LT_PATH_LD])dnl
4911 AC_REQUIRE([LT_PATH_NM])dnl
4912 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4913 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4914 m4_require([_LT_DECL_EGREP])dnl
4915 m4_require([_LT_DECL_SED])dnl
4916 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4917 m4_require([_LT_TAG_COMPILER])dnl
4918 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4919 m4_if([$1], [CXX], [
4920 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4921 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4922 case $host_os in
4923 aix[[4-9]]*)
4924 # If we're using GNU nm, then we don't want the "-C" option.
4925 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4926 # Without the "-l" option, or with the "-B" option, AIX nm treats
4927 # weak defined symbols like other global defined symbols, whereas
4928 # GNU nm marks them as "W".
4929 # While the 'weak' keyword is ignored in the Export File, we need
4930 # it in the Import File for the 'aix-soname' feature, so we have
4931 # to replace the "-B" option with "-P" for AIX nm.
4932 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4933 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
4934 else
4935 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
4936 fi
4937 ;;
4938 pw32*)
4939 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4940 ;;
4941 cygwin* | mingw* | cegcc*)
4942 case $cc_basename in
4943 cl*)
4944 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4945 ;;
4946 *)
4947 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4948 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4949 ;;
4950 esac
4951 ;;
4952 *)
4953 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4954 ;;
4955 esac
4956 ], [
4957 runpath_var=
4958 _LT_TAGVAR(allow_undefined_flag, $1)=
4959 _LT_TAGVAR(always_export_symbols, $1)=no
4960 _LT_TAGVAR(archive_cmds, $1)=
4961 _LT_TAGVAR(archive_expsym_cmds, $1)=
4962 _LT_TAGVAR(compiler_needs_object, $1)=no
4963 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4964 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4965 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4966 _LT_TAGVAR(hardcode_automatic, $1)=no
4967 _LT_TAGVAR(hardcode_direct, $1)=no
4968 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4969 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4970 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4971 _LT_TAGVAR(hardcode_minus_L, $1)=no
4972 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4973 _LT_TAGVAR(inherit_rpath, $1)=no
4974 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4975 _LT_TAGVAR(module_cmds, $1)=
4976 _LT_TAGVAR(module_expsym_cmds, $1)=
4977 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4978 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4979 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4980 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4981 # include_expsyms should be a list of space-separated symbols to be *always*
4982 # included in the symbol list
4983 _LT_TAGVAR(include_expsyms, $1)=
4984 # exclude_expsyms can be an extended regexp of symbols to exclude
4985 # it will be wrapped by ' (' and ')$', so one must not match beginning or
4986 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4987 # as well as any symbol that contains 'd'.
4988 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4989 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4990 # platforms (ab)use it in PIC code, but their linkers get confused if
4991 # the symbol is explicitly referenced. Since portable code cannot
4992 # rely on this symbol name, it's probably fine to never include it in
4993 # preloaded symbol tables.
4994 # Exclude shared library initialization/finalization symbols.
4995 dnl Note also adjust exclude_expsyms for C++ above.
4996 extract_expsyms_cmds=
4997
4998 case $host_os in
4999 cygwin* | mingw* | pw32* | cegcc*)
5000 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5001 # When not using gcc, we currently assume that we are using
5002 # Microsoft Visual C++.
5003 if test yes != "$GCC"; then
5004 with_gnu_ld=no
5005 fi
5006 ;;
5007 interix*)
5008 # we just hope/assume this is gcc and not c89 (= MSVC++)
5009 with_gnu_ld=yes
5010 ;;
5011 openbsd* | bitrig*)
5012 with_gnu_ld=no
5013 ;;
5014 esac
5015
5016 _LT_TAGVAR(ld_shlibs, $1)=yes
5017
5018 # On some targets, GNU ld is compatible enough with the native linker
5019 # that we're better off using the native interface for both.
5020 lt_use_gnu_ld_interface=no
5021 if test yes = "$with_gnu_ld"; then
5022 case $host_os in
5023 aix*)
5024 # The AIX port of GNU ld has always aspired to compatibility
5025 # with the native linker. However, as the warning in the GNU ld
5026 # block says, versions before 2.19.5* couldn't really create working
5027 # shared libraries, regardless of the interface used.
5028 case `$LD -v 2>&1` in
5029 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5030 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5031 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5032 *)
5033 lt_use_gnu_ld_interface=yes
5034 ;;
5035 esac
5036 ;;
5037 *)
5038 lt_use_gnu_ld_interface=yes
5039 ;;
5040 esac
5041 fi
5042
5043 if test yes = "$lt_use_gnu_ld_interface"; then
5044 # If archive_cmds runs LD, not CC, wlarc should be empty
5045 wlarc='$wl'
5046
5047 # Set some defaults for GNU ld with shared library support. These
5048 # are reset later if shared libraries are not supported. Putting them
5049 # here allows them to be overridden if necessary.
5050 runpath_var=LD_RUN_PATH
5051 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5052 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5053 # ancient GNU ld didn't support --whole-archive et. al.
5054 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5055 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5056 else
5057 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5058 fi
5059 supports_anon_versioning=no
5060 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5061 *GNU\ gold*) supports_anon_versioning=yes ;;
5062 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5063 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5064 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5065 *\ 2.11.*) ;; # other 2.11 versions
5066 *) supports_anon_versioning=yes ;;
5067 esac
5068
5069 # See if GNU ld supports shared libraries.
5070 case $host_os in
5071 aix[[3-9]]*)
5072 # On AIX/PPC, the GNU linker is very broken
5073 if test ia64 != "$host_cpu"; then
5074 _LT_TAGVAR(ld_shlibs, $1)=no
5075 cat <<_LT_EOF 1>&2
5076
5077 *** Warning: the GNU linker, at least up to release 2.19, is reported
5078 *** to be unable to reliably create shared libraries on AIX.
5079 *** Therefore, libtool is disabling shared libraries support. If you
5080 *** really care for shared libraries, you may want to install binutils
5081 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5082 *** You will then need to restart the configuration process.
5083
5084 _LT_EOF
5085 fi
5086 ;;
5087
5088 amigaos*)
5089 case $host_cpu in
5090 powerpc)
5091 # see comment about AmigaOS4 .so support
5092 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5093 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5094 ;;
5095 m68k)
5096 _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)'
5097 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5098 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5099 ;;
5100 esac
5101 ;;
5102
5103 beos*)
5104 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5105 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5106 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5107 # support --undefined. This deserves some investigation. FIXME
5108 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5109 else
5110 _LT_TAGVAR(ld_shlibs, $1)=no
5111 fi
5112 ;;
5113
5114 cygwin* | mingw* | pw32* | cegcc*)
5115 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5116 # as there is no search path for DLLs.
5117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5118 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5119 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5120 _LT_TAGVAR(always_export_symbols, $1)=no
5121 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5122 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5123 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5124
5125 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5126 _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'
5127 # If the export-symbols file already is a .def file, use it as
5128 # is; otherwise, prepend EXPORTS...
5129 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5130 cp $export_symbols $output_objdir/$soname.def;
5131 else
5132 echo EXPORTS > $output_objdir/$soname.def;
5133 cat $export_symbols >> $output_objdir/$soname.def;
5134 fi~
5135 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5136 else
5137 _LT_TAGVAR(ld_shlibs, $1)=no
5138 fi
5139 ;;
5140
5141 haiku*)
5142 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5143 _LT_TAGVAR(link_all_deplibs, $1)=yes
5144 ;;
5145
5146 os2*)
5147 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5148 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5149 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5150 shrext_cmds=.dll
5151 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5152 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5153 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5154 $ECHO EXPORTS >> $output_objdir/$libname.def~
5155 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5156 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5157 emximp -o $lib $output_objdir/$libname.def'
5158 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5159 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5160 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5161 $ECHO EXPORTS >> $output_objdir/$libname.def~
5162 prefix_cmds="$SED"~
5163 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5164 prefix_cmds="$prefix_cmds -e 1d";
5165 fi~
5166 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5167 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5168 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5169 emximp -o $lib $output_objdir/$libname.def'
5170 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5171 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5172 ;;
5173
5174 interix[[3-9]]*)
5175 _LT_TAGVAR(hardcode_direct, $1)=no
5176 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5178 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5179 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5180 # Instead, shared libraries are loaded at an image base (0x10000000 by
5181 # default) and relocated if they conflict, which is a slow very memory
5182 # consuming and fragmenting process. To avoid this, we pick a random,
5183 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5184 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5185 _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'
5186 _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'
5187 ;;
5188
5189 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5190 tmp_diet=no
5191 if test linux-dietlibc = "$host_os"; then
5192 case $cc_basename in
5193 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5194 esac
5195 fi
5196 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5197 && test no = "$tmp_diet"
5198 then
5199 tmp_addflag=' $pic_flag'
5200 tmp_sharedflag='-shared'
5201 case $cc_basename,$host_cpu in
5202 pgcc*) # Portland Group C compiler
5203 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5204 tmp_addflag=' $pic_flag'
5205 ;;
5206 pgf77* | pgf90* | pgf95* | pgfortran*)
5207 # Portland Group f77 and f90 compilers
5208 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5209 tmp_addflag=' $pic_flag -Mnomain' ;;
5210 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5211 tmp_addflag=' -i_dynamic' ;;
5212 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5213 tmp_addflag=' -i_dynamic -nofor_main' ;;
5214 ifc* | ifort*) # Intel Fortran compiler
5215 tmp_addflag=' -nofor_main' ;;
5216 lf95*) # Lahey Fortran 8.1
5217 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5218 tmp_sharedflag='--shared' ;;
5219 nagfor*) # NAGFOR 5.3
5220 tmp_sharedflag='-Wl,-shared' ;;
5221 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5222 tmp_sharedflag='-qmkshrobj'
5223 tmp_addflag= ;;
5224 nvcc*) # Cuda Compiler Driver 2.2
5225 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5226 _LT_TAGVAR(compiler_needs_object, $1)=yes
5227 ;;
5228 esac
5229 case `$CC -V 2>&1 | sed 5q` in
5230 *Sun\ C*) # Sun C 5.9
5231 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5232 _LT_TAGVAR(compiler_needs_object, $1)=yes
5233 tmp_sharedflag='-G' ;;
5234 *Sun\ F*) # Sun Fortran 8.3
5235 tmp_sharedflag='-G' ;;
5236 esac
5237 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5238
5239 if test yes = "$supports_anon_versioning"; then
5240 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5241 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5242 echo "local: *; };" >> $output_objdir/$libname.ver~
5243 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5244 fi
5245
5246 case $cc_basename in
5247 tcc*)
5248 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5249 ;;
5250 xlf* | bgf* | bgxlf* | mpixlf*)
5251 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5252 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5253 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5254 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5255 if test yes = "$supports_anon_versioning"; then
5256 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5257 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5258 echo "local: *; };" >> $output_objdir/$libname.ver~
5259 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5260 fi
5261 ;;
5262 esac
5263 else
5264 _LT_TAGVAR(ld_shlibs, $1)=no
5265 fi
5266 ;;
5267
5268 netbsd*)
5269 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5270 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5271 wlarc=
5272 else
5273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5274 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5275 fi
5276 ;;
5277
5278 solaris*)
5279 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5280 _LT_TAGVAR(ld_shlibs, $1)=no
5281 cat <<_LT_EOF 1>&2
5282
5283 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5284 *** create shared libraries on Solaris systems. Therefore, libtool
5285 *** is disabling shared libraries support. We urge you to upgrade GNU
5286 *** binutils to release 2.9.1 or newer. Another option is to modify
5287 *** your PATH or compiler configuration so that the native linker is
5288 *** used, and then restart.
5289
5290 _LT_EOF
5291 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5293 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5294 else
5295 _LT_TAGVAR(ld_shlibs, $1)=no
5296 fi
5297 ;;
5298
5299 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5300 case `$LD -v 2>&1` in
5301 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5302 _LT_TAGVAR(ld_shlibs, $1)=no
5303 cat <<_LT_EOF 1>&2
5304
5305 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5306 *** reliably create shared libraries on SCO systems. Therefore, libtool
5307 *** is disabling shared libraries support. We urge you to upgrade GNU
5308 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5309 *** your PATH or compiler configuration so that the native linker is
5310 *** used, and then restart.
5311
5312 _LT_EOF
5313 ;;
5314 *)
5315 # For security reasons, it is highly recommended that you always
5316 # use absolute paths for naming shared libraries, and exclude the
5317 # DT_RUNPATH tag from executables and libraries. But doing so
5318 # requires that you compile everything twice, which is a pain.
5319 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5320 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5321 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5322 _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'
5323 else
5324 _LT_TAGVAR(ld_shlibs, $1)=no
5325 fi
5326 ;;
5327 esac
5328 ;;
5329
5330 sunos4*)
5331 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5332 wlarc=
5333 _LT_TAGVAR(hardcode_direct, $1)=yes
5334 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5335 ;;
5336
5337 *)
5338 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5339 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5340 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5341 else
5342 _LT_TAGVAR(ld_shlibs, $1)=no
5343 fi
5344 ;;
5345 esac
5346
5347 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5348 runpath_var=
5349 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5350 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5351 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5352 fi
5353 else
5354 # PORTME fill in a description of your system's linker (not GNU ld)
5355 case $host_os in
5356 aix3*)
5357 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5358 _LT_TAGVAR(always_export_symbols, $1)=yes
5359 _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'
5360 # Note: this linker hardcodes the directories in LIBPATH if there
5361 # are no directories specified by -L.
5362 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5363 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5364 # Neither direct hardcoding nor static linking is supported with a
5365 # broken collect2.
5366 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5367 fi
5368 ;;
5369
5370 aix[[4-9]]*)
5371 if test ia64 = "$host_cpu"; then
5372 # On IA64, the linker does run time linking by default, so we don't
5373 # have to do anything special.
5374 aix_use_runtimelinking=no
5375 exp_sym_flag='-Bexport'
5376 no_entry_flag=
5377 else
5378 # If we're using GNU nm, then we don't want the "-C" option.
5379 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5380 # Without the "-l" option, or with the "-B" option, AIX nm treats
5381 # weak defined symbols like other global defined symbols, whereas
5382 # GNU nm marks them as "W".
5383 # While the 'weak' keyword is ignored in the Export File, we need
5384 # it in the Import File for the 'aix-soname' feature, so we have
5385 # to replace the "-B" option with "-P" for AIX nm.
5386 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5387 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
5388 else
5389 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5390 fi
5391 aix_use_runtimelinking=no
5392
5393 # Test if we are trying to use run time linking or normal
5394 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5395 # have runtime linking enabled, and use it for executables.
5396 # For shared libraries, we enable/disable runtime linking
5397 # depending on the kind of the shared library created -
5398 # when "with_aix_soname,aix_use_runtimelinking" is:
5399 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5400 # "aix,yes" lib.so shared, rtl:yes, for executables
5401 # lib.a static archive
5402 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5403 # lib.a(lib.so.V) shared, rtl:no, for executables
5404 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5405 # lib.a(lib.so.V) shared, rtl:no
5406 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5407 # lib.a static archive
5408 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5409 for ld_flag in $LDFLAGS; do
5410 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5411 aix_use_runtimelinking=yes
5412 break
5413 fi
5414 done
5415 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5416 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5417 # so we don't have lib.a shared libs to link our executables.
5418 # We have to force runtime linking in this case.
5419 aix_use_runtimelinking=yes
5420 LDFLAGS="$LDFLAGS -Wl,-brtl"
5421 fi
5422 ;;
5423 esac
5424
5425 exp_sym_flag='-bexport'
5426 no_entry_flag='-bnoentry'
5427 fi
5428
5429 # When large executables or shared objects are built, AIX ld can
5430 # have problems creating the table of contents. If linking a library
5431 # or program results in "error TOC overflow" add -mminimal-toc to
5432 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5433 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5434
5435 _LT_TAGVAR(archive_cmds, $1)=''
5436 _LT_TAGVAR(hardcode_direct, $1)=yes
5437 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5438 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5439 _LT_TAGVAR(link_all_deplibs, $1)=yes
5440 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5441 case $with_aix_soname,$aix_use_runtimelinking in
5442 aix,*) ;; # traditional, no import file
5443 svr4,* | *,yes) # use import file
5444 # The Import File defines what to hardcode.
5445 _LT_TAGVAR(hardcode_direct, $1)=no
5446 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5447 ;;
5448 esac
5449
5450 if test yes = "$GCC"; then
5451 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5452 # We only want to do this on AIX 4.2 and lower, the check
5453 # below for broken collect2 doesn't work under 4.3+
5454 collect2name=`$CC -print-prog-name=collect2`
5455 if test -f "$collect2name" &&
5456 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5457 then
5458 # We have reworked collect2
5459 :
5460 else
5461 # We have old collect2
5462 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5463 # It fails to find uninstalled libraries when the uninstalled
5464 # path is not listed in the libpath. Setting hardcode_minus_L
5465 # to unsupported forces relinking
5466 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5467 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5468 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5469 fi
5470 ;;
5471 esac
5472 shared_flag='-shared'
5473 if test yes = "$aix_use_runtimelinking"; then
5474 shared_flag="$shared_flag "'$wl-G'
5475 fi
5476 # Need to ensure runtime linking is disabled for the traditional
5477 # shared library, or the linker may eventually find shared libraries
5478 # /with/ Import File - we do not want to mix them.
5479 shared_flag_aix='-shared'
5480 shared_flag_svr4='-shared $wl-G'
5481 else
5482 # not using gcc
5483 if test ia64 = "$host_cpu"; then
5484 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5485 # chokes on -Wl,-G. The following line is correct:
5486 shared_flag='-G'
5487 else
5488 if test yes = "$aix_use_runtimelinking"; then
5489 shared_flag='$wl-G'
5490 else
5491 shared_flag='$wl-bM:SRE'
5492 fi
5493 shared_flag_aix='$wl-bM:SRE'
5494 shared_flag_svr4='$wl-G'
5495 fi
5496 fi
5497
5498 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5499 # It seems that -bexpall does not export symbols beginning with
5500 # underscore (_), so it is better to generate a list of symbols to export.
5501 _LT_TAGVAR(always_export_symbols, $1)=yes
5502 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5503 # Warning - without using the other runtime loading flags (-brtl),
5504 # -berok will link without error, but may produce a broken library.
5505 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5506 # Determine the default libpath from the value encoded in an
5507 # empty executable.
5508 _LT_SYS_MODULE_PATH_AIX([$1])
5509 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5510 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
5511 else
5512 if test ia64 = "$host_cpu"; then
5513 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5514 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5515 _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"
5516 else
5517 # Determine the default libpath from the value encoded in an
5518 # empty executable.
5519 _LT_SYS_MODULE_PATH_AIX([$1])
5520 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5521 # Warning - without using the other run time loading flags,
5522 # -berok will link without error, but may produce a broken library.
5523 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5524 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5525 if test yes = "$with_gnu_ld"; then
5526 # We only use this code for GNU lds that support --whole-archive.
5527 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5528 else
5529 # Exported symbols can be pulled into shared objects from archives
5530 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5531 fi
5532 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5533 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5534 # -brtl affects multiple linker settings, -berok does not and is overridden later
5535 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5536 if test svr4 != "$with_aix_soname"; then
5537 # This is similar to how AIX traditionally builds its shared libraries.
5538 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5539 fi
5540 if test aix != "$with_aix_soname"; then
5541 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5542 else
5543 # used by -dlpreopen to get the symbols
5544 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5545 fi
5546 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5547 fi
5548 fi
5549 ;;
5550
5551 amigaos*)
5552 case $host_cpu in
5553 powerpc)
5554 # see comment about AmigaOS4 .so support
5555 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5556 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5557 ;;
5558 m68k)
5559 _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)'
5560 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5561 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5562 ;;
5563 esac
5564 ;;
5565
5566 bsdi[[45]]*)
5567 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5568 ;;
5569
5570 cygwin* | mingw* | pw32* | cegcc*)
5571 # When not using gcc, we currently assume that we are using
5572 # Microsoft Visual C++.
5573 # hardcode_libdir_flag_spec is actually meaningless, as there is
5574 # no search path for DLLs.
5575 case $cc_basename in
5576 cl*)
5577 # Native MSVC
5578 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5579 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5580 _LT_TAGVAR(always_export_symbols, $1)=yes
5581 _LT_TAGVAR(file_list_spec, $1)='@'
5582 # Tell ltmain to make .lib files, not .a files.
5583 libext=lib
5584 # Tell ltmain to make .dll files, not .so files.
5585 shrext_cmds=.dll
5586 # FIXME: Setting linknames here is a bad hack.
5587 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5588 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5589 cp "$export_symbols" "$output_objdir/$soname.def";
5590 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5591 else
5592 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5593 fi~
5594 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5595 linknames='
5596 # The linker will not automatically build a static lib if we build a DLL.
5597 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5598 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5599 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5600 _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'
5601 # Don't use ranlib
5602 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5603 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5604 lt_tool_outputfile="@TOOL_OUTPUT@"~
5605 case $lt_outputfile in
5606 *.exe|*.EXE) ;;
5607 *)
5608 lt_outputfile=$lt_outputfile.exe
5609 lt_tool_outputfile=$lt_tool_outputfile.exe
5610 ;;
5611 esac~
5612 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5613 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5614 $RM "$lt_outputfile.manifest";
5615 fi'
5616 ;;
5617 *)
5618 # Assume MSVC wrapper
5619 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5620 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5621 # Tell ltmain to make .lib files, not .a files.
5622 libext=lib
5623 # Tell ltmain to make .dll files, not .so files.
5624 shrext_cmds=.dll
5625 # FIXME: Setting linknames here is a bad hack.
5626 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5627 # The linker will automatically build a .lib file if we build a DLL.
5628 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5629 # FIXME: Should let the user specify the lib program.
5630 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5631 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5632 ;;
5633 esac
5634 ;;
5635
5636 darwin* | rhapsody*)
5637 _LT_DARWIN_LINKER_FEATURES($1)
5638 ;;
5639
5640 dgux*)
5641 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5642 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5643 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5644 ;;
5645
5646 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5647 # support. Future versions do this automatically, but an explicit c++rt0.o
5648 # does not break anything, and helps significantly (at the cost of a little
5649 # extra space).
5650 freebsd2.2*)
5651 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5652 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5653 _LT_TAGVAR(hardcode_direct, $1)=yes
5654 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5655 ;;
5656
5657 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5658 freebsd2.*)
5659 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5660 _LT_TAGVAR(hardcode_direct, $1)=yes
5661 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5662 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5663 ;;
5664
5665 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5666 freebsd* | dragonfly*)
5667 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5668 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5669 _LT_TAGVAR(hardcode_direct, $1)=yes
5670 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5671 ;;
5672
5673 hpux9*)
5674 if test yes = "$GCC"; then
5675 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5676 else
5677 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5678 fi
5679 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5680 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5681 _LT_TAGVAR(hardcode_direct, $1)=yes
5682
5683 # hardcode_minus_L: Not really in the search PATH,
5684 # but as the default location of the library.
5685 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5686 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5687 ;;
5688
5689 hpux10*)
5690 if test yes,no = "$GCC,$with_gnu_ld"; then
5691 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5692 else
5693 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5694 fi
5695 if test no = "$with_gnu_ld"; then
5696 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5697 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5698 _LT_TAGVAR(hardcode_direct, $1)=yes
5699 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5700 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5701 # hardcode_minus_L: Not really in the search PATH,
5702 # but as the default location of the library.
5703 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5704 fi
5705 ;;
5706
5707 hpux11*)
5708 if test yes,no = "$GCC,$with_gnu_ld"; then
5709 case $host_cpu in
5710 hppa*64*)
5711 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5712 ;;
5713 ia64*)
5714 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5715 ;;
5716 *)
5717 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5718 ;;
5719 esac
5720 else
5721 case $host_cpu in
5722 hppa*64*)
5723 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5724 ;;
5725 ia64*)
5726 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5727 ;;
5728 *)
5729 m4_if($1, [], [
5730 # Older versions of the 11.00 compiler do not understand -b yet
5731 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5732 _LT_LINKER_OPTION([if $CC understands -b],
5733 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5734 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5735 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5736 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5737 ;;
5738 esac
5739 fi
5740 if test no = "$with_gnu_ld"; then
5741 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5742 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5743
5744 case $host_cpu in
5745 hppa*64*|ia64*)
5746 _LT_TAGVAR(hardcode_direct, $1)=no
5747 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5748 ;;
5749 *)
5750 _LT_TAGVAR(hardcode_direct, $1)=yes
5751 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5752 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5753
5754 # hardcode_minus_L: Not really in the search PATH,
5755 # but as the default location of the library.
5756 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5757 ;;
5758 esac
5759 fi
5760 ;;
5761
5762 irix5* | irix6* | nonstopux*)
5763 if test yes = "$GCC"; then
5764 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5765 # Try to use the -exported_symbol ld option, if it does not
5766 # work, assume that -exports_file does not work either and
5767 # implicitly export all symbols.
5768 # This should be the same for all languages, so no per-tag cache variable.
5769 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5770 [lt_cv_irix_exported_symbol],
5771 [save_LDFLAGS=$LDFLAGS
5772 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5773 AC_LINK_IFELSE(
5774 [AC_LANG_SOURCE(
5775 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5776 [C++], [[int foo (void) { return 0; }]],
5777 [Fortran 77], [[
5778 subroutine foo
5779 end]],
5780 [Fortran], [[
5781 subroutine foo
5782 end]])])],
5783 [lt_cv_irix_exported_symbol=yes],
5784 [lt_cv_irix_exported_symbol=no])
5785 LDFLAGS=$save_LDFLAGS])
5786 if test yes = "$lt_cv_irix_exported_symbol"; then
5787 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
5788 fi
5789 else
5790 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5791 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
5792 fi
5793 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5794 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5795 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5796 _LT_TAGVAR(inherit_rpath, $1)=yes
5797 _LT_TAGVAR(link_all_deplibs, $1)=yes
5798 ;;
5799
5800 linux*)
5801 case $cc_basename in
5802 tcc*)
5803 # Fabrice Bellard et al's Tiny C Compiler
5804 _LT_TAGVAR(ld_shlibs, $1)=yes
5805 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5806 ;;
5807 esac
5808 ;;
5809
5810 netbsd*)
5811 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5812 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5813 else
5814 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5815 fi
5816 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5817 _LT_TAGVAR(hardcode_direct, $1)=yes
5818 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5819 ;;
5820
5821 newsos6)
5822 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5823 _LT_TAGVAR(hardcode_direct, $1)=yes
5824 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5825 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5826 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5827 ;;
5828
5829 *nto* | *qnx*)
5830 ;;
5831
5832 openbsd* | bitrig*)
5833 if test -f /usr/libexec/ld.so; then
5834 _LT_TAGVAR(hardcode_direct, $1)=yes
5835 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5836 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5837 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5838 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5839 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5840 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5841 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5842 else
5843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5844 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5845 fi
5846 else
5847 _LT_TAGVAR(ld_shlibs, $1)=no
5848 fi
5849 ;;
5850
5851 os2*)
5852 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5853 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5854 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5855 shrext_cmds=.dll
5856 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5857 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5858 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5859 $ECHO EXPORTS >> $output_objdir/$libname.def~
5860 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5861 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5862 emximp -o $lib $output_objdir/$libname.def'
5863 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5864 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5865 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5866 $ECHO EXPORTS >> $output_objdir/$libname.def~
5867 prefix_cmds="$SED"~
5868 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5869 prefix_cmds="$prefix_cmds -e 1d";
5870 fi~
5871 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5872 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5873 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5874 emximp -o $lib $output_objdir/$libname.def'
5875 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5876 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5877 ;;
5878
5879 osf3*)
5880 if test yes = "$GCC"; then
5881 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5882 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5883 else
5884 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5885 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5886 fi
5887 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5888 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5889 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5890 ;;
5891
5892 osf4* | osf5*) # as osf3* with the addition of -msym flag
5893 if test yes = "$GCC"; then
5894 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5895 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5896 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5897 else
5898 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5899 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5900 _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~
5901 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
5902
5903 # Both c and cxx compiler support -rpath directly
5904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5905 fi
5906 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5907 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5908 ;;
5909
5910 solaris*)
5911 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5912 if test yes = "$GCC"; then
5913 wlarc='$wl'
5914 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5915 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5916 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5917 else
5918 case `$CC -V 2>&1` in
5919 *"Compilers 5.0"*)
5920 wlarc=''
5921 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5922 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5923 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5924 ;;
5925 *)
5926 wlarc='$wl'
5927 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5928 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5929 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5930 ;;
5931 esac
5932 fi
5933 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5934 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5935 case $host_os in
5936 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5937 *)
5938 # The compiler driver will combine and reorder linker options,
5939 # but understands '-z linker_flag'. GCC discards it without '$wl',
5940 # but is careful enough not to reorder.
5941 # Supported since Solaris 2.6 (maybe 2.5.1?)
5942 if test yes = "$GCC"; then
5943 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5944 else
5945 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5946 fi
5947 ;;
5948 esac
5949 _LT_TAGVAR(link_all_deplibs, $1)=yes
5950 ;;
5951
5952 sunos4*)
5953 if test sequent = "$host_vendor"; then
5954 # Use $CC to link under sequent, because it throws in some extra .o
5955 # files that make .init and .fini sections work.
5956 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5957 else
5958 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5959 fi
5960 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5961 _LT_TAGVAR(hardcode_direct, $1)=yes
5962 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5963 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5964 ;;
5965
5966 sysv4)
5967 case $host_vendor in
5968 sni)
5969 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5970 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5971 ;;
5972 siemens)
5973 ## LD is ld it makes a PLAMLIB
5974 ## CC just makes a GrossModule.
5975 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5976 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5977 _LT_TAGVAR(hardcode_direct, $1)=no
5978 ;;
5979 motorola)
5980 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5981 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5982 ;;
5983 esac
5984 runpath_var='LD_RUN_PATH'
5985 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5986 ;;
5987
5988 sysv4.3*)
5989 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5991 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5992 ;;
5993
5994 sysv4*MP*)
5995 if test -d /usr/nec; then
5996 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5997 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5998 runpath_var=LD_RUN_PATH
5999 hardcode_runpath_var=yes
6000 _LT_TAGVAR(ld_shlibs, $1)=yes
6001 fi
6002 ;;
6003
6004 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6005 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6006 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6007 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6008 runpath_var='LD_RUN_PATH'
6009
6010 if test yes = "$GCC"; then
6011 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6012 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6013 else
6014 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6015 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6016 fi
6017 ;;
6018
6019 sysv5* | sco3.2v5* | sco5v6*)
6020 # Note: We CANNOT use -z defs as we might desire, because we do not
6021 # link with -lc, and that would cause any symbols used from libc to
6022 # always be unresolved, which means just about no library would
6023 # ever link correctly. If we're not using GNU ld we use -z text
6024 # though, which does catch some bad symbols but isn't as heavy-handed
6025 # as -z defs.
6026 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6027 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6028 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6029 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6030 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6031 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6032 _LT_TAGVAR(link_all_deplibs, $1)=yes
6033 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6034 runpath_var='LD_RUN_PATH'
6035
6036 if test yes = "$GCC"; then
6037 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6038 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6039 else
6040 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6041 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6042 fi
6043 ;;
6044
6045 uts4*)
6046 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6047 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6048 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6049 ;;
6050
6051 *)
6052 _LT_TAGVAR(ld_shlibs, $1)=no
6053 ;;
6054 esac
6055
6056 if test sni = "$host_vendor"; then
6057 case $host in
6058 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6059 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6060 ;;
6061 esac
6062 fi
6063 fi
6064 ])
6065 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6066 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6067
6068 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6069
6070 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6071 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6072 _LT_DECL([], [extract_expsyms_cmds], [2],
6073 [The commands to extract the exported symbol list from a shared archive])
6074
6075 #
6076 # Do we need to explicitly link libc?
6077 #
6078 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6079 x|xyes)
6080 # Assume -lc should be added
6081 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6082
6083 if test yes,yes = "$GCC,$enable_shared"; then
6084 case $_LT_TAGVAR(archive_cmds, $1) in
6085 *'~'*)
6086 # FIXME: we may have to deal with multi-command sequences.
6087 ;;
6088 '$CC '*)
6089 # Test whether the compiler implicitly links with -lc since on some
6090 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6091 # to ld, don't add -lc before -lgcc.
6092 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6093 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6094 [$RM conftest*
6095 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6096
6097 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6098 soname=conftest
6099 lib=conftest
6100 libobjs=conftest.$ac_objext
6101 deplibs=
6102 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6103 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6104 compiler_flags=-v
6105 linker_flags=-v
6106 verstring=
6107 output_objdir=.
6108 libname=conftest
6109 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6110 _LT_TAGVAR(allow_undefined_flag, $1)=
6111 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6112 then
6113 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6114 else
6115 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6116 fi
6117 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6118 else
6119 cat conftest.err 1>&5
6120 fi
6121 $RM conftest*
6122 ])
6123 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6124 ;;
6125 esac
6126 fi
6127 ;;
6128 esac
6129
6130 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6131 [Whether or not to add -lc for building shared libraries])
6132 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6133 [enable_shared_with_static_runtimes], [0],
6134 [Whether or not to disallow shared libs when runtime libs are static])
6135 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6136 [Compiler flag to allow reflexive dlopens])
6137 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6138 [Compiler flag to generate shared objects directly from archives])
6139 _LT_TAGDECL([], [compiler_needs_object], [1],
6140 [Whether the compiler copes with passing no objects directly])
6141 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6142 [Create an old-style archive from a shared archive])
6143 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6144 [Create a temporary old-style archive to link instead of a shared archive])
6145 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6146 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6147 _LT_TAGDECL([], [module_cmds], [2],
6148 [Commands used to build a loadable module if different from building
6149 a shared archive.])
6150 _LT_TAGDECL([], [module_expsym_cmds], [2])
6151 _LT_TAGDECL([], [with_gnu_ld], [1],
6152 [Whether we are building with GNU ld or not])
6153 _LT_TAGDECL([], [allow_undefined_flag], [1],
6154 [Flag that allows shared libraries with undefined symbols to be built])
6155 _LT_TAGDECL([], [no_undefined_flag], [1],
6156 [Flag that enforces no undefined symbols])
6157 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6158 [Flag to hardcode $libdir into a binary during linking.
6159 This must work even if $libdir does not exist])
6160 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6161 [Whether we need a single "-rpath" flag with a separated argument])
6162 _LT_TAGDECL([], [hardcode_direct], [0],
6163 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6164 DIR into the resulting binary])
6165 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6166 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6167 DIR into the resulting binary and the resulting library dependency is
6168 "absolute", i.e impossible to change by setting $shlibpath_var if the
6169 library is relocated])
6170 _LT_TAGDECL([], [hardcode_minus_L], [0],
6171 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6172 into the resulting binary])
6173 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6174 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6175 into the resulting binary])
6176 _LT_TAGDECL([], [hardcode_automatic], [0],
6177 [Set to "yes" if building a shared library automatically hardcodes DIR
6178 into the library and all subsequent libraries and executables linked
6179 against it])
6180 _LT_TAGDECL([], [inherit_rpath], [0],
6181 [Set to yes if linker adds runtime paths of dependent libraries
6182 to runtime path list])
6183 _LT_TAGDECL([], [link_all_deplibs], [0],
6184 [Whether libtool must link a program against all its dependency libraries])
6185 _LT_TAGDECL([], [always_export_symbols], [0],
6186 [Set to "yes" if exported symbols are required])
6187 _LT_TAGDECL([], [export_symbols_cmds], [2],
6188 [The commands to list exported symbols])
6189 _LT_TAGDECL([], [exclude_expsyms], [1],
6190 [Symbols that should not be listed in the preloaded symbols])
6191 _LT_TAGDECL([], [include_expsyms], [1],
6192 [Symbols that must always be exported])
6193 _LT_TAGDECL([], [prelink_cmds], [2],
6194 [Commands necessary for linking programs (against libraries) with templates])
6195 _LT_TAGDECL([], [postlink_cmds], [2],
6196 [Commands necessary for finishing linking programs])
6197 _LT_TAGDECL([], [file_list_spec], [1],
6198 [Specify filename containing input files])
6199 dnl FIXME: Not yet implemented
6200 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6201 dnl [Compiler flag to generate thread safe objects])
6202 ])# _LT_LINKER_SHLIBS
6203
6204
6205 # _LT_LANG_C_CONFIG([TAG])
6206 # ------------------------
6207 # Ensure that the configuration variables for a C compiler are suitably
6208 # defined. These variables are subsequently used by _LT_CONFIG to write
6209 # the compiler configuration to 'libtool'.
6210 m4_defun([_LT_LANG_C_CONFIG],
6211 [m4_require([_LT_DECL_EGREP])dnl
6212 lt_save_CC=$CC
6213 AC_LANG_PUSH(C)
6214
6215 # Source file extension for C test sources.
6216 ac_ext=c
6217
6218 # Object file extension for compiled C test sources.
6219 objext=o
6220 _LT_TAGVAR(objext, $1)=$objext
6221
6222 # Code to be used in simple compile tests
6223 lt_simple_compile_test_code="int some_variable = 0;"
6224
6225 # Code to be used in simple link tests
6226 lt_simple_link_test_code='int main(){return(0);}'
6227
6228 _LT_TAG_COMPILER
6229 # Save the default compiler, since it gets overwritten when the other
6230 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6231 compiler_DEFAULT=$CC
6232
6233 # save warnings/boilerplate of simple test code
6234 _LT_COMPILER_BOILERPLATE
6235 _LT_LINKER_BOILERPLATE
6236
6237 if test -n "$compiler"; then
6238 _LT_COMPILER_NO_RTTI($1)
6239 _LT_COMPILER_PIC($1)
6240 _LT_COMPILER_C_O($1)
6241 _LT_COMPILER_FILE_LOCKS($1)
6242 _LT_LINKER_SHLIBS($1)
6243 _LT_SYS_DYNAMIC_LINKER($1)
6244 _LT_LINKER_HARDCODE_LIBPATH($1)
6245 LT_SYS_DLOPEN_SELF
6246 _LT_CMD_STRIPLIB
6247
6248 # Report what library types will actually be built
6249 AC_MSG_CHECKING([if libtool supports shared libraries])
6250 AC_MSG_RESULT([$can_build_shared])
6251
6252 AC_MSG_CHECKING([whether to build shared libraries])
6253 test no = "$can_build_shared" && enable_shared=no
6254
6255 # On AIX, shared libraries and static libraries use the same namespace, and
6256 # are all built from PIC.
6257 case $host_os in
6258 aix3*)
6259 test yes = "$enable_shared" && enable_static=no
6260 if test -n "$RANLIB"; then
6261 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6262 postinstall_cmds='$RANLIB $lib'
6263 fi
6264 ;;
6265
6266 aix[[4-9]]*)
6267 if test ia64 != "$host_cpu"; then
6268 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6269 yes,aix,yes) ;; # shared object as lib.so file only
6270 yes,svr4,*) ;; # shared object as lib.so archive member only
6271 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6272 esac
6273 fi
6274 ;;
6275 esac
6276 AC_MSG_RESULT([$enable_shared])
6277
6278 AC_MSG_CHECKING([whether to build static libraries])
6279 # Make sure either enable_shared or enable_static is yes.
6280 test yes = "$enable_shared" || enable_static=yes
6281 AC_MSG_RESULT([$enable_static])
6282
6283 _LT_CONFIG($1)
6284 fi
6285 AC_LANG_POP
6286 CC=$lt_save_CC
6287 ])# _LT_LANG_C_CONFIG
6288
6289
6290 # _LT_LANG_CXX_CONFIG([TAG])
6291 # --------------------------
6292 # Ensure that the configuration variables for a C++ compiler are suitably
6293 # defined. These variables are subsequently used by _LT_CONFIG to write
6294 # the compiler configuration to 'libtool'.
6295 m4_defun([_LT_LANG_CXX_CONFIG],
6296 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6297 m4_require([_LT_DECL_EGREP])dnl
6298 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6299 if test -n "$CXX" && ( test no != "$CXX" &&
6300 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6301 (test g++ != "$CXX"))); then
6302 AC_PROG_CXXCPP
6303 else
6304 _lt_caught_CXX_error=yes
6305 fi
6306
6307 AC_LANG_PUSH(C++)
6308 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6309 _LT_TAGVAR(allow_undefined_flag, $1)=
6310 _LT_TAGVAR(always_export_symbols, $1)=no
6311 _LT_TAGVAR(archive_expsym_cmds, $1)=
6312 _LT_TAGVAR(compiler_needs_object, $1)=no
6313 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6314 _LT_TAGVAR(hardcode_direct, $1)=no
6315 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6316 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6317 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6318 _LT_TAGVAR(hardcode_minus_L, $1)=no
6319 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6320 _LT_TAGVAR(hardcode_automatic, $1)=no
6321 _LT_TAGVAR(inherit_rpath, $1)=no
6322 _LT_TAGVAR(module_cmds, $1)=
6323 _LT_TAGVAR(module_expsym_cmds, $1)=
6324 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6325 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6326 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6327 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6328 _LT_TAGVAR(no_undefined_flag, $1)=
6329 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6330 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6331
6332 # Source file extension for C++ test sources.
6333 ac_ext=cpp
6334
6335 # Object file extension for compiled C++ test sources.
6336 objext=o
6337 _LT_TAGVAR(objext, $1)=$objext
6338
6339 # No sense in running all these tests if we already determined that
6340 # the CXX compiler isn't working. Some variables (like enable_shared)
6341 # are currently assumed to apply to all compilers on this platform,
6342 # and will be corrupted by setting them based on a non-working compiler.
6343 if test yes != "$_lt_caught_CXX_error"; then
6344 # Code to be used in simple compile tests
6345 lt_simple_compile_test_code="int some_variable = 0;"
6346
6347 # Code to be used in simple link tests
6348 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6349
6350 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6351 _LT_TAG_COMPILER
6352
6353 # save warnings/boilerplate of simple test code
6354 _LT_COMPILER_BOILERPLATE
6355 _LT_LINKER_BOILERPLATE
6356
6357 # Allow CC to be a program name with arguments.
6358 lt_save_CC=$CC
6359 lt_save_CFLAGS=$CFLAGS
6360 lt_save_LD=$LD
6361 lt_save_GCC=$GCC
6362 GCC=$GXX
6363 lt_save_with_gnu_ld=$with_gnu_ld
6364 lt_save_path_LD=$lt_cv_path_LD
6365 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6366 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6367 else
6368 $as_unset lt_cv_prog_gnu_ld
6369 fi
6370 if test -n "${lt_cv_path_LDCXX+set}"; then
6371 lt_cv_path_LD=$lt_cv_path_LDCXX
6372 else
6373 $as_unset lt_cv_path_LD
6374 fi
6375 test -z "${LDCXX+set}" || LD=$LDCXX
6376 CC=${CXX-"c++"}
6377 CFLAGS=$CXXFLAGS
6378 compiler=$CC
6379 _LT_TAGVAR(compiler, $1)=$CC
6380 _LT_CC_BASENAME([$compiler])
6381
6382 if test -n "$compiler"; then
6383 # We don't want -fno-exception when compiling C++ code, so set the
6384 # no_builtin_flag separately
6385 if test yes = "$GXX"; then
6386 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6387 else
6388 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6389 fi
6390
6391 if test yes = "$GXX"; then
6392 # Set up default GNU C++ configuration
6393
6394 LT_PATH_LD
6395
6396 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6397 # archiving commands below assume that GNU ld is being used.
6398 if test yes = "$with_gnu_ld"; then
6399 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6400 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6401
6402 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6403 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6404
6405 # If archive_cmds runs LD, not CC, wlarc should be empty
6406 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6407 # investigate it a little bit more. (MM)
6408 wlarc='$wl'
6409
6410 # ancient GNU ld didn't support --whole-archive et. al.
6411 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6412 $GREP 'no-whole-archive' > /dev/null; then
6413 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6414 else
6415 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6416 fi
6417 else
6418 with_gnu_ld=no
6419 wlarc=
6420
6421 # A generic and very simple default shared library creation
6422 # command for GNU C++ for the case where it uses the native
6423 # linker, instead of GNU ld. If possible, this setting should
6424 # overridden to take advantage of the native linker features on
6425 # the platform it is being used on.
6426 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6427 fi
6428
6429 # Commands to make compiler produce verbose output that lists
6430 # what "hidden" libraries, object files and flags are used when
6431 # linking a shared library.
6432 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6433
6434 else
6435 GXX=no
6436 with_gnu_ld=no
6437 wlarc=
6438 fi
6439
6440 # PORTME: fill in a description of your system's C++ link characteristics
6441 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6442 _LT_TAGVAR(ld_shlibs, $1)=yes
6443 case $host_os in
6444 aix3*)
6445 # FIXME: insert proper C++ library support
6446 _LT_TAGVAR(ld_shlibs, $1)=no
6447 ;;
6448 aix[[4-9]]*)
6449 if test ia64 = "$host_cpu"; then
6450 # On IA64, the linker does run time linking by default, so we don't
6451 # have to do anything special.
6452 aix_use_runtimelinking=no
6453 exp_sym_flag='-Bexport'
6454 no_entry_flag=
6455 else
6456 aix_use_runtimelinking=no
6457
6458 # Test if we are trying to use run time linking or normal
6459 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6460 # have runtime linking enabled, and use it for executables.
6461 # For shared libraries, we enable/disable runtime linking
6462 # depending on the kind of the shared library created -
6463 # when "with_aix_soname,aix_use_runtimelinking" is:
6464 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6465 # "aix,yes" lib.so shared, rtl:yes, for executables
6466 # lib.a static archive
6467 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6468 # lib.a(lib.so.V) shared, rtl:no, for executables
6469 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6470 # lib.a(lib.so.V) shared, rtl:no
6471 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6472 # lib.a static archive
6473 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6474 for ld_flag in $LDFLAGS; do
6475 case $ld_flag in
6476 *-brtl*)
6477 aix_use_runtimelinking=yes
6478 break
6479 ;;
6480 esac
6481 done
6482 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6483 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6484 # so we don't have lib.a shared libs to link our executables.
6485 # We have to force runtime linking in this case.
6486 aix_use_runtimelinking=yes
6487 LDFLAGS="$LDFLAGS -Wl,-brtl"
6488 fi
6489 ;;
6490 esac
6491
6492 exp_sym_flag='-bexport'
6493 no_entry_flag='-bnoentry'
6494 fi
6495
6496 # When large executables or shared objects are built, AIX ld can
6497 # have problems creating the table of contents. If linking a library
6498 # or program results in "error TOC overflow" add -mminimal-toc to
6499 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6500 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6501
6502 _LT_TAGVAR(archive_cmds, $1)=''
6503 _LT_TAGVAR(hardcode_direct, $1)=yes
6504 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6505 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6506 _LT_TAGVAR(link_all_deplibs, $1)=yes
6507 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6508 case $with_aix_soname,$aix_use_runtimelinking in
6509 aix,*) ;; # no import file
6510 svr4,* | *,yes) # use import file
6511 # The Import File defines what to hardcode.
6512 _LT_TAGVAR(hardcode_direct, $1)=no
6513 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6514 ;;
6515 esac
6516
6517 if test yes = "$GXX"; then
6518 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6519 # We only want to do this on AIX 4.2 and lower, the check
6520 # below for broken collect2 doesn't work under 4.3+
6521 collect2name=`$CC -print-prog-name=collect2`
6522 if test -f "$collect2name" &&
6523 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6524 then
6525 # We have reworked collect2
6526 :
6527 else
6528 # We have old collect2
6529 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6530 # It fails to find uninstalled libraries when the uninstalled
6531 # path is not listed in the libpath. Setting hardcode_minus_L
6532 # to unsupported forces relinking
6533 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6534 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6535 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6536 fi
6537 esac
6538 shared_flag='-shared'
6539 if test yes = "$aix_use_runtimelinking"; then
6540 shared_flag=$shared_flag' $wl-G'
6541 fi
6542 # Need to ensure runtime linking is disabled for the traditional
6543 # shared library, or the linker may eventually find shared libraries
6544 # /with/ Import File - we do not want to mix them.
6545 shared_flag_aix='-shared'
6546 shared_flag_svr4='-shared $wl-G'
6547 else
6548 # not using gcc
6549 if test ia64 = "$host_cpu"; then
6550 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6551 # chokes on -Wl,-G. The following line is correct:
6552 shared_flag='-G'
6553 else
6554 if test yes = "$aix_use_runtimelinking"; then
6555 shared_flag='$wl-G'
6556 else
6557 shared_flag='$wl-bM:SRE'
6558 fi
6559 shared_flag_aix='$wl-bM:SRE'
6560 shared_flag_svr4='$wl-G'
6561 fi
6562 fi
6563
6564 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6565 # It seems that -bexpall does not export symbols beginning with
6566 # underscore (_), so it is better to generate a list of symbols to
6567 # export.
6568 _LT_TAGVAR(always_export_symbols, $1)=yes
6569 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6570 # Warning - without using the other runtime loading flags (-brtl),
6571 # -berok will link without error, but may produce a broken library.
6572 # The "-G" linker flag allows undefined symbols.
6573 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6574 # Determine the default libpath from the value encoded in an empty
6575 # executable.
6576 _LT_SYS_MODULE_PATH_AIX([$1])
6577 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6578
6579 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
6580 else
6581 if test ia64 = "$host_cpu"; then
6582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6583 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6584 _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"
6585 else
6586 # Determine the default libpath from the value encoded in an
6587 # empty executable.
6588 _LT_SYS_MODULE_PATH_AIX([$1])
6589 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6590 # Warning - without using the other run time loading flags,
6591 # -berok will link without error, but may produce a broken library.
6592 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6593 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6594 if test yes = "$with_gnu_ld"; then
6595 # We only use this code for GNU lds that support --whole-archive.
6596 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6597 else
6598 # Exported symbols can be pulled into shared objects from archives
6599 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6600 fi
6601 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6602 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6603 # -brtl affects multiple linker settings, -berok does not and is overridden later
6604 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6605 if test svr4 != "$with_aix_soname"; then
6606 # This is similar to how AIX traditionally builds its shared
6607 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6608 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6609 fi
6610 if test aix != "$with_aix_soname"; then
6611 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6612 else
6613 # used by -dlpreopen to get the symbols
6614 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6615 fi
6616 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6617 fi
6618 fi
6619 ;;
6620
6621 beos*)
6622 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6623 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6624 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6625 # support --undefined. This deserves some investigation. FIXME
6626 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6627 else
6628 _LT_TAGVAR(ld_shlibs, $1)=no
6629 fi
6630 ;;
6631
6632 chorus*)
6633 case $cc_basename in
6634 *)
6635 # FIXME: insert proper C++ library support
6636 _LT_TAGVAR(ld_shlibs, $1)=no
6637 ;;
6638 esac
6639 ;;
6640
6641 cygwin* | mingw* | pw32* | cegcc*)
6642 case $GXX,$cc_basename in
6643 ,cl* | no,cl*)
6644 # Native MSVC
6645 # hardcode_libdir_flag_spec is actually meaningless, as there is
6646 # no search path for DLLs.
6647 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6648 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6649 _LT_TAGVAR(always_export_symbols, $1)=yes
6650 _LT_TAGVAR(file_list_spec, $1)='@'
6651 # Tell ltmain to make .lib files, not .a files.
6652 libext=lib
6653 # Tell ltmain to make .dll files, not .so files.
6654 shrext_cmds=.dll
6655 # FIXME: Setting linknames here is a bad hack.
6656 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6657 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6658 cp "$export_symbols" "$output_objdir/$soname.def";
6659 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6660 else
6661 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6662 fi~
6663 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6664 linknames='
6665 # The linker will not automatically build a static lib if we build a DLL.
6666 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6667 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6668 # Don't use ranlib
6669 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6670 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6671 lt_tool_outputfile="@TOOL_OUTPUT@"~
6672 case $lt_outputfile in
6673 *.exe|*.EXE) ;;
6674 *)
6675 lt_outputfile=$lt_outputfile.exe
6676 lt_tool_outputfile=$lt_tool_outputfile.exe
6677 ;;
6678 esac~
6679 func_to_tool_file "$lt_outputfile"~
6680 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6681 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6682 $RM "$lt_outputfile.manifest";
6683 fi'
6684 ;;
6685 *)
6686 # g++
6687 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6688 # as there is no search path for DLLs.
6689 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6690 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6691 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6692 _LT_TAGVAR(always_export_symbols, $1)=no
6693 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6694
6695 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6696 _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'
6697 # If the export-symbols file already is a .def file, use it as
6698 # is; otherwise, prepend EXPORTS...
6699 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6700 cp $export_symbols $output_objdir/$soname.def;
6701 else
6702 echo EXPORTS > $output_objdir/$soname.def;
6703 cat $export_symbols >> $output_objdir/$soname.def;
6704 fi~
6705 $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'
6706 else
6707 _LT_TAGVAR(ld_shlibs, $1)=no
6708 fi
6709 ;;
6710 esac
6711 ;;
6712 darwin* | rhapsody*)
6713 _LT_DARWIN_LINKER_FEATURES($1)
6714 ;;
6715
6716 os2*)
6717 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6718 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6719 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6720 shrext_cmds=.dll
6721 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6722 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6723 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6724 $ECHO EXPORTS >> $output_objdir/$libname.def~
6725 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6726 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6727 emximp -o $lib $output_objdir/$libname.def'
6728 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6729 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6730 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6731 $ECHO EXPORTS >> $output_objdir/$libname.def~
6732 prefix_cmds="$SED"~
6733 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6734 prefix_cmds="$prefix_cmds -e 1d";
6735 fi~
6736 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6737 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6738 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6739 emximp -o $lib $output_objdir/$libname.def'
6740 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6741 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6742 ;;
6743
6744 dgux*)
6745 case $cc_basename in
6746 ec++*)
6747 # FIXME: insert proper C++ library support
6748 _LT_TAGVAR(ld_shlibs, $1)=no
6749 ;;
6750 ghcx*)
6751 # Green Hills C++ Compiler
6752 # FIXME: insert proper C++ library support
6753 _LT_TAGVAR(ld_shlibs, $1)=no
6754 ;;
6755 *)
6756 # FIXME: insert proper C++ library support
6757 _LT_TAGVAR(ld_shlibs, $1)=no
6758 ;;
6759 esac
6760 ;;
6761
6762 freebsd2.*)
6763 # C++ shared libraries reported to be fairly broken before
6764 # switch to ELF
6765 _LT_TAGVAR(ld_shlibs, $1)=no
6766 ;;
6767
6768 freebsd-elf*)
6769 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6770 ;;
6771
6772 freebsd* | dragonfly*)
6773 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6774 # conventions
6775 _LT_TAGVAR(ld_shlibs, $1)=yes
6776 ;;
6777
6778 haiku*)
6779 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6780 _LT_TAGVAR(link_all_deplibs, $1)=yes
6781 ;;
6782
6783 hpux9*)
6784 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6785 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6786 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6787 _LT_TAGVAR(hardcode_direct, $1)=yes
6788 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6789 # but as the default
6790 # location of the library.
6791
6792 case $cc_basename in
6793 CC*)
6794 # FIXME: insert proper C++ library support
6795 _LT_TAGVAR(ld_shlibs, $1)=no
6796 ;;
6797 aCC*)
6798 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6799 # Commands to make compiler produce verbose output that lists
6800 # what "hidden" libraries, object files and flags are used when
6801 # linking a shared library.
6802 #
6803 # There doesn't appear to be a way to prevent this compiler from
6804 # explicitly linking system object files so we need to strip them
6805 # from the output so that they don't get included in the library
6806 # dependencies.
6807 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6808 ;;
6809 *)
6810 if test yes = "$GXX"; then
6811 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6812 else
6813 # FIXME: insert proper C++ library support
6814 _LT_TAGVAR(ld_shlibs, $1)=no
6815 fi
6816 ;;
6817 esac
6818 ;;
6819
6820 hpux10*|hpux11*)
6821 if test no = "$with_gnu_ld"; then
6822 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6823 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6824
6825 case $host_cpu in
6826 hppa*64*|ia64*)
6827 ;;
6828 *)
6829 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6830 ;;
6831 esac
6832 fi
6833 case $host_cpu in
6834 hppa*64*|ia64*)
6835 _LT_TAGVAR(hardcode_direct, $1)=no
6836 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6837 ;;
6838 *)
6839 _LT_TAGVAR(hardcode_direct, $1)=yes
6840 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6841 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6842 # but as the default
6843 # location of the library.
6844 ;;
6845 esac
6846
6847 case $cc_basename in
6848 CC*)
6849 # FIXME: insert proper C++ library support
6850 _LT_TAGVAR(ld_shlibs, $1)=no
6851 ;;
6852 aCC*)
6853 case $host_cpu in
6854 hppa*64*)
6855 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6856 ;;
6857 ia64*)
6858 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6859 ;;
6860 *)
6861 _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'
6862 ;;
6863 esac
6864 # Commands to make compiler produce verbose output that lists
6865 # what "hidden" libraries, object files and flags are used when
6866 # linking a shared library.
6867 #
6868 # There doesn't appear to be a way to prevent this compiler from
6869 # explicitly linking system object files so we need to strip them
6870 # from the output so that they don't get included in the library
6871 # dependencies.
6872 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6873 ;;
6874 *)
6875 if test yes = "$GXX"; then
6876 if test no = "$with_gnu_ld"; then
6877 case $host_cpu in
6878 hppa*64*)
6879 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6880 ;;
6881 ia64*)
6882 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6883 ;;
6884 *)
6885 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6886 ;;
6887 esac
6888 fi
6889 else
6890 # FIXME: insert proper C++ library support
6891 _LT_TAGVAR(ld_shlibs, $1)=no
6892 fi
6893 ;;
6894 esac
6895 ;;
6896
6897 interix[[3-9]]*)
6898 _LT_TAGVAR(hardcode_direct, $1)=no
6899 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6900 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6901 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6902 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6903 # Instead, shared libraries are loaded at an image base (0x10000000 by
6904 # default) and relocated if they conflict, which is a slow very memory
6905 # consuming and fragmenting process. To avoid this, we pick a random,
6906 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6907 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6908 _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'
6909 _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'
6910 ;;
6911 irix5* | irix6*)
6912 case $cc_basename in
6913 CC*)
6914 # SGI C++
6915 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
6916
6917 # Archives containing C++ object files must be created using
6918 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6919 # necessary to make sure instantiated templates are included
6920 # in the archive.
6921 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6922 ;;
6923 *)
6924 if test yes = "$GXX"; then
6925 if test no = "$with_gnu_ld"; then
6926 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
6927 else
6928 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
6929 fi
6930 fi
6931 _LT_TAGVAR(link_all_deplibs, $1)=yes
6932 ;;
6933 esac
6934 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6935 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6936 _LT_TAGVAR(inherit_rpath, $1)=yes
6937 ;;
6938
6939 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6940 case $cc_basename in
6941 KCC*)
6942 # Kuck and Associates, Inc. (KAI) C++ Compiler
6943
6944 # KCC will only create a shared library if the output file
6945 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6946 # to its proper name (with version) after linking.
6947 _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'
6948 _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'
6949 # Commands to make compiler produce verbose output that lists
6950 # what "hidden" libraries, object files and flags are used when
6951 # linking a shared library.
6952 #
6953 # There doesn't appear to be a way to prevent this compiler from
6954 # explicitly linking system object files so we need to strip them
6955 # from the output so that they don't get included in the library
6956 # dependencies.
6957 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6958
6959 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6960 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6961
6962 # Archives containing C++ object files must be created using
6963 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6964 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6965 ;;
6966 icpc* | ecpc* )
6967 # Intel C++
6968 with_gnu_ld=yes
6969 # version 8.0 and above of icpc choke on multiply defined symbols
6970 # if we add $predep_objects and $postdep_objects, however 7.1 and
6971 # earlier do not add the objects themselves.
6972 case `$CC -V 2>&1` in
6973 *"Version 7."*)
6974 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6975 _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'
6976 ;;
6977 *) # Version 8.0 or newer
6978 tmp_idyn=
6979 case $host_cpu in
6980 ia64*) tmp_idyn=' -i_dynamic';;
6981 esac
6982 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6983 _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'
6984 ;;
6985 esac
6986 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6987 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6988 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6989 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6990 ;;
6991 pgCC* | pgcpp*)
6992 # Portland Group C++ compiler
6993 case `$CC -V` in
6994 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6995 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6996 rm -rf $tpldir~
6997 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6998 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6999 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7000 rm -rf $tpldir~
7001 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7002 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7003 $RANLIB $oldlib'
7004 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7005 rm -rf $tpldir~
7006 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7007 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7008 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7009 rm -rf $tpldir~
7010 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7011 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
7012 ;;
7013 *) # Version 6 and above use weak symbols
7014 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7015 _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'
7016 ;;
7017 esac
7018
7019 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7020 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7021 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7022 ;;
7023 cxx*)
7024 # Compaq C++
7025 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7026 _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'
7027
7028 runpath_var=LD_RUN_PATH
7029 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7030 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7031
7032 # Commands to make compiler produce verbose output that lists
7033 # what "hidden" libraries, object files and flags are used when
7034 # linking a shared library.
7035 #
7036 # There doesn't appear to be a way to prevent this compiler from
7037 # explicitly linking system object files so we need to strip them
7038 # from the output so that they don't get included in the library
7039 # dependencies.
7040 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7041 ;;
7042 xl* | mpixl* | bgxl*)
7043 # IBM XL 8.0 on PPC, with GNU ld
7044 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7045 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7046 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7047 if test yes = "$supports_anon_versioning"; then
7048 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7049 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7050 echo "local: *; };" >> $output_objdir/$libname.ver~
7051 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7052 fi
7053 ;;
7054 *)
7055 case `$CC -V 2>&1 | sed 5q` in
7056 *Sun\ C*)
7057 # Sun C++ 5.9
7058 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7059 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7060 _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'
7061 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7062 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7063 _LT_TAGVAR(compiler_needs_object, $1)=yes
7064
7065 # Not sure whether something based on
7066 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7067 # would be better.
7068 output_verbose_link_cmd='func_echo_all'
7069
7070 # Archives containing C++ object files must be created using
7071 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7072 # necessary to make sure instantiated templates are included
7073 # in the archive.
7074 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7075 ;;
7076 esac
7077 ;;
7078 esac
7079 ;;
7080
7081 lynxos*)
7082 # FIXME: insert proper C++ library support
7083 _LT_TAGVAR(ld_shlibs, $1)=no
7084 ;;
7085
7086 m88k*)
7087 # FIXME: insert proper C++ library support
7088 _LT_TAGVAR(ld_shlibs, $1)=no
7089 ;;
7090
7091 mvs*)
7092 case $cc_basename in
7093 cxx*)
7094 # FIXME: insert proper C++ library support
7095 _LT_TAGVAR(ld_shlibs, $1)=no
7096 ;;
7097 *)
7098 # FIXME: insert proper C++ library support
7099 _LT_TAGVAR(ld_shlibs, $1)=no
7100 ;;
7101 esac
7102 ;;
7103
7104 netbsd*)
7105 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7106 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7107 wlarc=
7108 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7109 _LT_TAGVAR(hardcode_direct, $1)=yes
7110 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7111 fi
7112 # Workaround some broken pre-1.5 toolchains
7113 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7114 ;;
7115
7116 *nto* | *qnx*)
7117 _LT_TAGVAR(ld_shlibs, $1)=yes
7118 ;;
7119
7120 openbsd* | bitrig*)
7121 if test -f /usr/libexec/ld.so; then
7122 _LT_TAGVAR(hardcode_direct, $1)=yes
7123 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7124 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7125 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7126 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7127 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7128 _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'
7129 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7130 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7131 fi
7132 output_verbose_link_cmd=func_echo_all
7133 else
7134 _LT_TAGVAR(ld_shlibs, $1)=no
7135 fi
7136 ;;
7137
7138 osf3* | osf4* | osf5*)
7139 case $cc_basename in
7140 KCC*)
7141 # Kuck and Associates, Inc. (KAI) C++ Compiler
7142
7143 # KCC will only create a shared library if the output file
7144 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7145 # to its proper name (with version) after linking.
7146 _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'
7147
7148 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7149 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7150
7151 # Archives containing C++ object files must be created using
7152 # the KAI C++ compiler.
7153 case $host in
7154 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7155 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7156 esac
7157 ;;
7158 RCC*)
7159 # Rational C++ 2.4.1
7160 # FIXME: insert proper C++ library support
7161 _LT_TAGVAR(ld_shlibs, $1)=no
7162 ;;
7163 cxx*)
7164 case $host in
7165 osf3*)
7166 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7167 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7168 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7169 ;;
7170 *)
7171 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7172 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7173 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7174 echo "-hidden">> $lib.exp~
7175 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
7176 $RM $lib.exp'
7177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7178 ;;
7179 esac
7180
7181 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7182
7183 # Commands to make compiler produce verbose output that lists
7184 # what "hidden" libraries, object files and flags are used when
7185 # linking a shared library.
7186 #
7187 # There doesn't appear to be a way to prevent this compiler from
7188 # explicitly linking system object files so we need to strip them
7189 # from the output so that they don't get included in the library
7190 # dependencies.
7191 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7192 ;;
7193 *)
7194 if test yes,no = "$GXX,$with_gnu_ld"; then
7195 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7196 case $host in
7197 osf3*)
7198 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7199 ;;
7200 *)
7201 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7202 ;;
7203 esac
7204
7205 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7206 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7207
7208 # Commands to make compiler produce verbose output that lists
7209 # what "hidden" libraries, object files and flags are used when
7210 # linking a shared library.
7211 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7212
7213 else
7214 # FIXME: insert proper C++ library support
7215 _LT_TAGVAR(ld_shlibs, $1)=no
7216 fi
7217 ;;
7218 esac
7219 ;;
7220
7221 psos*)
7222 # FIXME: insert proper C++ library support
7223 _LT_TAGVAR(ld_shlibs, $1)=no
7224 ;;
7225
7226 sunos4*)
7227 case $cc_basename in
7228 CC*)
7229 # Sun C++ 4.x
7230 # FIXME: insert proper C++ library support
7231 _LT_TAGVAR(ld_shlibs, $1)=no
7232 ;;
7233 lcc*)
7234 # Lucid
7235 # FIXME: insert proper C++ library support
7236 _LT_TAGVAR(ld_shlibs, $1)=no
7237 ;;
7238 *)
7239 # FIXME: insert proper C++ library support
7240 _LT_TAGVAR(ld_shlibs, $1)=no
7241 ;;
7242 esac
7243 ;;
7244
7245 solaris*)
7246 case $cc_basename in
7247 CC* | sunCC*)
7248 # Sun C++ 4.2, 5.x and Centerline C++
7249 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7250 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7251 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7252 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7253 $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'
7254
7255 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7256 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7257 case $host_os in
7258 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7259 *)
7260 # The compiler driver will combine and reorder linker options,
7261 # but understands '-z linker_flag'.
7262 # Supported since Solaris 2.6 (maybe 2.5.1?)
7263 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7264 ;;
7265 esac
7266 _LT_TAGVAR(link_all_deplibs, $1)=yes
7267
7268 output_verbose_link_cmd='func_echo_all'
7269
7270 # Archives containing C++ object files must be created using
7271 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7272 # necessary to make sure instantiated templates are included
7273 # in the archive.
7274 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7275 ;;
7276 gcx*)
7277 # Green Hills C++ Compiler
7278 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7279
7280 # The C++ compiler must be used to create the archive.
7281 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7282 ;;
7283 *)
7284 # GNU C++ compiler with Solaris linker
7285 if test yes,no = "$GXX,$with_gnu_ld"; then
7286 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7287 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7288 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7289 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7290 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7291
7292 # Commands to make compiler produce verbose output that lists
7293 # what "hidden" libraries, object files and flags are used when
7294 # linking a shared library.
7295 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7296 else
7297 # g++ 2.7 appears to require '-G' NOT '-shared' on this
7298 # platform.
7299 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7300 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7301 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7302
7303 # Commands to make compiler produce verbose output that lists
7304 # what "hidden" libraries, object files and flags are used when
7305 # linking a shared library.
7306 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7307 fi
7308
7309 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7310 case $host_os in
7311 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7312 *)
7313 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7314 ;;
7315 esac
7316 fi
7317 ;;
7318 esac
7319 ;;
7320
7321 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7322 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7323 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7324 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7325 runpath_var='LD_RUN_PATH'
7326
7327 case $cc_basename in
7328 CC*)
7329 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7330 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7331 ;;
7332 *)
7333 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7334 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7335 ;;
7336 esac
7337 ;;
7338
7339 sysv5* | sco3.2v5* | sco5v6*)
7340 # Note: We CANNOT use -z defs as we might desire, because we do not
7341 # link with -lc, and that would cause any symbols used from libc to
7342 # always be unresolved, which means just about no library would
7343 # ever link correctly. If we're not using GNU ld we use -z text
7344 # though, which does catch some bad symbols but isn't as heavy-handed
7345 # as -z defs.
7346 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7347 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7348 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7349 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7350 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7351 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7352 _LT_TAGVAR(link_all_deplibs, $1)=yes
7353 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7354 runpath_var='LD_RUN_PATH'
7355
7356 case $cc_basename in
7357 CC*)
7358 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7359 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7360 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7361 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7362 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7363 '"$_LT_TAGVAR(reload_cmds, $1)"
7364 ;;
7365 *)
7366 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7367 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7368 ;;
7369 esac
7370 ;;
7371
7372 tandem*)
7373 case $cc_basename in
7374 NCC*)
7375 # NonStop-UX NCC 3.20
7376 # FIXME: insert proper C++ library support
7377 _LT_TAGVAR(ld_shlibs, $1)=no
7378 ;;
7379 *)
7380 # FIXME: insert proper C++ library support
7381 _LT_TAGVAR(ld_shlibs, $1)=no
7382 ;;
7383 esac
7384 ;;
7385
7386 vxworks*)
7387 # FIXME: insert proper C++ library support
7388 _LT_TAGVAR(ld_shlibs, $1)=no
7389 ;;
7390
7391 *)
7392 # FIXME: insert proper C++ library support
7393 _LT_TAGVAR(ld_shlibs, $1)=no
7394 ;;
7395 esac
7396
7397 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7398 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7399
7400 _LT_TAGVAR(GCC, $1)=$GXX
7401 _LT_TAGVAR(LD, $1)=$LD
7402
7403 ## CAVEAT EMPTOR:
7404 ## There is no encapsulation within the following macros, do not change
7405 ## the running order or otherwise move them around unless you know exactly
7406 ## what you are doing...
7407 _LT_SYS_HIDDEN_LIBDEPS($1)
7408 _LT_COMPILER_PIC($1)
7409 _LT_COMPILER_C_O($1)
7410 _LT_COMPILER_FILE_LOCKS($1)
7411 _LT_LINKER_SHLIBS($1)
7412 _LT_SYS_DYNAMIC_LINKER($1)
7413 _LT_LINKER_HARDCODE_LIBPATH($1)
7414
7415 _LT_CONFIG($1)
7416 fi # test -n "$compiler"
7417
7418 CC=$lt_save_CC
7419 CFLAGS=$lt_save_CFLAGS
7420 LDCXX=$LD
7421 LD=$lt_save_LD
7422 GCC=$lt_save_GCC
7423 with_gnu_ld=$lt_save_with_gnu_ld
7424 lt_cv_path_LDCXX=$lt_cv_path_LD
7425 lt_cv_path_LD=$lt_save_path_LD
7426 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7427 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7428 fi # test yes != "$_lt_caught_CXX_error"
7429
7430 AC_LANG_POP
7431 ])# _LT_LANG_CXX_CONFIG
7432
7433
7434 # _LT_FUNC_STRIPNAME_CNF
7435 # ----------------------
7436 # func_stripname_cnf prefix suffix name
7437 # strip PREFIX and SUFFIX off of NAME.
7438 # PREFIX and SUFFIX must not contain globbing or regex special
7439 # characters, hashes, percent signs, but SUFFIX may contain a leading
7440 # dot (in which case that matches only a dot).
7441 #
7442 # This function is identical to the (non-XSI) version of func_stripname,
7443 # except this one can be used by m4 code that may be executed by configure,
7444 # rather than the libtool script.
7445 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7446 AC_REQUIRE([_LT_DECL_SED])
7447 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7448 func_stripname_cnf ()
7449 {
7450 case @S|@2 in
7451 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7452 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7453 esac
7454 } # func_stripname_cnf
7455 ])# _LT_FUNC_STRIPNAME_CNF
7456
7457
7458 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7459 # ---------------------------------
7460 # Figure out "hidden" library dependencies from verbose
7461 # compiler output when linking a shared library.
7462 # Parse the compiler output and extract the necessary
7463 # objects, libraries and library flags.
7464 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7465 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7466 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7467 # Dependencies to place before and after the object being linked:
7468 _LT_TAGVAR(predep_objects, $1)=
7469 _LT_TAGVAR(postdep_objects, $1)=
7470 _LT_TAGVAR(predeps, $1)=
7471 _LT_TAGVAR(postdeps, $1)=
7472 _LT_TAGVAR(compiler_lib_search_path, $1)=
7473
7474 dnl we can't use the lt_simple_compile_test_code here,
7475 dnl because it contains code intended for an executable,
7476 dnl not a library. It's possible we should let each
7477 dnl tag define a new lt_????_link_test_code variable,
7478 dnl but it's only used here...
7479 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7480 int a;
7481 void foo (void) { a = 0; }
7482 _LT_EOF
7483 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7484 class Foo
7485 {
7486 public:
7487 Foo (void) { a = 0; }
7488 private:
7489 int a;
7490 };
7491 _LT_EOF
7492 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7493 subroutine foo
7494 implicit none
7495 integer*4 a
7496 a=0
7497 return
7498 end
7499 _LT_EOF
7500 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7501 subroutine foo
7502 implicit none
7503 integer a
7504 a=0
7505 return
7506 end
7507 _LT_EOF
7508 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7509 public class foo {
7510 private int a;
7511 public void bar (void) {
7512 a = 0;
7513 }
7514 };
7515 _LT_EOF
7516 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7517 package foo
7518 func foo() {
7519 }
7520 _LT_EOF
7521 ])
7522
7523 _lt_libdeps_save_CFLAGS=$CFLAGS
7524 case "$CC $CFLAGS " in #(
7525 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7526 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7527 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7528 esac
7529
7530 dnl Parse the compiler output and extract the necessary
7531 dnl objects, libraries and library flags.
7532 if AC_TRY_EVAL(ac_compile); then
7533 # Parse the compiler output and extract the necessary
7534 # objects, libraries and library flags.
7535
7536 # Sentinel used to keep track of whether or not we are before
7537 # the conftest object file.
7538 pre_test_object_deps_done=no
7539
7540 for p in `eval "$output_verbose_link_cmd"`; do
7541 case $prev$p in
7542
7543 -L* | -R* | -l*)
7544 # Some compilers place space between "-{L,R}" and the path.
7545 # Remove the space.
7546 if test x-L = "$p" ||
7547 test x-R = "$p"; then
7548 prev=$p
7549 continue
7550 fi
7551
7552 # Expand the sysroot to ease extracting the directories later.
7553 if test -z "$prev"; then
7554 case $p in
7555 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7556 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7557 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7558 esac
7559 fi
7560 case $p in
7561 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7562 esac
7563 if test no = "$pre_test_object_deps_done"; then
7564 case $prev in
7565 -L | -R)
7566 # Internal compiler library paths should come after those
7567 # provided the user. The postdeps already come after the
7568 # user supplied libs so there is no need to process them.
7569 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7570 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7571 else
7572 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7573 fi
7574 ;;
7575 # The "-l" case would never come before the object being
7576 # linked, so don't bother handling this case.
7577 esac
7578 else
7579 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7580 _LT_TAGVAR(postdeps, $1)=$prev$p
7581 else
7582 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7583 fi
7584 fi
7585 prev=
7586 ;;
7587
7588 *.lto.$objext) ;; # Ignore GCC LTO objects
7589 *.$objext)
7590 # This assumes that the test object file only shows up
7591 # once in the compiler output.
7592 if test "$p" = "conftest.$objext"; then
7593 pre_test_object_deps_done=yes
7594 continue
7595 fi
7596
7597 if test no = "$pre_test_object_deps_done"; then
7598 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7599 _LT_TAGVAR(predep_objects, $1)=$p
7600 else
7601 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7602 fi
7603 else
7604 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7605 _LT_TAGVAR(postdep_objects, $1)=$p
7606 else
7607 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7608 fi
7609 fi
7610 ;;
7611
7612 *) ;; # Ignore the rest.
7613
7614 esac
7615 done
7616
7617 # Clean up.
7618 rm -f a.out a.exe
7619 else
7620 echo "libtool.m4: error: problem compiling $1 test program"
7621 fi
7622
7623 $RM -f confest.$objext
7624 CFLAGS=$_lt_libdeps_save_CFLAGS
7625
7626 # PORTME: override above test on systems where it is broken
7627 m4_if([$1], [CXX],
7628 [case $host_os in
7629 interix[[3-9]]*)
7630 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7631 # hack all around it, let's just trust "g++" to DTRT.
7632 _LT_TAGVAR(predep_objects,$1)=
7633 _LT_TAGVAR(postdep_objects,$1)=
7634 _LT_TAGVAR(postdeps,$1)=
7635 ;;
7636 esac
7637 ])
7638
7639 case " $_LT_TAGVAR(postdeps, $1) " in
7640 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7641 esac
7642 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7643 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7644 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7645 fi
7646 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7647 [The directories searched by this compiler when creating a shared library])
7648 _LT_TAGDECL([], [predep_objects], [1],
7649 [Dependencies to place before and after the objects being linked to
7650 create a shared library])
7651 _LT_TAGDECL([], [postdep_objects], [1])
7652 _LT_TAGDECL([], [predeps], [1])
7653 _LT_TAGDECL([], [postdeps], [1])
7654 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7655 [The library search path used internally by the compiler when linking
7656 a shared library])
7657 ])# _LT_SYS_HIDDEN_LIBDEPS
7658
7659
7660 # _LT_LANG_F77_CONFIG([TAG])
7661 # --------------------------
7662 # Ensure that the configuration variables for a Fortran 77 compiler are
7663 # suitably defined. These variables are subsequently used by _LT_CONFIG
7664 # to write the compiler configuration to 'libtool'.
7665 m4_defun([_LT_LANG_F77_CONFIG],
7666 [AC_LANG_PUSH(Fortran 77)
7667 if test -z "$F77" || test no = "$F77"; then
7668 _lt_disable_F77=yes
7669 fi
7670
7671 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7672 _LT_TAGVAR(allow_undefined_flag, $1)=
7673 _LT_TAGVAR(always_export_symbols, $1)=no
7674 _LT_TAGVAR(archive_expsym_cmds, $1)=
7675 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7676 _LT_TAGVAR(hardcode_direct, $1)=no
7677 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7678 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7679 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7680 _LT_TAGVAR(hardcode_minus_L, $1)=no
7681 _LT_TAGVAR(hardcode_automatic, $1)=no
7682 _LT_TAGVAR(inherit_rpath, $1)=no
7683 _LT_TAGVAR(module_cmds, $1)=
7684 _LT_TAGVAR(module_expsym_cmds, $1)=
7685 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7686 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7687 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7688 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7689 _LT_TAGVAR(no_undefined_flag, $1)=
7690 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7691 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7692
7693 # Source file extension for f77 test sources.
7694 ac_ext=f
7695
7696 # Object file extension for compiled f77 test sources.
7697 objext=o
7698 _LT_TAGVAR(objext, $1)=$objext
7699
7700 # No sense in running all these tests if we already determined that
7701 # the F77 compiler isn't working. Some variables (like enable_shared)
7702 # are currently assumed to apply to all compilers on this platform,
7703 # and will be corrupted by setting them based on a non-working compiler.
7704 if test yes != "$_lt_disable_F77"; then
7705 # Code to be used in simple compile tests
7706 lt_simple_compile_test_code="\
7707 subroutine t
7708 return
7709 end
7710 "
7711
7712 # Code to be used in simple link tests
7713 lt_simple_link_test_code="\
7714 program t
7715 end
7716 "
7717
7718 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7719 _LT_TAG_COMPILER
7720
7721 # save warnings/boilerplate of simple test code
7722 _LT_COMPILER_BOILERPLATE
7723 _LT_LINKER_BOILERPLATE
7724
7725 # Allow CC to be a program name with arguments.
7726 lt_save_CC=$CC
7727 lt_save_GCC=$GCC
7728 lt_save_CFLAGS=$CFLAGS
7729 CC=${F77-"f77"}
7730 CFLAGS=$FFLAGS
7731 compiler=$CC
7732 _LT_TAGVAR(compiler, $1)=$CC
7733 _LT_CC_BASENAME([$compiler])
7734 GCC=$G77
7735 if test -n "$compiler"; then
7736 AC_MSG_CHECKING([if libtool supports shared libraries])
7737 AC_MSG_RESULT([$can_build_shared])
7738
7739 AC_MSG_CHECKING([whether to build shared libraries])
7740 test no = "$can_build_shared" && enable_shared=no
7741
7742 # On AIX, shared libraries and static libraries use the same namespace, and
7743 # are all built from PIC.
7744 case $host_os in
7745 aix3*)
7746 test yes = "$enable_shared" && enable_static=no
7747 if test -n "$RANLIB"; then
7748 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7749 postinstall_cmds='$RANLIB $lib'
7750 fi
7751 ;;
7752 aix[[4-9]]*)
7753 if test ia64 != "$host_cpu"; then
7754 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7755 yes,aix,yes) ;; # shared object as lib.so file only
7756 yes,svr4,*) ;; # shared object as lib.so archive member only
7757 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7758 esac
7759 fi
7760 ;;
7761 esac
7762 AC_MSG_RESULT([$enable_shared])
7763
7764 AC_MSG_CHECKING([whether to build static libraries])
7765 # Make sure either enable_shared or enable_static is yes.
7766 test yes = "$enable_shared" || enable_static=yes
7767 AC_MSG_RESULT([$enable_static])
7768
7769 _LT_TAGVAR(GCC, $1)=$G77
7770 _LT_TAGVAR(LD, $1)=$LD
7771
7772 ## CAVEAT EMPTOR:
7773 ## There is no encapsulation within the following macros, do not change
7774 ## the running order or otherwise move them around unless you know exactly
7775 ## what you are doing...
7776 _LT_COMPILER_PIC($1)
7777 _LT_COMPILER_C_O($1)
7778 _LT_COMPILER_FILE_LOCKS($1)
7779 _LT_LINKER_SHLIBS($1)
7780 _LT_SYS_DYNAMIC_LINKER($1)
7781 _LT_LINKER_HARDCODE_LIBPATH($1)
7782
7783 _LT_CONFIG($1)
7784 fi # test -n "$compiler"
7785
7786 GCC=$lt_save_GCC
7787 CC=$lt_save_CC
7788 CFLAGS=$lt_save_CFLAGS
7789 fi # test yes != "$_lt_disable_F77"
7790
7791 AC_LANG_POP
7792 ])# _LT_LANG_F77_CONFIG
7793
7794
7795 # _LT_LANG_FC_CONFIG([TAG])
7796 # -------------------------
7797 # Ensure that the configuration variables for a Fortran compiler are
7798 # suitably defined. These variables are subsequently used by _LT_CONFIG
7799 # to write the compiler configuration to 'libtool'.
7800 m4_defun([_LT_LANG_FC_CONFIG],
7801 [AC_LANG_PUSH(Fortran)
7802
7803 if test -z "$FC" || test no = "$FC"; then
7804 _lt_disable_FC=yes
7805 fi
7806
7807 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7808 _LT_TAGVAR(allow_undefined_flag, $1)=
7809 _LT_TAGVAR(always_export_symbols, $1)=no
7810 _LT_TAGVAR(archive_expsym_cmds, $1)=
7811 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7812 _LT_TAGVAR(hardcode_direct, $1)=no
7813 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7814 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7815 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7816 _LT_TAGVAR(hardcode_minus_L, $1)=no
7817 _LT_TAGVAR(hardcode_automatic, $1)=no
7818 _LT_TAGVAR(inherit_rpath, $1)=no
7819 _LT_TAGVAR(module_cmds, $1)=
7820 _LT_TAGVAR(module_expsym_cmds, $1)=
7821 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7822 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7823 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7824 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7825 _LT_TAGVAR(no_undefined_flag, $1)=
7826 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7827 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7828
7829 # Source file extension for fc test sources.
7830 ac_ext=${ac_fc_srcext-f}
7831
7832 # Object file extension for compiled fc test sources.
7833 objext=o
7834 _LT_TAGVAR(objext, $1)=$objext
7835
7836 # No sense in running all these tests if we already determined that
7837 # the FC compiler isn't working. Some variables (like enable_shared)
7838 # are currently assumed to apply to all compilers on this platform,
7839 # and will be corrupted by setting them based on a non-working compiler.
7840 if test yes != "$_lt_disable_FC"; then
7841 # Code to be used in simple compile tests
7842 lt_simple_compile_test_code="\
7843 subroutine t
7844 return
7845 end
7846 "
7847
7848 # Code to be used in simple link tests
7849 lt_simple_link_test_code="\
7850 program t
7851 end
7852 "
7853
7854 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7855 _LT_TAG_COMPILER
7856
7857 # save warnings/boilerplate of simple test code
7858 _LT_COMPILER_BOILERPLATE
7859 _LT_LINKER_BOILERPLATE
7860
7861 # Allow CC to be a program name with arguments.
7862 lt_save_CC=$CC
7863 lt_save_GCC=$GCC
7864 lt_save_CFLAGS=$CFLAGS
7865 CC=${FC-"f95"}
7866 CFLAGS=$FCFLAGS
7867 compiler=$CC
7868 GCC=$ac_cv_fc_compiler_gnu
7869
7870 _LT_TAGVAR(compiler, $1)=$CC
7871 _LT_CC_BASENAME([$compiler])
7872
7873 if test -n "$compiler"; then
7874 AC_MSG_CHECKING([if libtool supports shared libraries])
7875 AC_MSG_RESULT([$can_build_shared])
7876
7877 AC_MSG_CHECKING([whether to build shared libraries])
7878 test no = "$can_build_shared" && enable_shared=no
7879
7880 # On AIX, shared libraries and static libraries use the same namespace, and
7881 # are all built from PIC.
7882 case $host_os in
7883 aix3*)
7884 test yes = "$enable_shared" && enable_static=no
7885 if test -n "$RANLIB"; then
7886 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7887 postinstall_cmds='$RANLIB $lib'
7888 fi
7889 ;;
7890 aix[[4-9]]*)
7891 if test ia64 != "$host_cpu"; then
7892 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7893 yes,aix,yes) ;; # shared object as lib.so file only
7894 yes,svr4,*) ;; # shared object as lib.so archive member only
7895 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7896 esac
7897 fi
7898 ;;
7899 esac
7900 AC_MSG_RESULT([$enable_shared])
7901
7902 AC_MSG_CHECKING([whether to build static libraries])
7903 # Make sure either enable_shared or enable_static is yes.
7904 test yes = "$enable_shared" || enable_static=yes
7905 AC_MSG_RESULT([$enable_static])
7906
7907 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7908 _LT_TAGVAR(LD, $1)=$LD
7909
7910 ## CAVEAT EMPTOR:
7911 ## There is no encapsulation within the following macros, do not change
7912 ## the running order or otherwise move them around unless you know exactly
7913 ## what you are doing...
7914 _LT_SYS_HIDDEN_LIBDEPS($1)
7915 _LT_COMPILER_PIC($1)
7916 _LT_COMPILER_C_O($1)
7917 _LT_COMPILER_FILE_LOCKS($1)
7918 _LT_LINKER_SHLIBS($1)
7919 _LT_SYS_DYNAMIC_LINKER($1)
7920 _LT_LINKER_HARDCODE_LIBPATH($1)
7921
7922 _LT_CONFIG($1)
7923 fi # test -n "$compiler"
7924
7925 GCC=$lt_save_GCC
7926 CC=$lt_save_CC
7927 CFLAGS=$lt_save_CFLAGS
7928 fi # test yes != "$_lt_disable_FC"
7929
7930 AC_LANG_POP
7931 ])# _LT_LANG_FC_CONFIG
7932
7933
7934 # _LT_LANG_GCJ_CONFIG([TAG])
7935 # --------------------------
7936 # Ensure that the configuration variables for the GNU Java Compiler compiler
7937 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7938 # to write the compiler configuration to 'libtool'.
7939 m4_defun([_LT_LANG_GCJ_CONFIG],
7940 [AC_REQUIRE([LT_PROG_GCJ])dnl
7941 AC_LANG_SAVE
7942
7943 # Source file extension for Java test sources.
7944 ac_ext=java
7945
7946 # Object file extension for compiled Java test sources.
7947 objext=o
7948 _LT_TAGVAR(objext, $1)=$objext
7949
7950 # Code to be used in simple compile tests
7951 lt_simple_compile_test_code="class foo {}"
7952
7953 # Code to be used in simple link tests
7954 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7955
7956 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7957 _LT_TAG_COMPILER
7958
7959 # save warnings/boilerplate of simple test code
7960 _LT_COMPILER_BOILERPLATE
7961 _LT_LINKER_BOILERPLATE
7962
7963 # Allow CC to be a program name with arguments.
7964 lt_save_CC=$CC
7965 lt_save_CFLAGS=$CFLAGS
7966 lt_save_GCC=$GCC
7967 GCC=yes
7968 CC=${GCJ-"gcj"}
7969 CFLAGS=$GCJFLAGS
7970 compiler=$CC
7971 _LT_TAGVAR(compiler, $1)=$CC
7972 _LT_TAGVAR(LD, $1)=$LD
7973 _LT_CC_BASENAME([$compiler])
7974
7975 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7976 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7977
7978 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7979 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7980 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7981
7982 if test -n "$compiler"; then
7983 _LT_COMPILER_NO_RTTI($1)
7984 _LT_COMPILER_PIC($1)
7985 _LT_COMPILER_C_O($1)
7986 _LT_COMPILER_FILE_LOCKS($1)
7987 _LT_LINKER_SHLIBS($1)
7988 _LT_LINKER_HARDCODE_LIBPATH($1)
7989
7990 _LT_CONFIG($1)
7991 fi
7992
7993 AC_LANG_RESTORE
7994
7995 GCC=$lt_save_GCC
7996 CC=$lt_save_CC
7997 CFLAGS=$lt_save_CFLAGS
7998 ])# _LT_LANG_GCJ_CONFIG
7999
8000
8001 # _LT_LANG_GO_CONFIG([TAG])
8002 # --------------------------
8003 # Ensure that the configuration variables for the GNU Go compiler
8004 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8005 # to write the compiler configuration to 'libtool'.
8006 m4_defun([_LT_LANG_GO_CONFIG],
8007 [AC_REQUIRE([LT_PROG_GO])dnl
8008 AC_LANG_SAVE
8009
8010 # Source file extension for Go test sources.
8011 ac_ext=go
8012
8013 # Object file extension for compiled Go test sources.
8014 objext=o
8015 _LT_TAGVAR(objext, $1)=$objext
8016
8017 # Code to be used in simple compile tests
8018 lt_simple_compile_test_code="package main; func main() { }"
8019
8020 # Code to be used in simple link tests
8021 lt_simple_link_test_code='package main; func main() { }'
8022
8023 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8024 _LT_TAG_COMPILER
8025
8026 # save warnings/boilerplate of simple test code
8027 _LT_COMPILER_BOILERPLATE
8028 _LT_LINKER_BOILERPLATE
8029
8030 # Allow CC to be a program name with arguments.
8031 lt_save_CC=$CC
8032 lt_save_CFLAGS=$CFLAGS
8033 lt_save_GCC=$GCC
8034 GCC=yes
8035 CC=${GOC-"gccgo"}
8036 CFLAGS=$GOFLAGS
8037 compiler=$CC
8038 _LT_TAGVAR(compiler, $1)=$CC
8039 _LT_TAGVAR(LD, $1)=$LD
8040 _LT_CC_BASENAME([$compiler])
8041
8042 # Go did not exist at the time GCC didn't implicitly link libc in.
8043 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8044
8045 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8046 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8047 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8048
8049 if test -n "$compiler"; then
8050 _LT_COMPILER_NO_RTTI($1)
8051 _LT_COMPILER_PIC($1)
8052 _LT_COMPILER_C_O($1)
8053 _LT_COMPILER_FILE_LOCKS($1)
8054 _LT_LINKER_SHLIBS($1)
8055 _LT_LINKER_HARDCODE_LIBPATH($1)
8056
8057 _LT_CONFIG($1)
8058 fi
8059
8060 AC_LANG_RESTORE
8061
8062 GCC=$lt_save_GCC
8063 CC=$lt_save_CC
8064 CFLAGS=$lt_save_CFLAGS
8065 ])# _LT_LANG_GO_CONFIG
8066
8067
8068 # _LT_LANG_RC_CONFIG([TAG])
8069 # -------------------------
8070 # Ensure that the configuration variables for the Windows resource compiler
8071 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8072 # to write the compiler configuration to 'libtool'.
8073 m4_defun([_LT_LANG_RC_CONFIG],
8074 [AC_REQUIRE([LT_PROG_RC])dnl
8075 AC_LANG_SAVE
8076
8077 # Source file extension for RC test sources.
8078 ac_ext=rc
8079
8080 # Object file extension for compiled RC test sources.
8081 objext=o
8082 _LT_TAGVAR(objext, $1)=$objext
8083
8084 # Code to be used in simple compile tests
8085 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8086
8087 # Code to be used in simple link tests
8088 lt_simple_link_test_code=$lt_simple_compile_test_code
8089
8090 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8091 _LT_TAG_COMPILER
8092
8093 # save warnings/boilerplate of simple test code
8094 _LT_COMPILER_BOILERPLATE
8095 _LT_LINKER_BOILERPLATE
8096
8097 # Allow CC to be a program name with arguments.
8098 lt_save_CC=$CC
8099 lt_save_CFLAGS=$CFLAGS
8100 lt_save_GCC=$GCC
8101 GCC=
8102 CC=${RC-"windres"}
8103 CFLAGS=
8104 compiler=$CC
8105 _LT_TAGVAR(compiler, $1)=$CC
8106 _LT_CC_BASENAME([$compiler])
8107 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8108
8109 if test -n "$compiler"; then
8110 :
8111 _LT_CONFIG($1)
8112 fi
8113
8114 GCC=$lt_save_GCC
8115 AC_LANG_RESTORE
8116 CC=$lt_save_CC
8117 CFLAGS=$lt_save_CFLAGS
8118 ])# _LT_LANG_RC_CONFIG
8119
8120
8121 # LT_PROG_GCJ
8122 # -----------
8123 AC_DEFUN([LT_PROG_GCJ],
8124 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8125 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8126 [AC_CHECK_TOOL(GCJ, gcj,)
8127 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8128 AC_SUBST(GCJFLAGS)])])[]dnl
8129 ])
8130
8131 # Old name:
8132 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8133 dnl aclocal-1.4 backwards compatibility:
8134 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8135
8136
8137 # LT_PROG_GO
8138 # ----------
8139 AC_DEFUN([LT_PROG_GO],
8140 [AC_CHECK_TOOL(GOC, gccgo,)
8141 ])
8142
8143
8144 # LT_PROG_RC
8145 # ----------
8146 AC_DEFUN([LT_PROG_RC],
8147 [AC_CHECK_TOOL(RC, windres,)
8148 ])
8149
8150 # Old name:
8151 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8152 dnl aclocal-1.4 backwards compatibility:
8153 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8154
8155
8156 # _LT_DECL_EGREP
8157 # --------------
8158 # If we don't have a new enough Autoconf to choose the best grep
8159 # available, choose the one first in the user's PATH.
8160 m4_defun([_LT_DECL_EGREP],
8161 [AC_REQUIRE([AC_PROG_EGREP])dnl
8162 AC_REQUIRE([AC_PROG_FGREP])dnl
8163 test -z "$GREP" && GREP=grep
8164 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8165 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8166 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8167 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8168 AC_SUBST([GREP])
8169 ])
8170
8171
8172 # _LT_DECL_OBJDUMP
8173 # --------------
8174 # If we don't have a new enough Autoconf to choose the best objdump
8175 # available, choose the one first in the user's PATH.
8176 m4_defun([_LT_DECL_OBJDUMP],
8177 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8178 test -z "$OBJDUMP" && OBJDUMP=objdump
8179 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8180 AC_SUBST([OBJDUMP])
8181 ])
8182
8183 # _LT_DECL_DLLTOOL
8184 # ----------------
8185 # Ensure DLLTOOL variable is set.
8186 m4_defun([_LT_DECL_DLLTOOL],
8187 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8188 test -z "$DLLTOOL" && DLLTOOL=dlltool
8189 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8190 AC_SUBST([DLLTOOL])
8191 ])
8192
8193 # _LT_DECL_SED
8194 # ------------
8195 # Check for a fully-functional sed program, that truncates
8196 # as few characters as possible. Prefer GNU sed if found.
8197 m4_defun([_LT_DECL_SED],
8198 [AC_PROG_SED
8199 test -z "$SED" && SED=sed
8200 Xsed="$SED -e 1s/^X//"
8201 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8202 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8203 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8204 ])# _LT_DECL_SED
8205
8206 m4_ifndef([AC_PROG_SED], [
8207 # NOTE: This macro has been submitted for inclusion into #
8208 # GNU Autoconf as AC_PROG_SED. When it is available in #
8209 # a released version of Autoconf we should remove this #
8210 # macro and use it instead. #
8211
8212 m4_defun([AC_PROG_SED],
8213 [AC_MSG_CHECKING([for a sed that does not truncate output])
8214 AC_CACHE_VAL(lt_cv_path_SED,
8215 [# Loop through the user's path and test for sed and gsed.
8216 # Then use that list of sed's as ones to test for truncation.
8217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8218 for as_dir in $PATH
8219 do
8220 IFS=$as_save_IFS
8221 test -z "$as_dir" && as_dir=.
8222 for lt_ac_prog in sed gsed; do
8223 for ac_exec_ext in '' $ac_executable_extensions; do
8224 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8225 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8226 fi
8227 done
8228 done
8229 done
8230 IFS=$as_save_IFS
8231 lt_ac_max=0
8232 lt_ac_count=0
8233 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8234 # along with /bin/sed that truncates output.
8235 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8236 test ! -f "$lt_ac_sed" && continue
8237 cat /dev/null > conftest.in
8238 lt_ac_count=0
8239 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8240 # Check for GNU sed and select it if it is found.
8241 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8242 lt_cv_path_SED=$lt_ac_sed
8243 break
8244 fi
8245 while true; do
8246 cat conftest.in conftest.in >conftest.tmp
8247 mv conftest.tmp conftest.in
8248 cp conftest.in conftest.nl
8249 echo >>conftest.nl
8250 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8251 cmp -s conftest.out conftest.nl || break
8252 # 10000 chars as input seems more than enough
8253 test 10 -lt "$lt_ac_count" && break
8254 lt_ac_count=`expr $lt_ac_count + 1`
8255 if test "$lt_ac_count" -gt "$lt_ac_max"; then
8256 lt_ac_max=$lt_ac_count
8257 lt_cv_path_SED=$lt_ac_sed
8258 fi
8259 done
8260 done
8261 ])
8262 SED=$lt_cv_path_SED
8263 AC_SUBST([SED])
8264 AC_MSG_RESULT([$SED])
8265 ])#AC_PROG_SED
8266 ])#m4_ifndef
8267
8268 # Old name:
8269 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8270 dnl aclocal-1.4 backwards compatibility:
8271 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8272
8273
8274 # _LT_CHECK_SHELL_FEATURES
8275 # ------------------------
8276 # Find out whether the shell is Bourne or XSI compatible,
8277 # or has some other useful features.
8278 m4_defun([_LT_CHECK_SHELL_FEATURES],
8279 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8280 lt_unset=unset
8281 else
8282 lt_unset=false
8283 fi
8284 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8285
8286 # test EBCDIC or ASCII
8287 case `echo X|tr X '\101'` in
8288 A) # ASCII based system
8289 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8290 lt_SP2NL='tr \040 \012'
8291 lt_NL2SP='tr \015\012 \040\040'
8292 ;;
8293 *) # EBCDIC based system
8294 lt_SP2NL='tr \100 \n'
8295 lt_NL2SP='tr \r\n \100\100'
8296 ;;
8297 esac
8298 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8299 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8300 ])# _LT_CHECK_SHELL_FEATURES
8301
8302
8303 # _LT_PATH_CONVERSION_FUNCTIONS
8304 # -----------------------------
8305 # Determine what file name conversion functions should be used by
8306 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8307 # for certain cross-compile configurations and native mingw.
8308 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8309 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8310 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8311 AC_MSG_CHECKING([how to convert $build file names to $host format])
8312 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8313 [case $host in
8314 *-*-mingw* )
8315 case $build in
8316 *-*-mingw* ) # actually msys
8317 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8318 ;;
8319 *-*-cygwin* )
8320 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8321 ;;
8322 * ) # otherwise, assume *nix
8323 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8324 ;;
8325 esac
8326 ;;
8327 *-*-cygwin* )
8328 case $build in
8329 *-*-mingw* ) # actually msys
8330 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8331 ;;
8332 *-*-cygwin* )
8333 lt_cv_to_host_file_cmd=func_convert_file_noop
8334 ;;
8335 * ) # otherwise, assume *nix
8336 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8337 ;;
8338 esac
8339 ;;
8340 * ) # unhandled hosts (and "normal" native builds)
8341 lt_cv_to_host_file_cmd=func_convert_file_noop
8342 ;;
8343 esac
8344 ])
8345 to_host_file_cmd=$lt_cv_to_host_file_cmd
8346 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8347 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8348 [0], [convert $build file names to $host format])dnl
8349
8350 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8351 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8352 [#assume ordinary cross tools, or native build.
8353 lt_cv_to_tool_file_cmd=func_convert_file_noop
8354 case $host in
8355 *-*-mingw* )
8356 case $build in
8357 *-*-mingw* ) # actually msys
8358 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8359 ;;
8360 esac
8361 ;;
8362 esac
8363 ])
8364 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8365 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8366 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8367 [0], [convert $build files to toolchain format])dnl
8368 ])# _LT_PATH_CONVERSION_FUNCTIONS
8369
8370 # Helper functions for option handling. -*- Autoconf -*-
8371 #
8372 # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
8373 # Foundation, Inc.
8374 # Written by Gary V. Vaughan, 2004
8375 #
8376 # This file is free software; the Free Software Foundation gives
8377 # unlimited permission to copy and/or distribute it, with or without
8378 # modifications, as long as this notice is preserved.
8379
8380 # serial 8 ltoptions.m4
8381
8382 # This is to help aclocal find these macros, as it can't see m4_define.
8383 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8384
8385
8386 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8387 # ------------------------------------------
8388 m4_define([_LT_MANGLE_OPTION],
8389 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8390
8391
8392 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8393 # ---------------------------------------
8394 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8395 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
8396 # saved as a flag.
8397 m4_define([_LT_SET_OPTION],
8398 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8399 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8400 _LT_MANGLE_DEFUN([$1], [$2]),
8401 [m4_warning([Unknown $1 option '$2'])])[]dnl
8402 ])
8403
8404
8405 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8406 # ------------------------------------------------------------
8407 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8408 m4_define([_LT_IF_OPTION],
8409 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8410
8411
8412 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8413 # -------------------------------------------------------
8414 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8415 # are set.
8416 m4_define([_LT_UNLESS_OPTIONS],
8417 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8418 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8419 [m4_define([$0_found])])])[]dnl
8420 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8421 ])[]dnl
8422 ])
8423
8424
8425 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8426 # ----------------------------------------
8427 # OPTION-LIST is a space-separated list of Libtool options associated
8428 # with MACRO-NAME. If any OPTION has a matching handler declared with
8429 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8430 # the unknown option and exit.
8431 m4_defun([_LT_SET_OPTIONS],
8432 [# Set options
8433 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8434 [_LT_SET_OPTION([$1], _LT_Option)])
8435
8436 m4_if([$1],[LT_INIT],[
8437 dnl
8438 dnl Simply set some default values (i.e off) if boolean options were not
8439 dnl specified:
8440 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8441 ])
8442 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8443 ])
8444 dnl
8445 dnl If no reference was made to various pairs of opposing options, then
8446 dnl we run the default mode handler for the pair. For example, if neither
8447 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
8448 dnl archives by default:
8449 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8450 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8451 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8452 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8453 [_LT_ENABLE_FAST_INSTALL])
8454 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
8455 [_LT_WITH_AIX_SONAME([aix])])
8456 ])
8457 ])# _LT_SET_OPTIONS
8458
8459
8460
8461 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8462 # -----------------------------------------
8463 m4_define([_LT_MANGLE_DEFUN],
8464 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8465
8466
8467 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8468 # -----------------------------------------------
8469 m4_define([LT_OPTION_DEFINE],
8470 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8471 ])# LT_OPTION_DEFINE
8472
8473
8474 # dlopen
8475 # ------
8476 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8477 ])
8478
8479 AU_DEFUN([AC_LIBTOOL_DLOPEN],
8480 [_LT_SET_OPTION([LT_INIT], [dlopen])
8481 AC_DIAGNOSE([obsolete],
8482 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8483 put the 'dlopen' option into LT_INIT's first parameter.])
8484 ])
8485
8486 dnl aclocal-1.4 backwards compatibility:
8487 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8488
8489
8490 # win32-dll
8491 # ---------
8492 # Declare package support for building win32 dll's.
8493 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8494 [enable_win32_dll=yes
8495
8496 case $host in
8497 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8498 AC_CHECK_TOOL(AS, as, false)
8499 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8500 AC_CHECK_TOOL(OBJDUMP, objdump, false)
8501 ;;
8502 esac
8503
8504 test -z "$AS" && AS=as
8505 _LT_DECL([], [AS], [1], [Assembler program])dnl
8506
8507 test -z "$DLLTOOL" && DLLTOOL=dlltool
8508 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8509
8510 test -z "$OBJDUMP" && OBJDUMP=objdump
8511 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8512 ])# win32-dll
8513
8514 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8515 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8516 _LT_SET_OPTION([LT_INIT], [win32-dll])
8517 AC_DIAGNOSE([obsolete],
8518 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8519 put the 'win32-dll' option into LT_INIT's first parameter.])
8520 ])
8521
8522 dnl aclocal-1.4 backwards compatibility:
8523 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8524
8525
8526 # _LT_ENABLE_SHARED([DEFAULT])
8527 # ----------------------------
8528 # implement the --enable-shared flag, and supports the 'shared' and
8529 # 'disable-shared' LT_INIT options.
8530 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
8531 m4_define([_LT_ENABLE_SHARED],
8532 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8533 AC_ARG_ENABLE([shared],
8534 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8535 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8536 [p=${PACKAGE-default}
8537 case $enableval in
8538 yes) enable_shared=yes ;;
8539 no) enable_shared=no ;;
8540 *)
8541 enable_shared=no
8542 # Look at the argument we got. We use all the common list separators.
8543 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8544 for pkg in $enableval; do
8545 IFS=$lt_save_ifs
8546 if test "X$pkg" = "X$p"; then
8547 enable_shared=yes
8548 fi
8549 done
8550 IFS=$lt_save_ifs
8551 ;;
8552 esac],
8553 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8554
8555 _LT_DECL([build_libtool_libs], [enable_shared], [0],
8556 [Whether or not to build shared libraries])
8557 ])# _LT_ENABLE_SHARED
8558
8559 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8560 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8561
8562 # Old names:
8563 AC_DEFUN([AC_ENABLE_SHARED],
8564 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8565 ])
8566
8567 AC_DEFUN([AC_DISABLE_SHARED],
8568 [_LT_SET_OPTION([LT_INIT], [disable-shared])
8569 ])
8570
8571 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8572 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8573
8574 dnl aclocal-1.4 backwards compatibility:
8575 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8576 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8577
8578
8579
8580 # _LT_ENABLE_STATIC([DEFAULT])
8581 # ----------------------------
8582 # implement the --enable-static flag, and support the 'static' and
8583 # 'disable-static' LT_INIT options.
8584 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
8585 m4_define([_LT_ENABLE_STATIC],
8586 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8587 AC_ARG_ENABLE([static],
8588 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8589 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8590 [p=${PACKAGE-default}
8591 case $enableval in
8592 yes) enable_static=yes ;;
8593 no) enable_static=no ;;
8594 *)
8595 enable_static=no
8596 # Look at the argument we got. We use all the common list separators.
8597 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8598 for pkg in $enableval; do
8599 IFS=$lt_save_ifs
8600 if test "X$pkg" = "X$p"; then
8601 enable_static=yes
8602 fi
8603 done
8604 IFS=$lt_save_ifs
8605 ;;
8606 esac],
8607 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8608
8609 _LT_DECL([build_old_libs], [enable_static], [0],
8610 [Whether or not to build static libraries])
8611 ])# _LT_ENABLE_STATIC
8612
8613 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8614 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8615
8616 # Old names:
8617 AC_DEFUN([AC_ENABLE_STATIC],
8618 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8619 ])
8620
8621 AC_DEFUN([AC_DISABLE_STATIC],
8622 [_LT_SET_OPTION([LT_INIT], [disable-static])
8623 ])
8624
8625 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8626 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8627
8628 dnl aclocal-1.4 backwards compatibility:
8629 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8630 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8631
8632
8633
8634 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
8635 # ----------------------------------
8636 # implement the --enable-fast-install flag, and support the 'fast-install'
8637 # and 'disable-fast-install' LT_INIT options.
8638 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
8639 m4_define([_LT_ENABLE_FAST_INSTALL],
8640 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8641 AC_ARG_ENABLE([fast-install],
8642 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8643 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8644 [p=${PACKAGE-default}
8645 case $enableval in
8646 yes) enable_fast_install=yes ;;
8647 no) enable_fast_install=no ;;
8648 *)
8649 enable_fast_install=no
8650 # Look at the argument we got. We use all the common list separators.
8651 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8652 for pkg in $enableval; do
8653 IFS=$lt_save_ifs
8654 if test "X$pkg" = "X$p"; then
8655 enable_fast_install=yes
8656 fi
8657 done
8658 IFS=$lt_save_ifs
8659 ;;
8660 esac],
8661 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8662
8663 _LT_DECL([fast_install], [enable_fast_install], [0],
8664 [Whether or not to optimize for fast installation])dnl
8665 ])# _LT_ENABLE_FAST_INSTALL
8666
8667 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8668 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8669
8670 # Old names:
8671 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8672 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8673 AC_DIAGNOSE([obsolete],
8674 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8675 the 'fast-install' option into LT_INIT's first parameter.])
8676 ])
8677
8678 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8679 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8680 AC_DIAGNOSE([obsolete],
8681 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8682 the 'disable-fast-install' option into LT_INIT's first parameter.])
8683 ])
8684
8685 dnl aclocal-1.4 backwards compatibility:
8686 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8687 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8688
8689
8690 # _LT_WITH_AIX_SONAME([DEFAULT])
8691 # ----------------------------------
8692 # implement the --with-aix-soname flag, and support the `aix-soname=aix'
8693 # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
8694 # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
8695 m4_define([_LT_WITH_AIX_SONAME],
8696 [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
8697 shared_archive_member_spec=
8698 case $host,$enable_shared in
8699 power*-*-aix[[5-9]]*,yes)
8700 AC_MSG_CHECKING([which variant of shared library versioning to provide])
8701 AC_ARG_WITH([aix-soname],
8702 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
8703 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
8704 [case $withval in
8705 aix|svr4|both)
8706 ;;
8707 *)
8708 AC_MSG_ERROR([Unknown argument to --with-aix-soname])
8709 ;;
8710 esac
8711 lt_cv_with_aix_soname=$with_aix_soname],
8712 [AC_CACHE_VAL([lt_cv_with_aix_soname],
8713 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
8714 with_aix_soname=$lt_cv_with_aix_soname])
8715 AC_MSG_RESULT([$with_aix_soname])
8716 if test aix != "$with_aix_soname"; then
8717 # For the AIX way of multilib, we name the shared archive member
8718 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
8719 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
8720 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
8721 # the AIX toolchain works better with OBJECT_MODE set (default 32).
8722 if test 64 = "${OBJECT_MODE-32}"; then
8723 shared_archive_member_spec=shr_64
8724 else
8725 shared_archive_member_spec=shr
8726 fi
8727 fi
8728 ;;
8729 *)
8730 with_aix_soname=aix
8731 ;;
8732 esac
8733
8734 _LT_DECL([], [shared_archive_member_spec], [0],
8735 [Shared archive member basename, for filename based shared library versioning on AIX])dnl
8736 ])# _LT_WITH_AIX_SONAME
8737
8738 LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
8739 LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
8740 LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
8741
8742
8743 # _LT_WITH_PIC([MODE])
8744 # --------------------
8745 # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
8746 # LT_INIT options.
8747 # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
8748 m4_define([_LT_WITH_PIC],
8749 [AC_ARG_WITH([pic],
8750 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
8751 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8752 [lt_p=${PACKAGE-default}
8753 case $withval in
8754 yes|no) pic_mode=$withval ;;
8755 *)
8756 pic_mode=default
8757 # Look at the argument we got. We use all the common list separators.
8758 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8759 for lt_pkg in $withval; do
8760 IFS=$lt_save_ifs
8761 if test "X$lt_pkg" = "X$lt_p"; then
8762 pic_mode=yes
8763 fi
8764 done
8765 IFS=$lt_save_ifs
8766 ;;
8767 esac],
8768 [pic_mode=m4_default([$1], [default])])
8769
8770 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8771 ])# _LT_WITH_PIC
8772
8773 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8774 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8775
8776 # Old name:
8777 AU_DEFUN([AC_LIBTOOL_PICMODE],
8778 [_LT_SET_OPTION([LT_INIT], [pic-only])
8779 AC_DIAGNOSE([obsolete],
8780 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8781 put the 'pic-only' option into LT_INIT's first parameter.])
8782 ])
8783
8784 dnl aclocal-1.4 backwards compatibility:
8785 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8786
8787
8788 m4_define([_LTDL_MODE], [])
8789 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8790 [m4_define([_LTDL_MODE], [nonrecursive])])
8791 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8792 [m4_define([_LTDL_MODE], [recursive])])
8793 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8794 [m4_define([_LTDL_MODE], [subproject])])
8795
8796 m4_define([_LTDL_TYPE], [])
8797 LT_OPTION_DEFINE([LTDL_INIT], [installable],
8798 [m4_define([_LTDL_TYPE], [installable])])
8799 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8800 [m4_define([_LTDL_TYPE], [convenience])])
8801
8802 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
8803 #
8804 # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
8805 # Foundation, Inc.
8806 # Written by Gary V. Vaughan, 2004
8807 #
8808 # This file is free software; the Free Software Foundation gives
8809 # unlimited permission to copy and/or distribute it, with or without
8810 # modifications, as long as this notice is preserved.
8811
8812 # serial 6 ltsugar.m4
8813
8814 # This is to help aclocal find these macros, as it can't see m4_define.
8815 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8816
8817
8818 # lt_join(SEP, ARG1, [ARG2...])
8819 # -----------------------------
8820 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8821 # associated separator.
8822 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8823 # versions in m4sugar had bugs.
8824 m4_define([lt_join],
8825 [m4_if([$#], [1], [],
8826 [$#], [2], [[$2]],
8827 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8828 m4_define([_lt_join],
8829 [m4_if([$#$2], [2], [],
8830 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8831
8832
8833 # lt_car(LIST)
8834 # lt_cdr(LIST)
8835 # ------------
8836 # Manipulate m4 lists.
8837 # These macros are necessary as long as will still need to support
8838 # Autoconf-2.59, which quotes differently.
8839 m4_define([lt_car], [[$1]])
8840 m4_define([lt_cdr],
8841 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8842 [$#], 1, [],
8843 [m4_dquote(m4_shift($@))])])
8844 m4_define([lt_unquote], $1)
8845
8846
8847 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
8848 # ------------------------------------------
8849 # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
8850 # Note that neither SEPARATOR nor STRING are expanded; they are appended
8851 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8852 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
8853 # than defined and empty).
8854 #
8855 # This macro is needed until we can rely on Autoconf 2.62, since earlier
8856 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8857 m4_define([lt_append],
8858 [m4_define([$1],
8859 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8860
8861
8862
8863 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8864 # ----------------------------------------------------------
8865 # Produce a SEP delimited list of all paired combinations of elements of
8866 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
8867 # has the form PREFIXmINFIXSUFFIXn.
8868 # Needed until we can rely on m4_combine added in Autoconf 2.62.
8869 m4_define([lt_combine],
8870 [m4_if(m4_eval([$# > 3]), [1],
8871 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8872 [[m4_foreach([_Lt_prefix], [$2],
8873 [m4_foreach([_Lt_suffix],
8874 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8875 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8876
8877
8878 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8879 # -----------------------------------------------------------------------
8880 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8881 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8882 m4_define([lt_if_append_uniq],
8883 [m4_ifdef([$1],
8884 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8885 [lt_append([$1], [$2], [$3])$4],
8886 [$5])],
8887 [lt_append([$1], [$2], [$3])$4])])
8888
8889
8890 # lt_dict_add(DICT, KEY, VALUE)
8891 # -----------------------------
8892 m4_define([lt_dict_add],
8893 [m4_define([$1($2)], [$3])])
8894
8895
8896 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8897 # --------------------------------------------
8898 m4_define([lt_dict_add_subkey],
8899 [m4_define([$1($2:$3)], [$4])])
8900
8901
8902 # lt_dict_fetch(DICT, KEY, [SUBKEY])
8903 # ----------------------------------
8904 m4_define([lt_dict_fetch],
8905 [m4_ifval([$3],
8906 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8907 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8908
8909
8910 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8911 # -----------------------------------------------------------------
8912 m4_define([lt_if_dict_fetch],
8913 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8914 [$5],
8915 [$6])])
8916
8917
8918 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8919 # --------------------------------------------------------------
8920 m4_define([lt_dict_filter],
8921 [m4_if([$5], [], [],
8922 [lt_join(m4_quote(m4_default([$4], [[, ]])),
8923 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8924 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8925 ])
8926
8927 # ltversion.m4 -- version numbers -*- Autoconf -*-
8928 #
8929 # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
8930 # Written by Scott James Remnant, 2004
8931 #
8932 # This file is free software; the Free Software Foundation gives
8933 # unlimited permission to copy and/or distribute it, with or without
8934 # modifications, as long as this notice is preserved.
8935
8936 # @configure_input@
8937
8938 # serial 4179 ltversion.m4
8939 # This file is part of GNU Libtool
8940
8941 m4_define([LT_PACKAGE_VERSION], [2.4.6])
8942 m4_define([LT_PACKAGE_REVISION], [2.4.6])
8943
8944 AC_DEFUN([LTVERSION_VERSION],
8945 [macro_version='2.4.6'
8946 macro_revision='2.4.6'
8947 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8948 _LT_DECL(, macro_revision, 0)
8949 ])
8950
8951 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
8952 #
8953 # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
8954 # Foundation, Inc.
8955 # Written by Scott James Remnant, 2004.
8956 #
8957 # This file is free software; the Free Software Foundation gives
8958 # unlimited permission to copy and/or distribute it, with or without
8959 # modifications, as long as this notice is preserved.
8960
8961 # serial 5 lt~obsolete.m4
8962
8963 # These exist entirely to fool aclocal when bootstrapping libtool.
8964 #
8965 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
8966 # which have later been changed to m4_define as they aren't part of the
8967 # exported API, or moved to Autoconf or Automake where they belong.
8968 #
8969 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
8970 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8971 # using a macro with the same name in our local m4/libtool.m4 it'll
8972 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8973 # and doesn't know about Autoconf macros at all.)
8974 #
8975 # So we provide this file, which has a silly filename so it's always
8976 # included after everything else. This provides aclocal with the
8977 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8978 # because those macros already exist, or will be overwritten later.
8979 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8980 #
8981 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8982 # Yes, that means every name once taken will need to remain here until
8983 # we give up compatibility with versions before 1.7, at which point
8984 # we need to keep only those names which we still refer to.
8985
8986 # This is to help aclocal find these macros, as it can't see m4_define.
8987 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8988
8989 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8990 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
8991 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8992 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
8993 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8994 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
8995 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
8996 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8997 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
8998 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8999 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9000 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9001 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9002 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9003 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9004 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9005 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9006 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9007 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9008 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9009 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9010 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9011 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9012 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9013 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9014 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9015 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9016 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9017 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9018 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9019 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9020 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9021 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9022 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9023 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9024 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9025 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9026 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9027 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9028 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9029 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9030 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9031 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9032 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9033 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9034 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9035 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9036 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9037 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9038 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9039 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9040 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9041 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9042 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9043 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9044 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9045 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9046 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9047 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9048 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9049 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9050
9051 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
22 # Copyright (C) 2002-2017 Free Software Foundation, Inc.
905223 #
905324 # This file is free software; the Free Software Foundation
905425 # gives unlimited permission to copy and/or distribute it,
906334 [am__api_version='1.15'
906435 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
906536 dnl require some minimum version. Point them to the right macro.
9066 m4_if([$1], [1.15], [],
37 m4_if([$1], [1.15.1], [],
906738 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
906839 ])
906940
907950 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
908051 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
908152 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9082 [AM_AUTOMAKE_VERSION([1.15])dnl
53 [AM_AUTOMAKE_VERSION([1.15.1])dnl
908354 m4_ifndef([AC_AUTOCONF_VERSION],
908455 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
908556 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
908657
908758 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
908859
9089 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
60 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
909061 #
909162 # This file is free software; the Free Software Foundation
909263 # gives unlimited permission to copy and/or distribute it,
9138109
9139110 # AM_CONDITIONAL -*- Autoconf -*-
9140111
9141 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
112 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
9142113 #
9143114 # This file is free software; the Free Software Foundation
9144115 # gives unlimited permission to copy and/or distribute it,
9169140 Usually this means the macro was only invoked conditionally.]])
9170141 fi])])
9171142
9172 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
143 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
9173144 #
9174145 # This file is free software; the Free Software Foundation
9175146 # gives unlimited permission to copy and/or distribute it,
9360331
9361332 # Generate code to set up dependency tracking. -*- Autoconf -*-
9362333
9363 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
334 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
9364335 #
9365336 # This file is free software; the Free Software Foundation
9366337 # gives unlimited permission to copy and/or distribute it,
9436407
9437408 # Do all the work for Automake. -*- Autoconf -*-
9438409
9439 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
410 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
9440411 #
9441412 # This file is free software; the Free Software Foundation
9442413 # gives unlimited permission to copy and/or distribute it,
9633604 done
9634605 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9635606
9636 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
607 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
9637608 #
9638609 # This file is free software; the Free Software Foundation
9639610 # gives unlimited permission to copy and/or distribute it,
9654625 fi
9655626 AC_SUBST([install_sh])])
9656627
9657 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
628 # Copyright (C) 2003-2017 Free Software Foundation, Inc.
9658629 #
9659630 # This file is free software; the Free Software Foundation
9660631 # gives unlimited permission to copy and/or distribute it,
9675646
9676647 # Check to see how 'make' treats includes. -*- Autoconf -*-
9677648
9678 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
649 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
9679650 #
9680651 # This file is free software; the Free Software Foundation
9681652 # gives unlimited permission to copy and/or distribute it,
9725696
9726697 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
9727698
9728 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
699 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
9729700 #
9730701 # This file is free software; the Free Software Foundation
9731702 # gives unlimited permission to copy and/or distribute it,
9764735
9765736 # Helper functions for option handling. -*- Autoconf -*-
9766737
9767 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
738 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
9768739 #
9769740 # This file is free software; the Free Software Foundation
9770741 # gives unlimited permission to copy and/or distribute it,
9793764 AC_DEFUN([_AM_IF_OPTION],
9794765 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9795766
9796 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
767 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
9797768 #
9798769 # This file is free software; the Free Software Foundation
9799770 # gives unlimited permission to copy and/or distribute it,
9840811 # For backward compatibility.
9841812 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
9842813
9843 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
814 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
9844815 #
9845816 # This file is free software; the Free Software Foundation
9846817 # gives unlimited permission to copy and/or distribute it,
9859830
9860831 # Check to make sure that the build environment is sane. -*- Autoconf -*-
9861832
9862 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
833 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
9863834 #
9864835 # This file is free software; the Free Software Foundation
9865836 # gives unlimited permission to copy and/or distribute it,
9940911 rm -f conftest.file
9941912 ])
9942913
9943 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
914 # Copyright (C) 2009-2017 Free Software Foundation, Inc.
9944915 #
9945916 # This file is free software; the Free Software Foundation
9946917 # gives unlimited permission to copy and/or distribute it,
10000971 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10001972 ])
10002973
10003 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
974 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
10004975 #
10005976 # This file is free software; the Free Software Foundation
10006977 # gives unlimited permission to copy and/or distribute it,
10028999 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
100291000 AC_SUBST([INSTALL_STRIP_PROGRAM])])
100301001
10031 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
1002 # Copyright (C) 2006-2017 Free Software Foundation, Inc.
100321003 #
100331004 # This file is free software; the Free Software Foundation
100341005 # gives unlimited permission to copy and/or distribute it,
100471018
100481019 # Check how to create a tarball. -*- Autoconf -*-
100491020
10050 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
1021 # Copyright (C) 2004-2017 Free Software Foundation, Inc.
100511022 #
100521023 # This file is free software; the Free Software Foundation
100531024 # gives unlimited permission to copy and/or distribute it,
101791150 ]) # _AM_PROG_TAR
101801151
101811152 m4_include([m4/ax_check_compile_flag.m4])
1153 m4_include([m4/libtool.m4])
1154 m4_include([m4/ltoptions.m4])
1155 m4_include([m4/ltsugar.m4])
1156 m4_include([m4/ltversion.m4])
1157 m4_include([m4/lt~obsolete.m4])
11 * main.c
22 * main() routine, printer functions
33 *
4 * Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
4 * Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019
55 * pkgconf authors (see AUTHORS).
66 *
77 * Permission to use, copy, modify, and/or distribute this software for any
1313 * from the use of this software.
1414 */
1515
16 #include "libpkgconf/config.h"
1617 #include <libpkgconf/stdinc.h>
1718 #include <libpkgconf/libpkgconf.h>
18 #include "libpkgconf/config.h"
1919 #include "getopt_long.h"
20 #ifndef PKGCONF_LITE
2021 #include "renderer-msvc.h"
22 #endif
2123 #ifdef _WIN32
2224 #include <io.h> /* for _setmode() */
2325 #include <fcntl.h>
245247 return true;
246248 }
247249
250 #ifndef PKGCONF_LITE
248251 static void
249252 print_digraph_node(pkgconf_client_t *client, pkgconf_pkg_t *pkg, void *unused)
250253 {
279282 printf("}\n");
280283 return true;
281284 }
285 #endif
282286
283287 static bool
284288 apply_modversion(pkgconf_client_t *client, pkgconf_pkg_t *world, void *unused, int maxdepth)
541545 return true;
542546 }
543547
548 #ifndef PKGCONF_LITE
544549 static void
545550 print_graph_node(pkgconf_client_t *client, pkgconf_pkg_t *pkg, void *data)
546551 {
584589
585590 return true;
586591 }
592 #endif
587593
588594 static void
589595 version(void)
595601 about(void)
596602 {
597603 printf("%s %s\n", PACKAGE_NAME, PACKAGE_VERSION);
598 printf("Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018\n");
604 printf("Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019\n");
599605 printf(" pkgconf authors (see AUTHORS in documentation directory).\n\n");
600606 printf("Permission to use, copy, modify, and/or distribute this software for any\n");
601607 printf("purpose with or without fee is hereby granted, provided that the above\n");
624630 printf(" --silence-errors explicitly be silent about errors\n");
625631 printf(" --list-all list all known packages\n");
626632 printf(" --list-package-names list all known package names\n");
633 #ifndef PKGCONF_LITE
627634 printf(" --simulate simulate walking the calculated dependency graph\n");
635 #endif
628636 printf(" --no-cache do not cache already seen packages when\n");
629637 printf(" walking the dependency graph\n");
630638 printf(" --log-file=filename write an audit log to a specified file\n");
637645 printf(" --relocate=path relocates a path and exits (mostly for testsuite)\n");
638646 printf(" --dont-relocate-paths disables path relocation support\n");
639647
648 #ifndef PKGCONF_LITE
640649 printf("\ncross-compilation personality support:\n\n");
641650 printf(" --personality=triplet|filename sets the personality to 'triplet' or a file named 'filename'\n");
642651 printf(" --dump-personality dumps details concerning selected personality\n");
652 #endif
643653
644654 printf("\nchecking specific pkg-config database entries:\n\n");
645655
675685 printf(" linking to stdout\n");
676686 printf(" --print-provides print provided dependencies to stdout\n");
677687 printf(" --print-variables print all known variables in module to stdout\n");
688 #ifndef PKGCONF_LITE
678689 printf(" --digraph print entire dependency graph in graphviz 'dot' format\n");
690 #endif
679691 printf(" --keep-system-cflags keep -I%s entries in cflags output\n", SYSTEM_INCLUDEDIR);
680692 printf(" --keep-system-libs keep -L%s entries in libs output\n", SYSTEM_LIBDIR);
681693 printf(" --path show the exact filenames for any matching .pc files\n");
683695 printf(" --internal-cflags do not filter 'internal' cflags from output\n");
684696
685697 printf("\nfiltering output:\n\n");
698 #ifndef PKGCONF_LITE
686699 printf(" --msvc-syntax print translatable fragments in MSVC syntax\n");
700 #endif
687701 printf(" --fragment-filter=types filter output fragments to the specified types\n");
688702
689703 printf("\nreport bugs to <%s>.\n", PACKAGE_BUGREPORT);
700714 printf("%s\n", buf);
701715 }
702716
717 #ifndef PKGCONF_LITE
703718 static void
704719 dump_personality(const pkgconf_cross_personality_t *p)
705720 {
739754 static pkgconf_cross_personality_t *
740755 deduce_personality(char *argv[])
741756 {
742 char *workbuf = strdup(argv[0]), *i;
743 pkgconf_cross_personality_t *out = pkgconf_cross_personality_default(), *deduced;
744
745 i = strstr(workbuf, "-pkg");
757 const char *argv0 = argv[0];
758 char *i, *prefix;
759 pkgconf_cross_personality_t *out;
760
761 i = strrchr(argv0, '/');
762 if (i != NULL)
763 argv0 = i + 1;
764
765 #if defined(_WIN32) || defined(_WIN64)
766 i = strrchr(argv0, '\\');
767 if (i != NULL)
768 argv0 = i + 1;
769 #endif
770
771 i = strstr(argv0, "-pkg");
746772 if (i == NULL)
747 goto finish;
748
749 *i = 0;
750
751 deduced = pkgconf_cross_personality_find(workbuf);
752 if (deduced != NULL)
753 out = deduced;
754
755 finish:
756 free(workbuf);
773 return pkgconf_cross_personality_default();
774
775 prefix = pkgconf_strndup(argv0, i - argv0);
776 out = pkgconf_cross_personality_find(prefix);
777 free(prefix);
778 if (out == NULL)
779 return pkgconf_cross_personality_default();
780
757781 return out;
758782 }
783 #endif
759784
760785 int
761786 main(int argc, char *argv[])
804829 { "pure", no_argument, &want_flags, PKG_PURE, },
805830 { "print-requires", no_argument, &want_flags, PKG_REQUIRES, },
806831 { "print-variables", no_argument, &want_flags, PKG_VARIABLES|PKG_PRINT_ERRORS, },
832 #ifndef PKGCONF_LITE
807833 { "digraph", no_argument, &want_flags, PKG_DIGRAPH, },
834 #endif
808835 { "help", no_argument, &want_flags, PKG_HELP, },
809836 { "env-only", no_argument, &want_flags, PKG_ENV_ONLY, },
810837 { "print-requires-private", no_argument, &want_flags, PKG_REQUIRES_PRIVATE, },
825852 { "silence-errors", no_argument, &want_flags, PKG_SILENCE_ERRORS, },
826853 { "list-all", no_argument, &want_flags, PKG_LIST|PKG_PRINT_ERRORS, },
827854 { "list-package-names", no_argument, &want_flags, PKG_LIST_PACKAGE_NAMES|PKG_PRINT_ERRORS, },
855 #ifndef PKGCONF_LITE
828856 { "simulate", no_argument, &want_flags, PKG_SIMULATE, },
857 #endif
829858 { "no-cache", no_argument, &want_flags, PKG_NO_CACHE, },
830859 { "print-provides", no_argument, &want_flags, PKG_PROVIDES, },
831860 { "no-provides", no_argument, &want_flags, PKG_NO_PROVIDES, },
840869 { "dont-define-prefix", no_argument, &want_flags, PKG_DONT_DEFINE_PREFIX },
841870 { "dont-relocate-paths", no_argument, &want_flags, PKG_DONT_RELOCATE_PATHS },
842871 { "env", required_argument, NULL, 48 },
872 #ifndef PKGCONF_LITE
843873 { "msvc-syntax", no_argument, &want_flags, PKG_MSVC_SYNTAX },
874 #endif
844875 { "fragment-filter", required_argument, NULL, 50 },
845876 { "internal-cflags", no_argument, &want_flags, PKG_INTERNAL_CFLAGS },
877 #ifndef PKGCONF_LITE
846878 { "dump-personality", no_argument, &want_flags, PKG_DUMP_PERSONALITY },
847879 { "personality", required_argument, NULL, 53 },
880 #endif
848881 { NULL, 0, NULL, 0 }
849882 };
850883
884 #ifndef PKGCONF_LITE
851885 if (getenv("PKG_CONFIG_EARLY_TRACE"))
852886 {
853887 error_msgout = stderr;
854888 pkgconf_client_set_trace_handler(&pkg_client, error_handler, NULL);
855889 }
856
890 #endif
891
892 #ifndef PKGCONF_LITE
857893 personality = deduce_personality(argv);
894 #else
895 personality = pkgconf_cross_personality_default();
896 #endif
858897
859898 while ((ret = pkg_getopt_long_only(argc, argv, "", options, NULL)) != -1)
860899 {
899938 case 50:
900939 want_fragment_filter = pkg_optarg;
901940 break;
941 #ifndef PKGCONF_LITE
902942 case 53:
903943 personality = pkgconf_cross_personality_find(pkg_optarg);
904944 break;
945 #endif
905946 case '?':
906947 case ':':
907948 return EXIT_FAILURE;
914955 pkgconf_path_copy_list(&personality->dir_list, &dir_list);
915956 pkgconf_path_free(&dir_list);
916957
958 #ifndef PKGCONF_LITE
917959 if ((want_flags & PKG_DUMP_PERSONALITY) == PKG_DUMP_PERSONALITY)
918960 {
919961 dump_personality(personality);
920962 return EXIT_SUCCESS;
921963 }
964 #endif
922965
923966 /* now, bring up the client. settings are preserved since the client is prealloced */
924967 pkgconf_client_init(&pkg_client, error_handler, NULL, personality);
925968
969 #ifndef PKGCONF_LITE
926970 if ((want_flags & PKG_MSVC_SYNTAX) == PKG_MSVC_SYNTAX)
927971 want_render_ops = msvc_renderer_get();
972 #endif
928973
929974 if ((env_traverse_depth = getenv("PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH")) != NULL)
930975 maximum_traverse_depth = atoi(env_traverse_depth);
943988 if ((want_flags & PKG_VALIDATE) == PKG_VALIDATE || (want_flags & PKG_DEBUG) == PKG_DEBUG)
944989 pkgconf_client_set_warn_handler(&pkg_client, error_handler, NULL);
945990
991 #ifndef PKGCONF_LITE
946992 if ((want_flags & PKG_DEBUG) == PKG_DEBUG)
947993 pkgconf_client_set_trace_handler(&pkg_client, error_handler, NULL);
994 #endif
948995
949996 if ((want_flags & PKG_ABOUT) == PKG_ABOUT)
950997 {
12311278
12321279 ret = EXIT_SUCCESS;
12331280
1281 #ifndef PKGCONF_LITE
12341282 if ((want_flags & PKG_SIMULATE) == PKG_SIMULATE)
12351283 {
12361284 want_flags &= ~(PKG_CFLAGS|PKG_LIBS);
12421290 goto out;
12431291 }
12441292 }
1293 #endif
12451294
12461295 if (!pkgconf_queue_validate(&pkg_client, &pkgq, maximum_traverse_depth))
12471296 {
12811330 }
12821331 }
12831332
1333 #ifndef PKGCONF_LITE
12841334 if ((want_flags & PKG_DIGRAPH) == PKG_DIGRAPH)
12851335 {
12861336 want_flags &= ~(PKG_CFLAGS|PKG_LIBS);
12911341 goto out;
12921342 }
12931343 }
1344 #endif
12941345
12951346 if ((want_flags & PKG_MODVERSION) == PKG_MODVERSION)
12961347 {
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
2 # Copyright 1992-2015 Free Software Foundation, Inc.
3
4 timestamp='2015-01-01'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-24'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
1414 # General Public License for more details.
1515 #
1616 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
1818 #
1919 # As a special exception to the GNU General Public License, if you
2020 # distribute this file as part of a program that contains a
2626 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
2727 #
2828 # You can get the latest version of this script from:
29 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
29 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
3030 #
3131 # Please send patches to <config-patches@gnu.org>.
3232
3838
3939 Output the configuration name of the system \`$me' is run on.
4040
41 Operation modes:
41 Options:
4242 -h, --help print this help, then exit
4343 -t, --time-stamp print date of last modification, then exit
4444 -v, --version print version number, then exit
4949 GNU config.guess ($timestamp)
5050
5151 Originally written by Per Bothner.
52 Copyright 1992-2015 Free Software Foundation, Inc.
52 Copyright 1992-2018 Free Software Foundation, Inc.
5353
5454 This is free software; see the source for copying conditions. There is NO
5555 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
106106 dummy=$tmp/dummy ;
107107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > $dummy.c ;
109 ,,) echo "int x;" > "$dummy.c" ;
110110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
111 if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
112112 CC_FOR_BUILD="$c"; break ;
113113 fi ;
114114 done ;
131131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133133
134 case "${UNAME_SYSTEM}" in
134 case "$UNAME_SYSTEM" in
135135 Linux|GNU|GNU/*)
136136 # If the system lacks a compiler, then just pick glibc.
137137 # We could probably try harder.
138138 LIBC=gnu
139139
140 eval $set_cc_for_build
141 cat <<-EOF > $dummy.c
140 eval "$set_cc_for_build"
141 cat <<-EOF > "$dummy.c"
142142 #include <features.h>
143143 #if defined(__UCLIBC__)
144144 LIBC=uclibc
148148 LIBC=gnu
149149 #endif
150150 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
151 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
152
153 # If ldd exists, use it to detect musl libc.
154 if command -v ldd >/dev/null && \
155 ldd --version 2>&1 | grep -q ^musl
156 then
157 LIBC=musl
158 fi
152159 ;;
153160 esac
154161
155162 # Note: order is significant - the case branches are not exclusive.
156163
157 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
164 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
158165 *:NetBSD:*:*)
159166 # NetBSD (nbsd) targets should (where applicable) match one or
160167 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
167174 # Note: NetBSD doesn't particularly care about the vendor
168175 # portion of the name. We always set it to "unknown".
169176 sysctl="sysctl -n hw.machine_arch"
170 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
171 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
172 case "${UNAME_MACHINE_ARCH}" in
177 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
178 "/sbin/$sysctl" 2>/dev/null || \
179 "/usr/sbin/$sysctl" 2>/dev/null || \
180 echo unknown)`
181 case "$UNAME_MACHINE_ARCH" in
173182 armeb) machine=armeb-unknown ;;
174183 arm*) machine=arm-unknown ;;
175184 sh3el) machine=shl-unknown ;;
176185 sh3eb) machine=sh-unknown ;;
177186 sh5el) machine=sh5le-unknown ;;
178 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
187 earmv*)
188 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
189 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
190 machine="${arch}${endian}"-unknown
191 ;;
192 *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
179193 esac
180194 # The Operating System including object format, if it has switched
181 # to ELF recently, or will in the future.
182 case "${UNAME_MACHINE_ARCH}" in
195 # to ELF recently (or will in the future) and ABI.
196 case "$UNAME_MACHINE_ARCH" in
197 earm*)
198 os=netbsdelf
199 ;;
183200 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
184 eval $set_cc_for_build
201 eval "$set_cc_for_build"
185202 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
186203 | grep -q __ELF__
187204 then
196213 os=netbsd
197214 ;;
198215 esac
216 # Determine ABI tags.
217 case "$UNAME_MACHINE_ARCH" in
218 earm*)
219 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
220 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
221 ;;
222 esac
199223 # The OS release
200224 # Debian GNU/NetBSD machines have a different userland, and
201225 # thus, need a distinct triplet. However, they do not need
202226 # kernel version information, so it can be replaced with a
203227 # suitable tag, in the style of linux-gnu.
204 case "${UNAME_VERSION}" in
228 case "$UNAME_VERSION" in
205229 Debian*)
206230 release='-gnu'
207231 ;;
208232 *)
209 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
233 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
210234 ;;
211235 esac
212236 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
213237 # contains redundant information, the shorter form:
214238 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
215 echo "${machine}-${os}${release}"
239 echo "$machine-${os}${release}${abi}"
216240 exit ;;
217241 *:Bitrig:*:*)
218242 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
219 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
243 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
220244 exit ;;
221245 *:OpenBSD:*:*)
222246 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
223 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
247 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
248 exit ;;
249 *:LibertyBSD:*:*)
250 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
251 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
252 exit ;;
253 *:MidnightBSD:*:*)
254 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
224255 exit ;;
225256 *:ekkoBSD:*:*)
226 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
257 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
227258 exit ;;
228259 *:SolidBSD:*:*)
229 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
260 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
230261 exit ;;
231262 macppc:MirBSD:*:*)
232 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
263 echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
233264 exit ;;
234265 *:MirBSD:*:*)
235 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
236 exit ;;
266 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
267 exit ;;
268 *:Sortix:*:*)
269 echo "$UNAME_MACHINE"-unknown-sortix
270 exit ;;
271 *:Redox:*:*)
272 echo "$UNAME_MACHINE"-unknown-redox
273 exit ;;
274 mips:OSF1:*.*)
275 echo mips-dec-osf1
276 exit ;;
237277 alpha:OSF1:*:*)
238278 case $UNAME_RELEASE in
239279 *4.0)
250290 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
251291 case "$ALPHA_CPU_TYPE" in
252292 "EV4 (21064)")
253 UNAME_MACHINE="alpha" ;;
293 UNAME_MACHINE=alpha ;;
254294 "EV4.5 (21064)")
255 UNAME_MACHINE="alpha" ;;
295 UNAME_MACHINE=alpha ;;
256296 "LCA4 (21066/21068)")
257 UNAME_MACHINE="alpha" ;;
297 UNAME_MACHINE=alpha ;;
258298 "EV5 (21164)")
259 UNAME_MACHINE="alphaev5" ;;
299 UNAME_MACHINE=alphaev5 ;;
260300 "EV5.6 (21164A)")
261 UNAME_MACHINE="alphaev56" ;;
301 UNAME_MACHINE=alphaev56 ;;
262302 "EV5.6 (21164PC)")
263 UNAME_MACHINE="alphapca56" ;;
303 UNAME_MACHINE=alphapca56 ;;
264304 "EV5.7 (21164PC)")
265 UNAME_MACHINE="alphapca57" ;;
305 UNAME_MACHINE=alphapca57 ;;
266306 "EV6 (21264)")
267 UNAME_MACHINE="alphaev6" ;;
307 UNAME_MACHINE=alphaev6 ;;
268308 "EV6.7 (21264A)")
269 UNAME_MACHINE="alphaev67" ;;
309 UNAME_MACHINE=alphaev67 ;;
270310 "EV6.8CB (21264C)")
271 UNAME_MACHINE="alphaev68" ;;
311 UNAME_MACHINE=alphaev68 ;;
272312 "EV6.8AL (21264B)")
273 UNAME_MACHINE="alphaev68" ;;
313 UNAME_MACHINE=alphaev68 ;;
274314 "EV6.8CX (21264D)")
275 UNAME_MACHINE="alphaev68" ;;
315 UNAME_MACHINE=alphaev68 ;;
276316 "EV6.9A (21264/EV69A)")
277 UNAME_MACHINE="alphaev69" ;;
317 UNAME_MACHINE=alphaev69 ;;
278318 "EV7 (21364)")
279 UNAME_MACHINE="alphaev7" ;;
319 UNAME_MACHINE=alphaev7 ;;
280320 "EV7.9 (21364A)")
281 UNAME_MACHINE="alphaev79" ;;
321 UNAME_MACHINE=alphaev79 ;;
282322 esac
283323 # A Pn.n version is a patched version.
284324 # A Vn.n version is a released version.
285325 # A Tn.n version is a released field test version.
286326 # A Xn.n version is an unreleased experimental baselevel.
287327 # 1.2 uses "1.2" for uname -r.
288 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
328 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
289329 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
290330 exitcode=$?
291331 trap '' 0
292332 exit $exitcode ;;
293 Alpha\ *:Windows_NT*:*)
294 # How do we know it's Interix rather than the generic POSIX subsystem?
295 # Should we change UNAME_MACHINE based on the output of uname instead
296 # of the specific Alpha model?
297 echo alpha-pc-interix
298 exit ;;
299 21064:Windows_NT:50:3)
300 echo alpha-dec-winnt3.5
301 exit ;;
302333 Amiga*:UNIX_System_V:4.0:*)
303334 echo m68k-unknown-sysv4
304335 exit ;;
305336 *:[Aa]miga[Oo][Ss]:*:*)
306 echo ${UNAME_MACHINE}-unknown-amigaos
337 echo "$UNAME_MACHINE"-unknown-amigaos
307338 exit ;;
308339 *:[Mm]orph[Oo][Ss]:*:*)
309 echo ${UNAME_MACHINE}-unknown-morphos
340 echo "$UNAME_MACHINE"-unknown-morphos
310341 exit ;;
311342 *:OS/390:*:*)
312343 echo i370-ibm-openedition
318349 echo powerpc-ibm-os400
319350 exit ;;
320351 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
321 echo arm-acorn-riscix${UNAME_RELEASE}
352 echo arm-acorn-riscix"$UNAME_RELEASE"
322353 exit ;;
323354 arm*:riscos:*:*|arm*:RISCOS:*:*)
324355 echo arm-unknown-riscos
345376 sparc) echo sparc-icl-nx7; exit ;;
346377 esac ;;
347378 s390x:SunOS:*:*)
348 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
379 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
349380 exit ;;
350381 sun4H:SunOS:5.*:*)
351 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
382 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
352383 exit ;;
353384 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
354 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
385 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
355386 exit ;;
356387 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
357 echo i386-pc-auroraux${UNAME_RELEASE}
388 echo i386-pc-auroraux"$UNAME_RELEASE"
358389 exit ;;
359390 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
360 eval $set_cc_for_build
361 SUN_ARCH="i386"
391 eval "$set_cc_for_build"
392 SUN_ARCH=i386
362393 # If there is a compiler, see if it is configured for 64-bit objects.
363394 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
364395 # This test works for both compilers.
365 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
396 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
366397 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
367 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
398 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
368399 grep IS_64BIT_ARCH >/dev/null
369400 then
370 SUN_ARCH="x86_64"
401 SUN_ARCH=x86_64
371402 fi
372403 fi
373 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
404 echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
374405 exit ;;
375406 sun4*:SunOS:6*:*)
376407 # According to config.sub, this is the proper way to canonicalize
377408 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
378409 # it's likely to be more like Solaris than SunOS4.
379 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
410 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
380411 exit ;;
381412 sun4*:SunOS:*:*)
382413 case "`/usr/bin/arch -k`" in
385416 ;;
386417 esac
387418 # Japanese Language versions have a version number like `4.1.3-JL'.
388 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
419 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
389420 exit ;;
390421 sun3*:SunOS:*:*)
391 echo m68k-sun-sunos${UNAME_RELEASE}
422 echo m68k-sun-sunos"$UNAME_RELEASE"
392423 exit ;;
393424 sun*:*:4.2BSD:*)
394425 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
395 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
426 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
396427 case "`/bin/arch`" in
397428 sun3)
398 echo m68k-sun-sunos${UNAME_RELEASE}
429 echo m68k-sun-sunos"$UNAME_RELEASE"
399430 ;;
400431 sun4)
401 echo sparc-sun-sunos${UNAME_RELEASE}
432 echo sparc-sun-sunos"$UNAME_RELEASE"
402433 ;;
403434 esac
404435 exit ;;
405436 aushp:SunOS:*:*)
406 echo sparc-auspex-sunos${UNAME_RELEASE}
437 echo sparc-auspex-sunos"$UNAME_RELEASE"
407438 exit ;;
408439 # The situation for MiNT is a little confusing. The machine name
409440 # can be virtually everything (everything which is not
414445 # MiNT. But MiNT is downward compatible to TOS, so this should
415446 # be no problem.
416447 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
417 echo m68k-atari-mint${UNAME_RELEASE}
448 echo m68k-atari-mint"$UNAME_RELEASE"
418449 exit ;;
419450 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
420 echo m68k-atari-mint${UNAME_RELEASE}
451 echo m68k-atari-mint"$UNAME_RELEASE"
421452 exit ;;
422453 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
423 echo m68k-atari-mint${UNAME_RELEASE}
454 echo m68k-atari-mint"$UNAME_RELEASE"
424455 exit ;;
425456 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
426 echo m68k-milan-mint${UNAME_RELEASE}
457 echo m68k-milan-mint"$UNAME_RELEASE"
427458 exit ;;
428459 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
429 echo m68k-hades-mint${UNAME_RELEASE}
460 echo m68k-hades-mint"$UNAME_RELEASE"
430461 exit ;;
431462 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
432 echo m68k-unknown-mint${UNAME_RELEASE}
463 echo m68k-unknown-mint"$UNAME_RELEASE"
433464 exit ;;
434465 m68k:machten:*:*)
435 echo m68k-apple-machten${UNAME_RELEASE}
466 echo m68k-apple-machten"$UNAME_RELEASE"
436467 exit ;;
437468 powerpc:machten:*:*)
438 echo powerpc-apple-machten${UNAME_RELEASE}
469 echo powerpc-apple-machten"$UNAME_RELEASE"
439470 exit ;;
440471 RISC*:Mach:*:*)
441472 echo mips-dec-mach_bsd4.3
442473 exit ;;
443474 RISC*:ULTRIX:*:*)
444 echo mips-dec-ultrix${UNAME_RELEASE}
475 echo mips-dec-ultrix"$UNAME_RELEASE"
445476 exit ;;
446477 VAX*:ULTRIX*:*:*)
447 echo vax-dec-ultrix${UNAME_RELEASE}
478 echo vax-dec-ultrix"$UNAME_RELEASE"
448479 exit ;;
449480 2020:CLIX:*:* | 2430:CLIX:*:*)
450 echo clipper-intergraph-clix${UNAME_RELEASE}
481 echo clipper-intergraph-clix"$UNAME_RELEASE"
451482 exit ;;
452483 mips:*:*:UMIPS | mips:*:*:RISCos)
453 eval $set_cc_for_build
454 sed 's/^ //' << EOF >$dummy.c
484 eval "$set_cc_for_build"
485 sed 's/^ //' << EOF > "$dummy.c"
455486 #ifdef __cplusplus
456487 #include <stdio.h> /* for printf() prototype */
457488 int main (int argc, char *argv[]) {
460491 #endif
461492 #if defined (host_mips) && defined (MIPSEB)
462493 #if defined (SYSTYPE_SYSV)
463 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
494 printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
464495 #endif
465496 #if defined (SYSTYPE_SVR4)
466 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
497 printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
467498 #endif
468499 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
469 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
500 printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
470501 #endif
471502 #endif
472503 exit (-1);
473504 }
474505 EOF
475 $CC_FOR_BUILD -o $dummy $dummy.c &&
476 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
477 SYSTEM_NAME=`$dummy $dummyarg` &&
506 $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
507 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
508 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
478509 { echo "$SYSTEM_NAME"; exit; }
479 echo mips-mips-riscos${UNAME_RELEASE}
510 echo mips-mips-riscos"$UNAME_RELEASE"
480511 exit ;;
481512 Motorola:PowerMAX_OS:*:*)
482513 echo powerpc-motorola-powermax
502533 AViiON:dgux:*:*)
503534 # DG/UX returns AViiON for all architectures
504535 UNAME_PROCESSOR=`/usr/bin/uname -p`
505 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
536 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
506537 then
507 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
508 [ ${TARGET_BINARY_INTERFACE}x = x ]
538 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
539 [ "$TARGET_BINARY_INTERFACE"x = x ]
509540 then
510 echo m88k-dg-dgux${UNAME_RELEASE}
541 echo m88k-dg-dgux"$UNAME_RELEASE"
511542 else
512 echo m88k-dg-dguxbcs${UNAME_RELEASE}
543 echo m88k-dg-dguxbcs"$UNAME_RELEASE"
513544 fi
514545 else
515 echo i586-dg-dgux${UNAME_RELEASE}
546 echo i586-dg-dgux"$UNAME_RELEASE"
516547 fi
517548 exit ;;
518549 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
529560 echo m68k-tektronix-bsd
530561 exit ;;
531562 *:IRIX*:*:*)
532 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
563 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
533564 exit ;;
534565 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
535566 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
541572 if [ -x /usr/bin/oslevel ] ; then
542573 IBM_REV=`/usr/bin/oslevel`
543574 else
544 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
545 fi
546 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
575 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
576 fi
577 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
547578 exit ;;
548579 *:AIX:2:3)
549580 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
550 eval $set_cc_for_build
551 sed 's/^ //' << EOF >$dummy.c
581 eval "$set_cc_for_build"
582 sed 's/^ //' << EOF > "$dummy.c"
552583 #include <sys/systemcfg.h>
553584
554585 main()
559590 exit(0);
560591 }
561592 EOF
562 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
593 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
563594 then
564595 echo "$SYSTEM_NAME"
565596 else
573604 exit ;;
574605 *:AIX:*:[4567])
575606 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
576 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
607 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
577608 IBM_ARCH=rs6000
578609 else
579610 IBM_ARCH=powerpc
582613 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
583614 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
584615 else
585 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
586 fi
587 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
616 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
617 fi
618 echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
588619 exit ;;
589620 *:AIX:*:*)
590621 echo rs6000-ibm-aix
591622 exit ;;
592 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
623 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
593624 echo romp-ibm-bsd4.4
594625 exit ;;
595626 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
596 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
627 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
597628 exit ;; # report: romp-ibm BSD 4.3
598629 *:BOSX:*:*)
599630 echo rs6000-bull-bosx
608639 echo m68k-hp-bsd4.4
609640 exit ;;
610641 9000/[34678]??:HP-UX:*:*)
611 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
612 case "${UNAME_MACHINE}" in
613 9000/31? ) HP_ARCH=m68000 ;;
614 9000/[34]?? ) HP_ARCH=m68k ;;
642 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
643 case "$UNAME_MACHINE" in
644 9000/31?) HP_ARCH=m68000 ;;
645 9000/[34]??) HP_ARCH=m68k ;;
615646 9000/[678][0-9][0-9])
616647 if [ -x /usr/bin/getconf ]; then
617648 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
618649 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
619 case "${sc_cpu_version}" in
620 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
621 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
650 case "$sc_cpu_version" in
651 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
652 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
622653 532) # CPU_PA_RISC2_0
623 case "${sc_kernel_bits}" in
624 32) HP_ARCH="hppa2.0n" ;;
625 64) HP_ARCH="hppa2.0w" ;;
626 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
654 case "$sc_kernel_bits" in
655 32) HP_ARCH=hppa2.0n ;;
656 64) HP_ARCH=hppa2.0w ;;
657 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
627658 esac ;;
628659 esac
629660 fi
630 if [ "${HP_ARCH}" = "" ]; then
631 eval $set_cc_for_build
632 sed 's/^ //' << EOF >$dummy.c
661 if [ "$HP_ARCH" = "" ]; then
662 eval "$set_cc_for_build"
663 sed 's/^ //' << EOF > "$dummy.c"
633664
634665 #define _HPUX_SOURCE
635666 #include <stdlib.h>
662693 exit (0);
663694 }
664695 EOF
665 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
696 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
666697 test -z "$HP_ARCH" && HP_ARCH=hppa
667698 fi ;;
668699 esac
669 if [ ${HP_ARCH} = "hppa2.0w" ]
700 if [ "$HP_ARCH" = hppa2.0w ]
670701 then
671 eval $set_cc_for_build
702 eval "$set_cc_for_build"
672703
673704 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
674705 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
679710 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
680711 # => hppa64-hp-hpux11.23
681712
682 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
713 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
683714 grep -q __LP64__
684715 then
685 HP_ARCH="hppa2.0w"
716 HP_ARCH=hppa2.0w
686717 else
687 HP_ARCH="hppa64"
718 HP_ARCH=hppa64
688719 fi
689720 fi
690 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
721 echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
691722 exit ;;
692723 ia64:HP-UX:*:*)
693 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
694 echo ia64-hp-hpux${HPUX_REV}
724 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
725 echo ia64-hp-hpux"$HPUX_REV"
695726 exit ;;
696727 3050*:HI-UX:*:*)
697 eval $set_cc_for_build
698 sed 's/^ //' << EOF >$dummy.c
728 eval "$set_cc_for_build"
729 sed 's/^ //' << EOF > "$dummy.c"
699730 #include <unistd.h>
700731 int
701732 main ()
720751 exit (0);
721752 }
722753 EOF
723 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
754 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
724755 { echo "$SYSTEM_NAME"; exit; }
725756 echo unknown-hitachi-hiuxwe2
726757 exit ;;
727 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
758 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
728759 echo hppa1.1-hp-bsd
729760 exit ;;
730761 9000/8??:4.3bsd:*:*)
733764 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
734765 echo hppa1.0-hp-mpeix
735766 exit ;;
736 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
767 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
737768 echo hppa1.1-hp-osf
738769 exit ;;
739770 hp8??:OSF1:*:*)
741772 exit ;;
742773 i*86:OSF1:*:*)
743774 if [ -x /usr/sbin/sysversion ] ; then
744 echo ${UNAME_MACHINE}-unknown-osf1mk
775 echo "$UNAME_MACHINE"-unknown-osf1mk
745776 else
746 echo ${UNAME_MACHINE}-unknown-osf1
777 echo "$UNAME_MACHINE"-unknown-osf1
747778 fi
748779 exit ;;
749780 parisc*:Lites*:*:*)
768799 echo c4-convex-bsd
769800 exit ;;
770801 CRAY*Y-MP:*:*:*)
771 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
802 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
772803 exit ;;
773804 CRAY*[A-Z]90:*:*:*)
774 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
805 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
775806 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
776807 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
777808 -e 's/\.[^.]*$/.X/'
778809 exit ;;
779810 CRAY*TS:*:*:*)
780 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
811 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
781812 exit ;;
782813 CRAY*T3E:*:*:*)
783 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
814 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
784815 exit ;;
785816 CRAY*SV1:*:*:*)
786 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
817 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
787818 exit ;;
788819 *:UNICOS/mp:*:*)
789 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
820 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
790821 exit ;;
791822 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
792 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
793 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
794 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
823 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
824 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
825 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
795826 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
796827 exit ;;
797828 5000:UNIX_System_V:4.*:*)
798 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
799 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
829 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
830 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
800831 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
801832 exit ;;
802833 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
803 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
834 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
804835 exit ;;
805836 sparc*:BSD/OS:*:*)
806 echo sparc-unknown-bsdi${UNAME_RELEASE}
837 echo sparc-unknown-bsdi"$UNAME_RELEASE"
807838 exit ;;
808839 *:BSD/OS:*:*)
809 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
840 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
810841 exit ;;
811842 *:FreeBSD:*:*)
812843 UNAME_PROCESSOR=`/usr/bin/uname -p`
813 case ${UNAME_PROCESSOR} in
844 case "$UNAME_PROCESSOR" in
814845 amd64)
815 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
816 *)
817 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
846 UNAME_PROCESSOR=x86_64 ;;
847 i386)
848 UNAME_PROCESSOR=i586 ;;
818849 esac
850 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
819851 exit ;;
820852 i*:CYGWIN*:*)
821 echo ${UNAME_MACHINE}-pc-cygwin
853 echo "$UNAME_MACHINE"-pc-cygwin
822854 exit ;;
823855 *:MINGW64*:*)
824 echo ${UNAME_MACHINE}-pc-mingw64
856 echo "$UNAME_MACHINE"-pc-mingw64
825857 exit ;;
826858 *:MINGW*:*)
827 echo ${UNAME_MACHINE}-pc-mingw32
859 echo "$UNAME_MACHINE"-pc-mingw32
828860 exit ;;
829861 *:MSYS*:*)
830 echo ${UNAME_MACHINE}-pc-msys
831 exit ;;
832 i*:windows32*:*)
833 # uname -m includes "-pc" on this system.
834 echo ${UNAME_MACHINE}-mingw32
862 echo "$UNAME_MACHINE"-pc-msys
835863 exit ;;
836864 i*:PW*:*)
837 echo ${UNAME_MACHINE}-pc-pw32
865 echo "$UNAME_MACHINE"-pc-pw32
838866 exit ;;
839867 *:Interix*:*)
840 case ${UNAME_MACHINE} in
868 case "$UNAME_MACHINE" in
841869 x86)
842 echo i586-pc-interix${UNAME_RELEASE}
870 echo i586-pc-interix"$UNAME_RELEASE"
843871 exit ;;
844872 authenticamd | genuineintel | EM64T)
845 echo x86_64-unknown-interix${UNAME_RELEASE}
873 echo x86_64-unknown-interix"$UNAME_RELEASE"
846874 exit ;;
847875 IA64)
848 echo ia64-unknown-interix${UNAME_RELEASE}
876 echo ia64-unknown-interix"$UNAME_RELEASE"
849877 exit ;;
850878 esac ;;
851 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
852 echo i${UNAME_MACHINE}-pc-mks
853 exit ;;
854 8664:Windows_NT:*)
855 echo x86_64-pc-mks
856 exit ;;
857 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
858 # How do we know it's Interix rather than the generic POSIX subsystem?
859 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
860 # UNAME_MACHINE based on the output of uname instead of i386?
861 echo i586-pc-interix
862 exit ;;
863879 i*:UWIN*:*)
864 echo ${UNAME_MACHINE}-pc-uwin
880 echo "$UNAME_MACHINE"-pc-uwin
865881 exit ;;
866882 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
867883 echo x86_64-unknown-cygwin
868884 exit ;;
869 p*:CYGWIN*:*)
870 echo powerpcle-unknown-cygwin
871 exit ;;
872885 prep*:SunOS:5.*:*)
873 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
886 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
874887 exit ;;
875888 *:GNU:*:*)
876889 # the GNU system
877 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
890 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
878891 exit ;;
879892 *:GNU/*:*:*)
880893 # other systems with GNU libc and userland
881 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
894 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
882895 exit ;;
883896 i*86:Minix:*:*)
884 echo ${UNAME_MACHINE}-pc-minix
897 echo "$UNAME_MACHINE"-pc-minix
885898 exit ;;
886899 aarch64:Linux:*:*)
887 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
900 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
888901 exit ;;
889902 aarch64_be:Linux:*:*)
890903 UNAME_MACHINE=aarch64_be
891 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
904 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
892905 exit ;;
893906 alpha:Linux:*:*)
894907 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
901914 EV68*) UNAME_MACHINE=alphaev68 ;;
902915 esac
903916 objdump --private-headers /bin/sh | grep -q ld.so.1
904 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
905 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
917 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
918 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
906919 exit ;;
907920 arc:Linux:*:* | arceb:Linux:*:*)
908 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
921 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
909922 exit ;;
910923 arm*:Linux:*:*)
911 eval $set_cc_for_build
924 eval "$set_cc_for_build"
912925 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
913926 | grep -q __ARM_EABI__
914927 then
915 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
928 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
916929 else
917930 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
918931 | grep -q __ARM_PCS_VFP
919932 then
920 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
933 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
921934 else
922 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
935 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
923936 fi
924937 fi
925938 exit ;;
926939 avr32*:Linux:*:*)
927 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
940 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
928941 exit ;;
929942 cris:Linux:*:*)
930 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
943 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
931944 exit ;;
932945 crisv32:Linux:*:*)
933 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
946 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
947 exit ;;
948 e2k:Linux:*:*)
949 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
934950 exit ;;
935951 frv:Linux:*:*)
936 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
952 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
937953 exit ;;
938954 hexagon:Linux:*:*)
939 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
955 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
940956 exit ;;
941957 i*86:Linux:*:*)
942 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
958 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
943959 exit ;;
944960 ia64:Linux:*:*)
945 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
961 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
962 exit ;;
963 k1om:Linux:*:*)
964 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
946965 exit ;;
947966 m32r*:Linux:*:*)
948 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
967 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
949968 exit ;;
950969 m68*:Linux:*:*)
951 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
970 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
952971 exit ;;
953972 mips:Linux:*:* | mips64:Linux:*:*)
954 eval $set_cc_for_build
955 sed 's/^ //' << EOF >$dummy.c
973 eval "$set_cc_for_build"
974 sed 's/^ //' << EOF > "$dummy.c"
956975 #undef CPU
957976 #undef ${UNAME_MACHINE}
958977 #undef ${UNAME_MACHINE}el
966985 #endif
967986 #endif
968987 EOF
969 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
970 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
988 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
989 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
971990 ;;
991 mips64el:Linux:*:*)
992 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
993 exit ;;
972994 openrisc*:Linux:*:*)
973 echo or1k-unknown-linux-${LIBC}
995 echo or1k-unknown-linux-"$LIBC"
974996 exit ;;
975997 or32:Linux:*:* | or1k*:Linux:*:*)
976 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
998 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
977999 exit ;;
9781000 padre:Linux:*:*)
979 echo sparc-unknown-linux-${LIBC}
1001 echo sparc-unknown-linux-"$LIBC"
9801002 exit ;;
9811003 parisc64:Linux:*:* | hppa64:Linux:*:*)
982 echo hppa64-unknown-linux-${LIBC}
1004 echo hppa64-unknown-linux-"$LIBC"
9831005 exit ;;
9841006 parisc:Linux:*:* | hppa:Linux:*:*)
9851007 # Look for CPU level
9861008 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
987 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
988 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
989 *) echo hppa-unknown-linux-${LIBC} ;;
1009 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1010 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1011 *) echo hppa-unknown-linux-"$LIBC" ;;
9901012 esac
9911013 exit ;;
9921014 ppc64:Linux:*:*)
993 echo powerpc64-unknown-linux-${LIBC}
1015 echo powerpc64-unknown-linux-"$LIBC"
9941016 exit ;;
9951017 ppc:Linux:*:*)
996 echo powerpc-unknown-linux-${LIBC}
1018 echo powerpc-unknown-linux-"$LIBC"
9971019 exit ;;
9981020 ppc64le:Linux:*:*)
999 echo powerpc64le-unknown-linux-${LIBC}
1021 echo powerpc64le-unknown-linux-"$LIBC"
10001022 exit ;;
10011023 ppcle:Linux:*:*)
1002 echo powerpcle-unknown-linux-${LIBC}
1024 echo powerpcle-unknown-linux-"$LIBC"
1025 exit ;;
1026 riscv32:Linux:*:* | riscv64:Linux:*:*)
1027 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10031028 exit ;;
10041029 s390:Linux:*:* | s390x:Linux:*:*)
1005 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1030 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
10061031 exit ;;
10071032 sh64*:Linux:*:*)
1008 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1033 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10091034 exit ;;
10101035 sh*:Linux:*:*)
1011 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1036 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10121037 exit ;;
10131038 sparc:Linux:*:* | sparc64:Linux:*:*)
1014 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1039 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10151040 exit ;;
10161041 tile*:Linux:*:*)
1017 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1042 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10181043 exit ;;
10191044 vax:Linux:*:*)
1020 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1045 echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
10211046 exit ;;
10221047 x86_64:Linux:*:*)
1023 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1048 if objdump -f /bin/sh | grep -q elf32-x86-64; then
1049 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
1050 else
1051 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
1052 fi
10241053 exit ;;
10251054 xtensa*:Linux:*:*)
1026 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1055 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
10271056 exit ;;
10281057 i*86:DYNIX/ptx:4*:*)
10291058 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
10371066 # I am not positive that other SVR4 systems won't match this,
10381067 # I just have to hope. -- rms.
10391068 # Use sysv4.2uw... so that sysv4* matches it.
1040 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1069 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
10411070 exit ;;
10421071 i*86:OS/2:*:*)
10431072 # If we were able to find `uname', then EMX Unix compatibility
10441073 # is probably installed.
1045 echo ${UNAME_MACHINE}-pc-os2-emx
1074 echo "$UNAME_MACHINE"-pc-os2-emx
10461075 exit ;;
10471076 i*86:XTS-300:*:STOP)
1048 echo ${UNAME_MACHINE}-unknown-stop
1077 echo "$UNAME_MACHINE"-unknown-stop
10491078 exit ;;
10501079 i*86:atheos:*:*)
1051 echo ${UNAME_MACHINE}-unknown-atheos
1080 echo "$UNAME_MACHINE"-unknown-atheos
10521081 exit ;;
10531082 i*86:syllable:*:*)
1054 echo ${UNAME_MACHINE}-pc-syllable
1083 echo "$UNAME_MACHINE"-pc-syllable
10551084 exit ;;
10561085 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1057 echo i386-unknown-lynxos${UNAME_RELEASE}
1086 echo i386-unknown-lynxos"$UNAME_RELEASE"
10581087 exit ;;
10591088 i*86:*DOS:*:*)
1060 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1061 exit ;;
1062 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1063 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1089 echo "$UNAME_MACHINE"-pc-msdosdjgpp
1090 exit ;;
1091 i*86:*:4.*:*)
1092 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
10641093 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1065 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1094 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
10661095 else
1067 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1096 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
10681097 fi
10691098 exit ;;
10701099 i*86:*:5:[678]*)
10741103 *Pentium) UNAME_MACHINE=i586 ;;
10751104 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
10761105 esac
1077 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1106 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
10781107 exit ;;
10791108 i*86:*:3.2:*)
10801109 if test -f /usr/options/cb.name; then
10811110 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1082 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1111 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
10831112 elif /bin/uname -X 2>/dev/null >/dev/null ; then
10841113 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
10851114 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
10891118 && UNAME_MACHINE=i686
10901119 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
10911120 && UNAME_MACHINE=i686
1092 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1121 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
10931122 else
1094 echo ${UNAME_MACHINE}-pc-sysv32
1123 echo "$UNAME_MACHINE"-pc-sysv32
10951124 fi
10961125 exit ;;
10971126 pc:*:*:*)
10991128 # uname -m prints for DJGPP always 'pc', but it prints nothing about
11001129 # the processor, so we play safe by assuming i586.
11011130 # Note: whatever this is, it MUST be the same as what config.sub
1102 # prints for the "djgpp" host, or else GDB configury will decide that
1131 # prints for the "djgpp" host, or else GDB configure will decide that
11031132 # this is a cross-build.
11041133 echo i586-pc-msdosdjgpp
11051134 exit ;;
11111140 exit ;;
11121141 i860:*:4.*:*) # i860-SVR4
11131142 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1114 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1143 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
11151144 else # Add other i860-SVR4 vendors below as they are discovered.
1116 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1145 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
11171146 fi
11181147 exit ;;
11191148 mini*:CTIX:SYS*5:*)
11331162 test -r /etc/.relid \
11341163 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11351164 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1136 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1165 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11371166 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1138 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1167 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11391168 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
11401169 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11411170 && { echo i486-ncr-sysv4; exit; } ;;
11441173 test -r /etc/.relid \
11451174 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11461175 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1147 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1176 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
11481177 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1149 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1178 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
11501179 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1151 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1180 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
11521181 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1153 echo m68k-unknown-lynxos${UNAME_RELEASE}
1182 echo m68k-unknown-lynxos"$UNAME_RELEASE"
11541183 exit ;;
11551184 mc68030:UNIX_System_V:4.*:*)
11561185 echo m68k-atari-sysv4
11571186 exit ;;
11581187 TSUNAMI:LynxOS:2.*:*)
1159 echo sparc-unknown-lynxos${UNAME_RELEASE}
1188 echo sparc-unknown-lynxos"$UNAME_RELEASE"
11601189 exit ;;
11611190 rs6000:LynxOS:2.*:*)
1162 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1191 echo rs6000-unknown-lynxos"$UNAME_RELEASE"
11631192 exit ;;
11641193 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1165 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1194 echo powerpc-unknown-lynxos"$UNAME_RELEASE"
11661195 exit ;;
11671196 SM[BE]S:UNIX_SV:*:*)
1168 echo mips-dde-sysv${UNAME_RELEASE}
1197 echo mips-dde-sysv"$UNAME_RELEASE"
11691198 exit ;;
11701199 RM*:ReliantUNIX-*:*:*)
11711200 echo mips-sni-sysv4
11761205 *:SINIX-*:*:*)
11771206 if uname -p 2>/dev/null >/dev/null ; then
11781207 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1179 echo ${UNAME_MACHINE}-sni-sysv4
1208 echo "$UNAME_MACHINE"-sni-sysv4
11801209 else
11811210 echo ns32k-sni-sysv
11821211 fi
11961225 exit ;;
11971226 i*86:VOS:*:*)
11981227 # From Paul.Green@stratus.com.
1199 echo ${UNAME_MACHINE}-stratus-vos
1228 echo "$UNAME_MACHINE"-stratus-vos
12001229 exit ;;
12011230 *:VOS:*:*)
12021231 # From Paul.Green@stratus.com.
12031232 echo hppa1.1-stratus-vos
12041233 exit ;;
12051234 mc68*:A/UX:*:*)
1206 echo m68k-apple-aux${UNAME_RELEASE}
1235 echo m68k-apple-aux"$UNAME_RELEASE"
12071236 exit ;;
12081237 news*:NEWS-OS:6*:*)
12091238 echo mips-sony-newsos6
12101239 exit ;;
12111240 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
12121241 if [ -d /usr/nec ]; then
1213 echo mips-nec-sysv${UNAME_RELEASE}
1242 echo mips-nec-sysv"$UNAME_RELEASE"
12141243 else
1215 echo mips-unknown-sysv${UNAME_RELEASE}
1244 echo mips-unknown-sysv"$UNAME_RELEASE"
12161245 fi
12171246 exit ;;
12181247 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
12311260 echo x86_64-unknown-haiku
12321261 exit ;;
12331262 SX-4:SUPER-UX:*:*)
1234 echo sx4-nec-superux${UNAME_RELEASE}
1263 echo sx4-nec-superux"$UNAME_RELEASE"
12351264 exit ;;
12361265 SX-5:SUPER-UX:*:*)
1237 echo sx5-nec-superux${UNAME_RELEASE}
1266 echo sx5-nec-superux"$UNAME_RELEASE"
12381267 exit ;;
12391268 SX-6:SUPER-UX:*:*)
1240 echo sx6-nec-superux${UNAME_RELEASE}
1269 echo sx6-nec-superux"$UNAME_RELEASE"
12411270 exit ;;
12421271 SX-7:SUPER-UX:*:*)
1243 echo sx7-nec-superux${UNAME_RELEASE}
1272 echo sx7-nec-superux"$UNAME_RELEASE"
12441273 exit ;;
12451274 SX-8:SUPER-UX:*:*)
1246 echo sx8-nec-superux${UNAME_RELEASE}
1275 echo sx8-nec-superux"$UNAME_RELEASE"
12471276 exit ;;
12481277 SX-8R:SUPER-UX:*:*)
1249 echo sx8r-nec-superux${UNAME_RELEASE}
1278 echo sx8r-nec-superux"$UNAME_RELEASE"
1279 exit ;;
1280 SX-ACE:SUPER-UX:*:*)
1281 echo sxace-nec-superux"$UNAME_RELEASE"
12501282 exit ;;
12511283 Power*:Rhapsody:*:*)
1252 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1284 echo powerpc-apple-rhapsody"$UNAME_RELEASE"
12531285 exit ;;
12541286 *:Rhapsody:*:*)
1255 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1287 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
12561288 exit ;;
12571289 *:Darwin:*:*)
12581290 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1259 eval $set_cc_for_build
1291 eval "$set_cc_for_build"
12601292 if test "$UNAME_PROCESSOR" = unknown ; then
12611293 UNAME_PROCESSOR=powerpc
12621294 fi
1263 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1264 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1295 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1296 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
12651297 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1266 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1267 grep IS_64BIT_ARCH >/dev/null
1298 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1299 grep IS_64BIT_ARCH >/dev/null
12681300 then
12691301 case $UNAME_PROCESSOR in
12701302 i386) UNAME_PROCESSOR=x86_64 ;;
12711303 powerpc) UNAME_PROCESSOR=powerpc64 ;;
12721304 esac
1305 fi
1306 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1307 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1308 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1309 grep IS_PPC >/dev/null
1310 then
1311 UNAME_PROCESSOR=powerpc
12731312 fi
12741313 fi
12751314 elif test "$UNAME_PROCESSOR" = i386 ; then
12811320 # that Apple uses in portable devices.
12821321 UNAME_PROCESSOR=x86_64
12831322 fi
1284 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1323 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
12851324 exit ;;
12861325 *:procnto*:*:* | *:QNX:[0123456789]*:*)
12871326 UNAME_PROCESSOR=`uname -p`
1288 if test "$UNAME_PROCESSOR" = "x86"; then
1327 if test "$UNAME_PROCESSOR" = x86; then
12891328 UNAME_PROCESSOR=i386
12901329 UNAME_MACHINE=pc
12911330 fi
1292 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1331 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
12931332 exit ;;
12941333 *:QNX:*:4*)
12951334 echo i386-pc-qnx
12961335 exit ;;
1297 NEO-?:NONSTOP_KERNEL:*:*)
1298 echo neo-tandem-nsk${UNAME_RELEASE}
1336 NEO-*:NONSTOP_KERNEL:*:*)
1337 echo neo-tandem-nsk"$UNAME_RELEASE"
12991338 exit ;;
13001339 NSE-*:NONSTOP_KERNEL:*:*)
1301 echo nse-tandem-nsk${UNAME_RELEASE}
1302 exit ;;
1303 NSR-?:NONSTOP_KERNEL:*:*)
1304 echo nsr-tandem-nsk${UNAME_RELEASE}
1340 echo nse-tandem-nsk"$UNAME_RELEASE"
1341 exit ;;
1342 NSR-*:NONSTOP_KERNEL:*:*)
1343 echo nsr-tandem-nsk"$UNAME_RELEASE"
1344 exit ;;
1345 NSV-*:NONSTOP_KERNEL:*:*)
1346 echo nsv-tandem-nsk"$UNAME_RELEASE"
1347 exit ;;
1348 NSX-*:NONSTOP_KERNEL:*:*)
1349 echo nsx-tandem-nsk"$UNAME_RELEASE"
13051350 exit ;;
13061351 *:NonStop-UX:*:*)
13071352 echo mips-compaq-nonstopux
13101355 echo bs2000-siemens-sysv
13111356 exit ;;
13121357 DS/*:UNIX_System_V:*:*)
1313 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1358 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
13141359 exit ;;
13151360 *:Plan9:*:*)
13161361 # "uname -m" is not consistent, so use $cputype instead. 386
13171362 # is converted to i386 for consistency with other x86
13181363 # operating systems.
1319 if test "$cputype" = "386"; then
1364 if test "$cputype" = 386; then
13201365 UNAME_MACHINE=i386
13211366 else
13221367 UNAME_MACHINE="$cputype"
13231368 fi
1324 echo ${UNAME_MACHINE}-unknown-plan9
1369 echo "$UNAME_MACHINE"-unknown-plan9
13251370 exit ;;
13261371 *:TOPS-10:*:*)
13271372 echo pdp10-unknown-tops10
13421387 echo pdp10-unknown-its
13431388 exit ;;
13441389 SEI:*:*:SEIUX)
1345 echo mips-sei-seiux${UNAME_RELEASE}
1390 echo mips-sei-seiux"$UNAME_RELEASE"
13461391 exit ;;
13471392 *:DragonFly:*:*)
1348 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1393 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
13491394 exit ;;
13501395 *:*VMS:*:*)
13511396 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1352 case "${UNAME_MACHINE}" in
1397 case "$UNAME_MACHINE" in
13531398 A*) echo alpha-dec-vms ; exit ;;
13541399 I*) echo ia64-dec-vms ; exit ;;
13551400 V*) echo vax-dec-vms ; exit ;;
13581403 echo i386-pc-xenix
13591404 exit ;;
13601405 i*86:skyos:*:*)
1361 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1406 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
13621407 exit ;;
13631408 i*86:rdos:*:*)
1364 echo ${UNAME_MACHINE}-pc-rdos
1409 echo "$UNAME_MACHINE"-pc-rdos
13651410 exit ;;
13661411 i*86:AROS:*:*)
1367 echo ${UNAME_MACHINE}-pc-aros
1412 echo "$UNAME_MACHINE"-pc-aros
13681413 exit ;;
13691414 x86_64:VMkernel:*:*)
1370 echo ${UNAME_MACHINE}-unknown-esx
1415 echo "$UNAME_MACHINE"-unknown-esx
1416 exit ;;
1417 amd64:Isilon\ OneFS:*:*)
1418 echo x86_64-unknown-onefs
13711419 exit ;;
13721420 esac
13731421
1422 echo "$0: unable to guess system type" >&2
1423
1424 case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1425 mips:Linux | mips64:Linux)
1426 # If we got here on MIPS GNU/Linux, output extra information.
1427 cat >&2 <<EOF
1428
1429 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1430 the system type. Please install a C compiler and try again.
1431 EOF
1432 ;;
1433 esac
1434
13741435 cat >&2 <<EOF
1375 $0: unable to guess system type
1376
1377 This script, last modified $timestamp, has failed to recognize
1378 the operating system you are using. It is advised that you
1379 download the most up to date version of the config scripts from
1380
1381 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1436
1437 This script (version $timestamp), has failed to recognize the
1438 operating system you are using. If your script is old, overwrite *all*
1439 copies of config.guess and config.sub with the latest versions from:
1440
1441 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
13821442 and
1383 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1384
1385 If the version you run ($0) is already up to date, please
1386 send the following data and any information you think might be
1387 pertinent to <config-patches@gnu.org> in order to provide the needed
1388 information to handle your system.
1443 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1444
1445 If $0 has already been updated, send the following data and any
1446 information you think might be pertinent to config-patches@gnu.org to
1447 provide the necessary information to handle your system.
13891448
13901449 config.guess timestamp = $timestamp
13911450
14041463 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
14051464 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
14061465
1407 UNAME_MACHINE = ${UNAME_MACHINE}
1408 UNAME_RELEASE = ${UNAME_RELEASE}
1409 UNAME_SYSTEM = ${UNAME_SYSTEM}
1410 UNAME_VERSION = ${UNAME_VERSION}
1466 UNAME_MACHINE = "$UNAME_MACHINE"
1467 UNAME_RELEASE = "$UNAME_RELEASE"
1468 UNAME_SYSTEM = "$UNAME_SYSTEM"
1469 UNAME_VERSION = "$UNAME_VERSION"
14111470 EOF
14121471
14131472 exit 1
14141473
14151474 # Local variables:
1416 # eval: (add-hook 'write-file-hooks 'time-stamp)
1475 # eval: (add-hook 'write-file-functions 'time-stamp)
14171476 # time-stamp-start: "timestamp='"
14181477 # time-stamp-format: "%:y-%02m-%02d"
14191478 # time-stamp-end: "'"
00 #! /bin/sh
11 # Configuration validation subroutine script.
2 # Copyright 1992-2015 Free Software Foundation, Inc.
3
4 timestamp='2015-01-01'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-22'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
1414 # General Public License for more details.
1515 #
1616 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
1818 #
1919 # As a special exception to the GNU General Public License, if you
2020 # distribute this file as part of a program that contains a
3232 # Otherwise, we print the canonical config type on stdout and succeed.
3333
3434 # You can get the latest version of this script from:
35 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
35 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
3636
3737 # This file is supposed to be the same for all GNU packages
3838 # and recognize all the CPU types, system types and aliases
5252 me=`echo "$0" | sed -e 's,.*/,,'`
5353
5454 usage="\
55 Usage: $0 [OPTION] CPU-MFR-OPSYS
56 $0 [OPTION] ALIAS
55 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
5756
5857 Canonicalize a configuration name.
5958
60 Operation modes:
59 Options:
6160 -h, --help print this help, then exit
6261 -t, --time-stamp print date of last modification, then exit
6362 -v, --version print version number, then exit
6766 version="\
6867 GNU config.sub ($timestamp)
6968
70 Copyright 1992-2015 Free Software Foundation, Inc.
69 Copyright 1992-2018 Free Software Foundation, Inc.
7170
7271 This is free software; see the source for copying conditions. There is NO
7372 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
9493
9594 *local*)
9695 # First pass through any local machine types.
97 echo $1
96 echo "$1"
9897 exit ;;
9998
10099 * )
112111
113112 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
114113 # Here we must recognize all the valid KERNEL-OS combinations.
115 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
114 maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
116115 case $maybe_os in
117116 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
118117 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119 knetbsd*-gnu* | netbsd*-gnu* | \
120 kopensolaris*-gnu* | \
118 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
119 kopensolaris*-gnu* | cloudabi*-eabi* | \
121120 storm-chaos* | os2-emx* | rtmk-nova*)
122121 os=-$maybe_os
123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
122 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
124123 ;;
125124 android-linux)
126125 os=-linux-android
127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
126 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
128127 ;;
129128 *)
130 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131 if [ $basic_machine != $1 ]
132 then os=`echo $1 | sed 's/.*-/-/'`
129 basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
130 if [ "$basic_machine" != "$1" ]
131 then os=`echo "$1" | sed 's/.*-/-/'`
133132 else os=; fi
134133 ;;
135134 esac
178177 ;;
179178 -sco6)
180179 os=-sco5v6
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
180 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
182181 ;;
183182 -sco5)
184183 os=-sco3.2v5
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
184 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
186185 ;;
187186 -sco4)
188187 os=-sco3.2v4
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
188 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
190189 ;;
191190 -sco3.2.[4-9]*)
192191 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
192 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
194193 ;;
195194 -sco3.2v[4-9]*)
196195 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
196 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
198197 ;;
199198 -sco5v6*)
200199 # Don't forget version if it is 3.2v4 or newer.
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
200 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
202201 ;;
203202 -sco*)
204203 os=-sco3.2v2
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
204 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
206205 ;;
207206 -udk*)
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
209208 ;;
210209 -isc)
211210 os=-isc2.2
212 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
211 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
213212 ;;
214213 -clix*)
215214 basic_machine=clipper-intergraph
216215 ;;
217216 -isc*)
218 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
217 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
219218 ;;
220219 -lynx*178)
221220 os=-lynxos178
227226 os=-lynxos
228227 ;;
229228 -ptx*)
230 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
231 ;;
232 -windowsnt*)
233 os=`echo $os | sed -e 's/windowsnt/winnt/'`
229 basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
234230 ;;
235231 -psos*)
236232 os=-psos
254250 | arc | arceb \
255251 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
256252 | avr | avr32 \
253 | ba \
257254 | be32 | be64 \
258255 | bfin \
259256 | c4x | c8051 | clipper \
260257 | d10v | d30v | dlx | dsp16xx \
261 | epiphany \
258 | e2k | epiphany \
262259 | fido | fr30 | frv | ft32 \
263260 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
264261 | hexagon \
265 | i370 | i860 | i960 | ia64 \
262 | i370 | i860 | i960 | ia16 | ia64 \
266263 | ip2k | iq2000 \
267264 | k1om \
268265 | le32 | le64 \
298295 | nios | nios2 | nios2eb | nios2el \
299296 | ns16k | ns32k \
300297 | open8 | or1k | or1knd | or32 \
301 | pdp10 | pdp11 | pj | pjl \
298 | pdp10 | pj | pjl \
302299 | powerpc | powerpc64 | powerpc64le | powerpcle \
300 | pru \
303301 | pyramid \
304302 | riscv32 | riscv64 \
305303 | rl78 | rx \
306304 | score \
307 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
305 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
308306 | sh64 | sh64le \
309307 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
310308 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
313311 | ubicom32 \
314312 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
315313 | visium \
316 | we32k \
314 | wasm32 \
317315 | x86 | xc16x | xstormy16 | xtensa \
318316 | z8k | z80)
319317 basic_machine=$basic_machine-unknown
334332 basic_machine=$basic_machine-unknown
335333 os=-none
336334 ;;
337 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
335 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
338336 ;;
339337 ms1)
340338 basic_machine=mt-unknown
363361 ;;
364362 # Object if more than one company name word.
365363 *-*-*)
366 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
364 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
367365 exit 1
368366 ;;
369367 # Recognize the basic CPU types with company name.
375373 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
376374 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
377375 | avr-* | avr32-* \
376 | ba-* \
378377 | be32-* | be64-* \
379378 | bfin-* | bs2000-* \
380379 | c[123]* | c30-* | [cjt]90-* | c4x-* \
381380 | c8051-* | clipper-* | craynv-* | cydra-* \
382381 | d10v-* | d30v-* | dlx-* \
383 | elxsi-* \
382 | e2k-* | elxsi-* \
384383 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
385384 | h8300-* | h8500-* \
386385 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
387386 | hexagon-* \
388 | i*86-* | i860-* | i960-* | ia64-* \
387 | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
389388 | ip2k-* | iq2000-* \
390389 | k1om-* \
391390 | le32-* | le64-* \
426425 | orion-* \
427426 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
428427 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
428 | pru-* \
429429 | pyramid-* \
430 | riscv32-* | riscv64-* \
430431 | rl78-* | romp-* | rs6000-* | rx-* \
431432 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
432433 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
433434 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
434435 | sparclite-* \
435 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
436 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
436437 | tahoe-* \
437438 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
438439 | tile*-* \
441442 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
442443 | vax-* \
443444 | visium-* \
445 | wasm32-* \
444446 | we32k-* \
445447 | x86-* | x86_64-* | xc16x-* | xps100-* \
446448 | xstormy16-* | xtensa*-* \
454456 # Recognize the various machine names and aliases which stand
455457 # for a CPU type and a company and sometimes even an OS.
456458 386bsd)
457 basic_machine=i386-unknown
459 basic_machine=i386-pc
458460 os=-bsd
459461 ;;
460462 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
488490 basic_machine=x86_64-pc
489491 ;;
490492 amd64-*)
491 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
493 basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
492494 ;;
493495 amdahl)
494496 basic_machine=580-amdahl
517519 basic_machine=i386-pc
518520 os=-aros
519521 ;;
522 asmjs)
523 basic_machine=asmjs-unknown
524 ;;
520525 aux)
521526 basic_machine=m68k-apple
522527 os=-aux
530535 os=-linux
531536 ;;
532537 blackfin-*)
533 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
538 basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
534539 os=-linux
535540 ;;
536541 bluegene*)
538543 os=-cnk
539544 ;;
540545 c54x-*)
541 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
546 basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
542547 ;;
543548 c55x-*)
544 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
549 basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
545550 ;;
546551 c6x-*)
547 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
552 basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
548553 ;;
549554 c90)
550555 basic_machine=c90-cray
633638 basic_machine=rs6000-bull
634639 os=-bosx
635640 ;;
636 dpx2* | dpx2*-bull)
641 dpx2*)
637642 basic_machine=m68k-bull
638643 os=-sysv3
644 ;;
645 e500v[12])
646 basic_machine=powerpc-unknown
647 os=$os"spe"
648 ;;
649 e500v[12]-*)
650 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
651 os=$os"spe"
639652 ;;
640653 ebmon29k)
641654 basic_machine=a29k-amd
726739 hp9k8[0-9][0-9] | hp8[0-9][0-9])
727740 basic_machine=hppa1.0-hp
728741 ;;
729 hppa-next)
730 os=-nextstep3
731 ;;
732742 hppaosf)
733743 basic_machine=hppa1.1-hp
734744 os=-osf
741751 basic_machine=i370-ibm
742752 ;;
743753 i*86v32)
744 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
754 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
745755 os=-sysv32
746756 ;;
747757 i*86v4*)
748 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
758 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
749759 os=-sysv4
750760 ;;
751761 i*86v)
752 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
762 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
753763 os=-sysv
754764 ;;
755765 i*86sol2)
756 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
766 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
757767 os=-solaris2
758768 ;;
759769 i386mach)
760770 basic_machine=i386-mach
761771 os=-mach
762772 ;;
763 i386-vsta | vsta)
773 vsta)
764774 basic_machine=i386-unknown
765775 os=-vsta
766776 ;;
779789 os=-sysv
780790 ;;
781791 leon-*|leon[3-9]-*)
782 basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
792 basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
783793 ;;
784794 m68knommu)
785795 basic_machine=m68k-unknown
786796 os=-linux
787797 ;;
788798 m68knommu-*)
789 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
799 basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
790800 os=-linux
791 ;;
792 m88k-omron*)
793 basic_machine=m88k-omron
794801 ;;
795802 magnum | m3230)
796803 basic_machine=mips-mips
823830 os=-mint
824831 ;;
825832 mips3*-*)
826 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
833 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
827834 ;;
828835 mips3*)
829 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
836 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
830837 ;;
831838 monitor)
832839 basic_machine=m68k-rom68k
845852 os=-msdos
846853 ;;
847854 ms1-*)
848 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
855 basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
849856 ;;
850857 msys)
851858 basic_machine=i686-pc
887894 basic_machine=v70-nec
888895 os=-sysv
889896 ;;
890 next | m*-next )
897 next | m*-next)
891898 basic_machine=m68k-next
892899 case $os in
893900 -nextstep* )
932939 nsr-tandem)
933940 basic_machine=nsr-tandem
934941 ;;
942 nsv-tandem)
943 basic_machine=nsv-tandem
944 ;;
945 nsx-tandem)
946 basic_machine=nsx-tandem
947 ;;
935948 op50n-* | op60c-*)
936949 basic_machine=hppa1.1-oki
937950 os=-proelf
964977 os=-linux
965978 ;;
966979 parisc-*)
967 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
980 basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
968981 os=-linux
969982 ;;
970983 pbd)
980993 basic_machine=i386-pc
981994 ;;
982995 pc98-*)
983 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
996 basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
984997 ;;
985998 pentium | p5 | k5 | k6 | nexgen | viac3)
986999 basic_machine=i586-pc
9951008 basic_machine=i786-pc
9961009 ;;
9971010 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
998 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
1011 basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
9991012 ;;
10001013 pentiumpro-* | p6-* | 6x86-* | athlon-*)
1001 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1014 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10021015 ;;
10031016 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1004 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1017 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10051018 ;;
10061019 pentium4-*)
1007 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1020 basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10081021 ;;
10091022 pn)
10101023 basic_machine=pn-gould
10141027 ppc | ppcbe) basic_machine=powerpc-unknown
10151028 ;;
10161029 ppc-* | ppcbe-*)
1017 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1018 ;;
1019 ppcle | powerpclittle | ppc-le | powerpc-little)
1030 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1031 ;;
1032 ppcle | powerpclittle)
10201033 basic_machine=powerpcle-unknown
10211034 ;;
10221035 ppcle-* | powerpclittle-*)
1023 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1036 basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10241037 ;;
10251038 ppc64) basic_machine=powerpc64-unknown
10261039 ;;
1027 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1028 ;;
1029 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1040 ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1041 ;;
1042 ppc64le | powerpc64little)
10301043 basic_machine=powerpc64le-unknown
10311044 ;;
10321045 ppc64le-* | powerpc64little-*)
1033 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1046 basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
10341047 ;;
10351048 ps2)
10361049 basic_machine=i386-ibm
10841097 sequent)
10851098 basic_machine=i386-sequent
10861099 ;;
1087 sh)
1088 basic_machine=sh-hitachi
1089 os=-hms
1090 ;;
10911100 sh5el)
10921101 basic_machine=sh5le-unknown
10931102 ;;
1094 sh64)
1095 basic_machine=sh64-unknown
1096 ;;
1097 sparclite-wrs | simso-wrs)
1103 simso-wrs)
10981104 basic_machine=sparclite-wrs
10991105 os=-vxworks
11001106 ;;
11131119 os=-sysv4
11141120 ;;
11151121 strongarm-* | thumb-*)
1116 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1122 basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
11171123 ;;
11181124 sun2)
11191125 basic_machine=m68000-sun
12351241 basic_machine=hppa1.1-winbond
12361242 os=-proelf
12371243 ;;
1244 x64)
1245 basic_machine=x86_64-pc
1246 ;;
12381247 xbox)
12391248 basic_machine=i686-pc
12401249 os=-mingw32
12431252 basic_machine=xps100-honeywell
12441253 ;;
12451254 xscale-* | xscalee[bl]-*)
1246 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1255 basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
12471256 ;;
12481257 ymp)
12491258 basic_machine=ymp-cray
12501259 os=-unicos
1251 ;;
1252 z8k-*-coff)
1253 basic_machine=z8k-unknown
1254 os=-sim
1255 ;;
1256 z80-*-coff)
1257 basic_machine=z80-unknown
1258 os=-sim
12591260 ;;
12601261 none)
12611262 basic_machine=none-none
12851286 vax)
12861287 basic_machine=vax-dec
12871288 ;;
1288 pdp10)
1289 # there are many clones, so DEC is not a safe bet
1290 basic_machine=pdp10-unknown
1291 ;;
12921289 pdp11)
12931290 basic_machine=pdp11-dec
12941291 ;;
12981295 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
12991296 basic_machine=sh-unknown
13001297 ;;
1301 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1302 basic_machine=sparc-sun
1303 ;;
13041298 cydra)
13051299 basic_machine=cydra-cydrome
13061300 ;;
13201314 # Make sure to match an already-canonicalized machine name.
13211315 ;;
13221316 *)
1323 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1317 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
13241318 exit 1
13251319 ;;
13261320 esac
13281322 # Here we canonicalize certain aliases for manufacturers.
13291323 case $basic_machine in
13301324 *-digital*)
1331 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1325 basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
13321326 ;;
13331327 *-commodore*)
1334 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1328 basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
13351329 ;;
13361330 *)
13371331 ;;
13421336 if [ x"$os" != x"" ]
13431337 then
13441338 case $os in
1345 # First match some system type aliases
1346 # that might get confused with valid system types.
1339 # First match some system type aliases that might get confused
1340 # with valid system types.
13471341 # -solaris* is a basic system type, with this one exception.
13481342 -auroraux)
13491343 os=-auroraux
13541348 -solaris)
13551349 os=-solaris2
13561350 ;;
1357 -svr4*)
1358 os=-sysv4
1359 ;;
13601351 -unixware*)
13611352 os=-sysv4.2uw
13621353 ;;
13631354 -gnu/linux*)
13641355 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
13651356 ;;
1366 # First accept the basic system types.
1357 # es1800 is here to avoid being matched by es* (a different OS)
1358 -es1800*)
1359 os=-ose
1360 ;;
1361 # Now accept the basic system types.
13671362 # The portable systems comes first.
1368 # Each alternative MUST END IN A *, to match a version number.
1363 # Each alternative MUST end in a * to match a version number.
13691364 # -sysv* is not here because it comes later, after sysvr4.
13701365 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
13711366 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
13721367 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
13731368 | -sym* | -kopensolaris* | -plan9* \
13741369 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1375 | -aos* | -aros* \
1370 | -aos* | -aros* | -cloudabi* | -sortix* \
13761371 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
13771372 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1378 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1379 | -bitrig* | -openbsd* | -solidbsd* \
1373 | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
1374 | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
13801375 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
13811376 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
13821377 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
13831378 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1384 | -chorusos* | -chorusrdb* | -cegcc* \
1379 | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
13851380 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1386 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1381 | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
13871382 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
13881383 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1389 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1384 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
13901385 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
13911386 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
13921387 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1393 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1388 | -morphos* | -superux* | -rtmk* | -windiss* \
13941389 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1395 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1390 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1391 | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
1392 | -midnightbsd*)
13961393 # Remember, each alternative MUST END IN *, to match a version number.
13971394 ;;
13981395 -qnx*)
14091406 -nto*)
14101407 os=`echo $os | sed -e 's|nto|nto-qnx|'`
14111408 ;;
1412 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1413 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1409 -sim | -xray | -os68k* | -v88r* \
1410 | -windows* | -osx | -abug | -netware* | -os9* \
14141411 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
14151412 ;;
14161413 -mac*)
1417 os=`echo $os | sed -e 's|mac|macos|'`
1414 os=`echo "$os" | sed -e 's|mac|macos|'`
14181415 ;;
14191416 -linux-dietlibc)
14201417 os=-linux-dietlibc
14231420 os=`echo $os | sed -e 's|linux|linux-gnu|'`
14241421 ;;
14251422 -sunos5*)
1426 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1423 os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
14271424 ;;
14281425 -sunos6*)
1429 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1426 os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
14301427 ;;
14311428 -opened*)
14321429 os=-openedition
14371434 -wince*)
14381435 os=-wince
14391436 ;;
1440 -osfrose*)
1441 os=-osfrose
1442 ;;
1443 -osf*)
1444 os=-osf
1445 ;;
14461437 -utek*)
14471438 os=-bsd
14481439 ;;
14671458 -nova*)
14681459 os=-rtmk-nova
14691460 ;;
1470 -ns2 )
1461 -ns2)
14711462 os=-nextstep2
14721463 ;;
14731464 -nsk*)
14891480 -oss*)
14901481 os=-sysv3
14911482 ;;
1492 -svr4)
1483 -svr4*)
14931484 os=-sysv4
14941485 ;;
14951486 -svr3)
15041495 -ose*)
15051496 os=-ose
15061497 ;;
1507 -es1800*)
1508 os=-ose
1509 ;;
1510 -xenix)
1511 os=-xenix
1512 ;;
15131498 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
15141499 os=-mint
15151500 ;;
1516 -aros*)
1517 os=-aros
1518 ;;
15191501 -zvmoe)
15201502 os=-zvmoe
15211503 ;;
15221504 -dicos*)
15231505 os=-dicos
15241506 ;;
1507 -pikeos*)
1508 # Until real need of OS specific support for
1509 # particular features comes up, bare metal
1510 # configurations are quite functional.
1511 case $basic_machine in
1512 arm*)
1513 os=-eabi
1514 ;;
1515 *)
1516 os=-elf
1517 ;;
1518 esac
1519 ;;
15251520 -nacl*)
1521 ;;
1522 -ios)
15261523 ;;
15271524 -none)
15281525 ;;
15291526 *)
15301527 # Get rid of the `-' at the beginning of $os.
15311528 os=`echo $os | sed 's/[^-]*-//'`
1532 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1529 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
15331530 exit 1
15341531 ;;
15351532 esac
16191616 sparc-* | *-sun)
16201617 os=-sunos4.1.1
16211618 ;;
1619 pru-*)
1620 os=-elf
1621 ;;
16221622 *-be)
16231623 os=-beos
16241624 ;;
1625 *-haiku)
1626 os=-haiku
1627 ;;
16281625 *-ibm)
16291626 os=-aix
16301627 ;;
16641661 m88k-omron*)
16651662 os=-luna
16661663 ;;
1667 *-next )
1664 *-next)
16681665 os=-nextstep
16691666 ;;
16701667 *-sequent)
16781675 ;;
16791676 i370-*)
16801677 os=-mvs
1681 ;;
1682 *-next)
1683 os=-nextstep3
16841678 ;;
16851679 *-gould)
16861680 os=-sysv
17911785 vendor=stratus
17921786 ;;
17931787 esac
1794 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1788 basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
17951789 ;;
17961790 esac
17971791
1798 echo $basic_machine$os
1792 echo "$basic_machine$os"
17991793 exit
18001794
18011795 # Local variables:
1802 # eval: (add-hook 'write-file-hooks 'time-stamp)
1796 # eval: (add-hook 'write-file-functions 'time-stamp)
18031797 # time-stamp-start: "timestamp='"
18041798 # time-stamp-format: "%:y-%02m-%02d"
18051799 # time-stamp-end: "'"
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for pkgconf 1.6.0.
2 # Generated by GNU Autoconf 2.69 for pkgconf 1.6.3.
33 #
4 # Report bugs to <http://github.com/pkgconf/pkgconf/issues>.
4 # Report bugs to <https://todo.sr.ht/~kaniini/pkgconf>.
55 #
66 #
77 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
274274 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
275275 else
276276 $as_echo "$0: Please tell bug-autoconf@gnu.org and
277 $0: http://github.com/pkgconf/pkgconf/issues about your
278 $0: system, including any error possibly output before this
277 $0: https://todo.sr.ht/~kaniini/pkgconf about your system,
278 $0: including any error possibly output before this
279279 $0: message. Then install a modern shell, or manually run
280280 $0: the script under such a shell if you do have one."
281281 fi
589589 # Identity of this package.
590590 PACKAGE_NAME='pkgconf'
591591 PACKAGE_TARNAME='pkgconf'
592 PACKAGE_VERSION='1.6.0'
593 PACKAGE_STRING='pkgconf 1.6.0'
594 PACKAGE_BUGREPORT='http://github.com/pkgconf/pkgconf/issues'
592 PACKAGE_VERSION='1.6.3'
593 PACKAGE_STRING='pkgconf 1.6.3'
594 PACKAGE_BUGREPORT='https://todo.sr.ht/~kaniini/pkgconf'
595595 PACKAGE_URL=''
596596
597597 ac_unique_file="cli/main.c"
733733 docdir
734734 oldincludedir
735735 includedir
736 runstatedir
736737 localstatedir
737738 sharedstatedir
738739 sysconfdir
819820 sysconfdir='${prefix}/etc'
820821 sharedstatedir='${prefix}/com'
821822 localstatedir='${prefix}/var'
823 runstatedir='${localstatedir}/run'
822824 includedir='${prefix}/include'
823825 oldincludedir='/usr/include'
824826 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
10711073 | -silent | --silent | --silen | --sile | --sil)
10721074 silent=yes ;;
10731075
1076 -runstatedir | --runstatedir | --runstatedi | --runstated \
1077 | --runstate | --runstat | --runsta | --runst | --runs \
1078 | --run | --ru | --r)
1079 ac_prev=runstatedir ;;
1080 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1081 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1082 | --run=* | --ru=* | --r=*)
1083 runstatedir=$ac_optarg ;;
1084
10741085 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
10751086 ac_prev=sbindir ;;
10761087 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
12081219 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
12091220 datadir sysconfdir sharedstatedir localstatedir includedir \
12101221 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1211 libdir localedir mandir
1222 libdir localedir mandir runstatedir
12121223 do
12131224 eval ac_val=\$$ac_var
12141225 # Remove trailing slashes.
13211332 # Omit some internal or obsolete options to make the list less imposing.
13221333 # This message is too long to be a string in the A/UX 3.1 sh.
13231334 cat <<_ACEOF
1324 \`configure' configures pkgconf 1.6.0 to adapt to many kinds of systems.
1335 \`configure' configures pkgconf 1.6.3 to adapt to many kinds of systems.
13251336
13261337 Usage: $0 [OPTION]... [VAR=VALUE]...
13271338
13611372 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
13621373 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
13631374 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1375 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
13641376 --libdir=DIR object code libraries [EPREFIX/lib]
13651377 --includedir=DIR C header files [PREFIX/include]
13661378 --oldincludedir=DIR C header files for non-gcc [/usr/include]
13911403
13921404 if test -n "$ac_init_help"; then
13931405 case $ac_init_help in
1394 short | recursive ) echo "Configuration of pkgconf 1.6.0:";;
1406 short | recursive ) echo "Configuration of pkgconf 1.6.3:";;
13951407 esac
13961408 cat <<\_ACEOF
13971409
14471459 Use these variables to override the choices made by `configure' or to help
14481460 it to find libraries and programs with nonstandard names/locations.
14491461
1450 Report bugs to <http://github.com/pkgconf/pkgconf/issues>.
1462 Report bugs to <https://todo.sr.ht/~kaniini/pkgconf>.
14511463 _ACEOF
14521464 ac_status=$?
14531465 fi
15101522 test -n "$ac_init_help" && exit $ac_status
15111523 if $ac_init_version; then
15121524 cat <<\_ACEOF
1513 pkgconf configure 1.6.0
1525 pkgconf configure 1.6.3
15141526 generated by GNU Autoconf 2.69
15151527
15161528 Copyright (C) 2012 Free Software Foundation, Inc.
17821794 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
17831795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
17841796 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1785 ( $as_echo "## ------------------------------------------------------- ##
1786 ## Report this to http://github.com/pkgconf/pkgconf/issues ##
1787 ## ------------------------------------------------------- ##"
1797 ( $as_echo "## -------------------------------------------------- ##
1798 ## Report this to https://todo.sr.ht/~kaniini/pkgconf ##
1799 ## -------------------------------------------------- ##"
17881800 ) | sed "s/^/$as_me: WARNING: /" >&2
17891801 ;;
17901802 esac
18791891 This file contains any messages produced by compilers while
18801892 running configure, to aid debugging if configure makes a mistake.
18811893
1882 It was created by pkgconf $as_me 1.6.0, which was
1894 It was created by pkgconf $as_me 1.6.3, which was
18831895 generated by GNU Autoconf 2.69. Invocation command line was
18841896
18851897 $ $0 $@
42554267
42564268 # Define the identity of the package.
42574269 PACKAGE='pkgconf'
4258 VERSION='1.6.0'
4270 VERSION='1.6.3'
42594271
42604272
42614273 cat >>confdefs.h <<_ACEOF
56945706 lt_cv_deplibs_check_method=pass_all
56955707 ;;
56965708
5697 netbsd*)
5709 netbsd* | netbsdelf*-gnu)
56985710 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
56995711 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
57005712 else
83948406 $RM -r conftest*
83958407
83968408
8409 ## CAVEAT EMPTOR:
8410 ## There is no encapsulation within the following macros, do not change
8411 ## the running order or otherwise move them around unless you know exactly
8412 ## what you are doing...
83978413 if test -n "$compiler"; then
83988414
83998415 lt_prog_compiler_no_builtin_flag=
91159131 openbsd* | bitrig*)
91169132 with_gnu_ld=no
91179133 ;;
9134 linux* | k*bsd*-gnu | gnu*)
9135 link_all_deplibs=no
9136 ;;
91189137 esac
91199138
91209139 ld_shlibs=yes
93699388 fi
93709389 ;;
93719390
9372 netbsd*)
9391 netbsd* | netbsdelf*-gnu)
93739392 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
93749393 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
93759394 wlarc=
1003910058 if test yes = "$lt_cv_irix_exported_symbol"; then
1004010059 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
1004110060 fi
10061 link_all_deplibs=no
1004210062 else
1004310063 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
1004410064 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
1006010080 esac
1006110081 ;;
1006210082
10063 netbsd*)
10083 netbsd* | netbsdelf*-gnu)
1006410084 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
1006510085 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1006610086 else
1117511195 dynamic_linker='GNU/Linux ld.so'
1117611196 ;;
1117711197
11198 netbsdelf*-gnu)
11199 version_type=linux
11200 need_lib_prefix=no
11201 need_version=no
11202 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11203 soname_spec='${libname}${release}${shared_ext}$major'
11204 shlibpath_var=LD_LIBRARY_PATH
11205 shlibpath_overrides_runpath=no
11206 hardcode_into_libs=yes
11207 dynamic_linker='NetBSD ld.elf_so'
11208 ;;
11209
1117811210 netbsd*)
1117911211 version_type=sunos
1118011212 need_lib_prefix=no
1220812240 We can't simply define LARGE_OFF_T to be 9223372036854775807,
1220912241 since some C++ compilers masquerading as C compilers
1221012242 incorrectly reject 9223372036854775807. */
12211 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12243 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
1221212244 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1221312245 && LARGE_OFF_T % 2147483647 == 1)
1221412246 ? 1 : -1];
1225412286 We can't simply define LARGE_OFF_T to be 9223372036854775807,
1225512287 since some C++ compilers masquerading as C compilers
1225612288 incorrectly reject 9223372036854775807. */
12257 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12289 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
1225812290 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1225912291 && LARGE_OFF_T % 2147483647 == 1)
1226012292 ? 1 : -1];
1227812310 We can't simply define LARGE_OFF_T to be 9223372036854775807,
1227912311 since some C++ compilers masquerading as C compilers
1228012312 incorrectly reject 9223372036854775807. */
12281 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12313 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
1228212314 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1228312315 && LARGE_OFF_T % 2147483647 == 1)
1228412316 ? 1 : -1];
1232312355 We can't simply define LARGE_OFF_T to be 9223372036854775807,
1232412356 since some C++ compilers masquerading as C compilers
1232512357 incorrectly reject 9223372036854775807. */
12326 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12358 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
1232712359 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1232812360 && LARGE_OFF_T % 2147483647 == 1)
1232912361 ? 1 : -1];
1234712379 We can't simply define LARGE_OFF_T to be 9223372036854775807,
1234812380 since some C++ compilers masquerading as C compilers
1234912381 incorrectly reject 9223372036854775807. */
12350 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12382 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
1235112383 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1235212384 && LARGE_OFF_T % 2147483647 == 1)
1235312385 ? 1 : -1];
1370813740 # report actual input values of CONFIG_FILES etc. instead of their
1370913741 # values after options handling.
1371013742 ac_log="
13711 This file was extended by pkgconf $as_me 1.6.0, which was
13743 This file was extended by pkgconf $as_me 1.6.3, which was
1371213744 generated by GNU Autoconf 2.69. Invocation command line was
1371313745
1371413746 CONFIG_FILES = $CONFIG_FILES
1376813800 Configuration commands:
1376913801 $config_commands
1377013802
13771 Report bugs to <http://github.com/pkgconf/pkgconf/issues>."
13803 Report bugs to <https://todo.sr.ht/~kaniini/pkgconf>."
1377213804
1377313805 _ACEOF
1377413806 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1377513807 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1377613808 ac_cs_version="\\
13777 pkgconf config.status 1.6.0
13809 pkgconf config.status 1.6.3
1377813810 configured by $0, generated by GNU Autoconf 2.69,
1377913811 with options \\"\$ac_cs_config\\"
1378013812
1489714929 cat <<_LT_EOF >> "$cfgfile"
1489814930 #! $SHELL
1489914931 # Generated automatically by $as_me ($PACKAGE) $VERSION
14900 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1490114932 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1490214933
1490314934 # Provide generalized library-building support services.
1111 dnl from the use of this software.
1212
1313 AC_PREREQ([2.68])
14 AC_INIT([pkgconf], [1.6.0], [http://github.com/pkgconf/pkgconf/issues])
14 AC_INIT([pkgconf], [1.6.3], [https://todo.sr.ht/~kaniini/pkgconf])
1515 AC_CONFIG_SRCDIR([cli/main.c])
1616 AC_CONFIG_MACRO_DIRS([m4])
1717 AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
0 pkgconf (1.6.3-1) UNRELEASED; urgency=medium
1
2 * New upstream release (2019-07-12)
3 + Numerous bug fixes, including:
4 - An empty PKG_CONFIG_LIBDIR didn't eliminate the default search paths.
5 - Fix version tokenisation
6 + Added missing option (--modversion) to the pkgconf(1) manpage.
7
8 -- Nicolas Braud-Santoni <nicoo@debian.org> Fri, 12 Jul 2019 14:15:40 +0200
9
010 pkgconf (1.6.0-1) unstable; urgency=medium
111
212 [ Ondřej Nový ]
00 #! /usr/bin/make -f
11
2 DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
3 DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
4 DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
2 include /usr/share/dpkg/architecture.mk
3
4 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
5 DPKG_EXPORT_BUILDFLAGS = 1
6 include /usr/share/dpkg/buildflags.mk
57
68 ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
79 SET_PKG_CONFIG = PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config
00 #! /bin/sh
11 # depcomp - compile a program generating dependencies as side-effects
22
3 scriptversion=2013-05-30.07; # UTC
4
5 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
3 scriptversion=2016-01-11.22; # UTC
4
5 # Copyright (C) 1999-2017 Free Software Foundation, Inc.
66
77 # This program is free software; you can redistribute it and/or modify
88 # it under the terms of the GNU General Public License as published by
785785 # eval: (add-hook 'write-file-hooks 'time-stamp)
786786 # time-stamp-start: "scriptversion="
787787 # time-stamp-format: "%:y-%02m-%02d.%02H"
788 # time-stamp-time-zone: "UTC"
788 # time-stamp-time-zone: "UTC0"
789789 # time-stamp-end: "; # UTC"
790790 # End:
00 #!/bin/sh
11 # install - install a program, script, or datafile
22
3 scriptversion=2013-12-25.23; # UTC
3 scriptversion=2014-09-12.12; # UTC
44
55 # This originates from X11R5 (mit/util/scripts/install.sh), which was
66 # later released in X11R6 (xc/config/util/install.sh) with the
323323 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
324324 ;;
325325 *)
326 # $RANDOM is not portable (e.g. dash); use it when possible to
327 # lower collision chance
326328 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
327 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
328
329 trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
330
331 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
332 # create the $tmpdir first (and fail if unsuccessful) to make sure
333 # that nobody tries to guess the $tmpdir name.
329334 if (umask $mkdir_umask &&
330 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
335 $mkdirprog $mkdir_mode "$tmpdir" &&
336 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
331337 then
332338 if test -z "$dir_arg" || {
333339 # Check for POSIX incompatibilities with -m.
334340 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
335341 # other-writable bit of parent directory when it shouldn't.
336342 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
337 ls_ld_tmpdir=`ls -ld "$tmpdir"`
343 test_tmpdir="$tmpdir/a"
344 ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
338345 case $ls_ld_tmpdir in
339346 d????-?r-*) different_mode=700;;
340347 d????-?--*) different_mode=755;;
341348 *) false;;
342349 esac &&
343 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
344 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
350 $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
351 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
345352 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
346353 }
347354 }
348355 then posix_mkdir=:
349356 fi
350 rmdir "$tmpdir/d" "$tmpdir"
357 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
351358 else
352359 # Remove any dirs left behind by ancient mkdir implementations.
353 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
360 rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
354361 fi
355362 trap '' 0;;
356363 esac;;
+0
-36
libpkgconf/CMakeLists.txt less more
0 PROJECT(libpkgconf C)
1
2 # Enforce visibiliity restrictions when building shared libraries on Unix.
3 SET(CMAKE_CXX_VISIBILITY_PRESET hidden)
4 ADD_DEFINITIONS(-DLIBPKGCONF_EXPORT)
5
6 ADD_LIBRARY(libpkgconf SHARED
7 argvsplit.c
8 audit.c
9 bsdstubs.c
10 cache.c
11 client.c
12 dependency.c
13 fileio.c
14 fragment.c
15 parser.c
16 path.c
17 personality.c
18 pkg.c
19 queue.c
20 tuple.c
21 )
22 SET_TARGET_PROPERTIES(libpkgconf PROPERTIES VERSION ${LIBPKGCONF_VERSION} SOVERSION ${LIBPKGCONF_SOVERSION})
23 INSTALL(TARGETS libpkgconf
24 RUNTIME DESTINATION bin
25 LIBRARY DESTINATION lib
26 ARCHIVE DESTINATION lib
27 )
28 INSTALL(
29 FILES bsdstubs.h iter.h libpkgconf.h libpkgconf-api.h stdinc.h
30 DESTINATION include/libpkgconf
31 )
32
33 # Hypothesis: .pc files are a Unix thing, should always have unix line endings.
34 CONFIGURE_FILE(${pkgconf_SOURCE_DIR}/libpkgconf.pc.in libpkgconf.pc @ONLY NEWLINE_STYLE UNIX)
35 INSTALL(FILES ${libpkgconf_BINARY_DIR}/libpkgconf.pc DESTINATION lib/pkgconfig)
1212 * from the use of this software.
1313 */
1414
15 #ifndef __BSDSTUBS_H__
16 #define __BSDSTUBS_H__
15 #ifndef LIBPKGCONF_BSDSTUBS_H
16 #define LIBPKGCONF_BSDSTUBS_H
1717
1818 #include <libpkgconf/libpkgconf-api.h>
1919
1212 * from the use of this software.
1313 */
1414
15 #include <libpkgconf/config.h>
1516 #include <libpkgconf/stdinc.h>
1617 #include <libpkgconf/libpkgconf.h>
17 #include <libpkgconf/config.h>
1818
1919 /*
2020 * !doc
6161 {
6262 pkgconf_path_build_from_environ("PKG_CONFIG_PATH", NULL, &client->dir_list, true);
6363
64 if (!(client->flags & PKGCONF_PKG_PKGF_ENV_ONLY) && (pkgconf_path_build_from_environ("PKG_CONFIG_LIBDIR", NULL, &client->dir_list, true)) < 1)
65 pkgconf_path_copy_list(&client->dir_list, &personality->dir_list);
64 if (!(client->flags & PKGCONF_PKG_PKGF_ENV_ONLY))
65 {
66 pkgconf_list_t dir_list = PKGCONF_LIST_INITIALIZER;
67 const pkgconf_list_t *prepend_list = &personality->dir_list;
68
69 if (getenv("PKG_CONFIG_LIBDIR") != NULL)
70 {
71 /* PKG_CONFIG_LIBDIR= should empty the search path entirely. */
72 (void) pkgconf_path_build_from_environ("PKG_CONFIG_LIBDIR", NULL, &dir_list, true);
73 prepend_list = &dir_list;
74 }
75
76 pkgconf_path_copy_list(&client->dir_list, prepend_list);
77 pkgconf_path_free(&dir_list);
78 }
6679 }
6780
6881 /*
8598 client->error_handler = error_handler;
8699 client->auditf = NULL;
87100
101 #ifndef PKGCONF_LITE
88102 if (client->trace_handler == NULL)
89103 pkgconf_client_set_trace_handler(client, NULL, NULL);
104 #endif
90105
91106 pkgconf_client_set_error_handler(client, error_handler, error_handler_data);
92107 pkgconf_client_set_warn_handler(client, NULL, NULL);
553568 }
554569 }
555570
571 #ifndef PKGCONF_LITE
556572 /*
557573 * !doc
558574 *
593609 PKGCONF_TRACE(client, "installing default trace handler");
594610 }
595611 }
612 #endif
1212 * from the use of this software.
1313 */
1414
15 #ifndef PKGCONF__ITER_H
16 #define PKGCONF__ITER_H
15 #ifndef LIBPKGCONF_ITER_H
16 #define LIBPKGCONF_ITER_H
1717
1818 #ifdef __cplusplus
1919 extern "C" {
0 #ifndef PKGCONFG_API
1 #define PKGCONFG_API
0 #ifndef LIBPKGCONF_LIBPKGCONF_API_H
1 #define LIBPKGCONF_LIBPKGCONF_API_H
22
33 /* Makefile.am specifies visibility using the libtool option -export-symbols-regex '^pkgconf_'
44 * Unfortunately, that is not available when building with cmake, so use attributes instead,
4040 #define PKG_DIR_SEP_S '/'
4141 #endif
4242
43 #ifdef _WIN32
44 #define realpath(N,R) _fullpath((R),(N),_MAX_PATH)
45 #endif
46
4347 #define PKGCONF_BUFSIZE (65535)
4448
4549 typedef enum {
7377 #define PKGCONF_FOREACH_LIST_ENTRY_REVERSE(tail, value) \
7478 for ((value) = (tail); (value) != NULL; (value) = (value)->prev)
7579
76 #define LIBPKGCONF_VERSION 10600
77 #define LIBPKGCONF_VERSION_STR "1.6.0"
80 #define LIBPKGCONF_VERSION 10603
81 #define LIBPKGCONF_VERSION_STR "1.6.3"
7882
7983 struct pkgconf_fragment_ {
8084 pkgconf_node_t iter;
273277 PKGCONF_API bool pkgconf_trace(const pkgconf_client_t *client, const char *filename, size_t lineno, const char *funcname, const char *format, ...) PRINTFLIKE(5, 6);
274278 PKGCONF_API bool pkgconf_default_error_handler(const char *msg, const pkgconf_client_t *client, const void *data);
275279
280 #ifndef PKGCONF_LITE
276281 #if defined(__GNUC__) || defined(__INTEL_COMPILER)
277282 #define PKGCONF_TRACE(client, ...) do { \
278283 pkgconf_trace(client, __FILE__, __LINE__, __PRETTY_FUNCTION__, __VA_ARGS__); \
281286 #define PKGCONF_TRACE(client, ...) do { \
282287 pkgconf_trace(client, __FILE__, __LINE__, __func__, __VA_ARGS__); \
283288 } while (0);
289 #endif
290 #else
291 #define PKGCONF_TRACE(client, ...)
284292 #endif
285293
286294 PKGCONF_API pkgconf_pkg_t *pkgconf_pkg_ref(pkgconf_client_t *client, pkgconf_pkg_t *pkg);
1212 * from the use of this software.
1313 */
1414
15 #include <libpkgconf/config.h>
1516 #include <libpkgconf/stdinc.h>
16 #include <libpkgconf/config.h>
1717 #include <libpkgconf/libpkgconf.h>
1818
1919 /*
1212 * from the use of this software.
1313 */
1414
15 #include <libpkgconf/config.h>
1516 #include <libpkgconf/stdinc.h>
1617 #include <libpkgconf/libpkgconf.h>
17 #include <libpkgconf/config.h>
1818
1919 #if defined(HAVE_CYGWIN_CONV_PATH) && defined(__MSYS__)
2020 # include <sys/cygwin.h>
9191 return;
9292 if (S_ISLNK(st.st_mode))
9393 {
94 char linkdest[PKGCONF_ITEM_SIZE];
95 ssize_t len;
96
97 memset(linkdest, '\0', sizeof linkdest);
98 len = readlink(path, linkdest, sizeof linkdest);
99
100 if (len != -1 && (size_t)len < sizeof(linkdest) &&
101 stat(linkdest, &st) == -1)
94 char *linkdest = realpath(path, NULL);
95
96 if (linkdest != NULL && stat(linkdest, &st) == -1)
97 {
98 free(linkdest);
10299 return;
100 }
101
102 free(linkdest);
103103 }
104104 if (path_list_contains_entry(path, dirlist, &st))
105105 return;
1212 * from the use of this software.
1313 */
1414
15 #include <libpkgconf/config.h>
1516 #include <libpkgconf/stdinc.h>
1617 #include <libpkgconf/libpkgconf.h>
17 #include <libpkgconf/config.h>
1818
1919 #ifdef _WIN32
2020 # define strcasecmp _stricmp
9898 return &default_personality;
9999 }
100100
101 #ifndef PKGCONF_LITE
101102 static bool
102103 valid_triplet(const char *triplet)
103104 {
248249 pkgconf_path_free(&plist);
249250 return out;
250251 }
252 #endif
1212 * from the use of this software.
1313 */
1414
15 #include <libpkgconf/config.h>
1516 #include <libpkgconf/stdinc.h>
16 #include <libpkgconf/config.h>
1717 #include <libpkgconf/libpkgconf.h>
1818
1919 /*
8484
8585 char **dest = (char **)((char *) pkg + offset);
8686 *dest = pkgconf_tuple_parse(client, &pkg->vars, value);
87 }
88
89 static void
90 pkgconf_pkg_parser_version_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value)
91 {
92 (void) keyword;
93 (void) lineno;
94 char *p, *i;
95 size_t len;
96 char **dest = (char **)((char *) pkg + offset);
97
98 /* cut at any detected whitespace */
99 p = pkgconf_tuple_parse(client, &pkg->vars, value);
100
101 len = strcspn(p, " \t\r\n");
102 if (len)
103 {
104 i = p + (ptrdiff_t) len;
105 *i = '\0';
106
107 pkgconf_warn(client, "%s:" SIZE_FMT_SPECIFIER ": warning: malformed version field with whitespace, trimming to [%s]\n", pkg->filename,
108 lineno, p);
109 }
110
111 *dest = p;
87112 }
88113
89114 static void
133158 {"Requires", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, required)},
134159 {"Requires.internal", pkgconf_pkg_parser_internal_dependency_func, offsetof(pkgconf_pkg_t, requires_private)},
135160 {"Requires.private", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, requires_private)},
136 {"Version", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, version)},
161 {"Version", pkgconf_pkg_parser_version_func, offsetof(pkgconf_pkg_t, version)},
137162 };
138163
139164 static void
1212 * from the use of this software.
1313 */
1414
15 #ifndef __STDINC_H
16 #define __STDINC_H
15 #ifndef LIBPKGCONF_STDINC_H
16 #define LIBPKGCONF_STDINC_H
1717
1818 #include <ctype.h>
1919 #include <stdio.h>
143143 const char *i;
144144 char quote = 0;
145145
146 if (*value == '\'' || *value == '"')
147 quote = *value;
148
146149 for (i = value; *i != '\0'; i++)
147150 {
148 if (!quote && (*i == '\'' || *i == '"'))
149 quote = *i;
150 else if (*i != quote)
151 *bptr++ = *i;
152 else if (*i == '\\' && *(i + 1) == quote)
151 if (*i == '\\' && quote && *(i + 1) == quote)
153152 {
154153 i++;
155154 *bptr++ = *i;
156155 }
156 else if (*i != quote)
157 *bptr++ = *i;
157158 }
158159
159160 return buf;
66 * under the MIT license. For all details and documentation, see
77 * https://github.com/tronkko/dirent
88 */
9 #ifndef DIRENT_H
10 #define DIRENT_H
9 #ifndef LIBPKGCONF_DIRENT_H
10 #define LIBPKGCONF_DIRENT_H
1111
1212 /*
1313 * Include windows.h without Windows Sockets 1.1 to prevent conflicts with
3030
3131 PROGRAM=libtool
3232 PACKAGE=libtool
33 VERSION=2.4.6
33 VERSION="2.4.6 Debian-2.4.6-2"
3434 package_revision=2.4.6
3535
3636
20672067 compiler: $LTCC
20682068 compiler flags: $LTCFLAGS
20692069 linker: $LD (gnu? $with_gnu_ld)
2070 version: $progname (GNU libtool) 2.4.6
2070 version: $progname $scriptversion Debian-2.4.6-2
20712071 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
20722072 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
20732073
20742074 Report bugs to <bug-libtool@gnu.org>.
2075 GNU libtool home page: <http://www.gnu.org/software/libtool/>.
2075 GNU libtool home page: <http://www.gnu.org/s/libtool/>.
20762076 General help using GNU software: <http://www.gnu.org/gethelp/>."
20772077 exit 0
20782078 }
72717271 # -tp=* Portland pgcc target processor selection
72727272 # --sysroot=* for sysroot support
72737273 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7274 # -specs=* GCC specs files
72747275 # -stdlib=* select c++ std lib with clang
7276 # -fsanitize=* Clang/GCC memory and address sanitizer
72757277 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
72767278 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
7277 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
7279 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
7280 -specs=*|-fsanitize=*)
72787281 func_quote_for_eval "$arg"
72797282 arg=$func_quote_for_eval_result
72807283 func_append compile_command " $arg"
75677570 case $pass in
75687571 dlopen) libs=$dlfiles ;;
75697572 dlpreopen) libs=$dlprefiles ;;
7570 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
7573 link)
7574 libs="$deplibs %DEPLIBS%"
7575 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
7576 ;;
75717577 esac
75727578 fi
75737579 if test lib,dlpreopen = "$linkmode,$pass"; then
78867892 # It is a libtool convenience library, so add in its objects.
78877893 func_append convenience " $ladir/$objdir/$old_library"
78887894 func_append old_convenience " $ladir/$objdir/$old_library"
7895 tmp_libs=
7896 for deplib in $dependency_libs; do
7897 deplibs="$deplib $deplibs"
7898 if $opt_preserve_dup_deps; then
7899 case "$tmp_libs " in
7900 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7901 esac
7902 fi
7903 func_append tmp_libs " $deplib"
7904 done
78897905 elif test prog != "$linkmode" && test lib != "$linkmode"; then
78907906 func_fatal_error "'$lib' is not a convenience library"
78917907 fi
7892 tmp_libs=
7893 for deplib in $dependency_libs; do
7894 deplibs="$deplib $deplibs"
7895 if $opt_preserve_dup_deps; then
7896 case "$tmp_libs " in
7897 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7898 esac
7899 fi
7900 func_append tmp_libs " $deplib"
7901 done
79027908 continue
79037909 fi # $pass = conv
79047910
88218827 age=$number_minor
88228828 revision=$number_minor
88238829 lt_irix_increment=no
8830 ;;
8831 *)
8832 func_fatal_configuration "$modename: unknown library version type '$version_type'"
88248833 ;;
88258834 esac
88268835 ;;
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 #
2 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
3 # Written by Gordon Matzigkeit, 1996
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 m4_define([_LT_COPYING], [dnl
10 # Copyright (C) 2014 Free Software Foundation, Inc.
11 # This is free software; see the source for copying conditions. There is NO
12 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 # GNU Libtool is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of of the License, or
17 # (at your option) any later version.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program or library that is built
21 # using GNU Libtool, you may include this file under the same
22 # distribution terms that you use for the rest of that program.
23 #
24 # GNU Libtool is distributed in the hope that it will be useful, but
25 # WITHOUT ANY WARRANTY; without even the implied warranty of
26 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 # GNU General Public License for more details.
28 #
29 # You should have received a copy of the GNU General Public License
30 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 ])
32
33 # serial 58 LT_INIT
34
35
36 # LT_PREREQ(VERSION)
37 # ------------------
38 # Complain and exit if this libtool version is less that VERSION.
39 m4_defun([LT_PREREQ],
40 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
41 [m4_default([$3],
42 [m4_fatal([Libtool version $1 or higher is required],
43 63)])],
44 [$2])])
45
46
47 # _LT_CHECK_BUILDDIR
48 # ------------------
49 # Complain if the absolute build directory name contains unusual characters
50 m4_defun([_LT_CHECK_BUILDDIR],
51 [case `pwd` in
52 *\ * | *\ *)
53 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
54 esac
55 ])
56
57
58 # LT_INIT([OPTIONS])
59 # ------------------
60 AC_DEFUN([LT_INIT],
61 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
62 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
63 AC_BEFORE([$0], [LT_LANG])dnl
64 AC_BEFORE([$0], [LT_OUTPUT])dnl
65 AC_BEFORE([$0], [LTDL_INIT])dnl
66 m4_require([_LT_CHECK_BUILDDIR])dnl
67
68 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
69 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
70 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
71 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
72 dnl unless we require an AC_DEFUNed macro:
73 AC_REQUIRE([LTOPTIONS_VERSION])dnl
74 AC_REQUIRE([LTSUGAR_VERSION])dnl
75 AC_REQUIRE([LTVERSION_VERSION])dnl
76 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
77 m4_require([_LT_PROG_LTMAIN])dnl
78
79 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
80
81 dnl Parse OPTIONS
82 _LT_SET_OPTIONS([$0], [$1])
83
84 # This can be used to rebuild libtool when needed
85 LIBTOOL_DEPS=$ltmain
86
87 # Always use our own libtool.
88 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
89 AC_SUBST(LIBTOOL)dnl
90
91 _LT_SETUP
92
93 # Only expand once:
94 m4_define([LT_INIT])
95 ])# LT_INIT
96
97 # Old names:
98 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
99 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
100 dnl aclocal-1.4 backwards compatibility:
101 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
102 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
103
104
105 # _LT_PREPARE_CC_BASENAME
106 # -----------------------
107 m4_defun([_LT_PREPARE_CC_BASENAME], [
108 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
109 func_cc_basename ()
110 {
111 for cc_temp in @S|@*""; do
112 case $cc_temp in
113 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
114 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
115 \-*) ;;
116 *) break;;
117 esac
118 done
119 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
120 }
121 ])# _LT_PREPARE_CC_BASENAME
122
123
124 # _LT_CC_BASENAME(CC)
125 # -------------------
126 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
127 # but that macro is also expanded into generated libtool script, which
128 # arranges for $SED and $ECHO to be set by different means.
129 m4_defun([_LT_CC_BASENAME],
130 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
131 AC_REQUIRE([_LT_DECL_SED])dnl
132 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
133 func_cc_basename $1
134 cc_basename=$func_cc_basename_result
135 ])
136
137
138 # _LT_FILEUTILS_DEFAULTS
139 # ----------------------
140 # It is okay to use these file commands and assume they have been set
141 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
142 m4_defun([_LT_FILEUTILS_DEFAULTS],
143 [: ${CP="cp -f"}
144 : ${MV="mv -f"}
145 : ${RM="rm -f"}
146 ])# _LT_FILEUTILS_DEFAULTS
147
148
149 # _LT_SETUP
150 # ---------
151 m4_defun([_LT_SETUP],
152 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
153 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
154 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
155 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
156
157 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
158 dnl
159 _LT_DECL([], [host_alias], [0], [The host system])dnl
160 _LT_DECL([], [host], [0])dnl
161 _LT_DECL([], [host_os], [0])dnl
162 dnl
163 _LT_DECL([], [build_alias], [0], [The build system])dnl
164 _LT_DECL([], [build], [0])dnl
165 _LT_DECL([], [build_os], [0])dnl
166 dnl
167 AC_REQUIRE([AC_PROG_CC])dnl
168 AC_REQUIRE([LT_PATH_LD])dnl
169 AC_REQUIRE([LT_PATH_NM])dnl
170 dnl
171 AC_REQUIRE([AC_PROG_LN_S])dnl
172 test -z "$LN_S" && LN_S="ln -s"
173 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
174 dnl
175 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
176 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
177 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
178 dnl
179 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
180 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
181 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
182 m4_require([_LT_CMD_RELOAD])dnl
183 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
184 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
185 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
186 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
187 m4_require([_LT_WITH_SYSROOT])dnl
188 m4_require([_LT_CMD_TRUNCATE])dnl
189
190 _LT_CONFIG_LIBTOOL_INIT([
191 # See if we are running on zsh, and set the options that allow our
192 # commands through without removal of \ escapes INIT.
193 if test -n "\${ZSH_VERSION+set}"; then
194 setopt NO_GLOB_SUBST
195 fi
196 ])
197 if test -n "${ZSH_VERSION+set}"; then
198 setopt NO_GLOB_SUBST
199 fi
200
201 _LT_CHECK_OBJDIR
202
203 m4_require([_LT_TAG_COMPILER])dnl
204
205 case $host_os in
206 aix3*)
207 # AIX sometimes has problems with the GCC collect2 program. For some
208 # reason, if we set the COLLECT_NAMES environment variable, the problems
209 # vanish in a puff of smoke.
210 if test set != "${COLLECT_NAMES+set}"; then
211 COLLECT_NAMES=
212 export COLLECT_NAMES
213 fi
214 ;;
215 esac
216
217 # Global variables:
218 ofile=libtool
219 can_build_shared=yes
220
221 # All known linkers require a '.a' archive for static linking (except MSVC,
222 # which needs '.lib').
223 libext=a
224
225 with_gnu_ld=$lt_cv_prog_gnu_ld
226
227 old_CC=$CC
228 old_CFLAGS=$CFLAGS
229
230 # Set sane defaults for various variables
231 test -z "$CC" && CC=cc
232 test -z "$LTCC" && LTCC=$CC
233 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
234 test -z "$LD" && LD=ld
235 test -z "$ac_objext" && ac_objext=o
236
237 _LT_CC_BASENAME([$compiler])
238
239 # Only perform the check for file, if the check method requires it
240 test -z "$MAGIC_CMD" && MAGIC_CMD=file
241 case $deplibs_check_method in
242 file_magic*)
243 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
244 _LT_PATH_MAGIC
245 fi
246 ;;
247 esac
248
249 # Use C for the default configuration in the libtool script
250 LT_SUPPORTED_TAG([CC])
251 _LT_LANG_C_CONFIG
252 _LT_LANG_DEFAULT_CONFIG
253 _LT_CONFIG_COMMANDS
254 ])# _LT_SETUP
255
256
257 # _LT_PREPARE_SED_QUOTE_VARS
258 # --------------------------
259 # Define a few sed substitution that help us do robust quoting.
260 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
261 [# Backslashify metacharacters that are still active within
262 # double-quoted strings.
263 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
264
265 # Same as above, but do not quote variable references.
266 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
267
268 # Sed substitution to delay expansion of an escaped shell variable in a
269 # double_quote_subst'ed string.
270 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
271
272 # Sed substitution to delay expansion of an escaped single quote.
273 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
274
275 # Sed substitution to avoid accidental globbing in evaled expressions
276 no_glob_subst='s/\*/\\\*/g'
277 ])
278
279 # _LT_PROG_LTMAIN
280 # ---------------
281 # Note that this code is called both from 'configure', and 'config.status'
282 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
283 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
284 # so we pass a copy along to make sure it has a sensible value anyway.
285 m4_defun([_LT_PROG_LTMAIN],
286 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
287 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
288 ltmain=$ac_aux_dir/ltmain.sh
289 ])# _LT_PROG_LTMAIN
290
291
292 ## ------------------------------------- ##
293 ## Accumulate code for creating libtool. ##
294 ## ------------------------------------- ##
295
296 # So that we can recreate a full libtool script including additional
297 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
298 # in macros and then make a single call at the end using the 'libtool'
299 # label.
300
301
302 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
303 # ----------------------------------------
304 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
305 m4_define([_LT_CONFIG_LIBTOOL_INIT],
306 [m4_ifval([$1],
307 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
308 [$1
309 ])])])
310
311 # Initialize.
312 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
313
314
315 # _LT_CONFIG_LIBTOOL([COMMANDS])
316 # ------------------------------
317 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
318 m4_define([_LT_CONFIG_LIBTOOL],
319 [m4_ifval([$1],
320 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
321 [$1
322 ])])])
323
324 # Initialize.
325 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
326
327
328 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
329 # -----------------------------------------------------
330 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
331 [_LT_CONFIG_LIBTOOL([$1])
332 _LT_CONFIG_LIBTOOL_INIT([$2])
333 ])
334
335
336 # _LT_FORMAT_COMMENT([COMMENT])
337 # -----------------------------
338 # Add leading comment marks to the start of each line, and a trailing
339 # full-stop to the whole comment if one is not present already.
340 m4_define([_LT_FORMAT_COMMENT],
341 [m4_ifval([$1], [
342 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
343 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
344 )])
345
346
347
348 ## ------------------------ ##
349 ## FIXME: Eliminate VARNAME ##
350 ## ------------------------ ##
351
352
353 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
354 # -------------------------------------------------------------------
355 # CONFIGNAME is the name given to the value in the libtool script.
356 # VARNAME is the (base) name used in the configure script.
357 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
358 # VARNAME. Any other value will be used directly.
359 m4_define([_LT_DECL],
360 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
361 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
362 [m4_ifval([$1], [$1], [$2])])
363 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
364 m4_ifval([$4],
365 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
366 lt_dict_add_subkey([lt_decl_dict], [$2],
367 [tagged?], [m4_ifval([$5], [yes], [no])])])
368 ])
369
370
371 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
372 # --------------------------------------------------------
373 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
374
375
376 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
377 # ------------------------------------------------
378 m4_define([lt_decl_tag_varnames],
379 [_lt_decl_filter([tagged?], [yes], $@)])
380
381
382 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
383 # ---------------------------------------------------------
384 m4_define([_lt_decl_filter],
385 [m4_case([$#],
386 [0], [m4_fatal([$0: too few arguments: $#])],
387 [1], [m4_fatal([$0: too few arguments: $#: $1])],
388 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
389 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
390 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
391 ])
392
393
394 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
395 # --------------------------------------------------
396 m4_define([lt_decl_quote_varnames],
397 [_lt_decl_filter([value], [1], $@)])
398
399
400 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
401 # ---------------------------------------------------
402 m4_define([lt_decl_dquote_varnames],
403 [_lt_decl_filter([value], [2], $@)])
404
405
406 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
407 # ---------------------------------------------------
408 m4_define([lt_decl_varnames_tagged],
409 [m4_assert([$# <= 2])dnl
410 _$0(m4_quote(m4_default([$1], [[, ]])),
411 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
412 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
413 m4_define([_lt_decl_varnames_tagged],
414 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
415
416
417 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
418 # ------------------------------------------------
419 m4_define([lt_decl_all_varnames],
420 [_$0(m4_quote(m4_default([$1], [[, ]])),
421 m4_if([$2], [],
422 m4_quote(lt_decl_varnames),
423 m4_quote(m4_shift($@))))[]dnl
424 ])
425 m4_define([_lt_decl_all_varnames],
426 [lt_join($@, lt_decl_varnames_tagged([$1],
427 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
428 ])
429
430
431 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
432 # ------------------------------------
433 # Quote a variable value, and forward it to 'config.status' so that its
434 # declaration there will have the same value as in 'configure'. VARNAME
435 # must have a single quote delimited value for this to work.
436 m4_define([_LT_CONFIG_STATUS_DECLARE],
437 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
438
439
440 # _LT_CONFIG_STATUS_DECLARATIONS
441 # ------------------------------
442 # We delimit libtool config variables with single quotes, so when
443 # we write them to config.status, we have to be sure to quote all
444 # embedded single quotes properly. In configure, this macro expands
445 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
446 #
447 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
448 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
449 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
450 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
451
452
453 # _LT_LIBTOOL_TAGS
454 # ----------------
455 # Output comment and list of tags supported by the script
456 m4_defun([_LT_LIBTOOL_TAGS],
457 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
458 available_tags='_LT_TAGS'dnl
459 ])
460
461
462 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
463 # -----------------------------------
464 # Extract the dictionary values for VARNAME (optionally with TAG) and
465 # expand to a commented shell variable setting:
466 #
467 # # Some comment about what VAR is for.
468 # visible_name=$lt_internal_name
469 m4_define([_LT_LIBTOOL_DECLARE],
470 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
471 [description])))[]dnl
472 m4_pushdef([_libtool_name],
473 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
474 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
475 [0], [_libtool_name=[$]$1],
476 [1], [_libtool_name=$lt_[]$1],
477 [2], [_libtool_name=$lt_[]$1],
478 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
479 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
480 ])
481
482
483 # _LT_LIBTOOL_CONFIG_VARS
484 # -----------------------
485 # Produce commented declarations of non-tagged libtool config variables
486 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
487 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
488 # section) are produced by _LT_LIBTOOL_TAG_VARS.
489 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
490 [m4_foreach([_lt_var],
491 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
492 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
493
494
495 # _LT_LIBTOOL_TAG_VARS(TAG)
496 # -------------------------
497 m4_define([_LT_LIBTOOL_TAG_VARS],
498 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
499 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
500
501
502 # _LT_TAGVAR(VARNAME, [TAGNAME])
503 # ------------------------------
504 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
505
506
507 # _LT_CONFIG_COMMANDS
508 # -------------------
509 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
510 # variables for single and double quote escaping we saved from calls
511 # to _LT_DECL, we can put quote escaped variables declarations
512 # into 'config.status', and then the shell code to quote escape them in
513 # for loops in 'config.status'. Finally, any additional code accumulated
514 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
515 m4_defun([_LT_CONFIG_COMMANDS],
516 [AC_PROVIDE_IFELSE([LT_OUTPUT],
517 dnl If the libtool generation code has been placed in $CONFIG_LT,
518 dnl instead of duplicating it all over again into config.status,
519 dnl then we will have config.status run $CONFIG_LT later, so it
520 dnl needs to know what name is stored there:
521 [AC_CONFIG_COMMANDS([libtool],
522 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
523 dnl If the libtool generation code is destined for config.status,
524 dnl expand the accumulated commands and init code now:
525 [AC_CONFIG_COMMANDS([libtool],
526 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
527 ])#_LT_CONFIG_COMMANDS
528
529
530 # Initialize.
531 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
532 [
533
534 # The HP-UX ksh and POSIX shell print the target directory to stdout
535 # if CDPATH is set.
536 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
537
538 sed_quote_subst='$sed_quote_subst'
539 double_quote_subst='$double_quote_subst'
540 delay_variable_subst='$delay_variable_subst'
541 _LT_CONFIG_STATUS_DECLARATIONS
542 LTCC='$LTCC'
543 LTCFLAGS='$LTCFLAGS'
544 compiler='$compiler_DEFAULT'
545
546 # A function that is used when there is no print builtin or printf.
547 func_fallback_echo ()
548 {
549 eval 'cat <<_LTECHO_EOF
550 \$[]1
551 _LTECHO_EOF'
552 }
553
554 # Quote evaled strings.
555 for var in lt_decl_all_varnames([[ \
556 ]], lt_decl_quote_varnames); do
557 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
558 *[[\\\\\\\`\\"\\\$]]*)
559 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
560 ;;
561 *)
562 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
563 ;;
564 esac
565 done
566
567 # Double-quote double-evaled strings.
568 for var in lt_decl_all_varnames([[ \
569 ]], lt_decl_dquote_varnames); do
570 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
571 *[[\\\\\\\`\\"\\\$]]*)
572 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
573 ;;
574 *)
575 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
576 ;;
577 esac
578 done
579
580 _LT_OUTPUT_LIBTOOL_INIT
581 ])
582
583 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
584 # ------------------------------------
585 # Generate a child script FILE with all initialization necessary to
586 # reuse the environment learned by the parent script, and make the
587 # file executable. If COMMENT is supplied, it is inserted after the
588 # '#!' sequence but before initialization text begins. After this
589 # macro, additional text can be appended to FILE to form the body of
590 # the child script. The macro ends with non-zero status if the
591 # file could not be fully written (such as if the disk is full).
592 m4_ifdef([AS_INIT_GENERATED],
593 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
594 [m4_defun([_LT_GENERATED_FILE_INIT],
595 [m4_require([AS_PREPARE])]dnl
596 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
597 [lt_write_fail=0
598 cat >$1 <<_ASEOF || lt_write_fail=1
599 #! $SHELL
600 # Generated by $as_me.
601 $2
602 SHELL=\${CONFIG_SHELL-$SHELL}
603 export SHELL
604 _ASEOF
605 cat >>$1 <<\_ASEOF || lt_write_fail=1
606 AS_SHELL_SANITIZE
607 _AS_PREPARE
608 exec AS_MESSAGE_FD>&1
609 _ASEOF
610 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
611 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
612
613 # LT_OUTPUT
614 # ---------
615 # This macro allows early generation of the libtool script (before
616 # AC_OUTPUT is called), incase it is used in configure for compilation
617 # tests.
618 AC_DEFUN([LT_OUTPUT],
619 [: ${CONFIG_LT=./config.lt}
620 AC_MSG_NOTICE([creating $CONFIG_LT])
621 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
622 [# Run this file to recreate a libtool stub with the current configuration.])
623
624 cat >>"$CONFIG_LT" <<\_LTEOF
625 lt_cl_silent=false
626 exec AS_MESSAGE_LOG_FD>>config.log
627 {
628 echo
629 AS_BOX([Running $as_me.])
630 } >&AS_MESSAGE_LOG_FD
631
632 lt_cl_help="\
633 '$as_me' creates a local libtool stub from the current configuration,
634 for use in further configure time tests before the real libtool is
635 generated.
636
637 Usage: $[0] [[OPTIONS]]
638
639 -h, --help print this help, then exit
640 -V, --version print version number, then exit
641 -q, --quiet do not print progress messages
642 -d, --debug don't remove temporary files
643
644 Report bugs to <bug-libtool@gnu.org>."
645
646 lt_cl_version="\
647 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
648 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
649 configured by $[0], generated by m4_PACKAGE_STRING.
650
651 Copyright (C) 2011 Free Software Foundation, Inc.
652 This config.lt script is free software; the Free Software Foundation
653 gives unlimited permision to copy, distribute and modify it."
654
655 while test 0 != $[#]
656 do
657 case $[1] in
658 --version | --v* | -V )
659 echo "$lt_cl_version"; exit 0 ;;
660 --help | --h* | -h )
661 echo "$lt_cl_help"; exit 0 ;;
662 --debug | --d* | -d )
663 debug=: ;;
664 --quiet | --q* | --silent | --s* | -q )
665 lt_cl_silent=: ;;
666
667 -*) AC_MSG_ERROR([unrecognized option: $[1]
668 Try '$[0] --help' for more information.]) ;;
669
670 *) AC_MSG_ERROR([unrecognized argument: $[1]
671 Try '$[0] --help' for more information.]) ;;
672 esac
673 shift
674 done
675
676 if $lt_cl_silent; then
677 exec AS_MESSAGE_FD>/dev/null
678 fi
679 _LTEOF
680
681 cat >>"$CONFIG_LT" <<_LTEOF
682 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
683 _LTEOF
684
685 cat >>"$CONFIG_LT" <<\_LTEOF
686 AC_MSG_NOTICE([creating $ofile])
687 _LT_OUTPUT_LIBTOOL_COMMANDS
688 AS_EXIT(0)
689 _LTEOF
690 chmod +x "$CONFIG_LT"
691
692 # configure is writing to config.log, but config.lt does its own redirection,
693 # appending to config.log, which fails on DOS, as config.log is still kept
694 # open by configure. Here we exec the FD to /dev/null, effectively closing
695 # config.log, so it can be properly (re)opened and appended to by config.lt.
696 lt_cl_success=:
697 test yes = "$silent" &&
698 lt_config_lt_args="$lt_config_lt_args --quiet"
699 exec AS_MESSAGE_LOG_FD>/dev/null
700 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
701 exec AS_MESSAGE_LOG_FD>>config.log
702 $lt_cl_success || AS_EXIT(1)
703 ])# LT_OUTPUT
704
705
706 # _LT_CONFIG(TAG)
707 # ---------------
708 # If TAG is the built-in tag, create an initial libtool script with a
709 # default configuration from the untagged config vars. Otherwise add code
710 # to config.status for appending the configuration named by TAG from the
711 # matching tagged config vars.
712 m4_defun([_LT_CONFIG],
713 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
714 _LT_CONFIG_SAVE_COMMANDS([
715 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
716 m4_if(_LT_TAG, [C], [
717 # See if we are running on zsh, and set the options that allow our
718 # commands through without removal of \ escapes.
719 if test -n "${ZSH_VERSION+set}"; then
720 setopt NO_GLOB_SUBST
721 fi
722
723 cfgfile=${ofile}T
724 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
725 $RM "$cfgfile"
726
727 cat <<_LT_EOF >> "$cfgfile"
728 #! $SHELL
729 # Generated automatically by $as_me ($PACKAGE) $VERSION
730 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
731
732 # Provide generalized library-building support services.
733 # Written by Gordon Matzigkeit, 1996
734
735 _LT_COPYING
736 _LT_LIBTOOL_TAGS
737
738 # Configured defaults for sys_lib_dlsearch_path munging.
739 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
740
741 # ### BEGIN LIBTOOL CONFIG
742 _LT_LIBTOOL_CONFIG_VARS
743 _LT_LIBTOOL_TAG_VARS
744 # ### END LIBTOOL CONFIG
745
746 _LT_EOF
747
748 cat <<'_LT_EOF' >> "$cfgfile"
749
750 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
751
752 _LT_PREPARE_MUNGE_PATH_LIST
753 _LT_PREPARE_CC_BASENAME
754
755 # ### END FUNCTIONS SHARED WITH CONFIGURE
756
757 _LT_EOF
758
759 case $host_os in
760 aix3*)
761 cat <<\_LT_EOF >> "$cfgfile"
762 # AIX sometimes has problems with the GCC collect2 program. For some
763 # reason, if we set the COLLECT_NAMES environment variable, the problems
764 # vanish in a puff of smoke.
765 if test set != "${COLLECT_NAMES+set}"; then
766 COLLECT_NAMES=
767 export COLLECT_NAMES
768 fi
769 _LT_EOF
770 ;;
771 esac
772
773 _LT_PROG_LTMAIN
774
775 # We use sed instead of cat because bash on DJGPP gets confused if
776 # if finds mixed CR/LF and LF-only lines. Since sed operates in
777 # text mode, it properly converts lines to CR/LF. This bash problem
778 # is reportedly fixed, but why not run on old versions too?
779 sed '$q' "$ltmain" >> "$cfgfile" \
780 || (rm -f "$cfgfile"; exit 1)
781
782 mv -f "$cfgfile" "$ofile" ||
783 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
784 chmod +x "$ofile"
785 ],
786 [cat <<_LT_EOF >> "$ofile"
787
788 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
789 dnl in a comment (ie after a #).
790 # ### BEGIN LIBTOOL TAG CONFIG: $1
791 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
792 # ### END LIBTOOL TAG CONFIG: $1
793 _LT_EOF
794 ])dnl /m4_if
795 ],
796 [m4_if([$1], [], [
797 PACKAGE='$PACKAGE'
798 VERSION='$VERSION'
799 RM='$RM'
800 ofile='$ofile'], [])
801 ])dnl /_LT_CONFIG_SAVE_COMMANDS
802 ])# _LT_CONFIG
803
804
805 # LT_SUPPORTED_TAG(TAG)
806 # ---------------------
807 # Trace this macro to discover what tags are supported by the libtool
808 # --tag option, using:
809 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
810 AC_DEFUN([LT_SUPPORTED_TAG], [])
811
812
813 # C support is built-in for now
814 m4_define([_LT_LANG_C_enabled], [])
815 m4_define([_LT_TAGS], [])
816
817
818 # LT_LANG(LANG)
819 # -------------
820 # Enable libtool support for the given language if not already enabled.
821 AC_DEFUN([LT_LANG],
822 [AC_BEFORE([$0], [LT_OUTPUT])dnl
823 m4_case([$1],
824 [C], [_LT_LANG(C)],
825 [C++], [_LT_LANG(CXX)],
826 [Go], [_LT_LANG(GO)],
827 [Java], [_LT_LANG(GCJ)],
828 [Fortran 77], [_LT_LANG(F77)],
829 [Fortran], [_LT_LANG(FC)],
830 [Windows Resource], [_LT_LANG(RC)],
831 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
832 [_LT_LANG($1)],
833 [m4_fatal([$0: unsupported language: "$1"])])])dnl
834 ])# LT_LANG
835
836
837 # _LT_LANG(LANGNAME)
838 # ------------------
839 m4_defun([_LT_LANG],
840 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
841 [LT_SUPPORTED_TAG([$1])dnl
842 m4_append([_LT_TAGS], [$1 ])dnl
843 m4_define([_LT_LANG_]$1[_enabled], [])dnl
844 _LT_LANG_$1_CONFIG($1)])dnl
845 ])# _LT_LANG
846
847
848 m4_ifndef([AC_PROG_GO], [
849 ############################################################
850 # NOTE: This macro has been submitted for inclusion into #
851 # GNU Autoconf as AC_PROG_GO. When it is available in #
852 # a released version of Autoconf we should remove this #
853 # macro and use it instead. #
854 ############################################################
855 m4_defun([AC_PROG_GO],
856 [AC_LANG_PUSH(Go)dnl
857 AC_ARG_VAR([GOC], [Go compiler command])dnl
858 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
859 _AC_ARG_VAR_LDFLAGS()dnl
860 AC_CHECK_TOOL(GOC, gccgo)
861 if test -z "$GOC"; then
862 if test -n "$ac_tool_prefix"; then
863 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
864 fi
865 fi
866 if test -z "$GOC"; then
867 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
868 fi
869 ])#m4_defun
870 ])#m4_ifndef
871
872
873 # _LT_LANG_DEFAULT_CONFIG
874 # -----------------------
875 m4_defun([_LT_LANG_DEFAULT_CONFIG],
876 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
877 [LT_LANG(CXX)],
878 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
879
880 AC_PROVIDE_IFELSE([AC_PROG_F77],
881 [LT_LANG(F77)],
882 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
883
884 AC_PROVIDE_IFELSE([AC_PROG_FC],
885 [LT_LANG(FC)],
886 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
887
888 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
889 dnl pulling things in needlessly.
890 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
891 [LT_LANG(GCJ)],
892 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
893 [LT_LANG(GCJ)],
894 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
895 [LT_LANG(GCJ)],
896 [m4_ifdef([AC_PROG_GCJ],
897 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
898 m4_ifdef([A][M_PROG_GCJ],
899 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
900 m4_ifdef([LT_PROG_GCJ],
901 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
902
903 AC_PROVIDE_IFELSE([AC_PROG_GO],
904 [LT_LANG(GO)],
905 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
906
907 AC_PROVIDE_IFELSE([LT_PROG_RC],
908 [LT_LANG(RC)],
909 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
910 ])# _LT_LANG_DEFAULT_CONFIG
911
912 # Obsolete macros:
913 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
914 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
915 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
916 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
917 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
918 dnl aclocal-1.4 backwards compatibility:
919 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
920 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
921 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
922 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
923 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
924
925
926 # _LT_TAG_COMPILER
927 # ----------------
928 m4_defun([_LT_TAG_COMPILER],
929 [AC_REQUIRE([AC_PROG_CC])dnl
930
931 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
932 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
933 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
934 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
935
936 # If no C compiler was specified, use CC.
937 LTCC=${LTCC-"$CC"}
938
939 # If no C compiler flags were specified, use CFLAGS.
940 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
941
942 # Allow CC to be a program name with arguments.
943 compiler=$CC
944 ])# _LT_TAG_COMPILER
945
946
947 # _LT_COMPILER_BOILERPLATE
948 # ------------------------
949 # Check for compiler boilerplate output or warnings with
950 # the simple compiler test code.
951 m4_defun([_LT_COMPILER_BOILERPLATE],
952 [m4_require([_LT_DECL_SED])dnl
953 ac_outfile=conftest.$ac_objext
954 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
955 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
956 _lt_compiler_boilerplate=`cat conftest.err`
957 $RM conftest*
958 ])# _LT_COMPILER_BOILERPLATE
959
960
961 # _LT_LINKER_BOILERPLATE
962 # ----------------------
963 # Check for linker boilerplate output or warnings with
964 # the simple link test code.
965 m4_defun([_LT_LINKER_BOILERPLATE],
966 [m4_require([_LT_DECL_SED])dnl
967 ac_outfile=conftest.$ac_objext
968 echo "$lt_simple_link_test_code" >conftest.$ac_ext
969 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
970 _lt_linker_boilerplate=`cat conftest.err`
971 $RM -r conftest*
972 ])# _LT_LINKER_BOILERPLATE
973
974 # _LT_REQUIRED_DARWIN_CHECKS
975 # -------------------------
976 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
977 case $host_os in
978 rhapsody* | darwin*)
979 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
980 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
981 AC_CHECK_TOOL([LIPO], [lipo], [:])
982 AC_CHECK_TOOL([OTOOL], [otool], [:])
983 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
984 _LT_DECL([], [DSYMUTIL], [1],
985 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
986 _LT_DECL([], [NMEDIT], [1],
987 [Tool to change global to local symbols on Mac OS X])
988 _LT_DECL([], [LIPO], [1],
989 [Tool to manipulate fat objects and archives on Mac OS X])
990 _LT_DECL([], [OTOOL], [1],
991 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
992 _LT_DECL([], [OTOOL64], [1],
993 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
994
995 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
996 [lt_cv_apple_cc_single_mod=no
997 if test -z "$LT_MULTI_MODULE"; then
998 # By default we will add the -single_module flag. You can override
999 # by either setting the environment variable LT_MULTI_MODULE
1000 # non-empty at configure time, or by adding -multi_module to the
1001 # link flags.
1002 rm -rf libconftest.dylib*
1003 echo "int foo(void){return 1;}" > conftest.c
1004 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1005 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1006 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1007 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1008 _lt_result=$?
1009 # If there is a non-empty error log, and "single_module"
1010 # appears in it, assume the flag caused a linker warning
1011 if test -s conftest.err && $GREP single_module conftest.err; then
1012 cat conftest.err >&AS_MESSAGE_LOG_FD
1013 # Otherwise, if the output was created with a 0 exit code from
1014 # the compiler, it worked.
1015 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1016 lt_cv_apple_cc_single_mod=yes
1017 else
1018 cat conftest.err >&AS_MESSAGE_LOG_FD
1019 fi
1020 rm -rf libconftest.dylib*
1021 rm -f conftest.*
1022 fi])
1023
1024 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1025 [lt_cv_ld_exported_symbols_list],
1026 [lt_cv_ld_exported_symbols_list=no
1027 save_LDFLAGS=$LDFLAGS
1028 echo "_main" > conftest.sym
1029 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1030 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1031 [lt_cv_ld_exported_symbols_list=yes],
1032 [lt_cv_ld_exported_symbols_list=no])
1033 LDFLAGS=$save_LDFLAGS
1034 ])
1035
1036 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1037 [lt_cv_ld_force_load=no
1038 cat > conftest.c << _LT_EOF
1039 int forced_loaded() { return 2;}
1040 _LT_EOF
1041 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1042 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1043 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1044 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1045 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1046 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1047 cat > conftest.c << _LT_EOF
1048 int main() { return 0;}
1049 _LT_EOF
1050 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1051 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1052 _lt_result=$?
1053 if test -s conftest.err && $GREP force_load conftest.err; then
1054 cat conftest.err >&AS_MESSAGE_LOG_FD
1055 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1056 lt_cv_ld_force_load=yes
1057 else
1058 cat conftest.err >&AS_MESSAGE_LOG_FD
1059 fi
1060 rm -f conftest.err libconftest.a conftest conftest.c
1061 rm -rf conftest.dSYM
1062 ])
1063 case $host_os in
1064 rhapsody* | darwin1.[[012]])
1065 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1066 darwin1.*)
1067 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1068 darwin*) # darwin 5.x on
1069 # if running on 10.5 or later, the deployment target defaults
1070 # to the OS version, if on x86, and 10.4, the deployment
1071 # target defaults to 10.4. Don't you love it?
1072 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1073 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1074 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1075 10.[[012]][[,.]]*)
1076 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1077 10.*)
1078 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1079 esac
1080 ;;
1081 esac
1082 if test yes = "$lt_cv_apple_cc_single_mod"; then
1083 _lt_dar_single_mod='$single_module'
1084 fi
1085 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1086 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1087 else
1088 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1089 fi
1090 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1091 _lt_dsymutil='~$DSYMUTIL $lib || :'
1092 else
1093 _lt_dsymutil=
1094 fi
1095 ;;
1096 esac
1097 ])
1098
1099
1100 # _LT_DARWIN_LINKER_FEATURES([TAG])
1101 # ---------------------------------
1102 # Checks for linker and compiler features on darwin
1103 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1104 [
1105 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1106 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1107 _LT_TAGVAR(hardcode_direct, $1)=no
1108 _LT_TAGVAR(hardcode_automatic, $1)=yes
1109 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1110 if test yes = "$lt_cv_ld_force_load"; then
1111 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1112 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1113 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1114 else
1115 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1116 fi
1117 _LT_TAGVAR(link_all_deplibs, $1)=yes
1118 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1119 case $cc_basename in
1120 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1121 *) _lt_dar_can_shared=$GCC ;;
1122 esac
1123 if test yes = "$_lt_dar_can_shared"; then
1124 output_verbose_link_cmd=func_echo_all
1125 _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"
1126 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1127 _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"
1128 _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"
1129 m4_if([$1], [CXX],
1130 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
1131 _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"
1132 _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"
1133 fi
1134 ],[])
1135 else
1136 _LT_TAGVAR(ld_shlibs, $1)=no
1137 fi
1138 ])
1139
1140 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1141 # ----------------------------------
1142 # Links a minimal program and checks the executable
1143 # for the system default hardcoded library path. In most cases,
1144 # this is /usr/lib:/lib, but when the MPI compilers are used
1145 # the location of the communication and MPI libs are included too.
1146 # If we don't find anything, use the default library path according
1147 # to the aix ld manual.
1148 # Store the results from the different compilers for each TAGNAME.
1149 # Allow to override them for all tags through lt_cv_aix_libpath.
1150 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1151 [m4_require([_LT_DECL_SED])dnl
1152 if test set = "${lt_cv_aix_libpath+set}"; then
1153 aix_libpath=$lt_cv_aix_libpath
1154 else
1155 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1156 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1157 lt_aix_libpath_sed='[
1158 /Import File Strings/,/^$/ {
1159 /^0/ {
1160 s/^0 *\([^ ]*\) *$/\1/
1161 p
1162 }
1163 }]'
1164 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1165 # Check for a 64-bit object if we didn't find anything.
1166 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1167 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1168 fi],[])
1169 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1170 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1171 fi
1172 ])
1173 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1174 fi
1175 ])# _LT_SYS_MODULE_PATH_AIX
1176
1177
1178 # _LT_SHELL_INIT(ARG)
1179 # -------------------
1180 m4_define([_LT_SHELL_INIT],
1181 [m4_divert_text([M4SH-INIT], [$1
1182 ])])# _LT_SHELL_INIT
1183
1184
1185
1186 # _LT_PROG_ECHO_BACKSLASH
1187 # -----------------------
1188 # Find how we can fake an echo command that does not interpret backslash.
1189 # In particular, with Autoconf 2.60 or later we add some code to the start
1190 # of the generated configure script that will find a shell with a builtin
1191 # printf (that we can use as an echo command).
1192 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1193 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1194 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1195 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1196
1197 AC_MSG_CHECKING([how to print strings])
1198 # Test print first, because it will be a builtin if present.
1199 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1200 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1201 ECHO='print -r --'
1202 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1203 ECHO='printf %s\n'
1204 else
1205 # Use this function as a fallback that always works.
1206 func_fallback_echo ()
1207 {
1208 eval 'cat <<_LTECHO_EOF
1209 $[]1
1210 _LTECHO_EOF'
1211 }
1212 ECHO='func_fallback_echo'
1213 fi
1214
1215 # func_echo_all arg...
1216 # Invoke $ECHO with all args, space-separated.
1217 func_echo_all ()
1218 {
1219 $ECHO "$*"
1220 }
1221
1222 case $ECHO in
1223 printf*) AC_MSG_RESULT([printf]) ;;
1224 print*) AC_MSG_RESULT([print -r]) ;;
1225 *) AC_MSG_RESULT([cat]) ;;
1226 esac
1227
1228 m4_ifdef([_AS_DETECT_SUGGESTED],
1229 [_AS_DETECT_SUGGESTED([
1230 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1231 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1232 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1233 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1234 PATH=/empty FPATH=/empty; export PATH FPATH
1235 test "X`printf %s $ECHO`" = "X$ECHO" \
1236 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1237
1238 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1239 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1240 ])# _LT_PROG_ECHO_BACKSLASH
1241
1242
1243 # _LT_WITH_SYSROOT
1244 # ----------------
1245 AC_DEFUN([_LT_WITH_SYSROOT],
1246 [AC_MSG_CHECKING([for sysroot])
1247 AC_ARG_WITH([sysroot],
1248 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1249 [Search for dependent libraries within DIR (or the compiler's sysroot
1250 if not specified).])],
1251 [], [with_sysroot=no])
1252
1253 dnl lt_sysroot will always be passed unquoted. We quote it here
1254 dnl in case the user passed a directory name.
1255 lt_sysroot=
1256 case $with_sysroot in #(
1257 yes)
1258 if test yes = "$GCC"; then
1259 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1260 fi
1261 ;; #(
1262 /*)
1263 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1264 ;; #(
1265 no|'')
1266 ;; #(
1267 *)
1268 AC_MSG_RESULT([$with_sysroot])
1269 AC_MSG_ERROR([The sysroot must be an absolute path.])
1270 ;;
1271 esac
1272
1273 AC_MSG_RESULT([${lt_sysroot:-no}])
1274 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1275 [dependent libraries, and where our libraries should be installed.])])
1276
1277 # _LT_ENABLE_LOCK
1278 # ---------------
1279 m4_defun([_LT_ENABLE_LOCK],
1280 [AC_ARG_ENABLE([libtool-lock],
1281 [AS_HELP_STRING([--disable-libtool-lock],
1282 [avoid locking (might break parallel builds)])])
1283 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1284
1285 # Some flags need to be propagated to the compiler or linker for good
1286 # libtool support.
1287 case $host in
1288 ia64-*-hpux*)
1289 # Find out what ABI is being produced by ac_compile, and set mode
1290 # options accordingly.
1291 echo 'int i;' > conftest.$ac_ext
1292 if AC_TRY_EVAL(ac_compile); then
1293 case `/usr/bin/file conftest.$ac_objext` in
1294 *ELF-32*)
1295 HPUX_IA64_MODE=32
1296 ;;
1297 *ELF-64*)
1298 HPUX_IA64_MODE=64
1299 ;;
1300 esac
1301 fi
1302 rm -rf conftest*
1303 ;;
1304 *-*-irix6*)
1305 # Find out what ABI is being produced by ac_compile, and set linker
1306 # options accordingly.
1307 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1308 if AC_TRY_EVAL(ac_compile); then
1309 if test yes = "$lt_cv_prog_gnu_ld"; then
1310 case `/usr/bin/file conftest.$ac_objext` in
1311 *32-bit*)
1312 LD="${LD-ld} -melf32bsmip"
1313 ;;
1314 *N32*)
1315 LD="${LD-ld} -melf32bmipn32"
1316 ;;
1317 *64-bit*)
1318 LD="${LD-ld} -melf64bmip"
1319 ;;
1320 esac
1321 else
1322 case `/usr/bin/file conftest.$ac_objext` in
1323 *32-bit*)
1324 LD="${LD-ld} -32"
1325 ;;
1326 *N32*)
1327 LD="${LD-ld} -n32"
1328 ;;
1329 *64-bit*)
1330 LD="${LD-ld} -64"
1331 ;;
1332 esac
1333 fi
1334 fi
1335 rm -rf conftest*
1336 ;;
1337
1338 mips64*-*linux*)
1339 # Find out what ABI is being produced by ac_compile, and set linker
1340 # options accordingly.
1341 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1342 if AC_TRY_EVAL(ac_compile); then
1343 emul=elf
1344 case `/usr/bin/file conftest.$ac_objext` in
1345 *32-bit*)
1346 emul="${emul}32"
1347 ;;
1348 *64-bit*)
1349 emul="${emul}64"
1350 ;;
1351 esac
1352 case `/usr/bin/file conftest.$ac_objext` in
1353 *MSB*)
1354 emul="${emul}btsmip"
1355 ;;
1356 *LSB*)
1357 emul="${emul}ltsmip"
1358 ;;
1359 esac
1360 case `/usr/bin/file conftest.$ac_objext` in
1361 *N32*)
1362 emul="${emul}n32"
1363 ;;
1364 esac
1365 LD="${LD-ld} -m $emul"
1366 fi
1367 rm -rf conftest*
1368 ;;
1369
1370 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1371 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1372 # Find out what ABI is being produced by ac_compile, and set linker
1373 # options accordingly. Note that the listed cases only cover the
1374 # situations where additional linker options are needed (such as when
1375 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1376 # vice versa); the common cases where no linker options are needed do
1377 # not appear in the list.
1378 echo 'int i;' > conftest.$ac_ext
1379 if AC_TRY_EVAL(ac_compile); then
1380 case `/usr/bin/file conftest.o` in
1381 *32-bit*)
1382 case $host in
1383 x86_64-*kfreebsd*-gnu)
1384 LD="${LD-ld} -m elf_i386_fbsd"
1385 ;;
1386 x86_64-*linux*)
1387 case `/usr/bin/file conftest.o` in
1388 *x86-64*)
1389 LD="${LD-ld} -m elf32_x86_64"
1390 ;;
1391 *)
1392 LD="${LD-ld} -m elf_i386"
1393 ;;
1394 esac
1395 ;;
1396 powerpc64le-*linux*)
1397 LD="${LD-ld} -m elf32lppclinux"
1398 ;;
1399 powerpc64-*linux*)
1400 LD="${LD-ld} -m elf32ppclinux"
1401 ;;
1402 s390x-*linux*)
1403 LD="${LD-ld} -m elf_s390"
1404 ;;
1405 sparc64-*linux*)
1406 LD="${LD-ld} -m elf32_sparc"
1407 ;;
1408 esac
1409 ;;
1410 *64-bit*)
1411 case $host in
1412 x86_64-*kfreebsd*-gnu)
1413 LD="${LD-ld} -m elf_x86_64_fbsd"
1414 ;;
1415 x86_64-*linux*)
1416 LD="${LD-ld} -m elf_x86_64"
1417 ;;
1418 powerpcle-*linux*)
1419 LD="${LD-ld} -m elf64lppc"
1420 ;;
1421 powerpc-*linux*)
1422 LD="${LD-ld} -m elf64ppc"
1423 ;;
1424 s390*-*linux*|s390*-*tpf*)
1425 LD="${LD-ld} -m elf64_s390"
1426 ;;
1427 sparc*-*linux*)
1428 LD="${LD-ld} -m elf64_sparc"
1429 ;;
1430 esac
1431 ;;
1432 esac
1433 fi
1434 rm -rf conftest*
1435 ;;
1436
1437 *-*-sco3.2v5*)
1438 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1439 SAVE_CFLAGS=$CFLAGS
1440 CFLAGS="$CFLAGS -belf"
1441 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1442 [AC_LANG_PUSH(C)
1443 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1444 AC_LANG_POP])
1445 if test yes != "$lt_cv_cc_needs_belf"; then
1446 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1447 CFLAGS=$SAVE_CFLAGS
1448 fi
1449 ;;
1450 *-*solaris*)
1451 # Find out what ABI is being produced by ac_compile, and set linker
1452 # options accordingly.
1453 echo 'int i;' > conftest.$ac_ext
1454 if AC_TRY_EVAL(ac_compile); then
1455 case `/usr/bin/file conftest.o` in
1456 *64-bit*)
1457 case $lt_cv_prog_gnu_ld in
1458 yes*)
1459 case $host in
1460 i?86-*-solaris*|x86_64-*-solaris*)
1461 LD="${LD-ld} -m elf_x86_64"
1462 ;;
1463 sparc*-*-solaris*)
1464 LD="${LD-ld} -m elf64_sparc"
1465 ;;
1466 esac
1467 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1468 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1469 LD=${LD-ld}_sol2
1470 fi
1471 ;;
1472 *)
1473 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1474 LD="${LD-ld} -64"
1475 fi
1476 ;;
1477 esac
1478 ;;
1479 esac
1480 fi
1481 rm -rf conftest*
1482 ;;
1483 esac
1484
1485 need_locks=$enable_libtool_lock
1486 ])# _LT_ENABLE_LOCK
1487
1488
1489 # _LT_PROG_AR
1490 # -----------
1491 m4_defun([_LT_PROG_AR],
1492 [AC_CHECK_TOOLS(AR, [ar], false)
1493 : ${AR=ar}
1494 : ${AR_FLAGS=cru}
1495 _LT_DECL([], [AR], [1], [The archiver])
1496 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1497
1498 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1499 [lt_cv_ar_at_file=no
1500 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1501 [echo conftest.$ac_objext > conftest.lst
1502 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1503 AC_TRY_EVAL([lt_ar_try])
1504 if test 0 -eq "$ac_status"; then
1505 # Ensure the archiver fails upon bogus file names.
1506 rm -f conftest.$ac_objext libconftest.a
1507 AC_TRY_EVAL([lt_ar_try])
1508 if test 0 -ne "$ac_status"; then
1509 lt_cv_ar_at_file=@
1510 fi
1511 fi
1512 rm -f conftest.* libconftest.a
1513 ])
1514 ])
1515
1516 if test no = "$lt_cv_ar_at_file"; then
1517 archiver_list_spec=
1518 else
1519 archiver_list_spec=$lt_cv_ar_at_file
1520 fi
1521 _LT_DECL([], [archiver_list_spec], [1],
1522 [How to feed a file listing to the archiver])
1523 ])# _LT_PROG_AR
1524
1525
1526 # _LT_CMD_OLD_ARCHIVE
1527 # -------------------
1528 m4_defun([_LT_CMD_OLD_ARCHIVE],
1529 [_LT_PROG_AR
1530
1531 AC_CHECK_TOOL(STRIP, strip, :)
1532 test -z "$STRIP" && STRIP=:
1533 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1534
1535 AC_CHECK_TOOL(RANLIB, ranlib, :)
1536 test -z "$RANLIB" && RANLIB=:
1537 _LT_DECL([], [RANLIB], [1],
1538 [Commands used to install an old-style archive])
1539
1540 # Determine commands to create old-style static archives.
1541 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1542 old_postinstall_cmds='chmod 644 $oldlib'
1543 old_postuninstall_cmds=
1544
1545 if test -n "$RANLIB"; then
1546 case $host_os in
1547 bitrig* | openbsd*)
1548 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1549 ;;
1550 *)
1551 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1552 ;;
1553 esac
1554 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1555 fi
1556
1557 case $host_os in
1558 darwin*)
1559 lock_old_archive_extraction=yes ;;
1560 *)
1561 lock_old_archive_extraction=no ;;
1562 esac
1563 _LT_DECL([], [old_postinstall_cmds], [2])
1564 _LT_DECL([], [old_postuninstall_cmds], [2])
1565 _LT_TAGDECL([], [old_archive_cmds], [2],
1566 [Commands used to build an old-style archive])
1567 _LT_DECL([], [lock_old_archive_extraction], [0],
1568 [Whether to use a lock for old archive extraction])
1569 ])# _LT_CMD_OLD_ARCHIVE
1570
1571
1572 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1573 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1574 # ----------------------------------------------------------------
1575 # Check whether the given compiler option works
1576 AC_DEFUN([_LT_COMPILER_OPTION],
1577 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1578 m4_require([_LT_DECL_SED])dnl
1579 AC_CACHE_CHECK([$1], [$2],
1580 [$2=no
1581 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1582 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1583 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
1584 # Insert the option either (1) after the last *FLAGS variable, or
1585 # (2) before a word containing "conftest.", or (3) at the end.
1586 # Note that $ac_compile itself does not contain backslashes and begins
1587 # with a dollar sign (not a hyphen), so the echo should work correctly.
1588 # The option is referenced via a variable to avoid confusing sed.
1589 lt_compile=`echo "$ac_compile" | $SED \
1590 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1591 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1592 -e 's:$: $lt_compiler_flag:'`
1593 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1594 (eval "$lt_compile" 2>conftest.err)
1595 ac_status=$?
1596 cat conftest.err >&AS_MESSAGE_LOG_FD
1597 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1598 if (exit $ac_status) && test -s "$ac_outfile"; then
1599 # The compiler can only warn and ignore the option if not recognized
1600 # So say no if there are warnings other than the usual output.
1601 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1602 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1603 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1604 $2=yes
1605 fi
1606 fi
1607 $RM conftest*
1608 ])
1609
1610 if test yes = "[$]$2"; then
1611 m4_if([$5], , :, [$5])
1612 else
1613 m4_if([$6], , :, [$6])
1614 fi
1615 ])# _LT_COMPILER_OPTION
1616
1617 # Old name:
1618 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1619 dnl aclocal-1.4 backwards compatibility:
1620 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1621
1622
1623 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1624 # [ACTION-SUCCESS], [ACTION-FAILURE])
1625 # ----------------------------------------------------
1626 # Check whether the given linker option works
1627 AC_DEFUN([_LT_LINKER_OPTION],
1628 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1629 m4_require([_LT_DECL_SED])dnl
1630 AC_CACHE_CHECK([$1], [$2],
1631 [$2=no
1632 save_LDFLAGS=$LDFLAGS
1633 LDFLAGS="$LDFLAGS $3"
1634 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1635 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1636 # The linker can only warn and ignore the option if not recognized
1637 # So say no if there are warnings
1638 if test -s conftest.err; then
1639 # Append any errors to the config.log.
1640 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1641 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1642 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1643 if diff conftest.exp conftest.er2 >/dev/null; then
1644 $2=yes
1645 fi
1646 else
1647 $2=yes
1648 fi
1649 fi
1650 $RM -r conftest*
1651 LDFLAGS=$save_LDFLAGS
1652 ])
1653
1654 if test yes = "[$]$2"; then
1655 m4_if([$4], , :, [$4])
1656 else
1657 m4_if([$5], , :, [$5])
1658 fi
1659 ])# _LT_LINKER_OPTION
1660
1661 # Old name:
1662 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1663 dnl aclocal-1.4 backwards compatibility:
1664 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1665
1666
1667 # LT_CMD_MAX_LEN
1668 #---------------
1669 AC_DEFUN([LT_CMD_MAX_LEN],
1670 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1671 # find the maximum length of command line arguments
1672 AC_MSG_CHECKING([the maximum length of command line arguments])
1673 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1674 i=0
1675 teststring=ABCD
1676
1677 case $build_os in
1678 msdosdjgpp*)
1679 # On DJGPP, this test can blow up pretty badly due to problems in libc
1680 # (any single argument exceeding 2000 bytes causes a buffer overrun
1681 # during glob expansion). Even if it were fixed, the result of this
1682 # check would be larger than it should be.
1683 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1684 ;;
1685
1686 gnu*)
1687 # Under GNU Hurd, this test is not required because there is
1688 # no limit to the length of command line arguments.
1689 # Libtool will interpret -1 as no limit whatsoever
1690 lt_cv_sys_max_cmd_len=-1;
1691 ;;
1692
1693 cygwin* | mingw* | cegcc*)
1694 # On Win9x/ME, this test blows up -- it succeeds, but takes
1695 # about 5 minutes as the teststring grows exponentially.
1696 # Worse, since 9x/ME are not pre-emptively multitasking,
1697 # you end up with a "frozen" computer, even though with patience
1698 # the test eventually succeeds (with a max line length of 256k).
1699 # Instead, let's just punt: use the minimum linelength reported by
1700 # all of the supported platforms: 8192 (on NT/2K/XP).
1701 lt_cv_sys_max_cmd_len=8192;
1702 ;;
1703
1704 mint*)
1705 # On MiNT this can take a long time and run out of memory.
1706 lt_cv_sys_max_cmd_len=8192;
1707 ;;
1708
1709 amigaos*)
1710 # On AmigaOS with pdksh, this test takes hours, literally.
1711 # So we just punt and use a minimum line length of 8192.
1712 lt_cv_sys_max_cmd_len=8192;
1713 ;;
1714
1715 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1716 # This has been around since 386BSD, at least. Likely further.
1717 if test -x /sbin/sysctl; then
1718 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1719 elif test -x /usr/sbin/sysctl; then
1720 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1721 else
1722 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1723 fi
1724 # And add a safety zone
1725 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1727 ;;
1728
1729 interix*)
1730 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1731 lt_cv_sys_max_cmd_len=196608
1732 ;;
1733
1734 os2*)
1735 # The test takes a long time on OS/2.
1736 lt_cv_sys_max_cmd_len=8192
1737 ;;
1738
1739 osf*)
1740 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1741 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1742 # nice to cause kernel panics so lets avoid the loop below.
1743 # First set a reasonable default.
1744 lt_cv_sys_max_cmd_len=16384
1745 #
1746 if test -x /sbin/sysconfig; then
1747 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1748 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1749 esac
1750 fi
1751 ;;
1752 sco3.2v5*)
1753 lt_cv_sys_max_cmd_len=102400
1754 ;;
1755 sysv5* | sco5v6* | sysv4.2uw2*)
1756 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1757 if test -n "$kargmax"; then
1758 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1759 else
1760 lt_cv_sys_max_cmd_len=32768
1761 fi
1762 ;;
1763 *)
1764 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1765 if test -n "$lt_cv_sys_max_cmd_len" && \
1766 test undefined != "$lt_cv_sys_max_cmd_len"; then
1767 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1769 else
1770 # Make teststring a little bigger before we do anything with it.
1771 # a 1K string should be a reasonable start.
1772 for i in 1 2 3 4 5 6 7 8; do
1773 teststring=$teststring$teststring
1774 done
1775 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1776 # If test is not a shell built-in, we'll probably end up computing a
1777 # maximum length that is only half of the actual maximum length, but
1778 # we can't tell.
1779 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1780 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1781 test 17 != "$i" # 1/2 MB should be enough
1782 do
1783 i=`expr $i + 1`
1784 teststring=$teststring$teststring
1785 done
1786 # Only check the string length outside the loop.
1787 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1788 teststring=
1789 # Add a significant safety factor because C++ compilers can tack on
1790 # massive amounts of additional arguments before passing them to the
1791 # linker. It appears as though 1/2 is a usable value.
1792 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1793 fi
1794 ;;
1795 esac
1796 ])
1797 if test -n "$lt_cv_sys_max_cmd_len"; then
1798 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1799 else
1800 AC_MSG_RESULT(none)
1801 fi
1802 max_cmd_len=$lt_cv_sys_max_cmd_len
1803 _LT_DECL([], [max_cmd_len], [0],
1804 [What is the maximum length of a command?])
1805 ])# LT_CMD_MAX_LEN
1806
1807 # Old name:
1808 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1809 dnl aclocal-1.4 backwards compatibility:
1810 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1811
1812
1813 # _LT_HEADER_DLFCN
1814 # ----------------
1815 m4_defun([_LT_HEADER_DLFCN],
1816 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1817 ])# _LT_HEADER_DLFCN
1818
1819
1820 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1821 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1822 # ----------------------------------------------------------------
1823 m4_defun([_LT_TRY_DLOPEN_SELF],
1824 [m4_require([_LT_HEADER_DLFCN])dnl
1825 if test yes = "$cross_compiling"; then :
1826 [$4]
1827 else
1828 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1829 lt_status=$lt_dlunknown
1830 cat > conftest.$ac_ext <<_LT_EOF
1831 [#line $LINENO "configure"
1832 #include "confdefs.h"
1833
1834 #if HAVE_DLFCN_H
1835 #include <dlfcn.h>
1836 #endif
1837
1838 #include <stdio.h>
1839
1840 #ifdef RTLD_GLOBAL
1841 # define LT_DLGLOBAL RTLD_GLOBAL
1842 #else
1843 # ifdef DL_GLOBAL
1844 # define LT_DLGLOBAL DL_GLOBAL
1845 # else
1846 # define LT_DLGLOBAL 0
1847 # endif
1848 #endif
1849
1850 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1851 find out it does not work in some platform. */
1852 #ifndef LT_DLLAZY_OR_NOW
1853 # ifdef RTLD_LAZY
1854 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1855 # else
1856 # ifdef DL_LAZY
1857 # define LT_DLLAZY_OR_NOW DL_LAZY
1858 # else
1859 # ifdef RTLD_NOW
1860 # define LT_DLLAZY_OR_NOW RTLD_NOW
1861 # else
1862 # ifdef DL_NOW
1863 # define LT_DLLAZY_OR_NOW DL_NOW
1864 # else
1865 # define LT_DLLAZY_OR_NOW 0
1866 # endif
1867 # endif
1868 # endif
1869 # endif
1870 #endif
1871
1872 /* When -fvisibility=hidden is used, assume the code has been annotated
1873 correspondingly for the symbols needed. */
1874 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1875 int fnord () __attribute__((visibility("default")));
1876 #endif
1877
1878 int fnord () { return 42; }
1879 int main ()
1880 {
1881 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1882 int status = $lt_dlunknown;
1883
1884 if (self)
1885 {
1886 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1887 else
1888 {
1889 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1890 else puts (dlerror ());
1891 }
1892 /* dlclose (self); */
1893 }
1894 else
1895 puts (dlerror ());
1896
1897 return status;
1898 }]
1899 _LT_EOF
1900 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1901 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1902 lt_status=$?
1903 case x$lt_status in
1904 x$lt_dlno_uscore) $1 ;;
1905 x$lt_dlneed_uscore) $2 ;;
1906 x$lt_dlunknown|x*) $3 ;;
1907 esac
1908 else :
1909 # compilation failed
1910 $3
1911 fi
1912 fi
1913 rm -fr conftest*
1914 ])# _LT_TRY_DLOPEN_SELF
1915
1916
1917 # LT_SYS_DLOPEN_SELF
1918 # ------------------
1919 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1920 [m4_require([_LT_HEADER_DLFCN])dnl
1921 if test yes != "$enable_dlopen"; then
1922 enable_dlopen=unknown
1923 enable_dlopen_self=unknown
1924 enable_dlopen_self_static=unknown
1925 else
1926 lt_cv_dlopen=no
1927 lt_cv_dlopen_libs=
1928
1929 case $host_os in
1930 beos*)
1931 lt_cv_dlopen=load_add_on
1932 lt_cv_dlopen_libs=
1933 lt_cv_dlopen_self=yes
1934 ;;
1935
1936 mingw* | pw32* | cegcc*)
1937 lt_cv_dlopen=LoadLibrary
1938 lt_cv_dlopen_libs=
1939 ;;
1940
1941 cygwin*)
1942 lt_cv_dlopen=dlopen
1943 lt_cv_dlopen_libs=
1944 ;;
1945
1946 darwin*)
1947 # if libdl is installed we need to link against it
1948 AC_CHECK_LIB([dl], [dlopen],
1949 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1950 lt_cv_dlopen=dyld
1951 lt_cv_dlopen_libs=
1952 lt_cv_dlopen_self=yes
1953 ])
1954 ;;
1955
1956 tpf*)
1957 # Don't try to run any link tests for TPF. We know it's impossible
1958 # because TPF is a cross-compiler, and we know how we open DSOs.
1959 lt_cv_dlopen=dlopen
1960 lt_cv_dlopen_libs=
1961 lt_cv_dlopen_self=no
1962 ;;
1963
1964 *)
1965 AC_CHECK_FUNC([shl_load],
1966 [lt_cv_dlopen=shl_load],
1967 [AC_CHECK_LIB([dld], [shl_load],
1968 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1969 [AC_CHECK_FUNC([dlopen],
1970 [lt_cv_dlopen=dlopen],
1971 [AC_CHECK_LIB([dl], [dlopen],
1972 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1973 [AC_CHECK_LIB([svld], [dlopen],
1974 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1975 [AC_CHECK_LIB([dld], [dld_link],
1976 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1977 ])
1978 ])
1979 ])
1980 ])
1981 ])
1982 ;;
1983 esac
1984
1985 if test no = "$lt_cv_dlopen"; then
1986 enable_dlopen=no
1987 else
1988 enable_dlopen=yes
1989 fi
1990
1991 case $lt_cv_dlopen in
1992 dlopen)
1993 save_CPPFLAGS=$CPPFLAGS
1994 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1995
1996 save_LDFLAGS=$LDFLAGS
1997 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1998
1999 save_LIBS=$LIBS
2000 LIBS="$lt_cv_dlopen_libs $LIBS"
2001
2002 AC_CACHE_CHECK([whether a program can dlopen itself],
2003 lt_cv_dlopen_self, [dnl
2004 _LT_TRY_DLOPEN_SELF(
2005 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2006 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2007 ])
2008
2009 if test yes = "$lt_cv_dlopen_self"; then
2010 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2011 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2012 lt_cv_dlopen_self_static, [dnl
2013 _LT_TRY_DLOPEN_SELF(
2014 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2015 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2016 ])
2017 fi
2018
2019 CPPFLAGS=$save_CPPFLAGS
2020 LDFLAGS=$save_LDFLAGS
2021 LIBS=$save_LIBS
2022 ;;
2023 esac
2024
2025 case $lt_cv_dlopen_self in
2026 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2027 *) enable_dlopen_self=unknown ;;
2028 esac
2029
2030 case $lt_cv_dlopen_self_static in
2031 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2032 *) enable_dlopen_self_static=unknown ;;
2033 esac
2034 fi
2035 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2036 [Whether dlopen is supported])
2037 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2038 [Whether dlopen of programs is supported])
2039 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2040 [Whether dlopen of statically linked programs is supported])
2041 ])# LT_SYS_DLOPEN_SELF
2042
2043 # Old name:
2044 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2045 dnl aclocal-1.4 backwards compatibility:
2046 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2047
2048
2049 # _LT_COMPILER_C_O([TAGNAME])
2050 # ---------------------------
2051 # Check to see if options -c and -o are simultaneously supported by compiler.
2052 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2053 m4_defun([_LT_COMPILER_C_O],
2054 [m4_require([_LT_DECL_SED])dnl
2055 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2056 m4_require([_LT_TAG_COMPILER])dnl
2057 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2058 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2059 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2060 $RM -r conftest 2>/dev/null
2061 mkdir conftest
2062 cd conftest
2063 mkdir out
2064 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2065
2066 lt_compiler_flag="-o out/conftest2.$ac_objext"
2067 # Insert the option either (1) after the last *FLAGS variable, or
2068 # (2) before a word containing "conftest.", or (3) at the end.
2069 # Note that $ac_compile itself does not contain backslashes and begins
2070 # with a dollar sign (not a hyphen), so the echo should work correctly.
2071 lt_compile=`echo "$ac_compile" | $SED \
2072 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2073 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2074 -e 's:$: $lt_compiler_flag:'`
2075 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2076 (eval "$lt_compile" 2>out/conftest.err)
2077 ac_status=$?
2078 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2080 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2081 then
2082 # The compiler can only warn and ignore the option if not recognized
2083 # So say no if there are warnings
2084 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2085 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2086 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2087 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2088 fi
2089 fi
2090 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2091 $RM conftest*
2092 # SGI C++ compiler will create directory out/ii_files/ for
2093 # template instantiation
2094 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2095 $RM out/* && rmdir out
2096 cd ..
2097 $RM -r conftest
2098 $RM conftest*
2099 ])
2100 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2101 [Does compiler simultaneously support -c and -o options?])
2102 ])# _LT_COMPILER_C_O
2103
2104
2105 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2106 # ----------------------------------
2107 # Check to see if we can do hard links to lock some files if needed
2108 m4_defun([_LT_COMPILER_FILE_LOCKS],
2109 [m4_require([_LT_ENABLE_LOCK])dnl
2110 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2111 _LT_COMPILER_C_O([$1])
2112
2113 hard_links=nottested
2114 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2115 # do not overwrite the value of need_locks provided by the user
2116 AC_MSG_CHECKING([if we can lock with hard links])
2117 hard_links=yes
2118 $RM conftest*
2119 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2120 touch conftest.a
2121 ln conftest.a conftest.b 2>&5 || hard_links=no
2122 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2123 AC_MSG_RESULT([$hard_links])
2124 if test no = "$hard_links"; then
2125 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2126 need_locks=warn
2127 fi
2128 else
2129 need_locks=no
2130 fi
2131 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2132 ])# _LT_COMPILER_FILE_LOCKS
2133
2134
2135 # _LT_CHECK_OBJDIR
2136 # ----------------
2137 m4_defun([_LT_CHECK_OBJDIR],
2138 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2139 [rm -f .libs 2>/dev/null
2140 mkdir .libs 2>/dev/null
2141 if test -d .libs; then
2142 lt_cv_objdir=.libs
2143 else
2144 # MS-DOS does not allow filenames that begin with a dot.
2145 lt_cv_objdir=_libs
2146 fi
2147 rmdir .libs 2>/dev/null])
2148 objdir=$lt_cv_objdir
2149 _LT_DECL([], [objdir], [0],
2150 [The name of the directory that contains temporary libtool files])dnl
2151 m4_pattern_allow([LT_OBJDIR])dnl
2152 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2153 [Define to the sub-directory where libtool stores uninstalled libraries.])
2154 ])# _LT_CHECK_OBJDIR
2155
2156
2157 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2158 # --------------------------------------
2159 # Check hardcoding attributes.
2160 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2161 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2162 _LT_TAGVAR(hardcode_action, $1)=
2163 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2164 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2165 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2166
2167 # We can hardcode non-existent directories.
2168 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2169 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2170 # have to relink, otherwise we might link with an installed library
2171 # when we should be linking with a yet-to-be-installed one
2172 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2173 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2174 # Linking always hardcodes the temporary library directory.
2175 _LT_TAGVAR(hardcode_action, $1)=relink
2176 else
2177 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2178 _LT_TAGVAR(hardcode_action, $1)=immediate
2179 fi
2180 else
2181 # We cannot hardcode anything, or else we can only hardcode existing
2182 # directories.
2183 _LT_TAGVAR(hardcode_action, $1)=unsupported
2184 fi
2185 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2186
2187 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2188 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2189 # Fast installation is not supported
2190 enable_fast_install=no
2191 elif test yes = "$shlibpath_overrides_runpath" ||
2192 test no = "$enable_shared"; then
2193 # Fast installation is not necessary
2194 enable_fast_install=needless
2195 fi
2196 _LT_TAGDECL([], [hardcode_action], [0],
2197 [How to hardcode a shared library path into an executable])
2198 ])# _LT_LINKER_HARDCODE_LIBPATH
2199
2200
2201 # _LT_CMD_STRIPLIB
2202 # ----------------
2203 m4_defun([_LT_CMD_STRIPLIB],
2204 [m4_require([_LT_DECL_EGREP])
2205 striplib=
2206 old_striplib=
2207 AC_MSG_CHECKING([whether stripping libraries is possible])
2208 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2209 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2210 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2211 AC_MSG_RESULT([yes])
2212 else
2213 # FIXME - insert some real tests, host_os isn't really good enough
2214 case $host_os in
2215 darwin*)
2216 if test -n "$STRIP"; then
2217 striplib="$STRIP -x"
2218 old_striplib="$STRIP -S"
2219 AC_MSG_RESULT([yes])
2220 else
2221 AC_MSG_RESULT([no])
2222 fi
2223 ;;
2224 *)
2225 AC_MSG_RESULT([no])
2226 ;;
2227 esac
2228 fi
2229 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2230 _LT_DECL([], [striplib], [1])
2231 ])# _LT_CMD_STRIPLIB
2232
2233
2234 # _LT_PREPARE_MUNGE_PATH_LIST
2235 # ---------------------------
2236 # Make sure func_munge_path_list() is defined correctly.
2237 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2238 [[# func_munge_path_list VARIABLE PATH
2239 # -----------------------------------
2240 # VARIABLE is name of variable containing _space_ separated list of
2241 # directories to be munged by the contents of PATH, which is string
2242 # having a format:
2243 # "DIR[:DIR]:"
2244 # string "DIR[ DIR]" will be prepended to VARIABLE
2245 # ":DIR[:DIR]"
2246 # string "DIR[ DIR]" will be appended to VARIABLE
2247 # "DIRP[:DIRP]::[DIRA:]DIRA"
2248 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2249 # "DIRA[ DIRA]" will be appended to VARIABLE
2250 # "DIR[:DIR]"
2251 # VARIABLE will be replaced by "DIR[ DIR]"
2252 func_munge_path_list ()
2253 {
2254 case x@S|@2 in
2255 x)
2256 ;;
2257 *:)
2258 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2259 ;;
2260 x:*)
2261 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2262 ;;
2263 *::*)
2264 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2265 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2266 ;;
2267 *)
2268 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2269 ;;
2270 esac
2271 }
2272 ]])# _LT_PREPARE_PATH_LIST
2273
2274
2275 # _LT_SYS_DYNAMIC_LINKER([TAG])
2276 # -----------------------------
2277 # PORTME Fill in your ld.so characteristics
2278 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2279 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2280 m4_require([_LT_DECL_EGREP])dnl
2281 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2282 m4_require([_LT_DECL_OBJDUMP])dnl
2283 m4_require([_LT_DECL_SED])dnl
2284 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2285 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2286 AC_MSG_CHECKING([dynamic linker characteristics])
2287 m4_if([$1],
2288 [], [
2289 if test yes = "$GCC"; then
2290 case $host_os in
2291 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2292 *) lt_awk_arg='/^libraries:/' ;;
2293 esac
2294 case $host_os in
2295 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2296 *) lt_sed_strip_eq='s|=/|/|g' ;;
2297 esac
2298 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2299 case $lt_search_path_spec in
2300 *\;*)
2301 # if the path contains ";" then we assume it to be the separator
2302 # otherwise default to the standard path separator (i.e. ":") - it is
2303 # assumed that no part of a normal pathname contains ";" but that should
2304 # okay in the real world where ";" in dirpaths is itself problematic.
2305 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2306 ;;
2307 *)
2308 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2309 ;;
2310 esac
2311 # Ok, now we have the path, separated by spaces, we can step through it
2312 # and add multilib dir if necessary...
2313 lt_tmp_lt_search_path_spec=
2314 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2315 # ...but if some path component already ends with the multilib dir we assume
2316 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2317 case "$lt_multi_os_dir; $lt_search_path_spec " in
2318 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2319 lt_multi_os_dir=
2320 ;;
2321 esac
2322 for lt_sys_path in $lt_search_path_spec; do
2323 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2324 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2325 elif test -n "$lt_multi_os_dir"; then
2326 test -d "$lt_sys_path" && \
2327 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2328 fi
2329 done
2330 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2331 BEGIN {RS = " "; FS = "/|\n";} {
2332 lt_foo = "";
2333 lt_count = 0;
2334 for (lt_i = NF; lt_i > 0; lt_i--) {
2335 if ($lt_i != "" && $lt_i != ".") {
2336 if ($lt_i == "..") {
2337 lt_count++;
2338 } else {
2339 if (lt_count == 0) {
2340 lt_foo = "/" $lt_i lt_foo;
2341 } else {
2342 lt_count--;
2343 }
2344 }
2345 }
2346 }
2347 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2348 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2349 }'`
2350 # AWK program above erroneously prepends '/' to C:/dos/paths
2351 # for these hosts.
2352 case $host_os in
2353 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2354 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2355 esac
2356 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2357 else
2358 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2359 fi])
2360 library_names_spec=
2361 libname_spec='lib$name'
2362 soname_spec=
2363 shrext_cmds=.so
2364 postinstall_cmds=
2365 postuninstall_cmds=
2366 finish_cmds=
2367 finish_eval=
2368 shlibpath_var=
2369 shlibpath_overrides_runpath=unknown
2370 version_type=none
2371 dynamic_linker="$host_os ld.so"
2372 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2373 need_lib_prefix=unknown
2374 hardcode_into_libs=no
2375
2376 # when you set need_version to no, make sure it does not cause -set_version
2377 # flags to be left without arguments
2378 need_version=unknown
2379
2380 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2381 [User-defined run-time library search path.])
2382
2383 case $host_os in
2384 aix3*)
2385 version_type=linux # correct to gnu/linux during the next big refactor
2386 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2387 shlibpath_var=LIBPATH
2388
2389 # AIX 3 has no versioning support, so we append a major version to the name.
2390 soname_spec='$libname$release$shared_ext$major'
2391 ;;
2392
2393 aix[[4-9]]*)
2394 version_type=linux # correct to gnu/linux during the next big refactor
2395 need_lib_prefix=no
2396 need_version=no
2397 hardcode_into_libs=yes
2398 if test ia64 = "$host_cpu"; then
2399 # AIX 5 supports IA64
2400 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2401 shlibpath_var=LD_LIBRARY_PATH
2402 else
2403 # With GCC up to 2.95.x, collect2 would create an import file
2404 # for dependence libraries. The import file would start with
2405 # the line '#! .'. This would cause the generated library to
2406 # depend on '.', always an invalid library. This was fixed in
2407 # development snapshots of GCC prior to 3.0.
2408 case $host_os in
2409 aix4 | aix4.[[01]] | aix4.[[01]].*)
2410 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2411 echo ' yes '
2412 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2413 :
2414 else
2415 can_build_shared=no
2416 fi
2417 ;;
2418 esac
2419 # Using Import Files as archive members, it is possible to support
2420 # filename-based versioning of shared library archives on AIX. While
2421 # this would work for both with and without runtime linking, it will
2422 # prevent static linking of such archives. So we do filename-based
2423 # shared library versioning with .so extension only, which is used
2424 # when both runtime linking and shared linking is enabled.
2425 # Unfortunately, runtime linking may impact performance, so we do
2426 # not want this to be the default eventually. Also, we use the
2427 # versioned .so libs for executables only if there is the -brtl
2428 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2429 # To allow for filename-based versioning support, we need to create
2430 # libNAME.so.V as an archive file, containing:
2431 # *) an Import File, referring to the versioned filename of the
2432 # archive as well as the shared archive member, telling the
2433 # bitwidth (32 or 64) of that shared object, and providing the
2434 # list of exported symbols of that shared object, eventually
2435 # decorated with the 'weak' keyword
2436 # *) the shared object with the F_LOADONLY flag set, to really avoid
2437 # it being seen by the linker.
2438 # At run time we better use the real file rather than another symlink,
2439 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2440
2441 case $with_aix_soname,$aix_use_runtimelinking in
2442 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2443 # soname into executable. Probably we can add versioning support to
2444 # collect2, so additional links can be useful in future.
2445 aix,yes) # traditional libtool
2446 dynamic_linker='AIX unversionable lib.so'
2447 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2448 # instead of lib<name>.a to let people know that these are not
2449 # typical AIX shared libraries.
2450 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2451 ;;
2452 aix,no) # traditional AIX only
2453 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2454 # We preserve .a as extension for shared libraries through AIX4.2
2455 # and later when we are not doing run time linking.
2456 library_names_spec='$libname$release.a $libname.a'
2457 soname_spec='$libname$release$shared_ext$major'
2458 ;;
2459 svr4,*) # full svr4 only
2460 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2461 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2462 # We do not specify a path in Import Files, so LIBPATH fires.
2463 shlibpath_overrides_runpath=yes
2464 ;;
2465 *,yes) # both, prefer svr4
2466 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2467 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2468 # unpreferred sharedlib libNAME.a needs extra handling
2469 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2470 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2471 # We do not specify a path in Import Files, so LIBPATH fires.
2472 shlibpath_overrides_runpath=yes
2473 ;;
2474 *,no) # both, prefer aix
2475 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2476 library_names_spec='$libname$release.a $libname.a'
2477 soname_spec='$libname$release$shared_ext$major'
2478 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2479 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2480 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2481 ;;
2482 esac
2483 shlibpath_var=LIBPATH
2484 fi
2485 ;;
2486
2487 amigaos*)
2488 case $host_cpu in
2489 powerpc)
2490 # Since July 2007 AmigaOS4 officially supports .so libraries.
2491 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2492 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2493 ;;
2494 m68k)
2495 library_names_spec='$libname.ixlibrary $libname.a'
2496 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2497 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
2498 ;;
2499 esac
2500 ;;
2501
2502 beos*)
2503 library_names_spec='$libname$shared_ext'
2504 dynamic_linker="$host_os ld.so"
2505 shlibpath_var=LIBRARY_PATH
2506 ;;
2507
2508 bsdi[[45]]*)
2509 version_type=linux # correct to gnu/linux during the next big refactor
2510 need_version=no
2511 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2512 soname_spec='$libname$release$shared_ext$major'
2513 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2514 shlibpath_var=LD_LIBRARY_PATH
2515 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2516 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2517 # the default ld.so.conf also contains /usr/contrib/lib and
2518 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2519 # libtool to hard-code these into programs
2520 ;;
2521
2522 cygwin* | mingw* | pw32* | cegcc*)
2523 version_type=windows
2524 shrext_cmds=.dll
2525 need_version=no
2526 need_lib_prefix=no
2527
2528 case $GCC,$cc_basename in
2529 yes,*)
2530 # gcc
2531 library_names_spec='$libname.dll.a'
2532 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2533 postinstall_cmds='base_file=`basename \$file`~
2534 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2535 dldir=$destdir/`dirname \$dlpath`~
2536 test -d \$dldir || mkdir -p \$dldir~
2537 $install_prog $dir/$dlname \$dldir/$dlname~
2538 chmod a+x \$dldir/$dlname~
2539 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2540 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2541 fi'
2542 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2543 dlpath=$dir/\$dldll~
2544 $RM \$dlpath'
2545 shlibpath_overrides_runpath=yes
2546
2547 case $host_os in
2548 cygwin*)
2549 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2550 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2551 m4_if([$1], [],[
2552 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2553 ;;
2554 mingw* | cegcc*)
2555 # MinGW DLLs use traditional 'lib' prefix
2556 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2557 ;;
2558 pw32*)
2559 # pw32 DLLs use 'pw' prefix rather than 'lib'
2560 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2561 ;;
2562 esac
2563 dynamic_linker='Win32 ld.exe'
2564 ;;
2565
2566 *,cl*)
2567 # Native MSVC
2568 libname_spec='$name'
2569 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2570 library_names_spec='$libname.dll.lib'
2571
2572 case $build_os in
2573 mingw*)
2574 sys_lib_search_path_spec=
2575 lt_save_ifs=$IFS
2576 IFS=';'
2577 for lt_path in $LIB
2578 do
2579 IFS=$lt_save_ifs
2580 # Let DOS variable expansion print the short 8.3 style file name.
2581 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2582 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2583 done
2584 IFS=$lt_save_ifs
2585 # Convert to MSYS style.
2586 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2587 ;;
2588 cygwin*)
2589 # Convert to unix form, then to dos form, then back to unix form
2590 # but this time dos style (no spaces!) so that the unix form looks
2591 # like /cygdrive/c/PROGRA~1:/cygdr...
2592 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2593 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2594 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2595 ;;
2596 *)
2597 sys_lib_search_path_spec=$LIB
2598 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2599 # It is most probably a Windows format PATH.
2600 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2601 else
2602 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2603 fi
2604 # FIXME: find the short name or the path components, as spaces are
2605 # common. (e.g. "Program Files" -> "PROGRA~1")
2606 ;;
2607 esac
2608
2609 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2610 postinstall_cmds='base_file=`basename \$file`~
2611 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2612 dldir=$destdir/`dirname \$dlpath`~
2613 test -d \$dldir || mkdir -p \$dldir~
2614 $install_prog $dir/$dlname \$dldir/$dlname'
2615 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2616 dlpath=$dir/\$dldll~
2617 $RM \$dlpath'
2618 shlibpath_overrides_runpath=yes
2619 dynamic_linker='Win32 link.exe'
2620 ;;
2621
2622 *)
2623 # Assume MSVC wrapper
2624 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2625 dynamic_linker='Win32 ld.exe'
2626 ;;
2627 esac
2628 # FIXME: first we should search . and the directory the executable is in
2629 shlibpath_var=PATH
2630 ;;
2631
2632 darwin* | rhapsody*)
2633 dynamic_linker="$host_os dyld"
2634 version_type=darwin
2635 need_lib_prefix=no
2636 need_version=no
2637 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2638 soname_spec='$libname$release$major$shared_ext'
2639 shlibpath_overrides_runpath=yes
2640 shlibpath_var=DYLD_LIBRARY_PATH
2641 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2642 m4_if([$1], [],[
2643 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2644 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2645 ;;
2646
2647 dgux*)
2648 version_type=linux # correct to gnu/linux during the next big refactor
2649 need_lib_prefix=no
2650 need_version=no
2651 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2652 soname_spec='$libname$release$shared_ext$major'
2653 shlibpath_var=LD_LIBRARY_PATH
2654 ;;
2655
2656 freebsd* | dragonfly*)
2657 # DragonFly does not have aout. When/if they implement a new
2658 # versioning mechanism, adjust this.
2659 if test -x /usr/bin/objformat; then
2660 objformat=`/usr/bin/objformat`
2661 else
2662 case $host_os in
2663 freebsd[[23]].*) objformat=aout ;;
2664 *) objformat=elf ;;
2665 esac
2666 fi
2667 version_type=freebsd-$objformat
2668 case $version_type in
2669 freebsd-elf*)
2670 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2671 soname_spec='$libname$release$shared_ext$major'
2672 need_version=no
2673 need_lib_prefix=no
2674 ;;
2675 freebsd-*)
2676 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2677 need_version=yes
2678 ;;
2679 esac
2680 shlibpath_var=LD_LIBRARY_PATH
2681 case $host_os in
2682 freebsd2.*)
2683 shlibpath_overrides_runpath=yes
2684 ;;
2685 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2686 shlibpath_overrides_runpath=yes
2687 hardcode_into_libs=yes
2688 ;;
2689 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2690 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2691 shlibpath_overrides_runpath=no
2692 hardcode_into_libs=yes
2693 ;;
2694 *) # from 4.6 on, and DragonFly
2695 shlibpath_overrides_runpath=yes
2696 hardcode_into_libs=yes
2697 ;;
2698 esac
2699 ;;
2700
2701 haiku*)
2702 version_type=linux # correct to gnu/linux during the next big refactor
2703 need_lib_prefix=no
2704 need_version=no
2705 dynamic_linker="$host_os runtime_loader"
2706 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2707 soname_spec='$libname$release$shared_ext$major'
2708 shlibpath_var=LIBRARY_PATH
2709 shlibpath_overrides_runpath=no
2710 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2711 hardcode_into_libs=yes
2712 ;;
2713
2714 hpux9* | hpux10* | hpux11*)
2715 # Give a soname corresponding to the major version so that dld.sl refuses to
2716 # link against other versions.
2717 version_type=sunos
2718 need_lib_prefix=no
2719 need_version=no
2720 case $host_cpu in
2721 ia64*)
2722 shrext_cmds='.so'
2723 hardcode_into_libs=yes
2724 dynamic_linker="$host_os dld.so"
2725 shlibpath_var=LD_LIBRARY_PATH
2726 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2727 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2728 soname_spec='$libname$release$shared_ext$major'
2729 if test 32 = "$HPUX_IA64_MODE"; then
2730 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2731 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2732 else
2733 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2734 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2735 fi
2736 ;;
2737 hppa*64*)
2738 shrext_cmds='.sl'
2739 hardcode_into_libs=yes
2740 dynamic_linker="$host_os dld.sl"
2741 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2742 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2743 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2744 soname_spec='$libname$release$shared_ext$major'
2745 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2746 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2747 ;;
2748 *)
2749 shrext_cmds='.sl'
2750 dynamic_linker="$host_os dld.sl"
2751 shlibpath_var=SHLIB_PATH
2752 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2753 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2754 soname_spec='$libname$release$shared_ext$major'
2755 ;;
2756 esac
2757 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2758 postinstall_cmds='chmod 555 $lib'
2759 # or fails outright, so override atomically:
2760 install_override_mode=555
2761 ;;
2762
2763 interix[[3-9]]*)
2764 version_type=linux # correct to gnu/linux during the next big refactor
2765 need_lib_prefix=no
2766 need_version=no
2767 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2768 soname_spec='$libname$release$shared_ext$major'
2769 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2770 shlibpath_var=LD_LIBRARY_PATH
2771 shlibpath_overrides_runpath=no
2772 hardcode_into_libs=yes
2773 ;;
2774
2775 irix5* | irix6* | nonstopux*)
2776 case $host_os in
2777 nonstopux*) version_type=nonstopux ;;
2778 *)
2779 if test yes = "$lt_cv_prog_gnu_ld"; then
2780 version_type=linux # correct to gnu/linux during the next big refactor
2781 else
2782 version_type=irix
2783 fi ;;
2784 esac
2785 need_lib_prefix=no
2786 need_version=no
2787 soname_spec='$libname$release$shared_ext$major'
2788 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2789 case $host_os in
2790 irix5* | nonstopux*)
2791 libsuff= shlibsuff=
2792 ;;
2793 *)
2794 case $LD in # libtool.m4 will add one of these switches to LD
2795 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2796 libsuff= shlibsuff= libmagic=32-bit;;
2797 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2798 libsuff=32 shlibsuff=N32 libmagic=N32;;
2799 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2800 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2801 *) libsuff= shlibsuff= libmagic=never-match;;
2802 esac
2803 ;;
2804 esac
2805 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2806 shlibpath_overrides_runpath=no
2807 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2808 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2809 hardcode_into_libs=yes
2810 ;;
2811
2812 # No shared lib support for Linux oldld, aout, or coff.
2813 linux*oldld* | linux*aout* | linux*coff*)
2814 dynamic_linker=no
2815 ;;
2816
2817 linux*android*)
2818 version_type=none # Android doesn't support versioned libraries.
2819 need_lib_prefix=no
2820 need_version=no
2821 library_names_spec='$libname$release$shared_ext'
2822 soname_spec='$libname$release$shared_ext'
2823 finish_cmds=
2824 shlibpath_var=LD_LIBRARY_PATH
2825 shlibpath_overrides_runpath=yes
2826
2827 # This implies no fast_install, which is unacceptable.
2828 # Some rework will be needed to allow for fast_install
2829 # before this can be enabled.
2830 hardcode_into_libs=yes
2831
2832 dynamic_linker='Android linker'
2833 # Don't embed -rpath directories since the linker doesn't support them.
2834 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2835 ;;
2836
2837 # This must be glibc/ELF.
2838 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2839 version_type=linux # correct to gnu/linux during the next big refactor
2840 need_lib_prefix=no
2841 need_version=no
2842 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2843 soname_spec='$libname$release$shared_ext$major'
2844 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2845 shlibpath_var=LD_LIBRARY_PATH
2846 shlibpath_overrides_runpath=no
2847
2848 # Some binutils ld are patched to set DT_RUNPATH
2849 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2850 [lt_cv_shlibpath_overrides_runpath=no
2851 save_LDFLAGS=$LDFLAGS
2852 save_libdir=$libdir
2853 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2854 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2855 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2856 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2857 [lt_cv_shlibpath_overrides_runpath=yes])])
2858 LDFLAGS=$save_LDFLAGS
2859 libdir=$save_libdir
2860 ])
2861 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2862
2863 # This implies no fast_install, which is unacceptable.
2864 # Some rework will be needed to allow for fast_install
2865 # before this can be enabled.
2866 hardcode_into_libs=yes
2867
2868 # Ideally, we could use ldconfig to report *all* directores which are
2869 # searched for libraries, however this is still not possible. Aside from not
2870 # being certain /sbin/ldconfig is available, command
2871 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2872 # even though it is searched at run-time. Try to do the best guess by
2873 # appending ld.so.conf contents (and includes) to the search path.
2874 if test -f /etc/ld.so.conf; then
2875 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2876 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2877 fi
2878
2879 # We used to test for /lib/ld.so.1 and disable shared libraries on
2880 # powerpc, because MkLinux only supported shared libraries with the
2881 # GNU dynamic linker. Since this was broken with cross compilers,
2882 # most powerpc-linux boxes support dynamic linking these days and
2883 # people can always --disable-shared, the test was removed, and we
2884 # assume the GNU/Linux dynamic linker is in use.
2885 dynamic_linker='GNU/Linux ld.so'
2886 ;;
2887
2888 netbsdelf*-gnu)
2889 version_type=linux
2890 need_lib_prefix=no
2891 need_version=no
2892 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2893 soname_spec='${libname}${release}${shared_ext}$major'
2894 shlibpath_var=LD_LIBRARY_PATH
2895 shlibpath_overrides_runpath=no
2896 hardcode_into_libs=yes
2897 dynamic_linker='NetBSD ld.elf_so'
2898 ;;
2899
2900 netbsd*)
2901 version_type=sunos
2902 need_lib_prefix=no
2903 need_version=no
2904 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2905 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2906 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2907 dynamic_linker='NetBSD (a.out) ld.so'
2908 else
2909 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2910 soname_spec='$libname$release$shared_ext$major'
2911 dynamic_linker='NetBSD ld.elf_so'
2912 fi
2913 shlibpath_var=LD_LIBRARY_PATH
2914 shlibpath_overrides_runpath=yes
2915 hardcode_into_libs=yes
2916 ;;
2917
2918 newsos6)
2919 version_type=linux # correct to gnu/linux during the next big refactor
2920 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2921 shlibpath_var=LD_LIBRARY_PATH
2922 shlibpath_overrides_runpath=yes
2923 ;;
2924
2925 *nto* | *qnx*)
2926 version_type=qnx
2927 need_lib_prefix=no
2928 need_version=no
2929 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2930 soname_spec='$libname$release$shared_ext$major'
2931 shlibpath_var=LD_LIBRARY_PATH
2932 shlibpath_overrides_runpath=no
2933 hardcode_into_libs=yes
2934 dynamic_linker='ldqnx.so'
2935 ;;
2936
2937 openbsd* | bitrig*)
2938 version_type=sunos
2939 sys_lib_dlsearch_path_spec=/usr/lib
2940 need_lib_prefix=no
2941 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2942 need_version=no
2943 else
2944 need_version=yes
2945 fi
2946 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2947 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2948 shlibpath_var=LD_LIBRARY_PATH
2949 shlibpath_overrides_runpath=yes
2950 ;;
2951
2952 os2*)
2953 libname_spec='$name'
2954 version_type=windows
2955 shrext_cmds=.dll
2956 need_version=no
2957 need_lib_prefix=no
2958 # OS/2 can only load a DLL with a base name of 8 characters or less.
2959 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2960 v=$($ECHO $release$versuffix | tr -d .-);
2961 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2962 $ECHO $n$v`$shared_ext'
2963 library_names_spec='${libname}_dll.$libext'
2964 dynamic_linker='OS/2 ld.exe'
2965 shlibpath_var=BEGINLIBPATH
2966 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2967 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2968 postinstall_cmds='base_file=`basename \$file`~
2969 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2970 dldir=$destdir/`dirname \$dlpath`~
2971 test -d \$dldir || mkdir -p \$dldir~
2972 $install_prog $dir/$dlname \$dldir/$dlname~
2973 chmod a+x \$dldir/$dlname~
2974 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2975 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2976 fi'
2977 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2978 dlpath=$dir/\$dldll~
2979 $RM \$dlpath'
2980 ;;
2981
2982 osf3* | osf4* | osf5*)
2983 version_type=osf
2984 need_lib_prefix=no
2985 need_version=no
2986 soname_spec='$libname$release$shared_ext$major'
2987 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2988 shlibpath_var=LD_LIBRARY_PATH
2989 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2990 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2991 ;;
2992
2993 rdos*)
2994 dynamic_linker=no
2995 ;;
2996
2997 solaris*)
2998 version_type=linux # correct to gnu/linux during the next big refactor
2999 need_lib_prefix=no
3000 need_version=no
3001 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3002 soname_spec='$libname$release$shared_ext$major'
3003 shlibpath_var=LD_LIBRARY_PATH
3004 shlibpath_overrides_runpath=yes
3005 hardcode_into_libs=yes
3006 # ldd complains unless libraries are executable
3007 postinstall_cmds='chmod +x $lib'
3008 ;;
3009
3010 sunos4*)
3011 version_type=sunos
3012 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3013 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3014 shlibpath_var=LD_LIBRARY_PATH
3015 shlibpath_overrides_runpath=yes
3016 if test yes = "$with_gnu_ld"; then
3017 need_lib_prefix=no
3018 fi
3019 need_version=yes
3020 ;;
3021
3022 sysv4 | sysv4.3*)
3023 version_type=linux # correct to gnu/linux during the next big refactor
3024 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3025 soname_spec='$libname$release$shared_ext$major'
3026 shlibpath_var=LD_LIBRARY_PATH
3027 case $host_vendor in
3028 sni)
3029 shlibpath_overrides_runpath=no
3030 need_lib_prefix=no
3031 runpath_var=LD_RUN_PATH
3032 ;;
3033 siemens)
3034 need_lib_prefix=no
3035 ;;
3036 motorola)
3037 need_lib_prefix=no
3038 need_version=no
3039 shlibpath_overrides_runpath=no
3040 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3041 ;;
3042 esac
3043 ;;
3044
3045 sysv4*MP*)
3046 if test -d /usr/nec; then
3047 version_type=linux # correct to gnu/linux during the next big refactor
3048 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3049 soname_spec='$libname$shared_ext.$major'
3050 shlibpath_var=LD_LIBRARY_PATH
3051 fi
3052 ;;
3053
3054 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3055 version_type=sco
3056 need_lib_prefix=no
3057 need_version=no
3058 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3059 soname_spec='$libname$release$shared_ext$major'
3060 shlibpath_var=LD_LIBRARY_PATH
3061 shlibpath_overrides_runpath=yes
3062 hardcode_into_libs=yes
3063 if test yes = "$with_gnu_ld"; then
3064 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3065 else
3066 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3067 case $host_os in
3068 sco3.2v5*)
3069 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3070 ;;
3071 esac
3072 fi
3073 sys_lib_dlsearch_path_spec='/usr/lib'
3074 ;;
3075
3076 tpf*)
3077 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3078 version_type=linux # correct to gnu/linux during the next big refactor
3079 need_lib_prefix=no
3080 need_version=no
3081 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3082 shlibpath_var=LD_LIBRARY_PATH
3083 shlibpath_overrides_runpath=no
3084 hardcode_into_libs=yes
3085 ;;
3086
3087 uts4*)
3088 version_type=linux # correct to gnu/linux during the next big refactor
3089 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3090 soname_spec='$libname$release$shared_ext$major'
3091 shlibpath_var=LD_LIBRARY_PATH
3092 ;;
3093
3094 *)
3095 dynamic_linker=no
3096 ;;
3097 esac
3098 AC_MSG_RESULT([$dynamic_linker])
3099 test no = "$dynamic_linker" && can_build_shared=no
3100
3101 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3102 if test yes = "$GCC"; then
3103 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3104 fi
3105
3106 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3107 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3108 fi
3109
3110 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3111 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3112 fi
3113
3114 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3115 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3116
3117 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3118 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3119
3120 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3121 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3122
3123 _LT_DECL([], [variables_saved_for_relink], [1],
3124 [Variables whose values should be saved in libtool wrapper scripts and
3125 restored at link time])
3126 _LT_DECL([], [need_lib_prefix], [0],
3127 [Do we need the "lib" prefix for modules?])
3128 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3129 _LT_DECL([], [version_type], [0], [Library versioning type])
3130 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3131 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3132 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3133 [Is shlibpath searched before the hard-coded library search path?])
3134 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3135 _LT_DECL([], [library_names_spec], [1],
3136 [[List of archive names. First name is the real one, the rest are links.
3137 The last name is the one that the linker finds with -lNAME]])
3138 _LT_DECL([], [soname_spec], [1],
3139 [[The coded name of the library, if different from the real name]])
3140 _LT_DECL([], [install_override_mode], [1],
3141 [Permission mode override for installation of shared libraries])
3142 _LT_DECL([], [postinstall_cmds], [2],
3143 [Command to use after installation of a shared archive])
3144 _LT_DECL([], [postuninstall_cmds], [2],
3145 [Command to use after uninstallation of a shared archive])
3146 _LT_DECL([], [finish_cmds], [2],
3147 [Commands used to finish a libtool library installation in a directory])
3148 _LT_DECL([], [finish_eval], [1],
3149 [[As "finish_cmds", except a single script fragment to be evaled but
3150 not shown]])
3151 _LT_DECL([], [hardcode_into_libs], [0],
3152 [Whether we should hardcode library paths into libraries])
3153 _LT_DECL([], [sys_lib_search_path_spec], [2],
3154 [Compile-time system search path for libraries])
3155 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3156 [Detected run-time system search path for libraries])
3157 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3158 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3159 ])# _LT_SYS_DYNAMIC_LINKER
3160
3161
3162 # _LT_PATH_TOOL_PREFIX(TOOL)
3163 # --------------------------
3164 # find a file program that can recognize shared library
3165 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3166 [m4_require([_LT_DECL_EGREP])dnl
3167 AC_MSG_CHECKING([for $1])
3168 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3169 [case $MAGIC_CMD in
3170 [[\\/*] | ?:[\\/]*])
3171 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3172 ;;
3173 *)
3174 lt_save_MAGIC_CMD=$MAGIC_CMD
3175 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3176 dnl $ac_dummy forces splitting on constant user-supplied paths.
3177 dnl POSIX.2 word splitting is done only on the output of word expansions,
3178 dnl not every word. This closes a longstanding sh security hole.
3179 ac_dummy="m4_if([$2], , $PATH, [$2])"
3180 for ac_dir in $ac_dummy; do
3181 IFS=$lt_save_ifs
3182 test -z "$ac_dir" && ac_dir=.
3183 if test -f "$ac_dir/$1"; then
3184 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3185 if test -n "$file_magic_test_file"; then
3186 case $deplibs_check_method in
3187 "file_magic "*)
3188 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3189 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3190 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3191 $EGREP "$file_magic_regex" > /dev/null; then
3192 :
3193 else
3194 cat <<_LT_EOF 1>&2
3195
3196 *** Warning: the command libtool uses to detect shared libraries,
3197 *** $file_magic_cmd, produces output that libtool cannot recognize.
3198 *** The result is that libtool may fail to recognize shared libraries
3199 *** as such. This will affect the creation of libtool libraries that
3200 *** depend on shared libraries, but programs linked with such libtool
3201 *** libraries will work regardless of this problem. Nevertheless, you
3202 *** may want to report the problem to your system manager and/or to
3203 *** bug-libtool@gnu.org
3204
3205 _LT_EOF
3206 fi ;;
3207 esac
3208 fi
3209 break
3210 fi
3211 done
3212 IFS=$lt_save_ifs
3213 MAGIC_CMD=$lt_save_MAGIC_CMD
3214 ;;
3215 esac])
3216 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3217 if test -n "$MAGIC_CMD"; then
3218 AC_MSG_RESULT($MAGIC_CMD)
3219 else
3220 AC_MSG_RESULT(no)
3221 fi
3222 _LT_DECL([], [MAGIC_CMD], [0],
3223 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3224 ])# _LT_PATH_TOOL_PREFIX
3225
3226 # Old name:
3227 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3228 dnl aclocal-1.4 backwards compatibility:
3229 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3230
3231
3232 # _LT_PATH_MAGIC
3233 # --------------
3234 # find a file program that can recognize a shared library
3235 m4_defun([_LT_PATH_MAGIC],
3236 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3237 if test -z "$lt_cv_path_MAGIC_CMD"; then
3238 if test -n "$ac_tool_prefix"; then
3239 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3240 else
3241 MAGIC_CMD=:
3242 fi
3243 fi
3244 ])# _LT_PATH_MAGIC
3245
3246
3247 # LT_PATH_LD
3248 # ----------
3249 # find the pathname to the GNU or non-GNU linker
3250 AC_DEFUN([LT_PATH_LD],
3251 [AC_REQUIRE([AC_PROG_CC])dnl
3252 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3253 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3254 m4_require([_LT_DECL_SED])dnl
3255 m4_require([_LT_DECL_EGREP])dnl
3256 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3257
3258 AC_ARG_WITH([gnu-ld],
3259 [AS_HELP_STRING([--with-gnu-ld],
3260 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3261 [test no = "$withval" || with_gnu_ld=yes],
3262 [with_gnu_ld=no])dnl
3263
3264 ac_prog=ld
3265 if test yes = "$GCC"; then
3266 # Check if gcc -print-prog-name=ld gives a path.
3267 AC_MSG_CHECKING([for ld used by $CC])
3268 case $host in
3269 *-*-mingw*)
3270 # gcc leaves a trailing carriage return, which upsets mingw
3271 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3272 *)
3273 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3274 esac
3275 case $ac_prog in
3276 # Accept absolute paths.
3277 [[\\/]]* | ?:[[\\/]]*)
3278 re_direlt='/[[^/]][[^/]]*/\.\./'
3279 # Canonicalize the pathname of ld
3280 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3281 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3282 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3283 done
3284 test -z "$LD" && LD=$ac_prog
3285 ;;
3286 "")
3287 # If it fails, then pretend we aren't using GCC.
3288 ac_prog=ld
3289 ;;
3290 *)
3291 # If it is relative, then search for the first ld in PATH.
3292 with_gnu_ld=unknown
3293 ;;
3294 esac
3295 elif test yes = "$with_gnu_ld"; then
3296 AC_MSG_CHECKING([for GNU ld])
3297 else
3298 AC_MSG_CHECKING([for non-GNU ld])
3299 fi
3300 AC_CACHE_VAL(lt_cv_path_LD,
3301 [if test -z "$LD"; then
3302 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3303 for ac_dir in $PATH; do
3304 IFS=$lt_save_ifs
3305 test -z "$ac_dir" && ac_dir=.
3306 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3307 lt_cv_path_LD=$ac_dir/$ac_prog
3308 # Check to see if the program is GNU ld. I'd rather use --version,
3309 # but apparently some variants of GNU ld only accept -v.
3310 # Break only if it was the GNU/non-GNU ld that we prefer.
3311 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3312 *GNU* | *'with BFD'*)
3313 test no != "$with_gnu_ld" && break
3314 ;;
3315 *)
3316 test yes != "$with_gnu_ld" && break
3317 ;;
3318 esac
3319 fi
3320 done
3321 IFS=$lt_save_ifs
3322 else
3323 lt_cv_path_LD=$LD # Let the user override the test with a path.
3324 fi])
3325 LD=$lt_cv_path_LD
3326 if test -n "$LD"; then
3327 AC_MSG_RESULT($LD)
3328 else
3329 AC_MSG_RESULT(no)
3330 fi
3331 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3332 _LT_PATH_LD_GNU
3333 AC_SUBST([LD])
3334
3335 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3336 ])# LT_PATH_LD
3337
3338 # Old names:
3339 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3340 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3341 dnl aclocal-1.4 backwards compatibility:
3342 dnl AC_DEFUN([AM_PROG_LD], [])
3343 dnl AC_DEFUN([AC_PROG_LD], [])
3344
3345
3346 # _LT_PATH_LD_GNU
3347 #- --------------
3348 m4_defun([_LT_PATH_LD_GNU],
3349 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3350 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3351 case `$LD -v 2>&1 </dev/null` in
3352 *GNU* | *'with BFD'*)
3353 lt_cv_prog_gnu_ld=yes
3354 ;;
3355 *)
3356 lt_cv_prog_gnu_ld=no
3357 ;;
3358 esac])
3359 with_gnu_ld=$lt_cv_prog_gnu_ld
3360 ])# _LT_PATH_LD_GNU
3361
3362
3363 # _LT_CMD_RELOAD
3364 # --------------
3365 # find reload flag for linker
3366 # -- PORTME Some linkers may need a different reload flag.
3367 m4_defun([_LT_CMD_RELOAD],
3368 [AC_CACHE_CHECK([for $LD option to reload object files],
3369 lt_cv_ld_reload_flag,
3370 [lt_cv_ld_reload_flag='-r'])
3371 reload_flag=$lt_cv_ld_reload_flag
3372 case $reload_flag in
3373 "" | " "*) ;;
3374 *) reload_flag=" $reload_flag" ;;
3375 esac
3376 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3377 case $host_os in
3378 cygwin* | mingw* | pw32* | cegcc*)
3379 if test yes != "$GCC"; then
3380 reload_cmds=false
3381 fi
3382 ;;
3383 darwin*)
3384 if test yes = "$GCC"; then
3385 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3386 else
3387 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3388 fi
3389 ;;
3390 esac
3391 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3392 _LT_TAGDECL([], [reload_cmds], [2])dnl
3393 ])# _LT_CMD_RELOAD
3394
3395
3396 # _LT_PATH_DD
3397 # -----------
3398 # find a working dd
3399 m4_defun([_LT_PATH_DD],
3400 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3401 [printf 0123456789abcdef0123456789abcdef >conftest.i
3402 cat conftest.i conftest.i >conftest2.i
3403 : ${lt_DD:=$DD}
3404 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3405 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3406 cmp -s conftest.i conftest.out \
3407 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3408 fi])
3409 rm -f conftest.i conftest2.i conftest.out])
3410 ])# _LT_PATH_DD
3411
3412
3413 # _LT_CMD_TRUNCATE
3414 # ----------------
3415 # find command to truncate a binary pipe
3416 m4_defun([_LT_CMD_TRUNCATE],
3417 [m4_require([_LT_PATH_DD])
3418 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3419 [printf 0123456789abcdef0123456789abcdef >conftest.i
3420 cat conftest.i conftest.i >conftest2.i
3421 lt_cv_truncate_bin=
3422 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3423 cmp -s conftest.i conftest.out \
3424 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3425 fi
3426 rm -f conftest.i conftest2.i conftest.out
3427 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3428 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3429 [Command to truncate a binary pipe])
3430 ])# _LT_CMD_TRUNCATE
3431
3432
3433 # _LT_CHECK_MAGIC_METHOD
3434 # ----------------------
3435 # how to check for library dependencies
3436 # -- PORTME fill in with the dynamic library characteristics
3437 m4_defun([_LT_CHECK_MAGIC_METHOD],
3438 [m4_require([_LT_DECL_EGREP])
3439 m4_require([_LT_DECL_OBJDUMP])
3440 AC_CACHE_CHECK([how to recognize dependent libraries],
3441 lt_cv_deplibs_check_method,
3442 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3443 lt_cv_file_magic_test_file=
3444 lt_cv_deplibs_check_method='unknown'
3445 # Need to set the preceding variable on all platforms that support
3446 # interlibrary dependencies.
3447 # 'none' -- dependencies not supported.
3448 # 'unknown' -- same as none, but documents that we really don't know.
3449 # 'pass_all' -- all dependencies passed with no checks.
3450 # 'test_compile' -- check by making test program.
3451 # 'file_magic [[regex]]' -- check by looking for files in library path
3452 # that responds to the $file_magic_cmd with a given extended regex.
3453 # If you have 'file' or equivalent on your system and you're not sure
3454 # whether 'pass_all' will *always* work, you probably want this one.
3455
3456 case $host_os in
3457 aix[[4-9]]*)
3458 lt_cv_deplibs_check_method=pass_all
3459 ;;
3460
3461 beos*)
3462 lt_cv_deplibs_check_method=pass_all
3463 ;;
3464
3465 bsdi[[45]]*)
3466 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3467 lt_cv_file_magic_cmd='/usr/bin/file -L'
3468 lt_cv_file_magic_test_file=/shlib/libc.so
3469 ;;
3470
3471 cygwin*)
3472 # func_win32_libid is a shell function defined in ltmain.sh
3473 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3474 lt_cv_file_magic_cmd='func_win32_libid'
3475 ;;
3476
3477 mingw* | pw32*)
3478 # Base MSYS/MinGW do not provide the 'file' command needed by
3479 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3480 # unless we find 'file', for example because we are cross-compiling.
3481 if ( file / ) >/dev/null 2>&1; then
3482 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3483 lt_cv_file_magic_cmd='func_win32_libid'
3484 else
3485 # Keep this pattern in sync with the one in func_win32_libid.
3486 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3487 lt_cv_file_magic_cmd='$OBJDUMP -f'
3488 fi
3489 ;;
3490
3491 cegcc*)
3492 # use the weaker test based on 'objdump'. See mingw*.
3493 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3494 lt_cv_file_magic_cmd='$OBJDUMP -f'
3495 ;;
3496
3497 darwin* | rhapsody*)
3498 lt_cv_deplibs_check_method=pass_all
3499 ;;
3500
3501 freebsd* | dragonfly*)
3502 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3503 case $host_cpu in
3504 i*86 )
3505 # Not sure whether the presence of OpenBSD here was a mistake.
3506 # Let's accept both of them until this is cleared up.
3507 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3508 lt_cv_file_magic_cmd=/usr/bin/file
3509 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3510 ;;
3511 esac
3512 else
3513 lt_cv_deplibs_check_method=pass_all
3514 fi
3515 ;;
3516
3517 haiku*)
3518 lt_cv_deplibs_check_method=pass_all
3519 ;;
3520
3521 hpux10.20* | hpux11*)
3522 lt_cv_file_magic_cmd=/usr/bin/file
3523 case $host_cpu in
3524 ia64*)
3525 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3526 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3527 ;;
3528 hppa*64*)
3529 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3530 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3531 ;;
3532 *)
3533 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3534 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3535 ;;
3536 esac
3537 ;;
3538
3539 interix[[3-9]]*)
3540 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3541 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3542 ;;
3543
3544 irix5* | irix6* | nonstopux*)
3545 case $LD in
3546 *-32|*"-32 ") libmagic=32-bit;;
3547 *-n32|*"-n32 ") libmagic=N32;;
3548 *-64|*"-64 ") libmagic=64-bit;;
3549 *) libmagic=never-match;;
3550 esac
3551 lt_cv_deplibs_check_method=pass_all
3552 ;;
3553
3554 # This must be glibc/ELF.
3555 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3556 lt_cv_deplibs_check_method=pass_all
3557 ;;
3558
3559 netbsd* | netbsdelf*-gnu)
3560 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3561 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3562 else
3563 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3564 fi
3565 ;;
3566
3567 newos6*)
3568 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3569 lt_cv_file_magic_cmd=/usr/bin/file
3570 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3571 ;;
3572
3573 *nto* | *qnx*)
3574 lt_cv_deplibs_check_method=pass_all
3575 ;;
3576
3577 openbsd* | bitrig*)
3578 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3579 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3580 else
3581 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3582 fi
3583 ;;
3584
3585 osf3* | osf4* | osf5*)
3586 lt_cv_deplibs_check_method=pass_all
3587 ;;
3588
3589 rdos*)
3590 lt_cv_deplibs_check_method=pass_all
3591 ;;
3592
3593 solaris*)
3594 lt_cv_deplibs_check_method=pass_all
3595 ;;
3596
3597 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3598 lt_cv_deplibs_check_method=pass_all
3599 ;;
3600
3601 sysv4 | sysv4.3*)
3602 case $host_vendor in
3603 motorola)
3604 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]]'
3605 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3606 ;;
3607 ncr)
3608 lt_cv_deplibs_check_method=pass_all
3609 ;;
3610 sequent)
3611 lt_cv_file_magic_cmd='/bin/file'
3612 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3613 ;;
3614 sni)
3615 lt_cv_file_magic_cmd='/bin/file'
3616 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3617 lt_cv_file_magic_test_file=/lib/libc.so
3618 ;;
3619 siemens)
3620 lt_cv_deplibs_check_method=pass_all
3621 ;;
3622 pc)
3623 lt_cv_deplibs_check_method=pass_all
3624 ;;
3625 esac
3626 ;;
3627
3628 tpf*)
3629 lt_cv_deplibs_check_method=pass_all
3630 ;;
3631 os2*)
3632 lt_cv_deplibs_check_method=pass_all
3633 ;;
3634 esac
3635 ])
3636
3637 file_magic_glob=
3638 want_nocaseglob=no
3639 if test "$build" = "$host"; then
3640 case $host_os in
3641 mingw* | pw32*)
3642 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3643 want_nocaseglob=yes
3644 else
3645 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3646 fi
3647 ;;
3648 esac
3649 fi
3650
3651 file_magic_cmd=$lt_cv_file_magic_cmd
3652 deplibs_check_method=$lt_cv_deplibs_check_method
3653 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3654
3655 _LT_DECL([], [deplibs_check_method], [1],
3656 [Method to check whether dependent libraries are shared objects])
3657 _LT_DECL([], [file_magic_cmd], [1],
3658 [Command to use when deplibs_check_method = "file_magic"])
3659 _LT_DECL([], [file_magic_glob], [1],
3660 [How to find potential files when deplibs_check_method = "file_magic"])
3661 _LT_DECL([], [want_nocaseglob], [1],
3662 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3663 ])# _LT_CHECK_MAGIC_METHOD
3664
3665
3666 # LT_PATH_NM
3667 # ----------
3668 # find the pathname to a BSD- or MS-compatible name lister
3669 AC_DEFUN([LT_PATH_NM],
3670 [AC_REQUIRE([AC_PROG_CC])dnl
3671 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3672 [if test -n "$NM"; then
3673 # Let the user override the test.
3674 lt_cv_path_NM=$NM
3675 else
3676 lt_nm_to_check=${ac_tool_prefix}nm
3677 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3678 lt_nm_to_check="$lt_nm_to_check nm"
3679 fi
3680 for lt_tmp_nm in $lt_nm_to_check; do
3681 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3682 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3683 IFS=$lt_save_ifs
3684 test -z "$ac_dir" && ac_dir=.
3685 tmp_nm=$ac_dir/$lt_tmp_nm
3686 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3687 # Check to see if the nm accepts a BSD-compat flag.
3688 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3689 # nm: unknown option "B" ignored
3690 # Tru64's nm complains that /dev/null is an invalid object file
3691 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3692 case $build_os in
3693 mingw*) lt_bad_file=conftest.nm/nofile ;;
3694 *) lt_bad_file=/dev/null ;;
3695 esac
3696 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3697 *$lt_bad_file* | *'Invalid file or object type'*)
3698 lt_cv_path_NM="$tmp_nm -B"
3699 break 2
3700 ;;
3701 *)
3702 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3703 */dev/null*)
3704 lt_cv_path_NM="$tmp_nm -p"
3705 break 2
3706 ;;
3707 *)
3708 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3709 continue # so that we can try to find one that supports BSD flags
3710 ;;
3711 esac
3712 ;;
3713 esac
3714 fi
3715 done
3716 IFS=$lt_save_ifs
3717 done
3718 : ${lt_cv_path_NM=no}
3719 fi])
3720 if test no != "$lt_cv_path_NM"; then
3721 NM=$lt_cv_path_NM
3722 else
3723 # Didn't find any BSD compatible name lister, look for dumpbin.
3724 if test -n "$DUMPBIN"; then :
3725 # Let the user override the test.
3726 else
3727 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3728 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3729 *COFF*)
3730 DUMPBIN="$DUMPBIN -symbols -headers"
3731 ;;
3732 *)
3733 DUMPBIN=:
3734 ;;
3735 esac
3736 fi
3737 AC_SUBST([DUMPBIN])
3738 if test : != "$DUMPBIN"; then
3739 NM=$DUMPBIN
3740 fi
3741 fi
3742 test -z "$NM" && NM=nm
3743 AC_SUBST([NM])
3744 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3745
3746 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3747 [lt_cv_nm_interface="BSD nm"
3748 echo "int some_variable = 0;" > conftest.$ac_ext
3749 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3750 (eval "$ac_compile" 2>conftest.err)
3751 cat conftest.err >&AS_MESSAGE_LOG_FD
3752 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3753 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3754 cat conftest.err >&AS_MESSAGE_LOG_FD
3755 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3756 cat conftest.out >&AS_MESSAGE_LOG_FD
3757 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3758 lt_cv_nm_interface="MS dumpbin"
3759 fi
3760 rm -f conftest*])
3761 ])# LT_PATH_NM
3762
3763 # Old names:
3764 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3765 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3766 dnl aclocal-1.4 backwards compatibility:
3767 dnl AC_DEFUN([AM_PROG_NM], [])
3768 dnl AC_DEFUN([AC_PROG_NM], [])
3769
3770 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3771 # --------------------------------
3772 # how to determine the name of the shared library
3773 # associated with a specific link library.
3774 # -- PORTME fill in with the dynamic library characteristics
3775 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3776 [m4_require([_LT_DECL_EGREP])
3777 m4_require([_LT_DECL_OBJDUMP])
3778 m4_require([_LT_DECL_DLLTOOL])
3779 AC_CACHE_CHECK([how to associate runtime and link libraries],
3780 lt_cv_sharedlib_from_linklib_cmd,
3781 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3782
3783 case $host_os in
3784 cygwin* | mingw* | pw32* | cegcc*)
3785 # two different shell functions defined in ltmain.sh;
3786 # decide which one to use based on capabilities of $DLLTOOL
3787 case `$DLLTOOL --help 2>&1` in
3788 *--identify-strict*)
3789 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3790 ;;
3791 *)
3792 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3793 ;;
3794 esac
3795 ;;
3796 *)
3797 # fallback: assume linklib IS sharedlib
3798 lt_cv_sharedlib_from_linklib_cmd=$ECHO
3799 ;;
3800 esac
3801 ])
3802 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3803 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3804
3805 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3806 [Command to associate shared and link libraries])
3807 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3808
3809
3810 # _LT_PATH_MANIFEST_TOOL
3811 # ----------------------
3812 # locate the manifest tool
3813 m4_defun([_LT_PATH_MANIFEST_TOOL],
3814 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3815 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3816 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3817 [lt_cv_path_mainfest_tool=no
3818 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3819 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3820 cat conftest.err >&AS_MESSAGE_LOG_FD
3821 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3822 lt_cv_path_mainfest_tool=yes
3823 fi
3824 rm -f conftest*])
3825 if test yes != "$lt_cv_path_mainfest_tool"; then
3826 MANIFEST_TOOL=:
3827 fi
3828 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3829 ])# _LT_PATH_MANIFEST_TOOL
3830
3831
3832 # _LT_DLL_DEF_P([FILE])
3833 # ---------------------
3834 # True iff FILE is a Windows DLL '.def' file.
3835 # Keep in sync with func_dll_def_p in the libtool script
3836 AC_DEFUN([_LT_DLL_DEF_P],
3837 [dnl
3838 test DEF = "`$SED -n dnl
3839 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3840 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3841 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3842 -e q dnl Only consider the first "real" line
3843 $1`" dnl
3844 ])# _LT_DLL_DEF_P
3845
3846
3847 # LT_LIB_M
3848 # --------
3849 # check for math library
3850 AC_DEFUN([LT_LIB_M],
3851 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3852 LIBM=
3853 case $host in
3854 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3855 # These system don't have libm, or don't need it
3856 ;;
3857 *-ncr-sysv4.3*)
3858 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3859 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3860 ;;
3861 *)
3862 AC_CHECK_LIB(m, cos, LIBM=-lm)
3863 ;;
3864 esac
3865 AC_SUBST([LIBM])
3866 ])# LT_LIB_M
3867
3868 # Old name:
3869 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3870 dnl aclocal-1.4 backwards compatibility:
3871 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3872
3873
3874 # _LT_COMPILER_NO_RTTI([TAGNAME])
3875 # -------------------------------
3876 m4_defun([_LT_COMPILER_NO_RTTI],
3877 [m4_require([_LT_TAG_COMPILER])dnl
3878
3879 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3880
3881 if test yes = "$GCC"; then
3882 case $cc_basename in
3883 nvcc*)
3884 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3885 *)
3886 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3887 esac
3888
3889 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3890 lt_cv_prog_compiler_rtti_exceptions,
3891 [-fno-rtti -fno-exceptions], [],
3892 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3893 fi
3894 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3895 [Compiler flag to turn off builtin functions])
3896 ])# _LT_COMPILER_NO_RTTI
3897
3898
3899 # _LT_CMD_GLOBAL_SYMBOLS
3900 # ----------------------
3901 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3902 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3903 AC_REQUIRE([AC_PROG_CC])dnl
3904 AC_REQUIRE([AC_PROG_AWK])dnl
3905 AC_REQUIRE([LT_PATH_NM])dnl
3906 AC_REQUIRE([LT_PATH_LD])dnl
3907 m4_require([_LT_DECL_SED])dnl
3908 m4_require([_LT_DECL_EGREP])dnl
3909 m4_require([_LT_TAG_COMPILER])dnl
3910
3911 # Check for command to grab the raw symbol name followed by C symbol from nm.
3912 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3913 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3914 [
3915 # These are sane defaults that work on at least a few old systems.
3916 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3917
3918 # Character class describing NM global symbol codes.
3919 symcode='[[BCDEGRST]]'
3920
3921 # Regexp to match symbols that can be accessed directly from C.
3922 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3923
3924 # Define system-specific variables.
3925 case $host_os in
3926 aix*)
3927 symcode='[[BCDT]]'
3928 ;;
3929 cygwin* | mingw* | pw32* | cegcc*)
3930 symcode='[[ABCDGISTW]]'
3931 ;;
3932 hpux*)
3933 if test ia64 = "$host_cpu"; then
3934 symcode='[[ABCDEGRST]]'
3935 fi
3936 ;;
3937 irix* | nonstopux*)
3938 symcode='[[BCDEGRST]]'
3939 ;;
3940 osf*)
3941 symcode='[[BCDEGQRST]]'
3942 ;;
3943 solaris*)
3944 symcode='[[BDRT]]'
3945 ;;
3946 sco3.2v5*)
3947 symcode='[[DT]]'
3948 ;;
3949 sysv4.2uw2*)
3950 symcode='[[DT]]'
3951 ;;
3952 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3953 symcode='[[ABDT]]'
3954 ;;
3955 sysv4)
3956 symcode='[[DFNSTU]]'
3957 ;;
3958 esac
3959
3960 # If we're using GNU nm, then use its standard symbol codes.
3961 case `$NM -V 2>&1` in
3962 *GNU* | *'with BFD'*)
3963 symcode='[[ABCDGIRSTW]]' ;;
3964 esac
3965
3966 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3967 # Gets list of data symbols to import.
3968 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3969 # Adjust the below global symbol transforms to fixup imported variables.
3970 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3971 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
3972 lt_c_name_lib_hook="\
3973 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
3974 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
3975 else
3976 # Disable hooks by default.
3977 lt_cv_sys_global_symbol_to_import=
3978 lt_cdecl_hook=
3979 lt_c_name_hook=
3980 lt_c_name_lib_hook=
3981 fi
3982
3983 # Transform an extracted symbol line into a proper C declaration.
3984 # Some systems (esp. on ia64) link data and code symbols differently,
3985 # so use this general approach.
3986 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
3987 $lt_cdecl_hook\
3988 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3989 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
3990
3991 # Transform an extracted symbol line into symbol name and symbol address
3992 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
3993 $lt_c_name_hook\
3994 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
3995 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
3996
3997 # Transform an extracted symbol line into symbol name with lib prefix and
3998 # symbol address.
3999 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4000 $lt_c_name_lib_hook\
4001 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4002 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
4003 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
4004
4005 # Handle CRLF in mingw tool chain
4006 opt_cr=
4007 case $build_os in
4008 mingw*)
4009 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4010 ;;
4011 esac
4012
4013 # Try without a prefix underscore, then with it.
4014 for ac_symprfx in "" "_"; do
4015
4016 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4017 symxfrm="\\1 $ac_symprfx\\2 \\2"
4018
4019 # Write the raw and C identifiers.
4020 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4021 # Fake it for dumpbin and say T for any non-static function,
4022 # D for any global variable and I for any imported variable.
4023 # Also find C++ and __fastcall symbols from MSVC++,
4024 # which start with @ or ?.
4025 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4026 " {last_section=section; section=\$ 3};"\
4027 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4028 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4029 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4030 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4031 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4032 " \$ 0!~/External *\|/{next};"\
4033 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4034 " {if(hide[section]) next};"\
4035 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4036 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4037 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4038 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4039 " ' prfx=^$ac_symprfx]"
4040 else
4041 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4042 fi
4043 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4044
4045 # Check to see that the pipe works correctly.
4046 pipe_works=no
4047
4048 rm -f conftest*
4049 cat > conftest.$ac_ext <<_LT_EOF
4050 #ifdef __cplusplus
4051 extern "C" {
4052 #endif
4053 char nm_test_var;
4054 void nm_test_func(void);
4055 void nm_test_func(void){}
4056 #ifdef __cplusplus
4057 }
4058 #endif
4059 int main(){nm_test_var='a';nm_test_func();return(0);}
4060 _LT_EOF
4061
4062 if AC_TRY_EVAL(ac_compile); then
4063 # Now try to grab the symbols.
4064 nlist=conftest.nm
4065 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4066 # Try sorting and uniquifying the output.
4067 if sort "$nlist" | uniq > "$nlist"T; then
4068 mv -f "$nlist"T "$nlist"
4069 else
4070 rm -f "$nlist"T
4071 fi
4072
4073 # Make sure that we snagged all the symbols we need.
4074 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4075 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4076 cat <<_LT_EOF > conftest.$ac_ext
4077 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4078 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4079 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4080 relocations are performed -- see ld's documentation on pseudo-relocs. */
4081 # define LT@&t@_DLSYM_CONST
4082 #elif defined __osf__
4083 /* This system does not cope well with relocations in const data. */
4084 # define LT@&t@_DLSYM_CONST
4085 #else
4086 # define LT@&t@_DLSYM_CONST const
4087 #endif
4088
4089 #ifdef __cplusplus
4090 extern "C" {
4091 #endif
4092
4093 _LT_EOF
4094 # Now generate the symbol file.
4095 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4096
4097 cat <<_LT_EOF >> conftest.$ac_ext
4098
4099 /* The mapping between symbol names and symbols. */
4100 LT@&t@_DLSYM_CONST struct {
4101 const char *name;
4102 void *address;
4103 }
4104 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4105 {
4106 { "@PROGRAM@", (void *) 0 },
4107 _LT_EOF
4108 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4109 cat <<\_LT_EOF >> conftest.$ac_ext
4110 {0, (void *) 0}
4111 };
4112
4113 /* This works around a problem in FreeBSD linker */
4114 #ifdef FREEBSD_WORKAROUND
4115 static const void *lt_preloaded_setup() {
4116 return lt__PROGRAM__LTX_preloaded_symbols;
4117 }
4118 #endif
4119
4120 #ifdef __cplusplus
4121 }
4122 #endif
4123 _LT_EOF
4124 # Now try linking the two files.
4125 mv conftest.$ac_objext conftstm.$ac_objext
4126 lt_globsym_save_LIBS=$LIBS
4127 lt_globsym_save_CFLAGS=$CFLAGS
4128 LIBS=conftstm.$ac_objext
4129 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4130 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4131 pipe_works=yes
4132 fi
4133 LIBS=$lt_globsym_save_LIBS
4134 CFLAGS=$lt_globsym_save_CFLAGS
4135 else
4136 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4137 fi
4138 else
4139 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4140 fi
4141 else
4142 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4143 fi
4144 else
4145 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4146 cat conftest.$ac_ext >&5
4147 fi
4148 rm -rf conftest* conftst*
4149
4150 # Do not use the global_symbol_pipe unless it works.
4151 if test yes = "$pipe_works"; then
4152 break
4153 else
4154 lt_cv_sys_global_symbol_pipe=
4155 fi
4156 done
4157 ])
4158 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4159 lt_cv_sys_global_symbol_to_cdecl=
4160 fi
4161 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4162 AC_MSG_RESULT(failed)
4163 else
4164 AC_MSG_RESULT(ok)
4165 fi
4166
4167 # Response file support.
4168 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4169 nm_file_list_spec='@'
4170 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4171 nm_file_list_spec='@'
4172 fi
4173
4174 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4175 [Take the output of nm and produce a listing of raw symbols and C names])
4176 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4177 [Transform the output of nm in a proper C declaration])
4178 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4179 [Transform the output of nm into a list of symbols to manually relocate])
4180 _LT_DECL([global_symbol_to_c_name_address],
4181 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4182 [Transform the output of nm in a C name address pair])
4183 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4184 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4185 [Transform the output of nm in a C name address pair when lib prefix is needed])
4186 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4187 [The name lister interface])
4188 _LT_DECL([], [nm_file_list_spec], [1],
4189 [Specify filename containing input files for $NM])
4190 ]) # _LT_CMD_GLOBAL_SYMBOLS
4191
4192
4193 # _LT_COMPILER_PIC([TAGNAME])
4194 # ---------------------------
4195 m4_defun([_LT_COMPILER_PIC],
4196 [m4_require([_LT_TAG_COMPILER])dnl
4197 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4198 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4199 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4200
4201 m4_if([$1], [CXX], [
4202 # C++ specific cases for pic, static, wl, etc.
4203 if test yes = "$GXX"; then
4204 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4205 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4206
4207 case $host_os in
4208 aix*)
4209 # All AIX code is PIC.
4210 if test ia64 = "$host_cpu"; then
4211 # AIX 5 now supports IA64 processor
4212 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4213 fi
4214 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4215 ;;
4216
4217 amigaos*)
4218 case $host_cpu in
4219 powerpc)
4220 # see comment about AmigaOS4 .so support
4221 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4222 ;;
4223 m68k)
4224 # FIXME: we need at least 68020 code to build shared libraries, but
4225 # adding the '-m68020' flag to GCC prevents building anything better,
4226 # like '-m68040'.
4227 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4228 ;;
4229 esac
4230 ;;
4231
4232 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4233 # PIC is the default for these OSes.
4234 ;;
4235 mingw* | cygwin* | os2* | pw32* | cegcc*)
4236 # This hack is so that the source file can tell whether it is being
4237 # built for inclusion in a dll (and should export symbols for example).
4238 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4239 # (--disable-auto-import) libraries
4240 m4_if([$1], [GCJ], [],
4241 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4242 case $host_os in
4243 os2*)
4244 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4245 ;;
4246 esac
4247 ;;
4248 darwin* | rhapsody*)
4249 # PIC is the default on this platform
4250 # Common symbols not allowed in MH_DYLIB files
4251 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4252 ;;
4253 *djgpp*)
4254 # DJGPP does not support shared libraries at all
4255 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4256 ;;
4257 haiku*)
4258 # PIC is the default for Haiku.
4259 # The "-static" flag exists, but is broken.
4260 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4261 ;;
4262 interix[[3-9]]*)
4263 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4264 # Instead, we relocate shared libraries at runtime.
4265 ;;
4266 sysv4*MP*)
4267 if test -d /usr/nec; then
4268 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4269 fi
4270 ;;
4271 hpux*)
4272 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4273 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4274 # sets the default TLS model and affects inlining.
4275 case $host_cpu in
4276 hppa*64*)
4277 ;;
4278 *)
4279 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4280 ;;
4281 esac
4282 ;;
4283 *qnx* | *nto*)
4284 # QNX uses GNU C++, but need to define -shared option too, otherwise
4285 # it will coredump.
4286 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4287 ;;
4288 *)
4289 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4290 ;;
4291 esac
4292 else
4293 case $host_os in
4294 aix[[4-9]]*)
4295 # All AIX code is PIC.
4296 if test ia64 = "$host_cpu"; then
4297 # AIX 5 now supports IA64 processor
4298 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4299 else
4300 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4301 fi
4302 ;;
4303 chorus*)
4304 case $cc_basename in
4305 cxch68*)
4306 # Green Hills C++ Compiler
4307 # _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"
4308 ;;
4309 esac
4310 ;;
4311 mingw* | cygwin* | os2* | pw32* | cegcc*)
4312 # This hack is so that the source file can tell whether it is being
4313 # built for inclusion in a dll (and should export symbols for example).
4314 m4_if([$1], [GCJ], [],
4315 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4316 ;;
4317 dgux*)
4318 case $cc_basename in
4319 ec++*)
4320 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4321 ;;
4322 ghcx*)
4323 # Green Hills C++ Compiler
4324 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4325 ;;
4326 *)
4327 ;;
4328 esac
4329 ;;
4330 freebsd* | dragonfly*)
4331 # FreeBSD uses GNU C++
4332 ;;
4333 hpux9* | hpux10* | hpux11*)
4334 case $cc_basename in
4335 CC*)
4336 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4337 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4338 if test ia64 != "$host_cpu"; then
4339 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4340 fi
4341 ;;
4342 aCC*)
4343 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4344 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4345 case $host_cpu in
4346 hppa*64*|ia64*)
4347 # +Z the default
4348 ;;
4349 *)
4350 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4351 ;;
4352 esac
4353 ;;
4354 *)
4355 ;;
4356 esac
4357 ;;
4358 interix*)
4359 # This is c89, which is MS Visual C++ (no shared libs)
4360 # Anyone wants to do a port?
4361 ;;
4362 irix5* | irix6* | nonstopux*)
4363 case $cc_basename in
4364 CC*)
4365 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4366 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4367 # CC pic flag -KPIC is the default.
4368 ;;
4369 *)
4370 ;;
4371 esac
4372 ;;
4373 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4374 case $cc_basename in
4375 KCC*)
4376 # KAI C++ Compiler
4377 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4378 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4379 ;;
4380 ecpc* )
4381 # old Intel C++ for x86_64, which still supported -KPIC.
4382 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4383 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4384 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4385 ;;
4386 icpc* )
4387 # Intel C++, used to be incompatible with GCC.
4388 # ICC 10 doesn't accept -KPIC any more.
4389 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4390 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4391 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4392 ;;
4393 pgCC* | pgcpp*)
4394 # Portland Group C++ compiler
4395 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4396 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4397 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4398 ;;
4399 cxx*)
4400 # Compaq C++
4401 # Make sure the PIC flag is empty. It appears that all Alpha
4402 # Linux and Compaq Tru64 Unix objects are PIC.
4403 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4404 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4405 ;;
4406 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4407 # IBM XL 8.0, 9.0 on PPC and BlueGene
4408 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4409 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4410 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4411 ;;
4412 *)
4413 case `$CC -V 2>&1 | sed 5q` in
4414 *Sun\ C*)
4415 # Sun C++ 5.9
4416 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4417 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4418 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4419 ;;
4420 esac
4421 ;;
4422 esac
4423 ;;
4424 lynxos*)
4425 ;;
4426 m88k*)
4427 ;;
4428 mvs*)
4429 case $cc_basename in
4430 cxx*)
4431 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4432 ;;
4433 *)
4434 ;;
4435 esac
4436 ;;
4437 netbsd* | netbsdelf*-gnu)
4438 ;;
4439 *qnx* | *nto*)
4440 # QNX uses GNU C++, but need to define -shared option too, otherwise
4441 # it will coredump.
4442 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4443 ;;
4444 osf3* | osf4* | osf5*)
4445 case $cc_basename in
4446 KCC*)
4447 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4448 ;;
4449 RCC*)
4450 # Rational C++ 2.4.1
4451 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4452 ;;
4453 cxx*)
4454 # Digital/Compaq C++
4455 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4456 # Make sure the PIC flag is empty. It appears that all Alpha
4457 # Linux and Compaq Tru64 Unix objects are PIC.
4458 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4459 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4460 ;;
4461 *)
4462 ;;
4463 esac
4464 ;;
4465 psos*)
4466 ;;
4467 solaris*)
4468 case $cc_basename in
4469 CC* | sunCC*)
4470 # Sun C++ 4.2, 5.x and Centerline C++
4471 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4472 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4473 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4474 ;;
4475 gcx*)
4476 # Green Hills C++ Compiler
4477 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4478 ;;
4479 *)
4480 ;;
4481 esac
4482 ;;
4483 sunos4*)
4484 case $cc_basename in
4485 CC*)
4486 # Sun C++ 4.x
4487 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4488 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4489 ;;
4490 lcc*)
4491 # Lucid
4492 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4493 ;;
4494 *)
4495 ;;
4496 esac
4497 ;;
4498 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4499 case $cc_basename in
4500 CC*)
4501 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4502 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4503 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4504 ;;
4505 esac
4506 ;;
4507 tandem*)
4508 case $cc_basename in
4509 NCC*)
4510 # NonStop-UX NCC 3.20
4511 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4512 ;;
4513 *)
4514 ;;
4515 esac
4516 ;;
4517 vxworks*)
4518 ;;
4519 *)
4520 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4521 ;;
4522 esac
4523 fi
4524 ],
4525 [
4526 if test yes = "$GCC"; then
4527 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4528 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4529
4530 case $host_os in
4531 aix*)
4532 # All AIX code is PIC.
4533 if test ia64 = "$host_cpu"; then
4534 # AIX 5 now supports IA64 processor
4535 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4536 fi
4537 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4538 ;;
4539
4540 amigaos*)
4541 case $host_cpu in
4542 powerpc)
4543 # see comment about AmigaOS4 .so support
4544 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4545 ;;
4546 m68k)
4547 # FIXME: we need at least 68020 code to build shared libraries, but
4548 # adding the '-m68020' flag to GCC prevents building anything better,
4549 # like '-m68040'.
4550 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4551 ;;
4552 esac
4553 ;;
4554
4555 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4556 # PIC is the default for these OSes.
4557 ;;
4558
4559 mingw* | cygwin* | pw32* | os2* | cegcc*)
4560 # This hack is so that the source file can tell whether it is being
4561 # built for inclusion in a dll (and should export symbols for example).
4562 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4563 # (--disable-auto-import) libraries
4564 m4_if([$1], [GCJ], [],
4565 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4566 case $host_os in
4567 os2*)
4568 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4569 ;;
4570 esac
4571 ;;
4572
4573 darwin* | rhapsody*)
4574 # PIC is the default on this platform
4575 # Common symbols not allowed in MH_DYLIB files
4576 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4577 ;;
4578
4579 haiku*)
4580 # PIC is the default for Haiku.
4581 # The "-static" flag exists, but is broken.
4582 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4583 ;;
4584
4585 hpux*)
4586 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4587 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4588 # sets the default TLS model and affects inlining.
4589 case $host_cpu in
4590 hppa*64*)
4591 # +Z the default
4592 ;;
4593 *)
4594 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4595 ;;
4596 esac
4597 ;;
4598
4599 interix[[3-9]]*)
4600 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4601 # Instead, we relocate shared libraries at runtime.
4602 ;;
4603
4604 msdosdjgpp*)
4605 # Just because we use GCC doesn't mean we suddenly get shared libraries
4606 # on systems that don't support them.
4607 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4608 enable_shared=no
4609 ;;
4610
4611 *nto* | *qnx*)
4612 # QNX uses GNU C++, but need to define -shared option too, otherwise
4613 # it will coredump.
4614 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4615 ;;
4616
4617 sysv4*MP*)
4618 if test -d /usr/nec; then
4619 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4620 fi
4621 ;;
4622
4623 *)
4624 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4625 ;;
4626 esac
4627
4628 case $cc_basename in
4629 nvcc*) # Cuda Compiler Driver 2.2
4630 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4631 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4632 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4633 fi
4634 ;;
4635 esac
4636 else
4637 # PORTME Check for flag to pass linker flags through the system compiler.
4638 case $host_os in
4639 aix*)
4640 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4641 if test ia64 = "$host_cpu"; then
4642 # AIX 5 now supports IA64 processor
4643 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4644 else
4645 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4646 fi
4647 ;;
4648
4649 darwin* | rhapsody*)
4650 # PIC is the default on this platform
4651 # Common symbols not allowed in MH_DYLIB files
4652 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4653 case $cc_basename in
4654 nagfor*)
4655 # NAG Fortran compiler
4656 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4657 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4658 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4659 ;;
4660 esac
4661 ;;
4662
4663 mingw* | cygwin* | pw32* | os2* | cegcc*)
4664 # This hack is so that the source file can tell whether it is being
4665 # built for inclusion in a dll (and should export symbols for example).
4666 m4_if([$1], [GCJ], [],
4667 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4668 case $host_os in
4669 os2*)
4670 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4671 ;;
4672 esac
4673 ;;
4674
4675 hpux9* | hpux10* | hpux11*)
4676 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4677 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4678 # not for PA HP-UX.
4679 case $host_cpu in
4680 hppa*64*|ia64*)
4681 # +Z the default
4682 ;;
4683 *)
4684 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4685 ;;
4686 esac
4687 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4688 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4689 ;;
4690
4691 irix5* | irix6* | nonstopux*)
4692 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4693 # PIC (with -KPIC) is the default.
4694 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4695 ;;
4696
4697 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4698 case $cc_basename in
4699 # old Intel for x86_64, which still supported -KPIC.
4700 ecc*)
4701 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4702 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4703 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4704 ;;
4705 # icc used to be incompatible with GCC.
4706 # ICC 10 doesn't accept -KPIC any more.
4707 icc* | ifort*)
4708 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4709 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4710 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4711 ;;
4712 # Lahey Fortran 8.1.
4713 lf95*)
4714 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4715 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4716 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4717 ;;
4718 nagfor*)
4719 # NAG Fortran compiler
4720 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4721 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4722 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4723 ;;
4724 tcc*)
4725 # Fabrice Bellard et al's Tiny C Compiler
4726 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4727 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4728 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4729 ;;
4730 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4731 # Portland Group compilers (*not* the Pentium gcc compiler,
4732 # which looks to be a dead project)
4733 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4734 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4735 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4736 ;;
4737 ccc*)
4738 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4739 # All Alpha code is PIC.
4740 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4741 ;;
4742 xl* | bgxl* | bgf* | mpixl*)
4743 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4744 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4745 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4746 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4747 ;;
4748 *)
4749 case `$CC -V 2>&1 | sed 5q` in
4750 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4751 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4752 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4753 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4754 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4755 ;;
4756 *Sun\ F* | *Sun*Fortran*)
4757 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4758 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4759 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4760 ;;
4761 *Sun\ C*)
4762 # Sun C 5.9
4763 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4764 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4765 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4766 ;;
4767 *Intel*\ [[CF]]*Compiler*)
4768 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4769 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4770 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4771 ;;
4772 *Portland\ Group*)
4773 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4774 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4775 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4776 ;;
4777 esac
4778 ;;
4779 esac
4780 ;;
4781
4782 newsos6)
4783 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4784 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4785 ;;
4786
4787 *nto* | *qnx*)
4788 # QNX uses GNU C++, but need to define -shared option too, otherwise
4789 # it will coredump.
4790 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4791 ;;
4792
4793 osf3* | osf4* | osf5*)
4794 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4795 # All OSF/1 code is PIC.
4796 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4797 ;;
4798
4799 rdos*)
4800 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4801 ;;
4802
4803 solaris*)
4804 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4805 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4806 case $cc_basename in
4807 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4808 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4809 *)
4810 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4811 esac
4812 ;;
4813
4814 sunos4*)
4815 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4816 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4817 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4818 ;;
4819
4820 sysv4 | sysv4.2uw2* | sysv4.3*)
4821 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4822 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4823 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4824 ;;
4825
4826 sysv4*MP*)
4827 if test -d /usr/nec; then
4828 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4829 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4830 fi
4831 ;;
4832
4833 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4834 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4835 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4836 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4837 ;;
4838
4839 unicos*)
4840 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4841 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4842 ;;
4843
4844 uts4*)
4845 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4846 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4847 ;;
4848
4849 *)
4850 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4851 ;;
4852 esac
4853 fi
4854 ])
4855 case $host_os in
4856 # For platforms that do not support PIC, -DPIC is meaningless:
4857 *djgpp*)
4858 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4859 ;;
4860 *)
4861 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4862 ;;
4863 esac
4864
4865 AC_CACHE_CHECK([for $compiler option to produce PIC],
4866 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4867 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4868 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4869
4870 #
4871 # Check to make sure the PIC flag actually works.
4872 #
4873 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4874 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4875 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4876 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4877 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4878 "" | " "*) ;;
4879 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4880 esac],
4881 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4882 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4883 fi
4884 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4885 [Additional compiler flags for building library objects])
4886
4887 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4888 [How to pass a linker flag through the compiler])
4889 #
4890 # Check to make sure the static flag actually works.
4891 #
4892 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4893 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4894 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4895 $lt_tmp_static_flag,
4896 [],
4897 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4898 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4899 [Compiler flag to prevent dynamic linking])
4900 ])# _LT_COMPILER_PIC
4901
4902
4903 # _LT_LINKER_SHLIBS([TAGNAME])
4904 # ----------------------------
4905 # See if the linker supports building shared libraries.
4906 m4_defun([_LT_LINKER_SHLIBS],
4907 [AC_REQUIRE([LT_PATH_LD])dnl
4908 AC_REQUIRE([LT_PATH_NM])dnl
4909 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4910 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4911 m4_require([_LT_DECL_EGREP])dnl
4912 m4_require([_LT_DECL_SED])dnl
4913 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4914 m4_require([_LT_TAG_COMPILER])dnl
4915 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4916 m4_if([$1], [CXX], [
4917 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4918 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4919 case $host_os in
4920 aix[[4-9]]*)
4921 # If we're using GNU nm, then we don't want the "-C" option.
4922 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4923 # Without the "-l" option, or with the "-B" option, AIX nm treats
4924 # weak defined symbols like other global defined symbols, whereas
4925 # GNU nm marks them as "W".
4926 # While the 'weak' keyword is ignored in the Export File, we need
4927 # it in the Import File for the 'aix-soname' feature, so we have
4928 # to replace the "-B" option with "-P" for AIX nm.
4929 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4930 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
4931 else
4932 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
4933 fi
4934 ;;
4935 pw32*)
4936 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4937 ;;
4938 cygwin* | mingw* | cegcc*)
4939 case $cc_basename in
4940 cl*)
4941 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4942 ;;
4943 *)
4944 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4945 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4946 ;;
4947 esac
4948 ;;
4949 linux* | k*bsd*-gnu | gnu*)
4950 _LT_TAGVAR(link_all_deplibs, $1)=no
4951 ;;
4952 *)
4953 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4954 ;;
4955 esac
4956 ], [
4957 runpath_var=
4958 _LT_TAGVAR(allow_undefined_flag, $1)=
4959 _LT_TAGVAR(always_export_symbols, $1)=no
4960 _LT_TAGVAR(archive_cmds, $1)=
4961 _LT_TAGVAR(archive_expsym_cmds, $1)=
4962 _LT_TAGVAR(compiler_needs_object, $1)=no
4963 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4964 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4965 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4966 _LT_TAGVAR(hardcode_automatic, $1)=no
4967 _LT_TAGVAR(hardcode_direct, $1)=no
4968 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4969 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4970 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4971 _LT_TAGVAR(hardcode_minus_L, $1)=no
4972 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4973 _LT_TAGVAR(inherit_rpath, $1)=no
4974 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4975 _LT_TAGVAR(module_cmds, $1)=
4976 _LT_TAGVAR(module_expsym_cmds, $1)=
4977 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4978 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4979 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4980 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4981 # include_expsyms should be a list of space-separated symbols to be *always*
4982 # included in the symbol list
4983 _LT_TAGVAR(include_expsyms, $1)=
4984 # exclude_expsyms can be an extended regexp of symbols to exclude
4985 # it will be wrapped by ' (' and ')$', so one must not match beginning or
4986 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4987 # as well as any symbol that contains 'd'.
4988 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4989 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4990 # platforms (ab)use it in PIC code, but their linkers get confused if
4991 # the symbol is explicitly referenced. Since portable code cannot
4992 # rely on this symbol name, it's probably fine to never include it in
4993 # preloaded symbol tables.
4994 # Exclude shared library initialization/finalization symbols.
4995 dnl Note also adjust exclude_expsyms for C++ above.
4996 extract_expsyms_cmds=
4997
4998 case $host_os in
4999 cygwin* | mingw* | pw32* | cegcc*)
5000 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5001 # When not using gcc, we currently assume that we are using
5002 # Microsoft Visual C++.
5003 if test yes != "$GCC"; then
5004 with_gnu_ld=no
5005 fi
5006 ;;
5007 interix*)
5008 # we just hope/assume this is gcc and not c89 (= MSVC++)
5009 with_gnu_ld=yes
5010 ;;
5011 openbsd* | bitrig*)
5012 with_gnu_ld=no
5013 ;;
5014 linux* | k*bsd*-gnu | gnu*)
5015 _LT_TAGVAR(link_all_deplibs, $1)=no
5016 ;;
5017 esac
5018
5019 _LT_TAGVAR(ld_shlibs, $1)=yes
5020
5021 # On some targets, GNU ld is compatible enough with the native linker
5022 # that we're better off using the native interface for both.
5023 lt_use_gnu_ld_interface=no
5024 if test yes = "$with_gnu_ld"; then
5025 case $host_os in
5026 aix*)
5027 # The AIX port of GNU ld has always aspired to compatibility
5028 # with the native linker. However, as the warning in the GNU ld
5029 # block says, versions before 2.19.5* couldn't really create working
5030 # shared libraries, regardless of the interface used.
5031 case `$LD -v 2>&1` in
5032 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5033 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5034 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5035 *)
5036 lt_use_gnu_ld_interface=yes
5037 ;;
5038 esac
5039 ;;
5040 *)
5041 lt_use_gnu_ld_interface=yes
5042 ;;
5043 esac
5044 fi
5045
5046 if test yes = "$lt_use_gnu_ld_interface"; then
5047 # If archive_cmds runs LD, not CC, wlarc should be empty
5048 wlarc='$wl'
5049
5050 # Set some defaults for GNU ld with shared library support. These
5051 # are reset later if shared libraries are not supported. Putting them
5052 # here allows them to be overridden if necessary.
5053 runpath_var=LD_RUN_PATH
5054 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5055 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5056 # ancient GNU ld didn't support --whole-archive et. al.
5057 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5058 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5059 else
5060 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5061 fi
5062 supports_anon_versioning=no
5063 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5064 *GNU\ gold*) supports_anon_versioning=yes ;;
5065 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5066 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5067 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5068 *\ 2.11.*) ;; # other 2.11 versions
5069 *) supports_anon_versioning=yes ;;
5070 esac
5071
5072 # See if GNU ld supports shared libraries.
5073 case $host_os in
5074 aix[[3-9]]*)
5075 # On AIX/PPC, the GNU linker is very broken
5076 if test ia64 != "$host_cpu"; then
5077 _LT_TAGVAR(ld_shlibs, $1)=no
5078 cat <<_LT_EOF 1>&2
5079
5080 *** Warning: the GNU linker, at least up to release 2.19, is reported
5081 *** to be unable to reliably create shared libraries on AIX.
5082 *** Therefore, libtool is disabling shared libraries support. If you
5083 *** really care for shared libraries, you may want to install binutils
5084 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5085 *** You will then need to restart the configuration process.
5086
5087 _LT_EOF
5088 fi
5089 ;;
5090
5091 amigaos*)
5092 case $host_cpu in
5093 powerpc)
5094 # see comment about AmigaOS4 .so support
5095 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5096 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5097 ;;
5098 m68k)
5099 _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)'
5100 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5101 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5102 ;;
5103 esac
5104 ;;
5105
5106 beos*)
5107 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5108 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5109 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5110 # support --undefined. This deserves some investigation. FIXME
5111 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5112 else
5113 _LT_TAGVAR(ld_shlibs, $1)=no
5114 fi
5115 ;;
5116
5117 cygwin* | mingw* | pw32* | cegcc*)
5118 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5119 # as there is no search path for DLLs.
5120 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5121 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5122 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5123 _LT_TAGVAR(always_export_symbols, $1)=no
5124 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5125 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5126 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5127
5128 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5129 _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'
5130 # If the export-symbols file already is a .def file, use it as
5131 # is; otherwise, prepend EXPORTS...
5132 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5133 cp $export_symbols $output_objdir/$soname.def;
5134 else
5135 echo EXPORTS > $output_objdir/$soname.def;
5136 cat $export_symbols >> $output_objdir/$soname.def;
5137 fi~
5138 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5139 else
5140 _LT_TAGVAR(ld_shlibs, $1)=no
5141 fi
5142 ;;
5143
5144 haiku*)
5145 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5146 _LT_TAGVAR(link_all_deplibs, $1)=yes
5147 ;;
5148
5149 os2*)
5150 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5151 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5152 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5153 shrext_cmds=.dll
5154 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5155 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5156 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5157 $ECHO EXPORTS >> $output_objdir/$libname.def~
5158 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5159 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5160 emximp -o $lib $output_objdir/$libname.def'
5161 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5162 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5163 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5164 $ECHO EXPORTS >> $output_objdir/$libname.def~
5165 prefix_cmds="$SED"~
5166 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5167 prefix_cmds="$prefix_cmds -e 1d";
5168 fi~
5169 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5170 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5171 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5172 emximp -o $lib $output_objdir/$libname.def'
5173 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5174 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5175 ;;
5176
5177 interix[[3-9]]*)
5178 _LT_TAGVAR(hardcode_direct, $1)=no
5179 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5180 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5181 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5182 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5183 # Instead, shared libraries are loaded at an image base (0x10000000 by
5184 # default) and relocated if they conflict, which is a slow very memory
5185 # consuming and fragmenting process. To avoid this, we pick a random,
5186 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5187 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5188 _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'
5189 _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'
5190 ;;
5191
5192 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5193 tmp_diet=no
5194 if test linux-dietlibc = "$host_os"; then
5195 case $cc_basename in
5196 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5197 esac
5198 fi
5199 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5200 && test no = "$tmp_diet"
5201 then
5202 tmp_addflag=' $pic_flag'
5203 tmp_sharedflag='-shared'
5204 case $cc_basename,$host_cpu in
5205 pgcc*) # Portland Group C compiler
5206 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5207 tmp_addflag=' $pic_flag'
5208 ;;
5209 pgf77* | pgf90* | pgf95* | pgfortran*)
5210 # Portland Group f77 and f90 compilers
5211 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5212 tmp_addflag=' $pic_flag -Mnomain' ;;
5213 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5214 tmp_addflag=' -i_dynamic' ;;
5215 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5216 tmp_addflag=' -i_dynamic -nofor_main' ;;
5217 ifc* | ifort*) # Intel Fortran compiler
5218 tmp_addflag=' -nofor_main' ;;
5219 lf95*) # Lahey Fortran 8.1
5220 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5221 tmp_sharedflag='--shared' ;;
5222 nagfor*) # NAGFOR 5.3
5223 tmp_sharedflag='-Wl,-shared' ;;
5224 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5225 tmp_sharedflag='-qmkshrobj'
5226 tmp_addflag= ;;
5227 nvcc*) # Cuda Compiler Driver 2.2
5228 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5229 _LT_TAGVAR(compiler_needs_object, $1)=yes
5230 ;;
5231 esac
5232 case `$CC -V 2>&1 | sed 5q` in
5233 *Sun\ C*) # Sun C 5.9
5234 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5235 _LT_TAGVAR(compiler_needs_object, $1)=yes
5236 tmp_sharedflag='-G' ;;
5237 *Sun\ F*) # Sun Fortran 8.3
5238 tmp_sharedflag='-G' ;;
5239 esac
5240 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5241
5242 if test yes = "$supports_anon_versioning"; then
5243 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5244 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5245 echo "local: *; };" >> $output_objdir/$libname.ver~
5246 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5247 fi
5248
5249 case $cc_basename in
5250 tcc*)
5251 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5252 ;;
5253 xlf* | bgf* | bgxlf* | mpixlf*)
5254 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5255 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5256 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5257 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5258 if test yes = "$supports_anon_versioning"; then
5259 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5260 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5261 echo "local: *; };" >> $output_objdir/$libname.ver~
5262 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5263 fi
5264 ;;
5265 esac
5266 else
5267 _LT_TAGVAR(ld_shlibs, $1)=no
5268 fi
5269 ;;
5270
5271 netbsd* | netbsdelf*-gnu)
5272 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5273 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5274 wlarc=
5275 else
5276 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5277 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5278 fi
5279 ;;
5280
5281 solaris*)
5282 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5283 _LT_TAGVAR(ld_shlibs, $1)=no
5284 cat <<_LT_EOF 1>&2
5285
5286 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5287 *** create shared libraries on Solaris systems. Therefore, libtool
5288 *** is disabling shared libraries support. We urge you to upgrade GNU
5289 *** binutils to release 2.9.1 or newer. Another option is to modify
5290 *** your PATH or compiler configuration so that the native linker is
5291 *** used, and then restart.
5292
5293 _LT_EOF
5294 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5295 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5296 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5297 else
5298 _LT_TAGVAR(ld_shlibs, $1)=no
5299 fi
5300 ;;
5301
5302 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5303 case `$LD -v 2>&1` in
5304 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5305 _LT_TAGVAR(ld_shlibs, $1)=no
5306 cat <<_LT_EOF 1>&2
5307
5308 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5309 *** reliably create shared libraries on SCO systems. Therefore, libtool
5310 *** is disabling shared libraries support. We urge you to upgrade GNU
5311 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5312 *** your PATH or compiler configuration so that the native linker is
5313 *** used, and then restart.
5314
5315 _LT_EOF
5316 ;;
5317 *)
5318 # For security reasons, it is highly recommended that you always
5319 # use absolute paths for naming shared libraries, and exclude the
5320 # DT_RUNPATH tag from executables and libraries. But doing so
5321 # requires that you compile everything twice, which is a pain.
5322 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5323 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5324 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5325 _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'
5326 else
5327 _LT_TAGVAR(ld_shlibs, $1)=no
5328 fi
5329 ;;
5330 esac
5331 ;;
5332
5333 sunos4*)
5334 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5335 wlarc=
5336 _LT_TAGVAR(hardcode_direct, $1)=yes
5337 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5338 ;;
5339
5340 *)
5341 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5342 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5343 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5344 else
5345 _LT_TAGVAR(ld_shlibs, $1)=no
5346 fi
5347 ;;
5348 esac
5349
5350 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5351 runpath_var=
5352 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5353 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5354 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5355 fi
5356 else
5357 # PORTME fill in a description of your system's linker (not GNU ld)
5358 case $host_os in
5359 aix3*)
5360 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5361 _LT_TAGVAR(always_export_symbols, $1)=yes
5362 _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'
5363 # Note: this linker hardcodes the directories in LIBPATH if there
5364 # are no directories specified by -L.
5365 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5366 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5367 # Neither direct hardcoding nor static linking is supported with a
5368 # broken collect2.
5369 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5370 fi
5371 ;;
5372
5373 aix[[4-9]]*)
5374 if test ia64 = "$host_cpu"; then
5375 # On IA64, the linker does run time linking by default, so we don't
5376 # have to do anything special.
5377 aix_use_runtimelinking=no
5378 exp_sym_flag='-Bexport'
5379 no_entry_flag=
5380 else
5381 # If we're using GNU nm, then we don't want the "-C" option.
5382 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5383 # Without the "-l" option, or with the "-B" option, AIX nm treats
5384 # weak defined symbols like other global defined symbols, whereas
5385 # GNU nm marks them as "W".
5386 # While the 'weak' keyword is ignored in the Export File, we need
5387 # it in the Import File for the 'aix-soname' feature, so we have
5388 # to replace the "-B" option with "-P" for AIX nm.
5389 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5390 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
5391 else
5392 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5393 fi
5394 aix_use_runtimelinking=no
5395
5396 # Test if we are trying to use run time linking or normal
5397 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5398 # have runtime linking enabled, and use it for executables.
5399 # For shared libraries, we enable/disable runtime linking
5400 # depending on the kind of the shared library created -
5401 # when "with_aix_soname,aix_use_runtimelinking" is:
5402 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5403 # "aix,yes" lib.so shared, rtl:yes, for executables
5404 # lib.a static archive
5405 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5406 # lib.a(lib.so.V) shared, rtl:no, for executables
5407 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5408 # lib.a(lib.so.V) shared, rtl:no
5409 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5410 # lib.a static archive
5411 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5412 for ld_flag in $LDFLAGS; do
5413 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5414 aix_use_runtimelinking=yes
5415 break
5416 fi
5417 done
5418 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5419 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5420 # so we don't have lib.a shared libs to link our executables.
5421 # We have to force runtime linking in this case.
5422 aix_use_runtimelinking=yes
5423 LDFLAGS="$LDFLAGS -Wl,-brtl"
5424 fi
5425 ;;
5426 esac
5427
5428 exp_sym_flag='-bexport'
5429 no_entry_flag='-bnoentry'
5430 fi
5431
5432 # When large executables or shared objects are built, AIX ld can
5433 # have problems creating the table of contents. If linking a library
5434 # or program results in "error TOC overflow" add -mminimal-toc to
5435 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5436 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5437
5438 _LT_TAGVAR(archive_cmds, $1)=''
5439 _LT_TAGVAR(hardcode_direct, $1)=yes
5440 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5441 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5442 _LT_TAGVAR(link_all_deplibs, $1)=yes
5443 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5444 case $with_aix_soname,$aix_use_runtimelinking in
5445 aix,*) ;; # traditional, no import file
5446 svr4,* | *,yes) # use import file
5447 # The Import File defines what to hardcode.
5448 _LT_TAGVAR(hardcode_direct, $1)=no
5449 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5450 ;;
5451 esac
5452
5453 if test yes = "$GCC"; then
5454 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5455 # We only want to do this on AIX 4.2 and lower, the check
5456 # below for broken collect2 doesn't work under 4.3+
5457 collect2name=`$CC -print-prog-name=collect2`
5458 if test -f "$collect2name" &&
5459 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5460 then
5461 # We have reworked collect2
5462 :
5463 else
5464 # We have old collect2
5465 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5466 # It fails to find uninstalled libraries when the uninstalled
5467 # path is not listed in the libpath. Setting hardcode_minus_L
5468 # to unsupported forces relinking
5469 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5470 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5471 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5472 fi
5473 ;;
5474 esac
5475 shared_flag='-shared'
5476 if test yes = "$aix_use_runtimelinking"; then
5477 shared_flag="$shared_flag "'$wl-G'
5478 fi
5479 # Need to ensure runtime linking is disabled for the traditional
5480 # shared library, or the linker may eventually find shared libraries
5481 # /with/ Import File - we do not want to mix them.
5482 shared_flag_aix='-shared'
5483 shared_flag_svr4='-shared $wl-G'
5484 else
5485 # not using gcc
5486 if test ia64 = "$host_cpu"; then
5487 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5488 # chokes on -Wl,-G. The following line is correct:
5489 shared_flag='-G'
5490 else
5491 if test yes = "$aix_use_runtimelinking"; then
5492 shared_flag='$wl-G'
5493 else
5494 shared_flag='$wl-bM:SRE'
5495 fi
5496 shared_flag_aix='$wl-bM:SRE'
5497 shared_flag_svr4='$wl-G'
5498 fi
5499 fi
5500
5501 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5502 # It seems that -bexpall does not export symbols beginning with
5503 # underscore (_), so it is better to generate a list of symbols to export.
5504 _LT_TAGVAR(always_export_symbols, $1)=yes
5505 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5506 # Warning - without using the other runtime loading flags (-brtl),
5507 # -berok will link without error, but may produce a broken library.
5508 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5509 # Determine the default libpath from the value encoded in an
5510 # empty executable.
5511 _LT_SYS_MODULE_PATH_AIX([$1])
5512 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5513 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
5514 else
5515 if test ia64 = "$host_cpu"; then
5516 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5517 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5518 _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"
5519 else
5520 # Determine the default libpath from the value encoded in an
5521 # empty executable.
5522 _LT_SYS_MODULE_PATH_AIX([$1])
5523 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5524 # Warning - without using the other run time loading flags,
5525 # -berok will link without error, but may produce a broken library.
5526 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5527 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5528 if test yes = "$with_gnu_ld"; then
5529 # We only use this code for GNU lds that support --whole-archive.
5530 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5531 else
5532 # Exported symbols can be pulled into shared objects from archives
5533 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5534 fi
5535 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5536 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5537 # -brtl affects multiple linker settings, -berok does not and is overridden later
5538 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5539 if test svr4 != "$with_aix_soname"; then
5540 # This is similar to how AIX traditionally builds its shared libraries.
5541 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5542 fi
5543 if test aix != "$with_aix_soname"; then
5544 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5545 else
5546 # used by -dlpreopen to get the symbols
5547 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5548 fi
5549 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5550 fi
5551 fi
5552 ;;
5553
5554 amigaos*)
5555 case $host_cpu in
5556 powerpc)
5557 # see comment about AmigaOS4 .so support
5558 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5559 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5560 ;;
5561 m68k)
5562 _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)'
5563 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5564 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5565 ;;
5566 esac
5567 ;;
5568
5569 bsdi[[45]]*)
5570 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5571 ;;
5572
5573 cygwin* | mingw* | pw32* | cegcc*)
5574 # When not using gcc, we currently assume that we are using
5575 # Microsoft Visual C++.
5576 # hardcode_libdir_flag_spec is actually meaningless, as there is
5577 # no search path for DLLs.
5578 case $cc_basename in
5579 cl*)
5580 # Native MSVC
5581 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5582 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5583 _LT_TAGVAR(always_export_symbols, $1)=yes
5584 _LT_TAGVAR(file_list_spec, $1)='@'
5585 # Tell ltmain to make .lib files, not .a files.
5586 libext=lib
5587 # Tell ltmain to make .dll files, not .so files.
5588 shrext_cmds=.dll
5589 # FIXME: Setting linknames here is a bad hack.
5590 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5591 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5592 cp "$export_symbols" "$output_objdir/$soname.def";
5593 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5594 else
5595 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5596 fi~
5597 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5598 linknames='
5599 # The linker will not automatically build a static lib if we build a DLL.
5600 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5601 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5602 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5603 _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'
5604 # Don't use ranlib
5605 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5606 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5607 lt_tool_outputfile="@TOOL_OUTPUT@"~
5608 case $lt_outputfile in
5609 *.exe|*.EXE) ;;
5610 *)
5611 lt_outputfile=$lt_outputfile.exe
5612 lt_tool_outputfile=$lt_tool_outputfile.exe
5613 ;;
5614 esac~
5615 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5616 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5617 $RM "$lt_outputfile.manifest";
5618 fi'
5619 ;;
5620 *)
5621 # Assume MSVC wrapper
5622 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5623 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5624 # Tell ltmain to make .lib files, not .a files.
5625 libext=lib
5626 # Tell ltmain to make .dll files, not .so files.
5627 shrext_cmds=.dll
5628 # FIXME: Setting linknames here is a bad hack.
5629 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5630 # The linker will automatically build a .lib file if we build a DLL.
5631 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5632 # FIXME: Should let the user specify the lib program.
5633 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5634 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5635 ;;
5636 esac
5637 ;;
5638
5639 darwin* | rhapsody*)
5640 _LT_DARWIN_LINKER_FEATURES($1)
5641 ;;
5642
5643 dgux*)
5644 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5645 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5646 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5647 ;;
5648
5649 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5650 # support. Future versions do this automatically, but an explicit c++rt0.o
5651 # does not break anything, and helps significantly (at the cost of a little
5652 # extra space).
5653 freebsd2.2*)
5654 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5655 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5656 _LT_TAGVAR(hardcode_direct, $1)=yes
5657 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5658 ;;
5659
5660 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5661 freebsd2.*)
5662 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5663 _LT_TAGVAR(hardcode_direct, $1)=yes
5664 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5665 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5666 ;;
5667
5668 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5669 freebsd* | dragonfly*)
5670 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5671 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5672 _LT_TAGVAR(hardcode_direct, $1)=yes
5673 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5674 ;;
5675
5676 hpux9*)
5677 if test yes = "$GCC"; then
5678 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5679 else
5680 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5681 fi
5682 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5683 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5684 _LT_TAGVAR(hardcode_direct, $1)=yes
5685
5686 # hardcode_minus_L: Not really in the search PATH,
5687 # but as the default location of the library.
5688 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5689 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5690 ;;
5691
5692 hpux10*)
5693 if test yes,no = "$GCC,$with_gnu_ld"; then
5694 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5695 else
5696 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5697 fi
5698 if test no = "$with_gnu_ld"; then
5699 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5700 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5701 _LT_TAGVAR(hardcode_direct, $1)=yes
5702 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5703 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5704 # hardcode_minus_L: Not really in the search PATH,
5705 # but as the default location of the library.
5706 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5707 fi
5708 ;;
5709
5710 hpux11*)
5711 if test yes,no = "$GCC,$with_gnu_ld"; then
5712 case $host_cpu in
5713 hppa*64*)
5714 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5715 ;;
5716 ia64*)
5717 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5718 ;;
5719 *)
5720 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5721 ;;
5722 esac
5723 else
5724 case $host_cpu in
5725 hppa*64*)
5726 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5727 ;;
5728 ia64*)
5729 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5730 ;;
5731 *)
5732 m4_if($1, [], [
5733 # Older versions of the 11.00 compiler do not understand -b yet
5734 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5735 _LT_LINKER_OPTION([if $CC understands -b],
5736 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5737 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5738 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5739 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5740 ;;
5741 esac
5742 fi
5743 if test no = "$with_gnu_ld"; then
5744 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5745 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5746
5747 case $host_cpu in
5748 hppa*64*|ia64*)
5749 _LT_TAGVAR(hardcode_direct, $1)=no
5750 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5751 ;;
5752 *)
5753 _LT_TAGVAR(hardcode_direct, $1)=yes
5754 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5755 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5756
5757 # hardcode_minus_L: Not really in the search PATH,
5758 # but as the default location of the library.
5759 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5760 ;;
5761 esac
5762 fi
5763 ;;
5764
5765 irix5* | irix6* | nonstopux*)
5766 if test yes = "$GCC"; then
5767 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5768 # Try to use the -exported_symbol ld option, if it does not
5769 # work, assume that -exports_file does not work either and
5770 # implicitly export all symbols.
5771 # This should be the same for all languages, so no per-tag cache variable.
5772 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5773 [lt_cv_irix_exported_symbol],
5774 [save_LDFLAGS=$LDFLAGS
5775 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5776 AC_LINK_IFELSE(
5777 [AC_LANG_SOURCE(
5778 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5779 [C++], [[int foo (void) { return 0; }]],
5780 [Fortran 77], [[
5781 subroutine foo
5782 end]],
5783 [Fortran], [[
5784 subroutine foo
5785 end]])])],
5786 [lt_cv_irix_exported_symbol=yes],
5787 [lt_cv_irix_exported_symbol=no])
5788 LDFLAGS=$save_LDFLAGS])
5789 if test yes = "$lt_cv_irix_exported_symbol"; then
5790 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
5791 fi
5792 _LT_TAGVAR(link_all_deplibs, $1)=no
5793 else
5794 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5795 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
5796 fi
5797 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5798 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5799 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5800 _LT_TAGVAR(inherit_rpath, $1)=yes
5801 _LT_TAGVAR(link_all_deplibs, $1)=yes
5802 ;;
5803
5804 linux*)
5805 case $cc_basename in
5806 tcc*)
5807 # Fabrice Bellard et al's Tiny C Compiler
5808 _LT_TAGVAR(ld_shlibs, $1)=yes
5809 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5810 ;;
5811 esac
5812 ;;
5813
5814 netbsd* | netbsdelf*-gnu)
5815 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5816 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5817 else
5818 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5819 fi
5820 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5821 _LT_TAGVAR(hardcode_direct, $1)=yes
5822 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5823 ;;
5824
5825 newsos6)
5826 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5827 _LT_TAGVAR(hardcode_direct, $1)=yes
5828 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5829 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5830 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5831 ;;
5832
5833 *nto* | *qnx*)
5834 ;;
5835
5836 openbsd* | bitrig*)
5837 if test -f /usr/libexec/ld.so; then
5838 _LT_TAGVAR(hardcode_direct, $1)=yes
5839 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5840 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5841 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5842 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5843 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5844 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5845 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5846 else
5847 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5848 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5849 fi
5850 else
5851 _LT_TAGVAR(ld_shlibs, $1)=no
5852 fi
5853 ;;
5854
5855 os2*)
5856 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5857 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5858 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5859 shrext_cmds=.dll
5860 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5861 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5862 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5863 $ECHO EXPORTS >> $output_objdir/$libname.def~
5864 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5865 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5866 emximp -o $lib $output_objdir/$libname.def'
5867 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5868 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5869 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5870 $ECHO EXPORTS >> $output_objdir/$libname.def~
5871 prefix_cmds="$SED"~
5872 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5873 prefix_cmds="$prefix_cmds -e 1d";
5874 fi~
5875 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5876 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5877 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5878 emximp -o $lib $output_objdir/$libname.def'
5879 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5880 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5881 ;;
5882
5883 osf3*)
5884 if test yes = "$GCC"; then
5885 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5886 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5887 else
5888 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5889 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5890 fi
5891 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5892 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5893 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5894 ;;
5895
5896 osf4* | osf5*) # as osf3* with the addition of -msym flag
5897 if test yes = "$GCC"; then
5898 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5899 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5900 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5901 else
5902 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5903 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5904 _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~
5905 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
5906
5907 # Both c and cxx compiler support -rpath directly
5908 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5909 fi
5910 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5911 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5912 ;;
5913
5914 solaris*)
5915 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5916 if test yes = "$GCC"; then
5917 wlarc='$wl'
5918 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5919 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5920 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5921 else
5922 case `$CC -V 2>&1` in
5923 *"Compilers 5.0"*)
5924 wlarc=''
5925 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5926 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5927 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5928 ;;
5929 *)
5930 wlarc='$wl'
5931 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5932 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5933 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5934 ;;
5935 esac
5936 fi
5937 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5938 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5939 case $host_os in
5940 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5941 *)
5942 # The compiler driver will combine and reorder linker options,
5943 # but understands '-z linker_flag'. GCC discards it without '$wl',
5944 # but is careful enough not to reorder.
5945 # Supported since Solaris 2.6 (maybe 2.5.1?)
5946 if test yes = "$GCC"; then
5947 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5948 else
5949 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5950 fi
5951 ;;
5952 esac
5953 _LT_TAGVAR(link_all_deplibs, $1)=yes
5954 ;;
5955
5956 sunos4*)
5957 if test sequent = "$host_vendor"; then
5958 # Use $CC to link under sequent, because it throws in some extra .o
5959 # files that make .init and .fini sections work.
5960 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5961 else
5962 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5963 fi
5964 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5965 _LT_TAGVAR(hardcode_direct, $1)=yes
5966 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5967 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5968 ;;
5969
5970 sysv4)
5971 case $host_vendor in
5972 sni)
5973 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5974 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5975 ;;
5976 siemens)
5977 ## LD is ld it makes a PLAMLIB
5978 ## CC just makes a GrossModule.
5979 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5980 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5981 _LT_TAGVAR(hardcode_direct, $1)=no
5982 ;;
5983 motorola)
5984 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5985 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5986 ;;
5987 esac
5988 runpath_var='LD_RUN_PATH'
5989 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5990 ;;
5991
5992 sysv4.3*)
5993 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5994 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5995 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5996 ;;
5997
5998 sysv4*MP*)
5999 if test -d /usr/nec; then
6000 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6001 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6002 runpath_var=LD_RUN_PATH
6003 hardcode_runpath_var=yes
6004 _LT_TAGVAR(ld_shlibs, $1)=yes
6005 fi
6006 ;;
6007
6008 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6009 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6010 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6011 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6012 runpath_var='LD_RUN_PATH'
6013
6014 if test yes = "$GCC"; then
6015 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6016 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6017 else
6018 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6019 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6020 fi
6021 ;;
6022
6023 sysv5* | sco3.2v5* | sco5v6*)
6024 # Note: We CANNOT use -z defs as we might desire, because we do not
6025 # link with -lc, and that would cause any symbols used from libc to
6026 # always be unresolved, which means just about no library would
6027 # ever link correctly. If we're not using GNU ld we use -z text
6028 # though, which does catch some bad symbols but isn't as heavy-handed
6029 # as -z defs.
6030 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6031 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6032 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6033 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6034 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6035 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6036 _LT_TAGVAR(link_all_deplibs, $1)=yes
6037 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6038 runpath_var='LD_RUN_PATH'
6039
6040 if test yes = "$GCC"; then
6041 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6042 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6043 else
6044 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6045 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6046 fi
6047 ;;
6048
6049 uts4*)
6050 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6051 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6052 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6053 ;;
6054
6055 *)
6056 _LT_TAGVAR(ld_shlibs, $1)=no
6057 ;;
6058 esac
6059
6060 if test sni = "$host_vendor"; then
6061 case $host in
6062 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6063 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6064 ;;
6065 esac
6066 fi
6067 fi
6068 ])
6069 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6070 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6071
6072 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6073
6074 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6075 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6076 _LT_DECL([], [extract_expsyms_cmds], [2],
6077 [The commands to extract the exported symbol list from a shared archive])
6078
6079 #
6080 # Do we need to explicitly link libc?
6081 #
6082 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6083 x|xyes)
6084 # Assume -lc should be added
6085 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6086
6087 if test yes,yes = "$GCC,$enable_shared"; then
6088 case $_LT_TAGVAR(archive_cmds, $1) in
6089 *'~'*)
6090 # FIXME: we may have to deal with multi-command sequences.
6091 ;;
6092 '$CC '*)
6093 # Test whether the compiler implicitly links with -lc since on some
6094 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6095 # to ld, don't add -lc before -lgcc.
6096 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6097 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6098 [$RM conftest*
6099 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6100
6101 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6102 soname=conftest
6103 lib=conftest
6104 libobjs=conftest.$ac_objext
6105 deplibs=
6106 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6107 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6108 compiler_flags=-v
6109 linker_flags=-v
6110 verstring=
6111 output_objdir=.
6112 libname=conftest
6113 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6114 _LT_TAGVAR(allow_undefined_flag, $1)=
6115 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6116 then
6117 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6118 else
6119 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6120 fi
6121 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6122 else
6123 cat conftest.err 1>&5
6124 fi
6125 $RM conftest*
6126 ])
6127 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6128 ;;
6129 esac
6130 fi
6131 ;;
6132 esac
6133
6134 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6135 [Whether or not to add -lc for building shared libraries])
6136 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6137 [enable_shared_with_static_runtimes], [0],
6138 [Whether or not to disallow shared libs when runtime libs are static])
6139 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6140 [Compiler flag to allow reflexive dlopens])
6141 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6142 [Compiler flag to generate shared objects directly from archives])
6143 _LT_TAGDECL([], [compiler_needs_object], [1],
6144 [Whether the compiler copes with passing no objects directly])
6145 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6146 [Create an old-style archive from a shared archive])
6147 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6148 [Create a temporary old-style archive to link instead of a shared archive])
6149 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6150 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6151 _LT_TAGDECL([], [module_cmds], [2],
6152 [Commands used to build a loadable module if different from building
6153 a shared archive.])
6154 _LT_TAGDECL([], [module_expsym_cmds], [2])
6155 _LT_TAGDECL([], [with_gnu_ld], [1],
6156 [Whether we are building with GNU ld or not])
6157 _LT_TAGDECL([], [allow_undefined_flag], [1],
6158 [Flag that allows shared libraries with undefined symbols to be built])
6159 _LT_TAGDECL([], [no_undefined_flag], [1],
6160 [Flag that enforces no undefined symbols])
6161 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6162 [Flag to hardcode $libdir into a binary during linking.
6163 This must work even if $libdir does not exist])
6164 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6165 [Whether we need a single "-rpath" flag with a separated argument])
6166 _LT_TAGDECL([], [hardcode_direct], [0],
6167 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6168 DIR into the resulting binary])
6169 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6170 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6171 DIR into the resulting binary and the resulting library dependency is
6172 "absolute", i.e impossible to change by setting $shlibpath_var if the
6173 library is relocated])
6174 _LT_TAGDECL([], [hardcode_minus_L], [0],
6175 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6176 into the resulting binary])
6177 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6178 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6179 into the resulting binary])
6180 _LT_TAGDECL([], [hardcode_automatic], [0],
6181 [Set to "yes" if building a shared library automatically hardcodes DIR
6182 into the library and all subsequent libraries and executables linked
6183 against it])
6184 _LT_TAGDECL([], [inherit_rpath], [0],
6185 [Set to yes if linker adds runtime paths of dependent libraries
6186 to runtime path list])
6187 _LT_TAGDECL([], [link_all_deplibs], [0],
6188 [Whether libtool must link a program against all its dependency libraries])
6189 _LT_TAGDECL([], [always_export_symbols], [0],
6190 [Set to "yes" if exported symbols are required])
6191 _LT_TAGDECL([], [export_symbols_cmds], [2],
6192 [The commands to list exported symbols])
6193 _LT_TAGDECL([], [exclude_expsyms], [1],
6194 [Symbols that should not be listed in the preloaded symbols])
6195 _LT_TAGDECL([], [include_expsyms], [1],
6196 [Symbols that must always be exported])
6197 _LT_TAGDECL([], [prelink_cmds], [2],
6198 [Commands necessary for linking programs (against libraries) with templates])
6199 _LT_TAGDECL([], [postlink_cmds], [2],
6200 [Commands necessary for finishing linking programs])
6201 _LT_TAGDECL([], [file_list_spec], [1],
6202 [Specify filename containing input files])
6203 dnl FIXME: Not yet implemented
6204 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6205 dnl [Compiler flag to generate thread safe objects])
6206 ])# _LT_LINKER_SHLIBS
6207
6208
6209 # _LT_LANG_C_CONFIG([TAG])
6210 # ------------------------
6211 # Ensure that the configuration variables for a C compiler are suitably
6212 # defined. These variables are subsequently used by _LT_CONFIG to write
6213 # the compiler configuration to 'libtool'.
6214 m4_defun([_LT_LANG_C_CONFIG],
6215 [m4_require([_LT_DECL_EGREP])dnl
6216 lt_save_CC=$CC
6217 AC_LANG_PUSH(C)
6218
6219 # Source file extension for C test sources.
6220 ac_ext=c
6221
6222 # Object file extension for compiled C test sources.
6223 objext=o
6224 _LT_TAGVAR(objext, $1)=$objext
6225
6226 # Code to be used in simple compile tests
6227 lt_simple_compile_test_code="int some_variable = 0;"
6228
6229 # Code to be used in simple link tests
6230 lt_simple_link_test_code='int main(){return(0);}'
6231
6232 _LT_TAG_COMPILER
6233 # Save the default compiler, since it gets overwritten when the other
6234 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6235 compiler_DEFAULT=$CC
6236
6237 # save warnings/boilerplate of simple test code
6238 _LT_COMPILER_BOILERPLATE
6239 _LT_LINKER_BOILERPLATE
6240
6241 ## CAVEAT EMPTOR:
6242 ## There is no encapsulation within the following macros, do not change
6243 ## the running order or otherwise move them around unless you know exactly
6244 ## what you are doing...
6245 if test -n "$compiler"; then
6246 _LT_COMPILER_NO_RTTI($1)
6247 _LT_COMPILER_PIC($1)
6248 _LT_COMPILER_C_O($1)
6249 _LT_COMPILER_FILE_LOCKS($1)
6250 _LT_LINKER_SHLIBS($1)
6251 _LT_SYS_DYNAMIC_LINKER($1)
6252 _LT_LINKER_HARDCODE_LIBPATH($1)
6253 LT_SYS_DLOPEN_SELF
6254 _LT_CMD_STRIPLIB
6255
6256 # Report what library types will actually be built
6257 AC_MSG_CHECKING([if libtool supports shared libraries])
6258 AC_MSG_RESULT([$can_build_shared])
6259
6260 AC_MSG_CHECKING([whether to build shared libraries])
6261 test no = "$can_build_shared" && enable_shared=no
6262
6263 # On AIX, shared libraries and static libraries use the same namespace, and
6264 # are all built from PIC.
6265 case $host_os in
6266 aix3*)
6267 test yes = "$enable_shared" && enable_static=no
6268 if test -n "$RANLIB"; then
6269 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6270 postinstall_cmds='$RANLIB $lib'
6271 fi
6272 ;;
6273
6274 aix[[4-9]]*)
6275 if test ia64 != "$host_cpu"; then
6276 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6277 yes,aix,yes) ;; # shared object as lib.so file only
6278 yes,svr4,*) ;; # shared object as lib.so archive member only
6279 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6280 esac
6281 fi
6282 ;;
6283 esac
6284 AC_MSG_RESULT([$enable_shared])
6285
6286 AC_MSG_CHECKING([whether to build static libraries])
6287 # Make sure either enable_shared or enable_static is yes.
6288 test yes = "$enable_shared" || enable_static=yes
6289 AC_MSG_RESULT([$enable_static])
6290
6291 _LT_CONFIG($1)
6292 fi
6293 AC_LANG_POP
6294 CC=$lt_save_CC
6295 ])# _LT_LANG_C_CONFIG
6296
6297
6298 # _LT_LANG_CXX_CONFIG([TAG])
6299 # --------------------------
6300 # Ensure that the configuration variables for a C++ compiler are suitably
6301 # defined. These variables are subsequently used by _LT_CONFIG to write
6302 # the compiler configuration to 'libtool'.
6303 m4_defun([_LT_LANG_CXX_CONFIG],
6304 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6305 m4_require([_LT_DECL_EGREP])dnl
6306 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6307 if test -n "$CXX" && ( test no != "$CXX" &&
6308 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6309 (test g++ != "$CXX"))); then
6310 AC_PROG_CXXCPP
6311 else
6312 _lt_caught_CXX_error=yes
6313 fi
6314
6315 AC_LANG_PUSH(C++)
6316 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6317 _LT_TAGVAR(allow_undefined_flag, $1)=
6318 _LT_TAGVAR(always_export_symbols, $1)=no
6319 _LT_TAGVAR(archive_expsym_cmds, $1)=
6320 _LT_TAGVAR(compiler_needs_object, $1)=no
6321 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6322 _LT_TAGVAR(hardcode_direct, $1)=no
6323 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6325 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6326 _LT_TAGVAR(hardcode_minus_L, $1)=no
6327 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6328 _LT_TAGVAR(hardcode_automatic, $1)=no
6329 _LT_TAGVAR(inherit_rpath, $1)=no
6330 _LT_TAGVAR(module_cmds, $1)=
6331 _LT_TAGVAR(module_expsym_cmds, $1)=
6332 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6333 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6334 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6335 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6336 _LT_TAGVAR(no_undefined_flag, $1)=
6337 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6338 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6339
6340 # Source file extension for C++ test sources.
6341 ac_ext=cpp
6342
6343 # Object file extension for compiled C++ test sources.
6344 objext=o
6345 _LT_TAGVAR(objext, $1)=$objext
6346
6347 # No sense in running all these tests if we already determined that
6348 # the CXX compiler isn't working. Some variables (like enable_shared)
6349 # are currently assumed to apply to all compilers on this platform,
6350 # and will be corrupted by setting them based on a non-working compiler.
6351 if test yes != "$_lt_caught_CXX_error"; then
6352 # Code to be used in simple compile tests
6353 lt_simple_compile_test_code="int some_variable = 0;"
6354
6355 # Code to be used in simple link tests
6356 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6357
6358 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6359 _LT_TAG_COMPILER
6360
6361 # save warnings/boilerplate of simple test code
6362 _LT_COMPILER_BOILERPLATE
6363 _LT_LINKER_BOILERPLATE
6364
6365 # Allow CC to be a program name with arguments.
6366 lt_save_CC=$CC
6367 lt_save_CFLAGS=$CFLAGS
6368 lt_save_LD=$LD
6369 lt_save_GCC=$GCC
6370 GCC=$GXX
6371 lt_save_with_gnu_ld=$with_gnu_ld
6372 lt_save_path_LD=$lt_cv_path_LD
6373 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6374 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6375 else
6376 $as_unset lt_cv_prog_gnu_ld
6377 fi
6378 if test -n "${lt_cv_path_LDCXX+set}"; then
6379 lt_cv_path_LD=$lt_cv_path_LDCXX
6380 else
6381 $as_unset lt_cv_path_LD
6382 fi
6383 test -z "${LDCXX+set}" || LD=$LDCXX
6384 CC=${CXX-"c++"}
6385 CFLAGS=$CXXFLAGS
6386 compiler=$CC
6387 _LT_TAGVAR(compiler, $1)=$CC
6388 _LT_CC_BASENAME([$compiler])
6389
6390 if test -n "$compiler"; then
6391 # We don't want -fno-exception when compiling C++ code, so set the
6392 # no_builtin_flag separately
6393 if test yes = "$GXX"; then
6394 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6395 else
6396 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6397 fi
6398
6399 if test yes = "$GXX"; then
6400 # Set up default GNU C++ configuration
6401
6402 LT_PATH_LD
6403
6404 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6405 # archiving commands below assume that GNU ld is being used.
6406 if test yes = "$with_gnu_ld"; then
6407 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6408 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6409
6410 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6411 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6412
6413 # If archive_cmds runs LD, not CC, wlarc should be empty
6414 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6415 # investigate it a little bit more. (MM)
6416 wlarc='$wl'
6417
6418 # ancient GNU ld didn't support --whole-archive et. al.
6419 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6420 $GREP 'no-whole-archive' > /dev/null; then
6421 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6422 else
6423 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6424 fi
6425 else
6426 with_gnu_ld=no
6427 wlarc=
6428
6429 # A generic and very simple default shared library creation
6430 # command for GNU C++ for the case where it uses the native
6431 # linker, instead of GNU ld. If possible, this setting should
6432 # overridden to take advantage of the native linker features on
6433 # the platform it is being used on.
6434 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6435 fi
6436
6437 # Commands to make compiler produce verbose output that lists
6438 # what "hidden" libraries, object files and flags are used when
6439 # linking a shared library.
6440 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6441
6442 else
6443 GXX=no
6444 with_gnu_ld=no
6445 wlarc=
6446 fi
6447
6448 # PORTME: fill in a description of your system's C++ link characteristics
6449 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6450 _LT_TAGVAR(ld_shlibs, $1)=yes
6451 case $host_os in
6452 aix3*)
6453 # FIXME: insert proper C++ library support
6454 _LT_TAGVAR(ld_shlibs, $1)=no
6455 ;;
6456 aix[[4-9]]*)
6457 if test ia64 = "$host_cpu"; then
6458 # On IA64, the linker does run time linking by default, so we don't
6459 # have to do anything special.
6460 aix_use_runtimelinking=no
6461 exp_sym_flag='-Bexport'
6462 no_entry_flag=
6463 else
6464 aix_use_runtimelinking=no
6465
6466 # Test if we are trying to use run time linking or normal
6467 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6468 # have runtime linking enabled, and use it for executables.
6469 # For shared libraries, we enable/disable runtime linking
6470 # depending on the kind of the shared library created -
6471 # when "with_aix_soname,aix_use_runtimelinking" is:
6472 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6473 # "aix,yes" lib.so shared, rtl:yes, for executables
6474 # lib.a static archive
6475 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6476 # lib.a(lib.so.V) shared, rtl:no, for executables
6477 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6478 # lib.a(lib.so.V) shared, rtl:no
6479 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6480 # lib.a static archive
6481 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6482 for ld_flag in $LDFLAGS; do
6483 case $ld_flag in
6484 *-brtl*)
6485 aix_use_runtimelinking=yes
6486 break
6487 ;;
6488 esac
6489 done
6490 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6491 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6492 # so we don't have lib.a shared libs to link our executables.
6493 # We have to force runtime linking in this case.
6494 aix_use_runtimelinking=yes
6495 LDFLAGS="$LDFLAGS -Wl,-brtl"
6496 fi
6497 ;;
6498 esac
6499
6500 exp_sym_flag='-bexport'
6501 no_entry_flag='-bnoentry'
6502 fi
6503
6504 # When large executables or shared objects are built, AIX ld can
6505 # have problems creating the table of contents. If linking a library
6506 # or program results in "error TOC overflow" add -mminimal-toc to
6507 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6508 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6509
6510 _LT_TAGVAR(archive_cmds, $1)=''
6511 _LT_TAGVAR(hardcode_direct, $1)=yes
6512 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6513 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6514 _LT_TAGVAR(link_all_deplibs, $1)=yes
6515 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6516 case $with_aix_soname,$aix_use_runtimelinking in
6517 aix,*) ;; # no import file
6518 svr4,* | *,yes) # use import file
6519 # The Import File defines what to hardcode.
6520 _LT_TAGVAR(hardcode_direct, $1)=no
6521 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6522 ;;
6523 esac
6524
6525 if test yes = "$GXX"; then
6526 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6527 # We only want to do this on AIX 4.2 and lower, the check
6528 # below for broken collect2 doesn't work under 4.3+
6529 collect2name=`$CC -print-prog-name=collect2`
6530 if test -f "$collect2name" &&
6531 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6532 then
6533 # We have reworked collect2
6534 :
6535 else
6536 # We have old collect2
6537 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6538 # It fails to find uninstalled libraries when the uninstalled
6539 # path is not listed in the libpath. Setting hardcode_minus_L
6540 # to unsupported forces relinking
6541 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6542 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6543 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6544 fi
6545 esac
6546 shared_flag='-shared'
6547 if test yes = "$aix_use_runtimelinking"; then
6548 shared_flag=$shared_flag' $wl-G'
6549 fi
6550 # Need to ensure runtime linking is disabled for the traditional
6551 # shared library, or the linker may eventually find shared libraries
6552 # /with/ Import File - we do not want to mix them.
6553 shared_flag_aix='-shared'
6554 shared_flag_svr4='-shared $wl-G'
6555 else
6556 # not using gcc
6557 if test ia64 = "$host_cpu"; then
6558 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6559 # chokes on -Wl,-G. The following line is correct:
6560 shared_flag='-G'
6561 else
6562 if test yes = "$aix_use_runtimelinking"; then
6563 shared_flag='$wl-G'
6564 else
6565 shared_flag='$wl-bM:SRE'
6566 fi
6567 shared_flag_aix='$wl-bM:SRE'
6568 shared_flag_svr4='$wl-G'
6569 fi
6570 fi
6571
6572 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6573 # It seems that -bexpall does not export symbols beginning with
6574 # underscore (_), so it is better to generate a list of symbols to
6575 # export.
6576 _LT_TAGVAR(always_export_symbols, $1)=yes
6577 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6578 # Warning - without using the other runtime loading flags (-brtl),
6579 # -berok will link without error, but may produce a broken library.
6580 # The "-G" linker flag allows undefined symbols.
6581 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6582 # Determine the default libpath from the value encoded in an empty
6583 # executable.
6584 _LT_SYS_MODULE_PATH_AIX([$1])
6585 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6586
6587 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
6588 else
6589 if test ia64 = "$host_cpu"; then
6590 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6591 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6592 _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"
6593 else
6594 # Determine the default libpath from the value encoded in an
6595 # empty executable.
6596 _LT_SYS_MODULE_PATH_AIX([$1])
6597 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6598 # Warning - without using the other run time loading flags,
6599 # -berok will link without error, but may produce a broken library.
6600 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6601 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6602 if test yes = "$with_gnu_ld"; then
6603 # We only use this code for GNU lds that support --whole-archive.
6604 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6605 else
6606 # Exported symbols can be pulled into shared objects from archives
6607 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6608 fi
6609 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6610 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6611 # -brtl affects multiple linker settings, -berok does not and is overridden later
6612 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6613 if test svr4 != "$with_aix_soname"; then
6614 # This is similar to how AIX traditionally builds its shared
6615 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6616 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6617 fi
6618 if test aix != "$with_aix_soname"; then
6619 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6620 else
6621 # used by -dlpreopen to get the symbols
6622 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6623 fi
6624 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6625 fi
6626 fi
6627 ;;
6628
6629 beos*)
6630 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6631 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6632 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6633 # support --undefined. This deserves some investigation. FIXME
6634 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6635 else
6636 _LT_TAGVAR(ld_shlibs, $1)=no
6637 fi
6638 ;;
6639
6640 chorus*)
6641 case $cc_basename in
6642 *)
6643 # FIXME: insert proper C++ library support
6644 _LT_TAGVAR(ld_shlibs, $1)=no
6645 ;;
6646 esac
6647 ;;
6648
6649 cygwin* | mingw* | pw32* | cegcc*)
6650 case $GXX,$cc_basename in
6651 ,cl* | no,cl*)
6652 # Native MSVC
6653 # hardcode_libdir_flag_spec is actually meaningless, as there is
6654 # no search path for DLLs.
6655 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6656 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6657 _LT_TAGVAR(always_export_symbols, $1)=yes
6658 _LT_TAGVAR(file_list_spec, $1)='@'
6659 # Tell ltmain to make .lib files, not .a files.
6660 libext=lib
6661 # Tell ltmain to make .dll files, not .so files.
6662 shrext_cmds=.dll
6663 # FIXME: Setting linknames here is a bad hack.
6664 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6665 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6666 cp "$export_symbols" "$output_objdir/$soname.def";
6667 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6668 else
6669 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6670 fi~
6671 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6672 linknames='
6673 # The linker will not automatically build a static lib if we build a DLL.
6674 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6675 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6676 # Don't use ranlib
6677 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6678 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6679 lt_tool_outputfile="@TOOL_OUTPUT@"~
6680 case $lt_outputfile in
6681 *.exe|*.EXE) ;;
6682 *)
6683 lt_outputfile=$lt_outputfile.exe
6684 lt_tool_outputfile=$lt_tool_outputfile.exe
6685 ;;
6686 esac~
6687 func_to_tool_file "$lt_outputfile"~
6688 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6689 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6690 $RM "$lt_outputfile.manifest";
6691 fi'
6692 ;;
6693 *)
6694 # g++
6695 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6696 # as there is no search path for DLLs.
6697 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6698 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6699 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6700 _LT_TAGVAR(always_export_symbols, $1)=no
6701 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6702
6703 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6704 _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'
6705 # If the export-symbols file already is a .def file, use it as
6706 # is; otherwise, prepend EXPORTS...
6707 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6708 cp $export_symbols $output_objdir/$soname.def;
6709 else
6710 echo EXPORTS > $output_objdir/$soname.def;
6711 cat $export_symbols >> $output_objdir/$soname.def;
6712 fi~
6713 $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'
6714 else
6715 _LT_TAGVAR(ld_shlibs, $1)=no
6716 fi
6717 ;;
6718 esac
6719 ;;
6720 darwin* | rhapsody*)
6721 _LT_DARWIN_LINKER_FEATURES($1)
6722 ;;
6723
6724 os2*)
6725 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6726 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6727 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6728 shrext_cmds=.dll
6729 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6730 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6731 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6732 $ECHO EXPORTS >> $output_objdir/$libname.def~
6733 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6734 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6735 emximp -o $lib $output_objdir/$libname.def'
6736 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6737 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6738 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6739 $ECHO EXPORTS >> $output_objdir/$libname.def~
6740 prefix_cmds="$SED"~
6741 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6742 prefix_cmds="$prefix_cmds -e 1d";
6743 fi~
6744 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6745 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6746 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6747 emximp -o $lib $output_objdir/$libname.def'
6748 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6749 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6750 ;;
6751
6752 dgux*)
6753 case $cc_basename in
6754 ec++*)
6755 # FIXME: insert proper C++ library support
6756 _LT_TAGVAR(ld_shlibs, $1)=no
6757 ;;
6758 ghcx*)
6759 # Green Hills C++ Compiler
6760 # FIXME: insert proper C++ library support
6761 _LT_TAGVAR(ld_shlibs, $1)=no
6762 ;;
6763 *)
6764 # FIXME: insert proper C++ library support
6765 _LT_TAGVAR(ld_shlibs, $1)=no
6766 ;;
6767 esac
6768 ;;
6769
6770 freebsd2.*)
6771 # C++ shared libraries reported to be fairly broken before
6772 # switch to ELF
6773 _LT_TAGVAR(ld_shlibs, $1)=no
6774 ;;
6775
6776 freebsd-elf*)
6777 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6778 ;;
6779
6780 freebsd* | dragonfly*)
6781 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6782 # conventions
6783 _LT_TAGVAR(ld_shlibs, $1)=yes
6784 ;;
6785
6786 haiku*)
6787 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6788 _LT_TAGVAR(link_all_deplibs, $1)=yes
6789 ;;
6790
6791 hpux9*)
6792 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6793 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6794 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6795 _LT_TAGVAR(hardcode_direct, $1)=yes
6796 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6797 # but as the default
6798 # location of the library.
6799
6800 case $cc_basename in
6801 CC*)
6802 # FIXME: insert proper C++ library support
6803 _LT_TAGVAR(ld_shlibs, $1)=no
6804 ;;
6805 aCC*)
6806 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6807 # Commands to make compiler produce verbose output that lists
6808 # what "hidden" libraries, object files and flags are used when
6809 # linking a shared library.
6810 #
6811 # There doesn't appear to be a way to prevent this compiler from
6812 # explicitly linking system object files so we need to strip them
6813 # from the output so that they don't get included in the library
6814 # dependencies.
6815 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6816 ;;
6817 *)
6818 if test yes = "$GXX"; then
6819 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6820 else
6821 # FIXME: insert proper C++ library support
6822 _LT_TAGVAR(ld_shlibs, $1)=no
6823 fi
6824 ;;
6825 esac
6826 ;;
6827
6828 hpux10*|hpux11*)
6829 if test no = "$with_gnu_ld"; then
6830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6831 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6832
6833 case $host_cpu in
6834 hppa*64*|ia64*)
6835 ;;
6836 *)
6837 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6838 ;;
6839 esac
6840 fi
6841 case $host_cpu in
6842 hppa*64*|ia64*)
6843 _LT_TAGVAR(hardcode_direct, $1)=no
6844 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6845 ;;
6846 *)
6847 _LT_TAGVAR(hardcode_direct, $1)=yes
6848 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6849 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6850 # but as the default
6851 # location of the library.
6852 ;;
6853 esac
6854
6855 case $cc_basename in
6856 CC*)
6857 # FIXME: insert proper C++ library support
6858 _LT_TAGVAR(ld_shlibs, $1)=no
6859 ;;
6860 aCC*)
6861 case $host_cpu in
6862 hppa*64*)
6863 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6864 ;;
6865 ia64*)
6866 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6867 ;;
6868 *)
6869 _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'
6870 ;;
6871 esac
6872 # Commands to make compiler produce verbose output that lists
6873 # what "hidden" libraries, object files and flags are used when
6874 # linking a shared library.
6875 #
6876 # There doesn't appear to be a way to prevent this compiler from
6877 # explicitly linking system object files so we need to strip them
6878 # from the output so that they don't get included in the library
6879 # dependencies.
6880 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6881 ;;
6882 *)
6883 if test yes = "$GXX"; then
6884 if test no = "$with_gnu_ld"; then
6885 case $host_cpu in
6886 hppa*64*)
6887 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6888 ;;
6889 ia64*)
6890 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6891 ;;
6892 *)
6893 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6894 ;;
6895 esac
6896 fi
6897 else
6898 # FIXME: insert proper C++ library support
6899 _LT_TAGVAR(ld_shlibs, $1)=no
6900 fi
6901 ;;
6902 esac
6903 ;;
6904
6905 interix[[3-9]]*)
6906 _LT_TAGVAR(hardcode_direct, $1)=no
6907 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6908 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6909 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6910 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6911 # Instead, shared libraries are loaded at an image base (0x10000000 by
6912 # default) and relocated if they conflict, which is a slow very memory
6913 # consuming and fragmenting process. To avoid this, we pick a random,
6914 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6915 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6916 _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'
6917 _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'
6918 ;;
6919 irix5* | irix6*)
6920 case $cc_basename in
6921 CC*)
6922 # SGI C++
6923 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
6924
6925 # Archives containing C++ object files must be created using
6926 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6927 # necessary to make sure instantiated templates are included
6928 # in the archive.
6929 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6930 ;;
6931 *)
6932 if test yes = "$GXX"; then
6933 if test no = "$with_gnu_ld"; then
6934 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
6935 else
6936 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
6937 fi
6938 fi
6939 _LT_TAGVAR(link_all_deplibs, $1)=yes
6940 ;;
6941 esac
6942 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6943 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6944 _LT_TAGVAR(inherit_rpath, $1)=yes
6945 ;;
6946
6947 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6948 case $cc_basename in
6949 KCC*)
6950 # Kuck and Associates, Inc. (KAI) C++ Compiler
6951
6952 # KCC will only create a shared library if the output file
6953 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6954 # to its proper name (with version) after linking.
6955 _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'
6956 _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'
6957 # Commands to make compiler produce verbose output that lists
6958 # what "hidden" libraries, object files and flags are used when
6959 # linking a shared library.
6960 #
6961 # There doesn't appear to be a way to prevent this compiler from
6962 # explicitly linking system object files so we need to strip them
6963 # from the output so that they don't get included in the library
6964 # dependencies.
6965 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6966
6967 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6968 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6969
6970 # Archives containing C++ object files must be created using
6971 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6972 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6973 ;;
6974 icpc* | ecpc* )
6975 # Intel C++
6976 with_gnu_ld=yes
6977 # version 8.0 and above of icpc choke on multiply defined symbols
6978 # if we add $predep_objects and $postdep_objects, however 7.1 and
6979 # earlier do not add the objects themselves.
6980 case `$CC -V 2>&1` in
6981 *"Version 7."*)
6982 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6983 _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'
6984 ;;
6985 *) # Version 8.0 or newer
6986 tmp_idyn=
6987 case $host_cpu in
6988 ia64*) tmp_idyn=' -i_dynamic';;
6989 esac
6990 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6991 _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'
6992 ;;
6993 esac
6994 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6995 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6996 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6997 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6998 ;;
6999 pgCC* | pgcpp*)
7000 # Portland Group C++ compiler
7001 case `$CC -V` in
7002 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7003 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7004 rm -rf $tpldir~
7005 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7006 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7007 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7008 rm -rf $tpldir~
7009 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7010 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7011 $RANLIB $oldlib'
7012 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7013 rm -rf $tpldir~
7014 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7015 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7016 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7017 rm -rf $tpldir~
7018 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7019 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
7020 ;;
7021 *) # Version 6 and above use weak symbols
7022 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7023 _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'
7024 ;;
7025 esac
7026
7027 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7028 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7029 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7030 ;;
7031 cxx*)
7032 # Compaq C++
7033 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7034 _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'
7035
7036 runpath_var=LD_RUN_PATH
7037 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7038 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7039
7040 # Commands to make compiler produce verbose output that lists
7041 # what "hidden" libraries, object files and flags are used when
7042 # linking a shared library.
7043 #
7044 # There doesn't appear to be a way to prevent this compiler from
7045 # explicitly linking system object files so we need to strip them
7046 # from the output so that they don't get included in the library
7047 # dependencies.
7048 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7049 ;;
7050 xl* | mpixl* | bgxl*)
7051 # IBM XL 8.0 on PPC, with GNU ld
7052 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7053 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7054 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7055 if test yes = "$supports_anon_versioning"; then
7056 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7057 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7058 echo "local: *; };" >> $output_objdir/$libname.ver~
7059 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7060 fi
7061 ;;
7062 *)
7063 case `$CC -V 2>&1 | sed 5q` in
7064 *Sun\ C*)
7065 # Sun C++ 5.9
7066 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7067 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7068 _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'
7069 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7070 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7071 _LT_TAGVAR(compiler_needs_object, $1)=yes
7072
7073 # Not sure whether something based on
7074 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7075 # would be better.
7076 output_verbose_link_cmd='func_echo_all'
7077
7078 # Archives containing C++ object files must be created using
7079 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7080 # necessary to make sure instantiated templates are included
7081 # in the archive.
7082 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7083 ;;
7084 esac
7085 ;;
7086 esac
7087 ;;
7088
7089 lynxos*)
7090 # FIXME: insert proper C++ library support
7091 _LT_TAGVAR(ld_shlibs, $1)=no
7092 ;;
7093
7094 m88k*)
7095 # FIXME: insert proper C++ library support
7096 _LT_TAGVAR(ld_shlibs, $1)=no
7097 ;;
7098
7099 mvs*)
7100 case $cc_basename in
7101 cxx*)
7102 # FIXME: insert proper C++ library support
7103 _LT_TAGVAR(ld_shlibs, $1)=no
7104 ;;
7105 *)
7106 # FIXME: insert proper C++ library support
7107 _LT_TAGVAR(ld_shlibs, $1)=no
7108 ;;
7109 esac
7110 ;;
7111
7112 netbsd*)
7113 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7114 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7115 wlarc=
7116 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7117 _LT_TAGVAR(hardcode_direct, $1)=yes
7118 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7119 fi
7120 # Workaround some broken pre-1.5 toolchains
7121 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7122 ;;
7123
7124 *nto* | *qnx*)
7125 _LT_TAGVAR(ld_shlibs, $1)=yes
7126 ;;
7127
7128 openbsd* | bitrig*)
7129 if test -f /usr/libexec/ld.so; then
7130 _LT_TAGVAR(hardcode_direct, $1)=yes
7131 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7132 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7133 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7134 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7135 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7136 _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'
7137 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7138 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7139 fi
7140 output_verbose_link_cmd=func_echo_all
7141 else
7142 _LT_TAGVAR(ld_shlibs, $1)=no
7143 fi
7144 ;;
7145
7146 osf3* | osf4* | osf5*)
7147 case $cc_basename in
7148 KCC*)
7149 # Kuck and Associates, Inc. (KAI) C++ Compiler
7150
7151 # KCC will only create a shared library if the output file
7152 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7153 # to its proper name (with version) after linking.
7154 _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'
7155
7156 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7157 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7158
7159 # Archives containing C++ object files must be created using
7160 # the KAI C++ compiler.
7161 case $host in
7162 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7163 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7164 esac
7165 ;;
7166 RCC*)
7167 # Rational C++ 2.4.1
7168 # FIXME: insert proper C++ library support
7169 _LT_TAGVAR(ld_shlibs, $1)=no
7170 ;;
7171 cxx*)
7172 case $host in
7173 osf3*)
7174 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7175 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7176 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7177 ;;
7178 *)
7179 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7180 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7181 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7182 echo "-hidden">> $lib.exp~
7183 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
7184 $RM $lib.exp'
7185 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7186 ;;
7187 esac
7188
7189 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7190
7191 # Commands to make compiler produce verbose output that lists
7192 # what "hidden" libraries, object files and flags are used when
7193 # linking a shared library.
7194 #
7195 # There doesn't appear to be a way to prevent this compiler from
7196 # explicitly linking system object files so we need to strip them
7197 # from the output so that they don't get included in the library
7198 # dependencies.
7199 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7200 ;;
7201 *)
7202 if test yes,no = "$GXX,$with_gnu_ld"; then
7203 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7204 case $host in
7205 osf3*)
7206 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7207 ;;
7208 *)
7209 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7210 ;;
7211 esac
7212
7213 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7214 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7215
7216 # Commands to make compiler produce verbose output that lists
7217 # what "hidden" libraries, object files and flags are used when
7218 # linking a shared library.
7219 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7220
7221 else
7222 # FIXME: insert proper C++ library support
7223 _LT_TAGVAR(ld_shlibs, $1)=no
7224 fi
7225 ;;
7226 esac
7227 ;;
7228
7229 psos*)
7230 # FIXME: insert proper C++ library support
7231 _LT_TAGVAR(ld_shlibs, $1)=no
7232 ;;
7233
7234 sunos4*)
7235 case $cc_basename in
7236 CC*)
7237 # Sun C++ 4.x
7238 # FIXME: insert proper C++ library support
7239 _LT_TAGVAR(ld_shlibs, $1)=no
7240 ;;
7241 lcc*)
7242 # Lucid
7243 # FIXME: insert proper C++ library support
7244 _LT_TAGVAR(ld_shlibs, $1)=no
7245 ;;
7246 *)
7247 # FIXME: insert proper C++ library support
7248 _LT_TAGVAR(ld_shlibs, $1)=no
7249 ;;
7250 esac
7251 ;;
7252
7253 solaris*)
7254 case $cc_basename in
7255 CC* | sunCC*)
7256 # Sun C++ 4.2, 5.x and Centerline C++
7257 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7258 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7259 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7260 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7261 $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'
7262
7263 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7264 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7265 case $host_os in
7266 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7267 *)
7268 # The compiler driver will combine and reorder linker options,
7269 # but understands '-z linker_flag'.
7270 # Supported since Solaris 2.6 (maybe 2.5.1?)
7271 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7272 ;;
7273 esac
7274 _LT_TAGVAR(link_all_deplibs, $1)=yes
7275
7276 output_verbose_link_cmd='func_echo_all'
7277
7278 # Archives containing C++ object files must be created using
7279 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7280 # necessary to make sure instantiated templates are included
7281 # in the archive.
7282 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7283 ;;
7284 gcx*)
7285 # Green Hills C++ Compiler
7286 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7287
7288 # The C++ compiler must be used to create the archive.
7289 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7290 ;;
7291 *)
7292 # GNU C++ compiler with Solaris linker
7293 if test yes,no = "$GXX,$with_gnu_ld"; then
7294 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7295 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7296 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7297 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7298 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7299
7300 # Commands to make compiler produce verbose output that lists
7301 # what "hidden" libraries, object files and flags are used when
7302 # linking a shared library.
7303 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7304 else
7305 # g++ 2.7 appears to require '-G' NOT '-shared' on this
7306 # platform.
7307 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7308 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7309 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7310
7311 # Commands to make compiler produce verbose output that lists
7312 # what "hidden" libraries, object files and flags are used when
7313 # linking a shared library.
7314 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7315 fi
7316
7317 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7318 case $host_os in
7319 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7320 *)
7321 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7322 ;;
7323 esac
7324 fi
7325 ;;
7326 esac
7327 ;;
7328
7329 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7330 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7331 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7332 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7333 runpath_var='LD_RUN_PATH'
7334
7335 case $cc_basename in
7336 CC*)
7337 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7338 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7339 ;;
7340 *)
7341 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7342 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7343 ;;
7344 esac
7345 ;;
7346
7347 sysv5* | sco3.2v5* | sco5v6*)
7348 # Note: We CANNOT use -z defs as we might desire, because we do not
7349 # link with -lc, and that would cause any symbols used from libc to
7350 # always be unresolved, which means just about no library would
7351 # ever link correctly. If we're not using GNU ld we use -z text
7352 # though, which does catch some bad symbols but isn't as heavy-handed
7353 # as -z defs.
7354 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7355 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7356 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7357 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7358 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7359 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7360 _LT_TAGVAR(link_all_deplibs, $1)=yes
7361 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7362 runpath_var='LD_RUN_PATH'
7363
7364 case $cc_basename in
7365 CC*)
7366 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7367 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7368 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7369 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7370 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7371 '"$_LT_TAGVAR(reload_cmds, $1)"
7372 ;;
7373 *)
7374 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7375 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7376 ;;
7377 esac
7378 ;;
7379
7380 tandem*)
7381 case $cc_basename in
7382 NCC*)
7383 # NonStop-UX NCC 3.20
7384 # FIXME: insert proper C++ library support
7385 _LT_TAGVAR(ld_shlibs, $1)=no
7386 ;;
7387 *)
7388 # FIXME: insert proper C++ library support
7389 _LT_TAGVAR(ld_shlibs, $1)=no
7390 ;;
7391 esac
7392 ;;
7393
7394 vxworks*)
7395 # FIXME: insert proper C++ library support
7396 _LT_TAGVAR(ld_shlibs, $1)=no
7397 ;;
7398
7399 *)
7400 # FIXME: insert proper C++ library support
7401 _LT_TAGVAR(ld_shlibs, $1)=no
7402 ;;
7403 esac
7404
7405 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7406 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7407
7408 _LT_TAGVAR(GCC, $1)=$GXX
7409 _LT_TAGVAR(LD, $1)=$LD
7410
7411 ## CAVEAT EMPTOR:
7412 ## There is no encapsulation within the following macros, do not change
7413 ## the running order or otherwise move them around unless you know exactly
7414 ## what you are doing...
7415 _LT_SYS_HIDDEN_LIBDEPS($1)
7416 _LT_COMPILER_PIC($1)
7417 _LT_COMPILER_C_O($1)
7418 _LT_COMPILER_FILE_LOCKS($1)
7419 _LT_LINKER_SHLIBS($1)
7420 _LT_SYS_DYNAMIC_LINKER($1)
7421 _LT_LINKER_HARDCODE_LIBPATH($1)
7422
7423 _LT_CONFIG($1)
7424 fi # test -n "$compiler"
7425
7426 CC=$lt_save_CC
7427 CFLAGS=$lt_save_CFLAGS
7428 LDCXX=$LD
7429 LD=$lt_save_LD
7430 GCC=$lt_save_GCC
7431 with_gnu_ld=$lt_save_with_gnu_ld
7432 lt_cv_path_LDCXX=$lt_cv_path_LD
7433 lt_cv_path_LD=$lt_save_path_LD
7434 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7435 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7436 fi # test yes != "$_lt_caught_CXX_error"
7437
7438 AC_LANG_POP
7439 ])# _LT_LANG_CXX_CONFIG
7440
7441
7442 # _LT_FUNC_STRIPNAME_CNF
7443 # ----------------------
7444 # func_stripname_cnf prefix suffix name
7445 # strip PREFIX and SUFFIX off of NAME.
7446 # PREFIX and SUFFIX must not contain globbing or regex special
7447 # characters, hashes, percent signs, but SUFFIX may contain a leading
7448 # dot (in which case that matches only a dot).
7449 #
7450 # This function is identical to the (non-XSI) version of func_stripname,
7451 # except this one can be used by m4 code that may be executed by configure,
7452 # rather than the libtool script.
7453 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7454 AC_REQUIRE([_LT_DECL_SED])
7455 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7456 func_stripname_cnf ()
7457 {
7458 case @S|@2 in
7459 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7460 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7461 esac
7462 } # func_stripname_cnf
7463 ])# _LT_FUNC_STRIPNAME_CNF
7464
7465
7466 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7467 # ---------------------------------
7468 # Figure out "hidden" library dependencies from verbose
7469 # compiler output when linking a shared library.
7470 # Parse the compiler output and extract the necessary
7471 # objects, libraries and library flags.
7472 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7473 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7474 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7475 # Dependencies to place before and after the object being linked:
7476 _LT_TAGVAR(predep_objects, $1)=
7477 _LT_TAGVAR(postdep_objects, $1)=
7478 _LT_TAGVAR(predeps, $1)=
7479 _LT_TAGVAR(postdeps, $1)=
7480 _LT_TAGVAR(compiler_lib_search_path, $1)=
7481
7482 dnl we can't use the lt_simple_compile_test_code here,
7483 dnl because it contains code intended for an executable,
7484 dnl not a library. It's possible we should let each
7485 dnl tag define a new lt_????_link_test_code variable,
7486 dnl but it's only used here...
7487 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7488 int a;
7489 void foo (void) { a = 0; }
7490 _LT_EOF
7491 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7492 class Foo
7493 {
7494 public:
7495 Foo (void) { a = 0; }
7496 private:
7497 int a;
7498 };
7499 _LT_EOF
7500 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7501 subroutine foo
7502 implicit none
7503 integer*4 a
7504 a=0
7505 return
7506 end
7507 _LT_EOF
7508 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7509 subroutine foo
7510 implicit none
7511 integer a
7512 a=0
7513 return
7514 end
7515 _LT_EOF
7516 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7517 public class foo {
7518 private int a;
7519 public void bar (void) {
7520 a = 0;
7521 }
7522 };
7523 _LT_EOF
7524 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7525 package foo
7526 func foo() {
7527 }
7528 _LT_EOF
7529 ])
7530
7531 _lt_libdeps_save_CFLAGS=$CFLAGS
7532 case "$CC $CFLAGS " in #(
7533 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7534 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7535 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7536 esac
7537
7538 dnl Parse the compiler output and extract the necessary
7539 dnl objects, libraries and library flags.
7540 if AC_TRY_EVAL(ac_compile); then
7541 # Parse the compiler output and extract the necessary
7542 # objects, libraries and library flags.
7543
7544 # Sentinel used to keep track of whether or not we are before
7545 # the conftest object file.
7546 pre_test_object_deps_done=no
7547
7548 for p in `eval "$output_verbose_link_cmd"`; do
7549 case $prev$p in
7550
7551 -L* | -R* | -l*)
7552 # Some compilers place space between "-{L,R}" and the path.
7553 # Remove the space.
7554 if test x-L = "$p" ||
7555 test x-R = "$p"; then
7556 prev=$p
7557 continue
7558 fi
7559
7560 # Expand the sysroot to ease extracting the directories later.
7561 if test -z "$prev"; then
7562 case $p in
7563 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7564 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7565 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7566 esac
7567 fi
7568 case $p in
7569 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7570 esac
7571 if test no = "$pre_test_object_deps_done"; then
7572 case $prev in
7573 -L | -R)
7574 # Internal compiler library paths should come after those
7575 # provided the user. The postdeps already come after the
7576 # user supplied libs so there is no need to process them.
7577 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7578 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7579 else
7580 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7581 fi
7582 ;;
7583 # The "-l" case would never come before the object being
7584 # linked, so don't bother handling this case.
7585 esac
7586 else
7587 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7588 _LT_TAGVAR(postdeps, $1)=$prev$p
7589 else
7590 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7591 fi
7592 fi
7593 prev=
7594 ;;
7595
7596 *.lto.$objext) ;; # Ignore GCC LTO objects
7597 *.$objext)
7598 # This assumes that the test object file only shows up
7599 # once in the compiler output.
7600 if test "$p" = "conftest.$objext"; then
7601 pre_test_object_deps_done=yes
7602 continue
7603 fi
7604
7605 if test no = "$pre_test_object_deps_done"; then
7606 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7607 _LT_TAGVAR(predep_objects, $1)=$p
7608 else
7609 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7610 fi
7611 else
7612 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7613 _LT_TAGVAR(postdep_objects, $1)=$p
7614 else
7615 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7616 fi
7617 fi
7618 ;;
7619
7620 *) ;; # Ignore the rest.
7621
7622 esac
7623 done
7624
7625 # Clean up.
7626 rm -f a.out a.exe
7627 else
7628 echo "libtool.m4: error: problem compiling $1 test program"
7629 fi
7630
7631 $RM -f confest.$objext
7632 CFLAGS=$_lt_libdeps_save_CFLAGS
7633
7634 # PORTME: override above test on systems where it is broken
7635 m4_if([$1], [CXX],
7636 [case $host_os in
7637 interix[[3-9]]*)
7638 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7639 # hack all around it, let's just trust "g++" to DTRT.
7640 _LT_TAGVAR(predep_objects,$1)=
7641 _LT_TAGVAR(postdep_objects,$1)=
7642 _LT_TAGVAR(postdeps,$1)=
7643 ;;
7644 esac
7645 ])
7646
7647 case " $_LT_TAGVAR(postdeps, $1) " in
7648 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7649 esac
7650 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7651 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7652 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7653 fi
7654 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7655 [The directories searched by this compiler when creating a shared library])
7656 _LT_TAGDECL([], [predep_objects], [1],
7657 [Dependencies to place before and after the objects being linked to
7658 create a shared library])
7659 _LT_TAGDECL([], [postdep_objects], [1])
7660 _LT_TAGDECL([], [predeps], [1])
7661 _LT_TAGDECL([], [postdeps], [1])
7662 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7663 [The library search path used internally by the compiler when linking
7664 a shared library])
7665 ])# _LT_SYS_HIDDEN_LIBDEPS
7666
7667
7668 # _LT_LANG_F77_CONFIG([TAG])
7669 # --------------------------
7670 # Ensure that the configuration variables for a Fortran 77 compiler are
7671 # suitably defined. These variables are subsequently used by _LT_CONFIG
7672 # to write the compiler configuration to 'libtool'.
7673 m4_defun([_LT_LANG_F77_CONFIG],
7674 [AC_LANG_PUSH(Fortran 77)
7675 if test -z "$F77" || test no = "$F77"; then
7676 _lt_disable_F77=yes
7677 fi
7678
7679 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7680 _LT_TAGVAR(allow_undefined_flag, $1)=
7681 _LT_TAGVAR(always_export_symbols, $1)=no
7682 _LT_TAGVAR(archive_expsym_cmds, $1)=
7683 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7684 _LT_TAGVAR(hardcode_direct, $1)=no
7685 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7686 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7687 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7688 _LT_TAGVAR(hardcode_minus_L, $1)=no
7689 _LT_TAGVAR(hardcode_automatic, $1)=no
7690 _LT_TAGVAR(inherit_rpath, $1)=no
7691 _LT_TAGVAR(module_cmds, $1)=
7692 _LT_TAGVAR(module_expsym_cmds, $1)=
7693 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7694 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7695 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7696 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7697 _LT_TAGVAR(no_undefined_flag, $1)=
7698 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7699 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7700
7701 # Source file extension for f77 test sources.
7702 ac_ext=f
7703
7704 # Object file extension for compiled f77 test sources.
7705 objext=o
7706 _LT_TAGVAR(objext, $1)=$objext
7707
7708 # No sense in running all these tests if we already determined that
7709 # the F77 compiler isn't working. Some variables (like enable_shared)
7710 # are currently assumed to apply to all compilers on this platform,
7711 # and will be corrupted by setting them based on a non-working compiler.
7712 if test yes != "$_lt_disable_F77"; then
7713 # Code to be used in simple compile tests
7714 lt_simple_compile_test_code="\
7715 subroutine t
7716 return
7717 end
7718 "
7719
7720 # Code to be used in simple link tests
7721 lt_simple_link_test_code="\
7722 program t
7723 end
7724 "
7725
7726 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7727 _LT_TAG_COMPILER
7728
7729 # save warnings/boilerplate of simple test code
7730 _LT_COMPILER_BOILERPLATE
7731 _LT_LINKER_BOILERPLATE
7732
7733 # Allow CC to be a program name with arguments.
7734 lt_save_CC=$CC
7735 lt_save_GCC=$GCC
7736 lt_save_CFLAGS=$CFLAGS
7737 CC=${F77-"f77"}
7738 CFLAGS=$FFLAGS
7739 compiler=$CC
7740 _LT_TAGVAR(compiler, $1)=$CC
7741 _LT_CC_BASENAME([$compiler])
7742 GCC=$G77
7743 if test -n "$compiler"; then
7744 AC_MSG_CHECKING([if libtool supports shared libraries])
7745 AC_MSG_RESULT([$can_build_shared])
7746
7747 AC_MSG_CHECKING([whether to build shared libraries])
7748 test no = "$can_build_shared" && enable_shared=no
7749
7750 # On AIX, shared libraries and static libraries use the same namespace, and
7751 # are all built from PIC.
7752 case $host_os in
7753 aix3*)
7754 test yes = "$enable_shared" && enable_static=no
7755 if test -n "$RANLIB"; then
7756 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7757 postinstall_cmds='$RANLIB $lib'
7758 fi
7759 ;;
7760 aix[[4-9]]*)
7761 if test ia64 != "$host_cpu"; then
7762 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7763 yes,aix,yes) ;; # shared object as lib.so file only
7764 yes,svr4,*) ;; # shared object as lib.so archive member only
7765 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7766 esac
7767 fi
7768 ;;
7769 esac
7770 AC_MSG_RESULT([$enable_shared])
7771
7772 AC_MSG_CHECKING([whether to build static libraries])
7773 # Make sure either enable_shared or enable_static is yes.
7774 test yes = "$enable_shared" || enable_static=yes
7775 AC_MSG_RESULT([$enable_static])
7776
7777 _LT_TAGVAR(GCC, $1)=$G77
7778 _LT_TAGVAR(LD, $1)=$LD
7779
7780 ## CAVEAT EMPTOR:
7781 ## There is no encapsulation within the following macros, do not change
7782 ## the running order or otherwise move them around unless you know exactly
7783 ## what you are doing...
7784 _LT_COMPILER_PIC($1)
7785 _LT_COMPILER_C_O($1)
7786 _LT_COMPILER_FILE_LOCKS($1)
7787 _LT_LINKER_SHLIBS($1)
7788 _LT_SYS_DYNAMIC_LINKER($1)
7789 _LT_LINKER_HARDCODE_LIBPATH($1)
7790
7791 _LT_CONFIG($1)
7792 fi # test -n "$compiler"
7793
7794 GCC=$lt_save_GCC
7795 CC=$lt_save_CC
7796 CFLAGS=$lt_save_CFLAGS
7797 fi # test yes != "$_lt_disable_F77"
7798
7799 AC_LANG_POP
7800 ])# _LT_LANG_F77_CONFIG
7801
7802
7803 # _LT_LANG_FC_CONFIG([TAG])
7804 # -------------------------
7805 # Ensure that the configuration variables for a Fortran compiler are
7806 # suitably defined. These variables are subsequently used by _LT_CONFIG
7807 # to write the compiler configuration to 'libtool'.
7808 m4_defun([_LT_LANG_FC_CONFIG],
7809 [AC_LANG_PUSH(Fortran)
7810
7811 if test -z "$FC" || test no = "$FC"; then
7812 _lt_disable_FC=yes
7813 fi
7814
7815 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7816 _LT_TAGVAR(allow_undefined_flag, $1)=
7817 _LT_TAGVAR(always_export_symbols, $1)=no
7818 _LT_TAGVAR(archive_expsym_cmds, $1)=
7819 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7820 _LT_TAGVAR(hardcode_direct, $1)=no
7821 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7822 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7823 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7824 _LT_TAGVAR(hardcode_minus_L, $1)=no
7825 _LT_TAGVAR(hardcode_automatic, $1)=no
7826 _LT_TAGVAR(inherit_rpath, $1)=no
7827 _LT_TAGVAR(module_cmds, $1)=
7828 _LT_TAGVAR(module_expsym_cmds, $1)=
7829 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7830 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7831 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7832 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7833 _LT_TAGVAR(no_undefined_flag, $1)=
7834 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7835 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7836
7837 # Source file extension for fc test sources.
7838 ac_ext=${ac_fc_srcext-f}
7839
7840 # Object file extension for compiled fc test sources.
7841 objext=o
7842 _LT_TAGVAR(objext, $1)=$objext
7843
7844 # No sense in running all these tests if we already determined that
7845 # the FC compiler isn't working. Some variables (like enable_shared)
7846 # are currently assumed to apply to all compilers on this platform,
7847 # and will be corrupted by setting them based on a non-working compiler.
7848 if test yes != "$_lt_disable_FC"; then
7849 # Code to be used in simple compile tests
7850 lt_simple_compile_test_code="\
7851 subroutine t
7852 return
7853 end
7854 "
7855
7856 # Code to be used in simple link tests
7857 lt_simple_link_test_code="\
7858 program t
7859 end
7860 "
7861
7862 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7863 _LT_TAG_COMPILER
7864
7865 # save warnings/boilerplate of simple test code
7866 _LT_COMPILER_BOILERPLATE
7867 _LT_LINKER_BOILERPLATE
7868
7869 # Allow CC to be a program name with arguments.
7870 lt_save_CC=$CC
7871 lt_save_GCC=$GCC
7872 lt_save_CFLAGS=$CFLAGS
7873 CC=${FC-"f95"}
7874 CFLAGS=$FCFLAGS
7875 compiler=$CC
7876 GCC=$ac_cv_fc_compiler_gnu
7877
7878 _LT_TAGVAR(compiler, $1)=$CC
7879 _LT_CC_BASENAME([$compiler])
7880
7881 if test -n "$compiler"; then
7882 AC_MSG_CHECKING([if libtool supports shared libraries])
7883 AC_MSG_RESULT([$can_build_shared])
7884
7885 AC_MSG_CHECKING([whether to build shared libraries])
7886 test no = "$can_build_shared" && enable_shared=no
7887
7888 # On AIX, shared libraries and static libraries use the same namespace, and
7889 # are all built from PIC.
7890 case $host_os in
7891 aix3*)
7892 test yes = "$enable_shared" && enable_static=no
7893 if test -n "$RANLIB"; then
7894 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7895 postinstall_cmds='$RANLIB $lib'
7896 fi
7897 ;;
7898 aix[[4-9]]*)
7899 if test ia64 != "$host_cpu"; then
7900 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7901 yes,aix,yes) ;; # shared object as lib.so file only
7902 yes,svr4,*) ;; # shared object as lib.so archive member only
7903 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7904 esac
7905 fi
7906 ;;
7907 esac
7908 AC_MSG_RESULT([$enable_shared])
7909
7910 AC_MSG_CHECKING([whether to build static libraries])
7911 # Make sure either enable_shared or enable_static is yes.
7912 test yes = "$enable_shared" || enable_static=yes
7913 AC_MSG_RESULT([$enable_static])
7914
7915 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7916 _LT_TAGVAR(LD, $1)=$LD
7917
7918 ## CAVEAT EMPTOR:
7919 ## There is no encapsulation within the following macros, do not change
7920 ## the running order or otherwise move them around unless you know exactly
7921 ## what you are doing...
7922 _LT_SYS_HIDDEN_LIBDEPS($1)
7923 _LT_COMPILER_PIC($1)
7924 _LT_COMPILER_C_O($1)
7925 _LT_COMPILER_FILE_LOCKS($1)
7926 _LT_LINKER_SHLIBS($1)
7927 _LT_SYS_DYNAMIC_LINKER($1)
7928 _LT_LINKER_HARDCODE_LIBPATH($1)
7929
7930 _LT_CONFIG($1)
7931 fi # test -n "$compiler"
7932
7933 GCC=$lt_save_GCC
7934 CC=$lt_save_CC
7935 CFLAGS=$lt_save_CFLAGS
7936 fi # test yes != "$_lt_disable_FC"
7937
7938 AC_LANG_POP
7939 ])# _LT_LANG_FC_CONFIG
7940
7941
7942 # _LT_LANG_GCJ_CONFIG([TAG])
7943 # --------------------------
7944 # Ensure that the configuration variables for the GNU Java Compiler compiler
7945 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7946 # to write the compiler configuration to 'libtool'.
7947 m4_defun([_LT_LANG_GCJ_CONFIG],
7948 [AC_REQUIRE([LT_PROG_GCJ])dnl
7949 AC_LANG_SAVE
7950
7951 # Source file extension for Java test sources.
7952 ac_ext=java
7953
7954 # Object file extension for compiled Java test sources.
7955 objext=o
7956 _LT_TAGVAR(objext, $1)=$objext
7957
7958 # Code to be used in simple compile tests
7959 lt_simple_compile_test_code="class foo {}"
7960
7961 # Code to be used in simple link tests
7962 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7963
7964 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7965 _LT_TAG_COMPILER
7966
7967 # save warnings/boilerplate of simple test code
7968 _LT_COMPILER_BOILERPLATE
7969 _LT_LINKER_BOILERPLATE
7970
7971 # Allow CC to be a program name with arguments.
7972 lt_save_CC=$CC
7973 lt_save_CFLAGS=$CFLAGS
7974 lt_save_GCC=$GCC
7975 GCC=yes
7976 CC=${GCJ-"gcj"}
7977 CFLAGS=$GCJFLAGS
7978 compiler=$CC
7979 _LT_TAGVAR(compiler, $1)=$CC
7980 _LT_TAGVAR(LD, $1)=$LD
7981 _LT_CC_BASENAME([$compiler])
7982
7983 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7984 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7985
7986 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7987 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7988 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7989
7990 ## CAVEAT EMPTOR:
7991 ## There is no encapsulation within the following macros, do not change
7992 ## the running order or otherwise move them around unless you know exactly
7993 ## what you are doing...
7994 if test -n "$compiler"; then
7995 _LT_COMPILER_NO_RTTI($1)
7996 _LT_COMPILER_PIC($1)
7997 _LT_COMPILER_C_O($1)
7998 _LT_COMPILER_FILE_LOCKS($1)
7999 _LT_LINKER_SHLIBS($1)
8000 _LT_LINKER_HARDCODE_LIBPATH($1)
8001
8002 _LT_CONFIG($1)
8003 fi
8004
8005 AC_LANG_RESTORE
8006
8007 GCC=$lt_save_GCC
8008 CC=$lt_save_CC
8009 CFLAGS=$lt_save_CFLAGS
8010 ])# _LT_LANG_GCJ_CONFIG
8011
8012
8013 # _LT_LANG_GO_CONFIG([TAG])
8014 # --------------------------
8015 # Ensure that the configuration variables for the GNU Go compiler
8016 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8017 # to write the compiler configuration to 'libtool'.
8018 m4_defun([_LT_LANG_GO_CONFIG],
8019 [AC_REQUIRE([LT_PROG_GO])dnl
8020 AC_LANG_SAVE
8021
8022 # Source file extension for Go test sources.
8023 ac_ext=go
8024
8025 # Object file extension for compiled Go test sources.
8026 objext=o
8027 _LT_TAGVAR(objext, $1)=$objext
8028
8029 # Code to be used in simple compile tests
8030 lt_simple_compile_test_code="package main; func main() { }"
8031
8032 # Code to be used in simple link tests
8033 lt_simple_link_test_code='package main; func main() { }'
8034
8035 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8036 _LT_TAG_COMPILER
8037
8038 # save warnings/boilerplate of simple test code
8039 _LT_COMPILER_BOILERPLATE
8040 _LT_LINKER_BOILERPLATE
8041
8042 # Allow CC to be a program name with arguments.
8043 lt_save_CC=$CC
8044 lt_save_CFLAGS=$CFLAGS
8045 lt_save_GCC=$GCC
8046 GCC=yes
8047 CC=${GOC-"gccgo"}
8048 CFLAGS=$GOFLAGS
8049 compiler=$CC
8050 _LT_TAGVAR(compiler, $1)=$CC
8051 _LT_TAGVAR(LD, $1)=$LD
8052 _LT_CC_BASENAME([$compiler])
8053
8054 # Go did not exist at the time GCC didn't implicitly link libc in.
8055 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8056
8057 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8058 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8059 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8060
8061 ## CAVEAT EMPTOR:
8062 ## There is no encapsulation within the following macros, do not change
8063 ## the running order or otherwise move them around unless you know exactly
8064 ## what you are doing...
8065 if test -n "$compiler"; then
8066 _LT_COMPILER_NO_RTTI($1)
8067 _LT_COMPILER_PIC($1)
8068 _LT_COMPILER_C_O($1)
8069 _LT_COMPILER_FILE_LOCKS($1)
8070 _LT_LINKER_SHLIBS($1)
8071 _LT_LINKER_HARDCODE_LIBPATH($1)
8072
8073 _LT_CONFIG($1)
8074 fi
8075
8076 AC_LANG_RESTORE
8077
8078 GCC=$lt_save_GCC
8079 CC=$lt_save_CC
8080 CFLAGS=$lt_save_CFLAGS
8081 ])# _LT_LANG_GO_CONFIG
8082
8083
8084 # _LT_LANG_RC_CONFIG([TAG])
8085 # -------------------------
8086 # Ensure that the configuration variables for the Windows resource compiler
8087 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8088 # to write the compiler configuration to 'libtool'.
8089 m4_defun([_LT_LANG_RC_CONFIG],
8090 [AC_REQUIRE([LT_PROG_RC])dnl
8091 AC_LANG_SAVE
8092
8093 # Source file extension for RC test sources.
8094 ac_ext=rc
8095
8096 # Object file extension for compiled RC test sources.
8097 objext=o
8098 _LT_TAGVAR(objext, $1)=$objext
8099
8100 # Code to be used in simple compile tests
8101 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8102
8103 # Code to be used in simple link tests
8104 lt_simple_link_test_code=$lt_simple_compile_test_code
8105
8106 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8107 _LT_TAG_COMPILER
8108
8109 # save warnings/boilerplate of simple test code
8110 _LT_COMPILER_BOILERPLATE
8111 _LT_LINKER_BOILERPLATE
8112
8113 # Allow CC to be a program name with arguments.
8114 lt_save_CC=$CC
8115 lt_save_CFLAGS=$CFLAGS
8116 lt_save_GCC=$GCC
8117 GCC=
8118 CC=${RC-"windres"}
8119 CFLAGS=
8120 compiler=$CC
8121 _LT_TAGVAR(compiler, $1)=$CC
8122 _LT_CC_BASENAME([$compiler])
8123 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8124
8125 if test -n "$compiler"; then
8126 :
8127 _LT_CONFIG($1)
8128 fi
8129
8130 GCC=$lt_save_GCC
8131 AC_LANG_RESTORE
8132 CC=$lt_save_CC
8133 CFLAGS=$lt_save_CFLAGS
8134 ])# _LT_LANG_RC_CONFIG
8135
8136
8137 # LT_PROG_GCJ
8138 # -----------
8139 AC_DEFUN([LT_PROG_GCJ],
8140 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8141 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8142 [AC_CHECK_TOOL(GCJ, gcj,)
8143 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8144 AC_SUBST(GCJFLAGS)])])[]dnl
8145 ])
8146
8147 # Old name:
8148 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8149 dnl aclocal-1.4 backwards compatibility:
8150 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8151
8152
8153 # LT_PROG_GO
8154 # ----------
8155 AC_DEFUN([LT_PROG_GO],
8156 [AC_CHECK_TOOL(GOC, gccgo,)
8157 ])
8158
8159
8160 # LT_PROG_RC
8161 # ----------
8162 AC_DEFUN([LT_PROG_RC],
8163 [AC_CHECK_TOOL(RC, windres,)
8164 ])
8165
8166 # Old name:
8167 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8168 dnl aclocal-1.4 backwards compatibility:
8169 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8170
8171
8172 # _LT_DECL_EGREP
8173 # --------------
8174 # If we don't have a new enough Autoconf to choose the best grep
8175 # available, choose the one first in the user's PATH.
8176 m4_defun([_LT_DECL_EGREP],
8177 [AC_REQUIRE([AC_PROG_EGREP])dnl
8178 AC_REQUIRE([AC_PROG_FGREP])dnl
8179 test -z "$GREP" && GREP=grep
8180 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8181 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8182 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8183 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8184 AC_SUBST([GREP])
8185 ])
8186
8187
8188 # _LT_DECL_OBJDUMP
8189 # --------------
8190 # If we don't have a new enough Autoconf to choose the best objdump
8191 # available, choose the one first in the user's PATH.
8192 m4_defun([_LT_DECL_OBJDUMP],
8193 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8194 test -z "$OBJDUMP" && OBJDUMP=objdump
8195 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8196 AC_SUBST([OBJDUMP])
8197 ])
8198
8199 # _LT_DECL_DLLTOOL
8200 # ----------------
8201 # Ensure DLLTOOL variable is set.
8202 m4_defun([_LT_DECL_DLLTOOL],
8203 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8204 test -z "$DLLTOOL" && DLLTOOL=dlltool
8205 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8206 AC_SUBST([DLLTOOL])
8207 ])
8208
8209 # _LT_DECL_SED
8210 # ------------
8211 # Check for a fully-functional sed program, that truncates
8212 # as few characters as possible. Prefer GNU sed if found.
8213 m4_defun([_LT_DECL_SED],
8214 [AC_PROG_SED
8215 test -z "$SED" && SED=sed
8216 Xsed="$SED -e 1s/^X//"
8217 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8218 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8219 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8220 ])# _LT_DECL_SED
8221
8222 m4_ifndef([AC_PROG_SED], [
8223 ############################################################
8224 # NOTE: This macro has been submitted for inclusion into #
8225 # GNU Autoconf as AC_PROG_SED. When it is available in #
8226 # a released version of Autoconf we should remove this #
8227 # macro and use it instead. #
8228 ############################################################
8229
8230 m4_defun([AC_PROG_SED],
8231 [AC_MSG_CHECKING([for a sed that does not truncate output])
8232 AC_CACHE_VAL(lt_cv_path_SED,
8233 [# Loop through the user's path and test for sed and gsed.
8234 # Then use that list of sed's as ones to test for truncation.
8235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8236 for as_dir in $PATH
8237 do
8238 IFS=$as_save_IFS
8239 test -z "$as_dir" && as_dir=.
8240 for lt_ac_prog in sed gsed; do
8241 for ac_exec_ext in '' $ac_executable_extensions; do
8242 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8243 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8244 fi
8245 done
8246 done
8247 done
8248 IFS=$as_save_IFS
8249 lt_ac_max=0
8250 lt_ac_count=0
8251 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8252 # along with /bin/sed that truncates output.
8253 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8254 test ! -f "$lt_ac_sed" && continue
8255 cat /dev/null > conftest.in
8256 lt_ac_count=0
8257 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8258 # Check for GNU sed and select it if it is found.
8259 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8260 lt_cv_path_SED=$lt_ac_sed
8261 break
8262 fi
8263 while true; do
8264 cat conftest.in conftest.in >conftest.tmp
8265 mv conftest.tmp conftest.in
8266 cp conftest.in conftest.nl
8267 echo >>conftest.nl
8268 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8269 cmp -s conftest.out conftest.nl || break
8270 # 10000 chars as input seems more than enough
8271 test 10 -lt "$lt_ac_count" && break
8272 lt_ac_count=`expr $lt_ac_count + 1`
8273 if test "$lt_ac_count" -gt "$lt_ac_max"; then
8274 lt_ac_max=$lt_ac_count
8275 lt_cv_path_SED=$lt_ac_sed
8276 fi
8277 done
8278 done
8279 ])
8280 SED=$lt_cv_path_SED
8281 AC_SUBST([SED])
8282 AC_MSG_RESULT([$SED])
8283 ])#AC_PROG_SED
8284 ])#m4_ifndef
8285
8286 # Old name:
8287 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8288 dnl aclocal-1.4 backwards compatibility:
8289 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8290
8291
8292 # _LT_CHECK_SHELL_FEATURES
8293 # ------------------------
8294 # Find out whether the shell is Bourne or XSI compatible,
8295 # or has some other useful features.
8296 m4_defun([_LT_CHECK_SHELL_FEATURES],
8297 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8298 lt_unset=unset
8299 else
8300 lt_unset=false
8301 fi
8302 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8303
8304 # test EBCDIC or ASCII
8305 case `echo X|tr X '\101'` in
8306 A) # ASCII based system
8307 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8308 lt_SP2NL='tr \040 \012'
8309 lt_NL2SP='tr \015\012 \040\040'
8310 ;;
8311 *) # EBCDIC based system
8312 lt_SP2NL='tr \100 \n'
8313 lt_NL2SP='tr \r\n \100\100'
8314 ;;
8315 esac
8316 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8317 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8318 ])# _LT_CHECK_SHELL_FEATURES
8319
8320
8321 # _LT_PATH_CONVERSION_FUNCTIONS
8322 # -----------------------------
8323 # Determine what file name conversion functions should be used by
8324 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8325 # for certain cross-compile configurations and native mingw.
8326 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8327 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8328 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8329 AC_MSG_CHECKING([how to convert $build file names to $host format])
8330 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8331 [case $host in
8332 *-*-mingw* )
8333 case $build in
8334 *-*-mingw* ) # actually msys
8335 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8336 ;;
8337 *-*-cygwin* )
8338 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8339 ;;
8340 * ) # otherwise, assume *nix
8341 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8342 ;;
8343 esac
8344 ;;
8345 *-*-cygwin* )
8346 case $build in
8347 *-*-mingw* ) # actually msys
8348 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8349 ;;
8350 *-*-cygwin* )
8351 lt_cv_to_host_file_cmd=func_convert_file_noop
8352 ;;
8353 * ) # otherwise, assume *nix
8354 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8355 ;;
8356 esac
8357 ;;
8358 * ) # unhandled hosts (and "normal" native builds)
8359 lt_cv_to_host_file_cmd=func_convert_file_noop
8360 ;;
8361 esac
8362 ])
8363 to_host_file_cmd=$lt_cv_to_host_file_cmd
8364 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8365 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8366 [0], [convert $build file names to $host format])dnl
8367
8368 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8369 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8370 [#assume ordinary cross tools, or native build.
8371 lt_cv_to_tool_file_cmd=func_convert_file_noop
8372 case $host in
8373 *-*-mingw* )
8374 case $build in
8375 *-*-mingw* ) # actually msys
8376 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8377 ;;
8378 esac
8379 ;;
8380 esac
8381 ])
8382 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8383 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8384 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8385 [0], [convert $build files to toolchain format])dnl
8386 ])# _LT_PATH_CONVERSION_FUNCTIONS
0 # Helper functions for option handling. -*- Autoconf -*-
1 #
2 # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
3 # Foundation, Inc.
4 # Written by Gary V. Vaughan, 2004
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 # serial 8 ltoptions.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
15
16 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17 # ------------------------------------------
18 m4_define([_LT_MANGLE_OPTION],
19 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
20
21
22 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
23 # ---------------------------------------
24 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
25 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
26 # saved as a flag.
27 m4_define([_LT_SET_OPTION],
28 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
30 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option '$2'])])[]dnl
32 ])
33
34
35 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
36 # ------------------------------------------------------------
37 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
38 m4_define([_LT_IF_OPTION],
39 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
40
41
42 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
43 # -------------------------------------------------------
44 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
45 # are set.
46 m4_define([_LT_UNLESS_OPTIONS],
47 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
48 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
49 [m4_define([$0_found])])])[]dnl
50 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
51 ])[]dnl
52 ])
53
54
55 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
56 # ----------------------------------------
57 # OPTION-LIST is a space-separated list of Libtool options associated
58 # with MACRO-NAME. If any OPTION has a matching handler declared with
59 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
60 # the unknown option and exit.
61 m4_defun([_LT_SET_OPTIONS],
62 [# Set options
63 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64 [_LT_SET_OPTION([$1], _LT_Option)])
65
66 m4_if([$1],[LT_INIT],[
67 dnl
68 dnl Simply set some default values (i.e off) if boolean options were not
69 dnl specified:
70 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
71 ])
72 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
73 ])
74 dnl
75 dnl If no reference was made to various pairs of opposing options, then
76 dnl we run the default mode handler for the pair. For example, if neither
77 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
78 dnl archives by default:
79 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
80 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
81 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
82 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
84 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
85 [_LT_WITH_AIX_SONAME([aix])])
86 ])
87 ])# _LT_SET_OPTIONS
88
89
90 ## --------------------------------- ##
91 ## Macros to handle LT_INIT options. ##
92 ## --------------------------------- ##
93
94 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
95 # -----------------------------------------
96 m4_define([_LT_MANGLE_DEFUN],
97 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
98
99
100 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
101 # -----------------------------------------------
102 m4_define([LT_OPTION_DEFINE],
103 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
104 ])# LT_OPTION_DEFINE
105
106
107 # dlopen
108 # ------
109 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
110 ])
111
112 AU_DEFUN([AC_LIBTOOL_DLOPEN],
113 [_LT_SET_OPTION([LT_INIT], [dlopen])
114 AC_DIAGNOSE([obsolete],
115 [$0: Remove this warning and the call to _LT_SET_OPTION when you
116 put the 'dlopen' option into LT_INIT's first parameter.])
117 ])
118
119 dnl aclocal-1.4 backwards compatibility:
120 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
121
122
123 # win32-dll
124 # ---------
125 # Declare package support for building win32 dll's.
126 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
127 [enable_win32_dll=yes
128
129 case $host in
130 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
131 AC_CHECK_TOOL(AS, as, false)
132 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
133 AC_CHECK_TOOL(OBJDUMP, objdump, false)
134 ;;
135 esac
136
137 test -z "$AS" && AS=as
138 _LT_DECL([], [AS], [1], [Assembler program])dnl
139
140 test -z "$DLLTOOL" && DLLTOOL=dlltool
141 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
142
143 test -z "$OBJDUMP" && OBJDUMP=objdump
144 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
145 ])# win32-dll
146
147 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
148 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
149 _LT_SET_OPTION([LT_INIT], [win32-dll])
150 AC_DIAGNOSE([obsolete],
151 [$0: Remove this warning and the call to _LT_SET_OPTION when you
152 put the 'win32-dll' option into LT_INIT's first parameter.])
153 ])
154
155 dnl aclocal-1.4 backwards compatibility:
156 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
157
158
159 # _LT_ENABLE_SHARED([DEFAULT])
160 # ----------------------------
161 # implement the --enable-shared flag, and supports the 'shared' and
162 # 'disable-shared' LT_INIT options.
163 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
164 m4_define([_LT_ENABLE_SHARED],
165 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
166 AC_ARG_ENABLE([shared],
167 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
168 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
169 [p=${PACKAGE-default}
170 case $enableval in
171 yes) enable_shared=yes ;;
172 no) enable_shared=no ;;
173 *)
174 enable_shared=no
175 # Look at the argument we got. We use all the common list separators.
176 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
177 for pkg in $enableval; do
178 IFS=$lt_save_ifs
179 if test "X$pkg" = "X$p"; then
180 enable_shared=yes
181 fi
182 done
183 IFS=$lt_save_ifs
184 ;;
185 esac],
186 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
187
188 _LT_DECL([build_libtool_libs], [enable_shared], [0],
189 [Whether or not to build shared libraries])
190 ])# _LT_ENABLE_SHARED
191
192 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
193 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
194
195 # Old names:
196 AC_DEFUN([AC_ENABLE_SHARED],
197 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
198 ])
199
200 AC_DEFUN([AC_DISABLE_SHARED],
201 [_LT_SET_OPTION([LT_INIT], [disable-shared])
202 ])
203
204 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
205 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
206
207 dnl aclocal-1.4 backwards compatibility:
208 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
209 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
210
211
212
213 # _LT_ENABLE_STATIC([DEFAULT])
214 # ----------------------------
215 # implement the --enable-static flag, and support the 'static' and
216 # 'disable-static' LT_INIT options.
217 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
218 m4_define([_LT_ENABLE_STATIC],
219 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
220 AC_ARG_ENABLE([static],
221 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
222 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
223 [p=${PACKAGE-default}
224 case $enableval in
225 yes) enable_static=yes ;;
226 no) enable_static=no ;;
227 *)
228 enable_static=no
229 # Look at the argument we got. We use all the common list separators.
230 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
231 for pkg in $enableval; do
232 IFS=$lt_save_ifs
233 if test "X$pkg" = "X$p"; then
234 enable_static=yes
235 fi
236 done
237 IFS=$lt_save_ifs
238 ;;
239 esac],
240 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
241
242 _LT_DECL([build_old_libs], [enable_static], [0],
243 [Whether or not to build static libraries])
244 ])# _LT_ENABLE_STATIC
245
246 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
247 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
248
249 # Old names:
250 AC_DEFUN([AC_ENABLE_STATIC],
251 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
252 ])
253
254 AC_DEFUN([AC_DISABLE_STATIC],
255 [_LT_SET_OPTION([LT_INIT], [disable-static])
256 ])
257
258 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
259 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
260
261 dnl aclocal-1.4 backwards compatibility:
262 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
263 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
264
265
266
267 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
268 # ----------------------------------
269 # implement the --enable-fast-install flag, and support the 'fast-install'
270 # and 'disable-fast-install' LT_INIT options.
271 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
272 m4_define([_LT_ENABLE_FAST_INSTALL],
273 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
274 AC_ARG_ENABLE([fast-install],
275 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
276 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
277 [p=${PACKAGE-default}
278 case $enableval in
279 yes) enable_fast_install=yes ;;
280 no) enable_fast_install=no ;;
281 *)
282 enable_fast_install=no
283 # Look at the argument we got. We use all the common list separators.
284 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
285 for pkg in $enableval; do
286 IFS=$lt_save_ifs
287 if test "X$pkg" = "X$p"; then
288 enable_fast_install=yes
289 fi
290 done
291 IFS=$lt_save_ifs
292 ;;
293 esac],
294 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
295
296 _LT_DECL([fast_install], [enable_fast_install], [0],
297 [Whether or not to optimize for fast installation])dnl
298 ])# _LT_ENABLE_FAST_INSTALL
299
300 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
301 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
302
303 # Old names:
304 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
305 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
306 AC_DIAGNOSE([obsolete],
307 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
308 the 'fast-install' option into LT_INIT's first parameter.])
309 ])
310
311 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
312 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
313 AC_DIAGNOSE([obsolete],
314 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
315 the 'disable-fast-install' option into LT_INIT's first parameter.])
316 ])
317
318 dnl aclocal-1.4 backwards compatibility:
319 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
320 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
321
322
323 # _LT_WITH_AIX_SONAME([DEFAULT])
324 # ----------------------------------
325 # implement the --with-aix-soname flag, and support the `aix-soname=aix'
326 # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
327 # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
328 m4_define([_LT_WITH_AIX_SONAME],
329 [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
330 shared_archive_member_spec=
331 case $host,$enable_shared in
332 power*-*-aix[[5-9]]*,yes)
333 AC_MSG_CHECKING([which variant of shared library versioning to provide])
334 AC_ARG_WITH([aix-soname],
335 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
336 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
337 [case $withval in
338 aix|svr4|both)
339 ;;
340 *)
341 AC_MSG_ERROR([Unknown argument to --with-aix-soname])
342 ;;
343 esac
344 lt_cv_with_aix_soname=$with_aix_soname],
345 [AC_CACHE_VAL([lt_cv_with_aix_soname],
346 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
347 with_aix_soname=$lt_cv_with_aix_soname])
348 AC_MSG_RESULT([$with_aix_soname])
349 if test aix != "$with_aix_soname"; then
350 # For the AIX way of multilib, we name the shared archive member
351 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
352 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
353 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
354 # the AIX toolchain works better with OBJECT_MODE set (default 32).
355 if test 64 = "${OBJECT_MODE-32}"; then
356 shared_archive_member_spec=shr_64
357 else
358 shared_archive_member_spec=shr
359 fi
360 fi
361 ;;
362 *)
363 with_aix_soname=aix
364 ;;
365 esac
366
367 _LT_DECL([], [shared_archive_member_spec], [0],
368 [Shared archive member basename, for filename based shared library versioning on AIX])dnl
369 ])# _LT_WITH_AIX_SONAME
370
371 LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
372 LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
373 LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
374
375
376 # _LT_WITH_PIC([MODE])
377 # --------------------
378 # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
379 # LT_INIT options.
380 # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
381 m4_define([_LT_WITH_PIC],
382 [AC_ARG_WITH([pic],
383 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
384 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
385 [lt_p=${PACKAGE-default}
386 case $withval in
387 yes|no) pic_mode=$withval ;;
388 *)
389 pic_mode=default
390 # Look at the argument we got. We use all the common list separators.
391 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
392 for lt_pkg in $withval; do
393 IFS=$lt_save_ifs
394 if test "X$lt_pkg" = "X$lt_p"; then
395 pic_mode=yes
396 fi
397 done
398 IFS=$lt_save_ifs
399 ;;
400 esac],
401 [pic_mode=m4_default([$1], [default])])
402
403 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
404 ])# _LT_WITH_PIC
405
406 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
407 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
408
409 # Old name:
410 AU_DEFUN([AC_LIBTOOL_PICMODE],
411 [_LT_SET_OPTION([LT_INIT], [pic-only])
412 AC_DIAGNOSE([obsolete],
413 [$0: Remove this warning and the call to _LT_SET_OPTION when you
414 put the 'pic-only' option into LT_INIT's first parameter.])
415 ])
416
417 dnl aclocal-1.4 backwards compatibility:
418 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
419
420 ## ----------------- ##
421 ## LTDL_INIT Options ##
422 ## ----------------- ##
423
424 m4_define([_LTDL_MODE], [])
425 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
426 [m4_define([_LTDL_MODE], [nonrecursive])])
427 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
428 [m4_define([_LTDL_MODE], [recursive])])
429 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
430 [m4_define([_LTDL_MODE], [subproject])])
431
432 m4_define([_LTDL_TYPE], [])
433 LT_OPTION_DEFINE([LTDL_INIT], [installable],
434 [m4_define([_LTDL_TYPE], [installable])])
435 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
436 [m4_define([_LTDL_TYPE], [convenience])])
0 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
3 # Foundation, Inc.
4 # Written by Gary V. Vaughan, 2004
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 # serial 6 ltsugar.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
14
15
16 # lt_join(SEP, ARG1, [ARG2...])
17 # -----------------------------
18 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
19 # associated separator.
20 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
21 # versions in m4sugar had bugs.
22 m4_define([lt_join],
23 [m4_if([$#], [1], [],
24 [$#], [2], [[$2]],
25 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
26 m4_define([_lt_join],
27 [m4_if([$#$2], [2], [],
28 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
29
30
31 # lt_car(LIST)
32 # lt_cdr(LIST)
33 # ------------
34 # Manipulate m4 lists.
35 # These macros are necessary as long as will still need to support
36 # Autoconf-2.59, which quotes differently.
37 m4_define([lt_car], [[$1]])
38 m4_define([lt_cdr],
39 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
40 [$#], 1, [],
41 [m4_dquote(m4_shift($@))])])
42 m4_define([lt_unquote], $1)
43
44
45 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
46 # ------------------------------------------
47 # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
48 # Note that neither SEPARATOR nor STRING are expanded; they are appended
49 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
50 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
51 # than defined and empty).
52 #
53 # This macro is needed until we can rely on Autoconf 2.62, since earlier
54 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
55 m4_define([lt_append],
56 [m4_define([$1],
57 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
58
59
60
61 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
62 # ----------------------------------------------------------
63 # Produce a SEP delimited list of all paired combinations of elements of
64 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
65 # has the form PREFIXmINFIXSUFFIXn.
66 # Needed until we can rely on m4_combine added in Autoconf 2.62.
67 m4_define([lt_combine],
68 [m4_if(m4_eval([$# > 3]), [1],
69 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
70 [[m4_foreach([_Lt_prefix], [$2],
71 [m4_foreach([_Lt_suffix],
72 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
73 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
74
75
76 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
77 # -----------------------------------------------------------------------
78 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
79 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
80 m4_define([lt_if_append_uniq],
81 [m4_ifdef([$1],
82 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
83 [lt_append([$1], [$2], [$3])$4],
84 [$5])],
85 [lt_append([$1], [$2], [$3])$4])])
86
87
88 # lt_dict_add(DICT, KEY, VALUE)
89 # -----------------------------
90 m4_define([lt_dict_add],
91 [m4_define([$1($2)], [$3])])
92
93
94 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
95 # --------------------------------------------
96 m4_define([lt_dict_add_subkey],
97 [m4_define([$1($2:$3)], [$4])])
98
99
100 # lt_dict_fetch(DICT, KEY, [SUBKEY])
101 # ----------------------------------
102 m4_define([lt_dict_fetch],
103 [m4_ifval([$3],
104 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
105 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
106
107
108 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
109 # -----------------------------------------------------------------
110 m4_define([lt_if_dict_fetch],
111 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
112 [$5],
113 [$6])])
114
115
116 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
117 # --------------------------------------------------------------
118 m4_define([lt_dict_filter],
119 [m4_if([$5], [], [],
120 [lt_join(m4_quote(m4_default([$4], [[, ]])),
121 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
122 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
123 ])
0 # ltversion.m4 -- version numbers -*- Autoconf -*-
1 #
2 # Copyright (C) 2004, 2011-2015 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 # @configure_input@
10
11 # serial 4179 ltversion.m4
12 # This file is part of GNU Libtool
13
14 m4_define([LT_PACKAGE_VERSION], [2.4.6])
15 m4_define([LT_PACKAGE_REVISION], [2.4.6])
16
17 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4.6'
19 macro_revision='2.4.6'
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, 2009, 2011-2015 Free Software
3 # Foundation, Inc.
4 # Written by Scott James Remnant, 2004.
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 # serial 5 lt~obsolete.m4
11
12 # These exist entirely to fool aclocal when bootstrapping libtool.
13 #
14 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
15 # which have later been changed to m4_define as they aren't part of the
16 # exported API, or moved to Autoconf or Automake where they belong.
17 #
18 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
19 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
20 # using a macro with the same name in our local m4/libtool.m4 it'll
21 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
22 # and doesn't know about Autoconf macros at all.)
23 #
24 # So we provide this file, which has a silly filename so it's always
25 # included after everything else. This provides aclocal with the
26 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
27 # because those macros already exist, or will be overwritten later.
28 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
29 #
30 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
31 # Yes, that means every name once taken will need to remain here until
32 # we give up compatibility with versions before 1.7, at which point
33 # we need to keep only those names which we still refer to.
34
35 # This is to help aclocal find these macros, as it can't see m4_define.
36 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
37
38 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
39 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
40 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
41 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
42 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
43 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
44 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
45 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
46 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
47 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
48 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
49 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
50 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
51 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
52 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
53 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
54 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
55 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
56 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
57 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
58 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
59 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
60 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
61 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
62 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
63 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
64 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
65 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
66 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
67 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
68 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
69 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
70 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
71 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
72 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
73 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
74 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
75 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
76 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
77 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
78 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
79 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
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])])
92 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
93 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
94 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
95 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
96 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
97 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
98 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
164164 command.
165165 .It Fl -fragment-filter Ns = Ns Ar TYPES
166166 Filter the fragment lists for the specified types.
167 .It Fl -modversion
168 Print the version of the queried module.
167169 .El
168170 .Sh ENVIRONMENT
169171 .Bl -tag -width indent
0 Name: malformed-version
1 Version: 3.922 2018-03-17
2 Description: None.
3 Cflags: -Ifoo
4 Libs: -lbar
3030 fragment_quoting_7 \
3131 msvc_fragment_quoting \
3232 msvc_fragment_render_cflags \
33 tuple_dequote
33 tuple_dequote \
34 version_with_whitespace \
35 version_with_whitespace_2 \
36 version_with_whitespace_diagnostic
3437
3538 comments_body()
3639 {
282285 -o inline:'-L/test/lib -lfoo \n' \
283286 pkgconf --with-path="${selfdir}/lib1" --libs tuple-quoting
284287 }
288
289 version_with_whitespace_body()
290 {
291 atf_check \
292 -o inline:'3.922\n' \
293 pkgconf --with-path="${selfdir}/lib1" --modversion malformed-version
294 }
295
296 version_with_whitespace_2_body()
297 {
298 atf_check \
299 -o inline:'malformed-version = 3.922\n' \
300 pkgconf --with-path="${selfdir}/lib1" --print-provides malformed-version
301 }
302
303 version_with_whitespace_diagnostic_body()
304 {
305 atf_check \
306 -o match:warning \
307 pkgconf --with-path="${selfdir}/lib1" --validate malformed-version
308 }
2020 done
2121 #--- end kludge ---
2222
23 selfdir="/Users/kaniini/dev-src/pkgconf/tests"
23 selfdir="/home/kaniini/pkgconf/tests"
2424 LIBRARY_PATH_ENV="LIBRARY_PATH"
2525 PATH_SEP=":"
2626 SYSROOT_DIR="${selfdir}/test"
2929 Haiku) LIBRARY_PATH_ENV="BELIBRARIES";;
3030 esac
3131
32 prefix="/usr"
32 prefix="/usr/local"
3333 exec_prefix="${prefix}"
3434 datarootdir="${prefix}/share"
3535 pcpath="${exec_prefix}/lib/pkgconfig:${datarootdir}/pkgconfig"