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.

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