🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
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.

8386 lines
299 KiB

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