github的一些开源项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8333 lines
298 KiB

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