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.

7377 lines
254 KiB

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