PageRenderTime 100ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 1ms

/libconfig-1.4.8/m4/libtool.m4

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