The source code and dockerfile for the GSW2024 AI Lab.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

7831 lines
274 KiB

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