You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7983 lines
280 KiB

12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
11 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
11 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
  1. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  2. #
  3. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  4. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  5. # Foundation, Inc.
  6. # Written by Gordon Matzigkeit, 1996
  7. #
  8. # This file is free software; the Free Software Foundation gives
  9. # unlimited permission to copy and/or distribute it, with or without
  10. # modifications, as long as this notice is preserved.
  11. m4_define([_LT_COPYING], [dnl
  12. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  13. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  14. # Foundation, Inc.
  15. # Written by Gordon Matzigkeit, 1996
  16. #
  17. # This file is part of GNU Libtool.
  18. #
  19. # GNU Libtool is free software; you can redistribute it and/or
  20. # modify it under the terms of the GNU General Public License as
  21. # published by the Free Software Foundation; either version 2 of
  22. # the License, or (at your option) any later version.
  23. #
  24. # As a special exception to the GNU General Public License,
  25. # if you distribute this file as part of a program or library that
  26. # is built using GNU Libtool, you may include this file under the
  27. # same distribution terms that you use for the rest of that program.
  28. #
  29. # GNU Libtool is distributed in the hope that it will be useful,
  30. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  31. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. # GNU General Public License for more details.
  33. #
  34. # You should have received a copy of the GNU General Public License
  35. # along with GNU Libtool; see the file COPYING. If not, a copy
  36. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  37. # obtained by writing to the Free Software Foundation, Inc.,
  38. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  39. ])
  40. # serial 57 LT_INIT
  41. # LT_PREREQ(VERSION)
  42. # ------------------
  43. # Complain and exit if this libtool version is less that VERSION.
  44. m4_defun([LT_PREREQ],
  45. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  46. [m4_default([$3],
  47. [m4_fatal([Libtool version $1 or higher is required],
  48. 63)])],
  49. [$2])])
  50. # _LT_CHECK_BUILDDIR
  51. # ------------------
  52. # Complain if the absolute build directory name contains unusual characters
  53. m4_defun([_LT_CHECK_BUILDDIR],
  54. [case `pwd` in
  55. *\ * | *\ *)
  56. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  57. esac
  58. ])
  59. # LT_INIT([OPTIONS])
  60. # ------------------
  61. AC_DEFUN([LT_INIT],
  62. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  63. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  64. AC_BEFORE([$0], [LT_LANG])dnl
  65. AC_BEFORE([$0], [LT_OUTPUT])dnl
  66. AC_BEFORE([$0], [LTDL_INIT])dnl
  67. m4_require([_LT_CHECK_BUILDDIR])dnl
  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. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  79. dnl Parse OPTIONS
  80. _LT_SET_OPTIONS([$0], [$1])
  81. # This can be used to rebuild libtool when needed
  82. LIBTOOL_DEPS="$ltmain"
  83. # Always use our own libtool.
  84. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  85. AC_SUBST(LIBTOOL)dnl
  86. _LT_SETUP
  87. # Only expand once:
  88. m4_define([LT_INIT])
  89. ])# LT_INIT
  90. # Old names:
  91. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  92. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  93. dnl aclocal-1.4 backwards compatibility:
  94. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  95. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  96. # _LT_CC_BASENAME(CC)
  97. # -------------------
  98. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  99. m4_defun([_LT_CC_BASENAME],
  100. [for cc_temp in $1""; do
  101. case $cc_temp in
  102. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  103. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  104. \-*) ;;
  105. *) break;;
  106. esac
  107. done
  108. cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  109. ])
  110. # _LT_FILEUTILS_DEFAULTS
  111. # ----------------------
  112. # It is okay to use these file commands and assume they have been set
  113. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  114. m4_defun([_LT_FILEUTILS_DEFAULTS],
  115. [: ${CP="cp -f"}
  116. : ${MV="mv -f"}
  117. : ${RM="rm -f"}
  118. ])# _LT_FILEUTILS_DEFAULTS
  119. # _LT_SETUP
  120. # ---------
  121. m4_defun([_LT_SETUP],
  122. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  123. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  124. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  125. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  126. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  127. dnl
  128. _LT_DECL([], [host_alias], [0], [The host system])dnl
  129. _LT_DECL([], [host], [0])dnl
  130. _LT_DECL([], [host_os], [0])dnl
  131. dnl
  132. _LT_DECL([], [build_alias], [0], [The build system])dnl
  133. _LT_DECL([], [build], [0])dnl
  134. _LT_DECL([], [build_os], [0])dnl
  135. dnl
  136. AC_REQUIRE([AC_PROG_CC])dnl
  137. AC_REQUIRE([LT_PATH_LD])dnl
  138. AC_REQUIRE([LT_PATH_NM])dnl
  139. dnl
  140. AC_REQUIRE([AC_PROG_LN_S])dnl
  141. test -z "$LN_S" && LN_S="ln -s"
  142. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  143. dnl
  144. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  145. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  146. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  147. dnl
  148. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  149. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  150. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  151. m4_require([_LT_CMD_RELOAD])dnl
  152. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  153. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  154. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  155. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  156. m4_require([_LT_WITH_SYSROOT])dnl
  157. _LT_CONFIG_LIBTOOL_INIT([
  158. # See if we are running on zsh, and set the options which allow our
  159. # commands through without removal of \ escapes INIT.
  160. if test -n "\${ZSH_VERSION+set}" ; then
  161. setopt NO_GLOB_SUBST
  162. fi
  163. ])
  164. if test -n "${ZSH_VERSION+set}" ; then
  165. setopt NO_GLOB_SUBST
  166. fi
  167. _LT_CHECK_OBJDIR
  168. m4_require([_LT_TAG_COMPILER])dnl
  169. case $host_os in
  170. aix3*)
  171. # AIX sometimes has problems with the GCC collect2 program. For some
  172. # reason, if we set the COLLECT_NAMES environment variable, the problems
  173. # vanish in a puff of smoke.
  174. if test "X${COLLECT_NAMES+set}" != Xset; then
  175. COLLECT_NAMES=
  176. export COLLECT_NAMES
  177. fi
  178. ;;
  179. esac
  180. # Global variables:
  181. ofile=libtool
  182. can_build_shared=yes
  183. # All known linkers require a `.a' archive for static linking (except MSVC,
  184. # which needs '.lib').
  185. libext=a
  186. with_gnu_ld="$lt_cv_prog_gnu_ld"
  187. old_CC="$CC"
  188. old_CFLAGS="$CFLAGS"
  189. # Set sane defaults for various variables
  190. test -z "$CC" && CC=cc
  191. test -z "$LTCC" && LTCC=$CC
  192. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  193. test -z "$LD" && LD=ld
  194. test -z "$ac_objext" && ac_objext=o
  195. _LT_CC_BASENAME([$compiler])
  196. # Only perform the check for file, if the check method requires it
  197. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  198. case $deplibs_check_method in
  199. file_magic*)
  200. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  201. _LT_PATH_MAGIC
  202. fi
  203. ;;
  204. esac
  205. # Use C for the default configuration in the libtool script
  206. LT_SUPPORTED_TAG([CC])
  207. _LT_LANG_C_CONFIG
  208. _LT_LANG_DEFAULT_CONFIG
  209. _LT_CONFIG_COMMANDS
  210. ])# _LT_SETUP
  211. # _LT_PREPARE_SED_QUOTE_VARS
  212. # --------------------------
  213. # Define a few sed substitution that help us do robust quoting.
  214. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  215. [# Backslashify metacharacters that are still active within
  216. # double-quoted strings.
  217. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  218. # Same as above, but do not quote variable references.
  219. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  220. # Sed substitution to delay expansion of an escaped shell variable in a
  221. # double_quote_subst'ed string.
  222. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  223. # Sed substitution to delay expansion of an escaped single quote.
  224. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  225. # Sed substitution to avoid accidental globbing in evaled expressions
  226. no_glob_subst='s/\*/\\\*/g'
  227. ])
  228. # _LT_PROG_LTMAIN
  229. # ---------------
  230. # Note that this code is called both from `configure', and `config.status'
  231. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  232. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  233. # so we pass a copy along to make sure it has a sensible value anyway.
  234. m4_defun([_LT_PROG_LTMAIN],
  235. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  236. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  237. ltmain="$ac_aux_dir/ltmain.sh"
  238. ])# _LT_PROG_LTMAIN
  239. ## ------------------------------------- ##
  240. ## Accumulate code for creating libtool. ##
  241. ## ------------------------------------- ##
  242. # So that we can recreate a full libtool script including additional
  243. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  244. # in macros and then make a single call at the end using the `libtool'
  245. # label.
  246. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  247. # ----------------------------------------
  248. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  249. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  250. [m4_ifval([$1],
  251. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  252. [$1
  253. ])])])
  254. # Initialize.
  255. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  256. # _LT_CONFIG_LIBTOOL([COMMANDS])
  257. # ------------------------------
  258. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  259. m4_define([_LT_CONFIG_LIBTOOL],
  260. [m4_ifval([$1],
  261. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  262. [$1
  263. ])])])
  264. # Initialize.
  265. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  266. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  267. # -----------------------------------------------------
  268. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  269. [_LT_CONFIG_LIBTOOL([$1])
  270. _LT_CONFIG_LIBTOOL_INIT([$2])
  271. ])
  272. # _LT_FORMAT_COMMENT([COMMENT])
  273. # -----------------------------
  274. # Add leading comment marks to the start of each line, and a trailing
  275. # full-stop to the whole comment if one is not present already.
  276. m4_define([_LT_FORMAT_COMMENT],
  277. [m4_ifval([$1], [
  278. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  279. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  280. )])
  281. ## ------------------------ ##
  282. ## FIXME: Eliminate VARNAME ##
  283. ## ------------------------ ##
  284. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  285. # -------------------------------------------------------------------
  286. # CONFIGNAME is the name given to the value in the libtool script.
  287. # VARNAME is the (base) name used in the configure script.
  288. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  289. # VARNAME. Any other value will be used directly.
  290. m4_define([_LT_DECL],
  291. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  292. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  293. [m4_ifval([$1], [$1], [$2])])
  294. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  295. m4_ifval([$4],
  296. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  297. lt_dict_add_subkey([lt_decl_dict], [$2],
  298. [tagged?], [m4_ifval([$5], [yes], [no])])])
  299. ])
  300. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  301. # --------------------------------------------------------
  302. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  303. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  304. # ------------------------------------------------
  305. m4_define([lt_decl_tag_varnames],
  306. [_lt_decl_filter([tagged?], [yes], $@)])
  307. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  308. # ---------------------------------------------------------
  309. m4_define([_lt_decl_filter],
  310. [m4_case([$#],
  311. [0], [m4_fatal([$0: too few arguments: $#])],
  312. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  313. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  314. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  315. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  316. ])
  317. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  318. # --------------------------------------------------
  319. m4_define([lt_decl_quote_varnames],
  320. [_lt_decl_filter([value], [1], $@)])
  321. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  322. # ---------------------------------------------------
  323. m4_define([lt_decl_dquote_varnames],
  324. [_lt_decl_filter([value], [2], $@)])
  325. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  326. # ---------------------------------------------------
  327. m4_define([lt_decl_varnames_tagged],
  328. [m4_assert([$# <= 2])dnl
  329. _$0(m4_quote(m4_default([$1], [[, ]])),
  330. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  331. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  332. m4_define([_lt_decl_varnames_tagged],
  333. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  334. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  335. # ------------------------------------------------
  336. m4_define([lt_decl_all_varnames],
  337. [_$0(m4_quote(m4_default([$1], [[, ]])),
  338. m4_if([$2], [],
  339. m4_quote(lt_decl_varnames),
  340. m4_quote(m4_shift($@))))[]dnl
  341. ])
  342. m4_define([_lt_decl_all_varnames],
  343. [lt_join($@, lt_decl_varnames_tagged([$1],
  344. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  345. ])
  346. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  347. # ------------------------------------
  348. # Quote a variable value, and forward it to `config.status' so that its
  349. # declaration there will have the same value as in `configure'. VARNAME
  350. # must have a single quote delimited value for this to work.
  351. m4_define([_LT_CONFIG_STATUS_DECLARE],
  352. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  353. # _LT_CONFIG_STATUS_DECLARATIONS
  354. # ------------------------------
  355. # We delimit libtool config variables with single quotes, so when
  356. # we write them to config.status, we have to be sure to quote all
  357. # embedded single quotes properly. In configure, this macro expands
  358. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  359. #
  360. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  361. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  362. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  363. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  364. # _LT_LIBTOOL_TAGS
  365. # ----------------
  366. # Output comment and list of tags supported by the script
  367. m4_defun([_LT_LIBTOOL_TAGS],
  368. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  369. available_tags="_LT_TAGS"dnl
  370. ])
  371. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  372. # -----------------------------------
  373. # Extract the dictionary values for VARNAME (optionally with TAG) and
  374. # expand to a commented shell variable setting:
  375. #
  376. # # Some comment about what VAR is for.
  377. # visible_name=$lt_internal_name
  378. m4_define([_LT_LIBTOOL_DECLARE],
  379. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  380. [description])))[]dnl
  381. m4_pushdef([_libtool_name],
  382. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  383. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  384. [0], [_libtool_name=[$]$1],
  385. [1], [_libtool_name=$lt_[]$1],
  386. [2], [_libtool_name=$lt_[]$1],
  387. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  388. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  389. ])
  390. # _LT_LIBTOOL_CONFIG_VARS
  391. # -----------------------
  392. # Produce commented declarations of non-tagged libtool config variables
  393. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  394. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  395. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  396. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  397. [m4_foreach([_lt_var],
  398. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  399. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  400. # _LT_LIBTOOL_TAG_VARS(TAG)
  401. # -------------------------
  402. m4_define([_LT_LIBTOOL_TAG_VARS],
  403. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  404. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  405. # _LT_TAGVAR(VARNAME, [TAGNAME])
  406. # ------------------------------
  407. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  408. # _LT_CONFIG_COMMANDS
  409. # -------------------
  410. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  411. # variables for single and double quote escaping we saved from calls
  412. # to _LT_DECL, we can put quote escaped variables declarations
  413. # into `config.status', and then the shell code to quote escape them in
  414. # for loops in `config.status'. Finally, any additional code accumulated
  415. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  416. m4_defun([_LT_CONFIG_COMMANDS],
  417. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  418. dnl If the libtool generation code has been placed in $CONFIG_LT,
  419. dnl instead of duplicating it all over again into config.status,
  420. dnl then we will have config.status run $CONFIG_LT later, so it
  421. dnl needs to know what name is stored there:
  422. [AC_CONFIG_COMMANDS([libtool],
  423. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  424. dnl If the libtool generation code is destined for config.status,
  425. dnl expand the accumulated commands and init code now:
  426. [AC_CONFIG_COMMANDS([libtool],
  427. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  428. ])#_LT_CONFIG_COMMANDS
  429. # Initialize.
  430. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  431. [
  432. # The HP-UX ksh and POSIX shell print the target directory to stdout
  433. # if CDPATH is set.
  434. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  435. sed_quote_subst='$sed_quote_subst'
  436. double_quote_subst='$double_quote_subst'
  437. delay_variable_subst='$delay_variable_subst'
  438. _LT_CONFIG_STATUS_DECLARATIONS
  439. LTCC='$LTCC'
  440. LTCFLAGS='$LTCFLAGS'
  441. compiler='$compiler_DEFAULT'
  442. # A function that is used when there is no print builtin or printf.
  443. func_fallback_echo ()
  444. {
  445. eval 'cat <<_LTECHO_EOF
  446. \$[]1
  447. _LTECHO_EOF'
  448. }
  449. # Quote evaled strings.
  450. for var in lt_decl_all_varnames([[ \
  451. ]], lt_decl_quote_varnames); do
  452. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  453. *[[\\\\\\\`\\"\\\$]]*)
  454. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  455. ;;
  456. *)
  457. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  458. ;;
  459. esac
  460. done
  461. # Double-quote double-evaled strings.
  462. for var in lt_decl_all_varnames([[ \
  463. ]], lt_decl_dquote_varnames); do
  464. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  465. *[[\\\\\\\`\\"\\\$]]*)
  466. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  467. ;;
  468. *)
  469. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  470. ;;
  471. esac
  472. done
  473. _LT_OUTPUT_LIBTOOL_INIT
  474. ])
  475. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  476. # ------------------------------------
  477. # Generate a child script FILE with all initialization necessary to
  478. # reuse the environment learned by the parent script, and make the
  479. # file executable. If COMMENT is supplied, it is inserted after the
  480. # `#!' sequence but before initialization text begins. After this
  481. # macro, additional text can be appended to FILE to form the body of
  482. # the child script. The macro ends with non-zero status if the
  483. # file could not be fully written (such as if the disk is full).
  484. m4_ifdef([AS_INIT_GENERATED],
  485. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  486. [m4_defun([_LT_GENERATED_FILE_INIT],
  487. [m4_require([AS_PREPARE])]dnl
  488. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  489. [lt_write_fail=0
  490. cat >$1 <<_ASEOF || lt_write_fail=1
  491. #! $SHELL
  492. # Generated by $as_me.
  493. $2
  494. SHELL=\${CONFIG_SHELL-$SHELL}
  495. export SHELL
  496. _ASEOF
  497. cat >>$1 <<\_ASEOF || lt_write_fail=1
  498. AS_SHELL_SANITIZE
  499. _AS_PREPARE
  500. exec AS_MESSAGE_FD>&1
  501. _ASEOF
  502. test $lt_write_fail = 0 && chmod +x $1[]dnl
  503. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  504. # LT_OUTPUT
  505. # ---------
  506. # This macro allows early generation of the libtool script (before
  507. # AC_OUTPUT is called), incase it is used in configure for compilation
  508. # tests.
  509. AC_DEFUN([LT_OUTPUT],
  510. [: ${CONFIG_LT=./config.lt}
  511. AC_MSG_NOTICE([creating $CONFIG_LT])
  512. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  513. [# Run this file to recreate a libtool stub with the current configuration.])
  514. cat >>"$CONFIG_LT" <<\_LTEOF
  515. lt_cl_silent=false
  516. exec AS_MESSAGE_LOG_FD>>config.log
  517. {
  518. echo
  519. AS_BOX([Running $as_me.])
  520. } >&AS_MESSAGE_LOG_FD
  521. lt_cl_help="\
  522. \`$as_me' creates a local libtool stub from the current configuration,
  523. for use in further configure time tests before the real libtool is
  524. generated.
  525. Usage: $[0] [[OPTIONS]]
  526. -h, --help print this help, then exit
  527. -V, --version print version number, then exit
  528. -q, --quiet do not print progress messages
  529. -d, --debug don't remove temporary files
  530. Report bugs to <bug-libtool@gnu.org>."
  531. lt_cl_version="\
  532. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  533. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  534. configured by $[0], generated by m4_PACKAGE_STRING.
  535. Copyright (C) 2011 Free Software Foundation, Inc.
  536. This config.lt script is free software; the Free Software Foundation
  537. gives unlimited permision to copy, distribute and modify it."
  538. while test $[#] != 0
  539. do
  540. case $[1] in
  541. --version | --v* | -V )
  542. echo "$lt_cl_version"; exit 0 ;;
  543. --help | --h* | -h )
  544. echo "$lt_cl_help"; exit 0 ;;
  545. --debug | --d* | -d )
  546. debug=: ;;
  547. --quiet | --q* | --silent | --s* | -q )
  548. lt_cl_silent=: ;;
  549. -*) AC_MSG_ERROR([unrecognized option: $[1]
  550. Try \`$[0] --help' for more information.]) ;;
  551. *) AC_MSG_ERROR([unrecognized argument: $[1]
  552. Try \`$[0] --help' for more information.]) ;;
  553. esac
  554. shift
  555. done
  556. if $lt_cl_silent; then
  557. exec AS_MESSAGE_FD>/dev/null
  558. fi
  559. _LTEOF
  560. cat >>"$CONFIG_LT" <<_LTEOF
  561. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  562. _LTEOF
  563. cat >>"$CONFIG_LT" <<\_LTEOF
  564. AC_MSG_NOTICE([creating $ofile])
  565. _LT_OUTPUT_LIBTOOL_COMMANDS
  566. AS_EXIT(0)
  567. _LTEOF
  568. chmod +x "$CONFIG_LT"
  569. # configure is writing to config.log, but config.lt does its own redirection,
  570. # appending to config.log, which fails on DOS, as config.log is still kept
  571. # open by configure. Here we exec the FD to /dev/null, effectively closing
  572. # config.log, so it can be properly (re)opened and appended to by config.lt.
  573. lt_cl_success=:
  574. test "$silent" = yes &&
  575. lt_config_lt_args="$lt_config_lt_args --quiet"
  576. exec AS_MESSAGE_LOG_FD>/dev/null
  577. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  578. exec AS_MESSAGE_LOG_FD>>config.log
  579. $lt_cl_success || AS_EXIT(1)
  580. ])# LT_OUTPUT
  581. # _LT_CONFIG(TAG)
  582. # ---------------
  583. # If TAG is the built-in tag, create an initial libtool script with a
  584. # default configuration from the untagged config vars. Otherwise add code
  585. # to config.status for appending the configuration named by TAG from the
  586. # matching tagged config vars.
  587. m4_defun([_LT_CONFIG],
  588. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  589. _LT_CONFIG_SAVE_COMMANDS([
  590. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  591. m4_if(_LT_TAG, [C], [
  592. # See if we are running on zsh, and set the options which allow our
  593. # commands through without removal of \ escapes.
  594. if test -n "${ZSH_VERSION+set}" ; then
  595. setopt NO_GLOB_SUBST
  596. fi
  597. cfgfile="${ofile}T"
  598. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  599. $RM "$cfgfile"
  600. cat <<_LT_EOF >> "$cfgfile"
  601. #! $SHELL
  602. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  603. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  604. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  605. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  606. #
  607. _LT_COPYING
  608. _LT_LIBTOOL_TAGS
  609. # ### BEGIN LIBTOOL CONFIG
  610. _LT_LIBTOOL_CONFIG_VARS
  611. _LT_LIBTOOL_TAG_VARS
  612. # ### END LIBTOOL CONFIG
  613. _LT_EOF
  614. case $host_os in
  615. aix3*)
  616. cat <<\_LT_EOF >> "$cfgfile"
  617. # AIX sometimes has problems with the GCC collect2 program. For some
  618. # reason, if we set the COLLECT_NAMES environment variable, the problems
  619. # vanish in a puff of smoke.
  620. if test "X${COLLECT_NAMES+set}" != Xset; then
  621. COLLECT_NAMES=
  622. export COLLECT_NAMES
  623. fi
  624. _LT_EOF
  625. ;;
  626. esac
  627. _LT_PROG_LTMAIN
  628. # We use sed instead of cat because bash on DJGPP gets confused if
  629. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  630. # text mode, it properly converts lines to CR/LF. This bash problem
  631. # is reportedly fixed, but why not run on old versions too?
  632. sed '$q' "$ltmain" >> "$cfgfile" \
  633. || (rm -f "$cfgfile"; exit 1)
  634. _LT_PROG_REPLACE_SHELLFNS
  635. mv -f "$cfgfile" "$ofile" ||
  636. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  637. chmod +x "$ofile"
  638. ],
  639. [cat <<_LT_EOF >> "$ofile"
  640. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  641. dnl in a comment (ie after a #).
  642. # ### BEGIN LIBTOOL TAG CONFIG: $1
  643. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  644. # ### END LIBTOOL TAG CONFIG: $1
  645. _LT_EOF
  646. ])dnl /m4_if
  647. ],
  648. [m4_if([$1], [], [
  649. PACKAGE='$PACKAGE'
  650. VERSION='$VERSION'
  651. TIMESTAMP='$TIMESTAMP'
  652. RM='$RM'
  653. ofile='$ofile'], [])
  654. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  655. ])# _LT_CONFIG
  656. # LT_SUPPORTED_TAG(TAG)
  657. # ---------------------
  658. # Trace this macro to discover what tags are supported by the libtool
  659. # --tag option, using:
  660. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  661. AC_DEFUN([LT_SUPPORTED_TAG], [])
  662. # C support is built-in for now
  663. m4_define([_LT_LANG_C_enabled], [])
  664. m4_define([_LT_TAGS], [])
  665. # LT_LANG(LANG)
  666. # -------------
  667. # Enable libtool support for the given language if not already enabled.
  668. AC_DEFUN([LT_LANG],
  669. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  670. m4_case([$1],
  671. [C], [_LT_LANG(C)],
  672. [C++], [_LT_LANG(CXX)],
  673. [Go], [_LT_LANG(GO)],
  674. [Java], [_LT_LANG(GCJ)],
  675. [Fortran 77], [_LT_LANG(F77)],
  676. [Fortran], [_LT_LANG(FC)],
  677. [Windows Resource], [_LT_LANG(RC)],
  678. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  679. [_LT_LANG($1)],
  680. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  681. ])# LT_LANG
  682. # _LT_LANG(LANGNAME)
  683. # ------------------
  684. m4_defun([_LT_LANG],
  685. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  686. [LT_SUPPORTED_TAG([$1])dnl
  687. m4_append([_LT_TAGS], [$1 ])dnl
  688. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  689. _LT_LANG_$1_CONFIG($1)])dnl
  690. ])# _LT_LANG
  691. m4_ifndef([AC_PROG_GO], [
  692. ############################################################
  693. # NOTE: This macro has been submitted for inclusion into #
  694. # GNU Autoconf as AC_PROG_GO. When it is available in #
  695. # a released version of Autoconf we should remove this #
  696. # macro and use it instead. #
  697. ############################################################
  698. m4_defun([AC_PROG_GO],
  699. [AC_LANG_PUSH(Go)dnl
  700. AC_ARG_VAR([GOC], [Go compiler command])dnl
  701. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  702. _AC_ARG_VAR_LDFLAGS()dnl
  703. AC_CHECK_TOOL(GOC, gccgo)
  704. if test -z "$GOC"; then
  705. if test -n "$ac_tool_prefix"; then
  706. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  707. fi
  708. fi
  709. if test -z "$GOC"; then
  710. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  711. fi
  712. ])#m4_defun
  713. ])#m4_ifndef
  714. # _LT_LANG_DEFAULT_CONFIG
  715. # -----------------------
  716. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  717. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  718. [LT_LANG(CXX)],
  719. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  720. AC_PROVIDE_IFELSE([AC_PROG_F77],
  721. [LT_LANG(F77)],
  722. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  723. AC_PROVIDE_IFELSE([AC_PROG_FC],
  724. [LT_LANG(FC)],
  725. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  726. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  727. dnl pulling things in needlessly.
  728. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  729. [LT_LANG(GCJ)],
  730. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  731. [LT_LANG(GCJ)],
  732. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  733. [LT_LANG(GCJ)],
  734. [m4_ifdef([AC_PROG_GCJ],
  735. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  736. m4_ifdef([A][M_PROG_GCJ],
  737. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  738. m4_ifdef([LT_PROG_GCJ],
  739. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  740. AC_PROVIDE_IFELSE([AC_PROG_GO],
  741. [LT_LANG(GO)],
  742. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  743. AC_PROVIDE_IFELSE([LT_PROG_RC],
  744. [LT_LANG(RC)],
  745. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  746. ])# _LT_LANG_DEFAULT_CONFIG
  747. # Obsolete macros:
  748. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  749. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  750. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  751. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  752. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  753. dnl aclocal-1.4 backwards compatibility:
  754. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  755. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  756. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  757. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  758. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  759. # _LT_TAG_COMPILER
  760. # ----------------
  761. m4_defun([_LT_TAG_COMPILER],
  762. [AC_REQUIRE([AC_PROG_CC])dnl
  763. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  764. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  765. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  766. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  767. # If no C compiler was specified, use CC.
  768. LTCC=${LTCC-"$CC"}
  769. # If no C compiler flags were specified, use CFLAGS.
  770. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  771. # Allow CC to be a program name with arguments.
  772. compiler=$CC
  773. ])# _LT_TAG_COMPILER
  774. # _LT_COMPILER_BOILERPLATE
  775. # ------------------------
  776. # Check for compiler boilerplate output or warnings with
  777. # the simple compiler test code.
  778. m4_defun([_LT_COMPILER_BOILERPLATE],
  779. [m4_require([_LT_DECL_SED])dnl
  780. ac_outfile=conftest.$ac_objext
  781. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  782. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  783. _lt_compiler_boilerplate=`cat conftest.err`
  784. $RM conftest*
  785. ])# _LT_COMPILER_BOILERPLATE
  786. # _LT_LINKER_BOILERPLATE
  787. # ----------------------
  788. # Check for linker boilerplate output or warnings with
  789. # the simple link test code.
  790. m4_defun([_LT_LINKER_BOILERPLATE],
  791. [m4_require([_LT_DECL_SED])dnl
  792. ac_outfile=conftest.$ac_objext
  793. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  794. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  795. _lt_linker_boilerplate=`cat conftest.err`
  796. $RM -r conftest*
  797. ])# _LT_LINKER_BOILERPLATE
  798. # _LT_REQUIRED_DARWIN_CHECKS
  799. # -------------------------
  800. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  801. case $host_os in
  802. rhapsody* | darwin*)
  803. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  804. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  805. AC_CHECK_TOOL([LIPO], [lipo], [:])
  806. AC_CHECK_TOOL([OTOOL], [otool], [:])
  807. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  808. _LT_DECL([], [DSYMUTIL], [1],
  809. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  810. _LT_DECL([], [NMEDIT], [1],
  811. [Tool to change global to local symbols on Mac OS X])
  812. _LT_DECL([], [LIPO], [1],
  813. [Tool to manipulate fat objects and archives on Mac OS X])
  814. _LT_DECL([], [OTOOL], [1],
  815. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  816. _LT_DECL([], [OTOOL64], [1],
  817. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  818. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  819. [lt_cv_apple_cc_single_mod=no
  820. if test -z "${LT_MULTI_MODULE}"; then
  821. # By default we will add the -single_module flag. You can override
  822. # by either setting the environment variable LT_MULTI_MODULE
  823. # non-empty at configure time, or by adding -multi_module to the
  824. # link flags.
  825. rm -rf libconftest.dylib*
  826. echo "int foo(void){return 1;}" > conftest.c
  827. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  828. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  829. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  830. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  831. _lt_result=$?
  832. # If there is a non-empty error log, and "single_module"
  833. # appears in it, assume the flag caused a linker warning
  834. if test -s conftest.err && $GREP single_module conftest.err; then
  835. cat conftest.err >&AS_MESSAGE_LOG_FD
  836. # Otherwise, if the output was created with a 0 exit code from
  837. # the compiler, it worked.
  838. elif test -f libconftest.dylib && test $_lt_result -eq 0; then
  839. lt_cv_apple_cc_single_mod=yes
  840. else
  841. cat conftest.err >&AS_MESSAGE_LOG_FD
  842. fi
  843. rm -rf libconftest.dylib*
  844. rm -f conftest.*
  845. fi])
  846. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  847. [lt_cv_ld_exported_symbols_list],
  848. [lt_cv_ld_exported_symbols_list=no
  849. save_LDFLAGS=$LDFLAGS
  850. echo "_main" > conftest.sym
  851. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  852. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  853. [lt_cv_ld_exported_symbols_list=yes],
  854. [lt_cv_ld_exported_symbols_list=no])
  855. LDFLAGS="$save_LDFLAGS"
  856. ])
  857. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  858. [lt_cv_ld_force_load=no
  859. cat > conftest.c << _LT_EOF
  860. int forced_loaded() { return 2;}
  861. _LT_EOF
  862. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  863. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  864. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  865. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  866. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  867. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  868. cat > conftest.c << _LT_EOF
  869. int main() { return 0;}
  870. _LT_EOF
  871. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  872. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  873. _lt_result=$?
  874. if test -s conftest.err && $GREP force_load conftest.err; then
  875. cat conftest.err >&AS_MESSAGE_LOG_FD
  876. elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
  877. lt_cv_ld_force_load=yes
  878. else
  879. cat conftest.err >&AS_MESSAGE_LOG_FD
  880. fi
  881. rm -f conftest.err libconftest.a conftest conftest.c
  882. rm -rf conftest.dSYM
  883. ])
  884. case $host_os in
  885. rhapsody* | darwin1.[[012]])
  886. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  887. darwin1.*)
  888. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  889. darwin*) # darwin 5.x on
  890. # if running on 10.5 or later, the deployment target defaults
  891. # to the OS version, if on x86, and 10.4, the deployment
  892. # target defaults to 10.4. Don't you love it?
  893. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  894. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  895. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  896. 10.[[012]]*)
  897. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  898. 10.*)
  899. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  900. esac
  901. ;;
  902. esac
  903. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  904. _lt_dar_single_mod='$single_module'
  905. fi
  906. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  907. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  908. else
  909. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  910. fi
  911. if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  912. _lt_dsymutil='~$DSYMUTIL $lib || :'
  913. else
  914. _lt_dsymutil=
  915. fi
  916. ;;
  917. esac
  918. ])
  919. # _LT_DARWIN_LINKER_FEATURES([TAG])
  920. # ---------------------------------
  921. # Checks for linker and compiler features on darwin
  922. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  923. [
  924. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  925. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  926. _LT_TAGVAR(hardcode_direct, $1)=no
  927. _LT_TAGVAR(hardcode_automatic, $1)=yes
  928. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  929. if test "$lt_cv_ld_force_load" = "yes"; then
  930. _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\"`'
  931. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  932. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  933. else
  934. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  935. fi
  936. _LT_TAGVAR(link_all_deplibs, $1)=yes
  937. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  938. case $cc_basename in
  939. ifort*) _lt_dar_can_shared=yes ;;
  940. *) _lt_dar_can_shared=$GCC ;;
  941. esac
  942. if test "$_lt_dar_can_shared" = "yes"; then
  943. output_verbose_link_cmd=func_echo_all
  944. _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}"
  945. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  946. _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}"
  947. _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}"
  948. m4_if([$1], [CXX],
  949. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  950. _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}"
  951. _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}"
  952. fi
  953. ],[])
  954. else
  955. _LT_TAGVAR(ld_shlibs, $1)=no
  956. fi
  957. ])
  958. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  959. # ----------------------------------
  960. # Links a minimal program and checks the executable
  961. # for the system default hardcoded library path. In most cases,
  962. # this is /usr/lib:/lib, but when the MPI compilers are used
  963. # the location of the communication and MPI libs are included too.
  964. # If we don't find anything, use the default library path according
  965. # to the aix ld manual.
  966. # Store the results from the different compilers for each TAGNAME.
  967. # Allow to override them for all tags through lt_cv_aix_libpath.
  968. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  969. [m4_require([_LT_DECL_SED])dnl
  970. if test "${lt_cv_aix_libpath+set}" = set; then
  971. aix_libpath=$lt_cv_aix_libpath
  972. else
  973. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  974. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  975. lt_aix_libpath_sed='[
  976. /Import File Strings/,/^$/ {
  977. /^0/ {
  978. s/^0 *\([^ ]*\) *$/\1/
  979. p
  980. }
  981. }]'
  982. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  983. # Check for a 64-bit object if we didn't find anything.
  984. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  985. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  986. fi],[])
  987. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  988. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
  989. fi
  990. ])
  991. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  992. fi
  993. ])# _LT_SYS_MODULE_PATH_AIX
  994. # _LT_SHELL_INIT(ARG)
  995. # -------------------
  996. m4_define([_LT_SHELL_INIT],
  997. [m4_divert_text([M4SH-INIT], [$1
  998. ])])# _LT_SHELL_INIT
  999. # _LT_PROG_ECHO_BACKSLASH
  1000. # -----------------------
  1001. # Find how we can fake an echo command that does not interpret backslash.
  1002. # In particular, with Autoconf 2.60 or later we add some code to the start
  1003. # of the generated configure script which will find a shell with a builtin
  1004. # printf (which we can use as an echo command).
  1005. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1006. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1007. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1008. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1009. AC_MSG_CHECKING([how to print strings])
  1010. # Test print first, because it will be a builtin if present.
  1011. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1012. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1013. ECHO='print -r --'
  1014. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1015. ECHO='printf %s\n'
  1016. else
  1017. # Use this function as a fallback that always works.
  1018. func_fallback_echo ()
  1019. {
  1020. eval 'cat <<_LTECHO_EOF
  1021. $[]1
  1022. _LTECHO_EOF'
  1023. }
  1024. ECHO='func_fallback_echo'
  1025. fi
  1026. # func_echo_all arg...
  1027. # Invoke $ECHO with all args, space-separated.
  1028. func_echo_all ()
  1029. {
  1030. $ECHO "$*"
  1031. }
  1032. case "$ECHO" in
  1033. printf*) AC_MSG_RESULT([printf]) ;;
  1034. print*) AC_MSG_RESULT([print -r]) ;;
  1035. *) AC_MSG_RESULT([cat]) ;;
  1036. esac
  1037. m4_ifdef([_AS_DETECT_SUGGESTED],
  1038. [_AS_DETECT_SUGGESTED([
  1039. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1040. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1041. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1042. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1043. PATH=/empty FPATH=/empty; export PATH FPATH
  1044. test "X`printf %s $ECHO`" = "X$ECHO" \
  1045. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1046. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1047. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1048. ])# _LT_PROG_ECHO_BACKSLASH
  1049. # _LT_WITH_SYSROOT
  1050. # ----------------
  1051. AC_DEFUN([_LT_WITH_SYSROOT],
  1052. [AC_MSG_CHECKING([for sysroot])
  1053. AC_ARG_WITH([sysroot],
  1054. [ --with-sysroot[=DIR] Search for dependent libraries within DIR
  1055. (or the compiler's sysroot if not specified).],
  1056. [], [with_sysroot=no])
  1057. dnl lt_sysroot will always be passed unquoted. We quote it here
  1058. dnl in case the user passed a directory name.
  1059. lt_sysroot=
  1060. case ${with_sysroot} in #(
  1061. yes)
  1062. if test "$GCC" = yes; then
  1063. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1064. fi
  1065. ;; #(
  1066. /*)
  1067. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1068. ;; #(
  1069. no|'')
  1070. ;; #(
  1071. *)
  1072. AC_MSG_RESULT([${with_sysroot}])
  1073. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1074. ;;
  1075. esac
  1076. AC_MSG_RESULT([${lt_sysroot:-no}])
  1077. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1078. [dependent libraries, and in which our libraries should be installed.])])
  1079. # _LT_ENABLE_LOCK
  1080. # ---------------
  1081. m4_defun([_LT_ENABLE_LOCK],
  1082. [AC_ARG_ENABLE([libtool-lock],
  1083. [AS_HELP_STRING([--disable-libtool-lock],
  1084. [avoid locking (might break parallel builds)])])
  1085. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1086. # Some flags need to be propagated to the compiler or linker for good
  1087. # libtool support.
  1088. case $host in
  1089. ia64-*-hpux*)
  1090. # Find out which ABI we are using.
  1091. echo 'int i;' > conftest.$ac_ext
  1092. if AC_TRY_EVAL(ac_compile); then
  1093. case `/usr/bin/file conftest.$ac_objext` in
  1094. *ELF-32*)
  1095. HPUX_IA64_MODE="32"
  1096. ;;
  1097. *ELF-64*)
  1098. HPUX_IA64_MODE="64"
  1099. ;;
  1100. esac
  1101. fi
  1102. rm -rf conftest*
  1103. ;;
  1104. *-*-irix6*)
  1105. # Find out which ABI we are using.
  1106. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1107. if AC_TRY_EVAL(ac_compile); then
  1108. if test "$lt_cv_prog_gnu_ld" = yes; then
  1109. case `/usr/bin/file conftest.$ac_objext` in
  1110. *32-bit*)
  1111. LD="${LD-ld} -melf32bsmip"
  1112. ;;
  1113. *N32*)
  1114. LD="${LD-ld} -melf32bmipn32"
  1115. ;;
  1116. *64-bit*)
  1117. LD="${LD-ld} -melf64bmip"
  1118. ;;
  1119. esac
  1120. else
  1121. case `/usr/bin/file conftest.$ac_objext` in
  1122. *32-bit*)
  1123. LD="${LD-ld} -32"
  1124. ;;
  1125. *N32*)
  1126. LD="${LD-ld} -n32"
  1127. ;;
  1128. *64-bit*)
  1129. LD="${LD-ld} -64"
  1130. ;;
  1131. esac
  1132. fi
  1133. fi
  1134. rm -rf conftest*
  1135. ;;
  1136. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1137. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1138. # Find out which ABI we are using.
  1139. echo 'int i;' > conftest.$ac_ext
  1140. if AC_TRY_EVAL(ac_compile); then
  1141. case `/usr/bin/file conftest.o` in
  1142. *32-bit*)
  1143. case $host in
  1144. x86_64-*kfreebsd*-gnu)
  1145. LD="${LD-ld} -m elf_i386_fbsd"
  1146. ;;
  1147. x86_64-*linux*)
  1148. LD="${LD-ld} -m elf_i386"
  1149. ;;
  1150. ppc64-*linux*|powerpc64-*linux*)
  1151. LD="${LD-ld} -m elf32ppclinux"
  1152. ;;
  1153. s390x-*linux*)
  1154. LD="${LD-ld} -m elf_s390"
  1155. ;;
  1156. sparc64-*linux*)
  1157. LD="${LD-ld} -m elf32_sparc"
  1158. ;;
  1159. esac
  1160. ;;
  1161. *64-bit*)
  1162. case $host in
  1163. x86_64-*kfreebsd*-gnu)
  1164. LD="${LD-ld} -m elf_x86_64_fbsd"
  1165. ;;
  1166. x86_64-*linux*)
  1167. LD="${LD-ld} -m elf_x86_64"
  1168. ;;
  1169. ppc*-*linux*|powerpc*-*linux*)
  1170. LD="${LD-ld} -m elf64ppc"
  1171. ;;
  1172. s390*-*linux*|s390*-*tpf*)
  1173. LD="${LD-ld} -m elf64_s390"
  1174. ;;
  1175. sparc*-*linux*)
  1176. LD="${LD-ld} -m elf64_sparc"
  1177. ;;
  1178. esac
  1179. ;;
  1180. esac
  1181. fi
  1182. rm -rf conftest*
  1183. ;;
  1184. *-*-sco3.2v5*)
  1185. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1186. SAVE_CFLAGS="$CFLAGS"
  1187. CFLAGS="$CFLAGS -belf"
  1188. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1189. [AC_LANG_PUSH(C)
  1190. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1191. AC_LANG_POP])
  1192. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1193. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1194. CFLAGS="$SAVE_CFLAGS"
  1195. fi
  1196. ;;
  1197. *-*solaris*)
  1198. # Find out which ABI we are using.
  1199. echo 'int i;' > conftest.$ac_ext
  1200. if AC_TRY_EVAL(ac_compile); then
  1201. case `/usr/bin/file conftest.o` in
  1202. *64-bit*)
  1203. case $lt_cv_prog_gnu_ld in
  1204. yes*)
  1205. case $host in
  1206. i?86-*-solaris*)
  1207. LD="${LD-ld} -m elf_x86_64"
  1208. ;;
  1209. sparc*-*-solaris*)
  1210. LD="${LD-ld} -m elf64_sparc"
  1211. ;;
  1212. esac
  1213. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1214. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1215. LD="${LD-ld}_sol2"
  1216. fi
  1217. ;;
  1218. *)
  1219. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1220. LD="${LD-ld} -64"
  1221. fi
  1222. ;;
  1223. esac
  1224. ;;
  1225. esac
  1226. fi
  1227. rm -rf conftest*
  1228. ;;
  1229. esac
  1230. need_locks="$enable_libtool_lock"
  1231. ])# _LT_ENABLE_LOCK
  1232. # _LT_PROG_AR
  1233. # -----------
  1234. m4_defun([_LT_PROG_AR],
  1235. [AC_CHECK_TOOLS(AR, [ar], false)
  1236. : ${AR=ar}
  1237. : ${AR_FLAGS=cru}
  1238. _LT_DECL([], [AR], [1], [The archiver])
  1239. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1240. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1241. [lt_cv_ar_at_file=no
  1242. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1243. [echo conftest.$ac_objext > conftest.lst
  1244. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1245. AC_TRY_EVAL([lt_ar_try])
  1246. if test "$ac_status" -eq 0; then
  1247. # Ensure the archiver fails upon bogus file names.
  1248. rm -f conftest.$ac_objext libconftest.a
  1249. AC_TRY_EVAL([lt_ar_try])
  1250. if test "$ac_status" -ne 0; then
  1251. lt_cv_ar_at_file=@
  1252. fi
  1253. fi
  1254. rm -f conftest.* libconftest.a
  1255. ])
  1256. ])
  1257. if test "x$lt_cv_ar_at_file" = xno; then
  1258. archiver_list_spec=
  1259. else
  1260. archiver_list_spec=$lt_cv_ar_at_file
  1261. fi
  1262. _LT_DECL([], [archiver_list_spec], [1],
  1263. [How to feed a file listing to the archiver])
  1264. ])# _LT_PROG_AR
  1265. # _LT_CMD_OLD_ARCHIVE
  1266. # -------------------
  1267. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1268. [_LT_PROG_AR
  1269. AC_CHECK_TOOL(STRIP, strip, :)
  1270. test -z "$STRIP" && STRIP=:
  1271. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1272. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1273. test -z "$RANLIB" && RANLIB=:
  1274. _LT_DECL([], [RANLIB], [1],
  1275. [Commands used to install an old-style archive])
  1276. # Determine commands to create old-style static archives.
  1277. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1278. old_postinstall_cmds='chmod 644 $oldlib'
  1279. old_postuninstall_cmds=
  1280. if test -n "$RANLIB"; then
  1281. case $host_os in
  1282. openbsd*)
  1283. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1284. ;;
  1285. *)
  1286. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1287. ;;
  1288. esac
  1289. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1290. fi
  1291. case $host_os in
  1292. darwin*)
  1293. lock_old_archive_extraction=yes ;;
  1294. *)
  1295. lock_old_archive_extraction=no ;;
  1296. esac
  1297. _LT_DECL([], [old_postinstall_cmds], [2])
  1298. _LT_DECL([], [old_postuninstall_cmds], [2])
  1299. _LT_TAGDECL([], [old_archive_cmds], [2],
  1300. [Commands used to build an old-style archive])
  1301. _LT_DECL([], [lock_old_archive_extraction], [0],
  1302. [Whether to use a lock for old archive extraction])
  1303. ])# _LT_CMD_OLD_ARCHIVE
  1304. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1305. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1306. # ----------------------------------------------------------------
  1307. # Check whether the given compiler option works
  1308. AC_DEFUN([_LT_COMPILER_OPTION],
  1309. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1310. m4_require([_LT_DECL_SED])dnl
  1311. AC_CACHE_CHECK([$1], [$2],
  1312. [$2=no
  1313. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1314. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1315. lt_compiler_flag="$3"
  1316. # Insert the option either (1) after the last *FLAGS variable, or
  1317. # (2) before a word containing "conftest.", or (3) at the end.
  1318. # Note that $ac_compile itself does not contain backslashes and begins
  1319. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1320. # The option is referenced via a variable to avoid confusing sed.
  1321. lt_compile=`echo "$ac_compile" | $SED \
  1322. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1323. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1324. -e 's:$: $lt_compiler_flag:'`
  1325. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1326. (eval "$lt_compile" 2>conftest.err)
  1327. ac_status=$?
  1328. cat conftest.err >&AS_MESSAGE_LOG_FD
  1329. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1330. if (exit $ac_status) && test -s "$ac_outfile"; then
  1331. # The compiler can only warn and ignore the option if not recognized
  1332. # So say no if there are warnings other than the usual output.
  1333. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1334. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1335. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1336. $2=yes
  1337. fi
  1338. fi
  1339. $RM conftest*
  1340. ])
  1341. if test x"[$]$2" = xyes; then
  1342. m4_if([$5], , :, [$5])
  1343. else
  1344. m4_if([$6], , :, [$6])
  1345. fi
  1346. ])# _LT_COMPILER_OPTION
  1347. # Old name:
  1348. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1349. dnl aclocal-1.4 backwards compatibility:
  1350. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1351. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1352. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1353. # ----------------------------------------------------
  1354. # Check whether the given linker option works
  1355. AC_DEFUN([_LT_LINKER_OPTION],
  1356. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1357. m4_require([_LT_DECL_SED])dnl
  1358. AC_CACHE_CHECK([$1], [$2],
  1359. [$2=no
  1360. save_LDFLAGS="$LDFLAGS"
  1361. LDFLAGS="$LDFLAGS $3"
  1362. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1363. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1364. # The linker can only warn and ignore the option if not recognized
  1365. # So say no if there are warnings
  1366. if test -s conftest.err; then
  1367. # Append any errors to the config.log.
  1368. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1369. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1370. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1371. if diff conftest.exp conftest.er2 >/dev/null; then
  1372. $2=yes
  1373. fi
  1374. else
  1375. $2=yes
  1376. fi
  1377. fi
  1378. $RM -r conftest*
  1379. LDFLAGS="$save_LDFLAGS"
  1380. ])
  1381. if test x"[$]$2" = xyes; then
  1382. m4_if([$4], , :, [$4])
  1383. else
  1384. m4_if([$5], , :, [$5])
  1385. fi
  1386. ])# _LT_LINKER_OPTION
  1387. # Old name:
  1388. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1389. dnl aclocal-1.4 backwards compatibility:
  1390. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1391. # LT_CMD_MAX_LEN
  1392. #---------------
  1393. AC_DEFUN([LT_CMD_MAX_LEN],
  1394. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1395. # find the maximum length of command line arguments
  1396. AC_MSG_CHECKING([the maximum length of command line arguments])
  1397. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1398. i=0
  1399. teststring="ABCD"
  1400. case $build_os in
  1401. msdosdjgpp*)
  1402. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1403. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1404. # during glob expansion). Even if it were fixed, the result of this
  1405. # check would be larger than it should be.
  1406. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1407. ;;
  1408. gnu*)
  1409. # Under GNU Hurd, this test is not required because there is
  1410. # no limit to the length of command line arguments.
  1411. # Libtool will interpret -1 as no limit whatsoever
  1412. lt_cv_sys_max_cmd_len=-1;
  1413. ;;
  1414. cygwin* | mingw* | cegcc*)
  1415. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1416. # about 5 minutes as the teststring grows exponentially.
  1417. # Worse, since 9x/ME are not pre-emptively multitasking,
  1418. # you end up with a "frozen" computer, even though with patience
  1419. # the test eventually succeeds (with a max line length of 256k).
  1420. # Instead, let's just punt: use the minimum linelength reported by
  1421. # all of the supported platforms: 8192 (on NT/2K/XP).
  1422. lt_cv_sys_max_cmd_len=8192;
  1423. ;;
  1424. mint*)
  1425. # On MiNT this can take a long time and run out of memory.
  1426. lt_cv_sys_max_cmd_len=8192;
  1427. ;;
  1428. amigaos*)
  1429. # On AmigaOS with pdksh, this test takes hours, literally.
  1430. # So we just punt and use a minimum line length of 8192.
  1431. lt_cv_sys_max_cmd_len=8192;
  1432. ;;
  1433. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  1434. # This has been around since 386BSD, at least. Likely further.
  1435. if test -x /sbin/sysctl; then
  1436. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1437. elif test -x /usr/sbin/sysctl; then
  1438. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1439. else
  1440. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1441. fi
  1442. # And add a safety zone
  1443. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1444. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1445. ;;
  1446. interix*)
  1447. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1448. lt_cv_sys_max_cmd_len=196608
  1449. ;;
  1450. os2*)
  1451. # The test takes a long time on OS/2.
  1452. lt_cv_sys_max_cmd_len=8192
  1453. ;;
  1454. osf*)
  1455. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1456. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1457. # nice to cause kernel panics so lets avoid the loop below.
  1458. # First set a reasonable default.
  1459. lt_cv_sys_max_cmd_len=16384
  1460. #
  1461. if test -x /sbin/sysconfig; then
  1462. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1463. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1464. esac
  1465. fi
  1466. ;;
  1467. sco3.2v5*)
  1468. lt_cv_sys_max_cmd_len=102400
  1469. ;;
  1470. sysv5* | sco5v6* | sysv4.2uw2*)
  1471. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1472. if test -n "$kargmax"; then
  1473. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1474. else
  1475. lt_cv_sys_max_cmd_len=32768
  1476. fi
  1477. ;;
  1478. *)
  1479. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1480. if test -n "$lt_cv_sys_max_cmd_len"; then
  1481. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1482. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1483. else
  1484. # Make teststring a little bigger before we do anything with it.
  1485. # a 1K string should be a reasonable start.
  1486. for i in 1 2 3 4 5 6 7 8 ; do
  1487. teststring=$teststring$teststring
  1488. done
  1489. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1490. # If test is not a shell built-in, we'll probably end up computing a
  1491. # maximum length that is only half of the actual maximum length, but
  1492. # we can't tell.
  1493. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
  1494. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1495. test $i != 17 # 1/2 MB should be enough
  1496. do
  1497. i=`expr $i + 1`
  1498. teststring=$teststring$teststring
  1499. done
  1500. # Only check the string length outside the loop.
  1501. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1502. teststring=
  1503. # Add a significant safety factor because C++ compilers can tack on
  1504. # massive amounts of additional arguments before passing them to the
  1505. # linker. It appears as though 1/2 is a usable value.
  1506. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1507. fi
  1508. ;;
  1509. esac
  1510. ])
  1511. if test -n $lt_cv_sys_max_cmd_len ; then
  1512. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1513. else
  1514. AC_MSG_RESULT(none)
  1515. fi
  1516. max_cmd_len=$lt_cv_sys_max_cmd_len
  1517. _LT_DECL([], [max_cmd_len], [0],
  1518. [What is the maximum length of a command?])
  1519. ])# LT_CMD_MAX_LEN
  1520. # Old name:
  1521. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1522. dnl aclocal-1.4 backwards compatibility:
  1523. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1524. # _LT_HEADER_DLFCN
  1525. # ----------------
  1526. m4_defun([_LT_HEADER_DLFCN],
  1527. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1528. ])# _LT_HEADER_DLFCN
  1529. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1530. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1531. # ----------------------------------------------------------------
  1532. m4_defun([_LT_TRY_DLOPEN_SELF],
  1533. [m4_require([_LT_HEADER_DLFCN])dnl
  1534. if test "$cross_compiling" = yes; then :
  1535. [$4]
  1536. else
  1537. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1538. lt_status=$lt_dlunknown
  1539. cat > conftest.$ac_ext <<_LT_EOF
  1540. [#line $LINENO "configure"
  1541. #include "confdefs.h"
  1542. #if HAVE_DLFCN_H
  1543. #include <dlfcn.h>
  1544. #endif
  1545. #include <stdio.h>
  1546. #ifdef RTLD_GLOBAL
  1547. # define LT_DLGLOBAL RTLD_GLOBAL
  1548. #else
  1549. # ifdef DL_GLOBAL
  1550. # define LT_DLGLOBAL DL_GLOBAL
  1551. # else
  1552. # define LT_DLGLOBAL 0
  1553. # endif
  1554. #endif
  1555. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1556. find out it does not work in some platform. */
  1557. #ifndef LT_DLLAZY_OR_NOW
  1558. # ifdef RTLD_LAZY
  1559. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1560. # else
  1561. # ifdef DL_LAZY
  1562. # define LT_DLLAZY_OR_NOW DL_LAZY
  1563. # else
  1564. # ifdef RTLD_NOW
  1565. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1566. # else
  1567. # ifdef DL_NOW
  1568. # define LT_DLLAZY_OR_NOW DL_NOW
  1569. # else
  1570. # define LT_DLLAZY_OR_NOW 0
  1571. # endif
  1572. # endif
  1573. # endif
  1574. # endif
  1575. #endif
  1576. /* When -fvisbility=hidden is used, assume the code has been annotated
  1577. correspondingly for the symbols needed. */
  1578. #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1579. int fnord () __attribute__((visibility("default")));
  1580. #endif
  1581. int fnord () { return 42; }
  1582. int main ()
  1583. {
  1584. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1585. int status = $lt_dlunknown;
  1586. if (self)
  1587. {
  1588. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1589. else
  1590. {
  1591. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1592. else puts (dlerror ());
  1593. }
  1594. /* dlclose (self); */
  1595. }
  1596. else
  1597. puts (dlerror ());
  1598. return status;
  1599. }]
  1600. _LT_EOF
  1601. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  1602. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1603. lt_status=$?
  1604. case x$lt_status in
  1605. x$lt_dlno_uscore) $1 ;;
  1606. x$lt_dlneed_uscore) $2 ;;
  1607. x$lt_dlunknown|x*) $3 ;;
  1608. esac
  1609. else :
  1610. # compilation failed
  1611. $3
  1612. fi
  1613. fi
  1614. rm -fr conftest*
  1615. ])# _LT_TRY_DLOPEN_SELF
  1616. # LT_SYS_DLOPEN_SELF
  1617. # ------------------
  1618. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1619. [m4_require([_LT_HEADER_DLFCN])dnl
  1620. if test "x$enable_dlopen" != xyes; then
  1621. enable_dlopen=unknown
  1622. enable_dlopen_self=unknown
  1623. enable_dlopen_self_static=unknown
  1624. else
  1625. lt_cv_dlopen=no
  1626. lt_cv_dlopen_libs=
  1627. case $host_os in
  1628. beos*)
  1629. lt_cv_dlopen="load_add_on"
  1630. lt_cv_dlopen_libs=
  1631. lt_cv_dlopen_self=yes
  1632. ;;
  1633. mingw* | pw32* | cegcc*)
  1634. lt_cv_dlopen="LoadLibrary"
  1635. lt_cv_dlopen_libs=
  1636. ;;
  1637. cygwin*)
  1638. lt_cv_dlopen="dlopen"
  1639. lt_cv_dlopen_libs=
  1640. ;;
  1641. darwin*)
  1642. # if libdl is installed we need to link against it
  1643. AC_CHECK_LIB([dl], [dlopen],
  1644. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  1645. lt_cv_dlopen="dyld"
  1646. lt_cv_dlopen_libs=
  1647. lt_cv_dlopen_self=yes
  1648. ])
  1649. ;;
  1650. *)
  1651. AC_CHECK_FUNC([shl_load],
  1652. [lt_cv_dlopen="shl_load"],
  1653. [AC_CHECK_LIB([dld], [shl_load],
  1654. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  1655. [AC_CHECK_FUNC([dlopen],
  1656. [lt_cv_dlopen="dlopen"],
  1657. [AC_CHECK_LIB([dl], [dlopen],
  1658. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  1659. [AC_CHECK_LIB([svld], [dlopen],
  1660. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  1661. [AC_CHECK_LIB([dld], [dld_link],
  1662. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  1663. ])
  1664. ])
  1665. ])
  1666. ])
  1667. ])
  1668. ;;
  1669. esac
  1670. if test "x$lt_cv_dlopen" != xno; then
  1671. enable_dlopen=yes
  1672. else
  1673. enable_dlopen=no
  1674. fi
  1675. case $lt_cv_dlopen in
  1676. dlopen)
  1677. save_CPPFLAGS="$CPPFLAGS"
  1678. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1679. save_LDFLAGS="$LDFLAGS"
  1680. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1681. save_LIBS="$LIBS"
  1682. LIBS="$lt_cv_dlopen_libs $LIBS"
  1683. AC_CACHE_CHECK([whether a program can dlopen itself],
  1684. lt_cv_dlopen_self, [dnl
  1685. _LT_TRY_DLOPEN_SELF(
  1686. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1687. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1688. ])
  1689. if test "x$lt_cv_dlopen_self" = xyes; then
  1690. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1691. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1692. lt_cv_dlopen_self_static, [dnl
  1693. _LT_TRY_DLOPEN_SELF(
  1694. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1695. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1696. ])
  1697. fi
  1698. CPPFLAGS="$save_CPPFLAGS"
  1699. LDFLAGS="$save_LDFLAGS"
  1700. LIBS="$save_LIBS"
  1701. ;;
  1702. esac
  1703. case $lt_cv_dlopen_self in
  1704. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1705. *) enable_dlopen_self=unknown ;;
  1706. esac
  1707. case $lt_cv_dlopen_self_static in
  1708. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1709. *) enable_dlopen_self_static=unknown ;;
  1710. esac
  1711. fi
  1712. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1713. [Whether dlopen is supported])
  1714. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1715. [Whether dlopen of programs is supported])
  1716. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1717. [Whether dlopen of statically linked programs is supported])
  1718. ])# LT_SYS_DLOPEN_SELF
  1719. # Old name:
  1720. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1721. dnl aclocal-1.4 backwards compatibility:
  1722. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1723. # _LT_COMPILER_C_O([TAGNAME])
  1724. # ---------------------------
  1725. # Check to see if options -c and -o are simultaneously supported by compiler.
  1726. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1727. m4_defun([_LT_COMPILER_C_O],
  1728. [m4_require([_LT_DECL_SED])dnl
  1729. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1730. m4_require([_LT_TAG_COMPILER])dnl
  1731. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1732. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1733. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1734. $RM -r conftest 2>/dev/null
  1735. mkdir conftest
  1736. cd conftest
  1737. mkdir out
  1738. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1739. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1740. # Insert the option either (1) after the last *FLAGS variable, or
  1741. # (2) before a word containing "conftest.", or (3) at the end.
  1742. # Note that $ac_compile itself does not contain backslashes and begins
  1743. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1744. lt_compile=`echo "$ac_compile" | $SED \
  1745. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1746. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1747. -e 's:$: $lt_compiler_flag:'`
  1748. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1749. (eval "$lt_compile" 2>out/conftest.err)
  1750. ac_status=$?
  1751. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1752. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1753. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1754. then
  1755. # The compiler can only warn and ignore the option if not recognized
  1756. # So say no if there are warnings
  1757. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1758. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1759. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1760. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1761. fi
  1762. fi
  1763. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1764. $RM conftest*
  1765. # SGI C++ compiler will create directory out/ii_files/ for
  1766. # template instantiation
  1767. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1768. $RM out/* && rmdir out
  1769. cd ..
  1770. $RM -r conftest
  1771. $RM conftest*
  1772. ])
  1773. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1774. [Does compiler simultaneously support -c and -o options?])
  1775. ])# _LT_COMPILER_C_O
  1776. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1777. # ----------------------------------
  1778. # Check to see if we can do hard links to lock some files if needed
  1779. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1780. [m4_require([_LT_ENABLE_LOCK])dnl
  1781. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1782. _LT_COMPILER_C_O([$1])
  1783. hard_links="nottested"
  1784. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  1785. # do not overwrite the value of need_locks provided by the user
  1786. AC_MSG_CHECKING([if we can lock with hard links])
  1787. hard_links=yes
  1788. $RM conftest*
  1789. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1790. touch conftest.a
  1791. ln conftest.a conftest.b 2>&5 || hard_links=no
  1792. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1793. AC_MSG_RESULT([$hard_links])
  1794. if test "$hard_links" = no; then
  1795. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  1796. need_locks=warn
  1797. fi
  1798. else
  1799. need_locks=no
  1800. fi
  1801. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1802. ])# _LT_COMPILER_FILE_LOCKS
  1803. # _LT_CHECK_OBJDIR
  1804. # ----------------
  1805. m4_defun([_LT_CHECK_OBJDIR],
  1806. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1807. [rm -f .libs 2>/dev/null
  1808. mkdir .libs 2>/dev/null
  1809. if test -d .libs; then
  1810. lt_cv_objdir=.libs
  1811. else
  1812. # MS-DOS does not allow filenames that begin with a dot.
  1813. lt_cv_objdir=_libs
  1814. fi
  1815. rmdir .libs 2>/dev/null])
  1816. objdir=$lt_cv_objdir
  1817. _LT_DECL([], [objdir], [0],
  1818. [The name of the directory that contains temporary libtool files])dnl
  1819. m4_pattern_allow([LT_OBJDIR])dnl
  1820. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  1821. [Define to the sub-directory in which libtool stores uninstalled libraries.])
  1822. ])# _LT_CHECK_OBJDIR
  1823. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1824. # --------------------------------------
  1825. # Check hardcoding attributes.
  1826. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1827. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1828. _LT_TAGVAR(hardcode_action, $1)=
  1829. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1830. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1831. test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  1832. # We can hardcode non-existent directories.
  1833. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  1834. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1835. # have to relink, otherwise we might link with an installed library
  1836. # when we should be linking with a yet-to-be-installed one
  1837. ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1838. test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  1839. # Linking always hardcodes the temporary library directory.
  1840. _LT_TAGVAR(hardcode_action, $1)=relink
  1841. else
  1842. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1843. _LT_TAGVAR(hardcode_action, $1)=immediate
  1844. fi
  1845. else
  1846. # We cannot hardcode anything, or else we can only hardcode existing
  1847. # directories.
  1848. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1849. fi
  1850. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1851. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  1852. test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  1853. # Fast installation is not supported
  1854. enable_fast_install=no
  1855. elif test "$shlibpath_overrides_runpath" = yes ||
  1856. test "$enable_shared" = no; then
  1857. # Fast installation is not necessary
  1858. enable_fast_install=needless
  1859. fi
  1860. _LT_TAGDECL([], [hardcode_action], [0],
  1861. [How to hardcode a shared library path into an executable])
  1862. ])# _LT_LINKER_HARDCODE_LIBPATH
  1863. # _LT_CMD_STRIPLIB
  1864. # ----------------
  1865. m4_defun([_LT_CMD_STRIPLIB],
  1866. [m4_require([_LT_DECL_EGREP])
  1867. striplib=
  1868. old_striplib=
  1869. AC_MSG_CHECKING([whether stripping libraries is possible])
  1870. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1871. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1872. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1873. AC_MSG_RESULT([yes])
  1874. else
  1875. # FIXME - insert some real tests, host_os isn't really good enough
  1876. case $host_os in
  1877. darwin*)
  1878. if test -n "$STRIP" ; then
  1879. striplib="$STRIP -x"
  1880. old_striplib="$STRIP -S"
  1881. AC_MSG_RESULT([yes])
  1882. else
  1883. AC_MSG_RESULT([no])
  1884. fi
  1885. ;;
  1886. *)
  1887. AC_MSG_RESULT([no])
  1888. ;;
  1889. esac
  1890. fi
  1891. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1892. _LT_DECL([], [striplib], [1])
  1893. ])# _LT_CMD_STRIPLIB
  1894. # _LT_SYS_DYNAMIC_LINKER([TAG])
  1895. # -----------------------------
  1896. # PORTME Fill in your ld.so characteristics
  1897. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  1898. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1899. m4_require([_LT_DECL_EGREP])dnl
  1900. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1901. m4_require([_LT_DECL_OBJDUMP])dnl
  1902. m4_require([_LT_DECL_SED])dnl
  1903. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  1904. AC_MSG_CHECKING([dynamic linker characteristics])
  1905. m4_if([$1],
  1906. [], [
  1907. if test "$GCC" = yes; then
  1908. case $host_os in
  1909. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  1910. *) lt_awk_arg="/^libraries:/" ;;
  1911. esac
  1912. case $host_os in
  1913. mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
  1914. *) lt_sed_strip_eq="s,=/,/,g" ;;
  1915. esac
  1916. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  1917. case $lt_search_path_spec in
  1918. *\;*)
  1919. # if the path contains ";" then we assume it to be the separator
  1920. # otherwise default to the standard path separator (i.e. ":") - it is
  1921. # assumed that no part of a normal pathname contains ";" but that should
  1922. # okay in the real world where ";" in dirpaths is itself problematic.
  1923. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  1924. ;;
  1925. *)
  1926. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  1927. ;;
  1928. esac
  1929. # Ok, now we have the path, separated by spaces, we can step through it
  1930. # and add multilib dir if necessary.
  1931. lt_tmp_lt_search_path_spec=
  1932. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  1933. for lt_sys_path in $lt_search_path_spec; do
  1934. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  1935. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  1936. else
  1937. test -d "$lt_sys_path" && \
  1938. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  1939. fi
  1940. done
  1941. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  1942. BEGIN {RS=" "; FS="/|\n";} {
  1943. lt_foo="";
  1944. lt_count=0;
  1945. for (lt_i = NF; lt_i > 0; lt_i--) {
  1946. if ($lt_i != "" && $lt_i != ".") {
  1947. if ($lt_i == "..") {
  1948. lt_count++;
  1949. } else {
  1950. if (lt_count == 0) {
  1951. lt_foo="/" $lt_i lt_foo;
  1952. } else {
  1953. lt_count--;
  1954. }
  1955. }
  1956. }
  1957. }
  1958. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  1959. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  1960. }'`
  1961. # AWK program above erroneously prepends '/' to C:/dos/paths
  1962. # for these hosts.
  1963. case $host_os in
  1964. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  1965. $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
  1966. esac
  1967. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  1968. else
  1969. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1970. fi])
  1971. library_names_spec=
  1972. libname_spec='lib$name'
  1973. soname_spec=
  1974. shrext_cmds=".so"
  1975. postinstall_cmds=
  1976. postuninstall_cmds=
  1977. finish_cmds=
  1978. finish_eval=
  1979. shlibpath_var=
  1980. shlibpath_overrides_runpath=unknown
  1981. version_type=none
  1982. dynamic_linker="$host_os ld.so"
  1983. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1984. need_lib_prefix=unknown
  1985. hardcode_into_libs=no
  1986. # when you set need_version to no, make sure it does not cause -set_version
  1987. # flags to be left without arguments
  1988. need_version=unknown
  1989. case $host_os in
  1990. aix3*)
  1991. version_type=linux # correct to gnu/linux during the next big refactor
  1992. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  1993. shlibpath_var=LIBPATH
  1994. # AIX 3 has no versioning support, so we append a major version to the name.
  1995. soname_spec='${libname}${release}${shared_ext}$major'
  1996. ;;
  1997. aix[[4-9]]*)
  1998. version_type=linux # correct to gnu/linux during the next big refactor
  1999. need_lib_prefix=no
  2000. need_version=no
  2001. hardcode_into_libs=yes
  2002. if test "$host_cpu" = ia64; then
  2003. # AIX 5 supports IA64
  2004. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  2005. shlibpath_var=LD_LIBRARY_PATH
  2006. else
  2007. # With GCC up to 2.95.x, collect2 would create an import file
  2008. # for dependence libraries. The import file would start with
  2009. # the line `#! .'. This would cause the generated library to
  2010. # depend on `.', always an invalid library. This was fixed in
  2011. # development snapshots of GCC prior to 3.0.
  2012. case $host_os in
  2013. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2014. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2015. echo ' yes '
  2016. echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  2017. :
  2018. else
  2019. can_build_shared=no
  2020. fi
  2021. ;;
  2022. esac
  2023. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  2024. # soname into executable. Probably we can add versioning support to
  2025. # collect2, so additional links can be useful in future.
  2026. if test "$aix_use_runtimelinking" = yes; then
  2027. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2028. # instead of lib<name>.a to let people know that these are not
  2029. # typical AIX shared libraries.
  2030. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2031. else
  2032. # We preserve .a as extension for shared libraries through AIX4.2
  2033. # and later when we are not doing run time linking.
  2034. library_names_spec='${libname}${release}.a $libname.a'
  2035. soname_spec='${libname}${release}${shared_ext}$major'
  2036. fi
  2037. shlibpath_var=LIBPATH
  2038. fi
  2039. ;;
  2040. amigaos*)
  2041. case $host_cpu in
  2042. powerpc)
  2043. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2044. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2045. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2046. ;;
  2047. m68k)
  2048. library_names_spec='$libname.ixlibrary $libname.a'
  2049. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2050. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  2051. ;;
  2052. esac
  2053. ;;
  2054. beos*)
  2055. library_names_spec='${libname}${shared_ext}'
  2056. dynamic_linker="$host_os ld.so"
  2057. shlibpath_var=LIBRARY_PATH
  2058. ;;
  2059. bsdi[[45]]*)
  2060. version_type=linux # correct to gnu/linux during the next big refactor
  2061. need_version=no
  2062. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2063. soname_spec='${libname}${release}${shared_ext}$major'
  2064. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2065. shlibpath_var=LD_LIBRARY_PATH
  2066. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2067. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2068. # the default ld.so.conf also contains /usr/contrib/lib and
  2069. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2070. # libtool to hard-code these into programs
  2071. ;;
  2072. cygwin* | mingw* | pw32* | cegcc*)
  2073. version_type=windows
  2074. shrext_cmds=".dll"
  2075. need_version=no
  2076. need_lib_prefix=no
  2077. case $GCC,$cc_basename in
  2078. yes,*)
  2079. # gcc
  2080. library_names_spec='$libname.dll.a'
  2081. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2082. postinstall_cmds='base_file=`basename \${file}`~
  2083. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2084. dldir=$destdir/`dirname \$dlpath`~
  2085. test -d \$dldir || mkdir -p \$dldir~
  2086. $install_prog $dir/$dlname \$dldir/$dlname~
  2087. chmod a+x \$dldir/$dlname~
  2088. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2089. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2090. fi'
  2091. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2092. dlpath=$dir/\$dldll~
  2093. $RM \$dlpath'
  2094. shlibpath_overrides_runpath=yes
  2095. case $host_os in
  2096. cygwin*)
  2097. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2098. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2099. m4_if([$1], [],[
  2100. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2101. ;;
  2102. mingw* | cegcc*)
  2103. # MinGW DLLs use traditional 'lib' prefix
  2104. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2105. ;;
  2106. pw32*)
  2107. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2108. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2109. ;;
  2110. esac
  2111. dynamic_linker='Win32 ld.exe'
  2112. ;;
  2113. *,cl*)
  2114. # Native MSVC
  2115. libname_spec='$name'
  2116. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2117. library_names_spec='${libname}.dll.lib'
  2118. case $build_os in
  2119. mingw*)
  2120. sys_lib_search_path_spec=
  2121. lt_save_ifs=$IFS
  2122. IFS=';'
  2123. for lt_path in $LIB
  2124. do
  2125. IFS=$lt_save_ifs
  2126. # Let DOS variable expansion print the short 8.3 style file name.
  2127. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2128. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2129. done
  2130. IFS=$lt_save_ifs
  2131. # Convert to MSYS style.
  2132. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2133. ;;
  2134. cygwin*)
  2135. # Convert to unix form, then to dos form, then back to unix form
  2136. # but this time dos style (no spaces!) so that the unix form looks
  2137. # like /cygdrive/c/PROGRA~1:/cygdr...
  2138. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2139. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2140. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2141. ;;
  2142. *)
  2143. sys_lib_search_path_spec="$LIB"
  2144. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2145. # It is most probably a Windows format PATH.
  2146. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2147. else
  2148. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2149. fi
  2150. # FIXME: find the short name or the path components, as spaces are
  2151. # common. (e.g. "Program Files" -> "PROGRA~1")
  2152. ;;
  2153. esac
  2154. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2155. postinstall_cmds='base_file=`basename \${file}`~
  2156. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2157. dldir=$destdir/`dirname \$dlpath`~
  2158. test -d \$dldir || mkdir -p \$dldir~
  2159. $install_prog $dir/$dlname \$dldir/$dlname'
  2160. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2161. dlpath=$dir/\$dldll~
  2162. $RM \$dlpath'
  2163. shlibpath_overrides_runpath=yes
  2164. dynamic_linker='Win32 link.exe'
  2165. ;;
  2166. *)
  2167. # Assume MSVC wrapper
  2168. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  2169. dynamic_linker='Win32 ld.exe'
  2170. ;;
  2171. esac
  2172. # FIXME: first we should search . and the directory the executable is in
  2173. shlibpath_var=PATH
  2174. ;;
  2175. darwin* | rhapsody*)
  2176. dynamic_linker="$host_os dyld"
  2177. version_type=darwin
  2178. need_lib_prefix=no
  2179. need_version=no
  2180. library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  2181. soname_spec='${libname}${release}${major}$shared_ext'
  2182. shlibpath_overrides_runpath=yes
  2183. shlibpath_var=DYLD_LIBRARY_PATH
  2184. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2185. m4_if([$1], [],[
  2186. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2187. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2188. ;;
  2189. dgux*)
  2190. version_type=linux # correct to gnu/linux during the next big refactor
  2191. need_lib_prefix=no
  2192. need_version=no
  2193. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  2194. soname_spec='${libname}${release}${shared_ext}$major'
  2195. shlibpath_var=LD_LIBRARY_PATH
  2196. ;;
  2197. freebsd* | dragonfly*)
  2198. # DragonFly does not have aout. When/if they implement a new
  2199. # versioning mechanism, adjust this.
  2200. if test -x /usr/bin/objformat; then
  2201. objformat=`/usr/bin/objformat`
  2202. else
  2203. case $host_os in
  2204. freebsd[[23]].*) objformat=aout ;;
  2205. *) objformat=elf ;;
  2206. esac
  2207. fi
  2208. version_type=freebsd-$objformat
  2209. case $version_type in
  2210. freebsd-elf*)
  2211. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2212. need_version=no
  2213. need_lib_prefix=no
  2214. ;;
  2215. freebsd-*)
  2216. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  2217. need_version=yes
  2218. ;;
  2219. esac
  2220. shlibpath_var=LD_LIBRARY_PATH
  2221. case $host_os in
  2222. freebsd2.*)
  2223. shlibpath_overrides_runpath=yes
  2224. ;;
  2225. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2226. shlibpath_overrides_runpath=yes
  2227. hardcode_into_libs=yes
  2228. ;;
  2229. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2230. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2231. shlibpath_overrides_runpath=no
  2232. hardcode_into_libs=yes
  2233. ;;
  2234. *) # from 4.6 on, and DragonFly
  2235. shlibpath_overrides_runpath=yes
  2236. hardcode_into_libs=yes
  2237. ;;
  2238. esac
  2239. ;;
  2240. haiku*)
  2241. version_type=linux # correct to gnu/linux during the next big refactor
  2242. need_lib_prefix=no
  2243. need_version=no
  2244. dynamic_linker="$host_os runtime_loader"
  2245. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2246. soname_spec='${libname}${release}${shared_ext}$major'
  2247. shlibpath_var=LIBRARY_PATH
  2248. shlibpath_overrides_runpath=yes
  2249. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2250. hardcode_into_libs=yes
  2251. ;;
  2252. hpux9* | hpux10* | hpux11*)
  2253. # Give a soname corresponding to the major version so that dld.sl refuses to
  2254. # link against other versions.
  2255. version_type=sunos
  2256. need_lib_prefix=no
  2257. need_version=no
  2258. case $host_cpu in
  2259. ia64*)
  2260. shrext_cmds='.so'
  2261. hardcode_into_libs=yes
  2262. dynamic_linker="$host_os dld.so"
  2263. shlibpath_var=LD_LIBRARY_PATH
  2264. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2265. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2266. soname_spec='${libname}${release}${shared_ext}$major'
  2267. if test "X$HPUX_IA64_MODE" = X32; then
  2268. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2269. else
  2270. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2271. fi
  2272. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2273. ;;
  2274. hppa*64*)
  2275. shrext_cmds='.sl'
  2276. hardcode_into_libs=yes
  2277. dynamic_linker="$host_os dld.sl"
  2278. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2279. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2280. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2281. soname_spec='${libname}${release}${shared_ext}$major'
  2282. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2283. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2284. ;;
  2285. *)
  2286. shrext_cmds='.sl'
  2287. dynamic_linker="$host_os dld.sl"
  2288. shlibpath_var=SHLIB_PATH
  2289. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2290. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2291. soname_spec='${libname}${release}${shared_ext}$major'
  2292. ;;
  2293. esac
  2294. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2295. postinstall_cmds='chmod 555 $lib'
  2296. # or fails outright, so override atomically:
  2297. install_override_mode=555
  2298. ;;
  2299. interix[[3-9]]*)
  2300. version_type=linux # correct to gnu/linux during the next big refactor
  2301. need_lib_prefix=no
  2302. need_version=no
  2303. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2304. soname_spec='${libname}${release}${shared_ext}$major'
  2305. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2306. shlibpath_var=LD_LIBRARY_PATH
  2307. shlibpath_overrides_runpath=no
  2308. hardcode_into_libs=yes
  2309. ;;
  2310. irix5* | irix6* | nonstopux*)
  2311. case $host_os in
  2312. nonstopux*) version_type=nonstopux ;;
  2313. *)
  2314. if test "$lt_cv_prog_gnu_ld" = yes; then
  2315. version_type=linux # correct to gnu/linux during the next big refactor
  2316. else
  2317. version_type=irix
  2318. fi ;;
  2319. esac
  2320. need_lib_prefix=no
  2321. need_version=no
  2322. soname_spec='${libname}${release}${shared_ext}$major'
  2323. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  2324. case $host_os in
  2325. irix5* | nonstopux*)
  2326. libsuff= shlibsuff=
  2327. ;;
  2328. *)
  2329. case $LD in # libtool.m4 will add one of these switches to LD
  2330. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2331. libsuff= shlibsuff= libmagic=32-bit;;
  2332. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2333. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2334. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2335. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2336. *) libsuff= shlibsuff= libmagic=never-match;;
  2337. esac
  2338. ;;
  2339. esac
  2340. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2341. shlibpath_overrides_runpath=no
  2342. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2343. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2344. hardcode_into_libs=yes
  2345. ;;
  2346. # No shared lib support for Linux oldld, aout, or coff.
  2347. linux*oldld* | linux*aout* | linux*coff*)
  2348. dynamic_linker=no
  2349. ;;
  2350. # This must be glibc/ELF.
  2351. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2352. version_type=linux # correct to gnu/linux during the next big refactor
  2353. need_lib_prefix=no
  2354. need_version=no
  2355. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2356. soname_spec='${libname}${release}${shared_ext}$major'
  2357. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2358. shlibpath_var=LD_LIBRARY_PATH
  2359. shlibpath_overrides_runpath=no
  2360. # Some binutils ld are patched to set DT_RUNPATH
  2361. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2362. [lt_cv_shlibpath_overrides_runpath=no
  2363. save_LDFLAGS=$LDFLAGS
  2364. save_libdir=$libdir
  2365. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2366. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2367. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2368. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2369. [lt_cv_shlibpath_overrides_runpath=yes])])
  2370. LDFLAGS=$save_LDFLAGS
  2371. libdir=$save_libdir
  2372. ])
  2373. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2374. # This implies no fast_install, which is unacceptable.
  2375. # Some rework will be needed to allow for fast_install
  2376. # before this can be enabled.
  2377. hardcode_into_libs=yes
  2378. # Append ld.so.conf contents to the search path
  2379. if test -f /etc/ld.so.conf; then
  2380. 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' ' '`
  2381. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2382. fi
  2383. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2384. # powerpc, because MkLinux only supported shared libraries with the
  2385. # GNU dynamic linker. Since this was broken with cross compilers,
  2386. # most powerpc-linux boxes support dynamic linking these days and
  2387. # people can always --disable-shared, the test was removed, and we
  2388. # assume the GNU/Linux dynamic linker is in use.
  2389. dynamic_linker='GNU/Linux ld.so'
  2390. ;;
  2391. netbsdelf*-gnu)
  2392. version_type=linux
  2393. need_lib_prefix=no
  2394. need_version=no
  2395. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2396. soname_spec='${libname}${release}${shared_ext}$major'
  2397. shlibpath_var=LD_LIBRARY_PATH
  2398. shlibpath_overrides_runpath=no
  2399. hardcode_into_libs=yes
  2400. dynamic_linker='NetBSD ld.elf_so'
  2401. ;;
  2402. netbsd*)
  2403. version_type=sunos
  2404. need_lib_prefix=no
  2405. need_version=no
  2406. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2407. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2408. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2409. dynamic_linker='NetBSD (a.out) ld.so'
  2410. else
  2411. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2412. soname_spec='${libname}${release}${shared_ext}$major'
  2413. dynamic_linker='NetBSD ld.elf_so'
  2414. fi
  2415. shlibpath_var=LD_LIBRARY_PATH
  2416. shlibpath_overrides_runpath=yes
  2417. hardcode_into_libs=yes
  2418. ;;
  2419. newsos6)
  2420. version_type=linux # correct to gnu/linux during the next big refactor
  2421. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2422. shlibpath_var=LD_LIBRARY_PATH
  2423. shlibpath_overrides_runpath=yes
  2424. ;;
  2425. *nto* | *qnx*)
  2426. version_type=qnx
  2427. need_lib_prefix=no
  2428. need_version=no
  2429. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2430. soname_spec='${libname}${release}${shared_ext}$major'
  2431. shlibpath_var=LD_LIBRARY_PATH
  2432. shlibpath_overrides_runpath=no
  2433. hardcode_into_libs=yes
  2434. dynamic_linker='ldqnx.so'
  2435. ;;
  2436. openbsd*)
  2437. version_type=sunos
  2438. sys_lib_dlsearch_path_spec="/usr/lib"
  2439. need_lib_prefix=no
  2440. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  2441. case $host_os in
  2442. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  2443. *) need_version=no ;;
  2444. esac
  2445. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2446. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2447. shlibpath_var=LD_LIBRARY_PATH
  2448. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2449. case $host_os in
  2450. openbsd2.[[89]] | openbsd2.[[89]].*)
  2451. shlibpath_overrides_runpath=no
  2452. ;;
  2453. *)
  2454. shlibpath_overrides_runpath=yes
  2455. ;;
  2456. esac
  2457. else
  2458. shlibpath_overrides_runpath=yes
  2459. fi
  2460. ;;
  2461. os2*)
  2462. libname_spec='$name'
  2463. shrext_cmds=".dll"
  2464. need_lib_prefix=no
  2465. library_names_spec='$libname${shared_ext} $libname.a'
  2466. dynamic_linker='OS/2 ld.exe'
  2467. shlibpath_var=LIBPATH
  2468. ;;
  2469. osf3* | osf4* | osf5*)
  2470. version_type=osf
  2471. need_lib_prefix=no
  2472. need_version=no
  2473. soname_spec='${libname}${release}${shared_ext}$major'
  2474. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2475. shlibpath_var=LD_LIBRARY_PATH
  2476. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2477. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2478. ;;
  2479. rdos*)
  2480. dynamic_linker=no
  2481. ;;
  2482. solaris*)
  2483. version_type=linux # correct to gnu/linux during the next big refactor
  2484. need_lib_prefix=no
  2485. need_version=no
  2486. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2487. soname_spec='${libname}${release}${shared_ext}$major'
  2488. shlibpath_var=LD_LIBRARY_PATH
  2489. shlibpath_overrides_runpath=yes
  2490. hardcode_into_libs=yes
  2491. # ldd complains unless libraries are executable
  2492. postinstall_cmds='chmod +x $lib'
  2493. ;;
  2494. sunos4*)
  2495. version_type=sunos
  2496. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2497. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2498. shlibpath_var=LD_LIBRARY_PATH
  2499. shlibpath_overrides_runpath=yes
  2500. if test "$with_gnu_ld" = yes; then
  2501. need_lib_prefix=no
  2502. fi
  2503. need_version=yes
  2504. ;;
  2505. sysv4 | sysv4.3*)
  2506. version_type=linux # correct to gnu/linux during the next big refactor
  2507. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2508. soname_spec='${libname}${release}${shared_ext}$major'
  2509. shlibpath_var=LD_LIBRARY_PATH
  2510. case $host_vendor in
  2511. sni)
  2512. shlibpath_overrides_runpath=no
  2513. need_lib_prefix=no
  2514. runpath_var=LD_RUN_PATH
  2515. ;;
  2516. siemens)
  2517. need_lib_prefix=no
  2518. ;;
  2519. motorola)
  2520. need_lib_prefix=no
  2521. need_version=no
  2522. shlibpath_overrides_runpath=no
  2523. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2524. ;;
  2525. esac
  2526. ;;
  2527. sysv4*MP*)
  2528. if test -d /usr/nec ;then
  2529. version_type=linux # correct to gnu/linux during the next big refactor
  2530. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  2531. soname_spec='$libname${shared_ext}.$major'
  2532. shlibpath_var=LD_LIBRARY_PATH
  2533. fi
  2534. ;;
  2535. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2536. version_type=freebsd-elf
  2537. need_lib_prefix=no
  2538. need_version=no
  2539. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2540. soname_spec='${libname}${release}${shared_ext}$major'
  2541. shlibpath_var=LD_LIBRARY_PATH
  2542. shlibpath_overrides_runpath=yes
  2543. hardcode_into_libs=yes
  2544. if test "$with_gnu_ld" = yes; then
  2545. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2546. else
  2547. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2548. case $host_os in
  2549. sco3.2v5*)
  2550. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2551. ;;
  2552. esac
  2553. fi
  2554. sys_lib_dlsearch_path_spec='/usr/lib'
  2555. ;;
  2556. tpf*)
  2557. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2558. version_type=linux # correct to gnu/linux during the next big refactor
  2559. need_lib_prefix=no
  2560. need_version=no
  2561. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2562. shlibpath_var=LD_LIBRARY_PATH
  2563. shlibpath_overrides_runpath=no
  2564. hardcode_into_libs=yes
  2565. ;;
  2566. uts4*)
  2567. version_type=linux # correct to gnu/linux during the next big refactor
  2568. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2569. soname_spec='${libname}${release}${shared_ext}$major'
  2570. shlibpath_var=LD_LIBRARY_PATH
  2571. ;;
  2572. *)
  2573. dynamic_linker=no
  2574. ;;
  2575. esac
  2576. AC_MSG_RESULT([$dynamic_linker])
  2577. test "$dynamic_linker" = no && can_build_shared=no
  2578. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2579. if test "$GCC" = yes; then
  2580. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2581. fi
  2582. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  2583. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  2584. fi
  2585. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  2586. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  2587. fi
  2588. _LT_DECL([], [variables_saved_for_relink], [1],
  2589. [Variables whose values should be saved in libtool wrapper scripts and
  2590. restored at link time])
  2591. _LT_DECL([], [need_lib_prefix], [0],
  2592. [Do we need the "lib" prefix for modules?])
  2593. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2594. _LT_DECL([], [version_type], [0], [Library versioning type])
  2595. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2596. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2597. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2598. [Is shlibpath searched before the hard-coded library search path?])
  2599. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2600. _LT_DECL([], [library_names_spec], [1],
  2601. [[List of archive names. First name is the real one, the rest are links.
  2602. The last name is the one that the linker finds with -lNAME]])
  2603. _LT_DECL([], [soname_spec], [1],
  2604. [[The coded name of the library, if different from the real name]])
  2605. _LT_DECL([], [install_override_mode], [1],
  2606. [Permission mode override for installation of shared libraries])
  2607. _LT_DECL([], [postinstall_cmds], [2],
  2608. [Command to use after installation of a shared archive])
  2609. _LT_DECL([], [postuninstall_cmds], [2],
  2610. [Command to use after uninstallation of a shared archive])
  2611. _LT_DECL([], [finish_cmds], [2],
  2612. [Commands used to finish a libtool library installation in a directory])
  2613. _LT_DECL([], [finish_eval], [1],
  2614. [[As "finish_cmds", except a single script fragment to be evaled but
  2615. not shown]])
  2616. _LT_DECL([], [hardcode_into_libs], [0],
  2617. [Whether we should hardcode library paths into libraries])
  2618. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2619. [Compile-time system search path for libraries])
  2620. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  2621. [Run-time system search path for libraries])
  2622. ])# _LT_SYS_DYNAMIC_LINKER
  2623. # _LT_PATH_TOOL_PREFIX(TOOL)
  2624. # --------------------------
  2625. # find a file program which can recognize shared library
  2626. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2627. [m4_require([_LT_DECL_EGREP])dnl
  2628. AC_MSG_CHECKING([for $1])
  2629. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2630. [case $MAGIC_CMD in
  2631. [[\\/*] | ?:[\\/]*])
  2632. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  2633. ;;
  2634. *)
  2635. lt_save_MAGIC_CMD="$MAGIC_CMD"
  2636. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2637. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2638. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2639. dnl not every word. This closes a longstanding sh security hole.
  2640. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2641. for ac_dir in $ac_dummy; do
  2642. IFS="$lt_save_ifs"
  2643. test -z "$ac_dir" && ac_dir=.
  2644. if test -f $ac_dir/$1; then
  2645. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  2646. if test -n "$file_magic_test_file"; then
  2647. case $deplibs_check_method in
  2648. "file_magic "*)
  2649. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2650. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2651. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2652. $EGREP "$file_magic_regex" > /dev/null; then
  2653. :
  2654. else
  2655. cat <<_LT_EOF 1>&2
  2656. *** Warning: the command libtool uses to detect shared libraries,
  2657. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2658. *** The result is that libtool may fail to recognize shared libraries
  2659. *** as such. This will affect the creation of libtool libraries that
  2660. *** depend on shared libraries, but programs linked with such libtool
  2661. *** libraries will work regardless of this problem. Nevertheless, you
  2662. *** may want to report the problem to your system manager and/or to
  2663. *** bug-libtool@gnu.org
  2664. _LT_EOF
  2665. fi ;;
  2666. esac
  2667. fi
  2668. break
  2669. fi
  2670. done
  2671. IFS="$lt_save_ifs"
  2672. MAGIC_CMD="$lt_save_MAGIC_CMD"
  2673. ;;
  2674. esac])
  2675. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2676. if test -n "$MAGIC_CMD"; then
  2677. AC_MSG_RESULT($MAGIC_CMD)
  2678. else
  2679. AC_MSG_RESULT(no)
  2680. fi
  2681. _LT_DECL([], [MAGIC_CMD], [0],
  2682. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2683. ])# _LT_PATH_TOOL_PREFIX
  2684. # Old name:
  2685. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2686. dnl aclocal-1.4 backwards compatibility:
  2687. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2688. # _LT_PATH_MAGIC
  2689. # --------------
  2690. # find a file program which can recognize a shared library
  2691. m4_defun([_LT_PATH_MAGIC],
  2692. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2693. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2694. if test -n "$ac_tool_prefix"; then
  2695. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2696. else
  2697. MAGIC_CMD=:
  2698. fi
  2699. fi
  2700. ])# _LT_PATH_MAGIC
  2701. # LT_PATH_LD
  2702. # ----------
  2703. # find the pathname to the GNU or non-GNU linker
  2704. AC_DEFUN([LT_PATH_LD],
  2705. [AC_REQUIRE([AC_PROG_CC])dnl
  2706. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2707. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2708. m4_require([_LT_DECL_SED])dnl
  2709. m4_require([_LT_DECL_EGREP])dnl
  2710. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2711. AC_ARG_WITH([gnu-ld],
  2712. [AS_HELP_STRING([--with-gnu-ld],
  2713. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2714. [test "$withval" = no || with_gnu_ld=yes],
  2715. [with_gnu_ld=no])dnl
  2716. ac_prog=ld
  2717. if test "$GCC" = yes; then
  2718. # Check if gcc -print-prog-name=ld gives a path.
  2719. AC_MSG_CHECKING([for ld used by $CC])
  2720. case $host in
  2721. *-*-mingw*)
  2722. # gcc leaves a trailing carriage return which upsets mingw
  2723. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2724. *)
  2725. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2726. esac
  2727. case $ac_prog in
  2728. # Accept absolute paths.
  2729. [[\\/]]* | ?:[[\\/]]*)
  2730. re_direlt='/[[^/]][[^/]]*/\.\./'
  2731. # Canonicalize the pathname of ld
  2732. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2733. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2734. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2735. done
  2736. test -z "$LD" && LD="$ac_prog"
  2737. ;;
  2738. "")
  2739. # If it fails, then pretend we aren't using GCC.
  2740. ac_prog=ld
  2741. ;;
  2742. *)
  2743. # If it is relative, then search for the first ld in PATH.
  2744. with_gnu_ld=unknown
  2745. ;;
  2746. esac
  2747. elif test "$with_gnu_ld" = yes; then
  2748. AC_MSG_CHECKING([for GNU ld])
  2749. else
  2750. AC_MSG_CHECKING([for non-GNU ld])
  2751. fi
  2752. AC_CACHE_VAL(lt_cv_path_LD,
  2753. [if test -z "$LD"; then
  2754. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2755. for ac_dir in $PATH; do
  2756. IFS="$lt_save_ifs"
  2757. test -z "$ac_dir" && ac_dir=.
  2758. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2759. lt_cv_path_LD="$ac_dir/$ac_prog"
  2760. # Check to see if the program is GNU ld. I'd rather use --version,
  2761. # but apparently some variants of GNU ld only accept -v.
  2762. # Break only if it was the GNU/non-GNU ld that we prefer.
  2763. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2764. *GNU* | *'with BFD'*)
  2765. test "$with_gnu_ld" != no && break
  2766. ;;
  2767. *)
  2768. test "$with_gnu_ld" != yes && break
  2769. ;;
  2770. esac
  2771. fi
  2772. done
  2773. IFS="$lt_save_ifs"
  2774. else
  2775. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  2776. fi])
  2777. LD="$lt_cv_path_LD"
  2778. if test -n "$LD"; then
  2779. AC_MSG_RESULT($LD)
  2780. else
  2781. AC_MSG_RESULT(no)
  2782. fi
  2783. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2784. _LT_PATH_LD_GNU
  2785. AC_SUBST([LD])
  2786. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  2787. ])# LT_PATH_LD
  2788. # Old names:
  2789. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  2790. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  2791. dnl aclocal-1.4 backwards compatibility:
  2792. dnl AC_DEFUN([AM_PROG_LD], [])
  2793. dnl AC_DEFUN([AC_PROG_LD], [])
  2794. # _LT_PATH_LD_GNU
  2795. #- --------------
  2796. m4_defun([_LT_PATH_LD_GNU],
  2797. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2798. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  2799. case `$LD -v 2>&1 </dev/null` in
  2800. *GNU* | *'with BFD'*)
  2801. lt_cv_prog_gnu_ld=yes
  2802. ;;
  2803. *)
  2804. lt_cv_prog_gnu_ld=no
  2805. ;;
  2806. esac])
  2807. with_gnu_ld=$lt_cv_prog_gnu_ld
  2808. ])# _LT_PATH_LD_GNU
  2809. # _LT_CMD_RELOAD
  2810. # --------------
  2811. # find reload flag for linker
  2812. # -- PORTME Some linkers may need a different reload flag.
  2813. m4_defun([_LT_CMD_RELOAD],
  2814. [AC_CACHE_CHECK([for $LD option to reload object files],
  2815. lt_cv_ld_reload_flag,
  2816. [lt_cv_ld_reload_flag='-r'])
  2817. reload_flag=$lt_cv_ld_reload_flag
  2818. case $reload_flag in
  2819. "" | " "*) ;;
  2820. *) reload_flag=" $reload_flag" ;;
  2821. esac
  2822. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2823. case $host_os in
  2824. cygwin* | mingw* | pw32* | cegcc*)
  2825. if test "$GCC" != yes; then
  2826. reload_cmds=false
  2827. fi
  2828. ;;
  2829. darwin*)
  2830. if test "$GCC" = yes; then
  2831. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  2832. else
  2833. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2834. fi
  2835. ;;
  2836. esac
  2837. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  2838. _LT_TAGDECL([], [reload_cmds], [2])dnl
  2839. ])# _LT_CMD_RELOAD
  2840. # _LT_CHECK_MAGIC_METHOD
  2841. # ----------------------
  2842. # how to check for library dependencies
  2843. # -- PORTME fill in with the dynamic library characteristics
  2844. m4_defun([_LT_CHECK_MAGIC_METHOD],
  2845. [m4_require([_LT_DECL_EGREP])
  2846. m4_require([_LT_DECL_OBJDUMP])
  2847. AC_CACHE_CHECK([how to recognize dependent libraries],
  2848. lt_cv_deplibs_check_method,
  2849. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2850. lt_cv_file_magic_test_file=
  2851. lt_cv_deplibs_check_method='unknown'
  2852. # Need to set the preceding variable on all platforms that support
  2853. # interlibrary dependencies.
  2854. # 'none' -- dependencies not supported.
  2855. # `unknown' -- same as none, but documents that we really don't know.
  2856. # 'pass_all' -- all dependencies passed with no checks.
  2857. # 'test_compile' -- check by making test program.
  2858. # 'file_magic [[regex]]' -- check by looking for files in library path
  2859. # which responds to the $file_magic_cmd with a given extended regex.
  2860. # If you have `file' or equivalent on your system and you're not sure
  2861. # whether `pass_all' will *always* work, you probably want this one.
  2862. case $host_os in
  2863. aix[[4-9]]*)
  2864. lt_cv_deplibs_check_method=pass_all
  2865. ;;
  2866. beos*)
  2867. lt_cv_deplibs_check_method=pass_all
  2868. ;;
  2869. bsdi[[45]]*)
  2870. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2871. lt_cv_file_magic_cmd='/usr/bin/file -L'
  2872. lt_cv_file_magic_test_file=/shlib/libc.so
  2873. ;;
  2874. cygwin*)
  2875. # func_win32_libid is a shell function defined in ltmain.sh
  2876. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2877. lt_cv_file_magic_cmd='func_win32_libid'
  2878. ;;
  2879. mingw* | pw32*)
  2880. # Base MSYS/MinGW do not provide the 'file' command needed by
  2881. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  2882. # unless we find 'file', for example because we are cross-compiling.
  2883. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  2884. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  2885. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2886. lt_cv_file_magic_cmd='func_win32_libid'
  2887. else
  2888. # Keep this pattern in sync with the one in func_win32_libid.
  2889. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  2890. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2891. fi
  2892. ;;
  2893. cegcc*)
  2894. # use the weaker test based on 'objdump'. See mingw*.
  2895. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  2896. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2897. ;;
  2898. darwin* | rhapsody*)
  2899. lt_cv_deplibs_check_method=pass_all
  2900. ;;
  2901. freebsd* | dragonfly*)
  2902. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2903. case $host_cpu in
  2904. i*86 )
  2905. # Not sure whether the presence of OpenBSD here was a mistake.
  2906. # Let's accept both of them until this is cleared up.
  2907. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2908. lt_cv_file_magic_cmd=/usr/bin/file
  2909. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2910. ;;
  2911. esac
  2912. else
  2913. lt_cv_deplibs_check_method=pass_all
  2914. fi
  2915. ;;
  2916. haiku*)
  2917. lt_cv_deplibs_check_method=pass_all
  2918. ;;
  2919. hpux10.20* | hpux11*)
  2920. lt_cv_file_magic_cmd=/usr/bin/file
  2921. case $host_cpu in
  2922. ia64*)
  2923. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2924. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2925. ;;
  2926. hppa*64*)
  2927. [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]']
  2928. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2929. ;;
  2930. *)
  2931. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  2932. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2933. ;;
  2934. esac
  2935. ;;
  2936. interix[[3-9]]*)
  2937. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  2938. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  2939. ;;
  2940. irix5* | irix6* | nonstopux*)
  2941. case $LD in
  2942. *-32|*"-32 ") libmagic=32-bit;;
  2943. *-n32|*"-n32 ") libmagic=N32;;
  2944. *-64|*"-64 ") libmagic=64-bit;;
  2945. *) libmagic=never-match;;
  2946. esac
  2947. lt_cv_deplibs_check_method=pass_all
  2948. ;;
  2949. # This must be glibc/ELF.
  2950. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2951. lt_cv_deplibs_check_method=pass_all
  2952. ;;
  2953. netbsd* | netbsdelf*-gnu)
  2954. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2955. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2956. else
  2957. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2958. fi
  2959. ;;
  2960. newos6*)
  2961. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2962. lt_cv_file_magic_cmd=/usr/bin/file
  2963. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2964. ;;
  2965. *nto* | *qnx*)
  2966. lt_cv_deplibs_check_method=pass_all
  2967. ;;
  2968. openbsd*)
  2969. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2970. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2971. else
  2972. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2973. fi
  2974. ;;
  2975. osf3* | osf4* | osf5*)
  2976. lt_cv_deplibs_check_method=pass_all
  2977. ;;
  2978. rdos*)
  2979. lt_cv_deplibs_check_method=pass_all
  2980. ;;
  2981. solaris*)
  2982. lt_cv_deplibs_check_method=pass_all
  2983. ;;
  2984. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2985. lt_cv_deplibs_check_method=pass_all
  2986. ;;
  2987. sysv4 | sysv4.3*)
  2988. case $host_vendor in
  2989. motorola)
  2990. 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]]'
  2991. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  2992. ;;
  2993. ncr)
  2994. lt_cv_deplibs_check_method=pass_all
  2995. ;;
  2996. sequent)
  2997. lt_cv_file_magic_cmd='/bin/file'
  2998. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  2999. ;;
  3000. sni)
  3001. lt_cv_file_magic_cmd='/bin/file'
  3002. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3003. lt_cv_file_magic_test_file=/lib/libc.so
  3004. ;;
  3005. siemens)
  3006. lt_cv_deplibs_check_method=pass_all
  3007. ;;
  3008. pc)
  3009. lt_cv_deplibs_check_method=pass_all
  3010. ;;
  3011. esac
  3012. ;;
  3013. tpf*)
  3014. lt_cv_deplibs_check_method=pass_all
  3015. ;;
  3016. esac
  3017. ])
  3018. file_magic_glob=
  3019. want_nocaseglob=no
  3020. if test "$build" = "$host"; then
  3021. case $host_os in
  3022. mingw* | pw32*)
  3023. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3024. want_nocaseglob=yes
  3025. else
  3026. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3027. fi
  3028. ;;
  3029. esac
  3030. fi
  3031. file_magic_cmd=$lt_cv_file_magic_cmd
  3032. deplibs_check_method=$lt_cv_deplibs_check_method
  3033. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3034. _LT_DECL([], [deplibs_check_method], [1],
  3035. [Method to check whether dependent libraries are shared objects])
  3036. _LT_DECL([], [file_magic_cmd], [1],
  3037. [Command to use when deplibs_check_method = "file_magic"])
  3038. _LT_DECL([], [file_magic_glob], [1],
  3039. [How to find potential files when deplibs_check_method = "file_magic"])
  3040. _LT_DECL([], [want_nocaseglob], [1],
  3041. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3042. ])# _LT_CHECK_MAGIC_METHOD
  3043. # LT_PATH_NM
  3044. # ----------
  3045. # find the pathname to a BSD- or MS-compatible name lister
  3046. AC_DEFUN([LT_PATH_NM],
  3047. [AC_REQUIRE([AC_PROG_CC])dnl
  3048. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3049. [if test -n "$NM"; then
  3050. # Let the user override the test.
  3051. lt_cv_path_NM="$NM"
  3052. else
  3053. lt_nm_to_check="${ac_tool_prefix}nm"
  3054. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3055. lt_nm_to_check="$lt_nm_to_check nm"
  3056. fi
  3057. for lt_tmp_nm in $lt_nm_to_check; do
  3058. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3059. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3060. IFS="$lt_save_ifs"
  3061. test -z "$ac_dir" && ac_dir=.
  3062. tmp_nm="$ac_dir/$lt_tmp_nm"
  3063. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  3064. # Check to see if the nm accepts a BSD-compat flag.
  3065. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3066. # nm: unknown option "B" ignored
  3067. # Tru64's nm complains that /dev/null is an invalid object file
  3068. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  3069. */dev/null* | *'Invalid file or object type'*)
  3070. lt_cv_path_NM="$tmp_nm -B"
  3071. break
  3072. ;;
  3073. *)
  3074. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3075. */dev/null*)
  3076. lt_cv_path_NM="$tmp_nm -p"
  3077. break
  3078. ;;
  3079. *)
  3080. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3081. continue # so that we can try to find one that supports BSD flags
  3082. ;;
  3083. esac
  3084. ;;
  3085. esac
  3086. fi
  3087. done
  3088. IFS="$lt_save_ifs"
  3089. done
  3090. : ${lt_cv_path_NM=no}
  3091. fi])
  3092. if test "$lt_cv_path_NM" != "no"; then
  3093. NM="$lt_cv_path_NM"
  3094. else
  3095. # Didn't find any BSD compatible name lister, look for dumpbin.
  3096. if test -n "$DUMPBIN"; then :
  3097. # Let the user override the test.
  3098. else
  3099. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3100. case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
  3101. *COFF*)
  3102. DUMPBIN="$DUMPBIN -symbols"
  3103. ;;
  3104. *)
  3105. DUMPBIN=:
  3106. ;;
  3107. esac
  3108. fi
  3109. AC_SUBST([DUMPBIN])
  3110. if test "$DUMPBIN" != ":"; then
  3111. NM="$DUMPBIN"
  3112. fi
  3113. fi
  3114. test -z "$NM" && NM=nm
  3115. AC_SUBST([NM])
  3116. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3117. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3118. [lt_cv_nm_interface="BSD nm"
  3119. echo "int some_variable = 0;" > conftest.$ac_ext
  3120. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3121. (eval "$ac_compile" 2>conftest.err)
  3122. cat conftest.err >&AS_MESSAGE_LOG_FD
  3123. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3124. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3125. cat conftest.err >&AS_MESSAGE_LOG_FD
  3126. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3127. cat conftest.out >&AS_MESSAGE_LOG_FD
  3128. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3129. lt_cv_nm_interface="MS dumpbin"
  3130. fi
  3131. rm -f conftest*])
  3132. ])# LT_PATH_NM
  3133. # Old names:
  3134. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3135. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3136. dnl aclocal-1.4 backwards compatibility:
  3137. dnl AC_DEFUN([AM_PROG_NM], [])
  3138. dnl AC_DEFUN([AC_PROG_NM], [])
  3139. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3140. # --------------------------------
  3141. # how to determine the name of the shared library
  3142. # associated with a specific link library.
  3143. # -- PORTME fill in with the dynamic library characteristics
  3144. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3145. [m4_require([_LT_DECL_EGREP])
  3146. m4_require([_LT_DECL_OBJDUMP])
  3147. m4_require([_LT_DECL_DLLTOOL])
  3148. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3149. lt_cv_sharedlib_from_linklib_cmd,
  3150. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3151. case $host_os in
  3152. cygwin* | mingw* | pw32* | cegcc*)
  3153. # two different shell functions defined in ltmain.sh
  3154. # decide which to use based on capabilities of $DLLTOOL
  3155. case `$DLLTOOL --help 2>&1` in
  3156. *--identify-strict*)
  3157. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3158. ;;
  3159. *)
  3160. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3161. ;;
  3162. esac
  3163. ;;
  3164. *)
  3165. # fallback: assume linklib IS sharedlib
  3166. lt_cv_sharedlib_from_linklib_cmd="$ECHO"
  3167. ;;
  3168. esac
  3169. ])
  3170. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3171. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3172. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3173. [Command to associate shared and link libraries])
  3174. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3175. # _LT_PATH_MANIFEST_TOOL
  3176. # ----------------------
  3177. # locate the manifest tool
  3178. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3179. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3180. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3181. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3182. [lt_cv_path_mainfest_tool=no
  3183. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3184. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3185. cat conftest.err >&AS_MESSAGE_LOG_FD
  3186. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3187. lt_cv_path_mainfest_tool=yes
  3188. fi
  3189. rm -f conftest*])
  3190. if test "x$lt_cv_path_mainfest_tool" != xyes; then
  3191. MANIFEST_TOOL=:
  3192. fi
  3193. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3194. ])# _LT_PATH_MANIFEST_TOOL
  3195. # LT_LIB_M
  3196. # --------
  3197. # check for math library
  3198. AC_DEFUN([LT_LIB_M],
  3199. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3200. LIBM=
  3201. case $host in
  3202. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3203. # These system don't have libm, or don't need it
  3204. ;;
  3205. *-ncr-sysv4.3*)
  3206. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3207. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3208. ;;
  3209. *)
  3210. AC_CHECK_LIB(m, cos, LIBM="-lm")
  3211. ;;
  3212. esac
  3213. AC_SUBST([LIBM])
  3214. ])# LT_LIB_M
  3215. # Old name:
  3216. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3217. dnl aclocal-1.4 backwards compatibility:
  3218. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3219. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3220. # -------------------------------
  3221. m4_defun([_LT_COMPILER_NO_RTTI],
  3222. [m4_require([_LT_TAG_COMPILER])dnl
  3223. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3224. if test "$GCC" = yes; then
  3225. case $cc_basename in
  3226. nvcc*)
  3227. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3228. *)
  3229. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3230. esac
  3231. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3232. lt_cv_prog_compiler_rtti_exceptions,
  3233. [-fno-rtti -fno-exceptions], [],
  3234. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3235. fi
  3236. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3237. [Compiler flag to turn off builtin functions])
  3238. ])# _LT_COMPILER_NO_RTTI
  3239. # _LT_CMD_GLOBAL_SYMBOLS
  3240. # ----------------------
  3241. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3242. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3243. AC_REQUIRE([AC_PROG_CC])dnl
  3244. AC_REQUIRE([AC_PROG_AWK])dnl
  3245. AC_REQUIRE([LT_PATH_NM])dnl
  3246. AC_REQUIRE([LT_PATH_LD])dnl
  3247. m4_require([_LT_DECL_SED])dnl
  3248. m4_require([_LT_DECL_EGREP])dnl
  3249. m4_require([_LT_TAG_COMPILER])dnl
  3250. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3251. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3252. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3253. [
  3254. # These are sane defaults that work on at least a few old systems.
  3255. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3256. # Character class describing NM global symbol codes.
  3257. symcode='[[BCDEGRST]]'
  3258. # Regexp to match symbols that can be accessed directly from C.
  3259. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3260. # Define system-specific variables.
  3261. case $host_os in
  3262. aix*)
  3263. symcode='[[BCDT]]'
  3264. ;;
  3265. cygwin* | mingw* | pw32* | cegcc*)
  3266. symcode='[[ABCDGISTW]]'
  3267. ;;
  3268. hpux*)
  3269. if test "$host_cpu" = ia64; then
  3270. symcode='[[ABCDEGRST]]'
  3271. fi
  3272. ;;
  3273. irix* | nonstopux*)
  3274. symcode='[[BCDEGRST]]'
  3275. ;;
  3276. osf*)
  3277. symcode='[[BCDEGQRST]]'
  3278. ;;
  3279. solaris*)
  3280. symcode='[[BDRT]]'
  3281. ;;
  3282. sco3.2v5*)
  3283. symcode='[[DT]]'
  3284. ;;
  3285. sysv4.2uw2*)
  3286. symcode='[[DT]]'
  3287. ;;
  3288. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3289. symcode='[[ABDT]]'
  3290. ;;
  3291. sysv4)
  3292. symcode='[[DFNSTU]]'
  3293. ;;
  3294. esac
  3295. # If we're using GNU nm, then use its standard symbol codes.
  3296. case `$NM -V 2>&1` in
  3297. *GNU* | *'with BFD'*)
  3298. symcode='[[ABCDGIRSTW]]' ;;
  3299. esac
  3300. # Transform an extracted symbol line into a proper C declaration.
  3301. # Some systems (esp. on ia64) link data and code symbols differently,
  3302. # so use this general approach.
  3303. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3304. # Transform an extracted symbol line into symbol name and symbol address
  3305. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  3306. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
  3307. # Handle CRLF in mingw tool chain
  3308. opt_cr=
  3309. case $build_os in
  3310. mingw*)
  3311. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3312. ;;
  3313. esac
  3314. # Try without a prefix underscore, then with it.
  3315. for ac_symprfx in "" "_"; do
  3316. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3317. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3318. # Write the raw and C identifiers.
  3319. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3320. # Fake it for dumpbin and say T for any non-static function
  3321. # and D for any global variable.
  3322. # Also find C++ and __fastcall symbols from MSVC++,
  3323. # which start with @ or ?.
  3324. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3325. " {last_section=section; section=\$ 3};"\
  3326. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3327. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3328. " \$ 0!~/External *\|/{next};"\
  3329. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3330. " {if(hide[section]) next};"\
  3331. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  3332. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  3333. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  3334. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  3335. " ' prfx=^$ac_symprfx]"
  3336. else
  3337. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3338. fi
  3339. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3340. # Check to see that the pipe works correctly.
  3341. pipe_works=no
  3342. rm -f conftest*
  3343. cat > conftest.$ac_ext <<_LT_EOF
  3344. #ifdef __cplusplus
  3345. extern "C" {
  3346. #endif
  3347. char nm_test_var;
  3348. void nm_test_func(void);
  3349. void nm_test_func(void){}
  3350. #ifdef __cplusplus
  3351. }
  3352. #endif
  3353. int main(){nm_test_var='a';nm_test_func();return(0);}
  3354. _LT_EOF
  3355. if AC_TRY_EVAL(ac_compile); then
  3356. # Now try to grab the symbols.
  3357. nlist=conftest.nm
  3358. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  3359. # Try sorting and uniquifying the output.
  3360. if sort "$nlist" | uniq > "$nlist"T; then
  3361. mv -f "$nlist"T "$nlist"
  3362. else
  3363. rm -f "$nlist"T
  3364. fi
  3365. # Make sure that we snagged all the symbols we need.
  3366. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3367. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3368. cat <<_LT_EOF > conftest.$ac_ext
  3369. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3370. #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
  3371. /* DATA imports from DLLs on WIN32 con't be const, because runtime
  3372. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3373. # define LT@&t@_DLSYM_CONST
  3374. #elif defined(__osf__)
  3375. /* This system does not cope well with relocations in const data. */
  3376. # define LT@&t@_DLSYM_CONST
  3377. #else
  3378. # define LT@&t@_DLSYM_CONST const
  3379. #endif
  3380. #ifdef __cplusplus
  3381. extern "C" {
  3382. #endif
  3383. _LT_EOF
  3384. # Now generate the symbol file.
  3385. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3386. cat <<_LT_EOF >> conftest.$ac_ext
  3387. /* The mapping between symbol names and symbols. */
  3388. LT@&t@_DLSYM_CONST struct {
  3389. const char *name;
  3390. void *address;
  3391. }
  3392. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3393. {
  3394. { "@PROGRAM@", (void *) 0 },
  3395. _LT_EOF
  3396. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3397. cat <<\_LT_EOF >> conftest.$ac_ext
  3398. {0, (void *) 0}
  3399. };
  3400. /* This works around a problem in FreeBSD linker */
  3401. #ifdef FREEBSD_WORKAROUND
  3402. static const void *lt_preloaded_setup() {
  3403. return lt__PROGRAM__LTX_preloaded_symbols;
  3404. }
  3405. #endif
  3406. #ifdef __cplusplus
  3407. }
  3408. #endif
  3409. _LT_EOF
  3410. # Now try linking the two files.
  3411. mv conftest.$ac_objext conftstm.$ac_objext
  3412. lt_globsym_save_LIBS=$LIBS
  3413. lt_globsym_save_CFLAGS=$CFLAGS
  3414. LIBS="conftstm.$ac_objext"
  3415. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3416. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3417. pipe_works=yes
  3418. fi
  3419. LIBS=$lt_globsym_save_LIBS
  3420. CFLAGS=$lt_globsym_save_CFLAGS
  3421. else
  3422. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3423. fi
  3424. else
  3425. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3426. fi
  3427. else
  3428. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3429. fi
  3430. else
  3431. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3432. cat conftest.$ac_ext >&5
  3433. fi
  3434. rm -rf conftest* conftst*
  3435. # Do not use the global_symbol_pipe unless it works.
  3436. if test "$pipe_works" = yes; then
  3437. break
  3438. else
  3439. lt_cv_sys_global_symbol_pipe=
  3440. fi
  3441. done
  3442. ])
  3443. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3444. lt_cv_sys_global_symbol_to_cdecl=
  3445. fi
  3446. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3447. AC_MSG_RESULT(failed)
  3448. else
  3449. AC_MSG_RESULT(ok)
  3450. fi
  3451. # Response file support.
  3452. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3453. nm_file_list_spec='@'
  3454. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3455. nm_file_list_spec='@'
  3456. fi
  3457. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3458. [Take the output of nm and produce a listing of raw symbols and C names])
  3459. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3460. [Transform the output of nm in a proper C declaration])
  3461. _LT_DECL([global_symbol_to_c_name_address],
  3462. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3463. [Transform the output of nm in a C name address pair])
  3464. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3465. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3466. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3467. _LT_DECL([], [nm_file_list_spec], [1],
  3468. [Specify filename containing input files for $NM])
  3469. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3470. # _LT_COMPILER_PIC([TAGNAME])
  3471. # ---------------------------
  3472. m4_defun([_LT_COMPILER_PIC],
  3473. [m4_require([_LT_TAG_COMPILER])dnl
  3474. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3475. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3476. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3477. m4_if([$1], [CXX], [
  3478. # C++ specific cases for pic, static, wl, etc.
  3479. if test "$GXX" = yes; then
  3480. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3481. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3482. case $host_os in
  3483. aix*)
  3484. # All AIX code is PIC.
  3485. if test "$host_cpu" = ia64; then
  3486. # AIX 5 now supports IA64 processor
  3487. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3488. fi
  3489. ;;
  3490. amigaos*)
  3491. case $host_cpu in
  3492. powerpc)
  3493. # see comment about AmigaOS4 .so support
  3494. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3495. ;;
  3496. m68k)
  3497. # FIXME: we need at least 68020 code to build shared libraries, but
  3498. # adding the `-m68020' flag to GCC prevents building anything better,
  3499. # like `-m68040'.
  3500. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3501. ;;
  3502. esac
  3503. ;;
  3504. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3505. # PIC is the default for these OSes.
  3506. ;;
  3507. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3508. # This hack is so that the source file can tell whether it is being
  3509. # built for inclusion in a dll (and should export symbols for example).
  3510. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3511. # (--disable-auto-import) libraries
  3512. m4_if([$1], [GCJ], [],
  3513. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3514. ;;
  3515. darwin* | rhapsody*)
  3516. # PIC is the default on this platform
  3517. # Common symbols not allowed in MH_DYLIB files
  3518. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3519. ;;
  3520. *djgpp*)
  3521. # DJGPP does not support shared libraries at all
  3522. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3523. ;;
  3524. haiku*)
  3525. # PIC is the default for Haiku.
  3526. # The "-static" flag exists, but is broken.
  3527. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3528. ;;
  3529. interix[[3-9]]*)
  3530. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3531. # Instead, we relocate shared libraries at runtime.
  3532. ;;
  3533. sysv4*MP*)
  3534. if test -d /usr/nec; then
  3535. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3536. fi
  3537. ;;
  3538. hpux*)
  3539. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3540. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3541. # sets the default TLS model and affects inlining.
  3542. case $host_cpu in
  3543. hppa*64*)
  3544. ;;
  3545. *)
  3546. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3547. ;;
  3548. esac
  3549. ;;
  3550. *qnx* | *nto*)
  3551. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3552. # it will coredump.
  3553. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3554. ;;
  3555. *)
  3556. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3557. ;;
  3558. esac
  3559. else
  3560. case $host_os in
  3561. aix[[4-9]]*)
  3562. # All AIX code is PIC.
  3563. if test "$host_cpu" = ia64; then
  3564. # AIX 5 now supports IA64 processor
  3565. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3566. else
  3567. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3568. fi
  3569. ;;
  3570. chorus*)
  3571. case $cc_basename in
  3572. cxch68*)
  3573. # Green Hills C++ Compiler
  3574. # _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"
  3575. ;;
  3576. esac
  3577. ;;
  3578. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3579. # This hack is so that the source file can tell whether it is being
  3580. # built for inclusion in a dll (and should export symbols for example).
  3581. m4_if([$1], [GCJ], [],
  3582. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3583. ;;
  3584. dgux*)
  3585. case $cc_basename in
  3586. ec++*)
  3587. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3588. ;;
  3589. ghcx*)
  3590. # Green Hills C++ Compiler
  3591. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3592. ;;
  3593. *)
  3594. ;;
  3595. esac
  3596. ;;
  3597. freebsd* | dragonfly*)
  3598. # FreeBSD uses GNU C++
  3599. ;;
  3600. hpux9* | hpux10* | hpux11*)
  3601. case $cc_basename in
  3602. CC*)
  3603. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3604. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3605. if test "$host_cpu" != ia64; then
  3606. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3607. fi
  3608. ;;
  3609. aCC*)
  3610. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3611. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3612. case $host_cpu in
  3613. hppa*64*|ia64*)
  3614. # +Z the default
  3615. ;;
  3616. *)
  3617. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3618. ;;
  3619. esac
  3620. ;;
  3621. *)
  3622. ;;
  3623. esac
  3624. ;;
  3625. interix*)
  3626. # This is c89, which is MS Visual C++ (no shared libs)
  3627. # Anyone wants to do a port?
  3628. ;;
  3629. irix5* | irix6* | nonstopux*)
  3630. case $cc_basename in
  3631. CC*)
  3632. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3633. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3634. # CC pic flag -KPIC is the default.
  3635. ;;
  3636. *)
  3637. ;;
  3638. esac
  3639. ;;
  3640. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3641. case $cc_basename in
  3642. KCC*)
  3643. # KAI C++ Compiler
  3644. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3645. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3646. ;;
  3647. ecpc* )
  3648. # old Intel C++ for x86_64 which still supported -KPIC.
  3649. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3650. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3651. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3652. ;;
  3653. icpc* )
  3654. # Intel C++, used to be incompatible with GCC.
  3655. # ICC 10 doesn't accept -KPIC any more.
  3656. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3657. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3658. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3659. ;;
  3660. pgCC* | pgcpp*)
  3661. # Portland Group C++ compiler
  3662. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3663. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3664. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3665. ;;
  3666. cxx*)
  3667. # Compaq C++
  3668. # Make sure the PIC flag is empty. It appears that all Alpha
  3669. # Linux and Compaq Tru64 Unix objects are PIC.
  3670. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3671. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3672. ;;
  3673. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3674. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3675. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3676. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3677. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3678. ;;
  3679. *)
  3680. case `$CC -V 2>&1 | sed 5q` in
  3681. *Sun\ C*)
  3682. # Sun C++ 5.9
  3683. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3684. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3685. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3686. ;;
  3687. esac
  3688. ;;
  3689. esac
  3690. ;;
  3691. lynxos*)
  3692. ;;
  3693. m88k*)
  3694. ;;
  3695. mvs*)
  3696. case $cc_basename in
  3697. cxx*)
  3698. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  3699. ;;
  3700. *)
  3701. ;;
  3702. esac
  3703. ;;
  3704. netbsd* | netbsdelf*-gnu)
  3705. ;;
  3706. *qnx* | *nto*)
  3707. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3708. # it will coredump.
  3709. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3710. ;;
  3711. osf3* | osf4* | osf5*)
  3712. case $cc_basename in
  3713. KCC*)
  3714. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3715. ;;
  3716. RCC*)
  3717. # Rational C++ 2.4.1
  3718. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3719. ;;
  3720. cxx*)
  3721. # Digital/Compaq C++
  3722. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3723. # Make sure the PIC flag is empty. It appears that all Alpha
  3724. # Linux and Compaq Tru64 Unix objects are PIC.
  3725. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3726. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3727. ;;
  3728. *)
  3729. ;;
  3730. esac
  3731. ;;
  3732. psos*)
  3733. ;;
  3734. solaris*)
  3735. case $cc_basename in
  3736. CC* | sunCC*)
  3737. # Sun C++ 4.2, 5.x and Centerline C++
  3738. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3739. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3740. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3741. ;;
  3742. gcx*)
  3743. # Green Hills C++ Compiler
  3744. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3745. ;;
  3746. *)
  3747. ;;
  3748. esac
  3749. ;;
  3750. sunos4*)
  3751. case $cc_basename in
  3752. CC*)
  3753. # Sun C++ 4.x
  3754. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3755. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3756. ;;
  3757. lcc*)
  3758. # Lucid
  3759. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3760. ;;
  3761. *)
  3762. ;;
  3763. esac
  3764. ;;
  3765. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  3766. case $cc_basename in
  3767. CC*)
  3768. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3769. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3770. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3771. ;;
  3772. esac
  3773. ;;
  3774. tandem*)
  3775. case $cc_basename in
  3776. NCC*)
  3777. # NonStop-UX NCC 3.20
  3778. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3779. ;;
  3780. *)
  3781. ;;
  3782. esac
  3783. ;;
  3784. vxworks*)
  3785. ;;
  3786. *)
  3787. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3788. ;;
  3789. esac
  3790. fi
  3791. ],
  3792. [
  3793. if test "$GCC" = yes; then
  3794. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3795. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3796. case $host_os in
  3797. aix*)
  3798. # All AIX code is PIC.
  3799. if test "$host_cpu" = ia64; then
  3800. # AIX 5 now supports IA64 processor
  3801. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3802. fi
  3803. ;;
  3804. amigaos*)
  3805. case $host_cpu in
  3806. powerpc)
  3807. # see comment about AmigaOS4 .so support
  3808. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3809. ;;
  3810. m68k)
  3811. # FIXME: we need at least 68020 code to build shared libraries, but
  3812. # adding the `-m68020' flag to GCC prevents building anything better,
  3813. # like `-m68040'.
  3814. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3815. ;;
  3816. esac
  3817. ;;
  3818. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3819. # PIC is the default for these OSes.
  3820. ;;
  3821. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3822. # This hack is so that the source file can tell whether it is being
  3823. # built for inclusion in a dll (and should export symbols for example).
  3824. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3825. # (--disable-auto-import) libraries
  3826. m4_if([$1], [GCJ], [],
  3827. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3828. ;;
  3829. darwin* | rhapsody*)
  3830. # PIC is the default on this platform
  3831. # Common symbols not allowed in MH_DYLIB files
  3832. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3833. ;;
  3834. haiku*)
  3835. # PIC is the default for Haiku.
  3836. # The "-static" flag exists, but is broken.
  3837. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3838. ;;
  3839. hpux*)
  3840. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3841. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3842. # sets the default TLS model and affects inlining.
  3843. case $host_cpu in
  3844. hppa*64*)
  3845. # +Z the default
  3846. ;;
  3847. *)
  3848. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3849. ;;
  3850. esac
  3851. ;;
  3852. interix[[3-9]]*)
  3853. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3854. # Instead, we relocate shared libraries at runtime.
  3855. ;;
  3856. msdosdjgpp*)
  3857. # Just because we use GCC doesn't mean we suddenly get shared libraries
  3858. # on systems that don't support them.
  3859. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3860. enable_shared=no
  3861. ;;
  3862. *nto* | *qnx*)
  3863. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3864. # it will coredump.
  3865. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3866. ;;
  3867. sysv4*MP*)
  3868. if test -d /usr/nec; then
  3869. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3870. fi
  3871. ;;
  3872. *)
  3873. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3874. ;;
  3875. esac
  3876. case $cc_basename in
  3877. nvcc*) # Cuda Compiler Driver 2.2
  3878. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  3879. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  3880. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  3881. fi
  3882. ;;
  3883. esac
  3884. else
  3885. # PORTME Check for flag to pass linker flags through the system compiler.
  3886. case $host_os in
  3887. aix*)
  3888. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3889. if test "$host_cpu" = ia64; then
  3890. # AIX 5 now supports IA64 processor
  3891. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3892. else
  3893. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3894. fi
  3895. ;;
  3896. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3897. # This hack is so that the source file can tell whether it is being
  3898. # built for inclusion in a dll (and should export symbols for example).
  3899. m4_if([$1], [GCJ], [],
  3900. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3901. ;;
  3902. hpux9* | hpux10* | hpux11*)
  3903. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3904. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  3905. # not for PA HP-UX.
  3906. case $host_cpu in
  3907. hppa*64*|ia64*)
  3908. # +Z the default
  3909. ;;
  3910. *)
  3911. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3912. ;;
  3913. esac
  3914. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  3915. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3916. ;;
  3917. irix5* | irix6* | nonstopux*)
  3918. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3919. # PIC (with -KPIC) is the default.
  3920. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3921. ;;
  3922. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3923. case $cc_basename in
  3924. # old Intel for x86_64 which still supported -KPIC.
  3925. ecc*)
  3926. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3927. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3928. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3929. ;;
  3930. # icc used to be incompatible with GCC.
  3931. # ICC 10 doesn't accept -KPIC any more.
  3932. icc* | ifort*)
  3933. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3934. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3935. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3936. ;;
  3937. # Lahey Fortran 8.1.
  3938. lf95*)
  3939. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3940. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  3941. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  3942. ;;
  3943. nagfor*)
  3944. # NAG Fortran compiler
  3945. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  3946. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3947. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3948. ;;
  3949. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  3950. # Portland Group compilers (*not* the Pentium gcc compiler,
  3951. # which looks to be a dead project)
  3952. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3953. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3954. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3955. ;;
  3956. ccc*)
  3957. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3958. # All Alpha code is PIC.
  3959. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3960. ;;
  3961. xl* | bgxl* | bgf* | mpixl*)
  3962. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  3963. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3964. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3965. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3966. ;;
  3967. *)
  3968. case `$CC -V 2>&1 | sed 5q` in
  3969. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  3970. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  3971. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3972. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3973. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  3974. ;;
  3975. *Sun\ F* | *Sun*Fortran*)
  3976. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3977. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3978. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3979. ;;
  3980. *Sun\ C*)
  3981. # Sun C 5.9
  3982. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3983. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3984. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3985. ;;
  3986. *Intel*\ [[CF]]*Compiler*)
  3987. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3988. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3989. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3990. ;;
  3991. *Portland\ Group*)
  3992. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3993. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3994. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3995. ;;
  3996. esac
  3997. ;;
  3998. esac
  3999. ;;
  4000. newsos6)
  4001. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4002. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4003. ;;
  4004. *nto* | *qnx*)
  4005. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4006. # it will coredump.
  4007. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4008. ;;
  4009. osf3* | osf4* | osf5*)
  4010. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4011. # All OSF/1 code is PIC.
  4012. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4013. ;;
  4014. rdos*)
  4015. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4016. ;;
  4017. solaris*)
  4018. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4019. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4020. case $cc_basename in
  4021. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4022. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4023. *)
  4024. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4025. esac
  4026. ;;
  4027. sunos4*)
  4028. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4029. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4030. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4031. ;;
  4032. sysv4 | sysv4.2uw2* | sysv4.3*)
  4033. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4034. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4035. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4036. ;;
  4037. sysv4*MP*)
  4038. if test -d /usr/nec ;then
  4039. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4040. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4041. fi
  4042. ;;
  4043. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4044. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4045. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4046. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4047. ;;
  4048. unicos*)
  4049. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4050. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4051. ;;
  4052. uts4*)
  4053. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4054. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4055. ;;
  4056. *)
  4057. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4058. ;;
  4059. esac
  4060. fi
  4061. ])
  4062. case $host_os in
  4063. # For platforms which do not support PIC, -DPIC is meaningless:
  4064. *djgpp*)
  4065. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4066. ;;
  4067. *)
  4068. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4069. ;;
  4070. esac
  4071. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4072. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4073. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4074. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4075. #
  4076. # Check to make sure the PIC flag actually works.
  4077. #
  4078. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4079. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4080. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4081. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4082. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4083. "" | " "*) ;;
  4084. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4085. esac],
  4086. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4087. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4088. fi
  4089. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4090. [Additional compiler flags for building library objects])
  4091. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4092. [How to pass a linker flag through the compiler])
  4093. #
  4094. # Check to make sure the static flag actually works.
  4095. #
  4096. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4097. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4098. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4099. $lt_tmp_static_flag,
  4100. [],
  4101. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4102. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4103. [Compiler flag to prevent dynamic linking])
  4104. ])# _LT_COMPILER_PIC
  4105. # _LT_LINKER_SHLIBS([TAGNAME])
  4106. # ----------------------------
  4107. # See if the linker supports building shared libraries.
  4108. m4_defun([_LT_LINKER_SHLIBS],
  4109. [AC_REQUIRE([LT_PATH_LD])dnl
  4110. AC_REQUIRE([LT_PATH_NM])dnl
  4111. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4112. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4113. m4_require([_LT_DECL_EGREP])dnl
  4114. m4_require([_LT_DECL_SED])dnl
  4115. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4116. m4_require([_LT_TAG_COMPILER])dnl
  4117. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4118. m4_if([$1], [CXX], [
  4119. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4120. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4121. case $host_os in
  4122. aix[[4-9]]*)
  4123. # If we're using GNU nm, then we don't want the "-C" option.
  4124. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4125. # Also, AIX nm treats weak defined symbols like other global defined
  4126. # symbols, whereas GNU nm marks them as "W".
  4127. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4128. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4129. else
  4130. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4131. fi
  4132. ;;
  4133. pw32*)
  4134. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4135. ;;
  4136. cygwin* | mingw* | cegcc*)
  4137. case $cc_basename in
  4138. cl*)
  4139. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4140. ;;
  4141. *)
  4142. _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'
  4143. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4144. ;;
  4145. esac
  4146. ;;
  4147. linux* | k*bsd*-gnu | gnu*)
  4148. _LT_TAGVAR(link_all_deplibs, $1)=no
  4149. ;;
  4150. *)
  4151. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4152. ;;
  4153. esac
  4154. ], [
  4155. runpath_var=
  4156. _LT_TAGVAR(allow_undefined_flag, $1)=
  4157. _LT_TAGVAR(always_export_symbols, $1)=no
  4158. _LT_TAGVAR(archive_cmds, $1)=
  4159. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4160. _LT_TAGVAR(compiler_needs_object, $1)=no
  4161. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4162. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4163. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4164. _LT_TAGVAR(hardcode_automatic, $1)=no
  4165. _LT_TAGVAR(hardcode_direct, $1)=no
  4166. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4167. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4168. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4169. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4170. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4171. _LT_TAGVAR(inherit_rpath, $1)=no
  4172. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4173. _LT_TAGVAR(module_cmds, $1)=
  4174. _LT_TAGVAR(module_expsym_cmds, $1)=
  4175. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4176. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4177. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4178. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4179. # include_expsyms should be a list of space-separated symbols to be *always*
  4180. # included in the symbol list
  4181. _LT_TAGVAR(include_expsyms, $1)=
  4182. # exclude_expsyms can be an extended regexp of symbols to exclude
  4183. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4184. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4185. # as well as any symbol that contains `d'.
  4186. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4187. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4188. # platforms (ab)use it in PIC code, but their linkers get confused if
  4189. # the symbol is explicitly referenced. Since portable code cannot
  4190. # rely on this symbol name, it's probably fine to never include it in
  4191. # preloaded symbol tables.
  4192. # Exclude shared library initialization/finalization symbols.
  4193. dnl Note also adjust exclude_expsyms for C++ above.
  4194. extract_expsyms_cmds=
  4195. case $host_os in
  4196. cygwin* | mingw* | pw32* | cegcc*)
  4197. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4198. # When not using gcc, we currently assume that we are using
  4199. # Microsoft Visual C++.
  4200. if test "$GCC" != yes; then
  4201. with_gnu_ld=no
  4202. fi
  4203. ;;
  4204. interix*)
  4205. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4206. with_gnu_ld=yes
  4207. ;;
  4208. openbsd*)
  4209. with_gnu_ld=no
  4210. ;;
  4211. linux* | k*bsd*-gnu | gnu*)
  4212. _LT_TAGVAR(link_all_deplibs, $1)=no
  4213. ;;
  4214. esac
  4215. _LT_TAGVAR(ld_shlibs, $1)=yes
  4216. # On some targets, GNU ld is compatible enough with the native linker
  4217. # that we're better off using the native interface for both.
  4218. lt_use_gnu_ld_interface=no
  4219. if test "$with_gnu_ld" = yes; then
  4220. case $host_os in
  4221. aix*)
  4222. # The AIX port of GNU ld has always aspired to compatibility
  4223. # with the native linker. However, as the warning in the GNU ld
  4224. # block says, versions before 2.19.5* couldn't really create working
  4225. # shared libraries, regardless of the interface used.
  4226. case `$LD -v 2>&1` in
  4227. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4228. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4229. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4230. *)
  4231. lt_use_gnu_ld_interface=yes
  4232. ;;
  4233. esac
  4234. ;;
  4235. *)
  4236. lt_use_gnu_ld_interface=yes
  4237. ;;
  4238. esac
  4239. fi
  4240. if test "$lt_use_gnu_ld_interface" = yes; then
  4241. # If archive_cmds runs LD, not CC, wlarc should be empty
  4242. wlarc='${wl}'
  4243. # Set some defaults for GNU ld with shared library support. These
  4244. # are reset later if shared libraries are not supported. Putting them
  4245. # here allows them to be overridden if necessary.
  4246. runpath_var=LD_RUN_PATH
  4247. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4248. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4249. # ancient GNU ld didn't support --whole-archive et. al.
  4250. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4251. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4252. else
  4253. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4254. fi
  4255. supports_anon_versioning=no
  4256. case `$LD -v 2>&1` in
  4257. *GNU\ gold*) supports_anon_versioning=yes ;;
  4258. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4259. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4260. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4261. *\ 2.11.*) ;; # other 2.11 versions
  4262. *) supports_anon_versioning=yes ;;
  4263. esac
  4264. # See if GNU ld supports shared libraries.
  4265. case $host_os in
  4266. aix[[3-9]]*)
  4267. # On AIX/PPC, the GNU linker is very broken
  4268. if test "$host_cpu" != ia64; then
  4269. _LT_TAGVAR(ld_shlibs, $1)=no
  4270. cat <<_LT_EOF 1>&2
  4271. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4272. *** to be unable to reliably create shared libraries on AIX.
  4273. *** Therefore, libtool is disabling shared libraries support. If you
  4274. *** really care for shared libraries, you may want to install binutils
  4275. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4276. *** You will then need to restart the configuration process.
  4277. _LT_EOF
  4278. fi
  4279. ;;
  4280. amigaos*)
  4281. case $host_cpu in
  4282. powerpc)
  4283. # see comment about AmigaOS4 .so support
  4284. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4285. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4286. ;;
  4287. m68k)
  4288. _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)'
  4289. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4290. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4291. ;;
  4292. esac
  4293. ;;
  4294. beos*)
  4295. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4296. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4297. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4298. # support --undefined. This deserves some investigation. FIXME
  4299. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4300. else
  4301. _LT_TAGVAR(ld_shlibs, $1)=no
  4302. fi
  4303. ;;
  4304. cygwin* | mingw* | pw32* | cegcc*)
  4305. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4306. # as there is no search path for DLLs.
  4307. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4308. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  4309. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4310. _LT_TAGVAR(always_export_symbols, $1)=no
  4311. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4312. _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'
  4313. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4314. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4315. _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'
  4316. # If the export-symbols file already is a .def file (1st line
  4317. # is EXPORTS), use it as is; otherwise, prepend...
  4318. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4319. cp $export_symbols $output_objdir/$soname.def;
  4320. else
  4321. echo EXPORTS > $output_objdir/$soname.def;
  4322. cat $export_symbols >> $output_objdir/$soname.def;
  4323. fi~
  4324. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4325. else
  4326. _LT_TAGVAR(ld_shlibs, $1)=no
  4327. fi
  4328. ;;
  4329. haiku*)
  4330. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4331. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4332. ;;
  4333. interix[[3-9]]*)
  4334. _LT_TAGVAR(hardcode_direct, $1)=no
  4335. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4336. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4337. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4338. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4339. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4340. # default) and relocated if they conflict, which is a slow very memory
  4341. # consuming and fragmenting process. To avoid this, we pick a random,
  4342. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4343. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4344. _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'
  4345. _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'
  4346. ;;
  4347. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4348. tmp_diet=no
  4349. if test "$host_os" = linux-dietlibc; then
  4350. case $cc_basename in
  4351. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4352. esac
  4353. fi
  4354. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4355. && test "$tmp_diet" = no
  4356. then
  4357. tmp_addflag=' $pic_flag'
  4358. tmp_sharedflag='-shared'
  4359. case $cc_basename,$host_cpu in
  4360. pgcc*) # Portland Group C compiler
  4361. _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'
  4362. tmp_addflag=' $pic_flag'
  4363. ;;
  4364. pgf77* | pgf90* | pgf95* | pgfortran*)
  4365. # Portland Group f77 and f90 compilers
  4366. _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'
  4367. tmp_addflag=' $pic_flag -Mnomain' ;;
  4368. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4369. tmp_addflag=' -i_dynamic' ;;
  4370. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4371. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4372. ifc* | ifort*) # Intel Fortran compiler
  4373. tmp_addflag=' -nofor_main' ;;
  4374. lf95*) # Lahey Fortran 8.1
  4375. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4376. tmp_sharedflag='--shared' ;;
  4377. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4378. tmp_sharedflag='-qmkshrobj'
  4379. tmp_addflag= ;;
  4380. nvcc*) # Cuda Compiler Driver 2.2
  4381. _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'
  4382. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4383. ;;
  4384. esac
  4385. case `$CC -V 2>&1 | sed 5q` in
  4386. *Sun\ C*) # Sun C 5.9
  4387. _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'
  4388. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4389. tmp_sharedflag='-G' ;;
  4390. *Sun\ F*) # Sun Fortran 8.3
  4391. tmp_sharedflag='-G' ;;
  4392. esac
  4393. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4394. if test "x$supports_anon_versioning" = xyes; then
  4395. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4396. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4397. echo "local: *; };" >> $output_objdir/$libname.ver~
  4398. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4399. fi
  4400. case $cc_basename in
  4401. xlf* | bgf* | bgxlf* | mpixlf*)
  4402. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4403. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4404. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4405. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4406. if test "x$supports_anon_versioning" = xyes; then
  4407. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4408. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4409. echo "local: *; };" >> $output_objdir/$libname.ver~
  4410. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4411. fi
  4412. ;;
  4413. esac
  4414. else
  4415. _LT_TAGVAR(ld_shlibs, $1)=no
  4416. fi
  4417. ;;
  4418. netbsd* | netbsdelf*-gnu)
  4419. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4420. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4421. wlarc=
  4422. else
  4423. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4424. _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'
  4425. fi
  4426. ;;
  4427. solaris*)
  4428. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4429. _LT_TAGVAR(ld_shlibs, $1)=no
  4430. cat <<_LT_EOF 1>&2
  4431. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4432. *** create shared libraries on Solaris systems. Therefore, libtool
  4433. *** is disabling shared libraries support. We urge you to upgrade GNU
  4434. *** binutils to release 2.9.1 or newer. Another option is to modify
  4435. *** your PATH or compiler configuration so that the native linker is
  4436. *** used, and then restart.
  4437. _LT_EOF
  4438. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4439. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4440. _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'
  4441. else
  4442. _LT_TAGVAR(ld_shlibs, $1)=no
  4443. fi
  4444. ;;
  4445. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4446. case `$LD -v 2>&1` in
  4447. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4448. _LT_TAGVAR(ld_shlibs, $1)=no
  4449. cat <<_LT_EOF 1>&2
  4450. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4451. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4452. *** is disabling shared libraries support. We urge you to upgrade GNU
  4453. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4454. *** your PATH or compiler configuration so that the native linker is
  4455. *** used, and then restart.
  4456. _LT_EOF
  4457. ;;
  4458. *)
  4459. # For security reasons, it is highly recommended that you always
  4460. # use absolute paths for naming shared libraries, and exclude the
  4461. # DT_RUNPATH tag from executables and libraries. But doing so
  4462. # requires that you compile everything twice, which is a pain.
  4463. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4464. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4465. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4466. _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'
  4467. else
  4468. _LT_TAGVAR(ld_shlibs, $1)=no
  4469. fi
  4470. ;;
  4471. esac
  4472. ;;
  4473. sunos4*)
  4474. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4475. wlarc=
  4476. _LT_TAGVAR(hardcode_direct, $1)=yes
  4477. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4478. ;;
  4479. *)
  4480. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4481. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4482. _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'
  4483. else
  4484. _LT_TAGVAR(ld_shlibs, $1)=no
  4485. fi
  4486. ;;
  4487. esac
  4488. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  4489. runpath_var=
  4490. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4491. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4492. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4493. fi
  4494. else
  4495. # PORTME fill in a description of your system's linker (not GNU ld)
  4496. case $host_os in
  4497. aix3*)
  4498. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4499. _LT_TAGVAR(always_export_symbols, $1)=yes
  4500. _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'
  4501. # Note: this linker hardcodes the directories in LIBPATH if there
  4502. # are no directories specified by -L.
  4503. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4504. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  4505. # Neither direct hardcoding nor static linking is supported with a
  4506. # broken collect2.
  4507. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4508. fi
  4509. ;;
  4510. aix[[4-9]]*)
  4511. if test "$host_cpu" = ia64; then
  4512. # On IA64, the linker does run time linking by default, so we don't
  4513. # have to do anything special.
  4514. aix_use_runtimelinking=no
  4515. exp_sym_flag='-Bexport'
  4516. no_entry_flag=""
  4517. else
  4518. # If we're using GNU nm, then we don't want the "-C" option.
  4519. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4520. # Also, AIX nm treats weak defined symbols like other global
  4521. # defined symbols, whereas GNU nm marks them as "W".
  4522. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4523. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4524. else
  4525. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4526. fi
  4527. aix_use_runtimelinking=no
  4528. # Test if we are trying to use run time linking or normal
  4529. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4530. # need to do runtime linking.
  4531. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4532. for ld_flag in $LDFLAGS; do
  4533. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4534. aix_use_runtimelinking=yes
  4535. break
  4536. fi
  4537. done
  4538. ;;
  4539. esac
  4540. exp_sym_flag='-bexport'
  4541. no_entry_flag='-bnoentry'
  4542. fi
  4543. # When large executables or shared objects are built, AIX ld can
  4544. # have problems creating the table of contents. If linking a library
  4545. # or program results in "error TOC overflow" add -mminimal-toc to
  4546. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4547. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4548. _LT_TAGVAR(archive_cmds, $1)=''
  4549. _LT_TAGVAR(hardcode_direct, $1)=yes
  4550. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4551. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4552. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4553. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  4554. if test "$GCC" = yes; then
  4555. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4556. # We only want to do this on AIX 4.2 and lower, the check
  4557. # below for broken collect2 doesn't work under 4.3+
  4558. collect2name=`${CC} -print-prog-name=collect2`
  4559. if test -f "$collect2name" &&
  4560. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4561. then
  4562. # We have reworked collect2
  4563. :
  4564. else
  4565. # We have old collect2
  4566. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4567. # It fails to find uninstalled libraries when the uninstalled
  4568. # path is not listed in the libpath. Setting hardcode_minus_L
  4569. # to unsupported forces relinking
  4570. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4571. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4572. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4573. fi
  4574. ;;
  4575. esac
  4576. shared_flag='-shared'
  4577. if test "$aix_use_runtimelinking" = yes; then
  4578. shared_flag="$shared_flag "'${wl}-G'
  4579. fi
  4580. _LT_TAGVAR(link_all_deplibs, $1)=no
  4581. else
  4582. # not using gcc
  4583. if test "$host_cpu" = ia64; then
  4584. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4585. # chokes on -Wl,-G. The following line is correct:
  4586. shared_flag='-G'
  4587. else
  4588. if test "$aix_use_runtimelinking" = yes; then
  4589. shared_flag='${wl}-G'
  4590. else
  4591. shared_flag='${wl}-bM:SRE'
  4592. fi
  4593. fi
  4594. fi
  4595. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  4596. # It seems that -bexpall does not export symbols beginning with
  4597. # underscore (_), so it is better to generate a list of symbols to export.
  4598. _LT_TAGVAR(always_export_symbols, $1)=yes
  4599. if test "$aix_use_runtimelinking" = yes; then
  4600. # Warning - without using the other runtime loading flags (-brtl),
  4601. # -berok will link without error, but may produce a broken library.
  4602. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4603. # Determine the default libpath from the value encoded in an
  4604. # empty executable.
  4605. _LT_SYS_MODULE_PATH_AIX([$1])
  4606. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4607. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  4608. else
  4609. if test "$host_cpu" = ia64; then
  4610. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4611. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4612. _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"
  4613. else
  4614. # Determine the default libpath from the value encoded in an
  4615. # empty executable.
  4616. _LT_SYS_MODULE_PATH_AIX([$1])
  4617. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4618. # Warning - without using the other run time loading flags,
  4619. # -berok will link without error, but may produce a broken library.
  4620. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4621. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4622. if test "$with_gnu_ld" = yes; then
  4623. # We only use this code for GNU lds that support --whole-archive.
  4624. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  4625. else
  4626. # Exported symbols can be pulled into shared objects from archives
  4627. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  4628. fi
  4629. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4630. # This is similar to how AIX traditionally builds its shared libraries.
  4631. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  4632. fi
  4633. fi
  4634. ;;
  4635. amigaos*)
  4636. case $host_cpu in
  4637. powerpc)
  4638. # see comment about AmigaOS4 .so support
  4639. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4640. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4641. ;;
  4642. m68k)
  4643. _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)'
  4644. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4645. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4646. ;;
  4647. esac
  4648. ;;
  4649. bsdi[[45]]*)
  4650. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4651. ;;
  4652. cygwin* | mingw* | pw32* | cegcc*)
  4653. # When not using gcc, we currently assume that we are using
  4654. # Microsoft Visual C++.
  4655. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4656. # no search path for DLLs.
  4657. case $cc_basename in
  4658. cl*)
  4659. # Native MSVC
  4660. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4661. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4662. _LT_TAGVAR(always_export_symbols, $1)=yes
  4663. _LT_TAGVAR(file_list_spec, $1)='@'
  4664. # Tell ltmain to make .lib files, not .a files.
  4665. libext=lib
  4666. # Tell ltmain to make .dll files, not .so files.
  4667. shrext_cmds=".dll"
  4668. # FIXME: Setting linknames here is a bad hack.
  4669. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  4670. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4671. sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  4672. else
  4673. sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  4674. fi~
  4675. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  4676. linknames='
  4677. # The linker will not automatically build a static lib if we build a DLL.
  4678. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4679. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4680. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4681. _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'
  4682. # Don't use ranlib
  4683. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  4684. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  4685. lt_tool_outputfile="@TOOL_OUTPUT@"~
  4686. case $lt_outputfile in
  4687. *.exe|*.EXE) ;;
  4688. *)
  4689. lt_outputfile="$lt_outputfile.exe"
  4690. lt_tool_outputfile="$lt_tool_outputfile.exe"
  4691. ;;
  4692. esac~
  4693. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  4694. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  4695. $RM "$lt_outputfile.manifest";
  4696. fi'
  4697. ;;
  4698. *)
  4699. # Assume MSVC wrapper
  4700. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4701. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4702. # Tell ltmain to make .lib files, not .a files.
  4703. libext=lib
  4704. # Tell ltmain to make .dll files, not .so files.
  4705. shrext_cmds=".dll"
  4706. # FIXME: Setting linknames here is a bad hack.
  4707. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  4708. # The linker will automatically build a .lib file if we build a DLL.
  4709. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4710. # FIXME: Should let the user specify the lib program.
  4711. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  4712. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4713. ;;
  4714. esac
  4715. ;;
  4716. darwin* | rhapsody*)
  4717. _LT_DARWIN_LINKER_FEATURES($1)
  4718. ;;
  4719. dgux*)
  4720. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4721. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4722. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4723. ;;
  4724. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4725. # support. Future versions do this automatically, but an explicit c++rt0.o
  4726. # does not break anything, and helps significantly (at the cost of a little
  4727. # extra space).
  4728. freebsd2.2*)
  4729. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  4730. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4731. _LT_TAGVAR(hardcode_direct, $1)=yes
  4732. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4733. ;;
  4734. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  4735. freebsd2.*)
  4736. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4737. _LT_TAGVAR(hardcode_direct, $1)=yes
  4738. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4739. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4740. ;;
  4741. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  4742. freebsd* | dragonfly*)
  4743. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4744. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4745. _LT_TAGVAR(hardcode_direct, $1)=yes
  4746. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4747. ;;
  4748. hpux9*)
  4749. if test "$GCC" = yes; then
  4750. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  4751. else
  4752. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  4753. fi
  4754. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4755. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4756. _LT_TAGVAR(hardcode_direct, $1)=yes
  4757. # hardcode_minus_L: Not really in the search PATH,
  4758. # but as the default location of the library.
  4759. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4760. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4761. ;;
  4762. hpux10*)
  4763. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4764. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4765. else
  4766. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  4767. fi
  4768. if test "$with_gnu_ld" = no; then
  4769. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4770. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4771. _LT_TAGVAR(hardcode_direct, $1)=yes
  4772. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4773. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4774. # hardcode_minus_L: Not really in the search PATH,
  4775. # but as the default location of the library.
  4776. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4777. fi
  4778. ;;
  4779. hpux11*)
  4780. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4781. case $host_cpu in
  4782. hppa*64*)
  4783. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4784. ;;
  4785. ia64*)
  4786. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4787. ;;
  4788. *)
  4789. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4790. ;;
  4791. esac
  4792. else
  4793. case $host_cpu in
  4794. hppa*64*)
  4795. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4796. ;;
  4797. ia64*)
  4798. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4799. ;;
  4800. *)
  4801. m4_if($1, [], [
  4802. # Older versions of the 11.00 compiler do not understand -b yet
  4803. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  4804. _LT_LINKER_OPTION([if $CC understands -b],
  4805. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  4806. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  4807. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  4808. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  4809. ;;
  4810. esac
  4811. fi
  4812. if test "$with_gnu_ld" = no; then
  4813. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4814. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4815. case $host_cpu in
  4816. hppa*64*|ia64*)
  4817. _LT_TAGVAR(hardcode_direct, $1)=no
  4818. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4819. ;;
  4820. *)
  4821. _LT_TAGVAR(hardcode_direct, $1)=yes
  4822. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4823. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4824. # hardcode_minus_L: Not really in the search PATH,
  4825. # but as the default location of the library.
  4826. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4827. ;;
  4828. esac
  4829. fi
  4830. ;;
  4831. irix5* | irix6* | nonstopux*)
  4832. if test "$GCC" = yes; then
  4833. _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'
  4834. # Try to use the -exported_symbol ld option, if it does not
  4835. # work, assume that -exports_file does not work either and
  4836. # implicitly export all symbols.
  4837. # This should be the same for all languages, so no per-tag cache variable.
  4838. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  4839. [lt_cv_irix_exported_symbol],
  4840. [save_LDFLAGS="$LDFLAGS"
  4841. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  4842. AC_LINK_IFELSE(
  4843. [AC_LANG_SOURCE(
  4844. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  4845. [C++], [[int foo (void) { return 0; }]],
  4846. [Fortran 77], [[
  4847. subroutine foo
  4848. end]],
  4849. [Fortran], [[
  4850. subroutine foo
  4851. end]])])],
  4852. [lt_cv_irix_exported_symbol=yes],
  4853. [lt_cv_irix_exported_symbol=no])
  4854. LDFLAGS="$save_LDFLAGS"])
  4855. if test "$lt_cv_irix_exported_symbol" = yes; then
  4856. _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'
  4857. fi
  4858. else
  4859. _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'
  4860. _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'
  4861. fi
  4862. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4863. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4864. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4865. _LT_TAGVAR(inherit_rpath, $1)=yes
  4866. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4867. ;;
  4868. netbsd* | netbsdelf*-gnu)
  4869. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4870. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  4871. else
  4872. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  4873. fi
  4874. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4875. _LT_TAGVAR(hardcode_direct, $1)=yes
  4876. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4877. ;;
  4878. newsos6)
  4879. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4880. _LT_TAGVAR(hardcode_direct, $1)=yes
  4881. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4882. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4883. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4884. ;;
  4885. *nto* | *qnx*)
  4886. ;;
  4887. openbsd*)
  4888. if test -f /usr/libexec/ld.so; then
  4889. _LT_TAGVAR(hardcode_direct, $1)=yes
  4890. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4891. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4892. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4893. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4894. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  4895. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4896. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4897. else
  4898. case $host_os in
  4899. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  4900. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4901. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4902. ;;
  4903. *)
  4904. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4905. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4906. ;;
  4907. esac
  4908. fi
  4909. else
  4910. _LT_TAGVAR(ld_shlibs, $1)=no
  4911. fi
  4912. ;;
  4913. os2*)
  4914. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4915. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4916. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4917. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  4918. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  4919. ;;
  4920. osf3*)
  4921. if test "$GCC" = yes; then
  4922. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4923. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  4924. else
  4925. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4926. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  4927. fi
  4928. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4929. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4930. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4931. ;;
  4932. osf4* | osf5*) # as osf3* with the addition of -msym flag
  4933. if test "$GCC" = yes; then
  4934. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4935. _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'
  4936. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4937. else
  4938. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4939. _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'
  4940. _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~
  4941. $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'
  4942. # Both c and cxx compiler support -rpath directly
  4943. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  4944. fi
  4945. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4946. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4947. ;;
  4948. solaris*)
  4949. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  4950. if test "$GCC" = yes; then
  4951. wlarc='${wl}'
  4952. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4953. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4954. $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'
  4955. else
  4956. case `$CC -V 2>&1` in
  4957. *"Compilers 5.0"*)
  4958. wlarc=''
  4959. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4960. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4961. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  4962. ;;
  4963. *)
  4964. wlarc='${wl}'
  4965. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4966. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4967. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4968. ;;
  4969. esac
  4970. fi
  4971. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4972. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4973. case $host_os in
  4974. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  4975. *)
  4976. # The compiler driver will combine and reorder linker options,
  4977. # but understands `-z linker_flag'. GCC discards it without `$wl',
  4978. # but is careful enough not to reorder.
  4979. # Supported since Solaris 2.6 (maybe 2.5.1?)
  4980. if test "$GCC" = yes; then
  4981. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  4982. else
  4983. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  4984. fi
  4985. ;;
  4986. esac
  4987. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4988. ;;
  4989. sunos4*)
  4990. if test "x$host_vendor" = xsequent; then
  4991. # Use $CC to link under sequent, because it throws in some extra .o
  4992. # files that make .init and .fini sections work.
  4993. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4994. else
  4995. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  4996. fi
  4997. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4998. _LT_TAGVAR(hardcode_direct, $1)=yes
  4999. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5000. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5001. ;;
  5002. sysv4)
  5003. case $host_vendor in
  5004. sni)
  5005. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5006. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5007. ;;
  5008. siemens)
  5009. ## LD is ld it makes a PLAMLIB
  5010. ## CC just makes a GrossModule.
  5011. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5012. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5013. _LT_TAGVAR(hardcode_direct, $1)=no
  5014. ;;
  5015. motorola)
  5016. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5017. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5018. ;;
  5019. esac
  5020. runpath_var='LD_RUN_PATH'
  5021. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5022. ;;
  5023. sysv4.3*)
  5024. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5025. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5026. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5027. ;;
  5028. sysv4*MP*)
  5029. if test -d /usr/nec; then
  5030. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5031. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5032. runpath_var=LD_RUN_PATH
  5033. hardcode_runpath_var=yes
  5034. _LT_TAGVAR(ld_shlibs, $1)=yes
  5035. fi
  5036. ;;
  5037. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5038. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5039. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5040. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5041. runpath_var='LD_RUN_PATH'
  5042. if test "$GCC" = yes; then
  5043. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5044. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5045. else
  5046. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5047. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5048. fi
  5049. ;;
  5050. sysv5* | sco3.2v5* | sco5v6*)
  5051. # Note: We can NOT use -z defs as we might desire, because we do not
  5052. # link with -lc, and that would cause any symbols used from libc to
  5053. # always be unresolved, which means just about no library would
  5054. # ever link correctly. If we're not using GNU ld we use -z text
  5055. # though, which does catch some bad symbols but isn't as heavy-handed
  5056. # as -z defs.
  5057. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5058. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5059. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5060. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5061. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5062. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5063. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5064. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5065. runpath_var='LD_RUN_PATH'
  5066. if test "$GCC" = yes; then
  5067. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5068. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5069. else
  5070. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5071. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5072. fi
  5073. ;;
  5074. uts4*)
  5075. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5076. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5077. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5078. ;;
  5079. *)
  5080. _LT_TAGVAR(ld_shlibs, $1)=no
  5081. ;;
  5082. esac
  5083. if test x$host_vendor = xsni; then
  5084. case $host in
  5085. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5086. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  5087. ;;
  5088. esac
  5089. fi
  5090. fi
  5091. ])
  5092. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5093. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5094. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5095. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5096. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5097. _LT_DECL([], [extract_expsyms_cmds], [2],
  5098. [The commands to extract the exported symbol list from a shared archive])
  5099. #
  5100. # Do we need to explicitly link libc?
  5101. #
  5102. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5103. x|xyes)
  5104. # Assume -lc should be added
  5105. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5106. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5107. case $_LT_TAGVAR(archive_cmds, $1) in
  5108. *'~'*)
  5109. # FIXME: we may have to deal with multi-command sequences.
  5110. ;;
  5111. '$CC '*)
  5112. # Test whether the compiler implicitly links with -lc since on some
  5113. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5114. # to ld, don't add -lc before -lgcc.
  5115. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5116. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5117. [$RM conftest*
  5118. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5119. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5120. soname=conftest
  5121. lib=conftest
  5122. libobjs=conftest.$ac_objext
  5123. deplibs=
  5124. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5125. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5126. compiler_flags=-v
  5127. linker_flags=-v
  5128. verstring=
  5129. output_objdir=.
  5130. libname=conftest
  5131. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5132. _LT_TAGVAR(allow_undefined_flag, $1)=
  5133. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5134. then
  5135. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5136. else
  5137. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5138. fi
  5139. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5140. else
  5141. cat conftest.err 1>&5
  5142. fi
  5143. $RM conftest*
  5144. ])
  5145. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5146. ;;
  5147. esac
  5148. fi
  5149. ;;
  5150. esac
  5151. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5152. [Whether or not to add -lc for building shared libraries])
  5153. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5154. [enable_shared_with_static_runtimes], [0],
  5155. [Whether or not to disallow shared libs when runtime libs are static])
  5156. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5157. [Compiler flag to allow reflexive dlopens])
  5158. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5159. [Compiler flag to generate shared objects directly from archives])
  5160. _LT_TAGDECL([], [compiler_needs_object], [1],
  5161. [Whether the compiler copes with passing no objects directly])
  5162. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5163. [Create an old-style archive from a shared archive])
  5164. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5165. [Create a temporary old-style archive to link instead of a shared archive])
  5166. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5167. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5168. _LT_TAGDECL([], [module_cmds], [2],
  5169. [Commands used to build a loadable module if different from building
  5170. a shared archive.])
  5171. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5172. _LT_TAGDECL([], [with_gnu_ld], [1],
  5173. [Whether we are building with GNU ld or not])
  5174. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5175. [Flag that allows shared libraries with undefined symbols to be built])
  5176. _LT_TAGDECL([], [no_undefined_flag], [1],
  5177. [Flag that enforces no undefined symbols])
  5178. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5179. [Flag to hardcode $libdir into a binary during linking.
  5180. This must work even if $libdir does not exist])
  5181. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5182. [Whether we need a single "-rpath" flag with a separated argument])
  5183. _LT_TAGDECL([], [hardcode_direct], [0],
  5184. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5185. DIR into the resulting binary])
  5186. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5187. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5188. DIR into the resulting binary and the resulting library dependency is
  5189. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  5190. library is relocated])
  5191. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5192. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5193. into the resulting binary])
  5194. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5195. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5196. into the resulting binary])
  5197. _LT_TAGDECL([], [hardcode_automatic], [0],
  5198. [Set to "yes" if building a shared library automatically hardcodes DIR
  5199. into the library and all subsequent libraries and executables linked
  5200. against it])
  5201. _LT_TAGDECL([], [inherit_rpath], [0],
  5202. [Set to yes if linker adds runtime paths of dependent libraries
  5203. to runtime path list])
  5204. _LT_TAGDECL([], [link_all_deplibs], [0],
  5205. [Whether libtool must link a program against all its dependency libraries])
  5206. _LT_TAGDECL([], [always_export_symbols], [0],
  5207. [Set to "yes" if exported symbols are required])
  5208. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5209. [The commands to list exported symbols])
  5210. _LT_TAGDECL([], [exclude_expsyms], [1],
  5211. [Symbols that should not be listed in the preloaded symbols])
  5212. _LT_TAGDECL([], [include_expsyms], [1],
  5213. [Symbols that must always be exported])
  5214. _LT_TAGDECL([], [prelink_cmds], [2],
  5215. [Commands necessary for linking programs (against libraries) with templates])
  5216. _LT_TAGDECL([], [postlink_cmds], [2],
  5217. [Commands necessary for finishing linking programs])
  5218. _LT_TAGDECL([], [file_list_spec], [1],
  5219. [Specify filename containing input files])
  5220. dnl FIXME: Not yet implemented
  5221. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5222. dnl [Compiler flag to generate thread safe objects])
  5223. ])# _LT_LINKER_SHLIBS
  5224. # _LT_LANG_C_CONFIG([TAG])
  5225. # ------------------------
  5226. # Ensure that the configuration variables for a C compiler are suitably
  5227. # defined. These variables are subsequently used by _LT_CONFIG to write
  5228. # the compiler configuration to `libtool'.
  5229. m4_defun([_LT_LANG_C_CONFIG],
  5230. [m4_require([_LT_DECL_EGREP])dnl
  5231. lt_save_CC="$CC"
  5232. AC_LANG_PUSH(C)
  5233. # Source file extension for C test sources.
  5234. ac_ext=c
  5235. # Object file extension for compiled C test sources.
  5236. objext=o
  5237. _LT_TAGVAR(objext, $1)=$objext
  5238. # Code to be used in simple compile tests
  5239. lt_simple_compile_test_code="int some_variable = 0;"
  5240. # Code to be used in simple link tests
  5241. lt_simple_link_test_code='int main(){return(0);}'
  5242. _LT_TAG_COMPILER
  5243. # Save the default compiler, since it gets overwritten when the other
  5244. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5245. compiler_DEFAULT=$CC
  5246. # save warnings/boilerplate of simple test code
  5247. _LT_COMPILER_BOILERPLATE
  5248. _LT_LINKER_BOILERPLATE
  5249. ## CAVEAT EMPTOR:
  5250. ## There is no encapsulation within the following macros, do not change
  5251. ## the running order or otherwise move them around unless you know exactly
  5252. ## what you are doing...
  5253. if test -n "$compiler"; then
  5254. _LT_COMPILER_NO_RTTI($1)
  5255. _LT_COMPILER_PIC($1)
  5256. _LT_COMPILER_C_O($1)
  5257. _LT_COMPILER_FILE_LOCKS($1)
  5258. _LT_LINKER_SHLIBS($1)
  5259. _LT_SYS_DYNAMIC_LINKER($1)
  5260. _LT_LINKER_HARDCODE_LIBPATH($1)
  5261. LT_SYS_DLOPEN_SELF
  5262. _LT_CMD_STRIPLIB
  5263. # Report which library types will actually be built
  5264. AC_MSG_CHECKING([if libtool supports shared libraries])
  5265. AC_MSG_RESULT([$can_build_shared])
  5266. AC_MSG_CHECKING([whether to build shared libraries])
  5267. test "$can_build_shared" = "no" && enable_shared=no
  5268. # On AIX, shared libraries and static libraries use the same namespace, and
  5269. # are all built from PIC.
  5270. case $host_os in
  5271. aix3*)
  5272. test "$enable_shared" = yes && enable_static=no
  5273. if test -n "$RANLIB"; then
  5274. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5275. postinstall_cmds='$RANLIB $lib'
  5276. fi
  5277. ;;
  5278. aix[[4-9]]*)
  5279. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  5280. test "$enable_shared" = yes && enable_static=no
  5281. fi
  5282. ;;
  5283. esac
  5284. AC_MSG_RESULT([$enable_shared])
  5285. AC_MSG_CHECKING([whether to build static libraries])
  5286. # Make sure either enable_shared or enable_static is yes.
  5287. test "$enable_shared" = yes || enable_static=yes
  5288. AC_MSG_RESULT([$enable_static])
  5289. _LT_CONFIG($1)
  5290. fi
  5291. AC_LANG_POP
  5292. CC="$lt_save_CC"
  5293. ])# _LT_LANG_C_CONFIG
  5294. # _LT_LANG_CXX_CONFIG([TAG])
  5295. # --------------------------
  5296. # Ensure that the configuration variables for a C++ compiler are suitably
  5297. # defined. These variables are subsequently used by _LT_CONFIG to write
  5298. # the compiler configuration to `libtool'.
  5299. m4_defun([_LT_LANG_CXX_CONFIG],
  5300. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5301. m4_require([_LT_DECL_EGREP])dnl
  5302. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5303. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  5304. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  5305. (test "X$CXX" != "Xg++"))) ; then
  5306. AC_PROG_CXXCPP
  5307. else
  5308. _lt_caught_CXX_error=yes
  5309. fi
  5310. AC_LANG_PUSH(C++)
  5311. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5312. _LT_TAGVAR(allow_undefined_flag, $1)=
  5313. _LT_TAGVAR(always_export_symbols, $1)=no
  5314. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5315. _LT_TAGVAR(compiler_needs_object, $1)=no
  5316. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5317. _LT_TAGVAR(hardcode_direct, $1)=no
  5318. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5319. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5320. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5321. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5322. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5323. _LT_TAGVAR(hardcode_automatic, $1)=no
  5324. _LT_TAGVAR(inherit_rpath, $1)=no
  5325. _LT_TAGVAR(module_cmds, $1)=
  5326. _LT_TAGVAR(module_expsym_cmds, $1)=
  5327. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5328. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5329. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5330. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5331. _LT_TAGVAR(no_undefined_flag, $1)=
  5332. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5333. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5334. # Source file extension for C++ test sources.
  5335. ac_ext=cpp
  5336. # Object file extension for compiled C++ test sources.
  5337. objext=o
  5338. _LT_TAGVAR(objext, $1)=$objext
  5339. # No sense in running all these tests if we already determined that
  5340. # the CXX compiler isn't working. Some variables (like enable_shared)
  5341. # are currently assumed to apply to all compilers on this platform,
  5342. # and will be corrupted by setting them based on a non-working compiler.
  5343. if test "$_lt_caught_CXX_error" != yes; then
  5344. # Code to be used in simple compile tests
  5345. lt_simple_compile_test_code="int some_variable = 0;"
  5346. # Code to be used in simple link tests
  5347. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5348. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5349. _LT_TAG_COMPILER
  5350. # save warnings/boilerplate of simple test code
  5351. _LT_COMPILER_BOILERPLATE
  5352. _LT_LINKER_BOILERPLATE
  5353. # Allow CC to be a program name with arguments.
  5354. lt_save_CC=$CC
  5355. lt_save_CFLAGS=$CFLAGS
  5356. lt_save_LD=$LD
  5357. lt_save_GCC=$GCC
  5358. GCC=$GXX
  5359. lt_save_with_gnu_ld=$with_gnu_ld
  5360. lt_save_path_LD=$lt_cv_path_LD
  5361. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5362. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5363. else
  5364. $as_unset lt_cv_prog_gnu_ld
  5365. fi
  5366. if test -n "${lt_cv_path_LDCXX+set}"; then
  5367. lt_cv_path_LD=$lt_cv_path_LDCXX
  5368. else
  5369. $as_unset lt_cv_path_LD
  5370. fi
  5371. test -z "${LDCXX+set}" || LD=$LDCXX
  5372. CC=${CXX-"c++"}
  5373. CFLAGS=$CXXFLAGS
  5374. compiler=$CC
  5375. _LT_TAGVAR(compiler, $1)=$CC
  5376. _LT_CC_BASENAME([$compiler])
  5377. if test -n "$compiler"; then
  5378. # We don't want -fno-exception when compiling C++ code, so set the
  5379. # no_builtin_flag separately
  5380. if test "$GXX" = yes; then
  5381. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5382. else
  5383. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5384. fi
  5385. if test "$GXX" = yes; then
  5386. # Set up default GNU C++ configuration
  5387. LT_PATH_LD
  5388. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5389. # archiving commands below assume that GNU ld is being used.
  5390. if test "$with_gnu_ld" = yes; then
  5391. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5392. _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'
  5393. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5394. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5395. # If archive_cmds runs LD, not CC, wlarc should be empty
  5396. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5397. # investigate it a little bit more. (MM)
  5398. wlarc='${wl}'
  5399. # ancient GNU ld didn't support --whole-archive et. al.
  5400. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5401. $GREP 'no-whole-archive' > /dev/null; then
  5402. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5403. else
  5404. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5405. fi
  5406. else
  5407. with_gnu_ld=no
  5408. wlarc=
  5409. # A generic and very simple default shared library creation
  5410. # command for GNU C++ for the case where it uses the native
  5411. # linker, instead of GNU ld. If possible, this setting should
  5412. # overridden to take advantage of the native linker features on
  5413. # the platform it is being used on.
  5414. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5415. fi
  5416. # Commands to make compiler produce verbose output that lists
  5417. # what "hidden" libraries, object files and flags are used when
  5418. # linking a shared library.
  5419. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  5420. else
  5421. GXX=no
  5422. with_gnu_ld=no
  5423. wlarc=
  5424. fi
  5425. # PORTME: fill in a description of your system's C++ link characteristics
  5426. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5427. _LT_TAGVAR(ld_shlibs, $1)=yes
  5428. case $host_os in
  5429. aix3*)
  5430. # FIXME: insert proper C++ library support
  5431. _LT_TAGVAR(ld_shlibs, $1)=no
  5432. ;;
  5433. aix[[4-9]]*)
  5434. if test "$host_cpu" = ia64; then
  5435. # On IA64, the linker does run time linking by default, so we don't
  5436. # have to do anything special.
  5437. aix_use_runtimelinking=no
  5438. exp_sym_flag='-Bexport'
  5439. no_entry_flag=""
  5440. else
  5441. aix_use_runtimelinking=no
  5442. # Test if we are trying to use run time linking or normal
  5443. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5444. # need to do runtime linking.
  5445. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5446. for ld_flag in $LDFLAGS; do
  5447. case $ld_flag in
  5448. *-brtl*)
  5449. aix_use_runtimelinking=yes
  5450. break
  5451. ;;
  5452. esac
  5453. done
  5454. ;;
  5455. esac
  5456. exp_sym_flag='-bexport'
  5457. no_entry_flag='-bnoentry'
  5458. fi
  5459. # When large executables or shared objects are built, AIX ld can
  5460. # have problems creating the table of contents. If linking a library
  5461. # or program results in "error TOC overflow" add -mminimal-toc to
  5462. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5463. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5464. _LT_TAGVAR(archive_cmds, $1)=''
  5465. _LT_TAGVAR(hardcode_direct, $1)=yes
  5466. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5467. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5468. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5469. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5470. if test "$GXX" = yes; then
  5471. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5472. # We only want to do this on AIX 4.2 and lower, the check
  5473. # below for broken collect2 doesn't work under 4.3+
  5474. collect2name=`${CC} -print-prog-name=collect2`
  5475. if test -f "$collect2name" &&
  5476. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5477. then
  5478. # We have reworked collect2
  5479. :
  5480. else
  5481. # We have old collect2
  5482. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5483. # It fails to find uninstalled libraries when the uninstalled
  5484. # path is not listed in the libpath. Setting hardcode_minus_L
  5485. # to unsupported forces relinking
  5486. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5487. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5488. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5489. fi
  5490. esac
  5491. shared_flag='-shared'
  5492. if test "$aix_use_runtimelinking" = yes; then
  5493. shared_flag="$shared_flag "'${wl}-G'
  5494. fi
  5495. else
  5496. # not using gcc
  5497. if test "$host_cpu" = ia64; then
  5498. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5499. # chokes on -Wl,-G. The following line is correct:
  5500. shared_flag='-G'
  5501. else
  5502. if test "$aix_use_runtimelinking" = yes; then
  5503. shared_flag='${wl}-G'
  5504. else
  5505. shared_flag='${wl}-bM:SRE'
  5506. fi
  5507. fi
  5508. fi
  5509. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5510. # It seems that -bexpall does not export symbols beginning with
  5511. # underscore (_), so it is better to generate a list of symbols to
  5512. # export.
  5513. _LT_TAGVAR(always_export_symbols, $1)=yes
  5514. if test "$aix_use_runtimelinking" = yes; then
  5515. # Warning - without using the other runtime loading flags (-brtl),
  5516. # -berok will link without error, but may produce a broken library.
  5517. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5518. # Determine the default libpath from the value encoded in an empty
  5519. # executable.
  5520. _LT_SYS_MODULE_PATH_AIX([$1])
  5521. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5522. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  5523. else
  5524. if test "$host_cpu" = ia64; then
  5525. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5526. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5527. _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"
  5528. else
  5529. # Determine the default libpath from the value encoded in an
  5530. # empty executable.
  5531. _LT_SYS_MODULE_PATH_AIX([$1])
  5532. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5533. # Warning - without using the other run time loading flags,
  5534. # -berok will link without error, but may produce a broken library.
  5535. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5536. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5537. if test "$with_gnu_ld" = yes; then
  5538. # We only use this code for GNU lds that support --whole-archive.
  5539. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5540. else
  5541. # Exported symbols can be pulled into shared objects from archives
  5542. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5543. fi
  5544. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5545. # This is similar to how AIX traditionally builds its shared
  5546. # libraries.
  5547. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  5548. fi
  5549. fi
  5550. ;;
  5551. beos*)
  5552. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5553. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5554. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5555. # support --undefined. This deserves some investigation. FIXME
  5556. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5557. else
  5558. _LT_TAGVAR(ld_shlibs, $1)=no
  5559. fi
  5560. ;;
  5561. chorus*)
  5562. case $cc_basename in
  5563. *)
  5564. # FIXME: insert proper C++ library support
  5565. _LT_TAGVAR(ld_shlibs, $1)=no
  5566. ;;
  5567. esac
  5568. ;;
  5569. cygwin* | mingw* | pw32* | cegcc*)
  5570. case $GXX,$cc_basename in
  5571. ,cl* | no,cl*)
  5572. # Native MSVC
  5573. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5574. # no search path for DLLs.
  5575. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5576. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5577. _LT_TAGVAR(always_export_symbols, $1)=yes
  5578. _LT_TAGVAR(file_list_spec, $1)='@'
  5579. # Tell ltmain to make .lib files, not .a files.
  5580. libext=lib
  5581. # Tell ltmain to make .dll files, not .so files.
  5582. shrext_cmds=".dll"
  5583. # FIXME: Setting linknames here is a bad hack.
  5584. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  5585. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5586. $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  5587. else
  5588. $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  5589. fi~
  5590. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5591. linknames='
  5592. # The linker will not automatically build a static lib if we build a DLL.
  5593. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5594. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5595. # Don't use ranlib
  5596. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5597. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5598. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5599. case $lt_outputfile in
  5600. *.exe|*.EXE) ;;
  5601. *)
  5602. lt_outputfile="$lt_outputfile.exe"
  5603. lt_tool_outputfile="$lt_tool_outputfile.exe"
  5604. ;;
  5605. esac~
  5606. func_to_tool_file "$lt_outputfile"~
  5607. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  5608. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5609. $RM "$lt_outputfile.manifest";
  5610. fi'
  5611. ;;
  5612. *)
  5613. # g++
  5614. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5615. # as there is no search path for DLLs.
  5616. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5617. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  5618. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5619. _LT_TAGVAR(always_export_symbols, $1)=no
  5620. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5621. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5622. _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'
  5623. # If the export-symbols file already is a .def file (1st line
  5624. # is EXPORTS), use it as is; otherwise, prepend...
  5625. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5626. cp $export_symbols $output_objdir/$soname.def;
  5627. else
  5628. echo EXPORTS > $output_objdir/$soname.def;
  5629. cat $export_symbols >> $output_objdir/$soname.def;
  5630. fi~
  5631. $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'
  5632. else
  5633. _LT_TAGVAR(ld_shlibs, $1)=no
  5634. fi
  5635. ;;
  5636. esac
  5637. ;;
  5638. darwin* | rhapsody*)
  5639. _LT_DARWIN_LINKER_FEATURES($1)
  5640. ;;
  5641. dgux*)
  5642. case $cc_basename in
  5643. ec++*)
  5644. # FIXME: insert proper C++ library support
  5645. _LT_TAGVAR(ld_shlibs, $1)=no
  5646. ;;
  5647. ghcx*)
  5648. # Green Hills C++ Compiler
  5649. # FIXME: insert proper C++ library support
  5650. _LT_TAGVAR(ld_shlibs, $1)=no
  5651. ;;
  5652. *)
  5653. # FIXME: insert proper C++ library support
  5654. _LT_TAGVAR(ld_shlibs, $1)=no
  5655. ;;
  5656. esac
  5657. ;;
  5658. freebsd2.*)
  5659. # C++ shared libraries reported to be fairly broken before
  5660. # switch to ELF
  5661. _LT_TAGVAR(ld_shlibs, $1)=no
  5662. ;;
  5663. freebsd-elf*)
  5664. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5665. ;;
  5666. freebsd* | dragonfly*)
  5667. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  5668. # conventions
  5669. _LT_TAGVAR(ld_shlibs, $1)=yes
  5670. ;;
  5671. haiku*)
  5672. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5673. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5674. ;;
  5675. hpux9*)
  5676. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5677. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5678. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5679. _LT_TAGVAR(hardcode_direct, $1)=yes
  5680. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5681. # but as the default
  5682. # location of the library.
  5683. case $cc_basename in
  5684. CC*)
  5685. # FIXME: insert proper C++ library support
  5686. _LT_TAGVAR(ld_shlibs, $1)=no
  5687. ;;
  5688. aCC*)
  5689. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5690. # Commands to make compiler produce verbose output that lists
  5691. # what "hidden" libraries, object files and flags are used when
  5692. # linking a shared library.
  5693. #
  5694. # There doesn't appear to be a way to prevent this compiler from
  5695. # explicitly linking system object files so we need to strip them
  5696. # from the output so that they don't get included in the library
  5697. # dependencies.
  5698. 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"'
  5699. ;;
  5700. *)
  5701. if test "$GXX" = yes; then
  5702. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5703. else
  5704. # FIXME: insert proper C++ library support
  5705. _LT_TAGVAR(ld_shlibs, $1)=no
  5706. fi
  5707. ;;
  5708. esac
  5709. ;;
  5710. hpux10*|hpux11*)
  5711. if test $with_gnu_ld = no; then
  5712. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5713. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5714. case $host_cpu in
  5715. hppa*64*|ia64*)
  5716. ;;
  5717. *)
  5718. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5719. ;;
  5720. esac
  5721. fi
  5722. case $host_cpu in
  5723. hppa*64*|ia64*)
  5724. _LT_TAGVAR(hardcode_direct, $1)=no
  5725. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5726. ;;
  5727. *)
  5728. _LT_TAGVAR(hardcode_direct, $1)=yes
  5729. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5730. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5731. # but as the default
  5732. # location of the library.
  5733. ;;
  5734. esac
  5735. case $cc_basename in
  5736. CC*)
  5737. # FIXME: insert proper C++ library support
  5738. _LT_TAGVAR(ld_shlibs, $1)=no
  5739. ;;
  5740. aCC*)
  5741. case $host_cpu in
  5742. hppa*64*)
  5743. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5744. ;;
  5745. ia64*)
  5746. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5747. ;;
  5748. *)
  5749. _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'
  5750. ;;
  5751. esac
  5752. # Commands to make compiler produce verbose output that lists
  5753. # what "hidden" libraries, object files and flags are used when
  5754. # linking a shared library.
  5755. #
  5756. # There doesn't appear to be a way to prevent this compiler from
  5757. # explicitly linking system object files so we need to strip them
  5758. # from the output so that they don't get included in the library
  5759. # dependencies.
  5760. 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"'
  5761. ;;
  5762. *)
  5763. if test "$GXX" = yes; then
  5764. if test $with_gnu_ld = no; then
  5765. case $host_cpu in
  5766. hppa*64*)
  5767. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5768. ;;
  5769. ia64*)
  5770. _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'
  5771. ;;
  5772. *)
  5773. _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'
  5774. ;;
  5775. esac
  5776. fi
  5777. else
  5778. # FIXME: insert proper C++ library support
  5779. _LT_TAGVAR(ld_shlibs, $1)=no
  5780. fi
  5781. ;;
  5782. esac
  5783. ;;
  5784. interix[[3-9]]*)
  5785. _LT_TAGVAR(hardcode_direct, $1)=no
  5786. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5787. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5788. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5789. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5790. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5791. # default) and relocated if they conflict, which is a slow very memory
  5792. # consuming and fragmenting process. To avoid this, we pick a random,
  5793. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5794. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5795. _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'
  5796. _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'
  5797. ;;
  5798. irix5* | irix6*)
  5799. case $cc_basename in
  5800. CC*)
  5801. # SGI C++
  5802. _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'
  5803. # Archives containing C++ object files must be created using
  5804. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  5805. # necessary to make sure instantiated templates are included
  5806. # in the archive.
  5807. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  5808. ;;
  5809. *)
  5810. if test "$GXX" = yes; then
  5811. if test "$with_gnu_ld" = no; then
  5812. _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'
  5813. else
  5814. _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'
  5815. fi
  5816. fi
  5817. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5818. ;;
  5819. esac
  5820. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5821. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5822. _LT_TAGVAR(inherit_rpath, $1)=yes
  5823. ;;
  5824. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  5825. case $cc_basename in
  5826. KCC*)
  5827. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5828. # KCC will only create a shared library if the output file
  5829. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5830. # to its proper name (with version) after linking.
  5831. _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'
  5832. _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'
  5833. # Commands to make compiler produce verbose output that lists
  5834. # what "hidden" libraries, object files and flags are used when
  5835. # linking a shared library.
  5836. #
  5837. # There doesn't appear to be a way to prevent this compiler from
  5838. # explicitly linking system object files so we need to strip them
  5839. # from the output so that they don't get included in the library
  5840. # dependencies.
  5841. 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"'
  5842. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5843. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5844. # Archives containing C++ object files must be created using
  5845. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5846. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5847. ;;
  5848. icpc* | ecpc* )
  5849. # Intel C++
  5850. with_gnu_ld=yes
  5851. # version 8.0 and above of icpc choke on multiply defined symbols
  5852. # if we add $predep_objects and $postdep_objects, however 7.1 and
  5853. # earlier do not add the objects themselves.
  5854. case `$CC -V 2>&1` in
  5855. *"Version 7."*)
  5856. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5857. _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'
  5858. ;;
  5859. *) # Version 8.0 or newer
  5860. tmp_idyn=
  5861. case $host_cpu in
  5862. ia64*) tmp_idyn=' -i_dynamic';;
  5863. esac
  5864. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5865. _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'
  5866. ;;
  5867. esac
  5868. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5869. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5870. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5871. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5872. ;;
  5873. pgCC* | pgcpp*)
  5874. # Portland Group C++ compiler
  5875. case `$CC -V` in
  5876. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  5877. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  5878. rm -rf $tpldir~
  5879. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  5880. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  5881. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  5882. rm -rf $tpldir~
  5883. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  5884. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  5885. $RANLIB $oldlib'
  5886. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  5887. rm -rf $tpldir~
  5888. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5889. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5890. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  5891. rm -rf $tpldir~
  5892. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5893. $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'
  5894. ;;
  5895. *) # Version 6 and above use weak symbols
  5896. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5897. _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'
  5898. ;;
  5899. esac
  5900. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5901. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5902. _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'
  5903. ;;
  5904. cxx*)
  5905. # Compaq C++
  5906. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5907. _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'
  5908. runpath_var=LD_RUN_PATH
  5909. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5910. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5911. # Commands to make compiler produce verbose output that lists
  5912. # what "hidden" libraries, object files and flags are used when
  5913. # linking a shared library.
  5914. #
  5915. # There doesn't appear to be a way to prevent this compiler from
  5916. # explicitly linking system object files so we need to strip them
  5917. # from the output so that they don't get included in the library
  5918. # dependencies.
  5919. 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'
  5920. ;;
  5921. xl* | mpixl* | bgxl*)
  5922. # IBM XL 8.0 on PPC, with GNU ld
  5923. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5924. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5925. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5926. if test "x$supports_anon_versioning" = xyes; then
  5927. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5928. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5929. echo "local: *; };" >> $output_objdir/$libname.ver~
  5930. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5931. fi
  5932. ;;
  5933. *)
  5934. case `$CC -V 2>&1 | sed 5q` in
  5935. *Sun\ C*)
  5936. # Sun C++ 5.9
  5937. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5938. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5939. _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'
  5940. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5941. _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'
  5942. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5943. # Not sure whether something based on
  5944. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  5945. # would be better.
  5946. output_verbose_link_cmd='func_echo_all'
  5947. # Archives containing C++ object files must be created using
  5948. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5949. # necessary to make sure instantiated templates are included
  5950. # in the archive.
  5951. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5952. ;;
  5953. esac
  5954. ;;
  5955. esac
  5956. ;;
  5957. lynxos*)
  5958. # FIXME: insert proper C++ library support
  5959. _LT_TAGVAR(ld_shlibs, $1)=no
  5960. ;;
  5961. m88k*)
  5962. # FIXME: insert proper C++ library support
  5963. _LT_TAGVAR(ld_shlibs, $1)=no
  5964. ;;
  5965. mvs*)
  5966. case $cc_basename in
  5967. cxx*)
  5968. # FIXME: insert proper C++ library support
  5969. _LT_TAGVAR(ld_shlibs, $1)=no
  5970. ;;
  5971. *)
  5972. # FIXME: insert proper C++ library support
  5973. _LT_TAGVAR(ld_shlibs, $1)=no
  5974. ;;
  5975. esac
  5976. ;;
  5977. netbsd*)
  5978. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5979. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  5980. wlarc=
  5981. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5982. _LT_TAGVAR(hardcode_direct, $1)=yes
  5983. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5984. fi
  5985. # Workaround some broken pre-1.5 toolchains
  5986. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  5987. ;;
  5988. *nto* | *qnx*)
  5989. _LT_TAGVAR(ld_shlibs, $1)=yes
  5990. ;;
  5991. openbsd2*)
  5992. # C++ shared libraries are fairly broken
  5993. _LT_TAGVAR(ld_shlibs, $1)=no
  5994. ;;
  5995. openbsd*)
  5996. if test -f /usr/libexec/ld.so; then
  5997. _LT_TAGVAR(hardcode_direct, $1)=yes
  5998. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5999. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6000. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6001. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6002. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6003. _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'
  6004. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6005. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6006. fi
  6007. output_verbose_link_cmd=func_echo_all
  6008. else
  6009. _LT_TAGVAR(ld_shlibs, $1)=no
  6010. fi
  6011. ;;
  6012. osf3* | osf4* | osf5*)
  6013. case $cc_basename in
  6014. KCC*)
  6015. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6016. # KCC will only create a shared library if the output file
  6017. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6018. # to its proper name (with version) after linking.
  6019. _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'
  6020. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6021. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6022. # Archives containing C++ object files must be created using
  6023. # the KAI C++ compiler.
  6024. case $host in
  6025. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6026. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6027. esac
  6028. ;;
  6029. RCC*)
  6030. # Rational C++ 2.4.1
  6031. # FIXME: insert proper C++ library support
  6032. _LT_TAGVAR(ld_shlibs, $1)=no
  6033. ;;
  6034. cxx*)
  6035. case $host in
  6036. osf3*)
  6037. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6038. _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'
  6039. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6040. ;;
  6041. *)
  6042. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6043. _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'
  6044. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6045. echo "-hidden">> $lib.exp~
  6046. $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~
  6047. $RM $lib.exp'
  6048. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6049. ;;
  6050. esac
  6051. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6052. # Commands to make compiler produce verbose output that lists
  6053. # what "hidden" libraries, object files and flags are used when
  6054. # linking a shared library.
  6055. #
  6056. # There doesn't appear to be a way to prevent this compiler from
  6057. # explicitly linking system object files so we need to strip them
  6058. # from the output so that they don't get included in the library
  6059. # dependencies.
  6060. 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"'
  6061. ;;
  6062. *)
  6063. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6064. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6065. case $host in
  6066. osf3*)
  6067. _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'
  6068. ;;
  6069. *)
  6070. _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'
  6071. ;;
  6072. esac
  6073. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6074. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6075. # Commands to make compiler produce verbose output that lists
  6076. # what "hidden" libraries, object files and flags are used when
  6077. # linking a shared library.
  6078. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6079. else
  6080. # FIXME: insert proper C++ library support
  6081. _LT_TAGVAR(ld_shlibs, $1)=no
  6082. fi
  6083. ;;
  6084. esac
  6085. ;;
  6086. psos*)
  6087. # FIXME: insert proper C++ library support
  6088. _LT_TAGVAR(ld_shlibs, $1)=no
  6089. ;;
  6090. sunos4*)
  6091. case $cc_basename in
  6092. CC*)
  6093. # Sun C++ 4.x
  6094. # FIXME: insert proper C++ library support
  6095. _LT_TAGVAR(ld_shlibs, $1)=no
  6096. ;;
  6097. lcc*)
  6098. # Lucid
  6099. # FIXME: insert proper C++ library support
  6100. _LT_TAGVAR(ld_shlibs, $1)=no
  6101. ;;
  6102. *)
  6103. # FIXME: insert proper C++ library support
  6104. _LT_TAGVAR(ld_shlibs, $1)=no
  6105. ;;
  6106. esac
  6107. ;;
  6108. solaris*)
  6109. case $cc_basename in
  6110. CC* | sunCC*)
  6111. # Sun C++ 4.2, 5.x and Centerline C++
  6112. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6113. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6114. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6115. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6116. $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'
  6117. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6118. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6119. case $host_os in
  6120. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6121. *)
  6122. # The compiler driver will combine and reorder linker options,
  6123. # but understands `-z linker_flag'.
  6124. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6125. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6126. ;;
  6127. esac
  6128. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6129. output_verbose_link_cmd='func_echo_all'
  6130. # Archives containing C++ object files must be created using
  6131. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6132. # necessary to make sure instantiated templates are included
  6133. # in the archive.
  6134. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6135. ;;
  6136. gcx*)
  6137. # Green Hills C++ Compiler
  6138. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6139. # The C++ compiler must be used to create the archive.
  6140. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6141. ;;
  6142. *)
  6143. # GNU C++ compiler with Solaris linker
  6144. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6145. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  6146. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6147. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6148. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6149. $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6150. # Commands to make compiler produce verbose output that lists
  6151. # what "hidden" libraries, object files and flags are used when
  6152. # linking a shared library.
  6153. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6154. else
  6155. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  6156. # platform.
  6157. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6158. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6159. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6160. # Commands to make compiler produce verbose output that lists
  6161. # what "hidden" libraries, object files and flags are used when
  6162. # linking a shared library.
  6163. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6164. fi
  6165. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  6166. case $host_os in
  6167. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6168. *)
  6169. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6170. ;;
  6171. esac
  6172. fi
  6173. ;;
  6174. esac
  6175. ;;
  6176. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6177. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6178. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6179. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6180. runpath_var='LD_RUN_PATH'
  6181. case $cc_basename in
  6182. CC*)
  6183. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6184. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6185. ;;
  6186. *)
  6187. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6188. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6189. ;;
  6190. esac
  6191. ;;
  6192. sysv5* | sco3.2v5* | sco5v6*)
  6193. # Note: We can NOT use -z defs as we might desire, because we do not
  6194. # link with -lc, and that would cause any symbols used from libc to
  6195. # always be unresolved, which means just about no library would
  6196. # ever link correctly. If we're not using GNU ld we use -z text
  6197. # though, which does catch some bad symbols but isn't as heavy-handed
  6198. # as -z defs.
  6199. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6200. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  6201. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6202. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6203. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  6204. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6205. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6206. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6207. runpath_var='LD_RUN_PATH'
  6208. case $cc_basename in
  6209. CC*)
  6210. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6211. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6212. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6213. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6214. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6215. '"$_LT_TAGVAR(reload_cmds, $1)"
  6216. ;;
  6217. *)
  6218. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6219. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6220. ;;
  6221. esac
  6222. ;;
  6223. tandem*)
  6224. case $cc_basename in
  6225. NCC*)
  6226. # NonStop-UX NCC 3.20
  6227. # FIXME: insert proper C++ library support
  6228. _LT_TAGVAR(ld_shlibs, $1)=no
  6229. ;;
  6230. *)
  6231. # FIXME: insert proper C++ library support
  6232. _LT_TAGVAR(ld_shlibs, $1)=no
  6233. ;;
  6234. esac
  6235. ;;
  6236. vxworks*)
  6237. # FIXME: insert proper C++ library support
  6238. _LT_TAGVAR(ld_shlibs, $1)=no
  6239. ;;
  6240. *)
  6241. # FIXME: insert proper C++ library support
  6242. _LT_TAGVAR(ld_shlibs, $1)=no
  6243. ;;
  6244. esac
  6245. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6246. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6247. _LT_TAGVAR(GCC, $1)="$GXX"
  6248. _LT_TAGVAR(LD, $1)="$LD"
  6249. ## CAVEAT EMPTOR:
  6250. ## There is no encapsulation within the following macros, do not change
  6251. ## the running order or otherwise move them around unless you know exactly
  6252. ## what you are doing...
  6253. _LT_SYS_HIDDEN_LIBDEPS($1)
  6254. _LT_COMPILER_PIC($1)
  6255. _LT_COMPILER_C_O($1)
  6256. _LT_COMPILER_FILE_LOCKS($1)
  6257. _LT_LINKER_SHLIBS($1)
  6258. _LT_SYS_DYNAMIC_LINKER($1)
  6259. _LT_LINKER_HARDCODE_LIBPATH($1)
  6260. _LT_CONFIG($1)
  6261. fi # test -n "$compiler"
  6262. CC=$lt_save_CC
  6263. CFLAGS=$lt_save_CFLAGS
  6264. LDCXX=$LD
  6265. LD=$lt_save_LD
  6266. GCC=$lt_save_GCC
  6267. with_gnu_ld=$lt_save_with_gnu_ld
  6268. lt_cv_path_LDCXX=$lt_cv_path_LD
  6269. lt_cv_path_LD=$lt_save_path_LD
  6270. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6271. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6272. fi # test "$_lt_caught_CXX_error" != yes
  6273. AC_LANG_POP
  6274. ])# _LT_LANG_CXX_CONFIG
  6275. # _LT_FUNC_STRIPNAME_CNF
  6276. # ----------------------
  6277. # func_stripname_cnf prefix suffix name
  6278. # strip PREFIX and SUFFIX off of NAME.
  6279. # PREFIX and SUFFIX must not contain globbing or regex special
  6280. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6281. # dot (in which case that matches only a dot).
  6282. #
  6283. # This function is identical to the (non-XSI) version of func_stripname,
  6284. # except this one can be used by m4 code that may be executed by configure,
  6285. # rather than the libtool script.
  6286. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6287. AC_REQUIRE([_LT_DECL_SED])
  6288. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6289. func_stripname_cnf ()
  6290. {
  6291. case ${2} in
  6292. .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
  6293. *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
  6294. esac
  6295. } # func_stripname_cnf
  6296. ])# _LT_FUNC_STRIPNAME_CNF
  6297. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6298. # ---------------------------------
  6299. # Figure out "hidden" library dependencies from verbose
  6300. # compiler output when linking a shared library.
  6301. # Parse the compiler output and extract the necessary
  6302. # objects, libraries and library flags.
  6303. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6304. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6305. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6306. # Dependencies to place before and after the object being linked:
  6307. _LT_TAGVAR(predep_objects, $1)=
  6308. _LT_TAGVAR(postdep_objects, $1)=
  6309. _LT_TAGVAR(predeps, $1)=
  6310. _LT_TAGVAR(postdeps, $1)=
  6311. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6312. dnl we can't use the lt_simple_compile_test_code here,
  6313. dnl because it contains code intended for an executable,
  6314. dnl not a library. It's possible we should let each
  6315. dnl tag define a new lt_????_link_test_code variable,
  6316. dnl but it's only used here...
  6317. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6318. int a;
  6319. void foo (void) { a = 0; }
  6320. _LT_EOF
  6321. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6322. class Foo
  6323. {
  6324. public:
  6325. Foo (void) { a = 0; }
  6326. private:
  6327. int a;
  6328. };
  6329. _LT_EOF
  6330. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6331. subroutine foo
  6332. implicit none
  6333. integer*4 a
  6334. a=0
  6335. return
  6336. end
  6337. _LT_EOF
  6338. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6339. subroutine foo
  6340. implicit none
  6341. integer a
  6342. a=0
  6343. return
  6344. end
  6345. _LT_EOF
  6346. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6347. public class foo {
  6348. private int a;
  6349. public void bar (void) {
  6350. a = 0;
  6351. }
  6352. };
  6353. _LT_EOF
  6354. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6355. package foo
  6356. func foo() {
  6357. }
  6358. _LT_EOF
  6359. ])
  6360. _lt_libdeps_save_CFLAGS=$CFLAGS
  6361. case "$CC $CFLAGS " in #(
  6362. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6363. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6364. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6365. esac
  6366. dnl Parse the compiler output and extract the necessary
  6367. dnl objects, libraries and library flags.
  6368. if AC_TRY_EVAL(ac_compile); then
  6369. # Parse the compiler output and extract the necessary
  6370. # objects, libraries and library flags.
  6371. # Sentinel used to keep track of whether or not we are before
  6372. # the conftest object file.
  6373. pre_test_object_deps_done=no
  6374. for p in `eval "$output_verbose_link_cmd"`; do
  6375. case ${prev}${p} in
  6376. -L* | -R* | -l*)
  6377. # Some compilers place space between "-{L,R}" and the path.
  6378. # Remove the space.
  6379. if test $p = "-L" ||
  6380. test $p = "-R"; then
  6381. prev=$p
  6382. continue
  6383. fi
  6384. # Expand the sysroot to ease extracting the directories later.
  6385. if test -z "$prev"; then
  6386. case $p in
  6387. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6388. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6389. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6390. esac
  6391. fi
  6392. case $p in
  6393. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6394. esac
  6395. if test "$pre_test_object_deps_done" = no; then
  6396. case ${prev} in
  6397. -L | -R)
  6398. # Internal compiler library paths should come after those
  6399. # provided the user. The postdeps already come after the
  6400. # user supplied libs so there is no need to process them.
  6401. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6402. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  6403. else
  6404. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  6405. fi
  6406. ;;
  6407. # The "-l" case would never come before the object being
  6408. # linked, so don't bother handling this case.
  6409. esac
  6410. else
  6411. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6412. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  6413. else
  6414. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  6415. fi
  6416. fi
  6417. prev=
  6418. ;;
  6419. *.lto.$objext) ;; # Ignore GCC LTO objects
  6420. *.$objext)
  6421. # This assumes that the test object file only shows up
  6422. # once in the compiler output.
  6423. if test "$p" = "conftest.$objext"; then
  6424. pre_test_object_deps_done=yes
  6425. continue
  6426. fi
  6427. if test "$pre_test_object_deps_done" = no; then
  6428. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6429. _LT_TAGVAR(predep_objects, $1)="$p"
  6430. else
  6431. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6432. fi
  6433. else
  6434. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6435. _LT_TAGVAR(postdep_objects, $1)="$p"
  6436. else
  6437. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6438. fi
  6439. fi
  6440. ;;
  6441. *) ;; # Ignore the rest.
  6442. esac
  6443. done
  6444. # Clean up.
  6445. rm -f a.out a.exe
  6446. else
  6447. echo "libtool.m4: error: problem compiling $1 test program"
  6448. fi
  6449. $RM -f confest.$objext
  6450. CFLAGS=$_lt_libdeps_save_CFLAGS
  6451. # PORTME: override above test on systems where it is broken
  6452. m4_if([$1], [CXX],
  6453. [case $host_os in
  6454. interix[[3-9]]*)
  6455. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6456. # hack all around it, let's just trust "g++" to DTRT.
  6457. _LT_TAGVAR(predep_objects,$1)=
  6458. _LT_TAGVAR(postdep_objects,$1)=
  6459. _LT_TAGVAR(postdeps,$1)=
  6460. ;;
  6461. linux*)
  6462. case `$CC -V 2>&1 | sed 5q` in
  6463. *Sun\ C*)
  6464. # Sun C++ 5.9
  6465. # The more standards-conforming stlport4 library is
  6466. # incompatible with the Cstd library. Avoid specifying
  6467. # it if it's in CXXFLAGS. Ignore libCrun as
  6468. # -library=stlport4 depends on it.
  6469. case " $CXX $CXXFLAGS " in
  6470. *" -library=stlport4 "*)
  6471. solaris_use_stlport4=yes
  6472. ;;
  6473. esac
  6474. if test "$solaris_use_stlport4" != yes; then
  6475. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6476. fi
  6477. ;;
  6478. esac
  6479. ;;
  6480. solaris*)
  6481. case $cc_basename in
  6482. CC* | sunCC*)
  6483. # The more standards-conforming stlport4 library is
  6484. # incompatible with the Cstd library. Avoid specifying
  6485. # it if it's in CXXFLAGS. Ignore libCrun as
  6486. # -library=stlport4 depends on it.
  6487. case " $CXX $CXXFLAGS " in
  6488. *" -library=stlport4 "*)
  6489. solaris_use_stlport4=yes
  6490. ;;
  6491. esac
  6492. # Adding this requires a known-good setup of shared libraries for
  6493. # Sun compiler versions before 5.6, else PIC objects from an old
  6494. # archive will be linked into the output, leading to subtle bugs.
  6495. if test "$solaris_use_stlport4" != yes; then
  6496. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6497. fi
  6498. ;;
  6499. esac
  6500. ;;
  6501. esac
  6502. ])
  6503. case " $_LT_TAGVAR(postdeps, $1) " in
  6504. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6505. esac
  6506. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6507. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6508. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  6509. fi
  6510. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  6511. [The directories searched by this compiler when creating a shared library])
  6512. _LT_TAGDECL([], [predep_objects], [1],
  6513. [Dependencies to place before and after the objects being linked to
  6514. create a shared library])
  6515. _LT_TAGDECL([], [postdep_objects], [1])
  6516. _LT_TAGDECL([], [predeps], [1])
  6517. _LT_TAGDECL([], [postdeps], [1])
  6518. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  6519. [The library search path used internally by the compiler when linking
  6520. a shared library])
  6521. ])# _LT_SYS_HIDDEN_LIBDEPS
  6522. # _LT_LANG_F77_CONFIG([TAG])
  6523. # --------------------------
  6524. # Ensure that the configuration variables for a Fortran 77 compiler are
  6525. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6526. # to write the compiler configuration to `libtool'.
  6527. m4_defun([_LT_LANG_F77_CONFIG],
  6528. [AC_LANG_PUSH(Fortran 77)
  6529. if test -z "$F77" || test "X$F77" = "Xno"; then
  6530. _lt_disable_F77=yes
  6531. fi
  6532. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6533. _LT_TAGVAR(allow_undefined_flag, $1)=
  6534. _LT_TAGVAR(always_export_symbols, $1)=no
  6535. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6536. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6537. _LT_TAGVAR(hardcode_direct, $1)=no
  6538. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6539. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6540. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6541. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6542. _LT_TAGVAR(hardcode_automatic, $1)=no
  6543. _LT_TAGVAR(inherit_rpath, $1)=no
  6544. _LT_TAGVAR(module_cmds, $1)=
  6545. _LT_TAGVAR(module_expsym_cmds, $1)=
  6546. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6547. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6548. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6549. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6550. _LT_TAGVAR(no_undefined_flag, $1)=
  6551. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6552. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6553. # Source file extension for f77 test sources.
  6554. ac_ext=f
  6555. # Object file extension for compiled f77 test sources.
  6556. objext=o
  6557. _LT_TAGVAR(objext, $1)=$objext
  6558. # No sense in running all these tests if we already determined that
  6559. # the F77 compiler isn't working. Some variables (like enable_shared)
  6560. # are currently assumed to apply to all compilers on this platform,
  6561. # and will be corrupted by setting them based on a non-working compiler.
  6562. if test "$_lt_disable_F77" != yes; then
  6563. # Code to be used in simple compile tests
  6564. lt_simple_compile_test_code="\
  6565. subroutine t
  6566. return
  6567. end
  6568. "
  6569. # Code to be used in simple link tests
  6570. lt_simple_link_test_code="\
  6571. program t
  6572. end
  6573. "
  6574. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6575. _LT_TAG_COMPILER
  6576. # save warnings/boilerplate of simple test code
  6577. _LT_COMPILER_BOILERPLATE
  6578. _LT_LINKER_BOILERPLATE
  6579. # Allow CC to be a program name with arguments.
  6580. lt_save_CC="$CC"
  6581. lt_save_GCC=$GCC
  6582. lt_save_CFLAGS=$CFLAGS
  6583. CC=${F77-"f77"}
  6584. CFLAGS=$FFLAGS
  6585. compiler=$CC
  6586. _LT_TAGVAR(compiler, $1)=$CC
  6587. _LT_CC_BASENAME([$compiler])
  6588. GCC=$G77
  6589. if test -n "$compiler"; then
  6590. AC_MSG_CHECKING([if libtool supports shared libraries])
  6591. AC_MSG_RESULT([$can_build_shared])
  6592. AC_MSG_CHECKING([whether to build shared libraries])
  6593. test "$can_build_shared" = "no" && enable_shared=no
  6594. # On AIX, shared libraries and static libraries use the same namespace, and
  6595. # are all built from PIC.
  6596. case $host_os in
  6597. aix3*)
  6598. test "$enable_shared" = yes && enable_static=no
  6599. if test -n "$RANLIB"; then
  6600. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6601. postinstall_cmds='$RANLIB $lib'
  6602. fi
  6603. ;;
  6604. aix[[4-9]]*)
  6605. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6606. test "$enable_shared" = yes && enable_static=no
  6607. fi
  6608. ;;
  6609. esac
  6610. AC_MSG_RESULT([$enable_shared])
  6611. AC_MSG_CHECKING([whether to build static libraries])
  6612. # Make sure either enable_shared or enable_static is yes.
  6613. test "$enable_shared" = yes || enable_static=yes
  6614. AC_MSG_RESULT([$enable_static])
  6615. _LT_TAGVAR(GCC, $1)="$G77"
  6616. _LT_TAGVAR(LD, $1)="$LD"
  6617. ## CAVEAT EMPTOR:
  6618. ## There is no encapsulation within the following macros, do not change
  6619. ## the running order or otherwise move them around unless you know exactly
  6620. ## what you are doing...
  6621. _LT_COMPILER_PIC($1)
  6622. _LT_COMPILER_C_O($1)
  6623. _LT_COMPILER_FILE_LOCKS($1)
  6624. _LT_LINKER_SHLIBS($1)
  6625. _LT_SYS_DYNAMIC_LINKER($1)
  6626. _LT_LINKER_HARDCODE_LIBPATH($1)
  6627. _LT_CONFIG($1)
  6628. fi # test -n "$compiler"
  6629. GCC=$lt_save_GCC
  6630. CC="$lt_save_CC"
  6631. CFLAGS="$lt_save_CFLAGS"
  6632. fi # test "$_lt_disable_F77" != yes
  6633. AC_LANG_POP
  6634. ])# _LT_LANG_F77_CONFIG
  6635. # _LT_LANG_FC_CONFIG([TAG])
  6636. # -------------------------
  6637. # Ensure that the configuration variables for a Fortran compiler are
  6638. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6639. # to write the compiler configuration to `libtool'.
  6640. m4_defun([_LT_LANG_FC_CONFIG],
  6641. [AC_LANG_PUSH(Fortran)
  6642. if test -z "$FC" || test "X$FC" = "Xno"; then
  6643. _lt_disable_FC=yes
  6644. fi
  6645. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6646. _LT_TAGVAR(allow_undefined_flag, $1)=
  6647. _LT_TAGVAR(always_export_symbols, $1)=no
  6648. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6649. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6650. _LT_TAGVAR(hardcode_direct, $1)=no
  6651. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6652. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6653. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6654. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6655. _LT_TAGVAR(hardcode_automatic, $1)=no
  6656. _LT_TAGVAR(inherit_rpath, $1)=no
  6657. _LT_TAGVAR(module_cmds, $1)=
  6658. _LT_TAGVAR(module_expsym_cmds, $1)=
  6659. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6660. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6661. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6662. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6663. _LT_TAGVAR(no_undefined_flag, $1)=
  6664. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6665. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6666. # Source file extension for fc test sources.
  6667. ac_ext=${ac_fc_srcext-f}
  6668. # Object file extension for compiled fc test sources.
  6669. objext=o
  6670. _LT_TAGVAR(objext, $1)=$objext
  6671. # No sense in running all these tests if we already determined that
  6672. # the FC compiler isn't working. Some variables (like enable_shared)
  6673. # are currently assumed to apply to all compilers on this platform,
  6674. # and will be corrupted by setting them based on a non-working compiler.
  6675. if test "$_lt_disable_FC" != yes; then
  6676. # Code to be used in simple compile tests
  6677. lt_simple_compile_test_code="\
  6678. subroutine t
  6679. return
  6680. end
  6681. "
  6682. # Code to be used in simple link tests
  6683. lt_simple_link_test_code="\
  6684. program t
  6685. end
  6686. "
  6687. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6688. _LT_TAG_COMPILER
  6689. # save warnings/boilerplate of simple test code
  6690. _LT_COMPILER_BOILERPLATE
  6691. _LT_LINKER_BOILERPLATE
  6692. # Allow CC to be a program name with arguments.
  6693. lt_save_CC="$CC"
  6694. lt_save_GCC=$GCC
  6695. lt_save_CFLAGS=$CFLAGS
  6696. CC=${FC-"f95"}
  6697. CFLAGS=$FCFLAGS
  6698. compiler=$CC
  6699. GCC=$ac_cv_fc_compiler_gnu
  6700. _LT_TAGVAR(compiler, $1)=$CC
  6701. _LT_CC_BASENAME([$compiler])
  6702. if test -n "$compiler"; then
  6703. AC_MSG_CHECKING([if libtool supports shared libraries])
  6704. AC_MSG_RESULT([$can_build_shared])
  6705. AC_MSG_CHECKING([whether to build shared libraries])
  6706. test "$can_build_shared" = "no" && enable_shared=no
  6707. # On AIX, shared libraries and static libraries use the same namespace, and
  6708. # are all built from PIC.
  6709. case $host_os in
  6710. aix3*)
  6711. test "$enable_shared" = yes && enable_static=no
  6712. if test -n "$RANLIB"; then
  6713. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6714. postinstall_cmds='$RANLIB $lib'
  6715. fi
  6716. ;;
  6717. aix[[4-9]]*)
  6718. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6719. test "$enable_shared" = yes && enable_static=no
  6720. fi
  6721. ;;
  6722. esac
  6723. AC_MSG_RESULT([$enable_shared])
  6724. AC_MSG_CHECKING([whether to build static libraries])
  6725. # Make sure either enable_shared or enable_static is yes.
  6726. test "$enable_shared" = yes || enable_static=yes
  6727. AC_MSG_RESULT([$enable_static])
  6728. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  6729. _LT_TAGVAR(LD, $1)="$LD"
  6730. ## CAVEAT EMPTOR:
  6731. ## There is no encapsulation within the following macros, do not change
  6732. ## the running order or otherwise move them around unless you know exactly
  6733. ## what you are doing...
  6734. _LT_SYS_HIDDEN_LIBDEPS($1)
  6735. _LT_COMPILER_PIC($1)
  6736. _LT_COMPILER_C_O($1)
  6737. _LT_COMPILER_FILE_LOCKS($1)
  6738. _LT_LINKER_SHLIBS($1)
  6739. _LT_SYS_DYNAMIC_LINKER($1)
  6740. _LT_LINKER_HARDCODE_LIBPATH($1)
  6741. _LT_CONFIG($1)
  6742. fi # test -n "$compiler"
  6743. GCC=$lt_save_GCC
  6744. CC=$lt_save_CC
  6745. CFLAGS=$lt_save_CFLAGS
  6746. fi # test "$_lt_disable_FC" != yes
  6747. AC_LANG_POP
  6748. ])# _LT_LANG_FC_CONFIG
  6749. # _LT_LANG_GCJ_CONFIG([TAG])
  6750. # --------------------------
  6751. # Ensure that the configuration variables for the GNU Java Compiler compiler
  6752. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6753. # to write the compiler configuration to `libtool'.
  6754. m4_defun([_LT_LANG_GCJ_CONFIG],
  6755. [AC_REQUIRE([LT_PROG_GCJ])dnl
  6756. AC_LANG_SAVE
  6757. # Source file extension for Java test sources.
  6758. ac_ext=java
  6759. # Object file extension for compiled Java test sources.
  6760. objext=o
  6761. _LT_TAGVAR(objext, $1)=$objext
  6762. # Code to be used in simple compile tests
  6763. lt_simple_compile_test_code="class foo {}"
  6764. # Code to be used in simple link tests
  6765. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  6766. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6767. _LT_TAG_COMPILER
  6768. # save warnings/boilerplate of simple test code
  6769. _LT_COMPILER_BOILERPLATE
  6770. _LT_LINKER_BOILERPLATE
  6771. # Allow CC to be a program name with arguments.
  6772. lt_save_CC=$CC
  6773. lt_save_CFLAGS=$CFLAGS
  6774. lt_save_GCC=$GCC
  6775. GCC=yes
  6776. CC=${GCJ-"gcj"}
  6777. CFLAGS=$GCJFLAGS
  6778. compiler=$CC
  6779. _LT_TAGVAR(compiler, $1)=$CC
  6780. _LT_TAGVAR(LD, $1)="$LD"
  6781. _LT_CC_BASENAME([$compiler])
  6782. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  6783. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6784. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6785. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6786. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6787. ## CAVEAT EMPTOR:
  6788. ## There is no encapsulation within the following macros, do not change
  6789. ## the running order or otherwise move them around unless you know exactly
  6790. ## what you are doing...
  6791. if test -n "$compiler"; then
  6792. _LT_COMPILER_NO_RTTI($1)
  6793. _LT_COMPILER_PIC($1)
  6794. _LT_COMPILER_C_O($1)
  6795. _LT_COMPILER_FILE_LOCKS($1)
  6796. _LT_LINKER_SHLIBS($1)
  6797. _LT_LINKER_HARDCODE_LIBPATH($1)
  6798. _LT_CONFIG($1)
  6799. fi
  6800. AC_LANG_RESTORE
  6801. GCC=$lt_save_GCC
  6802. CC=$lt_save_CC
  6803. CFLAGS=$lt_save_CFLAGS
  6804. ])# _LT_LANG_GCJ_CONFIG
  6805. # _LT_LANG_GO_CONFIG([TAG])
  6806. # --------------------------
  6807. # Ensure that the configuration variables for the GNU Go compiler
  6808. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6809. # to write the compiler configuration to `libtool'.
  6810. m4_defun([_LT_LANG_GO_CONFIG],
  6811. [AC_REQUIRE([LT_PROG_GO])dnl
  6812. AC_LANG_SAVE
  6813. # Source file extension for Go test sources.
  6814. ac_ext=go
  6815. # Object file extension for compiled Go test sources.
  6816. objext=o
  6817. _LT_TAGVAR(objext, $1)=$objext
  6818. # Code to be used in simple compile tests
  6819. lt_simple_compile_test_code="package main; func main() { }"
  6820. # Code to be used in simple link tests
  6821. lt_simple_link_test_code='package main; func main() { }'
  6822. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6823. _LT_TAG_COMPILER
  6824. # save warnings/boilerplate of simple test code
  6825. _LT_COMPILER_BOILERPLATE
  6826. _LT_LINKER_BOILERPLATE
  6827. # Allow CC to be a program name with arguments.
  6828. lt_save_CC=$CC
  6829. lt_save_CFLAGS=$CFLAGS
  6830. lt_save_GCC=$GCC
  6831. GCC=yes
  6832. CC=${GOC-"gccgo"}
  6833. CFLAGS=$GOFLAGS
  6834. compiler=$CC
  6835. _LT_TAGVAR(compiler, $1)=$CC
  6836. _LT_TAGVAR(LD, $1)="$LD"
  6837. _LT_CC_BASENAME([$compiler])
  6838. # Go did not exist at the time GCC didn't implicitly link libc in.
  6839. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6840. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6841. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6842. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6843. ## CAVEAT EMPTOR:
  6844. ## There is no encapsulation within the following macros, do not change
  6845. ## the running order or otherwise move them around unless you know exactly
  6846. ## what you are doing...
  6847. if test -n "$compiler"; then
  6848. _LT_COMPILER_NO_RTTI($1)
  6849. _LT_COMPILER_PIC($1)
  6850. _LT_COMPILER_C_O($1)
  6851. _LT_COMPILER_FILE_LOCKS($1)
  6852. _LT_LINKER_SHLIBS($1)
  6853. _LT_LINKER_HARDCODE_LIBPATH($1)
  6854. _LT_CONFIG($1)
  6855. fi
  6856. AC_LANG_RESTORE
  6857. GCC=$lt_save_GCC
  6858. CC=$lt_save_CC
  6859. CFLAGS=$lt_save_CFLAGS
  6860. ])# _LT_LANG_GO_CONFIG
  6861. # _LT_LANG_RC_CONFIG([TAG])
  6862. # -------------------------
  6863. # Ensure that the configuration variables for the Windows resource compiler
  6864. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6865. # to write the compiler configuration to `libtool'.
  6866. m4_defun([_LT_LANG_RC_CONFIG],
  6867. [AC_REQUIRE([LT_PROG_RC])dnl
  6868. AC_LANG_SAVE
  6869. # Source file extension for RC test sources.
  6870. ac_ext=rc
  6871. # Object file extension for compiled RC test sources.
  6872. objext=o
  6873. _LT_TAGVAR(objext, $1)=$objext
  6874. # Code to be used in simple compile tests
  6875. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  6876. # Code to be used in simple link tests
  6877. lt_simple_link_test_code="$lt_simple_compile_test_code"
  6878. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6879. _LT_TAG_COMPILER
  6880. # save warnings/boilerplate of simple test code
  6881. _LT_COMPILER_BOILERPLATE
  6882. _LT_LINKER_BOILERPLATE
  6883. # Allow CC to be a program name with arguments.
  6884. lt_save_CC="$CC"
  6885. lt_save_CFLAGS=$CFLAGS
  6886. lt_save_GCC=$GCC
  6887. GCC=
  6888. CC=${RC-"windres"}
  6889. CFLAGS=
  6890. compiler=$CC
  6891. _LT_TAGVAR(compiler, $1)=$CC
  6892. _LT_CC_BASENAME([$compiler])
  6893. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  6894. if test -n "$compiler"; then
  6895. :
  6896. _LT_CONFIG($1)
  6897. fi
  6898. GCC=$lt_save_GCC
  6899. AC_LANG_RESTORE
  6900. CC=$lt_save_CC
  6901. CFLAGS=$lt_save_CFLAGS
  6902. ])# _LT_LANG_RC_CONFIG
  6903. # LT_PROG_GCJ
  6904. # -----------
  6905. AC_DEFUN([LT_PROG_GCJ],
  6906. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  6907. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  6908. [AC_CHECK_TOOL(GCJ, gcj,)
  6909. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  6910. AC_SUBST(GCJFLAGS)])])[]dnl
  6911. ])
  6912. # Old name:
  6913. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  6914. dnl aclocal-1.4 backwards compatibility:
  6915. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  6916. # LT_PROG_GO
  6917. # ----------
  6918. AC_DEFUN([LT_PROG_GO],
  6919. [AC_CHECK_TOOL(GOC, gccgo,)
  6920. ])
  6921. # LT_PROG_RC
  6922. # ----------
  6923. AC_DEFUN([LT_PROG_RC],
  6924. [AC_CHECK_TOOL(RC, windres,)
  6925. ])
  6926. # Old name:
  6927. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  6928. dnl aclocal-1.4 backwards compatibility:
  6929. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  6930. # _LT_DECL_EGREP
  6931. # --------------
  6932. # If we don't have a new enough Autoconf to choose the best grep
  6933. # available, choose the one first in the user's PATH.
  6934. m4_defun([_LT_DECL_EGREP],
  6935. [AC_REQUIRE([AC_PROG_EGREP])dnl
  6936. AC_REQUIRE([AC_PROG_FGREP])dnl
  6937. test -z "$GREP" && GREP=grep
  6938. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  6939. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  6940. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  6941. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  6942. AC_SUBST([GREP])
  6943. ])
  6944. # _LT_DECL_OBJDUMP
  6945. # --------------
  6946. # If we don't have a new enough Autoconf to choose the best objdump
  6947. # available, choose the one first in the user's PATH.
  6948. m4_defun([_LT_DECL_OBJDUMP],
  6949. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  6950. test -z "$OBJDUMP" && OBJDUMP=objdump
  6951. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  6952. AC_SUBST([OBJDUMP])
  6953. ])
  6954. # _LT_DECL_DLLTOOL
  6955. # ----------------
  6956. # Ensure DLLTOOL variable is set.
  6957. m4_defun([_LT_DECL_DLLTOOL],
  6958. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  6959. test -z "$DLLTOOL" && DLLTOOL=dlltool
  6960. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  6961. AC_SUBST([DLLTOOL])
  6962. ])
  6963. # _LT_DECL_SED
  6964. # ------------
  6965. # Check for a fully-functional sed program, that truncates
  6966. # as few characters as possible. Prefer GNU sed if found.
  6967. m4_defun([_LT_DECL_SED],
  6968. [AC_PROG_SED
  6969. test -z "$SED" && SED=sed
  6970. Xsed="$SED -e 1s/^X//"
  6971. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  6972. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  6973. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  6974. ])# _LT_DECL_SED
  6975. m4_ifndef([AC_PROG_SED], [
  6976. ############################################################
  6977. # NOTE: This macro has been submitted for inclusion into #
  6978. # GNU Autoconf as AC_PROG_SED. When it is available in #
  6979. # a released version of Autoconf we should remove this #
  6980. # macro and use it instead. #
  6981. ############################################################
  6982. m4_defun([AC_PROG_SED],
  6983. [AC_MSG_CHECKING([for a sed that does not truncate output])
  6984. AC_CACHE_VAL(lt_cv_path_SED,
  6985. [# Loop through the user's path and test for sed and gsed.
  6986. # Then use that list of sed's as ones to test for truncation.
  6987. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6988. for as_dir in $PATH
  6989. do
  6990. IFS=$as_save_IFS
  6991. test -z "$as_dir" && as_dir=.
  6992. for lt_ac_prog in sed gsed; do
  6993. for ac_exec_ext in '' $ac_executable_extensions; do
  6994. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  6995. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  6996. fi
  6997. done
  6998. done
  6999. done
  7000. IFS=$as_save_IFS
  7001. lt_ac_max=0
  7002. lt_ac_count=0
  7003. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7004. # along with /bin/sed that truncates output.
  7005. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7006. test ! -f $lt_ac_sed && continue
  7007. cat /dev/null > conftest.in
  7008. lt_ac_count=0
  7009. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7010. # Check for GNU sed and select it if it is found.
  7011. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7012. lt_cv_path_SED=$lt_ac_sed
  7013. break
  7014. fi
  7015. while true; do
  7016. cat conftest.in conftest.in >conftest.tmp
  7017. mv conftest.tmp conftest.in
  7018. cp conftest.in conftest.nl
  7019. echo >>conftest.nl
  7020. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7021. cmp -s conftest.out conftest.nl || break
  7022. # 10000 chars as input seems more than enough
  7023. test $lt_ac_count -gt 10 && break
  7024. lt_ac_count=`expr $lt_ac_count + 1`
  7025. if test $lt_ac_count -gt $lt_ac_max; then
  7026. lt_ac_max=$lt_ac_count
  7027. lt_cv_path_SED=$lt_ac_sed
  7028. fi
  7029. done
  7030. done
  7031. ])
  7032. SED=$lt_cv_path_SED
  7033. AC_SUBST([SED])
  7034. AC_MSG_RESULT([$SED])
  7035. ])#AC_PROG_SED
  7036. ])#m4_ifndef
  7037. # Old name:
  7038. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7039. dnl aclocal-1.4 backwards compatibility:
  7040. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7041. # _LT_CHECK_SHELL_FEATURES
  7042. # ------------------------
  7043. # Find out whether the shell is Bourne or XSI compatible,
  7044. # or has some other useful features.
  7045. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7046. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  7047. # Try some XSI features
  7048. xsi_shell=no
  7049. ( _lt_dummy="a/b/c"
  7050. test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
  7051. = c,a/b,b/c, \
  7052. && eval 'test $(( 1 + 1 )) -eq 2 \
  7053. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  7054. && xsi_shell=yes
  7055. AC_MSG_RESULT([$xsi_shell])
  7056. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  7057. AC_MSG_CHECKING([whether the shell understands "+="])
  7058. lt_shell_append=no
  7059. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  7060. >/dev/null 2>&1 \
  7061. && lt_shell_append=yes
  7062. AC_MSG_RESULT([$lt_shell_append])
  7063. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  7064. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7065. lt_unset=unset
  7066. else
  7067. lt_unset=false
  7068. fi
  7069. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7070. # test EBCDIC or ASCII
  7071. case `echo X|tr X '\101'` in
  7072. A) # ASCII based system
  7073. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7074. lt_SP2NL='tr \040 \012'
  7075. lt_NL2SP='tr \015\012 \040\040'
  7076. ;;
  7077. *) # EBCDIC based system
  7078. lt_SP2NL='tr \100 \n'
  7079. lt_NL2SP='tr \r\n \100\100'
  7080. ;;
  7081. esac
  7082. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7083. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7084. ])# _LT_CHECK_SHELL_FEATURES
  7085. # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
  7086. # ------------------------------------------------------
  7087. # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
  7088. # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
  7089. m4_defun([_LT_PROG_FUNCTION_REPLACE],
  7090. [dnl {
  7091. sed -e '/^$1 ()$/,/^} # $1 /c\
  7092. $1 ()\
  7093. {\
  7094. m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
  7095. } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
  7096. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7097. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7098. test 0 -eq $? || _lt_function_replace_fail=:
  7099. ])
  7100. # _LT_PROG_REPLACE_SHELLFNS
  7101. # -------------------------
  7102. # Replace existing portable implementations of several shell functions with
  7103. # equivalent extended shell implementations where those features are available..
  7104. m4_defun([_LT_PROG_REPLACE_SHELLFNS],
  7105. [if test x"$xsi_shell" = xyes; then
  7106. _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
  7107. case ${1} in
  7108. */*) func_dirname_result="${1%/*}${2}" ;;
  7109. * ) func_dirname_result="${3}" ;;
  7110. esac])
  7111. _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
  7112. func_basename_result="${1##*/}"])
  7113. _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
  7114. case ${1} in
  7115. */*) func_dirname_result="${1%/*}${2}" ;;
  7116. * ) func_dirname_result="${3}" ;;
  7117. esac
  7118. func_basename_result="${1##*/}"])
  7119. _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
  7120. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  7121. # positional parameters, so assign one to ordinary parameter first.
  7122. func_stripname_result=${3}
  7123. func_stripname_result=${func_stripname_result#"${1}"}
  7124. func_stripname_result=${func_stripname_result%"${2}"}])
  7125. _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
  7126. func_split_long_opt_name=${1%%=*}
  7127. func_split_long_opt_arg=${1#*=}])
  7128. _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
  7129. func_split_short_opt_arg=${1#??}
  7130. func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
  7131. _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
  7132. case ${1} in
  7133. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  7134. *) func_lo2o_result=${1} ;;
  7135. esac])
  7136. _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
  7137. _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
  7138. _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
  7139. fi
  7140. if test x"$lt_shell_append" = xyes; then
  7141. _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
  7142. _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
  7143. func_quote_for_eval "${2}"
  7144. dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
  7145. eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
  7146. # Save a `func_append' function call where possible by direct use of '+='
  7147. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
  7148. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7149. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7150. test 0 -eq $? || _lt_function_replace_fail=:
  7151. else
  7152. # Save a `func_append' function call even when '+=' is not available
  7153. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
  7154. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7155. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7156. test 0 -eq $? || _lt_function_replace_fail=:
  7157. fi
  7158. if test x"$_lt_function_replace_fail" = x":"; then
  7159. AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
  7160. fi
  7161. ])
  7162. # _LT_PATH_CONVERSION_FUNCTIONS
  7163. # -----------------------------
  7164. # Determine which file name conversion functions should be used by
  7165. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7166. # for certain cross-compile configurations and native mingw.
  7167. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7168. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7169. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7170. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7171. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7172. [case $host in
  7173. *-*-mingw* )
  7174. case $build in
  7175. *-*-mingw* ) # actually msys
  7176. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7177. ;;
  7178. *-*-cygwin* )
  7179. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7180. ;;
  7181. * ) # otherwise, assume *nix
  7182. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7183. ;;
  7184. esac
  7185. ;;
  7186. *-*-cygwin* )
  7187. case $build in
  7188. *-*-mingw* ) # actually msys
  7189. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7190. ;;
  7191. *-*-cygwin* )
  7192. lt_cv_to_host_file_cmd=func_convert_file_noop
  7193. ;;
  7194. * ) # otherwise, assume *nix
  7195. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7196. ;;
  7197. esac
  7198. ;;
  7199. * ) # unhandled hosts (and "normal" native builds)
  7200. lt_cv_to_host_file_cmd=func_convert_file_noop
  7201. ;;
  7202. esac
  7203. ])
  7204. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7205. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7206. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7207. [0], [convert $build file names to $host format])dnl
  7208. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7209. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7210. [#assume ordinary cross tools, or native build.
  7211. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7212. case $host in
  7213. *-*-mingw* )
  7214. case $build in
  7215. *-*-mingw* ) # actually msys
  7216. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7217. ;;
  7218. esac
  7219. ;;
  7220. esac
  7221. ])
  7222. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7223. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7224. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7225. [0], [convert $build files to toolchain format])dnl
  7226. ])# _LT_PATH_CONVERSION_FUNCTIONS