🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7998 lines
280 KiB

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